/* ==========================================================================
   Brikfolio home — "the tax-time file"
   Navy folder board, white printed sheets, green index tabs, one rubber stamp.
   Loaded after styles.css by public/index.html and by /features/ (src/pages/features/index.astro).
   Shared parts use the b- prefix; parts only the features page uses have the f- prefix.
   ========================================================================== */

:root {
  --b-board: var(--brand-navy);          /* folder board: the dominant field */
  --b-board-deep: #0a1c3e;               /* folder back, behind the sheets */
  --b-board-line: rgba(238, 241, 247, 0.14);
  --b-on-board: #c3cce0;                 /* body text on the board */
  --b-on-board-strong: #eef1f7;
  --b-sheet: #fbfaf6;                    /* printed sheet */
  --b-sheet-line: #e6e2d7;
  --b-sheet-well: #eceae2;               /* empty bar track */
  --b-tab: var(--brand-green);           /* index tab */
  --b-tab-ink: #0b2a52;                  /* text on a green tab (6:1) */
  --b-good: oklch(0.48 0.12 165);        /* gains on a sheet */
  --b-clip: #8a93a6;                     /* paperclip steel */
  --b-muted: #5b6275;
  --b-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --b-font-display: var(--font-brand);
}

/* --- Shared atoms -------------------------------------------------------- */
.b-h2,
.b-hero h1,
.b-trail h2,
.b-stress h2,
.b-close h2,
.b-pricing .section-head h2,
.b-head h2 {
  font-family: var(--b-font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.b-h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  max-width: 18ch;
}

.b-head p {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--b-muted);
  max-width: 56ch;
}

.b-num,
.b-kpi__value,
.b-kpi__sub,
.b-chip,
.b-tag {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.b-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Primary action: a paper button on the board, green when pressed toward */
.b-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 10px;
  background: var(--b-sheet);
  color: var(--b-board);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--b-ease);
}

.b-btn::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--b-tab);
  transition: transform 0.25s var(--b-ease);
}

.b-btn:hover {
  background: var(--b-tab);
  color: var(--b-tab-ink);
}

.b-btn:hover::after {
  transform: translateX(3px);
  background: var(--b-tab-ink);
}

.b-btn:active {
  transform: translateY(1px);
}

.b-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.b-link:hover {
  text-decoration-color: currentColor;
}

.b-link--on-board {
  color: var(--b-on-board-strong);
  text-decoration-color: rgba(35, 181, 145, 0.7);
}

.b-link--on-board:hover {
  color: var(--b-sheet);
}

/* --- The sheet: one printed page from the file --------------------------- */
.b-sheet {
  position: relative;
  container-type: inline-size;
  background: var(--b-sheet);
  color: var(--ink);
  border-radius: 4px 14px 14px 14px;
  padding: 22px;
  box-shadow:
    0 1px 2px rgba(10, 28, 62, 0.18),
    0 28px 60px -28px rgba(10, 28, 62, 0.55);
}

.b-sheet__tab {
  position: absolute;
  left: 0;
  bottom: 100%;
  height: 30px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-radius: 9px 9px 0 0;
  background: var(--b-tab);
  color: var(--b-tab-ink);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.b-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--b-sheet-line);
  border-radius: 100px;
  font-size: 11px;
  color: var(--b-muted);
  vertical-align: middle;
}

.b-tag {
  justify-self: start;
  padding: 1px 7px;
  border: 1px dashed var(--b-clip);
  border-radius: 4px;
  font-size: 11px;
  color: var(--b-muted);
}

.b-mini-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.b-mini-title span {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 11px;
  color: var(--b-muted);
}

.b-good {
  color: var(--b-good);
}

/* KPI block */
.b-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--b-sheet-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.b-kpis--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.b-kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 13px 15px;
  box-shadow: -1px -1px 0 var(--b-sheet-line);
}

.b-kpi__label {
  font-size: 11.5px;
  color: var(--b-muted);
}

.b-fn {
  margin-left: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--b-board);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.b-calc {
  margin-top: 4px;
  font-size: 11.5px;
}

.b-calc summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--b-board);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.b-calc summary::-webkit-details-marker {
  display: none;
}

.b-calc p {
  margin-top: 6px;
  max-width: 30ch;
  line-height: 1.45;
  color: var(--b-muted);
}

.b-kpi__value {
  font-size: clamp(18px, 5.4cqi, 28px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--b-board);
  white-space: nowrap;
}

.b-kpis--3 .b-kpi__value {
  font-size: clamp(15px, 4.3cqi, 22px);
}

.b-kpi--good .b-kpi__value {
  color: var(--b-good);
}

.b-kpi__sub {
  font-size: 11px;
  color: var(--b-muted);
}

/* Bars: a track with a fill (i) and an optional tick (b) */
.b-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--b-sheet-well);
}

.b-bar i {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--b-board);
  transform-origin: left center;
  transform: scaleX(var(--v));
  transition: transform 1s var(--b-ease) var(--d, 0ms);
}

.b-bar b {
  position: absolute;
  left: calc(var(--at) * 100%);
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--ink);
}

