/* Social Agent Office 1.0 (based on the Kraken Agent Office 3.x "Abyssal Command Deck" design)
   One family (Archivo, variable weight + width). Width is the expressive axis:
   expanded for verdicts and headline figures, normal for working text,
   condensed for dense tables. Colour tokens below are validated for the dark
   surface (long/short pair passes CVD separation; see FRONTEND-3.0.md). */

/* Tipografia nativa do sistema; não inclui ficheiros de fontes externos. */
:root {
  color-scheme: dark;
  /* surfaces */
  --trench: #07111f;
  --hull: #0b1626;
  --hull-2: #0f1e33;
  --hull-3: #142741;
  --line: #1b2e48;
  --line-2: #24395a;
  /* ink */
  --ink: #e4eefa;
  --ink-2: #a9bbd1;
  --muted: #6f86a3;
  /* accents */
  --sonar: #4fb6f0;
  --bio: #57f0d4;
  --plasma: #9b86ff;
  /* polarity (validated diverging pair on --hull) */
  --long: #1caa95;
  --short: #e0693a;
  --neutral: #5d7290;
  /* status (reserved, always with icon + label) */
  --good: #2fc58f;
  --warn: #e8b04a;
  --critical: #ff4d5e;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --gap: 14px;
  --rail: 76px;
  --top: 64px;

  --t-xs: 11px;
  --t-sm: 12.5px;
  --t-md: 14px;
  --t-lg: 18px;
  --t-xl: 26px;
  --t-2xl: 40px;
  --t-hero: 64px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { overflow-x: clip; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 72% -10%, rgba(79, 182, 240, .07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(155, 134, 255, .05), transparent 60%),
    var(--trench);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-md);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--sonar); }
