/* Abyssal Escape Wiki — dive-logbook design system.
   Palette: deep-water night (night watch), bioluminescent teal primary,
   ring-gold accent carried over from the site's original brand. */

:root {
  --bg: #0b0f1a;
  --card: #151b2b;
  --card-2: #101623;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #22d3ee;
  --primary-ink: #04141a;
  --primary-deep: #0fa9c2;
  --accent: #f6c445;
  --ok: #4fd18b;
  --line: rgba(232, 236, 245, 0.1);
  --line-2: rgba(232, 236, 245, 0.18);
  --r: 10px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sh-2: 0 18px 44px rgba(0, 0, 0, 0.42);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --wrap: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at 88% -12%, rgba(34, 211, 238, 0.1), transparent 62%),
    radial-gradient(900px 560px at -12% 28%, rgba(124, 92, 255, 0.07), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--primary); color: var(--primary-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--card);
  border: 1px solid var(--line-2);
  padding: 10px 14px;
  border-radius: 8px;
}
.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 26, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex: none;
}

.brand-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-text b { font-weight: 700; }
.brand-text em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-left: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: rgba(232, 236, 245, 0.05); }
.site-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); border-radius: 6px 6px 0 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: var(--card-2);
  padding-block: 40px 24px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.foot-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}
.foot-title em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.foot-note {
  margin-top: 10px;
  max-width: 38ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.foot-h {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-col a,
.foot-link {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
}
.foot-col a:hover,
.foot-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.foot-base {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- consent bar ---------- */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 560px;
  margin-left: auto;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh-2);
  font-size: 14px;
}
.consent[hidden] { display: none; }
.consent-copy { color: var(--muted); }
.consent-copy a { color: var(--primary); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }


/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  z-index: -1;
  mask-image: linear-gradient(90deg, transparent 8%, #000 60%), linear-gradient(180deg, #000 40%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: start;
  padding-block: 48px 40px;
}

.kicker {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}
.kicker-dim { color: var(--muted); }

.hero-copy h1 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 6vw, 3rem);
  letter-spacing: -0.02em;
}
.h1-accent { color: var(--primary); }

.lede {
  margin-top: 16px;
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}
.lede strong { color: var(--text); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.stat-row li { display: flex; flex-direction: column; gap: 2px; }
.stat-v { font-family: var(--display); font-size: 22px; font-weight: 700; }
.stat-k { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- the log card (single signature element) ---------- */
.log-card {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(21, 27, 43, 0.96), rgba(16, 22, 35, 0.98));
  box-shadow: var(--sh-2);
  overflow: hidden;
}

.tape {
  position: relative;
  border-right: 1px solid var(--line);
  background:
    repeating-linear-gradient(180deg, var(--line-2) 0 1px, transparent 1px 16px);
  background-position: center;
}
.tape-mark {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(246, 196, 69, 0.7);
  transition: top 0.4s linear;
}

.log-body { padding: 16px 18px 18px; }
.log-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.log-link { font-size: 13px; color: var(--primary); text-decoration: none; white-space: nowrap; }
.log-link:hover { text-decoration: underline; }

.clock-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}
.clock {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.phases {
  display: flex;
  gap: 4px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.phases li {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.phases li[data-on="1"] { background: var(--primary); border-color: transparent; color: var(--primary-ink); }
.phases li[data-ring="1"] { background: var(--accent); border-color: transparent; color: #2a1a00; }

.clock-bar {
  position: relative;
  height: 6px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(232, 236, 245, 0.08);
  overflow: visible;
}
.clock-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.bar-tick { position: absolute; top: -3px; width: 2px; height: 12px; background: rgba(232, 236, 245, 0.35); }

.log-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- generic sections ---------- */
.sec { padding-block: 48px 0; }
.sec.narrow { max-width: 820px; }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sec-h {
  font-size: 22px;
  letter-spacing: -0.01em;
}
.sec-h::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  vertical-align: 2px;
}
.sec-sub { margin-top: 8px; font-size: 14px; color: var(--muted); max-width: 62ch; }
.sec-sub a { color: var(--primary); }

/* ---------- start cards ---------- */
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.start-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.start-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.start-n {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--primary);
}
.start-t { font-family: var(--display); font-size: 20px; font-weight: 700; }
.start-d { font-size: 15px; line-height: 1.55; color: var(--muted); }
.start-go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--primary); }

/* ---------- index list ---------- */
.index-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: idx;
}
.index-list li { border-top: 1px solid var(--line); }
.index-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 16px 0;
  text-decoration: none;
}
.index-list a:hover .idx-title { color: var(--primary); }
.idx-n {
  font-family: var(--display);
  font-size: 12px;
  color: var(--muted);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.idx-body { display: flex; flex-direction: column; gap: 3px; }
.idx-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.idx-title { font-family: var(--display); font-size: 17px; font-weight: 700; }
.idx-text { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- split: facts + killers ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
}
.facts { margin: 16px 0 0; }
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; font-size: 14px; text-align: right; color: var(--text); }

.killer-strip { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.killer-strip a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  background: var(--card);
}
.killer-strip a:hover { border-color: var(--primary); }
.ks-name { font-family: var(--display); font-size: 15px; font-weight: 700; }
.ks-role { grid-column: 2; font-size: 13px; color: var(--muted); }

