/* AI Visibility Tracker - single stylesheet, no build step, no webfonts. */

:root {
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #737a86;
  --paper: #f6f7f9;
  --card: #ffffff;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --brand: #2e4bc6;
  --brand-dark: #22389a;
  --brand-tint: #eef1fb;
  --mark-target: #ffe28a;
  --mark-competitor: #d9dbff;
  --up: #0e9f6e;
  --down: #e02424;
  --flat: #b18b14;
  --warn-bg: #fff8e6;
  --danger-bg: #fdeceb;
  --success-bg: #e9f7f1;
  --info-bg: #eef1fb;
  --radius: 6px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Iowan Old Style, Palatino, "Palatino Linotype", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 244px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--ink); color: #cfd6e4;
  padding: 1rem .75rem 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand {
  display: block; color: #fff; font-family: var(--serif); font-size: 1.05rem;
  padding: .35rem .5rem 1rem; text-decoration: none; line-height: 1.25;
}
.sidebar .brand-line { display: flex; align-items: center; gap: .5rem; }
.sidebar .brand-icon { width: 34px; height: 34px; display: block; flex: 0 0 auto; }
.sidebar .brand small { display: block; font-family: var(--mono); font-size: .66rem; color: #8b97ad; letter-spacing: .06em; text-transform: uppercase; }
.sidebar .nav-label {
  font: 600 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .09em;
  color: #7c879b; padding: 1rem .5rem .4rem;
}
.sidebar a.nav-item {
  display: flex; justify-content: space-between; gap: .5rem; align-items: center;
  padding: .42rem .55rem; border-radius: var(--radius); color: #cfd6e4;
  text-decoration: none; font-size: .9rem;
}
.sidebar a.nav-item:hover { background: #1d2739; color: #fff; }
.sidebar a.nav-item.active { background: var(--brand); color: #fff; }
.sidebar .pill-count { font: 600 .7rem var(--mono); background: rgba(255,255,255,.14); border-radius: 20px; padding: .1rem .4rem; }
.sidebar select {
  width: 100%; background: #1d2739; color: #fff; border: 1px solid #2c3a52; border-radius: var(--radius); padding: .45rem; font-size: .85rem;
}

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar form.search { flex: 1 1 auto; max-width: 460px; }
.topbar .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar .who { font-size: .82rem; color: var(--ink-2); }

.content { padding: 1.5rem; max-width: 1280px; width: 100%; }

.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.page-head .page-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.page-head p.lede { color: var(--ink-2); margin: 0; font-size: .92rem; }

/* ---------- Cards & grids ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: 1.1rem;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: baseline; gap: .75rem; margin-bottom: .75rem; }
.card-head .card-actions { margin-left: auto; font-size: .85rem; }

.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }

.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.metric .label { font: 600 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.metric .value { font: 600 1.75rem/1.15 var(--mono); font-variant-numeric: tabular-nums; margin: .45rem 0 .2rem; }
.metric .sub { font-size: .78rem; color: var(--ink-2); }
.metric.is-hero { border-left: 3px solid var(--brand); }

.score-ring { display: flex; align-items: center; gap: 1rem; }
.score-ring svg { flex: 0 0 auto; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th {
  font: 600 .68rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-3); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
table.data tbody tr:hover { background: #fafbfc; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.data td.wrap { white-space: normal; }
table.data caption { caption-side: bottom; text-align: left; padding-top: .6rem; font-size: .78rem; color: var(--ink-3); }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-block; padding: .1rem .42rem; border-radius: 4px; font: 600 .7rem/1.5 var(--mono);
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); white-space: nowrap;
}
.badge.up { color: var(--up); border-color: #a9e2cb; background: var(--success-bg); }
.badge.down { color: var(--down); border-color: #f5bfbd; background: var(--danger-bg); }
.badge.flat { color: var(--flat); border-color: #ecd9a1; background: var(--warn-bg); }
.badge.brand { color: var(--brand); border-color: #c3ccf0; background: var(--brand-tint); }
.badge.muted { color: var(--ink-3); }
.badge.demo { color: #8a5b00; background: #fff2cc; border-color: #e8cd85; letter-spacing: .06em; }

.chip { display: inline-block; padding: .12rem .45rem; border: 1px solid var(--line); border-radius: 20px; font-size: .75rem; color: var(--ink-2); background: #fff; }

.na { color: var(--ink-3); font-family: var(--mono); font-size: .82rem; }

/* ---------- Alerts ---------- */
.alert { border: 1px solid var(--line-strong); border-left-width: 3px; border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: .8rem; font-size: .9rem; }
.alert.success { background: var(--success-bg); border-left-color: var(--up); }
.alert.danger { background: var(--danger-bg); border-left-color: var(--down); }
.alert.warning { background: var(--warn-bg); border-left-color: var(--flat); }
.alert.info { background: var(--info-bg); border-left-color: var(--brand); }
.alert p:last-child { margin-bottom: 0; }

.note { font-size: .8rem; color: var(--ink-3); }
.disclaimer {
  font-size: .78rem; color: var(--ink-2); background: #fff; border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: .6rem .75rem; margin: .75rem 0;
}

/* ---------- Forms ---------- */
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .25rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url],
input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .48rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink); font: inherit; font-size: .9rem;
}
textarea { min-height: 90px; resize: vertical; }
input:disabled, textarea:disabled { background: #f2f4f7; color: var(--ink-3); }
.field { margin-bottom: .85rem; }
.field .hint { font-size: .76rem; color: var(--ink-3); margin-top: .25rem; }
.field-row { display: grid; gap: .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-label { font-size: .82rem; font-weight: 600; margin-bottom: .4rem; color: var(--ink-2); }

.plan-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.plan-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.plan-pick {
  display: block; border: 1px solid var(--line-strong); border-radius: 8px; padding: .65rem .8rem;
  cursor: pointer; margin: 0; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.plan-pick:hover { border-color: var(--ink-3); }
.plan-pick-name { display: block; font-weight: 700; font-size: .92rem; color: var(--ink); }
.plan-pick-price { display: block; font-family: var(--mono); font-size: .84rem; color: var(--ink-2); margin-top: .2rem; }
.plan-pick-price small { font-size: .7rem; color: var(--ink-3); font-weight: 500; }
.plan-pick-prompts { display: block; font-size: .74rem; color: var(--ink-3); margin-top: .15rem; }
.plan-radio:checked + .plan-pick { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand); }
.plan-radio:focus-visible + .plan-pick { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--ink); }
.check input { margin-top: .2rem; }

.btn {
  display: inline-block; padding: .45rem .85rem; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); font: 600 .85rem var(--sans); cursor: pointer; text-decoration: none;
}
.btn:hover { background: #f2f4f7; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--down); border-color: #f0b3b1; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.small { padding: .25rem .55rem; font-size: .78rem; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.inline-form { display: inline; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: #e9ecf2; border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); transition: width .4s ease; }

/* ---------- Highlighted AI responses ---------- */
.response {
  font: .88rem/1.65 var(--sans); white-space: pre-wrap; word-wrap: break-word;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  border-radius: var(--radius); padding: .9rem 1rem; max-height: 420px; overflow: auto;
}
mark.mark-target { background: var(--mark-target); padding: 0 .12em; border-radius: 2px; box-shadow: 0 1px 0 #e8c65c inset; }
mark.mark-competitor { background: var(--mark-competitor); padding: 0 .12em; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .78rem; color: var(--ink-2); margin-bottom: .5rem; }
.legend .swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; vertical-align: -1px; margin-right: .3rem; }

/* Run-history strip */
.strip { display: flex; gap: 3px; align-items: flex-end; }
.strip i {
  display: block; width: 9px; height: 22px; border-radius: 2px; background: #e9ecf2;
  border: 1px solid #dfe3ea;
}
.strip i.hit { background: var(--mark-target); border-color: #e8c65c; }
.strip i.top { background: var(--up); border-color: var(--up); }
.strip i.miss { background: #f0f1f4; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .grid-line { stroke: #eef0f4; stroke-width: 1; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; }
.chart .area { fill: rgba(46,75,198,.08); }
.chart .dot { fill: var(--brand); }
.chart text { font: 10px var(--mono); fill: var(--ink-3); }
.chart .bar { fill: var(--brand); }
.chart .bar.alt { fill: #9aa9e4; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--ink-2); }
.empty h3 { font-family: var(--serif); }
.pagination { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1rem; }
.pagination a, .pagination span { padding: .3rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .82rem; background: #fff; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.tabs a { padding: .45rem .8rem; font-size: .87rem; color: var(--ink-2); border-bottom: 2px solid transparent; text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: .75rem; }
.scroll-y { max-height: 340px; overflow-y: auto; }
details.raw summary { cursor: pointer; font-size: .84rem; color: var(--ink-2); padding: .3rem 0; }
pre.code { background: #0f1623; color: #d7dee9; padding: .8rem; border-radius: var(--radius); overflow: auto; font: .78rem/1.5 var(--mono); }
.log-view { background: #0f1623; color: #d7dee9; padding: .8rem; border-radius: var(--radius); max-height: 560px; overflow: auto; font: .76rem/1.5 var(--mono); white-space: pre-wrap; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; position: relative; overflow: hidden; }
.auth-wrap > *:not(.corner-glyph) { position: relative; z-index: 1; }
.auth-wrap .corner-glyph { position: absolute; z-index: 0; opacity: .07; pointer-events: none; }
.auth-wrap .corner-glyph.tl { top: -40px; left: -40px; }
.auth-wrap .corner-glyph.tr { top: -30px; right: -30px; }
.auth-wrap .corner-glyph.bl { bottom: -30px; left: -30px; }
.auth-wrap .corner-glyph.br { bottom: -40px; right: -40px; }
.auth-wrap .corner-glyph.ml { top: 50%; left: -40px; transform: translateY(-50%); }
.auth-wrap .corner-glyph.mr { top: 50%; right: -40px; transform: translateY(-50%); }
.auth-wrap .corner-glyph.tc { top: -50px; left: 50%; transform: translateX(-50%); }
.auth-wrap .corner-glyph.bc { bottom: -40px; left: 50%; transform: translateX(-50%); }
.auth-wrap .corner-glyph.ltop { top: 20%; left: -30px; }
.auth-wrap .corner-glyph.rtop { top: 20%; right: -30px; }
.auth-wrap .corner-glyph.lbot { top: 80%; left: -25px; }
.auth-wrap .corner-glyph.rbot { top: 76%; right: -20px; }
.auth-wrap .corner-glyph.il1 { top: 15%; left: 16%; }
.auth-wrap .corner-glyph.ir1 { top: 12%; right: 15%; }
.auth-wrap .corner-glyph.il2 { top: 45%; left: 12%; }
.auth-wrap .corner-glyph.ir2 { top: 42%; right: 13%; }
.auth-wrap .corner-glyph.il3 { top: 82%; left: 17%; }
.auth-wrap .corner-glyph.ir3 { top: 85%; right: 16%; }
.auth-wrap .corner-glyph.xl1 { top: 8%; left: 6%; }
.auth-wrap .corner-glyph.xr1 { top: 6%; right: 7%; }
.auth-wrap .corner-glyph.xl2 { top: 58%; left: 5%; }
.auth-wrap .corner-glyph.xr2 { top: 60%; right: 6%; }
.auth-wrap .corner-glyph.xl3 { top: 92%; left: 8%; }
.auth-wrap .corner-glyph.xr3 { top: 94%; right: 9%; }
.auth-card .card { position: relative; z-index: 2; }
.auth-card .corner-glyph.near-tl { top: -48px; left: -58px; opacity: .11 !important; }
.auth-card .corner-glyph.near-tr { top: -48px; right: -58px; opacity: .11 !important; }
.auth-card .corner-glyph.near-bl { bottom: -48px; left: -58px; opacity: .11 !important; }
.auth-card .corner-glyph.near-br { bottom: -48px; right: -58px; opacity: .11 !important; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .card { padding: 1.5rem; }
@media (max-width: 640px) {
  .auth-wrap .corner-glyph { display: none; }
}
.auth-brand { margin-bottom: .3rem; text-align: center; }
.auth-logo-img { height: 72px; width: auto; display: block; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex: none; }
  .sidebar .nav-scroll { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .15rem; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .grid.side { grid-template-columns: 1fr; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
}

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

/* ---------- Print (reports) ---------- */
@media print {
  .sidebar, .topbar, .no-print, .page-actions { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card { border: 1px solid #d0d5dd; break-inside: avoid; box-shadow: none; }
  a[href]:after { content: ""; }
}

/* ---------- Modal (import preview) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 2rem 1rem; z-index: 60; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line-strong);
  width: 100%; max-width: 1000px; box-shadow: 0 12px 40px rgba(16, 24, 40, .25);
}
.modal-head {
  display: flex; align-items: baseline; gap: .75rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; }
.modal-head .modal-close { margin-left: auto; }
.modal-body { padding: 1.1rem 1.2rem; max-height: 60vh; overflow-y: auto; }
.modal-foot {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding: .9rem 1.2rem; border-top: 1px solid var(--line); background: #fbfcfd;
  border-radius: 0 0 var(--radius) var(--radius); position: sticky; bottom: 0;
}
.modal-foot .spacer { margin-left: auto; }

tr.row-invalid { background: #fdf3f2; }
tr.row-duplicate { background: #fffaf0; }
tr.row-invalid td, tr.row-duplicate td { color: var(--ink-2); }

/* ---------- Bulk action bar ---------- */
.bulk-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .6rem .75rem; margin-bottom: .75rem;
  background: var(--brand-tint); border: 1px solid #c3ccf0; border-radius: var(--radius);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar .count { font: 600 .85rem var(--mono); }
.bulk-bar .spacer { margin-left: auto; }

/* ---------- Brand performance panel ---------- */
.brand-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.4rem; align-items: center; }

.gauge-wrap { text-align: center; }
.gauge { width: 100%; max-width: 200px; height: auto; }
.gauge-track { fill: none; stroke: #e9ecf2; stroke-width: 13; stroke-linecap: round; }
.gauge-value { fill: none; stroke-width: 13; stroke-linecap: round; }
.gauge-number { text-anchor: middle; font: 600 30px var(--mono); fill: var(--ink); font-variant-numeric: tabular-nums; }
.gauge-caption { text-anchor: middle; font: 10px var(--mono); fill: var(--ink-3); letter-spacing: .06em; }
.gauge-label { margin-top: -.3rem; }

.bar-list { display: grid; gap: .75rem; }
.bar-row .bar-head { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.bar-track { height: 9px; background: #eef0f4; border-radius: 20px; overflow: hidden; }
.bar-track > span { display: block; height: 100%; background: var(--brand); border-radius: 20px; }
.bar-row .note { margin-top: .2rem; }

.sov-bar {
  display: flex; height: 30px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #f2f4f7;
}
.sov-seg { display: flex; align-items: center; justify-content: center; min-width: 4px; }
.sov-seg em { font: 600 .72rem var(--mono); font-style: normal; color: #fff; }
.sov-seg.is-you { background: var(--brand); }
.sov-seg.c0 { background: #9aa9e4; }
.sov-seg.c1 { background: #b9a5dd; }
.sov-seg.c2 { background: #8fbfd6; }
.sov-seg.c3 { background: #c3b28c; }
.sov-seg.c4 { background: #a8b3c4; }
.sov-key { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .5rem; font-size: .8rem; color: var(--ink-2); }
.sov-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.sov-dot.is-you { background: var(--brand); }
.sov-dot.c0 { background: #9aa9e4; } .sov-dot.c1 { background: #b9a5dd; }
.sov-dot.c2 { background: #8fbfd6; } .sov-dot.c3 { background: #c3b28c; } .sov-dot.c4 { background: #a8b3c4; }

.prompt-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.grid-cell {
  width: 22px; height: 22px; border-radius: 4px; display: block;
  border: 1px solid rgba(16,24,40,.08); text-decoration: none;
}
.grid-cell:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.grid-cell.top { background: var(--up); }
.grid-cell.seen { background: var(--mark-target); }
.grid-cell.absent { background: #e9ecf2; }
.grid-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.grid-key.top { background: var(--up); } .grid-key.seen { background: var(--mark-target); } .grid-key.absent { background: #e9ecf2; }

@media (max-width: 700px) {
  .brand-grid { grid-template-columns: 1fr; }
}
.sov-seg.sent-pos, .sov-dot.sent-pos { background: var(--up); }
.sov-seg.sent-neu, .sov-dot.sent-neu { background: #cfd4dc; }
.sov-seg.sent-neg, .sov-dot.sent-neg { background: var(--down); }

/* Scan timing strip */
.scan-strip { display: flex; flex-wrap: wrap; gap: 1.6rem; font-size: .85rem; }
.scan-strip .label { font: 600 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.scan-strip .value { font-family: var(--mono); margin-top: .2rem; }

/* ---------- Action plan ---------- */
.action-card { border-left: 3px solid var(--line-strong); }
.action-card.state-absent, .action-card.state-negative { border-left-color: var(--down); }
.action-card.state-outranked, .action-card.state-uncited { border-left-color: var(--flat); }
.action-card.state-strong { border-left-color: var(--up); }

.evidence {
  display: flex; flex-wrap: wrap; gap: 1.1rem; padding: .55rem .75rem; margin: .5rem 0 .8rem;
  background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .82rem; color: var(--ink-2);
}
.action-list { margin: 0; padding-left: 1.2rem; }
.action-list li { margin-bottom: .7rem; }
.action-list li:last-child { margin-bottom: 0; }
.action-title { font-weight: 600; font-size: .9rem; margin-bottom: .15rem; }
.action-title .chip { font-weight: 400; margin-left: .35rem; }
