:root {
  --bg: #10141c;
  --bg-elev: #171d28;
  --bg-soft: #1f2734;
  --line: rgba(232, 220, 196, 0.12);
  --text: #f3eee4;
  --muted: #9aa4b2;
  --amber: #e2b15a;
  --teal: #6ec8c0;
  --rose: #d97878;
  --good: #8fbf7a;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { min-height: 100%; margin: 0; overflow-x: clip; }
body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga" 1, "calt" 1;
  background-image:
    radial-gradient(ellipse 80% 50% at 0% -10%, rgba(226, 177, 90, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(110, 200, 192, 0.08), transparent);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.app { min-height: 100vh; display: flex; flex-direction: column; min-width: 0; overflow-x: clip; --topbar-h: 56px; }
.app.app-site { --topbar-h: 96px; }
.app-foot {
  border-top: 1px solid var(--line);
  padding: 14px 32px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(154, 164, 178, 0.85);
  background: var(--bg-elev);
  text-align: center;
}
.app-foot p { margin: 0; }
.app-foot a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s ease;
}
.app-foot a:hover { color: var(--amber); }
.login-wrap .app-foot {
  width: min(400px, 100%);
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  min-height: var(--topbar-h);
  padding: 0;
  background: #0c1018; border-bottom: 1px solid var(--line);
}
.topbar-main {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 16px;
  flex: 0 0 auto;
}
.top-brand { font-weight: 700; font-size: 16px; white-space: nowrap; flex: 0 0 auto; }
.top-brand span { color: var(--amber); margin-right: 6px; letter-spacing: 0.14em; }
.top-all { color: var(--muted); padding: 8px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap; flex: 0 0 auto; }
.top-all:hover, .top-all.active { color: var(--text); background: var(--bg-soft); }
.top-nav {
  display: flex; gap: 2px; align-items: center;
  padding: 0 12px 8px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.top-nav a {
  color: var(--muted); padding: 6px 10px; border-radius: 8px;
  font-size: 13px; white-space: nowrap; flex: 0 0 auto;
}
.top-nav a:hover, .top-nav a.active { color: var(--text); background: var(--bg-soft); }
.project-switch { position: relative; flex: 0 1 auto; min-width: 0; }
.project-switch summary {
  list-style: none; cursor: pointer; color: var(--text); font-weight: 650;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; gap: 8px;
}
.project-switch summary::-webkit-details-marker { display: none; }
.project-switch summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.project-switch-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; z-index: 30;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.project-switch-menu a { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--muted); }
.project-switch-menu a span { min-width: 0; }
.project-switch-menu a em { display: block; font-style: normal; font-size: 11px; }
.project-switch-menu a:hover, .project-switch-menu a.active { background: var(--bg-soft); color: var(--text); }
.top-right { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: 0 0 auto; }
.top-user { color: var(--muted); font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 8px; border-radius: 8px; }
.top-user:hover { color: var(--text); background: var(--bg-soft); }
.top-tool { color: var(--muted); font-size: 13px; padding: 7px 8px; border-radius: 8px; white-space: nowrap; }
.top-tool:hover, .top-tool.active { color: var(--text); background: var(--bg-soft); }
.share-pop { position: relative; }
.share-pop summary {
  list-style: none; cursor: pointer; color: var(--muted); font-size: 14px;
  padding: 8px 10px; border-radius: 8px; white-space: nowrap;
}
.share-pop summary::-webkit-details-marker { display: none; }
.share-pop summary:hover, .share-pop[open] summary { color: var(--text); background: var(--bg-soft); }
.share-pop-menu {
  position: absolute; top: calc(100% + 6px); right: 0; width: min(340px, calc(100vw - 24px)); z-index: 40;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.gsc-steps { margin: 0 0 16px; padding-left: 18px; color: var(--muted); line-height: 1.55; }
.gsc-steps li { margin: 6px 0; }
.site-banner {
  background: rgba(110, 200, 192, 0.1); border: 1px solid rgba(110, 200, 192, 0.28);
  border-radius: 12px; padding: 10px 14px; margin: 0 0 22px; font-size: 14px;
}
.muted-stat { color: var(--muted); }
.menu-toggle { display: none; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.app-body { display: grid; grid-template-columns: 248px 1fr; flex: 1; min-height: 0; position: relative; }
.side-backdrop { display: none; }
.side {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 16px 12px 24px;
  position: sticky;
  top: var(--topbar-h, 56px);
  height: calc(100vh - var(--topbar-h, 56px));
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.011em;
}
.side-create {
  display: flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--amber);
  border: 1px solid rgba(226, 177, 90, 0.5);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.side-create:hover {
  background: rgba(226, 177, 90, 0.08);
  border-color: rgba(226, 177, 90, 0.75);
  color: var(--amber);
}
.side-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(154, 164, 178, 0.72);
  margin: 20px 10px 6px;
  padding-left: 2px;
}
.side-empty { color: rgba(154, 164, 178, 0.85); font-size: 12px; font-weight: 400; padding: 6px 12px; }
.side .nav { display: flex; flex-direction: column; gap: 1px; }
.side .nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(154, 164, 178, 0.92);
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color 0.12s ease, background 0.12s ease;
}
.side .nav a:hover,
.side .nav a.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.side .nav a.active { font-weight: 500; }
.side-project { margin: 14px 10px 6px; padding: 2px 10px 4px; display: flex; align-items: center; gap: 10px; }
.side-project strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}
.side-project em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(154, 164, 178, 0.82);
  margin-top: 2px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--muted); border-radius: 10px; padding: 8px 10px; }
.nav a:hover, .nav a.active { background: var(--bg-soft); color: var(--text); }
.nav-ico { width: 16px; height: 16px; flex: 0 0 16px; opacity: 0.88; }
.side .nav a.active .nav-ico { opacity: 1; }
.nav-sites a { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.nav-sites strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: inherit;
}
.nav-sites em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: rgba(154, 164, 178, 0.78);
  margin-top: 1px;
}
.site-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-top: 6px; flex: 0 0 8px; }
.main { padding: 28px 32px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.site-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  gap: 16px 24px; margin: 0 0 24px;
}
.site-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 2px;
}
.site-toolbar .btn {
  padding: 5px 12px; font-size: 13px; font-weight: 600; line-height: 1.3; border-radius: 8px;
}
.site-toolbar .muted { font-size: 12px; }
h1 { margin: 0; font-size: 30px; }
.muted { color: var(--muted); }
.lede { max-width: 640px; color: var(--muted); margin: 8px 0 0; }
.page-intro {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 8px 0 12px;
}
.page-intro .lede { margin: 0; flex: 1 1 280px; max-width: none; }
.page-intro-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.module-toolbar { margin: 12px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.card, .panel, .table-wrap { border: 1px solid var(--line); background: var(--bg-elev); border-radius: 16px; }
.card { padding: 20px; }
.kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat { margin-top: 8px; font-size: 26px; font-weight: 500; }
.stat-unit { margin-left: 2px; font-size: 14px; font-weight: 500; color: var(--muted); }
.muted-stat { color: var(--muted); }
.hint { margin-top: 4px; font-size: 12px; color: var(--muted); }

.pos-dist {
  display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0;
  margin: 16px 0 14px; padding: 0;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-elev); overflow: hidden;
}
.pos-dist-btn {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px;
  flex: 1 1 0; min-width: 0; padding: 12px 14px;
  border: 0; border-right: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--text); cursor: pointer; text-align: left;
  position: relative;
}
.pos-dist-btn:last-child { border-right: 0; }
.pos-dist-btn:hover { background: rgba(255,255,255,0.03); }
.pos-dist-btn.active {
  background: rgba(255,255,255,0.04);
}
.pos-dist-btn.active:after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  border-radius: 2px 2px 0 0; background: var(--amber);
}
.pos-dist-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pos-dist-btn.active .pos-dist-label { color: rgba(255,255,255,0.78); }
.pos-dist-btn strong { font-size: 18px; font-weight: 650; line-height: 1.15; letter-spacing: -0.02em; }
.pos-dist-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; min-height: 14px; }
.pos-dist-btn em { font-style: normal; font-size: 11px; color: var(--muted); margin: 0; }
.pos-dist-btn .delta { margin: 0; font-size: 11px; }
.pos-dist-btn.is-empty { opacity: 0.5; }
.pos-dist-btn.is-empty:hover,
.pos-dist-btn.is-empty.active { opacity: 0.8; }
.pos-dist-btn.is-empty .pos-dist-empty {
  color: var(--muted);
  font-weight: 500;
  font-size: 16px;
}
.pos-dist-btn.is-empty .pos-dist-label {
  color: rgba(154, 164, 178, 0.85);
}

