@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #253c57;
  --ink: #18293d;
  --green: #13fb0c;
  --ice: #d3f1f5;
  --gray: #f2f2f2;
  --muted: #456974;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: "Jost", "Futura", "Trebuchet MS", sans-serif;
  font-weight: 400;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
button, input { font-family: inherit; font-size: 16px; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.page { width: min(1280px, 100%); margin: 0 auto; }

main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 48px;
}
h1 {
  margin: 8px 0 16px;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
}
h2 {
  margin: 36px 0 12px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}
p, li, label, legend { font-size: 18px; font-weight: 300; }
.intro { font-size: 20px; }

.notices, .panel, .support, .gate, .limitations, .text-alt {
  background: var(--ice);
  padding: 20px 22px;
  margin: 0 0 20px;
}
.panel { background: var(--gray); }
.support { background: #fff; border: 1px solid var(--ice); }
.notices p, .panel p, .support p, .gate p, .limitations p, .text-alt p { margin: 0 0 12px; }
.notices p:last-child, .panel p:last-child, .support p:last-child, .gate p:last-child, .limitations p:last-child, .text-alt p:last-child { margin-bottom: 0; }
.disclaimer { font-weight: 400; }
/* R1 (placement): privacy line under the Calculate controls, and Full disclaimer links. Body-text size and weight. */
.privacy-line { margin: 12px 0 0; font-size: 18px; font-weight: 300; }
.disc-link { font-weight: 300; }
.disc-link a { color: var(--ink); }
.support ul, .sources { padding-left: 1.2em; margin: 8px 0 0; }
.support li, .sources li { margin: 0.45em 0; }
.sources a { overflow-wrap: anywhere; }

fieldset {
  border: 1px solid var(--ice);
  margin: 0 0 16px;
  padding: 12px 16px 16px;
}
legend { font-weight: 400; padding: 0 6px; }
.choice { display: inline-flex; align-items: center; gap: 8px; margin: 8px 16px 0 0; min-height: 44px; }
.fields { display: flex; flex-wrap: wrap; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.field span { font-size: 16px; font-weight: 400; }
input[type="text"] {
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  min-height: 44px;
  width: 160px;
  max-width: 100%;
}
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 8px 8px 8px 0;
  padding: 10px 18px;
  background: var(--navy);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 400;
}
.action:hover { background: var(--ink); }

/* v32: Calculate button, disclosure line, and include-outlines checkbox. */
.calc-block { margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid #d9d9d9; }
.panel p.calc-disclosure {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.calc-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.calc-check input[type="checkbox"] { width: 22px; height: 22px; accent-color: #1A4A3C; margin: 0; }
.calc-check label { font-size: 17px; font-weight: 400; color: var(--ink); }
.calc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 52px;
  padding: 12px 36px;
  background: #1A4A3C;
  color: #F6F1E8;
  border: 2px solid #1A4A3C;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.calc-button:hover { background: #12362B; border-color: #12362B; }
.calc-button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.calc-hint { margin: 0 0 20px; font-size: 18px; font-weight: 400; color: var(--navy); }

.bmi-value { font-size: 22px; font-weight: 400; }
#sentence-slot:empty { display: none; margin: 0; }
.sentence-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.sentence-row .support { flex: 1 1 280px; }

.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ice);
  font-weight: 300;
  font-size: 16px;
  vertical-align: top;
}
th { font-weight: 400; background: var(--gray); }
caption { text-align: left; font-size: 16px; font-weight: 300; padding: 0 0 8px; }

.outline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.outline-group-label {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  color: var(--navy);
}
.timeline-hint {
  display: none;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 300;
  color: var(--navy);
}
.figures-scroller {
  min-width: 0;
  max-width: 100%;
}
/* One shared Paper panel. The static BMI reference strip stays on its own
   card grid and is not part of this timeline. */
.figures {
  display: grid;
  gap: 16px;
}
#outline-figures .figures-panel {
  --paper: #F6F1E8;
  --forest: #1A4A3C;
  --baseline: #5C574F;
  --foot-line: 89.85%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0 16px;
  padding: 16px;
  background: var(--paper);
  border: 0;
  position: relative;
}
#outline-figures .outline-figure {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / 4;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
}
#fig-now { grid-column: 1; }
#fig-3 { grid-column: 2; }
#fig-6 { grid-column: 3; }
#fig-12 { grid-column: 4; }
#outline-figures .outline-title {
  grid-row: 1;
  margin: 0 0 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--navy);
}
#outline-figures .svg-host {
  grid-row: 2;
  max-width: 140px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
}
#outline-figures .caption {
  grid-row: 3;
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 300;
  color: var(--navy);
  overflow: visible;
  overflow-wrap: break-word;
}
/* One thin even baseline under the feet, spanning the panel (row 2 of the
   subgrid). A second copy is used in print for the lower 2x2 row. */
