/* ═══════════════════════════════════════════════════════════════════════
   LITICUS Matter Vault

   Design language matched to liticus.ai: the same Plus Jakarta Sans, the
   same dark-teal surfaces, the same gold-tinted borders, pill controls,
   corner brackets, left-accent rules and fluid easing.

   The accent (--brand) is set per firm in layout.php. Everything that was
   hard-coded gold now derives from it, so a white-labeled vault renders
   coherently in the firm's own colour instead of flecked with ours.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  /* ─────────────────────────────────────────────────────────────────
     Lifted verbatim from liticus.ai (the #liticus-site :root block in
     index.html), variable names included. Keep these in sync with the
     site — a change there can be pasted straight in here.
     ───────────────────────────────────────────────────────────────── */
  --bg-deep: #0a2724;
  --bg-card: #103330;
  --bg-surface: #15403b;
  --gold: #d9a441;
  --gold-light: #edb353;
  --gold-deep: #e8c467;
  --gold-dim: rgba(217,164,65,0.16);
  --turquoise: #FF3000;       /* the Alpha Source orange, site var name kept */
  --red: #ef4444;
  --green: #34d399;
  --text-primary: #d7ece8;
  --text-muted: #8fb5ae;
  --border: rgba(217,164,65,0.32);
  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-soft: 0 24px 60px -28px rgba(0,0,0,0.55), 0 6px 22px -12px rgba(0,0,0,0.3);
  --shadow-card: 0 10px 34px -18px rgba(0,0,0,0.45);

  /* ── Vault-side aliases onto the site's palette ──────────────────── */
  --brand: var(--gold);
  --brand-light: var(--gold-light);
  --brand-deep: var(--gold-deep);

  --ink: var(--bg-deep);
  --panel: var(--bg-card);
  --surface: var(--bg-surface);
  --ink-deep: #061a17;

  /* Lighter than the site's #d7ece8 / #8fb5ae by request. --hint holds
     the site's original muted tone; placeholders still use it. */
  --text: #f0f7f6;
  --muted: #bcd8d2;
  --hint: var(--text-muted);

  --danger: var(--red);
  --ok: var(--green);         /* live / open — mint */
  --olive: #a3bd85;           /* second rank — field green; green and gold only, no blue */

  /* Accent derivations. Fallbacks first; resolved against --brand below
     so a white-labeled vault follows the firm's own accent. */
  --border-soft: var(--gold-dim);
  --accent-tint: rgba(217,164,65,.13);
  --accent-wash: rgba(217,164,65,.06);
  --accent-glow: rgba(217,164,65,.22);
  --line-soft: rgba(240,247,246,.06);
  --on-brand: #241804;        /* text on a filled brand button, as on the site */

  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --border:       color-mix(in srgb, var(--brand) 32%, transparent);
    --border-soft:  color-mix(in srgb, var(--brand) 16%, transparent);
    --accent-tint:  color-mix(in srgb, var(--brand) 13%, transparent);
    --accent-wash:  color-mix(in srgb, var(--brand) 6%,  transparent);
    --accent-glow:  color-mix(in srgb, var(--brand) 22%, transparent);
    --brand-light:  color-mix(in srgb, var(--brand) 78%, white);
    --brand-deep:   color-mix(in srgb, var(--brand) 62%, white);
    /* Reproduces #241804 for our gold, and stays a legible near-black for
       any other firm's accent instead of an off-looking warm brown. */
    --on-brand:     color-mix(in srgb, var(--brand) 12%, #0b0500);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); }

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); border-radius: var(--r-sm); }

/* Gold scrollbar, as on liticus.ai */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ink-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  border-radius: 6px; border: 2px solid var(--ink-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-deep); }

/* The site's recurring corner-bracket motif. */
.corner-brackets { position: relative; }
.corner-brackets::before,
.corner-brackets::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  pointer-events: none; transition: all .45s var(--ease-fluid);
}
.corner-brackets::before { top: -1px; left: -1px;  border-top: 2px solid var(--brand); border-left: 2px solid var(--brand); }
.corner-brackets::after  { top: -1px; right: -1px; border-top: 2px solid var(--brand); border-right: 2px solid var(--brand); }

/* ── header ─── the site's floating pill nav ────────────────────────── */
.top {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  max-width: 1160px; margin: 14px auto 0; padding: 0 26px;
  min-height: 62px;
  background: rgba(10,39,36,.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 12px 34px -20px rgba(0,0,0,.35);
  position: sticky; top: 14px; z-index: 20;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-bar {
  width: 3px; height: 32px; border-radius: 3px; display: block;
  background: var(--brand); box-shadow: 0 0 10px var(--accent-glow);
}
/* Sign-in page: the mark turns horizontal, a short rule above the name. */
.brand-bar-lg { height: 3px; width: 46px; margin: 0 auto 16px; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1rem; letter-spacing: .06em; color: var(--brand); }
.brand-sub {
  font-family: var(--mono); font-size: .56rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--hint); margin-top: 4px;
}

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600;
  letter-spacing: .03em; padding: 8px 15px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
  transition: all .4s var(--ease-fluid);
}
.nav a:hover { color: var(--brand-deep); border-color: var(--border-soft); }
.nav a.on { color: var(--brand-deep); border-color: var(--brand); background: var(--accent-wash); }