.kpi-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.kpi-cards.dash-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; }
.kpi-cards.dash-kpi-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-cards.kpi-cards-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.kpi-cards.kpi-cards-wide .kpi-card {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  height: 100%;
}
.kpi-cards.kpi-cards-wide .kpi-card .stat {
  margin-top: auto;
  padding-top: 8px;
}
.kpi-cards.kpi-cards-wide .kpi-card .hint {
  margin-top: 6px;
}
@media (min-width: 1100px) {
  .kpi-cards.kpi-cards-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.btn-xs { padding: 3px 8px; font-size: 11px; font-weight: 600; border-radius: 6px; }
.dash-spark { margin-top: 6px; }
.dash-link-act { margin-top: 4px; }
.warn-hint { color: #e2b15a; }
.dash-cols { position: relative; }
.dash-cols > summary {
  list-style: none; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
}
.dash-cols > summary::-webkit-details-marker { display: none; }
.dash-cols-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 220px; padding: 10px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  display: grid; gap: 6px;
}
.dash-col-opt { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); }
.overview-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px;
}
.overview-widget { padding: 16px 18px; }
.overview-widget-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px;
}
.overview-stat-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.overview-stat-row:first-of-type { border-top: 0; }
.overview-stat-row span { color: var(--muted); }
.overview-mini-list { list-style: none; padding: 0; margin: 8px 0 0; }
.overview-mini-list li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 0; font-size: 12px; border-top: 1px solid rgba(232,220,196,0.06);
}
.overview-kw-panel { margin-top: 18px; }
.overview-kw-wrap { margin: 0 -4px; }
.overview-kw-table { font-size: 13px; }
.overview-kw-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; }
.overview-kw-table td { padding: 10px 12px; vertical-align: middle; }
.overview-kw-phrase { font-weight: 500; color: var(--text); }
.overview-kw-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 4px;
}
.overview-kw-cap { font-size: 12px; }
.overview-kw-table tr.overview-kw-extra[hidden] { display: none; }
.kicker.soft { margin-top: 12px; opacity: 0.8; }
.audit-bar.lg { height: 8px; margin: 10px 0; }
.extras-panel-cache { margin: 6px 0 0; font-size: 13px; color: var(--text); }
.sov-board { margin: 0 0 16px; }
.sov-bars { display: grid; gap: 8px; margin-top: 8px; }
.sov-row { display: grid; grid-template-columns: minmax(100px, 1.2fr) 2fr auto; gap: 10px; align-items: center; font-size: 13px; }
.sov-row.is-own .sov-name { color: var(--teal, #6ec8c0); font-weight: 600; }
.sov-row.is-own .sov-track span { background: linear-gradient(90deg, #6ec8c0, #4aa8a0); }
.sov-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.sov-name em { font-style: normal; opacity: 0.7; font-weight: 500; }
.sov-track { height: 8px; border-radius: 99px; background: rgba(232,220,196,0.08); overflow: hidden; }
.sov-track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e2b15a, #c9943d); }
.gap-panel { margin-top: 16px; }
@media (max-width: 1100px) {
  .kpi-cards.dash-kpi-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .sov-row { grid-template-columns: 1fr; gap: 4px; }
}
.kpi-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
}
.kpi-card[data-tip],
.traffic-chip[data-tip] { cursor: help; }
.kpi-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 8px;
  min-width: 0;
}
.kpi-top .kicker { flex: 1 1 auto; min-width: 0; }
.kpi-card .stat { margin-top: 6px; font-size: 24px; }
.kpi-card .stat .delta { font-size: 13px; font-weight: 650; }
.kpi-compact { font-size: 20px !important; letter-spacing: -0.02em; }
.sparkline-wrap {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 28px;
  overflow: hidden;
  margin-top: 2px;
}
.sparkline {
  display: block;
  width: 100%;
  height: 28px;
  max-width: 100%;
  overflow: hidden;
}
.sparkline .spark-area { pointer-events: none; }
.dash-spark .sparkline-wrap,
.overview-spark .sparkline-wrap {
  margin-top: 0;
}
.link-num { color: var(--teal); font-weight: 650; }
.link-num:hover { text-decoration: underline; }
.top-split .sep { margin: 0 3px; color: var(--muted); }
.table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.table-wrap form { display: inline; margin: 0; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { background: rgba(255,255,255,0.02); color: var(--muted); font-weight: 500; padding: 12px 16px; }
td { padding: 12px 16px; border-top: 1px solid var(--line); }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.link { color: var(--amber); font-weight: 600; }
.btn { border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 650; cursor: pointer; }
.btn-sm { padding: 5px 12px; font-size: 12px; font-weight: 600; }
.btn[disabled] { opacity: 0.5; cursor: wait; }
.btn-amber { background: var(--amber); color: #1b1408; }
.btn-outline-amber { background: transparent; border: 1px solid rgba(226, 177, 90, 0.55); color: var(--amber); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-outline-teal { background: transparent; border: 1px solid rgba(110, 200, 192, 0.55); color: var(--teal); }
.btn-teal { background: transparent; border: 1px solid var(--teal); color: var(--teal); }
.btn-text { background: var(--text); color: var(--bg); }
.btn-danger { background: transparent; border: 1px solid var(--rose); color: var(--rose); }
.btn-outline-danger { background: transparent; border: 1px solid rgba(232, 120, 120, 0.55); color: var(--rose); }
.btn-text-danger { background: none; border: 0; color: var(--rose); cursor: pointer; font-size: 13px; padding: 0; }
.wrs-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 20px;
  background: rgba(8, 10, 16, 0.72);
}
.wrs-modal[hidden] { display: none !important; }
.wrs-modal-card {
  width: min(440px, 100%);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.wrs-modal-card h2 { margin: 0 0 10px; font-size: 20px; }
.wrs-modal-card p { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.wrs-modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.wrs-modal-actions .btn { font-size: 13px; padding: 7px 14px; font-weight: 600; }
.badge { display: inline-block; margin-left: 8px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal); border: 1px solid rgba(110,200,192,0.35); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.share-list { list-style: none; padding: 0; margin: 16px 0 0; }
.share-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel { padding: 20px; margin: 20px 0; }
.kw-add-fold { margin: 12px 0; }
.kw-import-fold { margin: 12px 0; }
.kw-add-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end;
}
.kw-import-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end;
}
.kw-add-field { margin: 0; }
.kw-add-field textarea { min-height: 88px; margin-top: 6px; }
.kw-dup-warn {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 177, 90, 0.45);
  background: rgba(226, 177, 90, 0.1);
  color: #f0d9a0;
  font-size: 13px;
  line-height: 1.45;
}
.kw-dup-warn.hidden { display: none; }
.kw-dup-warn strong { font-weight: 650; }
p.warn {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 177, 90, 0.45);
  background: rgba(226, 177, 90, 0.1);
  color: #f0d9a0;
}
.extra-actions.compact { margin: 0 0 8px; }
.extra-actions.compact .btn { font-size: 12px; padding: 6px 12px; font-weight: 600; }
.extras-panel {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 14px 0 16px; padding: 16px 18px;
  border: 1px solid rgba(110, 200, 192, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(110, 200, 192, 0.07) 0%, rgba(255, 255, 255, 0.02) 55%);
}
.extras-panel-accent {
  width: 4px; align-self: stretch; border-radius: 4px;
  background: linear-gradient(180deg, var(--teal), rgba(110, 200, 192, 0.35));
  flex-shrink: 0;
}
.extras-panel-body { flex: 1 1 220px; min-width: 0; }
.extras-panel-kicker {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 4px;
}
.extras-panel-title { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.extras-panel-body .hint { margin: 0; font-size: 13px; line-height: 1.45; }
.extras-panel-foot { margin: 8px 0 0; font-size: 11px; opacity: 0.85; }
.extras-panel-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.fold { padding: 0; }
.fold > details { margin: 0; }
.fold summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  justify-content: space-between; padding: 14px 18px;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary strong { display: block; font-size: 16px; }
.fold summary em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fold-chev {
  width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); flex: 0 0 8px; margin-top: -4px;
}
.fold details[open] .fold-chev { transform: rotate(225deg); margin-top: 4px; }
.fold details[open] > summary { border-bottom: 1px solid var(--line); }
.fold-body { padding: 16px 18px 18px; }
.comp-watched-section { margin: 16px 0 22px; }
.comp-watched-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px;
}
.comp-watched-head h2 { margin: 0; font-size: 18px; }
.comp-watched-count { font-size: 12px; }
.comp-watched-empty { margin: 0 0 4px; font-size: 13px; }
.comp-watched-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.comp-watched-list li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 13px;
}
.comp-watched-domain { font-weight: 600; }
.comp-watched-list form { margin: 0; display: inline; }
.comp-add-fold {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}
.comp-add-fold summary strong { font-size: 14px; font-weight: 600; }
.comp-add-fold .fold-body textarea { min-height: 88px; }
.comp-insights { margin: 0 0 20px; }
.comp-chip-sub { margin-top: 4px; font-size: 12px; line-height: 1.35; }
.comp-top-domain {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.comp-serp-board { margin: 0 0 22px; }
.comp-serp-board.hide-noise tr[data-noise="1"] { display: none; }
.comp-serp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.comp-serp-head h2 { margin: 0 0 4px; font-size: 18px; }
.comp-serp-head .hint { margin: 0; max-width: 62ch; }
.comp-noise-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  margin-top: 4px;
}
.comp-noise-toggle input { width: auto; margin: 0; accent-color: var(--teal); }
.comp-domain-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.comp-domain-cell strong { font-weight: 650; }
.comp-top-domain { display: inline-flex; align-items: center; gap: 6px; }
.comp-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.comp-tag.is-watched {
  color: var(--teal);
  border-color: rgba(110,200,192,0.4);
}
.comp-tag.is-noise {
  color: var(--muted);
  opacity: 0.85;
}
.comp-th-cov,
.comp-th-pos { white-space: nowrap; }
.comp-fact-cell {
  vertical-align: top;
  min-width: 200px;
  max-width: 28rem;
}
.comp-fact {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.comp-fact + .comp-fact { margin-top: 6px; }
.comp-fact strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.comp-fact-warn { color: var(--text); }
.comp-fact-warn strong:first-of-type { color: inherit; }
.comp-fact-ok { color: var(--teal); }
.comp-examples-cell { vertical-align: top; min-width: 220px; }
.comp-examples-label {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.comp-kw {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  max-width: 42rem;
}
.comp-kw-chip {
  display: inline-block;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.3;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.comp-kw-more { display: inline; }
.comp-kw-more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px dashed rgba(110,200,192,0.45);
}
.comp-kw-more > summary::-webkit-details-marker { display: none; }
.comp-kw-more[open] > summary { margin-bottom: 6px; }
.comp-kw-more-body {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 4px;
}
.comp-action-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.comp-action-cell form { margin: 0; }
.comp-phrases-fold {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}
.comp-phrases-fold summary strong { font-size: 15px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2.single { grid-template-columns: 1fr; }
label.field { display: block; font-size: 14px; }
input:not([type]),
input[type=text],
input[type=email],
input[type=password],
input[type=search],
input[type=url],
input[type=number],
input[type=date],
select,
textarea {
  width: 100%; margin-top: 6px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); padding: 9px 12px;
  caret-color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 9999s ease-out;
}
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { cursor: pointer; }
.chart-box { height: 148px; padding: 6px 10px 8px; }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px 24px; }
body.login-page { min-height: 100vh; }
.login-card {
  width: min(400px, 100%);
  text-align: left;
  background: linear-gradient(165deg, rgba(31, 39, 52, 0.72) 0%, rgba(23, 29, 40, 0.82) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(232, 220, 196, 0.12);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.login-inner {
  width: 100%;
  padding: 32px 28px 28px;
  box-sizing: border-box;
}
.login-head { margin: 0; text-align: left; }
.login-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 16px;
}
.login-mark {
  color: var(--amber);
  letter-spacing: 0.14em;
  margin-right: 6px;
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.28;
  text-align: left;
}
.login-lede {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: rgba(154, 164, 178, 0.9);
  text-align: left;
}
.login-error {
  margin: 20px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--rose);
  background: rgba(217, 120, 120, 0.1);
  border: 1px solid rgba(217, 120, 120, 0.32);
}
.login-notice {
  margin: 20px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--good);
  background: rgba(143, 191, 122, 0.1);
  border: 1px solid rgba(143, 191, 122, 0.32);
}
.login-extra {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.login-extra a { color: var(--amber); text-decoration: none; }
.login-extra a:hover { text-decoration: underline; }
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  width: 100%;
}
.login-field {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
}
.login-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(232, 220, 196, 0.14);
  background: rgba(16, 20, 28, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.login-field input:focus {
  outline: none;
  border-color: rgba(110, 200, 192, 0.45);
  background: rgba(16, 20, 28, 0.72);
  box-shadow: 0 0 0 3px rgba(110, 200, 192, 0.12);
}
.login-field input::placeholder { color: rgba(154, 164, 178, 0.55); }
.btn-glass-teal {
  background: rgba(110, 200, 192, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(110, 200, 192, 0.38);
  color: var(--teal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 20px rgba(110, 200, 192, 0.14);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn-glass-teal:hover {
  background: rgba(110, 200, 192, 0.16);
  border-color: rgba(110, 200, 192, 0.55);
  color: #8ee0d8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 28px rgba(110, 200, 192, 0.22);
}
.login-submit.btn {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.flash { color: var(--rose); font-size: 14px; }
.mode-banner {
  background: rgba(226, 177, 90, 0.12); border: 1px solid rgba(226, 177, 90, 0.28);
  color: var(--text); border-radius: 12px; padding: 10px 14px; margin: 0 0 18px; font-size: 14px;
}
.dfs-funds-banner {
  position: sticky;
  top: 56px;
  z-index: 19;
  background: linear-gradient(90deg, #5c1218 0%, #8a1a24 45%, #5c1218 100%);
  border-bottom: 2px solid rgba(255, 120, 120, 0.65);
  box-shadow: 0 8px 24px rgba(120, 20, 30, 0.35);
}
.dfs-funds-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 14px;
  line-height: 1.4;
  color: #ffe8ea;
}
.dfs-funds-banner strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}
.dfs-funds-banner em {
  font-style: normal;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 1px 7px;
}
.dfs-funds-banner span { flex: 1 1 220px; }
.dfs-funds-banner-note { flex: 0 1 auto; opacity: 0.9; font-size: 13px; }
.btn-funds {
  flex-shrink: 0;
  background: #fff;
  color: #7a1520;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  font-weight: 700;
}
.btn-funds:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.dash-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-actions .btn {
  padding: 5px 12px; font-size: 13px; font-weight: 600; line-height: 1.3; border-radius: 8px;
}
.split-btn { display: inline-flex; align-items: stretch; }
.split-btn > .btn {
  border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0;
}
.split-more { position: relative; display: flex; }
.split-more summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 28px; margin: 0; padding: 0;
  border: 1px solid var(--teal); border-left: 0; border-radius: 0 8px 8px 0;
  background: transparent; color: var(--teal);
}
.split-more summary::-webkit-details-marker,
.split-more summary::marker { display: none; content: ""; }
.split-caret {
  display: block; width: 6px; height: 6px; flex: 0 0 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}
.split-more[open] .split-caret { transform: rotate(225deg) translateY(-1px); }
.split-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 24; min-width: 220px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.split-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.split-menu button:hover { background: var(--bg-soft); }
.chart-panel { padding: 16px 18px 12px; }
.chart-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chart-tabs { display: flex; flex-wrap: wrap; gap: 0; }
.chart-tab {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 8px 10px; cursor: pointer; border-bottom: 2px solid transparent;
}
.chart-tab.active { color: var(--text); border-bottom-color: var(--amber); }
.chart-box.dash { height: 140px; }
.chart-box.traffic { height: 260px; padding: 10px 12px 12px; }
.kpi-cards.traffic-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.kpi-cards.traffic-kpi .kpi-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 108px;
}
.kpi-cards.traffic-kpi .kpi-card .stat { margin-top: auto; padding-top: 8px; }
.kpi-cards.traffic-kpi .kpi-card .hint { margin-top: 6px; }
.traffic-source { margin: -8px 0 12px; }
.traffic-period {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 14px;
}
.traffic-period .engine-tabs { margin: 0; }
a.engine-tab { text-decoration: none; }
.traffic-period-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
}
.traffic-period-dates .field { margin: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.traffic-period-dates input[type=date] {
  display: block;
  margin-top: 4px;
  min-width: 148px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.traffic-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  align-items: stretch;
}
.traffic-chip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 104px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 14px;
  box-sizing: border-box;
}
.traffic-chip .kicker {
  margin: 0;
  line-height: 1.25;
}
.traffic-chip-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: auto;
  min-width: 0;
}
.traffic-chip-value strong {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.traffic-chip-value .muted {
  font-size: 12px;
  line-height: 1.3;
}
.traffic-ga-block { margin: 0 0 22px; }
.traffic-ga-head { margin: 0 0 12px; }
.traffic-ga-head .hint { margin: 6px 0 0; max-width: 70ch; }
.traffic-ga-kpi { margin-bottom: 12px; }
.traffic-ga-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}
.traffic-split-sep { margin: 0 6px; color: var(--muted); }
.traffic-audience-bar {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  margin: 2px 0 0;
}
.traffic-audience-bar > i { display: block; height: 100%; }
.traffic-audience-bar > i.is-new { background: var(--teal); }
.traffic-audience-bar > i.is-ret { background: var(--amber); }
.traffic-audience-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  margin-top: auto;
}
.traffic-audience-nums strong {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.traffic-device-bars {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  width: 100%;
}
.traffic-device-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.traffic-device-track {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.traffic-device-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}
.traffic-device-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
@media (max-width: 720px) {
  .traffic-ga-split { grid-template-columns: 1fr; }
}
.traffic-landings { padding: 0; }
.traffic-landings td.truncate { max-width: 420px; color: var(--text); }
.traffic-land-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 550;
}
.traffic-land-link:hover,
.traffic-land-link:focus-visible {
  text-decoration: underline;
  outline: none;
}
.traffic-landings-table tr.traffic-land-more.hidden { display: none; }
.traffic-land-more-bar {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}
details.traffic-fold { padding: 0; }
.traffic-fold-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
}
.traffic-fold-head::-webkit-details-marker { display: none; }
.traffic-fold-head::marker { content: none; }
.traffic-fold-head .kicker { margin: 0; }
.traffic-fold-toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}
.traffic-fold-head:hover .traffic-fold-toggle { color: var(--text); border-color: rgba(232, 220, 196, 0.28); }
.traffic-fold-toggle::before { content: "−"; }
.traffic-fold:not([open]) .traffic-fold-toggle::before { content: "+"; }
.traffic-fold[open] > .traffic-fold-head { border-bottom: 1px solid var(--line); }
.traffic-fold-body { padding: 8px 16px 12px; }
.traffic-ai-block { margin: 0 0 18px; }
.traffic-chart-panel { margin: 0 0 18px; }
.traffic-pattern {
  margin: 0 0 22px;
  padding: 16px 18px 14px;
}
.traffic-pattern-head { margin-bottom: 12px; }
.traffic-pattern-head .hint { margin: 6px 0 0; max-width: 62ch; }
.traffic-pattern-bars { display: grid; gap: 8px; }
.traffic-pattern-row {
  display: grid;
  grid-template-columns: 28px 1fr 42px;
  gap: 10px;
  align-items: center;
}
.traffic-pattern-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.traffic-pattern-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(232, 220, 196, 0.08);
  overflow: hidden;
}
.traffic-pattern-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(110, 200, 192, 0.55);
}
.traffic-pattern-row.is-best .traffic-pattern-track i { background: var(--teal); }
.traffic-pattern-row.is-weekend .traffic-pattern-track i { background: rgba(226, 177, 90, 0.55); }
.traffic-pattern-row strong {
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.traffic-days { margin: 0 0 18px; }
.traffic-days-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
}
.traffic-day-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.traffic-day-drill-hint {
  margin: 0 0 10px;
  font-size: 12px;
}
.traffic-day-block {
  border-top: 1px solid var(--line);
}
.traffic-day-list > .traffic-day-head + .traffic-day-block { border-top: 0; }
.traffic-day-list.has-day-drill .traffic-day {
  grid-template-columns: minmax(7.5rem, 9.5rem) minmax(0, 1fr) 1.25rem;
}
.traffic-day {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9.5rem) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.traffic-day-block > .traffic-day { border-top: 0; }
.traffic-day:first-of-type,
.traffic-day-list > .traffic-day:first-child { border-top: 0; }
.traffic-day.is-expandable {
  cursor: pointer;
  border-radius: 6px;
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  outline: none;
}
.traffic-day.is-expandable:hover,
.traffic-day.is-expandable:focus-visible {
  background: rgba(232, 220, 196, 0.05);
}
.traffic-day.is-expandable.is-open {
  background: rgba(110, 200, 192, 0.06);
}
.traffic-day-chev {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  color: rgba(154, 164, 178, 0.75);
  font-size: 12px;
  line-height: 1;
  transition: transform 0.12s ease, color 0.12s ease;
}
.traffic-day-chev::before {
  content: "▸";
}
.traffic-day.is-open .traffic-day-chev {
  color: var(--teal, #6ec8c0);
  transform: rotate(90deg);
}
.traffic-day-panel {
  padding: 4px 6px 14px 6px;
}
.traffic-day-panel[hidden] { display: none !important; }
.traffic-day-queries {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.traffic-day-queries th,
.traffic-day-queries td {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.traffic-day-queries th {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(154, 164, 178, 0.85);
  border-top: 0;
}
.traffic-day-queries td.num,
.traffic-day-queries th.num { text-align: right; font-variant-numeric: tabular-nums; }
.traffic-day-queries .q { font-weight: 550; word-break: break-word; }
.traffic-day-empty,
.traffic-day-loading,
.traffic-day-error {
  margin: 4px 0 0;
  font-size: 12px;
}
.traffic-day-error { color: var(--rose, #e07a7a); }
.traffic-day-head {
  padding: 0 0 8px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-elev, var(--bg));
}
.traffic-day-head .traffic-day-date-col,
.traffic-day-head .tdm {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(154, 164, 178, 0.85);
  cursor: help;
}
.traffic-day-date-col {
  min-width: 0;
}
.traffic-day-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.traffic-day-date .muted-dow {
  margin-left: 6px;
  font-weight: 500;
  font-size: 11px;
  text-transform: lowercase;
}
.traffic-day-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 220, 196, 0.08);
  overflow: hidden;
  margin-top: 5px;
  max-width: 7.5rem;
}
.traffic-day-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(110, 200, 192, 0.55);
}
.traffic-day.is-best .traffic-day-bar i { background: var(--teal); }
.traffic-day.is-weekend .traffic-day-bar i { background: rgba(226, 177, 90, 0.45); }
.traffic-day-metrics {
  display: grid;
  grid-template-columns: repeat(var(--traffic-day-cols, 4), minmax(4.5rem, 1fr));
  gap: 6px 10px;
  align-items: end;
  min-width: 0;
}
.tdm {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  cursor: help;
}
.tdm strong {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tdm-clicks strong { font-size: 15px; }
.tdm em {
  font-style: normal;
  font-size: 10px;
  font-weight: 550;
  color: rgba(154, 164, 178, 0.9);
  letter-spacing: 0.02em;
}
.traffic-day-head .tdm {
  flex-direction: row;
  align-items: flex-end;
}
.traffic-day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  align-items: baseline;
}
.traffic-day-clicks strong { font-size: 15px; letter-spacing: -0.02em; }
.traffic-day-pos.pos-good { color: var(--good); }
.traffic-day-pos.pos-weak { color: var(--rose); }
.traffic-raw {
  margin: 8px 0 24px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.traffic-raw summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.traffic-raw[open] summary { margin-bottom: 10px; color: var(--text); }
.muted-dow { margin-left: 6px; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .kpi-cards.traffic-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .traffic-day {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .traffic-day-list.has-day-drill .traffic-day {
    grid-template-columns: minmax(0, 1fr) 1.25rem;
  }
  .traffic-day-list.has-day-drill .traffic-day .traffic-day-date-col {
    grid-column: 1;
    grid-row: 1;
  }
  .traffic-day-list.has-day-drill .traffic-day .traffic-day-chev {
    grid-column: 2;
    grid-row: 1;
  }
  .traffic-day-list.has-day-drill .traffic-day .traffic-day-metrics {
    grid-column: 1 / -1;
  }
  .traffic-day-metrics {
    grid-template-columns: repeat(var(--traffic-day-cols, 4), minmax(0, 1fr));
    gap: 8px 6px;
  }
  .tdm strong { font-size: 13px; }
  .tdm-clicks strong { font-size: 14px; }
  .traffic-day-bar { max-width: 100%; }
}
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 8px 4px 4px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dash-table-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 10px; flex-wrap: wrap; }
.dash-table-bar input[type=search] {
  width: min(280px, 100%); margin: 0; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); padding: 8px 12px;
}
.dash-table { overflow-x: auto; }
.dash-table table { font-size: 13px; }
.dash-table th { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.dash-table td { vertical-align: middle; }
.site-cell { display: flex; align-items: center; gap: 10px; color: inherit; }
.site-cell strong { display: block; font-size: 13px; }
.site-cell em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.site-av {
  position: relative;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 28px;
  overflow: hidden; background: rgba(255,255,255,0.08);
}
.site-av-sm { width: 16px; height: 16px; flex-basis: 16px; border-radius: 4px; font-size: 9px; }
.site-av-md { width: 20px; height: 20px; flex-basis: 20px; border-radius: 6px; font-size: 10px; }
.site-av-lg { width: 28px; height: 28px; flex-basis: 28px; }
.site-av-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #fff; border-radius: inherit;
}
.site-av-img.is-broken { display: none; }
.site-av-letter { position: relative; z-index: 0; line-height: 1; }
.site-av:has(.site-av-img:not(.is-broken)) .site-av-letter { display: none; }
.site-fav {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; flex: 0 0 16px;
  border-radius: 4px; overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(232,220,196,0.08);
}
.site-fav-sm { width: 16px; height: 16px; flex-basis: 16px; }
.site-fav-lg { width: 20px; height: 20px; flex-basis: 20px; border-radius: 5px; }
.site-fav img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.site-fav.is-fallback {
  background: var(--site-color, var(--muted));
  box-shadow: none;
}
.site-fav.is-fallback::after {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
}
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 400; }
.delta { margin-left: 6px; font-size: 12px; font-weight: 650; }
.delta.up { color: var(--good); }
.delta.down { color: var(--rose); }
.delta.flat { color: var(--muted); }
.audit-bar {
  display: inline-block; width: 72px; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.08);
  overflow: hidden; vertical-align: middle; margin-right: 8px;
}
.audit-bar span { display: block; height: 100%; background: var(--teal); }
.audit-score { font-size: 12px; color: var(--muted); }
.th-sort {
  background: none; border: 0; color: inherit; font: inherit; font-weight: 650;
  cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px;
}
.th-sort.is-active { color: var(--text); }
.th-sort[aria-sort="descending"]::after { content: "↓"; font-size: 11px; color: var(--amber); }
.th-sort[aria-sort="ascending"]::after { content: "↑"; font-size: 11px; color: var(--amber); }
.audit-row-issue td:last-child { color: var(--amber); }
.audit-tools { align-items: center; }
.audit-sort-field { margin: 0; min-width: 180px; font-size: 13px; }
.audit-sort-field select { margin-top: 0; font-size: 13px; font-weight: 400; padding: 6px 11px; }
.nowrap { white-space: nowrap; }
.engine-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.engine-tab {
  border: 1px solid var(--line);
  background: var(--bg);
  color: rgba(154, 164, 178, 0.92);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.engine-tab:hover {
  color: var(--text);
  border-color: rgba(232, 220, 196, 0.2);
  background: rgba(255, 255, 255, 0.03);
}
.engine-tab.active {
  background: rgba(226, 177, 90, 0.1);
  color: var(--amber);
  border-color: rgba(226, 177, 90, 0.45);
  font-weight: 500;
}
.tool-strip,
.rank-tools,
.kw-bulk-bar,
.audit-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
  letter-spacing: -0.01em;
  margin: 12px 0 10px;
}
.rank-tools .move-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}
.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  max-width: 100%;
}
.filter-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(154, 164, 178, 0.75);
  padding: 0 2px 0 4px;
  white-space: nowrap;
  user-select: none;
}
.filter-group .engine-tabs {
  margin: 0;
  gap: 4px;
}
.stat.move-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.stat.move-stat .sep {
  color: var(--muted);
  font-weight: 500;
  opacity: 0.7;
}
#rank-table .col-forecast {
  min-width: 88px;
  width: 96px;
  white-space: nowrap;
}
#rank-table .forecast-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: rgba(232, 220, 196, 0.92);
}
#rank-table .forecast-sub {
  font-size: 11px;
  line-height: 1.2;
  margin-top: 2px;
}
.kw-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
  letter-spacing: -0.01em;
  margin: 12px 0 10px;
}
.tool-strip .engine-tabs,
.rank-tools .engine-tabs,
.kw-bulk-bar .engine-tabs,
.audit-tools .engine-tabs { margin: 0; }
.tool-strip input[type=search],
.kw-bulk-bar input[type=search],
.audit-tools input[type=search] {
  width: min(240px, 100%);
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  padding: 6px 11px;
  border-radius: 8px;
  line-height: 1.35;
}
.rank-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.rank-search-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(154, 164, 178, 0.75);
  white-space: nowrap;
}
.rank-search-bar #rank-search {
  flex: 1 1 220px;
  min-width: 0;
  width: auto;
  max-width: 420px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.35;
}
.rank-search-bar #rank-shown {
  font-size: 12px;
  font-weight: 400;
  color: rgba(154, 164, 178, 0.85);
  white-space: nowrap;
}
.tool-strip .muted,
.kw-bulk-bar .muted,
.audit-tools .muted {
  font-size: 12px;
  font-weight: 400;
  color: rgba(154, 164, 178, 0.85);
}
.kw-bulk-bar .check,
.audit-tools .check { font-size: 13px; font-weight: 500; }
.rank-head { margin: 8px 0 0; }
.rank-head h2 { margin: 0; }
#rank-table[data-filter="google"] .col-ai-chatgpt,
#rank-table[data-filter="google"] .col-ai-gemini { display: none; }
#rank-table[data-filter="chatgpt"] .col-serp,
#rank-table[data-filter="chatgpt"] .col-ai-google,
#rank-table[data-filter="chatgpt"] .col-ai-gemini { display: none; }
#rank-table[data-filter="gemini"] .col-serp,
#rank-table[data-filter="gemini"] .col-ai-google,
#rank-table[data-filter="gemini"] .col-ai-chatgpt { display: none; }
#rank-table[data-filter="all"] .col-ai { display: table-cell; }