#outline-figures .figures-baseline {
  grid-column: 1 / -1;
  width: auto;
  height: auto;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  pointer-events: none;
  z-index: 1;
  background: var(--baseline);
  clip-path: inset(var(--foot-line) 0 calc(100% - var(--foot-line) - 1px) 0);
}
#outline-figures .figures-baseline-1 { grid-row: 2; }
#outline-figures .figures-baseline-2 { display: none; }

/* v29a: three solid block arrows in the gaps between adjacent figures,
   vertically centered on the silhouette body. Color #3F6659 (Privacy-approved
   green option: forest #1A4A3C at 83% over Paper). Decorative, not interactive,
   not a ramp tint. 80x72 / shaft 22 at 1024+; 70x63 / shaft 19.25 at 768–1023
   (largest uniform scale that keeps >=24 px clearance without widening gaps);
   52x44 / shaft 14 on phones. */
#outline-figures .stage-chevron {
  grid-row: 2;
  align-self: stretch;
  justify-self: center;
  z-index: 2;
  pointer-events: none;
  position: relative;
  width: 80px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  filter: none;
  animation: none;
  transition: none;
}
#outline-figures .stage-chevron-1 { grid-column: 1 / 3; }
#outline-figures .stage-chevron-2 { grid-column: 2 / 4; }
#outline-figures .stage-chevron-3 { grid-column: 3 / 5; }
#outline-figures .stage-chevron svg.arrow-lg {
  position: absolute;
  left: 0;
  top: calc(46.60926% - 36px);
  display: block;
  width: 80px;
  height: 72px;
  overflow: visible;
  animation: none;
  transition: none;
}
#outline-figures .stage-chevron svg.arrow-sm {
  display: none;
  animation: none;
  transition: none;
}
#outline-figures .stage-chevron path,
#outline-figures .figures-panel.one-color .stage-chevron path {
  fill: #3F6659;
  stroke: none;
  filter: none;
  animation: none;
  transition: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  #outline-figures .stage-chevron {
    width: 70px;
  }
  #outline-figures .stage-chevron svg.arrow-lg {
    width: 70px;
    height: 63px;
    top: calc(46.60926% - 31.5px);
  }
}


/* v26b: solid forest-on-paper tints, CSS classes only. No opacity, no gradients. */
#fig-now .svg-host path { fill: #678478; }
#fig-3 .svg-host path { fill: #4D7064; }
#fig-6 .svg-host path { fill: #325C4F; }
#fig-12 .svg-host path { fill: #1A4A3C; }
#outline-figures .figures-panel.one-color .svg-host path { fill: #1A4A3C; }

.one-color-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 400;
  color: var(--navy);
}
.one-color-control input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
}
.one-color-control label { font-size: 16px; font-weight: 400; color: var(--navy); }
.shading-note,
.bmi-limit-note {
  margin: 10px 0 8px;
  font-size: 16px;
  font-weight: 300;
  color: var(--navy);
}
.bmi-limit-note { margin-top: 0; }

