:root {
  --ink-950: #090a0a;
  --ink-900: #101111;
  --ink-850: #151616;
  --ink-800: #1b1c1c;
  --ink-700: #292a29;
  --bone-100: #f0ebe1;
  --bone-300: #cbc4b8;
  --bone-500: #968f84;
  --cinnabar-500: #b83a30;
  --cinnabar-400: #dc594d;
  --brass-400: #b9a071;
  --line: rgba(224, 213, 194, 0.16);
  --content: 1180px;
  --reading: 760px;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.42);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body {
  margin: 0;
  background:
    linear-gradient(rgba(9, 10, 10, .94), rgba(9, 10, 10, .98)),
    url('/assets/ink-noise.svg'),
    var(--ink-950);
  color: var(--bone-300);
  font: 16px/1.75 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--cinnabar-500); color: #fff; }
a { color: var(--brass-400); text-underline-offset: .25em; }
a:hover { color: var(--bone-100); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  color: var(--bone-100);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.12;
}
h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 5.8rem); }
h2 { margin: 0 0 .75em; font-size: clamp(1.8rem, 3.4vw, 3rem); }
h3 { margin: 0 0 .55em; font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1.15em; }
strong { color: var(--bone-100); }

:focus-visible { outline: 2px solid var(--cinnabar-400); outline-offset: 4px; }
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 200;
  transform: translateY(-180%);
  background: var(--bone-100);
  color: var(--ink-950);
  padding: .7rem 1rem;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(100% - 48px, var(--content)); margin-inline: auto; }
.reading-width { max-width: var(--reading); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 10, .9);
  backdrop-filter: blur(18px) saturate(120%);
}
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 30px; }
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--bone-100);
  font: 600 1rem/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}
.site-brand small {
  display: block;
  margin-top: 5px;
  color: var(--brass-400);
  font: 700 .58rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .2em;
}
.site-mark, .seal {
  display: grid;
  place-items: center;
  border: 1px solid var(--cinnabar-400);
  color: #e3b6ad;
  font-family: Georgia, serif;
  box-shadow: inset 0 0 0 3px rgba(184, 58, 48, .12);
}
.site-mark { width: 40px; height: 40px; font-size: 1.45rem; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-nav a {
  position: relative;
  color: var(--bone-300);
  font-size: .77rem;
  font-weight: 750;
  letter-spacing: .025em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -11px;
  left: 0;
  height: 1px;
  background: var(--cinnabar-400);
  content: "";
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .2s ease, transform .2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--bone-100); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { opacity: 1; transform: scaleX(1); }
.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--bone-100);
  min-width: 44px;
  min-height: 44px;
  padding: .6rem .8rem;
  font: inherit;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.context-bar { border-bottom: 1px solid var(--line); background: rgba(21, 22, 22, .88); }
.context-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-block: 9px;
  color: var(--bone-500);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.context-inner span:last-child { color: var(--brass-400); }