.who { margin-left: auto; display: flex; align-items: center; gap: 13px; font-size: .8rem; }
.who-email { color: var(--muted); }
.signout { color: var(--muted); text-decoration: none; font-size: .8rem; transition: color .3s; }
.signout:hover { color: var(--brand-deep); }
.signout-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; cursor: pointer; }

.role-chip {
  font-family: var(--mono); font-size: .55rem; letter-spacing: .13em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-weight: 600;
  background: rgba(255,255,255,.04); color: var(--muted); border: 1px solid var(--line-soft);
}
.role-platform_admin { color: var(--brand-deep); border-color: var(--brand); background: var(--accent-wash); }
.role-firm_admin     { color: var(--olive); border-color: rgba(163,189,133,.45); background: rgba(163,189,133,.10); }

/* ── layout ─────────────────────────────────────────────────────────── */
.wrap { max-width: 1160px; margin: 0 auto; padding: 34px 26px 76px; }
.wrap-narrow { max-width: 460px; padding-top: calc(7vh - 25px); }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
}
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 5px; line-height: 1.2; }
h2 {
  font-size: 1rem; font-weight: 700; letter-spacing: .01em; margin: 0 0 5px;
  display: flex; align-items: center; gap: 10px;
}
.card > h2:first-of-type::before {
  content: ''; width: 2px; height: 15px; border-radius: 2px; background: var(--brand);
  box-shadow: 0 0 10px var(--accent-glow); flex: none;
}
.sub { color: var(--muted); font-size: .87rem; margin: 0; }
.card-sub { color: var(--muted); font-size: .82rem; margin: 0 0 16px; }
.back {
  color: var(--muted); font-size: .79rem; text-decoration: none;
  display: inline-block; margin-bottom: 7px; transition: color .3s;
}
.back:hover { color: var(--brand-deep); }

.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card::before, .card::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  pointer-events: none; transition: all .45s var(--ease-fluid);
}
.card::before { top: -1px; left: -1px;  border-top: 2px solid var(--brand); border-left: 2px solid var(--brand); }
.card::after  { top: -1px; right: -1px; border-top: 2px solid var(--brand); border-right: 2px solid var(--brand); }
.card:hover::before, .card:hover::after { width: 26px; height: 26px; border-color: var(--brand-light); }
.pop { margin-top: 11px; box-shadow: var(--shadow-soft); }

/* ── forms ──────────────────────────────────────────────────────────── */
label {
  display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--hint); margin: 17px 0 7px; font-weight: 600;
}
label:first-of-type { margin-top: 0; }
.opt { text-transform: none; letter-spacing: 0; opacity: .8; font-size: .95em; font-weight: 400; }

input[type=text], input[type=email], input[type=number], input[type=file], input:not([type]), select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 11px 13px; font-size: .9rem; font-family: inherit;
  transition: border-color .4s var(--ease-fluid), box-shadow .3s;
}
input:hover, select:hover { border-color: var(--border); }
input:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-glow);
}
/* Pinned, so lightening --text/--muted never brightens an empty field's hint
   ("Filter by email", "you@yourfirm.com") into looking like real content. */
::placeholder { color: var(--hint); opacity: 1; }

