:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #16191f;
  --muted: #5f6774;
  --faint: #8c939e;
  --accent: #1f4fd1;
  --accent-soft: #e8eefc;
  --direct: #b42318;
  --direct-soft: #fdecea;
  --related: #8a5a00;
  --related-soft: #fdf3dc;
  --ok: #157f3b;
  --ok-soft: #e6f4ea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 10px;
  font-family: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1a1d24;
    --surface-2: #232731;
    --border: #2e333d;
    --text: #e8eaee;
    --muted: #a3aab5;
    --faint: #7a828e;
    --accent: #7ea2ff;
    --accent-soft: #1f2a48;
    --direct: #ff8a80;
    --direct-soft: #3a1f1e;
    --related: #f0c063;
    --related-soft: #352b16;
    --ok: #6fd393;
    --ok-soft: #173323;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; font-size: 15px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.role-pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.topbar .spacer { flex: 1; }
.date-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }

.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 120px; }

/* Headings */
.client-head h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; }
.client-head .sub { color: var(--muted); margin-top: 2px; }
.client-head .date { color: var(--faint); font-size: 14px; margin-top: 6px; }

/* Status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.status.draft { background: var(--surface-2); color: var(--muted); }
.status.live { background: var(--ok-soft); color: var(--ok); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Coverage summary */
.coverage { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.cov-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.cov-card.empty { background: transparent; box-shadow: none; border-style: dashed; }
.cov-card .paper { font-size: 13px; color: var(--muted); font-weight: 500; }
.cov-card .count { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.cov-card.empty .count { font-size: 15px; font-weight: 500; color: var(--faint); margin-top: 8px; }
.cov-card .of { font-size: 13px; color: var(--faint); font-weight: 500; }
a.cov-card { color: inherit; display: block; }
a.cov-card:hover { text-decoration: none; border-color: var(--accent); }

/* Toolbar (admin filters) */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 6px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.search { flex: 1; min-width: 200px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.bulk { margin-left: auto; display: flex; gap: 6px; }
.btn { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 500; font-size: 14px; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
/* A commit button with nothing to commit: plainly grey, not a faded blue. */
.btn.primary:disabled, .btn.primary:disabled:hover { opacity: 1; background: var(--surface-2); border-color: var(--border); color: var(--faint); filter: none; }

/* Paper sections */
.paper-section { margin-top: 30px; }
.paper-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--text); margin-bottom: 14px; }
.paper-head h2 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.paper-head .n { color: var(--muted); font-size: 14px; }
.paper-empty { color: var(--faint); font-size: 14px; padding: 6px 0 4px; }

/* Story cards */
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.tag.person { background: var(--direct-soft); color: var(--direct); }
.tag.related { background: var(--related-soft); color: var(--related); }
.meta { color: var(--muted); font-size: 13px; }
.chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin: 0 4px 4px 0; }

.review-card { display: grid; grid-template-columns: 170px 1fr auto; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); transition: border-color .15s, opacity .15s; }
.review-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.review-card .thumb { width: 170px; max-height: 210px; overflow: hidden; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); cursor: zoom-in; }
.review-card .thumb img { width: 100%; }
.review-card .body { min-width: 0; }
.review-card .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.review-card .snippet { color: var(--muted); font-size: 13.5px; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.review-card .headline { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); margin-top: 2px; }
.review-card .headline:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.review-card .links { font-size: 13px; margin-top: 8px; display: flex; gap: 14px; }

/* Include switch */
.switch { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sticky action bar */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 20; }
.actionbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.actionbar .count { font-weight: 600; }
.actionbar .save-state { color: var(--faint); font-size: 13px; }
.actionbar .spacer { flex: 1; }