.b-bar--fill i {
  background: var(--b-tab);
}

.b-bar--lvr i {
  background: var(--b-tab);
}

/* --- Hero: the file ------------------------------------------------------- */
.b-hero {
  background: var(--b-board);
  color: var(--b-on-board-strong);
  overflow: hidden;
}

.b-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
}

.b-hero h1 {
  font-size: clamp(40px, 4.6vw, 64px);
  color: var(--b-sheet);
}

.b-hero__sub {
  margin-top: 22px;
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--b-on-board);
  max-width: 44ch;
  text-wrap: pretty;
}

.b-hero__cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.b-hero__note {
  margin-top: 26px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--b-on-board);
  max-width: 40ch;
}

.b-file {
  position: relative;
  padding-top: 92px;
}

.b-file > figcaption {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--b-on-board);
  text-align: right;
}

/* The folder's back board, with its own tab, behind everything */
.b-file__back {
  position: absolute;
  inset: 50px -18px 26px 18px;
  border-radius: 6px 16px 16px 16px;
  background: #1c3a70;
  box-shadow: inset 0 0 0 1px rgba(238, 241, 247, 0.22), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.b-file__back::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 34px;
  width: 120px;
  height: 22px;
  border-radius: 9px 9px 0 0;
  background: #1c3a70;
  box-shadow: inset 0 1px 0 rgba(238, 241, 247, 0.22);
}

/* Index tabs on the file's right edge: real links to the sections inside */
.b-file__tabs {
  position: absolute;
  top: 120px;
  left: calc(100% + 18px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 0;
}

.b-file__tabs a {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 0 9px 9px 0;
  background: var(--b-tab);
  color: var(--b-tab-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.25s var(--b-ease), background-color 0.15s ease;
}

.b-file__tabs a:nth-child(2) { background: #5fcbb0; }
.b-file__tabs a:nth-child(3) { background: #9adfcc; }

.b-file__tabs a:hover {
  color: var(--b-tab-ink);
  transform: translateX(4px);
}

/* Loose paperwork that ends up filed behind the top sheet */
.b-slip {
  position: absolute;
  top: var(--top);
  left: var(--left);
  width: 44%;
  height: 130px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(10, 28, 62, 0.25), 0 14px 28px -18px rgba(0, 0, 0, 0.6);
  transform: rotate(var(--rot));
  color: var(--ink);
}

/* Printed rules on each slip */
.b-slip::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 52px;
  height: 44px;
  background: repeating-linear-gradient(180deg, var(--b-sheet-well) 0 2px, transparent 2px 11px);
}

.b-slip--1 { --top: 26px; --left: 0%; --rot: -5deg; }
.b-slip--2 { --top: 6px; --left: 28%; --rot: 1.5deg; }
.b-slip--3 { --top: 30px; --left: 55%; --rot: 5deg; }

/* A paperclip on the middle slip */
.b-slip--2::after {
  content: '';
  position: absolute;
  top: -12px;
  right: 30px;
  width: 11px;
  height: 34px;
  border: 2px solid var(--b-clip);
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--b-clip);
}

.b-slip__kind {
  font-size: 12.5px;
  font-weight: 700;
}

.b-slip__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--b-muted);
}

.b-dash {
  z-index: 2;
}

.b-dash__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--b-muted);
}

.b-dash__body {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 22px;
}

.b-yield__list,
.b-comp__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.b-yield__list li {
  display: grid;
  grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) 3em;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
}

.b-yield__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b-yield__list .b-num {
  text-align: right;
  font-size: 11px;
}

.b-stack {
  margin-top: 12px;
  display: flex;
  gap: 2px;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  transform-origin: left center;
  transition: transform 1.1s var(--b-ease) 250ms;
}

.b-stack i,
.b-comp__list li::before {
  background: var(--sw);
}

.b-stack i {
  flex: var(--w);
}

.b-stack i:nth-child(1), .b-comp__list li:nth-child(1) { --sw: #102751; }
.b-stack i:nth-child(2), .b-comp__list li:nth-child(2) { --sw: #3a4d74; }
.b-stack i:nth-child(3), .b-comp__list li:nth-child(3) { --sw: #66769a; }
.b-stack i:nth-child(4), .b-comp__list li:nth-child(4) { --sw: #93a0bb; }
.b-stack i:nth-child(5), .b-comp__list li:nth-child(5) { --sw: #c2c9d8; }

.b-comp__list li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.b-comp__list li::before {
  content: '';
  width: 8px;
  height: 8px;
}

.b-comp__list li span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 520px) {
  .b-dash__body {
    grid-template-columns: 1fr;
  }

}

/* --- Problem: the paper trail -------------------------------------------- */
.b-trail {
  padding: var(--section-y) 0;
}

.b-trail__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}

.b-trail h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.b-trail__copy p {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--b-muted);
  max-width: 46ch;
}

/* A desk with loose paperwork on it */
.b-desk {
  position: relative;
  height: 380px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 18px;
  background: var(--sand);
  box-shadow: inset 0 0 0 1px var(--line);
}

.b-desk li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  margin: 18px;
  padding: 12px 16px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 10px 20px -14px rgba(16, 39, 81, 0.45);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  transform: rotate(var(--r));
  transition: transform 0.9s var(--b-ease), opacity 0.6s ease;
}

.b-desk li span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--b-muted);
}

