/* dashnetworks.online: the store's look (the DN mark's navy and brand blue on near-black, Plus Jakarta Sans) on a docs
   layout like the one dvzo liked on Apollo Networks' guidelines (6 Nov 2026): the guides down the left, the page in the
   middle, "On this page" on the right. The pages are built by site/build.mjs; this file is written by hand. */
:root {
    --bg: #05080f;
    --panel: #0a101b;
    --panel-2: #0e1624;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f3f6fa;
    --soft: #c3ccd7;
    --muted: #8a96a6;
    --blue: #246cd2;
    --blue-hi: #3480e6;
    --blue-text: #6fa8ff;
    --blue-tint: rgba(36, 108, 210, 0.14);
    --blue-edge: rgba(36, 108, 210, 0.42);
    --ice: #8fd0ff;
    --radius: 16px;
    --wrap: 1360px;
    --top-h: 72px;
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 24px); -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    background: radial-gradient(1100px 520px at 72% -180px, rgba(36, 108, 210, 0.17), transparent 70%), var(--bg);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-variant-ligatures: no-contextual;
}

body.home-page { background: radial-gradient(900px 560px at 50% 60px, rgba(36, 108, 210, 0.22), transparent 70%), var(--bg); }

a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.i { width: 20px; height: 20px; flex: none; }

