/* Leadership Lab Portal — admin.
   An operations console: scanned and operated, not read top to bottom.

   Design notes:
   - Navigation is two-tier across the top. Five groups on the brand bar, the
     pages of the active group beneath. Twenty-two destinations is too many for
     one flat row, and grouping is how the team already thinks about the work.
   - The brand bar carries a deep lapis so the blue does real identity work
     rather than only tinting links.
   - One typeface. A serif display face fights a dense data grid.
   - Monospace is reserved for actual data — numbers, codes, addresses.
   - Green / amber / red are semantic only, never decorative, so a coloured
     thing on screen always means something. */

:root {
  /* --- neutrals: cool, faintly blue-biased to sit under the accent --- */
  --ground:     #eef1f6;
  --surface:    #ffffff;
  --surface-2:  #f5f7fb;
  --surface-3:  #eaeef5;
  --ink:        #0f1319;
  --ink-soft:   #333b48;
  --muted:      #626b7b;
  --hairline:   #dce1ea;
  --hairline-2: #e9edf3;

  /* --- accent --- */
  --lapis:      #1b4b8f;
  --lapis-ink:  #143a70;
  --lapis-bg:   #e6ecf8;
  --lapis-ring: rgba(27, 75, 143, .18);

  /* --- the brand bar --- */
  --bar-from:   #16407c;
  --bar-to:     #1d5299;
  --bar-ink:    #ffffff;
  --bar-dim:    rgba(255, 255, 255, .72);
  --bar-hover:  rgba(255, 255, 255, .12);
  --bar-active: rgba(255, 255, 255, .18);
  --bar-line:   rgba(255, 255, 255, .16);

  /* --- semantic only --- */
  --verdigris:    #16775a;
  --verdigris-bg: #dff2eb;
  --copper:       #925612;
  --copper-bg:    #fcefd8;
  --danger:       #a52a20;
  --danger-bg:    #fbe5e2;

  --shadow-sm: 0 1px 2px rgba(15, 19, 25, .06);
  --shadow:    0 1px 2px rgba(15, 19, 25, .05), 0 6px 16px -10px rgba(15, 19, 25, .22);

  --body:    "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:    "Cascadia Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r:    9px;
  --r-lg: 13px;

  --bar-main-h: 54px;
  --bar-sub-h:  44px;
  --page-max:   1460px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:     #0c0f14;
    --surface:    #151a21;
    --surface-2:  #1a2028;
    --surface-3:  #212833;
    --ink:        #e9edf4;
    --ink-soft:   #c3cbd8;
    --muted:      #8d97a8;
    --hairline:   #252c37;
    --hairline-2: #1e242e;

    --lapis:      #82abee;
    --lapis-ink:  #a3c2f4;
    --lapis-bg:   #15233b;
    --lapis-ring: rgba(130, 171, 238, .25);

    --bar-from:   #0e2549;
    --bar-to:     #143566;
    --bar-ink:    #eef3fb;
    --bar-dim:    rgba(238, 243, 251, .66);
    --bar-hover:  rgba(255, 255, 255, .09);
    --bar-active: rgba(255, 255, 255, .15);
    --bar-line:   rgba(255, 255, 255, .10);

    --verdigris:    #4fb98e;
    --verdigris-bg: #102620;
    --copper:       #dc9450;
    --copper-bg:    #291c10;
    --danger:       #ef8078;
    --danger-bg:    #321714;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow:    0 1px 2px rgba(0, 0, 0, .45), 0 6px 16px -10px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--lapis); text-decoration: none; }
a:hover { color: var(--lapis-ink); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--lapis); outline-offset: 2px; border-radius: var(--r-sm); }

/* ==========================================================  top bar  === */
.topbar { position: sticky; top: 0; z-index: 40; }

.bar-in {
  max-width: var(--page-max); margin-inline: auto;
  padding-inline: clamp(14px, 2.4vw, 26px);
}

.bar-main {
  background: linear-gradient(100deg, var(--bar-from), var(--bar-to));
  color: var(--bar-ink);
  height: var(--bar-main-h);
  display: flex; align-items: center;
}
.bar-main .bar-in { display: flex; align-items: center; gap: 22px; width: 100%; }
.bar-main a { color: inherit; }
.bar-main a:hover { text-decoration: none; }

.abrand { display: flex; align-items: center; gap: 10px; flex: none; }
.abrand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.abrand-text {
  font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -.012em;
  white-space: nowrap;
}
@media (max-width: 1080px) { .abrand-text { display: none; } }