.b-desk li:nth-child(2) { transition-delay: 60ms; }
.b-desk li:nth-child(3) { transition-delay: 120ms; }
.b-desk li:nth-child(4) { transition-delay: 180ms; }
.b-desk li:nth-child(5) { transition-delay: 240ms; }
.b-desk li:nth-child(6) { transition-delay: 300ms; }
.b-desk li:nth-child(7) { transition-delay: 360ms; }

/* The unsourced market figures: kept, but quiet */
.b-ledger {
  margin: 64px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
}

.b-ledger div {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 6.2em minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.b-ledger dt {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 19px;
  font-weight: 500;
  color: var(--b-board);
}

.b-ledger dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--b-muted);
}

/* --- How it works: index dividers ---------------------------------------- */
.b-how {
  padding: var(--section-y) 0;
  background: var(--sand);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.b-binder {
  position: relative;
  margin-top: 64px;
}

/* Divider tabs stepping across the file's top edge: front divider lowest */
.b-binder__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin: 0;
  padding: 0 0 0 24px;
  list-style: none;
}

.b-binder__tabs li {
  width: fit-content;
  padding: 9px 22px 8px;
  border-radius: 10px 10px 0 0;
  background: #e3dfd2;
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--b-board);
  transition: transform 0.6s var(--b-ease);
}

.b-binder__tabs li {
  border: 1px solid var(--card-border);
  border-bottom: 0;
  margin-bottom: -1px;
}

/* Tabs sit on the sheet edge, each further back a shade darker */
.b-binder__tabs li:nth-child(1) { background: var(--b-sheet); position: relative; z-index: 1; }
.b-binder__tabs li:nth-child(2) { background: #e2ddd0; }
.b-binder__tabs li:nth-child(4) { background: #d6d0bf; }

.b-binder__tabs li.is-test {
  border-color: var(--b-tab);
  background: var(--b-tab);
  color: var(--b-tab-ink);
}

/* One sheet, four columns divided by hairlines; the sheets behind show as edges */
.b-binder__sheet {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--b-sheet);
  border: 1px solid var(--card-border);
  border-radius: 4px 14px 14px 14px;
  box-shadow:
    0 6px 0 -1px #efece4, 0 6px 0 0 var(--card-border),
    0 12px 0 -1px #e8e4d9, 0 12px 0 0 var(--card-border),
    0 28px 40px -28px rgba(16, 39, 81, 0.45);
}

.b-binder__sheet li {
  position: relative;
  padding: 28px 26px 34px;
}

.b-binder__sheet li + li {
  border-left: 1px solid var(--b-sheet-line);
}

.b-binder__sheet h3 {
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--b-board);
}

.b-binder__sheet p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--b-muted);
}

.b-binder__sheet li.is-test {
  background: rgba(35, 181, 145, 0.07);
}

.b-stamp--sm {
  position: absolute;
  right: 16px;
  bottom: 12px;
  padding: 4px 9px;
  border-width: 2px;
  border-radius: 6px;
}

.b-stamp--sm span {
  font-size: 13px;
}

.b-live .b-binder[data-anim]:not(.is-in) .b-binder__tabs li {
  transform: translateY(30px);
}

/* --- Signature: the stress test ------------------------------------------ */
.b-stress {
  padding: calc(var(--section-y) + 16px) 0;
  background: var(--b-board);
  color: var(--b-on-board-strong);
}

.b-stress__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}

.b-stress h2 {
  font-size: clamp(32px, 4vw, 52px);
  color: var(--b-sheet);
}

.b-stress__copy p {
  margin: 20px 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--b-on-board);
  max-width: 44ch;
}

.b-stresscard {
  margin-top: 30px;
  padding: 26px 26px 24px;
}

.b-stresscard__read {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--b-sheet-line);
}

.b-stresscard__read > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.b-stresscard__rate,
.b-stresscard__cash {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: clamp(30px, 8cqi, 46px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--b-board);
}

.b-stresscard__delta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--b-muted);
}

/* Bars for each rate step, an axis break, then the $0 line */
.b-chart {
  --cols: 6.7;
  margin-top: 22px;
}

.b-chart__plot {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(5, 1fr) 0.5fr 1.2fr;
  align-items: end;
}

.b-chart__col {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
}

.b-chart__col i {
  width: 62%;
  height: calc(100% - 24px);
  border-radius: 5px 5px 0 0;
  background: #cdd6e6;
  transform-origin: bottom center;
  transform: scaleY(var(--h));
  transition: transform 0.9s var(--b-ease), background-color 0.25s ease;
}

.b-chart__col:nth-child(2) i { transition-delay: 60ms, 0ms; }
.b-chart__col:nth-child(3) i { transition-delay: 120ms, 0ms; }
.b-chart__col:nth-child(4) i { transition-delay: 180ms, 0ms; }
.b-chart__col:nth-child(5) i { transition-delay: 240ms, 0ms; }