/* Client report */
.client .page { max-width: 900px; }
.lede { font-size: 17px; color: var(--muted); margin: 18px 0 0; }
.lede b { color: var(--text); }
.story { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.story h3 { font-size: 18px; margin: 8px 0 4px; letter-spacing: -.01em; line-height: 1.35; }
.story .clip { margin-top: 12px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.story .clip img { margin: 0 auto; max-height: 720px; width: auto; }
.story .foot { margin-top: 10px; font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state h2 { color: var(--text); font-size: 20px; margin: 0 0 6px; }

/* Index */
.client-list { display: grid; gap: 12px; margin-top: 18px; }
.client-row { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); flex-wrap: wrap; }
.client-row .who { flex: 1; min-width: 220px; }
.client-row .who b { display: block; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10, 12, 16, .86); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 4px; }
.lightbox-close { position: absolute; top: 14px; right: 18px; font-size: 30px; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; }

/* Sentiment palette: pale = found, strong + border = selected for the client */
:root {
  --pos: #157f3b; --pos-pale: #eef8f1; --pos-strong: #c9ecd5;
  --neu: #8a6100; --neu-pale: #fdf8ea; --neu-strong: #f8e3a6;
  --neg: #b42318; --neg-pale: #fdf1f0; --neg-strong: #f7cdc9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --pos: #6fd393; --pos-pale: #15281c; --pos-strong: #1f4a2e;
    --neu: #f0c063; --neu-pale: #2a2414; --neu-strong: #4d3f17;
    --neg: #ff8a80; --neg-pale: #2c1817; --neg-strong: #5a2522;
  }
}

/* Coverage boxes (table cells, legend) and paper chips share one scheme */
.cell { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: 13px; border: 2px solid transparent; }
.cell.none { color: var(--faint); font-weight: 500; }
.cell.found.s-positive, .pchip.found.s-positive { background: var(--pos-pale); color: var(--pos); }
.cell.found.s-neutral,  .pchip.found.s-neutral  { background: var(--neu-pale); color: var(--neu); }
.cell.found.s-negative, .pchip.found.s-negative { background: var(--neg-pale); color: var(--neg); }
.cell.picked.s-positive, .pchip.picked.s-positive { background: var(--pos-strong); color: var(--pos); border-color: var(--pos); }
.cell.picked.s-neutral,  .pchip.picked.s-neutral  { background: var(--neu-strong); color: var(--neu); border-color: var(--neu); }
.cell.picked.s-negative, .pchip.picked.s-negative { background: var(--neg-strong); color: var(--neg); border-color: var(--neg); }

.pchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 2px solid transparent; }
.pchip.none { background: var(--surface-2); color: var(--faint); font-weight: 500; text-decoration: line-through; }
.pchip.none::before { content: "✗"; text-decoration: none; display: inline-block; }
.pchip.found::before { content: "●"; font-size: 10px; }
.pchip.picked::before { content: "✓"; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 22px 0 8px; font-size: 13px; color: var(--muted); }
.legend .cell { min-width: 26px; height: 22px; font-size: 12px; }
.legend .sep { width: 1px; height: 18px; background: var(--border); margin: 0 8px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 4px; }
.sw.s-positive { background: var(--pos); } .sw.s-neutral { background: var(--neu); } .sw.s-negative { background: var(--neg); }

