/* Gloya — design system + components
   Editorial serif display + grotesk body, warm off-white, refined accent. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-display: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --bg: oklch(0.985 0.004 95);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.965 0.004 95);
  --surface-3: oklch(0.945 0.005 95);
  --ink: oklch(0.21 0.008 75);
  --ink-2: oklch(0.40 0.008 75);
  --muted: oklch(0.56 0.006 80);
  --faint: oklch(0.70 0.005 85);
  --border: oklch(0.915 0.004 90);
  --border-2: oklch(0.88 0.005 90);
  --dark: oklch(0.22 0.01 75);

  --tone-hi: oklch(0.60 0.13 150);
  --tone-mid: oklch(0.72 0.13 75);
  --tone-lo: oklch(0.62 0.02 80);

  /* accent (overridden by [data-accent]) */
  --accent: oklch(0.87 0.17 128);
  --accent-ink: oklch(0.28 0.07 135);
  --accent-ink-strong: oklch(0.53 0.14 134);
  --accent-soft: oklch(0.95 0.06 128);

  --r: 18px;
  --pad: 20px;
  --gap: 16px;
}

[data-accent="lime"]   { --accent: oklch(0.87 0.17 128); --accent-ink: oklch(0.28 0.07 135); --accent-ink-strong: oklch(0.53 0.14 134); --accent-soft: oklch(0.95 0.06 128); }
[data-accent="indigo"] { --accent: oklch(0.55 0.18 268); --accent-ink: #fff;                 --accent-ink-strong: oklch(0.54 0.17 268); --accent-soft: oklch(0.95 0.035 268); }
[data-accent="teal"]   { --accent: oklch(0.82 0.12 185); --accent-ink: oklch(0.27 0.05 195); --accent-ink-strong: oklch(0.55 0.10 195); --accent-soft: oklch(0.95 0.045 185); }
[data-accent="grape"]  { --accent: oklch(0.60 0.20 312); --accent-ink: #fff;                 --accent-ink-strong: oklch(0.56 0.19 312); --accent-soft: oklch(0.95 0.04 312); }
[data-accent="amber"]  { --accent: oklch(0.83 0.15 72);  --accent-ink: oklch(0.30 0.06 65);  --accent-ink-strong: oklch(0.58 0.13 65);  --accent-soft: oklch(0.95 0.06 72); }

[data-theme="dark"] {
  --bg: oklch(0.17 0.006 75);
  --surface: oklch(0.215 0.007 75);
  --surface-2: oklch(0.25 0.007 75);
  --surface-3: oklch(0.29 0.008 75);
  --ink: oklch(0.96 0.004 95);
  --ink-2: oklch(0.80 0.006 90);
  --muted: oklch(0.64 0.006 90);
  --faint: oklch(0.50 0.006 85);
  --border: oklch(0.31 0.008 75);
  --border-2: oklch(0.37 0.008 75);
  --dark: oklch(0.13 0.006 75);
}

[data-density="compact"] { --pad: 15px; --gap: 11px; }
[data-density="comfy"]   { --pad: 24px; --gap: 20px; }

[data-font="modern"] { --font-display: 'Hanken Grotesk', system-ui, sans-serif; }

/* ── Reset / app shell ──────────────────────────────────── */
* { box-sizing: border-box; }
.g-app {
  height: 100%; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow: hidden; position: relative;
  container-type: inline-size; container-name: app;
}
.g-app :where(button) { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.g-app :where(input) { font-family: inherit; }
.g-main { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; -webkit-overflow-scrolling: touch; }
.g-main::-webkit-scrollbar, .g-prod-scroll::-webkit-scrollbar, .g-asst-scroll::-webkit-scrollbar, .g-hscroll::-webkit-scrollbar, .g-chiprow::-webkit-scrollbar, .g-cats::-webkit-scrollbar { display: none; }
.g-device-scale ::-webkit-scrollbar { display: none; width: 0; height: 0; }
.g-main, .g-prod-scroll, .g-asst-scroll, .g-hscroll, .g-chiprow, .g-cats, .g-prompt-row, .g-sortpills { scrollbar-width: none; }
.g-screen { padding-bottom: 28px; }
.g-pad { padding: 0 var(--pad); }
.g-foot-note { color: var(--faint); font-size: 12px; text-align: center; padding: 26px var(--pad) 8px; line-height: 1.5; }

/* ── Header ─────────────────────────────────────────────── */
.g-head { padding: 56px var(--pad) 10px; }
.g-head.is-sticky { position: sticky; top: 0; z-index: 6; background: color-mix(in oklch, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
.g-head.is-large { padding-bottom: 12px; }
.g-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.g-head-sub { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink-strong); font-weight: 600; margin-bottom: 3px; }
.g-head-title { font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
.g-head-pill { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.03); }

/* ── Logo ───────────────────────────────────────────────── */
.g-logo { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.g-logo-dot { width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Ask bar ────────────────────────────────────────────── */
.g-ask { width: 100%; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 4px 18px -12px rgba(0,0,0,0.25); margin-top: 4px; transition: transform .12s, box-shadow .2s; }
.g-ask:active { transform: scale(0.99); }
.g-ask.is-big { padding: 16px 18px; }
.g-ask-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.g-ask-text { color: var(--muted); font-size: 15px; text-align: left; }
.g-prompt-row { display: flex; gap: 8px; overflow-x: auto; margin: 12px -2px 4px; padding: 2px; scrollbar-width: none; }
.g-prompt { white-space: nowrap; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); padding: 8px 13px; border-radius: 999px; flex-shrink: 0; }
.g-prompt:active { background: var(--surface-3); }

/* ── Category rail ──────────────────────────────────────── */
.g-cats { display: flex; gap: 14px; overflow-x: auto; padding: 18px var(--pad) 6px; scrollbar-width: none; }
.g-cat { display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; }
.g-cat-tile { width: 62px; height: 62px; border-radius: 18px; background: var(--ph-tint); display: flex; align-items: center; justify-content: center; border: 1px solid color-mix(in oklch, var(--ph-tint) 80%, black 6%); }
.g-cat-glyph { font-family: var(--font-display); font-size: 26px; font-weight: 500; color: oklch(0.32 0.04 250); }
.g-cat-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }

/* ── Section title ──────────────────────────────────────── */
.g-sect { display: flex; align-items: baseline; justify-content: space-between; padding-top: 26px; padding-bottom: 13px; }
.g-sect-title { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; margin: 0; }
.g-sect-title.is-accent::after { content: ''; display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--accent); margin-top: 7px; }
.g-sect-action { display: flex; align-items: center; gap: 3px; font-size: 13.5px; color: var(--accent-ink-strong); font-weight: 600; }

/* ── Placeholder tile ───────────────────────────────────── */
.g-ph { position: relative; width: 100%; background: var(--ph-tint, var(--surface-2)); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.g-ph-hatch { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0.035) 0 1px, transparent 1px 11px); }
.g-ph-label { position: relative; font-family: var(--font-mono); letter-spacing: 0.16em; color: oklch(0.42 0.03 250 / 0.62); font-weight: 500; }

/* ── Gloya score ────────────────────────────────────────── */
.g-score { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 5px 9px; }
.g-score-num { font-family: var(--font-mono); font-weight: 600; color: var(--ink); line-height: 1; }
.g-score-cap { font-size: 8.5px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.g-score.tone-hi  { border-color: color-mix(in oklch, var(--tone-hi) 40%, var(--border)); }
.g-score.tone-hi  .g-score-num { color: var(--tone-hi); }
.g-score-xs { padding: 3px 7px; border-radius: 8px; }
.g-score-xs .g-score-num { font-size: 13px; }
.g-score-sm .g-score-num { font-size: 14px; }
.g-score-md .g-score-num { font-size: 19px; }
.g-score-lg { padding: 8px 13px; border-radius: 14px; }
.g-score-lg .g-score-num { font-size: 27px; }
.g-score-lg .g-score-cap { font-size: 9.5px; }

/* ── Stars / price ──────────────────────────────────────── */
.g-stars { display: inline-flex; align-items: center; gap: 4px; }
.g-stars-ic { color: var(--tone-mid); display: inline-flex; }
.g-stars-val { font-weight: 600; font-size: 13px; color: var(--ink); }
.g-stars-rev { font-size: 12px; color: var(--muted); }
.g-price { display: flex; align-items: baseline; gap: 7px; }
.g-price-now { font-family: var(--font-mono); font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.g-price-old { font-size: 12px; color: var(--faint); text-decoration: line-through; }
.g-price-sm .g-price-now { font-size: 15px; }
.g-price-md .g-price-now { font-size: 19px; }
.g-price-lg .g-price-now { font-size: 26px; }

/* ── Chips / buttons ────────────────────────────────────── */
.g-chip { white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); padding: 8px 15px; border-radius: 999px; flex-shrink: 0; transition: all .15s; }
.g-chip.is-active { background: var(--dark); color: var(--bg); border-color: var(--dark); }
[data-theme="dark"] .g-chip.is-active { background: var(--ink); color: var(--bg); }

.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-radius: 13px; transition: transform .12s, filter .15s; white-space: nowrap; }
.g-btn:active { transform: scale(0.98); }
.g-btn-ic { display: inline-flex; }
.g-btn-primary { background: var(--accent); color: var(--accent-ink); }
.g-btn-primary:active { filter: brightness(0.96); }
.g-btn-dark { background: var(--dark); color: var(--bg); }
[data-theme="dark"] .g-btn-dark { background: var(--ink); color: var(--bg); }
.g-btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); }
.g-btn-sm { padding: 9px 15px; font-size: 13.5px; }
.g-btn-md { padding: 12px 18px; font-size: 15px; }
.g-btn-lg { padding: 15px 22px; font-size: 16px; border-radius: 15px; }
.g-btn-full { width: 100%; }

