/* ===========================================================================
   Ragulika IP — Trademark Docket
   ---------------------------------------------------------------------------
   Design intent: a calm command centre. The complexity is in the engine; the
   surface should read like a well-set page. Type does the work, colour is
   reserved for meaning (a deadline's severity, a rule's authority), and
   motion is used only to acknowledge an action.

   Colour is inherited from the Ragulika patent docket so the two products feel
   like one firm: navy #0A1E3C, a warm cream accent, an off-white ground.
   =========================================================================== */

:root {
  /* ground */
  --bg:            #F7F8FA;
  --surface:       #FFFFFF;
  --surface-sunk:  #F1F3F7;
  --line:          #E4E7EE;
  --line-strong:   #CFD5E1;

  /* ink */
  --ink:           #0A1E3C;
  --ink-2:         #3D4C63;
  --ink-3:         #6B7889;
  --ink-4:         #96A0AE;

  /* brand */
  --navy:          #0A1E3C;
  --navy-soft:     #16305A;
  --cream:         #F5E6C8;
  --cream-deep:    #E8D2A0;
  --gold:          #7A5A15;   /* darkened: 4.7:1 on the cream badge ground */
  --gold-bright:   #B08430;   /* decorative use only, never for text */

  /* meaning — used for deadline severity and nothing decorative */
  --critical:      #B3261E;
  --critical-bg:   #FDECEA;
  --high:          #B4610A;
  --high-bg:       #FDF0E3;
  --medium:        #8A6A00;
  --medium-bg:     #FBF4DD;
  --low:           #1F6B4A;
  --low-bg:        #E8F5EE;
  --info:          #1B4F8A;
  --info-bg:       #E9F1FA;

  --radius:        10px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 2px rgba(10,30,60,.06);
  --shadow:        0 2px 8px rgba(10,30,60,.07), 0 1px 2px rgba(10,30,60,.04);
  --shadow-lg:     0 12px 32px rgba(10,30,60,.10);

  --font-display:  'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:     'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:     'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --shell-max:     1380px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; }
h2 { font-size: 1.15rem; line-height: 1.3; }
h3 { font-size: 1rem; }
p  { margin: 0 0 .75rem; }
a  { color: var(--navy); text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

/* numbers, dates, application numbers — tabular so columns line up */
.num, .date, td.num, .app-no {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* ---------------------------------------------------------------- skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------- header */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.masthead-inner {
  max-width: var(--shell-max); margin: 0 auto; padding: 0 1.5rem;
  height: 62px; display: flex; align-items: center; gap: 1.25rem;
}
.brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; flex-shrink: 0; }
/* The emblem sits beside the name, never instead of it, and never squashed:
   height-constrained with width auto so a replacement file of any sensible
   aspect ratio still fits the bar. */
.brand-mark { height: 26px; width: 26px; flex: none; display: block; object-fit: contain; }

.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--navy); }
/* Sentence case, matching the public site and the patent docket. An all-caps
   product name beside a mixed-case firm name reads as two different brands. */
.brand-product {
  font-size: .8rem; color: var(--ink-4); font-weight: 500;
  padding-left: .7rem; border-left: 1px solid var(--line);
}
.nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.nav a {
  padding: .45rem .8rem; border-radius: 7px; text-decoration: none;
  color: var(--ink-2); font-size: .9rem; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: var(--surface-sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--cream); color: var(--navy); font-weight: 600; }
.nav-count {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: .35rem;
  background: var(--critical); color: #fff; border-radius: 9px;
  font-size: .68rem; font-weight: 700; text-align: center; line-height: 18px;
  font-family: var(--font-mono);
}

/* -------------------------------------------------------------------- shell */
.shell { max-width: var(--shell-max); margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }

.page-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 260px; }
.page-sub { color: var(--ink-3); font-size: .9rem; margin: .3rem 0 0; }

/* -------------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 1rem 1.25rem .85rem; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .75rem;
}
.card-head h2 { flex: 1; }
.card-body { padding: 1.25rem; }
.card-foot {
  padding: .75rem 1.25rem; border-top: 1px solid var(--line);
  background: var(--surface-sunk); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: .85rem; color: var(--ink-3);
}

/* --------------------------------------------------------- summary tiles */
.tiles {
  display: grid; gap: .85rem; margin-bottom: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1.05rem; text-decoration: none; color: inherit; display: block;
  transition: border-color .12s ease, transform .12s ease;
}
a.tile:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.tile-label {
  font-size: .73rem; text-transform: uppercase; letter-spacing: .055em;
  color: var(--ink-3); font-weight: 600; margin-bottom: .3rem;
}
.tile-value {
  font-family: var(--font-display); font-size: 1.85rem; font-weight: 700;
  line-height: 1.05; font-variant-numeric: tabular-nums;
}
.tile-note { font-size: .78rem; color: var(--ink-3); margin-top: .2rem; }
.tile.is-critical { border-left: 3px solid var(--critical); }
.tile.is-critical .tile-value { color: var(--critical); }
.tile.is-high     { border-left: 3px solid var(--high); }
.tile.is-high .tile-value { color: var(--high); }

