/* Inter (vendored, weights 400 + 500 — the only two the mockups use). */
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url("/static/vendor/fonts/inter-400.woff2") format("woff2")}
@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url("/static/vendor/fonts/inter-500.woff2") format("woff2")}

/* Prism UI — lifted verbatim from design/dashboard.html + design/prompts.html.
   The :root tokens and component classes below are the mockups' own CSS, merged
   (the two pages share a base; prompts adds .pli/.cite/.dot/.dots/.search).
   The "STATE MODIFIERS" section at the end turns the mockups' repeated inline
   state styles (pill/engtag/dot color variants) into reusable classes so the
   Jinja templates map 1:1 without inlining colors. */
:root{
  --bg:#FAF9F5;--card:#ffffff;--surface:#F4F2EC;--track:#EAE7DE;
  --text:#22211E;--muted:#605E58;--hint:#6B6960;
  --bd:rgba(0,0,0,.10);--bd2:rgba(0,0,0,.16);
  --su-bg:#E1F5EE;--su-tx:#0F6E56;--su:#1D9E75;
  --da-bg:#FCEBEB;--da-tx:#A32D2D;--da-bd:#F09595;
  --in-bg:#E6F1FB;--in-tx:#185FA5;
  --wa-bg:#FAEEDA;--wa-tx:#854F0B;
  --purple:#534AB7;--coral:#993C1D;--teal:#0F7A89;
  --r-md:8px;--r-lg:12px;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;font-weight:400;line-height:1.5;font-size:15px}
h1,h2,h3{font-weight:500;margin:0}
.app{display:flex;min-height:100vh}
.sidebar{width:236px;flex:none;background:var(--surface);border-right:.5px solid var(--bd);padding:18px 14px;display:flex;flex-direction:column;gap:18px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.brand .mk{width:30px;height:30px;border-radius:8px;background:var(--in-bg);color:var(--in-tx);display:flex;align-items:center;justify-content:center}
.brand b{font-weight:500;font-size:15px}
.brand p{margin:0;font-size:12px;color:var(--muted)}
.nav{display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r-md);color:var(--muted);text-decoration:none;font-size:14px;cursor:pointer}
.nav a.active{background:var(--card);color:var(--text);border:.5px solid var(--bd)}
.nav a:hover{background:var(--card)}
.urls p{font-size:11px;color:var(--hint);text-transform:none;margin:0 0 6px 4px;letter-spacing:.02em}
.urls a{display:block;padding:7px 10px;border-radius:var(--r-md);color:var(--muted);text-decoration:none;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.urls a.active{background:var(--in-bg);color:var(--in-tx)}
.urls a:hover{background:var(--card)}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 28px;border-bottom:.5px solid var(--bd);flex-wrap:wrap}
.crumb{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--muted)}
.crumb b{color:var(--text);font-weight:500}
.crumb a{color:var(--muted);text-decoration:none}
.tabs{display:flex;gap:4px}
.tab{padding:6px 12px;border-radius:var(--r-md);text-decoration:none;color:var(--muted);font-size:13px;border:.5px solid transparent}
.tab.active{background:var(--card);color:var(--text);border-color:var(--bd)}
.topright{display:flex;align-items:center;gap:8px}
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:var(--r-md);border:.5px solid var(--bd2);background:transparent;color:var(--text);font-size:13px;cursor:pointer;font-family:inherit;text-decoration:none}
.btn:hover{background:var(--surface)}
.search{padding:7px 12px;border-radius:var(--r-md);border:.5px solid var(--bd2);background:var(--card);font-family:inherit;font-size:13px;width:190px}
.content{padding:22px 28px;max-width:1180px;width:100%}
.card{background:var(--card);border:.5px solid var(--bd);border-radius:var(--r-lg);padding:16px 18px}
.metric{background:var(--surface);border-radius:var(--r-md);padding:14px 16px}
.lbl{font-size:13px;color:var(--muted);margin:0}
.num{font-size:26px;font-weight:500;margin:2px 0 0}
.sub{font-size:12px;color:var(--hint);margin:3px 0 0}
.pill{display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:3px 9px;border-radius:var(--r-md);background:var(--surface);color:var(--muted)}
.sec{margin-top:24px}
.h{font-size:18px;margin:0 0 12px}
.grid{display:grid;gap:14px}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.track{height:7px;border-radius:6px;background:var(--track);overflow:hidden;flex:1}
.fill{height:100%;border-radius:6px}
.st{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;padding:4px 0}
.engtag{width:24px;height:24px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:500}
.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-bottom:8px}
.legend span{display:flex;align-items:center;gap:5px}
.sw{width:10px;height:10px;border-radius:2px}
.barrow{display:flex;align-items:center;gap:10px;margin:9px 0}
.barrow .nm{width:140px;font-size:13px;color:var(--muted)}
.caveat{font-size:12px;color:var(--hint);line-height:1.6;margin-top:24px;border-top:.5px solid var(--bd);padding-top:12px}
/* prompts page */
.pli{display:flex;align-items:center;gap:12px;padding:11px 8px;border-top:.5px solid var(--bd)}
.pli p{margin:0}
.cite{display:flex;align-items:flex-start;gap:9px;padding:9px 0;border-top:.5px solid var(--bd);font-size:13px}
.dot{width:8px;height:8px;border-radius:50%;margin-top:6px;flex:none}
.dots{display:flex;gap:6px}

