/* dcrypt — carbon paper and cobalt.
   The same family as the other normake.com sites: a pale, slightly green paper,
   near-black ink, one accent. Here the accent is cobalt, the blue of a
   sealed envelope's stamp; it marks every action and the sealed text itself.
   The loud thing on the page is the sealed string, colour-coded by part. */

@font-face {
    font-family: "Schibsted Grotesk";
    src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
}

:root {
    --paper: #f2f3ef;
    --paper-2: #e6e9e4;
    --sheet: #fbfbf9;
    --ink: #17212b;
    --ink-2: #4f5b66;
    --ink-3: #33404b;
    --rule: #d3d8dc;
    --field: #b9c1c8;
    --cobalt: #2b45c9;
    --cobalt-deep: #1d2f94;
    --cobalt-wash: #e3e8fa;
    --cobalt-mist: #eef1fc;
    --ok: #1d6f47;
    --ok-wash: #dff1e6;
    --warn-bg: #fff3d1;
    --warn-ink: #4a2f00;
    --warn-mark: #6b4500;
    --bad: #8c1d15;
    --bad-wash: #fbe9e7;
    --focus: 0 0 0 3px rgba(43, 69, 201, .4);
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: "Schibsted Grotesk", system-ui, sans-serif;
    font-size: 17px; line-height: 1.55;
    background: var(--paper); color: var(--ink);
    min-height: 100vh;
}
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; min-height: 100vh; display: flex; flex-direction: column; }
.container.wide { max-width: 1160px; }
main { flex-grow: 1; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-deep); }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: none; box-shadow: var(--focus); }
svg.icon { display: block; flex-shrink: 0; }

/* header ----------------------------------------------------------------- */
header.site {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 22px 0; margin-bottom: 26px;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem;
}
header.site nav { display: flex; gap: 26px; font-weight: 700; }
header.site nav a { color: var(--ink-2); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--cobalt); }
header.site .menu-toggle { display: none; }
.menu-toggle .menu-close-icon, .menu-open .menu-toggle .menu-open-icon { display: none; }
.menu-open .menu-toggle .menu-close-icon { display: block; }

/* hero ------------------------------------------------------------------- */
.hero { max-width: 780px; margin-bottom: 24px; }
.display {
    font-weight: 900; font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1; letter-spacing: -.035em; margin-bottom: 14px;
}
.lede { color: var(--ink-2); font-size: 1.12rem; max-width: 60ch; }
.pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 14px; margin-bottom: 24px; border-radius: 999px;
    background: var(--cobalt-wash); color: var(--cobalt-deep); font-size: .85rem; font-weight: 700;
}

/* building blocks -------------------------------------------------------- */
.card { background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 10px; }
.pad { padding: 26px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 28px; }
.note { font-size: .85rem; line-height: 1.5; color: var(--ink-2); }

