/* Text Insight */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f1f3f9; --ink: #141a2b; --muted: #5b6478; --line: #e1e5ef;
  --accent: #4338ca; --accent-ink: #ffffff; --accent-soft: #e8e7fb; --focus: #6366f1;
  --c-person: #4f46e5; --c-place: #0f8a7e; --c-org: #c2410c; --c-date: #8b3fd9; --c-money: #15803d; --c-percent: #be185d; --c-term: #64748b;
  --m-person: #e3e1ff; --m-place: #d3f3ee; --m-org: #ffe4d2; --m-date: #efe1ff; --m-money: #d9f5e0; --m-percent: #ffdcec; --m-term: #e7ebf2;
  --pos: #15803d; --neg: #c0262d; --neu: #8a93a6; --pos-soft: #e3f6e8; --neg-soft: #fde6e6;
  --edge: #9aa3b8; --rel: #b45309; --rel-soft: #fdf0e1;
  --cloud-1: #4338ca; --cloud-2: #0f8a7e; --cloud-3: #c2410c; --cloud-4: #8b3fd9; --cloud-5: #0e7490; --cloud-6: #be185d;
  --warn: #9a5b00; --err: #b42318; --ok: #15803d;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 26, 43, .06), 0 2px 8px rgba(20, 26, 43, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1120; --surface: #161a2c; --surface-2: #1d2238; --ink: #e8eaf3; --muted: #a0a8bd; --line: #2a3050;
    --accent: #8b8cff; --accent-ink: #0e1120; --accent-soft: #262a52; --focus: #a5b4fc;
    --c-person: #9a97ff; --c-place: #3cc9b6; --c-org: #ff9a5c; --c-date: #c79bff; --c-money: #5fd486; --c-percent: #ff86bd; --c-term: #9aa6bd;
    --m-person: #2c2b66; --m-place: #123f3a; --m-org: #4a2a16; --m-date: #3a2758; --m-money: #173d24; --m-percent: #4c1d35; --m-term: #2a3045;
    --pos: #5fd486; --neg: #ff7a7f; --neu: #8a93a6; --pos-soft: #173d24; --neg-soft: #4a1c20;
    --edge: #5d6685; --rel: #f5a35c; --rel-soft: #3d2a17;
    --cloud-1: #a5a6ff; --cloud-2: #3cc9b6; --cloud-3: #ff9a5c; --cloud-4: #c79bff; --cloud-5: #5cc8e6; --cloud-6: #ff86bd;
    --warn: #f0b252; --err: #ff8a80; --ok: #5fd486;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1120; --surface: #161a2c; --surface-2: #1d2238; --ink: #e8eaf3; --muted: #a0a8bd; --line: #2a3050;
  --accent: #8b8cff; --accent-ink: #0e1120; --accent-soft: #262a52; --focus: #a5b4fc;
  --c-person: #9a97ff; --c-place: #3cc9b6; --c-org: #ff9a5c; --c-date: #c79bff; --c-money: #5fd486; --c-percent: #ff86bd; --c-term: #9aa6bd;
  --m-person: #2c2b66; --m-place: #123f3a; --m-org: #4a2a16; --m-date: #3a2758; --m-money: #173d24; --m-percent: #4c1d35; --m-term: #2a3045;
  --pos: #5fd486; --neg: #ff7a7f; --neu: #8a93a6; --pos-soft: #173d24; --neg-soft: #4a1c20;
  --edge: #5d6685; --rel: #f5a35c; --rel-soft: #3d2a17;
  --cloud-1: #a5a6ff; --cloud-2: #3cc9b6; --cloud-3: #ff9a5c; --cloud-4: #c79bff; --cloud-5: #5cc8e6; --cloud-6: #ff86bd;
  --warn: #f0b252; --err: #ff8a80; --ok: #5fd486;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h2 { font-size: 1.02rem; margin-bottom: .6rem; }
