/* castellan.us: one stylesheet for every page. No trackers. */
/* The fonts come from this site, under fonts/, with their licenses beside
   them: the Latin subset of each variable font, on the weight axis only.
   No page asks a third party for anything. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/newsreader-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/newsreader-latin-wght-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/public-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* One night palette for every page, the colours of the phone menu. Text
     and controls meet WCAG AA on --bg and --surface: ink 13.9:1, muted 7.6:1
     and 6.9:1, the accent links 6.9:1 and 6.3:1, the button text 5.2:1, and
     the control borders 3:1 or more. */
  --bg: #211d25;
  --surface: #29242d;
  --raise: #322c37;
  --line: #4a4352;
  --line-strong: #8a8292;
  --ink: #efe9ee;
  --muted: #b3adb9;
  --accent: #f08a92;
  --button: #e0646f;
  --on-button: #1a171e;
  --sky: #9db6e6;
  --mark: #8a2630;
  --pixel-night: #16131a;
  /* The ground under every page: near black with a blue, wine and violet
     glow, the backdrop of the phone visuals in assets/phone. body::before
     paints it fixed behind the page; --bg stays the flat night stone of the
     menu, the tiles and the diagram fills. Text on the ground is lighter
     than on --bg, so every ratio above still holds. */
  --ground: #0d0b11;
  --ground-2: #1a1422;
  --glow-blue: rgba(28, 44, 118, 0.62);
  --glow-wine: rgba(128, 36, 74, 0.55);
  --glow-violet: rgba(75, 39, 112, 0.45);
  /* Three type roles: display for the page and section titles, text for
     everything a reader reads, and ui for navigation, buttons, and labels. */
  --display: 'Newsreader', Georgia, serif;
  --text: 'Public Sans', Arial, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  /* The deck page's slide styles read these names. */
  --paper: var(--surface);
  --night: var(--bg);
  --night2: var(--raise);
  --night-line: var(--line);
  --night-ink: var(--ink);
  --night-muted: var(--muted);
  --ink2: var(--ink);
  --line-soft: var(--line);
  --rose: var(--accent);
  --wine: var(--button);
  --serif: var(--display);
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body { margin: 0; color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.6; }
/* The glow sits in a fixed layer behind the page so it never stretches with
   a long page and never scrolls. Nothing else paints under the content. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58% 46% at 50% 38%, var(--glow-wine), transparent 100%),
    radial-gradient(42% 38% at 12% 16%, var(--glow-blue), transparent 100%),
    radial-gradient(46% 42% at 90% 88%, var(--glow-violet), transparent 100%),
    radial-gradient(36% 30% at 80% 8%, var(--glow-blue), transparent 100%),
    linear-gradient(180deg, var(--ground) 0%, var(--ground-2) 100%); }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.9em; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Skip to content: the first tab stop on every page, shown only while focused. */
.skip { position: absolute; left: 16px; top: -100px; z-index: 5; padding: 12px 18px; border-radius: 6px; background: var(--sky); color: var(--on-button); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }
main:focus { outline: none; }
/* A link inside running text gets a 44px tall tap area without moving the lines around it. */
main p a:not(.btn), main li a:not(.btn) { padding-block: 14px; }