/* ------------------------------------------------------------------ layout */
.split { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
/* Load-bearing. A grid item's min-width defaults to auto, which is its
   min-content width — so one wide table inside a column stretches the whole
   column past the viewport instead of scrolling inside its own wrapper. This
   is what a phone overflow of a couple of hundred pixels always turns out to
   be. */
.split > * { min-width: 0; }
/* A column of cards inside a .split, and the only thing that layout needs. */
.stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }

/* ------------------------------------------------------------ action items */
.action-list { list-style: none; margin: 0; padding: 0; }
.action-item {
  display: flex; gap: .9rem; padding: .95rem 1.25rem;
  border-bottom: 1px solid var(--line); align-items: flex-start;
}
.action-item:last-child { border-bottom: 0; }
.action-item:hover { background: #FCFDFF; }
.action-rail { width: 3px; border-radius: 2px; align-self: stretch; background: var(--line-strong); flex-shrink: 0; }
.action-item.sev-critical .action-rail { background: var(--critical); }
.action-item.sev-high     .action-rail { background: var(--high); }
.action-item.sev-medium   .action-rail { background: var(--medium); }
.action-item.sev-low      .action-rail { background: var(--low); }
.action-main { flex: 1; min-width: 0; }
.action-title { font-weight: 600; font-size: .95rem; margin-bottom: .15rem; }
.action-title a { text-decoration: none; }
.action-title a:hover { text-decoration: underline; }
.action-meta { font-size: .82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.action-meta .sep { color: var(--line-strong); }
.action-when { text-align: right; flex-shrink: 0; min-width: 96px; }
.action-days {
  font-family: var(--font-mono); font-size: 1.02rem; font-weight: 500;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.action-item.sev-critical .action-days { color: var(--critical); font-weight: 600; }
.action-item.sev-high     .action-days { color: var(--high); }
.action-date { font-size: .76rem; color: var(--ink-4); font-family: var(--font-mono); }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .13rem .48rem; border-radius: 5px;
  font-size: .73rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-critical { background: var(--critical-bg); color: var(--critical); border-color: #F3C9C5; }
.badge-high     { background: var(--high-bg);     color: var(--high);     border-color: #F2D9BC; }
.badge-medium   { background: var(--medium-bg);   color: var(--medium);   border-color: #EDE0AE; }
.badge-low      { background: var(--low-bg);      color: var(--low);      border-color: #C3E2D2; }
.badge-info     { background: var(--info-bg);     color: var(--info);     border-color: #C6DCF2; }
.badge-neutral  { background: var(--surface-sunk); color: var(--ink-2);   border-color: var(--line); }

/* The distinction the product is built on: law vs our advice. */
.badge-statutory {
  background: var(--navy); color: #fff; border-color: var(--navy);
  text-transform: uppercase; font-size: .66rem; letter-spacing: .06em;
}
.badge-recommended {
  background: var(--cream); color: var(--gold); border-color: var(--cream-deep);
  text-transform: uppercase; font-size: .66rem; letter-spacing: .06em; font-weight: 700;
}
.badge-practice {
  background: var(--info-bg); color: var(--info); border-color: #C6DCF2;
  text-transform: uppercase; font-size: .66rem; letter-spacing: .06em;
}

/* Authority badges. Deliberately quieter than the statutory/reminder pair —
   that distinction is what a user acts on; this one is what they weigh. */
.badge-authority-court    { background:#EEF3FB; color:#123E6E; border-color:#C6DCF2; }
.badge-authority-act      { background:#F0F2F7; color:#28364C; border-color:#D3DAE6; }
.badge-authority-rules    { background:#F2F4F8; color:#41506A; border-color:#DDE3ED; }
.badge-authority-manual   { background:#F6F5F1; color:#5C5748; border-color:#E4E0D5; }
.badge-authority-internal { background:var(--cream); color:var(--gold); border-color:var(--cream-deep); }

/* ------------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grid { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.grid th {
  text-align: left; padding: .6rem .8rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .055em; color: var(--ink-3);
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
  background: var(--surface);
  /* Sticky is relative to .table-wrap's scrollport, not the page — so top must
     be 0 here. A page-header offset would push the row down over the first
     record instead of sticking. */
  position: sticky; top: 0; z-index: 5;
}
table.grid th a { color: inherit; text-decoration: none; }
table.grid th a:hover { color: var(--ink); }
table.grid td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tbody tr:hover { background: #FCFDFF; }
table.grid td.mark-cell { font-weight: 600; }
table.grid td.mark-cell a { text-decoration: none; }
table.grid td.mark-cell a:hover { text-decoration: underline; }
.mark-sub { font-size: .78rem; color: var(--ink-3); font-weight: 400; }

/* ----------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 1.9rem; margin: 0; list-style: none; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 1.35rem 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -1.9rem; top: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong);
}
.tl-item.is-done .tl-dot  { background: var(--navy); border-color: var(--navy); }
.tl-item.is-now .tl-dot   { background: var(--cream); border-color: var(--gold); box-shadow: 0 0 0 4px var(--cream); }
.tl-item.is-future .tl-dot { background: var(--surface); border-style: dashed; }
.tl-date { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3); }
.tl-title { font-weight: 600; font-size: .95rem; margin: .1rem 0 .2rem; }
.tl-plain { font-size: .87rem; color: var(--ink-2); }
.tl-registry {
  font-size: .8rem; color: var(--ink-3); font-family: var(--font-mono);
  background: var(--surface-sunk); padding: .35rem .55rem; border-radius: 6px;
  margin-top: .45rem; display: inline-block;
}

/* ---------------------------------------------------- derivation disclosure */
.derivation {
  margin-top: .5rem; font-size: .8rem; color: var(--ink-3);
  border-left: 2px solid var(--line); padding-left: .7rem;
}
.derivation summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.derivation summary:hover { color: var(--ink); }
.derivation .calc { font-family: var(--font-mono); font-size: .78rem; margin-top: .4rem; color: var(--ink-2); }
.derivation .src  { margin-top: .3rem; font-style: italic; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  padding: .5rem .95rem; border-radius: 8px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; font-family: var(--font-body);
  font-size: .88rem; font-weight: 600; text-decoration: none; line-height: 1.4;
  transition: background .12s ease;
}
.btn:hover { background: var(--navy-soft); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-sunk); color: var(--ink); }
.btn-sm { padding: .3rem .65rem; font-size: .8rem; }

/* ------------------------------------------------------------------- forms */
.field .req { color: var(--critical); font-weight: 700; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--critical); background: var(--critical-bg); }
.field-error {
  margin-top: .3rem; font-size: .82rem; color: var(--critical); line-height: 1.45;
}
.form-grid {
  display: grid; gap: 0 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions {
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  padding-top: 1rem; margin-top: .5rem; border-top: 1px solid var(--line);
}
.form-actions .spacer { flex: 1; }

/* Flash messages sit at the top of the shell, above the page heading. */
.flash-stack { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.flash {
  padding: .75rem 1rem; border-radius: var(--radius); font-size: .9rem;
  border: 1px solid; display: flex; gap: .6rem; align-items: flex-start;
}
.flash-success { background: var(--low-bg); border-color: #C3E2D2; color: var(--low); }
.flash-error   { background: var(--critical-bg); border-color: #F3C9C5; color: var(--critical); }
.flash-info    { background: var(--info-bg); border-color: #C6DCF2; color: var(--info); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.field .hint { font-size: .8rem; color: var(--ink-3); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=url], input[type=date], input[type=search], input[type=number],
select, textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--line-strong);
  border-radius: 7px; font-family: var(--font-body); font-size: .9rem;
  background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--navy); outline-offset: -1px; border-color: var(--navy);
}
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin-bottom: 0; min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }

/* ------------------------------------------------------------------- misc */
.empty { padding: 2.75rem 1.5rem; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: .35rem; }
.empty p { max-width: 42ch; margin-inline: auto; font-size: .9rem; }

.notice {
  padding: .8rem 1rem; border-radius: var(--radius); font-size: .88rem;
  border: 1px solid; margin-bottom: 1.25rem; display: flex; gap: .6rem; align-items: flex-start;
}
.notice-info    { background: var(--info-bg);    border-color: #C6DCF2; color: #123E6E; }
.notice-warn    { background: var(--medium-bg);  border-color: #EDE0AE; color: #6B5200; }
.notice-danger  { background: var(--critical-bg);border-color: #F3C9C5; color: #8C1D18; }

.footnote {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-3); max-width: 76ch;
}

.risk-reasons { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .85rem; }
.risk-reasons li { padding: .3rem 0; border-bottom: 1px dashed var(--line); display: flex; gap: .5rem; }
.risk-reasons li:last-child { border-bottom: 0; }
.risk-weight { font-family: var(--font-mono); color: var(--ink-3); flex-shrink: 0; }

.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; margin-top: 1.25rem; }
.pagination a, .pagination span {
  padding: .35rem .7rem; border-radius: 7px; text-decoration: none;
  font-size: .85rem; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
}
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.pagination .disabled { opacity: .45; }

/* ---------------------------------------------------------------- mobile nav */
.mobile-nav { display: none; }
@media (max-width: 820px) {
  .nav { display: none; }
  .shell { padding: 1.25rem 1rem 5.5rem; }
  h1 { font-size: 1.4rem; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    flex: 1; text-align: center; padding: .35rem .1rem; text-decoration: none;
    color: var(--ink-3); font-size: .68rem; font-weight: 600;
    display: flex; flex-direction: column; gap: .15rem; align-items: center;
  }
  .mobile-nav a[aria-current="page"] { color: var(--navy); }
  .mobile-nav .ic { font-size: 1.05rem; line-height: 1; }
  table.grid th { position: static; }

  /* An action row stacks on a narrow screen. The countdown moves ABOVE the
     text rather than fighting it for horizontal space — on a phone the first
     thing worth reading is how long there is left. */
  .action-item { flex-wrap: wrap; padding: .85rem 1rem; }
  .action-main { flex: 1 1 100%; min-width: 100%; }
  .action-when {
    flex: 1 1 100%; min-width: 0; order: -1; text-align: left;
    display: flex; align-items: baseline; gap: .55rem; margin-bottom: .35rem;
  }
  .action-when .action-days { font-size: .95rem; }
  .action-rail { position: absolute; left: 0; top: .85rem; bottom: .85rem; width: 3px; }
  .action-item { position: relative; padding-left: 1.15rem; }

  .page-head { gap: .75rem; }
  .page-head .btn { width: auto; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
  .tile-value { font-size: 1.55rem; }
  .card-head { padding: .85rem 1rem .7rem; }
  .card-body { padding: 1rem; }
  .derivation { font-size: .78rem; }
}

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

/* ------------------------------------------------------- form-grid alignment */

/* Hints are different lengths, so without this the inputs in a row sit at four
   different heights and the form looks broken before anyone has typed in it.
   Each field becomes a column and its control is pushed to the bottom, so the
   controls line up however long the explanations run. */
.form-grid .field { display: flex; flex-direction: column; }
.form-grid .field > input,
.form-grid .field > select { margin-top: auto; }

/* Two or three roomy columns instead of five cramped ones, for cards whose
   fields carry long option text. */
.form-grid.wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ────────────────────────────────────────────────────────── header search ── */
.head-search {
  display: flex; align-items: center; gap: .45rem;
  /* A minimum it will not go below: a search box squeezed to nothing by a long
     navigation is worse than no search box, because it is still tabbable and
     still focusable and simply looks broken. */
  flex: 1 1 14rem; min-width: 11rem; max-width: 24rem;
  margin-left: 1.25rem; padding: 0 .7rem; height: 36px;
  background: var(--surface-sunk); border: 1px solid transparent; border-radius: 9px;
  color: var(--ink-4); transition: border-color .15s, background .15s;
}
.head-search:focus-within { background: var(--surface); border-color: var(--navy); color: var(--ink-3); }
.head-search svg { flex: none; }
.head-search input {
  border: 0; background: none; padding: 0; width: 100%; min-width: 0;
  font-family: var(--font-body); font-size: .88rem; color: var(--ink);
}
.head-search input:focus { outline: none; }
.head-search input::-webkit-search-cancel-button { display: none; }
@media (max-width: 1180px) { .head-search { flex-basis: 12rem; margin-left: .75rem; } }
@media (max-width: 900px)  { .head-search { display: none; } }

kbd {
  font-family: var(--font-mono); font-size: .78em; padding: .1em .4em;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
  background: var(--surface); color: var(--ink-2);
}

/* ─────────────────────────────────────────────────────────── usage meters ── */
.meter { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.meter:last-child { border-bottom: 0; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: .5rem; font-size: .93rem; }
.meter-head .mark-sub { display: block; margin-top: .1rem; }
.meter-bar { height: 7px; border-radius: 4px; background: var(--surface-sunk); overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--navy); border-radius: 4px; }
.meter-bar i.is-over { background: var(--high); }

/* ────────────────────────────────────────────────────── notifications ── */
.bell { position: relative; padding: 7px 9px; border-radius: 8px; line-height: 0;
  color: var(--ink-3); display: inline-flex; align-items: center; }
.bell:hover { background: var(--surface-sunk); color: var(--ink); }
.bell.has-unread { color: var(--critical); }
.bell-count {
  position: absolute; top: -1px; right: -2px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 100px; background: var(--critical); color: #fff;
  font-size: .64rem; font-weight: 700; line-height: 16px; text-align: center;
  font-family: var(--font-body);
}

.notif {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .95rem 1.25rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-sunk); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent;
  margin-top: .45rem; flex: none; }
.notif.is-unread .notif-dot { background: var(--critical); }
.notif.is-unread .notif-title { font-weight: 650; }
.notif-main { display: block; min-width: 0; }
.notif-title { display: block; font-size: .95rem; line-height: 1.4; }
.notif-body { display: block; font-size: .86rem; color: var(--ink-3);
  margin-top: .25rem; line-height: 1.55; }
.notif-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  font-size: .78rem; color: var(--ink-4); margin-top: .45rem; }

/* A checkbox and its explanation, laid out so the explanation is readable
   rather than crammed onto the end of a label. */
.switch-row {
  display: flex; gap: .8rem; align-items: flex-start; margin: 0 0 1.4rem;
  font-weight: 400; cursor: pointer;
}
.switch-row input[type=checkbox] { width: auto; margin-top: .3rem; flex: none;
  width: 17px; height: 17px; }
.switch-row strong { display: block; font-weight: 600; font-size: .95rem; }
.switch-row .hint { display: block; margin-top: .3rem; max-width: 62ch; }

/* ------------------------------------------------- event form and timeline */

/* The rule-hint panel holds a heading, a list and a line of prose, so it stacks
   rather than sitting in the row layout the flash notices use. */
.notice-block { display: block; }
.notice-block ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.notice-block li { margin-bottom: .15rem; }

/* A field the selected event's rule actually runs from. Marked, not required:
   the date may genuinely be unknown, and the form says what the silence costs
   rather than refusing to save. */
.field.is-wanted > label::after {
  content: " — this one drives the deadline";
  font-weight: 500; color: var(--ink-3); font-size: .78rem;
}
.field.is-wanted input { border-color: var(--navy); background: var(--surface-sunk); }

.tl-actions {
  margin-top: .5rem; display: flex; gap: .9rem; align-items: baseline;
  flex-wrap: wrap; font-size: .82rem;
}
.tl-actions a { color: var(--navy); }
.tl-remove summary {
  cursor: pointer; color: var(--ink-3); list-style: none;
}
.tl-remove summary::-webkit-details-marker { display: none; }
.tl-remove summary::before { content: "· "; }
.tl-remove[open] summary { color: var(--critical); }
.tl-remove > div {
  margin-top: .5rem; padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface-sunk); max-width: 46ch;
}
.tl-remove p { margin: 0 0 .6rem; color: var(--ink-3); line-height: 1.5; }

.card-head .spacer { flex: 1; }

/* ------------------------------------------------------------- document rows */
.doc-row {
  padding: .65rem 1.25rem; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.doc-row:last-child { border-bottom: 0; }
.doc-row a { color: var(--navy); }
.doc-actions {
  margin-top: .4rem; display: flex; gap: .9rem; align-items: baseline;
  flex-wrap: wrap; font-size: .82rem;
}

/* A button that has to look like a link because it posts rather than navigates.
   Toggling who can see a document changes something, so it cannot be a GET. */
.linkish {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  color: var(--navy); font: inherit; font-size: .82rem; text-decoration: underline;
  text-underline-offset: 2px;
}
.linkish:hover { color: var(--ink); }

/* The per-row disclosure on the team page is the same control as the one on the
   timeline, but it is not a list item, so it does not take the bullet. */
.row-menu summary::before { content: none; }
.row-menu summary { color: var(--navy); }
.row-menu > div { max-width: 40ch; }

@media (max-width: 640px) {
  .tl-actions { gap: .5rem 1rem; }
}

@media print {
  .masthead, .mobile-nav, .btn, .filters { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}
