/* ───────────────────────────────────────────────────────────────────
   Buyer Radar — "Aurora Glass" UI (Gemini-inspired, light theme)
   Follows GEMINI_DESIGN_SYSTEM.md. Report output (worker/render.js)
   is intentionally NOT affected by this file.
   ─────────────────────────────────────────────────────────────────── */
:root {
  /* type */
  --font-sans: "Google Sans Flex", "Google Sans", "Inter", -apple-system,
               BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-weight: 320;            /* the signature light big-text weight */

  /* light canvas */
  --bg:          #FDFCFC;           /* warm off-white, never pure #FFF */
  --surface:     #FFFFFF;           /* cards / inputs */
  --surface-2:   #F2F0F0;           /* selected / hover fill */
  --text:        #1F1F1F;
  --text-2:      #444746;
  --text-3:      #80868B;           /* captions / volumes */
  --line:        #ECEAE6;           /* whisper hairline */

  /* the signature accent: YEA orange — deep orange → warm amber */
  --gem-spark:   linear-gradient(135deg, #E2613B 0%, #E89A14 100%);
  --gem-spark-3: linear-gradient(135deg, #D9542B 0%, #E2613B 50%, #E89A14 100%);
  --accent:      #E08A1E;           /* warm amber-orange — small active accents */
  --accent-blue: #E2613B;           /* deep YEA orange — focus / links / active */
  --accent-soft: rgba(226,97,59,0.14);
  /* YEA company wordmark spectrum (logo only) */
  --yea-spectrum: linear-gradient(90deg, #E2613B, #E89A14, #5BA62E, #12A2B5, #3F77CC, #8B5EC2);
  --rose:        #C5495B;
  --warm:        #C97B3A;

  /* aurora glow (orange→amber family, soft) */
  --aurora-edge: #FFD8A6;           /* pale tint of the amber end */
  --aurora-blur: 120px;

  /* shape */
  --r-card: 16px; --r-field: 16px; --r-input: 28px; --r-pill: 9999px;

  /* elevation (whisper-soft — depth comes from the glow, not shadow) */
  --shadow-input: 0 2px 8px -2px rgba(60,32,16,0.14);
  --shadow-pop:   0 2px 6px rgba(60,32,16,0.16), 0 1px 18px rgba(60,32,16,0.10);
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);

  /* spacing */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px; --s-8:32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Aurora glow ──────────────────────────────────────────────────── */
/* Layers fade to transparent so the warm-white canvas shows at the edges
   and the blue reads as a soft bloom behind the input — not a flat wash. */
.aurora-stage { position: relative; isolation: isolate; }
.aurora-stage::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 38%; width: 116%; height: 114%;
  transform: translate(-50%, -45%);
  background:
    radial-gradient(42% 34% at 50% 56%, rgba(226,97,59,0.50) 0%, rgba(226,97,59,0) 64%),
    radial-gradient(44% 36% at 29% 38%, rgba(217,84,43,0.44) 0%, rgba(217,84,43,0) 66%),
    radial-gradient(46% 36% at 74% 44%, rgba(232,154,20,0.54) 0%, rgba(232,154,20,0) 66%);
  filter: blur(var(--aurora-blur));
  animation: aurora-grow 1s var(--ease-emphasized) both;
}
@keyframes aurora-grow {
  0%   { opacity: 0; transform: translate(-50%, -45%) scale(0.4); }
  100% { opacity: 1; transform: translate(-50%, -45%) scale(1); }
}
@media (max-width: 768px) {
  .aurora-stage::before { animation: aurora-fade 1s var(--ease-emphasized) both; }
  @keyframes aurora-fade { from { opacity: 0; } to { opacity: 1; } }
}

/* ── Top bar ──────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(253,252,252,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 5;
}
.brand {
  font-weight: 500; font-size: 15px; color: var(--text);
  display: inline-flex; align-items: baseline; gap: 6px; letter-spacing: -0.01em;
}
.brand-name {
  font-weight: 600;
  background: var(--yea-spectrum); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.brand-by { color: var(--text-3); font-weight: 400; }
.brand small { color: var(--text-3); font-weight: 400; margin-left: 2px; }

/* ── Page ─────────────────────────────────────────────────────────── */
.page { max-width: 1040px; width: 100%; margin: 0 auto; padding: 8px 22px 48px; flex: 1 0 auto; }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  flex-shrink: 0; text-align: center;
  padding: 30px 16px 40px; font-size: 13px; color: var(--text-3); letter-spacing: 0.01em;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.footer-built-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: var(--text-2);
}
.footer-logo { height: 22px; width: auto; display: inline-block; }
.footer-lines { display: flex; flex-direction: column; gap: 2px; line-height: 1.55; }

/* ── Hero (transparent — the glow shows through) ──────────────────── */
.intro {
  text-align: center;
  padding: 64px 16px 36px;
  margin-bottom: 12px;
}
.intro h1 {
  font-weight: var(--display-weight);
  font-size: clamp(24px, 4.4vw, 38px);
  line-height: 1.2; letter-spacing: -0.015em;
  margin: 0 auto 14px; white-space: nowrap;   /* one line on desktop/tablet */
  background: var(--gem-spark);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradient-flow 9s linear infinite;
}
@keyframes gradient-flow {
  0% { background-position: 0% center; } 100% { background-position: 220% center; }
}
.intro > p {
  color: var(--text-2); font-size: 15px; max-width: 600px;
  margin: 0 auto 28px;
}

/* ── Composer (form) ──────────────────────────────────────────────── */
#composer { max-width: 720px; margin: 0 auto; text-align: left; }
.row { display: flex; gap: 10px; margin-bottom: 10px; }
#composer input, #composer select {
  flex: 1; width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  font-size: 16px; font-family: inherit; color: var(--text);   /* 16px = no iOS focus-zoom */
  background: var(--surface);
  box-shadow: var(--shadow-input);
  transition: border-color .18s, box-shadow .18s;
}
#composer input::placeholder { color: var(--text-3); }
#composer input:focus, #composer select:focus {
  outline: none; border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-input);
}
#composer select { cursor: pointer; }