.b-chart__col:hover i {
  background: #a9b8d2;
}

.b-chart__col.is-on i {
  background: var(--b-board);
}

.b-chart__col span,
.b-chart__zero span {
  height: 24px;
  display: flex;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--b-muted);
}

.b-chart__col.is-on span {
  color: var(--b-board);
  font-weight: 500;
}

.b-chart__break {
  height: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--b-muted);
}

/* The hard threshold: where yearly cash flow would reach zero */
.b-chart__zero {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.b-chart__zero::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 24px;
  left: 50%;
  border-left: 2px dashed var(--ink);
}

.b-chart__zero b {
  position: absolute;
  top: 0;
  right: calc(50% + 8px);
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink);
}

.b-chart__zero span {
  color: var(--ink);
  font-weight: 500;
}

.b-chart__base {
  height: 2px;
  margin-top: -24px;
  margin-bottom: 22px;
  background: var(--ink);
}

/* The slider sits under the five bars, its stops on their centres */
.b-range {
  --colw: calc(100% / 6.7);
  display: block;
  width: calc(var(--colw) * 4 + 24px);
  margin: 4px 0 0 calc(var(--colw) / 2 - 12px);
}

.b-range input {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
}

.b-range input:active {
  cursor: grabbing;
}

.b-range input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--b-sheet-well);
}

.b-range input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--b-sheet-well);
}

.b-range input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--b-tab);
  border: 3px solid var(--b-sheet);
  box-shadow: 0 0 0 1px var(--b-board), 0 4px 10px -2px rgba(10, 28, 62, 0.5);
  transition: transform 0.15s ease;
}

.b-range input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--b-tab);
  border: 3px solid var(--b-sheet);
  box-shadow: 0 0 0 1px var(--b-board), 0 4px 10px -2px rgba(10, 28, 62, 0.5);
}

.b-range input:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

.b-range input:focus-visible {
  outline: none;
}

.b-range input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px var(--b-board), 0 0 0 5px rgba(35, 181, 145, 0.45);
}

.b-range input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--b-board), 0 0 0 5px rgba(35, 181, 145, 0.45);
}

.b-stresscard__verdict {
  margin-top: 18px;
  max-width: calc(100% - 200px);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.b-stresscard__verdict strong {
  font-family: var(--font-mono);
  font-weight: 500;
}

.b-fine {
  margin-top: 8px;
  max-width: calc(100% - 200px);
  font-size: 12px;
  line-height: 1.5;
  color: var(--b-muted);
}

/* The rubber stamp: the last beat after the numbers settle */
.b-stamp {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px 9px;
  border: 3px solid var(--b-good);
  border-radius: 8px;
  outline: 1px solid var(--b-good);
  outline-offset: 2px;
  color: var(--b-good);
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
}

.b-stamp span {
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.b-stamp small {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Feature tour: the file's tabs --------------------------------------- */
.b-tour {
  padding: var(--section-y) 0;
}

.b-ftabs {
  margin-top: 48px;
  display: block;
}

.b-ftabs__list {
  display: flex;
  gap: 4px;
  padding-left: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.b-ftabs__list::-webkit-scrollbar {
  display: none;
}

.b-ftabs__list[hidden],
.b-panel[hidden] {
  display: none;
}

.b-ftabs__tab {
  flex: none;
  padding: 12px 18px 11px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--b-muted);
  background: #ebe8de;
  position: relative;
  border: 0;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.b-ftabs__tab:hover {
  color: var(--b-board);
  background: #e4e0d4;
}

.b-ftabs__tab[aria-selected="true"] {
  color: var(--b-board);
  background: var(--sand);
}

/* Selected mark: a straight green bar inside the tab, clear of its rounded corners */
.b-ftabs__tab[aria-selected="true"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 0 0 2px 2px;
  background: var(--b-tab);
}

.b-ftabs__tab:focus-visible {
  outline-offset: -3px;
}

.b-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  padding: 48px 44px;
  background: var(--sand);
  border-radius: 18px;
}

.b-panel + .b-panel {
  margin-top: 24px;
}

.ftabs--ready .b-panel {
  margin-top: 0;
  border-top-left-radius: 0;
}

.b-panel__text h3 {
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.b-panel__q {
  margin-top: 12px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--b-board);
  text-wrap: balance;
}

.ftabs--ready .b-panel__text h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ftabs--ready .b-panel__q {
  margin-top: 0;
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.b-panel__list {
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--b-muted);
}

.b-panel__list li {
  position: relative;
  padding-left: 22px;
}

.b-panel__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--brand-green);
}

.b-mock {
  margin-top: 30px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.b-mock__answer {
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
  text-wrap: pretty;
}

.b-mock__answer mark {
  background: linear-gradient(transparent 58%, rgba(35, 181, 145, 0.32) 58%);
  color: inherit;
  padding: 0 1px;
}

.b-mock__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 700;
}

/* Equity line */
.b-line__svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  overflow: visible;
}