/* ── Save button ────────────────────────────────────────── */
.g-save { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); flex-shrink: 0; transition: all .15s; }
.g-save.is-on { color: var(--accent-ink-strong); background: var(--accent-soft); border-color: transparent; }
.g-save.is-float { position: absolute; top: 10px; right: 10px; background: color-mix(in oklch, var(--surface) 80%, transparent); backdrop-filter: blur(6px); }

/* ── Product card ───────────────────────────────────────── */
.g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.g-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: transform .14s, box-shadow .2s; cursor: pointer; display: flex; flex-direction: column; }
.g-card:active { transform: scale(0.985); }
.g-card-media { position: relative; padding: 10px; }
.g-card-media .g-ph { border-radius: calc(var(--r) - 8px); }
.g-disc { position: absolute; top: 16px; left: 16px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 7px; }
.g-card-body { padding: 4px 13px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.g-card-brand { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.g-card-name { font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-card-meta { margin-top: 1px; }
.g-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }

/* ── Product row ────────────────────────────────────────── */
.g-row { display: flex; align-items: center; gap: 13px; padding: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; cursor: pointer; transition: transform .12s; }
.g-row:active { transform: scale(0.99); }
.g-row-media { width: 72px; height: 72px; flex-shrink: 0; }
.g-row-media .g-ph { height: 100%; }
.g-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.g-row-name { font-size: 14.5px; font-weight: 500; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-row-foot { display: flex; align-items: center; gap: 10px; }

/* ── Feature card ───────────────────────────────────────── */
.g-feature { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--r) + 4px); overflow: hidden; cursor: pointer; box-shadow: 0 10px 30px -20px rgba(0,0,0,0.3); }
.g-feature-media { padding: 12px 12px 0; }
.g-feature-media .g-ph { border-radius: var(--r); }
.g-feature-body { padding: 16px 18px 18px; }
.g-feature-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink-strong); margin-bottom: 7px; }
.g-feature-name { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.g-feature-tag { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 8px 0 16px; text-wrap: pretty; }
.g-feature-foot { display: flex; align-items: center; justify-content: space-between; }

/* ── Horizontal scroll cards ────────────────────────────── */
.g-hscroll { display: flex; gap: var(--gap); overflow-x: auto; padding: 0 var(--pad) 4px; scrollbar-width: none; }
.g-hcard { width: 168px; flex-shrink: 0; }

/* ── Compare teaser ─────────────────────────────────────── */
.g-compare-teaser { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 16px; border-radius: var(--r); background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); cursor: pointer; }
.g-compare-teaser.is-inline { margin: 4px 0; }
.g-ct-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.g-ct-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.g-ct-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Search / sort ──────────────────────────────────────── */
.g-searchbox { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 13px; height: 48px; }
.g-searchbox-input { flex: 1; border: none; outline: none; background: none; font-size: 15px; color: var(--ink); }
.g-searchbox-input::placeholder { color: var(--muted); }
.g-searchbox-clear { color: var(--muted); display: flex; padding: 4px; }
.g-chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 14px var(--pad) 6px; scrollbar-width: none; }
.g-sortrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; padding-bottom: 14px; }
.g-result-count { font-size: 13px; color: var(--muted); font-weight: 500; flex-shrink: 0; }
.g-sortpills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.g-sortpill { white-space: nowrap; font-size: 12.5px; color: var(--ink-2); padding: 6px 11px; border-radius: 999px; border: 1px solid transparent; }
.g-sortpill.is-on { background: var(--accent-soft); color: var(--accent-ink-strong); font-weight: 600; }