/* --- primary tabs --- */
.tabs { display: flex; align-items: center; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 7px 13px; border-radius: 8px; white-space: nowrap;
  font-size: 13.5px; font-weight: 500; color: var(--bar-dim);
  transition: background-color .12s ease, color .12s ease;
}
.tab:hover { background: var(--bar-hover); color: var(--bar-ink); }
.tab.is-active { background: var(--bar-active); color: var(--bar-ink); font-weight: 650; }

.bar-right { margin-inline-start: auto; display: flex; align-items: center; gap: 13px; flex: none; }

.event-switch select {
  font: inherit; font-size: 12.8px; font-weight: 500;
  padding: 6px 29px 6px 11px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .24);
  background-color: rgba(255, 255, 255, .13);
  color: var(--bar-ink); appearance: none; cursor: pointer; max-width: 190px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 53%, calc(100% - 10px) 53%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.event-switch select:hover { background-color: rgba(255, 255, 255, .2); }
.event-switch select option { color: var(--ink); background: var(--surface); }

.awho { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.arole {
  font-size: 11px; font-weight: 650; white-space: nowrap;
  background: rgba(255, 255, 255, .16); color: var(--bar-ink);
  padding: 4px 10px; border-radius: 999px;
}
.aemail { color: var(--bar-dim); }
.alogout { color: var(--bar-dim); font-size: 12.5px; }
.alogout:hover { color: var(--bar-ink); }
@media (max-width: 1240px) { .aemail { display: none; } }
@media (max-width: 720px)  { .arole { display: none; } }

/* --- secondary nav --- */
.bar-sub {
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  height: var(--bar-sub-h);
  box-shadow: var(--shadow-sm);
}
.subnav {
  display: flex; align-items: stretch; gap: 2px; height: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav-link {
  display: flex; align-items: center; white-space: nowrap;
  padding: 0 13px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
.subnav-link:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.subnav-link.is-current { color: var(--lapis); font-weight: 650; border-bottom-color: var(--lapis); }

/* ============================================================  main  === */
.amain { padding: 24px 0 80px; }

@media (max-width: 720px) {
  .bar-main .bar-in { gap: 12px; }
  .amain { padding: 16px 0 60px; }
}

/* =========================================================  headings  === */
.phead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.phead h1 {
  font-family: var(--display);
  font-size: 26px; font-weight: 650; line-height: 1.14; letter-spacing: -.024em; margin: 0;
}
.phead .sub {
  color: var(--muted); font-size: 13px; margin-top: 6px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.phead-actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

h2 { font-family: var(--display); font-size: 17px; font-weight: 640; letter-spacing: -.014em; margin: 34px 0 13px; }
h3 { font-size: 14px; font-weight: 620; letter-spacing: -.005em; margin: 22px 0 8px; }

/* ==========================================================  banners  === */
.banner {
  position: relative; padding: 12px 16px 12px 17px;
  border-radius: var(--r); margin-bottom: 16px; font-size: 13.5px;
  background: var(--surface); color: var(--ink-soft);
  box-shadow: var(--shadow-sm); border: 1px solid var(--hairline);
}
.banner::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px;
  border-start-start-radius: var(--r); border-end-start-radius: var(--r);
  background: var(--lapis);
}
.banner.ok     { background: var(--verdigris-bg); border-color: transparent; }
.banner.ok::before { background: var(--verdigris); }
.banner.warn   { background: var(--copper-bg); border-color: transparent; }
.banner.warn::before { background: var(--copper); }
.banner.danger { background: var(--danger-bg); border-color: transparent; }
.banner.danger::before { background: var(--danger); }
.banner.muted  { background: var(--surface-2); color: var(--muted); }
.banner.muted::before { background: var(--hairline); }
.banner a { font-weight: 600; }

/* ============================================================  tiles  === */
.tiles {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  margin-bottom: 22px;
}
.tile {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 15px 17px 14px;
  color: inherit; display: block; box-shadow: var(--shadow-sm);
  transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}
a.tile:hover {
  text-decoration: none; border-color: var(--lapis);
  box-shadow: var(--shadow); transform: translateY(-1px);
}
.tile .n {
  font-family: var(--display); font-size: 31px; font-weight: 640; line-height: 1.05;
  letter-spacing: -.032em; font-variant-numeric: tabular-nums;
}
.tile .l { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.35; }

/* Attention tiles tint the whole card, so a problem is visible without reading. */
.tile.alert { background: var(--copper-bg); border-color: transparent; }
.tile.alert .n { color: var(--copper); }
.tile.alert .l { color: color-mix(in srgb, var(--copper) 76%, var(--ink)); }
.tile.good .n  { color: var(--verdigris); }

/* ============================================================  cards  === */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card > :first-child { margin-top: 0; }
.card > :last-child  { margin-bottom: 0; }
.card-title { font-size: 14.5px; font-weight: 640; letter-spacing: -.008em; margin: 0 0 4px; }
.card-sub   { color: var(--muted); font-size: 12.8px; margin: 0 0 14px; line-height: 1.5; }

/* A card that folds away. Used for the staff travel form, which is long and only
   wanted when somebody is actually on the phone taking details down. */
details.card > summary { list-style: none; display: flex; align-items: center; gap: 9px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
  content: "▸"; margin-inline-start: auto; color: var(--muted);
  font-size: 12px; transition: transform .15s ease;
}
details.card[open] > summary::after { transform: rotate(90deg); }
details.card > summary:hover { color: var(--lapis); }

.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }

/* ===========================================================  tables  === */
.tw {
  overflow-x: auto; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
table.t { border-collapse: collapse; width: 100%; font-size: 13.4px; }
table.t th, table.t td {
  text-align: left; padding: 11px 15px;
  border-bottom: 1px solid var(--hairline-2); vertical-align: top;
}
/* Deliberately NOT position:sticky. `.tw` sets overflow-x:auto, and the CSS
   spec computes the other axis to auto as well — so `.tw` is a scroll container
   in both directions. A sticky header would then position itself relative to
   `.tw`'s scrollport, not the viewport, and since `.tw` has no height limit it
   never scrolls vertically: the header simply rendered offset below the first
   row. Header-follows-scroll is not worth a nested scroll region here. */
table.t thead th {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--hairline);
  white-space: nowrap; padding-top: 10px; padding-bottom: 10px;
}
table.t thead th:first-child { border-start-start-radius: var(--r-lg); }
table.t thead th:last-child  { border-start-end-radius: var(--r-lg); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background-color .1s ease; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t td.num, table.t th.num {
  text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.8px;
}
table.t .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
table.t a { font-weight: 600; }
.t-empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ============================================================  pills  === */
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); vertical-align: middle;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; opacity: .85; }
.pill.blue  { background: var(--lapis-bg);     color: var(--lapis); }
.pill.green { background: var(--verdigris-bg); color: var(--verdigris); }
.pill.amber { background: var(--copper-bg);    color: var(--copper); }
.pill.red   { background: var(--danger-bg);    color: var(--danger); }

.stage-nominated  { background: var(--surface-3);    color: var(--muted); }
.stage-invited    { background: var(--lapis-bg);     color: var(--lapis); }
.stage-interested { background: var(--lapis-bg);     color: var(--lapis); }
.stage-undecided  { background: var(--copper-bg);    color: var(--copper); }
.stage-confirmed  { background: var(--verdigris-bg); color: var(--verdigris); }
.stage-attended   { background: var(--verdigris-bg); color: var(--verdigris); }
.stage-waitlisted { background: var(--copper-bg);    color: var(--copper); }
.stage-declined   { background: var(--surface-3);    color: var(--muted); }
.stage-cancelled  { background: var(--danger-bg);    color: var(--danger); }
.stage-no_show    { background: var(--danger-bg);    color: var(--danger); }

/* ============================================================  forms  === */
.field { margin-bottom: 15px; }
.field > label, .field-label { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 12.2px; margin-top: 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"],
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="number"],
input[type="password"], select, textarea {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 8px 11px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 12.8px; line-height: 1.6; min-height: 330px; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--lapis) 34%, var(--hairline)); }
input:focus, select:focus, textarea:focus { border-color: var(--lapis); outline: none; box-shadow: 0 0 0 3px var(--lapis-ring); }

