/* RouterX page. Built like the console: one dark ground, thin rules, white
   main buttons. The console's greys are shaded a little green here, and the
   section labels and the diagram's lines and dots use the console's evergreen.
   State and chart colours are the console's. */

@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('fonts/GeistMono-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --ground: #0C1410;
    --panel: #0C1410;
    --panel-2: #141D18;
    --text: #ECEFED;
    --soft: #A3AEA8;
    --quiet: #A3AEA8;
    --line: #202A25;
    --line-strong: #303D35;
    --field-line: #64736B;
    --btn-bg: #ECEFED;
    --btn-fg: #151916;
    --nav-on: #243029;
    --hover: #1A241F;
    --focus: #8DB4FF;
    --pass: #62D29B;
    --pass-bg: #13301F;
    --deny: #FF8A7A;
    --deny-bg: #3A1714;
    --ever-soft: #12302A;
    --ever-mark: #3FA586;
    --ever-text: #7FD1B4;
    --chart-1: #5FC8A8;
    --chart-2: #8CB2FF;
    --chart-3: #F0BE6A;
    --chart-4: #C9A7F5;
    --code-bg: #09100C;
    --code-fg: #E9E9EC;
    --code-muted: #8A8A96;
    --code-kw: #8FD3BF;
    --code-num: #F3C58B;
    --code-str: #A7E08C;
    --bar: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    background: var(--ground);
    scroll-padding-top: calc(var(--bar) + 20px);
    -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    background: var(--ground);
    color: var(--text);
    font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, .code:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(141, 180, 255, .3); }

.wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }
.skip {
    position: absolute;
    top: -60px;
    left: 24px;
    z-index: 30;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--text);
    color: var(--ground);
}
.skip:focus { top: 12px; }

/* Top bar */

.bar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(12, 20, 16, .94);
}
.bar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: var(--bar);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.brand svg { width: 28px; height: 28px; }
.links { display: flex; gap: 4px; margin-left: 28px; margin-right: auto; }
.links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    color: var(--soft);
    font-size: 14px;
    transition: color 120ms;
}
.links a:hover { color: var(--text); }
.ghost {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 120ms;
}
.ghost:hover { border-color: var(--text); }

/* Hero */

.hero { position: relative; overflow: clip; }
.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 64px;
    align-items: center;
    padding-block: 84px 92px;
}
h1 {
    font-size: clamp(42px, 4.9vw, 62px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-wrap: balance;
}
h1 em { display: block; font-style: normal; }
.lead {
    margin-top: 22px;
    max-width: 30em;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.55;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 30px;
    padding: 0 22px;
    border: 1px solid var(--btn-bg);
    border-radius: 8px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: 16px;
    font-weight: 500;
    transition: opacity 120ms;
}
.button:hover { opacity: .88; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.actions .button { margin-top: 0; }
.button.second { border-color: var(--line-strong); background: transparent; color: var(--text); transition: border-color 120ms; }
.button.second:hover { border-color: var(--text); opacity: 1; }

/* Architecture diagram. The height is fixed on wide screens so the connector
   curves meet the middle of each card exactly. */

.map {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .86fr) 40px minmax(0, 1.12fr) 40px minmax(0, 1.02fr);
    grid-template-rows: 328px;
}
.apps, .outs { position: relative; display: grid; gap: 12px; }
.apps { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.outs { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.node {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    text-align: center;
    transition: border-color 450ms;
}
.app { display: grid; justify-items: center; align-content: center; gap: 7px; padding: 8px 6px; }
.icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--soft);
}
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.node-title { display: block; font-size: 14px; font-weight: 500; line-height: 20px; }
.group { display: grid; align-content: center; gap: 8px; padding: 10px; }
.node-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.node-items.wide { grid-template-columns: minmax(0, 1fr); }
.node-items span {
    padding: 3px 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--soft);
    font-size: 13px;
    line-height: 18px;
    white-space: nowrap;
}
.core {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel-2);
    text-align: center;
}
.core-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 24px;
}
.core-name svg { width: 24px; height: 24px; }
.core-where { margin-bottom: 4px; color: var(--soft); font-size: 14px; line-height: 18px; }
.core-row {
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--panel);
    font-size: 14px;
    line-height: 36px;
    transition: color 450ms, background-color 450ms, border-color 450ms;
}
.link { position: relative; }
.conn { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.conn path {
    fill: none;
    stroke: var(--ever-mark);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}
.port {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px;
    border: 1.5px solid var(--ever-mark);
    border-radius: 50%;
    background: var(--ground);
}
.port.l1 { left: 0; top: 15.42%; } .port.l3 { left: 0; top: 84.58%; }
.link-in .port.l2 { left: 0; top: 50%; } .port.r2 { left: 100%; top: 50%; }
.link-out .port.l2 { left: 0; top: 50%; }
.port.o1 { left: 100%; top: 24.06%; } .port.o2 { left: 100%; top: 75.94%; }
.wire { display: none; }

/* The dots and .lit are set by site.js for the one trip across the diagram. */

.node.lit { border-color: var(--ever-mark); }
.core-row.lit { border-color: var(--ever-mark); background: var(--nav-on); }
.dot {
    position: absolute;
    left: -4px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ever-text);
    opacity: 0;
    pointer-events: none;
}