/* ── Empty ──────────────────────────────────────────────── */
.g-empty { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.g-empty-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.g-empty-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.g-empty-sub { color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 260px; margin-bottom: 8px; text-wrap: pretty; }

/* ── Tab bar ────────────────────────────────────────────── */
.g-tabbar { display: flex; padding: 8px 8px 26px; background: color-mix(in oklch, var(--bg) 84%, transparent); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); border-top: 1px solid var(--border); position: relative; z-index: 7; }
.g-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; color: var(--muted); }
.g-tab-ic { display: flex; }
.g-tab-label { font-size: 10.5px; font-weight: 500; }
.g-tab.is-on { color: var(--ink); }
.g-tab.is-on .g-tab-ic { color: var(--accent-ink-strong); }

/* ── Product detail ─────────────────────────────────────── */
.g-product { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.g-prod-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.g-prod-hero { position: relative; background: var(--ph-tint); }
.g-prod-hero .g-ph { border-radius: 0; }
.g-prod-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.g-prod-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,0.18); }
.g-prod-dots span.on { background: rgba(0,0,0,0.5); width: 18px; border-radius: 3px; }
.g-prod-float { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 56px 16px 0; pointer-events: none; }
.g-fab { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in oklch, var(--surface) 82%, transparent); backdrop-filter: blur(10px) saturate(160%); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink); pointer-events: auto; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.g-fab.is-on { color: var(--accent-ink-strong); background: var(--accent-soft); }
.g-fab.is-flat { background: var(--surface-2); backdrop-filter: none; }
.g-prod-body { padding: 20px var(--pad) 24px; margin-top: -14px; background: var(--bg); border-radius: 22px 22px 0 0; position: relative; }
.g-prod-name { font-family: var(--font-display); font-size: 27px; font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 7px 0 0; text-wrap: balance; }
.g-prod-tag { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 9px 0 0; text-wrap: pretty; }
.g-prod-meta { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.g-prod-cat { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); }
.g-prod-pricerow { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 4px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Quick summary ──────────────────────────────────────── */
.g-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 4px; }
.g-summary-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.g-summary-head { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }
.g-summary-head.g-pos { color: var(--tone-hi); }
.g-summary-head.g-neg { color: var(--muted); }
.g-summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.g-summary-list li { display: flex; gap: 8px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.g-tick { flex-shrink: 0; margin-top: 1px; display: inline-flex; }
.g-tick.g-pos { color: var(--tone-hi); }
.g-tick.g-neg { color: var(--muted); }

/* ── Blocks ─────────────────────────────────────────────── */
.g-block { margin-top: 26px; }
.g-block-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin-bottom: 14px; letter-spacing: -0.01em; }