/* Rank board: sticky header + pin cols; scroll inside the board */
.rank-board {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  overflow: hidden;
}
.rank-board > .table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  max-height: calc(100vh - 168px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#rank-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
}
#rank-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(154, 164, 178, 0.92);
  padding: 13px 14px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg-elev);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: 0 1px 0 var(--line);
}
#rank-table thead th .th-sort {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  gap: 5px;
}
#rank-table thead th .th-sort.is-active {
  color: var(--text);
}
#rank-table thead th .th-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(154, 164, 178, 0.72);
}
#rank-table .col-rank-latest {
  background: rgba(226, 177, 90, 0.04);
}
#rank-table thead th.col-rank-latest {
  color: rgba(232, 220, 196, 0.92);
  box-shadow: inset 0 -1px 0 rgba(226, 177, 90, 0.28);
}
#rank-table .col-pin-phrase,
#rank-table .col-pin-vol,
#rank-table .col-pin-meta,
#rank-table .col-pin-url,
#rank-table .col-ai {
  background: var(--bg-elev);
}
#rank-table thead .col-pin-phrase,
#rank-table thead .col-pin-vol,
#rank-table thead .col-pin-meta,
#rank-table thead .col-pin-url,
#rank-table thead .col-ai {
  z-index: 8;
  background-color: var(--bg-elev);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}