input[type=color] {
  width: 56px; height: 38px; padding: 3px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--r-sm); cursor: pointer;
}
input[type=checkbox] { accent-color: var(--brand); }
.color-row { display: flex; align-items: center; gap: 11px; }
.color-row code { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.check {
  display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0;
  font-family: var(--sans); font-size: .85rem; color: var(--text); margin: 0; font-weight: 500;
}
.check input { width: auto; }

/* Pill buttons, matched to the site's filled / outline pair. */
.btn {
  display: inline-block; background: transparent;
  border: 1px solid var(--brand); color: var(--brand-deep);
  padding: 10px 22px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; font-family: inherit; letter-spacing: .08em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all .4s var(--ease-fluid);
}
.btn:hover { background: var(--accent-tint); color: var(--brand-light); }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: var(--on-brand);
  box-shadow: 0 14px 30px -12px var(--accent-glow);
}
.btn-primary:hover { background: var(--brand-light); color: var(--on-brand); box-shadow: 0 18px 40px -14px var(--accent-glow); }
.btn-block { width: 100%; margin-top: 18px; text-align: center; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.link {
  background: none; border: none; color: var(--brand-deep); cursor: pointer;
  font-size: .81rem; font-family: inherit; font-weight: 600; text-decoration: none; padding: 0;
  transition: color .3s;
}
.link:hover { color: var(--brand-light); text-decoration: underline; }
.link-danger {
  background: none; border: none; color: var(--hint); cursor: pointer;
  font-size: .81rem; font-family: inherit; padding: 0; transition: color .3s;
}
.link-danger:hover { color: var(--danger); }
.inline { display: inline; }

.filter { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filter input, .filter select { width: auto; min-width: 190px; }
.filter input[type=checkbox] { min-width: 0; }
.filter label { margin: 0; }

details.new-matter > summary { list-style: none; cursor: pointer; }
details.new-matter > summary::-webkit-details-marker { display: none; }
details.new-matter[open] > summary { opacity: .55; }

/* ── flash ──── the site's left-accent rule ─────────────────────────── */
.flash {
  padding: 12px 18px; border-radius: 0 var(--r-md) var(--r-md) 0; margin-bottom: 20px;
  font-size: .87rem; font-weight: 500; border-left: 2px solid;
}
.flash-ok   { background: rgba(52,211,153,.08);  border-color: var(--ok);     color: #a7f3d0; }
.flash-err  { background: rgba(239,68,68,.08);   border-color: var(--danger); color: #fecaca; }
.flash-warn { background: var(--accent-wash);    border-color: var(--brand);  color: #f4e0b0; }
.flash-info { background: rgba(255,255,255,.04); border-color: var(--muted);  color: inherit; }

/* ── lists ──────────────────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.row {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--brand);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 15px 19px;
  box-shadow: 0 6px 16px -12px rgba(0,0,0,.3);
  transition: all .4s var(--ease-fluid);
}
.row:hover { border-color: var(--border); border-left-color: var(--brand-light); box-shadow: var(--shadow-card); }
.row-closed { opacity: .48; border-left-color: var(--hint); }
.row-closed:hover { opacity: .7; border-left-color: var(--hint); }
.row-main { flex: 1; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row-title { font-weight: 700; font-size: .98rem; letter-spacing: -.005em; display: flex; align-items: center; gap: 9px; }
.row-meta {
  display: flex; gap: 15px; flex-wrap: wrap; font-size: .77rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.row-actions { display: flex; gap: 15px; }
.ref { font-family: var(--mono); font-size: .71rem; color: var(--brand); }
.swatch {
  width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 10px -2px currentColor;
}

.status {
  font-family: var(--mono); font-size: .57rem; letter-spacing: .13em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap; font-weight: 700;
}
.status-open   { color: var(--ok);   background: rgba(52,211,153,.09); border: 1px solid rgba(52,211,153,.35); }
.status-closed { color: var(--hint); background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); }

/* ── files ──────────────────────────────────────────────────────────── */
.upload { margin-bottom: 20px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1.5px dashed var(--border-soft); border-radius: var(--r-md);
  padding: 26px 18px; cursor: pointer; text-align: center;
  background: rgba(0,0,0,.16); margin: 0;
  transition: all .4s var(--ease-fluid);
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--accent-wash); }
.dz-title { font-weight: 700; font-size: .94rem; color: var(--text); text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.dz-sub { font-size: .77rem; color: var(--muted); }
.dz-picked { font-family: var(--mono); font-size: .71rem; color: var(--brand); margin-top: 7px; }

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.files li {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border-left: 2px solid var(--border-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 11px 14px;
  transition: all .4s var(--ease-fluid);
}
.files li:hover { border-left-color: var(--brand); }
.file-main { flex: 1; text-decoration: none; color: inherit; display: flex; flex-direction: column; min-width: 0; }
.file-name { font-size: .89rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-main:hover .file-name { color: var(--brand-deep); }
.file-meta { font-size: .71rem; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ── chips / access ─────────────────────────────────────────────────── */
.chips { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 5px 7px 5px 14px; font-size: .79rem;
  transition: border-color .4s var(--ease-fluid);
}
.chip:hover { border-color: var(--brand); }
.chip-x {
  background: none; border: none; color: var(--hint); cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 0 5px; transition: color .3s;
}
.chip-x:hover { color: var(--danger); }
.add-access { display: flex; gap: 9px; }
.add-access select { flex: 1; }

/* ── tables ─────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tbl th {
  text-align: left; font-family: var(--mono); font-size: .57rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--brand); font-weight: 700;
  padding: 0 15px 10px 0; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 11px 15px 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tbody tr { transition: background .3s; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.025); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .right { text-align: right; }
.tbl .off { opacity: .42; }
.mono { font-family: var(--mono); font-size: .76rem; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.dim { color: var(--muted); }
.detail { color: var(--muted); max-width: 430px; }
.p-email { display: block; font-weight: 600; }
.p-name { display: block; font-size: .75rem; color: var(--muted); }

/* A download is the entry that matters most — give it the site's left-accent
   rule, not just a tint, so the eye finds it while scrolling. */
.log .is-dl td { background: var(--accent-wash); }
.log .is-dl td:first-child { box-shadow: inset 2px 0 0 var(--brand); padding-left: 11px; }
.log .is-dl:hover td { background: var(--accent-tint); }

.act {
  display: inline-block;
  font-family: var(--mono); font-size: .59rem; letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; font-weight: 700;
  background: rgba(255,255,255,.04); color: var(--muted); border: 1px solid var(--line-soft);
}
.act-dl   { background: var(--accent-wash); color: var(--brand-deep); border-color: var(--brand); }
.act-auth { background: rgba(163,189,133,.10); color: var(--olive); border-color: rgba(163,189,133,.4); }

/* ── integrity banner ───────────────────────────────────────────────── */
.integrity {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  border-radius: 0 var(--r-lg) var(--r-lg) 0; padding: 17px 21px; margin-bottom: 20px;
  border: 1px solid var(--line-soft); border-left: 2px solid;
  box-shadow: 0 6px 16px -12px rgba(0,0,0,.3);
}
.integrity.good { background: rgba(52,211,153,.06); border-left-color: var(--ok); }
.integrity.bad  { background: rgba(239,68,68,.07);  border-left-color: var(--danger); border-color: rgba(239,68,68,.35); }
.integrity-state { font-weight: 800; font-size: .93rem; white-space: nowrap; display: flex; align-items: center; gap: 9px; }
.integrity.good .integrity-state { color: var(--ok); }
.integrity.bad  .integrity-state { color: var(--danger); }
.integrity-state::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 10px currentColor; flex: none;
}
.integrity-detail { font-size: .79rem; color: var(--muted); flex: 1; min-width: 230px; }
.integrity-head {
  display: flex; flex-direction: column; gap: 3px;
  font-family: var(--mono); font-size: .55rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--hint);
}
.integrity-head code { font-family: var(--mono); font-size: .68rem; color: var(--text); letter-spacing: 0; text-transform: none; }

/* ── seats ──────────────────────────────────────────────────────────── */
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 18px; }
.seat {
  background: var(--surface);
  border-left: 2px solid var(--brand);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 15px 17px;
}
.seat-num { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.seat-num span { font-size: .84rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.seat-label {
  font-family: var(--mono); font-size: .57rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--hint); margin-bottom: 9px;
}
.meter { height: 5px; background: rgba(0,0,0,.35); border-radius: 3px; overflow: hidden; margin-top: 9px; }
.meter span {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  background-color: var(--brand);
}
.logo-preview { background: #fff; border-radius: var(--r-sm); padding: 11px; display: inline-block; margin-bottom: 9px; }
.logo-preview img { max-height: 40px; display: block; }

/* ── sign-in ────────────────────────────────────────────────────────── */
.signin-brand { text-align: center; margin-bottom: 24px; }
.signin-logo { max-height: 54px; margin-bottom: 15px; }
.signin-brand h1 { font-size: 1.4rem; letter-spacing: .06em; color: var(--brand); margin-bottom: 3px; }
.signin-sub { font-family: var(--mono); font-size: .59rem; letter-spacing: .22em; text-transform: uppercase; color: var(--hint); margin: 0; }
.signin-note { text-align: center; font-size: .75rem; color: var(--muted); margin-top: 22px; line-height: 1.7; }
/* The scales, sized to stand about as tall as the sign-in card below them.
   Change the height here if you want it larger or smaller. */
.signin-mark { display: block; width: auto; height: 105px; margin: 0 auto 24px; }

/* ── Sectigo seal ───────────────────────────────────────────────────── */
/* Sign-in page only — the moment someone decides whether to trust this site
   with their email. Once is enough; a second copy in the footer read as
   tacky. The 280px source asset stays crisp at this size. */
.trust-seal {
  display: block; width: 168px; margin: 28px auto 0;
  border-radius: 14px; transition: transform .4s var(--ease-fluid), filter .4s;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.35));
}
.trust-seal:hover { transform: translateY(-2px); filter: drop-shadow(0 16px 30px rgba(0,0,0,.45)); }
.trust-seal img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* ── misc ───────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 46px 26px; color: var(--muted); }
.empty-title { font-weight: 700; color: var(--text); margin: 0 0 5px; font-size: 1rem; }
.empty-inline { color: var(--muted); font-size: .84rem; padding: 11px 0; margin: 0; }
.fine { font-size: .73rem; color: var(--muted); line-height: 1.7; margin: 14px 0 0; }
.more { display: inline-block; margin-top: 12px; font-size: .79rem; text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.more:hover { text-decoration: underline; }

.log-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.log-mini li { display: flex; align-items: center; gap: 10px; font-size: .77rem; flex-wrap: wrap; }
.log-act {
  font-family: var(--mono); font-size: .56rem; letter-spacing: .09em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; font-weight: 700;
  background: rgba(255,255,255,.04); color: var(--muted);
}
.log-dl { background: var(--accent-wash); color: var(--brand-deep); }
.log-who { color: var(--text); }
.log-when { color: var(--hint); margin-left: auto; font-size: .71rem; font-variant-numeric: tabular-nums; }

/* ── footer ─────────────────────────────────────────────────────────── */
.foot {
  max-width: 1160px; margin: 0 auto; padding: 30px 26px 40px;
  border-top: 1px solid var(--line-soft); font-size: .72rem; color: var(--hint);
}
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 30px; margin-bottom: 22px; }
.foot-col { display: flex; flex-direction: column; gap: 5px; line-height: 1.5; }
.foot-col a { color: var(--muted); text-decoration: none; transition: color .3s; }
.foot-col a:hover { color: var(--brand-deep); }
.foot-label {
  font-family: var(--mono); font-size: .55rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 4px; font-weight: 700;
}
.foot-name { font-weight: 800; font-size: .95rem; letter-spacing: .06em; color: var(--brand); }
.foot-name-sub { font-weight: 600; color: var(--text); letter-spacing: .02em; }
.foot-div { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); margin-top: 2px; }
/* The Alpha Source mark is navy on transparent; the white chip is what
   keeps it legible here, mirroring liticus.ai's footer treatment. */
.foot-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 5px; padding: 4px 7px; }
.foot-chip img { height: 18px; width: auto; display: block; }
.foot-legal {
  padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-size: .68rem; color: var(--hint); text-align: center; line-height: 1.6;
}
.foot-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 600; letter-spacing: .02em; transition: color .3s; }
.foot-links a:hover { color: var(--brand-deep); }
.foot-links span { color: var(--border); }

/* ── legal documents ────────────────────────────────────────────────── */
.wrap-legal { max-width: 760px; padding-top: 30px; }
.legal-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 26px; }
.legal-nav a {
  color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 600;
  letter-spacing: .03em; padding: 7px 14px; border-radius: 999px;
  border: 1px solid transparent; transition: all .4s var(--ease-fluid);
}
.legal-nav a:hover { color: var(--brand-deep); border-color: var(--border-soft); }
.legal-nav a.on { color: var(--brand-deep); border-color: var(--brand); background: var(--accent-wash); }
.legal { font-size: .95rem; line-height: 1.7; }
.legal h1 { font-size: 1.9rem; margin: 0 0 14px; }
.legal h2 { font-size: 1.02rem; margin: 30px 0 8px; padding-left: 12px; border-left: 2px solid var(--brand); }
.legal p, .legal li { color: var(--muted); }
.legal p strong, .legal li strong { color: var(--text); font-weight: 600; }
.legal ul { padding-left: 22px; margin: 8px 0 14px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--brand-deep); }
.legal-meta { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hint); margin: 0 0 6px; }
.legal-lede { font-size: 1.05rem; color: var(--text); line-height: 1.6; margin: 0 0 8px; }
.legal-tbl { margin: 12px 0 18px; }
.legal-tbl td { color: var(--muted); }
.legal-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: .72rem; color: var(--hint); line-height: 1.7; }