/* score bars */
.g-scores { display: flex; flex-direction: column; gap: 14px; }
.g-sbar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.g-sbar-label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.g-sbar-val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.g-sbar-track { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.g-sbar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.g-sbar-fill.tone-hi { background: var(--tone-hi); }
.g-sbar-fill.tone-mid { background: var(--accent); }
.g-sbar-fill.tone-lo { background: var(--tone-lo); }

/* review */
.g-review { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 17px; position: relative; }
.g-review::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--accent); }
.g-review-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 9px; }
.g-review-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.g-review-text { color: var(--ink-2); font-size: 14px; line-height: 1.6; margin: 0; text-wrap: pretty; }

/* pros/cons */
.g-procon { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g-procon-col { display: flex; flex-direction: column; gap: 10px; }
.g-procon-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.g-procon-head.g-pos { color: var(--tone-hi); }
.g-procon-head.g-neg { color: var(--muted); }
.g-procon-item { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }

/* specs */
.g-specs { width: 100%; border-collapse: collapse; }
.g-specs tr { border-bottom: 1px solid var(--border); }
.g-specs tr:last-child { border-bottom: none; }
.g-specs-k { padding: 11px 0; font-size: 13.5px; color: var(--muted); width: 42%; vertical-align: top; }
.g-specs-v { padding: 11px 0; font-size: 13.5px; color: var(--ink); font-weight: 500; text-align: right; }

/* collapse */
.g-coll { margin-top: 26px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.g-coll-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--ink); }
.g-coll-body { padding: 0 16px 14px; }

