/* Human at the Gate — shares the SPHINX Global palette and type */
:root {
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --gold-dim: #8A6E32;
  --black: #080A0C;
  --dark: #0D1117;
  --dark-2: #141B24;
  --dark-3: #1C2733;
  --muted: #8AA3B0;
  --text: #D4C9B8;
  --text-bright: #EDE5D8;
  --line: rgba(201,168,76,0.15);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--text); font-family: var(--font-ui); font-size: 18px; line-height: 1.65; overflow-x: hidden; }
a { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--black); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- Nav (mirrors main site) ---------- */
nav#site-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 20px 60px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(8,10,12,0.98) 0%, rgba(8,10,12,0.85) 70%, rgba(8,10,12,0) 100%);
}
.nav-logo { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--gold); letter-spacing: 0.12em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.nav-logo span { color: var(--text-bright); font-weight: 300; }
.nav-links { display: flex; gap: clamp(14px, 1.6vw, 28px); list-style: none; order: 2; }
.nav-links a { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.3s; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 16px; order: 3; }
.nav-sister { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid rgba(201,168,76,0.3); padding: 10px 16px; text-decoration: none; transition: all 0.3s; white-space: nowrap; }
.nav-sister:hover { border-color: var(--gold); color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid var(--gold-dim); width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { position: absolute; left: 12px; width: 18px; height: 1.5px; background: var(--gold); content: ''; transition: transform 0.25s; }
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after { left: 0; top: 6px; }
nav.open .nav-toggle span { background: transparent; }
nav.open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
nav.open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 60px; position: relative; }
.narrow { max-width: 860px; }
.block { padding-top: 80px; padding-bottom: 20px; }
.label, .eyebrow, .card-id, .crumbs { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.h2 { font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 48px); font-weight: 400; color: var(--text-bright); line-height: 1.1; margin-top: 10px; }
.hero-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(201,168,76,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(201,168,76,0.035) 1px, transparent 1px);
  background-size: 80px 80px; mask-image: radial-gradient(ellipse 75% 75% at 55% 45%, black 0%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 75% 75% at 55% 45%, black 0%, transparent 100%); }

/* ---------- Home hero ---------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; padding: 140px 0 80px;
  background: radial-gradient(ellipse 90% 70% at 65% 35%, rgba(201,168,76,0.09) 0%, transparent 65%), linear-gradient(165deg, var(--black) 0%, #0A0E14 50%, var(--dark) 100%);
  border-bottom: 1px solid var(--line); }
.hero-inner { z-index: 1; }
.hero-title { font-family: var(--font-display); font-size: clamp(52px, 8vw, 112px); font-weight: 300; line-height: 0.98; color: var(--text-bright); margin: 18px 0 22px; }
.hero-title em { color: var(--gold); font-style: italic; }
.byline { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 30px; }
.lede { font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); line-height: 1.5; max-width: 760px; color: var(--text); }
.lede strong { color: var(--gold-light); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.btn-primary, .btn-secondary { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; padding: 16px 30px; text-decoration: none; transition: all 0.3s; }
.btn-primary { background: var(--gold); color: var(--black); }
.btn-primary:hover { background: var(--gold-light); }
.btn-secondary { border: 1px solid var(--gold-dim); color: var(--gold); }
.btn-secondary:hover { border-color: var(--gold); background: rgba(201,168,76,0.08); }

.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.pull { margin: 64px 0 0; padding: 40px 0 40px 40px; border-left: 2px solid var(--gold); }
.pull p { font-family: var(--font-display); font-style: italic; font-size: clamp(26px, 3vw, 40px); line-height: 1.3; color: var(--text-bright); }
.pull cite { display: block; margin-top: 18px; font-family: var(--font-mono); font-style: normal; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-dim); }

.toc { list-style: none; margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 80px; }
.toc a { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 6px; padding: 30px 28px; background: var(--dark); text-decoration: none; height: 100%; transition: background 0.3s; }
.toc a:hover { background: var(--dark-2); }
.toc-n { grid-row: span 2; font-family: var(--font-display); font-size: 38px; color: var(--gold); line-height: 1; }
.toc-t { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--text-bright); line-height: 1.2; }
.toc-d { font-size: 15px; color: var(--muted); line-height: 1.5; }
.toc li:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Inner pages ---------- */
.page-head { position: relative; padding: 150px 0 56px; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 80% 90% at 70% 0%, rgba(201,168,76,0.08) 0%, transparent 60%), linear-gradient(180deg, var(--black), var(--dark)); }
.crumbs { color: var(--gold-dim); }
.crumbs a { color: var(--gold); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(40px, 5.6vw, 76px); line-height: 1.04; color: var(--text-bright); margin-top: 18px; max-width: 980px; }
.article { padding-top: 64px; padding-bottom: 40px; }
.prose p, .prose li { color: var(--text); }
.prose p + p { margin-top: 18px; }
.prose h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); font-weight: 400; color: var(--text-bright); margin: 56px 0 18px; line-height: 1.15; }
.prose strong { color: var(--text-bright); }
.prose em { color: var(--gold-light); }
.intro { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.4; color: var(--text-bright) !important; margin-bottom: 24px; }

