/* secretorderofthesentinels.com: colours, type and parts from the Story Hub mockups (reference/artifacts/story-hub-mockups/) */
:root {
  --ink: #1B1B1F; --paper: #F4EFE3; --manila: #E8D7A8; --tab: #D9C08A; --gold: #E3A92B; --gold-d: #A87414;
  --red: #B3261E; --pink: #D1006F; --green: #1F6B3A; --go: #57C27A;
  --night: #26252B; --rule: #3A3940; --muted: #BDB8AC; --dim: #8C8A93; --line: #6A6870; --soft: #E9E4D8; --body2: #2E2C28; --grey: #4A463F;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night);
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 18px 18px;
  color: var(--paper); font-family: 'Source Sans 3', system-ui, sans-serif; font-size: 16px; line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.anton { font-family: 'Anton', Impact, 'Arial Narrow', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; font-weight: 400; }
.mono { font-family: 'Courier Prime', 'Courier New', monospace; }
.comic { font-family: 'Comic Neue', 'Comic Sans MS', cursive; font-weight: 700; }
.paper { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); }
.ph { background-color: #E4DED0; background-image: repeating-linear-gradient(135deg, rgba(27,27,31,0.08) 0 2px, transparent 2px 10px); display: flex; align-items: center; justify-content: center; text-align: center; font-family: 'Courier Prime', monospace; font-size: 12px; color: var(--grey); }
.stamp { display: inline-block; font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; border: 3px solid currentColor; padding: 2px 8px; transform: rotate(-4deg); }
.redact { display: inline-block; background: var(--ink); height: 0.95em; vertical-align: middle; }
.redact.fixed { width: 72px; margin: 0 2px; }
.redact.dim { background: #4A4950; }
.hazard { background-image: repeating-linear-gradient(-45deg, var(--ink) 0 16px, var(--gold) 16px 32px); }
.lnk { color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
.lnk:hover { color: var(--pink); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 32px; padding-bottom: 64px; }
@media (max-width: 760px) { .wrap { padding: 0 16px; } }
/* the primary nav needs about 1140 px beside the logo and the Support button; below that it moves to the menu */
@media (max-width: 1140px) { .desk { display: none !important; } }
@media (min-width: 1141px) { .mob { display: none !important; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid var(--ink); cursor: pointer; white-space: nowrap; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-white { background: #FFFFFF; color: var(--ink); }
.btn[aria-disabled="true"] { background: #4A4950; color: var(--dim); border-color: var(--line); cursor: not-allowed; }
.btn[data-resume] { white-space: normal; text-align: center; padding-top: 8px; padding-bottom: 8px; } /* the label names a Log and panel: let it wrap in a narrow column */

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 4px solid var(--gold); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; flex: 0 0 auto; }
.logo svg { width: 232px; height: 56px; }
@media (max-width: 480px) {
  .site-header .bar { gap: 8px; }
  .logo svg { width: 140px; height: 34px; }
  .site-header .btn { min-height: 44px; padding: 0 10px; font-size: 14px; }
  .site-header .btn svg { display: none; }
}
.nav { display: flex; align-items: center; gap: 2px; position: relative; }
.navlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: var(--paper); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; background: transparent; border: 0; font-family: inherit; cursor: pointer; }
.navlink:hover { color: var(--gold); }
.navlink[aria-current="page"] { color: var(--gold); }
.navlink[aria-disabled="true"] { color: var(--dim); cursor: not-allowed; }
.series-menu { position: absolute; top: 52px; left: 0; width: 320px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); padding: 8px; }
.series-menu .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(27,27,31,0.15); }
.series-menu .item[aria-disabled="true"] { color: var(--grey); }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; color: var(--paper); border: 2px solid var(--paper); cursor: pointer; }
.mob-menu { display: flex; flex-direction: column; padding: 8px 16px 16px; border-top: 1px solid var(--rule); }
.mob-menu .navlink { padding: 0; }
.mob-menu .head { font-size: 12px; color: var(--muted); padding-top: 10px; }
[hidden] { display: none !important; }

/* footer */
.site-footer { background: var(--ink); border-top: 4px solid var(--gold); }
.site-footer .bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 14px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); }

