/* mementomoridev.com — Memento Mori design system */

:root {
  --ground: #0A0A0A;
  --card: #161616;
  --card-2: #1D1D1D;
  --crimson: #C8102E;
  --crimson-hi: #F04A62; /* hover/lifted crimson for small text on dark */
  --gold: #C9A227;
  --bone: #F2EFEA;
  --bone-2: #BDB8B0; /* secondary text, 9.9:1 on ground */
  --bone-3: #8F8A83; /* tertiary/meta text, 5.6:1 on ground */
  --rule: #2A2A2A;
  --rule-hi: #3A3A3A;
  --radius: 2px;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 72rem;
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.6rem + 3vw, 4.25rem);

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(201, 162, 39, 0.45);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--bone); text-decoration-color: var(--crimson); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

::selection { background: var(--crimson); color: var(--bone); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: 0.03em; }
p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
strong { color: var(--bone); font-weight: 600; }

code, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code {
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.08em 0.38em;
  color: var(--bone);
  overflow-wrap: anywhere;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--gold);
  color: var(--ground);
  padding: 0.6rem 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--ground); }

/* ---------- Header ---------- */

.site-header {
  border-top: 2px solid var(--crimson);
  border-bottom: 1px solid var(--rule);
  background: rgba(10, 10, 10, 0.92);
  position: relative;
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--bone);
  text-decoration: none;
  padding-block: 0.75rem;
}
.brand:hover { color: var(--bone); }
.brand-mark { width: 1.9rem; height: 1.9rem; flex: none; }
.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--bone-3);
  margin-top: 0.35rem;
  text-transform: lowercase;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}
.site-nav a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--bone); border-bottom-color: var(--rule-hi); }
.site-nav a[aria-current="page"] {
  color: var(--bone);
  border-bottom-color: var(--crimson);
}

@media (max-width: 40rem) {
  .site-header .wrap { gap: 0; padding-bottom: 0.25rem; }
  .site-nav { width: 100%; border-top: 1px solid var(--rule); }
  .site-nav ul { justify-content: space-between; }
  .site-nav a { padding: 0.75rem 0; font-size: 0.72rem; letter-spacing: 0.12em; }
}