/* Sections: text beside a tabbed panel */

.feature-section {
    border-top: 1px solid var(--line);
    padding-block: clamp(72px, 9vw, 112px);
    scroll-margin-top: var(--bar);
}
.feature {
    display: grid;
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
    gap: clamp(40px, 6vw, 72px);
    align-items: center;
}
.feature.flip { grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr); }
.flip .copy { order: 2; }
.tag, .label, .mini {
    color: var(--soft);
    font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .08em;
    line-height: 18px;
    text-transform: uppercase;
}
.tag { margin-bottom: 12px; color: var(--ever-text); }
h2 {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 500;
    line-height: 1.14;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.body {
    margin-top: 16px;
    color: var(--soft);
    font-size: 16px;
    line-height: 1.6;
}
.fine {
    margin-top: 20px;
    color: var(--quiet);
    font-size: 14px;
    line-height: 1.6;
}

/* Tabs. site.js builds the pills and the stack; without it every panel shows in turn. */

.tabs { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pills {
    display: flex;
    gap: 4px;
    max-width: 100%;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
    flex: none;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--soft);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: color 120ms, border-color 120ms;
}
.pill:hover { color: var(--text); }
.pill[aria-selected="true"] {
    border-bottom-color: var(--text);
    color: var(--text);
    font-weight: 500;
}
.stack { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.stack > .panel { grid-area: 1 / 1; }
.stack > .panel:not(.active) { visibility: hidden; }

/* Panels */

.panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    overflow: hidden;
}
.panel:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}
h3 { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 22px; }
.panel-head .label { margin-bottom: 2px; }
.panel-head small { flex: none; color: var(--quiet); font-size: 13px; }
.panel-body { padding: 16px 20px 20px; }
.mono { font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.strong { font-weight: 500; }
.sub { display: block; color: var(--quiet); font-size: 13px; }
.ok { color: var(--pass); }
.bad { color: var(--deny); }

.grid { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.grid th {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--soft);
    font: 400 12px/18px 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.grid td.mono, .grid td.opt3 { white-space: nowrap; }
#p-routes th, #p-routes td { padding-inline: 8px; }
#p-routes th:first-child, #p-routes td:first-child { padding-left: 20px; }
#p-routes th:last-child, #p-routes td:last-child { padding-right: 20px; }
#p-routes td.opt3 { white-space: normal; }
#p-routes .sub { white-space: nowrap; }
.grid td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid th:first-child, .grid td:first-child { padding-left: 20px; }
.grid th:last-child, .grid td:last-child { padding-right: 20px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--soft);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.chip.on { background: var(--pass-bg); color: var(--pass); }
.chip.off { background: var(--deny-bg); color: var(--deny); }
.chip.cache { background: var(--ever-soft); color: var(--ever-text); }
.chip.on::before, .chip.off::before, .chip.cache::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.chip.cache::before { background: none; border: 2px solid currentColor; }

.rows div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 46px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    line-height: 20px;
}
.rows div:last-child { border-bottom: 0; }
.rows dt { color: var(--soft); }
.rows dd { display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.mini { margin: 16px 0 8px; }
.mini.first { margin-top: 0; }
.ticks { list-style: none; font-size: 14px; }
.ticks li { position: relative; padding: 3px 0 3px 16px; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .95em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--soft);
}
.ruled { color: var(--soft); font-size: 14px; }

.meter-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; color: var(--soft); font-size: 14px; }
.figure { color: var(--text); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.bar-track { display: block; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-track.tall { height: 4px; margin-top: 10px; }
.fill { display: block; height: 100%; border-radius: 4px; background: var(--pass); transform-origin: left; }
.tall .fill { background: var(--text); }
.p64 { width: 64%; } .p33 { width: 33.4%; } .p24 { width: 24.3%; } .p19 { width: 18.8%; } .p11 { width: 10.7%; } .p9 { width: 8.9%; } .p4 { width: 3.9%; }
.bars { list-style: none; font-size: 14px; }
.bars li {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 68px;
    gap: 12px;
    align-items: center;
    padding: 4px 0;
}
.bars li > :last-child { text-align: right; }

.term {
    display: grid;
    padding: 18px 20px;
    background: var(--code-bg);
    color: var(--soft);
    font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.65;
    gap: 14px;
}
.term p { white-space: pre-wrap; overflow-wrap: anywhere; }
.term .cmd { margin-bottom: 8px; color: var(--text); }
.term.ready [data-step] { grid-area: 1 / 1; }
.term.ready [data-step]:not(.active) { visibility: hidden; }
.term-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
}
.demo-btn, .demo-link {
    min-height: 44px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 120ms, background-color 120ms, color 120ms;
}
.demo-btn {
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}
.demo-btn:hover { border-color: var(--text); }
.demo-btn[aria-pressed="true"] { background: var(--panel-2); border-color: var(--text); }
.demo-btn.danger { border-color: var(--deny); color: var(--deny); }
.demo-btn.danger:hover, .demo-btn.danger[aria-pressed="true"] { background: var(--deny-bg); border-color: var(--deny); }
.demo-link { padding: 0 12px; border: 0; background: transparent; color: var(--soft); }
.demo-link:hover { color: var(--text); }
.demo-note {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--deny-bg);
    color: var(--deny);
    font-size: 14px;
}