/* Themes x papers table */
.matrix-wrap { margin: 0 0 6px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.matrix { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.matrix th, .matrix td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.matrix th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.matrix tr:last-child td { border-bottom: 0; }
.matrix .theme-col { text-align: left; white-space: normal; min-width: 260px; }
.matrix td.theme-col a { color: var(--text); }
.tnum { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 6px; background: var(--text); color: var(--surface); font-size: 12px; font-weight: 700; margin-right: 8px; padding: 0 5px; }
.dot-direct { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--direct); margin-right: 7px; vertical-align: 1px; }

/* Theme panels: each theme is its own enclosed box */
.theme-panel { margin-top: 34px; background: var(--surface-2); border: 1px solid var(--border); border-left: 6px solid var(--neu); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.theme-panel.s-positive { border-left-color: var(--pos); }
.theme-panel.s-negative { border-left-color: var(--neg); }
.theme-band { background: var(--surface); padding: 14px 18px 12px; border-bottom: 1px solid var(--border); }
.theme-kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.theme-kicker .tnum { margin-right: 2px; }
.theme-kicker .tag { margin-left: 6px; }
.theme-title { width: 100%; font-size: 20px; font-weight: 700; letter-spacing: -.01em; border: 1px solid transparent; border-radius: 7px; padding: 4px 8px; margin-left: -8px; background: transparent; }
.theme-title:hover { border-color: var(--border); }
.theme-title:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); background: var(--surface); }
.theme-title::placeholder { color: var(--faint); font-weight: 600; }
.theme-band h2 { font-size: 20px; margin: 2px 0 0; letter-spacing: -.01em; line-height: 1.35; }
.theme-summary { color: var(--muted); font-size: 14px; margin: 2px 0 6px; }
.carried { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.theme-stories { padding: 14px; }
.theme-stories .review-card:last-child, .theme-stories .story:last-child { margin-bottom: 0; }
.paper-name { font-size: 14px; }
.story-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.move { margin-left: auto; font-size: 13px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); max-width: 240px; }

/* Sentiment picker on each clipping */
.sentiment { margin-left: auto; font-size: 12.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); }
.sentiment.s-positive { background: var(--pos-pale); color: var(--pos); border-color: var(--pos); }
.sentiment.s-neutral { background: var(--neu-pale); color: var(--neu); border-color: var(--neu); }
.sentiment.s-negative { background: var(--neg-pale); color: var(--neg); border-color: var(--neg); }

/* Superadmin: newspaper assignment */
.assign-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-top: 20px; box-shadow: var(--shadow); }
.assign-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.assign-head h2 { font-size: 19px; margin: 0; }
.paper-picks { margin-top: 12px; display: grid; gap: 10px; }
.paper-picks.disabled { opacity: .45; pointer-events: none; }
.paper-pick { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.paper-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.edition-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-left: 24px; }
.edition-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.edition-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.assign-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.assign-actions .spacer { flex: 1; }

/* Newspaper logos in place of names (full name on hover). A white backing keeps
   dark logos readable in dark mode. */