/* ---------- Shared bits ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--crimson);
  flex: none;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--bone-2);
  max-width: 60ch;
}

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section + .section { border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.25rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.section-num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--crimson-hi);
  letter-spacing: 0.1em;
}
.section-head h2 { margin: 0; }

.gold-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--gold), rgba(201, 162, 39, 0) 70%);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--crimson); color: var(--bone); border-color: var(--crimson); }
.btn-primary:hover { background: #A50D26; border-color: #A50D26; color: var(--bone); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--rule-hi); }
.btn-ghost:hover { border-color: var(--gold); color: var(--bone); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 40rem) { .btn-row .btn { flex: 1 1 100%; justify-content: center; } }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  position: relative;
}
.card h3 { margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--bone-2); }

.card-accent::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 2.5rem;
  height: 2px;
  background: var(--crimson);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius);
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}
.tag-crimson { color: #FF6B7F; border-color: rgba(200, 16, 46, 0.6); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 10vw, 8rem) clamp(3rem, 8vw, 6rem);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(60rem, 120vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(200, 16, 46, 0.16), rgba(200, 16, 46, 0) 70%);
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}
.hero h1 { margin-bottom: 1.5rem; font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.75rem); }
.hero h1 .accent { color: var(--gold); }
.hero h1 .line { display: block; }

.hero-emblem {
  justify-self: center;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  position: relative;
}
.hero-emblem svg { width: 100%; height: 100%; }

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-emblem { display: none; }
}

.page-hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: min(44rem, 110vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(200, 16, 46, 0.12), rgba(200, 16, 46, 0) 70%);
  z-index: -1;
}
.page-hero h1 { margin-bottom: 1rem; max-width: 15ch; }
.page-hero .lead { max-width: 52ch; }
.page-hero .wrap { position: relative; }
.page-hero::before { inset: auto; right: 4%; top: 50%; transform: translateY(-50%); }
.hero-glyph {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 4rem + 10vw, 14rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201, 162, 39, 0.55);
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
.hero-glyph-mark { width: clamp(9rem, 5rem + 8vw, 13rem); height: auto; opacity: 0.85; }
@media (max-width: 60rem) { .hero-glyph { display: none; } }

/* ---------- Home: operator ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}
@media (max-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr); } }

.facts {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  border-top: 1px solid var(--rule);
}
.facts li {
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.15rem;
  align-content: start;
}
.facts .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-3);
}
.facts .v { color: var(--bone); font-weight: 500; }

/* Flow diagram: local ↔ cloud */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 1rem;
}
.flow-node {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.flow-node .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.flow-node h3 { margin-bottom: 0.75rem; }
.flow-node ul { margin: 0; padding-left: 1.1rem; color: var(--bone-2); }
.flow-node li + li { margin-top: 0.35rem; }
.flow-node li::marker { color: var(--crimson); }
.flow-link {
  display: grid;
  place-items: center;
  padding-inline: 1rem;
  color: var(--bone-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  min-width: 7rem;
  align-content: center;
  gap: 0.25rem;
}
.flow-link .line {
  width: 100%;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.flow-label { color: var(--gold); padding: 0.75rem 0; line-height: 1.6; max-width: 6.5rem; }
@media (max-width: 52rem) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-link { padding: 0.75rem 0; min-width: 0; }
  .flow-link { grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
  .flow-link .line { width: 100%; height: 1px; }
  .flow-label { padding: 0; max-width: none; white-space: nowrap; }
}


/* ---------- Stack table ---------- */

.table-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.models {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.models caption {
  text-align: left;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-3);
  border-bottom: 1px solid var(--rule);
}
.models th,
.models td {
  text-align: left;
  vertical-align: top;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.models thead th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--card-2);
}
.models tbody tr:last-child > * { border-bottom: 0; }
.models tbody tr:hover { background: rgba(255, 255, 255, 0.015); }
.models .group-row th {
  background: var(--ground);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  padding-block: 0.75rem;
}
.models .group-row th span {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 400;
  color: var(--bone-3);
  font-size: 0.75rem;
  margin-left: 0.75rem;
}
.models .model {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--bone);
  white-space: nowrap;
}
.models td { color: var(--bone-2); }
.models .role { color: var(--bone); font-weight: 500; }

@media (max-width: 44rem) {
  .models thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .models, .models tbody, .models tr, .models th, .models td { display: block; width: 100%; }
  .models caption { display: block; width: 100%; }
  .models tbody tr { padding: 1rem 1.1rem; border-bottom: 1px solid var(--rule); }
  .models tbody tr:last-child { border-bottom: 0; }
  .models tbody tr.group-row { padding: 0; }
  .models th, .models td { border: 0; padding: 0.2rem 0; }
  .models .group-row th { padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--rule); }
  .models .group-row th span { display: block; margin: 0.2rem 0 0; }
  .models .model { font-size: 1.02rem; margin-bottom: 0.35rem; white-space: normal; overflow-wrap: anywhere; }
  .models td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bone-3);
    margin-top: 0.5rem;
  }
}

.terminal {
  background: #050505;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--bone-3);
  letter-spacing: 0.06em;
}
.terminal-bar .dots { display: flex; gap: 0.4rem; }
.terminal-bar .dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--rule-hi); display: block; }
.terminal-bar .dots i:first-child { background: var(--crimson); }
.terminal pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--bone);
  overflow-x: auto;
  white-space: pre;
}
.terminal pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.terminal .c { color: var(--bone-3); }
.terminal .p { color: var(--crimson-hi); user-select: none; }
.terminal .g { color: var(--gold); }

.two-col {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.path {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

/* ---------- Agents ---------- */

.agents { display: grid; gap: 1rem; }
.agent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 52rem) { .agent { grid-template-columns: minmax(0, 1fr); } }
.agent-top { display: flex; align-items: center; justify-content: flex-start; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.agent-index { font-family: var(--font-mono); font-size: 0.75rem; color: var(--bone-3); letter-spacing: 0.1em; }
.agent-name { font-size: var(--step-2); margin-bottom: 0.35rem; }
.agent-addr {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--gold);
  overflow-wrap: anywhere;
  margin: 0;
}
.agent-body h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-3);
  margin: 0 0 0.5rem;
}
.agent-body p { color: var(--bone); margin-bottom: 1rem; }
.agent-body ul { margin: 0; padding-left: 1.1rem; color: var(--bone-2); }
.agent-body li + li { margin-top: 0.3rem; }
.agent-body li::marker { color: var(--crimson); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: var(--radius);
  padding: 0.22rem 0.6rem;
}
.status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  counter-reset: rule;
}
.rules li {
  counter-increment: rule;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--bone-2);
}
.rules li::before {
  content: counter(rule, upper-roman);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--crimson-hi);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.rules strong { display: block; color: var(--bone); margin-bottom: 0.25rem; }

