/* Polari hub — documentation pages. Extends styles.css (same tokens, same
   faces); adds the sidebar layout, the reference tables, the exposure
   ladder, and the labels the networking pages use. No external assets. */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.docs-nav { position: sticky; top: 1.5rem; align-self: start; font-size: 0.9rem; }
.docs-nav .col-h { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-45); margin: 1.3rem 0 0.4rem; }
.docs-nav .col-h:first-child { margin-top: 0; }
.docs-nav a { display: block; color: var(--ink-70); text-decoration: none; padding: 0.22rem 0 0.22rem 0.7rem; border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--accent); }
.docs-nav a.active { color: var(--accent); border-left-color: var(--accent); }
.docs-nav .toc { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.docs-nav .toc a { font-size: 0.82rem; color: var(--ink-45); }
.article { max-width: 74ch; min-width: 0; }
.article h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0.8rem 0 0; text-wrap: balance; }
.article .lede { max-width: 66ch; }
.article h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); letter-spacing: -0.02em; margin: 2.8rem 0 0.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.article h3 { font-size: 1.12rem; margin: 1.7rem 0 0.35rem; }
.article p, .article li { color: var(--ink-70); }
.article p { margin: 0.7rem 0; }
.article ul { padding-left: 1.2rem; }
.article li { margin: 0.3rem 0; }
.article li::marker { color: var(--accent); }
.article strong { color: var(--ink); }
.article code { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.86em; background: var(--paper-2); padding: 0.1em 0.4em; border-radius: 4px; }
.article pre { background: var(--paper-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 0.9rem 1.1rem; overflow-x: auto; font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.84rem; line-height: 1.5; color: var(--ink); }
.article pre code { background: none; padding: 0; font-size: inherit; }

/* the meta block under a title */
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.2rem; margin: 1.4rem 0 0; font-size: 0.92rem; }
.meta dt { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-45); padding-top: 0.25rem; }
.meta dd { margin: 0; color: var(--ink-70); }

/* reference tables */
.tablewrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
table.ref { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
table.ref th, table.ref td { text-align: left; vertical-align: top; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); }
table.ref tr:last-child td { border-bottom: 0; }
table.ref th { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-45); font-weight: 500; background: var(--paper-2); }
table.ref td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
table.ref td { color: var(--ink-70); }
.num { font-variant-numeric: tabular-nums; }

/* the exposure ladder */
.ladder { display: flex; margin: 1.2rem 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.rung { flex: 1 1 0; min-width: 150px; padding: 0.8rem 0.9rem; border-right: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-70); }
.rung:last-child { border-right: 0; }
.rung .name { display: block; font-family: "Roboto Mono", ui-monospace, monospace; font-weight: 500; font-size: 1rem; color: var(--accent); margin-bottom: 0.25rem; }
.rung.hi { background: color-mix(in srgb, var(--accent) 9%, var(--card)); }

/* labels: what a row is allowed to see */
.tag { display: inline-block; font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; }
.tag.sees { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.tag.blind { color: #2e7d32; border-color: rgba(46,125,50,0.45); }
:root[data-theme="dark"] .tag.blind { color: #81c784; border-color: rgba(129,199,132,0.45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.blind { color: #81c784; border-color: rgba(129,199,132,0.45); } }
.tag.place { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* callouts */
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 0.8rem 1.1rem; margin: 1.1rem 0; background: var(--card); }
.callout.no { border-left-color: var(--amber); }
.callout strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }
.callout p { margin: 0.3rem 0; }

/* the docs index on docs.html */
.docs-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 1.8rem 0 0; }
.docs-index .cat { background: var(--card); padding: 1.3rem 1.5rem; }
.docs-index .cat h3 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.docs-index .cat .blurb { font-size: 0.9rem; color: var(--ink-45); margin: 0 0 0.7rem; }
.docs-index .cat a { display: block; text-decoration: none; color: var(--ink); font-weight: 500; padding: 0.35rem 0; border-top: 1px solid var(--line); }
.docs-index .cat a small { display: block; font-weight: 400; color: var(--ink-70); font-size: 0.86rem; }
.docs-index .cat a:hover { color: var(--accent); }

/* inline SVG figures */
figure.fig { margin: 1.4rem 0; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
figure.fig svg { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; }
figure.fig figcaption { font-size: 0.84rem; color: var(--ink-45); margin-top: 0.6rem; }
figure.fig .box { fill: var(--paper-2); stroke: var(--line-strong); stroke-width: 1; }
figure.fig .box.accent { stroke: var(--accent); }
figure.fig .box.amber { stroke: var(--amber); }
figure.fig .zone { fill: var(--grid); stroke: var(--line); stroke-dasharray: 4 3; }
figure.fig .wire { stroke: var(--line-strong); stroke-width: 1.2; fill: none; }
figure.fig .wire.accent { stroke: var(--accent); }
figure.fig .wire.dash { stroke-dasharray: 5 4; }
figure.fig text { fill: var(--ink); font-family: Roboto, system-ui, sans-serif; font-size: 11px; }
figure.fig text.mono { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 10px; fill: var(--ink-70); }
figure.fig text.label { fill: var(--ink-45); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
  .docs-nav .col-h { width: 100%; margin: 0.6rem 0 0.2rem; }
  .docs-nav .toc { display: none; }
  .docs-index { grid-template-columns: 1fr; }
}