/* ======================= STATE MODIFIERS ===========================
   Reusable classes for the color states the mockups expressed inline. */

/* pill tones */
.pill.info{background:var(--in-bg);color:var(--in-tx)}
.pill.success{background:var(--su-bg);color:var(--su-tx)}
.pill.danger{background:var(--da-bg);color:var(--da-tx)}
.pill.warning{background:var(--wa-bg);color:var(--wa-tx)}
.pill b{font-weight:500;color:var(--text)}

/* engine-card engtag tone (ChatGPT green, blackout red, neutral grey) */
.engtag.success{background:var(--su-bg);color:var(--su-tx)}
.engtag.danger{background:var(--da-bg);color:var(--da-tx)}
.engtag.neutral{background:var(--surface);color:var(--muted)}

/* prompt-row dot states (per the prompts legend) */
.engtag.target{background:var(--su-bg);color:var(--su-tx)}
.engtag.hearst{background:var(--card);border:1px solid var(--su);color:var(--su-tx)}
.engtag.none{background:var(--surface);color:var(--muted)}
.engtag.blackout{background:var(--da-bg);color:var(--da-tx)}

/* citation owner dot colors */
.dot.hearst{background:var(--su)}
.dot.competitor{background:var(--coral)}
.dot.brand{background:#185FA5}
.dot.other{background:var(--hint)}
/* representation score dot colors */
.dot.success{background:var(--su)}
.dot.warning{background:#854F0B}
.dot.danger{background:var(--da-tx)}
.dot.inline{margin:0}

/* displacement + KPI bar fills */
.fill.success{background:var(--su)}
.fill.brand{background:var(--teal)}  /* brand site — distinct from this-URL blue (#185FA5) */
.fill.neutral{background:var(--hint)}
.fill.blue{background:#185FA5}

/* danger-bordered card / alarm metric */
.card.danger{border-color:var(--da-bd)}
.metric.alarm{background:var(--da-bg)}
.metric.alarm .lbl,.metric.alarm .num,.metric.alarm .sub{color:var(--da-tx)}

/* value tints used in engine-card stat rows */
.val-good{color:var(--su-tx)}
.val-warn{color:var(--wa-tx)}

/* selected prompt row (mockup highlights it in the info tint) */
.pli.clickable{cursor:pointer}
.pli.clickable:hover{background:var(--surface);border-radius:var(--r-md)}
.pli.sel{background:var(--in-bg);border-radius:var(--r-md)}
.pli.sel p:first-child{font-weight:500}
.pli:focus-visible{outline:2px solid var(--in-tx);outline-offset:-2px;border-radius:var(--r-md)}

/* expand/collapse chevron (rotates when the row's detail is open) */
.chev{flex:none;color:var(--hint);font-size:16px;transition:transform .15s ease}
.prow.sel .chev{transform:rotate(180deg);color:var(--in-tx)}
.chev-sp{flex:none;width:16px}      /* header-row spacer to align the chevron column */

/* per-engine citation status as word tags (right of each prompt), wrapping
   under their own column rather than crowding the prompt text */
.dots.tags{flex:none;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:360px}
.colhead{flex:none;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--hint)}

/* inline prompt detail: the per-engine answers open directly beneath the row,
   indented under it with a left accent that ties them to the selected prompt */
.prow-detail{margin:2px 0 10px;padding:2px 0 2px 14px;border-left:2px solid var(--in-bg)}
.pd{background:var(--surface);border-radius:var(--r-md);padding:13px 15px;margin-top:10px}
.pd.danger{background:var(--da-bg)}
.pd .row{align-items:flex-start}

/* response excerpt toggle (no framework: a class flip reveals the full text) */
.resp{margin:12px 0 0;line-height:1.6}
.resp .full{display:none}
.resp.open .exc,.resp.open .more{display:none}
.resp.open .full{display:inline}
.more{color:var(--in-tx);cursor:pointer;font-size:13px;margin-left:4px;white-space:nowrap}
.cite .meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cite .dom{word-break:break-word}

/* ===================================================================
   OVERVIEW REDESIGN — verdict-led scorecard.
   Editorial luxury on the existing warm/paper palette: one dominant
   verdict, real engine marks, a tighter type scale, tabular numbers.
   Additive only — nothing above is modified.
   =================================================================== */

/* tabular numbers everywhere a figure is read or compared */
.num,.tnum{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}

/* small-caps eyebrow label (FT/Bloomberg data-label feel) */
.eyebrow{font-size:11px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--hint);font-weight:500;margin:0}
.eyebrow.danger{color:var(--da-tx)}

/* a real serif, system-stack only (no new font files), for the one verdict line */
.serif{font-family:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,ui-serif,serif}

/* article identity title — deliberately subordinate to the serif verdict below it */
.art-title{font-weight:500;font-size:16px;line-height:1.4;margin:7px 0 0;color:var(--text)}

/* hairline section header with an eyebrow above the title */
.shead{margin:0 0 12px}
.shead .h{margin:0}

/* --- engine brand marks (vendored simple-icons, masked to one ink) --------
   The tile carries the tone color (.engtag.*); the mark inherits it via
   currentColor, so the OpenAI / Gemini / Perplexity marks stay monochrome and
   cohesive instead of full-color logo soup. */
.eico{display:inline-block;flex:none;background-color:currentColor;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:contain;mask-size:contain}
.eico.chatgpt{-webkit-mask-image:url(/static/vendor/engines/openai.svg);mask-image:url(/static/vendor/engines/openai.svg)}
.eico.google_aio{-webkit-mask-image:url(/static/vendor/engines/gemini.svg);mask-image:url(/static/vendor/engines/gemini.svg)}
.eico.perplexity{-webkit-mask-image:url(/static/vendor/engines/perplexity.svg);mask-image:url(/static/vendor/engines/perplexity.svg)}

/* --- the verdict band: the one element the eye should land on first ------- */
.verdict{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(230px,.9fr);
  gap:26px;align-items:start;padding:22px 24px}
.verdict-main{min-width:0;display:flex;flex-direction:column}
.verdict-line{font-weight:400;font-size:26px;line-height:1.34;letter-spacing:-.012em;
  color:var(--text);margin:9px 0 0}
.verdict-line .hl-any{color:var(--su-tx);font-weight:500;white-space:nowrap}
.verdict-line .hl-this{color:var(--in-tx);font-weight:500;white-space:nowrap}

/* dumbbell: this-URL vs any-publisher on a 0–100 scale, the gap made physical.
   Only the nodes + the gap badge are positioned by value; the labelled figures
   live in a legend row below, so nothing ever collides on a narrow column. */
.dumbbell{margin-top:auto;padding-top:28px}
.db-track{position:relative;height:6px;border-radius:6px;background:var(--track);margin:0 4px}
.db-gap{position:absolute;top:0;height:6px;border-radius:6px;background:var(--su);opacity:.45}
.db-pts{position:absolute;left:50%;bottom:calc(100% + 9px);transform:translateX(-50%);
  font-size:12px;font-weight:500;color:var(--su-tx);background:var(--su-bg);
  padding:1px 9px;border-radius:20px;white-space:nowrap}
.db-node{position:absolute;top:50%;width:15px;height:15px;border-radius:50%;
  transform:translate(-50%,-50%);border:2.5px solid var(--card);box-shadow:0 0 0 1px var(--bd2)}
.db-node.this{background:var(--in-tx)}
.db-node.any{background:var(--su)}
.db-legend{display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px 20px;
  margin-top:17px;font-size:13px;color:var(--muted)}
.db-legend .dbl{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.db-legend .dbl .sw{width:10px;height:10px;border-radius:3px}
.db-legend .dbl.this .sw{background:var(--in-tx)}
.db-legend .dbl.any .sw{background:var(--su)}
.db-legend .dbl b{color:var(--text);font-weight:500}
.db-legend .dbl .hint{color:var(--hint)}
.db-gapnote{margin:13px 0 0;font-size:12.5px;color:var(--muted);line-height:1.5}
.db-gapnote b{color:var(--su-tx);font-weight:500}

/* the blackout panel — the single reserved use of red on the verdict band */
.blackout{background:var(--da-bg);border:.5px solid var(--da-bd);border-radius:var(--r-md);
  padding:15px 16px;display:flex;flex-direction:column;gap:9px}
.blackout-line{margin:2px 0 0;font-size:14px;line-height:1.45;color:var(--da-tx)}
.blackout-line b{font-weight:500}
.blackout-sub{margin:0;font-size:12px;color:var(--da-tx);line-height:1.5}
.blackout-sub .tnum{font-weight:500}

/* --- "What to do next" — derived actions, severity-accented ---------------- */
.recs{display:grid;gap:11px}
.rec{display:flex;gap:13px;align-items:flex-start;padding:14px 16px;
  border:.5px solid var(--bd);border-left-width:3px;border-radius:var(--r-md);background:var(--card)}
.rec.danger{border-left-color:var(--da-tx)}
.rec.warning{border-left-color:var(--wa-tx)}
.rec.neutral{border-left-color:var(--hint)}
.rec-num{flex:none;width:22px;height:22px;border-radius:50%;background:var(--surface);
  color:var(--muted);font-size:12px;font-weight:500;display:flex;align-items:center;justify-content:center}
.rec-b{min-width:0}
.rec-b .rt{margin:0;font-weight:500;font-size:14px}
.rec-b .rd{margin:4px 0 0;font-size:13px;color:var(--muted);line-height:1.5}
.rec-b .ra{margin:7px 0 0;font-size:13px;color:var(--text);line-height:1.5}
.rec-b .ra::before{content:"→ ";color:var(--in-tx);font-weight:500}

/* --- slim secondary stat rail (subordinate to the verdict) -----------------
   Two compact, left-aligned stats — capped so they don't stretch edge-to-edge
   into a cavernous row, and wrap to one column on narrow screens. */
.statrail{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(190px,240px));justify-content:start}
.stat{background:var(--surface);border-radius:var(--r-md);padding:13px 15px}
.stat .num{font-size:23px}

/* engine-card header: mark + name + optional badge. The row may wrap (badge
   drops below the name on tight ~240px cards) but each badge stays one line. */
.ecard-h{display:flex;align-items:center;gap:9px}
.ecard-h b{font-weight:500}
.ecard-row{flex-wrap:wrap;row-gap:8px}
.blackout-state{margin-top:12px;border-top:.5px solid var(--bd);padding-top:11px}

/* restyled bars: a touch thinner, owner-colored (see .fill.* above) */
.barrow .nm{color:var(--text)}
/* rival-publisher displacement bar — distinct from retail/community grey */
.fill.rival{background:var(--coral)}

/* collapse the verdict to one column before the left column gets narrow enough
   to wrap the dumbbell legend mid-phrase */
@media(max-width:900px){
  .verdict{grid-template-columns:1fr;gap:20px}
  .dumbbell{padding-top:34px}
}

/* narrow / tablet: the fixed 236px sidebar crushed the content and forced a
   horizontal scroll. Drop it (PoC) and let the main column go full width. */
@media(max-width:860px){
  .sidebar{display:none}
  .content{padding:18px 16px}
  .topbar{padding:12px 16px}
}

/* keep engine-state badges on one line so the three card headers stay aligned */
.ecard-h + .pill,.row .pill{white-space:nowrap}

/* visually-hidden but available to assistive tech */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* coverage tabs are real <button>s (keyboard-operable); match the .tab look */
button.tab{font-family:inherit;font-size:13px;line-height:1.5;background:transparent;cursor:pointer}
button.tab:focus-visible{outline:2px solid var(--in-tx);outline-offset:1px}

/* --- info note ------------------------------------------------------------
   A small, focusable "ⓘ" that relocates a metric caption from inline prose to
   an on-demand note. The mark is muted (hint ink); the note surfaces as a
   clean bubble on the white card surface on :hover and :focus-visible. The
   trigger is a real <button> (keyboard-focusable) carrying the note as its
   aria-label, so the explanation is never lost — only its presentation moves. */
.infonote{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;
  position:relative;margin-left:6px;padding:0;border:0;background:none;
  color:var(--hint);cursor:help;line-height:0}
.infonote .ti{font-size:15px}
.infonote:hover{color:var(--muted)}
.infonote:focus-visible{outline:2px solid var(--in-tx);outline-offset:1px;border-radius:3px}
.infonote-tip{position:absolute;left:50%;top:calc(100% + 8px);transform:translateX(-50%);
  z-index:40;width:max-content;max-width:260px;
  font-size:12px;font-weight:400;line-height:1.5;letter-spacing:0;text-transform:none;
  text-align:left;white-space:normal;color:var(--muted);background:var(--card);
  border:.5px solid var(--bd2);border-radius:var(--r-md);padding:8px 10px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease}
.infonote:hover .infonote-tip,
.infonote:focus-visible .infonote-tip{opacity:1;visibility:visible}

/* --- publisher links ------------------------------------------------------
   The "Other <owner> URLs involved" rows link out to the actual cited page.
   Accent ink so they read as links; underline on hover; the trailing
   external-link mark inherits the link color at reduced weight. */
.hlink{color:var(--in-tx);text-decoration:none}
.hlink:hover{text-decoration:underline;text-underline-offset:2px}
.hlink:focus-visible{outline:2px solid var(--in-tx);outline-offset:1px;border-radius:3px}
.hlink .ti{font-size:12.5px;margin-left:4px;vertical-align:-1px;opacity:.5}
.hlink:hover .ti{opacity:.8;text-decoration:none}

/* --- "Soon" nav items -----------------------------------------------------
   Features not built yet: dimmed and non-interactive (no hover, default
   cursor), with a small "Soon" chip pushed to the right of the row. */
.nav a.soon{opacity:.5;cursor:default;pointer-events:none}
.nav a.soon:hover{background:none}
.soon-tag{margin-left:auto;font-size:9.5px;letter-spacing:.05em;text-transform:uppercase;
  font-weight:500;padding:1px 6px;border-radius:999px;
  background:var(--surface);border:.5px solid var(--bd);color:var(--hint)}

/* home: clickable URL cards lift on hover (links wrapping a .card) */
a.card.clickable{transition:border-color .12s ease,background .12s ease}
a.card.clickable:hover{border-color:var(--bd2);background:var(--bg)}
.dot.inline{display:inline-block;vertical-align:middle}

/* home: compact "analyze a URL" form, matched to the Prism surface */
.pform{display:flex;flex-direction:column;gap:15px}
.pform .field{display:flex;flex-direction:column;gap:6px;border:0;padding:0;margin:0;min-width:0}
.pform label,.pform legend{font-size:12px;font-weight:500;color:var(--muted);padding:0}
.pform input.search{width:100%;font-size:13px}
.pform input[type=number].search{max-width:130px}
.pform .checkrow{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:2px}
.pform .check{flex-direction:row;align-items:center;gap:7px;font-size:13px;color:var(--text);font-weight:400}
.pform .check span{color:var(--muted)}
.pform .check input{width:15px;height:15px;accent-color:var(--in-tx)}
.pform-grid{display:flex;gap:18px;flex-wrap:wrap}
.pform-actions{margin-top:2px}
.btn.primary{background:var(--in-tx);border-color:var(--in-tx);color:#fff;font-weight:500}
.btn.primary:hover{background:#14517f}
