:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #283c37;
  background: #faf8f3;
  line-height: 1.6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 20px 16px; }
.card { width: 100%; max-width: 480px; margin: 0 auto; padding: 28px 20px; background: #fff; border: 1px solid #e8e5dc; border-radius: 24px; overflow-wrap: anywhere; }
.logo { margin: 0 0 24px; font-size: 18px; font-weight: 750; }
h1 { margin: 0; font-size: clamp(26px, 6.8vw, 32px); line-height: 1.4; letter-spacing: -1px; }
.description { margin: 14px 0 24px; color: #56675f; font-size: 15px; word-break: keep-all; }
label { display: block; margin-bottom: 8px; font-weight: 650; font-size: 15px; }
input, button { width: 100%; max-width: 100%; min-width: 0; min-height: 56px; border-radius: 12px; font: inherit; font-size: 16px; }
input { display: block; appearance: none; padding: 14px 12px; background: #fffefa; color: #283c37; border: 1px solid #889d92; }
input::-webkit-date-and-time-value { text-align: left; }
input::-webkit-calendar-picker-indicator { padding: 4px; cursor: pointer; }
button { margin-top: 14px; padding: 12px; background: #32644f; color: #fff; border: 0; font-weight: 700; cursor: pointer; }
button:hover { background: #284f40; }
input:focus-visible, button:focus-visible { outline: 3px solid #7351a2; outline-offset: 3px; }
input[aria-invalid="true"] { border-color: #a32d38; }
.error { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #fff2f1; color: #a32d38; font-size: 14px; }
#result { margin-top: 28px; scroll-margin-top: 20px; border-radius: 16px; }
#result:focus-visible { outline: 3px solid #7351a2; outline-offset: 4px; }
.age-summary { padding: 26px 12px; text-align: center; background: #eaf3ed; border: 1px solid #d9e8de; border-radius: 16px; }
.age-summary h2 { margin: 0; font-size: 16px; font-weight: 500; }
.days { margin: 4px 0; font-size: 24px; font-weight: 650; overflow-wrap: anywhere; }
.days strong { font-size: clamp(44px, 12vw, 56px); line-height: 1.3; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.months { margin: 8px 0 0; font-size: 21px; font-weight: 650; }
.as-of { margin: 8px 0 0; font-size: 13px; color: #56675f; }
h3 { margin: 26px 0 8px; font-size: 16px; }
dl { margin: 0; padding: 0 14px; border: 1px solid #e8e5dc; border-radius: 14px; }
.milestone { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid #e8ede9; }
.milestone:last-child { border-bottom: 0; }
dt { font-size: 15px; font-weight: 650; flex-shrink: 0; }
dd { min-width: 0; margin: 0 0 0 auto; text-align: right; font-size: 14px; }
time { display: block; font-variant-numeric: tabular-nums; }
.status { display: inline-block; margin-top: 3px; color: #5c6861; font-size: 12px; }
.upcoming, .today { padding: 1px 8px; border-radius: 6px; background: #eaf3ed; color: #28553f; font-weight: 700; }
.today { background: #f5ebd9; color: #715118; }
.note { margin: 14px 0 0; font-size: 13px; line-height: 1.7; color: #5c6861; }
footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid #e8ede9; text-align: center; color: #5c6861; font-size: 12px; word-break: keep-all; }
a { color: #32644f; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid #7351a2; outline-offset: 3px; border-radius: 4px; }
.logo a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.footer-links a[aria-current="page"] { font-weight: 700; }
footer p { margin: 10px 0 0; }
.calculator-guide { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e8e5dc; }
.calculator-guide h2, .page-content h2 { margin: 24px 0 8px; font-size: 17px; line-height: 1.5; }
.calculator-guide h2:first-child { margin-top: 0; }
.calculator-guide p, .page-content p { margin: 0 0 14px; color: #56675f; font-size: 15px; line-height: 1.8; word-break: keep-all; }
.page-content { margin-top: 24px; }
.page-content .policy-date { font-size: 13px; }
@media (min-width: 600px) {
  body { padding: 56px 24px; }
  .card { padding: 36px; }
}
