:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1b2130; --muted: #5f6878; --line: #dfe3ea; --accent: #2f4fa3;
  --good: #1f7a44; --warn: #9a5b00; --bad: #a3282b;
  --high: #1f7a44; --high-bg: #dff3e6; --mid: #3d5a99; --mid-bg: #e2e9f8; --low: #9a5b00; --low-bg: #fdeccc;
  --idle: #a3282b; --idle-bg: #fadcdc; --up: #6b3fa0; --up-bg: #eee3fa;
  --claude: #c96442; --chatgpt: #10a37f; --cursor: #444c5c; --modus: #6b3fa0;
  --display: "Heebo", -apple-system, Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #14171d; --panel: #1c2028; --text: #e7eaf0; --muted: #9aa3b2; --line: #2e3440; --accent: #8fa8ec;
  --good: #8fdcaa; --warn: #f3c47a; --bad: #f2a0a0;
  --high: #8fdcaa; --high-bg: #1d3a28; --mid: #a9bdf0; --mid-bg: #232f4a; --low: #f3c47a; --low-bg: #43331a;
  --idle: #f2a0a0; --idle-bg: #472324; --up: #cfb2f2; --up-bg: #352848; --cursor: #a5adbd; color-scheme: dark; } }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 var(--display); background: var(--bg); color: var(--text); }
