/* Kratos site. AMOLED black, Inter for text, JetBrains Mono for code. Shared by every page. */
:root {
  --ground: #000000;
  --window: #060607;
  --surface: #0A0A0B;
  --raised: #121214;
  --line: #17171A;
  --line-2: #202024;
  --line-3: #2A2A30;
  --text: #ECECEF;
  --text-2: #B4B4BC;
  --text-3: #A1A1AA;
  --text-4: #8A8A93;
  --accent: #A78BFA;
  --accent-text: #C4B5FD;
  --amber: #F0B04A;
  --blue: #7CB2FF;
  --green: #A5D68A;
  --patch: #3B8EEA;
  --patch-text: #8DBDF2;
  --red: #E06A6A;
  --sans: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Inter Tight', Inter, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, 'SFMono-Regular', ui-monospace, monospace;
  --gutter: clamp(20px, 7.2vw, 104px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--ground); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #EDE9FE; }
::selection { background: rgba(167, 139, 250, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); }
kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  padding: 1px 6px;
  border: 1px solid var(--line-3);
  border-radius: 5px;
  color: var(--text);
  background: #0C0C0E;
  white-space: nowrap;
}
code { font-family: var(--mono); font-size: 0.86em; color: var(--text); }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--text); color: var(--ground); font-weight: 600;
}
.skip:focus { top: 12px; color: var(--ground); }

/* ---------- the scene ---------- */
.world { font-family: var(--mono); color: var(--text-3); pointer-events: none; }
.world { position: fixed; inset: 0; z-index: 0; overflow: hidden; contain: strict; }
.world-cam { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.world-pool { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.w-box, .w-line, .w-text, .w-bubble, .w-chip, .w-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.w-box { box-sizing: border-box; }
.w-text, .w-bubble, .w-chip { white-space: pre; line-height: 1.25; }
.w-chip { padding: 5px 11px; border-radius: 999px; }
.w-line { width: 1px; height: 1px; }
.w-line svg { display: block; overflow: visible; }
.w-img { display: block; max-width: none; }

/* scrims keep the copy readable; the page fades them in on the side the copy sits */
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; }
.scrim-l { opacity: 1; background: linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.9) 37%, rgba(0, 0, 0, 0) 53.5%); }
.scrim-r { background: linear-gradient(270deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.9) 36%, rgba(0, 0, 0, 0) 54%); }
.scrim-t { background: linear-gradient(180deg, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.88) 34%, rgba(0, 0, 0, 0) 56%); }
.scrim-b { background: linear-gradient(0deg, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.88) 34%, rgba(0, 0, 0, 0) 58%); }