.code { padding: 18px 20px; background: var(--code-bg); overflow-x: auto; }
.code .k { color: var(--code-kw); }
.code .s { color: var(--code-num); }
.code pre {
    color: var(--code-fg);
    font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 22px;
}
.changed {
    display: inline-block;
    min-width: 100%;
    margin-inline: -20px;
    padding-inline: 20px;
    box-sizing: content-box;
    background: var(--hover);
    box-shadow: inset 2px 0 0 var(--text);
    color: var(--text);
}
.sample {
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--panel-2);
    font-size: 14px;
    line-height: 1.6;
}
mark { padding: 1px 4px; border-radius: 4px; background: var(--nav-on); color: var(--text); font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.fine.in-panel { margin-top: 14px; }

.closing {
    position: relative;
    overflow: clip;
    border-top: 1px solid var(--line);
    padding-block: clamp(80px, 10vw, 120px);
    text-align: center;
}
.closing .wrap { position: relative; }
.closing h2 { font-size: clamp(32px, 4vw, 50px); letter-spacing: -0.04em; }
.closing .button { margin-top: 28px; }
.closing p { margin-top: 20px; color: var(--quiet); font-size: 14px; }
.foot {
    padding-block: 22px 28px;
    border-top: 1px solid var(--line);
    color: var(--quiet);
    font-size: 14px;
}
.lost { padding-block: 120px; }
.lost h1 { font-size: 42px; }
.lost p { margin-top: 12px; color: var(--soft); }
.quiet-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 12px;
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}
[hidden] { display: none !important; }
@media (max-width: 430px) {
    .opt3 { display: none; }
    .ring { display: none; }
    .tiles { grid-template-columns: minmax(0, 1fr); }
    .tile { flex-direction: row; align-items: center; border-left: 0; border-top: 1px solid var(--line); }
    .tile:first-child { border-top: 0; }
    .json pre { white-space: pre-wrap; overflow-wrap: anywhere; }
    #p-routes .sub { white-space: normal; }
    #p-routes td.mono { white-space: normal; overflow-wrap: anywhere; }
    .legend li { grid-template-columns: 10px minmax(0, 1fr) auto; }
    .legend li > :last-child { display: none; }
}
@media (max-width: 380px) {
    .opt2 { display: none; }
    .code pre { font-size: 12px; }
}

