/* Motor Daily — Captain site canon: Inter, tokens, plates, pills, orange on numbers only. */
:root {
  --page: #fff; --ink: #111; --muted: #6f6f6f; --faint: #a3a3a3; --rule: #eaeaea;
  --block: #F6F5F8; --card: #fff; --fill: #ECEBF0; --accent: #ff4400; --base: #F0EFF3;
  --danger: #d0342c; --hit: #3aa757; --near: #d9a520;
  --ease: cubic-bezier(.22,1,.36,1); --ui: cubic-bezier(.2,.7,.2,1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #000; --ink: #F5F5F7; --muted: rgba(235,235,245,.6); --faint: rgba(235,235,245,.3); --rule: rgba(255,255,255,.1);
    --block: #1C1C1E; --card: #2C2C2E; --fill: #3A3A3C; --base: #111113; --near: #c9a227;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 400 17px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.wrap { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.45; }

/* nav */
.nav { position: sticky; top: 0; z-index: 5; background: rgba(0,0,0,.7); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); color: #F5F5F7; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.nav .brand { font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; }
.nav .brand svg { width: 26px; height: 26px; display: block; }
.icons { display: flex; gap: 8px; }
.icon { width: 32px; height: 32px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #F5F5F7; cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .3s var(--ui); }
.icon:hover { background: rgba(255,255,255,.2); }

/* hero band */
header.dark { background: #000; color: #F5F5F7; }
.hero.plain { padding: 64px 0 44px; }
.eyebrow { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: rgba(235,235,245,.3); margin-bottom: 18px; }
.eyebrow b { font-weight: 500; color: var(--accent); }
h1 { font-size: 48px; line-height: 1.06; letter-spacing: -.03em; font-weight: 500; margin: 0 0 18px; }
.lead { font-size: 28px; line-height: 1.18; letter-spacing: -.02em; color: rgba(245,245,247,.5); margin: 0; max-width: 600px; }
.lead b { font-weight: 500; color: var(--accent); }

/* page sheet */
.page { position: relative; z-index: 1; background: var(--page); border-radius: 0 0 28px 28px; box-shadow: 0 30px 60px rgba(0,0,0,.08); }
section { padding: 40px 0 72px; }
section + section { border-top: 1px solid var(--rule); }
h2 { font-size: 32px; line-height: 1.18; letter-spacing: -.025em; font-weight: 500; margin: 0 0 20px; }

/* plates */
.plate { background: var(--block); border-radius: 14px; padding: 18px 22px; }
.plate.large { border-radius: 20px; padding: 28px; }

/* tiles */
.board { display: grid; gap: 8px; justify-content: center; margin-bottom: 20px; }
.board .r { display: grid; gap: 8px; grid-auto-flow: column; }
.t { width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; font-weight: 500; text-transform: uppercase; letter-spacing: -.01em; background: var(--block); color: var(--ink); transition: transform .45s var(--ease), background .3s var(--ui), color .3s var(--ui); }
.t.typed { background: var(--fill); animation: tpop .25s var(--ease); }
.t.hit { background: var(--hit); color: #fff; }
.t.near { background: var(--near); color: #1a1a1a; }
.t.miss { background: var(--fill); color: var(--muted); }
.r.reveal .t { animation: flip .55s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.r.shake { animation: shake .4s var(--ease); }
@keyframes tpop { from { transform: scale(.92); } to { transform: scale(1); } }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(-90deg); } 100% { transform: rotateX(0); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

.hint { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 520px; margin: 0 auto 24px; text-align: center; }
.hint .cat { color: var(--ink); font-weight: 500; }
.hint .def { display: inline-block; margin-top: 6px; color: var(--ink); }

/* keyboard */
.kb { display: grid; gap: 8px; max-width: 520px; margin: 0 auto; }
.kb .kr { display: flex; gap: 6px; justify-content: center; }
.key { min-width: 36px; height: 52px; border: 0; border-radius: 10px; background: var(--block); color: var(--ink); font-weight: 500; font-size: 15px; cursor: pointer; padding: 0 10px; transition: background .2s var(--ui), transform .2s var(--ui); }
.key:active { transform: scale(.96); }
.key.wide { min-width: 64px; font-size: 12px; letter-spacing: .04em; }
.key.hit { background: var(--hit); color: #fff; }
.key.near { background: var(--near); color: #1a1a1a; }
.key.miss { color: var(--faint); background: var(--block); }

/* result */
#result h2 { margin-bottom: 6px; }
#result .answer { font-size: 19px; color: var(--muted); margin: 0 0 6px; }
#result .answer b { color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
#result .fact { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0 0 22px; max-width: 560px; }
#result pre { font: 500 15px/1.4 Inter, sans-serif; background: var(--card); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; white-space: pre-wrap; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--ink); color: var(--page); font-size: 15px; font-weight: 500; cursor: pointer; transition: transform .3s var(--ui), opacity .3s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: var(--block); color: var(--ink); }
.countdown { font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.countdown b { font-weight: 500; color: var(--accent); }

/* footer base */
footer.base { position: sticky; bottom: 0; background: var(--base); color: var(--ink); padding: 72px 0 40px; }
footer .brand { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
footer p { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin: 0 0 8px; max-width: 480px; }
footer .fine { color: var(--faint); margin-top: 28px; }

/* dialogs */
dialog { border: 0; border-radius: 20px; padding: 28px; max-width: 420px; width: calc(100% - 48px); background: var(--page); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }
dialog h2 { font-size: 24px; margin-bottom: 12px; }
dialog p { font-size: 15px; line-height: 1.5; margin: 0 0 14px; }
dialog .btn { margin-top: 12px; width: 100%; justify-content: center; }
.legend { display: flex; align-items: center; gap: 12px; font-size: 14px; margin: 8px 0; }
.legend .t { width: 34px; height: 34px; font-size: 16px; border-radius: 8px; }
.stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin: 14px 0 20px; }
.stat b { display: block; font-size: 28px; font-weight: 500; letter-spacing: -.03em; color: var(--accent); }
.stat span { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; }
.dist div { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-size: 13.5px; }
.dist b { flex: 0 0 12px; font-weight: 500; color: var(--muted); }
.dist i { display: block; height: 20px; background: var(--block); border-radius: 6px; min-width: 22px; text-align: right; padding-right: 7px; font-style: normal; font-size: 12px; line-height: 20px; }
.dist i.me { background: var(--ink); color: var(--page); }

/* reveal */
.rv { opacity: 0; filter: blur(6px); transform: translateY(18px); transition: opacity .7s var(--ease), filter .7s var(--ease), transform .7s var(--ease); transition-delay: var(--rd, 0ms); }
.rv.in { opacity: 1; filter: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; filter: none; transform: none; transition: none; } .r.reveal .t, .t.typed { animation: none; } }

.toast { position: fixed; left: 50%; top: 68px; transform: translateX(-50%) translateY(-8px); background: var(--ink); color: var(--page); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s var(--ui); z-index: 10; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .hero.plain { padding: 44px 0 36px; }
  h1 { font-size: 40px; }
  .lead { font-size: 22px; }
  section { padding: 28px 0 56px; }
  .t { width: 46px; height: 46px; font-size: 21px; border-radius: 10px; }
  .board, .board .r { gap: 6px; }
  .key { min-width: 30px; padding: 0 6px; height: 48px; }
  .key.wide { min-width: 52px; }
  .plate.large { padding: 22px; }
}