.b-grid-line {
  stroke: var(--b-sheet-well);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.b-line__base,
.b-line__plan {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s var(--b-ease) 200ms;
}

.b-line__base {
  stroke: #8f9bb8;
  stroke-dasharray: 5 5;
  transition: opacity 0.6s ease 0.2s;
}

.b-line__plan {
  stroke: var(--b-tab);
  stroke-width: 4;
}

.b-line__base {
  stroke: var(--b-board);
  stroke-width: 1.5;
}

.b-axis,
.b-end {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--b-muted);
}

.b-axis {
  text-anchor: end;
}

.b-end--plan {
  fill: var(--b-good);
  font-weight: 500;
}

.b-end--base {
  fill: var(--b-board);
}

.b-line__legend {
  margin-top: 10px;
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  color: var(--b-muted);
}

.b-line__legend .b-num {
  margin-left: auto;
}

.b-key::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}

.b-key--plan::before { background: var(--b-tab); }
.b-key--base::before {
  background: repeating-linear-gradient(90deg, var(--b-board) 0 4px, transparent 4px 7px);
}

/* Column chart */
.b-cols__plot {
  margin-top: 12px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-bottom: 1px solid var(--ink);
}

.b-cols__plot i {
  flex: 1;
  height: 100%;
  background: #bfe3d6;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom center;
  transform: scaleY(var(--h));
  transition: transform 0.8s var(--b-ease);
}

.b-cols__plot i:last-child {
  background: var(--b-tab);
}

.b-cols__plot i:nth-child(2) { transition-delay: 40ms; }
.b-cols__plot i:nth-child(3) { transition-delay: 80ms; }
.b-cols__plot i:nth-child(4) { transition-delay: 120ms; }
.b-cols__plot i:nth-child(5) { transition-delay: 160ms; }
.b-cols__plot i:nth-child(6) { transition-delay: 200ms; }
.b-cols__plot i:nth-child(7) { transition-delay: 240ms; }
.b-cols__plot i:nth-child(8) { transition-delay: 280ms; }
.b-cols__plot i:nth-child(9) { transition-delay: 320ms; }
.b-cols__plot i:nth-child(10) { transition-delay: 360ms; }
.b-cols__plot i:nth-child(11) { transition-delay: 400ms; }
.b-cols__plot i:nth-child(12) { transition-delay: 440ms; }

/* Property 360 */
.b-p360 {
  display: grid;
  gap: 14px;
}

.b-p360__row {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.b-num--lg {
  font-size: 22px;
  font-weight: 500;
  color: var(--b-board);
}

.b-p360__tabs {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.b-p360__tabs li {
  padding: 5px 11px;
  border: 1px solid var(--b-sheet-line);
  border-radius: 100px;
  font-size: 12px;
  color: var(--b-muted);
  background: #fff;
}

.b-p360__tabs li:first-child {
  border-color: var(--b-board);
  color: var(--b-board);
  font-weight: 600;
}

/* Tax pack: a receipt that prints line by line */
.b-receipt {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px dashed var(--b-clip);
}

.b-receipt li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 2px;
  border-bottom: 1px dashed var(--b-sheet-line);
  font-size: 14px;
  transition: opacity 0.4s ease, transform 0.5s var(--b-ease);
}

.b-receipt li:nth-child(2) { transition-delay: 120ms; }
.b-receipt li:nth-child(3) { transition-delay: 240ms; }
.b-receipt li:nth-child(4) { transition-delay: 380ms; }

.b-receipt em {
  margin-left: 6px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--b-muted);
}

.b-receipt .b-num {
  font-size: 14px;
}

.b-receipt__total {
  border-bottom: 2px solid var(--ink) !important;
  font-weight: 700;
}

.b-receipt__total .b-num {
  font-size: 18px;
  font-weight: 500;
}

.b-buttons {
  display: flex;
  gap: 8px;
}

.b-buttons span,
.b-todo {
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
}

/* Data health worklist */
.b-health {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.b-health li {
  display: grid;
  grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 3em auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--b-sheet-line);
  font-size: 12.5px;
}

.b-health li > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b-health .b-num {
  text-align: right;
  font-size: 12px;
}