.advanced { margin: 6px 0 4px; font-size: 13.5px; color: var(--text-2); }
.advanced summary {
  cursor: pointer; padding: 8px 4px; list-style: none;
  color: var(--text-2); border-radius: var(--r-pill);
  width: fit-content;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "＋ "; color: var(--accent); font-weight: 600; }
.advanced[open] summary::before { content: "－ "; }
.advanced summary:hover { color: var(--accent-blue); }
.advanced .grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
#fetchBtn, #genBtn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gem-spark); color: #fff; border: none;
  padding: 0 30px; height: 50px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 500; font-family: inherit; cursor: pointer;
  margin-top: 14px; box-shadow: var(--shadow-input);
  transition: filter .18s, transform .12s, box-shadow .18s;
}
#fetchBtn { display: flex; width: fit-content; margin: 18px auto 0; }   /* center under the form */
#fetchBtn:hover, #genBtn:hover { filter: brightness(1.06); box-shadow: var(--shadow-pop); }
#fetchBtn:active, #genBtn:active { transform: translateY(1px); }
#fetchBtn:disabled, #genBtn:disabled {
  opacity: 0.5; cursor: progress; filter: none; box-shadow: none;
}

.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  padding: 0 16px; height: 38px; border-radius: var(--r-pill);
  font-size: 13.5px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .16s, color .16s, border-color .16s;
}
.ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--surface-2); }
.ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.ghost:disabled:hover { background: transparent; color: var(--text-2); border-color: var(--line); }
.ghost.wide { display: flex; width: 100%; justify-content: center; height: 46px; margin-top: 6px; }

/* Round-2 button: stays ghost-white while locked, turns solid orange (like the
   primary Fetch button) the moment round 1 finishes and it becomes clickable —
   so it's obvious the next action is available. */
