/* Tokens sampled from the ATEP logo: background #0c0d0f, silver #e7e5ea, blue #17b5f1 (stripe #04adf9). */
:root {
  color-scheme: dark;
  --bg: #0c0d0f; --surface: #14161a; --raised: #1b1e23; --text: #e7e5ea; --muted: #a9abb3; --border: #2b2e35;
  --accent: #17b5f1; --accent-strong: #5fcaf6; --accent-text: #04101a; --glow: rgba(23, 181, 241, 0.35);
  --code-bg: #101216; --code-text: #bfe6f9; --warn-bg: #111a22; --warn-border: #17b5f1;
  --band: #0d0e11; --band-border: #23262c;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7; --surface: #ffffff; --raised: #eceef2; --text: #14161a; --muted: #4b505a; --border: #c5cad3;
  --accent: #00619a; --accent-strong: #004f7e; --accent-text: #ffffff; --glow: rgba(0, 97, 154, 0.25);
  --code-bg: #eceef2; --code-text: #0b4a73; --warn-bg: #eaf4fb; --warn-border: #00619a;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 0.2rem; }
.skip { position: absolute; left: 0.5rem; top: -4rem; background: var(--accent); color: var(--accent-text); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { top: 0.5rem; }

/* Header band stays dark in both themes so the logo image never sits on white. */
header.site { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; padding: 0.6rem clamp(1rem, 2vw, 3rem); background: var(--band); border-bottom: 1px solid var(--band-border); box-shadow: 0 1px 0 rgba(23, 181, 241, 0.18), 0 8px 28px -18px var(--glow); color: #e7e5ea; }
header.site .brand { display: inline-flex; align-items: center; line-height: 0; }
header.site .brand img { height: 3.4rem; width: auto; display: block; margin: -0.55rem 0; -webkit-mask-image: radial-gradient(ellipse 54% 58% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 54% 58% at 50% 50%, #000 60%, transparent 100%); }
header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; flex: 1; }
header.site nav a { color: #a9abb3; text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
header.site nav a:hover { color: #e7e5ea; border-bottom-color: #17b5f1; }
header.site nav a[aria-current="page"], header.site nav a[aria-current="true"] { font-weight: 700; color: #e7e5ea; border-bottom-color: #17b5f1; }
header.site a:focus-visible, header.site button:focus-visible { outline-color: #17b5f1; }
#theme { background: #14161a; color: #e7e5ea; border: 1px solid #343840; border-radius: 0.4rem; padding: 0.35rem 0.8rem; font: inherit; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
#theme:hover { border-color: #17b5f1; box-shadow: 0 0 14px -2px rgba(23, 181, 241, 0.45); }

main { padding: 2rem clamp(1rem, 2vw, 3rem) 4rem; width: 100%; }
h1 { font-size: clamp(1.8rem, 2.6vw, 2.9rem); line-height: 1.15; letter-spacing: -0.01em; margin: 0.25rem 0 1.25rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 0 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 0.4rem; }
.lead { font-size: 1.15rem; max-width: none; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; margin: 1.5rem 0; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: 0.6rem; padding: 1.1rem 1.4rem; overflow-wrap: anywhere; transition: box-shadow 0.2s, border-color 0.2s; }
.card:hover { box-shadow: 0 0 0 1px var(--accent), 0 6px 28px -10px var(--glow); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.note { background: var(--warn-bg); border: 1px solid var(--border); border-left: 4px solid var(--warn-border); border-radius: 0.6rem; padding: 0.8rem 1.25rem; margin: 1.25rem 0; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92em; background: var(--code-bg); border-radius: 0.3rem; }
code { padding: 0.1em 0.35em; overflow-wrap: anywhere; color: var(--code-text); }
pre { padding: 0.85rem 1.1rem; overflow-x: auto; white-space: pre; border: 1px solid var(--border); border-left: 3px solid var(--accent); }
pre code { padding: 0; background: none; }
.tablewrap { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.85rem; border: 1px solid var(--border); }
th { background: var(--raised); }
thead th { border-bottom: 2px solid var(--accent); }
tbody tr:hover td, tbody tr:hover th { background: var(--raised); }
caption { text-align: left; font-weight: 600; padding: 0.25rem 0 0.6rem; }
footer.site { padding: 1.75rem clamp(1rem, 2vw, 3rem); border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); }
footer.site a { color: var(--accent); }

/* Home hero: always a dark panel, the wordmark JPEG feathers into it. */
.hero { background: radial-gradient(ellipse at 50% 0%, #15181d 0%, #0c0d0f 70%); color: #e7e5ea; border: 1px solid #23262c; border-radius: 0.9rem; padding: clamp(1.25rem, 3vw, 3rem); margin: 0 0 2rem; box-shadow: 0 0 60px -30px rgba(23, 181, 241, 0.4); --accent: #17b5f1; --accent-strong: #5fcaf6; --muted: #a9abb3; }
.hero a { color: #5fcaf6; }
.hero-logo { display: block; margin: 0 auto 0.5rem; width: min(100%, 34rem); height: auto; -webkit-mask-image: radial-gradient(ellipse 52% 55% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 52% 55% at 50% 50%, #000 62%, transparent 100%); }
.hero h1 { text-align: center; margin: 0 0 1.5rem; font-weight: 600; color: #e7e5ea; }
.claims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }
.claim { border: 1px solid #2b2e35; border-left: 4px solid #17b5f1; border-radius: 0.6rem; padding: 1rem 1.4rem; background: rgba(20, 22, 26, 0.7); }
.claim h2 { color: #17b5f1; font-size: clamp(1.3rem, 1.8vw, 1.9rem); margin-bottom: 0.4rem; }
.claim p { margin: 0; font-size: 1.1rem; }
.hero .fine { color: #a9abb3; text-align: center; margin: 1rem 0 0; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 1.5rem 0; }
.btn { display: inline-block; padding: 0.6rem 1.25rem; border: 1px solid #343840; border-radius: 0.45rem; color: #e7e5ea !important; background: #14161a; text-decoration: none; font-weight: 600; transition: border-color 0.15s, box-shadow 0.15s; }
.btn:hover { border-color: #17b5f1; box-shadow: 0 0 16px -2px rgba(23, 181, 241, 0.5); text-decoration: none; }
.btn.primary { background: #17b5f1; border-color: #17b5f1; color: #04101a !important; }
.hero a:focus-visible { outline: 3px solid #5fcaf6; outline-offset: 3px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin: 0; padding-top: 1.25rem; border-top: 1px solid #23262c; }
.facts div { text-align: center; }
.facts dt { color: #a9abb3; font-size: 0.9rem; }
.facts dd { margin: 0.15rem 0 0; font-size: 1.35rem; font-weight: 700; color: #17b5f1; font-variant-numeric: tabular-nums; }

/* Claim type pages */
.crumbs { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.25rem; overflow-wrap: anywhere; }
.uri { margin: 0 0 1rem; overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 0.5rem; padding: 0.05rem 0.6rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 0.85rem; font-weight: 600; vertical-align: middle; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0.5rem 0 1.5rem; padding: 1rem 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.6rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.claimtable th[scope="row"] code { white-space: nowrap; overflow-wrap: normal; }
.claimtable td:nth-child(3) { min-width: 15rem; }
.claimtable td:nth-child(4) { min-width: 11rem; }
.blk + .blk { margin-top: 1.75rem; }
@media (max-width: 40rem) { dl.kv { grid-template-columns: 1fr; gap: 0; padding: 0.75rem 1rem; } dl.kv dd { margin-bottom: 0.6rem; } }
@media (max-width: 40rem) { header.site { gap: 0.5rem 1rem; } header.site nav { gap: 0.25rem 0.9rem; flex: 1 1 100%; order: 3; } #theme { margin-left: auto; } th, td { padding: 0.4rem; } header.site .brand img { height: 3rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* In practice page: readable line length for prose, cards in a grid, inline SVG diagram that follows the theme tokens. */
.prose > p, .prose > ul, .prose > ol { max-width: 80ch; }
.prose .grid > .card h3 { margin-top: 0; }
.plain { font-size: 1.05rem; max-width: 80ch; }
.fine { color: var(--muted); }
.words { max-width: 60rem; }
.words h2 { margin-top: 0; }
.words dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0; }
.words dt { font-weight: 700; }
.words dd { margin: 0; }
.spec { margin: 0.75rem 0 0; font-size: 0.95rem; }
.classtable td:nth-child(3), .compare td { min-width: 14rem; }
.compare th[scope="row"] { min-width: 10rem; }
figure.diagram { margin: 1.5rem 0; }
figure.diagram figcaption { color: var(--muted); margin-top: 0.5rem; max-width: 80ch; }
svg.dg { display: block; width: 100%; height: auto; max-width: 62rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.6rem; }
svg.dg-narrow { display: none; max-width: 24rem; }
.dg-box { fill: var(--raised); stroke: var(--accent); stroke-width: 2; }
.dg-mid { stroke: var(--muted); }
.dg-cache { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 8 6; }
.dg-line { fill: none; stroke: var(--accent); stroke-width: 3; }
.dg-dash { stroke: var(--muted); stroke-dasharray: 6 5; }
.dg-head { fill: var(--accent); }
.dg-title { fill: var(--text); }
.dg-title { font-size: 21px; font-weight: 700; }
.dg-text { fill: var(--text); font-size: 17px; }
ol.alt { color: var(--muted); }
.closing { margin-top: 2rem; font-size: 1.1rem; }
@media (max-width: 56rem) { svg.dg-wide { display: none; } svg.dg-narrow { display: block; margin: 0 auto; } }
@media (max-width: 40rem) { .words dl { grid-template-columns: 1fr; gap: 0; } .words dd { margin-bottom: 0.6rem; } }
/* Eleven nav items: keep the header on one line at 1280 px. */
@media (min-width: 56.01rem) and (max-width: 90rem) { header.site { gap: 0.75rem 1.1rem; } header.site nav { gap: 0.25rem 0.65rem; } header.site nav a { font-size: 0.92rem; } #theme { padding: 0.35rem 0.6rem; font-size: 0.92rem; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