.ticks { list-style: none; margin: 18px 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 14px; height: 1px; background: var(--gold); }

.cards { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 32px 0; }
.cards.two { grid-template-columns: 1fr 1fr; }
.card { background: var(--dark); padding: 30px 28px; }
.card h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text-bright); margin: 10px 0 10px; line-height: 1.2; }
.card p:not(.card-id) { font-size: 17px; }
.card .card-id + p { margin-top: 10px; }
.muted-card { background: var(--black); }
.muted-card .card-id { color: var(--muted); }

.policy-box { margin: 56px 0; padding: 34px 36px; background: linear-gradient(135deg, rgba(201,168,76,0.10), rgba(201,168,76,0.02)); border: 1px solid rgba(201,168,76,0.35); }
.policy-box .label { margin-bottom: 14px; }
.policy-box p:not(.label) { font-family: var(--font-display); font-size: clamp(21px, 2.1vw, 26px); line-height: 1.45; color: var(--text-bright); }
.policy-box p + p { margin-top: 14px; }
.policy-box strong { color: var(--gold-light); }
.policy-box .small { font-family: var(--font-ui) !important; font-size: 16px !important; color: var(--muted) !important; }

/* The gate table */
.gate { margin: 40px 0 24px; border: 1px solid var(--line); }
.gate-head, .gate-row { display: grid; grid-template-columns: 1fr 56px 1fr; }
.gate-head > div[role="columnheader"] { padding: 18px 24px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.gate-head > div:first-child { color: var(--muted); background: var(--dark); }
.gate-head > div:last-child { color: var(--black); background: var(--gold); }
.gate-row > div[role="cell"] { padding: 20px 24px; border-top: 1px solid var(--line); font-size: 17px; }
.gate-row .ai { background: var(--dark); color: var(--text); }
.gate-row .human { background: rgba(201,168,76,0.07); color: var(--text-bright); font-weight: 600; }
.gate-bar { position: relative; background: var(--black); border-left: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.gate-head .gate-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); writing-mode: vertical-rl; }
.gate-row .gate-bar { border-top: 1px solid var(--line); }

/* Method steps */
.steps { list-style: none; margin: 40px 0; counter-reset: s; border-left: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 18px 0 18px 0; position: relative; }
.step::before { content: ''; position: absolute; left: -5px; top: 30px; width: 9px; height: 9px; background: var(--black); border: 1px solid var(--gold); transform: rotate(45deg); }
.step-n { font-family: var(--font-display); font-size: 34px; color: var(--gold); line-height: 1; padding-left: 28px; padding-top: 4px; }
.step h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text-bright); line-height: 1.2; }
.step p { color: var(--text); font-size: 17px; margin-top: 4px; }
.step:nth-child(n+4):nth-child(-n+6) h3 { color: var(--gold-light); }

/* TTL chain */
.chain { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 0; margin: 28px 0 8px; counter-reset: c; }
.chain li { counter-increment: c; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-bright); border: 1px solid rgba(201,168,76,0.4); background: var(--dark); padding: 12px 16px; display: flex; align-items: center; }
.chain li::before { content: counter(c, decimal-leading-zero); color: var(--gold); margin-right: 10px; }
.chain li:not(:last-child)::after { content: '→'; color: var(--gold); margin: 0 -26px 0 16px; position: relative; z-index: 1; }
.chain li:not(:last-child) { margin-right: 30px; }
.chain li:last-child { background: var(--gold); color: var(--black); border-color: var(--gold); }
.chain li:last-child::before { color: var(--black); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.chips li { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); border: 1px solid rgba(201,168,76,0.35); padding: 9px 14px; }