/* sim list */
.g-simlist { display: flex; flex-direction: column; gap: 11px; }

/* ── Buy bar ────────────────────────────────────────────── */
.g-buybar { display: flex; align-items: center; gap: 14px; padding: 12px var(--pad) 28px; background: color-mix(in oklch, var(--bg) 90%, transparent); backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
.g-buybar-l { display: flex; flex-direction: column; }
.g-buybar-cap { font-size: 11px; color: var(--muted); font-weight: 500; }
.g-buybar-price { font-family: var(--font-mono); font-size: 21px; font-weight: 600; color: var(--ink); }
.g-buybar-btn { flex: 1; }

/* ── Sheet ──────────────────────────────────────────────── */
.g-sheet-wrap { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,0.35); display: flex; align-items: flex-end; animation: g-fade .2s ease; }
.g-sheet { width: 100%; background: var(--bg); border-radius: 26px 26px 0 0; padding: 12px var(--pad) 30px; animation: g-slideup .28s cubic-bezier(.2,.8,.2,1); }
.g-sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 0 auto 14px; }
.g-sheet-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.g-sheet-sub { font-size: 13px; color: var(--muted); margin: 2px 0 16px; }
.g-ret-list { display: flex; flex-direction: column; gap: 10px; }
.g-sheet-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; margin-top: 16px; text-align: center; }
@keyframes g-fade { from { opacity: 0; } }
@keyframes g-slideup { from { transform: translateY(100%); } }

/* retailer row */
.g-ret { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; }
.g-ret.is-best { border-color: var(--accent); background: var(--accent-soft); }
.g-ret-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.g-ret-note { font-size: 12px; color: var(--accent-ink-strong); margin-left: 9px; font-weight: 500; }
.g-ret-r { display: flex; align-items: center; gap: 10px; }
.g-ret-price { font-family: var(--font-mono); font-weight: 600; font-size: 16px; color: var(--ink); }
.g-ret-go { width: 28px; height: 28px; border-radius: 50%; background: var(--dark); color: var(--bg); display: flex; align-items: center; justify-content: center; }
[data-theme="dark"] .g-ret-go { background: var(--ink); }