/* ---------- chrome: top bar with document tabs, section rail, status bar ---------- */
.topbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 20;
  height: 58px; display: flex; align-items: center; gap: 18px;
  padding: env(safe-area-inset-top, 0px) 24px 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid #131315;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; flex: 0 0 auto; }
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; display: block; }
.tabs { align-self: stretch; display: flex; align-items: stretch; margin-left: 10px; border-left: 1px solid #141416; }
.tabs a {
  position: relative; display: flex; align-items: center; gap: 9px; padding: 0 18px;
  border-right: 1px solid #141416; font-size: 14px; color: var(--text-3); white-space: nowrap;
}
.tabs a svg { flex: 0 0 auto; color: var(--text-4); }
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.025); }
.tabs a[aria-current="page"] { color: var(--text); background: linear-gradient(180deg, rgba(167, 139, 250, 0.07), rgba(167, 139, 250, 0) 80%); }
.tabs a[aria-current="page"] svg { color: var(--accent-text); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tabs .sub { font-family: var(--mono); font-size: 11.5px; color: var(--text-4); padding-left: 4px; min-width: 15.5ch; }
.tabs .count { font-family: var(--mono); font-size: 11px; color: var(--text-4); border: 1px solid var(--line-3); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.spacer { flex: 1 1 auto; }
.search-btn {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 12px;
  border: 1px solid #1D1D21; border-radius: 10px; background: #08080A; color: var(--text-3);
  font: inherit; font-size: 13.5px; white-space: nowrap; cursor: pointer;
}
.search-btn:hover { color: var(--text); border-color: var(--line-3); }
.search-btn .key { font-family: var(--mono); font-size: 11px; color: var(--text-4); border: 1px solid #26262B; border-radius: 6px; padding: 1px 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: #FFFFFF; color: #000; }
.btn-ghost { background: rgba(0, 0, 0, 0.6); color: var(--text); border-color: #26262B; font-weight: 500; }
.btn-ghost:hover { border-color: #3A3A44; color: var(--text); }

.rail { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 2px; }
.rail a {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 26px; padding: 0 4px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-4); text-shadow: 0 0 8px #000, 0 0 2px #000;
}
.rail a::after { content: ""; display: block; width: 12px; height: 2px; border-radius: 1px; background: var(--line-3); transition: width 0.2s, background 0.2s; }
.rail a:hover { color: var(--text); }
.rail a[aria-current="true"] { color: var(--text); }
.rail a[aria-current="true"]::after { width: 28px; background: var(--accent); }

.status {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  min-height: 34px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px env(safe-area-inset-bottom, 0px);
  background: rgba(0, 0, 0, 0.9); border-top: 1px solid #141416;
  font-size: 12.5px; color: var(--text-3);
}
.mode { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 10px; border-radius: 999px; background: #141417; color: #C9C9CF; white-space: nowrap; }
.mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mode[data-mode="Patched"] { background: rgba(59, 142, 234, 0.14); color: var(--patch-text); }
.mode[data-mode="Paused"] { background: rgba(240, 176, 74, 0.12); color: var(--amber); }
.mode[data-mode="Ring 0"], .mode[data-mode="Emulator"], .mode[data-mode="Acting"] { background: rgba(167, 139, 250, 0.12); color: var(--accent-text); }
.mode[data-mode="Capturing"] { background: rgba(165, 214, 138, 0.12); color: var(--green); }
.mode[data-mode="Console"] { background: rgba(124, 178, 255, 0.12); color: var(--blue); }
.status .arch { height: 22px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; }
.status .where { font-family: var(--mono); font-size: 12px; color: #D4D4D8; white-space: nowrap; }
.status .doing { color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.status .tour { height: 24px; padding: 0 10px; border-radius: 6px; border: 1px solid #26262B; background: #0E0E10; color: #D4D4D8; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.status .tour:hover { border-color: #3A3A44; }
.status .read { font-family: var(--mono); font-size: 12px; color: #D4D4D8; white-space: nowrap; }

/* ---------- chapters: the copy holds still while the scene plays behind it ---------- */
main { position: relative; z-index: 2; }
.chapter { position: relative; }
.story { position: relative; min-height: 1150px; padding: 210px var(--gutter) 0; }
.story-hero { min-height: 1000px; padding-top: 168px; }
.story-tall { min-height: 1380px; }
.story-long { min-height: 1700px; }
.copy { position: sticky; top: 21vh; max-width: 540px; text-shadow: 0 0 14px rgba(0, 0, 0, 0.95), 0 0 3px rgba(0, 0, 0, 0.9); transform-origin: 30% 50%; will-change: transform; transition: transform 0.45s ease-out; }
.story-hero .copy { position: relative; top: auto; max-width: 580px; }
.copy .btn { text-shadow: none; }
[data-layout="right"] .copy { margin-left: auto; margin-right: max(0px, calc(170px - var(--gutter))); max-width: 470px; transform-origin: 70% 50%; }
[data-layout="low"] .copy { top: 50vh; max-width: 620px; }
[data-layout="top"] .copy { top: 14vh; margin-inline: auto; max-width: 760px; text-align: center; transform-origin: 50% 30%; }
[data-layout="top"] .eyebrow, [data-layout="top"] .points { justify-content: center; }

.eyebrow { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--text-4); }
.eyebrow .sec { color: var(--accent-text); }
.tag-pro { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: #E9E3FF; background: rgba(167, 139, 250, 0.16); border: 1px solid rgba(167, 139, 250, 0.45); border-radius: 999px; padding: 1px 9px; }
.copy h1, .copy h2 { margin: 18px 0 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; }
.copy .lead { margin: 18px 0 0; line-height: 1.6; color: var(--text-2); }
.size-xl h1 { margin-top: 22px; font-size: 66px; line-height: 0.99; letter-spacing: -0.035em; }
.size-xl .lead { margin-top: 24px; font-size: 18.5px; max-width: 520px; }
.size-l h2 { font-size: 60px; line-height: 1.0; letter-spacing: -0.035em; }
.size-l .lead { font-size: 17.5px; }
.size-m h2 { font-size: 46px; line-height: 1.06; }
.size-m .lead { font-size: 16.5px; }
.size-s h2 { font-size: 36px; line-height: 1.1; }
.size-s .lead { font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.release { margin: 16px 0 0; font-family: var(--mono); font-size: 12px; color: var(--text-4); }
.points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.points li {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 3px 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(0, 0, 0, 0.7);
  font-size: 13.5px; color: var(--text-2); text-shadow: none;
}
.points li::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--accent)); }
.points a { color: var(--text); border-bottom: 1px solid rgba(167, 139, 250, 0.5); }

/* keys in the copy you can press: hold one and the scene jumps to that moment */
.lead kbd[data-go], kbd[data-palette-open] {
  cursor: pointer; display: inline-block; position: relative; top: -1px;
  box-shadow: 0 2px 0 #2A2A30; transition: transform 0.08s, box-shadow 0.08s, border-color 0.15s, background 0.15s;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.lead kbd[data-go]:hover, kbd[data-palette-open]:hover { border-color: var(--accent); }
.lead kbd[data-go].down { transform: translateY(2px); box-shadow: 0 0 0 #2A2A30; border-color: var(--accent); background: rgba(167, 139, 250, 0.22); }

/* reveal: the eyebrow decodes, the headline is selected left to right, the rest settles in */
@media (prefers-reduced-motion: no-preference) {
  html.js .copy > * { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
  html.js .copy > h1, html.js .copy > h2 { transform: none; clip-path: inset(-24px 100% -24px -24px); transition: clip-path 0.95s cubic-bezier(0.65, 0.05, 0.2, 1) 0.08s, opacity 0.2s ease 0.08s; }
  html.js .copy.in > * { opacity: 1; transform: none; }
  html.js .copy.in > h1, html.js .copy.in > h2 { clip-path: inset(-24px -24px -24px -24px); }
  html.js .copy.in > .lead { transition-delay: 0.35s; }
  html.js .copy.in > :nth-child(4) { transition-delay: 0.5s; }
  html.js .copy.in > :nth-child(5) { transition-delay: 0.6s; }
  html.js .copy.in > :nth-child(6) { transition-delay: 0.7s; }
}

/* ---------- details: kept only for the interface and the download ---------- */
.detail {
  position: relative;
  padding: 220px 0 140px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.95) 200px, #000 100%);
}
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 32px; }
.detail h3.kicker { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.detail .intro { margin: 12px 0 0; max-width: 680px; font-size: 17px; line-height: 1.6; color: var(--text-3); }
.mt-l { margin-top: 72px; }
.mt-m { margin-top: 40px; }
.note { margin: 28px 0 0; font-size: 14px; color: var(--text-4); }
.shot { margin: 0; }
.shot .frame { border-radius: 14px; border: 1px solid var(--line-2); overflow: hidden; background: var(--window); box-shadow: 0 60px 140px -50px rgba(0, 0, 0, 1); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.prefixes { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-family: var(--mono); font-size: 12.5px; color: var(--text-4); }
.prefixes b { color: var(--text); font-weight: 400; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.themes .frame { border-radius: 10px; box-shadow: none; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--window); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.video-cap { margin: 12px 0 0; font-size: 14px; color: var(--text-3); }

/* download, pricing, faq */
.download-meta { margin-top: 20px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 10px 10px 16px; background: rgba(8, 8, 10, 0.92); border: 1px solid #1D1D21; border-radius: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); max-width: 100%; text-shadow: none; }
.download-meta .sep { color: #34343B; }
.download-meta .hash { overflow-wrap: anywhere; }
.download-meta button { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #26262B; background: var(--raised); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.plans { display: flex; flex-wrap: wrap; gap: 20px; }
.plan { flex: 1 1 340px; background: var(--surface); border: 1px solid #1B1B1F; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; }
.plan-pro { border-color: rgba(167, 139, 250, 0.4); background: linear-gradient(180deg, rgba(167, 139, 250, 0.07), rgba(10, 10, 11, 0) 60%), var(--surface); }
.plan h4 { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent-text); letter-spacing: 0.04em; text-transform: uppercase; }
.plan .price { margin: 12px 0 0; font-family: var(--display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.plan .sub { margin: 4px 0 0; font-size: 14px; color: var(--text-4); }
.checks { list-style: none; margin: 22px 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: #D4D4D8; flex: 1 1 auto; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan .btn { align-self: flex-start; }
.faq { max-width: 820px; }
.faq details { border-top: 1px solid #1B1B1F; }
.faq details:last-child { border-bottom: 1px solid #1B1B1F; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--text-4); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 22px; max-width: 700px; font-size: 15.5px; color: var(--text-3); }

/* ---------- EOF: the page stops on its last section and a white footer slides up over it ---------- */
.curtain { position: relative; }
html.pin main { position: sticky; top: var(--pin, 0px); }
.eof-dim { position: fixed; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; }
.eof {
  --paper: #F4F4F0; --ink: #0B0B0C; --ink-2: #45454D; --ink-3: #6E6E76; --rule: #D9D9D2; --violet: #6D4AFF; --blue-ink: #1F6FD1;
  --cut: 9vw;
  position: relative; z-index: 4;
  display: flex; flex-direction: column;
  min-height: calc(100vh + var(--cut) + 2px);   /* ends on a fully white screen: the cut has scrolled away */
  padding: calc(var(--cut) + 110px) 0 0;
  background: var(--paper); color: var(--ink); color-scheme: light;
  clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
}
.eof ::selection { background: rgba(109, 74, 255, 0.22); }
.eof :focus-visible { outline-color: var(--violet); }
/* a label that runs along the cut, at its angle (atan 0.09) */
.eof-edge {
  position: absolute; left: var(--gutter); top: calc(var(--cut) - var(--gutter) * 0.09 + 20px); margin: 0;
  display: flex; align-items: center; gap: 18px; transform: rotate(-5.143deg); transform-origin: 0 0;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap;
}
.eof-edge span:first-child { color: var(--violet); font-weight: 600; }
.eof-edge::after { content: ""; width: 34vw; height: 1px; background: var(--rule); }
.eof > .wrap { width: 100%; }
.eof-head { margin-bottom: 72px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px 56px; align-items: end; }
.eof-cta h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(44px, 5.4vw, 86px); line-height: 0.98; letter-spacing: -0.045em; }
.eof-cta p { margin: 22px 0 0; max-width: 470px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.eof .actions { margin-top: 30px; }
.eof .btn-ink { background: var(--ink); color: #FFF; }
.eof .btn-ink:hover { background: #000; color: #FFF; }
.btn-line { background: transparent; color: var(--ink); border-color: #C6C6BD; font-weight: 500; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.eof-cols { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 36px 52px; }
.eof-cols nav p { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.eof-cols ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.eof a { color: var(--ink); }
.eof-cols a { background: linear-gradient(var(--violet), var(--violet)) 0 100% / 0 1px no-repeat; transition: background-size 0.25s ease; }
.eof-cols a:hover { color: var(--ink); background-size: 100% 1px; }

/* the name, written in bytes: MZ header first. Ink cells are the letters; hover patches them to 90 */
.hexmark {
  --cols: 60;
  position: relative; margin-top: auto; padding: 0 16px;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  font-family: var(--mono); font-weight: 600; line-height: 1.22; letter-spacing: 0;
  user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: crosshair;
}
.hexmark span { display: block; text-align: center; color: #D0D0C8; transition: color 0.35s ease, background-color 0.35s ease; }
/* the letters read like a selection in a hex editor: solid cells, the bytes still showing through */
.hexmark span.i { color: #8F8F89; background: var(--ink); }
.hexmark span.p { color: #7FB0EA; transition: none; }
.hexmark span.i.p { color: #FFF; background: var(--blue-ink); }
.hexmark span.o { color: transparent; background: transparent; transition: none; }
.hexmark span.w { animation: hexw 0.8s ease-out; }
.hexmark span.i.w { animation-name: hexwi; }
@keyframes hexw { from { color: var(--violet); } }
@keyframes hexwi { from { background-color: var(--violet); color: #FFF; } }
.hexmark .hexmark-fallback {
  grid-column: 1 / -1; text-align: center; color: var(--ink); font-family: var(--display); font-weight: 800;
  font-size: 19vw; line-height: 0.9; letter-spacing: -0.05em;
}

/* the light status bar: where the dark one hands over */
.eof-bar {
  margin-top: 30px; padding: 9px 16px calc(9px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule); min-height: 46px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12.5px; color: var(--ink-3);
}
.eof-bar .pill { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 10px; border-radius: 999px; background: #E6E6DF; color: var(--ink); font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.eof-bar .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
.eof-bar .arch { height: 22px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 6px; border: 1px solid var(--rule); font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.eof-bar .where { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.eof-bar .patch-note { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.eof-bar .patch-note.on { color: var(--blue-ink); }
.eof-bar .revert { height: 24px; padding: 0 10px; border-radius: 6px; border: 1px solid #C6C6BD; background: #FFF; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.eof-bar .revert:hover { border-color: var(--ink); }
.eof-bar .legal a, .eof-bar > a { color: var(--ink-2); }
.eof-bar .legal a:hover, .eof-bar > a:hover { color: var(--ink); }
.eof-bar .to-top { font-family: var(--mono); font-size: 12px; color: var(--ink); padding: 3px 9px; border-radius: 6px; border: 1px solid var(--rule); }
.eof-bar .to-top:hover { border-color: var(--ink); }

/* while the footer is up: the dark status bar and the rail step aside; once it reaches the top, the title bar turns light */
.status { transition: transform 0.35s ease; }
.rail { transition: opacity 0.3s ease, visibility 0.3s; }
html.eof-on .status { transform: translateY(105%); }
html.eof-on .rail { opacity: 0; visibility: hidden; }
.topbar { transition: background-color 0.3s ease, border-color 0.3s ease; }
.topbar .brand, .topbar .tabs a, .topbar .search-btn { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
html.eof-light .topbar { background: rgba(244, 244, 240, 0.82); border-bottom-color: #DCDCD5; }
html.eof-light .topbar .brand { color: #0B0B0C; }
html.eof-light .topbar .brand img { filter: invert(1); }
html.eof-light .topbar .tabs, html.eof-light .topbar .tabs a { border-color: #E0E0D9; }
html.eof-light .topbar .tabs a { color: #55555C; }
html.eof-light .topbar .tabs a svg, html.eof-light .topbar .tabs .sub, html.eof-light .topbar .tabs .count { color: #7A7A82; }
html.eof-light .topbar .tabs .count { border-color: #D2D2CA; }
html.eof-light .topbar .tabs a:hover { color: #0B0B0C; background: rgba(0, 0, 0, 0.03); }
html.eof-light .topbar .tabs a[aria-current="page"] { color: #0B0B0C; background: linear-gradient(180deg, rgba(109, 74, 255, 0.08), rgba(109, 74, 255, 0) 80%); }
html.eof-light .topbar .tabs a[aria-current="page"] svg { color: #6D4AFF; }
html.eof-light .topbar .tabs a[aria-current="page"]::after { background: #6D4AFF; }
html.eof-light .topbar .search-btn { background: #FFF; border-color: #D6D6CE; color: #55555C; }
html.eof-light .topbar .search-btn .key { border-color: #D6D6CE; color: #7A7A82; }
html.eof-light .topbar .btn-primary { background: #0B0B0C; color: #FFF; }

/* Ctrl K */
.palette { width: min(580px, calc(100vw - 32px)); margin-top: 12vh; padding: 0; background: #0C0C0E; color: var(--text); border: 1px solid #34343B; border-radius: 14px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9); }
.palette::backdrop { background: rgba(0, 0, 0, 0.6); }
.palette label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.palette input { width: 100%; height: 54px; padding: 0 18px; background: transparent; border: 0; border-bottom: 1px solid #222226; outline: none; color: var(--text); font-family: var(--mono); font-size: 15px; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: min(440px, 60vh); overflow-y: auto; }
.palette li a { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 8px; color: #D4D4D8; font-size: 14px; }
.palette li a span:last-child { font-family: var(--mono); font-size: 12px; color: var(--text-4); }
.palette li a[aria-selected="true"], .palette li a:hover { background: rgba(167, 139, 250, 0.18); color: var(--text); }
.palette .empty { padding: 14px 12px; font-size: 14px; color: var(--text-4); }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .rail { display: none; }
  .tabs .sub { display: none; }
  .search-btn .label { display: none; }
  [data-layout="right"] .copy { margin-right: 0; }
}
@media (max-width: 900px) {
  .tabs a { padding: 0 12px; }
  .tabs .count { display: none; }
  .status .doing { display: none; }
  .size-xl h1 { font-size: 54px; }
  .size-l h2 { font-size: 48px; }
  .eof-head { grid-template-columns: minmax(0, 1fr); }
  .eof-cols { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .topbar { gap: 10px; padding-inline: 12px 16px; }
  .brand span, .brand { font-size: 0; gap: 0; }
  .tabs { margin-left: 2px; }
  .tabs a { font-size: 0; gap: 0; padding: 0 13px; }
  .tabs a svg { width: 17px; height: 17px; }
  .search-btn .key { display: none; }
  .search-btn { padding: 0 11px; }
  .scrim-l { background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.22) 40%, rgba(0, 0, 0, 0.6) 100%); }
  .copy { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 18px rgba(0, 0, 0, 0.85); }
  .story, .story-tall, .story-long { min-height: 900px; padding: 150px 20px 0; }
  .story-hero { padding-top: 110px; }
  .copy, .story-hero .copy, [data-layout] .copy { position: relative; top: auto; margin: 0; max-width: none; text-align: left; }
  [data-layout="top"] .eyebrow, [data-layout="top"] .points { justify-content: flex-start; }
  .size-xl h1 { font-size: 40px; line-height: 1.04; }
  .size-l h2 { font-size: 36px; }
  .size-m h2 { font-size: 32px; }
  .size-s h2 { font-size: 30px; }
  .copy .lead, .size-xl .lead { font-size: 16px; }
  .actions .btn { flex: 1 1 100%; }
  .detail { padding: 140px 0 96px; }
  .wrap { padding-inline: 20px; }
  .themes { grid-template-columns: minmax(0, 1fr); }
  .status .tour, .status .arch { display: none; }
  .eof { padding-top: calc(var(--cut) + 92px); }
  .eof-head { margin-bottom: 56px; }
  .eof-edge { left: 20px; top: calc(var(--cut) - 1.8px + 14px); font-size: 11px; gap: 12px; }
  .eof-cols { gap: 28px 36px; }
  .eof-cols nav { flex: 1 1 140px; }
  .hexmark { padding: 0 10px; }
  .eof-bar .arch, .eof-bar .where { display: none; }
}
