/* Reading adjustments over the original haunted archive theme. */
:root { --text: #e8eeec; --muted: #b2c1bd; --dim: #a0ada9; --reading-size: 17px; }
.doc-page .paper { padding: clamp(16px, 3vw, 36px); scroll-behavior: smooth; }
.doc-page .paper__body { padding: clamp(16px, 2.4vw, 28px); max-width: 100%; overflow: visible; font-size: var(--reading-size); }
.doc-page .document-body, .doc-page .newbie-route { font: var(--reading-size)/1.8 var(--sans); }
.doc-page :is(.document-body, .newbie-route) :is(p, li) { line-height: 1.8; letter-spacing: normal; }
.doc-page .document-body > :is(p, ul, ol, blockquote) { max-width: 72ch; }
.doc-page .document-body p { margin: 0 0 1em; }
.doc-page :is(.document-body, .newbie-route) li + li { margin-top: .45em; }
.doc-page .document-body :is(h2, h3), .archive-page :is(h2, h3) {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; line-height: 1.4;
}
.doc-page .document-body h2, .archive-page h2 { font-size: 23px; margin: 1.5em 0 .65em; }
.doc-page .document-body h3, .archive-page h3 { font-size: 19px; margin: 1.4em 0 .6em; }
.doc-page .paper__title { font-size: clamp(22px, 3vw, 30px); line-height: 1.25; letter-spacing: .06em; }
.doc-page .document-body .doc-subhead { font: 600 16px/1.6 var(--mono); letter-spacing: .04em; margin: 1.4em 0 .6em; }
.doc-page :is(.paper__body, .newbie-route, .guide-links, .lore-toc) a { color: #79dfce; text-decoration: underline; text-underline-offset: 3px; }
.doc-page :is(.guide-links, .newbie-actions, .home-route) a { text-decoration: none; }
.doc-page a:hover { color: #d6fff7; }
.doc-page :is(a, button, input, summary):focus-visible { outline: 2px solid #79dfce; outline-offset: 4px; }
.doc-page .doc-table-wrap { max-width: 100%; overflow-x: auto; }
.doc-page .doc-table { font: 15px/1.65 var(--sans); }
.doc-page .doc-table :is(td, th) { padding: 14px; }
.doc-page .doc-table tbody tr:nth-child(even) { background: rgba(54, 210, 189, .035); }
.doc-page :is(.hud-card, .rank-card, .jobs-flow article, .key-grid article, .term-card) p { font-size: calc(var(--reading-size) - 1px); line-height: 1.7; }
.doc-page .hud-card h3 { font-size: 16px; line-height: 1.4; }
.doc-page .hud-card img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; filter: none; }
.doc-page .hud-device img, .doc-page .jobs-brief img { image-rendering: pixelated; filter: none; }
.doc-page .hud-grid { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.doc-page .nav__name { font: 500 14px/1.5 var(--mono); }
.doc-page :is(.nav__name, .nav__title, .paper__title, .document-body, .source-note) { overflow-wrap: anywhere; }
.doc-page .nav__text { min-width: 0; }
.doc-page .doc-table :is(th, td) { font-family: var(--sans); font-size: 15px; line-height: 1.65; letter-spacing: normal; text-transform: none; }
.doc-page .law-table { min-width: 760px; table-layout: auto; }
.doc-page .doc-subhead { max-width: 100%; }
.doc-page .skip-link { position: fixed; top: 8px; left: 8px; }
.doc-page .bottombar::after { display: none; }
.doc-page .archive-id { position: static; opacity: .55; }
.doc-page .bottombar { font-size: 10px; gap: 12px; flex-wrap: wrap; }
.doc-page .nav__item { overflow-wrap: normal; }
.doc-page .paper__head { overflow-wrap: anywhere; }
.table-hint { display: none; color: var(--muted); font: 14px/1.6 var(--sans); }
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .mobile-menu { display: block; margin: 10px 14px; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 4px; color: var(--accent); background: rgba(0, 0, 0, .3); font: 15px var(--mono); cursor: pointer; }
  .doc-page .nav.is-collapsible:not(.is-open) :is(.nav__list, .nav__bottom) { display: none; }
}
@media (max-width: 900px) { .table-hint { display: block; } .doc-page .nav__list { gap: 6px; } }
.doc-page .nav__home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  text-align: center;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.doc-page .nav__item { min-height: 52px; }
.doc-page .nav__state { font-size: 10px; }
.doc-page .nav__list { overflow-y: auto; }
.reader-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font: 12px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.reader-tools button { border: 1px solid var(--line); border-radius: 3px; background: rgba(0, 0, 0, .3); color: var(--accent); padding: 8px 12px; cursor: pointer; font: inherit; }
.reader-tools a { color: var(--accent); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); padding: 12px 18px; background: #10191d; color: #fff; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lore-toc { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.lore-section { scroll-margin-top: 20px; margin-top: 32px; }
.lore-section + .lore-section { padding-top: 20px; border-top: 1px solid var(--line); }
.lore-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin: 24px 0; }
.lore-facts > div { padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.lore-facts dt { color: var(--muted); font-size: 14px; }
.lore-facts dd { margin: 6px 0 0; font: 600 18px/1.5 var(--mono); color: var(--accent); }
.home-route { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; margin: 24px 0; }
.home-route a { display: block; padding: 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.home-route strong { display: block; margin: 0 0 8px; color: var(--accent); font: 600 18px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.home-route a:hover { border-color: var(--accentSoft); background: var(--doc-accent-soft); }
.home-route span { color: var(--text); font-size: 16px; line-height: 1.6; }
.source-note { color: var(--muted); font-size: 14px; line-height: 1.7; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.guide-pending { display: inline-flex; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 6px; font-size: 14px; color: var(--muted); }
.connection-addresses { padding-left: 22px; }
.connection-addresses a, #connection a { overflow-wrap: anywhere; }
.connection-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; font-size: 16px; }
.connection-details dt { color: var(--muted); }
.connection-details dd { margin: 0; overflow-wrap: anywhere; }
.connection-vpn { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.connection-vpn summary { color: var(--accent); cursor: pointer; padding: 6px 0; }
.doc-page .guide-category header h2 { margin: 0; font-size: 19px; }
.doc-page .guide-links a, .doc-page .terminal-button { font-size: 15px; }
.doc-page .paper__body > :is(h2, h3, .doc-subhead):first-child { margin-top: 0; }
@media (max-width: 900px) {
  body.doc-page { height: auto; overflow: auto; }
  .doc-page .frame { height: auto; min-height: 100dvh; padding: 10px; }
  .doc-page .layout { display: grid; grid-template-columns: minmax(0, 1fr); height: auto; }
  .doc-page .nav { max-height: none; }
  .doc-page .nav__brand { padding: 14px; }
  .doc-page .nav__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); overflow: visible; }
  .doc-page .nav__item { padding: 10px; }
  .doc-page .nav__item .nav__state, .doc-page .nav__meta { display: none; }
  .doc-page .nav__bottom { display: flex; flex-wrap: wrap; gap: 12px; }
  .doc-page .nav__foot { display: none; }
  .doc-page .paper { overflow: visible; }
  .doc-page .topbar { display: flex; height: auto; flex-wrap: wrap; gap: 10px; }
  .doc-page .topbar__center { display: none; }
  .doc-page .bottombar { flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; } }
@media print {
  body.doc-page { background: white; color: black; height: auto; overflow: visible; }
  .doc-page :is(.nav, .topbar, .bottombar, .reader-tools, .vhs-bg, .fx-global) { display: none; }
  .doc-page :is(.frame, .layout, .doc, .paper, .paper__body, .segment) { display: block; height: auto; overflow: visible; background: white; color: black; border: 0; box-shadow: none; }
  .doc-page :is(p, li, h1, h2, h3, a, strong, td, th) { color: black !important; }
}
