/* The Wayward Sun — site styles */
/* Fonts are hosted on the site (SIL Open Font License). */
@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/michroma-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/literata-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/literata-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/literata-latin-400-italic.woff2) format('woff2'); }
:root {
  --bg: #060912;
  --panel: #0D1322;
  --panel-deep: #0A0F1C;
  --line: #1E2740;
  --line-soft: #1A2133;
  --line-strong: #26314D;
  --text: #E9ECF2;
  --text-2: #C9D0DC;
  --muted: #A3ACBD;
  --muted-2: #8E9AB0;
  --blue: #9FB4D3;
  --ring: #7FB6F0;
  --gold: #E8B54A;
  --gold-hi: #F5CF7A;
  --red: #E07A7D;
  --red-line: #6B2F31;
  --gutter: clamp(16px, 4vw, 56px);
  --display: 'Michroma', sans-serif;
  --body: 'Barlow', sans-serif;
  --serif: 'Literata', Georgia, serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--gold); color: #1A1206; padding: 8px 12px; z-index: 100; }

.wrap { max-width: 1240px; margin: 0 auto; }
.display { font-family: var(--display); font-weight: 400; }
.gold { color: var(--gold); }
.eyebrow { font-family: var(--display); font-size: 12px; letter-spacing: 0.36em; color: var(--gold); }
.muted { color: var(--muted); }