.b-todo {
  padding: 4px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.b-later {
  margin-top: 32px;
  font-size: 14.5px;
  color: var(--b-muted);
}

.b-later a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Pricing (base styles in styles.css) ---------------------------------- */
.b-pricing {
  background: var(--b-board);
}

.b-pricing .section-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.b-pricing .billing {
  margin-left: 0;
}

.b-pricing .billing__save {
  font-size: 11px;
  text-transform: uppercase;
}

.b-pricing .plan--featured {
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.b-pricing .plan__price {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* Links on the navy board stay light on hover (the shared accent hover is too dark here) */
.b-hero a:not(.b-btn):not(.b-file__tabs a):hover,
.b-stress a:hover,
.b-close a:not(.b-btn):hover,
.b-pricing a:not(.plan__cta):hover {
  color: var(--b-sheet);
}

/* --- FAQ ------------------------------------------------------------------ */
.faq .b-h2 {
  max-width: none;
}

/* --- Final CTA: the file, closed ----------------------------------------- */
.b-close {
  padding: calc(var(--section-y) + 8px) 0;
  background: var(--b-board);
  color: var(--b-on-board-strong);
}

.b-close__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.b-close__mark {
  height: 64px;
  padding: 14px 16px;
  box-sizing: content-box;
  border-radius: 12px;
  background: var(--b-sheet);
}

.b-close h2 {
  margin-top: 30px;
  font-size: clamp(30px, 4vw, 50px);
  color: var(--b-sheet);
  max-width: 18ch;
}

.b-close p {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--b-on-board);
  max-width: 46ch;
}

.b-close .b-btn {
  margin-top: 30px;
}

.b-follow {
  border-top-color: var(--b-board-line);
}

.b-close .follow__label {
  margin: 0;
  font-size: 15px;
  color: var(--b-on-board);
}

.b-close .follow__label strong {
  color: var(--b-sheet);
}

.b-close .social-btn {
  border-color: var(--b-board-line);
  background: rgba(238, 241, 247, 0.06);
}

/* --- Motion: hidden start states exist only with JS on --------------------
   Default (no JS, failed JS, reduced motion) is the finished, visible state. */
.b-live [data-anim]:not(.is-in) .b-bar i,
.b-live [data-anim]:not(.is-in) .b-stack {
  transform: scaleX(0);
}

.b-live [data-anim]:not(.is-in) .b-chart__col i,
.b-live [data-anim]:not(.is-in) .b-cols__plot i {
  transform: scaleY(0);
}

.b-live [data-anim]:not(.is-in) .b-line__plan {
  stroke-dashoffset: 1;
}

.b-live [data-anim]:not(.is-in) .b-line__base {
  opacity: 0;
}

.b-live [data-anim]:not(.is-in) .b-receipt li {
  opacity: 0;
  transform: translateY(-6px);
}

.b-live .b-desk[data-anim]:not(.is-in) li {
  opacity: 0;
  transform: translate(-40px, -60px) rotate(calc(var(--r) - 14deg));
}


.b-live [data-anim]:not(.is-in) .b-stamp {
  opacity: 0;
}

.b-live [data-anim].is-in .b-stamp {
  animation: b-stamp 0.42s var(--b-ease) 1.1s backwards;
}

@keyframes b-stamp {
  0% {
    opacity: 0;
    transform: rotate(-14deg) scale(1.9);
    filter: blur(2px);
  }
  70% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: rotate(-8deg) scale(1);
  }
}

.js .ftabs--ready .b-panel:not([hidden]) .b-panel__text {
  animation: b-panel-in 0.4s var(--b-ease);
}

.js .ftabs--ready .b-panel:not([hidden]) .b-mock {
  animation: b-sheet-in 0.55s var(--b-ease);
}

@keyframes b-panel-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
}

@keyframes b-sheet-in {
  from {
    opacity: 0;
    transform: translateY(26px) rotate(1.5deg);
  }
}

/* The hero file stays hidden only until the script starts it; if the script never runs,
   it appears on its own after 2.5s. */
.js .b-file:not(.is-played) > .b-slip,
.js .b-file:not(.is-played) > .b-dash,
.js .b-file:not(.is-played) > .b-file__back {
  opacity: 0;
  animation: b-failsafe 0.01s linear 2.5s forwards;
}

@keyframes b-failsafe {
  to {
    opacity: 1;
  }
}

/* Reduced motion: no flight, no counting; state changes still show */
/* Compact make-up legend: one wrapped row instead of a tall list */
.b-comp__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.b-comp__list li {
  display: inline-grid;
  grid-template-columns: 8px auto auto;
}

/* With the divider tabs showing, the column titles repeat them: keep them for screen readers only */
@media (min-width: 961px) {
  .b-binder__sheet h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .b-binder__sheet p {
    margin-top: 0;
  }
}

/* The edge tabs need the page gutter to stick out into; narrower screens drop them */
@media (max-width: 1240px) {
  .b-file__tabs {
    display: none;
  }
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1080px) {
  .b-hero__grid,
  .b-stress__grid {
    gap: 40px;
  }
}

@media (max-width: 960px) {
  .b-hero__grid,
  .b-trail__grid,
  .b-stress__grid,
  .b-panel {
    grid-template-columns: 1fr;
  }

  .b-hero__grid {
    padding-top: 56px;
    gap: 24px;
  }

  .b-file {
    max-width: 640px;
  }

  .b-binder__tabs {
    display: none;
  }

  .b-binder__sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .b-binder__sheet li:nth-child(3) {
    border-left: 0;
  }

  .b-binder__sheet li:nth-child(n + 3) {
    border-top: 1px solid var(--b-sheet-line);
  }

  .b-file__tabs {
    display: none;
  }

  .b-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .b-panel {
    gap: 28px;
    padding: 32px 28px;
  }
}