/* The event picker lives on the blue bar and styles itself; everything else. */
.field select, .filters select, table.t select, .inline select, .row select {
  appearance: none; cursor: pointer; padding-inline-end: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 53%, calc(100% - 11px) 53%;
  background-size: 5px 5px; background-repeat: no-repeat;
}

.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.checkline { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13.2px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--lapis); }
.checkline input { width: 15px; height: 15px; flex: none; }

/* ==========================================================  buttons  === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 13.2px; font-weight: 600; letter-spacing: -.005em;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--lapis);
  background: linear-gradient(180deg, #2258a2, var(--lapis));
  color: #fff; box-shadow: var(--shadow-sm);
  transition: filter .12s ease, box-shadow .12s ease, transform .06s ease;
}
.btn:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }

.btn-quiet { background: var(--surface); border-color: var(--hairline); color: var(--ink-soft); filter: none; }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--lapis); color: var(--lapis); filter: none; }

.btn-danger { background: linear-gradient(180deg, #bc352a, var(--danger)); border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }

.btn-sm { padding: 5px 11px; font-size: 12.4px; border-radius: 7px; }

/* ==========================================================  filters  === */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.filters .field { margin: 0; min-width: 145px; }
.filters .field > label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .045em;
  color: var(--muted); margin-bottom: 5px;
}
.filters .btn { margin-bottom: 1px; }

