:root{
  /* blue — the primary colour of the app */
  --ink:#123A63;
  --ink-2:#17497C;
  --ink-3:#1D5C97;
  --sky:#2F7FD4;
  --sky-soft:#E7F0FD;
  /* paper and surfaces, tinted very slightly blue */
  --paper:#F3F8FD;
  --surface:#FFFFFF;
  --sunk:#EAF2FC;
  /* red stays only for danger: errors, delete, department alerts */
  --tape:#B3202C;
  --tape-soft:#FBEAEB;
  /* pastel green — anything settled, paid, approved, filed */
  --seal:#137A52;
  --seal-soft:#E3F5EC;
  --mint:#3FAE85;
  /* orange — anything awaiting action, pending, in review */
  --amber:#B45B0D;
  --amber-soft:#FFF1E0;
  --orange:#F08A2E;
  /* text and rules */
  --slate:#4E5F79;
  --slate-2:#8496AE;
  --rule:#DCE6F2;
  --rule-2:#EAF1F9;
  /* depth */
  --shadow:0 1px 2px rgba(18,58,99,.05),0 10px 26px -16px rgba(18,58,99,.28);
  --shadow-lg:0 2px 5px rgba(18,58,99,.07),0 20px 42px -20px rgba(18,58,99,.38);
}
*{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none!important}   /* the HTML hidden attribute always wins over display rules */
html{-webkit-text-size-adjust:100%}
/* page background across the app: blue → aqua → pastel green → soft orange */
body{
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(240,138,46,.13), transparent 62%),
    radial-gradient(900px 520px at 4% 108%, rgba(63,174,133,.16), transparent 60%),
    linear-gradient(155deg,#E9F3FE 0%,#E6F4F8 40%,#E7F6EE 70%,#FCF2E6 100%)
    fixed !important;
  min-height:100vh;
}
body{
  color:var(--ink);
  font-family:"IBM Plex Sans",system-ui,sans-serif;
  font-size:14px;
  line-height:1.5;
}
.mono{font-family:"IBM Plex Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums}

/* ── demo chrome ─────────────────────────────────────── */
.demo-bar{
  position:sticky;top:0;z-index:50;
  background:var(--ink);
  border-bottom:1px solid rgba(255,255,255,.1);
  padding:10px 18px;
  display:flex;align-items:center;gap:18px;flex-wrap:wrap;
}
.demo-tag{
  font-family:"Archivo",sans-serif;font-weight:700;font-size:10px;
  letter-spacing:.14em;text-transform:uppercase;
  color:rgba(255,255,255,.4);
  border:1px solid rgba(255,255,255,.2);
  padding:3px 8px;border-radius:3px;white-space:nowrap;
}
.demo-nav{display:flex;gap:4px;flex-wrap:wrap}
.demo-nav button{
  font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;font-weight:500;
  background:none;border:0;border-radius:5px;
  color:rgba(255,255,255,.55);
  padding:6px 11px;cursor:pointer;
  transition:background .12s,color .12s;
}
.demo-nav button:hover{color:#fff;background:rgba(255,255,255,.08)}
.demo-nav button[aria-current="true"]{color:var(--ink);background:#fff}
.demo-nav button:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* ── app frame ───────────────────────────────────────── */
.frame{display:flex;min-height:calc(100vh - 45px);background:var(--paper);position:relative}
.rail{
  width:196px;flex-shrink:0;background:var(--ink);
  padding:22px 0;display:flex;flex-direction:column;
  transition:width .18s ease, padding .18s ease;
}
/* ── collapsible menu ──────────────────────────────────────────────────
   The rail collapses to nothing and the arrow tucks against the left edge,
   so the tables and charts get the whole width on a laptop screen. */
/* min-width:0 is load-bearing — a flex item defaults to min-width:auto, which
   refuses to shrink below its content and would ignore width:0 entirely. */
.frame.rail-hidden .rail{
  width:0;min-width:0;padding-left:0;padding-right:0;overflow:hidden;
}
.rail-toggle{
  position:absolute;top:12px;left:196px;z-index:5;
  width:22px;height:34px;margin-left:-11px;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface);color:var(--slate);
  border:1px solid var(--rule);border-radius:5px;
  font-size:14px;line-height:1;cursor:pointer;
  box-shadow:0 1px 4px rgba(20,33,61,.12);
  transition:left .18s ease, background .12s, color .12s;
}
.rail-toggle:hover{background:var(--sky-soft);color:var(--ink)}
.rail-toggle:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.frame.rail-hidden .rail-toggle{left:0;margin-left:6px}
.wordmark{
  padding:0 20px 22px;
  font-family:"Archivo",sans-serif;font-weight:800;font-size:15px;
  letter-spacing:-.02em;color:#fff;line-height:1.25;
}
.wordmark span{color:var(--slate-2);font-weight:500;display:block;font-size:10px;letter-spacing:.1em;text-transform:uppercase;margin-top:4px}
.rail nav{display:flex;flex-direction:column;gap:1px;padding:0 10px}
.rail nav a{
  color:rgba(255,255,255,.6);text-decoration:none;
  padding:8px 10px;border-radius:5px;font-size:13px;
  display:flex;justify-content:space-between;align-items:center;
}
.rail nav a:hover{background:rgba(255,255,255,.07);color:#fff}
.rail nav a.on{background:var(--ink-3);color:#fff;font-weight:500}
.rail nav a b{font-family:"IBM Plex Mono",monospace;font-size:11px;font-weight:500;color:rgba(255,255,255,.45)}
.rail-foot{margin-top:auto;padding:16px 20px 0;border-top:1px solid rgba(255,255,255,.1);margin-left:10px;margin-right:10px}
.rail-foot p{color:rgba(255,255,255,.85);font-size:12.5px;font-weight:500}
.rail-foot small{color:var(--slate-2);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  background:var(--surface);border-bottom:1px solid var(--rule);
  padding:16px 26px;display:flex;justify-content:space-between;
  align-items:flex-start;gap:16px;flex-wrap:wrap;
}
h1{font-family:"Archivo",sans-serif;font-weight:700;font-size:20px;letter-spacing:-.02em}
.topbar .sub{color:var(--slate);font-size:12.5px;margin-top:2px}
.body{padding:22px 26px 60px;flex:1}

/* ── buttons ─────────────────────────────────────────── */
.btn{
  font-family:"IBM Plex Sans",sans-serif;font-size:13px;font-weight:500;
  background:var(--ink);color:#fff;border:0;border-radius:5px;
  padding:9px 15px;cursor:pointer;transition:background .12s;
}
.btn:hover{background:var(--ink-3)}
.btn.ghost{background:none;color:var(--ink);border:1px solid var(--rule)}
.btn.ghost:hover{background:var(--rule-2)}
.btn.tape{background:var(--tape)}
.btn.tape:hover{background:#951a24}
.btn:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* ── tiles ───────────────────────────────────────────── */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1px;background:var(--rule);border:1px solid var(--rule);border-radius:7px;overflow:hidden;margin-bottom:22px}
.tile{background:var(--surface);padding:16px 18px}
.tile .lab{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.tile .num{font-family:"Archivo",sans-serif;font-weight:700;font-size:27px;letter-spacing:-.02em;margin-top:7px;line-height:1}
.tile .amt{font-family:"IBM Plex Mono",monospace;font-size:12.5px;color:var(--slate);margin-top:6px}
.tile.live .num{color:var(--tape)}
.tile.done .num{color:var(--seal)}
/* ── tiles + updates, side by side ────────────────────────────────────
   The tiles are capped at 720px, which left the rest of the row empty; the
   updates feed fills it instead of adding another band down the page. */
.tiles-row{
  display:grid;grid-template-columns:minmax(0,720px) minmax(260px,1fr);
  gap:14px;align-items:stretch;margin-bottom:22px;
}
.tiles-row .tiles{margin-bottom:0}
@media (max-width:1080px){.tiles-row{grid-template-columns:1fr}}

.upd{
  display:flex;flex-direction:column;min-width:0;
  border:1px solid var(--rule);border-radius:7px;background:var(--surface);
  overflow:hidden;
}
.upd-head{
  display:flex;align-items:center;gap:7px;padding:7px 11px;
  border-bottom:1px solid var(--rule);background:#EFF5FC;
  font-size:10px;letter-spacing:.11em;text-transform:uppercase;
  color:var(--slate-2);font-weight:600;
}
/* The header opens the hearing diary. It keeps the header's own small-caps
   styling — only the arrow and the hover colour say it is a link. */
.upd-link{
  color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:5px;
}
.upd-link span{font-size:11px;opacity:.55;transition:transform .12s ease}
.upd-link:hover{color:var(--ink-3)}
.upd-link:hover span{opacity:1;transform:translateX(2px)}
.upd-link:focus-visible{outline:2px solid var(--sky);outline-offset:2px;border-radius:3px}
.upd-count{
  margin-left:auto;background:var(--sky);color:#fff;border-radius:9px;
  padding:1px 7px;font-size:10px;letter-spacing:0;
}
/* scrolls internally so the box never grows taller than the tiles beside it */
.upd-list{overflow-y:auto;max-height:150px}
.upd-row{
  display:flex;align-items:center;gap:8px;padding:6px 11px;
  text-decoration:none;color:inherit;border-bottom:1px solid var(--rule-2);
}
.upd-row:last-child{border-bottom:0}
.upd-row:hover{background:var(--sky-soft)}
.upd-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--slate-2)}
.upd-row.k-hearing .upd-dot{background:var(--tape)}
.upd-row.k-order   .upd-dot{background:var(--amber)}
.upd-row.k-notice  .upd-dot{background:var(--sky)}
.upd-row.k-appeal  .upd-dot{background:var(--seal)}
.upd-txt{min-width:0;display:flex;flex-direction:column;line-height:1.25}
.upd-txt b{
  font-size:11.5px;font-weight:600;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.upd-txt small{font-size:10px;color:var(--slate-2)}
.upd-when{
  margin-left:auto;flex:none;font-size:10px;color:var(--slate-2);
  font-family:"IBM Plex Mono",monospace;white-space:nowrap;
}
/* a hearing inside a week reads red and bold — the one thing that must not be missed */
.upd-row.urgent{background:var(--tape-soft)}
.upd-row.urgent .upd-when{color:var(--tape);font-weight:600}
.upd-row.urgent:hover{background:#F8DDDF}
.upd-empty{padding:12px 11px;margin:0;font-size:11.5px;color:var(--slate-2);line-height:1.5}
.upd-empty small{font-size:10.5px}

/* Dashboard summary row: narrower and slimmer than the full-width default, so
   the four figures read as a compact strip and the pie charts below get the
   page to themselves. Scoped to its own class — the reviewer home page uses
   the plain .tiles layout.
   Four fixed columns, not auto-fit: the row stays on one line at every width
   instead of wrapping to a second row of two. */
.tiles-compact{max-width:720px;grid-template-columns:repeat(4,minmax(0,1fr))}
.tiles-compact .tile{padding:11px 14px;min-width:0}
.tiles-compact .tile .num{font-size:22px;margin-top:5px}
.tiles-compact .tile .amt{font-size:11.5px;margin-top:4px}
/* A long label or "at stake" figure is clipped rather than allowed to wrap and
   make one tile taller than the other three. */
.tiles-compact .tile .lab,
.tiles-compact .tile .amt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Narrow screens: shrink the type so the four still fit side by side. */
@media (max-width:700px){
  .tiles-compact .tile{padding:9px 10px}
  .tiles-compact .tile .lab{font-size:9px;letter-spacing:.05em}
  .tiles-compact .tile .num{font-size:18px}
  .tiles-compact .tile .amt{font-size:10px}
}

/* ── scope selector (entity / group — governs the whole page) ─────── */
.scope{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--rule);border-radius:7px;
  padding:11px 14px;margin-bottom:16px;box-shadow:var(--shadow);
}
.scope .lab{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.scope-mode{display:inline-flex;background:var(--sunk);border:1px solid var(--rule);border-radius:8px;padding:3px}
.scope-mode button{
  font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;font-weight:600;
  background:none;border:0;border-radius:6px;color:var(--slate);padding:7px 18px;cursor:pointer;
  transition:background .12s,color .12s;
}
.scope-mode button:hover{color:var(--ink)}
.scope-mode button[aria-current="true"]{background:var(--ink);color:#fff}
.scope-mode button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.scope .fg{margin:0;min-width:230px}
.scope-now{
  margin-left:auto;font-family:"IBM Plex Mono",monospace;font-size:12px;
  color:var(--slate);background:var(--sky-soft);border-radius:5px;padding:5px 10px;
}

/* ── pie charts ──────────────────────────────────────── */
.charts-bar{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin-bottom:11px}
.charts-bar .lab{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.metric{display:inline-flex;background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:2px}
.metric button{
  font-family:"IBM Plex Sans",sans-serif;font-size:11.5px;font-weight:600;
  background:none;border:0;border-radius:5px;color:var(--slate);padding:6px 13px;cursor:pointer;
  transition:background .12s,color .12s;
}
.metric button:hover{color:var(--ink)}
.metric button[aria-current="true"]{background:var(--sky-soft);color:var(--ink-2)}
.metric button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.charts-note{font-size:11.5px;color:var(--amber);font-style:italic}
.charts{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
  gap:14px;margin-bottom:20px;
}
.chart{padding:14px 16px 16px}
.chart-head{
  font-family:"Archivo",sans-serif;font-weight:700;font-size:13px;color:var(--ink);
  display:flex;justify-content:space-between;align-items:baseline;gap:8px;
  padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid var(--rule-2);
}
.chart-head small{
  font-family:"IBM Plex Sans",sans-serif;font-weight:500;font-size:10px;
  letter-spacing:.06em;text-transform:uppercase;color:var(--slate-2);white-space:nowrap;
}
.chart-body{display:flex;align-items:flex-start;gap:14px}
.pie{flex-shrink:0;line-height:0}
.pie svg{display:block}
.pie-empty{font-size:12px;color:var(--slate-2);font-style:italic;line-height:1.4;width:160px}
/* max-height tracks the pie diameter in dashboard.js, so a long legend scrolls
   instead of making the card taller than the chart beside it. */
.legend{list-style:none;margin:0;padding:0;flex:1;min-width:0;max-height:160px;overflow-y:auto}
/* swatch in the first column, name and figure stacked in the second, so a long
   company name gets the full width instead of being crushed to an ellipsis */
.legend li{
  display:grid;grid-template-columns:9px 1fr;gap:0 7px;
  padding:3px 0;min-width:0;align-items:start;
}
.legend i{width:9px;height:9px;border-radius:2px;margin-top:3px}
.legend .lg-name{
  font-size:11.5px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;min-width:0;
}
.legend .lg-val{
  grid-column:2;font-family:"IBM Plex Mono",monospace;font-size:10.5px;
  color:var(--slate);white-space:nowrap;font-variant-numeric:tabular-nums;
}

/* ── background analysis banner ──────────────────────────────────────
   Shown on the workspace while a case is being read, and after a job that
   failed. Sits above the liability strip because until it clears, the
   figures below it are not yet the case's figures. */
.job-strip{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:10px 22px;font-size:13px;border-bottom:1px solid var(--rule);
}
.job-strip.running{background:#eff6ff;color:#1e40af;}
.job-strip.failed{background:#fef2f2;color:#991b1b;}
.job-strip span{flex:1;min-width:0;}
.job-strip .btn{flex:0 0 auto;}
.job-dot{
  flex:0 0 auto;width:9px;height:9px;border-radius:50%;background:#2563eb;
  animation:job-pulse 1.4s ease-in-out infinite;
}
@keyframes job-pulse{0%,100%{opacity:.25;}50%{opacity:1;}}
@media (prefers-reduced-motion:reduce){.job-dot{animation:none;opacity:.8;}}

/* ── liability strip + case notes, under the company name ───────────── */
.ws-strip{
  display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;
  padding:10px 22px;background:var(--surface);border-bottom:1px solid var(--rule);
}
.liab-strip{
  flex:1;min-width:0;border:1px solid var(--rule);border-radius:7px;
  background:var(--surface);overflow:hidden;
}
.liab-strip > summary{
  list-style:none;cursor:pointer;display:flex;align-items:center;gap:14px;
  flex-wrap:wrap;padding:9px 13px;font-size:12.5px;
}
.liab-strip > summary::-webkit-details-marker{display:none}
.liab-strip > summary:hover{background:#F4F9FF}
.liab-strip > summary:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
.liab-strip .ls-lab{
  font-family:"Archivo",sans-serif;font-weight:700;font-size:12.5px;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.liab-strip .ls-fig{font-size:11.5px;color:var(--slate);white-space:nowrap;font-variant-numeric:tabular-nums}
.liab-strip .ls-total{
  margin-left:auto;font-size:13px;font-weight:600;color:var(--tape);
  white-space:nowrap;font-variant-numeric:tabular-nums;
}
.liab-strip .ls-more{
  font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--slate-2);
  font-weight:600;border:1px solid var(--rule);border-radius:4px;padding:2px 7px;white-space:nowrap;
}
.liab-strip[open] .ls-more::after{content:" ▲"}
.liab-strip:not([open]) .ls-more::after{content:" ▼"}
.liab-strip[open] > summary{border-bottom:1px solid var(--rule);background:var(--sunk)}
.note-print{display:flex;gap:8px;flex-shrink:0}
.note-print .btn{padding:8px 13px;font-size:12px}
@media (max-width:820px){
  .liab-strip .ls-fig{display:none}
  .note-print{width:100%}
}

/* ── printable case note ─────────────────────────────── */
.note-page{background:var(--paper)}
.note-bar{
  position:sticky;top:0;z-index:5;display:flex;align-items:center;
  justify-content:space-between;gap:14px;flex-wrap:wrap;
  padding:11px 22px;background:var(--surface);border-bottom:1px solid var(--rule);
}
.note-bar b{font-family:"Archivo",sans-serif;font-size:14px;color:var(--ink);display:block}
.note-bar small{display:block;font-size:11.5px;color:var(--slate);margin-top:1px}
.note-bar .btn[aria-current="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.note-sheet{
  max-width:900px;margin:22px auto 60px;background:var(--surface);
  border:1px solid var(--rule);border-radius:8px;padding:34px 40px;box-shadow:var(--shadow);
}
.note-meta{
  display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;
  font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--slate-2);
  font-weight:600;padding-bottom:12px;margin-bottom:22px;border-bottom:2px solid var(--ink);
}
.note-body{font-size:13.5px;line-height:1.62;color:#1B2A3D}
.note-body h1{font-family:"Archivo",sans-serif;font-size:21px;margin:0 0 14px;color:var(--ink)}
.note-body h2{font-family:"Archivo",sans-serif;font-size:16.5px;margin:26px 0 10px;padding-bottom:5px;border-bottom:1px solid var(--rule);color:var(--ink)}
.note-body h3{font-family:"Archivo",sans-serif;font-size:14px;margin:20px 0 8px;color:var(--ink-2)}
.note-body h4,.note-body h5,.note-body h6{font-family:"Archivo",sans-serif;font-size:13px;margin:16px 0 6px;color:var(--ink-2)}
.note-body p{margin:0 0 11px}
.note-body ul,.note-body ol{margin:0 0 12px;padding-left:22px}
.note-body li{margin-bottom:4px}
.note-body hr{border:0;border-top:1px solid var(--rule);margin:22px 0}
.note-body blockquote{
  margin:0 0 14px;padding:10px 14px;background:var(--sky-soft);
  border-left:3px solid var(--sky);border-radius:0 5px 5px 0;font-size:13px;
}
.note-body code{font-family:"IBM Plex Mono",monospace;font-size:12px;background:var(--sunk);padding:1px 4px;border-radius:3px}
.note-body .tbl-wrap{overflow-x:auto;margin:0 0 16px}
.note-body table{width:100%;border-collapse:collapse;font-size:11.5px}
.note-body th{
  background:#EFF5FC;border:1px solid var(--rule);padding:6px 8px;
  font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--slate);font-weight:600;
}
.note-body td{border:1px solid var(--rule-2);padding:6px 8px;vertical-align:top}
.note-body tbody tr:nth-child(even) td{background:#FAFCFF}
.note-empty{text-align:center;padding:40px 20px;color:var(--slate)}
.note-empty h2{font-family:"Archivo",sans-serif;font-size:17px;color:var(--ink);margin-bottom:10px}

@media print{
  .no-print{display:none !important}
  body.note-page{background:#fff}
  .note-sheet{max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;padding:0}
  .note-body{font-size:10.5pt;line-height:1.5}
  .note-body table{font-size:8.5pt}
  .note-body h2{page-break-after:avoid}
  .note-body table,.note-body blockquote{page-break-inside:avoid}
  .note-body tr{page-break-inside:avoid}
  @page{margin:16mm 14mm}
}

/* ── GSTAT paper book ────────────────────────────────── */
.mode-item.gstat b::after{
  content:"GSTAT";font-family:"IBM Plex Sans",sans-serif;font-size:9px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;color:var(--amber);
  background:var(--amber-soft);border:1px solid #F6D0A6;border-radius:3px;
  padding:1px 5px;margin-left:7px;vertical-align:1px;
}
.paperbook-note{
  background:var(--amber-soft);border:1px solid #F6D0A6;border-left:3px solid var(--orange);
  border-radius:6px;padding:10px 13px;margin-bottom:16px;
  font-size:13px;font-weight:600;color:var(--amber);
}

.gstat{display:grid;grid-template-columns:320px minmax(0,1fr);gap:0;align-items:start}
.gstat-col{min-width:0}
.annex-rail{
  background:var(--surface);border-right:1px solid var(--rule);
  height:calc(100vh - 175px);overflow-y:auto;
}
.annex-head{
  font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);
  font-weight:600;padding:14px 16px 10px;border-bottom:1px solid var(--rule);
  position:sticky;top:0;background:var(--surface);z-index:1;
}
.annex-list{padding:6px 8px 20px}
.annex-book{
  font-family:"IBM Plex Mono",monospace;font-size:10px;color:var(--slate-2);
  padding:11px 8px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.annex{
  display:block;text-decoration:none;color:inherit;border-radius:6px;
  padding:8px 10px;margin-bottom:2px;border:1px solid transparent;
}
.annex:hover{background:#F4F9FF}
.annex.sel{background:#E7F0FD;border-color:#C6DCF2}
.annex:focus-visible{outline:2px solid var(--ink);outline-offset:0}
.annex .an-name{
  display:block;font-family:"IBM Plex Mono",monospace;font-size:12.5px;
  font-weight:600;color:var(--ink);letter-spacing:-.01em;
}
.annex .an-brief{display:block;font-size:11.5px;color:var(--slate);line-height:1.35;margin-top:2px}
.annex .an-page{
  display:block;font-family:"IBM Plex Mono",monospace;font-size:10.5px;
  color:var(--slate-2);margin-top:3px;
}
.annex .an-page i{font-style:normal;opacity:.8}
.annex.nopage .an-name{color:var(--slate)}
.annex.nopage .an-page i{color:var(--tape)}
.annex-empty{padding:18px 16px}

.gstat-viewer{padding:16px 20px;background:var(--paper)}
.gstat-bar{
  display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--rule);border-radius:7px;
  padding:10px 14px;margin-bottom:12px;box-shadow:var(--shadow);
}
.gstat-bar b{font-family:Archivo,sans-serif;font-size:13.5px;color:var(--ink)}
.gstat-bar small{display:block;font-size:11.5px;color:var(--slate);margin-top:2px}
.gstat-bar-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.gstat-bar-right .pill{background:var(--sunk);color:var(--slate)}
.gstat-frame{
  width:100%;height:calc(100vh - 265px);border:1px solid var(--rule);
  border-radius:7px;background:var(--surface);
}
@media (max-width:900px){
  .gstat{grid-template-columns:1fr}
  .annex-rail{height:auto;max-height:320px;border-right:0;border-bottom:1px solid var(--rule)}
  .gstat-frame{height:70vh}
}

.cut-note{font-size:11.5px;color:var(--slate-2);padding:9px 2px 0;font-style:italic}

/* ── tables ──────────────────────────────────────────── */
.card{background:var(--surface);border:1px solid var(--rule);border-radius:7px;overflow:hidden}
table{width:100%;border-collapse:collapse}
th{
  text-align:left;font-size:10px;letter-spacing:.09em;text-transform:uppercase;
  color:var(--slate-2);font-weight:600;padding:10px 14px;
  border-bottom:1px solid var(--rule);background:#EFF5FC;white-space:nowrap;
}
td{padding:11px 14px;border-bottom:1px solid var(--rule-2);font-size:13px;vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#F4F9FF}
.ent{font-weight:600}
.ent small{display:block;font-weight:400;color:var(--slate-2);font-size:11px;font-family:"IBM Plex Mono",monospace;margin-top:1px}
.num-r{text-align:right;font-family:"IBM Plex Mono",monospace;font-variant-numeric:tabular-nums}

.pill{
  display:inline-block;font-size:10.5px;font-weight:600;
  padding:2px 7px;border-radius:3px;letter-spacing:.03em;white-space:nowrap;
}
.pill.gst{background:var(--ink);color:#fff}
.pill.court{background:var(--amber-soft);color:var(--amber);border:1px solid #F6D0A6}
.pill.it{background:#E4EFFA;color:var(--ink-3);border:1px solid #C6DCF2}
.pill.arb{background:#EFEAF4;color:#5B4380;border:1px solid #DCD2E8}
.pill.live{background:var(--tape-soft);color:var(--tape)}
.pill.disposed{background:var(--seal-soft);color:var(--seal)}
/* Fully paid / Dropped / Time barred — the matter is closed */
.pill.closed{background:var(--seal-soft);color:var(--seal)}
.pill.gstat-pill{background:var(--amber-soft);color:var(--amber);border:1px solid #F6D0A6}

.due{font-family:"IBM Plex Mono",monospace;font-size:12px;font-weight:600}
.due.hot{color:var(--tape)}
.due.calm{color:var(--slate)}

a.case-link{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--rule)}
a.case-link:hover{border-bottom-color:var(--tape);color:var(--tape)}

/* ── login ───────────────────────────────────────────── */
.login-wrap{min-height:calc(100vh - 45px);display:grid;grid-template-columns:1fr 1fr;background:var(--paper)}
.login-art{
  background:var(--ink);color:#fff;padding:52px 46px;
  display:flex;flex-direction:column;justify-content:space-between;
}
.login-art h2{font-family:"Archivo",sans-serif;font-weight:800;font-size:34px;letter-spacing:-.03em;line-height:1.1}
.login-art .lede{color:rgba(255,255,255,.62);margin-top:14px;font-size:14.5px;max-width:34ch;line-height:1.55}
.mini-chain{margin:38px 0;padding-left:2px}
.mini-chain div{display:flex;align-items:center;gap:11px;padding:5px 0;font-size:12px;color:rgba(255,255,255,.5)}
.mini-chain div .dot{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.35);flex-shrink:0}
.mini-chain div.now{color:#fff}
.mini-chain div.now .dot{background:var(--tape);box-shadow:0 0 0 3px rgba(179,32,44,.28)}
.mini-chain .link{width:1px;height:13px;background:rgba(255,255,255,.22);margin-left:3px}
.login-art footer{color:rgba(255,255,255,.35);font-size:11.5px}

.login-form{padding:52px 46px;display:flex;flex-direction:column;justify-content:center;max-width:520px}
.login-form h3{font-family:"Archivo",sans-serif;font-weight:700;font-size:21px;letter-spacing:-.02em}
.login-form .hint{color:var(--slate);font-size:13px;margin-top:5px;margin-bottom:26px}
label{display:block;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--slate);margin-bottom:5px}
input[type=text],input[type=email],input[type=tel],input[type=password],textarea{
  width:100%;padding:9px 11px;border:1px solid var(--rule);border-radius:5px;
  font-family:"IBM Plex Sans",sans-serif;font-size:13.5px;background:var(--surface);color:var(--ink);
}
input:focus,textarea:focus{outline:2px solid var(--ink);outline-offset:-1px;border-color:var(--ink)}
.field{margin-bottom:15px}
/* Company / Financial year / Case ID, side by side above the drop area.
   Collapses to one column on a narrow screen so the boxes stay usable. */
.pick3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.pick3 .field{margin-bottom:10px;min-width:0}
.pick3 select{width:100%;min-width:0}
@media (max-width:760px){.pick3{grid-template-columns:1fr}}
.two{display:grid;grid-template-columns:1fr 1fr;gap:13px}

.seg{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:15px}
.seg label{
  border:1px solid var(--rule);border-radius:6px;padding:11px 13px;cursor:pointer;
  text-transform:none;letter-spacing:0;font-size:13.5px;font-weight:600;color:var(--ink);
  background:var(--surface);margin:0;display:block;transition:border-color .12s,background .12s;
}
.seg label small{display:block;font-weight:400;color:var(--slate-2);font-size:11px;margin-top:2px}
.seg input{position:absolute;opacity:0;pointer-events:none}
.seg input:checked + label{border-color:var(--ink);background:#E7F0FD;box-shadow:inset 0 0 0 1px var(--ink)}
.seg input:focus-visible + label{outline:2px solid var(--ink);outline-offset:2px}
.mand{
  background:var(--amber-soft);border:1px solid #F6D0A6;border-radius:5px;
  padding:8px 11px;font-size:12px;color:var(--amber);margin-bottom:15px;
}

/* ── flash / validation messages ─────────────────────── */
.flashes{list-style:none;margin:0 0 16px;padding:0;display:flex;flex-direction:column;gap:7px}
.flash{border-radius:6px;padding:9px 12px;font-size:12.5px;line-height:1.45;border:1px solid transparent}
.flash.error{background:var(--tape-soft);border-color:#F0CDD0;color:var(--tape)}
.flash.success{background:var(--seal-soft);border-color:#B4E3CB;color:var(--seal)}

/* ── "under development" notice on the sign-in page ───── */
.dev-banner{background:var(--amber-soft);border:1px solid #F3D6AE;border-radius:6px;
  padding:10px 12px;margin:0 0 16px;font-size:12.5px;line-height:1.5;color:var(--amber)}
.dev-banner strong{display:block;margin-bottom:2px}

/* ── three-way segmented choice (CA / Advocate / Neither) ─ */
.seg-3{grid-template-columns:1fr 1fr 1fr}
.seg-3 label{padding:11px 11px}

/* ── OTP verify rows (email + mobile) ────────────────── */
.verify-row{display:flex;gap:8px;align-items:stretch}
.verify-row input{flex:1;min-width:0}
.verify-row .btn{white-space:nowrap;padding:9px 14px;align-self:stretch}
.v-otp{display:flex;gap:8px;align-items:stretch;margin-top:9px}
.v-otp .v-code{flex:1;min-width:0;letter-spacing:.28em;font-family:"IBM Plex Mono",monospace}
.v-otp .btn{white-space:nowrap;padding:9px 14px}
.v-msg{font-size:12px;margin-top:8px;line-height:1.45}
.v-msg.info{color:var(--ink-3)}
.v-msg.ok{color:var(--seal);font-weight:600}
.v-msg.err{color:var(--tape)}
.verify.done .verify-row input{background:var(--seal-soft);border-color:#B4E3CB;color:var(--seal);font-weight:500}

/* ── left-panel preview thumbnails (little screenshots) ── */
.art-shots{display:grid;grid-template-columns:1fr 1fr;gap:20px 16px;margin:32px 0}
.shot{margin:0}
.shot figcaption{margin-top:8px;font-size:9.5px;letter-spacing:.11em;text-transform:uppercase;color:rgba(255,255,255,.5);font-weight:600}
.mini{height:80px;background:var(--paper);border-radius:8px;box-shadow:0 8px 22px rgba(0,0,0,.28);overflow:hidden;padding:8px;display:flex;flex-direction:column;gap:5px}
.mini .top{height:8px;width:45%;background:var(--ink);border-radius:2px}
.mini .ln{height:6px;background:#D3E0EF;border-radius:3px}
.mini .ln.sh{width:55%}
/* dashboard: stat tiles + rows */
.md .tiles3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px;margin:2px 0}
.md .tiles3 span{height:20px;background:#fff;border:1px solid var(--rule);border-radius:3px}
/* cases: table rows */
.mc .rowln{height:9px;background:#fff;border:1px solid var(--rule);border-radius:3px}
/* workspace: chain rail + document sheet */
.mw{flex-direction:row;gap:7px}
.mw .chainm{display:flex;flex-direction:column;gap:9px;padding-top:3px}
.mw .chainm i{width:8px;height:8px;border-radius:50%;background:var(--ink)}
.mw .chainm i.hot{background:var(--tape)}
.mw .sheetm{flex:1;background:#fff;border:1px solid var(--rule);border-radius:4px;padding:7px;display:flex;flex-direction:column;gap:6px}
.mw .sheetm span{height:6px;background:#DCE6F2;border-radius:3px}
.mw .sheetm span.sh{width:60%}
/* reply: two columns */
.mr{flex-direction:row;gap:7px}
.mr .colm{flex:1;background:#fff;border:1px solid var(--rule);border-radius:4px;padding:7px;display:flex;flex-direction:column;gap:6px}
.mr .colm span{height:6px;background:#DCE6F2;border-radius:3px}
.mr .colm span.sh{width:55%}

@media (max-width:560px){
  .seg-3{grid-template-columns:1fr}
}

/* ── upload ──────────────────────────────────────────── */
.drop{
  border:2px dashed var(--rule);border-radius:8px;background:var(--surface);
  padding:34px;text-align:center;margin-bottom:18px;
}
.drop strong{font-family:"Archivo",sans-serif;font-size:15px;display:block;margin-bottom:5px}
.drop p{color:var(--slate);font-size:12.5px}
.forms-grid{display:flex;gap:6px;flex-wrap:wrap;margin-top:16px;justify-content:center}
.forms-grid span{
  font-family:"IBM Plex Mono",monospace;font-size:11px;font-weight:500;
  border:1px solid var(--rule);border-radius:3px;padding:3px 7px;color:var(--slate);background:var(--paper);
}
.route{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:20px}
.route div{background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:14px}
.route div.p2{opacity:.55}
.route strong{font-size:13px;display:block}
.route small{color:var(--slate-2);font-size:11.5px}
.phase{
  font-family:"Archivo",sans-serif;font-size:9px;font-weight:700;letter-spacing:.09em;
  padding:2px 5px;border-radius:3px;text-transform:uppercase;float:right;
}
.phase.one{background:var(--seal-soft);color:var(--seal)}
.phase.two{background:var(--rule-2);color:var(--slate-2)}

/* ── workspace: THE CHAIN RAIL ───────────────────────── */
.ws{display:grid;grid-template-columns:264px 1fr 236px;gap:0;flex:1;min-height:0}
.ws-col{border-right:1px solid var(--rule);background:var(--surface);overflow:auto}
.ws-col:last-child{border-right:0;background:var(--paper)}
.ws-head{
  padding:11px 16px;border-bottom:1px solid var(--rule);background:#EFF5FC;
  font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600;
  position:sticky;top:0;z-index:2;
}
.chain{padding:16px 16px 26px}
.link-row{display:grid;grid-template-columns:16px 1fr;gap:11px}
.spine{display:flex;flex-direction:column;align-items:center}
.node{
  width:11px;height:11px;border-radius:50%;background:var(--ink);
  flex-shrink:0;margin-top:4px;border:2px solid var(--surface);
  box-shadow:0 0 0 1.5px var(--ink);
}
.node.open{background:var(--surface);box-shadow:0 0 0 1.5px var(--tape)}
.node.here{background:var(--tape);box-shadow:0 0 0 1.5px var(--tape),0 0 0 4.5px rgba(179,32,44,.16)}
.thread{width:1.5px;flex:1;background:var(--rule);min-height:22px;margin:3px 0}
.thread.pending{background:none;border-left:1.5px dashed var(--tape);width:0}
.doc{padding-bottom:2px;cursor:pointer;border-radius:5px;margin:-4px -7px 0;padding:4px 7px 5px}
.doc:hover{background:#F4F9FF}
.doc:focus-visible{outline:2px solid var(--ink);outline-offset:0}
.doc .form{font-family:"IBM Plex Mono",monospace;font-size:12.5px;font-weight:600;letter-spacing:-.01em}
.doc .desc{font-size:11.5px;color:var(--slate);margin-top:1px;line-height:1.35}
.doc .meta{font-family:"IBM Plex Mono",monospace;font-size:10.5px;color:var(--slate-2);margin-top:3px}
.doc.sel{background:#E7F0FD;box-shadow:inset 0 0 0 1px #C6DCF2}
.doc.sel:hover{background:#DFECFB}
.gap{
  font-family:"IBM Plex Mono",monospace;font-size:10px;color:var(--slate-2);
  padding:5px 0 5px;letter-spacing:.02em;
}
.doc.pending .form{color:var(--tape)}
.doc.pending .desc{color:var(--tape);opacity:.85}

.viewer{padding:22px 26px;background:var(--paper)}
.sheet{
  background:var(--surface);border:1px solid var(--rule);border-radius:4px;
  padding:34px 38px;box-shadow:0 1px 3px rgba(20,33,61,.05);max-width:640px;margin:0 auto;
}
.sheet .gov{font-size:10px;letter-spacing:.13em;text-transform:uppercase;color:var(--slate-2);text-align:center;font-weight:600}
.sheet h4{font-family:"Archivo",sans-serif;font-size:15px;text-align:center;margin:7px 0 3px;letter-spacing:-.01em}
.sheet .ref{font-family:"IBM Plex Mono",monospace;font-size:11px;color:var(--slate);text-align:center;padding-bottom:16px;border-bottom:1px solid var(--rule);margin-bottom:16px}
.sheet p{font-size:12.5px;color:#333A4D;margin-bottom:11px;line-height:1.6}
.sheet .mark{background:#FDF3C7;padding:1px 2px;border-bottom:1.5px solid #E8C84D}
.sheet table{margin:14px 0;font-size:11.5px;border:1px solid var(--rule)}
.sheet th{padding:6px 9px;font-size:9px;background:#EFF5FC}
.sheet td{padding:6px 9px;font-family:"IBM Plex Mono",monospace;font-size:11px}

.notes{padding:16px}
.note{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:11px 13px;margin-bottom:9px}
.note .tag{font-size:9.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--tape);margin-bottom:4px}
.note p{font-size:12px;color:var(--slate);line-height:1.45}
.note .quote{border-left:2px solid #E8C84D;padding-left:8px;font-size:11.5px;color:#333A4D;font-style:italic;margin-bottom:6px}
.ws-cta{padding:14px 16px;border-top:1px solid var(--rule);background:var(--surface);position:sticky;bottom:0}
.ws-cta .btn{width:100%}
.ws-cta small{display:block;text-align:center;color:var(--slate-2);font-size:11px;margin-top:7px}

.case-meta{display:flex;gap:20px;flex-wrap:wrap;align-items:center}
.case-meta div .k{font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.case-meta div .v{font-family:"IBM Plex Mono",monospace;font-size:12.5px;font-weight:500;margin-top:2px}

/* status of the matter — set here, read by the dashboard */
.status-set{display:block;padding-left:20px;border-left:1px solid var(--rule)}
.status-set .k{font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.status-row{display:flex;gap:6px;align-items:center;margin-top:3px}
.status-row select{
  font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;color:var(--ink);
  padding:5px 8px;border:1px solid var(--rule);border-radius:5px;background:var(--surface);
}
.status-row .btn{padding:6px 12px;font-size:12px}
.status-now{display:block;font-size:10.5px;margin-top:4px;font-style:italic}
.status-now.live{color:var(--tape)}
.status-now.closed{color:var(--seal)}

/* ── reply ───────────────────────────────────────────── */
.reply-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
.step-head{display:flex;align-items:center;gap:9px;margin-bottom:5px}
.step-n{
  font-family:"Archivo",sans-serif;font-weight:700;font-size:10px;
  background:var(--ink);color:#fff;width:19px;height:19px;border-radius:50%;
  display:grid;place-items:center;flex-shrink:0;
}
.step-head h3{font-family:"Archivo",sans-serif;font-size:14.5px;letter-spacing:-.01em}
.step-sub{font-size:12px;color:var(--slate);margin-bottom:13px;padding-left:28px}
.q{background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:14px;margin-bottom:10px}
.q .qt{font-size:12.5px;font-weight:600;margin-bottom:3px;line-height:1.4}
.q .qw{font-size:11px;color:var(--slate-2);margin-bottom:9px;font-style:italic}
.q textarea{min-height:56px;resize:vertical;font-size:12.5px}
.q .ask{font-family:"IBM Plex Mono",monospace;font-size:9.5px;color:var(--tape);font-weight:600;letter-spacing:.06em;text-transform:uppercase;margin-bottom:6px}
.draft{background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:22px 24px;font-size:12.5px;line-height:1.65;color:#333A4D}
.draft h5{font-family:"Archivo",sans-serif;font-size:12.5px;margin-bottom:10px;text-align:center}
.draft p{margin-bottom:10px}
.draft .num-para{padding-left:22px;text-indent:-22px}
.draft .num-para b{font-family:"IBM Plex Mono",monospace;font-weight:600;margin-right:8px}
.rev{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  background:var(--tape-soft);border:1px solid #F0CDD0;border-radius:6px;
  padding:9px 13px;margin-top:12px;
}
.rev p{font-size:12px;color:var(--tape);font-weight:500}
.rev .dots{display:flex;gap:4px}
.rev .dots i{width:7px;height:7px;border-radius:50%;background:var(--tape);opacity:.28}
.rev .dots i.used{opacity:1}

.pane-actions{display:flex;gap:8px;margin-top:12px}

@media (max-width:1080px){
  .ws{grid-template-columns:230px 1fr}
  .ws-col.notes-col{display:none}
  .reply-grid{grid-template-columns:1fr}
}
@media (max-width:840px){
  .login-wrap{grid-template-columns:1fr}
  .login-art{padding:34px 26px}
  .rail{display:none}
  .ws{grid-template-columns:1fr}
  .ws-col.chain-col{border-right:0;border-bottom:1px solid var(--rule)}
  .route{grid-template-columns:1fr}
  .body{padding:16px 14px 50px}
  .topbar{padding:14px 16px}
  .table-scroll{overflow-x:auto}
  table{min-width:640px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

/* ── filter / sort bar ───────────────────────────────── */
.toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:12px 14px;margin:0 0 18px}
.toolbar .fg{display:flex;flex-direction:column;gap:4px}
.toolbar label{margin:0}
.toolbar select{font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;padding:7px 9px;border:1px solid var(--rule);border-radius:5px;background:var(--surface);color:var(--ink);min-width:128px}
.toolbar select:focus{outline:2px solid var(--ink);outline-offset:-1px}
.toolbar .spacer{flex:1}
.chip-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;align-items:center}
.chip-row .cl{font-size:11px;color:var(--slate-2);margin-right:2px}
.chip{font-size:11px;font-weight:500;background:var(--rule-2);color:var(--slate);border-radius:20px;padding:4px 10px;display:inline-flex;gap:6px;align-items:center}
.chip b{color:var(--ink);font-weight:600}
.chip button{border:0;background:none;color:var(--slate-2);cursor:pointer;font-size:13px;line-height:1;padding:0}

/* ── review status pills ─────────────────────────────── */
.pill.review{background:#FFF0DF;color:#B45B0D;border:1px solid #F6D0A6}
.pill.reviewed{background:var(--seal-soft);color:var(--seal);border:1px solid #B4E3CB}
.pill.rpending{background:#EDEFF4;color:var(--slate);border:1px solid #DADFEA}
.pill.none{background:#EEF2F8;color:var(--slate-2);border:1px solid var(--rule)}

/* ── translation banner ──────────────────────────────── */
.xlate{display:flex;gap:11px;align-items:flex-start;background:#EEF4FF;border:1px solid #CFDEF6;border-radius:7px;padding:11px 14px;margin:0 0 16px}
.xlate .ic{font-family:"Archivo",sans-serif;font-weight:800;font-size:10px;letter-spacing:.06em;color:var(--ink-3);background:#fff;border:1px solid #CFDEF6;border-radius:4px;padding:4px 7px;white-space:nowrap;text-transform:uppercase}
.xlate p{font-size:12px;color:var(--ink-3);line-height:1.5}
.xlate p small{color:var(--slate);display:block;margin-top:2px}
.xlate .tog{margin-left:auto;font-size:11.5px;color:var(--ink);border:1px solid #CFDEF6;background:#fff;border-radius:5px;padding:6px 10px;cursor:pointer;white-space:nowrap;font-weight:500}

/* ── annotation toolbar ──────────────────────────────── */
.anno{display:flex;gap:5px;padding:8px 12px;border-bottom:1px solid var(--rule);background:#EFF5FC;flex-wrap:wrap;position:sticky;top:0;z-index:2}
.anno button{font-size:11.5px;font-weight:500;background:var(--surface);border:1px solid var(--rule);border-radius:5px;padding:5px 9px;color:var(--slate);cursor:pointer;display:inline-flex;gap:5px;align-items:center}
.anno button:hover{color:var(--ink);border-color:var(--slate-2)}
.anno button.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.anno .liq{margin-left:auto;font-size:10.5px;color:var(--slate-2);font-style:italic;align-self:center}

/* ── reviewer flow ───────────────────────────────────── */
.rvbox{background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:15px;margin-top:14px}
.rvbox h4{font-family:"Archivo",sans-serif;font-size:13px;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.rv-state{display:flex;align-items:center;gap:9px;background:#FFF0DF;border:1px solid #F6D0A6;border-radius:6px;padding:9px 12px;margin-bottom:12px;font-size:12px;color:#B45B0D;line-height:1.4}
.rv-people{display:flex;flex-direction:column;gap:9px;margin-bottom:12px}
.rv-person{display:flex;align-items:center;gap:9px;font-size:12px}
.rv-person .av{width:26px;height:26px;border-radius:50%;background:var(--ink);color:#fff;font-size:10px;font-weight:600;display:grid;place-items:center;flex-shrink:0}
.rv-person .who b{font-weight:600}
.rv-person .who .em{color:var(--slate);font-family:"IBM Plex Mono",monospace;font-size:10.5px;display:block}
.rv-person .st{margin-left:auto}

/* ── language + annexures ────────────────────────────── */
.langbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:12px;font-size:12px;color:var(--slate)}
.langbar select{font-size:12.5px;padding:6px 8px;border:1px solid var(--rule);border-radius:5px;background:var(--surface);color:var(--ink)}
.annex{background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:13px 15px;margin-top:12px}
.annex h4{font-family:"Archivo",sans-serif;font-size:12.5px;margin-bottom:10px}
.annex-item{display:flex;align-items:center;gap:9px;font-size:12px;padding:7px 0;border-bottom:1px solid var(--rule-2)}
.annex-item:last-child{border-bottom:0}
.annex-item .nm{flex:1}
.annex-item .nm small{display:block;color:var(--slate-2);font-size:10.5px;font-family:"IBM Plex Mono",monospace}
.annex-item .dl{font-size:11px;color:var(--ink);border:1px solid var(--rule);border-radius:4px;padding:4px 9px;cursor:pointer;background:var(--surface)}
.annex-item .dl:hover{border-color:var(--slate-2)}
.annex-item .miss{font-size:10.5px;color:var(--slate-2);font-style:italic}

/* ── attach formats ──────────────────────────────────── */
.attach{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px;align-items:center}
.attach .cl{font-size:10.5px;color:var(--slate-2)}
.attach span{font-size:10.5px;border:1px solid var(--rule);border-radius:4px;padding:3px 8px;color:var(--slate);background:var(--paper);cursor:pointer}
.attach span:hover{border-color:var(--slate-2);color:var(--ink)}

/* ── court upload options ────────────────────────────── */
.opt-split{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}
.opt-card{background:var(--surface);border:1px solid var(--rule);border-radius:8px;padding:15px 16px}
.opt-card .tag{font-family:"Archivo",sans-serif;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--tape);margin-bottom:6px}
.opt-card h4{font-family:"Archivo",sans-serif;font-size:14px;margin-bottom:5px}
.opt-card p{font-size:12px;color:var(--slate);line-height:1.5;margin-bottom:11px}
.charges{display:flex;align-items:center;gap:9px;background:var(--amber-soft);border:1px solid #F6D0A6;border-radius:6px;padding:9px 12px;font-size:12px;color:var(--amber);margin-top:10px}
.charges .amt{font-family:"IBM Plex Mono",monospace;font-weight:600;margin-left:auto}
.del-x{border:0;background:none;color:var(--slate-2);cursor:pointer;font-size:15px;line-height:1;padding:2px 6px;border-radius:4px}
.del-x:hover{color:var(--tape);background:var(--tape-soft)}

/* ── user management ─────────────────────────────────── */
.umeta{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;background:var(--rule);border:1px solid var(--rule);border-radius:7px;overflow:hidden;margin-bottom:20px}
.umeta div{background:var(--surface);padding:14px 16px}
.umeta .k{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.umeta .v{font-family:"Archivo",sans-serif;font-weight:700;font-size:22px;margin-top:6px;line-height:1}
.umeta .v small{font-size:12px;color:var(--slate-2);font-weight:500}
.role-card{background:var(--surface);border:1px solid var(--rule);border-radius:8px;padding:16px 18px;margin-bottom:14px}
.role-head{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.role-head h3{font-family:"Archivo",sans-serif;font-size:14.5px}
.role-badge{font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;border-radius:4px;padding:3px 7px}
.role-badge.up{background:var(--ink);color:#fff}
.role-badge.rev{background:#FFF0DF;color:#B45B0D;border:1px solid #F6D0A6}
.role-badge.mgmt{background:#E4EFFA;color:var(--ink-3);border:1px solid #C6DCF2}
.role-card>p{font-size:12px;color:var(--slate);margin-bottom:8px;line-height:1.5}
.slot{display:flex;align-items:center;gap:11px;padding:10px 0;border-top:1px solid var(--rule-2)}
.slot .av{width:30px;height:30px;border-radius:50%;background:var(--ink);color:#fff;font-size:11px;font-weight:600;display:grid;place-items:center;flex-shrink:0}
.slot .av.empty{background:var(--paper);color:var(--slate-2);border:1px dashed var(--slate-2);font-size:15px}
.slot .who{flex:1;min-width:0}
.slot .who b{font-size:12.5px;font-weight:600}
.slot .who .em{font-family:"IBM Plex Mono",monospace;font-size:11px;color:var(--slate);display:block;margin-top:1px}
.slot .who .em.empty{font-style:italic;color:var(--slate-2)}
.slot .act{font-size:11px;color:var(--slate);border:1px solid var(--rule);border-radius:5px;padding:5px 10px;cursor:pointer;background:var(--surface);white-space:nowrap}
.slot .act:hover{border-color:var(--slate-2);color:var(--ink)}

/* ── settings ────────────────────────────────────────── */
.set-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.set-card{background:var(--surface);border:1px solid var(--rule);border-radius:8px;padding:18px 20px}
.set-card.span2{grid-column:1 / -1}
.set-card h3{font-family:"Archivo",sans-serif;font-size:14.5px;margin-bottom:4px}
.set-card>p{font-size:12px;color:var(--slate);margin-bottom:14px;line-height:1.5}
.mod-list{display:flex;flex-direction:column;gap:9px}
.mod-opt{display:flex;align-items:center;gap:11px;border:1px solid var(--rule);border-radius:7px;padding:11px 13px;cursor:pointer}
.mod-opt.sel{border-color:var(--ink);background:#E7F0FD;box-shadow:inset 0 0 0 1px var(--ink)}
.mod-opt .tick{width:18px;height:18px;border-radius:4px;border:1px solid var(--slate-2);flex-shrink:0;display:grid;place-items:center;font-size:11px;color:#fff}
.mod-opt.sel .tick{background:var(--ink);border-color:var(--ink)}
.mod-opt .nm{flex:1;font-size:13px;font-weight:600}
.mod-opt .ph{font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 6px;border-radius:3px}
.mod-opt .ph.one{background:var(--seal-soft);color:var(--seal)}
.mod-opt .ph.two{background:var(--rule-2);color:var(--slate-2)}
.integ{display:flex;align-items:center;gap:12px;border:1px solid var(--rule);border-radius:7px;padding:12px 14px;margin-bottom:10px}
.integ .logo{width:34px;height:34px;border-radius:7px;display:grid;place-items:center;font-family:"Archivo",sans-serif;font-weight:800;font-size:12px;color:#fff;flex-shrink:0}
.integ .nm{flex:1}
.integ .nm b{font-size:13px}
.integ .nm small{display:block;color:var(--slate-2);font-size:11px;margin-top:1px}
.toggle{width:38px;height:22px;border-radius:20px;background:var(--rule);position:relative;cursor:pointer;flex-shrink:0;border:0}
.toggle::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.toggle.on{background:var(--seal)}
.toggle.on::after{left:18px}
.alert-row{display:flex;align-items:center;gap:11px;padding:11px 0;border-top:1px solid var(--rule-2);font-size:12.5px}
.alert-row:first-of-type{border-top:0}
.alert-row .desc{flex:1}
.alert-row .desc b{font-size:12.5px}
.alert-row .desc small{display:block;color:var(--slate-2);font-size:11px;margin-top:1px}
.help-note{font-size:11.5px;color:var(--slate-2);font-style:italic;margin-top:6px;line-height:1.5}
@media (max-width:1080px){
  .set-grid{grid-template-columns:1fr}
  .opt-split{grid-template-columns:1fr}
}

/* (multi-screen demo toggles removed — each real page is its own document) */

/* ══ subscription page ══════════════════════════════════ */
.app-top{
  display:flex;justify-content:space-between;align-items:center;
  background:var(--surface);border-bottom:1px solid var(--rule);
  padding:14px 22px;
}
.wordmark2{font-family:"Archivo",sans-serif;font-weight:800;font-size:16px;letter-spacing:-.02em;color:var(--ink)}
.wordmark2 span{color:var(--slate-2);font-weight:500;font-size:10px;letter-spacing:.1em;text-transform:uppercase;margin-left:9px}

.sub-layout{
  max-width:1180px;margin:22px auto;padding:0 22px 60px;
  display:grid;grid-template-columns:1fr 400px;gap:28px;align-items:start;
}

/* ── left: demo ── */
.demo-title{font-family:"Archivo",sans-serif;font-weight:700;font-size:22px;letter-spacing:-.02em}
.demo-lede{color:var(--slate);font-size:13.5px;margin:4px 0 18px}
.demo-block{margin-bottom:22px}
.demo-lab{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600;margin-bottom:9px}

/* ── carousel ── */
.carousel{position:relative;border-radius:10px;overflow:hidden;background:var(--ink);border:1px solid var(--rule)}
.c-viewport{overflow:hidden}
.c-track{display:flex;transition:transform .5s ease}
.c-slide{min-width:100%;box-sizing:border-box}
.ph-photo,.ph-video{
  height:270px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;
}
.ph-photo{background:linear-gradient(135deg,#E4EFFA,#F6FAFF);color:var(--ink-3)}
.ph-photo b,.ph-video b{font-family:"Archivo",sans-serif;font-size:16px}
.ph-photo small,.ph-video small{font-size:11.5px;opacity:.7}
.ph-ic{font-size:34px}
.ph-video{background:linear-gradient(135deg,#1B2540,#2C3E63);color:#fff}
.ph-play{
  width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.14);
  border:1.5px solid rgba(255,255,255,.5);display:grid;place-items:center;
  font-size:18px;padding-left:4px;
}
.c-arrow{
  position:absolute;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border-radius:50%;border:0;cursor:pointer;
  background:rgba(255,255,255,.85);color:var(--ink);font-size:20px;line-height:1;
  display:grid;place-items:center;box-shadow:0 2px 8px rgba(0,0,0,.2);
}
.c-arrow:hover{background:#fff}
.c-prev{left:12px}
.c-next{right:12px}
.c-dots{position:absolute;bottom:12px;left:0;right:0;display:flex;gap:6px;justify-content:center}
.c-dot{width:8px;height:8px;border-radius:50%;border:0;background:rgba(255,255,255,.45);cursor:pointer;padding:0}
.c-dot.on{background:#fff;width:20px;border-radius:5px}

/* ── right: subscription panel ── */
.sub-panel{background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:22px 22px 24px;position:sticky;top:22px}
.sub-panel h3{font-family:"Archivo",sans-serif;font-weight:700;font-size:18px;letter-spacing:-.02em;margin-bottom:3px}
.plans{display:flex;flex-direction:column;gap:9px;margin:16px 0 12px}
.plan{
  display:flex;align-items:center;gap:11px;border:1px solid var(--rule);border-radius:8px;
  padding:13px 14px;cursor:pointer;margin:0;background:var(--surface);
  transition:border-color .12s,background .12s;
}
.plan input{position:absolute;opacity:0;pointer-events:none}
.plan-tick{width:20px;height:20px;border-radius:5px;border:1px solid var(--slate-2);flex-shrink:0;display:grid;place-items:center;font-size:12px;color:#fff}
.plan.sel{border-color:var(--ink);background:#E7F0FD;box-shadow:inset 0 0 0 1px var(--ink)}
.plan.sel .plan-tick{background:var(--ink);border-color:var(--ink)}
.plan-name{flex:1;font-size:14px;font-weight:600}
.plan-price{font-size:13.5px;font-weight:600;color:var(--ink)}
.plan-badge{font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;border-radius:4px;padding:3px 8px}
.plan-badge.active{background:var(--seal-soft);color:var(--seal);border:1px solid #B4E3CB}
.plan.owned{cursor:default;opacity:.9}
.plan.owned .plan-tick{background:var(--seal);border-color:var(--seal)}

.plan-all{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  border:1.5px solid var(--ink);border-radius:8px;padding:13px 15px;cursor:pointer;
  background:var(--ink);color:#fff;text-align:left;
}
.plan-all:disabled{opacity:.45;cursor:default}
.plan-all.sel{box-shadow:0 0 0 3px rgba(20,33,61,.18)}
.plan-all-l b{font-family:"Archivo",sans-serif;font-size:14px;display:block}
.plan-all-l small{font-size:11px;color:rgba(255,255,255,.6)}
.plan-all-r{text-align:right}
.plan-all-r .plan-price{color:#fff;font-size:15px}
.plan-all-r .save{display:block;font-size:10px;color:#9FE3C1;font-weight:600;letter-spacing:.04em;text-transform:uppercase}

.sub-total{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding-top:14px;border-top:1px solid var(--rule);font-weight:600}
.sub-total-amt{font-size:20px;font-family:"Archivo",sans-serif}

/* ── payment (test) screen ── */
.pay-test-tag{
  display:inline-block;font-family:"Archivo",sans-serif;font-size:9.5px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;color:var(--amber);
  background:var(--amber-soft);border:1px solid #F6D0A6;border-radius:4px;padding:4px 8px;
}
.pay-summary{border:1px solid var(--rule);border-radius:8px;overflow:hidden;margin-bottom:18px}
.pay-row{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;font-size:13px;border-bottom:1px solid var(--rule-2)}
.pay-row:last-child{border-bottom:0}
.pay-row span{color:var(--slate)}
.pay-row.total{background:#EFF5FC;font-size:14px}
.pay-row.total b{font-size:16px}

@media (max-width:900px){
  .sub-layout{grid-template-columns:1fr}
  .sub-panel{position:static}
}

/* ══ upload page ════════════════════════════════════════ */
.mtype button:disabled{opacity:.45;cursor:not-allowed}
.drop.dragging{border-color:var(--ink);background:#E7F0FD}
.up-note{
  background:var(--amber-soft);border:1px solid #F6D0A6;border-radius:6px;
  color:var(--amber);font-size:12.5px;font-weight:500;
  padding:8px 12px;margin:12px auto 0;display:inline-block;
}
.picked{border:1px solid var(--rule);border-radius:8px;background:var(--surface);margin-top:16px;overflow:hidden}
.picked-head{
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
  padding:10px 14px;border-bottom:1px solid var(--rule-2);background:#EFF5FC;
  font-size:12px;font-weight:600;color:var(--slate);
}
.picked-warn{color:var(--tape);font-weight:600}
.picked ul{list-style:none;margin:0;padding:0}
.picked li{display:flex;justify-content:space-between;gap:12px;padding:9px 14px;border-bottom:1px solid var(--rule-2);font-size:13px}
.picked li:last-child{border-bottom:0}
.picked .pk-size{color:var(--slate-2);font-size:12px}

/* ── case brief card ─────────────────────────────────── */
.brief-card{border:1px solid var(--rule);border-radius:9px;background:var(--surface);overflow:hidden;margin-top:22px}
.brief-head{
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
  padding:11px 16px;background:var(--ink);color:#fff;
  font-family:"Archivo",sans-serif;font-size:12.5px;font-weight:600;letter-spacing:.02em;
}
.brief-mode{font-family:"IBM Plex Sans",sans-serif;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:4px}
.brief-mode.live{background:var(--seal-soft);color:var(--seal)}
.brief-mode.test{background:var(--amber-soft);color:var(--amber)}
.brief-body{padding:16px 18px;font-size:13px;line-height:1.6;color:#333A4D;white-space:pre-wrap;font-family:"IBM Plex Sans",sans-serif}
.brief-body strong{color:var(--ink)}

/* ── API fetch: case selector + case header ──────────── */
.fetch-card{border:1px solid var(--rule);border-radius:9px;background:var(--surface);overflow:hidden;margin-bottom:18px}
.fc-head{padding:11px 16px;background:#EFF5FC;border-bottom:1px solid var(--rule);font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.fc-body{padding:16px}
.fc-body .verify-row .btn{padding:9px 16px}
.case-head{
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  border:1px solid var(--rule);border-radius:9px;background:var(--surface);padding:16px 18px;margin-bottom:12px;
}
.case-head .case-meta{gap:26px}
.fetch-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* two side-by-side options: manual upload vs API fetch */
.two-opts{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;margin-bottom:8px}
.two-opts .opt-card{display:flex;flex-direction:column}
.two-opts .drop{padding:22px 16px;margin-bottom:0}
@media (max-width:820px){.two-opts{grid-template-columns:1fr}}

/* two vertical parts: left = three mode options, right = panel */
/* The four upload options sit in a row across the top; the details of the one
   selected open full width underneath. */
.upload-split{display:block}
.mode-list{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px;
}
.mode-item{
  display:block;text-decoration:none;border:1px solid var(--rule);border-radius:8px;
  background:var(--surface);padding:13px 14px;color:var(--ink);
  transition:border-color .12s,background .12s,box-shadow .12s;position:relative;
}
.mode-item:hover{border-color:var(--slate-2)}
.mode-item b{font-family:"Archivo",sans-serif;font-size:13.5px;display:block}
.mode-item small{display:block;color:var(--slate-2);font-size:11px;margin-top:3px;line-height:1.4}
.mode-item.on{border-color:var(--ink);background:#E7F0FD;box-shadow:inset 0 0 0 1px var(--ink)}
/* a small pointer from the chosen option down to the panel below */
.mode-item.on::before{
  content:"";position:absolute;left:50%;bottom:-9px;width:14px;height:14px;
  margin-left:-7px;transform:rotate(45deg);background:#E7F0FD;
  border-left:1px solid var(--ink);border-top:1px solid var(--ink);
}
.mode-panel{border:1px solid var(--rule);border-radius:9px;background:var(--surface);padding:16px}
.mode-panel .drop{margin-bottom:0}
@media (max-width:960px){.mode-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){
  .mode-list{grid-template-columns:1fr}
  .mode-item.on::before{display:none}
}

/* scrollable list of a case's documents, with a Remove button per row */
.doclist{margin-top:16px;border:1px solid var(--rule);border-radius:8px;overflow:hidden}
.doclist-head{padding:9px 13px;background:var(--ink);color:#fff;font-family:"Archivo",sans-serif;font-size:11.5px;font-weight:600;letter-spacing:.03em}
.doclist-scroll{max-height:230px;overflow-y:auto;background:var(--surface)}
.doclist-row{display:flex;align-items:center;gap:10px;padding:9px 13px;border-bottom:1px solid var(--rule-2)}
.doclist-row:last-child{border-bottom:0}
.doclist-row:hover{background:#F4F9FF}
.dl-main{flex:1;min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dl-id{font-size:10.5px;color:var(--slate-2)}
.dl-name{font-size:12.5px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px}
.dl-date{font-size:11px;color:var(--slate-2)}
.dl-remove{border:1px solid var(--rule);background:var(--surface);color:var(--tape);font-size:11px;font-weight:600;border-radius:5px;padding:4px 10px;cursor:pointer}
.dl-remove:hover{background:var(--tape-soft);border-color:#F0CDD0}

/* filed-documents table: scrolls both vertically and horizontally, sticky header */
.doc-table-wrap{max-height:440px;overflow:auto}
.doc-table-wrap table{min-width:760px}
.doc-table-wrap thead th{position:sticky;top:0;z-index:3}

/* ── workspace: upper case selector ──────────────────── */
.ws-select{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap;padding:12px 26px;background:var(--surface);border-bottom:1px solid var(--rule)}
.ws-select .fg{margin:0;min-width:0}
/* Company gets the most room, the reference the least — it is a short code. */
.ws-select .fg:nth-child(1){flex:2 1 260px}
.ws-select .fg:nth-child(2){flex:1 1 150px}
.ws-select .fg:nth-child(3){flex:1 1 200px}
.ws-select .fg label{display:block;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600;margin-bottom:4px}
.ws-select .fg label .opt{
  font-size:9px;letter-spacing:.04em;text-transform:none;color:var(--slate-2);
  font-weight:500;font-style:italic;margin-left:4px;
}
.ws-select select{width:100%;min-width:0;max-width:none}
.ws-select select:disabled{background:var(--sunk);color:var(--slate-2)}
.ws-pick-count{
  font-family:"IBM Plex Mono",monospace;font-size:11px;color:var(--slate-2);
  white-space:nowrap;padding-bottom:9px;
}
@media (max-width:720px){
  .ws-select .fg{flex:1 1 100%}
  .ws-pick-count{display:none}
}

/* ── workspace: left chain sort + side tags ──────────── */
.ws-sort{display:flex;gap:4px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid var(--rule);background:#EFF5FC}
.ws-sort a{font-family:"IBM Plex Sans",sans-serif;font-size:11px;font-weight:500;background:var(--surface);border:1px solid var(--rule);border-radius:20px;color:var(--slate);padding:4px 10px;cursor:pointer;text-decoration:none;display:inline-block}
.ws-sort a:hover{border-color:var(--slate-2);color:var(--ink)}
.ws-sort a.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.ws-filtered{font-family:"IBM Plex Sans",sans-serif;font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;background:var(--amber-soft);color:var(--amber);border:1px solid #F6D0A6;border-radius:3px;padding:2px 6px;margin-left:7px}
.side-tag{display:inline-block;font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;border-radius:3px;padding:1px 5px;margin-right:5px}
.side-tag.dept{background:var(--tape-soft);color:var(--tape)}
.side-tag.tp{background:var(--seal-soft);color:var(--seal)}

/* ── workspace: observation-wise liability table ─────── */
.liab{border:1px solid var(--rule);border-radius:8px;background:var(--surface);overflow:hidden;margin-bottom:16px}
.liab-head{padding:9px 14px;background:var(--ink);color:#fff;font-family:"Archivo",sans-serif;font-size:12px;font-weight:600;letter-spacing:.02em}
.liab-table{width:100%;border-collapse:collapse;min-width:560px}
.liab-table th{font-size:9.5px;padding:8px 10px;background:#EFF5FC;white-space:nowrap}
.liab-table td{padding:8px 10px;font-size:12px;border-bottom:1px solid var(--rule-2)}
.liab-table .num-r{font-family:"IBM Plex Mono",monospace;font-variant-numeric:tabular-nums}
.liab-table tfoot td{background:#EFF5FC;font-weight:600;border-top:1px solid var(--rule)}
.liab-empty{background:var(--surface)}

/* ── workspace: document viewer bits (enlarged) ──────── */
.doc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.doc-frame{width:100%;height:1080px;border:1px solid var(--rule);border-radius:6px;background:#fff}
.ws-cta-top{position:sticky;top:0;z-index:2;border-bottom:1px solid var(--rule);border-top:0;background:var(--surface)}

/* ── manual analysis (test mode, no API) ─────────────── */
.note-box{
  border-left:3px solid var(--ink);background:var(--surface);border:1px solid var(--rule);
  border-left-width:3px;border-radius:0 8px 8px 0;padding:13px 16px;margin-bottom:18px;
  font-size:13px;line-height:1.6;color:var(--slate);
}
.note-box b{color:var(--ink)}
.ma-step{border:1px solid var(--rule);border-radius:9px;background:var(--surface);margin-bottom:14px;overflow:hidden}
.ma-head{
  display:flex;align-items:center;gap:10px;padding:11px 16px;background:var(--ink);color:#fff;
  font-family:"Archivo",sans-serif;font-size:13px;font-weight:600;
}
.ma-head .step-n{background:rgba(255,255,255,.18);color:#fff}
.ma-body{padding:15px 16px}
.ma-text{
  width:100%;font-family:"IBM Plex Mono",monospace;font-size:11.5px;line-height:1.5;
  padding:11px;border:1px solid var(--rule);border-radius:6px;background:var(--paper);
  color:var(--ink);resize:vertical;
}
.ma-folder{background:var(--paper);border:1px solid var(--rule);border-radius:6px;padding:10px 12px}
.ma-folder .k{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600}
.ma-folder .v{font-size:12px;margin-top:3px;word-break:break-all}
.md-grid{display:flex;flex-wrap:wrap;gap:6px}
.md-chip{
  font-size:11px;background:var(--seal-soft);color:var(--seal);border:1px solid #B4E3CB;
  border-radius:4px;padding:4px 9px;
}

/* ══ draft reply — three columns ═══════════════════════ */
.rp-top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;padding:16px 22px 10px}
.rp-top .sub{color:var(--slate);font-size:12.5px}
.rp-top-right{display:flex;gap:12px;align-items:center;flex-wrap:wrap}

/* stage tabs — one draft per stage of the case */
.rp-stages{display:flex;gap:7px;align-items:stretch;flex-wrap:wrap;padding:0 22px 12px;border-bottom:1px solid var(--rule)}
.rp-stages-lab{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600;align-self:center;margin-right:3px}
.rp-stage{
  display:block;text-decoration:none;border:1px solid var(--rule);border-radius:7px;
  background:var(--surface);padding:7px 12px;color:var(--ink);min-width:104px;
}
.rp-stage:hover{border-color:var(--slate-2)}
.rp-stage b{display:block;font-family:"Archivo",sans-serif;font-size:12px}
.rp-stage small{display:block;font-size:10px;color:var(--slate-2);text-transform:capitalize;margin-top:1px}
.rp-stage.on{background:var(--ink);border-color:var(--ink)}
.rp-stage.on b{color:#fff}
.rp-stage.on small{color:rgba(255,255,255,.65)}
.rp-newwrap{margin-left:auto;display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.rp-new{display:flex;gap:6px;align-items:center}
.rp-new select{font-size:11.5px;padding:6px 8px;max-width:190px;width:auto}

/* ── what is being drafted ────────────────────────────────────────────
   Four modes, each reading its figures from a different form. Coloured so
   the one in force is obvious at a glance from across the desk. */
.rp-modes{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:9px;padding:14px 22px 0;
}
.rp-mode{
  display:block;text-decoration:none;border-radius:9px;padding:10px 13px;
  border:1px solid var(--rule);background:var(--surface);color:var(--ink);
  border-left-width:4px;transition:transform .12s,box-shadow .12s,background .12s;
}
.rp-mode b{display:block;font-family:"Archivo",sans-serif;font-size:12.5px;line-height:1.25}
.rp-mode small{
  display:block;margin-top:3px;font-size:10.5px;line-height:1.35;color:var(--slate-2);
}
.rp-mode:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(20,33,61,.10)}
.rp-mode:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
/* one colour per pleading, escalating with the forum */
.rp-mode.m-reply{border-left-color:var(--mint)}
.rp-mode.m-appeal1{border-left-color:var(--sky)}
.rp-mode.m-appeal2{border-left-color:var(--orange)}
.rp-mode.m-writ{border-left-color:var(--tape)}
/* the one in force: filled, white type, no longer a link in appearance */
.rp-mode.on{color:#fff;border-color:transparent;box-shadow:0 2px 10px rgba(20,33,61,.18)}
.rp-mode.on small{color:rgba(255,255,255,.78)}
.rp-mode.m-reply.on{background:linear-gradient(180deg,var(--mint),#2E9770)}
.rp-mode.m-appeal1.on{background:linear-gradient(180deg,var(--sky),#1D5C97)}
.rp-mode.m-appeal2.on{background:linear-gradient(180deg,var(--orange),#D2700F)}
.rp-mode.m-writ.on{background:linear-gradient(180deg,#D0343F,var(--tape))}
@media (max-width:700px){
  .rp-modes{padding:12px 14px 0}
  .rp-mode small{display:none}
}

/* the three columns: documents | draft + annexures | observations.
   `order` puts the observations last without moving the block in the
   template, where it has to stay next to the form that posts it. */
.rp3{display:grid;grid-template-columns:300px 1fr 330px;gap:0;align-items:start;min-height:60vh}
.rp-col{border-right:1px solid var(--rule);background:var(--surface);min-width:0}
.rp-col:last-child{border-right:0;background:var(--paper)}
/* The middle column is last in the template but second on screen, so the
   :last-child rule above would drop the divider between it and the
   observations. Put it back and take it off the column that really is last. */
.rp-col-mid{background:var(--paper);order:2;border-right:1px solid var(--rule)}
.rp-col-obs{order:3;border-right:0}
/* the document chain reuses the workspace spine, tightened for this column */
.rp-col .chain{padding:0}
.rp-col .link-row{margin-bottom:2px}
/* ── professional-review disclaimer ───────────────────────────────────
   Deliberately not styled as a dismissible "tip": it sits in the reading
   path, above the draft and above the figures, and cannot be closed. */
.ai-note{
  display:flex;gap:9px;align-items:flex-start;
  margin:0 0 12px;padding:9px 12px;border-radius:7px;
  background:var(--amber-soft);border:1px solid #F6D0A6;
  border-left:3px solid var(--orange);
  font-size:11.5px;line-height:1.45;color:var(--ink);
}
.ai-note b{color:var(--amber)}
.ai-note-mark{
  flex:none;width:16px;height:16px;border-radius:50%;background:var(--orange);
  color:#fff;font-size:11px;font-weight:700;line-height:16px;text-align:center;
  margin-top:1px;
}

/* ── site footer: the links Indian law and the gateways require ────────
   No background of its own — it takes the colour of whatever page it sits
   on, so it reads as part of the page rather than a pasted-on band. */
.site-foot{
  margin:28px 0 0;padding:16px 22px 22px;border-top:1px solid var(--rule);
  background:transparent;
}
.sf-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.sf-brand{font-family:"Archivo",sans-serif;font-weight:700;font-size:12.5px;color:var(--ink)}
.sf-links{display:flex;gap:14px;flex-wrap:wrap}
.sf-links a{font-size:11.5px;color:var(--slate);text-decoration:none}
.sf-links a:hover{color:var(--sky);text-decoration:underline}
.sf-note{margin:9px 0 0;font-size:11px;line-height:1.5;color:var(--slate-2);max-width:90ch}

/* ── consent, taken before payment ───────────────────────────────────── */
.consent{
  margin:16px 0 4px;padding:12px 13px;border-radius:8px;
  border:1px solid #F6D0A6;background:var(--amber-soft);
}
.consent-head{
  font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--amber);font-weight:700;margin-bottom:9px;
}
.consent-item{
  display:flex;gap:9px;align-items:flex-start;
  font-size:11.5px;line-height:1.5;color:var(--ink);
  padding:7px 0;border-top:1px solid rgba(180,91,13,.16);cursor:pointer;
  /* these rows are <label>s, and the global label rule upper-cases and
     letter-spaces them — unreadable for a paragraph the user must actually
     read before agreeing to it */
  text-transform:none;letter-spacing:normal;font-weight:400;
}
.consent-item:first-of-type{border-top:0;padding-top:0}
.consent-item input{margin-top:2px;flex:none;width:15px;height:15px;cursor:pointer}
.consent-item a{color:var(--amber);font-weight:600}
.consent-item b{color:var(--amber)}

/* ── the legal pages themselves ──────────────────────────────────────── */
.legal-page .legal-body{font-size:13.5px;line-height:1.65;color:var(--ink)}
.legal-page .legal-body h2{
  font-family:"Archivo",sans-serif;font-size:15px;margin:22px 0 7px;color:var(--ink);
}
.legal-page .legal-body p{margin:0 0 11px}
.legal-page .legal-body ul{margin:0 0 12px;padding-left:22px}
.legal-page .legal-body li{margin-bottom:5px}
/* a company detail nobody has filled in yet — impossible to miss */
.legal-todo{
  background:var(--tape-soft);color:var(--tape);border:1px dashed var(--tape);
  border-radius:4px;padding:1px 6px;font-size:12px;font-weight:600;
}

/* ── developer console tabs — one subject per page ──────────────────── */
.dev-tabs{
  display:flex;gap:4px;flex-wrap:wrap;margin-bottom:18px;
  border-bottom:1px solid var(--rule);padding-bottom:0;
}
.dev-tab{
  text-decoration:none;font-size:12.5px;font-weight:600;color:var(--slate);
  padding:9px 14px;border:1px solid transparent;border-bottom:0;
  border-radius:7px 7px 0 0;margin-bottom:-1px;background:transparent;
}
.dev-tab:hover{color:var(--ink);background:var(--sky-soft)}
.dev-tab.on{
  color:var(--ink);background:var(--surface);
  border-color:var(--rule);border-bottom:1px solid var(--surface);
}
@media (max-width:620px){.dev-tab{padding:8px 10px;font-size:11.5px}}

/* expert desk, above the annexures in the middle column */
.rp-expert{
  margin-top:18px;padding:12px 14px;border:1px solid #F6D0A6;border-radius:8px;
  background:var(--amber-soft);
}
.xp-head{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.xp-head b{font-family:"Archivo",sans-serif;font-size:13px;color:var(--amber)}
.xp-price{
  margin-left:auto;font-family:"IBM Plex Mono",monospace;font-weight:600;
  font-size:13px;color:var(--amber);
}
.rp-expert textarea{
  width:100%;margin:8px 0;font-family:inherit;font-size:12.5px;padding:7px 9px;
  border:1px solid var(--rule);border-radius:6px;resize:vertical;
}
.rp-expert .btn{width:100%}

/* annexures, folded in under the draft */
.rp-annex{margin-top:18px;padding-top:14px;border-top:1px solid var(--rule)}
.rp-sub-lead{margin-top:0}
/* the row whose document is on screen in the viewer */
.rp-open.open{background:var(--sky-soft);border-radius:6px}

/* ── floating document viewer ─────────────────────────────────────────
   Not a modal: no backdrop, so the draft behind it stays clickable and the
   notice can be read while typing. Fixed position, dragged by its bar and
   resized from the corner; position and size are kept in localStorage. */
.docpop{
  position:fixed;z-index:60;display:flex;flex-direction:column;
  min-width:300px;min-height:220px;max-width:96vw;max-height:92vh;
  background:var(--surface);border:1px solid var(--rule);border-radius:10px;
  box-shadow:0 12px 40px rgba(20,33,61,.28);overflow:hidden;resize:both;
}
.docpop[hidden]{display:none}
.docpop-bar{
  display:flex;align-items:center;gap:10px;padding:8px 10px;
  background:#EFF5FC;border-bottom:1px solid var(--rule);
  cursor:grab;touch-action:none;user-select:none;flex:none;
}
.docpop.dragging .docpop-bar{cursor:grabbing}
/* while dragging, the iframe must not eat the pointer moves */
.docpop.dragging .docpop-body{pointer-events:none}
.docpop-title{min-width:0;display:flex;flex-direction:column;line-height:1.25}
.docpop-title b{font-family:"Archivo",sans-serif;font-size:12px;color:var(--ink)}
.docpop-title small{
  font-size:10.5px;color:var(--slate-2);overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;max-width:34ch;
}
.docpop-acts{margin-left:auto;display:flex;gap:4px;align-items:center}
.docpop-acts button,.docpop-acts a{
  border:1px solid var(--rule);background:var(--surface);color:var(--slate);
  border-radius:5px;font-size:12px;line-height:1;padding:5px 8px;cursor:pointer;
  text-decoration:none;display:inline-block;
}
.docpop-acts button:hover,.docpop-acts a:hover{background:var(--sky-soft);color:var(--ink)}
.docpop-body{flex:1;min-height:0;background:var(--paper);overflow:auto}
.docpop-body iframe{width:100%;height:100%;border:0;display:block;background:#fff}
.docpop-body img{max-width:100%;display:block;margin:0 auto}
@media (max-width:700px){
  /* no room to float on a phone — sit it across the bottom half */
  .docpop{left:0 !important;top:auto !important;bottom:0;
          width:100vw !important;height:62vh !important;border-radius:10px 10px 0 0;resize:none}
}
.rp-head{
  padding:11px 15px;border-bottom:1px solid var(--rule);background:#EFF5FC;
  font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--slate-2);font-weight:600;
  display:flex;justify-content:space-between;align-items:center;gap:8px;position:sticky;top:0;z-index:2;
}
.rp-lang{text-transform:none;letter-spacing:0;font-size:11px;color:var(--slate);display:flex;gap:6px;align-items:center}
.rp-body{padding:14px 15px}
.rp-sub{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600;margin:14px 0 8px}

/* left column — observations */
.obs{border:1px solid var(--rule);border-radius:7px;padding:10px 11px;margin-bottom:9px;background:var(--surface)}
.obs-t{font-size:12.5px;font-weight:600;line-height:1.4;margin-bottom:5px}
.obs-amt{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:7px}
.obs-amt span{font-family:"IBM Plex Mono",monospace;font-size:10px;background:var(--paper);border:1px solid var(--rule);border-radius:3px;padding:2px 6px;color:var(--slate)}
.obs-amt .obs-tot{background:var(--ink);color:#fff;border-color:var(--ink);font-weight:600}
.obs textarea{width:100%;min-height:56px;font-size:12px;padding:8px 9px;border:1px solid var(--rule);border-radius:5px;resize:vertical;font-family:"IBM Plex Sans",sans-serif;background:var(--paper);color:var(--ink)}
.obs textarea:focus{outline:2px solid var(--ink);outline-offset:-1px}
.obs textarea:disabled{background:#EEF2F8;color:var(--slate-2)}

/* middle column — the draft editor */
.rte-bar{
  display:flex;flex-wrap:wrap;gap:3px;align-items:center;
  border:1px solid var(--rule);border-bottom:0;border-radius:7px 7px 0 0;
  background:#EFF5FC;padding:7px 8px;
}
.rte-bar button{
  font-family:"IBM Plex Sans",sans-serif;font-size:12px;min-width:28px;height:27px;
  background:var(--surface);border:1px solid var(--rule);border-radius:5px;
  color:var(--ink);cursor:pointer;padding:0 7px;line-height:1;
}
.rte-bar button:hover{border-color:var(--slate-2);background:var(--paper)}
.rte-bar button.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.rte-bar select{
  font-size:11.5px;height:27px;padding:0 6px;width:auto;min-width:74px;
  border:1px solid var(--rule);border-radius:5px;background:var(--surface);color:var(--ink);
}
.rte-sep{width:1px;height:19px;background:var(--rule);margin:0 4px}
.rte-colour{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.rte-colour span{
  display:block;width:27px;height:27px;border:1px solid var(--rule);border-radius:5px;
  background:var(--ink);
}
.rte-colour input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}

.rte-find{
  display:flex;gap:6px;align-items:center;flex-wrap:wrap;
  border:1px solid var(--rule);border-bottom:0;background:var(--amber-soft);padding:8px 9px;
}
.rte-find input{
  font-size:12px;padding:6px 8px;border:1px solid #F6D0A6;border-radius:5px;
  background:#fff;color:var(--ink);width:auto;flex:1 1 130px;min-width:110px;
}
.rte-find .btn{padding:6px 11px;font-size:12px}
/* "Find" reuses this panel with the replace controls hidden. */
.rte-find-repl{display:contents}
.rte-find.find-only .rte-find-repl{display:none}

/* ── liability review, in the workspace strip ─────────────────────────
   Folded away behind a summary: the figures are usually right, and the
   correction form should not compete with them for attention. */
.liab-review{margin:10px 14px 4px;border-top:1px solid var(--rule);padding-top:10px}
.liab-review > summary{
  cursor:pointer;font-size:11.5px;font-weight:600;color:var(--sky);
  list-style:none;display:inline-flex;align-items:center;gap:5px;
}
.liab-review > summary::-webkit-details-marker{display:none}
.liab-review > summary::before{content:"✎";font-size:12px}
.liab-review > summary:hover{color:var(--ink)}
.liab-review[open] > summary{margin-bottom:10px}
.lr-lab{display:block;font-size:11px;font-weight:600;color:var(--slate);margin-bottom:4px}
.liab-review textarea{
  width:100%;font-family:inherit;font-size:12.5px;padding:8px 10px;
  border:1px solid var(--rule);border-radius:6px;resize:vertical;
}
.lr-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
.lr-sub{
  font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--slate-2);font-weight:600;margin:14px 0 6px;
}
.lr-edit input{
  width:100%;min-width:0;font-size:11.5px;padding:4px 6px;
  border:1px solid var(--rule);border-radius:4px;background:var(--surface);
}
.lr-edit input.num-r{text-align:right}
.lr-edit td{padding:3px 4px}

.draft-edit{
  width:100%;min-height:520px;font-family:Calibri,"IBM Plex Sans",sans-serif;font-size:13.5px;
  line-height:1.5;padding:16px 18px;border:1px solid var(--rule);border-radius:0 0 7px 7px;
  background:var(--surface);color:#26303F;overflow-y:auto;max-height:70vh;
}
.draft-edit:focus{outline:2px solid var(--ink);outline-offset:-2px}
.draft-edit:empty:before{content:attr(data-placeholder);color:var(--slate-2)}
.draft-edit p{margin:0 0 10px}
.draft-edit ul,.draft-edit ol{margin:0 0 10px;padding-left:26px}
.draft-edit[contenteditable="false"]{background:#EEF2F8;border-radius:7px}
/* A drafted pleading carries tables — a demand computation, a list of
   authorities. table-layout:fixed with wrapping keeps even an eight-column
   table inside the column instead of pushing the whole editor sideways. */
.draft-edit h1{font-size:16px;margin:14px 0 8px;line-height:1.3}
.draft-edit h2{font-size:14.5px;margin:14px 0 7px;line-height:1.3}
.draft-edit h3{font-size:13.5px;margin:12px 0 6px;line-height:1.3}
.draft-edit table{
  width:100%;max-width:100%;table-layout:fixed;border-collapse:collapse;
  margin:0 0 12px;font-size:11.5px;
}
.draft-edit th,.draft-edit td{
  border:1px solid var(--rule);padding:4px 6px;vertical-align:top;
  overflow-wrap:anywhere;word-break:normal;
}
.draft-edit th{background:#EFF5FC;text-align:left;font-weight:600}
.draft-edit hr{border:0;border-top:1px solid var(--rule);margin:14px 0}

.btn-danger{
  font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;font-weight:500;
  background:var(--surface);color:var(--tape);border:1px solid #F0CDD0;
  border-radius:5px;padding:7px 13px;cursor:pointer;
}
.btn-danger:hover{background:var(--tape-soft);border-color:var(--tape)}
.rp-confirm{
  display:flex;gap:7px;align-items:flex-start;font-size:11px;line-height:1.4;
  color:var(--amber);background:var(--amber-soft);border:1px solid #F6D0A6;
  border-radius:6px;padding:8px 10px;cursor:pointer;
}
.rp-confirm input{margin-top:1px;flex-shrink:0}

/* ── reviewer area: nav and shared-draft cards ────────── */
.rv-nav{display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.rv-nav a:not(.btn){
  font-family:"IBM Plex Sans",sans-serif;font-size:12.5px;font-weight:500;
  text-decoration:none;color:var(--slate);padding:7px 12px;border-radius:6px;
}
.rv-nav a:not(.btn):hover{background:var(--sunk,#EAF2FC);color:var(--ink)}
.rv-nav a.on{background:var(--ink);color:#fff}
.rv-nav-off{font-size:12.5px;color:var(--slate-2);padding:7px 12px;cursor:not-allowed}
.rv-who{font-size:12px;color:var(--slate-2);margin-left:10px;margin-right:4px}

.rv-draft{
  display:block;text-decoration:none;border:1px solid var(--rule);border-left-width:3px;
  border-left-color:var(--rule);border-radius:0 7px 7px 0;background:var(--surface);
  padding:10px 12px;margin-bottom:8px;color:var(--ink);
}
.rv-draft:hover{border-color:var(--slate-2);border-left-color:var(--slate-2)}
.rv-draft b{display:block;font-family:"Archivo",sans-serif;font-size:12.5px}
.rv-draft span{display:block;font-size:11px;color:var(--slate-2);margin-top:2px}
.rv-draft.live{border-left-color:var(--amber);background:var(--amber-soft)}
.rv-draft.live span{color:var(--amber);font-weight:600}

/* right column — annexures */
.anx-list{display:flex;flex-direction:column;gap:7px}
.anx{border:1px solid var(--rule);border-left-width:3px;border-radius:0 6px 6px 0;padding:8px 10px;background:var(--surface);font-size:12px;line-height:1.45}
.anx.ok{border-left-color:var(--seal)}
.anx.todo{border-left-color:var(--amber)}
.anx b{display:block;font-size:11.5px}
.anx span{color:var(--slate);font-size:11.5px}
.anx em{display:block;color:var(--amber);font-size:10.5px;font-style:normal;margin-top:3px}
.anx-file{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--rule-2)}
.anx-file:last-of-type{border-bottom:0}
.anx-file .nm{flex:1;min-width:0;font-size:12px}
.anx-file .nm small{display:block;color:var(--slate-2);font-size:10.5px;font-family:"IBM Plex Mono",monospace}
.rp-folder{font-size:9.5px;color:var(--slate-2);word-break:break-all;margin-top:12px;padding-top:10px;border-top:1px solid var(--rule-2)}

@media (max-width:1100px){
  .rp3{grid-template-columns:1fr}
  .rp-col{border-right:0;border-bottom:1px solid var(--rule)}
  .draft-edit{min-height:380px}
}

/* ── draft reply: status pill + revision counter ─────── */
.status-pill{font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;border-radius:4px;padding:4px 9px}
.status-pill.s-questions{background:var(--amber-soft);color:var(--amber);border:1px solid #F6D0A6}
.status-pill.s-drafted{background:#E4EFFA;color:var(--ink-3);border:1px solid #C6DCF2}
.status-pill.s-in_review{background:#FFF0DF;color:#B45B0D;border:1px solid #F6D0A6}
.status-pill.s-approved,.status-pill.s-filed{background:var(--seal-soft);color:var(--seal);border:1px solid #B4E3CB}
.rev-count{font-size:11.5px;color:var(--slate);display:inline-flex;align-items:center;gap:8px}
.rev-count .dots{display:inline-flex;gap:4px}
.rev-count .dots i{width:8px;height:8px;border-radius:50%;background:var(--tape);opacity:.25}
.rev-count .dots i.used{opacity:1}
.draft{white-space:pre-wrap}
.reply-grid .q textarea:disabled,.reply-grid select:disabled{background:#EEF2F8;color:var(--slate-2);cursor:not-allowed}

/* ── user management: add-member row ─────────────────── */
.add-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding-top:12px;border-top:1px solid var(--rule-2);margin-top:6px}
.add-row input[type=text]{max-width:170px}
.add-row input[type=email]{max-width:230px}
.add-row .btn{white-space:nowrap}
.note-form{background:var(--surface);border:1px solid var(--rule);border-radius:7px;padding:12px}
.note-form input[type=text],.note-form textarea{width:100%;font-size:12.5px}
.note .del-x{border:0;background:none;color:var(--slate-2);cursor:pointer;padding:0}
.note .del-x:hover{color:var(--tape);background:none}
select{font-family:"IBM Plex Sans",sans-serif;font-size:13.5px;padding:9px 11px;border:1px solid var(--rule);border-radius:5px;background:var(--surface);color:var(--ink);width:100%}
select:focus{outline:2px solid var(--ink);outline-offset:-1px;border-color:var(--ink)}

/* ══════════════════════════════════════════════════════════
   COLOUR REFRESH — blue · pastel green · orange
   Blue carries the app. Pastel green = settled / approved /
   paid. Orange = waiting on someone. Red is kept only for
   real danger (delete, errors, department demands).
   ══════════════════════════════════════════════════════════ */

/* let the page gradient show through the app shell */
.frame,.main,.body,.login-wrap,.sub-layout{background:transparent}

/* dark surfaces: blue gradient instead of flat navy */
.rail,.demo-bar{background:linear-gradient(180deg,#154471 0%,#0E2E51 100%)}
.login-art{background:linear-gradient(165deg,#17497C 0%,#0E2E51 58%,#123A63 100%)}
.login-art::after{
  content:"";position:absolute;inset:auto -40px -60px -40px;height:220px;
  background:radial-gradient(closest-side,rgba(63,174,133,.30),transparent);
  pointer-events:none;
}
.login-art{position:relative;overflow:hidden}
.login-art > *{position:relative;z-index:1}
.mini-chain div.now .dot{background:var(--orange);box-shadow:0 0 0 3px rgba(240,138,46,.30)}

/* headers float over the gradient */
/* Safari needs the -webkit- prefix for this and ignores the plain property,
   so without the first line the frosted header is simply flat on a Mac. */
.app-top{background:rgba(255,255,255,.88);
         -webkit-backdrop-filter:saturate(1.4) blur(8px);
         backdrop-filter:saturate(1.4) blur(8px)}
.topbar,.ws-select{background:rgba(255,255,255,.82);
         -webkit-backdrop-filter:saturate(1.4) blur(8px);
         backdrop-filter:saturate(1.4) blur(8px)}

/* every panel lifts off the background */
.card,.tiles,.umeta,.opt-card,.set-card,.role-card,.sub-panel,.brief-card,
.fetch-card,.mode-panel,.liab,.picked,.annex,.ma-step,.q,.note-form,
.doclist,.carousel,.toolbar,.rvbox{box-shadow:var(--shadow)}
.card,.tiles,.umeta,.opt-card,.set-card,.role-card,.brief-card,
.fetch-card,.mode-panel,.liab,.picked{border-color:#D5E3F2}

/* dashboard tiles: a coloured cap and a lift on hover */
.tile{position:relative;transition:background .14s,box-shadow .14s}
.tile::before{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,var(--sky),#5AA9E8);
}
.tile:nth-child(2)::before{background:linear-gradient(90deg,var(--mint),#7FD3B0)}
.tile:nth-child(3)::before{background:linear-gradient(90deg,var(--orange),#F7BC77)}
.tile:nth-child(4)::before{background:linear-gradient(90deg,#5B8DEF,var(--sky))}
.tile:hover{background:#F7FBFF}
.tile.done .num{color:var(--seal)}

/* primary buttons: blue gradient (ghost / danger keep their own look) */
.btn{background:linear-gradient(180deg,#1D5C97 0%,#123A63 100%);box-shadow:0 1px 2px rgba(18,58,99,.22)}
.btn:hover{background:linear-gradient(180deg,#2470B4 0%,#17497C 100%)}
.btn.ghost{background:var(--surface);border-color:#CFE0F2}
.btn.ghost:hover{background:var(--sky-soft);border-color:#A9CBEE;color:var(--ink-3)}

/* dark strip headers inside cards */
.liab-head,.doclist-head,.brief-head,.ma-head,.plan-all,
.mtype button[aria-current="true"],.pill.gst{
  background:linear-gradient(90deg,#123A63 0%,#1D5C97 100%);
}
.plan-all.sel{box-shadow:0 0 0 3px rgba(47,127,212,.24)}

/* selection states in blue */
.seg input:checked + label,.mod-opt.sel,.plan.sel,.mode-item.on,.doc.sel,.drop.dragging{
  border-color:var(--sky);background:var(--sky-soft);box-shadow:inset 0 0 0 1px var(--sky);
}
.mod-opt.sel .tick,.plan.sel .plan-tick,.rail nav a.on,.ws-sort a.on,
.rv-nav a.on,.anno button.active{background:var(--ink-3);border-color:var(--ink-3)}
.node,.mw .chainm i{background:var(--sky)}
.node.here{background:var(--orange);box-shadow:0 0 0 1.5px var(--orange),0 0 0 4.5px rgba(240,138,46,.20)}
.node.open{background:var(--surface);box-shadow:0 0 0 1.5px var(--sky)}
.thread{background:#CFE0F2}
.doc:hover{background:#F4F9FF}
tbody tr:hover td{background:#F4F9FF}

/* pastel green = done, orange = waiting */
.toggle.on{background:var(--mint)}
.plan.owned .plan-tick{background:var(--mint);border-color:var(--mint)}
.side-tag.tp{background:var(--seal-soft);color:var(--seal)}
.rv-draft.live{border-left-color:var(--orange)}
.anx.ok{border-left-color:var(--mint)}
.anx.todo{border-left-color:var(--orange)}
.tile.live .num{color:var(--amber)}

/* subscription demo placeholders */
.ph-photo{background:linear-gradient(135deg,#E4EFFA 0%,#E7F6EE 100%);color:var(--ink-3)}
.ph-video{background:linear-gradient(135deg,#154471 0%,#0E2E51 100%);color:#fff}
.c-dot.on{background:var(--orange)}

/* inputs pick up a blue focus ring */
input:focus,textarea:focus,select:focus{outline-color:var(--sky);border-color:var(--sky)}
.btn:focus-visible{outline-color:var(--sky)}

/* the sign-in art panel runs the full height of the window */
.login-wrap{min-height:100vh}
/* password boxes were narrower than the rest — same width as every other field */
input[type=password]{width:100%}
.login-form input[type=password],.login-form input[type=text],
.login-form input[type=email]{max-width:none}

/* the active tab underline and the "live" pill move off red — red now
   means danger only, orange means a matter still running */
.cuts button[aria-current="true"]{border-bottom-color:var(--sky)}
.pill.live{background:var(--amber-soft);color:var(--amber);border:1px solid #F6D0A6}
.tile.live .num{color:var(--amber)}
.rev-count .dots i{background:var(--sky)}

/* links inside the dark rail must not use the dark ink colour */
.rail-foot .case-link,.rail-foot a{color:rgba(255,255,255,.72);text-decoration-color:rgba(255,255,255,.4)}
.rail-foot .case-link:hover,.rail-foot a:hover{color:#fff}

/* "Draft reply" and the other call-to-action buttons: orange, not red —
   they are the next step to take, not a warning */
.btn.tape{background:linear-gradient(180deg,#F0912F 0%,#D9700F 100%);color:#fff}
.btn.tape:hover{background:linear-gradient(180deg,#F6A247 0%,#C46309 100%)}

/* ── draft reply: the case / notice selector bar ─────── */
.rp-select{align-items:flex-end;gap:18px;padding:14px 22px}
.selgrp{display:flex;flex-direction:column;gap:5px;min-width:0}
.selgrp label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--slate-2);font-weight:600;margin:0}
.selgrp select{width:auto;max-width:320px}
.selgrp .hint{font-size:10px;margin-top:1px}
.rp-select-note{margin-left:auto;align-self:center;font-size:11.5px}
@media (max-width:900px){
  .rp-select{gap:12px}
  .selgrp select{max-width:100%}
  .rp-select-note{margin-left:0}
}
