/* your local host — "Calm reader": soft off-white and slate, one muted blue accent,
   a humanist sans throughout, compact rows so a skim fits on one screen.
   Spacing runs on a 4px scale; type on a small, steady ratio. */

:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --sunken: #f0f1ee;
  --ink: #1c2530;
  --ink-2: #3a4553;
  --muted: #5d6877;
  --faint: #8c95a2;
  --rule: #e4e6e8;
  --rule-strong: #1c2530;
  --accent: #3b6ea5;
  --accent-ink: #2d5a8c;
  --accent-soft: #e9f0f8;
  --accent-line: rgba(59, 110, 165, 0.45);
  --fits: #276b44;
  --fits-bg: #e5f2ea;
  --slow: #8a5d0c;
  --slow-bg: #f9eed6;
  --no: #636c78;
  --no-bg: #eef0f2;
  --gpu: #4a5a96;
  --tip-bg: #1c2530;
  --tip-ink: #f7f7f4;
  --shadow: 0 1px 2px rgba(20, 30, 45, 0.04), 0 4px 16px -4px rgba(20, 30, 45, 0.08);
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121519;
    --surface: #191d22;
    --sunken: #161a1e;
    --ink: #e6e9ed;
    --ink-2: #c4cbd4;
    --muted: #9aa4b1;
    --faint: #6c7684;
    --rule: #272c33;
    --rule-strong: #e6e9ed;
    --accent: #8fb3de;
    --accent-ink: #a9c5e8;
    --accent-soft: #1d2835;
    --accent-line: rgba(143, 179, 222, 0.45);
    --fits: #8fd4a9;
    --fits-bg: #16291e;
    --slow: #e6c27e;
    --slow-bg: #2e250f;
    --no: #9aa4b1;
    --no-bg: #22272d;
    --gpu: #aab7ec;
    --tip-bg: #e6e9ed;
    --tip-ink: #121519;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--ink); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }

.eyebrow {
  margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}

/* ---------- Masthead ---------- */

