/* Shared mobile theme: apps/mobile/src/theme/tokens.ts. */
:root {
  color-scheme: light dark;
  --bg: #fff; --surface: #f8f8fb; --surface-alt: #efeff5;
  --text: #1a1a2e; --muted: #6c6c80; --border: #d8d8e2;
  --primary: #2943d6; --primary-muted: #dee5ff; --selection: #afc2ff; --highlight: #f0f3fa;
  --paper-shadow: 0 16px 40px -24px rgba(26,26,46,.22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; border-radius: 3px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 { font-weight: 650; letter-spacing: -.045em; }
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; top: 12px; left: 12px; padding: 8px 16px; background: var(--bg); z-index: 10; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { color: var(--text); display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -.06em; text-decoration: none; line-height: 1; }
.brand-mark { width: 22px; height: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.brand-mark span { background: var(--text); border-radius: 1px; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(6), .brand-mark span:nth-child(7) { background: var(--primary); }
.brand-mark span:nth-child(4), .brand-mark span:nth-child(8) { background: var(--border); }
.site-header nav { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 550; }
.site-header nav a { color: var(--text); text-decoration: none; }
.site-header nav a:hover { color: var(--primary); }
.site-header nav .nav-cta { display: inline-flex; gap: 20px; align-items: center; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); }
.hero { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 64px; padding-block: 88px 94px; }
.hero-copy { max-width: 620px; }
.hero .eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; }
.little-grid { font-size: 21px; line-height: 1; letter-spacing: 0; }
.hero h1 { font-size: clamp(40px, 4.6vw, 62px); line-height: 1.09; }
.hero h1 span { color: var(--primary); }
.hero-description { max-width: 440px; color: var(--muted); font-size: 18px; line-height: 1.65; margin-top: 26px; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; min-height: 48px; padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
.button.primary, .btn.primary { background: var(--primary); color: #fff; }
.button:hover { transform: translateY(-1px); }
.button.primary:hover, .btn.primary:hover { background: #2037b9; }
.text-link { font-size: 14px; text-decoration: none; color: var(--text); }
.text-link span { margin-left: 6px; }
.text-link:hover { color: var(--primary); }
.availability { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin-top: 22px; }
.availability > span { background: var(--primary); width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.puzzle-figure { min-width: 0; padding: 24px 24px 0; background: var(--surface); border-radius: 12px; }
.puzzle-paper { background: var(--bg); border: 1px solid var(--border); padding: 22px; border-radius: 8px; box-shadow: var(--paper-shadow); }
.puzzle-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.puzzle-heading > span:first-child { font-size: 19px; font-weight: 650; letter-spacing: -.06em; }
.mode-label { color: var(--muted); font-size: 11px; background: var(--surface); border-radius: 4px; padding: 4px 8px; white-space: nowrap; }
.puzzle-grid { display: grid; grid-template-columns: repeat(9, 1fr); aspect-ratio: 1; border: 1.5px solid var(--text); font-variant-numeric: tabular-nums; }
.puzzle-cell { display: flex; align-items: center; justify-content: center; min-width: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: clamp(15px, 1.8vw, 24px); font-weight: 550; }
.puzzle-cell:nth-child(9n) { border-right: 0; }
.puzzle-cell:nth-child(n+73) { border-bottom: 0; }
.puzzle-cell.box-right { border-right: 1.5px solid var(--text); }
.puzzle-cell.box-bottom { border-bottom: 1.5px solid var(--text); }
.puzzle-cell.related { background: var(--highlight); }
.puzzle-cell.selected { background: var(--selection); color: var(--primary); font-weight: 650; }
.puzzle-bottom { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; font-size: 10px; color: var(--muted); }
.puzzle-bottom span:last-child { color: var(--primary); white-space: nowrap; }
.puzzle-figure figcaption { color: var(--muted); font-size: 10px; padding-block: 14px; text-align: center; }
.ways-section { display: grid; grid-template-columns: 1fr 1.15fr; gap: 100px; padding-block: 72px 80px; border-top: 1px solid var(--border); }
.section-intro .eyebrow { margin-bottom: 18px; }
.section-intro h2 { font-size: 36px; }
.section-intro > p:not(.eyebrow) { color: var(--muted); margin-top: 20px; max-width: 335px; }
.section-intro .small-note { font-size: 13px; padding-top: 12px; }
.ways-list { list-style: none; padding: 0; margin: 0; }
.ways-list li { display: grid; grid-template-columns: 32px 1fr; gap: 20px; padding-block: 26px; border-bottom: 1px solid var(--border); }
.ways-list li:first-child { padding-top: 0; }
.ways-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.way-number { font-size: 12px; color: var(--primary); padding-top: 3px; font-variant-numeric: tabular-nums; }
.ways-list h3 { font-size: 21px; font-weight: 600; letter-spacing: -.025em; margin-bottom: 10px; }
.ways-list p { color: var(--muted); font-size: 15px; max-width: 420px; }
.way-tag { display: inline-block; margin-top: 12px; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .04em; background: var(--surface); border-radius: 4px; padding: 2px 8px; }
.get-section { margin-bottom: 72px; }
.get-panel { background: var(--surface); padding: 50px 54px; display: flex; align-items: center; justify-content: space-between; gap: 48px; border-radius: 12px; }
.get-panel > div:first-child { max-width: 575px; }
.get-panel .eyebrow { margin-bottom: 16px; }
.get-panel h2 { font-size: 36px; }
.get-panel p:not(.eyebrow) { color: var(--muted); font-size: 15px; margin-top: 16px; max-width: 490px; }
.get-panel .button { margin-top: 25px; }
.get-panel .release-note { font-size: 11px !important; margin-top: 12px !important; }
.closing-grid { display: grid; grid-template-columns: repeat(3, 1fr); width: 156px; aspect-ratio: 1; flex-shrink: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); transform: rotate(-7deg); }
.closing-grid span { display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 27px; font-weight: 500; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.closing-grid span:nth-child(5) { background: var(--primary-muted); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 30px 36px; border-top: 1px solid var(--border); }
.site-footer .brand { font-size: 18px; gap: 8px; }
.site-footer .brand-mark { width: 16px; height: 16px; gap: 2px; }
.site-footer p { color: var(--muted); font-size: 10px; margin-top: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 26px; row-gap: 12px; font-size: 12px; }
.site-footer nav a { text-decoration: none; color: var(--muted); }
.site-footer nav a:hover, .site-footer nav a[aria-current="page"] { color: var(--primary); }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; padding-block: 64px 80px; }
.legal-nav { font-size: 12px; }
.legal-nav nav { position: sticky; top: 30px; }
.legal-nav p { font-weight: 650; color: var(--text); margin-bottom: 15px; }
.legal-nav ol, .legal-nav ul { list-style: none; margin: 0; padding: 0; }
.legal-nav li + li { margin-top: 9px; }
.legal-nav a { color: var(--muted); text-decoration: none; display: block; padding-block: 2px; }
.legal-nav a:hover { color: var(--primary); }
.legal-content { max-width: 720px; min-width: 0; }
.legal-content h1 { font-size: clamp(36px, 4vw, 50px); margin-block: 14px 18px; }
.legal-meta { color: var(--muted); font-size: 12px; }
.legal-review-note { color: var(--muted); font-size: 12px; background: var(--surface); padding: 16px 18px; border-left: 2px solid var(--border); margin-block: 24px; }
.legal-content h2 { font-size: 22px; font-weight: 600; letter-spacing: -.025em; margin-block: 38px 14px; scroll-margin-top: 32px; }
.legal-content > p:not(.eyebrow):not(.legal-meta):not(.legal-review-note) { margin-block: 16px; }
.legal-content p, .legal-content li { font-size: 15px; line-height: 1.85; }
.legal-content .eyebrow { font-size: 11px; }
.legal-content .legal-meta, .legal-content .legal-review-note { font-size: 12px; }
.legal-content ul { padding-left: 22px; margin-block: 16px; }
.legal-content li + li { margin-top: 10px; }
.legal-content strong { font-weight: 600; }
.legal-content a { overflow-wrap: anywhere; }
.legal-content header { margin-bottom: 30px; }
.legal-content section + section { margin-top: 34px; }
.legal-content section p + p { margin-top: 16px; }
.challenge-page { min-height: 100vh; display: flex; flex-direction: column; }
.challenge-main { flex: 1; display: grid; place-items: center; padding-block: 64px; }
.challenge-card { width: min(100%, 520px); border: 1px solid var(--border); border-radius: 12px; padding: 44px; background: var(--surface); text-align: center; }
.challenge-card h1 { font-size: 34px; margin-block: 20px 18px; overflow-wrap: anywhere; }
.challenge-card .sub, .loading { color: var(--muted); margin-bottom: 26px; }
.cta { display: grid; gap: 12px; margin-top: 24px; }
.btn { display: block; border: 1px solid var(--border); padding: 12px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--text); background: var(--bg); }
.btn.primary { border-color: transparent; }
.hint { color: var(--muted); font-size: 12px; margin-top: 20px; }
.no-script { max-width: 520px; color: var(--muted); margin-top: 20px; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0f1a; --surface: #171a29; --surface-alt: #222638; --text: #f4f5fa; --muted: #a8adbf; --border: #34394f; --primary: #7c8dff; --primary-muted: #252e5c; --selection: #3a4b9a; --highlight: #202943; --paper-shadow: none; }
  .button.primary, .btn.primary { color: #0d0f1a; }
  .button.primary:hover, .btn.primary:hover { background: #a2adff; }
  .puzzle-cell.selected { color: #b6c0ff; }
}
@media (min-width: 1500px) { .hero h1 { font-size: 64px; } }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 56px); }
  .hero { gap: 36px; padding-block: 68px; }
  .hero h1 { font-size: 45px; }
  .hero-description { font-size: 16px; }
  .puzzle-figure { padding: 16px 16px 0; }
  .puzzle-paper { padding: 16px; }
  .hero-actions { gap: 18px; }
  .ways-section { gap: 48px; }
  .get-panel { padding: 40px; }
}
@media (max-width: 740px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 78px; }
  .site-header nav { gap: 22px; font-size: 12px; }
  .brand { font-size: 22px; }
  .hero { grid-template-columns: 1fr; gap: 42px; padding-block: 48px; }
  .hero-copy { max-width: 500px; }
  .hero h1 { font-size: clamp(37px, 7.3vw, 52px); }
  .hero .eyebrow { font-size: 10px; margin-bottom: 22px; }
  .hero-description { max-width: 430px; margin-top: 22px; }
  .hero-actions { margin-top: 26px; gap: 23px; }
  .availability { font-size: 10px; }
  .puzzle-figure { width: min(100%, 430px); justify-self: center; padding: 22px 22px 0; }
  .puzzle-paper { padding: 22px; }
  .puzzle-cell { font-size: 22px; }
  .ways-section { grid-template-columns: 1fr; gap: 34px; padding-block: 46px; }
  .section-intro h2, .get-panel h2 { font-size: 32px; }
  .section-intro > p:not(.eyebrow) { max-width: 440px; }
  .section-intro .small-note { padding-top: 0; }
  .ways-list li { padding-block: 24px; gap: 15px; }
  .ways-list h3 { font-size: 20px; }
  .get-section { margin-bottom: 48px; }
  .get-panel { padding: 30px 24px; }
  .closing-grid { display: none; }
  .site-footer { align-items: flex-start; padding-block: 25px 30px; }
  .site-footer nav { flex-direction: column; row-gap: 10px; align-items: flex-start; font-size: 11px; }
  .legal-layout { grid-template-columns: 1fr; gap: 30px; padding-block: 34px 48px; }
  .legal-nav nav { position: static; display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .legal-nav nav a { font-size: 11px; padding: 0; }
  .legal-nav ol, .legal-nav ul { display: flex; flex-wrap: wrap; gap: 8px 18px; }
  .legal-nav li + li { margin: 0; }
  .legal-nav { border-bottom: 1px solid var(--border); padding-bottom: 22px; }
  .legal-content h1 { font-size: 38px; }
  .challenge-card { padding: 30px 22px; }
  .challenge-card h1 { font-size: 30px; }
}
@media (max-width: 370px) {
  .wrap { width: calc(100% - 32px); }
  .site-header nav { gap: 16px; }
  .site-header nav .nav-cta { gap: 6px; }
  .hero h1 { font-size: 34px; }
  .hero-actions { gap: 16px; }
  .hero-actions .button { gap: 16px; padding-inline: 16px; }
  .text-link { font-size: 12px; }
  .puzzle-figure { padding: 14px 14px 0; }
  .puzzle-paper { padding: 14px; }
  .puzzle-cell { font-size: 19px; }
  .puzzle-figure figcaption { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .button:hover { transform: none; }
}