@media (max-width: 640px) {
  .b-hero__grid {
    padding-top: 44px;
    padding-bottom: 56px;
  }

  .b-hero__sub {
    font-size: 17px;
  }

  .b-file {
    padding-top: 104px;
  }

  .b-slip--1 { --top: 0px; --left: 3%; --rot: -3deg; }
  .b-slip--2 { --top: 18px; --left: 30%; --rot: 1.5deg; }
  .b-slip--3 { --top: 4px; --left: 50%; --rot: 4deg; }

  .b-slip__more {
    display: none;
  }

  .b-file__back {
    inset: 44px -8px 26px 8px;
  }

  .b-slip {
    width: 46%;
    height: 110px;
    padding: 9px 10px;
  }

  .b-slip__kind {
    font-size: 11px;
  }

  .b-slip__meta {
    display: none;
  }

  .b-slip--2 { --left: 24%; }
  .b-slip--3 { --left: 47%; }

  .b-sheet {
    padding: 16px;
  }

  .b-kpi {
    padding: 11px 12px;
  }

  .b-kpis--3 {
    grid-template-columns: 1fr;
  }

  .b-kpis--3 .b-kpi {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    column-gap: 10px;
  }

  .b-kpis--3 .b-kpi__label {
    flex-basis: 100%;
  }

  .b-kpis--3 .b-kpi__value {
    font-size: 20px;
  }

  .b-desk {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
  }

  .b-desk li {
    position: relative;
    left: auto;
    top: auto;
    margin: 0;
    font-size: 13px;
  }

  .b-ledger {
    grid-template-columns: 1fr;
  }

  .b-binder__sheet {
    grid-template-columns: 1fr;
  }

  .b-binder__sheet li + li {
    border-left: 0;
    border-top: 1px solid var(--b-sheet-line);
  }

  .b-binder__sheet li {
    padding: 20px 20px 24px;
  }

  .b-binder {
    margin-top: 36px;
  }

  .b-stresscard {
    padding: 20px 16px;
  }

  .b-stresscard__verdict,
  .b-fine {
    max-width: none;
  }

  .b-stamp {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-start;
    margin: 18px 0 0 6px;
    display: inline-flex;
  }

  .b-chart__plot {
    height: 150px;
  }

  .b-panel {
    margin-inline: calc(var(--gutter) * -1);
    padding: 28px var(--gutter);
    border-radius: 0;
  }

  .ftabs--ready .b-panel {
    border-radius: 0;
  }

  .b-ftabs__list {
    padding-left: 0;
  }

  .b-mock {
    min-height: 0;
  }

  .b-health li {
    grid-template-columns: minmax(0, 1fr) 3em auto;
  }

  .b-health .b-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .b-p360__row {
    grid-template-columns: 6.5em minmax(0, 1fr) auto;
  }
}


/* ==========================================================================
   Features page (/features/): the same file, opened section by section
   ========================================================================== */

/* Cover: the navy board, with the page's index tabs along its bottom edge */
.f-head {
  padding-top: 80px;
  background: var(--b-board);
  color: var(--b-on-board-strong);
}

.f-head h1 {
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--b-sheet);
  max-width: 16ch;
  text-wrap: balance;
}

.f-head__lede {
  margin-top: 20px;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--b-on-board);
}

/* The cover's live object: a folder whose contents sheet is the page's jump list */
.f-head {
  padding-bottom: 88px;
}

.f-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.f-file {
  position: relative;
  padding-top: 30px;
}

.f-file__back {
  position: absolute;
  inset: 8px -16px -16px 16px;
  border-radius: 6px 16px 16px 16px;
  background: #1c3a70;
  box-shadow: inset 0 0 0 1px rgba(238, 241, 247, 0.22), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.f-contents {
  padding: 10px 22px;
}

.f-contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: f-c;
}

.f-contents li + li {
  border-top: 1px solid var(--b-sheet-line);
}

.f-contents a {
  display: grid;
  grid-template-columns: 1.6em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

.f-contents a::before {
  counter-increment: f-c;
  content: counter(f-c);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--b-muted);
}

.f-contents a .b-num {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--b-board);
}

.f-contents a:hover span:first-child {
  text-decoration: underline;
  text-decoration-color: var(--b-tab);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.f-contents .is-later a {
  color: var(--b-muted);
}

/* Sections */
.f-sec {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 66px;
}

.f-sec--anchor {
  background: var(--sand);
  border-top: 0;
}

.f-sec h2 {
  font-family: var(--b-font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.f-q {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--b-board);
  text-wrap: balance;
}

.f-lede {
  margin-top: 18px;
  max-width: 60ch;
  font-size: 16.5px;
  line-height: 1.65;
}

.f-anchor__intro .f-lede {
  margin-top: 0;
}

.f-list {
  margin-bottom: 0;
  max-width: 62ch;
}

.f-list strong {
  color: var(--ink);
  font-weight: 600;
}

.f-anchor__intro,
.f-sec__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
}

.f-sec__grid {
  align-items: center;
}

.f-sec--flip .f-sec__grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.f-sec--flip .f-sec__text {
  order: 2;
}

.f-anchor__sheets {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.f-sec .b-mock {
  min-height: 0;
}

.f-stack {
  display: grid;
  gap: 18px;
}

/* Headroom before the 80% line */
.f-headroom__bar {
  margin-top: 12px;
  height: 12px;
  border-radius: 6px;
}

.f-headroom__bar i {
  border-radius: 6px;
  background: var(--b-tab);
}

.f-headroom__bar b {
  top: -5px;
  bottom: -5px;
}

.f-headroom__note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--b-muted);
}