h3 { font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 1rem 0 .4rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.grow { flex: 1 1 auto; }

/* header */
.top {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1180px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em; }
.pill { font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-link { font-size: .9rem; text-decoration: none; color: var(--muted); }
.top-link:hover { color: var(--ink); }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }
.intro { padding: 14px 0 12px; }
.intro h1 { font-size: clamp(1.45rem, 3.4vw, 2rem); letter-spacing: -.02em; }
.lede { margin: .35rem 0 0; color: var(--muted); max-width: 62ch; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }

/* input */
.input-card { position: relative; }
.input-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.input-label { font-weight: 600; font-size: .92rem; }
textarea {
  width: 100%; min-height: 170px; resize: vertical; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; background: var(--surface-2); line-height: 1.5;
}
textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; }
.drop-veil {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, transparent); border: 2px dashed var(--accent);
  font-weight: 700; color: var(--accent); pointer-events: none;
}
.input-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; min-height: 38px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer; font-weight: 600;
  font-size: .92rem; text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); padding: 8px 20px; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: .85rem; }
.status { margin: 10px 0 0; min-height: 1.4em; font-size: .9rem; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.err { color: var(--err); }

/* results */
#results { margin-top: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); min-width: 0; }
.tile-v { font-size: 1.35rem; font-weight: 750; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tile-s { font-size: .78rem; color: var(--muted); }
.tile.tone-pos .tile-v { color: var(--pos); }
.tile.tone-neg .tile-v { color: var(--neg); }

.tabbar {
  display: flex; align-items: center; gap: 2px; margin: 16px 0 12px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin; position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.tab {
  border: 0; background: none; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; font-size: .93rem;
}
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover { color: var(--ink); }
.tabbar-end { margin-left: auto; padding-left: 8px; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .16); padding: 6px; min-width: 240px; z-index: 20;
}
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: .9rem; }
.menu-item:hover { background: var(--surface-2); }

.panel { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
.row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.row-head h2 { margin: 0; }
.tag { font-size: .7rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 6px; vertical-align: middle; margin-left: 4px; }
.none { font-style: italic; margin: .2rem 0; }
.note { font-size: .85rem; color: var(--warn); margin: .6rem 0 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-read td:nth-child(2), .tbl-kw td:nth-child(n+2), .tbl-central td:nth-child(n+2) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-read td:nth-child(2) { font-weight: 700; }
.tbl-read td:nth-child(3) { color: var(--muted); font-size: .85rem; }
.tbl-kv td:first-child { color: var(--muted); width: 48%; }

/* sentence length */
.spark-bars { display: flex; align-items: flex-end; gap: 1px; height: 120px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.spark-bar { flex: 1 1 0; min-width: 2px; border: 0; padding: 0; background: color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 2px 2px 0 0; cursor: pointer; }
.spark-bar.long { background: var(--accent); }
.spark-bar:hover { background: var(--c-org); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 4px 11px; cursor: pointer; font-size: .85rem; font-weight: 600; min-height: 32px;
}
.chip[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.chip-n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--c-term); flex: none; margin-right: 6px; vertical-align: middle; }
.chip .dot { margin-right: 0; }
.t-person .dot, .dot.t-person { background: var(--c-person); }
.t-place .dot, .dot.t-place { background: var(--c-place); }
.t-org .dot, .dot.t-org { background: var(--c-org); }
.t-date .dot, .dot.t-date { background: var(--c-date); }
.t-money .dot, .dot.t-money { background: var(--c-money); }
.t-percent .dot, .dot.t-percent { background: var(--c-percent); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chip { border: 0; border-radius: 7px; padding: 4px 9px; font-size: .85rem; cursor: pointer; background: var(--m-term); color: var(--ink); }
button.mini-chip:hover { outline: 1px solid var(--accent); }
.mini-chip.t-person { background: var(--m-person); }
.mini-chip.t-place { background: var(--m-place); }
.mini-chip.t-org { background: var(--m-org); }
.mini-chip.t-date { background: var(--m-date); }
.mini-chip.t-money { background: var(--m-money); }
.mini-chip.t-percent { background: var(--m-percent); }
.mini-chip.t-pos { background: var(--pos-soft); }
.mini-chip.t-neg { background: var(--neg-soft); }

/* entities */
#ent-search { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--surface-2); margin-left: auto; width: 160px; max-width: 100%; }
.ent-list { list-style: none; margin: 0; padding: 0; max-height: 620px; overflow: auto; }
.ent-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 70px 34px; align-items: center; gap: 8px; width: 100%;
  border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 8px; cursor: pointer;
}
.ent-row:hover { background: var(--surface-2); }
.ent-row.on { background: var(--accent-soft); }
.ent-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; }
.ent-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.ent-bar .fill { display: block; height: 100%; background: var(--c-term); }
.fill.t-person { background: var(--c-person); } .fill.t-place { background: var(--c-place); } .fill.t-org { background: var(--c-org); }
.fill.t-date { background: var(--c-date); } .fill.t-money { background: var(--c-money); } .fill.t-percent { background: var(--c-percent); }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--m-term); white-space: nowrap; }
.badge.t-person { background: var(--m-person); color: var(--c-person); } .badge.t-place { background: var(--m-place); color: var(--c-place); }
.badge.t-org { background: var(--m-org); color: var(--c-org); } .badge.t-date { background: var(--m-date); color: var(--c-date); }
.badge.t-money { background: var(--m-money); color: var(--c-money); } .badge.t-percent { background: var(--m-percent); color: var(--c-percent); }
.kwic-list { display: grid; gap: 8px; }
.kwic { margin: 0; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: .92rem; }
mark { color: inherit; border-radius: 3px; padding: 0 2px; background: var(--m-term); }
mark.m-person { background: var(--m-person); box-shadow: inset 0 -2px 0 var(--c-person); }
mark.m-place { background: var(--m-place); box-shadow: inset 0 -2px 0 var(--c-place); }
mark.m-org { background: var(--m-org); box-shadow: inset 0 -2px 0 var(--c-org); }
mark.m-date { background: var(--m-date); box-shadow: inset 0 -2px 0 var(--c-date); }
mark.m-money { background: var(--m-money); box-shadow: inset 0 -2px 0 var(--c-money); }
mark.m-percent { background: var(--m-percent); box-shadow: inset 0 -2px 0 var(--c-percent); }
mark.focus { outline: 2px solid var(--accent); }
.results-head { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.results-head .menu { margin-left: auto; }

/* graph */
.graph-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.graph-card { display: grid; gap: 10px; }
.graph-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .86rem; }
.ctl { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.ctl input[type="range"] { width: 90px; accent-color: var(--accent); }
.ctl output { min-width: 1.2em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ctl select, .ctl input[type="number"], .ctl input[type="text"] {
  border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; background: var(--surface-2); color: var(--ink); font-weight: 500;
}
.ctl input[type="number"] { width: 64px; }
.ctl.grow input { flex: 1 1 auto; min-width: 120px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.graph-stage { position: relative; height: min(68vh, 600px); min-height: 340px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; touch-action: none; }
#graph-svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; -webkit-user-select: none; }
#graph-svg:active { cursor: grabbing; }
.g-node { cursor: pointer; }
.g-node:focus-visible circle { stroke: var(--focus); stroke-width: 3; }
.graph-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); background: var(--surface); }
.graph-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; color: var(--ink); cursor: pointer; padding: 0; text-align: left; font-weight: 600; }
.link-btn:hover { color: var(--accent); text-decoration: underline; }
#g-focus { margin-top: 10px; }
#g-focus .kwic { font-size: .85rem; }