main { padding: 28px 32px 48px; min-width: 0; }
h2 { font-size: 16px; margin: 24px 0 10px; }
h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.claude { background: var(--claude); } .dot.chatgpt { background: var(--chatgpt); } .dot.cursor { background: var(--cursor); } .dot.modus { background: var(--modus); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.bar > div { height: 100%; background: var(--good); }
.total { display: flex; gap: 32px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; }
textarea { width: 100%; min-height: 140px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
button.btn { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
button.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
button.btn:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.tablewrap { overflow: auto; max-height: calc(100vh - 190px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 11px 14px; font-size: 15px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--panel); position: sticky; top: 0; cursor: pointer; user-select: none; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.unused td { background: color-mix(in srgb, var(--warn) 8%, transparent); }
tr.details td { white-space: normal; background: var(--bg); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 13px; border: 1px solid var(--line); }
.pill.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.pill.none { color: var(--muted); border-style: dashed; }
.cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cell small { color: var(--muted); font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; font-size: 13px; }
.metrics span { color: var(--muted); }
.note { padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 12%, transparent); margin-bottom: 12px; }
.note.info { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
label { font-size: 13px; }
#toast { position: fixed; bottom: 20px; right: 20px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 480px; }
#toast.show { opacity: .95; }
@media (max-width: 600px) { main, header { padding-left: 16px; padding-right: 16px; } .grid2 { grid-template-columns: 1fr; } }

/* Seat review (artifact style) */
.wrap { display: grid; gap: 22px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.eyebrow { font: 500 12px var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
h1 { font: 800 clamp(24px, 4vw, 34px)/1.15 var(--display); margin: 0; }
.lede { color: var(--muted); max-width: 90ch; margin: 0; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.panels .panel { display: grid; gap: 10px; align-content: start; min-width: 0; }
.panel h2 { margin: 0; font: 700 18px var(--display); }
.stats { display: flex; flex-wrap: wrap; gap: 18px; }
.stat { display: grid; } .stat b { font: 800 26px/1.1 var(--display); font-variant-numeric: tabular-nums; } .stat span { color: var(--muted); font-size: 12px; }
.findings { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; }
.cutrow { display: grid; grid-template-columns: 80px 36px 1fr; gap: 8px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 8px; }
.cutrow:first-of-type { border-top: 0; padding-top: 0; }
.cutrow .cnt { font: 800 20px var(--display); color: var(--idle); } .cutrow .who { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.f { font: 500 13px var(--display); border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.f.on { background: var(--accent); border-color: var(--accent); color: var(--panel); }
td.who b { display: block; } td.who small { color: var(--muted); font-size: 12px; display: block; }
td.tc { font: 800 20px var(--display); text-align: center; color: var(--accent); }
td.tool { min-width: 190px; white-space: normal; vertical-align: top; } td.tool small { display: block; color: var(--muted); font-size: 12px; }
td.none { color: var(--muted); text-align: center; }
.lv { display: inline-block; padding: 0 8px; border-radius: 999px; font-weight: 700; font-size: 11px; margin-inline-start: 4px; }
.lv.high { background: var(--high-bg); color: var(--high); } .lv.mid { background: var(--mid-bg); color: var(--mid); }
.lv.low { background: var(--low-bg); color: var(--low); } .lv.idle { background: var(--idle-bg); color: var(--idle); }
.lv.nodata { border: 1px dashed var(--line); color: var(--muted); }
.cat { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.cat.cut { background: var(--idle-bg); color: var(--idle); } .cat.dup { background: var(--low-bg); color: var(--low); }
.cat.check { background: var(--mid-bg); color: var(--mid); } .cat.up { background: var(--up-bg); color: var(--up); } .cat.ok { color: var(--high); }
.cat.zero { background: var(--idle); color: var(--panel); }
.why { color: var(--muted); font-size: 12px; margin-top: 3px; min-width: 240px; white-space: normal; }
.foot { color: var(--muted); font-size: 13px; margin: 0; max-width: 110ch; }

tr.ghead td { background: var(--bg); font: 700 14px var(--display); padding-top: 14px; }
tr.ghead td .muted { font-weight: 400; font-size: 12px; margin-inline-start: 8px; }
.tag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin: 1px 2px 0 0; }
.tag.Coding { color: var(--mid); border-color: color-mix(in srgb, var(--mid) 40%, transparent); }
.tag.Chat { color: var(--high); border-color: color-mix(in srgb, var(--high) 40%, transparent); }
.tag.Agents { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, transparent); }
.big { font: 800 48px/1 var(--display); font-variant-numeric: tabular-nums; }

.tag.Data { color: var(--low); border-color: color-mix(in srgb, var(--low) 40%, transparent); }

/* App shell: left sidebar */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px; gap: 6px; }
.side .brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.side .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--panel); display: grid; place-items: center; font: 800 14px var(--display); flex: none; }
.side .name { font: 800 15px/1.2 var(--display); }
.side .sub { font-size: 11px; color: var(--muted); line-height: 1.3; }
#tabs { display: flex; flex-direction: column; gap: 2px; }
#tabs .grp { font: 500 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 6px; }
#tabs button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px;
  padding: 8px 10px; color: var(--muted); font: 500 14px var(--display); cursor: pointer; transition: background .12s, color .12s; }
#tabs button:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
#tabs button.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); font-weight: 700; }
#tabs button.on .ic { color: var(--accent); }
#tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#tabs .ic { width: 17px; height: 17px; flex: none; }
#tabs .dot { width: 10px; height: 10px; margin: 0 3.5px; flex: none; }
.side-foot { margin-top: auto; padding: 12px 10px 0; font: 500 11px var(--mono); color: var(--muted); border-top: 1px solid var(--line); }
.tablewrap { max-height: calc(100vh - 150px); }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 5; }
  .side .brand { border: 0; margin: 0; padding: 0 8px 0 0; } .side .brand .sub, .side .brand .name, .side-foot, #tabs .grp { display: none; }
  #tabs { flex-direction: row; overflow-x: auto; } #tabs button { width: auto; white-space: nowrap; }
  main { padding: 20px 16px 40px; }
}

/* Explicit dark theme (toggle); light is the base palette, "auto" follows the system. */
:root[data-theme="dark"] {
  --bg: #14171d; --panel: #1c2028; --text: #e7eaf0; --muted: #9aa3b2; --line: #2e3440; --accent: #8fa8ec;
  --good: #8fdcaa; --warn: #f3c47a; --bad: #f2a0a0;
  --high: #8fdcaa; --high-bg: #1d3a28; --mid: #a9bdf0; --mid-bg: #232f4a; --low: #f3c47a; --low-bg: #43331a;
  --idle: #f2a0a0; --idle-bg: #472324; --up: #cfb2f2; --up-bg: #352848; --cursor: #a5adbd; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
.side-foot { display: grid; gap: 8px; }
.themebtn { font: 500 12px var(--display); background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; text-align: left; }
.themebtn:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }

/* Dashboard */
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dhead h1 { margin: 2px 0 4px; }
.dctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { font: 500 13px var(--display); background: none; border: 0; color: var(--muted); padding: 7px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--panel); font-weight: 700; }
.kpis5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi5 { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.kpi5 span { color: var(--muted); font-size: 13px; }
.kpi5 b { font: 800 30px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.kpi5 small { color: var(--muted); font-size: 12px; }
.kpi5.main { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.kpi5.main b { color: var(--accent); }
.kpi5.warnk b { color: var(--idle); }
.tbar { display: grid; grid-template-columns: 92px 1fr 70px; gap: 4px 10px; align-items: center; }
.tbar small { grid-column: 2 / 4; color: var(--muted); font-size: 12px; margin-top: -2px; }
.tbar b { text-align: right; font-variant-numeric: tabular-nums; }
.tn { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.track { height: 10px; background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 5px; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 5px; min-width: 2px; }
.stack { display: flex; height: 18px; border-radius: 6px; overflow: hidden; gap: 2px; }
.p-Heavy { background: var(--high); } .p-Medium { background: var(--mid); } .p-Light { background: var(--low); } .p-Inactive { background: var(--idle); } .p-NoData { background: var(--line); }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lg { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--text); font: 14px var(--display); cursor: pointer; text-align: left; }
.lg:hover { border-color: var(--accent); }
.lg b { font-variant-numeric: tabular-nums; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
table.mini th, table.mini td { padding: 7px 8px; font-size: 14px; }
table.mini th { position: static; cursor: default; }
table.mini tbody tr { cursor: pointer; }
table.mini tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.tablewrap.flat { border: 0; border-radius: 0; max-height: 70vh; }
table.people td { vertical-align: top; }
table.people tr.prow { cursor: pointer; }
table.people tr.prow:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
table.people td.n small { display: block; color: var(--muted); font-size: 12px; }
.prof { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; color: var(--panel); }
.prof.p-NoData { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px 1px 6px; border-radius: 999px; margin: 0 4px 3px 0; border: 1px solid transparent; }
.chip .dot { width: 8px; height: 8px; }
.chip.lv-high { background: var(--high-bg); color: var(--high); } .chip.lv-mid { background: var(--mid-bg); color: var(--mid); }
.chip.lv-low { background: var(--low-bg); color: var(--low); } .chip.lv-idle { background: var(--idle-bg); color: var(--idle); }
.chip.lv-nodata { border-color: var(--line); color: var(--muted); }
.chip.noseat { border-style: dashed; border-color: currentColor; }
td.rec { white-space: normal; min-width: 260px; }
td.rec small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.act { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.act.release { background: var(--idle-bg); color: var(--idle); } .act.review { background: var(--low-bg); color: var(--low); } .act.keep { color: var(--high); padding-left: 0; }
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; }
.tcard .th { display: flex; align-items: center; gap: 8px; } .tcard .th .prof { margin-left: auto; }
.cov { display: grid; gap: 8px; }
.covrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.covrow .tn { width: 92px; }
.mo { font: 500 12px var(--mono); padding: 2px 8px; border-radius: 6px; border: 1px dashed var(--line); color: var(--muted); }
.mo.have { border: 1px solid transparent; background: var(--high-bg); color: var(--high); }
.covrow small { margin-left: 6px; font-size: 12px; }
@media (max-width: 900px) { .side-foot { display: flex; margin: 0 0 0 auto; padding: 0; border: 0; } .side-foot span { display: none; } .dctl { width: 100%; } }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars span { flex: 1; background: var(--chatgpt); border-radius: 3px 3px 0 0; min-width: 3px; opacity: .85; }
.bars span:hover { opacity: 1; }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.mo.part { border: 1px solid transparent; background: var(--mid-bg); color: var(--mid); }
table.prices th, table.prices td { padding: 8px 8px; }
table.prices th { position: static; }
td.score { white-space: nowrap; } td.score b { display: inline-block; min-width: 24px; }
.sbar { display: inline-block; width: 48px; height: 6px; border-radius: 3px; background: var(--line); margin-left: 6px; vertical-align: middle; overflow: hidden; }
.sbar > span { display: block; height: 100%; }
.tcard .tscore { margin-left: auto; font-weight: 800; font-family: 'IBM Plex Mono', monospace; } .tcard .tscore + .prof { margin-left: 0; }
.cake { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pie { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pie > div { width: 96px; height: 96px; border-radius: 50%; background: var(--panel); display: grid; place-content: center; text-align: center; }
.pie b { font-size: 34px; font-weight: 800; line-height: 1; } .pie small { color: var(--muted); font-size: 12px; }
.legend.one { grid-template-columns: 1fr; flex: 1; min-width: 140px; }
.lg.static { cursor: default; } .lg.static:hover { border-color: var(--line); }
/* Intango logo: black in light mode, white in dark mode */
.ilogo { display: block; height: 30px; width: auto; margin: 2px 0 8px; }
.ilogo.dk { display: none; }
:root[data-theme="dark"] .ilogo.lt { display: none; } :root[data-theme="dark"] .ilogo.dk { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ilogo.lt { display: none; } :root:not([data-theme="light"]) .ilogo.dk { display: block; } }
@media (max-width: 900px) { .ilogo { height: 22px; margin: 0; } }
.claudebars span { background: var(--claude); }
.hovertip { position: fixed; z-index: 50; display: none; pointer-events: none; white-space: pre-line; background: var(--text); color: var(--panel); font-size: 12px; line-height: 1.45; padding: 6px 10px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.18); max-width: 260px; }
.bars span[data-tip] { cursor: default; }
.bars span[data-tip] { cursor: pointer; } .bars span.pinned { opacity: 1; outline: 2px solid var(--text); outline-offset: 1px; }
.hovertip.pinned { box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.cursorbars span { background: var(--cursor); } .modusbars span { background: var(--modus); }
.note .dismiss { float: right; margin-left: 12px; font-size: 14px; color: var(--muted); text-decoration: none; } .note .dismiss:hover { color: var(--text); }
.howto { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.howto summary { cursor: pointer; font-weight: 700; }
.howto h3 { font-size: 14px; margin: 12px 0 4px; display: flex; align-items: center; gap: 6px; }
.howto ol { margin: 0; padding-left: 20px; } .howto li { margin: 4px 0; }
.howto code { font-size: 11.5px; background: var(--line); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.howto .req { font-size: 11px; font-weight: 700; color: var(--high); background: var(--high-bg); padding: 0 6px; border-radius: 999px; }
.howto a { color: var(--accent); font-weight: 600; }
[hidden] { display: none !important; }
/* Import page */
.drop { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; margin: 8px 0; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop input[type=file] { display: none; }
.lastup { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin-bottom: 10px; } .lastup > span { display: inline-flex; align-items: center; gap: 6px; }
table.checklist td, table.checklist th { padding: 6px 8px; } table.checklist .ck { text-align: center; width: 70px; font-weight: 800; }
.ck.ok { color: var(--high); } .ck.part { color: var(--low); } .ck.no { color: var(--idle); } .ck.na { color: var(--muted); }
table.pv td { font-size: 12.5px; vertical-align: top; } .okt { color: var(--high); font-weight: 700; }
.trend { display: flex; gap: 8px; align-items: flex-end; overflow-x: auto; padding-bottom: 4px; }
.tcol { flex: 1; min-width: 58px; display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 12px; }
.tcol small { color: var(--muted); font-size: 11px; } .tcol b { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tbarv { height: 110px; width: 70%; display: flex; align-items: flex-end; } .tbarv span { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .8; }
.tcol:hover .tbarv span, .tcol.pinned .tbarv span { opacity: 1; } .tcol.pinned b { text-decoration: underline; }
.tact { display: flex; gap: 2px; } .tact .dot { width: 6px; height: 6px; }
.seg { flex-wrap: wrap; }
.kpi5.clickable { cursor: pointer; transition: border-color .15s, transform .15s; } .kpi5.clickable:hover, .kpi5.clickable:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.kpi5 b .delta { font-style: normal; font-size: 13px; font-weight: 700; margin-left: 8px; vertical-align: middle; white-space: nowrap; cursor: default; }
.delta i { font-style: normal; font-weight: 500; opacity: .8; } .delta.up { color: var(--high); } .delta.down { color: var(--idle); }
.delta.na { color: var(--muted); font-weight: 500; }
/* Roles: hide what the signed-in role can't use (the server enforces it too) */
body:not([data-role="editor"]):not([data-role="admin"]) .need-editor { display: none !important; }
body:not([data-role="admin"]) .need-admin { display: none !important; }
.who-box { display: grid; gap: 4px; font-size: 12px; margin-bottom: 8px; }
.who-box .who { display: flex; align-items: center; gap: 6px; min-width: 0; } .who-box .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rolepill { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: capitalize; background: var(--line); }
.rolepill.r-admin { background: var(--high-bg); color: var(--high); } .rolepill.r-editor { background: var(--mid-bg); color: var(--mid); }
.who-box .link { justify-self: start; font-size: 12px; }

/* Per-person usage over time (People table → click a row): bars = code lines, line = tokens */
.hist { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; --hbar: #4472c4; --hline: #ed7d31; }
.hhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; margin-bottom: 4px; } .hhead .muted { font-size: 12px; }
.hsvg { display: block; max-width: 100%; }
.hgrid { stroke: var(--line); stroke-width: 1; }
.hax { fill: var(--muted); font: 11px var(--display); } .haxt { fill: var(--text); font: 700 12px var(--display); }
.hbar { fill: var(--hbar); } .hbar.partial { opacity: .5; }
.hline { fill: none; stroke: var(--hline); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.hdot { fill: var(--hline); stroke: var(--panel); stroke-width: 1.5; }
.hhit { fill: transparent; cursor: pointer; } .hhit:hover, .hhit.pinned { fill: var(--text); fill-opacity: .06; outline: none; }
.hlegend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--text); margin-top: 2px; }
.hlegend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 14px; height: 9px; background: var(--hbar); display: inline-block; }
.lg-line { width: 18px; height: 3px; background: var(--hline); border-radius: 2px; display: inline-block; }
.hnote { font-size: 11px; margin-top: 4px; text-align: center; }

/* Collapsible sidebar: full (236px) ↔ icon rail (64px); the toggle sits in the brand row */
.app { transition: grid-template-columns .18s ease; }
.side .brand { position: relative; }
.sidetoggle { margin-left: auto; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px;
  background: none; color: var(--muted); cursor: pointer; align-self: flex-start; }
.sidetoggle:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.sidetoggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sidetoggle svg { width: 18px; height: 18px; }
.sidetoggle .chev { transition: transform .18s ease; transform-origin: 13.5px 12px; }
.app.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.app.collapsed .side { padding: 14px 8px; overflow-x: hidden; }
.app.collapsed .side .brand { justify-content: center; padding: 2px 0 12px; }
.app.collapsed .side .brand > div, .app.collapsed #tabs button > span:not(.dot), .app.collapsed .side-foot { display: none; }
.app.collapsed .sidetoggle { margin: 0; align-self: center; }
.app.collapsed .sidetoggle .chev { transform: scaleX(-1); }
.app.collapsed #tabs .grp { font-size: 0; padding: 10px 0 4px; margin: 0 10px; border-top: 1px solid var(--line); }
.app.collapsed #tabs button { justify-content: center; padding: 10px 0; }
.app.collapsed #tabs .dot { margin: 0; }
@media (max-width: 900px) { .sidetoggle { display: none; } .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .app.collapsed .side .brand > div, .app.collapsed #tabs button > span:not(.dot) { display: revert; } .app.collapsed #tabs .grp { display: none; } .app.collapsed .side-foot { display: flex; } }
@media (max-width: 900px) { .who-box { display: flex; align-items: center; margin: 0; } .who-box .who { display: none; } .themebtn { white-space: nowrap; } }
.hunrep { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 3; } .hunrept { fill: var(--muted); font: 700 12px var(--display); }
.lg-unrep { width: 14px; height: 12px; border: 1.2px dashed var(--muted); border-radius: 2px; display: inline-grid; place-items: center; font: 700 9px var(--display); font-style: normal; color: var(--muted); }
.hist { --hchat: #2e9e5b; } .hchat { fill: none; stroke: var(--hchat); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.hcdot { fill: var(--hchat); stroke: var(--panel); stroke-width: 1.5; } .hcdot.none { fill: var(--panel); stroke: var(--hchat); stroke-width: 2; } .hclab { fill: var(--hchat); font: 700 11px var(--display); }
.lg-chat { width: 18px; height: 3px; background: var(--hchat); border-radius: 2px; display: inline-block; }

/* Value for money */
table.vtab { width: 100%; border-collapse: collapse; font-size: 13px; }
table.vtab th, table.vtab td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.vtab th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.vtab .n { text-align: right; }
table.vtab tr.tot td { border-bottom: 0; border-top: 2px solid var(--line); }
table.vtab .dot { display: inline-block; vertical-align: middle; margin-right: 4px; }

/* Person notes */
.nbadge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font: 600 11px var(--display); vertical-align: 1px; cursor: help;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.nbadge.d-keep { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.nbadge.d-release { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.nbadge.d-downgrade, .nbadge.d-watch { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pnote-ed, .pnote-ro { margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; font-size: 13px; }
.pnote-ed textarea { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; }
.pnote-ed .nrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pnote-ed .nrow .muted { font-size: 12px; }
.pnote-ro .muted { font-size: 12px; }
table.audit td { font-size: 13px; vertical-align: top; } table.audit td:first-child { white-space: nowrap; }
#auditTbl { max-height: 460px; }
.pnote-ed textarea { min-height: 0; height: auto; max-width: 720px; }  .pnote-ed { max-width: 760px; }

/* Renewal planner */
table.renew { width: 100%; border-collapse: collapse; font-size: 13px; }
table.renew th, table.renew td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.renew th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.renew .n { text-align: right; white-space: nowrap; }
table.renew small { display: block; font-size: 12px; margin-top: 2px; max-width: 340px; }
table.renew tr.isdone td { opacity: .6; }
table.renew .dot { display: inline-block; vertical-align: middle; }
.pl { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 600 12px var(--display); background: color-mix(in srgb, var(--text) 8%, transparent); }
.pl-drop { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pl-downgrade { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pl-upgrade { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pl-keep { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
table.renew td:nth-child(5) small { max-width: 260px; }
table.renew select { font-size: 12px; padding: 4px 6px; max-width: 170px; }
table.renew td:first-child small { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.renew td { white-space: normal; } table.renew td:nth-child(5) { min-width: 220px; }

/* Emails (Settings) */
.mailbox { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 6px; }
.mailbox p { margin: 0; font-size: 12px; } .mailbox textarea { min-height: 0; height: auto; font: inherit; font-size: 13px; }
.mailbox .nrow, #emailPanel .nrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .mailbox .nrow .muted { font-size: 12px; }
.mtoggle { display: flex; align-items: center; gap: 8px; }


/* AI Impact */
:root { --costbar: #8796bd; --goodlite: #9bc8ab; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --costbar: #5d6b91; --goodlite: #3e6b4f; } }
:root[data-theme="dark"] { --costbar: #5d6b91; --goodlite: #3e6b4f; }
.impact .ikpis { grid-template-columns: repeat(5, 1fr); margin: 16px 0; }
@media (max-width: 1100px) { .impact .ikpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .impact .ikpis { grid-template-columns: 1fr; } }
.impact .kpi5 .kl { display: flex; align-items: center; gap: 6px; }
.impact .kpi5 b.na { font-size: 17px; color: var(--muted); margin: 8px 0 2px; }
.impact .pos { color: var(--good); } .impact .neg { color: var(--bad); }
.impact .kpi5.main { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.impact .kpi5.main b.pos { color: var(--good); }
.itip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font: italic 700 10px Georgia, serif; cursor: help; flex: none; }
.impact .panel { margin-bottom: 16px; }
.impact .panel h2 { display: flex; align-items: center; gap: 6px; margin: 0; }
.impact .isub { margin: 2px 0 14px; font-size: 13px; }
.ichart { display: grid; grid-template-columns: 150px 1fr; gap: 12px 16px; align-items: center; max-width: 860px; }
.ichart .lab { font-weight: 600; } .ichart .lab small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ichart .track { background: color-mix(in srgb, var(--line) 55%, transparent); border-radius: 8px; height: 38px; }
.ichart .track.empty { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 600; }
.ichart .fill, .ichart .split > div { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; }
.ichart .fill { border-radius: 8px; min-width: 80px; }
.ichart .split { display: flex; height: 100%; border-radius: 8px; overflow: hidden; }
.icallout { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--good) 12%, transparent); }
.icallout.warn, .ibanner { background: var(--low-bg); }
.ibanner { border: 1px solid color-mix(in srgb, var(--low) 35%, transparent); border-radius: 10px; padding: 10px 14px; margin-top: 14px; }
.ibanner.info { background: var(--mid-bg); border-color: color-mix(in srgb, var(--mid) 30%, transparent); }
.ibanner a { color: var(--accent); }
table.itab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.itab th, table.itab td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.itab th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.itab .n { text-align: right; font-variant-numeric: tabular-nums; }
table.itab tr.tot td { border-bottom: 0; border-top: 2px solid var(--line); font-weight: 700; }
table.itab .na, .impact .na { color: var(--muted); font-weight: 400; }
table.itab .miss { color: var(--low); font-size: 12px; font-weight: 600; }
table.itab .dot { display: inline-block; vertical-align: middle; margin-right: 4px; }
details.iadv { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-top: 20px; }
details.iadv > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; flex-wrap: wrap; }
details.iadv > summary::-webkit-details-marker { display: none; }
details.iadv .chev { color: var(--muted); transition: transform .2s; } details.iadv[open] .chev { transform: rotate(90deg); }
.iadvb { border-top: 1px solid var(--line); padding: 0 16px 16px; }
.itabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 -16px 14px; padding: 0 16px; overflow-x: auto; }
.itabs button { border: 0; background: none; padding: 11px 12px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.itabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.iform { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; max-width: 860px; }
.iform h3 { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 -4px; }
.iform label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.iform .frow { display: flex; align-items: center; gap: 6px; } .iform input { width: 100px; }
.iactions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.ipill { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 7px; background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--muted); }
.ipill.set { background: var(--mid-bg); color: var(--accent); }
.icalc { max-width: 820px; } .icalc p { margin: 0 0 10px; }
.roiline { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--good) 10%, transparent); font-size: 14px; }
.roiline .pos { color: var(--good); } .roiline .neg { color: var(--bad); }
@media (max-width: 700px) { .ichart { grid-template-columns: 1fr; gap: 6px; } }
.ilegend { display: none; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ilegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
@media (max-width: 700px) { .ilegend { display: flex; } .ichart .split > div { font-size: 0; padding: 0; } .ichart > div:empty { display: none; } }