@media (max-width: 860px) {
  .cols, .seats, .row2 { grid-template-columns: 1fr; }
  .top {
    gap: 12px; padding: 13px 18px; border-radius: 20px;
    margin: 10px 14px 0; top: 10px; max-width: none;
  }
  .who { width: 100%; order: 3; }
  .nav { order: 2; margin-left: 0; overflow-x: auto; }
  .wrap { padding: 26px 17px 60px; }
  h1 { font-size: 1.45rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── Case analysis card ─────────────────────────────────────────────── */
.card-analysis .analysis-form { margin-top: 14px; }
.card-analysis .analysis-form .check { align-items: flex-start; font-size: .8rem; color: var(--muted); line-height: 1.5; }
.card-analysis .analysis-form .check input { margin-top: 3px; }
.card-analysis .inline + .inline { margin-left: 14px; }
.warn-inline { color: #f4e0b0; }
.runs { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.run { display: flex; align-items: baseline; gap: 10px; font-size: .77rem; flex-wrap: wrap; padding: 8px 10px; border-left: 2px solid var(--line-soft); background: rgba(255,255,255,.02); }
.run-id { font-family: var(--mono, ui-monospace, monospace); color: var(--hint); }
.run-status { font-family: var(--mono, ui-monospace, monospace); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--hint); }
.run-done   { border-left-color: var(--ok); }
.run-done   .run-status { color: var(--ok); border-color: rgba(52,211,153,.35); }
.run-running{ border-left-color: var(--brand); }
.run-running .run-status { color: var(--brand-light); border-color: var(--brand); }
.run-failed { border-left-color: var(--danger); }
.run-failed .run-status { color: #fecaca; border-color: rgba(239,68,68,.4); }
.run-meta { color: var(--muted); }
.tag-analysis { display: inline-block; margin-left: 8px; font-family: var(--mono, ui-monospace, monospace); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-light); border: 1px solid var(--brand); border-radius: 999px; padding: 1px 7px; vertical-align: middle; }


/* ── Work product, release state, "new" markers ────────────────────── */
.deliver-alert { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; padding: 12px 16px; border-radius: 12px;
  background: var(--accent-wash); border: 1px solid var(--brand); color: #f4e0b0; font-size: .85rem; }
.deliver-alert a { color: var(--brand-light); }
.deliver-alert-review { background: rgba(255,255,255,.03); border-color: var(--line-soft); color: var(--muted); }
.deliver-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--accent-tint); flex-shrink: 0; align-self: center; }
.deliver-alert-review .deliver-dot { background: var(--hint); box-shadow: none; }
.pill-new { display: inline-block; font-family: var(--mono, ui-monospace, monospace); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-brand, #241804); background: var(--brand); border-radius: 999px; padding: 2px 8px; margin-right: 6px; vertical-align: middle; }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand, #241804);
  font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
.files-work li.file-new { border-left-color: var(--brand); }
.files-work li.file-unreleased .file-name { opacity: .8; }
.unreleased-label { font-family: var(--mono, ui-monospace, monospace); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hint); }
.btn-small { padding: 5px 12px; font-size: .7rem; }
.card-work .inline + .inline { margin-left: 10px; }
.section-pick { border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 14px 6px; margin: 0 0 12px; }
.section-pick legend { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hint); padding: 0 6px; }
.section-pick .check { display: flex; margin: 4px 0 8px; }
.section-pick em { font-style: normal; color: var(--hint); font-size: .78rem; }


/* ── Billing gate ───────────────────────────────────────────────────── */
.billing-banner { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.billing-banner a { color: var(--brand-light); font-weight: 700; margin-left: auto; }
.billing-card p { color: var(--text); line-height: 1.7; font-size: .92rem; }
.billing-card .btn { margin-top: 8px; }


/* ── Search ─────────────────────────────────────────────────────────── */
.topsearch { margin-left: auto; margin-right: 14px; }
.topsearch input { width: 220px; padding: 8px 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); border-radius: 999px; color: var(--text); font: inherit; font-size: .82rem; }
.topsearch input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.filter-log { align-items: center; }
.filter-q { min-width: 280px !important; flex: 1 1 280px; }
.filter .range { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--hint); text-transform: none; letter-spacing: 0; }
.filter .range input { min-width: 0; width: 150px; }
.file-filter { width: 100%; margin: 4px 0 6px; padding: 9px 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); border-radius: 10px; color: var(--text); font: inherit; font-size: .85rem; }
.file-filter:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.file-filter-note { margin: 0 0 8px; }
@media (max-width: 900px) { .topsearch { margin-left: 0; width: 100%; } .topsearch input { width: 100%; } }


