/* Purpose: the Twerky account site's look - one stylesheet for every page (the security policy forbids inline
   styles). Twerk Games look: neutral grays, a Blizzard-like blue for actions and highlights, Anton headlines and
   Barlow text (self-hosted, fonts/fonts.css) - user 2026-11-17, replacing 2026-11-16's deep navy and cyan. Hovers
   fade (a box-shadow wash, which can animate) and tiles lift - the old gradient wash snapped on and off. Boxes have one even border; every button shares
   one hover effect and every field one focus ring (user feedback 2026-11-16).
   Dark only. Sign-in pages have two separate designs (user 2026-11-16):
   - desktop (900 px and wider): a box in the middle of the page, the round Twerk Games mark and the centred headline
     inside it;
   - phone: no box; the page itself is the sheet, the headline is large and left-aligned, and the main button stays
     at the bottom of the screen.
   The account dashboard keeps its side menu + panels (tabs on narrow screens). */
@import url("/fonts/fonts.css");

:root {
  --bg: #1b1d21;
  --surface: #24272c;
  --surface-2: #2e3238;
  --text: #f2f3f5;
  --muted: #a9aeb8;
  --line: #3b4048;
  --accent: #148eff;
  --accent-strong: #5cafff;
  --accent-soft: #17385e;
  --on-accent: #ffffff;
  --danger: #ff8f8f;
  --danger-soft: #3a1626;
  --ok: #7ad69d;
  --ok-soft: #10301f;
  --warn: #ffd23f;
  --warn-soft: #33290a;
  --display: "Anton", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.55 var(--body);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:not(.btn):hover { color: var(--accent-strong); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; font-weight: 700; }
h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
[hidden] { display: none !important; }
.who { font-size: 15px; color: var(--muted); }
.who strong { color: var(--text); }

/* ---- buttons and fields ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface-2);
  color: var(--text);
  font: 700 16px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
/* one hover for every button: a light wash over its own colour that fades in (the colour of the text stays) */
.btn:hover { box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0.09); }
.btn:active { transform: translateY(1px); transition-duration: 0.08s; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.primary { background-color: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--danger); border-color: var(--danger); background-color: transparent; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.steam { background-color: #1b2838; border-color: var(--line); color: #ffffff; }
.btn svg, .btn img { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
/* "Sign in with a passkey" is the best way in, so it is the fanciest button (user 2026-11-17: "make pass key sign in
   button fancier than the normal continue button"): a deep-to-bright blue gradient with a lit top edge, the passkey
   mark, a blue glow, a lift on hover, and a light sheen that sweeps across once after the page opens and on hover.
   Continue stays the flat blue it was. */
.btn.passkey {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(120deg, #0a4cb0 0%, #148eff 52%, #4fb2ff 100%);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 24px rgba(20, 142, 255, 0.35);
}
.btn.passkey svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); }
.btn.passkey::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%) no-repeat;
  background-size: 250% 100%;
  background-position: 130% 0;
  transition: background-position 0.8s ease;
  animation: passkey-sheen 1.1s ease 0.6s 1 backwards; /* ends off the edge, then rests on the left again: hover sweeps too */
  pointer-events: none;
}
.btn.passkey:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 3px rgba(92, 175, 255, 0.3), 0 12px 30px rgba(20, 142, 255, 0.45);
}
.btn.passkey:hover::after { background-position: -30% 0; }
@keyframes passkey-sheen { from { background-position: 130% 0; } to { background-position: -30% 0; } }
/* Explanations as short pairs - a situation, then what happens (Passkeys, Sessions) */
.explain-list { list-style: none; margin: 2px 0 4px; padding: 0; display: grid; gap: 12px; }
.explain-list li { padding-left: 14px; border-left: 2px solid var(--line); }
.explain-list strong { display: block; margin-bottom: 2px; font-weight: 700; }
.explain-list span { color: var(--muted); }

label.field { display: block; margin-top: 16px; font-weight: 600; font-size: 15px; }
.input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.4 var(--body);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 24px; letter-spacing: 6px; text-align: center; }

/* ---- messages ---- */
.notice { padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; font-size: 15px; }
/* sign-in pages: the page's message sits next to the action (above the main button), never above the headline */
.box #notice { margin: 16px 0 0; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--surface-2); color: var(--muted); }

