.sd {
  --sd-paper: var(--reader-paper); --sd-surface: var(--reader-paper);
  --sd-panel: var(--reader-panel); --sd-console: var(--reader-paper);
  --sd-ink: var(--reader-ink); --sd-muted: var(--reader-muted);
  --sd-line: var(--reader-line); --sd-line-strong: var(--reader-border);
  --sd-acid: var(--reader-active); --sd-link: var(--reader-accent);
  --nb-accent: var(--reader-accent); --nb-side-w: 218px;
  font-family: var(--sd-sans); font-size: 16px; line-height: 1.5;
  background: var(--sd-paper); -webkit-font-smoothing: antialiased;
}
.sd button, .sd input, .sd select, .sd textarea { font: 400 14px/1.5 var(--sd-sans); }
.sd button { cursor: pointer; }
.sd button:disabled { cursor: default; }
.sd :focus-visible { outline: 2px solid var(--nb-accent); outline-offset: 3px; }
.nb-top { height: 60px; gap: 32px; padding: 0 24px; border-color: var(--sd-line); background: var(--sd-paper); }
.sd .nb-brand { color: var(--sd-ink); gap: 9px; font-size: 18px; }
.nb-brand b { font-weight: 650; letter-spacing: -.04em; }
.nb-brand img { filter: grayscale(1); opacity: .8; }
.nb-build { border: 0; padding: 0; font-size: 12px; opacity: .65; }
.nb-nav { gap: 4px; }
.sd .nb-nav button { padding: 7px 13px; border-radius: var(--reader-radius); font-weight: 500; color: var(--sd-muted); }
.sd .nb-nav button:hover { background: var(--reader-hover); color: var(--sd-ink); }
.sd .nb-nav button[aria-current="page"] { background: var(--sd-panel); color: var(--sd-ink); font-weight: 600; }
.nb-status { font-size: 12px; }
.sd .sd-menu__btn { padding: 6px 10px; border: 1px solid var(--sd-line-strong); border-radius: var(--reader-radius); background: var(--sd-surface); color: var(--sd-ink); white-space: nowrap; font-size: 13px; }
.sd .sd-menu__btn:hover { background: var(--reader-hover); }
.sd .sd-menu__pop { border-radius: 10px; background: var(--sd-surface); border-color: var(--sd-line); box-shadow: 0 12px 32px #1a202c12; }
.sd .sd-menu__group button, .sd .sd-menu__group a { padding: 10px 14px; font-size: 14px; }
.sd-menu__who, .sd-menu__who b { font: 400 13px/1.6 var(--sd-sans); }
.nb-app { min-height: calc(100vh - 60px); }
.nb-side { top: 60px; min-height: calc(100vh - 60px); max-height: calc(100vh - 60px); padding: 18px 12px 24px; }
.nb-side__group { margin: 22px 10px 8px; font: 500 12px/1.5 var(--sd-sans); letter-spacing: .04em; }
.sd .nb-side__item { min-height: 34px; padding: 6px 10px; border-radius: 6px; font-size: 14px; font-weight: 400; line-height: 1.5; gap: 9px; }
.sd .nb-side__item:hover { background: var(--reader-active); }
.sd .nb-side__item.is-on { background: var(--reader-active); color: var(--sd-ink); font-weight: 550; }
.nb-side__item i { width: 6px; height: 6px; border-radius: 50%; opacity: .65; }
.nb-side__item em { font: 400 12px/1.5 var(--sd-sans); font-variant-numeric: tabular-nums; }
.nb-main > section { padding: 0 32px; }
.nb-toolbar { top: 60px; min-height: 72px; padding: 16px 0; gap: 20px; }
.sd .nb-toolbar input[type="search"] { max-width: 400px; min-width: 0; padding: 9px 12px; border: 1px solid var(--sd-line); background: var(--sd-panel); border-radius: var(--reader-radius); font-size: 14px; }
.nb-toolbar__count { font: 400 13px/1.5 var(--sd-sans); }
.nb-review-filter { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:10px 0; }
.nb-review-filter[hidden] { display:none; }
.sd .nb-review-toggle { padding:7px 12px; border:1px solid var(--reader-border); border-radius:var(--reader-button-radius); background:var(--sd-paper); color:var(--sd-ink); font:500 13px/1.5 var(--sd-sans); cursor:pointer; }
.sd .nb-review-toggle[aria-pressed="true"] { background:var(--reader-primary); border-color:var(--reader-primary); color:var(--reader-on-primary); }
.nb-review-toggle:focus-visible { outline:2px solid var(--nb-accent); outline-offset:2px; }
.nb-review-hint,.nb-recommendation { color:var(--sd-muted); font:400 12px/1.6 var(--sd-sans); }
.nb-recommendation { margin:6px 0; }
.nb-day { padding: 24px 0 10px 4px; font: 500 12px/1.5 var(--sd-sans); text-transform: none; letter-spacing: .02em; }
/* Time stays on the left; category no longer paints a heavy continuous axis. */
.nb-row { grid-template-columns: 48px 142px minmax(0, 1fr); gap: 0 22px; padding: 0 4px; border-color: var(--sd-line); }
.nb-row > * { padding-top: 17px; padding-bottom: 17px; }
.nb-row:hover { background: var(--reader-hover); }
.nb-row .nb-rail, .nb-subrow .nb-rail { display: none; }
.nb-time, .nb-row--hot .nb-time { order: -1; padding-top: 20px; color: var(--sd-muted); font: 400 12px/1.5 var(--sd-sans); font-variant-numeric: tabular-nums; }
.nb-src { padding-top: 20px; font-size: 13px; gap: 7px; }
.nb-ico { background: transparent; border-radius: 4px; }
.sd a.nb-title, .sd .nb-row--must a.nb-title { color: var(--sd-ink); font-size: 16px; font-weight: 550; line-height: 1.6; letter-spacing: -.01em; }
.sd a.nb-title:hover { color: var(--nb-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nb-excerpt { margin-top: 3px; font-size: 13px; line-height: 1.55; }
.nb-meta { margin-top: 7px; font-size: 12px; gap: 5px 12px; }
.sd .nb-chip { padding: 0; font: 400 12px/1.5 var(--sd-sans); }
.nb-first { color: var(--sd-muted); font-weight: 400; }
.sd .nb-dup { padding: 1px 7px; border: 0; border-radius: 5px; background: var(--sd-panel); font-size: 12px; font-weight: 400; }
.nb-row .sd-badge { border: 0; padding: 2px 6px; font-size: 12px; font-weight: 500; border-radius: 4px; }
.nb-sub { background: var(--sd-panel); }
.nb-subrow { grid-template-columns: 48px 142px minmax(0, 1fr); gap: 0 22px; padding: 5px 4px; font-size: 14px; }
.nb-subtime, .nb-subsrc { font-size: 12px; }
.sd .sd-edit { padding: 3px 8px; border: 1px solid var(--sd-line-strong); border-radius: 5px; background: var(--sd-surface); font-size: 12px; font-weight: 400; }
.sd .sd-edit--danger { color: #a7473e; }
.sd .sd-edit:hover { background: var(--sd-panel); color: var(--sd-ink); }
.sd .sd-primary { border: 0; border-radius: var(--reader-radius); padding: 9px 16px; background: var(--sd-ink); color: var(--sd-surface); font-weight: 500; }
.sd-kicker { scroll-margin-top: 85px; font: 600 16px/1.6 var(--sd-sans); padding: 24px 0 12px; border-color: var(--sd-line); }
.sd-dashboard { border: 1px solid var(--sd-line); border-radius: var(--reader-radius); background: var(--sd-surface); overflow: hidden; }
.sd-dashboard__head { padding: 16px; border-bottom: 1px solid var(--sd-line); font: 550 14px/1.5 var(--sd-sans); }
.sd-dashboard__head em { font: 400 12px/1.5 var(--sd-sans); }
.sd-metric { padding: 20px; border-color: var(--sd-line); }
.sd-metric strong { font: 550 30px/1.2 var(--sd-sans); letter-spacing: -.04em; }
.sd-metric span { font: 400 12px/1.6 var(--sd-sans); text-transform: none; }
.sd-table { font-size: 14px; }
.sd-table th { font: 500 12px/1.5 var(--sd-sans); color: var(--sd-muted); background: var(--sd-panel); }
.sd-table td, .sd-table th { padding: 12px; border-bottom: 1px solid var(--sd-line); }
.sd-table td { line-height: 1.6; }
.sd .sd-genre-pill { padding: 6px 12px; border: 1px solid var(--sd-line); border-radius: 6px; background: var(--sd-surface); font-size: 13px; font-weight: 400; }
.sd .sd-genre-pill.is-on { background: var(--sd-acid); color: var(--sd-ink); border-color: var(--sd-line-strong); }
.sd-pattern { grid-template-columns: 48px 1fr; padding: 12px 0; }
.sd-pattern p { font-size: 14px; line-height: 1.7; }
.sd-pattern p.hl { color: var(--sd-muted); font-size: 13px; }
.sd-term { background: var(--sd-panel); border: 0; border-radius: 5px; font-weight: 400; }
.sd-modal__box { border: 1px solid var(--sd-line); border-radius: 12px; box-shadow: 0 20px 80px #0002; }
.sd-modal__head { padding: 18px; }
.sd-modal__body { padding: 18px; }
.sd .sd-modal__body input { border: 1px solid var(--sd-line-strong); border-radius: 6px; padding: 9px; font-size: 14px; }
.sd-modal__body span { font: 500 13px/1.5 var(--sd-sans); letter-spacing: 0; }
.nb-frame { height: calc(100vh - 60px); }
/* Shared page headings for staff workspaces. */
.nb-page-head { padding: 34px 0 24px; }
.nb-page-head h1 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.nb-page-head p { margin: 0; color: var(--sd-muted); font-size: 14px; }
.nb-reason { display: grid; gap: 5px; min-width: 150px; }
.sd .nb-reason select { border: 1px solid var(--sd-line); background: var(--sd-surface); border-radius: 5px; padding: 5px; max-width: 100%; font-size: 13px; }
.nb-reason small { color: var(--sd-muted); font-size: 12px; }
.nb-record-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.sd .nb-record-tools input { padding: 8px 12px; border: 1px solid var(--sd-line); border-radius: 6px; background: var(--sd-surface); min-width: 220px; }
@media (max-width: 1100px) {
  .nb-status, .nb-build { display: none; }
  .nb-top { gap: 18px; }
  .nb-main > section { padding: 0 22px; }
  .nb-row, .nb-subrow { grid-template-columns: 44px 112px minmax(0, 1fr); gap: 0 16px; }
}
@media (max-width: 800px) {
  .nb-top { height: auto; min-height: 60px; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 16px; }
  .nb-nav { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; padding-top: 8px; }
  .nb-right { gap: 8px; }
  .nb-app { grid-template-columns: 1fr; }
  .nb-side { position: static; min-height: 0; max-height: none; padding: 12px; gap: 4px; border-bottom: 1px solid var(--sd-line); }
  .nb-side__group { margin: 10px 8px 4px; }
  .sd .nb-side__item { min-height: 32px; }
  .nb-toolbar { position: static; flex-wrap: wrap; gap: 8px; min-height: 0; }
  .nb-toolbar__count { font-size: 12px; }
  .nb-row, .nb-subrow { grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; }
  .nb-time { grid-column: 1; grid-row: 1 / 3; }
  .nb-body { grid-column: 2; grid-row: 1; padding-bottom: 3px; }
  .nb-src { grid-column: 2; grid-row: 2; padding: 0 0 15px; }
  .nb-subsrc { display: none; }
  .nb-subbody { grid-column: 2; }
  .nb-main > section { padding: 0 16px; }
  .nb-page-head { padding-top: 24px; }
  .sd-metrics--3up { grid-template-columns: 1fr; }
  .sd-metrics--3up .sd-metric { border-right: 0; border-bottom: 1px solid var(--sd-line); }
  .sd-kicker { scroll-margin-top: 115px; }
}
.nb-table-scroll { overflow-x: auto; max-width: 100%; }
.sd-table td.num, .sd-table th.num { font-family: var(--sd-sans); font-variant-numeric: tabular-nums; }
#takedowns .sd-table th:nth-child(2), #takedowns .sd-table td:nth-child(2) { min-width: 260px; }
#takedowns .sd-table th { white-space: nowrap; }
.sd .nb-editbar select { font-size: 12px; border: 1px solid var(--sd-line); border-radius: 5px; background: var(--sd-surface); color: var(--sd-muted); max-width: 170px; }
.sd-note { border-left: 1px solid var(--sd-line); font-size: 13px; }
.nb-review-cards { display: grid; gap: 20px; }
.nb-review-card { padding: 20px; border: 1px solid var(--sd-line); border-radius: 10px; }
.nb-review-card__head a { font-size: 16px; line-height: 1.6; color: var(--sd-ink); font-weight: 550; text-decoration: none; }
.nb-review-signals { margin: 12px 0; color: var(--sd-muted); font-size: 13px; }
.nb-review-label { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; font-weight: 500; }
.sd .nb-review-label textarea { resize: vertical; width: 100%; min-height: 90px; padding: 12px; border: 1px solid var(--sd-line-strong); border-radius: 7px; color: var(--sd-ink); background: var(--sd-surface); font-size: 14px; line-height: 1.6; }
.nb-review-actions { display: flex; gap: 12px; justify-content: flex-end; }
.sd .nb-review-actions .sd-edit { font-size: 14px; padding: 9px 16px; }
.nb-review-feedback { font-size: 13px; color: var(--sd-muted); }
.nb-review-dialog { width: min(780px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; padding: 20px; border: 1px solid var(--sd-line); border-radius: 14px; color: var(--sd-ink); background: var(--sd-surface); }
.nb-review-dialog::backdrop { background: #20253055; }
.sd .nb-review-close { display: block; margin: 0 0 14px auto; padding: 4px 8px; border-radius: 5px; background: var(--sd-panel); color: var(--sd-muted); }
.nb-review-dialog .nb-review-card { border: 0; padding: 0; }
.nb-review-history:empty { display: none; }
.nb-review-turn { padding: 16px 0; border-top: 1px solid var(--sd-line); font-size: 14px; line-height: 1.7; }
.nb-review-turn strong { font-weight: 550; }
.nb-review-turn p { margin: 7px 0; white-space: pre-wrap; }
.nb-review-turn small { display: block; color: var(--sd-muted); font-size: 12px; }
.nb-review-reply { margin-top: 12px; padding: 16px; background: var(--sd-panel); border-radius: 8px; }
.nb-review-pending { color: var(--sd-muted); }
.nb-reason select { text-overflow: ellipsis; }
.nb-review-actions { flex-wrap: wrap; }
.nb-reason-text { max-width: 230px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
@media (max-width: 420px) {
  .nb-review-card { padding: 12px; }
  .nb-review-actions > button { width: 100%; }
}

/* Direct, paired style buttons and an independent appearance menu. */
.nb-appearance-controls { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.nb-skin-choices { display: flex; overflow: hidden; border: 1px solid var(--sd-muted); border-radius: 999px; }
.sd .nb-skin-choices button { padding: 6px 18px; min-width: 65px; background: transparent; color: var(--sd-ink); font-size: 14px; font-weight: 500; }
.sd .nb-skin-choices button + button { border-left: 1px solid var(--sd-muted); }
.sd .nb-skin-choices button[aria-pressed="true"] { background: var(--sd-ink); color: var(--sd-paper); }
.sd .nb-skin-choices button:focus-visible { outline-offset: -3px; }
.nb-appearance-label { display: flex; align-items: center; gap: 8px; color: var(--sd-muted); font-size: 13px; white-space: nowrap; }
.sd .nb-appearance-label select { padding: 6px 12px; border: 1px solid var(--sd-muted); border-radius: 999px; background: var(--sd-surface); color: var(--sd-ink); font-size: 14px; }
[data-appearance="dark"] .sd { --sd-ok: #7bce9f; --sd-warn: #e4bd77; --sd-alert: #f19b90; --sd-excluded: #e4aaa2; }
[data-appearance="dark"] .sd .sd-primary { color: var(--sd-paper); }
[data-appearance="dark"] .sd .sd-edit--danger { color: #f19b90; }
@media (max-width: 1300px) { .nb-status { display: none; } .nb-top { gap: 16px; } }
@media (min-width: 801px) and (max-width: 1050px) { .sd .nb-nav button { padding-inline: 7px; } .nb-build { display: none; } .nb-appearance-controls { gap: 8px; } .sd .nb-skin-choices button { min-width: 55px; padding-inline: 12px; } }
@media (max-width: 800px) {
  .nb-top { grid-template-columns: minmax(0, 1fr); }
  .nb-brand { grid-row: 1; }
  .nb-right { grid-row: 2; grid-column: 1; justify-content: flex-end; flex-wrap: wrap; padding-top: 8px; }
  .nb-nav { grid-row: 3; grid-column: 1; }
  .nb-appearance-controls { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .sd .nb-skin-choices button { min-width: 56px; padding-inline: 12px; }
  .sd .nb-appearance-label select { padding-inline: 8px; }
}
.sd .sd-modal__head, .sd .sd-modal__x { color: var(--sd-ink); }
[data-appearance="dark"] .sd :is(input, select, textarea) { background: var(--sd-surface); color: var(--sd-ink); border-color: var(--sd-line-strong); }
[data-appearance="dark"] .sd .sd-edit--ok { color: var(--sd-ok); }

/* Shared responsive layout: a compact header and legible data surfaces. */
.sd { --sd-sans:var(--ui-font); font-size:14px; }
.sd .sd-table { font:400 13px/1.55 var(--ui-font); table-layout:auto; width:100%; }
.sd .sd-table th { white-space:nowrap; font:500 12px/1.5 var(--ui-font); }
.sd .sd-table td { padding:12px; vertical-align:top; overflow-wrap:anywhere; }
.sd .sd-table td:first-child { min-width:86px; }
.sd .sd-table td:last-child button { white-space:nowrap; }
.sd .sd-table a { text-decoration:none; color:var(--sd-ink); }
.sd .sd-table a:hover { text-decoration:underline; color:var(--sd-link); }
.sd .sd-menu__pop { max-height:calc(100dvh - 74px); overflow-y:auto; }
.nb-reason { min-width:190px; max-width:300px; font-size:13px; }
.nb-reason strong { font-weight:500; }
#takedowns .sd-table td:nth-child(2) { min-width:240px; max-width:460px; }
#takedowns .sd-table td:nth-child(3) { min-width:82px; }
.nb-top { gap:20px; }
.nb-page-head { padding:24px 0 16px; }
@media(max-width:1100px) { .sd .nb-nav button { padding-inline:8px; } .nb-top { gap:12px; padding-inline:16px; } }
@media(max-width:800px) {
 .nb-top { display:flex; flex-wrap:wrap; position:relative; padding:10px 16px 0; gap:8px 12px; min-height:0; }
 .nb-brand { flex:1; font-size:18px; }
 .nb-right { display:contents; }
 .nb-right .sd-menu { order:1; }
 .nb-right inews-appearance { order:2; width:100%; justify-content:flex-end; padding:0; }
 .nb-nav { order:3; display:flex; width:100%; padding:0; gap:4px; border:0; }
 .sd .nb-nav button { padding:9px 12px; font-size:13px; }
 .nb-side { display:flex; overflow-x:auto; flex-wrap:nowrap; padding:8px 16px; }
 .nb-side__group { display:none; }
 .sd .nb-side__item { flex-shrink:0; white-space:nowrap; font-size:12px; }
 .nb-main { min-width:0; }
 .nb-main > section { padding:0 16px; }
 .nb-page-head { padding:18px 0 12px; }
 .nb-page-head h1 { font-size:22px; }
 .nb-row,.nb-subrow { grid-template-columns:36px minmax(0,1fr); gap:0 10px; }
 .nb-row > * { padding-top:12px; }
 .sd a.nb-title,.sd .nb-row--must a.nb-title { font-size:15px; line-height:1.55; font-weight:550; }
 .nb-meta { gap:4px 8px; margin-top:5px; font-size:11px; }
 .nb-src { padding-top:0; padding-bottom:12px; font-size:11px; }
 .nb-time { padding-top:15px; font-size:11px; }
 .nb-excerpt { font-size:12px; }
 .sd .sd-panel__body { padding:12px; }
 .sd .sd-table { min-width:560px; }
 .sd .sd-table td:first-child { white-space:nowrap; }
 #takedowns .sd-table { min-width:0; }
 #takedowns .sd-table thead { display:none; }
 #takedowns .sd-table,#takedowns .sd-table tbody { display:block; }
 #takedowns .sd-table tr { display:flex; flex-wrap:wrap; padding:14px 0; gap:6px 12px; border-bottom:1px solid var(--sd-line); }
 #takedowns .sd-table td { display:block; min-width:0!important; max-width:none!important; padding:0; border:0; font-size:12px; }
 #takedowns .sd-table td:nth-child(2) { order:-1; width:100%; font-size:15px; font-weight:500; }
 #takedowns .sd-table td:nth-child(6) { width:100%; padding-top:6px; }
 #takedowns .sd-table td:nth-child(7)::before { content:'同题 '; color:var(--sd-muted); }
 #takedowns .sd-table td:nth-child(8)::before { content:'此后拦截 '; color:var(--sd-muted); }
 #takedowns .nb-reason { max-width:none; min-width:0; }
 .nb-record-tools { gap:8px; }
 .sd .nb-record-tools input { min-width:0; width:100%; }
 .sd .sd-menu__pop { position:fixed; right:12px; top:52px; width:min(300px,calc(100vw - 24px)); max-height:calc(100dvh - 68px); }
 .nb-review-dialog { padding:16px; }
}
.sd { --sd-mono:var(--ui-font); }
@media(max-width:800px) {
 .sd-metrics--3up { grid-template-columns:1fr 1fr; }
 .sd-metrics--3up .sd-metric:last-child { grid-column:1/-1; }
 .nb-day { padding:14px 0 4px; }
}
@media(max-width:800px) { .nb-frame { height:calc(100dvh - 132px); min-height:520px; } }
body[data-tab="library"] .nb-main { padding-bottom:0; }
@media(max-width:800px) { #takedowns .sd-edit { min-height:32px; padding:5px 10px; } }
.sd-metric { min-width:0; overflow-wrap:anywhere; }
.sd .sd-flow__box { border:1px solid var(--sd-line); border-radius:7px; box-shadow:none; padding:12px; }
.sd .sd-flow__box > span,.sd .sd-flow__box > small { font-weight:400; font-size:11px; letter-spacing:0; color:var(--sd-muted); }
.sd .sd-flow__arrow { color:var(--sd-muted); }
.sd .sd-flow__box--acid > span,.sd .sd-flow__box--acid > small { color:var(--sd-ink); }
@media(min-width:801px) {
 #takedowns .sd-table td:nth-child(3) { white-space:nowrap; min-width:94px; }
 #takedowns .sd-table td:nth-child(5) { min-width:135px; }
}

/* Component roles consume the shared design system; no per-page theme palettes. */
.sd { --sd-ink:var(--reader-body); }
.sd :is(.nb-page-head h1,.sd-modal__head,.nb-review-dialog h2) { color:var(--reader-heading); font-weight:var(--reader-heading-weight); letter-spacing:var(--reader-tracking); }
.sd .nb-page-head h1 { font-size:var(--reader-heading-size); }
.sd :is(.sd-kicker,.sd-panel__head,.sd-dashboard__head) { color:var(--reader-heading); font-weight:var(--reader-heading-weight); }
.sd .sd-primary { background:var(--reader-primary); color:var(--reader-on-primary); border-radius:var(--reader-button-radius); }
.sd .nb-nav button[aria-current="page"],.sd .nb-side__item.is-on { background:var(--reader-nav-bg); color:var(--reader-nav-ink); }
.sd :is(.sd-table a,a.nb-title,.nb-row--must a.nb-title) { color:var(--reader-heading); font-weight:var(--reader-title-weight); }
.sd a.nb-title,.sd .nb-row--must a.nb-title { font-size:var(--reader-title-size); line-height:var(--reader-title-leading); }
.nb-excerpt { color:var(--reader-secondary); font-weight:400; }
.nb-meta,.nb-src,.nb-time { color:var(--reader-muted); }
.nb-row > * { padding-block:var(--reader-row-space); }
.sd .sd-table th { color:var(--reader-secondary); background:var(--reader-panel); border-bottom:1px solid var(--reader-border); }
.sd .sd-table td { color:var(--reader-body); }
.sd .sd-table tbody tr:hover { background:var(--reader-hover); }
.sd .sd-metric strong { color:var(--reader-heading); font-weight:var(--reader-heading-weight); }
[data-theme="attio"] .sd .sd-table th+th { border-left:1px solid var(--reader-line); }
[data-theme="folk"] .sd :is(.sd-panel,.sd-dashboard) { border-radius:var(--reader-radius); }
[data-theme="folk"] .nb-day { color:var(--reader-heading); font-size:13px; border-bottom:1px solid var(--reader-line); margin-top:8px; }
[data-theme="folk"] .sd .nb-dup { border-radius:999px; background:var(--reader-active); }
.timeline-pager { display:flex; align-items:center; gap:8px; padding:12px 0; flex-wrap:wrap; border-bottom:1px solid var(--reader-line); font-size:12px; color:var(--reader-secondary); }
.timeline-page-label { margin-right:auto; font-variant-numeric:tabular-nums; }
.sd .timeline-page-button { padding:6px 10px; border:1px solid var(--reader-border); border-radius:var(--reader-button-radius); color:var(--reader-heading); background:var(--reader-paper); font-size:12px; }
.sd .timeline-page-button:not(:disabled):hover { background:var(--reader-active); }
.timeline-page-end { width:100%; text-align:right; font-size:11px; }
@media(max-width:800px) {
 .nb-row > * { padding-block:12px; }
 .nb-row .nb-src { padding-top:0; }
 .sd a.nb-title,.sd .nb-row--must a.nb-title { font-size:15px; }
 .timeline-pager { gap:6px; }
 .sd .timeline-page-button { min-height:36px; padding-inline:9px; }
 .timeline-page-label { width:100%; }
}
.sd .nb-brief__title { color:var(--reader-heading); font-weight:var(--reader-title-weight); font-size:var(--reader-title-size); line-height:var(--reader-title-leading); }
.sd .nb-brief__head { color:var(--reader-heading); }
.nb-brief__meta { flex-wrap:wrap; color:var(--reader-secondary); }
.nb-brief__meta button { white-space:nowrap; }
.sd .nb-row .sd-badge--info { background:var(--reader-info-bg); color:var(--reader-info-ink); }

/* Containers, controls and row dividers deliberately have different line roles. */
.sd :is(.sd-panel,.sd-dashboard,.sd-modal__box){border-color:var(--reader-frame);border-radius:var(--reader-radius);box-shadow:var(--crm-shadow)}
.sd .sd-menu__pop{border-radius:var(--reader-radius)}
.sd :is(input,textarea,select),.sd .nb-toolbar input[type="search"]{border-radius:var(--reader-input-radius);border-color:var(--reader-border)}
.sd .sd-edit{border-radius:var(--reader-button-radius)}
.sd .sd-table td{border-color:var(--reader-line)}
[data-theme="folk"] .sd :is(.nb-top,.nb-side){border-color:var(--reader-frame)}
[data-theme="folk"] .sd .nb-nav button{border-radius:0;background:transparent;padding-block:10px;border-bottom:1px solid transparent}
[data-theme="folk"] .sd .nb-nav button[aria-current="page"]{background:transparent;color:var(--reader-heading);border-bottom-color:var(--reader-heading)}
[data-theme="folk"] .sd .nb-side__item{border-radius:0}
[data-theme="folk"] .sd .sd-panel__head{border-bottom:1px solid var(--reader-frame);background:transparent}
[data-theme="folk"] .sd .sd-table th{background:transparent;border-bottom-color:var(--reader-frame)}
[data-theme="folk"] .sd .nb-dup{background:transparent;border:1px solid var(--reader-border);border-radius:999px}
[data-theme="folk"] .nb-day{border-bottom-color:var(--reader-frame)}
/* A contextual decision sheet retains the list behind it. Native dialog owns focus. */
.nb-review-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:min(680px,100vw);height:100dvh;max-height:100dvh;max-width:100vw;box-sizing:border-box;padding:24px 28px;border:0;border-left:1px solid var(--reader-frame);border-radius:0;background:var(--reader-paper);color:var(--reader-body);overflow:auto;box-shadow:-8px 0 32px #0000000a}
.nb-review-dialog::backdrop{background:#11131824}
.nb-review-section{padding:20px 0;border-bottom:1px solid var(--reader-line)}
.nb-review-section h3{font-size:12px;font-weight:500;letter-spacing:0;color:var(--reader-secondary);margin:0 0 12px}
.nb-review-section p{font-size:14px;line-height:1.65;margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.nb-review-card__head .nb-title{font-size:20px!important;line-height:1.5!important;display:block;margin:0 0 12px}
.nb-review-card__head .nb-meta{line-height:1.7}
.nb-review-log{list-style:none;margin:0;padding:0}
.nb-review-log li{padding:8px 0 8px 14px;border-left:1px solid var(--reader-line);font-size:13px;line-height:1.65}
.nb-review-log small{display:block;color:var(--reader-muted);font-size:11px}
.nb-review-log p{margin:4px 0}
.nb-review-next{border-bottom:0}
.nb-review-next label{font-size:13px}
.nb-review-next textarea{box-sizing:border-box;width:100%;font-size:14px!important;line-height:1.6;padding:12px;min-height:110px}
.nb-review-actions{position:sticky;bottom:-1px;margin:16px -1px -1px;padding:14px 0;background:var(--reader-paper);border-top:1px solid var(--reader-line);display:flex;justify-content:flex-end;gap:10px}
.sd .nb-review-actions button{min-height:40px;padding-inline:18px;font-size:14px}
.nb-review-feedback{font-size:12px;color:var(--reader-secondary);line-height:1.6}
@media(max-width:800px){.nb-review-dialog{padding:16px 20px}.nb-review-card__head .nb-title{font-size:18px!important}.nb-review-section{padding:16px 0}.nb-review-actions{position:sticky}.nb-review-actions>button{width:auto;flex:1}.sd inews-appearance select{border-radius:999px}}
.nb-review-dialog > .nb-review-feedback:empty{display:none}
.nb-review-dialog .nb-review-card__head{padding-top:8px}
.nb-review-dialog .nb-review-label textarea{border-radius:var(--reader-input-radius)}
.nb-review-next{padding-bottom:20px}

.sd .sd-flow__box{border-radius:var(--reader-radius)}
.sd .sd-menu__btn{font-family:var(--ui-font);letter-spacing:0}

/* Independent research angles and industry subjects retain their hierarchy. */
body.sd[data-tab="timeline"] { --nb-side-w: 264px; }
.nb-side--research { padding: 14px 12px 24px; }
.nb-filter-panel { margin: 0 0 12px; border: 1px solid var(--reader-border); overflow: hidden; border-radius: var(--reader-radius); background: var(--reader-paper); min-width: 0; }
.nb-filter-panel__summary { background: color-mix(in srgb, var(--reader-panel) 80%, var(--reader-paper)); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 12px; cursor: pointer; list-style: none; }
.nb-filter-panel__summary::-webkit-details-marker { display: none; }
.nb-filter-panel__summary::after { content: '+'; margin-left: auto; color: var(--reader-muted); font-size: 16px; line-height: 1; }
.nb-filter-panel[open] > .nb-filter-panel__summary::after { content: '−'; }
.nb-filter-panel__summary strong { color: var(--reader-heading); font-size: 13px; font-weight: 600; }
.nb-filter-panel__summary > span { color: var(--reader-muted); font-size: 11px; }
.nb-filter-panel[open] > .nb-filter-panel__summary > span { display: none; }
.nb-filter-panel__body { padding: 12px 10px; background: color-mix(in srgb, var(--reader-panel) 18%, var(--reader-paper)); }
.nb-filter-panel[open] > .nb-filter-panel__summary { border-bottom: 1px solid var(--reader-line); }
[data-theme="folk"] .nb-filter-panel { border-color: var(--reader-frame); }
[data-theme="folk"] .nb-filter-panel[open] > .nb-filter-panel__summary, [data-theme="folk"] .nb-topic-family + .nb-topic-family, [data-theme="folk"] .nb-topic-children { border-color: var(--reader-frame); }
.nb-filter-panel__hint { margin: -2px 2px 10px; color: var(--reader-muted); font-size: 11px; line-height: 1.6; }
.nb-angle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
.nb-angle-list > :first-child { grid-column: 1 / -1; }
.sd .nb-angle-list .nb-side__item { width: 100%; min-height: 32px; padding: 5px 6px; font-size: 12px; }
.nb-angle-list .nb-side__item i { display: none; }
.nb-topic-family { margin-top: 14px; }
.nb-topic-family + .nb-topic-family { padding-top: 12px; border-top: 1px solid var(--reader-line); }
.nb-topic-family h3 { margin: 0 2px 8px; font: 500 11px/1.5 var(--sd-sans); color: var(--reader-muted); }
.nb-topic-tree { display: grid; gap: 5px; }
.nb-topic-tree > .nb-topic, .nb-topic-branch > .nb-topic { width: 100%; text-align: left; }
.nb-topic-children { display: flex; gap: 5px; flex-wrap: wrap; margin: 5px 0 4px 11px; padding-left: 9px; border-left: 1px solid var(--reader-border); }
.nb-topic-tags, .nb-topic-support { display: flex; flex-wrap: wrap; gap: 6px; }
.nb-topic-support { margin-top: 8px; }
.sd .nb-topic { padding: 5px 8px; min-height: 30px; border: 1px solid var(--reader-line); border-radius: var(--reader-button-radius); background: var(--reader-paper); color: var(--reader-body); font: 400 12px/1.4 var(--sd-sans); cursor: pointer; }
.sd .nb-topic:hover { border-color: var(--reader-border); background: var(--reader-hover); }
.sd .nb-topic.is-on { background: var(--reader-primary); border-color: var(--reader-primary); color: var(--reader-on-primary); }
.nb-topic small { margin-left: 5px; padding-left: 5px; border-left: 1px solid currentColor; font-size: 10px; opacity: .7; }
.nb-topic-hotspots { margin-top: 12px; padding: 10px 8px; background: var(--reader-panel); border-radius: var(--reader-radius); }
.nb-topic-hotspots__label { display: block; margin-bottom: 7px; color: var(--reader-secondary); font-size: 10px; }
.nb-side__auxiliary { margin-top: 16px; }
.nb-side__auxiliary .nb-side__group { margin-top: 16px; }
.nb-active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--reader-line); }
.nb-active-filters[hidden] { display: none; }
.sd .nb-active-filter { border: 1px solid var(--reader-border); border-radius: var(--reader-button-radius); padding: 5px 9px; background: var(--reader-active); color: var(--reader-heading); font-size: 12px; }
.sd .nb-clear-filters { padding: 5px; color: var(--reader-muted); background: transparent; font-size: 12px; }
@media (max-width: 800px) {
  .nb-side.nb-side--research { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; overflow: visible; padding: 12px 16px; }
  .nb-side--research .nb-filter-panel { margin: 0; }
  .nb-side--research .nb-filter-panel__summary { padding: 10px 12px; }
  .nb-filter-panel__summary > span { margin-left: auto; }
  .nb-filter-panel__summary::after { margin-left: 2px; }
  .nb-filter-panel[open] > .nb-filter-panel__summary::after { margin-left: auto; }
  .nb-filter-panel__body { padding: 12px; }
  .nb-angle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .sd .nb-angle-list .nb-side__item { min-height: 36px; }
  .sd .nb-topic { min-height: 36px; }
  .nb-topic-tree { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .nb-topic-branch { grid-row: span 2; }
  .nb-side__auxiliary { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
  .nb-side--research .nb-side__auxiliary .nb-side__group { display: block; width: 100%; margin: 6px 0 0; font-size: 10px; }
  .nb-side--research .nb-side__auxiliary .nb-side__item { width: auto; padding: 4px 7px; min-height: 30px; font-size: 11px; }
  .sd .nb-active-filter, .sd .nb-clear-filters { min-height: 36px; }
}

/* Related subjects stay directly beneath their parent; region choices share a compact grid. */
.nb-region-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
.sd .nb-region-grid .nb-side__item { width:100%; min-width:0; padding:6px 2px; min-height:34px; justify-content:center; text-align:center; font-size:12px; border:1px solid var(--reader-line); border-radius:var(--reader-button-radius); }
.nb-region-grid .nb-side__item span { flex:0 1 auto; }
.nb-region-grid .nb-side__item:focus-visible { outline:2px solid var(--reader-primary); outline-offset:2px; }
@media(max-width:800px) { .sd .nb-region-grid .nb-side__item { min-height:36px; } .nb-topic-branch { grid-row:auto; } }

/* Staff-only review uses each article's own scores, timestamps and provenance. */
.nb-editor-mode { width:100%; font:600 13px/1.5 var(--sd-sans); color:var(--reader-heading); }
.nb-editor-controls { display:flex; flex-wrap:wrap; align-items:end; gap:10px 16px; width:100%; }
.nb-editor-control { display:grid; gap:5px; color:var(--reader-secondary); font:400 12px/1.5 var(--sd-sans); }
.sd .nb-editor-control select { min-height:36px; max-width:100%; padding:6px 26px 6px 10px; color:var(--reader-body); background:var(--reader-paper); border:1px solid var(--reader-border); border-radius:var(--reader-input-radius); font:400 13px/1.5 var(--sd-sans); }
.nb-editor-control select:focus-visible { outline:2px solid var(--reader-primary); outline-offset:2px; }
.nb-editor-scope { width:100%; padding:6px 10px; background:var(--reader-panel); color:var(--reader-secondary); font-size:12px; }
.nb-editor-details { margin-top:14px; padding:12px; border:1px solid var(--reader-line); border-radius:var(--reader-radius); background:var(--reader-paper); }
.nb-editor-summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--reader-secondary); font:400 12px/1.5 var(--sd-sans); }
.nb-editor-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px 22px; margin-top:12px; }
.nb-editor-section { min-width:0; }
.nb-editor-details h4 { margin:0 0 8px; font:600 12px/1.5 var(--sd-sans); color:var(--reader-heading); }
.nb-editor-facts { margin:0; display:grid; grid-template-columns:96px minmax(0,1fr); gap:5px 8px; font:400 11px/1.65 var(--sd-sans); }
.nb-editor-facts dt { color:var(--reader-muted); }
.nb-editor-facts dd { margin:0; color:var(--reader-body); overflow-wrap:anywhere; white-space:pre-wrap; font-variant-numeric:tabular-nums; }
.nb-editor-provenance, .nb-editor-history { margin:12px 0 0; padding-top:10px; border-top:1px solid var(--reader-line); color:var(--reader-secondary); font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.nb-editor-history p { margin:4px 0; }
.nb-editor-provenance a { color:inherit; text-decoration:underline; }
.nb-editor-raw { margin-top:12px; color:var(--reader-muted); font-size:11px; }
.nb-editor-raw summary { cursor:pointer; }
.nb-editor-raw pre { max-height:360px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; padding:10px; background:var(--reader-panel); color:var(--reader-body); font:11px/1.6 ui-monospace,monospace; }
@media(max-width:800px) {
  .nb-region-grid { width:100%; }
  .nb-editor-controls { gap:10px; }
  .nb-editor-control { flex:1 1 140px; }
  .nb-editor-grid { grid-template-columns:minmax(0,1fr); }
  .nb-editor-facts { grid-template-columns:88px minmax(0,1fr); }
}
.sd .nb-datacenter-reset { min-height:32px; padding:5px 10px; border:1px solid var(--reader-primary); border-radius:var(--reader-button-radius); background:var(--reader-primary); color:var(--reader-on-primary); font-size:12px; }
.nb-datacenter-scope { color:var(--reader-secondary); font-size:12px; line-height:1.6; }
/* Prefer a Simplified-Chinese UI face while retaining system Latin glyphs. */
/* Shared typography preferences apply after mobile/theme title overrides. */
:root[data-text-size] .sd :is(a.nb-title,.nb-brief__title,.nb-subbody > a) { font-size:var(--reader-title-size); }
:root[data-font="fangsong"] .sd :is(a.nb-title,.nb-brief__title) { font-weight:400; }
.nb-top { flex-wrap:wrap; }
.nb-right { flex-wrap:wrap; }
.nb-removal-status { position:fixed; bottom:16px; right:16px; z-index:1000; max-width:calc(100vw - 32px); padding:10px 14px; background:var(--reader-paper); color:var(--reader-heading); border:1px solid var(--reader-border); border-radius:8px; box-shadow:0 2px 12px #0002; display:flex; gap:12px; flex-wrap:wrap; font-size:14px; }
.nb-removal-status[hidden] { display:none; }
