/* ==========================================================================
   F&G First Authorization — "Official dossier"
   White and mint-grey sheets, forest green ink, a little amber for stamps.
   Content breakpoints are container queries on .page, because the content
   column is narrower than the viewport while the sidebar is docked.
   ========================================================================== */

:root {
  --white: #ffffff;
  --mint: #eef4f1;
  --green: #1f5f4a;
  --green-deep: #174a3a;
  --ink: #12261f;
  --ink-soft: #3d5249;
  --amber: #d9a441;
  --amber-tint: #fbf2dc;
  --rule: #c3d3cb;
  --rule-soft: #dde8e2;
  --rule-strong: #6f8a7e;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --sidebar: 260px;
  --radius: 3px;
  --pad: clamp(1rem, 4vw, 3rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--mint);
  overflow-wrap: break-word;
}
body.nav-open { overflow: hidden; }
h1, h2, h3 {
  margin: 0 0 .55em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); font-size: clamp(1.9rem, 1.25rem + 3cqi, 3rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.05rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
svg { max-width: 100%; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }
.sidebar :focus-visible, .topbar :focus-visible, .closing :focus-visible { outline-color: var(--amber); }

.skip {
  position: fixed; top: .5rem; left: .5rem; z-index: 100; padding: .6rem 1rem;
  color: var(--ink); background: var(--amber); border-radius: var(--radius);
  font-weight: 600; transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Mono reference labels, used everywhere a form would print a field name */
.label, .ref, .tab, .runhead, .nav__label, .sidebar__tag, .cell dt, .field dt,
.step-panel__grid dt, .footer__label, .doc-table th, .doc-table caption,
.doc-table td::before, .form label, .tally {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* ---------- Sidebar (desktop) ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  display: flex; flex-direction: column; gap: 1.75rem;
  width: var(--sidebar);
  padding: 2rem 0 1.5rem 1.5rem;
  color: var(--white);
  background: var(--green) repeating-linear-gradient(to bottom, transparent 0 2rem, rgba(255, 255, 255, .05) 2rem calc(2rem + 1px));
  overflow-y: auto;
}
.sidebar__brand { display: block; padding-right: 1.5rem; color: inherit; text-decoration: none; }
.seal { display: block; width: 5.75rem; height: 5.75rem; margin-bottom: 1rem; }
.sidebar__name { display: block; font: 500 1.3rem/1.2 var(--serif); }
.sidebar__tag { margin: -1.1rem 0 0; padding-right: 1.5rem; color: #d7e6df; }
.sidebar__close { display: none; }
.nav__label { margin: 0 0 .6rem; color: #d7e6df; }
.nav a {
  display: flex; align-items: baseline; gap: .8rem;
  padding: .72rem 1rem .72rem .85rem;
  color: var(--white); font-weight: 500; font-size: .97rem; line-height: 1.3;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius) 0 0 var(--radius);
  transition: background-color .2s ease;
}
.nav li:last-child a { border-bottom: 1px solid rgba(255, 255, 255, .18); }
.nav__num { font: 400 .72rem var(--mono); color: #c5dad1; }
.nav a:hover { background: rgba(255, 255, 255, .1); }
.nav a:focus-visible { outline-offset: -3px; }
.nav a[aria-current="page"] {
  color: var(--ink); background: var(--mint); border-color: transparent;
  box-shadow: inset 4px 0 0 var(--amber);
}
.nav a[aria-current="page"] .nav__num { color: var(--green); }
.nav a[aria-current="page"]:focus-visible { outline-color: var(--green); }
.sidebar__foot { margin-top: auto; padding: 1rem 1.5rem 0 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.sidebar__foot a { color: var(--white); font: 400 .8rem/1.5 var(--mono); overflow-wrap: anywhere; }

.topbar, .backdrop { display: none; }

/* ---------- Page frame ---------- */
.page {
  display: flex; flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar);
  container: page / inline-size;
}
main { flex: 1; }
.wrap { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.section--white { background: var(--white); border-block: 1px solid var(--rule); }
.sec-head { max-width: 44rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.sec-head p:last-child { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }

.runhead { background: var(--white); border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.runhead .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1.5rem; padding-block: .6rem; }

.ref { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; color: var(--green); }
.ref::before { content: ""; flex: none; width: 1.75rem; height: 1px; background: currentColor; }
.lede { max-width: 40rem; font-size: 1.14rem; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Buttons & links ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; margin-top: 1.6rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.2rem;
  font: 600 .95rem/1.2 var(--sans);
  color: var(--white); background: var(--green);
  border: 1.5px solid var(--green); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn__arrow { font-family: var(--mono); transition: transform .2s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn--ghost { color: var(--green); background: transparent; }
.btn--ghost:hover { color: var(--white); background: var(--green); border-color: var(--green); }
.btn--light { color: var(--green-deep); background: var(--white); border-color: var(--white); }
.btn--light:hover { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.btn--small { padding: .55rem .9rem; font-size: .88rem; }
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.more { display: inline-flex; gap: .45rem; font-weight: 600; }
.link-btn {
  padding: .2rem 0; font: 500 .85rem var(--sans); color: var(--green);
  background: none; border: 0; text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}

/* ---------- Cover (page header) ---------- */
.cover { padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem); background: var(--white); border-bottom: 4px double var(--green); }
.cover__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.cover__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 2.5rem; }
.cover__head > div { max-width: 44rem; }
.cover__stamp { width: 9.5rem; height: 9.5rem; margin: .25rem 1rem 0 0; }
.cover__sign { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }
.cover__note { max-width: 15rem; margin: 0; font: 400 .76rem/1.55 var(--mono); color: var(--ink-soft); }

/* Form-header cells: a ruled strip of labelled boxes */
.cells {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--rule); border: 1px solid var(--green); border-radius: var(--radius); overflow: hidden;
}
.cell { padding: .55rem .85rem .65rem; background: var(--white); }
.cell dt, .field dt, .step-panel__grid dt { color: var(--ink-soft); }
.cell dd { margin-top: .1rem; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Sheets, folder tabs, grids ---------- */
.sheet {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.sheet > :last-child { margin-bottom: 0; }
.sheet--mint { background: var(--mint); }
.sheet--tabbed { margin-top: 1.85rem; border-top-left-radius: 0; }
.sheet--card { display: flex; flex-direction: column; }
.sheet--card .more { margin-top: auto; padding-top: 1.1rem; }
.sheet--stack { box-shadow: 6px 6px 0 -1px var(--mint), 6px 6px 0 0 var(--rule), 12px 12px 0 -1px var(--mint), 12px 12px 0 0 var(--rule); }
.sheet--notice { border-color: var(--amber); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.sheet--notice p { max-width: 44rem; }
.sheet--notice div > p:first-child { font: 400 1.2rem/1.5 var(--serif); }
.tab {
  position: absolute; left: -1px; bottom: 100%;
  margin: 0; padding: .38rem 1.9rem .32rem .9rem;
  color: var(--white); background: var(--green);
  border-radius: var(--radius) 0 0 0;
  clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 100%, 0 100%);
}
.tab--amber { color: var(--ink); background: var(--amber); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--3 > .sheet { padding-inline: clamp(1.25rem, 2.2vw, 1.5rem); }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.stack > * + * { margin-top: clamp(1.25rem, 2.5vw, 2rem); }
.stack > * + .sheet--tabbed, .grid + .sheet--tabbed { margin-top: 3.6rem; }
.label { margin: 0 0 .5rem; color: var(--green); }

/* Labelled fields (definition rows on a ruled line) */
.field { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .2rem 1rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.field dd { overflow-wrap: anywhere; }

/* Static checkbox lists */
.ticks li, .crosses li { position: relative; padding: .58rem 0 .58rem 1.9rem; border-bottom: 1px solid var(--rule-soft); }
.ticks li:last-child, .crosses li:last-child { border-bottom: 0; }
.ticks li::before, .crosses li::before {
  content: ""; position: absolute; left: 0; top: .82rem; width: 1rem; height: 1rem;
  border: 1.5px solid var(--green); border-radius: 2px;
  background: var(--white) center / 74% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%231f5f4a' stroke-width='2.4'/%3E%3C/svg%3E");
}
.crosses li::before {
  border-color: var(--rule-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' fill='none' stroke='%2312261f' stroke-width='2'/%3E%3C/svg%3E");
}
.sheet h3 + .ticks, .sheet h3 + .crosses, .sheet p + .ticks { border-top: 1px solid var(--rule); }
.included { margin: .25rem 0 .4rem; color: var(--green); }
.fine { font-size: .9rem; color: var(--ink-soft); }
.sheet .fine { margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--rule-strong); }

/* ---------- Stamps (inline SVG) ---------- */
.stamp { flex: none; width: 8.5rem; height: 8.5rem; color: var(--green); transform: rotate(-11deg); }
.stamp__line { fill: none; stroke: currentColor; }
.stamp__hi { fill: none; stroke: var(--amber); }
.stamp__ring { font: 500 13.5px var(--mono); letter-spacing: 3.2px; fill: currentColor; }
.stamp__big { font: 600 31px var(--serif); fill: currentColor; }
.stamp__small { font: 500 11.5px var(--mono); letter-spacing: 2px; fill: currentColor; }
.stamp--light { color: var(--white); }
.stamp--tilt { transform: rotate(9deg); }

/* ---------- Stepper: "How an application moves" ---------- */
.stepper__tabs { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.stepper__tabs li { display: flex; }
.step {
  display: flex; flex-direction: column; gap: .2rem; width: 100%;
  padding: .65rem .8rem .7rem;
  font: inherit; text-align: left; color: var(--ink-soft);
  background: var(--mint);
  border: 1px solid var(--rule); border-bottom: 0; border-radius: 4px 4px 0 0;
  cursor: pointer; transition: background-color .2s ease, color .2s ease;
}
.step:hover { background: var(--rule-soft); }
.step:focus-visible { outline-offset: -3px; }
.step__num { font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; color: var(--green); }
.step__label { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.step.is-done .step__num::after { content: " \2713"; }
.step[aria-selected="true"] {
  margin-bottom: -1px; padding-bottom: calc(.7rem + 1px);
  color: var(--ink); background: var(--white);
  box-shadow: inset 0 3px 0 var(--green);
}
.stepper__sheet { padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--white); border: 1px solid var(--rule); border-radius: 0 0 var(--radius) var(--radius); }
.stepper__status { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.stepper__status .label { margin: 0; white-space: nowrap; color: var(--green); }
.progress { flex: 1; height: .55rem; background: var(--mint); border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.progress__fill { display: block; width: 20%; height: 100%; background: var(--green); border-right: 3px solid var(--amber); transition: width .4s ease; }
.step-panel + .step-panel { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.stepper.is-ready .step-panel { margin-top: 0; padding-top: 0; border-top: 0; animation: sheet-in .3s ease both; }
.step-panel h3 { font-size: 1.5rem; }
.step-panel > p { max-width: 46rem; }
.step-panel__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 1.25rem; background: var(--rule); border: 1px solid var(--rule); }
.step-panel__grid > div { padding: .85rem 1rem 1rem; background: var(--white); }
.step-panel__grid dt { margin-bottom: .3rem; color: var(--green); }
.step-panel__note { margin: 1rem 0 0; padding: .6rem .85rem; font-size: .92rem; background: var(--amber-tint); border-left: 3px solid var(--amber); }
.stepper__controls { display: none; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.stepper.is-ready .stepper__controls { display: flex; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Tickable checklists ---------- */
.checklist__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--ink); }
.tally { margin: 0; padding: .32rem .7rem; color: var(--ink); background: var(--white); border: 1px solid var(--rule-strong); border-radius: 2px; transition: background-color .25s ease, border-color .25s ease; }
.tally.is-complete { background: var(--amber); border-color: var(--amber); }
.checklist li { border-bottom: 1px solid var(--rule); }
.check { display: flex; align-items: flex-start; gap: .9rem; padding: .85rem .25rem; cursor: pointer; }
.check:hover { background: rgba(31, 95, 74, .05); }
.check input {
  flex: none; width: 1.3rem; height: 1.3rem; margin: .12rem 0 0;
  appearance: none; -webkit-appearance: none;
  background: var(--white) center / 76% no-repeat;
  border: 1.5px solid var(--green); border-radius: 2px; cursor: pointer;
}
.check input:checked {
  background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%23ffffff' stroke-width='2.4'/%3E%3C/svg%3E");
}
.check input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.checklist__note { margin: .9rem 0 0; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Ledger rows (process steps, deliverables) ---------- */
.ledger { border-top: 1px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: 4.5rem minmax(0, 15rem) minmax(0, 1fr); gap: .3rem 1.5rem; align-items: baseline; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.ledger__ref { font: 500 .78rem var(--mono); letter-spacing: .08em; color: var(--green); white-space: nowrap; }
.ledger h3, .ledger p { margin: 0; }
.ledger-note { max-width: 48rem; margin: 1.5rem 0 0; }

/* ---------- Document tables (format illustrations) ---------- */
.doc-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--rule); font-size: .94rem; }
.doc-table caption { caption-side: top; padding-bottom: .7rem; text-align: left; color: var(--ink-soft); }
.doc-table th { padding: .65rem .85rem; text-align: left; color: var(--green-deep); background: var(--mint); border-bottom: 1px solid var(--green); }
.doc-table td { padding: .75rem .85rem; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
.doc-table td:first-child { font: 500 .8rem/1.9 var(--mono); color: var(--green); white-space: nowrap; }
.doc-table td::before { display: none; content: attr(data-label); color: var(--ink-soft); }
.grid + .doc-table { margin-top: 2.5rem; }
.doc-table + .fine { margin: 1rem 0 0; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) 1.25rem; gap: .75rem; align-items: baseline;
  padding: 1.05rem .25rem; cursor: pointer; list-style: none;
  font: 500 1.12rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; justify-self: end; font: 400 1.2rem/1 var(--mono); color: var(--green); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { background: var(--mint); }
.faq__num { font: 500 .75rem var(--mono); letter-spacing: .08em; color: var(--green); }
.faq__body { max-width: 50rem; padding: 0 2rem 1.3rem 4.2rem; }
.faq__body > :last-child { margin-bottom: 0; }

/* ---------- Closing block ---------- */
.closing { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 4vw, 2.75rem); color: var(--white); background: var(--green); border-radius: var(--radius); }
.sheet + .closing, .faq + .closing { margin-top: clamp(2rem, 5vw, 3.5rem); }
.closing h2 { max-width: 32rem; }
.closing p { max-width: 34rem; color: #e3efe9; }
.closing .ref { color: var(--white); }
.closing .ref::before { background: var(--amber); }
.closing__mail { color: var(--white); font: 400 .88rem var(--mono); overflow-wrap: anywhere; }
.closing .stamp { width: 9.5rem; height: 9.5rem; margin-right: .75rem; }

/* ---------- Contact form ---------- */
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.form__field { margin-bottom: 1.4rem; }
.form label { display: block; margin-bottom: .4rem; }
.form input, .form select, .form textarea {
  display: block; width: 100%; padding: .7rem .8rem;
  font: inherit; color: var(--ink); background: var(--mint);
  border: 1px solid var(--rule-strong); border-bottom: 2px solid var(--green);
  border-radius: var(--radius) var(--radius) 0 0;
}
.form textarea { min-height: 10rem; resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline-offset: 1px; background: var(--white); }
.form [aria-invalid="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--amber); }
.form__hint, .form__note { font-size: .88rem; color: var(--ink-soft); }
.form__hint { margin: .45rem 0 0; }
.form__error, .form__status { margin: .5rem 0 0; padding: .55rem .8rem; font-size: .92rem; background: var(--amber-tint); border-left: 3px solid var(--amber); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__note { flex: 1 1 15rem; margin: 0; }
.form__status { margin-top: 1.25rem; }
.company-list li { padding: .55rem 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(2rem, 5vw, 3rem) 1.5rem; font-size: .93rem; background: var(--white); border-top: 4px double var(--green); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.footer__name { margin-bottom: .6rem; font: 600 1.05rem/1.3 var(--serif); }
.footer__small { max-width: 34rem; margin: 0; color: var(--ink-soft); }
.footer__label { margin-bottom: .5rem; color: var(--green); }
.footer .company-list li, .footer nav li { padding: .22rem 0; border: 0; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); font: 400 .78rem/1.5 var(--mono); color: var(--ink-soft); }
.footer__base p { margin: 0; }

/* ---------- Scroll reveal ---------- */
.reveal { transition: opacity .55s ease, transform .55s ease; }
.reveal--pending { opacity: 0; transform: translateY(14px); }

/* ---------- Content breakpoints (width of the content column) ---------- */
@container page (max-width: 980px) {
  .cover__grid { grid-template-columns: minmax(0, 1fr); }
  .cover__card { max-width: 34rem; margin-right: 12px; }
  .grid--3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .grid--3 > .sheet--tabbed + .sheet--tabbed { margin-top: 3.4rem; }
}
@container page (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .doc-table thead { display: none; }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table caption { display: block; }
  .doc-table { border: 0; background: none; }
  .doc-table tr { margin-bottom: .8rem; padding: .5rem 0; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); }
  .doc-table td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding: .35rem .85rem; border: 0; }
  .doc-table td:first-child { white-space: normal; }
  .doc-table td::before { display: block; padding-top: .2rem; }
}
@container page (max-width: 720px) {
  .cover__stamp { display: none; }
  .grid--2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .grid--2 > .sheet + .sheet { margin-top: 1.25rem; }
  .grid--2 > .sheet--tabbed + .sheet--tabbed { margin-top: 3.4rem; }
  .step-panel__grid { grid-template-columns: minmax(0, 1fr); }
  .ledger li { grid-template-columns: 4.25rem minmax(0, 1fr); gap: .3rem 1rem; }
  .ledger p { grid-column: 2; }
  .sheet--notice, .closing { flex-direction: column; align-items: flex-start; }
  .sheet--notice .stamp, .closing .stamp { align-self: flex-end; margin-top: -.5rem; }
}
@container page (max-width: 560px) {
  .step { align-items: center; padding-inline: .25rem; }
  .step__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .field, .form__row, .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .faq summary { grid-template-columns: 2.6rem minmax(0, 1fr) 1rem; gap: .5rem; font-size: 1.05rem; }
  .faq__body { padding: 0 .25rem 1.2rem; }
  .doc-table td { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stamp, .closing .stamp { width: 7.25rem; height: 7.25rem; }
  .cover__sign { align-items: flex-end; }
}

/* ---------- Sidebar becomes top bar + drawer ---------- */
@media (max-width: 900px) {
  html { scroll-padding-top: 4.75rem; }
  .page { margin-left: 0; }
  .topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    min-height: 3.5rem; padding: .45rem 1rem;
    color: var(--white); background: var(--green);
  }
  .topbar__brand { display: flex; align-items: center; gap: .6rem; min-width: 0; color: inherit; text-decoration: none; font: 500 1.02rem/1.2 var(--serif); }
  .topbar__brand .seal { width: 2.4rem; height: 2.4rem; margin: 0; flex: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem; flex: none;
    min-height: 2.75rem; padding: .5rem .75rem;
    font: 500 .72rem var(--mono); letter-spacing: .11em; text-transform: uppercase;
    color: var(--white); background: transparent;
    border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle__bars { width: 1.15rem; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
  .sidebar {
    width: min(19rem, 86vw); padding-top: 1rem; gap: 1.5rem;
    box-shadow: 0 0 2.5rem rgba(18, 38, 31, .4);
    transform: translateX(-102%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  .sidebar.is-open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
  .sidebar__close {
    display: inline-flex; align-self: flex-end; align-items: center; gap: .5rem;
    margin-right: 1rem; padding: .5rem .75rem;
    font: 500 .72rem var(--mono); letter-spacing: .11em; text-transform: uppercase;
    color: var(--white); background: transparent;
    border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--radius); cursor: pointer;
  }
  .sidebar .seal { width: 4.5rem; height: 4.5rem; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(18, 38, 31, .55); }
}
@media (max-width: 400px) {
  .nav-toggle__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .nav-toggle { padding-inline: .8rem; }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal--pending { opacity: 1; transform: none; }
}
@media print {
  .sidebar, .topbar, .backdrop, .skip, .stepper__controls { display: none !important; }
  .page { margin-left: 0; }
  .reveal--pending { opacity: 1; transform: none; }
}