.tier {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  grid-row: 1 / span 2;
}
.tier-S { background: var(--accent); color: #2a1a00; }
.tier-A { background: rgba(34, 211, 238, 0.22); color: var(--primary); border: 1px solid rgba(34, 211, 238, 0.4); }
.tier-B { background: rgba(232, 236, 245, 0.08); color: var(--text); border: 1px solid var(--line-2); }
.tier-C { background: rgba(232, 236, 245, 0.04); color: var(--muted); border: 1px solid var(--line); }

.link-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- dated log ---------- */
.log { margin: 0; padding: 0; list-style: none; }
.log li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.log time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.log p { font-size: 15px; line-height: 1.55; }
.log a { text-decoration: none; }
.log a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }


/* ---------- article layout ---------- */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: start;
  padding-top: 32px;
}
.article { min-width: 0; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.crumb-sep { opacity: 0.5; }
.crumbs [aria-current="page"] { color: var(--text); }

.page-head { margin-top: 20px; }
.page-head h1 {
  margin-top: 10px;
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.page-head .lede { font-size: 17px; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 20px 0 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.meta-k {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-right: 6px;
}

.page-art {
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 2 / 1;
}
.page-art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- prose ---------- */
.prose { margin-top: 24px; font-size: 17px; line-height: 1.75; color: #c8d0de; }
.prose > * + * { margin-top: 16px; }
.prose h2 {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 26px;
  scroll-margin-top: 88px;
}
.prose h3 {
  margin-top: 32px;
  font-size: 20px;
  color: var(--text);
  scroll-margin-top: 88px;
}
.prose h4 { margin-top: 24px; font-size: 17px; }
.prose p { max-width: 70ch; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { padding-left: 22px; max-width: 70ch; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--primary); }
.prose blockquote {
  margin: 24px 0;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  background: rgba(246, 196, 69, 0.06);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}
.prose code {
  font-size: 0.9em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(232, 236, 245, 0.08);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose img { border-radius: 8px; border: 1px solid var(--line); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}
.prose th {
  text-align: left;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose tbody tr:hover td { background: rgba(34, 211, 238, 0.04); }
.table-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll table { min-width: 560px; }
.table-scroll th, .table-scroll td { border-bottom: 1px solid var(--line); }

/* ---------- TOC ---------- */
.toc-rail {
  position: sticky;
  top: 88px;
  padding-top: 24px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  font-size: 13px;
}
.toc-h {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--primary); }
.toc li.is-h3 { padding-left: 12px; font-size: 12.5px; }
.toc a[aria-current="true"] { color: var(--text); box-shadow: inset 2px 0 0 var(--primary); padding-left: 8px; margin-left: -8px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 48px; }
.faq-item { padding: 16px 0; border-top: 1px solid var(--line); }
.faq-item h3 { font-size: 18px; }
.faq-item p { margin-top: 6px; font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 70ch; }

/* ---------- ads ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  margin: 32px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 35, 0.6);
  overflow: hidden;
}
.ad-slot:empty { display: none; }

/* ---------- related + share ---------- */
.related { margin-top: 40px; }
.related ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.related a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
}
.related a:hover { border-color: var(--primary); color: var(--primary); }
.related li span { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 2px; }

.page-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.page-foot a { color: var(--primary); }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.share-k {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.share-row button {
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}
.share-row button:hover { border-color: var(--primary); color: var(--primary); }
.share-msg { font-size: 13px; color: var(--ok); }

/* ---------- 404 ---------- */
.error-page { padding-block: 64px; max-width: 640px; }
.error-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-top: 12px; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-block: 32px; }
  .page-layout { grid-template-columns: 1fr; gap: 0; }
  .toc-rail { display: none; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .head-row { gap: 12px; }
  .brand-text { font-size: 16px; }
  .brand-text em { display: none; }
  .site-nav a { padding: 8px 9px; font-size: 13px; }
  .hero-copy h1 { font-size: 2rem; }
  .lede { font-size: 16px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-v { font-size: 20px; }
  .start-grid, .index-list { grid-template-columns: 1fr; }
  .index-list { gap: 0; }
  .log li { grid-template-columns: 1fr; gap: 2px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 22px; margin-top: 32px; }
  .prose h3 { font-size: 18px; }
  .btn { width: 100%; }
  .cta-row .btn, .error-links .btn { width: 100%; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .ad-slot { min-height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-mark { transition: none; }
  .start-card:hover { transform: none; }
}


/* ---------- timer calculator (escape-timer guide) ---------- */
.calc {
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh-1);
}
.calc-head h2 { font-size: 22px; }
.calc-head p { margin-top: 6px; font-size: 14px; color: var(--muted); max-width: 62ch; }
.calc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.calc-controls label { font-size: 14px; color: var(--muted); }
.calc-controls select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
}
.calc-out {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}
.calc-out > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-2);
}
.calc-out dt {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.calc-out dd {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.calc-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.calc-note a { color: var(--primary); }

/* ---------- blog list ---------- */
.post-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.post-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.post-list time { font-size: 12.5px; color: var(--muted); }
.post-list h2 { margin-top: 4px; font-size: 20px; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { color: var(--primary); }
.post-list p { margin-top: 6px; font-size: 15px; color: var(--muted); }

@media (max-width: 640px) {
  .calc-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-controls select { width: 100%; }
}