/* ====================================================  list navigation === */
/* Vertical pick-lists inside a card — the event list, the template list. */
.listlink {
  position: relative; display: block;
  padding: 8px 11px; border-radius: 8px;
  color: var(--ink-soft); font-size: 13.5px; font-weight: 450;
  transition: background-color .12s ease, color .12s ease;
}
.listlink:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.listlink.is-current { background: var(--lapis-bg); color: var(--lapis); font-weight: 650; }
.listlink.is-current::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--lapis);
}
.listlink .pill { margin-inline-start: 6px; }

/* =====================================================  key / value  === */
.kv { display: grid; grid-template-columns: minmax(128px, 34%) 1fr; gap: 8px 16px; font-size: 13.3px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-soft); }

/* ============================================================  bars  === */
.barrow { display: grid; grid-template-columns: 120px 46px 1fr; align-items: center; gap: 11px; font-size: 13px; margin-bottom: 8px; }
.barrow .n { font-family: var(--mono); font-size: 12.5px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.barrow > span:last-child { background: var(--surface-3); border-radius: 999px; overflow: hidden; height: 8px; }
.barrow .b { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #2258a2, var(--lapis)); }

/* ===========================================================  misc  === */
.mono   { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .95em; }
.muted  { color: var(--muted); }
.small  { font-size: 12.5px; }
.right  { text-align: right; }
.nowrap { white-space: nowrap; }
.stack  { display: flex; flex-direction: column; gap: 10px; }
.inline { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

hr { border: 0; border-top: 1px solid var(--hairline); margin: 22px 0; }

code {
  font-family: var(--mono); font-size: .9em;
  background: var(--surface-2); border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm); padding: 1.5px 5px;
}
pre.out {
  font-family: var(--mono); font-size: 12.4px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--r); padding: 14px 15px; overflow-x: auto; color: var(--ink-soft);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 34%, transparent);
  border-radius: 999px; border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 55%, transparent); background-clip: content-box; }

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