/* matter page search bar (under the matter name, above Case files) */
.matter-search { margin: -4px 0 20px; }
.matter-search .file-filter-note { flex-basis: 100%; margin: 0; }
.topsearch { display: none; }

/* matter search: short bar, not full width */
.matter-search .filter-q { flex: 0 0 auto !important; width: 240px; min-width: 0 !important; }


/* ── Intake (claim page) + rename ───────────────────────────────────── */
.eyebrow-vault { display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-deep); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
.intake .steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.intake .steps li { margin: 6px 0; }
.intake .steps strong { color: var(--text); }
.card-demo { border-color: var(--brand); }
.rename-btn { background: none; border: 1px solid var(--line-soft); color: var(--hint); border-radius: 8px; font-size: .9rem; padding: 2px 8px; margin-left: 10px; cursor: pointer; vertical-align: middle; }
.rename-btn:hover { color: var(--brand-light); border-color: var(--brand); }
.rename-form { display: flex; gap: 8px; align-items: center; margin: 6px 0 4px; flex-wrap: wrap; }
.rename-form input[name=name] { width: 320px; max-width: 100%; }
.btn-small { padding: 6px 12px; font-size: .72rem; }

/* matter search: white field, same text colour; placeholder legible on white */
.matter-search .filter-q { background: #ffffff; color: var(--bg-deep); border-color: var(--border); }
.matter-search .filter-q::placeholder { color: var(--hint); opacity: 1; }


/* ── Capacity meter ─────────────────────────────────────────────────── */
.usage { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255,255,255,.02); }
.usage-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: .82rem; }
.usage-label { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hint); }
.usage-nums { color: var(--text); font-weight: 600; }
.usage-link { margin-left: auto; color: var(--brand-light); text-decoration: none; font-weight: 700; font-size: .8rem; }
.usage .meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); margin-top: 8px; overflow: hidden; }
.usage .meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.usage-warn { border-color: var(--brand); background: var(--accent-wash); }
.usage-warn .meter span { background: #f4b942; }


/* ── Dashboard ──────────────────────────────────────────────────────── */
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-alerts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-alerts li { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-soft); font-size: .88rem; }
.dash-alerts li a { white-space: nowrap; color: var(--brand-light); font-weight: 700; text-decoration: none; }
.dash-alerts .alert-err  { border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.07); color: #fecaca; }
.dash-alerts .alert-warn { border-color: var(--brand); background: var(--accent-wash); color: #f4e0b0; }
.dash-alerts .alert-info { border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.06); color: #a7f3d0; }
.dash-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 20px; margin-top: 20px; align-items: start; }
.dash-rail, .dash-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dash-card .big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); margin: 4px 0 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dash-card .big .of { font-size: .85rem; font-weight: 600; color: var(--muted); }
.dash-card .meter { height: 7px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.dash-card .meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.dash-card .more { display: inline-block; margin-top: 12px; font-size: .82rem; font-weight: 700; color: var(--brand-light); text-decoration: none; }
.dash-main .card { width: 100%; }
.list.compact .row { padding: 10px 12px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } .dash-rail { order: 2; } }