code { padding: 1px 7px; border-radius: 7px; background: rgba(36, 108, 210, 0.16); color: #a9cbf8; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.86em; white-space: nowrap; }

.skip { position: absolute; top: -80px; left: 16px; z-index: 60; padding: 10px 16px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* The bar along the top */
.top {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 8, 15, 0.82);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.top-in { display: flex; align-items: center; gap: 24px; max-width: var(--wrap); height: calc(var(--top-h) - 1px); margin: 0 auto; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.top .brand { margin-right: auto; }
.brand img { width: 44px; height: auto; }
.brand-rule { width: 1px; height: 24px; background: var(--line-strong); }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--soft); font-size: 15px; font-weight: 600; text-decoration: none; transition: color 0.15s, background 0.15s; }
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav a[aria-current='page'] { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu-btn { display: none; place-items: center; flex: none; width: 42px; height: 42px; margin-left: -8px; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; }
.menu-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn:hover { background: var(--blue-hi); box-shadow: 0 12px 32px rgba(36, 108, 210, 0.35); }
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn.small { height: 42px; padding: 0 16px; font-size: 15px; }
.btn.ghost { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* The guides pages: the guides | the page | on this page */
/* The line beside the guides is drawn on the grid, full height, so the guides themselves stay only as tall as their
   links: a full-height sticky column was nudged up at the foot of a short page. 288px = padding + the guides' column. */
.docs { display: grid; grid-template-columns: 256px minmax(0, 1fr) 208px; column-gap: 40px; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; background: linear-gradient(var(--line), var(--line)) 288px 0 / 1px 100% no-repeat; }

.side {
    position: sticky;
    top: var(--top-h);
    align-self: start;
    max-height: calc(100vh - var(--top-h));
    overflow-y: auto;
    padding: 36px 20px 40px 0;
    scrollbar-width: thin;
}

.side-h { margin: 28px 12px 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.side-h:first-child { margin-top: 0; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--soft); font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none; transition: color 0.15s, background 0.15s; }
.side-link + .side-link { margin-top: 2px; }
.side-link .i { width: 18px; height: 18px; color: var(--muted); transition: color 0.15s; }
.side-link .ext { width: 14px; height: 14px; margin-left: auto; opacity: 0.7; }
.side-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.side-link:hover .i { color: var(--soft); }
.side-link[aria-current='page'] { background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue-edge); color: var(--text); }
.side-link[aria-current='page'] .i { color: var(--blue-text); }

.doc { width: 100%; min-width: 0; max-width: 760px; margin: 0 auto; padding: 44px 0 8px; }
.crumb { color: var(--blue-text); font-size: 14px; font-weight: 700; }
.doc h1 { display: flex; align-items: center; gap: 16px; margin-top: 10px; font-size: clamp(30px, 4vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.doc-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue-edge); color: var(--blue-text); }
.doc-icon .i { width: 26px; height: 26px; }
.lead { margin-top: 18px; color: var(--soft); font-size: 18px; line-height: 1.65; }

.doc section { padding-top: 52px; }
.doc h2 { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.doc section > p { margin-top: 12px; color: var(--soft); }
.doc a:not(.rule-num):not(.btn) { color: var(--blue-text); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s; }
.doc a:not(.rule-num):not(.btn):hover { color: var(--ice); }

/* Search the rules */
.search { display: flex; align-items: center; gap: 12px; height: 52px; margin-top: 28px; padding: 0 12px 0 16px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: text; transition: box-shadow 0.15s; }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 4px rgba(36, 108, 210, 0.22); }
.search > .i { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; }
.search input:focus-visible { outline: 0; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search kbd { padding: 5px 8px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); font: 700 12px/1 'Plus Jakarta Sans', system-ui, sans-serif; white-space: nowrap; }
.search input:not(:placeholder-shown) ~ kbd { display: none; }
.no-results { margin-top: 24px; padding: 18px 20px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

/* At a glance */
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.idea { position: relative; overflow: hidden; padding: 18px 20px 19px 23px; border-radius: 14px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: inset 0 0 0 1px var(--line); }
.idea::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--blue); }
.idea b { display: block; font-size: 16px; font-weight: 700; }
.idea span { display: block; margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* The rules, as Apollo lays theirs out (dvzo, 6 Nov 2026): the rule's name, then the rule, then what it means,
   examples and a note where they help. A line between rules; only rules still shown by the search get one. */
.rule { padding: 30px 0 32px; }
.doc section + .rule { margin-top: 22px; }
.rule:not([hidden]) ~ .rule { border-top: 1px solid var(--line); }
.doc .rule-h { display: flex; align-items: center; gap: 14px; font-size: 23px; font-weight: 800; line-height: 1.3; letter-spacing: -0.02em; }
.rule-num { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-tint); color: var(--blue-text); font-size: 15px; font-weight: 800; letter-spacing: 0; text-decoration: none; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.rule-num:hover { background: var(--blue); color: #fff; }
.rule:target .rule-num { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(36, 108, 210, 0.25); }
.rule-lead { margin-top: 14px; color: var(--text); font-size: 16.5px; line-height: 1.65; }

.points { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; list-style: none; }
.points li { position: relative; padding-left: 24px; color: var(--soft); line-height: 1.6; }
.points li::before { content: ''; position: absolute; top: 0.66em; left: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.points b { color: var(--text); font-weight: 700; }

.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.ex { padding: 14px 16px 15px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.ex-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.ex-h .i { width: 16px; height: 16px; }
.ex.ok .ex-h { color: #4ade80; }
.ex.no .ex-h { color: #f87171; }
.ex ul { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; list-style: none; }
.ex li { position: relative; padding-left: 16px; color: var(--soft); font-size: 15px; line-height: 1.55; }
.ex li::before { content: ''; position: absolute; top: 0.72em; left: 2px; width: 7px; height: 2px; border-radius: 1px; background: var(--muted); }

.callout { display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue-edge); color: var(--text); font-size: 15px; line-height: 1.55; }
.callout .i { width: 18px; height: 18px; margin-top: 2px; color: var(--blue-text); }
.callout.warn { background: rgba(239, 68, 68, 0.1); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.38); }
.callout.warn .i { color: #f87171; }

/* Numbered steps, drawn as a ladder */
.steps { margin-top: 20px; padding-left: 15px; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 2px 0 20px 32px; color: var(--soft); counter-increment: step; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: -15px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--blue-edge); color: var(--blue-text); font-size: 13px; font-weight: 800; }
.steps li::after { content: ''; position: absolute; top: 34px; bottom: 4px; left: -1px; width: 2px; border-radius: 1px; background: var(--line-strong); }
.steps li:last-child::after { display: none; }
.doc .steps + p { margin-top: 22px; }

.list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; list-style: none; }
.list li { position: relative; padding-left: 24px; color: var(--soft); }
.list li::before { content: ''; position: absolute; top: 0.66em; left: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.list b { color: var(--text); font-weight: 700; }

.table-wrap { margin-top: 18px; overflow-x: auto; border-radius: var(--radius); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap th, .table-wrap td { padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-wrap thead th { background: rgba(255, 255, 255, 0.025); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap td { color: var(--soft); }
.table-wrap td:first-child { width: 46%; color: var(--text); font-weight: 600; }

.updated { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* On this page */
.toc { position: sticky; top: var(--top-h); align-self: start; max-height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 48px 0 32px; scrollbar-width: thin; }
.toc-h { margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.4; text-decoration: none; transition: color 0.15s, border-color 0.15s; }
.toc a:hover { color: var(--text); }
.toc a.is-active { border-left-color: var(--blue); color: var(--text); font-weight: 600; }

/* Home */
.home { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.hero { display: flex; flex-direction: column; align-items: center; padding: 112px 0 88px; text-align: center; }
.hero-mark { width: 168px; height: auto; filter: drop-shadow(0 24px 60px rgba(36, 108, 210, 0.5)); }
.hero h1 { margin-top: 36px; font-size: clamp(44px, 7.2vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.hero-sub { max-width: 600px; margin-top: 22px; color: var(--soft); font-size: 19px; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1080px; margin: 0 auto; }
.card { display: flex; flex-direction: column; padding: 26px 26px 28px; border-radius: 18px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow 0.2s, transform 0.2s; }
.card:hover { box-shadow: inset 0 0 0 1px rgba(36, 108, 210, 0.6), 0 30px 60px -30px rgba(36, 108, 210, 0.55); transform: translateY(-2px); }
.card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue-edge); color: var(--blue-text); }
.card-icon .i { width: 22px; height: 22px; }
.card b { margin-top: 20px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.card > span:not(.card-icon) { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* Not found */
.lost { max-width: 640px; margin: 0 auto; padding: 128px 32px 24px; text-align: center; }
.lost-code { color: var(--blue-text); font-size: 15px; font-weight: 800; letter-spacing: 0.24em; }
.lost h1 { margin-top: 14px; font-size: clamp(34px, 5vw, 52px); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; }
.lost p:not(.lost-code) { margin-top: 16px; color: var(--soft); font-size: 17px; }
.lost .hero-cta { margin-top: 30px; }

/* Footer */
.foot { margin-top: 112px; border-top: 1px solid var(--line); background: rgba(10, 16, 27, 0.55); }
.docs-page .foot { margin-top: 72px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 52px 32px 36px; }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot .brand img { width: 40px; }
.foot-about p { max-width: 320px; margin-top: 16px; color: var(--muted); font-size: 14.5px; }
.foot-h { margin-bottom: 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.foot nav a { display: block; padding: 5px 0; color: var(--muted); font-size: 14.5px; text-decoration: none; transition: color 0.15s; }
.foot nav a:hover { color: var(--text); }
.foot-legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

/* No room for "On this page" */
@media (max-width: 1279px) {
    .docs { grid-template-columns: 248px minmax(0, 1fr); background-position: 280px 0; }
    .toc { display: none; }
}

/* The guides go into a drawer behind the menu button */
@media (max-width: 900px) {
    .nav { display: none; }
    .menu-btn { display: grid; }
    .docs { display: block; padding: 0 24px; background: none; }

    .side {
        position: fixed;
        top: var(--top-h);
        bottom: 0;
        left: 0;
        z-index: 35;
        width: min(320px, 86vw);
        height: auto;
        max-height: none;
        align-self: stretch; /* start (for the sticky column) would size the drawer to its links */
        padding: 24px 16px 32px;
        border-right: 1px solid var(--line-strong);
        background: var(--bg);
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
    }

    .menu-open .side { visibility: visible; transform: none; transition: transform 0.25s ease; }
    body.menu-open { overflow: hidden; }
    .scrim { position: fixed; inset: var(--top-h) 0 0; z-index: 30; background: rgba(2, 4, 9, 0.62); }
    .doc { padding-top: 32px; }
    .cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
    .foot-cols { grid-template-columns: repeat(3, 1fr); }
    .foot-about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .top-in { gap: 12px; padding: 0 16px; }
    .brand { gap: 10px; }
    .brand img { width: 38px; }
    .brand-name { font-size: 16px; }
    .top-cta { width: 42px; padding: 0; }
    .top-cta span { display: none; }
    .docs, .home { padding: 0 16px; }
    .doc h1 { gap: 14px; font-size: 30px; }
    .doc-icon { width: 44px; height: 44px; border-radius: 12px; }
    .doc-icon .i { width: 22px; height: 22px; }
    .lead { font-size: 17px; }
    .doc section { padding-top: 44px; }
    .doc h2 { font-size: 23px; }
    .search kbd { display: none; }
    .ideas { grid-template-columns: minmax(0, 1fr); }
    .rule { padding: 26px 0 28px; }
    .doc .rule-h { gap: 12px; font-size: 20px; }
    .rule-num { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
    .rule-lead { font-size: 16px; }
    .examples { grid-template-columns: minmax(0, 1fr); }
    .table-wrap th, .table-wrap td { padding: 12px 14px; }
    .hero { padding: 72px 0 56px; }
    .hero-mark { width: 128px; }
    .hero-sub { font-size: 17px; }
    .hero-cta { flex-direction: column; align-self: stretch; }
    .lost { padding: 88px 16px 16px; }
    .foot { margin-top: 88px; }
    .foot-in { padding: 44px 16px 32px; }
    .foot-cols { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    .top, .side, .scrim, .toc, .search, .no-results, .foot, .skip { display: none !important; }
    body, body.home-page { background: #fff; color: #000; }
    .docs { display: block; padding: 0; }
    .doc { max-width: none; padding: 0; }
    .idea, .table-wrap, .ex, .callout { background: none; box-shadow: none; border: 1px solid #ccc; }
    .lead, .rule-lead, .points li, .ex li, .callout, .doc section > p, .list li, .steps li, .table-wrap td, .idea span { color: #222; }
    .rule { break-inside: avoid; }
}
