/* AISprite website: shared tokens, layout and components for the home page and the account dashboard. */
:root {
  color-scheme: dark;
  --bg: #0f1012;
  --band: #15171a;
  --surface: #17191c;
  --surface-2: #1a1c20;
  --line: #2b2f35;
  --line-strong: #3a3f46;
  --text: #edeef0;
  --text-2: #c9cdd3;
  --muted: #a3a8b0;
  --faint: #7d838c;
  --accent: #f2a93b;
  --on-accent: #141414;
  --ok: #43d18a;
  --danger: #f08a7e;
  --warn-bg: #2a2113;
  --warn-line: #6b4e1a;
  --radius: 14px;
  --display: 'Bricolage Grotesque', Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: #ffc56b; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.band { background: var(--band); border-block: 1px solid #24272c; }
.section { padding-block: 72px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 280px; min-width: 0; }

h1, h2, h3 { margin: 0; line-height: 1.1; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
.h1 { font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; }
.h2 { font-size: clamp(30px, 3.6vw, 44px); }
.h3 { font-size: 18px; }
.lead { color: #b4b9c0; font-size: 18px; max-width: 600px; margin: 18px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.eyebrow { margin: 0 0 16px; font: 13px var(--mono); letter-spacing: 0.04em; color: var(--accent); text-transform: uppercase; }
.num { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.inset { background: var(--bg); }
.card.hi { border: 2px solid var(--accent); }
.notice { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.notice.ok { background: #13261c; border-color: #285a3d; }
.notice.err { background: #2b1714; border-color: #5a3833; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.accent { background: var(--accent); color: var(--on-accent); }
.pill.ok { background: #143323; color: #6ee7a8; }
.pill.off { background: #2b2f35; color: var(--text-2); }
.pill.bad { background: #3a1f1c; color: #f5a196; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); }
.dot.run { background: var(--accent); }
.dot.bad { background: var(--danger); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 15px var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #5b616a; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: #ffbb57; color: var(--on-accent); }
.btn.danger { color: var(--danger); border-color: #5a3833; }
.btn.danger.armed { background: var(--danger); color: var(--on-accent); border-color: var(--danger); font-weight: 600; }
.btn.lg { min-height: 48px; padding: 0 22px; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; min-height: 50px; }
.btn.apple { background: #000; color: #fff; border-color: #fff; min-height: 50px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 14px var(--body); cursor: pointer; }
.seg button[aria-pressed='true'], .seg button[aria-selected='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input[type='text'], input[type='email'], input[type='url'], input[type='number'], input[type='date'], select, textarea {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px var(--body);
}
textarea { padding: 12px; resize: vertical; line-height: 1.45; }
input[type='checkbox'], input[type='range'] { accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; }

pre.code { margin: 0; padding: 18px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.secret { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--accent); }
.secret code { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
/* position: relative keeps absolutely positioned descendants (sr-only labels) inside the scroll box. */
.table-box { position: relative; overflow-x: auto; }
table.data { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px 10px; border-bottom: 1px solid #24272c; vertical-align: top; }
dl.facts { margin: 0; display: grid; gap: 12px 18px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
dl.facts dt { font-size: 13px; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; font-weight: 600; }

/* Header */
.top { border-bottom: 1px solid #24272c; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font: 700 20px var(--display); }
.brand:hover { color: var(--text); }
.top nav { display: flex; flex-wrap: wrap; gap: 0 22px; flex: 1 1 320px; }
.top nav a { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.top nav a:hover, .top nav a[aria-current='page'] { color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 8px; }

/* Home */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 72px 0 56px; }
.hero > div { flex: 999 1 460px; min-width: 0; }
.hero figure { flex: 1 1 300px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.checker { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background-color: #1a1c20; background-image: conic-gradient(#1a1c20 25%, #202328 0 50%, #1a1c20 0 75%, #202328 0); background-size: 24px 24px; }
.sprite { width: 320px; height: 320px; max-width: 100%; aspect-ratio: 1; background-repeat: no-repeat; background-size: 100% 800%; }
.sprite.chest { background-image: url('/static/img/chest-sheet.png'); }
.sprite.sm { width: 64px; height: 64px; border-radius: 8px; }
.sprite.md { width: 256px; height: 256px; }
.preview-view { width: 112px; height: 112px; border-radius: 10px; background: #2e2e33 url('/static/img/chest-preview.png') no-repeat; background-size: 100% 400%; }
/* Sprite-sheet rows: 8 directions on chest-sheet.png, 4 views on chest-preview.png. */
.d0 { background-position: 0 0; } .d1 { background-position: 0 14.2857%; } .d2 { background-position: 0 28.5714%; } .d3 { background-position: 0 42.8571%; }
.d4 { background-position: 0 57.1429%; } .d5 { background-position: 0 71.4286%; } .d6 { background-position: 0 85.7143%; } .d7 { background-position: 0 100%; }
.v0 { background-position: 0 0; } .v1 { background-position: 0 33.3333%; } .v2 { background-position: 0 66.6667%; } .v3 { background-position: 0 100%; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--faint); }
.steps li.done, .steps li.active { color: var(--text); }
.steps li::before { content: ''; flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid #5b616a; }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.active::before { border-color: var(--accent); background: radial-gradient(var(--accent) 35%, transparent 40%); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s; }
.bar > span.full { width: 100%; }
.price { font-size: 22px; font-weight: 600; margin: 14px 0 0; min-height: 1.5em; }
details.faq { padding: 4px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
details.faq summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
details.faq p { margin: 0 0 16px; color: #b4b9c0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; padding-block: 40px 56px; }

/* Text pages (privacy, terms, support) */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { font-size: 20px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose code { color: var(--text); background: var(--surface); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; overflow-wrap: anywhere; }

/* Dashboard */
.app { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding: 28px 0 64px; }
.app > nav { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; }
.app > nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--text-2); text-decoration: none; }
.app > nav a[aria-current='page'] { background: #1e2125; color: var(--text); font-weight: 600; }
.app > main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 1px solid var(--line-strong); }
.chart span { flex: 1 1 0; min-width: 0; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.signin { max-width: 460px; margin: 64px auto; }

@media (max-width: 720px) {
  .app > nav { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; }
  .app > nav a { padding: 0 12px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .section { padding-block: 56px; }
  .hero { padding: 48px 0 40px; gap: 32px; }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar > span { transition: none; }
}