#expandBtn:not(:disabled) {
  background: var(--gem-spark); color: #fff; font-weight: 500;
  border-color: transparent; box-shadow: var(--shadow-input);
  /* snap color/border instantly (the .ghost color transition mis-settles on
     the orange fill); the pop comes from the expand-ready keyframe instead */
  transition: filter .18s, transform .12s, box-shadow .18s;
  animation: expand-ready .45s var(--ease-emphasized) both;
}
#expandBtn:not(:disabled):hover {
  background: var(--gem-spark); color: #fff; border-color: transparent;
  filter: brightness(1.06); box-shadow: var(--shadow-pop);
}
#expandBtn:not(:disabled):active { transform: translateY(1px); }
@keyframes expand-ready { from { transform: scale(0.985); opacity: 0.55; } to { transform: scale(1); opacity: 1; } }

/* more specific than `.intro > p` so the top gap below the button actually applies */
.intro > p.round-note { font-size: 13px; color: var(--text-3); text-align: center; margin: 40px auto 18px; max-width: 620px; }
.round-note b { color: var(--text-2); font-weight: 500; }

/* ── Cards (preview panel) ───────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px; margin-bottom: 22px;
}
.hidden { display: none !important; }

.fetch-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.fetch-head h2 { font-weight: 400; font-size: 22px; letter-spacing: -0.01em; margin: 0 0 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions #genBtn { margin-top: 0; }

/* ── Chips ────────────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12px; padding: 6px 13px; border-radius: var(--r-pill); font-weight: 500;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); display: inline-flex; align-items: center; gap: 7px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.chip.loading .dot { background: var(--warm); animation: pulse 1s infinite; }
.chip.ready { background: var(--accent-soft); color: var(--accent-blue); border-color: transparent; }
.chip.ready .dot { background: var(--accent); }
.chip.failed { color: var(--rose); }
.chip.failed .dot { background: var(--rose); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── Provider blocks ─────────────────────────────────────────────── */
.prov-block {
  border: 1px solid var(--line); border-radius: var(--r-card);
  margin-bottom: 16px; overflow: hidden; background: var(--surface);
}
.prov-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--surface-2);
  font-weight: 500; font-size: 14.5px;
}
.prov-head .count { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 16px 2px; }
.tab {
  font-size: 12.5px; padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  transition: background .15s, color .15s, border-color .15s;
}
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }

.kw-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kw-table td { padding: 9px 18px; border-top: 1px solid var(--line); color: var(--text-2); }
.kw-table tr:first-child td { border-top: none; }
.kw-table td.vol { text-align: right; color: var(--text-3); white-space: nowrap; width: 90px; vertical-align: top; }
.kw-table td.kw { vertical-align: top; }
.kw-name { line-height: 1.4; }
/* Search-volume bar: longer = more people searching that keyword. */
.bar { height: 6px; margin-top: 7px; max-width: 560px; border-radius: 9999px;
  background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 9999px;
  background: linear-gradient(90deg, #3F77CC, #12A2B5); }
.kw-wrap { max-height: 360px; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }

.ai-list { padding: 4px 0; }
.ai-list .ai-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2);
}
.ai-list .ai-row:first-child { border-top: none; }
.ai-list .tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); white-space: nowrap;
}

.note { font-size: 13.5px; color: var(--text-3); padding: 12px 2px; }
.err { color: var(--rose); }

/* "Search Insights" button — ghost, but accent-tinted so it reads as a
   distinct deliverable next to the plain "Export CSV" ghost. */
#snapBtn { border-color: var(--accent-soft); color: var(--accent-blue); }
#snapBtn:hover { background: var(--accent-soft); color: var(--accent-blue); border-color: transparent; }

/* ── Round-2 in-panel callout ─────────────────────────────────────── */
.expand-wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin: 16px 0 4px; padding: 14px 18px;
  border: 1px solid var(--accent-soft); border-radius: var(--r-card);
  background: var(--accent-soft);
  animation: expand-ready .45s var(--ease-emphasized) both;
}
.expand-wrap.loading { background: var(--surface-2); border-color: var(--line); }
.expand-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.expand-text b { color: var(--text); font-weight: 600; }
.expand-text span { color: var(--text-2); }
.expand-wrap #expandBtn { flex-shrink: 0; }
.expand-wrap #expandBtn:not(:disabled) {
  background: var(--gem-spark); color: #fff; border-color: transparent;
  font-weight: 500; box-shadow: var(--shadow-input);
}
.expand-wrap #expandBtn:not(:disabled):hover { filter: brightness(1.06); box-shadow: var(--shadow-pop); }