/* Commitments */
.commit-list { list-style: none; margin: 32px 0; border-top: 1px solid var(--line); }
.commit-list li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.commit-n { font-family: var(--font-display); font-size: 40px; color: var(--gold); line-height: 1; }
.commit-list p { font-family: var(--font-display); font-size: clamp(21px, 2.1vw, 26px); color: var(--text-bright); line-height: 1.4; }
.revision { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 72px 0 40px; }
.pager a { background: var(--dark); padding: 24px 26px; text-decoration: none; color: var(--text-bright); font-family: var(--font-display); font-size: 21px; line-height: 1.3; transition: background 0.3s; }
.pager a:hover { background: var(--dark-2); }
.pager a span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.pager-next { text-align: right; }

/* Footer (mirrors main site) */
footer { background: var(--black); border-top: 1px solid rgba(201,168,76,0.12); padding: 60px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-top: 40px; }
.footer-logo { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-tagline { font-size: 15px; line-height: 1.7; color: var(--muted); max-width: 340px; margin-bottom: 20px; }
.footer-legal { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: rgba(138,163,176,0.85); line-height: 1.9; max-width: 420px; }
.footer-col-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 15px; color: var(--muted); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  nav#site-nav { padding: 20px 28px; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav-right { order: 2; }
  .nav-links { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; margin-top: 16px; border-top: 1px solid var(--line); }
  nav#site-nav.open { background: rgba(8,10,12,0.98); }
  nav#site-nav.open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 15px 0; font-size: 14px; border-bottom: 1px solid rgba(201,168,76,0.08); }
  .wrap { padding: 0 28px; }
  footer { padding: 48px 28px; }
}
@media (max-width: 820px) {
  .two-col, .toc, .cards.two { grid-template-columns: 1fr; gap: 1px; }
  .two-col { gap: 18px; }
  .toc li:last-child:nth-child(odd) { grid-column: auto; }
  footer { grid-template-columns: 1fr 1fr; }
  footer > div:first-child { grid-column: 1 / -1; }
  .gate-head, .gate-row { grid-template-columns: 1fr; }
  .gate-head .gate-bar, .gate-head > div:last-child { display: none; }
  .gate-row .gate-bar { display: none; }
  .gate-head > div:first-child { display: none; }
  .gate-row { border-top: 1px solid var(--line); }
  .gate-row:first-of-type { border-top: none; }
  .gate-row > div[role="cell"] { border-top: none; }
  .gate-row .ai::before { content: 'AI may'; display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
  .gate-row .human { border-left: 3px solid var(--gold); }
  .gate-row .human::before { content: 'Only the responsible human may'; display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; font-weight: 400; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  nav#site-nav { padding: 14px 16px; }
  .ns-full { display: none; }
  .nav-right { gap: 10px; }
  .nav-logo { font-size: 19px; letter-spacing: 0.08em; }
  .wrap { padding: 0 16px; }
  .hero { padding: 120px 0 60px; min-height: auto; }
  .page-head { padding: 116px 0 40px; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .pull { padding: 24px 0 24px 22px; }
  .toc a { padding: 24px 18px; column-gap: 14px; }
  .toc-n { font-size: 30px; }
  .policy-box { padding: 26px 20px; }
  .card { padding: 24px 18px; }
  .step { grid-template-columns: 60px 1fr; }
  .step-n { padding-left: 20px; font-size: 28px; }
  .chain { flex-direction: column; gap: 0; }
  .chain li { margin-right: 0 !important; }
  .chain li:not(:last-child)::after { content: '↓'; position: absolute; left: 50%; bottom: -19px; margin: 0; }
  .chain li { position: relative; margin-bottom: 18px !important; justify-content: flex-start; }
  .commit-list li { grid-template-columns: 44px 1fr; }
  .commit-n { font-size: 32px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  footer { grid-template-columns: 1fr; padding: 40px 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  nav#site-nav, .pager, footer, .hero-grid, .skip { display: none !important; }
  body { background: #fff; color: #111; }
  .page-head, .hero { padding: 20px 0; background: none; min-height: 0; }
  .page-title, .hero-title, .prose h2, .intro, .card h3, .policy-box p, .commit-list p, .toc-t { color: #111 !important; }
  .card, .toc a, .gate-row .ai { background: #fff; }
}
