/* /for-trades/:niche (20 trade pages) and /for-trades/guide: the Site Plan rebuild (batch B3, Oct 2026).
   Sits on top of the landing's own layers: tokens, base, chrome, drawings, sections and trades.css, so the patch
   check, price card, claim form, FAQ, chips and the amber close are the landing's exactly. Tokens only.
   The drawings come from public/site/js/trade-art.js (built on drawings.js); trade-pages.js plays them. */

/* ======================================================================================= NICHE HERO */
.nh { position: relative; overflow: hidden; isolation: isolate; background: var(--paper-2);
  padding: calc(var(--nav-clear) + clamp(20px, 2.4vw, 36px)) 0 clamp(56px, 6vw, 96px); }
.nh-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.nh-plan { position: absolute; left: -4%; right: -4%; top: -6%; height: 118%; will-change: transform; }
.nh-plan svg { width: 100%; height: 100%; }
/* The site plan shows at the edges and fades out behind the words, as on the landing. */
.nh::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(247, 245, 240, .97) 0%, rgba(247, 245, 240, .94) 44%, rgba(247, 245, 240, .6) 70%, rgba(247, 245, 240, .35) 100%),
              linear-gradient(rgba(247, 245, 240, .5), rgba(247, 245, 240, 0) 24%, rgba(247, 245, 240, 0) 76%, rgba(247, 245, 240, .92)); }