#rank-table .col-pin-phrase,
#rank-table .col-pin-vol,
#rank-table .col-pin-meta,
#rank-table .col-pin-url {
  position: sticky;
  z-index: 2;
}
#rank-table thead .col-pin-phrase,
#rank-table thead .col-pin-vol,
#rank-table thead .col-pin-meta,
#rank-table thead .col-pin-url {
  z-index: 6;
}
#rank-table .col-pin-phrase {
  left: 0;
  min-width: 160px;
  max-width: 280px;
  width: 220px;
}
#rank-table .col-pin-vol {
  left: 220px;
  min-width: 72px;
  width: 84px;
}
#rank-table .col-pin-meta {
  left: 304px;
  min-width: 88px;
  width: 102px;
  box-shadow: 10px 0 14px -10px rgba(0, 0, 0, 0.55);
}
#rank-table .col-pin-url {
  right: 0;
  min-width: 140px;
  max-width: 280px;
  width: 180px;
  box-shadow: -10px 0 14px -10px rgba(0, 0, 0, 0.55);
}
#rank-table[data-filter="google"] .col-ai-google {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 108px;
  width: 108px;
  box-shadow: -10px 0 14px -10px rgba(0, 0, 0, 0.55);
}
#rank-table[data-filter="google"] thead .col-ai-google { z-index: 6; }
#rank-table[data-filter="google"] .col-pin-url {
  right: 108px;
  box-shadow: none;
}
#rank-table[data-filter="all"] .col-ai-gemini,
#rank-table[data-filter="all"] .col-ai-chatgpt,
#rank-table[data-filter="all"] .col-ai-google {
  position: sticky;
  z-index: 2;
  min-width: 100px;
  width: 100px;
}
#rank-table[data-filter="all"] thead .col-ai-gemini,
#rank-table[data-filter="all"] thead .col-ai-chatgpt,
#rank-table[data-filter="all"] thead .col-ai-google { z-index: 6; }
#rank-table[data-filter="all"] .col-ai-gemini { right: 0; box-shadow: -10px 0 14px -10px rgba(0, 0, 0, 0.55); }
#rank-table[data-filter="all"] .col-ai-chatgpt { right: 100px; }
#rank-table[data-filter="all"] .col-ai-google { right: 200px; }
#rank-table[data-filter="all"] .col-pin-url { right: 300px; box-shadow: none; }
#rank-table .col-rank-date { min-width: 96px; }
#rank-table thead th {
  position: sticky;
  overflow: visible;
}
.col-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 8;
  touch-action: none;
}
.col-resize-handle::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 3px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background 0.12s ease;
}
#rank-table thead th:hover .col-resize-handle::after,
.col-resize-handle:hover::after,
body.is-col-resizing .col-resize-handle.is-active::after {
  background: rgba(226, 177, 90, 0.55);
}
body.is-col-resizing,
body.is-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
@media (max-width: 900px) {
  #rank-table .col-pin-phrase,
  #rank-table .col-pin-vol,
  #rank-table .col-pin-meta,
  #rank-table .col-pin-url,
  #rank-table[data-filter="google"] .col-ai-google,
  #rank-table[data-filter="all"] .col-ai-gemini,
  #rank-table[data-filter="all"] .col-ai-chatgpt,
  #rank-table[data-filter="all"] .col-ai-google {
    position: static;
    left: auto;
    right: auto;
    box-shadow: none;
    max-width: none;
    width: auto;
  }
  .col-resize-handle { display: none; }
}
.ai-pill {
  display: inline-block; font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted);
  cursor: help;
}
.ai-pill-empty { cursor: help; }
.ai-pill.good { color: var(--good); border-color: rgba(143, 191, 122, 0.4); }
.ai-pill.ok { color: var(--teal); border-color: rgba(110, 200, 192, 0.4); }
.ai-pill.miss { color: var(--muted); }
.col-rank-pos {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  max-width: 128px;
  vertical-align: middle;
}
#rank-table thead th.col-rank-date {
  min-width: 96px;
  max-width: 128px;
}
#rank-table thead th.col-rank-date .th-sort {
  display: block;
  max-width: calc(100% - 4px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#rank-table td.col-rank-pos {
  min-width: 80px;
  max-width: 128px;
  overflow: hidden;
}
#rank-table .col-rank-pos .pos-wrap,
#rank-table .col-rank-pos .pos-miss {
  display: inline-flex;
  max-width: 100%;
  vertical-align: middle;
}
.pos-wrap {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  line-height: 1;
}
.pos-combo {
  cursor: help;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.pos-combo .pos-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  line-height: 1.2;
  font-size: 13px;
}
.pos-visible {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  cursor: help;
  padding-left: 6px;
  border-left: 1px solid rgba(232, 220, 196, 0.16);
}
.pos-vis-ico {
  display: block;
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  opacity: 0.72;
}
.pos-vis-n {
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rank-src { font-size: 11px; }
.vol-comp { font-size: 11px; margin-top: 2px; cursor: help; }
.badge-ran-today { color: var(--good); border-color: rgba(143, 191, 122, 0.45); }
.serp-features { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.serp-tag {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
  cursor: help;
}
.serp-tag:hover,
.serp-tag:focus {
  color: var(--text);
  border-color: rgba(232, 220, 196, 0.35);
  outline: none;
}
.serp-float-tip {
  position: fixed;
  z-index: 120;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  background: #1a2230;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  white-space: pre-line;
  text-align: left;
}
.kw-ctx-wrap { margin-top: 6px; }
.kw-ctx-label {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: rgba(110, 200, 192, 0.88);
  border: 1px solid rgba(110, 200, 192, 0.32);
  border-radius: 999px;
  background: rgba(110, 200, 192, 0.06);
  white-space: nowrap;
}
.extra-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.extra-hint { margin: 0 0 14px; }
.extra-modal-card { width: min(720px, 100%); max-height: 85vh; overflow: auto; }
.extra-kv { list-style: none; padding: 0; margin: 12px 0 0; }
.extra-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.extra-kv span { color: var(--muted); }
.extra-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.page-check-wrap { margin-top: 0; }
.ranking-url-cell { min-width: 0; }
.ranking-url-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0;
}
.ranking-url-line .link {
  flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-ranking-url { max-width: 320px; white-space: normal; }
.page-check-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 4px 10px;
}
.page-check-btn .btn-ico { flex-shrink: 0; opacity: 0.92; }
.ai-legend { margin: 0 0 16px; padding: 16px 18px; }
.ai-legend-head strong { display: block; font-size: 15px; margin-bottom: 4px; }
.ai-legend-head .hint { margin: 0; font-size: 13px; line-height: 1.45; }
.ai-legend-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-top: 14px;
}
.ai-legend-item {
  padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.ai-legend-item p { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.ai-legend-ex {
  margin: 6px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: var(--text) !important;
  opacity: 0.78;
}
.ai-legend-more { margin-top: 12px; font-size: 13px; }
.ai-legend-more summary { cursor: pointer; color: var(--amber); font-weight: 600; list-style: none; }
.ai-legend-more summary::-webkit-details-marker { display: none; }
.ai-legend-tips { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ai-legend-tips li { margin: 6px 0; }
.ai-legend-foot { margin: 12px 0 0; font-size: 12px; }
.table-wrap.ai-table-wrap { overflow: visible; }
.ai-excerpt-cell {
  position: relative;
  display: block;
  max-width: 100%;
  cursor: help;
}
.ai-excerpt-tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 280px;
  max-width: min(420px, 90vw);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 30;
  text-align: left;
  white-space: normal;
}
.ai-tip-meta { color: var(--muted); font-size: 11px; }
.ai-tip-text { display: block; margin-top: 4px; color: var(--muted); }
.ai-excerpt-cell:hover .ai-excerpt-tip,
.ai-excerpt-cell:focus .ai-excerpt-tip,
.ai-excerpt-cell:focus-within .ai-excerpt-tip { opacity: 1; }
@media (max-width: 860px) {
  .ai-legend-grid { grid-template-columns: 1fr; }
}
.btn-tip-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.btn-tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content; max-width: 260px;
  padding: 8px 10px; font-size: 11px; line-height: 1.45;
  color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
  z-index: 12; text-align: left;
}
.btn-tip-wrap:hover .btn-tip,
.btn-tip-wrap:focus-within .btn-tip { opacity: 1; }
.rank-source-hint { margin: 0 0 10px; font-size: 12px; }
.rank-progress-banner {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid rgba(226, 177, 90, 0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(226, 177, 90, 0.1), rgba(255, 255, 255, 0.02));
}
.rank-progress-banner.hidden { display: none; }
.rank-progress-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  font-size: 13px; line-height: 1.45;
}
.rank-progress-text { color: var(--muted); flex: 1 1 200px; }
.rank-progress-banner.is-done {
  border-color: rgba(143, 191, 122, 0.45);
  background: linear-gradient(135deg, rgba(143, 191, 122, 0.1), rgba(255, 255, 255, 0.02));
}
.rank-progress-banner.is-error {
  border-color: rgba(232, 125, 125, 0.55);
  background: linear-gradient(135deg, rgba(232, 125, 125, 0.14), rgba(255, 255, 255, 0.02));
}
.rank-progress-banner.is-error strong { color: #f0a0a0; }
.rank-progress-banner em { font-style: normal; color: var(--amber); font-weight: 650; }
.rank-col-loading { position: relative; }
.rank-col-loading::after {
  content: "";
  position: absolute; inset: 8px 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  animation: rank-shimmer 1.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rank-shimmer {
  0% { opacity: 0.35; }
  50% { opacity: 0.85; }
  100% { opacity: 0.35; }
}
.rank-pos-loader { font-size: 12px; letter-spacing: 0.2em; }
.col-rank-meta { font-size: 12px; }
#rank-table td.col-rank-meta,
#rank-table td.col-pin-meta {
  white-space: normal;
  min-width: 7.75rem;
  max-width: 10.5rem;
  vertical-align: middle;
}
.rank-checked-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.25;
}
.rank-checked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.25;
}
.rank-checked-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rank-checked-attempt {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pos-cell { font-weight: 500; }
.pos-cell.pos-top10 {
  background: rgba(143, 191, 122, 0.18);
  color: var(--good);
  border-radius: 6px;
  padding: 2px 7px;
  min-height: 18px;
  box-sizing: border-box;
}
.rank-recheck-one {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
  max-width: 100%;
}
.rank-recheck-one:hover { border-color: var(--amber, #e2b15a); color: var(--amber, #e2b15a); }
.rank-invalid-pill,
#rank-table .rank-invalid-pill,
.overview-kw-table .rank-invalid-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #dcc07a;
  background: rgba(196, 163, 90, 0.12);
  border: 1px solid rgba(196, 163, 90, 0.42);
  cursor: help;
  white-space: nowrap;
}
#rank-table td.col-rank-pos .rank-invalid-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-delta {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin: 0;
  padding: 0;
  height: 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  background: transparent;
  border-radius: 0;
  cursor: help;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pos-delta-ico {
  display: block;
  flex-shrink: 0;
}
.pos-delta-n,
.pos-delta-paren {
  line-height: 1;
}
.pos-delta-up { color: var(--good); background: transparent; }
.pos-delta-down { color: var(--rose); background: transparent; }
.wallet-panel h3.wallet-sub { margin: 20px 0 10px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wallet-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.wallet-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg); }
.wallet-card .stat { font-size: 22px; }
.wallet-muted { color: var(--text); font-weight: 400; }
.wallet-table { font-size: 13px; }
.wallet-table th { font-size: 11px; }
.wallet-total td { font-weight: 600; border-top: 1px solid var(--line); }
.wallet-est { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.wallet-est li { margin: 6px 0; }
.wallet-panel { max-width: 960px; }
.wallet-card-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
.wallet-row-hint { font-size: 11px; margin-top: 2px; max-width: 320px; }
.wallet-fold { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.wallet-fold > summary { cursor: pointer; padding: 12px 14px; font-size: 13px; font-weight: 600; list-style: none; }
.wallet-fold > summary::-webkit-details-marker { display: none; }
.wallet-fold > summary::after { content: "▸"; float: right; color: var(--muted); }
.wallet-fold[open] > summary::after { content: "▾"; }
.wallet-glossary-fold > ul { margin: 0; padding: 0 14px 14px 32px; font-size: 13px; color: var(--muted); }
.wallet-glossary-fold li { margin: 6px 0; }
.wallet-tx-fold > summary.wallet-sub { margin: 0; padding: 14px 16px; text-transform: none; letter-spacing: normal; font-size: 13px; }
.wallet-days { padding: 0 0 8px; display: grid; gap: 8px; }
.wallet-day-fold { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.02); }
.wallet-day-fold > summary {
  cursor: pointer; padding: 12px 14px; font-size: 13px; list-style: none; font-weight: 600;
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px 14px; align-items: center;
}
.wallet-day-fold > summary::-webkit-details-marker { display: none; }
.wallet-day-fold > summary::after { content: "▸"; color: var(--muted); }
.wallet-day-fold[open] > summary::after { content: "▾"; }
.wallet-day-fold[open] { border-color: rgba(232, 168, 56, 0.35); }
.wallet-day-sum { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }
.wallet-day-body { padding: 0 12px 12px; display: grid; gap: 12px; }
.wallet-day-summary { display: grid; gap: 10px; }
.wallet-day-site {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
}
.wallet-day-site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.wallet-day-site-head strong {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.wallet-day-site-sum {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--amber);
}
.wallet-day-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wallet-kind-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12px;
  line-height: 1.3;
}
.wallet-kind-chip em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
}
.wallet-kind-chip strong {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--text);
}
.wallet-day-rows-fold {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}
.wallet-day-rows-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(154, 164, 178, 0.95);
}
.wallet-day-rows-fold > summary::-webkit-details-marker { display: none; }
.wallet-day-rows-fold > summary::after {
  content: "▸";
  float: right;
  color: var(--muted);
}
.wallet-day-rows-fold[open] > summary::after { content: "▾"; }
.wallet-day-rows-fold .table-wrap {
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
}
.wallet-tx-table td { font-size: 12px; }
.engine-list { list-style: none; padding: 0; margin: 16px 0 0; }
.engine-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: var(--bg); }
.engine-list button { background: none; border: 0; color: var(--rose); cursor: pointer; }
#aio-row { margin: 8px 0 0; }
@media (max-width: 980px) {
  .app.app-site { --topbar-h: 52px; }
  .top-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .app-body { grid-template-columns: 1fr; min-width: 0; }
  .side-backdrop.open {
    display: block;
    position: fixed;
    inset: var(--topbar-h, 52px) 0 0 0;
    background: rgba(8, 10, 16, 0.55);
    z-index: 14;
  }
  .side {
    display: none;
    position: fixed;
    top: var(--topbar-h, 52px); left: 0; bottom: 0; width: min(300px, 88vw);
    height: auto;
    z-index: 15;
  }
  .side.open { display: flex; }
  .cards, .grid2 { grid-template-columns: 1fr; }
  .kpi-cards,
  .kpi-cards.dash-kpi,
  .kpi-cards.dash-kpi-6,
  .kpi-cards.kpi-cards-wide,
  .kpi-cards.traffic-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-dist { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .pos-dist-btn { flex: 0 0 auto; min-width: 88px; }
  .dash-head { align-items: flex-start; }
  .chart-toolbar { flex-direction: column; align-items: stretch; gap: 10px; width: 100%; }
  .chart-tabs, .engine-tabs, .range-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .main { padding: 18px 14px; min-width: 0; }
  .app-foot { padding: 12px 14px; }
  .site-head { flex-direction: column; align-items: stretch; }
  .site-toolbar { width: 100%; flex-wrap: wrap; }
  .site-toolbar .btn { flex: 1 1 auto; text-align: center; }
  .rank-tools,
  .kw-bulk-bar,
  .audit-tools,
  .page-intro,
  .dash-table-bar,
  .comp-serp-head,
  .traffic-ga-head { flex-direction: column; align-items: stretch; }
  .page-intro-actions { flex-wrap: wrap; width: 100%; }
  .page-intro-actions .btn,
  .rank-tools .btn { flex: 1 1 auto; }
  .rank-search-bar #rank-search,
  .kw-bulk-bar input[type=search],
  .dash-table-bar input[type=search],
  #audit-search { width: 100%; max-width: none; }
  .rank-search-bar #rank-search { flex: 1 1 100%; max-width: none; }
  .topbar-main {
    gap: 8px;
    padding: 0 12px;
    min-height: 52px;
  }
  .top-all { display: none; }
  .top-right { display: none; } /* Settings/Help/account live in the drawer on mobile */
  .side-lang { display: block; } /* language switcher only in drawer when topbar hides it */
  .top-brand { font-size: 15px; }
  .menu-toggle {
    width: 36px; height: 36px; padding: 0;
    align-items: center; justify-content: center;
    flex: 0 0 auto;
  }
  .project-switch {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    max-width: min(220px, 48vw);
  }
  .project-switch summary {
    max-width: 100%;
    width: 100%;
    justify-content: flex-start;
    padding: 6px 10px;
    font-size: 13px;
  }
  .project-switch summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .share-pop { display: none; }
  h1 { font-size: 22px; line-height: 1.2; }
  th, td { padding: 10px 12px; }
  .truncate { max-width: min(220px, 58vw); }
  .table-wrap,
  .dash-table {
    margin-inline: -14px;
    width: calc(100% + 28px);
    padding-inline: 14px;
  }
  .wizard { grid-template-columns: 1fr; }
  .wizard-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .wizard-main { padding: 18px 16px; }
  .wizard-steps { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0 0; }
  .wizard-steps li { flex: 0 0 auto; padding: 6px 0; font-size: 12px; }
  .comp-domain-cell { max-width: 46vw; }
  .sov-name { max-width: 42vw; }
  .field input, .field select, .field textarea, .login-field input { font-size: 16px; } /* iOS zoom guard */
}
@media (max-width: 640px) {
  .main { padding: 14px 10px; }
  .cards { gap: 10px; margin: 16px 0; }
  .kpi-cards,
  .kpi-cards.dash-kpi,
  .kpi-cards.dash-kpi-6,
  .kpi-cards.kpi-cards-wide,
  .kpi-cards.traffic-kpi { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .site-toolbar { gap: 6px; }
  .site-toolbar .btn { font-size: 12px; padding: 6px 10px; }
  .rank-progress-inner { flex-direction: column; align-items: flex-start; }
  .top-brand { font-size: 14px; }
  .project-switch { max-width: min(160px, 42vw); }
  .project-switch summary { max-width: 100%; padding: 6px 8px; font-size: 12px; }
  .table-wrap,
  .dash-table {
    margin-inline: -10px;
    width: calc(100% + 20px);
    padding-inline: 10px;
  }
  .stat { font-size: 26px; }
  .actions { flex-wrap: wrap; }
  .btn { white-space: normal; }
}

body.gsc-popup { min-height: 100vh; }
body.gsc-popup .login-card { width: min(480px, calc(100% - 32px)); }
.gsc-popup .check { display: flex; align-items: flex-start; gap: 8px; }
.wizard {
  display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 180px);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--bg-elev); margin-top: 18px;
}
.wizard-side { background: #121826; padding: 28px 20px; border-right: 1px solid var(--line); }
.wizard-steps { list-style: none; padding: 0; margin: 22px 0 0; }
.wizard-steps li {
  display: flex; gap: 12px; align-items: flex-start; color: var(--muted);
  padding: 10px 0; font-size: 14px; cursor: pointer;
}
.wizard-steps li .n {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 12px; flex: 0 0 24px; margin-top: 1px;
}
.wizard-steps li.on { color: var(--text); font-weight: 650; }
.wizard-steps li.on .n, .wizard-steps li.done .n {
  background: var(--amber); color: #1b1408; border-color: var(--amber);
}
.wizard-steps li.done .n { font-size: 0; }
.wizard-steps li.done .n::after { content: "✓"; font-size: 12px; }
.wizard-main { padding: 28px 32px 18px; display: flex; flex-direction: column; min-width: 0; }
.wizard-pane { display: none; flex: 1; }
.wizard-pane.on { display: block; }
.wizard-main h2 { margin: 0 0 8px; font-size: 26px; }
.wizard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
}
.gsc-services { display: grid; gap: 12px; max-width: 560px; margin-top: 18px; }
.gsc-service {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; cursor: pointer; color: inherit; width: 100%;
}
.gsc-service strong { font-size: 16px; }
.gsc-service span { color: var(--muted); font-size: 13px; }
.gsc-service:hover:not(:disabled):not(.is-soon):not(.ok) { border-color: var(--amber); }
.gsc-service.is-soon, .gsc-service:disabled { opacity: 0.55; cursor: default; }
.gsc-service.ok {
  border-color: rgba(110, 200, 192, 0.45);
  background: rgba(110, 200, 192, 0.08);
  cursor: default;
  pointer-events: none;
}
.gsc-service.ok strong::before { content: "✓ "; color: var(--teal); }
.gsc-account-row { display: flex; gap: 8px; align-items: center; }
.gsc-account-row select { flex: 1; }
.gsc-modal-card { width: min(480px, 100%); }
.gsc-modal-card .field { margin: 14px 0 0; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 650; }
.kw-bulk-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 12px 0 8px;
}
.kw-bulk-bar .check { margin: 0; }
.kw-bulk-bar input[type=search] {
  width: min(240px, 100%); margin: 0;
}
#kw-table th:first-child, #kw-table td:first-child { width: 32px; }
.kw-export {
  position: relative;
  margin-left: auto;
}
.kw-export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 22, 28, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kw-export-menu.hidden { display: none; }
.kw-export-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.kw-export-menu button:hover,
.kw-export-menu button:focus-visible {
  background: rgba(110, 200, 192, 0.12);
  color: var(--teal);
  outline: none;
}
.kw-export-hint {
  margin: 4px 4px 2px;
  padding: 6px 6px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  line-height: 1.35;
  color: rgba(154, 164, 178, 0.9);
}
.schedule-card { max-width: 820px; margin-bottom: 18px; }
.schedule-head {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px;
}
.schedule-name {
  flex: 1 1 180px; min-width: 160px; font-weight: 650; font-size: 15px;
}
.schedule-hint { flex: 1 1 220px; font-size: 12px; }
.schedule-days, .schedule-tasks {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 14px;
}
.schedule-days .check, .schedule-tasks .check { margin: 0; }
.schedule-time { max-width: 320px; margin-bottom: 12px; }
.schedule-sites {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.schedule-sites legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.schedule-sites .hint { margin: 0 0 10px; }
.schedule-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 12px;
}
.schedule-site-check {
  align-items: flex-start;
  margin: 0;
  gap: 8px;
}
.schedule-site-check span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
}
.schedule-site-check em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.account-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  max-width: 1100px;
  margin-top: 8px;
}
.account-settings .account-card {
  margin: 0;
  min-width: 0;
  height: 100%;
}
.account-settings .account-card-wide {
  grid-column: 1 / -1;
  max-width: none;
}
.account-settings .account-card .hint {
  font-size: 13px;
  line-height: 1.45;
}
.account-settings .row-actions { margin-top: 8px; }
@media (max-width: 980px) {
  .account-settings { grid-template-columns: 1fr; }
  .account-settings .account-card-wide { grid-column: auto; }
}