/* Console frame, built by site.js. Each tab fills the frame, so none has a gap. */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.panel { display: flex; flex-direction: column; }
.panel-body { flex: 1; display: flex; flex-direction: column; }
.panel-body .rows { flex: 1; display: flex; flex-direction: column; }
.panel-body .rows div { flex: 1; }
.fill-table { flex: 1; display: flex; }
.fill-table .grid { height: 100%; }
.term, .code { flex: 1; }
.verify-states { padding: 2px 20px; border-top: 1px solid var(--line); }
.verify-states div { min-height: 38px; padding: 4px 0; }
.shell {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    overflow: hidden;
}
.shell-top {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.shell-org { padding-left: 10px; border-left: 1px solid var(--line-strong); color: var(--soft); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.shell-main { display: grid; grid-template-columns: 50px minmax(0, 1fr); }
.rail {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 3px;
    padding: 10px 0;
    border-right: 1px solid var(--line);
    color: var(--soft);
}
.rail span { display: grid; place-items: center; width: 34px; height: 32px; border-radius: 8px; }
.rail span.on { background: var(--nav-on); box-shadow: inset 2px 0 0 var(--text); color: var(--text); }
.rail hr { width: 22px; margin: 5px 0; border: 0; border-top: 1px solid var(--line); }
.rail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stack > .panel { border: 0; border-radius: 0; background: transparent; }

/* Figures, as the console's KPI row. */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 12px 14px; border-left: 1px solid var(--line); }
.tile:first-child { border-left: 0; }
.tile span { color: var(--soft); font-size: 13px; line-height: 18px; }
.tile strong { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 28px; font-variant-numeric: tabular-nums; }

/* Spend by model: the console's ring and legend. */
.ring-row { display: flex; align-items: center; gap: 22px; }
.ring { flex: none; width: 112px; height: 112px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .c1 { stroke: var(--chart-1); } .ring .c2 { stroke: var(--chart-2); }
.ring .c3 { stroke: var(--chart-3); } .ring .c4 { stroke: var(--chart-4); }
.legend { flex: 1; min-width: 0; list-style: none; font-size: 13px; line-height: 20px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; padding: 3px 0; }
.legend li > :nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.legend li > :last-child { color: var(--soft); }
.swatch { width: 10px; height: 10px; border-radius: 2px; }
.swatch.c1 { background: var(--chart-1); } .swatch.c2 { background: var(--chart-2); }
.swatch.c3 { background: var(--chart-3); } .swatch.c4 { background: var(--chart-4); }

/* The signed receipt, as the console's JSON block. */
.json { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--code-bg); color: var(--code-fg); overflow-x: auto; }
.json pre { font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 20px; }
.json .k { color: var(--chart-2); }
.json .s { color: var(--code-str); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.two .bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 3px 0; }
.two .bars .bar-track { grid-column: 1 / 3; grid-row: 2; height: 5px; }
.two .bars li > span:nth-child(2) { text-align: right; }
.pct { color: var(--soft); }
.panel .ruled + .rows { margin-top: 6px; }
#p-spend .panel-body { justify-content: space-between; }
#p-masking .fine { margin-top: auto; padding-top: 14px; }

/* Motion. All of it sits behind this query, and .pre is only ever set by
   site.js on things that start below the screen. */

@media (prefers-reduced-motion: no-preference) {
    @keyframes build-in {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: none; }
    }
    @keyframes wire-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .apps .node, .core, .outs .node { animation: build-in 460ms ease-out both; }
    .link { animation: wire-in 300ms ease-out both; }
    .core { animation-delay: 80ms; }
    .link { animation-delay: 200ms; }
    .outs .node { animation-delay: 240ms; }
    .outs .node + .node { animation-delay: 320ms; }

    .copy, .tabs, .closing .wrap { transition: opacity 420ms ease-out, transform 420ms ease-out; }
    .pre { opacity: 0; transform: translateY(14px); }

    @keyframes row-in {
        from { opacity: 0; transform: translateY(5px); }
        to { opacity: 1; transform: none; }
    }
    @keyframes grow {
        from { transform: scaleX(0); }
        to { transform: none; }
    }
    .seen .panel.active tbody tr, .seen .panel.active .rows > div,
    .seen .panel.active .bars li, .seen .panel.active .ticks li {
        animation: row-in 300ms ease-out both;
        animation-delay: calc(var(--i, 0) * 35ms);
    }
    .seen .panel.active .fill { animation: grow 650ms cubic-bezier(.2, .7, .2, 1) both; }
}
@media print {
    .pre { opacity: 1 !important; transform: none !important; }
    .dot { display: none; }
    .stack > .panel:not(.active) { display: flex; visibility: visible; }
}