.f-headroom__note .b-num {
  font-weight: 500;
  color: var(--b-board);
}

/* Document import review */
.f-import {
  margin-top: 30px;
}

.f-import__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.f-import__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--b-sheet-line);
}

.f-doc {
  font-size: 13.5px;
  font-weight: 600;
}

.f-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--b-muted);
  white-space: nowrap;
}

/* State as a mark: a drawn tick for done */
.f-mark--done {
  color: var(--b-good);
}

.f-mark--done::before {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
}

.f-import__note {
  max-width: none;
  margin-top: 12px;
}

/* Data health worklist */
.f-work {
  margin: 0;
  padding: 0;
  list-style: none;
}

.f-work__prop {
  padding: 12px 0;
  border-bottom: 1px solid var(--b-sheet-line);
}

.f-work__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.f-work__prop ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.f-work__prop ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--b-muted);
}

.f-work__more {
  font-size: 12.5px;
  color: var(--b-muted);
  border-bottom: 0;
}

/* Notes under a sheet: how its figures are worked out */
.f-notes {
  padding-top: 12px;
  border-top: 1px dashed var(--b-sheet-line);
}

.f-notes ol {
  margin: 8px 0 0;
  padding-left: 1.4em;
  display: grid;
  gap: 4px;
  max-width: none;
}

.f-notes p,
.f-notes li {
  max-width: 64ch;
  font-size: 12px;
  line-height: 1.5;
  color: var(--b-muted);
}

.f-notes ol + p {
  margin-top: 6px;
}

/* One feature band on the board, so board and paper alternate */
.f-sec--board {
  background: var(--b-board);
  border-top: 0;
  color: var(--b-on-board-strong);
}

.f-sec--board h2 {
  color: var(--b-sheet);
}

.f-sec--board .f-q {
  color: var(--b-on-board-strong);
}

.f-sec--board .f-lede {
  color: var(--b-on-board);
}

.f-sec--board .f-list {
  color: var(--b-on-board);
}

.f-sec--board + .f-sec {
  border-top: 0;
}

.f-work .b-bar {
  display: block;
}

/* Coming later: slips not yet filed */
.f-later__lede {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--b-muted);
}

.f-later {
  background: var(--sand);
}

/* Loose slips on the desk, not yet filed: rotated, paper, no two alike */
.f-later__list {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 26px 28px;
}

.f-later__list .f-slip {
  flex: 1 1 var(--w, 300px);
}

.f-slip:nth-child(1) { --w: 360px; }
.f-slip:nth-child(2) { --w: 270px; }
.f-slip:nth-child(3) { --w: 300px; }
.f-slip:nth-child(4) { --w: 250px; }
.f-slip:nth-child(5) { --w: 340px; }
.f-slip:nth-child(6) { --w: 320px; }

.f-slip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 8px 12px;
  padding: 18px 20px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 10px 20px -14px rgba(16, 39, 81, 0.45);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
}

.f-slip:nth-child(1) { --r: -2deg; }
.f-slip:nth-child(2) { --r: 1.5deg; --y: 10px; }
.f-slip:nth-child(3) { --r: -1deg; --y: -4px; }
.f-slip:nth-child(4) { --r: 2deg; --y: 6px; }
.f-slip:nth-child(5) { --r: -1.5deg; --y: 14px; }
.f-slip:nth-child(6) { --r: 1deg; }

.f-slip__name {
  font-weight: 600;
}

.f-slip__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  padding: 2px 8px;
  border: 1px dashed var(--b-clip);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--b-muted);
  white-space: nowrap;
}

/* In testing: a mark (half-filled dot), not a colour wash */
.f-slip__status.is-testing {
  border-style: solid;
  border-color: var(--b-good);
  color: var(--b-good);
}

.f-slip__status.is-testing::before {
  content: '';
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.f-slip p {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.55;
  color: var(--b-muted);
}

@media (max-width: 960px) {
  .f-head__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .f-anchor__intro,
  .f-sec__grid,
  .f-sec--flip .f-sec__grid,
  .f-anchor__sheets {
    grid-template-columns: 1fr;
  }

  .f-sec--flip .f-sec__text {
    order: 0;
  }

  .f-anchor__intro,
  .f-sec__grid {
    gap: 28px;
  }

}

@media (max-width: 640px) {
  .f-head {
    padding-top: 52px;
  }

  .f-head {
    padding-bottom: 56px;
  }

  .f-slip {
    --y: 0 !important;
  }

  .f-import__list li {
    flex-wrap: wrap;
  }
}

/* Chart labels stay readable when the SVG scales down on phones */
@media (max-width: 640px) {
  .b-axis,
  .b-end {
    font-size: 16px;
  }
}

/* On the stress card the notes stay clear of the stamp */
.b-stresscard .f-notes {
  max-width: calc(100% - 200px);
  margin-top: 12px;
}

@media (max-width: 640px) {
  .b-stresscard .f-notes {
    max-width: none;
  }
}
