/* Tabcade help pages (about, FAQ, support, contact, rules, terms, privacy, copyright, credits,
   all sites). Same colours as index.html: the page is Tabcade blue (light) or near black (dark)
   with the gamepad doodles; the text sits on one paper sheet with an ink border and the hard
   drop shadow, so long reading stays dark-on-light (light) or light-on-dark (dark).
   The --ct-* names are kept because notice.css and the account panel paint with them. */
[hidden] { display: none !important; }

:root {
  --play: #ff6b1f;
  --display: "Lilita One", "Arial Rounded MT Bold", sans-serif;
  --body: Figtree, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --doodle: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27 fill=%27none%27 stroke=%27%23fff%27 stroke-opacity=%27.06%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M32 20l15 25H17z%27/%3E%3Ccircle cx=%27130%27 cy=%2738%27 r=%2712%27/%3E%3Cpath d=%27M74 104l18 18M92 104l-18 18%27/%3E%3Crect x=%27136%27 y=%27124%27 width=%2722%27 height=%2722%27 rx=%274%27 transform=%27rotate(14 147 135)%27/%3E%3Cpath d=%27M28 148h18M37 139v18%27/%3E%3C/svg%3E");
  /* light = Tabcade blue, dark = near black. theme.js sets data-theme (dark unless you picked
     light); "auto" leaves it off and the device decides, exactly like index.html. */
  --page: #14287f; --bar: #10216a; --on-page: #fff; --on-page-soft: #c9d2ff;
  --ct-ink: #121726; --ct-ink-soft: #2b3350; --ct-mute: #4b5472; --ct-mute-soft: #535c7a;
  --ct-line: #d6dcea; --ct-line-soft: #e6eaf3; --ct-line-strong: #98a3c2;
  --ct-paper: #fbfcfe; --ct-paper-raised: #eef1f7; --ct-paper-sunken: #e6eaf3;
  --ct-ring: #ff6b1f; --danger: #b4321f; --good: #1d7a43; --edge: #121726;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0c0f17; --bar: #121622; --on-page-soft: #a9b2c8;
    --ct-ink: #f1f4fb; --ct-ink-soft: #d5dbea; --ct-mute: #a9b2c8; --ct-mute-soft: #9aa3ba;
    --ct-line: #262c3d; --ct-line-soft: #1b2130; --ct-line-strong: #3a4258;
    --ct-paper: #121622; --ct-paper-raised: #1b2132; --ct-paper-sunken: #0e1119;
    --danger: #ff8a7a; --good: #6fdc9a; --edge: #05070c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --page: #0c0f17; --bar: #121622; --on-page-soft: #a9b2c8;
    --ct-ink: #f1f4fb; --ct-ink-soft: #d5dbea; --ct-mute: #a9b2c8; --ct-mute-soft: #9aa3ba;
    --ct-line: #262c3d; --ct-line-soft: #1b2130; --ct-line-strong: #3a4258;
    --ct-paper: #121622; --ct-paper-raised: #1b2132; --ct-paper-sunken: #0e1119;
    --danger: #ff8a7a; --good: #6fdc9a; --edge: #05070c;
    color-scheme: dark;
}
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100dvh; color: var(--ct-ink);
  background: var(--doodle) 0 0 / 180px 180px, var(--page);
  font: 500 16.5px/1.7 var(--body);
}
:focus-visible { outline: 3px solid var(--play); outline-offset: 2px; }