@media print {
  .topbar, .phead-actions, .filters { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .amain { padding: 0; }
  .card, .tw, .tile { box-shadow: none; border-color: #999; break-inside: avoid; }
}


/* =====================================================  note log  === */
/* A running list of call notes. Append-only, so the newest is first and each
   entry carries who wrote it — the point is that nothing overwrites anything. */
.notelog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.notelog li {
  padding: 10px 13px; border-radius: 6px;
  background: var(--sunk, #F7F9FB);
  border-inline-start: 3px solid var(--hairline-2);
}
.notelog li:first-child { border-inline-start-color: var(--lapis); }
.notelog-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 11.8px; color: var(--muted); margin-bottom: 5px;
}
.notelog-meta strong { color: var(--ink-soft); font-size: 12.2px; font-weight: 650; }
.notelog-body { font-size: 13.4px; line-height: 1.55; white-space: pre-line; }

.notelog-wrap { margin-top: 10px; }
.notelog-wrap > summary {
  cursor: pointer; font-size: 12.4px; font-weight: 650; color: var(--muted);
  list-style: none;
}
.notelog-wrap > summary::-webkit-details-marker { display: none; }
.notelog-wrap > summary::before { content: "▸ "; }
.notelog-wrap[open] > summary::before { content: "▾ "; }
.notelog-wrap > summary:hover { color: var(--lapis); }
.notelog-wrap[open] > summary { margin-bottom: 8px; }


/* ==========================================================  notifications  === */
/* Fixed to the right, above the content but never over it on a narrow screen —
   below 1100px it drops to the bottom-right and shrinks. */
.noti {
  position: fixed; top: 74px; inset-inline-end: 16px; z-index: 60;
  width: 292px; max-height: calc(100vh - 100px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--hairline-2);
  border-radius: 9px; box-shadow: 0 8px 26px rgba(20, 30, 45, .13);
  overflow: hidden;
}
.noti[hidden] { display: none; }
.noti-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-bottom: 1px solid var(--hairline);
  background: var(--sunk, #F7F9FB);
  font-size: 12.6px;
}
.noti-head strong { font-size: 12.8px; letter-spacing: .01em; }
.noti-count {
  background: var(--lapis); color: #fff; border-radius: 999px;
  min-width: 20px; padding: 1px 6px; text-align: center;
  font-size: 11.5px; font-weight: 700;
}
.noti-all {
  margin-inline-start: auto; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 11.8px; padding: 2px 4px;
}
.noti-all:hover { color: var(--lapis); text-decoration: underline; }
.noti-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 7px; }

.noti-card {
  position: relative; padding: 9px 30px 9px 11px;
  border: 1px solid var(--hairline); border-radius: 7px;
  border-inline-start: 3px solid var(--hairline-2);
  background: var(--surface);
}
.noti-card.is-good { border-inline-start-color: var(--verdigris); }
.noti-card.is-warn { border-inline-start-color: var(--copper); }
.noti-title {
  display: block; font-size: 13.2px; font-weight: 650; line-height: 1.35;
  color: var(--ink); text-decoration: none;
}
.noti-title:hover { color: var(--lapis); text-decoration: underline; }
.noti-detail { font-size: 12.2px; color: var(--slate, #5A6473); margin-top: 3px; }
.noti-when   { font-size: 11.2px; color: var(--muted); margin-top: 4px; }
.noti-x {
  position: absolute; top: 5px; inset-inline-end: 5px;
  background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 17px; line-height: 1;
  padding: 2px 6px; border-radius: 5px;
}
.noti-x:hover { background: var(--sunk, #F1F4F7); color: var(--danger); }
.noti-x:focus-visible, .noti-all:focus-visible { outline: 2px solid var(--lapis); outline-offset: 1px; }

@media (max-width: 1100px) {
  .noti {
    top: auto; bottom: 12px; inset-inline-end: 12px;
    width: 250px; max-height: 46vh;
  }
}
@media print { .noti { display: none; } }

/* A card arrived at from a notification link — brief, so it is findable without
   being permanent once the page is being read normally. */
.card:target {
  border-color: var(--lapis);
  box-shadow: 0 0 0 3px var(--lapis-bg);
}

/* ===================================================== fee subsidy review ===
   The admin pages load only this sheet, so the few classes shared with the
   public one are repeated here rather than pulling in the whole of style.css.
   ========================================================================= */

/* A person and their contact details in one cell — the table has eight columns
   and email and phone do not each deserve one. */
.cell-person    { min-width: 220px; }
.person-name    { display: block; font-weight: 550; }
.person-contact { display: block; font-size: 12.6px; color: var(--ink-soft); line-height: 1.5; }
.person-contact a { color: inherit; text-decoration: none; }
.person-contact a:hover { text-decoration: underline; }
.person-contact a + a::before { content: " · "; color: var(--ink-soft); text-decoration: none; }

.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }

/* Money reads far better right-aligned and tabular: the columns line up on the
   decimal point, so a wrong figure is visible without reading every digit. */
table.t th.num, table.t td.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A row needing a phone call, and the panel underneath each person. */
tr.row-alert > td { background: var(--danger-bg); }
tr.row-detail > td { padding-top: 0; border-top: 0; }
tr.row-detail summary {
  cursor: pointer; font-size: 13px; color: var(--ink-soft);
  padding: 4px 0 8px; user-select: none;
}
tr.row-detail summary:hover { color: var(--ink); }
tr.row-detail details[open] summary { color: var(--ink); }
.subsidy-edit {
  border-inline-start: 3px solid var(--hairline-2);
  padding: 12px 0 14px 14px; margin: 0 0 6px;
}
/* Striping fights the panel: an expanded row and its summary must read as one. */
table.t tbody tr.row-detail:nth-child(even) td,
table.t tbody tr.row-detail td { background: transparent; }

.pill.subsidy-in_process { background: var(--copper-bg);    color: var(--copper); }
.pill.subsidy-approved   { background: var(--verdigris-bg); color: var(--verdigris); }
.pill.subsidy-partial    { background: var(--lapis-bg);     color: var(--lapis); }
.pill.subsidy-denied     { background: var(--danger-bg);    color: var(--danger); }
