/* prototype-5 redesign: editorial rail grid, porcelain paper, deep green accent */
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: optional;
}

:root {
  --paper: #f7f5f0;
  --paper-deep: #edeae1;
  --ink: #1c201d;
  --muted: #67645b;
  --accent: #2f5245;
  --accent-deep: #23403a;
  --line: #d9d4c8;
  --line-strong: #b6afa0;
  --measure: 66ch;
  font-family: "Source Sans 3", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.6;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; }

::selection { background: var(--accent); color: var(--paper); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

p, li, dd, dt, td, th, input, textarea, select, button { font-size: 1rem; }
p { max-width: var(--measure); margin: 0 0 1.1em; }
ul, ol { max-width: var(--measure); padding-left: 1.35rem; }
li { margin-bottom: 0.5em; }

h1, h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.4rem); margin: 0 0 22px; max-width: 18ch; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem); margin: 0 0 20px; max-width: 24ch; }
h3 { font-family: "Source Sans 3", Arial, sans-serif; font-size: 1.12rem; line-height: 1.3; margin: 24px 0 8px; }

.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--paper); color: var(--ink); padding: 10px 14px; }
.skip-link:focus { top: 12px; }

/* Masthead */

.site-header { border-bottom: 1px solid var(--line); padding: 26px 0 20px; }
.header-inner { display: grid; gap: 14px; align-items: end; }
.brand { display: inline-flex; width: fit-content; flex-direction: column; gap: 5px; color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand-name { font-family: "Source Serif 4", Georgia, serif; font-size: 1.7rem; font-weight: 600; letter-spacing: -0.015em; }
.brand-role { color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 26px; list-style: none; padding: 0; margin: 0; max-width: none; }
nav li { margin: 0; }
nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); font-size: 0.95rem; font-weight: 500; text-decoration: none; }
nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; }
nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
nav a.nav-contact { color: var(--accent); font-weight: 700; }

/* Buttons */

.button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 2px; padding: 12px 30px;
  font-weight: 600; letter-spacing: 0.01em; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.button-primary { color: var(--paper); background: var(--accent); }
.button-primary:hover { color: var(--paper); background: var(--accent-deep); text-decoration: none; }
.button-secondary { color: var(--ink); border-color: var(--ink); background: transparent; }
.button-secondary:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Page opening */