@media (max-width: 980px) {
  .wizard { grid-template-columns: 1fr; }
  .wizard-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .wizard-steps { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
  .wizard-main { padding: 20px; }
}
@media (max-width: 640px) {
  .page-intro-actions { width: 100%; }
  .traffic-period-dates { width: 100%; }
  .traffic-period-dates .field { flex: 1 1 140px; }
  .kw-add-row { grid-template-columns: 1fr; }
  .kw-add-row .btn { justify-self: start; }
  .kw-import-row { grid-template-columns: 1fr; }
  .kw-import-row .btn { justify-self: start; }
}

.help-page { max-width: 1180px; }
.help-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px 28px;
  margin: 0 0 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(226, 177, 90, 0.1) 0%, rgba(17, 22, 32, 0.4) 42%, rgba(110, 200, 192, 0.07) 100%),
    var(--bg-elev);
}
.help-hero-copy { flex: 1 1 280px; max-width: 640px; }
.help-hero h1 { margin: 0; font-size: 32px; letter-spacing: -0.03em; }
.help-hero .lede { margin: 8px 0 0; max-width: 54ch; }
.help-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.help-search input[type=search] {
  flex: 1 1 220px; min-width: 200px; margin: 0;
  background: rgba(8, 12, 20, 0.55);
}
.help-search-hero { flex: 1 1 280px; max-width: 420px; margin: 0; }
.help-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.help-rail {
  position: sticky; top: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  max-height: calc(100vh - 88px);
  overflow: auto;
}
.help-rail-home {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 12px 14px;
  margin-bottom: 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
}
.help-rail-home em { font-style: normal; font-size: 12px; color: var(--muted); }
.help-rail-home:hover, .help-rail-home.is-active {
  background: rgba(226, 177, 90, 0.08);
  border-color: rgba(226, 177, 90, 0.22);
}
.help-rail-topic { margin: 4px 0; border-top: 1px solid var(--line); padding-top: 4px; }
.help-rail-topic > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 10px;
  border-radius: 10px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.help-rail-topic > summary::-webkit-details-marker { display: none; }