.plogo { --h: 20px; height: calc(var(--h) * var(--f, 1)); width: auto; vertical-align: middle; }
.pqual { font-size: 12px; color: var(--muted); vertical-align: middle; }
.cov-card .paper { min-height: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.matrix th .plogo { --h: 16px; }
.pchip .plogo { --h: 15px; }
.pchip.none { text-decoration: none; }
.pchip.none .plogo { filter: grayscale(1); opacity: .45; }
.paper-name .plogo { --h: 19px; }
.paper-toggle .plogo { --h: 20px; }

.hidden-by-filter { display: none !important; }

@media (max-width: 720px) {
  .page { padding: 18px 16px 140px; }
  .topbar { position: static; }
  .topbar-inner { padding: 10px 16px; gap: 10px; }
  .coverage { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cov-card { padding: 10px 12px; }
  .cov-card .count { font-size: 21px; }
  .review-card { grid-template-columns: 1fr auto; }
  .review-card .thumb { grid-column: 1 / -1; width: 100%; max-height: 260px; order: 3; }
  .bulk { margin-left: 0; }
  .client-head h1 { font-size: 21px; }
}

/* Stories added by link (papers newsmon doesn't collect) */
.tag.manual { background: var(--surface-2); color: var(--muted); }
.review-card .link-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; color: var(--muted); font-size: 13px; text-decoration: none; cursor: pointer; }
.review-card .link-thumb .link-icon { font-size: 28px; color: var(--accent); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
.linkish:hover { color: var(--text, inherit); }
.link-note { margin: 6px 0 10px; color: var(--muted); }
.manual-add { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 24px 0 90px; }
.manual-add h2 { font-size: 17px; margin: 0 0 4px; }
.manual-add .hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.manual-add form { display: flex; flex-direction: column; gap: 10px; }
.manual-add label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; flex: 1; }
.manual-add label.narrow { flex: 0 0 90px; }
.manual-add label.grow { flex: 3; }
.manual-add .opt { color: var(--muted); font-weight: 400; }
.manual-add input, .manual-add select, .manual-add textarea { font: inherit; font-weight: 400; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.manual-add .row { display: flex; gap: 12px; flex-wrap: wrap; }
.manual-add .row.end { justify-content: flex-end; align-items: center; }
.manual-add .form-msg { color: var(--muted); font-size: 13px; margin-right: auto; }

/* Superadmin: admin activity */
.activity-summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.activity-summary .tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; color: var(--muted); }
.activity-summary .tile .n { font-size: 22px; font-weight: 700; color: var(--text, inherit); margin-right: 4px; }
.activity-summary .tile.live { border-left: 4px solid #1a9c55; }
.activity-summary .tile.progress { border-left: 4px solid #d99a00; }
.activity-summary .tile.todo { border-left: 4px solid #c23a3a; }
table.activity { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.activity th, table.activity td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
table.activity th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
table.activity .num { text-align: right; font-variant-numeric: tabular-nums; }
table.activity .meta { color: var(--muted); font-size: 12px; }
table.activity tr.papers-row td { padding-top: 0; border-bottom: 1px solid var(--border); }
table.activity details summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.act-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.act-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.act-status.st-published .dot { background: #1a9c55; }
.act-status.st-changed .dot { background: #1f4fd1; }
.act-status.st-in_progress .dot { background: #d99a00; }
.act-status.st-not_started .dot { background: #c23a3a; }
.paper-counts { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 10px; }
.paper-counts .pc { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.paper-counts .pc .counts { color: var(--muted); }
.paper-counts .pc.none-picked { opacity: .6; }
.page > .hint { color: var(--muted); font-size: 13px; margin-top: 12px; }
table.activity td:last-child { white-space: nowrap; }

/* Top 10 stories page */
.top10-link { margin-top: 28px; }
.top10-link h2 { font-size: 18px; margin: 0 0 4px; }
ol.top10 { list-style: none; padding: 0; margin: 0; }
.top10-item { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.top10-item .rank { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.top10-item h3 { margin: 2px 0 6px; font-size: 17px; }
.top10-item .hook { margin: 0 0 8px; font-style: italic; }
.top10-item .why { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.top10-item .sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.top10-item .sources .pchip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.top10-item .sources .pg { font-size: 12px; color: var(--muted); }

/* Admin: stories left out as advertisements */
.removed-ads { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; margin: 24px 0 0; }
.removed-ads summary { cursor: pointer; font-weight: 600; }
.removed-ads summary .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.removed-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.removed-row:first-of-type { margin-top: 10px; }
.removed-row .thumb { width: 110px; max-height: 120px; overflow: hidden; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; }
.removed-row .thumb img { width: 100%; }
.removed-row .top { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.removed-row .meta, .removed-row .snippet { color: var(--muted); font-size: 13px; }

/* Sign-in, set-password and people pages */
.signout { display: flex; align-items: center; gap: 10px; margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 14px; }
.linkish:hover { text-decoration: underline; }
.linkish.danger { color: #c0392b; }
.auth-card { max-width: 380px; margin: 48px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { margin: 0; font-size: 22px; }
.auth-card label, .person-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.auth-card input, .person-fields input, .person-fields select, .invite-url input { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; }
.auth-card .btn { align-self: flex-start; }
.auth-error { background: #fdecea; color: #a12a1f; border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.invite-box { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.invite-url { display: flex; gap: 8px; margin-top: 8px; }
.invite-url input { flex: 1; min-width: 0; font-size: 13px; }
.people-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.people-actions form { margin: 0; }
.person-form { margin-top: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.person-form h2 { margin: 0; font-size: 18px; }
.person-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.person-clients { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.person-clients legend { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.person-form .btn { align-self: flex-start; }
