:root {
  color-scheme: light;
  --ink: #1a211e;
  --muted: #606963;
  --line: #d8ddd8;
  --paper: #fffdf8;
  --cream: #fffaf0;
  --water: #e7f4f2;
  --accent: #23786d;
  --accent-dark: #14584f;
  --yellow: #ffd84d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(960px, calc(100% - 32px)); margin-inline: auto; }
.nav { justify-content: space-between !important; }
.nav-links { margin-left: auto; }

.intro { padding: 30px 0 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 9px; color: var(--accent-dark); font-size: 13px; font-weight: 850; }
.eyebrow::before { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); content: ""; }
h1 { max-width: 760px; margin: 0; font-size: clamp(35px, 8vw, 58px); line-height: .98; letter-spacing: -.055em; }
.subtitle { max-width: 680px; margin: 15px 0 0; color: #35403a; font-size: clamp(17px, 2.5vw, 20px); line-height: 1.45; }
.quiet-note { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.trust-strip { display: flex; gap: 11px; align-items: flex-start; margin: 0 0 14px; padding: 13px 15px; border: 1px solid #bdd7d2; border-radius: 14px; background: var(--water); color: #26413b; font-size: 13px; line-height: 1.5; }
.trust-strip::before { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 5px; border: 2px solid var(--accent); border-radius: 50%; content: ""; }
.trust-strip strong { color: var(--ink); }
.trust-strip small { display: block; margin-top: 2px; }
.calculator-shell { display: flex; flex-direction: column; }
.calculator-shell .trust-strip { order: 1; }
.calculator-shell .calculator-card { order: 2; }

.calculator-card { overflow: hidden; margin-bottom: 36px; border: 1px solid #cbd2cc; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(29, 43, 37, .06); }
.calculator-grid { display: grid; }
.form-panel { padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.unit-switch { display: inline-grid; grid-template-columns: repeat(2, 1fr); padding: 3px; border: 1px solid #bcc5bf; border-radius: 12px; background: #f5f6f3; }
.unit-switch button { min-width: 52px; min-height: 42px; padding: 7px 11px; border: 0; border-radius: 9px; background: transparent; color: #4f5953; font-weight: 800; }
.unit-switch button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .11); }
.field { display: block; margin-bottom: 17px; }
.measurement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.measurement-grid .field { min-width: 0; }
.field-label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 850; }
select, input { width: 100%; min-height: 50px; border: 1.5px solid #aeb8b1; border-radius: 12px; background: #fff; color: var(--ink); outline: 0; }
select { padding: 0 42px 0 13px; }
.measurement-input { position: relative; }
.measurement-input input { padding: 0 54px 0 13px; font-size: 19px; font-weight: 800; }
.measurement-input span { position: absolute; top: 50%; right: 13px; translate: 0 -50%; color: #68716b; font-size: 13px; font-weight: 850; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(35, 120, 109, .23); outline-offset: 2px; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: #a15b42; background: #fffaf7; }
.field-help, .field-error, .ratio-note { display: block; min-height: 19px; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.field-error { min-height: 0; color: #8a402d; font-weight: 750; }
.ratio-note { min-height: 0; margin: -6px 0 14px; padding: 9px 11px; border-radius: 9px; background: #fff4d7; color: #665125; }
.ratio-note:empty { display: none; }
.text-button { min-height: 42px; margin: -3px 0 0; padding: 5px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 13px; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.length-only-panel { margin: 0 0 17px; padding: 13px; border: 1px solid #d6d9c4; border-radius: 12px; background: #fbfaef; }
.length-only-panel strong { display: block; font-size: 14px; }
.length-only-panel span { display: inline-block; margin-top: 4px; padding: 3px 7px; border-radius: 999px; background: #f1e8bd; color: #5d4f21; font-size: 11px; font-weight: 850; }
.length-only-panel .text-button { display: block; margin-top: 4px; }

.result-panel { display: flex; min-height: 320px; flex-direction: column; justify-content: center; padding: 26px 22px; background: #f1f8f6; border-top: 1px solid var(--line); }
.result-kicker { color: var(--accent-dark); font-size: 13px; font-weight: 900; }
.result-value { margin: 8px 0 4px; font-size: clamp(50px, 15vw, 72px); line-height: .95; letter-spacing: -.06em; }
.converted { display: grid; gap: 4px; margin-top: 11px; color: #33413b; font-size: 17px; font-weight: 750; }
.method-row { display: flex; flex-wrap: wrap; gap: 7px 9px; align-items: center; margin-top: 22px; color: #435149; font-size: 12px; }
.confidence { padding: 4px 8px; border-radius: 999px; background: #d8ebe5; color: #23584d; font-weight: 850; }
.confidence.lower { background: #f1e8bd; color: #655522; }
.result-message { max-width: 440px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.result-panel.is-empty .result-value { color: #9aa49e; }

.content-section { padding: 20px 0 48px; }
.section-heading { margin-bottom: 20px; }
.section-heading h2, .copy-block h2 { margin: 0; font-size: clamp(25px, 5vw, 34px); letter-spacing: -.04em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); }
.measure-card { display: grid; gap: 18px; padding: 20px; border: 1px solid #d5dad6; border-radius: 18px; background: var(--paper); }
.measure-figure { min-width: 0; margin: 0; }
.fish-photo-wrap { position: relative; overflow: hidden; border-radius: 13px; background: #132d2c; box-shadow: inset 0 0 0 1px rgba(20, 49, 47, .2); }
.fish-photo-wrap img { display: block; width: 100%; height: auto; aspect-ratio: 730 / 411; object-fit: cover; }
.measure-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.overlay-label { fill: #fff; font-size: 22px; font-weight: 950; letter-spacing: .04em; paint-order: stroke; stroke: rgba(13, 54, 49, .9); stroke-width: 7px; stroke-linejoin: round; }
.measure-figure figcaption { margin: 7px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.measure-figure figcaption a { color: var(--accent-dark); font-weight: 750; text-underline-offset: 2px; }
.measure-notes { display: grid; gap: 14px; }
.measure-notes article { padding-left: 14px; border-left: 3px solid var(--accent); }
.measure-notes h3 { margin: 0 0 4px; font-size: 16px; }
.measure-notes p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.copy-grid { display: grid; gap: 24px; margin-top: 34px; }
.copy-block p { margin: 10px 0 0; color: #4f5953; font-size: 15px; line-height: 1.7; }
.source-box { margin-top: 30px; padding: 16px 18px; border: 1px solid #d5dad6; border-radius: 14px; background: #fff; }
.source-box summary { cursor: pointer; font-weight: 850; }
.source-box p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.source-box a { color: var(--accent-dark); font-weight: 800; }
.privacy-finish { margin: 34px 0 0; padding: 16px; border-top: 1px solid var(--line); color: #4d5851; text-align: center; font-size: 13px; }

@media (min-width: 760px) {
  .intro { padding-top: 42px; }
  .calculator-grid { grid-template-columns: minmax(0, 1.02fr) minmax(340px, .98fr); }
  .form-panel { padding: 28px; }
  .result-panel { min-height: 100%; padding: 34px; border-top: 0; border-left: 1px solid var(--line); }
  .measure-card { grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); align-items: center; padding: 26px; }
  .copy-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 960px); }
  .nav-links a:not(.nav-pill) { display: none; }
  .intro { padding: 18px 0 13px; }
  .eyebrow { margin-bottom: 6px; font-size: 12px; }
  h1 { font-size: clamp(38px, 12vw, 48px); }
  .subtitle { margin-top: 9px; font-size: 16px; }
  .quiet-note { display: none; }
  .calculator-shell .calculator-card { order: 1; margin-bottom: 0; }
  .calculator-shell .trust-strip { order: 2; margin: 12px 0 24px; }
  .calculator-card { border-radius: 16px; box-shadow: none; }
  .form-panel { padding: 16px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading h2 { max-width: 150px; font-size: 19px; line-height: 1.15; }
  .unit-switch button { min-width: 50px; min-height: 48px; }
  .field { margin-bottom: 12px; }
  .field-help { min-height: 17px; margin-top: 4px; font-size: 11px; }
  select, input { min-height: 56px; }
  .measurement-input input { padding-right: 42px; font-size: 22px; }
  .measurement-input span { right: 11px; }
  .text-button { min-height: 46px; margin-top: -6px; }
  .ratio-note { margin-bottom: 10px; }
  .result-panel { min-height: 238px; padding: 20px 18px; }
  .result-value { margin-top: 5px; font-size: clamp(54px, 18vw, 68px); }
  .converted { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; font-size: 14px; }
  .method-row { margin-top: 15px; }
  .result-message { margin-top: 9px; line-height: 1.4; }
  .content-section { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