/* ---- sign-in pages: the box ---- */
main.auth { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px 24px; }
.box {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 40px 40px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.box-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 26px; }
.mark { display: block; border-radius: 50%; margin-bottom: 18px; }
.mark img { display: block; width: 64px; height: 64px; }
.box-head h1 { margin: 0; font: 400 34px/1.05 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.box-head .lead { max-width: 46ch; margin: 12px 0 0; color: var(--muted); }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 15px; }
.box > form > .btn-row, .box > .btn-row { margin-top: 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- sign-up and sign-in forms (Amazon Cognito's order, user 2026-11-16): a progress bar over the steps of the whole
   sign-up, one form per step, the password checklist, and identifier-first sign-in (email, then password) ---- */
.box.steps-box { max-width: 520px; }
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; width: 100%; max-width: 260px; }
.progress span { height: 4px; border-radius: 2px; background: var(--line); transition: background-color 0.3s; }
.progress span.done { background: var(--accent); }
.step-count { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.signup-progress { display: flex; flex-direction: column; align-items: center; width: 100%; margin-bottom: 18px; }
.step h2 { margin: 0; text-align: center; font: 400 30px/1.1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.step > .lead { margin: 10px auto 30px; max-width: 42ch; text-align: center; color: var(--muted); text-wrap: balance; }
.step.enter { animation: step-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.step.enter-back { animation: step-in-back 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
/* "or continue with" + provider tiles (first sign-up step), the shape of Blizzard's sign-in tiles */
/* "Are you on a public computer?" - the passkey offer under Continue, set apart by space only, no divider lines
   (user 2026-11-17) */
.public-pc { margin-top: 28px; text-align: center; }
.public-pc-title { margin: 0; font-weight: 700; }
.public-pc-text { margin: 4px auto 0; max-width: 42ch; color: var(--muted); font-size: 14px; text-wrap: balance; }
.public-pc .btn-row { margin-top: 12px; }
/* "Back to Twerk Games" above the sign-in and create-account boxes, lined up with the box's left edge (user 2026-11-17:
   "the sign in page doesn't have go back underline button") */
.back-link { display: block; width: 100%; max-width: 480px; margin: 0 0 14px; color: var(--muted); font-size: 14px; text-decoration: none; }
.back-link span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.back-link:hover { color: var(--text); }
/* The optional passkey step at the end of every sign-up (passkey-offer.html, user 2026-11-17) */
.offer .explain-list { margin: 0 0 6px; }
.skip-row { margin: 14px 0 0; text-align: center; }
.offer-fine { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.alt-providers { margin-top: 6px; }
.alt-providers .divider { margin: 30px 0 14px; }
.tiles { display: flex; justify-content: center; gap: 12px; }
.btn.tile { width: 64px; min-height: 48px; padding: 0; box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0), 0 0 0 rgba(0, 0, 0, 0); }
.btn.tile svg { width: 24px; height: 24px; transition: transform 0.2s ease; }
.btn.tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0.09), 0 8px 18px rgba(0, 0, 0, 0.35); }
.btn.tile:hover svg { transform: scale(1.08); }
.btn.tile-steam { background-color: #1b2838; color: #ffffff; }
/* white: a white wash would not show, so Google's tile darkens a touch instead */
.btn.tile-google { background-color: #ffffff; border-color: #ffffff; box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0); }
.btn.tile-google:hover { box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0.07), 0 8px 18px rgba(0, 0, 0, 0.35); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 72px; }
.reveal { position: absolute; right: 8px; top: 50%; margin-top: 3px; transform: translateY(-50%); padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 14px var(--body); cursor: pointer; }
.reveal:hover { color: var(--text); background: var(--surface-2); }
.rules { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; }
.rules li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { background: currentColor; }
.step-foot { justify-content: center; }
.agree { margin-top: 20px; }
.step > .who { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 4px; }
.step > .who span { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
button.link:hover { color: var(--accent-strong); }
button.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
#signin-others .btn-row { margin-top: 14px; }

/* last sign-up step: choose a passkey on the phone or an authenticator app (secure.html) */
.choices { display: grid; gap: 12px; margin-top: 4px; }
.choice { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 16px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background-color: var(--bg); color: var(--text); font: inherit; cursor: pointer; box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.choice:hover { border-color: var(--accent); box-shadow: inset 0 0 0 100vmax rgba(255, 255, 255, 0.04); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice:disabled { opacity: 0.6; cursor: wait; }
.choice-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.choice-icon svg { width: 24px; height: 24px; }
.choice-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.choice-text strong { font-size: 17px; }
.choice-text span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.choice-tag { margin-left: auto; align-self: flex-start; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; }
#secure-app-body .qr-wrap { justify-content: center; }

/* Terms of Service and Privacy Policy: a wider box for reading, text left-aligned */
.box.legal { max-width: 720px; }
.box.legal h2 { margin: 28px 0 8px; font-size: 20px; }
.box.legal p, .box.legal li { line-height: 1.65; }
.box.legal ul { margin: 0 0 12px; padding-left: 22px; }
.box.legal li + li { margin-top: 6px; }

footer.site { display: flex; justify-content: center; align-items: baseline; gap: 12px; padding: 18px 20px 26px; font-size: 14px; color: var(--muted); }
footer.site .sep { color: var(--muted); }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }

/* ---- sign-in pages: the phone design (no box - the page is the sheet) ---- */
@media (max-width: 899px) {
  body:has(main.auth) { background: var(--surface); }
  main.auth { justify-content: flex-start; align-items: stretch; padding: 28px 20px 0; }
  .box { max-width: none; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .box-head { align-items: flex-start; text-align: left; margin-bottom: 22px; }
  .mark { margin-bottom: 26px; }
  .mark img { width: 52px; height: 52px; }
  .box-head h1 { font-size: 40px; line-height: 1; }
  .box-head .lead { font-size: 16px; }
  .btn { min-height: 52px; font-size: 17px; }
  .input { padding: 14px; font-size: 17px; }
  /* the main button stays reachable at the bottom of the screen while the form scrolls */
  .sticky-action { position: sticky; bottom: 0; margin: 22px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .sticky-action .btn-row { margin-top: 0; }
  footer.site { padding-top: 26px; }
  /* sign-up steps on a phone: progress across the top, the question large and left-aligned */
  .progress { max-width: none; }
  .box-head .step-count { margin-top: 8px; }
  .signup-progress { align-items: stretch; }
  .step h2 { text-align: left; font-size: 36px; }
  .step > .lead { margin: 10px 0 30px; text-align: left; }
  .public-pc { text-align: left; }
  .public-pc-text { margin-left: 0; }
  .step > .who { justify-content: flex-start; }
  .step-foot { justify-content: flex-start; }
}

/* ---- dashboard ---- */
main.dashboard {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  align-content: start; /* the page fills the window: rows keep their own height instead of sharing the spare space */
}
.sidebar { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 18px; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); text-decoration: none; font: 400 20px/1.1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.sidebar-brand img { width: 44px; height: 44px; }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.sidenav a:hover { background: var(--surface-2); color: var(--text); }
.sidenav a, .reveal { transition: background-color 0.2s ease, color 0.2s ease; }
.sidenav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }
.sidebar-user { padding: 4px 12px 22px; border-bottom: 1px solid var(--line); }
.sidebar-user .who strong { font-size: 18px; overflow-wrap: anywhere; }
.sidebar-account { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 22px 12px 0; border-top: 1px solid var(--line); }
.secret { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.secret-value { overflow-wrap: anywhere; }
.block-line { display: block; margin-top: 10px; }
.table-scroll { overflow-x: auto; }
table.activity td.ip { white-space: nowrap; }
.content > section > h1 { margin-bottom: 18px; font: 400 30px/1.1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 4px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-all; }
.rows { list-style: none; margin: 8px 0 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.provider { display: flex; align-items: center; gap: 12px; }
.provider .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #1b2838; color: #fff; }
.provider .icon svg { width: 20px; height: 20px; }
.qr-wrap { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; margin-top: 14px; }
.qr-wrap img { width: 196px; height: 196px; border-radius: 10px; background: #ffffff; padding: 8px; border: 1px solid var(--line); image-rendering: pixelated; }
.qr-wrap .steps { flex: 1; min-width: 220px; }
.keybox { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-family: ui-monospace, Consolas, monospace; font-size: 13px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; padding: 14px; border-radius: 10px; background: var(--surface-2); font-family: ui-monospace, Consolas, monospace; font-size: 15px; }
table.activity { width: 100%; border-collapse: collapse; font-size: 15px; }
table.activity th, table.activity td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.activity th { color: var(--muted); font-weight: 600; font-size: 14px; }
table.activity td.when { white-space: nowrap; color: var(--muted); }

@media (max-width: 760px) {
  main.dashboard { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .sidebar { position: static; gap: 14px; }
  .sidebar-brand { padding: 0; }
  .sidenav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .sidenav a { white-space: nowrap; }
  .sidebar-user { padding: 0 2px 12px; }
  .sidebar-account { flex-direction: row; align-items: center; justify-content: flex-end; margin-top: 0; padding: 10px 2px 0; }
  table.activity th:nth-child(4), table.activity td:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .step.enter, .step.enter-back { animation: none; }
  .btn, .btn.tile svg, .choice, .sidenav a, .reveal, .btn.passkey::after { transition: none; }
  .btn.passkey::after { animation: none; }
  .btn.passkey:hover { transform: none; }
  .btn.tile:hover, .btn.tile:hover svg { transform: none; }
}