/* top bar: back to Tabcade, and the help pages */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap;
  padding: 10px 24px; background: var(--bar); color: var(--on-page);
}
.topbar a { color: var(--on-page-soft); text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 6px 0; }
.topbar a:hover, .topbar a[aria-current="page"] { color: var(--on-page); }
.topbar a[aria-current="page"] { text-decoration: underline 3px var(--play); text-underline-offset: 6px; }
.topbar nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.topbar a.back {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  font: 400 17px/1 var(--display); text-transform: uppercase; letter-spacing: .5px;
  color: #121726; background: #eef1f7; border: 3px solid #121726; border-radius: 11px; box-shadow: 0 4px 0 #121726;
}
.topbar a.back:hover { color: #121726; filter: brightness(1.06); }
.topbar a.back:active { transform: translateY(3px); box-shadow: 0 1px 0 #121726; }
/* leave room on the right for the floating Sign in button */
@media (min-width: 561px) { .topbar { padding-right: 130px; } }
@media (max-width: 560px) { .topbar { padding: 10px 16px; } .topbar nav { gap: 2px 14px; } }

/* the sheet the text sits on */
.wrap {
  max-width: 820px; margin: 28px auto 64px; padding: 40px 44px 36px;
  background: var(--ct-paper); border: 3px solid var(--edge); border-radius: 18px; box-shadow: 0 8px 0 var(--edge);
}
@media (max-width: 860px) { .wrap { margin: 20px 16px 48px; } }
@media (max-width: 560px) { .wrap { padding: 26px 18px 24px; border-radius: 14px; box-shadow: 0 6px 0 var(--edge); } }

.kicker {
  display: inline-block; padding: 3px 12px; border: 2px solid #121726; border-radius: 999px;
  background: var(--play); color: #121726; font: 800 12px/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase;
}
h1 { margin: 16px 0 12px; font: 400 clamp(2rem, 2.6vw + 1.2rem, 2.9rem)/1.08 var(--display); letter-spacing: .3px; color: var(--ct-ink); }
h1 .soft { color: var(--ct-mute); }
h2 {
  margin: 44px 0 10px; font: 400 25px/1.2 var(--display); letter-spacing: .3px;
  padding-top: 16px; border-top: 2px solid var(--ct-line); scroll-margin-top: 80px;
}
h2 .n { font: 800 13px/1 var(--body); color: var(--ct-mute); margin-right: 10px; letter-spacing: .06em; vertical-align: 3px; }
h3 { margin: 26px 0 6px; font-size: 17.5px; font-weight: 800; scroll-margin-top: 80px; }
p, ul, ol { max-width: 72ch; }
.lede { margin: 0 0 8px; color: var(--ct-ink-soft); font-size: 18px; }
p { margin: 0 0 14px; color: var(--ct-ink-soft); }
ul, ol { margin: 0 0 16px; padding-left: 22px; color: var(--ct-ink-soft); }
li { margin-bottom: 7px; }
li::marker { color: var(--ct-mute); }
b, strong { color: var(--ct-ink); font-weight: 800; }
a { color: var(--ct-ink); text-decoration: underline 2px var(--play); text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 3px; }
code { font-family: var(--mono); font-size: .86em; background: var(--ct-paper-sunken); padding: 1px 5px; border-radius: 4px; word-break: break-word; }
.stamp { font-size: 14px; font-weight: 700; color: var(--ct-mute); }
.rule { height: 2px; background: var(--ct-line); margin: 34px 0; }
.box { border: 2px solid var(--ct-line-strong); border-radius: 12px; background: var(--ct-paper-raised); padding: 16px 18px; margin: 18px 0; }
.box p, .box ul { max-width: none; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
footer { margin-top: 48px; padding-top: 16px; border-top: 2px solid var(--ct-line); font-size: 14px; font-weight: 700; color: var(--ct-mute); }
footer a { display: inline-block; padding: 5px 0; color: var(--ct-mute); text-decoration: none; }
footer a:hover { color: var(--ct-ink); }

/* contents list on the privacy pages */
.toc { columns: 2 260px; column-gap: 28px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: toc; max-width: none; }
.toc li { break-inside: avoid; margin: 0 0 6px; padding-left: 30px; position: relative; counter-increment: toc; }
.toc li::before { content: counter(toc, decimal-leading-zero); position: absolute; left: 0; top: 3px; font-size: 12px; font-weight: 800; color: var(--ct-mute); }
.toc a { text-decoration: none; color: var(--ct-ink-soft); }
.toc a:hover { color: var(--ct-ink); text-decoration: underline 2px var(--play); }
.top { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--ct-mute); text-decoration: none; }

/* tables scroll inside their own box, never the page */
.tablewrap { overflow-x: auto; margin: 14px 0 20px; border: 2px solid var(--ct-line-strong); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.55; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--ct-line); }
th { background: var(--ct-paper-sunken); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ct-mute); }
tr:last-child td { border-bottom: 0; }
td b { white-space: nowrap; }

/* questions that open when clicked */
details.qa { border-bottom: 2px solid var(--ct-line); padding: 14px 0; }
details.qa:first-of-type { border-top: 2px solid var(--ct-line); }
details.qa summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  font-size: 17px; font-weight: 800; color: var(--ct-ink);
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font: 400 22px/1 var(--display); color: var(--play); flex: none; }
details.qa[open] summary::after { content: "\2013"; }
details.qa .a { margin-top: 10px; }
details.qa .a p:last-child { margin-bottom: 0; }

/* chunky cards that point to the other help pages */
.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 28px 0 0; }
.paths a {
  display: block; padding: 14px 16px; border: 3px solid var(--edge); border-radius: 12px; box-shadow: 0 4px 0 var(--edge);
  background: var(--ct-paper-raised); text-decoration: none; color: var(--ct-ink);
}
.paths a:hover { background: var(--ct-paper-sunken); }
.paths a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.paths b { display: block; font: 400 19px/1.2 var(--display); letter-spacing: .3px; margin-bottom: 3px; }
.paths span { font-size: 14px; color: var(--ct-mute); }

/* the contact form */
form.contact { display: grid; gap: 14px; margin-top: 18px; max-width: 72ch; }
form.contact label { display: grid; gap: 6px; font-size: 14.5px; font-weight: 800; color: var(--ct-ink); }
form.contact input, form.contact select, form.contact textarea {
  font: 500 16px/1.5 var(--body); color: var(--ct-ink);
  background: var(--ct-paper-raised); border: 2px solid var(--ct-line-strong); border-radius: 10px; padding: 9px 11px;
}
form.contact textarea { min-height: 150px; resize: vertical; }
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: 3px solid var(--play); outline-offset: 1px; }
.btn {
  justify-self: start; display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px;
  font: 400 20px/1 var(--display); text-transform: uppercase; letter-spacing: .5px;
  border: 3px solid #121726; border-radius: 11px; background: var(--play); color: #121726; box-shadow: 0 4px 0 #121726; cursor: pointer;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #121726; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.note { font-size: 14.5px; color: var(--ct-mute); }
.status { min-height: 1.4em; font-size: 15px; font-weight: 700; color: var(--ct-ink-soft); }
.status.bad { color: var(--danger); }
.status.good { color: var(--good); }

/* Touch screens: every link and button is a 44px target. Nothing here applies with a mouse. */
@media (hover: none) and (pointer: coarse) {
  .topbar a { display: inline-flex; align-items: center; min-height: 44px; }
  footer a { display: inline-flex; align-items: center; min-height: 44px; }
  details.qa { padding: 4px 0; }
  details.qa summary { align-items: center; min-height: 44px; padding: 6px 0; }
  form.contact input, form.contact select, form.contact textarea { min-height: 44px; }
  .toc li { margin: 0; }
  .toc li::before { top: 13px; }
  .toc a { display: block; padding: 10px 0; }
  .top { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; }
}