/* words */
.word-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
#cloud { width: 100%; display: block; border-radius: 10px; border: 1px solid var(--line); }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: .9rem; }
.bar-term { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar-n { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* sentiment */
.gauge { margin: 6px 0 10px; }
.gauge-track { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--neg), var(--neu) 50%, var(--pos)); }
.gauge-mark { position: absolute; top: -5px; width: 4px; height: 22px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface); }
.gauge-scale { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-top: 6px; }
.big { font-size: 1.3rem; font-weight: 750; margin: 4px 0 10px; }
.big.pos { color: var(--pos); } .big.neg { color: var(--neg); } .big.neu { color: var(--muted); }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.s-pos { background: var(--pos); } .s-neu { background: var(--neu); opacity: .5; } .s-neg { background: var(--neg); }
.arc-bars { display: flex; height: 160px; gap: 1px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; overflow-x: auto; }
.arc-bar { position: relative; flex: 1 1 0; min-width: 3px; border: 0; padding: 0; background: none; cursor: pointer; }
.arc-bar:hover, .arc-bar.on { background: var(--surface-2); }
.arc-fill { position: absolute; left: 12%; right: 12%; border-radius: 2px; }
.arc-bar.pos .arc-fill { background: var(--pos); }
.arc-bar.neg .arc-fill { background: var(--neg); }
.arc-bar.neu .arc-fill { background: var(--neu); }
#s-pick { margin-top: 10px; min-height: 1em; }
.tone-sent { margin: 0 0 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: .92rem; }
.tone-sent .score { float: right; margin-left: 8px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .82rem; }
.score.pos { color: var(--pos); } .score.neg { color: var(--neg); } .score.neu { color: var(--muted); }
mark.w-pos { background: var(--pos-soft); box-shadow: inset 0 -2px 0 var(--pos); }
mark.w-neg { background: var(--neg-soft); box-shadow: inset 0 -2px 0 var(--neg); }