/* ── Dashboard: status band, gauge, KPI tiles ───────────────────────── */
.dash-band { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 30px 32px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--panel) 70%); border: 1px solid var(--border); border-radius: 20px; position: relative; overflow: hidden; }
.dash-band::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(217,164,65,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(217,164,65,.045) 1px, transparent 1px); background-size: 40px 40px; }
.dash-band::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--brand), transparent); }
.dash-band > * { position: relative; }
.dash-kicker { font-family: var(--mono); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--brand-deep); margin-bottom: 10px; }
.dash-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; color: var(--text); }
.dash-sub { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }
.dash-sub strong { color: var(--text); }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.dash-gauge { position: relative; flex-shrink: 0; text-align: center; width: 150px; }
.dash-gauge svg { display: block; margin: 0 auto; }
.gauge-arc { transition: stroke-dashoffset 1.2s cubic-bezier(.32,.72,0,1); animation: gauge-in 1.2s cubic-bezier(.32,.72,0,1) both; }
@keyframes gauge-in { from { stroke-dashoffset: 339.3; } }
.gauge-label { position: absolute; left: 0; right: 0; top: 46px; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.gauge-num { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.gauge-num small { font-size: .9rem; font-weight: 700; color: var(--muted); margin-left: 1px; }
.gauge-cap { font-family: var(--mono); font-size: .58rem; letter-spacing: .1em; color: var(--hint); margin-top: 6px; }
.gauge-link { display: inline-block; margin-top: 6px; font-size: .74rem; font-weight: 700; color: var(--brand-light); text-decoration: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; text-decoration: none; color: inherit;
  transition: border-color .3s var(--ease-fluid), transform .3s var(--ease-fluid); animation: kpi-up .6s cubic-bezier(.32,.72,0,1) both; }
.kpi:nth-child(2) { animation-delay: .06s } .kpi:nth-child(3) { animation-delay: .12s } .kpi:nth-child(4) { animation-delay: .18s }
@keyframes kpi-up { from { opacity: 0; transform: translateY(8px); } }
.kpi:hover { border-color: var(--brand); transform: translateY(-2px); }
.kpi-num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1.1; }
.kpi-label { font-size: .84rem; font-weight: 600; color: var(--text); }
.kpi-sub { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hint); margin-top: 4px; }
.kpi-live { border-color: var(--brand); background: var(--accent-wash); }
.kpi-live .kpi-num { color: var(--brand-deep); }