/* Type: display, text, ui */
h1, h2, .display { font-family: var(--display); font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.08; }
h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; }
h3 { font-family: var(--text); font-size: 19px; font-weight: 650; line-height: 1.35; }
.lead { font-size: 21px; color: var(--muted); max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.ui, .btn, .nav-links, .menu-nav, .foot-links, th { font-family: var(--text); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.mono { font-family: var(--mono); }

/* Layout */
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sec { max-width: 1160px; margin: 0 auto; padding: 80px 24px; display: flex; flex-direction: column; gap: 24px; }
.sec + .sec:not(.band) { padding-top: 0; }
.sec.band + .sec { padding-top: 80px; }
.sec.band { padding-top: 64px; padding-bottom: 64px; }
.sec.band { max-width: none; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec.band > * { width: 100%; max-width: 1160px; margin-left: auto; margin-right: auto; }
.page-hero { padding-top: 72px; padding-bottom: 48px; }
.measure { max-width: 720px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Buttons: Try the demo is a solid red fill with white text. Download deck is a solid
   light gray fill with dark text, full opacity, the same radius and size. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 6px; line-height: 1.2; text-decoration: none; box-sizing: border-box; opacity: 1; }
.btn-accent, .btn-accent:hover { background-color: #c8323f; background-image: none; color: #ffffff; opacity: 1; }
.btn-accent:hover { background-color: #a61f2c; color: #ffffff; }
.btn-quiet, .btn-quiet:hover { background-color: #e4e6ea; background-image: none; color: #1d1718; opacity: 1; }
.btn-quiet:hover { background-color: #d4d7dc; color: #1d1718; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header and navigation */
.site-header { background: rgba(13, 11, 17, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
/* The one lockup: the C mark, the drawn name, and the pixel knight. */
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .word { height: 28px; width: auto; aspect-ratio: 3944 / 724; display: block; }
.knight-px { width: 30px; height: 30px; flex: none; display: block; }
/* On the night ground the mark's offset goes near black and its face a step brighter. */
.m-off { fill: #0f1013; }
.m-face { fill: #a8303c; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--ink); padding: 10px 0; }
.nav-links a:not(.btn):hover { color: var(--accent); }
.nav-links a[aria-current="page"]:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 8px; }
.nav-links .btn { min-height: 44px; padding: 0 18px; }
.btn[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.menu { display: none; }

/* Panels and tables */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.panel.raised { background: var(--raise); }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.table-box table { width: 100%; border-collapse: collapse; font-size: 17px; }
.table-box th { text-align: left; padding: 14px 20px; color: var(--muted); border-bottom: 1px solid var(--line); vertical-align: top; }
.table-box tbody th { color: var(--ink); white-space: nowrap; }
.table-box td { padding: 14px 20px; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-box tr:last-child td { border-bottom: 0; }
.table-box td:first-child { font-weight: 600; }
.table-box .mono { font-weight: 500; }
/* Gateway comparison */
.versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 17px; }
.versus div { background: var(--surface); padding: 14px 20px; }
.versus .vh-col { background: var(--raise); color: var(--muted); font-weight: 600; font-size: 16px; }
.versus .vh-col.us { color: var(--accent); }
/* Terminal blocks */
.term { background: var(--pixel-night); border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; font-family: var(--mono); font-size: 15px; line-height: 1.8; overflow-x: auto; }
.term div { overflow-wrap: anywhere; }
.term .pr, .term .note { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* The hero's request card: what the demo's gatehouse shows. */
.request { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.request-head { display: flex; align-items: center; gap: 14px; }
.request-title { font-family: var(--display); font-size: 24px; line-height: 1.25; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 14px; }
.chip { padding: 4px 10px; border-radius: 4px; background: var(--raise); border: 1px solid var(--line); }
.chip.off { color: var(--muted); text-decoration: line-through; }

/* Diagrams: inline SVG in the page's own colours, drawn by scripts/site_art.py
   with the cast members and the house icons. Nothing in a diagram moves. */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.diagram svg { display: block; width: 100%; height: auto; }
.dg-tall { display: none !important; }
figcaption { font-size: 16px; color: var(--muted); }
.diagram figcaption { margin-top: 16px; }
.dg text { font-family: var(--text); fill: var(--ink); font-size: 15px; }
.dg .t-title { font-size: 17px; font-weight: 650; }
/* Phone cards are one row. The title has to fit beside the badge and the character.
   Flow characters are 64px tall, nearest neighbor, with the step number under them. */
.dg-tall .px { image-rendering: pixelated; shape-rendering: crispEdges; }
.dg-tall .t-title { font-size: 14px; }
.dg-tall .t-muted { font-size: 13px; }
.dg .t-muted { fill: var(--muted); font-size: 14px; }
.dg .t-accent { fill: var(--accent); font-weight: 650; }
.dg .box { fill: var(--raise); stroke: var(--line-strong); stroke-width: 1.5; }
.dg .zone { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 6 5; }
.dg .keep { fill: var(--pixel-night); stroke: var(--accent); stroke-width: 2; }
.dg .line { fill: none; stroke: var(--muted); stroke-width: 2; }
.dg .line.ok { stroke: var(--sky); }
.dg .line.no { stroke: var(--accent); stroke-dasharray: 5 5; }
.dg .arrow { fill: var(--muted); }
.dg .arrow.ok { fill: var(--sky); }
.dg .arrow.no { fill: var(--accent); }
.dg .num { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; }
.dg .num-t { font-family: var(--mono); font-size: 13px; text-anchor: middle; }
.dg .ctrl { fill: var(--bg); stroke: var(--sky); stroke-width: 1.5; }
.dg .ctrl-t { fill: var(--sky); font-size: 13px; font-weight: 600; }
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px 24px; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-family: var(--mono); font-size: 14px; color: var(--ink); }
.steps p { color: var(--muted); font-size: 17px; }

/* The cast: pixel art on a night tile, and the services table. */
.px-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.cast-art { position: relative; background: var(--pixel-night); border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 12px; }
.cast-art svg, .cast-figure svg { display: block; max-width: 100%; height: auto; }
.cast-figure { display: block; }
.cast-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.cast-hero .cast-art { padding: 24px; min-height: 280px; }
.cast-table td:first-child { width: 208px; }
.cast-table .cast-art { width: 80px; min-height: 72px; box-sizing: border-box; padding: 8px; flex-wrap: wrap; justify-content: flex-start; }
.cast-table .cast-art.wide { width: 208px; }
.cast-table [data-voice-art] { display: block; }
.cast-table .role { display: block; color: var(--muted); font-weight: 500; font-size: 15px; }
.cast-table tbody th { white-space: normal; text-align: left; font-size: 17px; color: var(--ink); padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cast-table tbody th { width: 200px; }
/* The RAIDERS wordmark: the AI letters in red. */
.ai { color: #ff6b78; }
.envoy-name { white-space: nowrap; }
.envoy-mark { display: inline-block; width: 1em; height: 1em; margin-right: 0.25em; vertical-align: -0.14em; }
.envoy-mark svg { display: block; width: 1em; height: 1em; }
/* A speaking character's line, added by entrance/voices.js as a button in
   its row: a click plays the line. */
.bubble { display: inline-block; margin: 8px 0 0; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--raise); color: var(--ink); font: 500 15px/1.3 var(--text); cursor: pointer; text-align: left; }
.bubble::before { content: "\201C"; }
.bubble::after { content: "\201D"; }
.bubble:hover { border-color: var(--accent); }
.bubble.speak { border-color: var(--accent); }
.cast-hero .bubble { position: absolute; top: 16px; left: 50%; translate: -50% 0; margin: 0; }
.cast-hero .cast-art:has(.bubble) { padding-top: 64px; }

/* The privacy policy: one panel of plain sections, at reading width. */
.legal { max-width: 820px; padding: 40px; gap: 36px; }
.legal section { display: flex; flex-direction: column; gap: 12px; }
.legal h2 { font-size: 28px; }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal li::marker { color: var(--accent); }

/* Footer: the lockup, one list of links, the copyright line. */
.site-footer { border-top: 1px solid var(--line); background: rgba(13, 11, 17, 0.6); }
.foot { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; color: var(--muted); font-size: 15px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.foot-brand .mark { width: 28px; height: 28px; }
.foot-brand .word { height: 22px; width: auto; aspect-ratio: 3944 / 724; display: block; }
.foot-brand .knight-px { width: 24px; height: 24px; }
.foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--ink); }
.foot-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.foot-copy { flex-basis: 100%; font-size: 14px; }

/* Phones: one column. */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .sec { padding: 48px 16px; gap: 20px; }
  .sec.band + .sec { padding-top: 48px; }
  .sec.band { padding-top: 40px; padding-bottom: 40px; }
  .page-hero { padding-top: 40px; padding-bottom: 32px; }
  .split, .cast-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lead { font-size: 19px; }
  .panel, .diagram { padding: 18px; }
  /* A phone shows the one column version of a diagram that has one, and
     scrolls the others sideways at a size that stays legible. */
  .dg-wide:has(+ .dg-tall) { display: none !important; }
  .dg-tall { display: block !important; max-width: 400px; margin: 0 auto; }
  .diagram { overflow-x: auto; }
  .diagram svg:not(.dg-tall) { min-width: 760px; }
  .legal { padding: 22px; }
  .legal h2 { font-size: 24px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .table-box table { font-size: 16px; }
  .table-box th, .table-box td, .cast-table tbody th { padding: 12px 14px; }
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table tr, .stack-table td, .stack-table tbody th { display: block; width: auto !important; }
  .stack-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .stack-table tr:last-child { border-bottom: 0; }
  .stack-table td, .stack-table tbody th { padding: 4px 0; border: 0; }
  .versus { font-size: 15px; }
  .versus div { padding: 12px 14px; }
  .foot { flex-direction: column; align-items: stretch; gap: 8px; padding: 28px 16px; }
  .foot-links { margin: 8px 0 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .foot-links a { border-top: 1px solid var(--line); }
}

/* Phones, and any screen under 500px tall such as a phone on its side: a
   sticky header with the brand and a menu button that opens a full screen
   menu. Focus moved backwards scrolls clear of the sticky header. */
@media (max-width: 720px), (max-height: 500px) {
  html { scroll-padding-top: 88px; }
  .site-header { position: sticky; top: 0; z-index: 2; }
  .nav { padding: 10px 16px; gap: 12px; flex-wrap: nowrap; }
  .brand { gap: 8px; }
  .brand .mark { width: 28px; height: 28px; }
  .brand .word { height: 23px; }
  .brand .knight-px { width: 24px; height: 24px; }
  .nav-links { display: none; }
  .menu { display: block; }
  .menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); position: relative; z-index: 4; background: var(--bg); }
  .menu summary::-webkit-details-marker { display: none; }
  .menu .ico-close, .menu[open] .ico-open, .menu .lbl-close, .menu[open] .lbl-open { display: none; }
  .menu[open] .ico-close, .menu[open] .lbl-close { display: inline; }
  /* The header blurs the ground, and that blur traps a fixed descendant inside
     the header bar, so the open state showed the X and none of the links.
     While the menu is open the header itself covers the viewport, with no
     blur, and the link list is positioned against that header. */
  .site-header:has(.menu[open]) { position: fixed; inset: 0; z-index: 40; height: 100dvh; overflow: hidden; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu:not([open]) .menu-panel { display: none; }
  .menu-panel { background: var(--bg); display: flex; flex-direction: column; }
  .menu[open] .menu-panel { position: absolute; top: 72px; left: 0; right: 0; bottom: 0; overflow-y: auto; z-index: 2; }
  .menu-head { display: none; }
  .menu-nav { padding: 8px 16px 24px; display: flex; flex-direction: column; }
  .menu-nav a { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 20px; line-height: 1.2; text-decoration: none; color: var(--ink); min-height: 48px; box-sizing: border-box; }
  .menu-nav a:hover, .menu-nav a[aria-current="page"]:not(.btn) { color: var(--accent); }
  .menu-nav a.btn { margin-top: 16px; width: 100%; border-bottom: 0; color: #ffffff; background-color: #c8323f; opacity: 1; justify-content: center; }
  .menu-nav a.btn:hover { color: #ffffff; background-color: #a61f2c; }
  body:has(.menu[open]) { overflow: hidden; }
}
/* A phone on its side: the links stay in one column so each row is a full tap target. */
@media (max-height: 500px) {
  .menu-nav a { padding: 8px 0; font-size: 18px; }
}
.h-card { font-size: 28px; }
.dg .no-x { fill: none; stroke: var(--accent); stroke-width: 3; }
/* Diagram figures: the house icons take the accent, a tree snapshot lights one node. */
.dg .ico { color: var(--accent); }
.dg .mini { fill: var(--raise); stroke: var(--line-strong); stroke-width: 1; }
.dg .mini.lit { fill: var(--accent); stroke: var(--accent); }
.dg-mini { width: 148px; height: 40px; display: block; }
.dg-mini .line { stroke-width: 1.5; }
.diagram svg.dg-mini, td .dg-mini { min-width: 0; }

/* Round two: the hero scene, the phone, the roles, the threats, the principles. */
.hero { gap: 32px; }
.hero h1 { font-size: clamp(40px, 5.2vw, 68px); max-width: 1000px; }
.hero-art { background: var(--pixel-night); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hero-scene { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .hero-scene .cs-star { animation: hero-twinkle 2.4s step-end infinite; }
  .hero-banner { animation: hero-banner 0.8s step-end infinite; }
  .hero-torch { animation: hero-torch 0.5s step-end infinite; }
  .hero-late { animation-delay: -0.3s; }
}
@keyframes hero-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes hero-banner { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }
@keyframes hero-torch { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 50% { transform: translateX(-16px); } 75% { transform: translateX(-24px); } }
.with-icon { display: flex; align-items: center; gap: 10px; }
.ico-inline { color: var(--accent); flex: none; width: 24px; height: 24px; }
.chips { list-style: none; padding: 0; }
.layers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.layers .scene { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.layers .scene .cast-art { padding: 20px; width: 100%; box-sizing: border-box; }
.layers .scene svg { width: min(100%, 420px); height: auto; }
/* The phone: the demo's Gatehouse on a phone, the real screen in a phone frame. */
.phone { justify-self: center; width: min(100%, 320px); margin: 0; border-radius: 44px; background: #0f1013; padding: 12px; box-shadow: 0 0 0 1px var(--line-strong), 0 24px 48px rgba(0, 0, 0, 0.45); }
/* The cast's roles: portrait, name and product, two sentences, and where it stands in the tree. */
.roles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.role { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.role-art { align-self: start; min-height: 120px; }
.role-art.wide { flex-wrap: wrap; gap: 6px; }
.role-art.wide svg { width: 48px; height: auto; }
.role-body { display: flex; flex-direction: column; gap: 8px; }
.role-body h3 { font-size: 21px; }
.role-product { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 15px; }
.role-body .dg-mini { margin-top: 4px; }
/* The threats: the battle with each enemy numbered, and the list beside it. */
.threats { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.threats-art { position: relative; background: var(--pixel-night); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.threats-art .hero-scene { display: block; width: 100%; height: auto; }
.threat-badge { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--accent); color: var(--on-button); font: 700 14px/28px var(--mono); text-align: center; box-shadow: 0 0 0 3px var(--pixel-night); }
.threat-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.threat-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.threat-list .num-t { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-button); font: 700 14px/28px var(--mono); text-align: center; }
.threat-list h3 { font-size: 19px; margin-bottom: 4px; }
.threat-list p { color: var(--muted); font-size: 16px; }
/* Security: the three principles, and the controls as two columns. */
.principles .panel h2 { font-size: 22px; }
.principles .bullets { color: var(--muted); font-size: 16px; }
.controls th[scope="row"] { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 4px; width: 340px; white-space: normal; }
.controls th[scope="row"] .role { display: block; grid-column: 3; padding: 0; background: none; border: 0; color: var(--muted); font-weight: 500; font-size: 14px; }
.ctrl-mark { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--sky); color: var(--sky); font: 600 12px/22px var(--mono); text-align: center; box-sizing: border-box; }
.controls .bullets { color: var(--muted); font-size: 16px; gap: 4px; }
/* Build your defenses: the features that compound. */
.features { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.feature .cast-art { min-height: 112px; }
.feature .bullets { color: var(--muted); font-size: 16px; }
@media (max-width: 720px) {
  .hero { gap: 20px; }
  .layers { grid-template-columns: minmax(0, 1fr); }
  .role { grid-template-columns: minmax(0, 1fr); }
  .role-art { min-height: 96px; }
  .threats { grid-template-columns: minmax(0, 1fr); }
  .controls th[scope="row"] { width: auto; }
}
/* The demo's real screens, taken by web/scripts/site-shots.mjs. */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.shots.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.shot { display: flex; flex-direction: column; gap: 10px; }
.shot img, .shot-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--pixel-night); }
.shot figcaption { margin-top: 8px; }
.panel .shot-img { margin-bottom: 4px; }
.phone-shot { display: block; width: 100%; height: auto; border-radius: 34px; }
.phone figcaption { margin-top: 12px; text-align: center; }

/* The products' glass emblems beside headings, names and table rows. */
img.emblem { width: 40px; height: 40px; flex: none; display: inline-block; vertical-align: middle; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
h2.with-icon img.emblem { width: 52px; height: 52px; }
.role-product img.emblem { width: 34px; height: 34px; }
th img.emblem { width: 34px; height: 34px; }