.help-rail-topic > summary:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.help-rail-topic > summary b {
  font-weight: 650; font-size: 10px; letter-spacing: 0;
  color: var(--amber);
  background: rgba(226, 177, 90, 0.12);
  border-radius: 999px; padding: 1px 7px;
}
.help-rail-links { display: grid; gap: 2px; padding: 0 4px 8px; }
.help-rail-link {
  display: block; padding: 8px 10px 8px 12px;
  border-radius: 10px; border-left: 2px solid transparent;
  color: var(--muted); font-size: 13px; line-height: 1.35;
}
.help-rail-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.help-rail-link.is-active {
  color: var(--text);
  background: rgba(226, 177, 90, 0.1);
  border-left-color: var(--amber);
  font-weight: 600;
}
.help-section-head { margin: 0 0 12px; }
.help-section-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.help-section-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.help-featured, .help-topic-block { margin: 0 0 28px; }
.help-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.help-card {
  display: grid; gap: 8px; align-content: start;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  min-height: 128px;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.help-card:hover {
  border-color: rgba(226, 177, 90, 0.35);
  transform: translateY(-1px);
}
.help-card-topic {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); font-weight: 650;
}
.help-card strong { font-size: 16px; letter-spacing: -0.02em; line-height: 1.3; }
.help-card-sum { font-size: 13px; color: var(--muted); line-height: 1.45; }
.help-card-go { font-size: 12px; color: var(--amber); font-weight: 600; margin-top: 4px; }
.help-paper {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-elev);
  padding: 22px 26px 20px;
}
.help-crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); margin-bottom: 14px;
}
.help-crumb a { color: var(--amber); font-weight: 600; }
.help-article-head { margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.help-article-head h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.help-article-head .lede { margin: 8px 0 0; max-width: 62ch; }
.help-body { max-width: 72ch; }
.help-p { color: rgba(243, 238, 228, 0.78); line-height: 1.65; margin: 0 0 14px; font-size: 15px; }
.help-h { margin: 28px 0 12px; font-size: 18px; letter-spacing: -0.02em; }
.help-list { margin: 0 0 16px; padding-left: 18px; color: rgba(243, 238, 228, 0.78); line-height: 1.6; }
.help-list.is-numbered { padding-left: 22px; }
.help-list li { margin: 8px 0; }
.help-steps {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: grid; gap: 10px;
}
.help-steps li {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  padding: 14px 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}
.help-step-n {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(226, 177, 90, 0.16);
  color: var(--amber);
  font-weight: 700; font-size: 14px;
}
.help-steps strong { display: block; font-size: 15px; margin-bottom: 4px; }
.help-steps p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.help-callout {
  margin: 0 0 16px; padding: 12px 14px 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.help-callout-k {
  display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 650; margin-bottom: 4px;
}
.help-callout p { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(243, 238, 228, 0.86); }
.help-callout.is-note { border-color: rgba(226, 177, 90, 0.28); background: rgba(226, 177, 90, 0.07); }
.help-callout.is-note .help-callout-k { color: var(--amber); }
.help-callout.is-tip { border-color: rgba(110, 200, 192, 0.28); background: rgba(110, 200, 192, 0.07); }
.help-callout.is-tip .help-callout-k { color: var(--teal); }
.help-callout.is-warn { border-color: rgba(217, 120, 120, 0.35); background: rgba(217, 120, 120, 0.08); }
.help-callout.is-warn .help-callout-k { color: var(--rose); }
.help-dl { margin: 0 0 18px; display: grid; gap: 8px; }
.help-dl-row {
  display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px;
  padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
}
.help-dl-row dt { font-weight: 650; font-size: 13px; }
.help-dl-row dd { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.help-faq-list { display: grid; gap: 8px; margin: 0 0 8px; }
.help-faq {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.35);
}
.help-faq summary {
  cursor: pointer; list-style: none; padding: 13px 16px;
  font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq-plus {
  flex: 0 0 24px; width: 24px; height: 24px;
  border: 1px solid var(--line); border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
}
.help-faq-plus::before { content: "+"; font-size: 16px; line-height: 1; }
.help-faq[open] .help-faq-plus::before { content: "−"; }
.help-faq[open] summary { border-bottom: 1px solid var(--line); }
.help-faq p { margin: 0; padding: 12px 16px 14px; color: var(--muted); line-height: 1.55; }
.help-more { margin-top: 28px; padding-top: 8px; }
.help-pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
}
.help-pager-link {
  display: grid; gap: 4px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.02);
}
.help-pager-link span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.help-pager-link strong { font-size: 14px; line-height: 1.35; }
.help-pager-link.is-next { text-align: right; }
.help-pager-link:hover { border-color: rgba(226, 177, 90, 0.35); }
.help-result-meta { margin: 0 0 16px; color: var(--muted); }
@media (max-width: 980px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-rail { position: static; max-height: none; }
  .help-card-grid, .help-pager { grid-template-columns: 1fr; }
  .help-dl-row { grid-template-columns: 1fr; gap: 4px; }
  .help-pager-link.is-next { text-align: left; }
}

.help-public-top {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 28, 0.92);
  backdrop-filter: blur(14px);
}
.help-public-top-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; padding: 0 28px;
}
.help-public-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
.help-public-nav a {
  font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.help-public-nav a:hover, .help-public-nav a.is-on { color: var(--text); }
.help-public-nav a.is-on { color: var(--amber); }
.help-public-main { flex: 1; }
.help-public-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 24px; margin: 28px 0 8px; padding: 18px 20px;
  border: 1px solid rgba(226, 177, 90, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(226, 177, 90, 0.1), rgba(110, 200, 192, 0.06));
}
.help-public-cta p { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 62ch; line-height: 1.5; }
.help-public-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.help-public-foot {
  border-top: 1px solid var(--line); padding: 16px 28px 28px;
  color: var(--muted); font-size: 13px; background: var(--bg-elev);
}
.help-public-foot-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
}
.help-public-foot a { color: var(--amber); font-weight: 600; }
@media (max-width: 700px) {
  .help-public-top-inner { padding: 10px 16px; }
  .help-public-nav { gap: 6px 12px; }
}