.nh-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); gap: clamp(32px, 4.4vw, 72px); align-items: start; }
.nh-col { display: grid; gap: 24px; align-content: start; min-width: 0; }
.nh-col--side { gap: 18px; }
.nh-head { display: grid; gap: 20px; justify-items: start; }
.nh .h1 { font-size: clamp(40px, 3.85vw, 58px); line-height: .98; letter-spacing: -0.042em; max-width: 19ch; }
.nh-lede { max-width: 35em; }
.nh-lede strong { font-weight: 600; color: var(--ink); }
.nh-proof { display: grid; gap: 8px; max-width: 32em; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.nh-proof b { font-family: var(--font-display); font-weight: var(--w-num); font-size: clamp(44px, 3.9vw, 60px); line-height: .95; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.nh-ctas { gap: 10px; }

/* The trade's drawing on a sheet of drawing paper. Its box is reserved here, so nothing moves when it is drawn. */
.tp-sheet { margin: 0; position: relative; background-color: var(--sheet); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  background-image: linear-gradient(var(--scrim) 1px, transparent 1px), linear-gradient(90deg, var(--scrim) 1px, transparent 1px);
  background-size: 20px 20px; background-position: -1px -1px; padding: clamp(10px, 1.2vw, 16px); }
.tp-sheet-slot { aspect-ratio: 608 / 414; }
.tp-sheet-slot > svg { width: 100%; height: 100%; }
/* phones: trade-art.js crops the sheet to the house (380 x 414) */
@media (max-width: 560px) { .tp-sheet-slot { aspect-ratio: 380 / 414; } }

/* The patch check (_patch-check.ejs, plain variant, trade fixed) as a card under the drawing. The .pc wrapper gives it
   the landing's field, button and result styles (trades.css); this only lays it out. */
.nh-check { position: relative; z-index: 3; min-width: 0; }
.nh-check #patch-check { background: var(--sheet); border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: clamp(20px, 2vw, 28px); scroll-margin-top: 100px; }
.nh-check #patch-check > .wrap { max-width: none; padding: 0; display: grid; gap: 10px; }
.nh-check #patch-check h2 { font-family: var(--font-display); font-weight: 600; font-size: 25px; line-height: 1.08; letter-spacing: -0.028em; color: var(--ink); }
.nh-check #patch-check > .wrap > p:not(.patch-note) { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.nh-check .patch-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 6px; min-width: 0; }
/* the field's label and hint run the full width; the input and the button share a row */
.nh-check .patch-box > .field { display: contents; }
.nh-check .patch-box > .field > label { grid-column: 1 / -1; }
.nh-check .patch-box > .field > input { grid-column: 1; min-width: 0; }
.nh-check .patch-box > #patchBtn { grid-column: 2; height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.nh-check .patch-box > #patchOut, .nh-check .patch-box > #leadBox { grid-column: 1 / -1; }
.nh-check .patch-note { font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.nh-check label small { font-size: 12.5px; }

/* Short desktop windows (a laptop with its toolbars): the patch check goes above the drawing, so it stays above the fold */
@media (min-width: 981px) and (max-height: 860px) { .nh-col--side .nh-check { order: -1; } }
@media (max-width: 980px) {
  /* One column. Headline, the count, the patch check, then the drawing and the rest: the check stays above the fold. */
  .nh-grid { display: flex; flex-direction: column; gap: 22px; }
  .nh-col { display: contents; }
  .nh-head { order: 1; } .nh-check { order: 2; } .nh-proof { order: 3; } .nh-art { order: 4; } .nh-lede { order: 5; } .nh-ctas { order: 6; }
  .nh .h1 { max-width: 22ch; }
  .nh-proof { padding-top: 0; border-top: 0; }
  .nh::after { background: linear-gradient(rgba(247, 245, 240, .96), rgba(247, 245, 240, .92) 50%, rgba(247, 245, 240, .55) 78%, rgba(247, 245, 240, .9)); }
}
@media (max-width: 640px) {
  /* the patch check's specimen file (built by _patch-check.ejs): one household per block rather than a squeezed table */
  .nh-check .specimen-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nh-check .specimen-table, .nh-check .specimen-table tbody, .nh-check .specimen-table tr, .nh-check .specimen-table td { display: block; }
  .nh-check .specimen-table tr { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
  .nh-check .specimen-table td { padding: 1px 0; border: 0; }
  .nh-check .specimen-table td:first-child { font-size: 12px; color: var(--ink-3); }
  .nh .h1 { font-size: clamp(32px, 9.2vw, 40px); line-height: 1; }
  .nh-head { gap: 16px; }
  .nh-proof b { font-size: 44px; }
  .nh-check #patch-check { padding: 20px 18px; }
  .nh-check #patch-check > .wrap > p:not(.patch-note) { font-size: 14px; }
  .nh-check .patch-box { grid-template-columns: minmax(0, 1fr); }
  .nh-check .patch-box > .field > input, .nh-check .patch-box > #patchBtn { grid-column: 1; }
  .nh-check .patch-box > #patchBtn { width: 100%; height: 52px; }
  .nh-check #patch-check h2 { font-size: 22px; }
  .nh-ctas .btn { width: 100%; }
  .tp-sheet { border-radius: var(--r-lg); }
}

/* ======================================================================================= SECTIONS */
.tp-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.tp-split .section-head { margin-bottom: 0; }
.tp-split--wide { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }

/* Councils that publish no outcomes (architects only) */
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.tp-chips li { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule-2); font-size: 14px; font-weight: 500; color: var(--ink-2); }

/* Why the register: the trade's three pains, then the job value on an amber field */
.tp-pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: pain; }
.tp-pains li { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 26px 26px 30px; display: grid; gap: 18px; align-content: start; }
.tp-pains .mono { font-size: 12px; color: var(--amber-ink); letter-spacing: .04em; }
.tp-pains p { font-family: var(--font-display); font-size: clamp(19px, 1.55vw, 22px); line-height: 1.3; letter-spacing: -0.018em; font-weight: 500; color: var(--ink); text-wrap: pretty; }
.tp-value { margin-top: 16px; padding: clamp(22px, 2.6vw, 34px) clamp(22px, 3vw, 40px); border-radius: var(--r-lg); background: var(--amber-field); color: #111214;
  font-family: var(--font-display); font-size: clamp(20px, 1.9vw, 27px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; text-wrap: balance;
  box-shadow: 0 24px 50px -30px rgba(138, 75, 4, .55); }

/* Tables: the matching table and the sample leads, on white sheets */
.tp-table-card { background: var(--sheet); border-radius: var(--r-xl); box-shadow: var(--sh-2); overflow: hidden; min-width: 0; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-table th { text-align: left; font: 500 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2);
  padding: 13px 16px; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
.tp-table td { padding: 16px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); line-height: 1.5; }
.tp-table tbody tr:last-child td { border-bottom: 0; }
.tp-table td strong { font-weight: 600; color: var(--ink); }
.tp-table td em { font-style: normal; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; letter-spacing: 0; color: var(--ink-2); }
.tp-match-table th:first-child, .tp-match-table td:first-child { padding-left: 22px; }
.tp-match-table th:last-child, .tp-match-table td:last-child { padding-right: 22px; }
.tp-match-table td:nth-child(1) { width: 17%; }
.tp-match-table td:nth-child(2) { width: 23%; }
.tp-match-table td:nth-child(3) { width: 16%; }
.tp-match-table td:nth-child(4) { width: 11%; }
.tp-match-table tbody tr { transition: background-color var(--dur-quick); }
.tp-match-table tbody tr:hover { background: var(--amber-wash); }
.tp-win > span { display: block; white-space: nowrap; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
/* The demand window as a bar on a month axis (ticks every 3 months), drawn left to right as the table comes in */
.tp-bar { position: relative; display: block; height: 8px; margin-top: 10px; border-radius: 4px; background-color: var(--paper-3);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(100% * 3 / var(--axis, 12) - 1px), var(--sheet) calc(100% * 3 / var(--axis, 12) - 1px) calc(100% * 3 / var(--axis, 12))); }
.tp-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 100%); right: calc((1 - var(--b)) * 100%); min-width: 6px; border-radius: 4px; background: var(--amber); transform-origin: 0 50%; }
.pw-motion [data-match-table].tp-pre .tp-bar::after { transform: scaleX(0); }
.pw-motion [data-match-table] .tp-bar::after { transition: transform 620ms var(--ease-out) calc(min(var(--i, 0), 12) * 45ms + 120ms); }
.tp-conf { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
/* Confidence as signal bars in ink: colour stays for its planning meanings */
.tp-conf i { flex: none; width: 15px; height: 11px; background:
  linear-gradient(var(--c1), var(--c1)) 0 100% / 3px 5px no-repeat, linear-gradient(var(--c2), var(--c2)) 6px 100% / 3px 8px no-repeat, linear-gradient(var(--c3), var(--c3)) 12px 100% / 3px 11px no-repeat; }
.tp-conf[data-c="high"] { --c1: var(--ink); --c2: var(--ink); --c3: var(--ink); }
.tp-conf[data-c="medium"] { --c1: var(--ink); --c2: var(--ink); --c3: var(--rule-2); }
.tp-conf[data-c="low"] { --c1: var(--ink); --c2: var(--rule-2); --c3: var(--rule-2); color: var(--ink-2); }
.tp-foot { margin-top: 18px; max-width: 72ch; color: var(--ink-3); }
.tp-foot .link { white-space: nowrap; }

@media (max-width: 860px) {
  /* Each trigger becomes a card: its name, then each field with its column name */
  .tp-match-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tp-match-table, .tp-match-table tbody, .tp-match-table tr, .tp-match-table td { display: block; width: auto !important; }
  .tp-match-table tbody tr { padding: 18px 20px 16px; border-bottom: 1px solid var(--rule); }
  .tp-match-table tbody tr:last-child { border-bottom: 0; }
  .tp-match-table td, .tp-match-table td:first-child, .tp-match-table td:last-child { padding: 5px 0; border: 0; }
  .tp-match-table td:first-child { padding-bottom: 8px; font-size: 17px; }
  .tp-match-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .tp-match-table td:first-child::before { display: none; }
  .tp-win .tp-bar { max-width: 320px; }
}

/* How it works: three steps, each with a small drawing on a tile of drawing paper */
.tp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tp-steps li { display: grid; gap: 10px; align-content: start; background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 14px 14px 26px; }
.tp-steps h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.022em; line-height: 1.15; color: var(--ink); margin: 10px 12px 0; }
.tp-steps p { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin: 0 12px; max-width: 36ch; }
.tp-ico { display: block; width: 100%; height: auto; aspect-ratio: 240 / 140; padding: 0; border-radius: 14px; overflow: hidden; background-color: var(--paper-2);
  background-image: linear-gradient(var(--scrim) 1px, transparent 1px), linear-gradient(90deg, var(--scrim) 1px, transparent 1px); background-size: 16px 16px; }
.tp-ico .i-case { fill: none; stroke: var(--rule-2); stroke-width: 15; stroke-linecap: round; }
.tp-ico .i-road { fill: none; stroke: var(--sheet); stroke-width: 12; stroke-linecap: round; }
.tp-ico .i-patch { fill: rgba(46, 98, 240, .06); stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 6 5; }
.tp-ico .i-tick { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tp-ico .i-ink rect { fill: var(--paper-3); stroke: var(--ink-4); stroke-width: .9; }
.tp-ico .i-site { fill: var(--amber-soft); stroke: var(--site-red); stroke-width: 1.6; }
.tp-ico .i-line { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.tp-ico .i-line.thin { fill: none; stroke-width: 1; stroke: var(--ink-2); }
.tp-ico .i-amber { fill: var(--amber-field); }
/* drawn as they come in (stroke paths only; the patch line keeps its dashes and fades) */
.pw-motion .tp-steps li.rv-wait:not(.in) .i-line, .pw-motion .tp-steps li.rv-wait:not(.in) .i-tick, .pw-motion .tp-steps li.rv-wait:not(.in) .i-site { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pw-motion .tp-steps li .i-line, .pw-motion .tp-steps li .i-tick, .pw-motion .tp-steps li .i-site { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 700ms var(--ease-draw) calc(var(--i, 0) * 90ms + 120ms), opacity 400ms var(--ease-out); }
.pw-motion .tp-steps li .i-tick { transition-delay: calc(var(--i, 0) * 90ms + 700ms); }
.pw-motion .tp-steps li.rv-wait:not(.in) .i-amber, .pw-motion .tp-steps li.rv-wait:not(.in) .i-patch { opacity: 0; }
.pw-motion .tp-steps li .i-amber, .pw-motion .tp-steps li .i-patch { transition: opacity 400ms var(--ease-out) calc(var(--i, 0) * 90ms + 420ms); }

/* Sample leads, laid out like the export */
.tp-csv-bar { display: flex; gap: 6px; padding: 12px 16px; background: #111214; }
.tp-csv-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.tp-sample-table td { font-size: 14.5px; }
.tp-sample-table td.mono { font-size: 13px; color: var(--ink); }
.tp-when { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pw-motion [data-sample-table].tp-pre tbody tr { opacity: 0; transform: translateY(8px); }
.pw-motion [data-sample-table] tbody tr { transition: opacity 260ms var(--ease-out) calc(var(--i, 0) * 90ms + 160ms), transform 360ms var(--ease-out) calc(var(--i, 0) * 90ms + 160ms); }
@media (max-width: 640px) {
  .tp-sample-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tp-sample-table, .tp-sample-table tbody, .tp-sample-table tr, .tp-sample-table td { display: block; }
  .tp-sample-table tbody tr { padding: 14px 18px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .tp-sample-table td { padding: 0; border: 0; }
  .tp-sample-table td:nth-child(1) { grid-column: 1 / -1; font-weight: 600; color: var(--ink); }
  .tp-sample-table td:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
}

/* The rules: one wide card, the letter drawn beside it */
.tp-rule-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 4vw, 64px); align-items: center;
  background: var(--sheet); border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: clamp(24px, 3.4vw, 48px); overflow: hidden; }
.tp-rule-copy { display: grid; gap: 14px; justify-items: start; }
.tp-rule-copy .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-ink); }
.tp-rule-copy .ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tp-rule-copy .body { max-width: 56ch; font-size: 17px; }
.tp-rule-copy .body strong { color: var(--ink); font-weight: 600; }
.tp-rule-art { position: relative; min-height: 190px; }
.tp-rule-art .env { position: absolute; width: min(300px, 92%); height: auto; filter: drop-shadow(0 14px 22px rgba(17, 18, 20, .16)); }
.tp-rule-art .env-back { right: 14%; top: 4px; transform: rotate(-7deg); }
.tp-rule-art .env-front { right: 0; top: 46px; transform: rotate(3deg); }
.pw-motion .tp-rule-card.rv-wait:not(.in) .env { opacity: 0; transform: translateY(26px) rotate(0deg); }
.pw-motion .tp-rule-card .env { transition: opacity 260ms var(--ease-out) 220ms, transform 620ms var(--ease-spring) 220ms; }
.pw-motion .tp-rule-card .env-front { transition-delay: 320ms; }
/* envelope drawing (PWDraw.envelopeFront/Back): the same palette as the landing's (product.css) */
.env .env-body { fill: #FBFAF6; stroke: #D9D4C8; stroke-width: 1.2; }
.env .env-fold { fill: none; stroke: #E2DDD2; stroke-width: 1.2; }
.env .env-flap { fill: #F2EEE5; }
.env .env-flap-edge { fill: none; stroke: #D3CDBF; stroke-width: 1.2; stroke-linejoin: round; }
.env .env-logo { fill: none; stroke: #CFC8BA; stroke-width: 1; stroke-dasharray: 3 2; }
.env .env-t { font-family: var(--font-mono); font-size: 6.5px; letter-spacing: .06em; fill: #8A857A; }
.env .env-postmark { fill: none; stroke: #B8B2A6; stroke-width: 1.1; }
.env .env-postmark text { fill: #9E978A; stroke: none; font-size: 5.6px; }
.env .env-stamp { fill: #FFFFFF; stroke: #D9B35E; stroke-width: 1.2; stroke-dasharray: 2.5 2; }
.env .env-stamp-in { fill: #FFF0CF; stroke: none; }
.env .env-stamp-t { fill: #8A4B04; font-size: 9px; font-weight: 600; letter-spacing: 0; }
.env .env-window { fill: #FFFFFF; stroke: #D9D4C8; stroke-width: 1.2; }
.env .env-addr { font-size: 7.5px; fill: #5D5D5D; }
.env .env-redact { fill: #E4E0D6; }

/* Price: the landing's price card; the niche keeps its own price line */
.tp-claim .price-grid { align-items: center; }
.tp-claim .pc-price { margin: 0; }
.tp-claim .pc-price span { font-size: 16px; }
.tp-claim .lead strong { color: var(--ink); font-weight: 600; }
.tp-claim .pc-form { padding-top: 20px; }
.tp-claim .price-card { scroll-margin-top: 100px; }
.pc-google { display: grid; gap: 8px; margin-bottom: 4px; }
.pc-google .pw-or { font-size: 13px; color: var(--ink-3); }

/* By council, other trades: the trade × council link mesh on white sheets, then the landing's trade chips */
.tp-others .section-head { margin-bottom: 28px; }
.tp-mesh { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 48px); }
.tp-mesh-card { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: clamp(20px, 2.2vw, 28px); min-width: 0; }
.tp-mesh-card h3, .tp-mesh-h { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 12px; }
.tp-mesh-h { margin-bottom: 16px; }
.tp-mesh-card ul { columns: 3; column-gap: clamp(20px, 3vw, 40px); }
.tp-mesh-card li { break-inside: avoid; }
.tp-mesh-card li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 15px; transition: color var(--dur-quick); }
.tp-mesh-card li a:hover { color: var(--ink); }
.tp-mesh-card li a .num { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-mesh-card li a:hover .num { color: var(--amber-ink); }
.tp-trade-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-read-first { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 15px; }
.tp-read-first .mono { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* Where the work is: the busiest councils for the trade as amber bars on a white sheet, links into their pages */
.tp-where-card { margin: 0; padding: clamp(18px, 2.2vw, 28px) clamp(20px, 2.6vw, 32px); }
.tp-hbars { display: grid; gap: 14px; }
.tp-hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: baseline; }
.tp-hbars .k { font-size: 16px; font-weight: 500; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.tp-hbars .k a { color: inherit; background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 2px no-repeat; padding-bottom: 2px; transition: background-size var(--dur-quick) var(--ease-out); }
.tp-hbars .k a:hover { background-size: 100% 2px; }
.tp-hbars .n { font-family: var(--font-display); font-weight: var(--w-num); font-size: 18px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.tp-hbars .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--paper-3); overflow: hidden; }
.tp-hbars .bar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--amber); transform-origin: 0 50%; }
.pw-motion .tp-where-card.rv-wait:not(.in) .bar i { transform: scaleX(0); }
.pw-motion .tp-where-card .bar i { transition: transform 620ms var(--ease-out) calc(min(var(--i, 0), 8) * 60ms + 160ms); }

/* Recent applications: real rows off the register, laid out like the export (address, names and refs taken off) */
.tp-ex-table td { font-size: 14.5px; }
.tp-ex-table td.mono { font-size: 13px; color: var(--ink); white-space: nowrap; }
.tp-ex-table td:nth-child(3) { width: 44%; }
.tp-ex-table td em { font-family: var(--font-sans); font-size: 14.5px; color: var(--ink); }
.tp-ex-table td b { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.tp-ex-table .tp-when { white-space: normal; height: auto; padding: 3px 9px; line-height: 1.35; }
.tp-district { margin-left: 6px; font-size: 12.5px; color: var(--ink-3); }
.tp-recent .tp-foot { max-width: none; }
@media (max-width: 760px) {
  .tp-ex-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tp-ex-table, .tp-ex-table tbody, .tp-ex-table tr, .tp-ex-table td { display: block; width: auto !important; }
  .tp-ex-table tbody tr { padding: 16px 18px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
  .tp-ex-table tbody tr:last-child { border-bottom: 0; }
  .tp-ex-table td { padding: 0; border: 0; }
  .tp-ex-table td:nth-child(1) { grid-column: 1; align-self: baseline; }
  .tp-ex-table td:nth-child(2) { grid-column: 2; align-self: baseline; }
  .tp-ex-table td:nth-child(3), .tp-ex-table td:nth-child(4) { grid-column: 1 / -1; }
}

/* Breadcrumb, in mono above the hero label */
.nh-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font: 13px/1.4 var(--font-mono); color: var(--ink-3); }
.nh-crumbs a { color: var(--ink-3); transition: color var(--dur-quick); }
.nh-crumbs a:hover { color: var(--ink); }
.nh-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-4); }

/* The close, on the amber field */
.tp-close .lead .link { white-space: nowrap; }
.tp-close .lead { color: var(--ink-2); }
.tp-close .close-foot .link { white-space: nowrap; }

@media (max-width: 900px) {
  .tp-split, .tp-split--wide, .tp-rule-card { grid-template-columns: minmax(0, 1fr); }
  .tp-pains, .tp-steps { grid-template-columns: minmax(0, 1fr); }
  .tp-mesh-card ul { columns: 2; }
  .tp-rule-art { min-height: 170px; max-width: 360px; width: 100%; }
}
@media (max-width: 640px) {
  .tp-pains li { padding: 22px; }
  .tp-mesh-card ul { columns: 1; }
  .tp-close .btn-row .btn { width: 100%; }
}

/* ======================================================================================= GUIDE */
/* Hero: the extension built in three trades, the badge pinned to the sheet */
.gh { position: relative; isolation: isolate; background: var(--paper-2); padding: calc(var(--nav-clear) + clamp(24px, 3vw, 48px)) 0 clamp(64px, 7vw, 112px); overflow: hidden; }
.gh::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--scrim) 1px, transparent 1px), linear-gradient(90deg, var(--scrim) 1px, transparent 1px); background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(120% 90% at 75% 35%, #000 25%, transparent 75%); mask-image: radial-gradient(120% 90% at 75% 35%, #000 25%, transparent 75%); }
.gh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.gh-copy { display: grid; gap: 24px; justify-items: start; }
.gh .h1 { font-size: clamp(44px, 5vw, 76px); line-height: .96; max-width: 14ch; }
.gh-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-3); font-size: 14.5px; font-weight: 500; }
.gh-meta span { display: inline-flex; align-items: center; gap: 8px; }
.tp-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gh-meta .tp-i { color: var(--amber-ink); }
.gh-art { position: relative; padding-bottom: 46px; }
.gh-badge { position: absolute; left: -22px; bottom: 0; max-width: 300px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-3);
  font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.gh-badge strong { display: block; margin-bottom: 3px; font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }

/* The flow: four steps beside a pinned stage (trades.css .story), one street changing state */
.gflow { padding-bottom: clamp(48px, 6vw, 96px); }
.gflow .story-head .h2 { font-size: clamp(36px, 4.2vw, 62px); }
.gflow .story-grid { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.gflow .step { min-height: min(58vh, 640px); }
.gflow .step:last-child { min-height: min(66vh, 720px); }
.gflow .step .link-arrow { color: var(--ink); font-size: 15px; }
.gflow .step .link-arrow svg { stroke: currentColor; fill: none; stroke-width: 1.6; }
.gflow-stage { top: calc(50vh - 250px + 30px); height: 500px; }
.gflow .stage-rail { grid-template-columns: repeat(4, 1fr); }
.gflow-sheet { position: relative; height: calc(100% - 40px); border-radius: var(--r-xl); background-color: var(--sheet); box-shadow: var(--sh-3); overflow: hidden;
  background-image: linear-gradient(var(--scrim) 1px, transparent 1px), linear-gradient(90deg, var(--scrim) 1px, transparent 1px); background-size: 20px 20px; }
.gflow-sheet > svg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.no-js .gflow .story-stage-col { display: none; }
/* No script, no drawing: the decorative sheets are left out rather than shown blank */
.no-js [data-trade-art] { display: none; }
.no-js .gh-art { padding-bottom: 0; }
.no-js .gh-badge { position: static; max-width: 420px; }
.no-js .gflow .step, .no-js .gflow .step:last-child { min-height: 0; opacity: 1; padding: 22px 0; }
.no-js .gflow .story-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) { .no-js .gflow .story-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 80px); } }

/* the street's layers (trade-art.js flow()): drawn by step, each element staggered by --d */
.tp-flow .fl-s > g { opacity: 0; transition: opacity 280ms var(--ease-out), transform 520ms var(--ease-spring); transition-delay: calc(var(--d, 0) * 110ms); }
.tp-flow .fl-tag, .tp-flow .fl-won { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(8px) scale(.92); }
.tp-flow .fl-notice { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.6); }
.tp-flow .fl-env { transform: translateY(-34px); }
.is-s1 .tp-flow .fl-s1 > g, .is-s2 .tp-flow .fl-s2 > g, .is-s3 .tp-flow .fl-s3 > g, .is-s4 .tp-flow .fl-s4 > g { opacity: 1; transform: none; }
.is-s2 .tp-flow .fl-s1 > .fl-out { opacity: .28; }
.is-s4 .tp-flow .fl-s1 > .fl-will-win { opacity: 0; }
.tp-flow .fl-tag-box { fill: var(--sheet); stroke: rgba(17, 18, 20, .08); stroke-width: 1; filter: drop-shadow(0 6px 10px rgba(17, 18, 20, .14)); }
.tp-flow .fl-tag-dot { fill: var(--amber); }
.tp-flow .fl-tag-t, .tp-flow .fl-won-t, .tp-flow .fl-patch-t { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; fill: var(--ink); }
.tp-flow .fl-tag-stem { stroke: var(--ink-4); stroke-width: 1.2; }
.tp-flow .fl-red { fill: none; stroke: var(--site-red); stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 820ms var(--ease-draw); transition-delay: calc(var(--d, 0) * 140ms + 120ms); }
.is-s2 .tp-flow .fl-red { stroke-dashoffset: 0; }
.tp-flow .fl-patch-line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 7 6; }
.tp-flow .fl-patch-chip { fill: var(--blue-wash); stroke: var(--blue); stroke-width: 1; }
.tp-flow .fl-patch-t { fill: var(--blue-ink); text-anchor: middle; }
.tp-flow .fl-env-body { fill: #FFFFFF; stroke: #CFC8BA; stroke-width: 1.2; filter: drop-shadow(0 4px 6px rgba(17, 18, 20, .18)); }
.tp-flow .fl-env-flap { fill: none; stroke: #CFC8BA; stroke-width: 1.1; }
.tp-flow .fl-env-stamp { fill: var(--amber-field); }
.tp-flow .fl-won-box { fill: var(--green-wash); stroke: var(--green); stroke-width: 1.2; filter: drop-shadow(0 6px 10px rgba(22, 163, 74, .2)); }
.tp-flow .fl-won-tick { fill: none; stroke: var(--green-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tp-flow .fl-won-t { fill: var(--green-ink); font-weight: 600; }
.tp-flow .fl-scaf path { fill: none; stroke: #3F444C; stroke-width: 1.6; }
.tp-flow .fl-post { stroke-width: 2.5; }
/* static (crawlers, reduced motion): the street in its last state */
.pw-static .tp-flow .fl-s > g { transition: none; }
.pw-static .tp-flow .fl-red { transition: none; }

/* Chapter index */
.gchapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gchapters a { display: grid; gap: 8px; align-content: start; height: 100%; padding: 20px 20px 22px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-1);
  transition: box-shadow var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.gchapters a:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.gchapters .mono { font-size: 12px; color: var(--amber-ink); }
.gchapters b { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
.gchapters small { font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* Chapters: the copy beside its drawings and modules */
.gchapter-head { display: grid; gap: 14px; max-width: 900px; margin-bottom: clamp(28px, 3.4vw, 48px); }
.gkicker { font-size: 12.5px; color: var(--amber-ink); letter-spacing: .04em; }
.gchapter .h2 { font-size: clamp(32px, 3.6vw, 52px); max-width: 20ch; }
.gchapter-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: clamp(32px, 5vw, 80px); align-items: start; }
.gcopy { display: grid; gap: 18px; align-content: start; max-width: 68ch; }
.gcopy p, .gcopy li { color: var(--ink-2); font-size: 18px; line-height: 1.7; text-wrap: pretty; }
.gcopy em { font-style: italic; }
.gcopy strong { color: var(--ink); font-weight: 600; }
.gcopy--intro { margin-bottom: 24px; }
.gcopy--outro { margin-top: 28px; }
.gaside { display: grid; gap: 18px; align-content: start; }
.gfig { margin: 0; display: grid; gap: 10px; }
.gfig figcaption { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.gticks { display: grid; gap: 14px; }
.gticks li { position: relative; padding-left: 26px; }
.gticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.grules-lead { margin-top: clamp(32px, 4vw, 56px); font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); }

/* Fact cards, the timeline, the notice, inline offers */
.tp-facts { display: grid; gap: 14px; }
.tp-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-fact { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 22px 24px; display: grid; gap: 8px; align-content: start; }
.tp-fact h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.3; }
.tp-fact h3 .tp-i { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--amber-soft); color: var(--amber-ink); }
.tp-fact p { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.tp-fact p strong { color: var(--ink); }
.tp-fact--amber { background: var(--amber-wash); box-shadow: inset 0 0 0 1px var(--amber-soft); }
.tp-fact--ink { background: #111214; box-shadow: none; }
.tp-fact--ink h3 { color: #FFFFFF; }
.tp-fact--ink h3 .tp-i { background: rgba(255, 190, 59, .16); color: #FFBE3B; }
.tp-fact--ink p { color: rgba(255, 255, 255, .78); }
.tp-tl { position: relative; display: grid; gap: 0; padding-left: 26px; margin-top: 6px; }
.tp-tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--rule); }
.tp-tl::after { content: ""; position: absolute; left: 5px; top: 8px; width: 2px; border-radius: 2px; background: var(--amber-deep); height: calc((100% - 16px) * var(--tp, 1)); }
.tp-tl li { position: relative; display: grid; gap: 2px; padding: 8px 0 14px; transition: opacity var(--dur-enter) var(--ease-out); }
.tp-tl li::before { content: ""; position: absolute; left: -26px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber-deep); box-shadow: 0 0 0 4px var(--amber-wash); transition: background-color var(--dur-quick), box-shadow var(--dur-quick); }
.tp-tl[data-live] li:not(.on) { opacity: .42; }
.tp-tl[data-live] li:not(.on)::before { background: var(--sheet); box-shadow: inset 0 0 0 2px var(--rule-2); }
.tp-tl-when { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.tp-tl strong { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.tp-tl-what { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.tp-tl--big li { padding-bottom: 20px; }
.tp-tl--big strong { font-size: 18px; }
.tp-tl--big .tp-tl-what { font-size: 17px; line-height: 1.65; }
.tp-notice { padding: 18px 20px; border-radius: var(--r-lg); background: var(--amber-wash); box-shadow: inset 0 0 0 1px var(--amber-soft); color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.tp-notice strong { color: var(--ink); }
.tp-inline-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 10px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-2); }
.theme-band .tp-inline-cta { box-shadow: var(--sh-2); }
.tp-inline-copy { flex: 1 1 300px; display: grid; gap: 4px; }
.tp-inline-copy strong { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.tp-inline-copy p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.tp-inline-big { font-family: var(--font-display); font-weight: var(--w-num); font-size: clamp(36px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tp-inline-big span { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }

/* The specimen: one application, four windows (bars on a 6-month axis) */
.tp-spec { border-radius: var(--r-lg); overflow: hidden; background: var(--sheet); box-shadow: var(--sh-2); }
.tp-spec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 12px 16px; background: #111214; color: #FFFFFF; }
.tp-spec-file { font: 13px/1.4 var(--font-mono); }
.tp-spec-meta { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.tp-spec-scroll { overflow-x: auto; }
.tp-spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; --axis: 6; }
.tp-spec-table th { text-align: left; padding: 10px 16px; background: var(--paper-2); color: var(--ink-3); font: 500 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
.tp-spec-table td { padding: 11px 16px; border-bottom: 1px solid var(--rule); color: var(--ink-2); vertical-align: middle; }
.tp-spec-table td:first-child { font-weight: 600; color: var(--ink); }
.tp-spec-table td:nth-child(2) span { display: block; font-variant-numeric: tabular-nums; }
.tp-spec-table .tp-bar { margin-top: 6px; height: 6px; max-width: 140px; }
.pw-motion [data-spec-table].tp-pre .tp-bar::after { transform: scaleX(0); }
.pw-motion [data-spec-table] .tp-bar::after { transition: transform 620ms var(--ease-out) calc(var(--i, 0) * 90ms + 120ms); }
.tp-spec-note { padding: 12px 16px; font-size: 13px; color: var(--ink-3); }

/* The letter's anatomy */
.tp-letter { position: relative; padding: 24px 24px 12px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-2); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.tp-letter::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--amber-field); }
.tp-letter-head { padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-weight: 600; color: var(--ink); }
.tp-letter-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--rule-2); }
.tp-letter-line:last-child { border-bottom: 0; }
.tp-letter-line b { display: block; color: var(--ink); font-weight: 600; }
.tp-pin { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; background: var(--amber-field); color: #111214; font: 600 12px/1 var(--font-mono); }
.tp-mask { color: var(--ink-4); letter-spacing: .06em; }

/* Four rules, numbered */
.tp-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; counter-reset: rule; }
.tp-rules li { counter-increment: rule; position: relative; padding: 22px 24px 22px 70px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-1); color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.tp-rules li::before { content: counter(rule, decimal-leading-zero); position: absolute; left: 22px; top: 22px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--amber-soft); color: var(--amber-ink); font: 600 12.5px/1 var(--font-mono); }
.tp-rules li strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }

/* Compliance: a night band */
.gcompliance .h2 { color: var(--ink); }
.gcompliance-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.gcompliance .gcopy p { color: var(--ink-2); }
.gline { padding-left: 18px; border-left: 3px solid var(--amber); font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 1.9vw, 26px) !important; line-height: 1.35 !important; letter-spacing: -0.015em; color: var(--ink) !important; }
.gchecks { display: grid; gap: 10px; }
.gchecks li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.gchecks li .tp-i { width: 20px; height: 20px; margin-top: 2px; color: var(--amber); }
.gchecks li strong { display: block; color: var(--ink); font-weight: 600; }
.gfoot-note { margin-top: clamp(28px, 3.4vw, 44px); max-width: 80ch; font-size: 14.5px; line-height: 1.6; color: var(--ink-3); }

/* Chapter 08: every trade's page */
.gtrades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gtrades a { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; padding: 15px 16px; border-radius: 14px; background: var(--sheet); box-shadow: var(--sh-1);
  font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.3; transition: box-shadow var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out); }
.gtrades a:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.gtrades a .tp-i { color: var(--amber-ink); transition: transform var(--dur-quick) var(--ease-out); }
.gtrades a:hover .tp-i { transform: translateX(3px); }

/* The shared FAQ (_faq.ejs, plain variant): heading beside the answers */
.tp-guide #faq { padding: clamp(80px, 10vw, 150px) 0; border-top: 1px solid var(--rule); }
.tp-guide #faq > .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 clamp(32px, 6vw, 96px); align-items: start; }
.tp-guide #faq h2 { grid-column: 1; grid-row: 1 / span 30; position: sticky; top: 120px; font-family: var(--font-display); font-weight: 600; font-size: var(--t-h3); line-height: 1.06; letter-spacing: -0.03em; color: var(--ink); }
.tp-guide #faq .faq-item, .tp-guide #faq .muted { grid-column: 2; }
.tp-guide #faq .faq-item { padding: 22px 0; border-top: 1px solid var(--rule); }
.tp-guide #faq .faq-item h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.35; }
.tp-guide #faq .faq-item p { margin-top: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.65; max-width: 64ch; }
.tp-guide #faq .muted { padding-top: 22px; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-3); }
.tp-guide #faq .muted a { color: var(--ink); background: linear-gradient(var(--amber), var(--amber)) 0 100% / 100% 2px no-repeat; padding-bottom: 2px; }

.gcloser .lead { color: var(--ink-2); }

@media (max-width: 1100px) {
  .gh-grid { grid-template-columns: minmax(0, 1fr); }
  .gh-art { max-width: 640px; }
  .gchapter-body { grid-template-columns: minmax(0, 1fr); }
  .gaside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gchapters, .gtrades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* The flow on phones and tablets: the stage pins under the header and the steps scroll beneath it */
  .gflow .story-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gflow .story-stage-col { order: -1; position: sticky; top: 0; z-index: 5; margin: 0 calc(-1 * var(--gutter)); padding: calc(var(--nav-clear) - 2px) var(--gutter) 14px; background: linear-gradient(var(--paper) 88%, rgba(255, 255, 255, 0)); }
  .gflow-stage { position: relative; top: 0; height: auto; }
  .gflow-sheet { height: auto; aspect-ratio: 800 / 440; }
  .gflow .stage-rail { margin-bottom: 8px; }
  .gflow .step { min-height: 64vh; align-content: start; padding-top: 24px; }
  .gflow .step:last-child { min-height: 70vh; }
  .gcompliance-grid, .tp-facts--2, .tp-rules { grid-template-columns: minmax(0, 1fr); }
  .tp-guide #faq > .wrap { grid-template-columns: minmax(0, 1fr); }
  .tp-guide #faq h2 { position: static; grid-row: auto; margin-bottom: 18px; }
  .tp-guide #faq .faq-item, .tp-guide #faq .muted { grid-column: 1; }
}
@media (max-width: 560px) { .gflow-sheet { aspect-ratio: 584 / 400; } }
@media (max-width: 640px) {
  .gaside { grid-template-columns: minmax(0, 1fr); }
  .gchapters, .gtrades { grid-template-columns: minmax(0, 1fr); }
  .gh .h1 { font-size: clamp(38px, 11vw, 48px); }
  .gh-badge { position: relative; left: auto; bottom: auto; margin: -28px 12px 0; max-width: none; }
  .gh-art { padding-bottom: 0; }
  .gcopy p, .gcopy li { font-size: 17px; }
  .tp-inline-cta .btn { width: 100%; }
  .gh .btn-row .btn, .gcloser .btn-row .btn { width: 100%; }
}
/* Static mode (crawlers, reduced motion, very tall viewports): every step's words, the street in its last state, nothing pinned */
.gflow.story--static .step, .gflow.story--static .step:last-child { min-height: 0; opacity: 1; padding: 22px 0; }
.gflow.story--static .story-stage { position: relative; top: 0; }
.gflow.story--static .story-stage-col { position: relative; top: 0; padding-top: 0; background: none; }

/* ======================================================================================= DRAWINGS */
/* trade-art.js scenes use drawings.js's classes (.drawing .ln.ink / .ln.red / hatch / .lyr --p); these add the rest. */
.tp-art { overflow: hidden; }
.tp-art .lyr { transition: --p 900ms var(--ease-draw) calc(var(--o, 0) * 1ms); }
.tp-art.tp-quick .lyr { transition-duration: 1ms; transition-delay: 0ms; }
.tp-art .tp-dsh { fill: none; stroke: var(--ink-2); stroke-width: 1.3; stroke-dasharray: 5 4; stroke-linecap: round; stroke-linejoin: round; opacity: var(--p); }
.tp-art .tp-dsh.red { stroke: var(--amber-deep); stroke-width: 1.5; }
.tp-art .tp-dsh.green { stroke: var(--green); }
.tp-art .tp-pat { fill: none; stroke: var(--amber); stroke-width: .9; opacity: .75; }
.tp-art .fill-cut { fill: var(--ink-4); opacity: calc(var(--p) * .5); }
.tp-art .lyr-hip { transition: opacity 400ms var(--ease-out) 650ms; }
/* drawings.css rotates its stamp in fill-box space; trade-art.js gives each stamp its own centre in drawing space */
.tp-art .lyr-stamp { transform-box: view-box; }
.tp-art .ln.scaf.tp-amber { stroke: var(--amber-deep); }
.tp-art .ln.scaf.board.tp-amber { stroke: var(--amber); }
.tp-art .fill-hatch.tp-quiet { opacity: calc(var(--p) * .3); }
.tp-art text { font-size: 10.5px; }
.tp-art .ln.ink.fine, .tp-art .ln.red.fine { stroke-width: .9; }
.tp-art .ln.blue { stroke: var(--blue); stroke-width: 1.4; }
.tp-art .ln.green { stroke: var(--green); stroke-width: 1.5; }
.tp-art .ln.amber { stroke: var(--amber-deep); stroke-width: 1.6; }
.tp-art .fill-amber { fill: var(--amber-soft); opacity: var(--p); }
.tp-art .fill-green { fill: var(--green-wash); opacity: var(--p); }
.tp-art .fill-sheet { fill: var(--sheet); opacity: var(--p); }
.tp-art .fill-ground { fill: var(--paper-3); opacity: calc(var(--p) * .8); }
.tp-art .fill-glass { fill: var(--blue-wash); opacity: calc(var(--p) * .7); }
.tp-art .fill-soft { fill: var(--paper-2); opacity: var(--p); }
.tp-art text.big { font-size: 13px; letter-spacing: .1em; }
.tp-art text.ink-t { fill: var(--ink); }
.tp-art text.green-t { fill: var(--green-ink); }
.tp-art .lyr-pop { opacity: var(--p); }
.tp-art .stamp-box.ink { stroke: var(--ink); }
.tp-art .stamp-t.ink { fill: var(--ink); }
.tp-art .stamp-s.ink { fill: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .tp-art .lyr { transition: none; } }
.pw-static .tp-art .lyr { transition: none; }

/* ======================================================================================= DARK THEME (opt-in) */
:root[data-theme="dark"] .nh::after { background: linear-gradient(90deg, rgba(22, 24, 27, .97) 0%, rgba(22, 24, 27, .94) 44%, rgba(22, 24, 27, .82) 70%, rgba(22, 24, 27, .72) 100%), linear-gradient(rgba(22, 24, 27, .5), rgba(22, 24, 27, 0) 24%, rgba(22, 24, 27, 0) 76%, rgba(22, 24, 27, .92)); }
@media (max-width: 980px) { :root[data-theme="dark"] .nh::after { background: linear-gradient(rgba(22, 24, 27, .96), rgba(22, 24, 27, .92) 50%, rgba(22, 24, 27, .55) 78%, rgba(22, 24, 27, .9)); } }
:root[data-theme="dark"] .tp-value { color: #111214; }