.masthead { background: var(--bg); }
.masthead-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
  padding-top: 22px; padding-bottom: 16px;
}
.title { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo { width: 34px; height: 34px; flex: none; color: var(--accent); }
.title-text { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; }
.tagline { font-size: 14px; color: var(--muted); margin-top: 3px; letter-spacing: 0.005em; }

.updated { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
#today { font-weight: 600; color: var(--ink-2); }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fits);
  box-shadow: 0 0 0 3px var(--fits-bg);
}
.refresh {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 99px; padding: 4px 12px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.refresh:hover { border-color: var(--accent); color: var(--accent-ink); }

.link-btn {
  background: none; border: 0; padding: 0 0 0 6px; color: var(--accent-ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
}
.link-btn:hover { text-decoration-color: currentColor; }

/* ---------- Section nav ---------- */

.sections {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 0 24px; flex-wrap: wrap; }
.nav-links { display: flex; gap: 26px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.sections a {
  flex: none; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted);
  padding: 13px 0 11px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.sections a:hover { color: var(--ink); }
.sections a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav-tools { display: flex; gap: 8px; align-items: center; padding: 7px 0; }

#search, #usecase {
  min-width: 0; height: 34px; font: inherit; font-size: 15px; color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--rule); border-radius: 99px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
#search {
  width: 210px; padding: 0 14px 0 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238c95a2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px 50%;
}
#search::placeholder { color: var(--faint); }
#usecase {
  appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 240px; padding: 0 34px 0 14px; font-weight: 600; color: var(--ink-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238c95a2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
#usecase:hover, #search:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }
#usecase:not(:has(option[value=""]:checked)) { border-color: var(--accent); background-color: var(--accent-soft); color: var(--accent-ink); }
#search:focus, #usecase:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#search[hidden], #usecase[hidden] { display: none; }

/* ---------- Your PC bar ---------- */

.hwbar { font-size: 14px; background: var(--sunken); border-bottom: 1px solid var(--rule); }
.hw-inner { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.hw-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-ink);
}
.hw-label::before {
  content: ""; width: 14px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px;
  box-shadow: inset 4px 0 0 -2px currentColor;
}
.hw-desc { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hw-note, .hw-hint { color: var(--muted); font-weight: 400; }
.hw-hint { margin-left: auto; }
.hwbar .link-btn { padding: 0; }
.hw-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.hw-toggle input { accent-color: var(--accent); margin: 0; }
.hw-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; padding-bottom: 14px; }
.hw-form[hidden] { display: none; }
.hw-form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; }
.hw-form input {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
  border-radius: 8px; padding: 6px 10px; width: 190px; max-width: 100%;
}
.hw-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hw-form input[type="number"] { width: 96px; }
.hw-actions { display: flex; gap: 12px; align-items: center; }
.btn {
  display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px; padding: 7px 16px; border-radius: 99px;
}
.btn:hover { background: var(--accent-ink); }

/* ---------- Page ---------- */

main { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }
.loading, .empty { color: var(--muted); font-size: 15px; }
.empty { padding: 12px 0; }

.filter-note {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0 0 20px; padding: 9px 14px;
  font-size: 15px; color: var(--muted); background: var(--accent-soft); border-radius: 10px;
}
.filter-note strong { color: var(--ink); }

/* ---------- For your PC panel ---------- */

.foryou {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px 18px; margin-bottom: 44px;
}
.panel-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 4px;
}
.panel-head h2 { font-size: 26px; margin: 0; }
.panel-note { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.col { min-width: 0; display: flex; flex-direction: column; }
.col-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  margin: 0; padding: 0 0 8px; border-bottom: 2px solid var(--rule-strong);
}
.count {
  font-size: 11px; letter-spacing: 0; color: var(--muted); background: var(--sunken);
  border-radius: 99px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.more {
  display: inline-flex; align-self: flex-start; margin-top: 12px; font-size: 14px; font-weight: 600;
  color: var(--accent-ink); text-decoration: none;
}
.more::after { content: "→"; margin-left: 5px; transition: transform 0.15s var(--ease); }
.more:hover::after { transform: translateX(3px); }

/* ---------- Latest news ---------- */

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap;
  border-top: 2px solid var(--rule-strong); padding-top: 12px; margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 24px; }
.section-note { font-size: 14px; color: var(--muted); }
.section-chips { margin: 0 0 0 auto; align-self: center; }
.section-chips .chip { font-size: 13px; padding: 3px 11px; }
.archive { margin-top: 40px; }
.news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }

/* ---------- Rows: the one building block for every item ---------- */