/* ── Report result ────────────────────────────────────────────────── */
#reportResult { margin-top: 16px; }
#reportResult:empty { margin-top: 0; }
.result-ok { padding: 14px 16px; border: 1px solid var(--accent-soft);
  border-radius: var(--r-card); background: var(--surface); }
.result-ok > b { font-size: 15px; }
/* Flash the result area when a report lands, so it draws the eye. */
@keyframes result-flash {
  0% { background: var(--accent-soft); }
  100% { background: transparent; }
}
#reportResult.flash { animation: result-flash 1.8s ease-out; border-radius: var(--r-card); }
.report-link { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.report-link a, .copy {
  background: var(--gem-spark); color: #fff; text-decoration: none;
  padding: 0 18px; height: 42px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 500;
  border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-input); transition: filter .18s;
}
.report-link a:hover, .copy:hover { filter: brightness(1.06); }
.copy { background: var(--surface); color: var(--accent-blue); border: 1px solid var(--line); box-shadow: none; }
.statusline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  animation: s 0.8s linear infinite;
}
@keyframes s { to { transform: rotate(360deg); } }

/* ── Settings dialog ──────────────────────────────────────────────── */
dialog {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 26px; box-shadow: var(--shadow-pop); color: var(--text);
}
dialog::backdrop { background: rgba(60,32,16,0.32); backdrop-filter: blur(2px); }
.settings { display: flex; flex-direction: column; gap: 14px; min-width: 380px; }
.settings h3 { margin: 0; font-weight: 500; font-size: 18px; }
.settings label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.settings input {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-field);
  font-family: inherit; font-size: 16px; background: var(--surface);
}
.settings input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-soft); }
.settings menu { display: flex; gap: 10px; justify-content: flex-end; padding: 0; margin: 8px 0 0; }
.settings menu button {
  padding: 0 18px; height: 42px; border-radius: var(--r-pill); border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500; background: var(--gem-spark); color: #fff;
}
.settings menu .ghost { background: transparent; color: var(--text-2); border: 1px solid var(--line); }

