:root {
  color-scheme: light;
  --ink: #173b36;
  --muted: #5c7269;
  --line: #dce7e2;
  --paper: #f6f9f7;
  --card: #fff;
  --mint: #dcf3e6;
  --mint-dark: #14594d;
  --result: #f0faf4;
  --orange: #bd7047;
  --shadow: 0 18px 55px rgba(21, 66, 50, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body.dark {
  color-scheme: dark;
  --ink: #edf7f0;
  --muted: #abc3b8;
  --line: #2a4840;
  --paper: #101f1b;
  --card: #172c25;
  --mint: #244f40;
  --mint-dark: #a0e2bc;
  --result: #1b382c;
  --orange: #e6a077;
  --shadow: 0 18px 55px rgba(0, 0, 0, .18);
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, a, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--mint-dark); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.04em; }
.site-shell { width: min(100%, 1160px); margin-inline: auto; padding-inline: 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; letter-spacing: -.055em; }
.brand-period { color: var(--mint-dark); }
.brand-mark { display: flex; align-items: end; gap: 3px; height: 25px; }
.brand-mark span { display: block; width: 5px; border-radius: 3px; background: var(--mint-dark); }
.brand-mark span:nth-child(1) { height: 10px; opacity: .5; }
.brand-mark span:nth-child(2) { height: 18px; opacity: .75; }
.brand-mark span:nth-child(3) { height: 25px; }
.nav-links { display: flex; gap: 30px; color: var(--muted); font-size: 13px; font-weight: 600; }
.nav-links a { padding-block: 12px; }
.nav-links a.active, .nav-links a:hover { color: var(--mint-dark); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.language-toggle, .theme-toggle { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; }
.language-toggle { font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.theme-toggle { font-size: 22px; }
.hero { padding: 54px 0 50px; }
.hero-copy { text-align: center; max-width: 650px; margin: 0 auto 30px; }
.eyebrow { margin: 0 0 14px; color: var(--mint-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
.pulse { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint-dark); margin: 0 9px 2px 0; }
h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.1; margin-bottom: 15px; font-weight: 800; }
h1 br { display: none; }
h1 em { margin-left: .14em; color: var(--mint-dark); font-style: normal; }
.hero-lede { max-width: 540px; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hero-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; color: var(--muted); font-size: 11px; font-weight: 600; }
.converter-card { width: min(100%, 850px); margin-inline: auto; padding: 28px 32px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.card-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 20px; }
.card-kicker { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .12em; font-weight: 800; }
.card-topline h2 { margin: 0; font-size: 25px; line-height: 1.2; }
.converter-symbol { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--result); color: var(--mint-dark); font-size: 26px; }
.category-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.category-tabs button { min-height: 40px; padding: 9px 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.category-tabs button.active { color: var(--mint-dark); background: var(--mint); }
.category-tabs button:hover:not(.active) { color: var(--ink); background: var(--card); }
.conversion-grid { display: grid; grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); gap: 18px; align-items: center; padding-block: 25px 18px; }
.field-group { display: grid; gap: 9px; min-width: 0; }
.field-group > label:not(.sr-only) { color: var(--muted); font-size: 12px; font-weight: 700; }
.field-group select, .field-group input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); }
.field-group select { height: 45px; padding: 10px 28px 10px 12px; font-size: 13px; text-overflow: ellipsis; }
.field-group input { height: 87px; padding: 18px; background: var(--paper); font-size: clamp(25px, 3.4vw, 36px); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.field-group input::placeholder { color: var(--muted); font-size: 18px; font-weight: 400; letter-spacing: 0; }
.field-group input[aria-invalid="true"] { border-color: #bc5047; }
.swap-button { width: 38px; height: 38px; margin-top: 21px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--mint-dark); font-size: 21px; cursor: pointer; }
.swap-button:hover { background: var(--mint); }
.result-display { display: grid; gap: 4px; align-content: center; min-width: 0; min-height: 87px; padding: 11px 18px 13px; border: 1px solid var(--mint); border-radius: 10px; background: var(--result); }
.result-caption { color: var(--mint-dark); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.field-group output { display: block; min-width: 0; color: var(--ink); font-size: clamp(25px, 3.4vw, 36px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1.1; overflow-wrap: anywhere; }
.result-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 9px 11px 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 12px; font-variant-numeric: tabular-nums; }
.result-line > span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.result-line button { flex-shrink: 0; padding: 7px 10px; border: 0; border-radius: 6px; background: var(--card); color: var(--mint-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.result-line button:disabled { opacity: .45; cursor: default; }
.result-line button:hover:not(:disabled) { background: var(--mint); }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick-row button { min-height: 32px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--muted); font-size: 11px; cursor: pointer; }
.quick-row button:hover { border-color: var(--mint-dark); color: var(--ink); }
.decimal-hint { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.section-block { padding-block: 35px 45px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-size: 27px; }
.section-heading > p { max-width: 340px; margin: 0 0 2px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.category-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.category-card:hover { border-color: var(--mint-dark); transform: translateY(-2px); }
.category-icon { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; margin-bottom: 15px; border-radius: 9px; background: var(--result); color: var(--mint-dark); font-size: 19px; }
.category-card h3 { margin-bottom: 6px; font-size: 15px; }
.category-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.how-section { display: grid; grid-template-columns: .9fr 2fr; align-items: start; gap: 38px; padding-block: 38px 45px; border-top: 1px solid var(--line); }
.how-intro .eyebrow { margin-bottom: 9px; }
.how-intro h2 { margin: 0; font-size: 29px; line-height: 1.15; }
.how-intro h2 span { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { border-left: 1px solid var(--line); padding-left: 15px; }
.step > span { color: var(--mint-dark); font-size: 10px; font-weight: 800; }
.step h3 { margin: 12px 0 7px; font-size: 14px; }
.step p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer { display: flex; align-items: center; gap: 20px; padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand { color: var(--ink); font-size: 20px; }
.footer .brand-mark { transform: scale(.8); transform-origin: left center; margin-right: -3px; }
.footer p { margin: 0; }
.footer-note { margin-left: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 17px; }
.footer-links a { padding-block: 4px; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--mint-dark); text-decoration: underline; text-underline-offset: 3px; }
.info-main { width: min(100%, 850px); margin-inline: auto; }
.info-hero { max-width: 740px; margin-inline: auto; padding-block: 55px 40px; text-align: center; }
.info-hero h1 { font-size: clamp(34px, 4.8vw, 52px); }
.info-content { padding-bottom: 34px; }
.info-section { padding-block: 26px; border-top: 1px solid var(--line); }
.info-section h2 { margin-bottom: 13px; font-size: 25px; line-height: 1.25; }
.info-section p { margin-bottom: 12px; color: var(--muted); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.info-section p:last-child { margin-bottom: 0; }
.info-section a, .info-return a { color: var(--mint-dark); text-decoration: underline; text-underline-offset: 3px; }
.info-section .policy-date { font-size: 12px; }
.info-return { margin: 12px 0 0; font-size: 13px; font-weight: 650; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 22px; max-width: calc(100vw - 32px); padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--card); background: var(--ink); font-size: 12px; text-align: center; opacity: 0; transform: translate(-50%, 16px); transition: opacity .18s, transform .18s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.breadcrumb a { color: var(--mint-dark); text-decoration: underline; text-underline-offset: 3px; }
.category-card[aria-current="page"] { border-color: var(--mint-dark); background: var(--result); }
.unit-guide { width: min(100%, 850px); margin: 0 auto 45px; padding-top: 28px; border-top: 1px solid var(--line); }
.guide-intro { max-width: 760px; }
.guide-intro h2 { font-size: 27px; line-height: 1.2; margin-bottom: 14px; }
.guide-intro > p:not(.eyebrow), .guide-notes p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.conversion-formula { max-width: 100%; margin: 20px 0 26px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--mint-dark); background: var(--result); font-family: var(--font); font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-table-wrap { max-width: 100%; overflow-x: auto; margin-bottom: 27px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.conversion-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; font-variant-numeric: tabular-nums; }
.conversion-table caption { padding: 15px 18px; color: var(--ink); font-weight: 750; text-align: left; }
.conversion-table th, .conversion-table td { padding: 12px 18px; border-top: 1px solid var(--line); white-space: nowrap; }
.conversion-table thead { color: var(--mint-dark); background: var(--result); }
.conversion-table tbody th { font-weight: 600; }
.conversion-table td { color: var(--muted); }
.guide-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.guide-notes h3 { margin-bottom: 9px; font-size: 17px; line-height: 1.3; }
.guide-notes p { margin-bottom: 0; }
@media (max-width: 850px) {
  .site-shell { padding-inline: 24px; }
  .category-grid { gap: 8px; }
  .category-card { padding: 13px; }
  .how-section { grid-template-columns: 1fr; gap: 24px; }
  .how-intro h2 br { display: none; }
  .how-intro h2 span { margin-left: .15em; }
}
@media (max-width: 600px) {
  .site-shell { padding-inline: 16px; }
  .topbar { height: 70px; gap: 16px; }
  .nav-links { display: none; }
  .brand { font-size: 22px; }
  .hero { padding: 30px 0 34px; }
  .hero-copy { margin-bottom: 23px; }
  h1 { font-size: 38px; margin-bottom: 12px; }
  .hero-lede { font-size: 13px; }
  .hero-notes { margin-top: 14px; font-size: 10px; gap: 12px; }
  .eyebrow { font-size: 9px; margin-bottom: 10px; letter-spacing: .09em; }
  .converter-card { padding: 20px 17px 18px; border-radius: 17px; }
  .card-topline { margin-bottom: 16px; }
  .card-topline h2 { font-size: 23px; }
  .category-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; }
  .category-tabs button { min-height: 36px; padding: 8px 4px; font-size: 11px; }
  .conversion-grid { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 9px 8px; padding-top: 19px; }
  .field-group { display: contents; }
  .from-field > label:not(.sr-only) { grid-column: 1; grid-row: 1; }
  .to-field > label { grid-column: 3; grid-row: 1; }
  #from-unit { grid-column: 1; grid-row: 2; }
  #to-unit { grid-column: 3; grid-row: 2; }
  .field-group select { height: 44px; padding-left: 9px; padding-right: 23px; font-size: 11px; }
  #from-value { grid-column: 1 / -1; grid-row: 3; height: 65px; margin-top: 6px; padding: 13px 15px; font-size: 29px; }
  .swap-button { grid-column: 2; grid-row: 2; width: 30px; height: 30px; margin: 0; font-size: 18px; }
  .result-display { grid-column: 1 / -1; grid-row: 4; min-height: 80px; padding: 12px 15px; }
  .field-group output { font-size: 32px; }
  .result-line { font-size: 11px; gap: 9px; padding-left: 11px; }
  .section-block { padding-block: 27px 32px; }
  .section-heading { display: block; margin-bottom: 18px; }
  .section-heading h2 { font-size: 24px; margin-bottom: 9px; }
  .section-heading > p { max-width: none; font-size: 12px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card { padding: 15px; }
  .category-icon { margin-bottom: 11px; }
  .category-card h3 { font-size: 14px; }
  .category-card p { font-size: 11px; }
  .how-section { padding-block: 29px 34px; gap: 22px; }
  .how-intro h2 { font-size: 25px; }
  .how-intro h2 br { display: inline; }
  .how-intro h2 span { margin-left: 0; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .step { display: grid; grid-template-columns: 25px 1fr; gap: 0 8px; padding: 0; border: 0; }
  .step > span { grid-column: 1; grid-row: 1 / 3; padding-top: 3px; }
  .step h3 { grid-column: 2; margin: 0 0 4px; }
  .step p { grid-column: 2; }
  .footer { flex-wrap: wrap; gap: 12px; padding-block: 22px; }
  .footer p { width: 100%; order: 3; }
  .footer-note { margin-left: auto; }
  .footer-links { order: 4; width: 100%; }
  .info-hero { padding-block: 35px 29px; }
  .info-hero h1 { font-size: 34px; }
  .info-section { padding-block: 23px; }
  .info-section h2 { font-size: 23px; }
  .info-section p { font-size: 13px; }
  .unit-guide { margin-bottom: 30px; padding-top: 23px; }
  .guide-intro h2 { font-size: 23px; }
  .guide-intro > p:not(.eyebrow), .guide-notes p { font-size: 13px; }
  .conversion-formula { padding: 12px 14px; font-size: 12px; }
  .conversion-table { font-size: 12px; }
  .conversion-table caption, .conversion-table th, .conversion-table td { padding: 11px 13px; }
  .guide-notes { grid-template-columns: 1fr; gap: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