main { min-height: 68vh; }
.page-content { padding-block: 42px 88px; }
.breadcrumb { margin-bottom: 30px; color: var(--bone-500); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.breadcrumb a { color: var(--brass-400); text-decoration: none; }
.breadcrumb span { margin-inline: .55em; color: var(--cinnabar-400); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  color: var(--cinnabar-400);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.eyebrow::before { width: 30px; height: 1px; background: currentColor; content: ""; }
.page-hero {
  position: relative;
  margin-bottom: 48px;
  padding: clamp(34px, 6vw, 70px) clamp(24px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(41, 42, 41, .62), rgba(16, 17, 17, .95));
  box-shadow: var(--shadow-lg);
}
.page-hero::after {
  position: absolute;
  top: -35%;
  right: -5%;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(184, 58, 48, .16);
  border-radius: 50%;
  content: "";
}
.page-hero h1 { max-width: 920px; font-size: clamp(2.4rem, 5.3vw, 4.7rem); }
.page-hero .lead { max-width: 820px; margin: 24px 0 0; color: var(--bone-300); font-size: clamp(1rem, 1.7vw, 1.14rem); }
.page-code { position: absolute; right: 28px; bottom: 22px; color: rgba(240, 235, 225, .12); font: 700 4.8rem/1 Georgia, serif; }

.home-hero {
  position: relative;
  min-height: min(760px, calc(100vh - 106px));
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0b0c0c url('/assets/phantom-blade-zero-hero.webp') center / cover no-repeat;
}
.home-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 8, 8, .98) 0%, rgba(7, 8, 8, .83) 42%, rgba(7, 8, 8, .16) 76%), linear-gradient(0deg, rgba(7, 8, 8, .86), transparent 45%);
  content: "";
}
.home-hero::after {
  position: absolute;
  right: 3vw;
  bottom: 4vh;
  z-index: -1;
  color: rgba(240, 235, 225, .06);
  content: "影";
  font: 700 clamp(9rem, 24vw, 22rem)/.75 Georgia, serif;
}
.hero-copy { width: min(100% - 48px, 1400px); max-width: none; padding-block: 90px; }
.hero-copy > * { max-width: 760px; }
.hero-copy h1 { text-wrap: balance; text-shadow: 0 5px 40px #000; }
.hero-copy .lead { max-width: 650px; margin: 24px 0 0; color: #d7d0c4; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .8rem 1.25rem;
  border: 1px solid var(--cinnabar-400);
  background: var(--cinnabar-500);
  color: #fff;
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, background-color .2s ease;
}
.button:hover { background: var(--cinnabar-400); color: #fff; transform: translateY(-2px); }
.button--ghost { border-color: rgba(240, 235, 225, .35); background: rgba(9, 10, 10, .58); }

.home-section { padding-block: clamp(62px, 9vw, 110px); border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr minmax(240px, 500px); gap: 40px; align-items: end; margin-bottom: 40px; }
.section-heading p { margin: 0; color: var(--bone-500); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-card, .archive-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(41, 42, 41, .64), rgba(16, 17, 17, .96));
  box-shadow: 0 18px 35px rgba(0, 0, 0, .18);
}
.guide-card { min-height: 270px; display: flex; flex-direction: column; padding: 28px; }
.guide-card::before, .archive-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 2px;
  background: var(--cinnabar-400);
  content: "";
}
.guide-number { margin-bottom: 35px; color: var(--cinnabar-400); font-size: .68rem; font-weight: 850; letter-spacing: .18em; }
.guide-card p { color: var(--bone-500); font-size: .92rem; }
.guide-card a { margin-top: auto; font-size: .73rem; font-weight: 850; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.guide-card a::after { margin-left: .55em; content: "↗"; }
.guide-card:hover { border-color: rgba(220, 89, 77, .55); transform: translateY(-3px); }
.content-stack > * + * { margin-top: 28px; }
.content-panel, .field-note, .archive-card { padding: clamp(22px, 4vw, 38px); }
.content-panel { border: 1px solid var(--line); background: rgba(21, 22, 22, .72); }
.content-panel--lead { border-left: 3px solid var(--cinnabar-500); }
.archive-card { margin-block: 22px; }
.archive-card h2, .archive-card h3 { padding-right: 60px; }
.field-note {
  position: relative;
  border: 1px solid rgba(185, 160, 113, .32);
  background: linear-gradient(135deg, rgba(50, 42, 31, .4), rgba(16, 17, 17, .92));
}
.field-note::before {
  display: block;
  margin-bottom: 16px;
  color: var(--brass-400);
  content: "INTELLIGENCE STATUS";
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .2em;
}
.field-note--page { min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.table-shell { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; color: var(--bone-300); font-size: .88rem; }
th, td { min-width: 115px; padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--ink-700); color: var(--brass-400); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
tr:nth-child(even) td { background: rgba(255, 255, 255, .018); }
ul, ol { padding-left: 1.4rem; }
li { margin-block: .4em; }
blockquote { margin: 28px 0; padding: 22px 26px; border-left: 3px solid var(--cinnabar-500); background: var(--ink-850); color: var(--bone-100); }
.faq-list { margin: 0; }
.faq-list > div { padding: 22px 0; border-bottom: 1px solid var(--line); }
.faq-list dt { margin-bottom: 8px; color: var(--bone-100); font: 600 1.14rem/1.35 Georgia, serif; }
.faq-list dd { margin: 0; color: var(--bone-500); }
details { border-bottom: 1px solid var(--line); padding-block: 17px; }
summary { color: var(--bone-100); font-weight: 750; cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); background: #080909; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding-block: 45px; }
.footer-copy { max-width: 760px; color: var(--bone-500); font-size: .78rem; }
.footer-copy strong { display: block; margin-bottom: 7px; font: 600 1rem Georgia, serif; letter-spacing: .06em; }
.seal { width: 56px; height: 56px; font-size: 1.8rem; }

@media (max-width: 960px) {
  .site-nav { gap: 12px; }
  .site-nav a { font-size: .7rem; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { grid-template-columns: 1fr; gap: 10px; }
  .home-hero { min-height: 650px; background-position: 62% center; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 78px; }
  .shell { width: min(100% - 32px, var(--content)); }
  .header-inner { min-height: 66px; flex-wrap: wrap; gap: 0; }
  .site-brand { font-size: .86rem; }
  .site-brand small { letter-spacing: .14em; }
  .site-mark { width: 36px; height: 36px; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 12px 0 18px; }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--line); font-size: .77rem; }
  .site-nav a::after { display: none; }
  .context-inner { white-space: nowrap; overflow: hidden; }
  .context-inner span:first-child { display: none; }
  .page-content { padding-block: 28px 60px; }
  .breadcrumb { margin-bottom: 20px; }
  .page-hero { margin-bottom: 32px; padding: 34px 22px; }
  .page-code { right: 17px; bottom: 15px; font-size: 3rem; }
  .home-hero { min-height: 620px; background-position: 67% center; }
  .home-hero::before { background: linear-gradient(90deg, rgba(7, 8, 8, .97), rgba(7, 8, 8, .67)), linear-gradient(0deg, rgba(7, 8, 8, .92), transparent 50%); }
  .hero-copy { padding-block: 68px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .home-section { padding-block: 62px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 230px; }
  .footer-inner { grid-template-columns: 1fr auto; gap: 20px; }
  .footer-copy { font-size: .72rem; }
}

@media (max-width: 420px) {
  .site-brand span:last-child { max-width: 190px; white-space: normal; }
  .footer-inner { grid-template-columns: 1fr; }
  .seal { display: none; }
}

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