/* ribbon headings */
.ribbon { display: flex; align-items: stretch; }
.ribbon .end { width: 26px; background: var(--gold-d); margin-top: 12px; }
.ribbon .l { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); margin-right: -4px; }
.ribbon .r { clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); margin-left: -4px; }
.ribbon h1 { margin: 0; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); padding: 6px 28px; line-height: 1.05; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 36px; }
.note { font-size: 13px; color: var(--muted); }

/* home */
.home-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.home-top h1 { font-size: clamp(28px, 4.4vw, 52px); }
.home-top p { margin: 0; flex: 1 1 320px; max-width: 460px; font-size: 18px; color: var(--soft); }
.latest { padding: 22px; position: relative; margin-bottom: 40px; }
.tape { position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; margin-left: -55px; background: rgba(227,169,43,0.75); transform: rotate(-2deg); }
.latest .row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.teaser { flex: 0 1 400px; min-width: 220px; display: block; background: #FFFFFF; border: 4px solid var(--ink); padding: 10px; }
.teaser img { border: 3px solid var(--ink); width: 100%; height: auto; }
.grid { display: grid; gap: 28px 24px; }
.grid.files { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.agents { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.grid.more { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 28px; }
.folder { position: relative; padding-top: 20px; }
.folder .tab { position: absolute; top: 0; left: 0; width: 46%; height: 24px; background: var(--tab); border: 2px solid var(--ink); border-bottom: 0; }
.folder .body { position: relative; background: var(--manila); color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 270px; }
.folder .split { border-top: 2px dashed rgba(27,27,31,0.4); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mini { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); padding: 6px; }
.mini .thumb { width: 60px; height: 60px; flex: 0 0 60px; border: 2px solid var(--ink); object-fit: cover; }
.agent { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,0.5); padding: 10px; }
.agent img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; border: 2px solid var(--ink); border-top: 8px solid var(--pink); background: #E4DED0; }
.card-box { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card-box h2 { margin: 0; font-size: 28px; }
.card-box .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.card-box li a { min-height: 40px; border-bottom: 1px dashed rgba(27,27,31,0.35); width: 100%; }

/* compendium */
.page-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-top h1 { font-size: clamp(32px, 5vw, 60px); }
.page-top p { margin: 0; font-size: 19px; color: var(--soft); max-width: 720px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; padding: 12px 0; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.toggle { min-height: 44px; padding: 0 16px; background: transparent; color: var(--paper); border: 2px solid var(--line); font: inherit; font-weight: 700; cursor: pointer; }
.toggle[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 28px; }
@media (max-width: 360px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); transition: transform .12s; }
.card:hover { transform: translate(-2px, -2px); }
.card .pic { padding: 10px 10px 0; }
.pic-frame { aspect-ratio: 16 / 9; border: 3px solid var(--ink); width: 100%; object-fit: cover; }
.card .text { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.card h2, .card h3 { margin: 0; font-size: 28px; line-height: 1.05; }
.card p { margin: 0; font-size: 15px; color: var(--body2); }
.go { margin-top: auto; padding-top: 6px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.pending { display: flex; flex-direction: column; gap: 10px; justify-content: center; border: 2px dashed var(--line); padding: 22px; min-height: 260px; }

/* entry pages */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); }
.dossier-top { position: relative; margin-top: 18px; padding-top: 22px; }
.dossier-top .tab { position: absolute; top: 0; left: 0; width: 240px; height: 26px; background: var(--tab); border: 2px solid var(--ink); border-bottom: 0; }
.dossier-top .body { position: relative; background: var(--manila); color: var(--ink); border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(0,0,0,0.5); padding: 28px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.dossier-top .words { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.dossier-top .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dossier-top h1 { margin: 0; font-size: clamp(48px, 8vw, 104px); line-height: 0.95; overflow-wrap: anywhere; }
.dossier-top .lede { margin: 0; font-size: 22px; line-height: 1.4; max-width: 38ch; font-weight: 600; }
.dossier-top .photo { flex: 1 1 440px; min-width: 240px; position: relative; }
@media (max-width: 760px) { .dossier-top .body { padding: 20px; } .dossier-top .photo { min-width: 0; flex-basis: 100%; } }
.photo figure { margin: 0; background: #FFFFFF; border: 2px solid var(--ink); padding: 10px; transform: rotate(1deg); box-shadow: 4px 4px 0 rgba(0,0,0,0.35); }
.photo figcaption { font-size: 12px; text-align: center; padding-top: 8px; }
.cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; margin-top: 44px; }
.cols > article { flex: 999 1 600px; min-width: 0; }
.prose { padding: 32px 36px; font-size: 18px; line-height: 1.65; max-width: 72ch; }
.prose p { margin: 0 0 18px; }
.prose p:last-child { margin: 0; }
@media (max-width: 760px) { .prose { padding: 22px 20px; } }
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; max-width: 72ch; }
.pager a { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 14px 18px; background: var(--ink); color: var(--paper); border: 2px solid var(--line); text-decoration: none; }
.pager a.end { text-align: right; }
.pager .k { font-size: 12px; color: var(--muted); }
.pager .t { font-size: 22px; }
.panel { flex: 1 1 320px; min-width: 0; max-width: 100%; position: sticky; top: 92px; background: var(--ink); border: 3px solid var(--gold); }
@media (max-width: 760px) { .panel { position: static; } }
.panel details { border-bottom: 2px solid var(--rule); }
.panel details:last-child { border-bottom: 0; }
.panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 16px; color: var(--gold); cursor: pointer; font-family: 'Courier Prime', monospace; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; list-style: none; }
.panel summary::-webkit-details-marker { display: none; }
.panel summary svg { transition: transform .15s; }
.panel details[open] summary svg { transform: rotate(180deg); }
.panel .region { padding: 0 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.chip { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 12px 4px 4px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); text-decoration: none; font-weight: 700; }
.chip .sw { width: 52px; height: 38px; flex: 0 0 52px; border: 2px solid var(--ink); }
.chip .grow { flex: 1 1 auto; }
.chip .kind { font-size: 11px; }
.chip.warn .sw { background: var(--red); border-color: var(--ink); }
.seen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seen > a, .seen > div { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--paper); min-width: 0; }
.seen img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; border: 2px solid var(--paper); background: #E4DED0; }
.seen .mono { font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.notice { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); padding: 12px; display: flex; flex-direction: column; gap: 8px; }

/* sealed records */
.spoilers { background: var(--red); color: #FFFFFF; border-bottom: 4px solid var(--ink); }
.spoilers .hazard { height: 18px; }
.spoilers .hazard.top { border-bottom: 3px solid var(--ink); }
.spoilers .hazard.bot { border-top: 3px solid var(--ink); }
.spoilers .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-top: 34px; padding-bottom: 38px; }
.spoilers .mark { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.spoilers h1 { margin: 0; font-size: clamp(64px, 10vw, 128px); line-height: 0.9; letter-spacing: 0.04em; }
.spoilers .say { flex: 1 1 360px; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.spoilers .say p { margin: 0; font-size: 19px; line-height: 1.45; }
.spoilers.slim .hazard { height: 12px; }
.spoilers.slim .bar { justify-content: flex-start; gap: 14px 28px; padding-top: 18px; padding-bottom: 18px; }
.spoilers.slim p { margin: 0; flex: 1 1 360px; font-size: 18px; }
.rec { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--manila); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); transition: transform .12s; }
.rec:hover { transform: translate(-2px, -2px); }
.rec .flap { height: 54px; background: var(--tab); border-bottom: 2px solid var(--ink); clip-path: polygon(0 0, 100% 0, 100% 40%, 50% 100%, 0 40%); }
.rec .text { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; margin-top: -10px; }
.rec .frame { background: #FFFFFF; border: 2px solid var(--ink); padding: 6px; }
.rec p { margin: 0; font-size: 16px; line-height: 1.7; }
.classified { display: flex; flex-direction: column; gap: 12px; justify-content: center; background: var(--ink); border: 2px solid var(--rule); padding: 24px; min-height: 300px; }

/* stubs */
.stub { max-width: 720px; margin: 0 auto; padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.stub .paper { padding: 28px; text-align: left; width: 100%; }
.stub .paper p { margin: 0 0 12px; }
.stub .paper p:last-child { margin: 0; }
.stub .paper .lead { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.terms { border-top: 2px solid var(--ink); padding-top: 14px; margin-top: 18px; }
.terms h2 { font-family: 'Anton', Impact, 'Arial Narrow', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; font-weight: 400; font-size: 24px; margin: 0 0 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.terms h2 .stamp { font-size: 12px; }
.terms.ok h2 .stamp { color: var(--green); }
.terms.ask h2 .stamp { color: var(--red); }
.terms ul { margin: 0; padding-left: 22px; }
.terms li { margin: 0 0 4px; }
.terms .credit { background: var(--soft); border: 2px dashed var(--grey); padding: 10px 14px; font-size: 14px; overflow-wrap: anywhere; }

/* File pages, arcs, readers and dossiers (File.dc.html, FileHQ.dc.html, Reader.dc.html, Dossier.dc.html) */
.badge-new { background: var(--pink); color: #FFFFFF; font-weight: 700; font-size: 13px; padding: 2px 8px; border: 2px solid var(--ink); }
.progress { height: 12px; border: 2px solid var(--ink); background: var(--paper); max-width: 420px; }
.progress > div { height: 100%; background: var(--ink); }
.progress.light { background: #FFFFFF; }
.progress.dark { border-color: var(--paper); background: transparent; max-width: none; }
.progress.dark > div { background: var(--gold); }
.stats { margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 2px solid var(--ink); background: var(--paper); text-align: center; }
.stats > div { padding: 8px 4px; border-right: 1px solid rgba(27,27,31,0.3); }
.stats > div:last-child { border-right: 0; }
.stats dt { font-size: 11px; font-weight: 700; }
.stats dd { margin: 0; font-size: 28px; }
.arc { padding: 0; }
.arc-head { padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; justify-content: space-between; }
.arc-head .portrait { width: 84px; height: 84px; object-fit: cover; border: 2px solid var(--ink); border-top: 8px solid var(--pink); background: #E4DED0; }
.arc h3 a { color: inherit; }
.arc-list { border-top: 2px dashed rgba(27,27,31,0.4); }
.arc-list summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; cursor: pointer; font-weight: 700; font-size: 13px; list-style: none; }
.arc-list summary::-webkit-details-marker { display: none; }
.arc-list[open] summary svg { transform: rotate(180deg); }
.tiles { padding: 4px 20px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); min-width: 0; }
.tile img, .classified-tile { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; border: 3px solid var(--ink); background: #E4DED0; }
.classified-tile { background: var(--ink); display: flex; align-items: center; justify-content: center; }
.arc-closed { background: var(--ink); border: 2px dashed #5A5961; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.arc-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 24px; }
.pic-frame.square { aspect-ratio: 1 / 1; }
.content-note { margin: 0; padding: 12px 16px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-left: 8px solid var(--red); }

.reader-col { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.reader { display: flex; flex-direction: column; }
.reader-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--ink); border: 2px solid var(--rule); margin-bottom: 8px; }
.reader-bar .keys { font-size: 12px; color: var(--muted); }
@media (hover: none) { .reader-bar .keys { display: none; } }
.seg { display: flex; }
.seg button { min-height: 44px; min-width: 48px; padding: 0 14px; background: transparent; color: var(--paper); border: 2px solid var(--line); font: inherit; font-weight: 700; cursor: pointer; margin-right: -2px; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); position: relative; }
.stage { background: var(--ink); padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
@media (max-width: 760px) { .stage { padding: 0; background: transparent; } }
.panels { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.rpanel { width: 100%; }
.rpanel figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rpanel .frame { background: #FFFFFF; padding: 4px; box-sizing: content-box; width: calc(100% - 8px); }
.rpanel .frame picture { display: contents; }
.rpanel .frame img { width: 100%; height: 100%; object-fit: contain; border: 3px solid var(--ink); display: block; box-sizing: border-box; }
.rpanel figcaption { font-size: 13px; color: var(--muted); }
/* sizes: the panel's height; Fit is set by assets/site.js so the panel navigation stays on screen */
/* as wide as the stage allows, but no taller than the chosen height (--r: the panel's width / height) */
.reader[data-js-on] .rpanel .frame { width: min(calc(100% - 8px), calc(var(--panel-h, 520px) * var(--r, 1))); }
/* with the script on, the dots under the panel say which panel it is */
.reader[data-js-on] .rpanel figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reader[data-size="s"] { --panel-h: 340px; --page-w: 300px; }
.reader[data-size="m"] { --panel-h: 460px; --page-w: 420px; }
.reader[data-size="l"] { --panel-h: 640px; --page-w: 600px; }
.page-view { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.page-grid { display: grid; gap: 8px; background: #FFFFFF; border: 4px solid var(--ink); padding: 8px; width: min(100% - 24px, var(--page-w, 420px)); }
.page-grid button { padding: 0; border: 3px solid var(--ink); background: #E4DED0; cursor: zoom-in; display: block; width: 100%; }
.page-grid picture { display: contents; }
.page-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.end-card { width: 100%; max-width: 620px; background: var(--manila); color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); padding: 28px; display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.pbtn:disabled, .pbtn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.panel-nav { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 10px; padding: 8px; background: var(--ink); }
.dots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.dots button { width: 16px; height: 16px; padding: 0; border: 2px solid var(--paper); background: transparent; cursor: pointer; }
.dots button[aria-current="step"] { background: var(--gold); border-color: var(--gold); }
.dnavs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dnav { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 14px; background: var(--ink); color: var(--paper); border: 2px solid var(--line); text-decoration: none; }
a.dnav:hover { border-color: var(--gold); }
.dnav .k { font-size: 11px; color: var(--muted); }
.dnav .t { font-weight: 700; }
.dnav.center { text-align: center; }
.dnav.end { text-align: right; }
.dnav[aria-disabled="true"] { color: var(--dim); cursor: not-allowed; }
.ptiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ptiles > * { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; min-height: 40px; font-size: 12px; font-weight: 700; text-decoration: none; border: 2px solid var(--paper); background: var(--paper); color: var(--ink); }
.ptiles .here { background: var(--gold); border-color: var(--gold); }
.ptiles .off { border-color: #4A4950; background: var(--night); color: var(--line); }
.region.cast { display: grid; grid-template-columns: 1fr 1fr; }
.region.cast .chip { font-size: 14px; padding: 4px 8px 4px 4px; }
.panel .chip img.sw { width: 34px; height: 34px; flex: 0 0 34px; object-fit: cover; background: #E4DED0; }
.transcript { margin: 0; padding: 12px 12px 12px 30px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.portrait-big { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; border: 2px solid var(--ink); border-top: 10px solid var(--pink); background: #E4DED0; }
/* Dossier portraits are 3:4 busts (prototype/rig/portrait.py): square crops keep the top, where the head is. */
img[src^="/pictures/dossiers/"] { object-position: 50% 0; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border: 2px solid var(--ink); background: var(--paper); }
.facts > div { padding: 10px 14px; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.seen picture, .tile picture, .mini picture, .card .pic picture { display: contents; }
.pbtn.btn-gold { background: var(--gold); }

/* Home: Start here (Phil 2026-11-07) */
.start { padding: 26px 22px 22px; position: relative; margin-bottom: 40px; }
.start h2 { margin: 0 0 4px; font-size: 32px; line-height: 1.05; }
.start .lede { margin: 0 0 18px; color: var(--body2); max-width: 62ch; }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.path { border: 2px solid var(--ink); background: #FFFFFF; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.path[hidden] { display: none; }
.path .k { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--grey); }
.path h3 { margin: 0; font-size: 24px; line-height: 1.05; }
.path p { margin: 0; color: var(--body2); font-size: 15px; flex: 1; }
.path .shot { border: 2px solid var(--ink); aspect-ratio: 40 / 21; object-fit: cover; width: 100%; }
.path.alt { background: var(--manila); }
.path .btn { align-self: flex-start; }
.minitl { display: flex; align-items: center; padding: 6px 0 2px; }
.minitl span { flex: 1; height: 4px; background: var(--ink); }
.minitl i { width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid var(--ink); background: var(--gold); transform: rotate(45deg); }
.minitl i.s { background: var(--ink); }
.minitl i.y { background: var(--pink); }

/* Timeline (Phil 2026-11-07): strips down a gold line, grouped by era or Sentinel Reckoning day */
.tl-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-bottom: 30px; padding: 12px 16px; background: var(--ink); border: 2px solid var(--rule); }
.tl-controls[hidden] { display: none; }
.tl-controls > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-controls .ctl { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); margin-right: 8px; }
.tl-controls .chip { min-height: 40px; padding: 0 12px; gap: 6px; background: transparent; color: var(--paper); border-color: var(--line); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.tl-controls .chip[aria-pressed="true"] { border-color: var(--paper); }
.dot { width: 10px; height: 10px; border: 2px solid var(--ink); display: inline-block; }
.tl { position: relative; padding-left: 44px; }
.tl[hidden] { display: none; }
.tl::before { content: ""; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 6px; background: var(--gold); border: 2px solid var(--ink); }
.tl.flat { padding-left: 0; }
.tl.flat::before { display: none; }
.era { margin-bottom: 34px; }
.era[hidden] { display: none; }
.era > .when { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.era > .when::before { content: ""; position: absolute; left: -38px; top: 6px; width: 22px; height: 22px; background: var(--paper); border: 3px solid var(--ink); transform: rotate(45deg); }
.era.deep > .when::before { background: var(--ink); border-color: var(--gold); }
.era h2 { margin: 0; font-size: 28px; line-height: 1.1; }
.era .sub { font-size: 13px; color: var(--muted); }
.gap { position: relative; margin: -10px 0 30px; font-size: 13px; color: var(--dim); letter-spacing: 0.14em; }
.gap::before { content: ""; position: absolute; left: -36px; top: -12px; bottom: -12px; width: 14px; background: var(--night); background-image: repeating-linear-gradient(0deg, var(--gold) 0 6px, transparent 6px 12px); }
.tgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.tcard { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); display: flex; flex-direction: column; text-decoration: none; position: relative; }
.tcard[hidden] { display: none; }
.tcard .pic { position: relative; display: block; border-bottom: 2px solid var(--ink); background: #FFFFFF; }
.tcard .pic img { width: 100%; aspect-ratio: 40 / 21; object-fit: cover; }
.tcard .series { position: absolute; left: 0; top: 0; font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; padding: 2px 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.s-hq { background: var(--pink); color: #FFFFFF; }
.tcard .series:not(.s-hq), .dot:not(.s-hq) { background: var(--gold); color: var(--ink); }
.tcard .posted { position: absolute; right: 6px; bottom: 6px; font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; background: var(--ink); color: var(--paper); padding: 1px 6px; }
.tcard .txt { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tcard .lab { font-family: 'Courier Prime', monospace; font-size: 12px; font-weight: 700; color: var(--grey); }
.tcard .ttl { font-size: 22px; line-height: 1.05; }
.tcard .need { font-size: 14px; }
.tcard .sr { font-family: 'Courier Prime', monospace; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: auto; padding-top: 6px; border-top: 2px dashed rgba(27,27,31,0.3); }
.tcard:hover .ttl { color: var(--pink); }
.tcard.read .pic::after { content: "READ"; position: absolute; right: 8px; top: 8px; font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--green); background: var(--paper); border: 2px solid var(--green); padding: 0 5px; transform: rotate(4deg); }
.tcard.locked { background: #2F2E35; color: var(--paper); }
.tcard.locked .lab, .tcard.locked .sr { color: var(--muted); border-top-color: var(--rule); }
.tcard.locked:hover .ttl { color: var(--gold); }
.tcard.unsealed::before { content: "UNSEALED"; position: absolute; top: -14px; right: 12px; z-index: 1; background: var(--gold); color: var(--ink); font-family: 'Courier Prime', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; padding: 1px 7px; border: 2px solid var(--ink); }
@media (prefers-reduced-motion: no-preference) { .tcard { transition: transform 0.12s; } .tcard:hover { transform: translate(-2px, -2px); } }
@media (max-width: 520px) { .tl { padding-left: 34px; } .tl::before { left: 8px; } .era > .when::before { left: -33px; } .gap::before { left: -30px; } .tgallery { grid-template-columns: 1fr; } }

/* a sealed strip's reader page: the gate, and the way back once the strip it needs is read */
.gate { padding: 28px 24px; margin: 16px 0 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 760px; }
.gate[hidden], [data-gated][hidden] { display: none; }
.gate h1 { margin: 0; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; }
.gate p { margin: 0; max-width: 62ch; }
.btn-ghost-ink { background: transparent; color: var(--ink); }
.unsealed-note { margin: 0; padding: 8px 14px; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); font-weight: 700; }
.unsealed-note[hidden] { display: none; }
.unsealed-note a { color: var(--ink); }

/* the reader page, comic first (Phil 2026-11-24): a one-line breadcrumb, a compact title row, the comic the full width
   of the page, and the story panel below it in columns */
main.reader-main { padding-top: 8px; }
.reader-layout { display: flex; flex-direction: column; gap: 24px; }
.reader-layout .reader-col { flex: none; gap: 10px; }
.rhead { display: flex; flex-direction: column; gap: 0; }
.rcrumbs { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; gap: 0 8px; }
.rcrumbs a { color: var(--gold); min-height: 32px; }
.rcrumbs [aria-current] { color: var(--paper); }
.rtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.rtitle h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.05; }
.rmeta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; flex: 1 1 auto; }
.rmeta .stamp { color: #F7A8D0; font-size: 11px; border-width: 2px; padding: 0 6px; }
.ropts-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; margin-left: auto; background: transparent; color: var(--paper); border: 2px solid var(--line); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.ropts-btn[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.panel.below { position: static; flex: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; border-width: 2px; }
.panel.below details { border-bottom: 0; border-right: 2px solid var(--rule); border-top: 2px solid var(--rule); margin-top: -2px; }
@media (max-width: 760px) {
  main.reader-main { padding-left: 8px; padding-right: 8px; padding-top: 4px; }
  .rcrumbs { font-size: 12px; }
  .rcrumbs .atitle { display: none; }
  .rtitle h1 { font-size: 26px; }
  .rtitle h1 { flex: 1 1 0; min-width: 0; }
  .rmeta { order: 3; flex-basis: 100%; font-size: 11px; }
  .rmeta .stamp { display: none; } /* Mission progress, below the comic, says the same */
  .ropts-btn { order: 2; }
  .ropts-btn span { display: none; }
  .ropts-btn { min-height: 40px; min-width: 44px; justify-content: center; padding: 0 8px; }
  .panel-nav { padding: 6px 0; gap: 6px; background: transparent; }
  .panel-nav .pbtn { padding: 0 12px; }
}
@media (max-width: 420px) { .panel-nav .pbtn { font-size: 0; gap: 0; } .panel-nav .pbtn svg { width: 20px; height: 20px; } }
/* phones: past the top of the page the site header shrinks to a slim bar (assets/site.js sets .slim) */
@media (max-width: 760px) {
  .site-header.slim .bar { padding-top: 3px; padding-bottom: 3px; }
  .site-header.slim .logo svg { width: 100px; height: 24px; }
  .site-header.slim .btn { min-height: 36px; }
  .site-header.slim .menu-btn { width: 36px; height: 36px; }
}
/* a phone held sideways: the comic fills the screen; the header scrolls away instead of staying */
@media (orientation: landscape) and (max-height: 520px) {
  body:has(.reader-main) .site-header { position: static; }
  .panel-nav { padding: 4px 0; }
}
