/* The text pages (Security, DESIGN.md): the home page's container, paragraphs at a reading
   measure, tables and At a glance full width. Sections are reached by a track on the viewport's
   left edge where the margin holds it (pages.js sets body.navedge), else a bar of section pills
   under the header (body.navbar). The current section is the ink pill; never a bar on one side. */
:root { --measure: 680px; }
html:has(body.navbar) { scroll-padding-top: 136px; }

/* the frame: the homepage's container */
.doc-head-in { position: relative; }
.doc-head { padding-top: 72px; padding-bottom: 8px; }
.doc-head h1 { font-size: clamp(2.6rem, 1.4rem + 3.4vw, 4.25rem); margin-bottom: 18px; }
.doc-head .lede { margin-bottom: 18px; }
.updated { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.doc-grid { max-width: none; padding: 0; }
.doc-body { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* sections: a number, a heading, the answer in one bold sentence, then the detail */
.sec { padding: 64px 0; border-top: 1px solid var(--outline); }
.sec:first-child { border-top: 0; padding-top: 40px; }
.sec:last-child { padding-bottom: 0; }
.eb { display: block; margin: 0 0 10px; font: 600 14px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-h h2 { font-size: clamp(1.9rem, 1.35rem + 1.5vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; }
.doc .sum { font-size: clamp(19px, 1rem + .35vw, 21px); line-height: 1.45; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0 0 28px; max-width: var(--measure); text-wrap: pretty; }
.sec-b > :last-child { margin-bottom: 0; }
.doc p, .doc li { text-wrap: pretty; }
.doc-body p, .doc-head-in > p:not(.lede) { margin: 0 0 14px; max-width: var(--measure); }
.doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 10px; max-width: var(--measure); }
.doc li::marker { color: var(--control); }
.doc li > ul, .doc li > ol { margin: 6px 0 0; }
.doc li > p { margin: 8px 0 0; }
.doc h3 { font-size: 21px; margin: 36px 0 10px; }
.doc code { font: .9em var(--mono); padding: 1px 5px; border-radius: 6px; background: var(--raised); border: 1px solid var(--outline); }
.doc-body a, .doc-head a { text-decoration: underline; }
.doc blockquote { margin: 0 0 16px; padding: 14px 18px; border-radius: 14px; background: var(--raised); border: 1px solid var(--outline); max-width: var(--measure); }
.doc blockquote p { margin: 0; }
.hlink { margin-left: .3em; color: var(--control); text-decoration: none !important; font-weight: 600; opacity: 0; }
.sec-h h2:hover .hlink, .hlink:focus-visible { opacity: 1; }
.hlink:hover { color: var(--ink); }
@media (hover: none) { .hlink { opacity: .6; } }

/* tables, name-value rows and At a glance: the site's spec sheet, full width */
.table { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--outline); border-radius: 14px; background: var(--raised); }
.table:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 16px; }
.doc th, .doc td { padding: 13px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--outline); }
.doc th { font-size: 14px; font-weight: 600; color: var(--muted); }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { font-weight: 600; white-space: nowrap; }
.pairs { margin: 0 0 16px; border-top: 1px solid var(--ink); }
.pairs > div { display: grid; grid-template-columns: 220px minmax(0, 72ch); gap: 6px 32px; padding: 18px 0; border-bottom: 1px solid var(--outline); }
.pairs dt { font-weight: 700; } .pairs dd { margin: 0; }
.glance { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--ink); }
.glance > div { padding: 20px 0; border-bottom: 1px solid var(--outline); }
.glance dt { font-size: clamp(19px, 1rem + .4vw, 22px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 8px; }
.glance dd { margin: 0; color: var(--muted); font-size: 16px; }
.sec.report { margin-top: 64px; padding: 32px; background: var(--raised); border: 1px solid var(--outline); border-radius: 18px; }
.sec.report .small { margin: 0; font-size: 14px; color: var(--muted); }

/* the section navigation */
.toc-t { margin: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { text-decoration: none; color: var(--muted); }

/* the track on the left edge: stations only, the current one's name beside it where the
   margin has room, any name on hover or focus */
.navedge .toc-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.navedge .toc { position: fixed; z-index: 25; left: 16px; top: 96px; bottom: 112px; width: 24px; }
/* the line, its fill and the stations are the shared track (track.css): a station is 24px high,
   its dot centred in it, the line through the dots' centres */
.navedge .track { height: 100%; --line-x: 11px; --dot-x: 3px; --dot-y: 3px; }
.navedge .toc ol { height: 100%; max-height: 720px; display: flex; flex-direction: column; justify-content: space-between; }
.navedge .toc a { position: relative; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.navedge .toc .lb { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); width: max-content; max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 5px 11px; border-radius: 999px; font-size: 13.5px; line-height: 1.3; font-weight: 600; background: var(--raised); color: var(--ink); box-shadow: 0 0 0 1px var(--outline), var(--shadow); opacity: 0; pointer-events: none; }
.navedge .toc a:hover .lb, .navedge .toc a:focus-visible .lb { opacity: 1; }
.navedge .toc a[aria-current] .lb { background: var(--ink); color: var(--on-ink); box-shadow: none; }
@media (min-width: 1520px) {  /* the current name, one line, in the margin: from the label's left (46px) to 16px short of the text */
  .navedge .toc a[aria-current] .lb { opacity: 1; max-width: calc((100vw - 1200px) / 2 + 24px - 46px - 16px); }
}
@media (prefers-reduced-motion: no-preference) { .navedge .toc .lb { transition: opacity .15s; } }

/* the bar under the header: pills that scroll sideways */
.navbar .toc-t, .navbar .track-station::before, .navbar .track::before, .navbar .track::after { display: none; }
.navbar .toc { position: sticky; top: 64px; z-index: 20; margin: 24px 0 0; background: var(--glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-block: 1px solid var(--outline); overflow-x: auto; scrollbar-width: none; }
.navbar .toc::-webkit-scrollbar { display: none; }
.navbar .toc ol { display: flex; gap: 4px; width: max-content; padding: 8px 24px; margin: 0 auto; }
.navbar .toc .lb { display: block; white-space: nowrap; padding: 7px 13px; border-radius: 999px; font-size: 14.5px; }
.navbar .toc a:hover .lb { background: var(--outline); color: var(--ink); }
.navbar .toc a[aria-current] .lb { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.navbar .toc a { display: block; border-radius: 999px; }

@media (max-width: 1100px) { .glance { grid-template-columns: 1fr 1fr; } }
@media (max-width: 959px) {
  .doc-head { padding-top: 48px; }
  .sec { padding: 48px 0; }
  .pairs > div { grid-template-columns: 1fr; gap: 4px; }
  .sec.report { padding: 24px 20px; margin-top: 48px; }
}
@media (max-width: 640px) {
  .glance { grid-template-columns: 1fr; }
  .doc th, .doc td { padding: 10px 12px; }
  .doc td:first-child { white-space: normal; }
}

/* under 1200px, where the track has no margin, its stations ride the header's bottom edge
   (track.css's .edge-track, placed by site.css) above the bar of names */
@media (min-width: 1200px) { .edge-track { display: none; } }
@media (max-width: 1199px) { header.site:has(.edge-track) { border-bottom-color: transparent; } .navbar .toc { border-top-color: transparent; } }
