:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #2a2733;
  --muted: #6f6b7a;
  --faint: #a29eac;
  --line: #eeebf1;

  --lav: #e7e1f8;   --lav-2: #c9bff4;   --lav-ink: #6c5fc7;
  --mint: #dcf1e5;  --mint-2: #bfe6cf;
  --peach: #fde6d8; --peach-2: #fcd9c4;
  --sky: #dfebf8;   --sky-2: #c2d8f1;
  --rose: #f9e0e7;  --rose-2: #f2c4d2;

  /* stance chips */
  --pro-bg: #f9e0e7;  --pro: #b4506e;
  --ind-bg: #dcf1e5;  --ind: #3c8a62;
  --neu-bg: #dfebf8;  --neu: #4a78aa;
  --unk-bg: #eeecf3;  --unk: #77738a;

  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--lav); }
:focus-visible { outline: 2px solid var(--lav-ink); outline-offset: 2px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header { background: var(--bg); }
.header-inner { max-width: 1160px; margin: 0 auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; }
.wordmark { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 16px; border-radius: 999px; font-size: .92rem; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav a.active { background: var(--lav); color: var(--ink); }

.container { max-width: 1160px; margin: 0 auto; padding: 4px 28px 72px; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 380px; align-items: center; gap: 24px;
  background: linear-gradient(135deg, #f3effc 0%, #fbf3ee 100%);
  border-radius: 28px; padding: 36px 40px; margin-bottom: 30px; overflow: hidden;
}
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; }
.hero p { margin: 0 0 22px; color: var(--muted); font-size: 1.02rem; max-width: 44ch; }
.hero-art { width: 100%; height: auto; display: block; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { display: inline-flex; align-items: baseline; gap: 6px; background: rgba(255,255,255,.75); border-radius: 999px; padding: 7px 14px; font-size: .86rem; color: var(--muted); }
.stat b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; align-self: center; }
.dot.pro { background: var(--pro); } .dot.ind { background: var(--ind); } .dot.neu { background: var(--neu); } .dot.unk { background: var(--unk); }

/* ---------- filters ---------- */
.filters { margin-bottom: 8px; }
.search { position: relative; margin-bottom: 14px; }
.search input {
  width: 100%; padding: 14px 120px 14px 20px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font: inherit; font-size: 1rem; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--lav-2); box-shadow: 0 0 0 4px var(--lav); }
.search button {
  position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.search button:hover { background: #3d3948; }

.filter-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  font-size: .86rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
}
.chip:hover { color: var(--ink); border-color: var(--lav-2); }
.chip.on { color: var(--ink); background: var(--lav); border-color: var(--lav); }
.chip.on.pro { background: var(--pro-bg); border-color: var(--pro-bg); color: var(--pro); }
.chip.on.ind { background: var(--ind-bg); border-color: var(--ind-bg); color: var(--ind); }
.chip.on.neu { background: var(--neu-bg); border-color: var(--neu-bg); color: var(--neu); }
.chip.on.unk { background: var(--unk-bg); border-color: var(--unk-bg); color: var(--unk); }

.selects { display: flex; gap: 8px; }
.selects select {
  padding: 8px 34px 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: .86rem; font-weight: 500; color: var(--ink); cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f6b7a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.selects select:focus { border-color: var(--lav-2); }
.count { font-size: .85rem; color: var(--faint); margin: 20px 4px 16px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--lav-2); box-shadow: 0 8px 24px rgba(42, 39, 51, .06); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--lav); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.meta-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--faint); }
.meta-top .src { color: var(--ink); font-weight: 700; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill.pro { background: var(--pro-bg); color: var(--pro); }
.pill.ind { background: var(--ind-bg); color: var(--ind); }
.pill.neu { background: var(--neu-bg); color: var(--neu); }
.pill.unk { background: var(--unk-bg); color: var(--unk); }
.card-title { margin: 0; font-size: 1.06rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.card-title a:hover { color: var(--lav-ink); }
.card-summary { margin: 0; font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; font-size: .78rem; color: var(--faint); }
.card-foot a { font-weight: 600; }
.card-foot a:hover { color: var(--lav-ink); }

/* geometric placeholder for imageless articles */
.ph { width: 100%; height: 100%; display: block; }
.ph .a { opacity: .9; } .ph .c { fill: var(--ink); opacity: .12; }
.tone-pro { background: var(--rose); }  .tone-pro .a { fill: var(--rose-2); }  .tone-pro .b { fill: var(--peach-2); }
.tone-ind { background: var(--mint); }  .tone-ind .a { fill: var(--mint-2); }  .tone-ind .b { fill: var(--sky-2); }
.tone-neu { background: var(--sky); }   .tone-neu .a { fill: var(--sky-2); }   .tone-neu .b { fill: var(--lav-2); }
.tone-unk { background: var(--lav); }   .tone-unk .a { fill: var(--lav-2); }   .tone-unk .b { fill: var(--peach-2); }

/* ---------- pager / empty ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 40px; }
.pager a { padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; }
.pager a:hover { border-color: var(--lav-2); }
.pager span { color: var(--faint); font-size: .86rem; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 120px; margin-bottom: 8px; }

/* ---------- article ---------- */
.article { max-width: 720px; margin: 0 auto; }
.back { display: inline-block; font-size: .88rem; font-weight: 600; color: var(--muted); margin: 6px 0 20px; }
.back:hover { color: var(--ink); }
.article .meta-top { font-size: .84rem; margin-bottom: 12px; }
.article-title { font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 10px; }
.byline { font-size: .88rem; color: var(--faint); margin: 0 0 24px; }
.article-image { width: 100%; border-radius: var(--radius); margin-bottom: 26px; display: block; }
.article-body { font-size: 1.08rem; line-height: 1.8; color: #3a3644; }
.article-body p { margin: 0 0 1.15em; }
.article-foot { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem; }
.btn:hover { background: #3d3948; }
.note { font-size: .88rem; color: var(--faint); }

/* ---------- sources ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(135deg, #eef6f1 0%, #eef2fb 100%); border-radius: 28px; padding: 28px 34px; margin-bottom: 24px; }
.page-head h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); }
.page-head svg { width: 150px; flex: none; }
.add-source { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; padding: 0 20px; }
.add-source summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: .95rem; list-style: none; }
.add-source summary::-webkit-details-marker { display: none; }
.add-source summary::before { content: "+  "; color: var(--lav-ink); }
.add-form { padding-bottom: 18px; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.add-grid input, .add-grid select { font: inherit; font-size: .88rem; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); outline: none; }
.add-grid input:focus, .add-grid select:focus { border-color: var(--lav-2); }
.add-grid button { font: inherit; font-weight: 700; font-size: .88rem; background: var(--ink); color: #fff; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.discover-msg { font-size: .88rem; margin: 12px 0 0; min-height: 1.1em; }
.discover-msg.ok { color: var(--ind); } .discover-msg.err { color: var(--pro); }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.src-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.src-table thead th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--faint); padding: 14px 18px; background: #faf9fc; }
.src-table td { padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.src-table tr:hover td { background: #fcfbfe; }
.src-table .name a { font-weight: 700; }
.src-table .name a:hover { color: var(--lav-ink); }
.st-home { color: var(--faint); margin-left: 6px; }
.st-kind { color: var(--muted); font-size: .7rem; font-weight: 600; background: var(--bg); border-radius: 6px; padding: 1px 7px; margin-left: 6px; }
.st-status { color: var(--muted); font-size: .85rem; }
.st-status small { display: block; color: var(--faint); }
.st-status.err { color: var(--pro); }

/* ---------- footer ---------- */
.footer { max-width: 1160px; margin: 0 auto; padding: 24px 28px 44px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--faint); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .hero-art { max-width: 300px; justify-self: center; order: -1; }
  .page-head svg { display: none; }
}
@media (max-width: 640px) {
  .header-inner { padding: 16px 18px; }
  .container { padding: 0 18px 56px; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .selects select { flex: 1; }
  .src-table thead { display: none; }
  .src-table td { display: block; border: 0; padding: 3px 18px; }
  .src-table tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.ph-wrap { width: 100%; height: 100%; }

/* ---------- analysis ---------- */
.an-hero { background: linear-gradient(135deg, #fbeef2 0%, #f1eefc 100%); }
.by-day-head { margin: 22px 0 10px; }
.day-legend { margin: 2px 0 0; font-size: .82rem; color: var(--muted); max-width: 60ch; }
.day-legend .lg-neg { color: var(--pro); font-weight: 600; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 20px; scrollbar-width: thin; }
.day { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 70px; padding: 9px 10px 10px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); text-align: center; transition: border-color .12s, background .12s; }
.day-wd { font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.day-date { font-size: .9rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.day-count { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 2px; min-height: 30px; justify-content: center; }
.day-count .dc-n { font-size: 1.25rem; font-weight: 800; line-height: 1; color: var(--ink); }
.day-count .dc-neg { font-size: .68rem; font-weight: 700; color: var(--pro); margin-top: 1px; }
.day-count .dc-none { font-size: .74rem; color: var(--line-2, #c9c9c9); font-weight: 600; }
.day:hover { border-color: var(--lav-2); }
.day.we { background: var(--surface-2, #faf8f4); }
.day.today .day-wd { color: var(--lav-ink); }
.day.today { border-color: var(--lav-2); }
.day.on, .day.on.we { background: var(--lav); border-color: var(--lav-ink); }
.day.on .day-wd { color: var(--lav-ink); }
.an-day h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.an-totals { color: var(--muted); margin: 0 0 20px; font-size: .92rem; }
.an-totals .pending { color: var(--faint); }
.an-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.an-summary { margin-bottom: 26px; background: linear-gradient(135deg, #fbfaff 0%, #fffaf6 100%); }
.an-summary h3, .an-section h3, .article-analysis h3 { font-size: 1rem; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
.an-summary p { margin: 0 0 10px; line-height: 1.7; }
.cite { display: inline-block; margin-left: 4px; font-size: .72rem; font-weight: 700; padding: 1px 8px;
  border-radius: 999px; background: var(--lav); color: var(--lav-ink); vertical-align: 1px; }
.cite:hover { background: var(--lav-2); }
.fine { font-size: .78rem; color: var(--faint); margin: 6px 0 0 !important; }
.an-section { margin-bottom: 28px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.link-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px; font-size: .9rem; }
.li-k { font-size: .72rem; font-weight: 700; color: var(--lav-ink); }
.li-v { color: var(--muted); font-size: .84rem; }
.li-v a:hover { color: var(--lav-ink); }
.narrative { margin-bottom: 12px; padding: 0 22px; }
.narrative summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.narrative summary::-webkit-details-marker { display: none; }
.nar-title { font-weight: 800; }
.nar-count { font-size: .82rem; color: var(--muted); background: var(--bg); padding: 3px 10px; border-radius: 999px; }
.narrative[open] { padding-bottom: 8px; }
.quote { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg); }
.quote blockquote { margin: 0 0 8px; font-size: .95rem; line-height: 1.6; color: var(--ink); }
.quote figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.voice { padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.v-outlet { border-color: var(--rose-2); color: var(--pro); }
.v-reported_critically { border-color: var(--mint-2); color: var(--ind); }
.art-link { font-weight: 600; color: var(--ink); }
.art-link:hover { color: var(--lav-ink); }
.quote .art-link { font-size: .8rem; }
.an-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.entity-list, .outlet-list, .art-list { list-style: none; margin: 0; padding: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.entity-list li, .outlet-list li, .art-list li { padding: 12px 16px; border-top: 1px solid var(--line); }
.entity-list li:first-child, .outlet-list li:first-child, .art-list li:first-child { border-top: 0; }
.e-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.e-side { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--bg); padding: 1px 8px; border-radius: 999px; }
.e-meta { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.outlet-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.o-arts { flex-basis: 100%; font-size: .84rem; }
.art-list li { display: flex; gap: 12px; align-items: flex-start; }
.tone { flex: none; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--unk-bg); color: var(--unk); }
.t-negative { background: var(--pro-bg); color: var(--pro); }
.t-mixed { background: var(--peach); color: #b06a44; }
.t-neutral { background: var(--neu-bg); color: var(--neu); }
.t-positive { background: var(--ind-bg); color: var(--ind); }
.article-analysis { margin: 8px 0 24px; background: #fdfcff; }
.aa-line { display: flex; gap: 10px; align-items: baseline; margin: 0 0 14px; color: var(--muted); }
.aa-actors { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.actor { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); }
.actor.p-negative { background: var(--pro-bg); color: var(--pro); }
.actor.p-positive { background: var(--ind-bg); color: var(--ind); }
code { font-size: .9em; background: var(--lav); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 760px) { .an-cols { grid-template-columns: 1fr; } }

/* ---------- analysis overview ---------- */
.overview { margin-bottom: 34px; }
.ov-head, .by-day { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ov-head h2, .by-day { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.ov-range { font-size: .85rem; color: var(--faint); }
.ov-wait { color: var(--muted); }
.chart-card { margin-bottom: 14px; padding-bottom: 12px; }
.chart-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-top h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-neg { background: #c4567a; } .sw-other { background: #8a7be0; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick, .chart .xl { font-size: 11px; fill: var(--faint); font-family: inherit; }
.chart .seg-neg { fill: #c4567a; }
.chart .seg-other { fill: #8a7be0; }
.chart .hit { fill: transparent; }
.chart .col { outline: none; cursor: pointer; }
.chart .col:hover .hit, .chart .col:focus-visible .hit { fill: rgba(42, 39, 51, .045); }
.chart .col.sel .hit { fill: rgba(138, 123, 224, .10); }
.chart .col.sel .xl { fill: var(--ink); font-weight: 700; }
.tip { position: absolute; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .78rem; font-weight: 600;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; z-index: 2; }
.table-view { margin-top: 6px; font-size: .85rem; }
.table-view summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table-view th, .table-view td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); }
.table-view th { font-size: .75rem; color: var(--faint); }
.ov-lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ov-lists h3 { font-size: .95rem; font-weight: 800; margin: 0 0 8px; }
.rank { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rank li { position: relative; padding: 8px 34px 8px 0; border-top: 1px solid var(--line); }
.rank li:first-child { border-top: 0; }
.rank .r-n { position: absolute; right: 0; top: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ov-note { margin-top: 10px !important; }
.by-day { margin-top: 6px; }
.an-day-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn-soft { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; font-size: .86rem; font-weight: 700;
  background: var(--lav); color: var(--ink); }
.btn-soft:hover { background: var(--lav-2); }

@media (max-width: 900px) { .ov-lists { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .nav { gap: 2px; }
  .nav a { padding: 7px 10px; font-size: .84rem; }
  .logo { width: 32px; height: 32px; }
  .wordmark { font-size: 1.15rem; }
  .page-head { padding: 20px 18px; border-radius: 20px; }
  .page-head h1 { font-size: 1.4rem; }
  .hero { border-radius: 20px; }
  .ov-lists { grid-template-columns: 1fr; }
  .an-card { padding: 14px 16px; }
  .narrative { padding: 0 16px; }
  .an-day h2 { font-size: 1.2rem; }
  .an-totals { font-size: .85rem; }
  .links-grid { grid-template-columns: 1fr; }
  .quote { padding: 10px 12px; }
  .quote blockquote { font-size: .92rem; }
  .day { min-width: 62px; padding: 8px 8px 9px; }
  .footer { flex-direction: column; }
}

.chart-mob { display: none; }
.chart-mob .xl.alt { display: none; }
@media (max-width: 640px) {
  .chart-desk { display: none; }
  .chart-mob { display: block; }
}

@media (max-width: 640px) {
  .link-item { padding: 10px 12px; gap: 1px; }
  .rank li { padding: 7px 34px 7px 0; }
}

/* ---------- header live indicator ---------- */
.header-right { display: flex; align-items: center; gap: 14px; }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 999px;
  background: var(--lav); color: var(--lav-ink); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.live.analyzing { background: var(--mint); color: var(--ind); }
.live-eye { width: 20px; height: 13px; border-radius: 50%; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.live-pupil { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live.scraping .live-pupil { animation: scan 1.5s ease-in-out infinite; }
.live.analyzing .live-pupil { animation: blink 1.6s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
@keyframes blink { 0%,45%,100% { transform: scaleY(1); } 50% { transform: scaleY(.2); } }
@media (max-width: 640px) { .live-text { display: none; } .live { padding: 5px; } }
@media (prefers-reduced-motion: reduce) { .live-pupil { animation: none !important; } }

/* ---------- status page ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi-num { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.kpi-sub { font-size: 1rem; color: var(--faint); font-weight: 600; }
.kpi-lbl { font-size: .82rem; color: var(--muted); }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.st-card, .an-card { }
.an-card h3 { margin: 0 0 12px; font-size: 1rem; font-weight: 800; }
.st-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.st-dl dt { color: var(--muted); font-size: .88rem; }
.st-dl dd { margin: 0; font-weight: 600; font-size: .9rem; }
.badge-run { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.r-ok { background: var(--ind-bg); color: var(--ind); }
.r-error { background: var(--pro-bg); color: var(--pro); }
.r-running { background: var(--neu-bg); color: var(--neu); }
.st-failing { margin-bottom: 20px; }
.fail-list { list-style: none; margin: 0; padding: 0; }
.fail-list li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.fail-list li:first-child { border-top: 0; }
.fail-when { color: var(--faint); font-size: .8rem; }
.fail-err { flex-basis: 100%; color: var(--pro); font-size: .82rem; }
.runs-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.runs-table th { text-align: left; font-size: .74rem; color: var(--faint); padding: 6px 10px; }
.runs-table td { padding: 8px 10px; border-top: 1px solid var(--line); }
.runs-stats { color: var(--muted); }
@media (max-width: 760px) { .kpi-row { grid-template-columns: 1fr 1fr; } .st-grid { grid-template-columns: 1fr; } }

/* ---------- bar lists (countable) ---------- */
.h-hint { font-size: .72rem; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-item { padding: 10px 0; border-top: 1px solid var(--line); }
.bar-item:first-child { border-top: 0; }
.bar-top { display: flex; align-items: center; gap: 8px; }
.bar-top b { font-weight: 700; }
.bar-top .e-side { font-size: .7rem; font-weight: 600; color: var(--muted); background: var(--bg); padding: 1px 7px; border-radius: 999px; }
.bar-n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); font-size: .95rem; }
.bar-track { display: block; height: 4px; margin: 7px 0 3px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; min-width: 2px; background: #8c7fbf; }
.bar-item .e-meta { font-size: .8rem; color: var(--muted); }
.bar-item .o-arts a:hover { color: var(--lav-ink); }
/* narrative summary with inline bar */
.narrative summary { gap: 14px; }
.narrative .bar-track { flex: 1; max-width: 200px; margin: 0; }
.nar-count { min-width: 1.5em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .narrative .bar-track { display: none; } }

/* ============================================================
   RESTRAINT LAYER — fewer pills/bubbles, clearer hierarchy
   ============================================================ */

/* page masthead (replaces the pastel page-head illustrations) */
.masthead { margin: 6px 0 26px; padding-bottom: 16px; border-bottom: 1px solid var(--rule-2); }
.masthead h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.025em; margin: 0 0 5px; line-height: 1.1; }
.masthead-sub { color: var(--muted); font-size: .95rem; margin: 0; max-width: 62ch; }

/* nav: text links, not filled pills */
.nav { gap: 22px; }
.nav a { padding: 4px 0; border-radius: 0; background: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; transition: color .15s; }
.nav a:hover { background: none; color: var(--ink); }
.nav a.active { background: none; color: var(--ink); border-bottom-color: var(--ink); }

/* stance label: a small colour mark + plain coloured text (no pill background) */
.pill, .stance { display: inline-flex; align-items: center; gap: 5px; padding: 0 !important; border-radius: 0 !important;
  background: none !important; font-size: .78rem; font-weight: 600; letter-spacing: 0; }
.pill::before, .stance::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex: none; }
.pill.pro, .stance.pro { color: var(--pro); } .pill.ind, .stance.ind { color: var(--ind); }
.pill.neu, .stance.neu { color: var(--neu); } .pill.unk, .stance.unk { color: var(--unk); }

/* filters: text tabs, quiet selects, calmer search */
.tabs { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.tab { padding: 4px 0; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab .dot { width: 7px; height: 7px; border-radius: 2px; }
.selects select { border-radius: 7px; background: transparent; border: 1px solid var(--rule-2); font-weight: 500; }
.search input { border-radius: 8px; }
.search button { border-radius: 8px; }

/* cards: flat, quiet, less rounding */
.card { border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.card:hover { border-color: var(--rule-2); box-shadow: none; }
.card-media { border-radius: 0; aspect-ratio: 16 / 9; }
.meta-top { gap: 10px; }
.meta-top .src { font-weight: 600; }
.meta-top .city { color: var(--faint); }
.card-title { font-size: 1.1rem; line-height: 1.3; }
.card-foot a:hover, .card-title a:hover { color: var(--ink); }

/* analysis / status: soften the boxes, remove shadows */
.an-card { box-shadow: none; border: 1px solid var(--line); border-radius: 8px; }
.add-source, .table-wrap, .src-table, .kpi { box-shadow: none; }
.kpi { border-radius: 8px; }

/* summary citations: quiet underlined links, not lavender pills */
.cite { background: none !important; border-radius: 0; padding: 0; margin-left: 5px; color: var(--muted);
  font-weight: 600; font-size: .8rem; text-decoration: underline; text-underline-offset: 2px; }
.cite:hover { color: var(--ink); }

/* status run badges: small coloured text, not pills */
.badge-run { background: none !important; padding: 0 !important; border-radius: 0 !important; font-size: .76rem; font-weight: 700; }
.r-ok { color: var(--ind); } .r-error { color: var(--pro); } .r-running { color: var(--neu); }

/* section headings: consistent, a touch stronger as anchors */
.an-section > h3, .ov-head h2, .by-day { font-weight: 800; letter-spacing: -.01em; }

/* kill leftover decorative placeholder styles if referenced anywhere */
.ph, .card-ph, .ph-wrap { display: none; }
.card-media { background: #efedf0; }
.live { background: var(--bg); color: var(--muted); border: 1px solid var(--rule-2); font-weight: 600; }
.live.analyzing { background: var(--bg); color: var(--muted); }

/* ---------- richer per-article analysis ---------- */
.aa-narrative { margin: 0 0 14px; color: var(--ink); }
.aa-k { font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .03em; text-transform: uppercase; margin-right: 8px; }
.aa-block { margin: 16px 0 0; }
.aa-block .aa-k { display: block; margin: 0 0 8px; }
.rel-list, .ent-list { list-style: none; margin: 0; padding: 0; }
.rel-list li { padding: 6px 0; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.5; }
.rel-list li:first-child { border-top: 0; }
.rel-t { font-weight: 600; }
.rel-t.s-negative { color: var(--pro); } .rel-t.s-positive { color: var(--ind); } .rel-t.s-neutral { color: var(--muted); }
.rel-q { color: var(--muted); font-style: italic; }
.ent-list li { padding: 7px 0; border-top: 1px solid var(--line); }
.ent-list li:first-child { border-top: 0; }
.ent-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--unk); margin-right: 7px; vertical-align: 1px; }
.ent-dot.p-negative { background: var(--pro); } .ent-dot.p-positive { background: var(--ind); } .ent-dot.p-neutral { background: var(--neu); }
.ent-role { color: var(--muted); font-size: .85rem; }
.ent-about { color: var(--muted); font-size: .88rem; margin: 2px 0 0 14px; }
.aa-tags { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.tag { font-size: .82rem; color: var(--muted); }
.tag::before { content: "#"; color: var(--faint); }

/* analysis flag on news cards */
.aflag { font-weight: 600; font-size: .78rem; display: inline-flex; align-items: center; gap: 5px; }
.aflag:not(.done)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.aflag.done { color: var(--faint); font-weight: 500; }
.aflag.t-negative { color: var(--pro); }
.aflag.t-positive { color: var(--ind); }
.aflag.t-neutral, .aflag.t-mixed { color: var(--neu); }
.aflag.t-not_applicable { color: var(--faint); }

/* de-bubble the tone badge and voice chip (consistency with restraint layer) */
.tone { background: none !important; padding: 0 !important; border-radius: 0 !important; font-weight: 700; font-size: .82rem;
  display: inline-flex; align-items: center; gap: 6px; }
.tone::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.t-negative { color: var(--pro); } .t-positive { color: var(--ind); } .t-neutral { color: var(--neu); }
.t-mixed { color: #b06a44; } .t-not_applicable { color: var(--faint); }
.aa-line { gap: 12px; align-items: baseline; }
.voice { background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important;
  color: var(--muted); font-weight: 500; }
.v-outlet { color: var(--pro); }

/* ---------- status timeline ---------- */
.timeline-sec h3 { font-weight: 800; margin: 0 0 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl-item { position: relative; display: flex; gap: 14px; padding: 0 0 18px 16px; border-left: 2px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--rule-2); }
.tl-item.j-scrape .tl-dot { border-color: var(--neu); }
.tl-item.j-analysis .tl-dot { border-color: #8c7fbf; }
.tl-item.j-analysis_sync .tl-dot { border-color: var(--ind); }
.tl-item.s-error .tl-dot { border-color: var(--pro); background: var(--pro); }
.tl-item.s-running .tl-dot { border-color: var(--neu); background: var(--neu); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tl-head b { font-weight: 700; }
.tl-when { color: var(--faint); font-size: .82rem; }
.tl-desc { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.tl-item.s-error .tl-desc { color: var(--pro); }
