:root {
  color-scheme: dark;
  --ink: #10100f;
  --panel: #171715;
  --panel-raised: #1c1b18;
  --text: #e8e2d5;
  --muted: #aaa393;
  --dim: #918b7d;
  --gold: #d8bd80;
  --line: rgba(216, 189, 128, .2);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
  --mono: Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--ink); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(ellipse at 51% -16%, rgba(149, 118, 61, .13), transparent 42rem), var(--ink);
  font: 15px/1.7 var(--sans);
  letter-spacing: .01em;
}
button, input { font: inherit; }
a { color: inherit; }
.page-shell { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 10; left: 16px; top: 12px; transform: translateY(-160%); padding: 10px 14px; background: var(--gold); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.topbar { height: 86px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(232,226,213,.08); }
.archive-mark { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--muted); font: 9px/1.45 var(--mono); letter-spacing: .15em; }
.archive-mark svg { width: 35px; fill: none; stroke: var(--gold); stroke-width: .8; }
.archive-mark strong { color: var(--gold); font-weight: 400; }
.topbar-note { color: var(--dim); font: 10px var(--mono); letter-spacing: .05em; }
.topbar-note i { display: inline-block; width: 5px; height: 5px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(216,189,128,.55); }
.intro { padding: 74px 0 42px; text-align: center; }
.eyebrow, .section-index, .tablet-label, .tablet-foot, .folio, .footer { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.eyebrow { margin: 0 0 18px; color: var(--gold); font-size: 10px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font: 400 clamp(48px, 7vw, 72px)/1.1 var(--serif); letter-spacing: .015em; color: #f0e9dc; }
.lead { margin: 0; color: var(--muted); font: 400 17px/1.8 var(--serif); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 27px auto 0; color: var(--gold); }
.ornament span { width: 49px; height: 1px; background: var(--line); }
.ornament b { font-size: 12px; font-weight: 400; }
.artifact { display: grid; grid-template-columns: 1.06fr .94fr; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.018), transparent 45%), rgba(23,23,21,.8); box-shadow: 0 28px 80px rgba(0,0,0,.18); }
.artifact-copy, .entry-card { padding: 40px clamp(25px, 4vw, 54px); }
.artifact-copy { border-right: 1px solid var(--line); }
.section-index { margin-bottom: 15px; color: var(--gold); font-size: 9px; }
.section-index span { padding: 0 5px; color: var(--dim); }
h2 { margin-bottom: 12px; font: 400 25px/1.3 var(--serif); color: #eee7d9; }
.artifact-text, .entry-hint { color: var(--muted); font-size: 13px; line-height: 1.85; }
.artifact-text { max-width: 440px; margin-bottom: 24px; }
.tablet { border: 1px solid rgba(216,189,128,.22); background: radial-gradient(ellipse at 50% 50%, rgba(190,157,92,.09), transparent 75%), #141412; padding: 18px 20px 14px; }
.tablet-label { margin-bottom: 12px; color: var(--dim); font-size: 8px; }
.mark-table { width: min(100%, 304px); margin: 0 auto; border-collapse: collapse; table-layout: fixed; color: #d6c79f; }
.mark-table td { height: 43px; border: 1px solid rgba(216,189,128,.13); text-align: center; font: 13px var(--mono); color: #d4c79f; }
.mark-table tr:first-child td, .mark-table tr:last-child td { color: var(--gold); }
.mark-table tr td:first-child, .mark-table tr td:last-child { color: #c3ac73; }
.tablet-foot { margin: 12px 0 0; color: var(--dim); text-align: center; font-size: 8px; letter-spacing: .09em; }
.tablet-foot span { color: var(--gold); padding-right: 5px; }
.entry-card { position: relative; display: flex; flex-direction: column; justify-content: center; }
.entry-seal { width: 42px; height: 42px; margin: 0 0 26px; display: grid; place-items: center; border: 1px solid rgba(216,189,128,.38); border-radius: 50%; }
.entry-seal span { width: 20px; height: 20px; border: 1px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 0 5px var(--panel), inset 0 0 0 6px rgba(216,189,128,.72); }
.entry-card .section-index { margin-bottom: 12px; }
.entry-card h2 { max-width: 300px; font-size: 28px; }
.entry-hint { margin-bottom: 24px; }
form label { display: block; margin-bottom: 8px; color: #d8d0c0; font-size: 11px; }
.input-row { display: flex; gap: 8px; }
input { width: 100%; min-width: 0; min-height: 48px; border: 1px solid rgba(216,189,128,.33); border-radius: 0; padding: 0 13px; outline: none; color: var(--text); background: rgba(0,0,0,.24); }
input::placeholder { color: #898374; }
input:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button { flex: none; min-height: 48px; padding: 0 16px; border: 1px solid var(--gold); color: #18150e; background: var(--gold); cursor: pointer; font-size: 11px; font-weight: 700; transition: background .18s ease, color .18s ease; }
button:hover { color: var(--gold); background: transparent; }
button span { margin-left: 7px; }
.field-help { margin: 7px 0 0; color: var(--dim); font-size: 10px; }
.feedback { min-height: 25px; margin: 10px 0 0; color: var(--gold); font-size: 12px; }
.feedback[data-state="error"] { color: #e2a89d; }
.feedback[data-state="success"] { color: #d7ca9e; }
.hint-disclosure { margin-top: 17px; border-top: 1px solid rgba(232,226,213,.1); padding-top: 14px; }
.hint-disclosure summary { width: fit-content; color: #c9b782; cursor: pointer; font-size: 11px; }
.hint-disclosure p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.story-panel { margin: 36px 0 0; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.018), transparent 45%), rgba(23,23,21,.92); box-shadow: 0 28px 80px rgba(0,0,0,.18); }
.story-panel > p:not(.section-index):not(.eyebrow) { max-width: 720px; color: var(--muted); }
.story-panel h2 { font-size: clamp(30px, 4vw, 42px); }
.story-panel [tabindex="-1"]:focus { outline: 2px solid var(--gold); outline-offset: 6px; }
.path-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.path-button { display: flex; min-height: 112px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 18px 20px; text-align: left; color: var(--text); background: var(--panel-raised); }
.path-button strong { font: 400 21px var(--serif); }
.path-button span { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.blue-path { border-color: #83b9d3; }
.blue-path strong { color: #a6d7ec; }
.red-path { border-color: #c9786e; }
.red-path strong { color: #e9a095; }
.path-button:hover { background: transparent; }
.confidential-note { margin-top: 24px; padding: 16px 18px; border-left: 2px solid var(--gold); background: rgba(216,189,128,.06); font-size: 12px; }
.confidential-note strong { color: var(--gold); }
.signature { color: var(--gold) !important; font: italic 23px var(--serif); }
.story-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.secondary-button { color: var(--gold); background: transparent; }
.secondary-button:hover { color: var(--ink); background: var(--gold); }
.interstice-transition { position: fixed; z-index: 20; inset: 0; display: grid; align-content: center; justify-items: center; gap: 26px; padding: 24px; background: #080808; text-align: center; }
.is-transitioning .interstice-transition { visibility: visible; }
.interstice-transition:focus { outline: none; }
.transition-caption { margin: 0; color: var(--dim); font: 9px var(--mono); letter-spacing: .2em; animation: caption-in .7s ease both; }
.transition-sigil { color: var(--gold); font: 400 clamp(54px, 12vw, 100px)/1 var(--serif); text-shadow: 0 0 32px rgba(216,189,128,.42); animation: sigil-emerge 1.5s ease both; }
.transition-reveal { animation: caption-in 1s ease 1.2s both; }
.is-transitioning .page-shell { visibility: hidden; }
.accept-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--gold); color: #18150e; background: var(--gold); font-size: 12px; font-weight: 700; text-decoration: none; }
.accept-button[aria-disabled="true"] { color: var(--dim); border-color: rgba(216,189,128,.25); background: rgba(216,189,128,.06); cursor: not-allowed; }
.accept-button:not([aria-disabled="true"]):hover { color: var(--gold); background: transparent; }
.accept-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.invitation-actions { align-items: center; }
.invitation-actions .field-help { margin: 0; }
.afterword { padding: 35px 0 31px; text-align: center; }
.afterword-rule { display: block; width: 28px; height: 1px; margin: 0 auto 19px; background: var(--gold); opacity: .7; }
.afterword p { margin: 0 0 9px; color: #d5cbb7; font: 400 19px var(--serif); }
.folio { color: var(--dim); font-size: 8px; }
.footer { min-height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid rgba(232,226,213,.08); color: #827c70; font-size: 8px; }
.footer > span:first-child > span { color: var(--gold); padding: 0 5px; }
.demo-label { color: var(--gold); letter-spacing: .08em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes caption-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sigil-emerge { 0% { opacity: 0; transform: scale(.72) rotate(-18deg); filter: blur(8px); } 55% { opacity: .9; filter: blur(0); } 100% { opacity: 1; transform: scale(1) rotate(0); } }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 36px, 560px); }
  .topbar { height: 68px; }
  .intro { padding: 54px 0 32px; }
  .lead { font-size: 15px; }
  .artifact { grid-template-columns: 1fr; }
  .artifact-copy, .entry-card { padding: 29px 24px; }
  .artifact-copy { border-right: 0; border-bottom: 1px solid var(--line); }
  .entry-card { padding-top: 30px; }
  .path-options { grid-template-columns: 1fr; }
  .entry-seal { margin-bottom: 19px; }
  .tablet { padding: 15px 14px 12px; }
  .mark-table { max-width: 275px; }
  .mark-table td { height: clamp(37px, 10vw, 43px); }
  .afterword { padding: 29px 0; }
}
@media (max-width: 390px) {
  .page-shell { width: calc(100% - 28px); }
  .topbar-note { font-size: 8px; }
  .artifact-copy, .entry-card { padding-left: 19px; padding-right: 19px; }
  .input-row { flex-direction: column; }
  button { width: 100%; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .transition-caption, .transition-sigil { animation: none !important; opacity: 1; transform: none; filter: none; }
}
@media (forced-colors: active) {
  .artifact, .tablet, input, button, .entry-seal { border: 1px solid CanvasText; }
  .mark-table td { border-color: CanvasText; }
}