.dash-clear { border-color: rgba(52,211,153,.3); }
.dash-clear h2::before { border-color: var(--ok) !important; }
.card .big { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); margin: 4px 0 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card .more { display: inline-block; margin-top: 12px; font-size: .82rem; font-weight: 700; color: var(--brand-light); text-decoration: none; }
@media (max-width: 1000px) { .kpis { grid-template-columns: 1fr 1fr; } .dash-band { flex-direction: column; align-items: flex-start; } }
@media (max-width: 640px)  { .kpis { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gauge-arc, .kpi { animation: none; transition: none; } }

/* ── Account console (LITICUS staff) ────────────────────────────────── */
.crumb { font-size: .72rem; letter-spacing: .04em; color: var(--hint); margin-bottom: 6px; }
.crumb a { color: var(--brand-light); text-decoration: none; }
.crumb span { margin: 0 6px; opacity: .5; }
.head-actions { display: flex; gap: 8px; align-items: center; }

.acct-form { display: flex; flex-direction: column; gap: 12px; }
.acct-form label { display: flex; flex-direction: column; gap: 6px; font-size: .74rem; font-weight: 700;
  letter-spacing: .04em; color: var(--muted); }
.acct-form input, .acct-select { width: 100%; padding: 10px 12px; background: var(--bg-deep);
  border: 1px solid var(--border); border-radius: 9px; color: var(--text); font: inherit; font-weight: 400; }
.acct-form input:focus, .acct-select:focus { outline: none; border-color: var(--brand); }
.acct-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-note { font-size: .74rem; color: var(--hint); line-height: 1.6; margin: 2px 0 4px; }

.acct-users td { vertical-align: middle; }
.acct-role { padding: 6px 8px; font-size: .78rem; width: auto; min-width: 128px; }
.acct-actions { white-space: nowrap; }
.acct-actions form { display: inline-block; margin-left: 6px; }
.row-off { opacity: .55; }
.pill-warn { display: inline-block; font-family: var(--mono, ui-monospace, monospace); font-size: .58rem;
  letter-spacing: .12em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--brand); color: var(--brand-deep); background: var(--accent-wash); }