:focus-visible { outline: 2px solid var(--sonar); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.rail {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  background: rgba(7, 17, 31, .7);
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail__mark { width: 40px; height: 40px; margin-bottom: 14px; }
.rail__btn {
  width: 60px;
  padding: 9px 0 7px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 10.5px;
  font-stretch: 88%;
  letter-spacing: .01em;
}
.rail__btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rail__btn:hover { color: var(--ink-2); background: var(--hull); }
.rail__btn[aria-current="page"] { color: var(--ink); background: var(--hull-2); box-shadow: inset 2px 0 0 var(--sonar); }
.rail__spacer { flex: 1; }

.topbar {
  grid-column: 2;
  min-width: 0;
  min-height: var(--top);
  flex-wrap: wrap;
  row-gap: 8px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, .82);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; margin-right: 8px; }
.brand b { white-space: nowrap; font-stretch: 118%; font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.brand span { color: var(--muted); font-size: var(--t-xs); }
.desk-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--hull);
  font-size: var(--t-sm);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill b { color: var(--ink); font-weight: 600; }
.pill svg { width: 13px; height: 13px; flex: none; }
.pill--good { border-color: rgba(47, 197, 143, .45); }
.pill--good svg { color: var(--good); }
.pill--warn { border-color: rgba(232, 176, 74, .5); }
.pill--warn svg { color: var(--warn); }
.pill--critical { border-color: rgba(255, 77, 94, .6); background: rgba(255, 77, 94, .1); }
.pill--critical svg { color: var(--critical); }
.pill--live { border-color: var(--critical); background: rgba(255, 77, 94, .14); color: var(--ink); }
.topbar__spacer { flex: 1; }
.controls { display: flex; gap: 8px; }
.btn {
  border: 1px solid var(--line-2);
  background: var(--hull-2);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 560;
  font-size: var(--t-sm);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--hull-3); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn--primary { background: var(--sonar); border-color: var(--sonar); color: #04121f; }
.btn--primary:hover { background: #7cc9f4; }
.btn--danger { border-color: rgba(255, 77, 94, .55); color: #ffd7db; background: rgba(255, 77, 94, .12); }
.btn--danger:hover { background: rgba(255, 77, 94, .22); }
.btn--ghost { background: transparent; }

.main { grid-column: 2; padding: 18px 22px 40px; min-width: 0; }
.view { display: none; }
.view--active { display: block; }
.view__head { display: flex; align-items: baseline; gap: 16px; margin: 2px 0 16px; flex-wrap: wrap; }
.view__title { margin: 0; font-size: var(--t-xl); font-stretch: 115%; font-weight: 640; letter-spacing: -.01em; }
.view__lede { margin: 0; color: var(--muted); max-width: 70ch; }

/* ---------- panels ---------- */
.panel {
  background: linear-gradient(180deg, rgba(15, 30, 51, .72), rgba(11, 22, 38, .9));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  min-width: 0;
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel__title { margin: 0; font-size: 15px; font-weight: 620; font-stretch: 108%; }
.panel__hint { color: var(--muted); font-size: var(--t-sm); }
.panel__head .panel__hint:last-child { margin-left: auto; }
.empty { color: var(--muted); font-size: var(--t-sm); padding: 18px 0; }
.empty b { color: var(--ink-2); font-weight: 560; }

/* ---------- KPI ribbon ---------- */
.ribbon {
  display: grid;
  grid-template-columns: minmax(330px, 1.8fr) repeat(7, minmax(110px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(11, 22, 38, .75);
  margin-bottom: var(--gap);
  overflow: hidden;
}
.kpi { padding: 13px 16px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi__label { color: var(--muted); font-size: var(--t-sm); }
.kpi__value { font-size: 22px; font-weight: 600; font-stretch: 108%; margin-top: 2px; white-space: nowrap; }
.kpi__sub { color: var(--muted); font-size: var(--t-xs); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi--hero { display: grid; grid-template-columns: auto minmax(70px, 130px); gap: 14px; align-items: center; justify-content: space-between; }
.kpi--hero .kpi__value { font-size: 32px; font-stretch: 122%; font-weight: 680; letter-spacing: -.02em; }
.kpi__spark { height: 44px; width: 100%; min-width: 80px; }
.pos { color: var(--long); }
.neg { color: var(--short); }
.dim { color: var(--muted); }

/* ---------- command layout ---------- */
.command {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .9fr);
  gap: var(--gap);
}
.command__dial { grid-row: span 2; }
.command__market { grid-column: 1 / -1; }
.stack { display: grid; gap: var(--gap); align-content: start; }

/* ---------- deliberation dial ---------- */
.dial-wrap { position: relative; }
.dial { width: 100%; height: auto; display: block; max-height: 74vh; margin: 0 auto; }
.dial__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.dial__ring--strong { stroke: var(--line-2); }
.dial__spoke { stroke: var(--line); stroke-width: 1; opacity: .55; }
.dial__ringlabel { fill: var(--muted); font-size: 12px; font-stretch: 112%; letter-spacing: .08em; }
.dial__sweep { transform-origin: 400px 400px; opacity: 0; transition: opacity .6s; }
.dial--scanning .dial__sweep { opacity: 1; animation: sweep 4.5s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.node { cursor: pointer; }
.node__halo { fill: none; stroke-width: 2; opacity: 0; }
.node__core { fill: var(--hull-2); stroke: var(--line-2); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.node__glyph { fill: var(--ink-2); font-size: 13px; font-weight: 700; font-stretch: 120%; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.node__name { fill: var(--ink-2); font-size: 12.5px; font-weight: 600; font-stretch: 112%; text-anchor: middle; pointer-events: none; }
.node__role { fill: var(--muted); font-size: 10.5px; text-anchor: middle; pointer-events: none; }
.node__vote { fill: none; stroke-width: 3; stroke-linecap: round; }
.node:hover .node__core, .node:focus .node__core { stroke: var(--ink-2); }
.node:focus { outline: none; }
.node:focus-visible .node__core { stroke: var(--sonar); stroke-width: 2.5; }
.node[data-state="working"] .node__core { stroke: var(--sonar); fill: #10283f; }
.node[data-state="meeting"] .node__core { stroke: var(--plasma); fill: #1a1d3d; }
.node[data-state="approved"] .node__core { stroke: var(--good); }
.node[data-state="rejected"] .node__core,
.node[data-state="error"] .node__core,
.node[data-state="emergency"] .node__core { stroke: var(--critical); fill: #2a141c; }
.node[data-state="paused"] .node__core { stroke: var(--warn); }
.node[data-state="working"] .node__glyph, .node[data-state="meeting"] .node__glyph { fill: var(--ink); }
.node--ping .node__halo { animation: ping 1.2s ease-out 1; }
@keyframes ping { 0% { opacity: .9; stroke-width: 3; transform: scale(1); } 100% { opacity: 0; stroke-width: 1; transform: scale(1.9); } }
.node__halo { transform-box: fill-box; transform-origin: center; stroke: var(--bio); }
.node--selected .node__core { stroke: var(--ink); stroke-width: 2.5; }
.particle { fill: var(--bio); }
.core__ring { fill: none; stroke: var(--line-2); stroke-width: 2; }
.core__arc { fill: none; stroke-width: 6; stroke-linecap: round; }
.core__verdict { font-size: 38px; font-weight: 720; font-stretch: 118%; text-anchor: middle; fill: var(--ink); letter-spacing: -.01em; }
.core__symbol { font-size: 15px; font-weight: 600; text-anchor: middle; fill: var(--ink-2); font-stretch: 110%; }
.core__meta { font-size: 12px; text-anchor: middle; fill: var(--muted); }
.dial-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: var(--t-xs); margin-top: 6px; }
.dial-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid currentColor; }
.lg--sonar i { color: var(--sonar); }
.lg--plasma i { color: var(--plasma); }
.lg--good i { color: var(--good); }
.lg--critical i { color: var(--critical); }
.lg--long i, .lg--short i, .lg--neutral i { border-radius: 2px; width: 12px; height: 4px; border: 0; vertical-align: 2px; }
.lg--long i { background: var(--long); }
.lg--short i { background: var(--short); }
.lg--neutral i { background: var(--neutral); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.split__cell { padding: 16px 18px; min-width: 0; }
.split__cell + .split__cell { border-left: 1px solid var(--line); }
@media (max-width: 1180px) { .split { grid-template-columns: 1fr; } .split__cell + .split__cell { border-left: 0; border-top: 1px solid var(--line); } }
.dial-tip {
  position: absolute;
  pointer-events: none;
  min-width: 220px;
  max-width: 320px;
  background: rgba(7, 17, 31, .96);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: var(--t-sm);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  z-index: 5;
}
.dial-tip b { font-stretch: 112%; }
.dial-tip p { margin: 6px 0 0; color: var(--ink-2); }

/* ---------- verdict / bracket ---------- */
.verdict { display: grid; gap: 14px; }
.verdict__line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.verdict__word { font-size: var(--t-2xl); font-weight: 720; font-stretch: 125%; line-height: 1; letter-spacing: -.02em; }
.verdict__word--long { color: var(--long); }
.verdict__word--short { color: var(--short); }
.verdict__sym { font-size: var(--t-lg); font-weight: 600; font-stretch: 110%; }
.verdict__thesis { color: var(--ink-2); margin: 0; max-width: 72ch; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.conviction { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: var(--t-sm); color: var(--muted); }
.meter { height: 6px; border-radius: 999px; background: var(--hull-3); overflow: hidden; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--sonar); }
.meter__mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }

.ladder { position: relative; height: 210px; margin: 4px 0 0; }
.ladder__track { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 4px; margin-left: -2px; border-radius: 4px; background: var(--hull-3); }
.ladder__zone { position: absolute; left: 50%; width: 12px; margin-left: -6px; border-radius: 4px; }
.ladder__zone--reward { background: rgba(28, 170, 149, .55); }
.ladder__zone--risk { background: rgba(224, 105, 58, .55); }
.ladder__row { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; transform: translateY(-50%); font-size: var(--t-sm); }
.ladder__row span:first-child { text-align: right; color: var(--muted); }
.ladder__row b { font-weight: 600; }
.ladder__tick { position: absolute; left: 50%; width: 26px; margin-left: -13px; height: 2px; background: var(--ink-2); transform: translateY(-50%); }
.ladder__tick--mark { background: var(--bio); height: 3px; width: 34px; margin-left: -17px; }
.ladder__row--mark b, .ladder__row--mark span:first-child { color: var(--bio); }

.gate { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gate li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: start; font-size: var(--t-sm); color: var(--ink-2); }
.gate svg { width: 16px; height: 16px; margin-top: 1px; }
.gate .ok svg { color: var(--good); }
.gate .fail svg { color: var(--critical); }
.gate .info svg { color: var(--muted); }
.gate em { font-style: normal; color: var(--muted); white-space: nowrap; }

/* ---------- market matrix ---------- */
.matrix { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.matrix th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix td { padding: 8px 10px; border-bottom: 1px solid rgba(27, 46, 72, .6); white-space: nowrap; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix .num { text-align: right; }
.matrix tbody tr { cursor: default; }
.matrix tbody tr:hover td { background: rgba(20, 39, 65, .45); }
.matrix__sym { font-weight: 640; font-stretch: 112%; }
.matrix__sym small { display: block; font-weight: 400; color: var(--muted); font-stretch: 100%; }
.matrix tr.is-candidate td:first-child { box-shadow: inset 3px 0 0 var(--sonar); }
.spark { width: 120px; height: 30px; display: block; }
.scorebar { display: grid; grid-template-columns: 70px 44px 16px; align-items: center; gap: 6px; justify-content: end; }
.scorebar .meter { height: 5px; }
.flash-up { animation: flashUp .9s ease-out; }
.flash-down { animation: flashDown .9s ease-out; }
@keyframes flashUp { from { color: var(--long); } }
@keyframes flashDown { from { color: var(--short); } }
.table-scroll { overflow-x: auto; }

/* ---------- tape ---------- */
.tape { display: grid; gap: 1px; max-height: 420px; overflow: auto; font-size: var(--t-sm); }
.tape__row { display: grid; grid-template-columns: 62px 92px 1fr; gap: 10px; padding: 6px 4px; border-bottom: 1px solid rgba(27, 46, 72, .5); }
.tape__row time { color: var(--muted); }
.tape__who { color: var(--ink-2); font-weight: 600; font-stretch: 108%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape__msg { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape__row--critical .tape__msg, .tape__row--error .tape__msg { color: #ffb3ba; }
.tape__row--new { animation: tapeIn 1.2s ease-out; }
@keyframes tapeIn { from { background: rgba(87, 240, 212, .1); } }

/* ---------- committee ---------- */
.committee { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); }
.history { display: grid; gap: 2px; max-height: 76vh; overflow: auto; }
.history__item { text-align: left; border: 1px solid transparent; background: transparent; border-radius: var(--r-md); padding: 9px 10px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.history__item:hover { background: var(--hull-2); }
.history__item[aria-current="true"] { background: var(--hull-2); border-color: var(--line-2); }
.history__sym { font-weight: 620; font-stretch: 110%; }
.history__time { color: var(--muted); font-size: var(--t-xs); }
.history__act { font-size: var(--t-sm); font-weight: 600; }
.history__why { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.votes { display: grid; gap: 2px; }
.vote { display: grid; grid-template-columns: 150px minmax(180px, 1.1fr) minmax(0, 2fr); gap: 14px; align-items: center; padding: 9px 4px; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.vote__who b { display: block; font-stretch: 112%; }
.vote__who span { color: var(--muted); font-size: var(--t-xs); }
.vote__summary { color: var(--ink-2); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.diverge { position: relative; height: 22px; }
.diverge__axis { position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px; background: var(--line-2); }
.diverge__bar { position: absolute; top: 7px; height: 8px; border-radius: 4px; }
.diverge__bar--long { left: calc(50% + 1px); background: var(--long); }
.diverge__bar--short { right: calc(50% + 1px); background: var(--short); }
.diverge__dot { position: absolute; left: 50%; top: 7px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--neutral); }
.diverge__label { position: absolute; top: 2px; font-size: var(--t-xs); color: var(--ink-2); }
.diverge__scale { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--t-xs); }
.debate { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.case h4 { margin: 0 0 4px; font-size: var(--t-lg); font-stretch: 118%; }
.case ul, .bullets { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: var(--t-sm); display: grid; gap: 4px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: var(--t-xs); border: 1px solid var(--line-2); color: var(--ink-2); }
.tag--long { border-color: rgba(28, 170, 149, .6); color: #8fe3d4; }
.tag--short { border-color: rgba(224, 105, 58, .6); color: #f3b398; }
.tag--veto { border-color: rgba(255, 77, 94, .6); color: #ffb3ba; }
.tag--ok { border-color: rgba(47, 197, 143, .6); color: #a6ecd0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.mt { margin-top: var(--gap); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; font-size: var(--t-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 560; }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__axis { fill: var(--muted); font-size: 11px; }
.chart__line { fill: none; stroke: var(--sonar); stroke-width: 2; stroke-linejoin: round; }
.chart__area { fill: url(#eqfill); }
.chart__dd { fill: rgba(224, 105, 58, .35); }
.chart__cross { stroke: var(--ink-2); stroke-width: 1; }
.chart__dot { fill: var(--sonar); stroke: var(--hull); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; background: rgba(7, 17, 31, .96); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 7px 9px; font-size: var(--t-xs); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 4; }
.chart-tip b { font-size: var(--t-sm); }
.bars { display: grid; gap: 8px; }
.bars__row { display: grid; grid-template-columns: 90px 1fr 120px; gap: 10px; align-items: center; font-size: var(--t-sm); }
.bars__row span:last-child { text-align: right; color: var(--ink-2); }
.bars__track { position: relative; height: 12px; }
.bars__axis { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.bars__fill { position: absolute; top: 2px; height: 8px; border-radius: 4px; }

/* ---------- progress / stats ---------- */
.journey { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.journey__days { font-size: var(--t-2xl); font-weight: 700; font-stretch: 122%; line-height: 1; }
.journey__days small { font-size: var(--t-md); color: var(--muted); font-weight: 500; font-stretch: 100%; }
.journey .meter { height: 10px; }
.journey .meter i { background: linear-gradient(90deg, var(--sonar), var(--bio)); }
.statline { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.statline > div { padding: 10px 14px; border-left: 1px solid var(--line); }
.statline > div:first-child { border-left: 0; }
.statline span { display: block; color: var(--muted); font-size: var(--t-xs); }
.statline b { font-size: var(--t-lg); font-weight: 620; font-stretch: 108%; }
.insight { border-left: 3px solid var(--sonar); padding: 6px 0 6px 12px; color: var(--ink-2); margin: 0; max-width: 80ch; }
.insight--warn { border-left-color: var(--warn); }
.insight--good { border-left-color: var(--good); }

.data-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.data-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 7px 8px; border-bottom: 1px solid rgba(27, 46, 72, .5); white-space: nowrap; }
.data-table .num { text-align: right; }
.data-table td.wrap { white-space: normal; min-width: 260px; color: var(--ink-2); }

.position { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.position:last-child { border-bottom: 0; }
.position__track { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 4px; background: var(--hull-3); }
.position__track i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); }
.position__track .seg-risk { position: absolute; top: 0; bottom: 0; background: rgba(224, 105, 58, .55); border-radius: 4px 0 0 4px; }
.position__track .seg-reward { position: absolute; top: 0; bottom: 0; background: rgba(28, 170, 149, .55); border-radius: 0 4px 4px 0; }

.integration { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.integration:last-child { border-bottom: 0; }
.integration svg { width: 18px; height: 18px; }
.integration p { grid-column: 2 / -1; margin: 0; color: var(--muted); font-size: var(--t-sm); }
.ok-ico { color: var(--good); }
.warn-ico { color: var(--warn); }
.bad-ico { color: var(--critical); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 10px; color: var(--muted); cursor: pointer; font-size: var(--t-sm); }
.seg button[aria-pressed="true"] { background: var(--hull-3); color: var(--ink); }

pre.json { margin: 0; max-height: 320px; overflow: auto; background: var(--trench); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; font-size: 11.5px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

/* ---------- drawer / modal / toast ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--hull); border-left: 1px solid var(--line-2); z-index: 40; padding: 20px; overflow: auto; box-shadow: -30px 0 80px rgba(0, 0, 0, .5); transform: translateX(105%); transition: transform .28s ease; }
.drawer:not(.drawer--open) { visibility: hidden; transition: transform .28s ease, visibility 0s .28s; }
.drawer--open { transform: none; visibility: visible; }
.drawer__close { position: absolute; top: 14px; right: 14px; }
.drawer h3 { margin: 0 0 2px; font-size: var(--t-xl); font-stretch: 120%; }
.drawer__role { color: var(--muted); margin-bottom: 14px; }
.drawer section { margin-top: 16px; }
.drawer h5 { margin: 0 0 6px; font-size: var(--t-sm); color: var(--muted); font-weight: 520; }

.modal { position: fixed; inset: 0; background: rgba(3, 8, 15, .78); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal__card { width: min(420px, 100%); background: var(--hull); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 12px; }
.modal__card h2 { margin: 0; font-stretch: 118%; }
.modal__card p { margin: 0; color: var(--ink-2); }
.modal__card input { background: var(--trench); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.modal__row { display: flex; gap: 8px; justify-content: flex-end; }

.toast { position: fixed; bottom: 22px; right: 22px; max-width: 420px; padding: 12px 14px; border-radius: var(--r-md); background: var(--hull-2); border: 1px solid var(--line-2); z-index: 70; white-space: pre-line; font-size: var(--t-sm); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.toast--error { border-color: rgba(255, 77, 94, .6); }
.toast--ok { border-color: rgba(47, 197, 143, .6); }

.banner-live { background: rgba(255, 77, 94, .14); border: 1px solid rgba(255, 77, 94, .6); color: #ffd7db; border-radius: var(--r-md); padding: 8px 14px; margin-bottom: var(--gap); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1500px) {
  .ribbon { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ribbon .kpi:nth-child(n+5) { border-top: 1px solid var(--line); }
  .ribbon .kpi:nth-child(5) { border-left: 0; }
  .kpi--hero { grid-template-columns: auto minmax(50px, 110px); }
  .kpi--hero .kpi__value { font-size: 28px; }
}
@media (max-width: 1500px) {
  .brand span { display: none; }
  .controls .btn--label { display: none; }
}
@media (max-width: 1180px) {
  .command { grid-template-columns: 1fr; }
  .command__dial { grid-row: auto; }
  .committee { grid-template-columns: 1fr; }
  .history { max-height: 260px; }
  .controls .btn--label { display: none; }
}
@media (max-width: 820px) {
  :root { --rail: 0px; --top: auto; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .topbar, .main { min-width: 0; }
  .desk-state { gap: 6px; }
  .pill { padding: 4px 9px; font-size: 11.5px; }
  .rail { grid-row: 3; grid-column: 1; flex-direction: row; position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; background: rgba(7, 17, 31, .96); overflow-x: auto; }
  .rail__mark, .rail__spacer { display: none; }
  .rail__btn { width: auto; min-width: 48px; padding: 6px 4px; }
  .topbar { grid-column: 1; flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .brand span { display: none; }
  .topbar__spacer { display: none; }
  .controls { width: 100%; overflow-x: auto; }
  .main { grid-column: 1; padding: 14px 16px 96px; }
  .ribbon { grid-template-columns: 1fr 1fr; }
  .ribbon .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .kpi--hero { grid-column: 1 / -1; border-top: 0 !important; }
  .grid-2, .grid-3, .debate { grid-template-columns: 1fr; }
  .vote { grid-template-columns: 1fr; gap: 6px; }
  .journey { grid-template-columns: 1fr; }
  .node__role { display: none; }
  .bars__row { grid-template-columns: 70px 1fr 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* helpers added for views */
.msvg { display: block; }
[data-span="2"] { grid-column: span 2; }
.spark--wide { width: 100%; height: 70px; }
.matrix__sym .btn { padding: 2px 6px; font-weight: 640; font-stretch: 112%; }
details summary { cursor: pointer; }
@media (max-width: 820px) { [data-span="2"] { grid-column: auto; } }

.memory { padding: 12px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.memory:last-child { border-bottom: 0; }
.memory p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--t-sm); max-width: 110ch; }
.vote .diverge { margin-bottom: 2px; }

/* ---------- 3.1 executive office ---------- */
.office { position: relative; height: max(560px, calc(100vh - 250px)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(1200px 600px at 50% 20%, #0c1a2d, #060d18 70%); }
.office__canvas { display: block; touch-action: none; cursor: grab; }
.office__canvas:focus-visible { outline: 2px solid var(--sonar); outline-offset: -2px; }
.office__bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.office__bar .seg { pointer-events: auto; background: rgba(7, 17, 31, .82); backdrop-filter: blur(8px); }
.office__phase { margin-left: auto; color: var(--ink-2); font-size: var(--t-sm); background: rgba(7, 17, 31, .82); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; }
.office__phase:empty { display: none; }
.office__islands { position: absolute; top: 56px; right: 12px; width: 230px; display: grid; gap: 2px; padding: 8px 10px; background: rgba(7, 17, 31, .82);
  border: 1px solid var(--line-2); border-radius: 12px; backdrop-filter: blur(8px); font-size: var(--t-xs); }
.office__islands button { all: unset; display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.office__islands button:hover, .office__islands button:focus-visible { background: var(--hull-2); }
.office__islands b { color: var(--ink); font-weight: 600; font-size: var(--t-sm); }
.office__islands span { color: var(--muted); }
.office__dots { display: flex; gap: 4px; align-items: center; grid-row: span 2; }
.office__dots i { width: 7px; height: 7px; border-radius: 50%; background: #3b4f6b; }
.office__dots i.s-working { background: var(--sonar); }
.office__dots i.s-meeting { background: var(--plasma); }
.office__dots i.s-approved { background: var(--good); }
.office__dots i.s-rejected, .office__dots i.s-error { background: var(--critical); }
.office__dots i.s-paused { background: var(--warn); }
.office__legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 7px 12px; color: var(--ink-2); font-size: var(--t-xs);
  background: rgba(7, 17, 31, .82); border: 1px solid var(--line-2); border-radius: 12px; pointer-events: none; }
.office__legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid currentColor; }
.lg--idle i { color: #6f86a3; }
.office__zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.office__zoom .btn { background: rgba(7, 17, 31, .86); min-width: 38px; }
.office__tip { position: absolute; pointer-events: none; min-width: 220px; max-width: 320px; background: rgba(7, 17, 31, .96); border: 1px solid var(--line-2);
  border-radius: var(--r-md); padding: 10px 12px; font-size: var(--t-sm); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); z-index: 5; }
.office__tip b { font-stretch: 112%; }
.office__tip p { margin: 6px 0 0; color: var(--ink-2); }
.drawer__portrait { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line-2); float: right; margin: 34px 0 10px 14px; }
@media (max-width: 820px) {
  .office { height: min(70vh, 115vw); }
  #ribbon-office .kpi:not(.kpi--hero) { display: none; }
  .office__legend, .office__islands { display: none; }
  .office__bar .seg button { padding: 5px 8px; }
}

/* ======================= Social Agent Office 1.0 additions ======================= */
a { color: var(--sonar); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn--xs { padding: 3px 9px; font-size: var(--t-xs); border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.banner-demo { background: rgba(232, 176, 74, .10); border: 1px solid rgba(232, 176, 74, .45); color: #f5deb0; border-radius: var(--r-md); padding: 8px 14px; margin-bottom: var(--gap); font-size: var(--t-sm); }
.hookline { font-size: var(--t-lg); font-weight: 600; font-stretch: 106%; margin: 10px 0 4px; color: var(--ink); max-width: 70ch; }

/* forms */
.field { display: grid; gap: 5px; margin-top: 12px; font-size: var(--t-sm); color: var(--ink-2); }
.field > span em { font-style: normal; }
.field textarea, .field__input {
  width: 100%; background: var(--trench); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px;
  color: var(--ink); font: inherit; font-size: var(--t-sm); line-height: 1.5; resize: vertical; box-sizing: border-box;
}
.field textarea:focus, .field__input:focus { outline: 2px solid rgba(79, 182, 240, .45); outline-offset: 1px; border-color: var(--sonar); }
.field textarea[readonly], .field__input[readonly] { opacity: .75; }
.field--row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.field__input--short { width: auto; }
.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); }
.form-grid .btn-row { grid-column: 1 / -1; }
.topic__row { display: flex; gap: 10px; align-items: center; }
.topic__row .field__input { flex: 1; }

/* drafts */
.drafts { display: grid; gap: var(--gap); }
.draft { padding: 0; }
.draft__sum { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; }
.draft__sum::-webkit-details-marker { display: none; }
.draft__id { color: var(--muted); font-weight: 600; }
.draft__hook { font-weight: 600; font-stretch: 104%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.draft__meta .tag svg { width: 9px; height: 9px; color: var(--sonar); }
.draft[open] .draft__sum { border-bottom: 1px solid var(--line); }
.draft__body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 22px; padding: 4px 18px 18px; }
.draft__side section { margin-top: 14px; }
.draft__side h5, .draft__main h5 { margin: 0 0 4px; color: var(--muted); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.draft__side p { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
details.sub { margin-top: 12px; }
details.sub > summary { cursor: pointer; color: var(--ink-2); font-size: var(--t-sm); }

/* queue */
.qrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); font-size: var(--t-sm); }
.qrow:last-child { border-bottom: 0; }
.qrow__hook { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

/* competitors */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--t-sm); background: var(--hull-2); }
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.chip button:hover { color: var(--critical); }
.vpost { padding: 12px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.vpost:last-child { border-bottom: 0; }
.vpost header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--t-sm); }
.vpost__hook { margin: 6px 0 2px; font-weight: 600; }
.vpost__cap { margin: 0; font-size: var(--t-sm); white-space: pre-line; max-width: 110ch; }
.angles li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }

/* profile */
.slot, .demo-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 5px 0; font-size: var(--t-sm); }
.demo-row { grid-template-columns: 60px minmax(0, 1fr) 36px; }
.scatter { width: 100%; height: auto; display: block; }
td.wrap .wrap, span.wrap { white-space: normal; }

@media (max-width: 1180px) {
  .draft__body { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .draft__sum { grid-template-columns: auto minmax(0, 1fr); }
  .draft__meta { grid-column: 1 / -1; justify-content: flex-start; }
  .topic__row { flex-direction: column; align-items: stretch; }
  .qrow { grid-template-columns: auto minmax(0, 1fr); }
}

/* ======================= v2 Growth OS ======================= */
.rail { overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail__btn { flex: none; }
.task { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.task:last-child { border-bottom: 0; }
.task svg { width: 18px; height: 18px; }
.task--done { opacity: .55; }
.task--done .task__label { text-decoration: line-through; }
.task__label b { display: block; }
.task__label span { color: var(--muted); font-size: var(--t-xs); }
.task__count { font-size: var(--t-lg); font-weight: 650; font-stretch: 110%; min-width: 34px; text-align: right; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; background: rgba(15, 30, 51, .5); display: grid; gap: 8px; align-content: start; min-height: 140px; }
.day h4 { margin: 0; font-size: var(--t-sm); font-stretch: 112%; color: var(--ink-2); }
.pitem { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px; display: grid; gap: 5px; background: var(--hull-2); font-size: var(--t-sm); }
.pitem b { font-weight: 600; line-height: 1.3; }
.pitem .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag--obj-descoberta { border-color: rgba(79, 182, 240, .6); color: #a9dcf8; }
.tag--obj-relacionamento { border-color: rgba(155, 134, 255, .6); color: #cfc4ff; }
.tag--obj-venda { border-color: rgba(47, 197, 143, .6); color: #a6ecd0; }
.story { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); font-size: var(--t-sm); }
.story:last-child { border-bottom: 0; }
.story time { font-weight: 650; color: var(--sonar); }
.story__actions { display: flex; gap: 6px; align-items: center; }
.story__actions input { width: 180px; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.kcol { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; min-height: 120px; background: rgba(15, 30, 51, .45); display: grid; gap: 8px; align-content: start; }
.kcol h4 { margin: 0 0 2px; font-size: var(--t-sm); display: flex; justify-content: space-between; color: var(--ink-2); }
.lead { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px; background: var(--hull-2); font-size: var(--t-sm); display: grid; gap: 5px; }
.lead select, .lead input { background: var(--trench); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px; color: var(--ink); font-size: var(--t-xs); }
.cmt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; border-bottom: 1px solid rgba(27, 46, 72, .55); }
.cmt:last-child { border-bottom: 0; }
.cmt header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--t-sm); }
.cmt p { margin: 0; }
.cmt .reply-row { display: flex; gap: 8px; align-items: center; }
.cmt .reply-row input { flex: 1; }
.funnel { display: grid; gap: 6px; }
.funnel__row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: var(--t-sm); }
.score-ring { display: grid; place-items: center; width: 120px; height: 120px; }
.score-ring b { font-size: 34px; font-stretch: 120%; }
.calc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.calc label { display: grid; gap: 4px; font-size: var(--t-xs); color: var(--muted); }
.calc input { background: var(--trench); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; color: var(--ink); font: inherit; }
.calc__out { grid-column: 1 / -1; font-size: var(--t-lg); }
.script { font-family: inherit; margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 3px; font-size: var(--t-sm); color: var(--ink-2); }
.script li b { color: var(--sonar); }
.pack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1300px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .week, .kanban, .pack, .calc { grid-template-columns: 1fr; }
  .task { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .task .btn { grid-column: 2 / -1; justify-self: start; }
  .story { grid-template-columns: 50px minmax(0, 1fr); }
  .story__actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .funnel__row { grid-template-columns: 110px minmax(0, 1fr) 70px; }
}
.setup-row { display: flex; margin: 7px 0; font-size: var(--t-sm); }
/* Editorial intelligence premium */
.ed-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:15px 0 23px}
.ed-panel,.ed-story{padding:22px;background:linear-gradient(150deg,#111d32,#0c1425);border:1px solid rgba(145,180,228,.17);border-radius:18px}
.ed-panel{display:flex;flex-direction:column;gap:5px}.ed-panel>b{font-size:27px;color:#f0f8ff}.ed-panel>b.ed-sm{font-size:20px}
.ed-panel small,.ed-muted,.ed-storyfoot,.ed-storymeta,.ed-note{color:#9aafc7;font-size:12px}
.ed-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:26px 0 14px;flex-wrap:wrap}
.ed-toolbar strong{font-size:21px;color:#eaf2ff}.ed-toolbar p,.ed-story p,.ed-panel p{font-size:14px;line-height:1.6;color:#b6c7dc;margin:8px 0 0}
.ed-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,315px),1fr));gap:14px}
.ed-story{min-height:230px;display:flex;flex-direction:column;gap:14px}
.ed-story h3{font-size:17px;line-height:1.35;color:#f3f8ff;margin:0}.ed-story p{margin:0;flex:1}
.ed-storymeta,.ed-storyfoot,.ed-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.ed-storymeta>span:first-child,.ed-ok{font-size:12px;color:#6ef3cc}.ed-actions{justify-content:flex-start}
.ed-actions .btn{font-size:12px;padding:8px 10px}.ed-story a{color:#80ddf5;font-size:12px}
.ed-pills{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}.ed-pills>span{background:#18283d;color:#c5daed;padding:8px 12px;border-radius:30px;font-size:12px}
.ed-slots{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:15px}.ed-warning{color:#ffba80}.ed-note{line-height:1.7;margin-top:20px}

.ed-preview{width:100%;max-height:230px;object-fit:cover;object-position:center 15%;border-radius:12px;border:1px solid #294459}

/* ---------- v3 Traffic Management Office AI ---------- */
.seg--scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg--scroll button { white-space: nowrap; }
.seg--wide { display: flex; flex-wrap: wrap; }
.seg--wide button { flex: 1 1 auto; padding: 8px 10px; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.st-gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.st-media { width: 150px; max-height: 260px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--trench); flex: 0 0 auto; }
video.st-media { width: 140px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.st-card { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px; background: var(--hull-2); display: grid; gap: 8px; align-content: start; }
.kw-table td { vertical-align: top; }
.kw-table input, .kw-table textarea, #inbox textarea, #inbox input, #inbox select, #studio textarea, #studio select, #clone-cap {
  width: 100%; background: var(--trench); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--ink); padding: 6px 8px; font: inherit; font-size: var(--t-sm); }
.kw-table textarea { min-width: 260px; }
.kw-table .field__input--short { max-width: 120px; text-transform: uppercase; }
.btn-row select, .btn-row input { width: auto; flex: 1 1 140px; }
#inbox .pitem { width: 100%; text-align: left; color: var(--ink); cursor: pointer; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#inbox .history { max-height: 360px; overflow: auto; }
#inbox .history__item.pos .history__why { color: var(--bio); }
.meter-txt { font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; color: var(--ink-2); margin: 8px 0; }
@media (max-width: 720px) {
  .st-media { width: 120px; }
  .kw-table textarea { min-width: 180px; }
}
#knowledge .data-table td, #ceo .data-table td, #inbox .data-table td { white-space: normal; }
#knowledge .data-table td:first-child { min-width: 220px; }
#knowledge .qrow, #studio .qrow { grid-template-columns: auto minmax(0, 1fr) auto; }