.row { padding: 13px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.row h3 {
  font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em;
  margin: 0 0 4px; overflow-wrap: anywhere; text-wrap: pretty;
}
.row h3 a { text-decoration: none; transition: color 0.12s var(--ease); }
.row h3 a:hover { color: var(--accent-ink); }
.row .org { color: var(--faint); font-weight: 400; }
.row.compact { padding: 11px 0; }
.row.compact:last-of-type { border-bottom: 0; }
.row.compact h3 { font-size: 16px; }

.row.lead { padding: 0 0 22px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.row.lead .row-body::before {
  content: "Top story"; display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}
.row.lead h3 { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -0.022em; margin-bottom: 10px; max-width: 30ch; text-wrap: balance; }
.row.lead .summary { -webkit-line-clamp: 3; font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 68ch; margin-bottom: 10px; }

.summary {
  margin: 0 0 6px; color: var(--muted); font-size: 15px; line-height: 1.5; text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.meta { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta a { color: var(--muted); text-decoration-color: var(--rule); text-underline-offset: 3px; }
.meta a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.dot { margin: 0 7px; color: var(--faint); }
.src { font-weight: 600; color: var(--ink-2); }
.src-icon { width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-right: 5px; flex: none; }
.chip .src-icon { margin-right: 6px; }
.size {
  font-weight: 700; color: var(--ink); background: var(--sunken); border-radius: 5px; padding: 0 5px;
}

/* ---------- Thumbnails: the source's image over a tinted tile that shows when there is none ---------- */

.row.has-thumb { display: grid; grid-template-columns: minmax(0, 1fr) 112px; grid-template-areas: "body thumb"; gap: 0 18px; align-items: start; }
.row-body { grid-area: body; min-width: 0; }
.thumb {
  grid-area: thumb; position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 3 / 2; border-radius: 9px; margin-top: 3px;
  background: linear-gradient(135deg, hsl(var(--h) 34% 94%), hsl(calc(var(--h) + 24) 30% 89%));
  color: hsl(var(--h) 26% 52%);
  box-shadow: inset 0 0 0 1px rgba(20, 30, 45, 0.06);
}
.thumb svg { width: 30%; height: auto; opacity: 0.75; }
.thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: var(--sunken); transition: transform 0.4s var(--ease);
}
.row:hover .thumb img { transform: scale(1.03); }
.thumb-logo img { inset: 22% auto auto 50%; width: auto; height: 56%; aspect-ratio: 1; translate: -50% 0; border-radius: 8px; object-fit: cover; }
.thumb-logo:has(img) svg { opacity: 0; }
.row.lead .thumb-logo img { height: 44%; inset-block-start: 28%; }
@media (prefers-color-scheme: dark) {
  .thumb {
    background: linear-gradient(135deg, hsl(var(--h) 22% 19%), hsl(calc(var(--h) + 24) 20% 15%));
    color: hsl(var(--h) 30% 62%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
}

.row.lead.has-thumb { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 0 36px; align-items: center; }
.row.lead .thumb { aspect-ratio: 16 / 10; border-radius: var(--radius); margin: 0; }
.row.lead .thumb svg { width: 18%; }

/* ---------- Badges: a coloured dot plus a plain label, readable at a glance ---------- */

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; line-height: 1; padding: 5px 10px 5px 8px; border-radius: 99px;
  text-decoration: none; border: 1px solid transparent;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.term { text-decoration: none; cursor: help; }
.badge-fits { background: var(--fits-bg); color: var(--fits); }
.badge-slow { background: var(--slow-bg); color: var(--slow); }
.badge-no { background: var(--no-bg); color: var(--no); }
.badge-no::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
/* Information about your GPU: outlined, so it never reads as the download button. */
.badge-gpu { background: transparent; color: var(--gpu); border-color: color-mix(in srgb, var(--gpu) 35%, transparent); }
.badge-gpu::before { border-radius: 2px; width: 8px; height: 8px; background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
/* The one action: solid. */
.badge-dl {
  background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-line);
  padding-left: 10px; text-decoration: none; transition: background 0.15s var(--ease);
}
.badge-dl::before { content: "↓"; width: auto; height: auto; background: none; font-weight: 700; }
.badge-dl:hover { background: var(--accent-soft); }

/* ---------- Section pages ---------- */

.view-head { margin-bottom: 8px; padding-bottom: 4px; }
.view-head h2 { font-size: 34px; letter-spacing: -0.025em; margin-bottom: 6px; }
.view-head p { color: var(--muted); margin: 0 0 18px; max-width: 62ch; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chips-gap { width: 1px; align-self: stretch; margin: 4px 6px; background: var(--rule); }
.view-head .chips-note { font-size: 13.5px; color: var(--faint); margin: 0 0 8px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--muted);
  padding: 5px 14px; border-radius: 99px; transition: all 0.15s var(--ease);
}
.chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.list { max-width: 760px; border-top: 2px solid var(--rule-strong); }
.grid-list {
  max-width: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 40px;
}

/* ---------- Start here ---------- */

.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0 48px; }
.guide {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px;
}
.guide h3 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 8px; }
.guide p, .guide li { font-size: 16px; color: var(--ink-2); }
.guide code { font-size: 14px; background: var(--sunken); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
/* ---------- Learn ---------- */
.view-head .learn-first { font-size: 15px; color: var(--ink-2); background: var(--accent-soft); border-radius: 10px; padding: 9px 14px; display: inline-block; margin: 0 0 8px; }
.view-head a, .learn-guide a { color: var(--accent-ink); }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 16px 0 48px; }
.learn-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--rule); color: inherit; text-decoration: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.learn-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.learn-card h3 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.learn-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; flex: 1; }
.learn-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.learn-go { font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.learn-go::after { content: " →"; }
.back { display: inline-block; margin: 8px 0 4px; font-size: 14px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.learn-guide { max-width: 720px; margin-bottom: 48px; }
.learn-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.learn-tools, .learn-tip { font-size: 16px; color: var(--ink-2); }
.learn-tip { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; }
.learn-guide h3 { font-size: 18px; margin: 22px 0 8px; }
.learn-steps { padding-left: 22px; margin: 0 0 16px; }
.learn-steps li { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin-bottom: 8px; padding-left: 4px; }
.learn-guide code { font-size: 14px; background: var(--sunken); padding: 1px 6px; border-radius: 5px; }

.glossary h2 { border-top: 2px solid var(--rule-strong); padding-top: 12px; }
.glossary dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 40px; margin: 0; }
.glossary dl div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 2px 0 0; color: var(--muted); font-size: 16px; }

/* ---------- Jargon tooltips ---------- */

.term {
  text-decoration: underline dotted; text-decoration-color: var(--accent-line); text-decoration-thickness: 1.5px;
  text-underline-offset: 4px; cursor: help; position: relative; outline: none;
}
.term:hover, .term:focus { text-decoration-color: var(--accent); }
.term:hover::after, .term:focus::after {
  content: attr(data-def);
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 10;
  width: max-content; max-width: min(300px, 80vw);
  background: var(--tip-bg); color: var(--tip-ink);
  font: 400 14px/1.5 var(--sans); letter-spacing: 0; text-transform: none;
  padding: 10px 12px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  white-space: normal; pointer-events: none;
  animation: tip-in 0.14s var(--ease);
}
@keyframes tip-in { from { opacity: 0; transform: translateY(-3px); } }
.term.tip-left:hover::after, .term.tip-left:focus::after { left: auto; right: 0; }
.term-sample { text-decoration: underline dotted var(--accent); text-underline-offset: 4px; }

/* ---------- Footer ---------- */

.footer {
  border-top: 2px solid var(--rule-strong); padding-top: 18px; padding-bottom: 40px;
  color: var(--muted); font-size: 14px; display: grid; grid-template-columns: 200px 1fr; gap: 8px 32px;
}
.footer p { margin: 0; max-width: 72ch; }
.footer-mark { font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-size: 16px; }

/* ---------- Ask: a quiet side panel, a sheet on phones ---------- */

.ask-toggle { color: var(--accent-ink); border-color: var(--accent-line); }
.ask-toggle[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ask {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  display: flex; flex-direction: column; background: var(--surface);
  border-left: 1px solid var(--rule); box-shadow: -12px 0 40px -16px rgba(20, 30, 45, 0.25);
}
.ask[hidden] { display: none; }
@media (min-width: 1100px) { body.ask-open { padding-right: 420px; } }
.ask-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--rule); }
.ask-head h2 { font-size: 18px; margin: 0; letter-spacing: -0.01em; }
.ask-by { margin: 2px 0 0; font-size: 13px; color: var(--faint); }
.ask-pc { margin: 0; padding: 8px 20px; font-size: 13px; color: var(--muted); background: var(--sunken); border-bottom: 1px solid var(--rule); }
.ask-pc::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fits); margin-right: 8px; vertical-align: 1px; }
.ask-close { font: inherit; font-size: 24px; line-height: 1; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0 4px; }
.ask-close:hover { color: var(--ink); }
.ask-log { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.ask-empty p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.ask-example {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 14.5px; color: var(--ink-2); cursor: pointer;
  background: var(--sunken); border: 1px solid transparent; border-radius: 10px; padding: 9px 12px; margin-bottom: 8px;
}
.ask-example:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.msg { font-size: 15px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.msg-user { align-self: flex-end; max-width: 85%; background: var(--accent-soft); color: var(--ink); padding: 8px 13px; border-radius: 14px 14px 4px 14px; }
.msg-assistant > :first-child { margin-top: 0; }
.msg-assistant > :last-child { margin-bottom: 0; }
.msg p, .msg ul, .msg ol { margin: 0 0 9px; }
.msg ul, .msg ol { padding-left: 20px; }
.msg li { margin-bottom: 3px; }
.msg h4 { font-size: 15px; margin: 12px 0 4px; }
.msg code { font-size: 13.5px; background: var(--sunken); border-radius: 4px; padding: 1px 4px; }
.msg pre { background: var(--sunken); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 0 0 9px; }
.msg pre code { background: none; padding: 0; }
.msg a { color: var(--accent-ink); }
.msg-table { overflow-x: auto; margin: 0 0 9px; }
.msg table { border-collapse: collapse; font-size: 13.5px; }
.msg td { padding: 4px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.msg tr:first-child td { font-weight: 600; color: var(--ink-2); }
/* Models page chart */
.chart-controls { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 12px; font-size: 14px; color: var(--muted); }
.chart-controls label { display: inline-flex; align-items: center; gap: 8px; }
.axis-select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 4px 8px; }
.chart-panel { max-width: 820px; }
.view-head ~ .chart-swap, .chart-swap { margin: -4px 0 12px; font-size: 13.5px; color: var(--muted); }
.chart-panel .mchart { background: var(--surface); padding: 16px 18px 14px; }

/* Model charts */
.mchart { margin: 12px 0 4px; padding: 12px 12px 10px; background: var(--bg); border: 1px solid var(--rule); border-radius: 12px; }
.mc-title { font-weight: 700; font-size: 14.5px; color: var(--ink); margin-bottom: 4px; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.mc-key { display: inline-flex; align-items: center; gap: 6px; }
.mc-key i { width: 9px; height: 9px; border-radius: 50%; }
.mc-plot { position: relative; }
.mc-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.mc-grid { stroke: var(--rule); stroke-width: 1; }
.mc-axis { stroke: var(--faint); stroke-width: 1; }
.mc-tick { font-size: 10px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.mc-axis-name { font-size: 10.5px; fill: var(--muted); }
.mc-label { font-size: 10.5px; fill: var(--ink-2); pointer-events: none; }
.mc-hit { fill: transparent; cursor: default; }
.mc-dot { stroke: var(--bg); stroke-width: 2; transition: r 0.12s var(--ease); }
.mc-pt:hover .mc-dot, .mc-pt:focus .mc-dot { r: 7; }
.mc-pt:focus { outline: none; }
.mc-tip {
  position: absolute; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 1px;
  max-width: 220px; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.35;
  background: var(--tip-bg); color: var(--tip-ink); box-shadow: var(--shadow);
}
.mc-tip strong { font-weight: 600; overflow-wrap: anywhere; }
.mc-note { margin: 6px 0 0 !important; font-size: 12.5px; color: var(--faint); }
.mc-table { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.mc-table summary { cursor: pointer; }
.mc-table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.mc-table th, .mc-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--rule); }
.mc-table th { font-weight: 600; color: var(--ink-2); }
.msg-note { color: var(--muted); background: var(--sunken); padding: 8px 12px; border-radius: 10px; font-size: 14.5px; }
.msg-error { color: var(--slow); background: var(--slow-bg); padding: 8px 12px; border-radius: 10px; }
.ask-typing { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ask-dots { display: inline-flex; gap: 4px; }
.ask-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: ask-dot 1.2s infinite ease-in-out; }
.ask-typing i:nth-child(2) { animation-delay: 0.15s; }
.ask-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ask-dot { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.ask-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--rule); }
.ask-form textarea {
  flex: 1; resize: none; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--rule); border-radius: 12px; padding: 9px 12px; max-height: 160px; outline: none;
}
.ask-form textarea:focus { border-color: var(--accent); }
.ask-send {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg); display: grid; place-items: center;
}
.ask-send svg { width: 18px; height: 18px; }
.ask-send:hover { background: var(--accent-ink); color: #fff; }
.ask-form.busy .ask-send { opacity: 0.4; pointer-events: none; }
@media (max-width: 600px) {
  .ask { top: auto; height: 85vh; width: 100vw; border-left: 0; border-top: 1px solid var(--rule); border-radius: 16px 16px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Speed tables ---------- */

.speed { margin-top: 10px; min-width: 0; }
.speed-line { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.speed-note { margin: 4px 0 0; color: var(--faint); font-size: 12px; }
/* Wide tables scroll inside the card on phones; the page itself never scrolls sideways. */
.speed-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 8px; }
.speed-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.speed-table th, .speed-table td { padding: 5px 10px; text-align: left; border-bottom: 1px solid var(--rule); }
.speed-table th { background: var(--sunken); color: var(--muted); font-weight: 600; font-size: 12px; }
.speed-table tr:last-child td { border-bottom: 0; }
.speed-table .num { text-align: right; }
.speed-table tr.mine td { color: var(--ink); font-weight: 600; }
.speed-table td { color: var(--ink-2); }
.speed-phase, .speed-est { color: var(--muted); font-weight: 400; }
.speed-est { cursor: help; text-decoration: underline dotted; text-underline-offset: 2px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .cols { grid-template-columns: 1fr; gap: 22px; }
  .news-list { grid-template-columns: 1fr; }
  .row.compact:last-of-type { border-bottom: 1px solid var(--rule); }
  .hw-hint { margin-left: 0; }
}
@media (max-width: 760px) {
  .nav-inner { flex-direction: column; align-items: stretch; }
  .nav-tools { padding-top: 0; padding-bottom: 10px; }
  #usecase { flex: 0 1 auto; }
  #search { flex: 1 1 auto; width: auto; }
}
@media (max-width: 600px) {
  .masthead-row { padding-top: 16px; padding-bottom: 12px; }
  .wordmark { font-size: 22px; }
  .logo { width: 30px; height: 30px; }
  .tagline { font-size: 13px; }
  .updated { width: 100%; gap: 10px; }
  #today { white-space: nowrap; }
  .status { flex: 1; min-width: 0; }
  .nav-links { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .hw-hint { display: none; }
  .foryou { padding: 16px 16px 12px; border-radius: 12px; }
  .panel-head h2 { font-size: 22px; }
  /* Keep the news within a short scroll on phones: two items per column, "See all" for the rest. */
  .col .row.compact:nth-of-type(n + 3) { display: none; }
  .nav-links { gap: 20px; }
  .nav-tools { flex-wrap: wrap; }
  #usecase { flex: 1 1 100%; max-width: none; }
  .row.lead h3 { font-size: 25px; }
  .row.lead.has-thumb { grid-template-columns: 1fr; grid-template-areas: "thumb" "body"; gap: 14px 0; }
  .row.has-thumb { grid-template-columns: minmax(0, 1fr) 84px; gap: 0 14px; }
  .row.lead .summary { font-size: 16px; }
  .view-head h2 { font-size: 28px; }
  .footer { grid-template-columns: 1fr; }
}

/* Account: sign-in button and its panel in the masthead */
.account { position: relative; display: inline-flex; }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; }
.acct-btn img { width: 20px; height: 20px; border-radius: 50%; margin-left: -6px; }
.acct-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(320px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); text-align: left;
}
.acct-pop[hidden] { display: none; }
.acct-lead { margin: 0; color: var(--ink); }
.acct-hint, .acct-note { margin: 0; color: var(--muted); font-size: 13px; }
.acct-note { color: var(--accent-ink); }
.acct-provider { display: block; text-align: center; text-decoration: none; }
.acct-machines { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.acct-machines legend { font-weight: 600; color: var(--muted); font-size: 13px; margin-bottom: 4px; padding: 0; }
.acct-machine { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.acct-machine > span { flex: 1; min-width: 0; }
.acct-sub { display: block; color: var(--muted); font-size: 12px; }
.acct-save { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.acct-save label { flex: 1; display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.acct-save input { font: inherit; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 0; }
.acct-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 10px; }
.acct-danger { color: var(--no); }
@media (max-width: 640px) { .acct-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }
