/* Claira Health · home-concept inner pages ("The Leak", 11 Oct 2026).
   Loaded after concept.css, which supplies the tokens, nav, footer, notes, folds and deck. */

.inner-page main { position: relative; }
.inner .nav-links a.is-active { color: var(--ink); position: relative; }
.inner-page .nav-links a.is-active { color: var(--ink); }
.inner-page .nav-links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--ribbon); }
.inner-page .nav-links a { position: relative; }

/* ---------- Inner hero ---------- */
.ihero { padding: 70px 0 60px; overflow: hidden;
  background:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 32px 100%,
    radial-gradient(ellipse at 30% 0%, #fff, var(--paper) 70%); }
.ihero-in { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ihero-in.is-solo { grid-template-columns: minmax(0, 820px); }
.ihero h1 { font-size: clamp(38px, 4.8vw, 64px); line-height: 1.02; letter-spacing: -0.045em; margin: 16px 0 16px; text-wrap: balance; }
.ihero h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; background: var(--ribbon); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 4px; }
.ihero .sub { margin-bottom: 26px; }
.ihero-side .hand { margin-top: 0; }
@media (max-width: 960px) { .ihero-in { grid-template-columns: 1fr; } }

/* ---------- Agents: dossiers ---------- */
.dossiers { padding: 40px 0 60px; }
.dossier { display: grid; grid-template-columns: 110px 1fr 260px; gap: 30px; align-items: start; padding: 44px 0; border-top: 1px dashed var(--line); }
.d-num { font-family: var(--serif); font-style: italic; font-size: 84px; line-height: 0.8; color: var(--paper-3); }
.dossier h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 40px; margin: 10px 0 14px; letter-spacing: -0.01em; }
.d-leak { padding: 12px 14px; border-left: 3px solid var(--red); background: rgba(180, 35, 24, 0.05); border-radius: 0 10px 10px 0; color: var(--ink-2); line-height: 1.55; }
.d-leak b, .s-leak b, .s-fix b { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.d-leak b, .s-leak b { color: var(--red); }
.d-gets { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.d-gets li { position: relative; padding-left: 28px; font-size: 16px; font-weight: 600; }
.d-gets li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 11px; display: grid; place-items: center; }
.d-sticky { position: relative; padding: 24px 16px 16px; background: #FFF4B8; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.4; color: #3B2F0B; transform: rotate(var(--r)); box-shadow: 0 14px 22px -12px rgba(80, 60, 0, 0.45); }
.d-sticky b { display: block; font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.d-sticky .pin, .note .pin { position: absolute; top: -8px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F87171, var(--red) 65%, #7F1D1D); box-shadow: 0 4px 5px -1px rgba(0,0,0,0.45); }
@media (max-width: 900px) { .dossier { grid-template-columns: 1fr; gap: 14px; } .d-num { font-size: 56px; } }

/* Cork boards with 1–4 columns */
.inner .cork.cork-4 { grid-template-columns: repeat(4, 1fr); }
.inner .cork.cork-3 { grid-template-columns: repeat(3, 1fr); }
.inner .cork.cork-2 { grid-template-columns: repeat(2, 1fr); }
.inner .cork.cork-1 { grid-template-columns: minmax(0, 320px); justify-content: center; }
.inner .note { height: 250px; }
@media (max-width: 1000px) { .inner .cork.cork-4, .inner .cork.cork-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .inner .cork.cork-4, .inner .cork.cork-3, .inner .cork.cork-2 { grid-template-columns: 1fr; } }

/* ---------- How it works: a pipe down the page ---------- */
.journey { padding: 30px 0 80px; }
.journey-in { position: relative; display: grid; gap: 60px; padding-left: 90px; }
.j-pipe { position: absolute; left: 22px; top: 0; width: 40px; height: 100%; overflow: visible; }
.j-track { fill: none; stroke: var(--paper-3); stroke-width: 18; stroke-linecap: round; }
.j-flow { fill: none; stroke: url(#pipeGrad); stroke-width: 18; stroke-linecap: round; }
.station { position: relative; }
.station .clamp { position: absolute; left: -84px; top: 30px; width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 3px solid var(--red); box-shadow: 0 0 0 6px var(--paper); transition: border-color 0.5s, background 0.5s, transform 0.6s var(--spring); }
.station .clamp::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--red); transition: background 0.5s; }
.station.is-sealed .clamp { border-color: var(--teal); transform: scale(1.12); }
.station.is-sealed .clamp::after { background: var(--teal); }
.s-card { max-width: 760px; padding: 26px 28px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 40px -32px rgba(15, 23, 42, 0.5); }
.s-card h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 34px; margin: 8px 0 14px; }
.s-leak, .s-fix { padding: 12px 14px; border-radius: 10px; line-height: 1.55; margin-top: 10px; }
.s-leak { background: rgba(180, 35, 24, 0.05); color: var(--ink-2); }
.s-fix { background: rgba(15, 118, 110, 0.07); color: var(--ink); font-weight: 600; transition: opacity 0.6s; }
.s-fix b { color: var(--teal); }
.station:not(.is-sealed) .s-fix { opacity: 0.35; }
@media (max-width: 640px) { .journey-in { padding-left: 64px; } .station .clamp { left: -60px; width: 36px; height: 36px; } .j-pipe { left: 10px; } }

/* Three promise cards */
.trio-sec { padding: 20px 0 100px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trio-card { padding: 26px; border-radius: 18px; background: #fff; border: 1px solid var(--line); transition: transform 0.4s var(--spring), box-shadow 0.4s; }
.trio-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -28px rgba(15, 23, 42, 0.5); }
.trio-card.wide { grid-column: 1 / -1; text-align: center; }
.t-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #F0FBF9; color: var(--teal); font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.trio-card h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 8px; }
.trio-card p { color: var(--ink-2); line-height: 1.55; font-size: 15px; }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } }

/* ---------- Specialties ---------- */
.board-sec { padding: 10px 0 70px; }
.spec-grid-sec { padding: 0 0 100px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.spec-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform 0.35s var(--spring), border-color 0.3s; }
.spec-card:hover { transform: translateY(-4px); border-color: var(--teal); }
.spec-card b { font-size: 17px; letter-spacing: -0.02em; }
.spec-card span { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.spec-card i { margin-top: auto; padding-top: 8px; font-style: normal; font-weight: 700; color: var(--teal); font-size: 13.5px; }
@media (max-width: 1000px) { .spec-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .spec-grid { grid-template-columns: 1fr; } }

.strip-sec { padding: 0 0 90px; }
.agent-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.as-card { position: relative; padding: 18px 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.as-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ribbon); }
.as-stage { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.as-card b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px; }
.as-card span:last-child { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 1000px) { .agent-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .agent-strip { grid-template-columns: 1fr; } }

.related-sec { padding: 0 0 90px; }
.code-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.code-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 6px; background: #FFFDF8; border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: 0 2px 0 var(--line); transition: transform 0.35s var(--spring); }
.code-card:hover { transform: translateY(-4px) rotate(-1deg); }
.code-card b { font-family: var(--mono); font-size: 22px; color: var(--red); letter-spacing: -0.02em; }
.code-card span { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 900px) { .code-cards { grid-template-columns: 1fr 1fr; } }

/* ---------- Guides: the card catalog ---------- */
.catalog-sec { padding: 10px 0 100px; }
.catalog-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.cat-search input { width: min(420px, 100%); padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: 500 15px var(--sans); color: var(--ink); }
.cat-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.cat-search { flex: 1; min-width: 240px; }
.cat-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-stages .chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.drawer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.index-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 30px 18px 18px; min-height: 140px; border-radius: 4px; background: #FFFDF8; border: 1px solid #E7DDCB; text-decoration: none; color: var(--ink); box-shadow: 0 2px 0 #EADFCB, 0 12px 20px -18px rgba(60, 40, 10, 0.5);
  background-image: linear-gradient(transparent 26px, rgba(180, 35, 24, 0.35) 26px 27px, transparent 27px), repeating-linear-gradient(transparent 0 23px, rgba(15, 118, 110, 0.08) 23px 24px); transition: transform 0.35s var(--spring); }
.index-card:hover { transform: translateY(-5px) rotate(-0.6deg); }
.ic-tab { position: absolute; top: -10px; right: 14px; padding: 3px 10px; border-radius: 6px 6px 0 0; background: #E9D7B0; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #5B4521; }
.index-card b { font-family: var(--mono); font-size: 24px; color: var(--ink); letter-spacing: -0.02em; margin-top: 4px; }
.index-card span:last-child { font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--ink-2); line-height: 1.35; }
.index-card[hidden] { display: none; }
.cat-empty { margin-top: 20px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 18px; }
.cat-empty a { color: var(--teal); font-weight: 700; font-style: normal; font-family: var(--sans); }
@media (max-width: 1000px) { .drawer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .drawer-grid { grid-template-columns: 1fr; } }

/* ---------- A guide ---------- */
.guide-hero h1 { font-size: clamp(32px, 4vw, 52px); }
.code-stamp { justify-self: center; display: inline-block; padding: 18px 26px; border: 6px double var(--red); border-radius: 14px; color: var(--red); font-family: var(--mono); font-weight: 700; font-size: clamp(48px, 7vw, 92px); letter-spacing: -0.02em; text-align: center; transform: rotate(-8deg); mix-blend-mode: multiply; background: rgba(255,255,255,0.4); animation: stampIn 0.6s var(--spring) both 0.2s; }
.code-stamp small { display: block; font-size: 13px; letter-spacing: 0.06em; font-weight: 600; max-width: 320px; margin: 6px auto 0; line-height: 1.3; }
.code-stamp.is-ref { color: var(--teal); border-color: var(--teal); font-size: 52px; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-8deg) scale(1.6); } }
.ihero-side:has(.code-stamp) { display: grid; place-items: center; }
.g-sec { padding: 10px 0 80px; }
.g-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
.g-toc { position: sticky; top: 90px; display: grid; gap: 4px; padding: 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.g-toc b { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.g-toc a { color: var(--ink-2); text-decoration: none; padding: 5px 8px; border-radius: 6px; }
.g-toc a:hover, .g-toc a.is-on { background: var(--paper-2); color: var(--teal); }
.g-toc .g-toc-cta { margin-top: 10px; background: var(--ink); color: #fff; font-weight: 700; text-align: center; }
.g-toc .g-toc-cta:hover { background: var(--ink); color: #fff; }
.g-body { display: grid; gap: 22px; min-width: 0; }
.g-card { padding: 30px 32px; border-radius: 18px; background: #fff; border: 1px solid var(--line); scroll-margin-top: 90px; }
.g-card h2 { display: flex; align-items: center; gap: 12px; font-size: 24px; letter-spacing: -0.03em; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.g-card h2 span { font-family: var(--mono); font-size: 12px; color: var(--teal); background: #F0FBF9; border: 1px solid #CDEDE8; border-radius: 6px; padding: 3px 7px; }
.g-text { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.g-text p, .g-text ul, .g-text ol, .g-text .table-wrap, .g-text h3 { margin-bottom: 14px; }
.g-text ul, .g-text ol { padding-left: 20px; }
.g-text li { margin-bottom: 6px; }
.g-text a { color: var(--teal); font-weight: 600; }
.g-text strong { color: var(--ink); }
.g-text code { font-family: var(--mono); font-size: 0.9em; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.policy-callout { padding: 14px 16px; border-left: 3px solid var(--teal); background: #F0FBF9; border-radius: 0 10px 10px 0; margin: 14px 0; color: var(--ink); }
.table-wrap { overflow-x: auto; }
.editorial-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.editorial-table th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.editorial-table td { padding: 10px; border-bottom: 1px dotted var(--line); vertical-align: top; }
/* Margin notes: taped stickies beside the text on wide screens, inline callouts on small ones */
.gl-term { background: linear-gradient(transparent 62%, rgba(0, 214, 190, 0.3) 62%); color: var(--ink); cursor: help; padding: 0 1px; border-radius: 2px; }
.gl-term.is-active { background: linear-gradient(transparent 35%, rgba(0, 214, 190, 0.45) 35%); }
.gl-note { display: block; margin: -4px 0 16px; padding: 12px 14px; border-left: 3px solid var(--mint); background: #FBFAF6; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.45; color: #3B3A33; }
.gl-note-term { display: block; font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.gl-note a { font-family: var(--sans); font-style: normal; font-size: 12.5px; font-weight: 700; }
@media (min-width: 1200px) {
  .g-text { padding-right: 250px; }
  .gl-note { float: right; clear: right; width: 220px; margin: 0 -250px 14px 0; padding: 22px 14px 14px; border: 0; background: #FFF4B8; color: #3B2F0B; transform: rotate(1.5deg); box-shadow: 0 1px 1px rgba(0,0,0,0.06), 0 12px 18px -10px rgba(80, 60, 0, 0.35); transition: transform 0.35s var(--spring); position: relative; }
  .gl-note::before { content: ""; position: absolute; top: -8px; left: 50%; width: 64px; height: 18px; transform: translateX(-50%) rotate(-3deg); background: rgba(203, 213, 225, 0.65); }
  .gl-note:nth-of-type(even) { transform: rotate(-1.5deg); }
  .gl-note.is-active { transform: rotate(0) translateY(-3px); }
}
@media (max-width: 900px) { .g-layout { grid-template-columns: 1fr; } .g-toc { position: static; } .g-card { padding: 22px; } }

/* ---------- Glossary ---------- */
.term-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.term-card { padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); scroll-margin-top: 100px; }
.term-card:target { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12); }
.term-card h3 { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 8px; }
.term-card p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.tc-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.tc-links a { font-size: 13px; font-weight: 700; color: var(--teal); text-decoration: none; }
.term-card[hidden] { display: none; }
@media (max-width: 1000px) { .term-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .term-grid { grid-template-columns: 1fr; } }

/* ---------- Contractor lookup ---------- */
.lookup-sec { padding: 10px 0 100px; }
.lookup { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; }
.lk-pick { display: grid; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lk-pick select { font: 600 16px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
.lk-card { min-height: 200px; padding: 26px 28px; border-radius: 4px; background: #FFFDF8; border: 1px solid #E7DDCB; box-shadow: 0 20px 34px -24px rgba(60, 40, 10, 0.5); background-image: repeating-linear-gradient(transparent 0 27px, rgba(15, 118, 110, 0.08) 27px 28px); }
.lk-empty { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }
.lk-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.lk-row span { color: var(--ink-2); } .lk-row b { font-family: var(--mono); }
.lk-big { font-family: var(--serif); font-style: italic; font-size: 30px; margin-bottom: 12px; color: var(--ink); }
.lk-card .lk-note { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 800px) { .lookup { grid-template-columns: 1fr; } }

/* ---------- Book a call: the slip ---------- */
.book-hero { padding-bottom: 100px; }
.book-in { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.book-in h1 { font-size: clamp(34px, 4.2vw, 54px); }
.book-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.slip-form { position: relative; display: grid; gap: 12px; padding: 28px 30px 30px; border-radius: 4px; background: #FFFDF8; transform: rotate(-0.8deg); box-shadow: 0 30px 50px -30px rgba(60, 40, 10, 0.55); background-image: repeating-linear-gradient(transparent 0 33px, rgba(15, 118, 110, 0.08) 33px 34px); }
.slip-form h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: #9A3412; border-bottom: 2px solid #C2410C; padding-bottom: 8px; margin-bottom: 4px; }
.slip-form label { display: grid; gap: 4px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); }
.slip-form label span { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.slip-form input, .slip-form select, .slip-form textarea { font: 500 15.5px var(--sans); color: var(--ink); padding: 8px 2px; border: 0; border-bottom: 2px solid var(--ink-2); background: transparent; border-radius: 0; resize: vertical; }
.slip-form input:focus, .slip-form select:focus, .slip-form textarea:focus { outline: none; border-bottom-color: var(--teal); }
.slip-form .stamp-btn { margin-top: 10px; justify-self: start; }
.slip-context { padding: 10px 12px; background: #F0FBF9; border-left: 3px solid var(--teal); font-size: 14px; color: var(--ink); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.slip-ink { right: 30px; bottom: 70px; }
.slip-msg { min-height: 22px; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--teal); }
@media (max-width: 900px) { .book-in { grid-template-columns: 1fr; } }

/* ---------- Security: the vault ---------- */
.vault-sec { padding: 10px 0 90px; }
.vault { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vault-card { position: relative; padding: 24px 20px 22px; border-radius: 16px; background: linear-gradient(180deg, #fff, #FBFAF6); border: 1px solid var(--line); overflow: hidden; }
.vault-card h3 { font-size: 17px; letter-spacing: -0.02em; margin: 14px 0 6px; }
.vault-card p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.lock { position: relative; display: block; width: 26px; height: 22px; margin-top: 10px; border-radius: 5px; background: var(--teal); }
.lock::before { content: ""; position: absolute; left: 5px; top: -12px; width: 16px; height: 16px; border: 3px solid var(--teal); border-bottom: 0; border-radius: 10px 10px 0 0; transition: transform 0.5s var(--spring); transform-origin: 100% 100%; }
.vault-card:hover .lock::before { transform: translateY(-3px); }
.vault-card.is-locked .lock::before { animation: lockShut 0.6s var(--spring) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes lockShut { from { transform: translateY(-8px) rotate(-25deg); } }
@media (max-width: 1000px) { .vault { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .vault { grid-template-columns: 1fr; } }

/* ---------- Closing band (smaller than the homepage's) ---------- */
.close-mini { padding: 80px 0 90px; }
.close-mini .stamp-btn { text-decoration: none; display: inline-flex; margin-top: 4px; }

/* ---------- Legal ---------- */
.legal { padding: 60px 0 100px; }
.legal-in { max-width: 780px; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.legal-in h1 { font-size: 44px; letter-spacing: -0.04em; color: var(--ink); margin-bottom: 16px; line-height: 1.05; }
.legal-in h2 { font-size: 22px; color: var(--ink); margin: 28px 0 10px; letter-spacing: -0.02em; }
.legal-in p, .legal-in ul { margin-bottom: 12px; }
.legal-in ul { padding-left: 20px; }
.legal-in a { color: var(--teal); }
.legal-in .container, .legal-in .section, .legal-in .page-intro { padding: 0; max-width: none; margin: 0; text-align: left; }
.legal-in .tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); padding: 5px 10px; border: 1px solid #CDEDE8; background: #F0FBF9; border-radius: 6px; margin-bottom: 12px; }

/* ---------- Night mode for inner parts ---------- */
.night .ihero { background: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 100% 32px, linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 32px 100%, radial-gradient(ellipse at 30% 0%, #16213A, var(--paper) 70%); }
.night .s-card, .night .trio-card, .night .spec-card, .night .as-card, .night .g-card, .night .g-toc, .night .term-card, .night .vault-card, .night .cat-search input, .night .lk-pick select { background: #131D33; color: var(--ink); border-color: var(--line); }
.night .g-text, .night .term-card p, .night .vault-card p, .night .spec-card span, .night .trio-card p { color: #A8B3C4; }
.night .g-text strong, .night .gl-term { color: #E2E8F0; }
.night .code-card, .night .index-card, .night .lk-card, .night .slip-form { background: #F4F0E9; color: #0F172A; }
.night .gl-note { background: #1B2540; color: #CBD5E1; }
.night .d-num { color: #24314B; }
.night .station .clamp { background: #131D33; box-shadow: 0 0 0 6px var(--paper); }
.night .j-track { stroke: #24314B; }
.night .policy-callout { background: #0F2A33; color: #E2E8F0; }
.night .legal-in, .night .legal-in h1, .night .legal-in h2 { color: #CBD5E1; }
@media (min-width: 961px) {
  .ihero-side .hand { height: 400px; transform: scale(0.78); transform-origin: 50% 70%; margin: -30px 0 -40px; }
}
@media (max-width: 960px) { .ihero-side .hand { margin-top: 10px; } }
.journey-in { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .s-card { padding: 20px; } .s-card h2 { font-size: 28px; } }

/* Keep reading + more codes */
.keep-sec { padding: 0 0 70px; }
.keep-h { font-size: 22px; letter-spacing: -0.03em; margin-bottom: 14px; }
.keep-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keep-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform 0.3s var(--spring), border-color 0.3s; }
.keep-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.keep-card b { font-size: 16px; letter-spacing: -0.02em; } .keep-card span { font-size: 13.5px; color: var(--ink-2); }
.more-all { margin-top: 16px; font-size: 14.5px; } .more-all a { color: var(--teal); font-weight: 700; text-decoration: none; }
a.trio-card { text-decoration: none; color: var(--ink); }
.night .keep-card { background: #131D33; color: var(--ink); border-color: var(--line); }
@media (max-width: 760px) { .keep-row { grid-template-columns: 1fr; } }

/* QA 11 Oct 2026: guides on phones */
.g-layout > *, .g-main, .g-card { min-width: 0; }
.g-text .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-text table { border-collapse: collapse; font-size: 14.5px; }
.g-text table:not(.table-wrap table) { display: block; overflow-x: auto; }
.g-text th, .g-text td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.g-text { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .code-stamp { font-size: 40px; padding: 12px 16px; border-width: 5px; max-width: calc(100vw - 48px); }
  .code-stamp.is-ref { font-size: 34px; }
  .code-stamp small { font-size: 11.5px; max-width: 230px; }
}
