/* Inner pages: privacy, support, delete-account, press, 404. Loaded after css/site.css.
   The pages' own content keeps its original markup and classes (.card, .lead, .meta, .path, .email, .note, .toc, .table-wrap,
   table.stack, details, ol.steps); this file only gives them the storybook look. */

body.page { background: var(--paper); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.page > main { flex: 1 0 auto; }
body.page > main { width: min(100% - 2 * var(--gutter), 48rem); margin: clamp(1.5rem, 1rem + 2vw, 3rem) auto clamp(3rem, 2rem + 4vw, 6rem); }
body.press > main { width: min(100% - 2 * var(--gutter), 66rem); }

/* the page card: cream paper with a gold hairline, like the game's panels */
.page .card {
  position: relative; margin: 0 0 var(--sp-5); padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.page .card::before { content: ""; position: absolute; inset: 0.45rem; border: 1px solid rgba(201, 138, 26, 0.35); border-radius: calc(var(--radius) - 6px); pointer-events: none; }
.page .card > :first-child { margin-top: 0; }
.page .card > :last-child { margin-bottom: 0; }

.page h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem); margin: 0 0 var(--sp-3); }
.page h2 { font-size: clamp(1.55rem, 1.3rem + 1vw, 2.1rem); margin: var(--sp-6) 0 var(--sp-3); padding-top: var(--sp-3); border-top: 2px dotted var(--line); scroll-margin-top: var(--sp-4); }
.page h2:first-child, .page .card > h2:first-of-type { border-top: 0; margin-top: var(--sp-2); padding-top: 0; }
.page h3 { font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); margin: var(--sp-5) 0 var(--sp-2); }
.page p, .page ul, .page ol { max-width: none; }
.page ul, .page ol { padding-left: 1.4rem; }
.page li { margin: 0.3rem 0; }
.page li::marker { color: var(--link); }
.page .lead { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.4; }
.page .meta { color: var(--muted); font-size: 1rem; margin: 0 0 var(--sp-4); }
.page .path { font-family: var(--serif); font-weight: 700; color: var(--ink); background: var(--note-bg); box-shadow: 0 0 0 0.14em var(--note-bg); border-radius: 0.3em; white-space: nowrap; }
.page .email { font-weight: 700; white-space: nowrap; }
.page code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.page em { font-style: italic; }

.page .note {
  background: var(--note-bg); border: 1px solid var(--note-line); border-left: 6px solid var(--gold);
  border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-4);
}
.page .note p:last-child, .page .note ul:last-child { margin-bottom: 0; }

.page .toc { columns: 1; column-gap: var(--sp-6); }
.page .toc li { break-inside: avoid; }
@media (min-width: 40rem) { .page .toc { columns: 2; } }

/* tables scroll inside their own box on narrow screens, never the page; on phones a .stack table turns into small cards */
.page .table-wrap { overflow-x: auto; margin: 0 0 var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.page table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.4; min-width: 34rem; }
.page th, .page td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
.page th { background: var(--note-bg); font-family: var(--serif); font-weight: 700; }
.page tr:last-child td { border-bottom: 0; }
@media (max-width: 39.99rem) {
  .page table.stack { min-width: 0; }
  .page table.stack thead { position: absolute; left: -9999px; }
  .page table.stack tr { display: block; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
  .page table.stack tr:last-child { border-bottom: 0; }
  .page table.stack td { display: block; border: 0; padding: 0.15rem 0 0.4rem; }
  .page table.stack td::before { content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
}

/* questions and answers */
.page details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 var(--sp-4); margin: 0 0 var(--sp-3); background: var(--paper); }
.page details[open] { padding-bottom: var(--sp-2); border-color: rgba(201, 138, 26, 0.55); }
.page summary { font-weight: 700; font-size: 1.15rem; padding-block: 0.8rem; } /* the box, the marker and the chevron: css/site.css */
.page details > :not(summary) { margin-top: 0.4rem; }

/* numbered steps with candy-red discs */
.page ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
.page ol.steps > li { counter-increment: step; position: relative; padding-left: 2.8rem; margin: 0.9rem 0; }
.page ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; font: 700 1.05rem/1 var(--serif); color: var(--red-ink); background: var(--red);
  box-shadow: 0 0 0 2px var(--gold-light);
}

/* 404 */
body.notfound > main .card { text-align: center; }
body.notfound > main .lead { max-width: 30rem; margin-inline: auto; }

/* ---- Press page ---- */
.press .card h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.facts div { padding: 0.65rem 0; border-bottom: 1px dotted var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 700; color: var(--muted); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 0; }
@media (min-width: 40rem) { .facts div { display: grid; grid-template-columns: 11rem 1fr; gap: var(--sp-4); } }
.press .features { columns: 1; }
@media (min-width: 48rem) { .press .features { columns: 2; column-gap: var(--sp-6); } }
.press .features li { break-inside: avoid; }

.dl-grid { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
@media (min-width: 40rem) { .dl-grid { grid-template-columns: repeat(4, 1fr); } }
.dl-grid li { margin: 0; }
.dl { display: grid; gap: 0.5rem; align-content: start; height: 100%; padding: 0.6rem; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dl:hover { border-color: var(--gold); color: var(--ink); box-shadow: var(--shadow); }
.dl img { display: block; width: 100%; height: auto; border-radius: 0.5rem; background: #050a2b; aspect-ratio: 9 / 16; object-fit: cover; }
.dl .dl-name { font-weight: 700; line-height: 1.2; }
.dl .dl-meta { font-size: 0.9rem; color: var(--muted); line-height: 1.25; }
.dl-wide { grid-column: span 2; }
.dl-wide img { aspect-ratio: auto; object-fit: contain; max-height: 9rem; padding: 0.5rem; }
.dl-logo img { background: linear-gradient(160deg, #03145b, #142a8c); aspect-ratio: 2 / 1; object-fit: contain; padding: 0.6rem; }
.dl-icon img { aspect-ratio: 1; }
.dl-art img { aspect-ratio: 1; }
.dl-feature img { aspect-ratio: 1024 / 500; object-fit: cover; }
.page h2 + .press-film { margin-top: var(--sp-4); }
.press-film { display: grid; gap: var(--sp-5); align-items: center; justify-items: center; }
.press-film .phone { --phone-w: min(15rem, 62vw); }
.press-film-copy { align-self: center; }
@media (min-width: 48rem) { .press-film { grid-template-columns: 17rem 1fr; justify-items: start; } .press-film .phone { --phone-w: 16rem; } }
.btnrow { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-4) 0 0; }
.btn-ghost {
  display: inline-block; padding: 0.55rem 1.1rem; font-weight: 700; text-decoration: none; color: var(--ink); background: var(--paper);
  border: 2px solid var(--gold); border-radius: 999px;
}
.btn-ghost:hover { color: var(--ink); background: var(--note-bg); }
.press-beta .btn { margin-top: var(--sp-3); }