/* reader */
.reader { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.75; max-height: 75vh; overflow: auto; padding: 4px 2px; }
.reader .sent.tint-pos { background: var(--pos-soft); }
.reader .sent.tint-neg { background: var(--neg-soft); }

.foot { max-width: 1180px; margin: 0 auto; padding: 12px 16px 32px; color: var(--muted); font-size: .84rem; border-top: 1px solid var(--line); }
.foot p { margin: .4rem 0; }

@media (max-width: 900px) {
  .graph-wrap { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .pill { display: none; }
  .card { padding: 13px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-stage { height: 60vh; }
  .sep { display: none; }
  .ent-list { max-height: 360px; }
  .ent-row { grid-template-columns: minmax(0, 1fr) auto 34px; }
  .ent-bar { display: none; }
}
/* Relations lane */
.acct { display: inline-flex; align-items: center; gap: 8px; }
.credits { font-size: .85rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tab .tag { font-size: .62rem; padding: 1px 5px; }
.rel-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 14px; align-items: start; }
.rel-run p { margin: .5rem 0; }
.rel-run .ctl { display: flex; gap: 8px; align-items: center; margin: .4rem 0; }
.rel-run select { max-width: 100%; min-width: 0; flex: 1 1 auto; }
.sent summary { cursor: pointer; color: var(--accent); }
.sent-pre { max-height: 260px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: .76rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; margin: .4rem 0 0; }
.gate { background: var(--rel-soft); border-radius: 8px; padding: 8px 10px; font-size: .88rem; margin: .5rem 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prog { margin-top: 10px; }
.prog-steps { list-style: none; padding: 0; margin: 0 0 4px; font-size: .88rem; }
.prog-steps li { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--muted); }
.prog-steps li .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.prog-steps li.on { color: var(--ink); font-weight: 600; }
.prog-steps li.on .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite alternate; }
.prog-steps li.done .dot { background: var(--ok); }
.prog-steps li.failed { color: var(--err); }
.prog-steps li.failed .dot { background: var(--err); }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .prog-steps li.on .dot { animation: none; } }
.hist { list-style: none; padding: 0; margin: 0; }
.hist-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 1px solid var(--line);
  background: var(--surface); border-radius: 8px; padding: 6px 9px; margin: 0 0 6px; cursor: pointer; font-size: .85rem; }
.hist-item:hover { border-color: var(--accent); }
.hist-item small { color: var(--muted); }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
#r-filter { margin: 4px 0 10px; }
.chip.chip-seg[aria-pressed="false"] { opacity: 1; text-decoration: none; color: var(--muted); }
.chip.chip-seg[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tbl-scroll { overflow-x: auto; }
.tbl-rel td:nth-child(4) { min-width: 240px; }
.tbl-rel td:nth-child(1), .tbl-rel td:nth-child(3) { min-width: 120px; overflow-wrap: break-word; }
.tbl-rel .rel-q { quotes: "\201c" "\201d"; }
.tbl-rel em { color: var(--rel); font-weight: 650; }
.tbl-rel tr.r-dropped td { opacity: .62; }
.tbl-rel tr.r-dropped .rel-q { text-decoration: line-through; }
.rel-notes { color: var(--warn); margin-top: 3px; }
.rel-end { font-weight: 600; }
.badge.b-text { background: var(--m-term); }
.badge.b-none { background: var(--neg-soft); color: var(--err); }
.st { font-size: .74rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.st-verified { background: var(--pos-soft); color: var(--pos); }
.st-flagged { background: var(--rel-soft); color: var(--warn); }
.st-dropped { background: var(--neg-soft); color: var(--err); }
.rel-line em { color: var(--rel); }
@media (max-width: 900px) { .rel-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .acct .credits { display: none; } .tbl-rel td:nth-child(4) { min-width: 200px; } }
.tbl-central td:first-child > span { display: inline-flex; align-items: center; gap: 0; }