/* Narrower screens */

@media (max-width: 1100px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 52px; padding-block: 56px 68px; }
    .map { max-width: 620px; }
    h1 { max-width: 9em; }
    .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .stack > .panel:not(.active) { display: none; }
    .flip .copy { order: 0; }
    .copy { max-width: 38em; }
}
@media (max-width: 720px) {
    :root { --bar: 62px; }
    .wrap { width: min(100% - 40px, 1120px); }
    h1 { font-size: min(10.4vw, 42px); }
    .links { display: none; }
    .ghost { margin-left: auto; }
    .ring { width: 92px; height: 92px; }
    .ring-row { gap: 14px; }
    .shell-main { grid-template-columns: minmax(0, 1fr); }
    .rail { display: none; }
    .two { grid-template-columns: minmax(0, 1fr); }
    .opt { display: none; }
    .grid th, .grid td { padding-inline: 8px; }
    .grid th:first-child, .grid td:first-child { padding-left: 16px; }
    .grid th:last-child, .grid td:last-child { padding-right: 16px; }
    .panel-head, .panel-body { padding-inline: 16px; }
    .panel-head { flex-wrap: wrap; gap: 4px 16px; }
    .panel-head small { flex: 0 1 auto; }
    .rows dd { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .demo-btn { white-space: normal; }
    .term { padding-inline: 16px; }
    .term-actions { padding-inline: 16px; }
    .verify-states { padding-inline: 16px; }
    .rows div { gap: 12px; }

    /* Diagram: top to bottom, providers and auditor side by side. */
    .map { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; margin-top: 0; }
    .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto; gap: 8px; }
    .outs { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 10px; }
    .conn, .port { display: none; }
    .link { display: flex; justify-content: center; height: 28px; }
    .link-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; gap: 10px; }
    .wire {
        position: relative;
        display: block;
        width: 1.5px;
        height: 28px;
        background: var(--ever-mark);
    }
    .wire::after {
        content: "";
        position: absolute;
        left: -3.25px;
        bottom: 0;
        border-top: 6px solid var(--ever-mark);
        border-inline: 4px solid transparent;
    }
    .core-row { line-height: 34px; }
}
@media (forced-colors: active) {
    .button { border: 1px solid ButtonText; }
    .dot { background: Highlight; }
}