/* ---------- Contact ---------- */

.contact-card {
  max-width: 44rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
}
.contact-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-3);
  margin: 0 0 0.75rem;
}
.address-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}
.address {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 0.85rem + 1.2vw, 1.6rem);
  font-weight: 500;
  color: var(--bone);
  overflow-wrap: anywhere;
  user-select: all;
  margin: 0;
}
.copy-btn { min-width: 8.5rem; justify-content: center; }
.copy-btn svg { width: 1rem; height: 1rem; }
.copy-btn[data-state="copied"] { background: var(--gold); border-color: var(--gold); color: var(--ground); }
.copy-status { min-height: 1.5em; margin: 0.5rem 0 -0.5rem; font-size: 0.9rem; color: var(--bone-3); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 52rem) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; max-width: 44rem; }
.notes li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.5rem; color: var(--bone-2); }
.notes li::before { content: "—"; color: var(--crimson-hi); }

/* ---------- 404 ---------- */

.lost {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding-block: 4rem;
}
.lost .code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 3rem + 12vw, 11rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}

/* ---------- CTA band ---------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta h2 { margin: 0; font-size: var(--step-2); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem;
  margin-top: auto;
  background: #070707;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.footer-line {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--bone);
}
.footer-line .mm { letter-spacing: 0.24em; font-weight: 700; }
.footer-line .dot { color: var(--crimson-hi); }
.footer-line .dash { color: var(--bone-3); margin-inline: 0.35em; }
.footer-line .motto { color: var(--gold); }
@media (max-width: 40rem) {
  .footer-line .tail { display: block; margin-top: 0.4rem; }
  .footer-line .dash { margin-left: 0; }
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bone-3);
  margin: 0;
  letter-spacing: 0.04em;
}
.footer-meta a { color: var(--bone-2); text-decoration-color: var(--rule-hi); }

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; }
.muted { color: var(--bone-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */

@media print {
  @page { margin: 16mm; }
  :root {
    --ground: #fff; --card: #fff; --card-2: #f4f4f4; --bone: #000; --bone-2: #222; --bone-3: #555;
    --rule: #ccc; --rule-hi: #999; --gold: #6b5410; --crimson-hi: #8f0b21;
  }
  :root { color-scheme: light; }
  html { background: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; display: block; }
  .site-nav, .skip-link, .btn-row, .copy-btn, .copy-status, .hero-emblem, .cta .btn { display: none !important; }
  .site-header { border-top-color: #000; background: #fff; }
  .hero::before, .page-hero::before { display: none; }
  .hero, .page-hero, .section { padding-block: 1.25rem; }
  .card, .flow-node, .rules li, .contact-card, .terminal, .models tr { break-inside: avoid; background: #fff; }
  .hero-glyph { display: none !important; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .section-num, .eyebrow { break-after: avoid; }
  .models { table-layout: fixed; }
  .models thead th:nth-child(1) { width: 30%; }
  .models thead th:nth-child(2) { width: 18%; }
  .models .model { white-space: normal; overflow-wrap: anywhere; font-size: 0.85em; }
  .table-wrap { background: #fff; overflow: visible; }
  .split, .hero-grid, .contact-grid { display: block; }
  .split .section-head { margin-bottom: 1rem; }
  .section-head { display: block; }
  .terminal { background: #f4f4f4; }
  .terminal pre { white-space: pre-wrap; color: #000; }
  a { color: #000; text-decoration: underline; }
  main a[href^="http"]::after,
  main a[href^="/"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .lost .code { color: #000; -webkit-text-stroke: 0; }
  .site-footer { background: #fff; }
  h1, h2, h3 { break-after: avoid; }
}
