/* ============================================================
   DailyGame — core stylesheet
   ============================================================ */

:root {
  --bg: #faf8f3;
  --bg-alt: #f2eee5;
  --card: #ffffff;
  --ink: #17171b;
  --ink-2: #4a4a55;
  --ink-3: #7d7d89;
  --line: #e3ded1;
  --line-2: #d5cfbf;
  --brand: #ff4d2d;
  --brand-dark: #d93a1c;
  --link: #1f4fd8;
  --ok: #157f3d;
  --warn: #a06a00;
  --bad: #b3261e;
  --dark: #14141a;
  --dark-2: #1f1f28;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 23, 27, .05), 0 8px 24px -12px rgba(23, 23, 27, .18);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.022em;
  margin: 0 0 .5em;
  font-weight: 750;
}

h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-top: 1.9em; }
h3 { font-size: 1.12rem; margin-top: 1.5em; }

p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin-bottom: .42em; }
strong { font-weight: 680; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--bg-alt);
  padding: .12em .4em;
  border-radius: 5px;
}

.wrap { width: min(1080px, calc(100% - 2.2rem)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 2.2rem)); margin-inline: auto; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 243, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.2rem;
  height: 62px;
}
.logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 800; font-size: 1.08rem; letter-spacing: -.03em;
  color: var(--ink); text-decoration: none; flex: none;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand);
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 2px 8px -2px rgba(255, 77, 45, .6);
}
.nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .93rem; font-weight: 550;
  padding: .4rem .62rem; border-radius: 8px;
}
.nav a:hover { background: var(--bg-alt); color: var(--ink); }
.nav a.cta {
  background: var(--ink); color: #fff; padding: .46rem .85rem;
}
.nav a.cta:hover { background: var(--brand); color: #fff; }

@media (max-width: 760px) {
  .site-header .wrap { gap: .35rem; height: 58px; }
  .nav { gap: 0; }
  .nav a { font-size: .78rem; padding: .34rem .36rem; letter-spacing: -.01em; }
  .nav a.cta { display: none; }
  .nav a[href="/guides"] { display: none; }
  .logo { font-size: .98rem; }
  .logo-mark { width: 23px; height: 23px; border-radius: 7px; font-size: 12px; }
  .play-bar { gap: .5rem; }
  .play-bar .pill { font-size: .74rem; padding: .24rem .5rem; }
}

/* ---------- hero ---------- */

.hero { padding: 3.4rem 0 2.2rem; }
.hero h1 { max-width: 20ch; }
.hero .lede {
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  color: var(--ink-2); max-width: 56ch; margin-bottom: 1.4rem;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-dark);
  background: rgba(255, 77, 45, .09);
  border: 1px solid rgba(255, 77, 45, .22);
  padding: .28rem .6rem; border-radius: 999px;
  margin-bottom: 1.1rem;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.kicker {
  display: inline-block; font-size: .74rem; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase;
  color: #0f5132; background: rgba(5, 150, 105, .1);
  border: 1px solid rgba(5, 150, 105, .26);
  padding: .3rem .62rem; border-radius: 999px;
  margin-bottom: .85rem;
}
.card-badge {
  position: absolute; top: .6rem; left: .6rem; z-index: 2;
  font-style: normal; font-size: .66rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase;
  color: #06301f; background: rgba(255,255,255,.92);
  padding: .24rem .5rem; border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

/* ---------- game cards ---------- */

.game-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 2rem 0 1rem;
}
.game-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
  color: inherit;
}
.game-card-art {
  height: 128px; display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.game-card-art::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.38) 0 2px, transparent 2px),
    radial-gradient(circle at 72% 66%, rgba(255,255,255,.28) 0 3px, transparent 3px);
  background-size: 58px 58px, 92px 92px;
  opacity: .7;
}
.art-truescale { background: linear-gradient(135deg, #1f6feb, #0b3d91); }
.art-humtune  { background: linear-gradient(135deg, #c026d3, #6d28d9); }
.art-obscuria { background: linear-gradient(135deg, #059669, #065f46); }
.game-card-art span {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.22));
}
.game-card-art svg { width: 54px; height: 54px; }
.game-card-body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.game-card-body h3 { margin: 0 0 .3rem; font-size: 1.14rem; }
.game-card-body p { margin: 0 0 .8rem; font-size: .93rem; color: var(--ink-2); }
.tagrow { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; }
.tag {
  font-size: .72rem; font-weight: 650; letter-spacing: .02em;
  color: var(--ink-2); background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: .16rem .48rem; border-radius: 999px;
}

/* ---------- sections ---------- */

.section { padding: 2.4rem 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem;
}
.section-head h2 { margin: 0; }
.section-head a { font-size: .9rem; font-weight: 600; white-space: nowrap; }

/* ---------- game shell ---------- */

.game-page { padding: 1.6rem 0 0; }
.game-page h1 { margin-bottom: .35rem; }
.game-sub { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.3rem; }

.play-shell {
  background: var(--dark);
  border-radius: 18px;
  padding: clamp(1rem, 3.4vw, 1.8rem);
  color: #f5f5f7;
  box-shadow: 0 24px 48px -28px rgba(20, 20, 26, .65);
  position: relative;
  overflow: hidden;
}
.play-shell::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 200px at 50% -10%, rgba(255,255,255,.07), transparent 70%);
  pointer-events: none;
}
.play-bar {
  display: flex; align-items: center; gap: .8rem;
  margin-bottom: 1.15rem; position: relative; z-index: 1;
  flex-wrap: wrap;
}
.play-bar .label {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: #9a9aa8; font-weight: 700;
}
.play-bar .spacer { flex: 1; }
.pill {
  font-size: .8rem; font-weight: 650;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  padding: .28rem .62rem; border-radius: 999px;
  color: #e8e8ee;
}
.pill.mono { font-variant-numeric: tabular-nums; }
button {
  font: inherit; cursor: pointer;
  border-radius: 10px; border: 0;
}
.btn {
  background: #fff; color: var(--dark);
  font-weight: 680; font-size: .94rem;
  padding: .6rem 1.1rem;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { background: #f0f0f4; }
.btn:active { transform: scale(.97); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-ghost {
  background: rgba(255,255,255,.08); color: #f0f0f4;
  border: 1px solid rgba(255,255,255,.16);
  font-weight: 600; font-size: .88rem; padding: .5rem .9rem;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-ghost:disabled { opacity: .38; cursor: not-allowed; }

/* ---------- shared game bits ---------- */

.q-prompt {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 680; letter-spacing: -.02em;
  text-align: center; margin: .3rem 0 1.1rem;
  color: #fff; position: relative; z-index: 1;
}
.q-hint {
  text-align: center; font-size: .87rem; color: #9a9aa8;
  margin: -.8rem 0 1.1rem; position: relative; z-index: 1;
}
.input-row {
  display: flex; gap: .55rem; max-width: 460px; margin: 0 auto 1rem;
  position: relative; z-index: 1;
}
.input-row input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; border-radius: 10px;
  padding: .62rem .85rem;
}
.input-row input::placeholder { color: #7b7b8a; }
.input-row input:focus {
  outline: none; border-color: var(--brand);
  background: rgba(255,255,255,.1);
}
.feedback {
  min-height: 3.1rem; text-align: center;
  font-size: .93rem; position: relative; z-index: 1;
}
.feedback .big { font-size: 1.3rem; font-weight: 750; display: block; }
.fb-ok { color: #5ee08c; }
.fb-warn { color: #f0c060; }
.fb-bad { color: #ff8578; }
.fb-mute { color: #9a9aa8; }

.answers-log {
  list-style: none; padding: 0; margin: 1rem auto 0;
  max-width: 460px; display: grid; gap: .4rem;
  position: relative; z-index: 1;
}
.answers-log li {
  display: flex; align-items: center; gap: .6rem;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px; padding: .42rem .7rem;
  font-size: .9rem; margin: 0;
  animation: rise .22s ease both;
}
.answers-log .word { font-weight: 650; }
.answers-log .score { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

.result-card {
  text-align: center; position: relative; z-index: 1;
  padding: 1rem 0 .4rem;
}
.result-card .score-big {
  font-size: clamp(2.6rem, 9vw, 3.8rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.result-card .score-unit { font-size: .9rem; color: #9a9aa8; letter-spacing: .1em; text-transform: uppercase; }
.result-card .verdict { font-size: 1.05rem; margin: .7rem 0 1.2rem; color: #e8e8ee; }
.result-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Truescale ---------- */

.ts-stage {
  height: clamp(260px, 42vh, 330px);
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(1.2rem, 6vw, 3.4rem);
  padding: 0 .4rem 1.1rem;
  position: relative; z-index: 1;
}
.ts-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; flex: 0 1 168px; max-width: 168px;
}
.ts-bar {
  width: 100%; border-radius: 8px 8px 3px 3px;
  transition: height .16s ease;
  box-shadow: inset 0 -22px 40px -20px rgba(0,0,0,.45);
}
.ts-item.ref .ts-bar {
  background: linear-gradient(180deg, #5b8def, #2456b8);
  height: 100%;
}
.ts-item.target .ts-bar {
  background: linear-gradient(180deg, #ff7a5c, #d93a1c);
}
.ts-name {
  margin-top: .55rem; font-size: .8rem; text-align: center;
  color: #d6d6e0; line-height: 1.3; min-height: 2.1em;
  font-weight: 600;
}
.ts-controls {
  display: flex; gap: .5rem; justify-content: center; align-items: center;
  flex-wrap: wrap; position: relative; z-index: 1;
}
.ts-controls button { min-width: 52px; }
.ts-slider { display: flex; align-items: center; gap: .5rem; width: 100%; max-width: 460px; margin: .9rem auto 0; position: relative; z-index: 1; }
.ts-slider input[type="range"] { flex: 1; accent-color: var(--brand); }
.ts-slider span { font-size: .8rem; color: #9a9aa8; font-variant-numeric: tabular-nums; }
.ts-verdict { text-align: center; margin: .9rem 0 0; font-size: .95rem; min-height: 1.5em; position: relative; z-index: 1; }

/* ---------- Humtune ---------- */

.ht-stage {
  text-align: center; padding: .4rem 0 .2rem;
  position: relative; z-index: 1;
}
.ht-disc {
  width: 108px; height: 108px; margin: 0 auto 1rem;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #2b2b36 0 2px, #1f1f28 2px 5px);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  transition: transform .3s;
}
.ht-disc.playing { animation: spin 2.6s linear infinite; }
.ht-disc span {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ht-opts {
  display: grid; gap: .55rem; max-width: 440px; margin: 1.1rem auto 0;
  position: relative; z-index: 1;
}
.ht-opt {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  color: #f0f0f4; text-align: left;
  padding: .68rem .9rem; border-radius: 10px;
  font-size: .95rem; font-weight: 550;
  transition: background .14s, border-color .14s, transform .1s;
}
.ht-opt:hover:not(:disabled) { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.3); }
.ht-opt:active:not(:disabled) { transform: scale(.99); }
.ht-opt.good { background: rgba(21,127,61,.35); border-color: #5ee08c; color: #dfffe9; }
.ht-opt.bad  { background: rgba(179,38,30,.3); border-color: #ff8578; color: #ffe3df; }
.ht-opt:disabled { cursor: default; }

/* ---------- content ---------- */

.prose { max-width: 70ch; }
.prose h2 { padding-top: .2rem; }
.prose h2 + p { color: var(--ink-2); }
.prose blockquote {
  margin: 1.4em 0; padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--brand);
  color: var(--ink-2); font-style: normal;
}
.prose table {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  margin: 1.2em 0 1.6em;
}
.prose th, .prose td {
  text-align: left; padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
}
.prose th { font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.prose tbody tr:hover { background: var(--bg-alt); }

.callout {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  margin: 1.6rem 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.cta-band {
  background: var(--ink); color: #fff;
  border-radius: 18px; padding: 1.9rem 1.6rem;
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  margin: 2.4rem 0;
}
.cta-band h2 { margin: 0 0 .3rem; color: #fff; font-size: 1.3rem; }
.cta-band p { margin: 0; color: #b9b9c4; font-size: .94rem; }
.cta-band .btn { margin-left: auto; }

.rules {
  counter-reset: r; list-style: none; padding: 0;
  display: grid; gap: .7rem; margin: 0 0 1.4rem;
}
.rules li {
  counter-increment: r; position: relative;
  padding-left: 2.5rem; margin: 0;
  font-size: .96rem; color: var(--ink-2);
}
.rules li::before {
  content: counter(r);
  position: absolute; left: 0; top: .05em;
  width: 1.65rem; height: 1.65rem; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 750; color: var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: .85rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 650; font-size: .98rem;
  list-style: none; display: flex; gap: .6rem; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; color: var(--brand); font-weight: 800;
  flex: none; width: 1rem;
}
.faq details[open] summary::before { content: "–"; }
.faq details p { margin: .6rem 0 0 1.6rem; color: var(--ink-2); font-size: .94rem; }

.link-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.link-card {
  display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
  padding: .9rem 1rem; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.link-card:hover { border-color: var(--line-2); transform: translateY(-2px); color: inherit; }
.link-card b { display: block; font-size: .96rem; margin-bottom: .15rem; }
.link-card span { font-size: .84rem; color: var(--ink-3); }

.breadcrumb {
  font-size: .82rem; color: var(--ink-3);
  padding: 1rem 0 0;
}
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb span { margin: 0 .4rem; opacity: .5; }

.meta-row {
  display: flex; align-items: center; gap: .8rem;
  font-size: .84rem; color: var(--ink-3);
  margin-bottom: 1.4rem; flex-wrap: wrap;
}
.meta-row .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  color: var(--ink-2);
}

.disclaimer {
  font-size: .8rem; color: var(--ink-3);
  border-top: 1px solid var(--line);
  margin-top: 2.2rem; padding-top: 1rem;
  line-height: 1.55;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem; padding: 2.2rem 0 2.6rem;
  font-size: .88rem; color: var(--ink-3);
}
.footer-top {
  display: flex; gap: 2rem; flex-wrap: wrap;
  justify-content: space-between; margin-bottom: 1.6rem;
}
.footer-cols { display: flex; gap: 2.4rem; flex-wrap: wrap; }
.footer-col h4 {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 .55rem;
}
.footer-col a { display: block; color: var(--ink-2); text-decoration: none; padding: .16rem 0; font-size: .89rem; }
.footer-col a:hover { color: var(--brand-dark); }
.footer-note { font-size: .8rem; color: var(--ink-3); line-height: 1.6; max-width: 60ch; }

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

/* ---------------- today / scoreboard ---------------- */

.today-grid {
  display: grid; gap: .9rem; align-items: stretch;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.8rem 0 1rem;
}
.today-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.15rem 1.15rem;
  text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.today-card:hover {
  border-color: var(--line-2); transform: translateY(-2px);
  color: inherit; box-shadow: var(--shadow);
}
.today-card::before {
  content: ""; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem;
  width: 3px; border-radius: 3px; background: var(--line-2);
  transition: background .15s;
}
.today-card.is-played::before { background: var(--ok); }
.today-name {
  font-size: .8rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem;
}
.today-score {
  font-size: 2.1rem; line-height: 1; font-weight: 800;
  letter-spacing: -.03em; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.today-card.is-played .today-score { color: var(--ink); }
.today-max { font-size: .82rem; color: var(--ink-3); margin-top: .2rem; }
.today-cta {
  margin-top: auto; padding-top: .9rem;
  font-size: .84rem; font-weight: 600; color: var(--brand-dark);
}
.today-empty {
  margin: .2rem 0 0; padding: .85rem 1rem;
  background: var(--bg-alt); border: 1px dashed var(--line-2);
  border-radius: 12px; font-size: .9rem; color: var(--ink-2);
}

.stat-row {
  display: grid; gap: .9rem; grid-template-columns: repeat(3, 1fr);
  margin: 1.4rem 0 .4rem;
}
.stat {
  background: var(--bg-alt); border-radius: 12px;
  padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem;
}
.stat strong {
  font-size: 1.5rem; line-height: 1.1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: .8rem; color: var(--ink-3); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.history-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
  min-width: 460px;
}
.history-table th, .history-table td {
  padding: .5rem .6rem; border-bottom: 1px solid var(--line);
  text-align: left; white-space: nowrap;
}
.history-table th {
  font-size: .74rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
  border-bottom-color: var(--line-2);
}
.history-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.history-table tbody tr:last-child td { border-bottom: 0; }
.history-table tr.is-today td { font-weight: 700; background: rgba(21, 127, 61, .06); }

@media (max-width: 760px) {
  .today-grid { grid-template-columns: 1fr; gap: .6rem; }
  .today-card { flex-direction: row; align-items: baseline; gap: .5rem; flex-wrap: wrap; padding: .9rem 1rem; }
  .today-name { width: 100%; margin-bottom: .1rem; }
  .today-score { font-size: 1.7rem; }
  .today-max { margin-top: 0; }
  .today-cta { margin-left: auto; padding-top: 0; }
  .stat-row { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .stat { padding: .7rem .75rem; }
  .stat strong { font-size: 1.25rem; }
  .stat span { font-size: .72rem; }
  .history-table { min-width: 0; font-size: .8rem; }
  .history-table th, .history-table td { padding: .45rem .3rem; }
  .history-table th { font-size: .62rem; letter-spacing: .04em; }
}

/* ---------------- cloud stats ---------------- */

.cloud-row {
  display: grid; gap: .9rem; grid-template-columns: repeat(3, 1fr);
  margin: .2rem 0 .2rem;
}
.cloud-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem 1rem;
  display: flex; flex-direction: column; gap: .1rem;
}
.cloud-name {
  font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.cloud-item strong {
  font-size: 1.5rem; line-height: 1.15; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.cloud-sub { font-size: .78rem; color: var(--ok); font-weight: 600; min-height: 1rem; }
.cloud-note {
  font-size: .84rem; color: var(--ink-3); margin: .6rem 0 0;
}
.global-stat {
  font-size: .84rem; margin: .5rem 0 0;
  color: var(--ok); font-weight: 600;
}

@media (max-width: 760px) {
  .cloud-row { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .cloud-item { padding: .65rem .7rem; }
  .cloud-item strong { font-size: 1.2rem; }
  .cloud-name { font-size: .64rem; }
  .cloud-sub { font-size: .68rem; }
}

.head-note {
  font-size: .82rem; color: var(--ink-3); font-weight: 500;
}

/* ---------------- mobile header: two rows ---------------- */
/* The wordmark grew with the brand rename; one row no longer fits 390px. */
@media (max-width: 760px) {
  .site-header .wrap {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: .12rem;
    padding: .5rem 0 .3rem;
  }
  .logo { font-size: 1rem; gap: .45rem; }
  .logo-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 12.5px; }
  .nav {
    margin-left: 0;
    gap: .1rem;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: .8rem; padding: .3rem .48rem; white-space: nowrap; }
  .nav a[href="/guides"] { display: inline-block; }
  .nav a.cta { display: none; }
}