/* ── Auth gate ────────────────────────────────────────────────────── */
.auth-gate {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.auth-box {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 34px; width: 360px; text-align: center;
  box-shadow: var(--shadow-pop);
}
.auth-box .brand { justify-content: center; font-size: 16px; margin-bottom: 4px; }
.auth-box p { color: var(--text-2); font-size: 13.5px; margin: 10px 0 18px; }
.auth-box input {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: var(--r-field); font-size: 16px; font-family: inherit; margin-bottom: 12px;
}
.auth-box input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-box button {
  width: 100%; background: var(--gem-spark); color: #fff; border: none;
  padding: 0; height: 48px; border-radius: var(--r-pill); font-weight: 500; cursor: pointer;
  font-family: inherit; font-size: 14px;
}
.auth-box .err { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
/* ── Responsive ───────────────────────────────────────────────────── */
/* Heading: one line on desktop/tablet, wraps cleanly on phones. */
@media (max-width: 760px) {
  .intro h1 { white-space: normal; font-size: clamp(23px, 6.6vw, 32px); }
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .brand { font-size: 14.5px; }
  .brand small { display: none; }            /* drop the subtitle on phones */
  .page { padding: 4px 16px 56px; }
  .intro { padding: 36px 4px 24px; }
  .intro > p { font-size: 14.5px; }
  #composer { max-width: 100%; }
  .row { flex-direction: column; }
  .advanced .grid { grid-template-columns: 1fr; }
  #fetchBtn { width: 100%; }
  .card { padding: 18px; }
  .fetch-head { flex-direction: column; }
  .fetch-head h2 { font-size: 19px; }
  .actions { width: 100%; flex-direction: column; }
  .actions > * { width: 100%; justify-content: center; }
  .report-link { width: 100%; }
  .report-link a, .report-link .copy { flex: 1 1 auto; justify-content: center; }
  .expand-wrap { flex-direction: column; align-items: stretch; }
  .expand-wrap #expandBtn { width: 100%; justify-content: center; }
  .settings { min-width: auto; width: 86vw; }
  dialog { padding: 20px; max-width: 92vw; }
}
/* Slightly tighter on very small phones. */
@media (max-width: 380px) {
  .prov-head, .kw-table td, .ai-list .ai-row { padding-left: 14px; padding-right: 14px; }
  .tabs { padding-left: 12px; padding-right: 12px; }
}

/* --- Mode tabs (Search data / AEO Prompts) --- */
.mode-tabs { display: flex; gap: 8px; justify-content: center; margin: 0 auto 22px; }
.mode-tab {
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  padding: 9px 16px; border-radius: var(--r-pill); font: inherit; font-size: 13.5px;
  font-weight: 500; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.mode-tab:hover { background: var(--surface-2); }
.mode-tab.active { background: var(--accent-soft); color: var(--accent-blue); border-color: transparent; }

/* --- AEO Prompts mode --- */
#aeoForm textarea {
  width: 100%; box-sizing: border-box; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-field); padding: 14px 16px;
  font: inherit; font-size: 14px; color: var(--text); line-height: 1.5;
  resize: vertical; min-height: 150px; box-shadow: var(--shadow-input); margin-bottom: 10px;
}
#aeoForm textarea:focus { outline: none; border-color: var(--accent-blue); }
#aeoForm input, #aeoForm select {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-input); padding: 12px 16px; font: inherit; font-size: 14px;
  color: var(--text); box-shadow: var(--shadow-input);
}
#aeoForm input:focus, #aeoForm select:focus { outline: none; border-color: var(--accent-blue); }
#aeoForm select { cursor: pointer; }
#aeoBtn {
  display: flex; width: 100%; justify-content: center; height: 46px; margin-top: 6px;
  align-items: center; background: var(--gem-spark-3); color: #fff; border: none;
  border-radius: var(--r-input); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer;
}
#aeoBtn:disabled { opacity: .55; cursor: not-allowed; }

#aeoOut { margin-top: 18px; }
.aeo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap;
}
.aeo-sum { font-size: 13px; color: var(--text-3); }
.aeo-acts { display: flex; gap: 8px; }
.aeo-block { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 14px; background: var(--surface); }
.aeo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aeo-cat { font-size: 15px; font-weight: 600; color: var(--text); }
.aeo-cat .count { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.aeo-kws { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.aeo-kw { font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-pill); padding: 3px 10px; }
.aeo-list { display: flex; flex-direction: column; gap: 2px; }
.aeo-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 4px; border-top: 1px solid var(--line);
}
.aeo-row:first-child { border-top: none; }
.aeo-q { font-size: 14px; color: var(--text); line-height: 1.45; }
.aeo-tags { display: flex; gap: 6px; flex-shrink: 0; }
.aeo-tags .tag { font-size: 10.5px; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; border: 1px solid var(--line); color: var(--text-3); }
.aeo-tags .tag.comm { background: var(--accent-soft); color: var(--accent-blue); border-color: transparent; }
.aeo-tags .tag.eng { background: transparent; }
@media (max-width: 600px) {
  .aeo-row { flex-direction: column; gap: 4px; }
  .aeo-tags { align-self: flex-start; }
}

/* ── Auth: header slot, modal, 3-step signup, toast ───────────────────── */
.topbar-actions { display:flex; align-items:center; gap:10px; }
#authSlot { display:inline-flex; align-items:center; gap:8px; }
.auth-email { font-size:13px; color:var(--text-2); max-width:180px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }

.auth-dlg { border:none; border-radius:var(--r-card); padding:0; max-width:420px; width:92vw;
  background:transparent; box-shadow:var(--shadow-pop); }