/* header / footer */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 20px var(--gutter); border-bottom: 1px solid var(--line-soft); }
.wordmark { font-family: var(--display); font-size: 15px; letter-spacing: 0.32em; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 500; letter-spacing: 0.06em; }
.site-nav a { color: var(--text-2); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-footer { border-top: 1px solid var(--line-soft); padding: 40px var(--gutter); margin-top: clamp(56px, 7vw, 104px); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; font-size: 14px; color: var(--muted); }
.publisher { display: flex; align-items: center; gap: 14px; }
.publisher img { width: 44px; height: 44px; display: block; }
.publisher b { display: block; font-family: var(--display); font-weight: 400; font-size: 11px; letter-spacing: 0.28em; color: var(--text); }
.publisher span { display: block; font-size: 12px; letter-spacing: 0.22em; color: var(--ring); margin-top: 4px; }
.signout { color: var(--muted); font-size: 14px; }

/* backgrounds */
.stars { background-color: var(--bg); background-image: linear-gradient(180deg, rgba(6,9,18,.25) 0%, rgba(6,9,18,.45) 60%, rgba(6,9,18,1) 100%), url(/img/starfield.jpg); background-size: cover; background-position: center bottom; }
.stars-hero { background-color: var(--bg); background-image: linear-gradient(180deg, rgba(6,9,18,0) 70%, rgba(6,9,18,1) 100%), linear-gradient(90deg, rgba(6,9,18,.6) 0%, rgba(6,9,18,.15) 55%, rgba(6,9,18,0) 100%), url(/img/starfield.jpg); background-size: cover; background-position: center bottom; }

/* sections */
.section { padding: clamp(48px, 6vw, 88px) var(--gutter) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: 0.14em; }
.section-head .note { font-size: 15px; color: var(--blue); }
.page-head { padding: clamp(64px, 8vw, 120px) var(--gutter) clamp(32px, 4vw, 56px); }
.page-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.page-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.4vw, 60px); line-height: 1.1; letter-spacing: 0.05em; }
.lede { margin: 0; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--text-2); max-width: 760px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chips a { color: var(--text-2); text-decoration: none; border: 1px solid var(--line-strong); padding: 8px 14px; font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
.chips a:hover { border-color: var(--gold); color: #fff; }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; font-size: 16px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; border-radius: 2px; }
.btn-gold { background: var(--gold); color: #1A1206; }
.btn-gold:hover { background: var(--gold-hi); color: #1A1206; }
.btn-line { border: 1px solid #5A6884; color: var(--text); font-weight: 500; }
.btn-line:hover { border-color: var(--gold); color: var(--text); }

.card { padding: 24px 26px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.card h3, .h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: 0.2em; color: var(--gold); }
.card p, .p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.55; color: var(--text-2); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.frame { display: block; width: 100%; height: auto; border: 1px solid #A7B2C8; outline: 1px solid rgba(232,181,74,.6); outline-offset: 12px; box-shadow: 0 0 60px rgba(127,182,240,.18), 0 40px 100px rgba(0,0,0,.85); }
.cap { font-size: 13px; letter-spacing: 0.12em; color: var(--muted-2); }

/* redaction */
.stamp { display: inline-block; font-family: var(--display); font-size: 10px; letter-spacing: 0.22em; color: var(--red); border: 1px solid var(--red-line); padding: 3px 7px; line-height: 1.3; white-space: nowrap; }
.bar { display: inline-block; height: 11px; background: var(--line); vertical-align: middle; }

/* home */
.hero { padding: clamp(48px, 8vw, 120px) var(--gutter); }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 64px clamp(56px, 8vw, 128px); }
.hero-text { flex: 1 1 420px; max-width: 600px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.05; display: flex; flex-direction: column; gap: 6px; }
.hero h1 .the { font-size: clamp(18px, 1.8vw, 26px); letter-spacing: 0.5em; color: var(--text-2); }
.hero h1 .w { font-size: clamp(36px, 4.6vw, 64px); letter-spacing: 0.06em; }
.hero h1 .s { font-size: clamp(36px, 4.6vw, 64px); letter-spacing: 0.22em; color: var(--gold); }
.hero .logline { margin: 0; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--text-2); }
.hero-cover { flex: 0 1 460px; min-width: 260px; padding: 14px; display: flex; justify-content: center; }
.hero-cover img { max-width: 460px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.status-line { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--blue); letter-spacing: 0.04em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }

.gauges { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 14px 24px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.gauge.current { border-color: var(--gold); }
.gauge .ring { position: relative; width: 132px; height: 132px; }
.gauge svg { display: block; transform: rotate(-90deg); }
.gauge .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; }
.gauge .pct.zero { color: var(--muted-2); }
.gauge .label { font-family: var(--display); font-size: 12px; letter-spacing: 0.16em; }
.gauge .note { font-size: 15px; color: var(--muted); }

.feature { display: flex; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; overflow: hidden; }
.feature:hover { border-color: var(--gold); color: inherit; }
.feature .art { flex: 1 1 560px; min-width: 0; overflow: hidden; }
.feature .art img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; transition: transform .4s ease; }
.feature:hover .art img { transform: scale(1.03); }
.feature .body { flex: 1 1 360px; min-width: 0; padding: clamp(24px, 3vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.feature h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: 0.06em; color: var(--text); }
.feature p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.feature .more { font-size: 16px; font-weight: 600; color: var(--gold); }

.band { padding: clamp(80px, 10vw, 160px) var(--gutter); margin-top: clamp(48px, 6vw, 88px); background-color: var(--bg); background-image: linear-gradient(180deg, rgba(6,9,18,.55), rgba(6,9,18,.88)), url(/img/corridor-mouth.jpg); background-size: cover; background-position: center; }
.band .wrap { display: flex; flex-direction: column; gap: 24px; }
.band h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 56px); letter-spacing: 0.06em; }
.band p { margin: 0; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: #DCE1EA; max-width: 640px; }

.thumbs { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.thumbs figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border: 1px solid var(--line); }
.thumbs figcaption { font-size: 14px; color: var(--muted); letter-spacing: 0.04em; }

/* dossier cards */
.dossier-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.dcard { display: flex; gap: 18px; padding: 14px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; }
a.dcard:hover { border-color: var(--gold); color: inherit; }
.dcard .pic { position: relative; flex: 0 0 104px; width: 104px; height: 140px; overflow: hidden; background: var(--panel-deep); }
.dcard .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; filter: grayscale(.2); }
.dcard .pic .over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dcard .pic .over .stamp { background: rgba(6,9,18,.85); }
.dcard .pic.sealed { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #0A0F1C 0 8px, #0D1322 8px 16px); border: 1px solid var(--line); }
.dcard .info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.dcard .name { font-family: var(--display); font-size: 14px; letter-spacing: 0.05em; line-height: 1.35; }
.dcard .aff, .dcard .status, .dcard .extra { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dcard .aff { color: var(--blue); }
.dcard .status { color: var(--gold); }
.dcard .extra { color: var(--muted-2); }
.dcard .line { font-size: 15px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.dcard .bars { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.dcard.wide { padding: 0; flex-wrap: wrap; gap: 0; }
.dcard.wide > img { flex: 1 1 420px; min-width: 0; width: 100%; max-height: 300px; object-fit: cover; display: block; }
.dcard.wide .info { flex: 1 1 380px; padding: clamp(20px, 3vw, 36px); justify-content: center; gap: 10px; }
.dcard.wide .name { font-size: clamp(20px, 2vw, 26px); }

/* dossier page */
.file-top { padding: clamp(32px, 4vw, 56px) var(--gutter) clamp(40px, 5vw, 72px); }
.file-top .wrap { display: flex; flex-direction: column; gap: 28px; }
.crumbs { font-size: 13px; letter-spacing: 0.14em; color: var(--blue); }
.crumbs a { color: var(--blue); text-decoration: none; }
.crumbs span { color: #4A5878; }
.file-split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px clamp(40px, 6vw, 88px); }
.file-pic { flex: 0 1 400px; min-width: 260px; padding: 12px; }
.file-pic.wide { flex: 1 1 560px; }
.file-pic img { outline-offset: 10px; box-shadow: none; }
.file-main { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.file-main h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4vw, 56px); line-height: 1.1; letter-spacing: 0.05em; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 12px 28px; padding: 22px 24px; background: rgba(13,19,34,.85); border: 1px solid var(--line); font-size: 16px; align-items: center; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--blue); text-transform: uppercase; }
.facts dd { margin: 0; }
.facts dd.status { color: var(--gold); font-weight: 600; }
.quote { margin: 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold); display: flex; flex-direction: column; gap: 8px; }
.quote p { margin: 0; font-family: var(--display); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; letter-spacing: 0.03em; }
.quote cite { font-style: normal; font-size: 13px; letter-spacing: 0.14em; color: var(--blue); text-transform: uppercase; }
.kv { display: flex; flex-direction: column; gap: 4px; }
.kv span:first-child { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--blue); }
.kv span:last-child { font-size: 17px; line-height: 1.5; color: var(--text-2); }
.histories { margin: 0; padding: 0; list-style: none; }
.histories li { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.histories li.pending { border-bottom-style: dashed; border-color: var(--line); color: #6F7C95; }
.histories .when { flex: 0 0 200px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.histories .when b { font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: 0.28em; }
.histories a.when b { color: var(--gold); }
.histories .when span { font-size: 15px; color: var(--text-2); }
.histories li.pending .when span { color: #6F7C95; }
.histories p { flex: 1 1 420px; min-width: 0; margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.histories .bars { flex: 1 1 420px; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.classified { padding: 26px 28px; background: var(--panel); border: 1px solid #3A2226; display: flex; flex-direction: column; gap: 18px; }
.classified .facts { background: none; border: 0; padding: 0; }
.classified dd { display: flex; align-items: center; gap: 12px; }
.pager { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pager a, .pager div { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: inherit; }
.pager a:hover { border-color: var(--gold); color: inherit; }
.pager .k { font-size: 13px; letter-spacing: 0.14em; color: var(--blue); }
.pager .t { font-family: var(--display); font-size: 15px; letter-spacing: 0.06em; }
.pager .next { text-align: right; }
.pager div { border-style: dashed; border-color: var(--line-strong); background: none; color: var(--muted-2); }
.pager div .k { color: var(--muted-2); }

/* chapter */
.ch-head { padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(40px, 5vw, 64px); }
.ch-head .wrap { max-width: 680px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.ch-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 52px); line-height: 1.15; letter-spacing: 0.06em; }
.ch-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; font-size: 14px; letter-spacing: 0.06em; color: var(--blue); }
.ch-art { margin: 0 auto; padding: 0 var(--gutter); max-width: 1000px; }
.ch-art img { width: 100%; height: auto; display: block; border: 1px solid #A7B2C8; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.prose { max-width: 680px; margin: 0 auto; padding: clamp(40px, 5vw, 72px) 0 0; font-family: var(--serif); font-size: clamp(18px, 1.3vw, 20px); line-height: 1.78; color: #D8DDE6; }
.prose-wrap { padding: 0 clamp(20px, 4vw, 56px); }
.prose p { margin: 0 0 0.55em; text-indent: 1.6em; }
.prose p:first-child { text-indent: 0; }
.prose p:first-child::first-letter { font-family: var(--display); color: var(--gold); font-size: 2.6em; float: left; line-height: 1; padding: 6px 10px 0 0; }
.prose p.break { text-indent: 0; text-align: center; color: var(--muted-2); letter-spacing: 0.5em; margin: 1.2em 0; }
.tbc { max-width: 680px; margin: clamp(48px, 6vw, 72px) auto 0; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 0 var(--gutter); }
.tbc .rule { display: flex; align-items: center; gap: 14px; width: 100%; }
.tbc .rule i { flex: 1 1 auto; height: 1px; background: var(--line-strong); }
.tbc .rule b { font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: 0.36em; color: var(--gold); }
.tbc p { margin: 0; font-size: 16px; color: var(--muted); }

/* chapters list */
.ch-list { margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.ch-row { display: flex; align-items: center; gap: 18px; padding: 12px 18px; min-height: 89px; border: 1px solid #161D2E; }
.ch-row .n { font-family: var(--display); font-size: 15px; color: #56627A; flex: 0 0 34px; }
.ch-row .t { flex: 1 1 auto; min-width: 0; font-size: 17px; color: var(--muted-2); display: flex; align-items: center; gap: 12px; }
.ch-row .s { font-size: 12px; letter-spacing: 0.14em; color: #56627A; white-space: nowrap; }
a.ch-row { padding: 12px 18px 12px 12px; background: var(--panel); border-color: #2A3550; border-left: 3px solid var(--gold); text-decoration: none; color: inherit; }
a.ch-row:hover { border-color: var(--gold); color: inherit; }
a.ch-row img { width: 112px; height: 63px; object-fit: cover; display: block; flex: 0 0 112px; }
a.ch-row .n { color: var(--gold); }
a.ch-row .t { font-family: var(--display); font-size: 15px; letter-spacing: 0.04em; color: var(--text); }
a.ch-row .s { font-weight: 600; letter-spacing: 0.12em; color: var(--gold); }
.ch-row .t .bar { flex: 1 1 auto; max-width: 180px; height: 12px; background: var(--line-soft); }

/* world */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-top: 2px solid var(--gold); background: var(--panel-deep); }
.tbl { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 18px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: 0.16em; color: var(--blue); padding: 12px 16px; border-bottom: 1px solid var(--line-strong); }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); vertical-align: top; line-height: 1.45; }
.tbl td:first-child { color: var(--text); font-weight: 600; }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rules li { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rules b { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--gold); }
.diagram { margin: 0; padding: clamp(16px, 2vw, 28px); background: var(--panel-deep); border: 1px solid var(--line); overflow-x: auto; }
.diagram svg { display: block; width: 100%; height: auto; }
.icon-card { flex-direction: row; gap: 20px; align-items: flex-start; }
.icon-card svg { flex: 0 0 64px; }
.icon-card > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ranks { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ranks li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.ranks b { font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: 0.16em; }
.ranks span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.split > * { flex: 1 1 440px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.gear { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.gear figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gear img { width: 100%; object-fit: cover; display: block; border: 1px solid var(--line); }
.gear figcaption b { display: block; font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: 0.1em; }
.gear figcaption span { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }

/* gallery */
.g-grid { display: grid; gap: 18px; }
.thumb { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.thumb .f { display: block; overflow: hidden; border: 1px solid var(--line); background: var(--panel-deep); }
.thumb img { width: 100%; display: block; transition: transform .4s ease; }
.thumb:hover .f { border-color: var(--gold); }
.thumb:hover img { transform: scale(1.03); }
.thumb:focus-visible .f { outline: 2px solid var(--gold); outline-offset: 3px; }
.thumb span.t { font-size: 15px; letter-spacing: 0.04em; color: var(--text-2); }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(3,5,10,.985); display: none; flex-direction: column; padding: clamp(12px, 3vw, 32px); gap: 16px; }
.viewer.open { display: flex; }
.viewer .top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.viewer .top b { display: block; font-family: var(--display); font-weight: 400; font-size: 11px; letter-spacing: 0.3em; color: var(--gold); }
.viewer .top span { display: block; font-family: var(--display); font-size: clamp(15px, 1.6vw, 20px); letter-spacing: 0.06em; margin-top: 4px; }
.viewer .close { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid #3A4762; color: var(--text); }
.viewer .close:hover { border-color: var(--gold); }
.viewer .stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.viewer .stage img { max-width: 100%; max-height: 100%; object-fit: contain; border: 1px solid var(--line-strong); }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; padding: clamp(32px, 6vw, 80px) var(--gutter) 32px; }
.login main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.login .pair { width: 100%; max-width: 1080px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 56px clamp(56px, 8vw, 112px); }
.login .cover { flex: 0 1 380px; min-width: 240px; padding: 14px; }
.login form { flex: 1 1 360px; max-width: 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 40px); background: rgba(13,19,34,.88); border: 1px solid var(--line-strong); }
.login h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.3; letter-spacing: 0.08em; }
.login label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--blue); margin-bottom: 8px; }
.login input { width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 17px; color: var(--text); background: #070B16; border: 1px solid #3A4762; border-radius: 2px; }
.login input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,181,74,.25); }
.login button { height: 50px; margin-top: 4px; background: var(--gold); color: #1A1206; border: 0; border-radius: 2px; font-family: var(--display); font-size: 13px; letter-spacing: 0.24em; cursor: pointer; }
.login button:hover { background: var(--gold-hi); }
.login .error { display: none; margin: 0; padding: 10px 14px; border: 1px solid var(--red-line); color: var(--red); font-size: 15px; }
.login .error.show { display: block; }
.login footer { display: flex; justify-content: center; align-items: center; gap: 12px; padding-top: 40px; }
.login footer img { width: 32px; height: 32px; opacity: .85; }
.login footer span { font-family: var(--display); font-size: 10px; letter-spacing: 0.28em; color: var(--muted); }

@media (max-width: 640px) {
  .histories .when { flex-basis: 100%; }
  .facts { grid-template-columns: 1fr; gap: 4px 0; }
  .facts dd { margin-bottom: 10px; }
}
@media (max-width: 560px) {
  a.ch-row img { display: none; }
  a.ch-row { padding-left: 14px; }
  .ch-row .s { white-space: normal; text-align: right; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.sealed-pic { width: 100%; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #0A0F1C 0 10px, #0D1322 10px 20px); border: 1px solid #A7B2C8; outline: 1px solid rgba(232,181,74,.6); outline-offset: 10px; }
.thumb .f.sealed { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #0A0F1C 0 10px, #0D1322 10px 20px); }
.tile-static { display: flex; flex-direction: column; gap: 10px; }
.tile-static .t { font-size: 15px; letter-spacing: 0.04em; color: var(--muted-2); }
.thumb .over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.thumb .over .stamp { background: rgba(6,9,18,.85); }
.thumb .f { position: relative; }
.band .chips { margin-top: 4px; }
.band .chips a { background: rgba(6,9,18,.55); }
.page-head .author-head { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 32px 48px; }
.author-photo { margin: 10px; width: 220px; max-width: 60vw; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; outline-offset: 10px; box-shadow: none; }