/* Trends module */
.trends-hero { margin: 0 0 16px; padding: 18px 20px; }
.trends-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 18px 24px;
  align-items: start;
}
.trends-hero h2 { margin: 0 0 8px; font-size: 18px; }
.trends-hero p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 68ch; }
.trends-hero-points { margin: 0; padding-left: 18px; color: var(--text); font-size: 14px; line-height: 1.55; }
.trends-hero-points li { margin: 6px 0; }
.trends-cost-card {
  border: 1px solid rgba(226,177,90,0.35);
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(160deg, rgba(226,177,90,0.12), rgba(255,255,255,0.02));
}
.trends-cost-card .kicker { margin: 0 0 4px; color: var(--amber); }
.trends-cost-card strong { display: block; font-size: 16px; margin-bottom: 8px; }
.trends-cost-card p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.trends-cost-card p:last-child { margin-bottom: 0; }
.trends-diff { margin: 0 0 16px; padding: 16px 18px; }
.trends-diff h2 { margin: 0 0 10px; font-size: 16px; }
.trends-diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.trends-diff-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg);
}
.trends-diff-grid h3 { margin: 0 0 6px; font-size: 14px; }
.trends-diff-grid p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.trends-run { margin: 0 0 16px; padding: 16px 18px; }
.trends-run h2 { margin: 0 0 6px; font-size: 16px; }
.trends-composer { display: grid; gap: 14px; margin-top: 12px; }
.trends-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.trends-search-field { flex: 1 1 280px; margin: 0; }
.trends-selected-row .kicker { margin: 0 0 8px; }
.trends-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}
.trends-selected-empty { margin: 6px 0 0; }
.trends-sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgba(110,200,192,0.45);
  background: rgba(110,200,192,0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.trends-sel-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28rem;
}
.trends-sel-chip em {
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}
.trends-sel-chip:hover { border-color: var(--teal); }
.trends-catalog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
}
.trends-catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.trends-catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}
.trends-catalog-list li { border-bottom: 1px solid rgba(255,255,255,0.04); }
.trends-catalog-list li:last-child { border-bottom: 0; }
.trends-catalog-add {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 9px 12px;
  cursor: pointer;
}
.trends-catalog-add:hover { background: rgba(110,200,192,0.08); color: var(--teal); }
.trends-catalog-add:disabled { opacity: 0.4; cursor: default; }
.trends-catalog-none { margin: 0; padding: 12px; font-size: 13px; }
.trends-run-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.trends-run-controls .field { min-width: 200px; margin: 0; }
.trends-result { margin: 0 0 16px; padding: 16px 18px; }
.trends-result-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.trends-result-head h2 { margin: 0 0 4px; font-size: 18px; }
.trends-result-phrases { display: flex; flex-wrap: wrap; gap: 6px; align-items: start; }
.trends-insights {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}
.trends-insights p {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--teal);
  background: rgba(110,200,192,0.08);
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  line-height: 1.45;
}
.trends-chart-wrap {
  height: 260px;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,0.15);
}
.trends-chart-note { margin: 0 0 16px; }
.trends-queries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.trends-queries-grid h3 { margin: 0 0 4px; font-size: 15px; }
.trends-query-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.trends-query-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.trends-query-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.trends-query-main strong { font-size: 13px; }
.trends-query-val { font-size: 12px; color: var(--amber); font-variant-numeric: tabular-nums; }
.trends-query-list form { margin: 0; flex: 0 0 auto; }
.trends-empty { margin: 0 0 16px; padding: 18px; }
.trends-queries-note { margin: 0; }
@media (max-width: 860px) {
  .trends-hero-grid,
  .trends-diff-grid,
  .trends-queries-grid { grid-template-columns: 1fr; }
}