main { padding: 44px 0 64px; }
.page-intro { padding-bottom: 44px; }
.page-intro h1 { margin-bottom: 20px; }
.page-intro p { margin-bottom: 14px; }
.page-intro p:last-child { margin-bottom: 0; }
.lede { font-size: 1.16rem; line-height: 1.55; max-width: 44ch; color: var(--ink); }
.eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 16px; }
.byline { color: var(--muted); font-size: 0.85rem; margin-top: 26px; }
.muted { color: var(--muted); }
.small, .caption { font-size: 0.85rem; line-height: 1.5; }
.caption { color: var(--muted); margin-top: 12px; }
.placeholder { color: var(--ink); text-decoration: underline dashed var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* The rail: every section carries its heading in a left margin column */

main section {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
  gap: 14px 64px;
  border-top: 1px solid var(--line);
  padding-top: 38px;
  margin-top: 52px;
}
main section > h2 {
  grid-column: 1; grid-row: 1; align-self: start; margin-bottom: 0;
  font-size: clamp(1.45rem, 1.1rem + 1.1vw, 1.85rem);
  max-width: none; overflow-wrap: normal; word-break: normal; hyphens: none;
}
main section > :not(h2) { grid-column: 2; min-width: 0; }

/* Home */

.home-grid { display: grid; gap: 44px; }
.home-fact { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.home-fact p { margin-bottom: 0.8em; }

.figure { margin: 0; }
.photo-frame {
  display: grid; min-height: 320px; aspect-ratio: 4 / 4.6; place-items: center;
  border: 1px solid var(--line-strong); background: var(--paper-deep);
  padding: 30px; text-align: center;
}
.photo-frame span { max-width: 26ch; color: var(--muted); font-size: 0.92rem; }
.figure .caption { border-top: 1px solid var(--line); padding-top: 10px; }

/* Numbered operation index */

.procedure-list { counter-reset: op; list-style: none; padding: 0; margin: 0; max-width: none; }
.procedure-list > li {
  counter-increment: op;
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 30px;
  border-top: 1px solid var(--line); padding: 32px 0 36px; margin: 0;
}
.procedure-list > li::before {
  content: counter(op, decimal-leading-zero);
  grid-column: 1; grid-row: 1;
  font-family: "Source Serif 4", Georgia, serif; font-size: 2.1rem; font-weight: 600;
  color: var(--line-strong); line-height: 1;
}
.procedure-list h2, .procedure-list h3 {
  grid-column: 2; grid-row: 1;
  font-family: "Source Serif 4", Georgia, serif; font-size: 1.55rem; font-weight: 600;
  margin: 4px 0 8px; letter-spacing: -0.01em;
}
.procedure-list p { grid-column: 2; margin-bottom: 0; max-width: 56ch; }
.procedure-list a { color: var(--ink); text-decoration: none; }
.procedure-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }

/* Facts, options, steps, recovery, risks */

.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: minmax(120px, 0.8fr) 1.5fr; gap: 14px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.facts dt { font-weight: 700; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 2px; }
.facts dd { margin: 0; }

.split { display: grid; gap: 28px; }
.split h3 { margin-top: 0; }
.option-list { list-style: none; padding: 0; max-width: none; }
.option-list li { border-top: 1px solid var(--line); padding: 18px 0; margin: 0; }
.option-list strong { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 1.22rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

.steps { list-style: none; counter-reset: step; padding: 0; max-width: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; margin-bottom: 16px; padding-left: 0; }
.steps li::before {
  content: counter(step);
  font-family: "Source Serif 4", Georgia, serif; font-size: 1.7rem; font-weight: 600;
  color: var(--accent); line-height: 1.15;
}

.recovery { display: grid; gap: 28px; }
.recovery > div { border-top: 1px solid var(--ink); padding-top: 14px; }
.recovery h3 { font-family: "Source Serif 4", Georgia, serif; font-size: 1.35rem; margin: 0 0 8px; }
.recovery p { margin: 0; }

.risk-list li::marker { color: var(--accent); }

.faq h3 { font-family: "Source Serif 4", Georgia, serif; font-size: 1.32rem; font-weight: 600; margin-top: 30px; }
.faq p { margin-bottom: 0; }

/* Action bands and tables */

main section.action {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 40px 0; margin-top: 60px;
}
main section.action h2 { margin: 0; }

.table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; }
table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 14px 16px 14px 8px; vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 700; }
.amount { white-space: nowrap; }

/* Form */

form { max-width: 680px; margin-top: 28px; }
.field { margin-bottom: 22px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
input, textarea, select {
  display: block; width: 100%; border: 1px solid var(--line-strong); border-radius: 2px;
  background: #ffffff; color: var(--ink); padding: 12px 13px; font: inherit;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
textarea { min-height: 150px; resize: vertical; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
.form-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

/* Closing band */

.site-footer { background: var(--ink); color: #e9e5da; padding: 34px 0 40px; }
.footer-inner { display: grid; gap: 6px; }
.footer-inner p { font-size: 0.88rem; margin: 0; }
.footer-inner p:first-child { font-family: "Source Serif 4", Georgia, serif; font-size: 1.05rem; }
.footer-inner a { color: #e9e5da; }
.footer-inner a:hover { color: #ffffff; text-decoration-thickness: 2px; }

/* Wide screens */

@media (min-width: 720px) {
  .wrap { width: min(1120px, calc(100% - 80px)); }
  .site-header { padding: 34px 0 24px; }
  .header-inner { grid-template-columns: auto 1fr; align-items: end; gap: 40px; }
  nav ul { justify-content: flex-end; gap: 8px 30px; }
  main { padding: 64px 0 88px; }
  main section { grid-template-columns: 230px minmax(0, 1fr); gap: 14px 64px; padding-top: 44px; margin-top: 60px; }
  .home-grid { grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 72px; align-items: start; }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .facts > div { grid-template-columns: 180px 1fr; padding: 13px 0; }
  .recovery { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .risk-list { columns: 2; column-gap: 48px; }
  .risk-list li { break-inside: avoid; }
  .photo-frame { min-height: 400px; }
}

@media (max-width: 719px) {
  main section { grid-template-columns: minmax(0, 1fr); gap: 0; }
  main section > :not(h2) { margin-top: 6px; }
}

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