/* ── Compare ────────────────────────────────────────────── */
.g-cmp-head .g-head-row { align-items: center; }
.g-cmp-htitle { text-align: center; }
.g-cmp-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; margin: 8px 0 4px; }
.g-cmp-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; cursor: pointer; }
.g-cmp-col .g-ph { aspect-ratio: 1; }
.g-cmp-brand { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 6px; }
.g-cmp-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.g-cmp-vs { align-self: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 40px; }
.g-cmp-score { margin-top: 4px; display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.g-cmp-score.is-win { background: var(--accent-soft); border-color: var(--accent); }
.g-cmp-score-num { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--ink); }
.g-cmp-score-cap { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.g-verdict { margin: 22px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 17px; position: relative; }
.g-verdict::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--accent); }
.g-cmp-table { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.g-cmp-trow { display: grid; grid-template-columns: 1.1fr 1fr 1fr; }
.g-cmp-trow > div { padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.g-cmp-trow:last-child > div { border-bottom: none; }
.g-cmp-trow-head > div { background: var(--surface-2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.g-cmp-tk { color: var(--muted); }
.g-cmp-tv { color: var(--ink); font-weight: 500; border-left: 1px solid var(--border); }
.g-cmp-tv.is-better { background: var(--accent-soft); color: var(--accent-ink-strong); font-weight: 600; }

/* ── Assistant ──────────────────────────────────────────── */
.g-assistant { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.g-asst-head { padding-bottom: 12px; }
.g-asst-brand { display: flex; align-items: center; gap: 11px; }
.g-asst-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.g-asst-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; line-height: 1.1; }
.g-asst-sub { font-size: 12px; color: var(--muted); }
.g-asst-new { font-size: 13px; font-weight: 600; color: var(--accent-ink-strong); padding: 7px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.g-asst-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) 10px; }

.g-asst-welcome { padding: 30px 6px; }
.g-asst-hero-mark { width: 60px; height: 60px; border-radius: 18px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.g-asst-hero-title { font-family: var(--font-display); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 10px; }
.g-asst-hero-text { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0 0 22px; text-wrap: pretty; }
.g-asst-suggest { display: flex; flex-direction: column; gap: 10px; }
.g-asst-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 14.5px; font-weight: 500; color: var(--ink); }
.g-asst-chip-go { color: var(--accent-ink-strong); display: flex; }
.g-asst-chip:active { background: var(--surface-2); }

.g-msgs { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.g-msg-user { display: flex; justify-content: flex-end; }
.g-msg-bubble { background: var(--dark); color: var(--bg); padding: 11px 15px; border-radius: 18px 18px 5px 18px; font-size: 14.5px; line-height: 1.45; max-width: 82%; }
[data-theme="dark"] .g-msg-bubble { background: var(--accent); color: var(--accent-ink); }
.g-msg-ai-head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 9px; }
.g-msg-ai-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.g-msg-text { font-size: 14.5px; line-height: 1.6; color: var(--ink); margin: 0 0 12px; text-wrap: pretty; }
.g-msg-crit { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.g-crit-pill { font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; line-height: 1.2; white-space: nowrap; }
.g-msg-products { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.g-msg-prod { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; cursor: pointer; }
.g-msg-prod:first-child { border-color: var(--accent); }
.g-msg-rank { position: absolute; top: -8px; left: 12px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; letter-spacing: 0.03em; padding: 2px 8px; border-radius: 6px; }
.g-msg-prod-media { width: 58px; height: 58px; flex-shrink: 0; }
.g-msg-prod-media .g-ph { height: 100%; }
.g-msg-prod-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.g-msg-prod-name { font-size: 14px; font-weight: 500; line-height: 1.25; }
.g-msg-prod-go { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.g-analyzing { display: flex; flex-direction: column; gap: 11px; padding: 4px 0; }
.g-astep { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--faint); transition: color .3s; }
.g-astep.is-active { color: var(--ink); font-weight: 500; }
.g-astep.is-done { color: var(--ink-2); }
.g-astep-ic { width: 18px; display: flex; justify-content: center; color: var(--tone-hi); }
.g-typing { display: inline-flex; gap: 3px; }
.g-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-ink-strong); animation: g-bounce 1s infinite; }
.g-typing span:nth-child(2) { animation-delay: .15s; }
.g-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes g-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.g-composer { display: flex; align-items: center; gap: 10px; padding: 10px var(--pad) 12px; border-top: 1px solid var(--border); background: var(--bg); }
.g-composer-input { flex: 1; height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0 18px; font-size: 15px; color: var(--ink); outline: none; }
.g-composer-input::placeholder { color: var(--muted); }
.g-composer-input:focus { border-color: var(--border-2); }
.g-composer-send { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.g-composer-send.is-on { background: var(--accent); border-color: transparent; }

/* saved */
.g-saved-list { display: flex; flex-direction: column; gap: 11px; padding-top: 4px; }

/* ── Tweaks swatches (custom) ───────────────────────────── */
.g-tw-swatches { display: flex; gap: 10px; }
.g-tw-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.g-tw-sw:active { transform: scale(0.92); }
.g-tw-sw.is-on { border-color: var(--ink, #111); }
.g-tw-sw-dot { width: 100%; height: 100%; border-radius: 50%; }

/* ── Buying guide ───────────────────────────────────────── */
.g-guide-hwrap { width: 250px; flex-shrink: 0; }
.g-guide-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: transform .14s; display: flex; flex-direction: column; }
.g-guide-card:active { transform: scale(0.985); }
.g-guide-card.is-wide { width: 100%; }
.g-guide-card-top { position: relative; height: 88px; background: var(--ph-tint); display: flex; align-items: flex-end; padding: 12px; }
.g-guide-eyebrow { position: relative; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: oklch(0.34 0.04 250); background: color-mix(in oklch, white 70%, transparent); padding: 4px 9px; border-radius: 7px; }
.g-guide-card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.g-guide-card-title { font-family: var(--font-display); font-size: 18px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.g-guide-card-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-guide-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 9px; font-size: 12px; font-weight: 500; color: var(--accent-ink-strong); }
.g-guide-card-go { display: flex; }

.g-guide-head .g-head-row { align-items: center; }
.g-guide-hero { padding: 6px 0 4px; }
.g-guide-title { font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.g-guide-sub { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 10px 0 14px; text-wrap: pretty; }
.g-guide-byline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.g-guide-byblob { width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.g-guide-intro { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 18px 0; text-wrap: pretty; }
.g-guide-crit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 15px; }
.g-guide-crit-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.g-guide-list { display: flex; flex-direction: column; gap: 24px; margin-top: 26px; }

.g-rank { border-top: 2px solid var(--ink); padding-top: 14px; }
[data-theme="dark"] .g-rank { border-top-color: var(--border-2); }
.g-rank-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.g-rank-num { font-family: var(--font-mono); font-size: 15px; font-weight: 600; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.g-rank-award { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink-strong); }
.g-rank-card { display: flex; align-items: center; gap: 13px; cursor: pointer; }
.g-rank-media { width: 76px; height: 76px; flex-shrink: 0; }
.g-rank-media .g-ph { height: 100%; }
.g-rank-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.g-rank-name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.g-rank-foot { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.g-rank-why { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 13px 0 0; text-wrap: pretty; }
.g-rank-why-label { font-weight: 600; color: var(--ink); }
.g-rank-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.g-rank-link { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent-ink-strong); }
.g-rank-best { font-size: 12.5px; color: var(--muted); }
.g-rank-best b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }

/* ── Page toolbar (mobile/desktop toggle) ───────────────── */
.g-toolbar { position: fixed; top: 16px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; pointer-events: none; }
.g-seg { display: inline-flex; background: oklch(0.99 0.003 95); border: 1px solid oklch(0.88 0.005 90); border-radius: 999px; padding: 4px; gap: 2px; box-shadow: 0 6px 20px -10px rgba(0,0,0,0.3); pointer-events: auto; }
.g-seg-btn { font-family: 'Hanken Grotesk', system-ui, sans-serif; font-size: 13px; font-weight: 600; color: oklch(0.5 0.01 80); padding: 7px 18px; border-radius: 999px; transition: all .15s; }
.g-seg-btn.is-on { background: oklch(0.2 0.01 75); color: oklch(0.98 0.004 95); }

/* ── Outbound affiliate modal ───────────────────────────── */
.g-out-wrap { position: absolute; inset: 0; z-index: 60; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 24px; animation: g-fade .2s ease; }
.g-out { width: 100%; max-width: 380px; background: var(--bg); border-radius: 22px; padding: 26px 24px 20px; text-align: center; animation: g-pop .26s cubic-bezier(.2,.8,.2,1); }
.g-out-mark { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.g-out-title { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.g-out-text { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 10px 0 20px; text-wrap: pretty; }
.g-out-price { font-family: var(--font-mono); font-weight: 600; color: var(--ink); white-space: nowrap; }
.g-out-actions { display: flex; gap: 10px; }
.g-out-actions .g-btn { flex: 1; }
.g-out-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; margin-top: 16px; }
@keyframes g-pop { from { transform: scale(0.94); opacity: 0; } }

/* ── Desktop nav + buybox (hidden on mobile; shown via container query) ── */
.g-dnav { display: none; }
.g-prod-buybox { display: none; }
.g-prod-dtop { display: none; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.g-prod-dback { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.g-prod-dback:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