.auth-dlg::backdrop { background:rgba(31,20,12,0.42); backdrop-filter:blur(3px); }
.auth-card { position:relative; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-card); padding:28px 26px 22px; }
.auth-x { position:absolute; top:12px; right:14px; border:none; background:none; font-size:22px;
  line-height:1; color:var(--text-3); cursor:pointer; padding:4px; }
.auth-x:hover { color:var(--text); }
.auth-head { text-align:center; margin-bottom:16px; }
.auth-head .brand-name { font-weight:600; background:var(--yea-spectrum);
  -webkit-background-clip:text; background-clip:text; color:transparent; font-size:15px; }
.auth-head h3 { margin:10px 0 4px; font-weight:500; font-size:21px; letter-spacing:-0.01em; }
.auth-reason { margin:0; color:var(--text-3); font-size:13.5px; }

.google-slot { display:flex; justify-content:center; min-height:0; margin:6px 0 10px; }
.auth-div { display:flex; align-items:center; text-align:center; color:var(--text-3);
  font-size:12px; margin:8px 0 14px; }
.auth-div::before, .auth-div::after { content:""; flex:1; height:1px; background:var(--line); }
.auth-div span { padding:0 12px; }

.auth-form { display:flex; flex-direction:column; gap:10px; }
.auth-form input[type=text], .auth-form input:not([type]), .auth-form input[type=email],
.auth-form input[type=tel], .auth-form select {
  width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:var(--r-field);
  font:inherit; font-size:14px; background:var(--surface); color:var(--text); box-shadow:var(--shadow-input); }
.auth-form input:focus, .auth-form select:focus { outline:none; border-color:var(--accent-blue);
  box-shadow:0 0 0 3px var(--accent-soft); }
.auth-form button[type=submit], .auth-next {
  background:var(--gem-spark); color:#fff; border:none; padding:12px 18px; border-radius:var(--r-pill);
  font:inherit; font-weight:600; font-size:14px; cursor:pointer; box-shadow:var(--shadow-input); }
.auth-form button[type=submit]:hover, .auth-next:hover { filter:brightness(1.06); }
.step-label { font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--accent-blue); }
.step-nav { display:flex; gap:8px; }
.step-nav .auth-next, .step-nav button[type=submit] { flex:1; }
.chk { display:flex; align-items:flex-start; gap:8px; font-size:12.5px; color:var(--text-2); }
.chk input { width:auto; margin-top:2px; }
.auth-foot { text-align:center; margin-top:14px; font-size:13px; color:var(--text-3); }
.auth-foot a { color:var(--accent-blue); text-decoration:none; font-weight:500; }

.br-toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(20px);
  background:var(--text); color:#fff; padding:11px 18px; border-radius:var(--r-pill); font-size:13.5px;
  opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:9999; }
.br-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── Trend hero (main-keyword search-volume chart) ─────────────────── */
.trend-hero {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 20px 14px;
  margin-bottom: 18px;
}
.trend-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 14px;
}
.trend-kw { font-weight: 600; color: var(--text); font-size: 15px; }
.trend-vol { color: var(--text-2); font-size: 13.5px; }
.trend-badge {
  font-size: 12px; font-weight: 500; padding: 3px 10px;
  border-radius: var(--r-pill); white-space: nowrap;
}
.trend-badge.up   { color: #0a7d33; background: #e7f6ec; }
.trend-badge.down { color: #c0341d; background: #fcebe8; }
.trend-badge.flat { color: #6b7280; background: #eef0f2; }
.trend-chart {
  display: flex; align-items: flex-end; gap: 4px; height: 120px;
  margin-bottom: 10px;
}
.trend-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; height: 100%;
}
.trend-bar {
  width: 100%; min-height: 2px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #E2613B 0%, #E89A14 100%);
}
.trend-x {
  font-size: 10px; color: var(--text-3); margin-top: 4px;
  white-space: nowrap; min-height: 14px;
}
.trend-toggle { margin-top: 6px; }
.trend-empty { padding: 14px 16px; }