label.lbl, .lbl { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 6px; }
.input, .textarea, .select {
    width: 100%; min-height: 48px; padding: 0 14px;
    border: 1.5px solid var(--field); border-radius: 6px; background: #fff;
    font: inherit; font-size: 1rem; color: var(--ink);
}
.textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; }
.textarea.mono, .input.mono { font-family: var(--mono); font-size: .85rem; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--cobalt); outline: none; box-shadow: var(--focus); }
.input.changed, .textarea.changed { border-color: #c9951f; background: #fffaf0; }
.with-tools { display: flex; gap: 6px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px; border-radius: 6px;
    border: 1.5px solid var(--ink); background: var(--cobalt); color: #fff;
    font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--cobalt-deep); color: #fff; }
.btn:disabled { background: #8d9bd9; border-color: #6b7580; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); min-height: 44px; padding: 0 18px; font-size: .94rem; }
.btn.secondary:hover { background: var(--paper-2); }
.btn.secondary:disabled { color: #8a939b; border-color: var(--field); background: #fff; }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--field); min-height: 38px; padding: 0 12px; font-size: .88rem; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .88rem; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 6px;
    border: 1.5px solid var(--field); background: #fff; color: var(--ink-3); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.btn[aria-busy="true"] { cursor: progress; }

.status { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; font-weight: 700; }
.status .icon { margin-top: 3px; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.status.warn { color: var(--warn-mark); }
.alert {
    display: flex; gap: 12px; padding: 14px 16px; border-radius: 8px;
    font-size: .9rem; line-height: 1.5;
}
.alert.bad { background: var(--bad-wash); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert.info { background: var(--cobalt-mist); color: var(--ink); }
.alert .icon { margin-top: 2px; }
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
    border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap;
}
.badge.ok { background: var(--ok-wash); color: var(--ok); }
.badge.edited { background: var(--warn-bg); color: var(--warn-mark); }
.badge.new { background: var(--ok-wash); color: var(--ok); }

.meter { display: flex; align-items: center; gap: 12px; min-height: 22px; }
.meter-bars { display: flex; gap: 4px; }
.meter-bars span { width: 40px; height: 6px; border-radius: 3px; background: var(--rule); }
.meter[data-score="1"] .meter-bars span:nth-child(-n+1) { background: var(--bad); }
.meter[data-score="2"] .meter-bars span:nth-child(-n+2) { background: #b86a00; }
.meter[data-score="3"] .meter-bars span:nth-child(-n+3) { background: var(--ok); }
.meter[data-score="4"] .meter-bars span:nth-child(-n+4) { background: var(--ok); }
.meter-label { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.meter[data-score="1"] .meter-label { color: var(--bad); }
.meter[data-score="3"] .meter-label, .meter[data-score="4"] .meter-label { color: var(--ok); }

/* tabs ------------------------------------------------------------------- */
.tabs { display: flex; border-bottom: 1.5px solid var(--ink); }
.tab {
    flex: 1 1 0; padding: 16px; border: 0; background: var(--paper-2); color: var(--ink-2);
    font: inherit; font-weight: 700; cursor: pointer;
}
.tab + .tab { border-left: 1.5px solid var(--ink); }
.tab[aria-selected="true"] { background: var(--sheet); color: var(--ink); font-weight: 800; box-shadow: inset 0 -4px 0 var(--cobalt); }
.card > .tabs { border-radius: 9px 9px 0 0; overflow: hidden; }

/* the sealed string ------------------------------------------------------ */
.sealed {
    padding: 16px; border-radius: 8px; background: var(--ink);
    font-family: var(--mono); font-size: .82rem; line-height: 1.65;
    word-break: break-all; color: #d8def9; min-height: 120px;
}
.sealed.empty { display: flex; align-items: center; justify-content: center; text-align: center; color: #aab3bd; font-family: inherit; font-size: .9rem; word-break: normal; }
.seg-version { color: #fff; font-weight: 600; }
.seg-dot { color: #7d8894; }
.seg-settings { color: #f2c46b; }
.seg-salt { color: #7fd6a4; }
.seg-nonce { color: #f0a3d6; }
.seg-ct { color: #a9b8ff; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .78rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend .k-version { background: var(--ink); }
.legend .k-settings { background: #c9951f; }
.legend .k-salt { background: #2f9a62; }
.legend .k-nonce { background: #b8589a; }
.legend .k-ct { background: var(--cobalt); }
.output {
    padding: 16px 18px; min-height: 150px; border: 1.5px solid var(--field); border-radius: 8px;
    background: #fff; font-size: 1.05rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.output.empty { color: var(--ink-2); font-size: .9rem; display: flex; align-items: center; justify-content: center; text-align: center; }

/* how it works ----------------------------------------------------------- */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.how h2 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.how p { font-size: .9rem; line-height: 1.5; color: var(--ink-2); }

/* steps ------------------------------------------------------------------ */
.steps { display: flex; align-items: center; gap: 14px; list-style: none; margin-bottom: 20px; font-weight: 700; font-size: .9rem; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.steps li.line { width: 60px; height: 2px; background: var(--field); }
.steps .num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--field);
}
.steps li[data-state="current"] { color: var(--ink); }
.steps li[data-state="current"] .num { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.steps li[data-state="done"] { color: var(--ok); }
.steps li[data-state="done"] .num { background: var(--ok-wash); border-color: var(--ok-wash); }
.steps li.line[data-state="done"] { background: var(--ok); }
.step-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.step-bar .steps { margin-bottom: 0; }
.file-tag { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* unlock ----------------------------------------------------------------- */
.unlock-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.unlock-grid > .card { grid-column: span 2; }
.drop {
    display: flex; align-items: center; gap: 14px; padding: 22px 18px;
    border: 1.5px dashed var(--cobalt); border-radius: 8px; background: var(--cobalt-mist); cursor: pointer;
}
.drop:hover, .drop.over { background: var(--cobalt-wash); }
.drop strong { display: block; }
.drop .sub { font-size: .85rem; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: .94rem; }
.facts dt { color: var(--ink-2); }
.aside-box { padding: 20px; border-radius: 10px; background: var(--paper-2); font-size: .94rem; line-height: 1.5; }
.aside-box h2 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.aside-box p { color: var(--ink-3); }
.aside-box p + p { margin-top: 10px; }
.aside-stack { display: flex; flex-direction: column; gap: 16px; }

/* editor ----------------------------------------------------------------- */
.editor { display: flex; flex-direction: column; overflow: hidden; }
.editor-body { display: grid; grid-template-columns: 210px 330px minmax(0, 1fr); min-height: 640px; }
.sidebar { padding: 18px 14px; border-right: 1.5px solid var(--rule); display: flex; flex-direction: column; gap: 2px; font-size: .94rem; }
.sidebar h3 { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 14px 10px 6px; }
.sidebar h3:first-child { padding-top: 0; }
.filter {
    display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px;
    background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.filter:hover { background: var(--paper-2); }
.filter[aria-pressed="true"] { background: var(--cobalt-wash); color: var(--cobalt-deep); font-weight: 700; }
.filter .count { color: var(--ink-2); }
.filter[aria-pressed="true"] .count { color: inherit; }
.list-pane { border-right: 1.5px solid var(--rule); display: flex; flex-direction: column; min-width: 0; }
.list-tools { display: flex; gap: 8px; padding: 14px; border-bottom: 1.5px solid var(--rule); }
.list-tools .input { min-height: 44px; }
.list-tools .icon-btn { width: 44px; height: 44px; border-color: var(--ink); color: var(--ink); }
.items { list-style: none; overflow-y: auto; max-height: 720px; }
.items li + li { border-top: 1px solid #e3e6e8; }
.item-row { display: flex; align-items: center; gap: 8px; padding-right: 14px; }
.item-main {
    display: flex; flex-direction: column; flex-grow: 1; min-width: 0; padding: 12px 16px;
    border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.item-row:hover { background: var(--paper); }
.item-row:has(.item-main[aria-current="true"]) { background: var(--cobalt-wash); box-shadow: inset 4px 0 0 var(--cobalt); }
.item-main .name { font-weight: 700; overflow-wrap: anywhere; }
.item-main .sub { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.item-row.deleted { background: #f6f0ef; }
.item-row.deleted .name, .item-row.deleted .sub { text-decoration: line-through; color: #6b737b; }
.items .empty { padding: 20px 16px; color: var(--ink-2); font-size: .9rem; }
.detail { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.segmented { display: flex; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; font-size: .88rem; font-weight: 700; }
.segmented button { min-height: 36px; padding: 0 16px; border: 0; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.segmented button + button { border-left: 1.5px solid var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.detail .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail .full { grid-column: 1 / -1; }
.detail .input, .detail .select { min-height: 44px; font-size: .94rem; }
.detail .icon-btn { width: 44px; height: 44px; }
.uri-row + .uri-row { margin-top: 6px; }
.add-link { display: inline-block; margin-top: 8px; font-size: .88rem; font-weight: 700; background: none; border: 0; color: var(--cobalt); cursor: pointer; font-family: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: .94rem; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cobalt); }
.json-edit { min-height: 440px; font-size: .8rem; }
.placeholder { color: var(--ink-2); padding: 40px 10px; text-align: center; }
.editor-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 20px; border-top: 1.5px solid var(--ink); background: #eef0ec;
}
.editor-foot .summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .94rem; }
.problems { padding: 0 20px 14px; background: #eef0ec; }
.problems ul { margin: 0; padding-left: 20px; color: var(--bad); font-size: .88rem; }

/* seal ------------------------------------------------------------------- */
.seal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.seal-grid > .card { grid-column: span 3; }
.seal-grid > aside { grid-column: span 2; display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 0; display: flex; flex-direction: column; gap: 10px; }
legend { font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.choice {
    display: flex; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--field); border-radius: 8px;
    background: #fff; cursor: pointer;
}
.choice:has(input:checked) { border: 2px solid var(--cobalt); background: var(--cobalt-mist); }
.choice input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--cobalt); flex-shrink: 0; }
.choice strong { display: block; }
.choice .mono { display: block; font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.choice .note { display: block; margin-top: 4px; }
.summary-box { padding: 20px; }
.summary-box h2 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.summary-box dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: .94rem; }
.summary-box dt { color: var(--ink-2); }
.summary-box dd { font-weight: 700; }
.checklist { padding: 20px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); }
.checklist h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.checklist ol { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: .94rem; line-height: 1.45; }
details.unprotected { border-top: 1px solid var(--rule); padding-top: 16px; font-size: .9rem; }
details.unprotected summary { cursor: pointer; font-weight: 700; color: var(--ink-3); }
details.unprotected[open] summary { margin-bottom: 14px; }

.restricted h2 { font-size: 1.8rem; font-weight: 900; letter-spacing: -.02em; margin-bottom: 8px; line-height: 1.15; }
.restricted ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* footer ----------------------------------------------------------------- */
footer.site {
    margin-top: 48px; padding: 28px 0 32px; border-top: 1px solid var(--rule);
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    font-size: .85rem; color: var(--ink-2);
}
.kofi-button {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
    border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none;
}
.kofi-button:hover { background: #000; color: #fff; }

/* narrow screens --------------------------------------------------------- */
@media (max-width: 900px) {
    .editor-body { grid-template-columns: minmax(0, 1fr); }
    .sidebar { border-right: 0; border-bottom: 1.5px solid var(--rule); flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .sidebar h3 { width: 100%; padding: 6px 4px 2px; }
    .sidebar .filter { width: auto; }
    .list-pane { border-right: 0; border-bottom: 1.5px solid var(--rule); }
    .items { max-height: 320px; }
    .unlock-grid, .seal-grid { grid-template-columns: minmax(0, 1fr); }
    .unlock-grid > .card, .seal-grid > .card, .seal-grid > aside { grid-column: auto; }
}
@media (max-width: 760px) {
    .container { padding: 0 16px; }
    header.site { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; }

    /* With nav.js: the logo and a burger on one line; the links fold into
       a list under them that the burger opens. */
    header.site.has-menu { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 0; }
    header.site.has-menu .menu-toggle { display: inline-flex; width: 44px; height: 44px; }
    header.site.has-menu nav { display: none; }
    header.site.has-menu.menu-open nav {
        display: flex; flex-direction: column; gap: 0; width: 100%;
        background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden;
    }
    header.site.has-menu nav a { padding: 14px 18px; border-top: 1px solid var(--rule); }
    header.site.has-menu nav a:first-child { border-top: 0; }
    header.site.has-menu nav a[aria-current="page"] { background: var(--cobalt-mist); }
    .split { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 28px; }
    .cols-2, .detail .grid { grid-template-columns: minmax(0, 1fr); }
    .how { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pad { padding: 18px; }
    .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .facts dd { margin-bottom: 8px; }
    .steps li.line { width: 24px; }
    .detail { padding: 18px 16px; }
}
@media (prefers-reduced-motion: no-preference) {
    .btn, .tab, .filter, .item-row, .item-main, .toc a { transition: background-color .12s, color .12s; }
}
.noscript { position: fixed; left: 16px; right: 16px; bottom: 16px; }
.row.spread { justify-content: space-between; }
.row.spread .lbl { margin: 0; }
.display-2 { font-weight: 900; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.05; letter-spacing: -.03em; margin: 18px 0 22px; }
.drop:focus-within { box-shadow: var(--focus); }
.drop-icon { color: var(--cobalt); }
.stack.tight { gap: 10px; }
.status:empty { display: none; }
.file-tag .btn { font-family: "Schibsted Grotesk", system-ui, sans-serif; }
.input + .note, .with-tools + .note, .textarea + .status, .input + .status { margin-top: 6px; }

/* how it works ----------------------------------------------------------- */
.more { margin-top: 18px; font-weight: 700; }
.more a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.doc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: .9rem; }
.toc-title { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 4px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.toc a:hover, .toc a[aria-current] { color: var(--cobalt); border-left-color: var(--cobalt); }
.prose { max-width: 760px; }
.prose section { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--rule); scroll-margin-top: 20px; }
.prose section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.prose h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 900; letter-spacing: -.025em; line-height: 1.1; margin-bottom: 18px; }
.prose h3 { font-size: 1.1rem; font-weight: 800; margin: 30px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.fact { padding: 20px; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 10px; }
.fact .icon { color: var(--cobalt); margin-bottom: 10px; }
.fact h3 { margin: 0 0 6px; font-size: 1rem; }
.fact p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink-3); }
.flow { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 6px 0 18px; }
.flow li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; line-height: 1.5; }
.flow-num { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--cobalt); color: #fff; font-weight: 800; font-size: .9rem; }
.anatomy-strip { min-height: 0; margin-bottom: 14px; }
table.anatomy, table.kinds { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; margin-bottom: 8px; }
.anatomy th, .anatomy td, .kinds th, .kinds td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.anatomy thead th, .kinds thead th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1.5px solid var(--ink); }
.anatomy tbody th { white-space: nowrap; font-weight: 700; }
.anatomy tbody th i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.anatomy .k-version { background: var(--ink); }
.anatomy .k-settings { background: #c9951f; }
.anatomy .k-salt { background: #2f9a62; }
.anatomy .k-nonce { background: #b8589a; }
.anatomy .k-ct { background: var(--cobalt); }
.kinds tbody th { font-weight: 500; width: 34%; }
.kinds .yes { color: var(--ok); font-weight: 800; }
.kinds .no { color: var(--bad); font-weight: 800; }
.checklist-steps { padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.faq dt { font-weight: 800; margin-top: 18px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { color: var(--ink-3); margin-top: 4px; }
.doc-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 900px) {
    .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .toc { position: static; }
    .toc ol { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 6px; }
    .toc a { border: 1.5px solid var(--rule); border-radius: 999px; margin: 0; padding: 4px 12px; }
    .toc a:hover, .toc a[aria-current] { border-color: var(--cobalt); }
    .toc a[aria-current] { background: var(--cobalt-wash); }
}
@media (max-width: 760px) {
    .facts-grid { grid-template-columns: minmax(0, 1fr); }
    .anatomy tbody th { white-space: normal; }
    .kinds thead { display: none; }
    .kinds tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--rule); padding: 8px 0; }
    .kinds th, .kinds td { border: 0; padding: 4px 0; width: auto; }
    .kinds td:last-child { grid-column: 1 / -1; }
}
