:root {
  color-scheme: light;
  --ink: #153234;
  --muted: #587173;
  --line: #dce7e4;
  --paper: #ffffff;
  --soft: #eef7f5;
  --brand: #0b6b6f;
  --accent: #c4512d;
  --focus: #f2b84b;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #fbfdfc; line-height: 1.55; }
a { color: var(--brand); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--focus); color: #111; padding: .65rem 1rem; z-index: 10; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.nav { max-width: 1120px; margin: 0 auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; }
.brand-mark { display: block; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; box-shadow: 0 1px 4px rgba(21,50,52,.16); }
.nav-links { display: flex; gap: .4rem; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; padding: .55rem .7rem; border-radius: 8px; }
.nav-links a:hover { background: var(--soft); }
.hero { max-width: 1120px; margin: 0 auto; padding: clamp(2.25rem, 7vw, 5.5rem) 1rem 2rem; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.hero h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); line-height: 1.02; margin: .35rem 0 1rem; letter-spacing: 0; }
.hero p { max-width: 760px; font-size: 1.12rem; color: var(--muted); }
.hero-panel { background: var(--ink); color: white; border-radius: 8px; padding: 1rem; display: grid; gap: .65rem; }
.hero-panel a { color: white; background: rgba(255,255,255,.12); border-radius: 8px; padding: .75rem; text-decoration: none; }
.section { max-width: 1120px; margin: 0 auto; padding: 2.3rem 1rem; }
.narrow { max-width: 880px; }
h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.08; margin: .4rem 0 1rem; letter-spacing: 0; }
h2 { font-size: clamp(1.35rem, 2.4vw, 2rem); margin-top: 2.2rem; letter-spacing: 0; }
h3 { font-size: 1.1rem; margin: .3rem 0 .45rem; letter-spacing: 0; }
.lead { color: var(--muted); font-size: 1.08rem; }
.eyebrow { color: var(--accent); font-size: .82rem; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; margin: 0; }
.breadcrumb { font-size: .93rem; color: var(--muted); margin-bottom: 1rem; }
.search-box { display: grid; gap: .45rem; margin: 1.2rem 0 2rem; font-weight: 750; }
.search-box input, .field input, .field select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: .7rem .85rem; font: inherit; }
.pill-list { display: flex; flex-wrap: wrap; gap: .65rem; }
.pill-list a { border: 1px solid var(--line); border-radius: 999px; padding: .6rem .9rem; color: var(--ink); text-decoration: none; background: white; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 1rem; }
.calculator-card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; min-height: 190px; display: flex; flex-direction: column; }
.card-title { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: .75rem; align-items: start; margin-bottom: .7rem; }
.calculator-card p:not(.eyebrow) { color: var(--muted); margin: 0 0 1rem; }
.calculator-card h3 a { color: var(--ink); }
.calculator-card h3 { margin-top: .15rem; }
.mini-logo,
.large-logo {
  --accent: var(--brand);
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%), white;
  color: var(--accent);
  overflow: hidden;
}
.mini-logo { width: 42px; height: 42px; }
.large-logo { width: 62px; height: 62px; }
.mini-logo svg,
.large-logo svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; }
.large-logo svg { width: 30px; height: 30px; }
.mini-logo svg .ionicon-fill-none,
.large-logo svg .ionicon-fill-none { fill: none; }
.mini-logo svg .ionicon-stroke-width,
.large-logo svg .ionicon-stroke-width { stroke-width: 32px; }
.mini-logo strong,
.large-logo strong { color: var(--ink); font-size: 9px; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .15rem; }
.large-logo strong { font-size: 10px; }
.calculator-title { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 1.5rem; }
.calculator-title h1 { margin-top: 0; }
.calculator-title .lead { margin-bottom: 0; }
.status { margin-top: auto; color: var(--brand); font-weight: 800; }
.status.muted { color: var(--accent); }
.calculator-form { display: grid; gap: .85rem; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 1.5rem 0 2rem; }
.field { display: grid; gap: .35rem; margin: 0; border: 0; padding: 0; font-weight: 750; }
.field em { color: var(--muted); font-style: normal; }
.check-row { min-height: 54px; display: flex; gap: .75rem; align-items: center; border: 1px solid var(--line); background: white; border-radius: 8px; padding: .75rem; font-weight: 720; }
.check-row input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--brand); }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.segmented label span { display: grid; place-items: center; min-height: 46px; border-radius: 8px; border: 1px solid var(--line); background: white; }
.segmented input { position: absolute; opacity: 0; }
.segmented input:checked + span { background: var(--brand); color: white; border-color: var(--brand); }
.result { display: grid; gap: .25rem; background: var(--ink); color: white; border-radius: 8px; padding: 1rem; }
.result strong { font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.05; letter-spacing: 0; }
.result small { color: rgba(255,255,255,.82); font-size: .98rem; }
.notice, .todo-box, .app-cta { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; background: white; }
.source-list { padding-left: 1.15rem; }
.app-cta { background: var(--ink); color: white; margin-top: 2rem; }
.app-cta h2 { margin-top: 0; }
.app-cta p { color: rgba(255,255,255,.84); }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border-radius: 8px; padding: .7rem 1rem; background: var(--focus); color: #17130a; text-decoration: none; font-weight: 850; }
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 1rem; color: var(--muted); max-width: 1120px; margin-left: auto; margin-right: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .nav { align-items: flex-start; flex-direction: column; padding-top: .75rem; padding-bottom: .75rem; }
  .nav-links { width: 100%; justify-content: space-between; }
  .nav-links a { padding: .55rem .45rem; }
  .segmented { grid-template-columns: 1fr; }
}