figure { margin: 0; background: #fff; border: 1px solid var(--ice); padding: 8px; }
figure svg { display: block; width: 100%; height: auto; }
.outline-title { margin: 8px 0 4px; font-size: 16px; font-weight: 400; }
.caption { margin: 0; font-size: 16px; font-weight: 300; }
.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
details { margin: 12px 0 28px; }
summary { cursor: pointer; font-size: 22px; font-weight: 400; min-height: 44px; }

.energy { margin-top: 64px; }
.site-summary {
  margin: 0;
  padding: 16px 24px;
  background: #fff;
  color: #18293d;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}
.site-summary a { color: #18293d; }
.legal {
  margin: 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--navy);
  font-size: 16px;
  text-align: center;
  padding: 16px;
}

@media (max-width: 999px) {
  .calc-button { width: 100%; min-height: 56px; }
  main { width: auto; max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .strip { grid-template-columns: 1fr; }
}

/* At 768px and up the brief requires four figures in one row. Widen main in the
   768–999px band so the row can use the viewport instead of the 640px phone cap. */
@media (min-width: 768px) and (max-width: 999px) {
  main { max-width: none; }
}

/* Below 768px, a four-across row makes arithmetic captions too narrow. Use a
   horizontally scrollable row with a peek of the next figure instead. */
@media (max-width: 767px) {
  .timeline-hint { display: block; }
  .figures-scroller {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
  }
  /* The shared panel scrolls as one picture at a fixed min width so the
     Paper background and baseline stay continuous. */
  #outline-figures .figures-panel {
    display: grid;
    grid-template-columns: repeat(4, 240px);
    grid-template-rows: auto auto auto;
    grid-auto-flow: row;
    width: calc(32px + 4 * 240px + 3 * 16px);
    min-width: calc(32px + 4 * 240px + 3 * 16px);
    max-width: none;
    gap: 0 16px;
  }
  #outline-figures .outline-figure {
    scroll-snap-align: start;
    min-width: 0;
  }
  #outline-figures .svg-host {
    max-width: 140px;
  }
  #outline-figures .stage-chevron {
    width: 52px;
  }
  #outline-figures .stage-chevron svg.arrow-lg {
    display: none;
  }
  #outline-figures .stage-chevron svg.arrow-sm {
    position: absolute;
    left: 0;
    top: calc(46.60926% - 22px);
    display: block;
    width: 52px;
    height: 44px;
    overflow: visible;
    animation: none;
    transition: none;
  }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  section.panel[aria-label="Measurements"] > fieldset,
  section.panel[aria-label="Measurements"] .calc-check { display: none !important; }
  .menu-toggle, .nav, .accent-bar, .action, .calc-button, .calc-hint, .timeline-hint, .one-color-control, .stage-chevron { display: none !important; }
  .notices, .disclaimer, .text-alt, .limitations, .shading-note, .bmi-limit-note, .calc-disclosure { display: block; }
  #outline-figures .svg-host path,
  #outline-figures .figures-panel.one-color .svg-host path,
  #fig-now .svg-host path,
  #fig-3 .svg-host path,
  #fig-6 .svg-host path,
  #fig-12 .svg-host path { fill: #1A4A3C; }
  figure { break-inside: avoid; page-break-inside: avoid; }
  .figures-scroller {
    overflow: visible;
  }
  #outline-figures .figures-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto auto auto;
    grid-auto-flow: row;
    width: auto;
    min-width: 0;
    gap: 0 16px;
    background: #F6F1E8;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #outline-figures .outline-figure {
    width: auto;
    max-width: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #outline-figures #fig-now,
  #outline-figures #fig-3 { grid-row: 1 / 4; }
  #outline-figures #fig-now { grid-column: 1; }
  #outline-figures #fig-3 { grid-column: 2; }
  #outline-figures #fig-6,
  #outline-figures #fig-12 { grid-row: 4 / 7; }
  #outline-figures #fig-6 { grid-column: 1; }
  #outline-figures #fig-12 { grid-column: 2; }
  #outline-figures #fig-6 .outline-title,
  #outline-figures #fig-12 .outline-title { margin-top: 16px; }
  #outline-figures .figures-baseline {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #outline-figures .figures-baseline-1 { display: block; grid-row: 2; }
  #outline-figures .figures-baseline-2 { display: block; grid-row: 5; }
  .svg-host,
  .svg-host svg,
  figure svg,
  .caption,
  .outline-title,
  .disclaimer,
  .text-alt,
  .shading-note,
  .bmi-limit-note,
  #outline-figures .figures-panel {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  figure svg {
    width: 100%;
    height: auto;
    max-width: 180px;
  }
}

/* v38-r5 tool-first (FINAL-CANDIDATE spec, section 2 item 1): compact top block, static, body-text size, outside the panel. */
.top-block { margin: 0 0 16px; }
.top-block p { margin: 0 0 4px; line-height: 27px; }
.top-s1 { font-weight: 400; }
.top-block .disc-link a { display: block; width: max-content; padding: 10px 0; line-height: 24px; }