.btn-danger { border-color: rgba(239,68,68,.5) !important; color: #fecaca !important; }
.btn-danger:hover { background: rgba(239,68,68,.12) !important; }

@media (max-width: 640px) {
  .acct-pair { grid-template-columns: 1fr; }
  .acct-actions { white-space: normal; }
  .acct-actions form { margin: 4px 6px 0 0; }
}

/* ── Plan page ──────────────────────────────────────────────────────── */
.bill-note { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-soft);
  font-size: .88rem; margin-bottom: 18px; line-height: 1.6; }
.bill-note a { color: var(--brand-light); font-weight: 700; text-decoration: none; white-space: nowrap; }
.bill-warn { border-color: var(--brand); background: var(--accent-wash); color: #f4e0b0; }
.bill-info { border-color: rgba(52,211,153,.32); background: rgba(52,211,153,.06); color: #a7f3d0; }

.bill-usage { margin-bottom: 20px; }
.bill-usage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.bill-usage-head h2 { margin-bottom: 4px; }
.bill-usage-pct { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--text); }
.bill-usage-pct.hot { color: var(--brand-deep); }
.bill-usage .meter { height: 8px; border-radius: 999px; background: rgba(255,255,255,.06); margin-top: 14px; overflow: hidden; }
.bill-usage .meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 26px 24px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); }
.plan-card h3 { margin: 0 0 10px; font-size: 1.05rem; letter-spacing: -.01em; }
.plan-card.is-top { border-color: var(--brand);
  background: linear-gradient(160deg, var(--accent-wash), transparent 58%), var(--panel); }
.plan-card.is-current { border-color: rgba(52,211,153,.45); }
.plan-flag { position: absolute; top: -10px; left: 24px; font-family: var(--mono, ui-monospace, monospace);
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--ok, #34d399); color: #06281d; font-weight: 700; }
.plan-cost { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.plan-amt { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1; }
.plan-per { font-size: .78rem; color: var(--muted); }
.plan-lines { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.plan-lines li { position: relative; padding: 7px 0 7px 18px; font-size: .86rem; color: var(--text);
  border-top: 1px solid var(--line-soft); }
.plan-lines li:first-child { border-top: 0; }
.plan-lines li::before { content: ''; position: absolute; left: 0; top: 16px; width: 8px; height: 2px;
  background: var(--brand); border-radius: 2px; }
.btn-quiet { opacity: .55; pointer-events: none; }
.bill-fine { margin-top: 22px; font-size: .78rem; color: var(--hint); line-height: 1.7; max-width: 72ch; }

@media (max-width: 900px) { .plan-cards { grid-template-columns: 1fr; } }

/* ── slim footer: legal links only ──────────────────────────────────── */
.foot-slim { padding: 18px 26px 26px; text-align: center; }
.foot-slim .foot-links { margin-bottom: 4px; }
.foot-copy { margin: 0; font-size: .66rem; color: var(--hint); }

/* ── matter lifecycle ───────────────────────────────────────────────── */
.status-archived { color: var(--muted); background: rgba(255,255,255,.03); border: 1px dashed var(--line-soft); }
.matter-keep .btn-block { margin-top: 4px; }
.keep-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* four plans side by side; two by two on tablets; stacked on phones */
.plan-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .plan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .plan-cards { grid-template-columns: 1fr; } }

/* Administrator's own 2FA code beside a role change / 2FA reset */
.acct-code { width: 6.5em; margin-left: 6px; padding: 4px 6px; font: inherit; font-size: .8rem; }