/* Premium language switcher */
.wrs-lang-switch {
  --wrs-lang-pad: 3px;
  position: relative;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: var(--wrs-lang-pad);
  border-radius: 999px;
  border: 1px solid rgba(226, 177, 90, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(16, 20, 28, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex: 0 0 auto;
}
.wrs-lang-switch-track {
  position: absolute;
  top: var(--wrs-lang-pad);
  bottom: var(--wrs-lang-pad);
  left: var(--wrs-lang-pad);
  width: calc(50% - var(--wrs-lang-pad));
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(226, 177, 90, 0.32), rgba(226, 177, 90, 0.16));
  border: 1px solid rgba(226, 177, 90, 0.45);
  box-shadow: 0 0 16px rgba(226, 177, 90, 0.12);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}
.wrs-lang-switch:has(.wrs-lang-opt[data-lang="en"].is-active) .wrs-lang-switch-track {
  transform: translateX(100%);
}
.wrs-lang-opt {
  position: relative;
  z-index: 1;
  min-width: 2.35rem;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: rgba(154, 164, 178, 0.9);
  text-align: center;
  transition: color 0.2s ease;
}
.wrs-lang-opt:hover { color: var(--text); }
.wrs-lang-opt.is-active {
  color: #f6e7c4;
  text-shadow: 0 0 18px rgba(226, 177, 90, 0.35);
}
.wrs-lang-switch.is-compact .wrs-lang-opt {
  min-width: 2.1rem;
  padding: 4px 9px;
  font-size: 10px;
}
.wrs-lang-switch-top { margin-right: 4px; }
/* Desktop: switcher lives in the topbar; sidebar copy is mobile-only (top-right is hidden). */
.side-lang { display: none; padding: 4px 14px 10px; }
.side-lang .wrs-lang-switch { width: 100%; }
.side-lang .wrs-lang-opt { flex: 1; }
.login-lang {
  width: min(400px, 100%);
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}
.help-public-nav .wrs-lang-switch,
.wrs-ai-nav .wrs-lang-switch,
.wrs-ai-menu .wrs-lang-switch {
  align-self: center;
}
.wrs-ai-top-inner .wrs-lang-switch { margin-left: 8px; }
