/* The Scholars Desk - the look of the accepted prototype (docs/decisions/0001) */
:root {
  color-scheme: light;
  --paper: #eef1f5; --surface: #ffffff; --raised: #f5f7fa;
  --ink: #17222d; --muted: #4d5a68; --faint: #66737f; --line: #dde3ea; --line-strong: #c3cdd8;
  --head: #1f3b57; --mast: #1f3b57; --mast-ink: #ffffff; --mast-muted: #b4c4d5; --gold: #d8bd8a;
  --go: #b4532a; --go-hover: #963f1a; --go-ink: #ffffff; --rust-soft: #f8ebe4;
  --sel: #e4ecf5; --hover: #f1f4f8; --mark: #fbe49a;
  --warn: #8a5300; --warn-soft: #fbefd6; --ok: #2b7a3d; --ok-soft: #e3f3e6; --bad: #a12f2f; --bad-soft: #f8e4e4;
  --info: #1f5b8f; --info-soft: #e1edf8; --violet: #5b3f96; --violet-soft: #ece6f7; --grey-soft: #e9edf2;
  --alive: #2f9e44; --shadow: 0 1px 2px rgba(23,34,45,.08), 0 10px 28px rgba(23,34,45,.08);
  --on: #1f3b57; --on-ink: #ffffff; --rust: #b4532a; --mark-ink: #17222d; --dead: #7a8693; --tile-mono: #e2e8ef;
  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0b1219; --surface: #121c27; --raised: #172330;
    --ink: #e2e8ee; --muted: #a9b6c2; --faint: #8795a3; --line: #223040; --line-strong: #34465b;
    --head: #bfd2e7; --mast: #0f1d2c; --mast-ink: #eef3f8; --mast-muted: #8ea2b7; --gold: #cfb27c;
    --go: #b25632; --go-hover: #c86a42; --go-ink: #ffffff; --rust-soft: #38231a;
    --sel: #1a2b3e; --hover: #162434; --mark: #5e4b0f;
    --warn: #e8b95e; --warn-soft: #33280f; --ok: #6fd28a; --ok-soft: #153322; --bad: #f09a9a; --bad-soft: #3a1b1b;
    --info: #8fc0ee; --info-soft: #14293d; --violet: #c2b0ee; --violet-soft: #251d3a; --grey-soft: #1b2733;
    --alive: #4cc262; --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.3);
    --on: #2d4e72; --on-ink: #ffffff; --rust: #e3916b; --mark-ink: #fff5d6; --dead: #7f8c99; --tile-mono: #182636;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b1219; --surface: #121c27; --raised: #172330;
  --ink: #e2e8ee; --muted: #a9b6c2; --faint: #8795a3; --line: #223040; --line-strong: #34465b;
  --head: #bfd2e7; --mast: #0f1d2c; --mast-ink: #eef3f8; --mast-muted: #8ea2b7; --gold: #cfb27c;
  --go: #b25632; --go-hover: #c86a42; --go-ink: #ffffff; --rust-soft: #38231a;
  --sel: #1a2b3e; --hover: #162434; --mark: #5e4b0f;
  --warn: #e8b95e; --warn-soft: #33280f; --ok: #6fd28a; --ok-soft: #153322; --bad: #f09a9a; --bad-soft: #3a1b1b;
  --info: #8fc0ee; --info-soft: #14293d; --violet: #c2b0ee; --violet-soft: #251d3a; --grey-soft: #1b2733;
  --alive: #4cc262; --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.3);
  --on: #2d4e72; --on-ink: #ffffff; --rust: #e3916b; --mark-ink: #fff5d6; --dead: #7f8c99; --tile-mono: #182636;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: calc(15px * var(--ts, 1))/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--serif); color: var(--head); font-weight: 600; text-wrap: balance; margin: 0; }
h1 { font-size: calc(28px * var(--ts, 1)); line-height: 1.15; }
h2 { font-size: calc(20px * var(--ts, 1)); line-height: 1.25; }
h3 { font-size: calc(16px * var(--ts, 1)); font-family: var(--sans); font-weight: 700; color: var(--ink); }
a { color: var(--info); }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--go); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* masthead */
.mast { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--mast); color: var(--mast-ink);
  display: flex; align-items: center; gap: 16px; padding: 10px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b { font-family: var(--serif); font-size: calc(20px * var(--ts, 1)); font-weight: 600; letter-spacing: .01em; }
.brand span { color: var(--mast-muted); font-size: calc(13px * var(--ts, 1)); letter-spacing: .06em; text-transform: uppercase; }
.event { color: var(--gold); font-size: calc(13px * var(--ts, 1)); }
.mast .grow { flex: 1; }
.role { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--ts, 1)); color: var(--mast-muted); }
.role select { background: transparent; color: var(--mast-ink); border: 1px solid rgba(255,255,255,.28); border-radius: 6px; padding: 4px 8px; }
.role select option { color: #17222d; }
.sample { background: var(--warn-soft); color: var(--warn); font-size: calc(13px * var(--ts, 1)); padding: 6px 20px; border-bottom: 1px solid var(--line); }

/* shell */
.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 90px); }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.rail .group { font-size: calc(11px * var(--ts, 1)); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 4px; }
.rail a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.rail a:hover { background: var(--hover); }
.rail a[aria-current="page"] { background: var(--sel); color: var(--head); font-weight: 600; }
.rail a .badge { margin-left: auto; }
.rail a.later { color: var(--faint); }
.rail svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { padding: 24px 28px 48px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }

/* pieces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.pad { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: calc(13px * var(--ts, 1)); }
.label { font-size: calc(12px * var(--ts, 1)); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.big { font-family: var(--serif); font-size: calc(32px * var(--ts, 1)); line-height: 1; color: var(--head); }
.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.btn:hover { background: var(--hover); }
.btn.go { background: var(--go); border-color: var(--go); color: var(--go-ink); font-weight: 600; }
.btn.go:hover { background: var(--go-hover); }
.btn.small { padding: 3px 9px; font-size: calc(13px * var(--ts, 1)); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 10px; font-size: calc(12.5px * var(--ts, 1)); font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-grey { background: var(--grey-soft); color: var(--muted); }
.p-info { background: var(--info-soft); color: var(--info); }
.p-violet { background: var(--violet-soft); color: var(--violet); }
.p-warn { background: var(--warn-soft); color: var(--warn); }
.p-ok { background: var(--ok-soft); color: var(--ok); }
.p-bad { background: var(--bad-soft); color: var(--bad); }
.p-go { background: var(--rust-soft); color: var(--go); }
.badge { background: var(--go); color: var(--go-ink); border-radius: 999px; font-size: calc(12px * var(--ts, 1)); font-weight: 700; padding: 0 7px; min-width: 20px; text-align: center; }
.tag { border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 7px; font-size: calc(12px * var(--ts, 1)); color: var(--muted); white-space: nowrap; }
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; font-size: calc(14px * var(--ts, 1));
  color: var(--head); background: var(--sel); position: relative; }
.av.lg { width: 84px; height: 84px; font-size: calc(26px * var(--ts, 1)); font-family: var(--serif); }
.av .dot { position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--alive); border: 2px solid var(--surface); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: var(--hover); }
.list .who { min-width: 0; flex: 1; }
.list .who b { display: block; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: calc(14px * var(--ts, 1)); }
th { text-align: left; font-size: calc(12px * var(--ts, 1)); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--hover); }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--grey-soft); }
.bar span { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: calc(13px * var(--ts, 1)); color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--head); border-bottom-color: var(--go); font-weight: 600; }
.search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search input[type=search] { flex: 1 1 280px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.search select { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; position: relative; }
.tile:hover { box-shadow: var(--shadow); }
.tile .top { display: flex; gap: 10px; align-items: center; }
.tile .name { font-family: var(--serif); font-weight: 600; color: var(--head); line-height: 1.2; }
.tile input { position: absolute; top: 12px; right: 12px; width: 17px; height: 17px; }
.tile.dead { opacity: .62; }
.actionbar { position: sticky; bottom: 0; background: var(--mast); color: var(--mast-ink); border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; margin-top: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.dl dt { color: var(--faint); font-size: calc(13px * var(--ts, 1)); padding: 9px 0; border-top: 1px solid var(--line); }
.dl dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.hidden-note { color: var(--faint); font-style: italic; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 14px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline li.done::before { background: var(--head); border-color: var(--head); }
.timeline li.now::before { background: var(--go); border-color: var(--go); }
.letter { font-family: var(--serif); font-size: calc(15.5px * var(--ts, 1)); line-height: 1.65; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; max-width: 68ch; }
.letter mark { background: var(--mark); color: inherit; padding: 0 3px; border-radius: 3px; font-family: var(--sans); font-size: calc(13px * var(--ts, 1)); }
.split { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.msg { border-top: 1px solid var(--line); padding: 14px 18px; }
.msg:first-child { border-top: 0; }
.msg .meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: calc(13px * var(--ts, 1)); color: var(--faint); }
textarea { width: 100%; min-height: 90px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px; background: var(--surface); }
.progress { height: 8px; background: var(--grey-soft); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); }
.later-box { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 18px; background: var(--raised); }
.frame { max-width: 760px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.frame-head { background: var(--mast); color: var(--mast-ink); padding: 12px 20px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.frame-head b { font-family: var(--serif); font-size: calc(19px * var(--ts, 1)); font-weight: 600; }
.frame-head span { color: var(--mast-muted); font-size: calc(13px * var(--ts, 1)); }
.frame-body { padding: 20px 22px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; }
.opts { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.opts label { display: inline-flex; gap: 7px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: calc(14px * var(--ts, 1)); color: var(--muted); }
.field input, .field select, .frame select { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; }
.later-note { background: var(--grey-soft); color: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: calc(14px * var(--ts, 1)); margin-bottom: 16px; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.themes span { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: calc(12px * var(--ts, 1)); font-weight: 600; }
.t-ok { background: var(--ok-soft); color: var(--ok); } .t-prop { background: var(--violet-soft); color: var(--violet); } .t-none { background: var(--grey-soft); color: var(--faint); }
.signin { max-width: 440px; margin: 40px auto; text-align: center; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; }
.gbtn:hover { background: var(--hover); }
.public { max-width: 680px; }
.wa { max-width: 420px; background: #e7f6dd; color: #17222d; border-radius: 12px 12px 12px 4px; padding: 12px 14px; font-size: calc(15px * var(--ts, 1)); line-height: 1.5; box-shadow: var(--shadow); }
.wa mark { background: #fbe49a; color: inherit; padding: 0 3px; border-radius: 3px; font-size: calc(13px * var(--ts, 1)); }  /* the bubble is light in both themes */
.wa .meta { text-align: right; font-size: calc(12px * var(--ts, 1)); color: #5b6b5b; margin-top: 4px; }
.lh { background: #fffdf8; color: #17222d; border: 1px solid var(--line); border-radius: 8px; padding: 22px 26px; max-width: 72ch; font-family: var(--serif); font-size: calc(15px * var(--ts, 1)); line-height: 1.6; }
.lh .lh-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid #1f3b57; padding-bottom: 10px; margin-bottom: 14px; }
.lh .lh-top b { font-size: calc(18px * var(--ts, 1)); color: #1f3b57; }
.lh .lh-top span { font-family: var(--sans); font-size: calc(12px * var(--ts, 1)); color: #4d5a68; }
.lh mark { background: #fbe49a; color: inherit; padding: 0 3px; border-radius: 3px; font-family: var(--sans); font-size: calc(13px * var(--ts, 1)); }
.lh .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.lh .signs div { border-top: 1px solid #c3cdd8; padding-top: 6px; font-family: var(--sans); font-size: calc(13px * var(--ts, 1)); }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--mast); color: var(--mast-ink);
  padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); font-size: calc(14px * var(--ts, 1)); z-index: 50; max-width: calc(100vw - 32px); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .mast { position: static; }
  .rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .rail .group { display: none; }
  .rail a { white-space: nowrap; }
  main { padding: 18px 16px 40px; }
  .g2, .g3, .g4, .split { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; } .dl dd { border-top: 0; padding-top: 0; }
  .sample, .mast { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: no-preference) { .tile, .btn { transition: background .15s, box-shadow .15s; } }

/* ---- the real desk (beyond the prototype) */
.mast .who { display: flex; align-items: center; gap: 10px; font-size: calc(13px * var(--ts, 1)); color: var(--mast-muted); }
.mast .who b { color: var(--mast-ink); font-weight: 600; }
.mast .who form { margin: 0; }
.mast .who button { background: transparent; border: 1px solid rgba(255,255,255,.28); color: var(--mast-ink); border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: calc(13px * var(--ts, 1)); }
.messages { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.messages li { padding: 8px 12px; border-radius: 8px; font-size: calc(14px * var(--ts, 1)); }
.messages .success { background: var(--ok-soft); color: var(--ok); }
.messages .error { background: var(--bad-soft); color: var(--bad); }
.messages .info { background: var(--info-soft); color: var(--info); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; font: inherit; }
.photo-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.tile img.ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.tile mark, .dl mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 2px; }
.dl dd { white-space: pre-line; overflow-wrap: anywhere; }
.dl dd.empty { color: var(--faint); }
dialog.sheet { border: 1px solid var(--line); border-radius: 12px; padding: 0; max-width: 520px; width: calc(100vw - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: rgba(15, 25, 35, .45); }
dialog.sheet form { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- mail: templates, sending, the mailbox (Day 2) */
.messages .warning { background: var(--warn-soft); color: var(--warn); }
.letter p { margin: 0 0 .8em; } .letter p:last-child { margin-bottom: 0; }
.letter .subj { font-family: var(--sans); font-size: calc(14px * var(--ts, 1)); color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: calc(14px * var(--ts, 1)); }
.checks li { padding: 7px 10px; border-radius: 8px; }
.checks .block { background: var(--bad-soft); color: var(--bad); }
.checks .warn { background: var(--warn-soft); color: var(--warn); }
.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-size: calc(13px * var(--ts, 1)); margin: 0; }
.fields dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--head); }
.fields dd { margin: 0; color: var(--muted); }
.field textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: calc(13.5px * var(--ts, 1)); line-height: 1.55; }
.field .help { font-size: calc(12.5px * var(--ts, 1)); color: var(--faint); }
.field.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.field.check input { width: auto; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.choices label { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.choices ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
details.mail { border-top: 1px solid var(--line); }
details.mail:first-child { border-top: 0; }
details.mail summary { display: flex; gap: 12px; align-items: center; padding: 10px 18px; cursor: pointer; list-style: none; }
details.mail summary::-webkit-details-marker { display: none; }
details.mail summary:hover { background: var(--hover); }
details.mail summary .who { flex: 1; min-width: 0; }
details.mail summary .who b { display: block; }
details.mail > .letter { margin: 0 18px 14px; }
.wa-text { white-space: pre-wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }

/* ---- the Invitations section: one flow across its pages, and the pieces its pages share */
.flow { display: flex; gap: 8px; margin: -4px 0 22px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.flow a { flex: 1 1 0; min-width: 158px; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
.flow a:hover { background: var(--hover); }
.flow a[aria-current="step"] { border-color: var(--head); box-shadow: inset 0 -3px 0 var(--go); }
.flow .n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: calc(13px * var(--ts, 1));
  background: var(--grey-soft); color: var(--muted); flex: none; }
.flow a[aria-current="step"] .n { background: var(--head); color: var(--surface); }
.flow b { display: block; font-size: calc(14px * var(--ts, 1)); line-height: 1.25; }
.flow small { display: block; font-size: calc(12.5px * var(--ts, 1)); color: var(--faint); line-height: 1.3; white-space: nowrap; }
.flow small.due { color: var(--go); font-weight: 600; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.phead .lede { margin: 4px 0 0; color: var(--muted); max-width: 72ch; }
.phead .eyebrow { font-size: calc(13px * var(--ts, 1)); color: var(--faint); }
.phead .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
details.about { margin: -6px 0 16px; font-size: calc(14px * var(--ts, 1)); color: var(--muted); }
details.about summary { cursor: pointer; color: var(--faint); font-size: calc(13px * var(--ts, 1)); width: max-content; max-width: 100%; }
details.about summary:hover { color: var(--ink); }
details.about > :not(summary) { margin: 8px 0 0; max-width: 80ch; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--grey-soft); border-radius: 10px; flex-wrap: wrap; max-width: 100%; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: calc(14px * var(--ts, 1)); font-weight: 600;
  display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a[aria-current="page"] { background: var(--surface); color: var(--head); box-shadow: 0 1px 2px rgba(23,34,45,.14); }
.seg .count { font-size: calc(12px * var(--ts, 1)); font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.seg a[aria-current="page"] .count { color: var(--go); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.toolbar input[type=search] { flex: 1 1 240px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.toolbar select { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); max-width: 100%; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .v { font-family: var(--serif); font-size: calc(26px * var(--ts, 1)); color: var(--head); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: calc(13px * var(--ts, 1)); color: var(--faint); }
.stat.attn .v { color: var(--go); }
.callout { border-radius: 10px; padding: 11px 14px; display: flex; gap: 10px 14px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; font-size: calc(14px * var(--ts, 1)); margin-bottom: 14px; }
.callout > div { min-width: 0; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.info { background: var(--info-soft); color: var(--info); }
.callout.ok { background: var(--ok-soft); color: var(--ok); }
.callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout.plain { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.callout b { font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chips a { border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 11px; font-size: calc(13px * var(--ts, 1)); text-decoration: none; color: var(--muted); }
.chips a:hover { color: var(--ink); background: var(--hover); }
.chips a[aria-current="true"] { background: var(--head); color: var(--surface); border-color: var(--head); }
.section-label { font-size: calc(12px * var(--ts, 1)); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin: 20px 0 8px; font-weight: 600; }
.arrow { color: var(--faint); margin: 0 4px; }
.progress.thin { height: 6px; }
.meter { display: flex; align-items: center; gap: 10px; }
.meter .progress { flex: 1; min-width: 80px; }
.bulkbar { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px;
  background: var(--mast); color: var(--mast-ink); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); }
.bulkbar .faint { color: var(--mast-muted); }
.card-list { display: flex; flex-direction: column; }
.item { display: flex; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: flex-start; }
.item:first-child { border-top: 0; }
.item .body { flex: 1; min-width: 0; }
.item .name { font-weight: 700; color: var(--head); }
.item .aside { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; }
.item input[type=checkbox] { margin-top: 12px; width: 17px; height: 17px; flex: none; }
.quote { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 10px; margin: 6px 0; color: var(--ink); }
@media (max-width: 700px) { .item { flex-wrap: wrap; } .item .aside { align-items: flex-start; width: 100%; } }

/* the Inbox: the list beside the open conversation on a wide screen, one at a time on a narrow one */
.mailsplit { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.mailsplit .pane-list { position: sticky; top: 62px; max-height: calc(100vh - 80px); overflow-y: auto; }
/* a row: its tick, the conversation (a link), and quick actions shown on hover (the team's feedback of 30 Sept, step F) */
.convo { display: flex; align-items: flex-start; gap: 0; border-top: 1px solid var(--line); position: relative; }
.convo:first-child { border-top: 0; }
.convo:hover, .convo:focus-within { background: var(--hover); }
.convo.current { background: var(--sel); box-shadow: inset 3px 0 0 var(--go); }
.convo.ticked { background: var(--info-soft); }
.convo-tick { margin: 14px 0 0 10px; width: 16px; height: 16px; flex: none; accent-color: var(--go); }
.convo-open { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.convo-qa { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px 0 0; opacity: 0; transition: opacity .12s; }
.convo:hover .convo-qa, .convo:focus-within .convo-qa { opacity: 1; }
@media (hover: none) { .convo-qa { display: none; } }
.qa-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); cursor: pointer; padding: 0; }
.qa-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qa-ok { color: var(--ok); } .qa-info { color: var(--info); } .qa-info svg { fill: currentColor; stroke: none; }
.qa-btn:hover { background: var(--hover); }
.inbox-bulk { position: sticky; top: 0; bottom: auto; margin: 0 0 8px; z-index: 6; gap: 8px; padding: 8px 12px; }
.inbox-bulk .ctx-input { max-width: 190px; }
.inbox-bulk .linkish { color: var(--mast-ink); }
.views-g { font-size: calc(11px * var(--ts, 1)); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 2px; }
.views-g:first-child { padding-top: 0; }
.convo .top { display: flex; justify-content: space-between; gap: 8px; font-size: calc(13px * var(--ts, 1)); color: var(--faint); }
.convo .from { font-weight: 600; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .subj { font-weight: 600; font-size: calc(14.5px * var(--ts, 1)); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .snip { font-size: calc(13px * var(--ts, 1)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.convo .from, .convo .subj { font-weight: 500; }
.convo.unread .from, .convo.unread .subj { font-weight: 700; color: var(--head); }
.convo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); display: inline-block; flex: none; }
.read-head { margin-bottom: 12px; }
.read-head h2 { font-size: calc(22px * var(--ts, 1)); margin-top: 2px; }
.people { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: calc(13.5px * var(--ts, 1)); background: var(--surface); }
.person.suggested { border-style: dashed; }
.person a { text-decoration: none; color: var(--head); font-weight: 600; }
.person form { display: inline-flex; gap: 2px; margin: 0; }
.person button { border: 0; background: none; cursor: pointer; padding: 1px 6px; border-radius: 999px; color: var(--faint); font-size: calc(13px * var(--ts, 1)); }
.person button:hover { background: var(--hover); color: var(--ink); }
.only-narrow { display: none; }
@media (max-width: 1100px) {
  .mailsplit { grid-template-columns: 1fr; }
  .mailsplit .pane-list { position: static; max-height: none; }
  .mailsplit.reading .pane-list, .mailsplit:not(.reading) .pane-read { display: none; }
  .only-narrow { display: inline-flex; }
}
.bulkbar .btn:not(.go) { background: transparent; color: var(--mast-ink); border-color: rgba(255,255,255,.4); }
.bulkbar .btn:not(.go):hover { background: rgba(255,255,255,.1); }
.batchsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: bs; }
.batchsteps li { counter-increment: bs; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 12px 48px; position: relative;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--raised); }
.batchsteps li::before { content: counter(bs); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: calc(13px * var(--ts, 1)); background: var(--grey-soft); color: var(--muted); }
.batchsteps li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.batchsteps li form { margin-top: auto; }
@media (max-width: 900px) { .batchsteps { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .shell { align-content: start; } }
/* "Who is invited" on a phone: each row as a card */
@media (max-width: 700px) {
  table.stacked thead { display: none; }
  table.stacked, table.stacked tbody { display: block; }
  table.stacked tr { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.stacked td { display: block; padding: 0; border: 0; min-width: 0 !important; }
  table.stacked td:first-child { grid-row: span 3; padding-top: 2px; }
}

/* ---- faces, the conversation and the reply box */
.ava { border-radius: 50%; object-fit: cover; object-position: top; display: inline-grid; place-items: center; flex: none;
  background: var(--sel); color: var(--head); font-weight: 700; line-height: 1; }
.ava.team { background: var(--head); color: var(--surface); letter-spacing: .02em; }
.linkish { border: 0; background: none; padding: 0; color: var(--info); cursor: pointer; font-size: calc(13px * var(--ts, 1)); text-decoration: underline; }
.pcards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.pcard { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.pcard .body { flex: 1 1 220px; min-width: 0; }
.pcard .name { font-family: var(--serif); font-size: calc(18px * var(--ts, 1)); font-weight: 600; color: var(--head); text-decoration: none; }
.pcard .name:hover { text-decoration: underline; }
.pcard-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pcard.suggested { border-style: dashed; background: var(--raised); }
.pcard.empty { background: var(--raised); }
details.more { margin: 0 0 14px; font-size: calc(14px * var(--ts, 1)); }
details.more > summary { cursor: pointer; color: var(--faint); font-size: calc(13px * var(--ts, 1)); }
.msgs { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.msg2 { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.msg2.out { background: var(--raised); }
.msg2 > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none; }
.msg2 > summary::-webkit-details-marker { display: none; }
.msg2 .who { min-width: 0; display: flex; flex-direction: column; }
.msg2 .who .line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg2[open] .who .preview { display: none; }
.msg2:not([open]) .who .line { display: none; }
.msg2 .who .preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg2 .when { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.msg-body { padding: 2px 18px 16px 64px; font-family: var(--serif); font-size: calc(15.5px * var(--ts, 1)); line-height: 1.65; overflow-wrap: anywhere; }
.msg-body p { margin: 0 0 .7em; }
details.quoted { margin-top: 6px; font-family: var(--sans); font-size: calc(13.5px * var(--ts, 1)); }
details.quoted > summary { cursor: pointer; color: var(--faint); }
details.quoted > div { color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: 10px; margin-top: 6px; }
.composer { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 80px; }
.composer:focus-within { border-color: var(--head); box-shadow: 0 0 0 3px var(--sel); }
.composer-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cfield { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; font-size: calc(14px * var(--ts, 1)); }
.cfield > span { width: 72px; color: var(--faint); flex: none; }
.cfield input, .cfield select { flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 0; outline: none; }
.composer textarea { width: 100%; min-height: 150px; border: 0; resize: vertical; background: transparent; font: calc(15px * var(--ts, 1))/1.6 var(--sans); outline: none; padding: 4px 0; }
.composer-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.composer-foot .grow { flex: 1; }
.convo .face { position: relative; grid-row: span 4; padding-top: 2px; }
.convo .face .dot { position: absolute; right: -1px; top: 0; border: 2px solid var(--surface); width: 11px; height: 11px; }
@media (max-width: 700px) { .msg-body { padding-left: 18px; } .pcard-side { align-items: flex-start; width: 100%; } }
/* Who is invited: a card per scholar */
.frow .decide { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 200px; }
.trail { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: calc(13.5px * var(--ts, 1)); }
.trail li { display: inline-flex; align-items: center; gap: 6px; }
.trail li + li::before { content: ""; width: 18px; height: 1px; background: var(--line-strong); margin: 0 6px; }
.trail .dotm { width: 9px; height: 9px; border-radius: 50%; background: var(--info); flex: none; }
.trail .ok .dotm { background: var(--ok); } .trail .bad .dotm { background: var(--bad); } .trail .again .dotm { background: var(--violet); }
.trail .bad { color: var(--bad); }
@media (max-width: 700px) { .frow .decide { min-width: 0; width: 100%; } }
a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.frow .decide { min-width: 250px; }

/* ---- the Pipeline (Decision 0004): a board of stages, cards to drag, and the review of the mailbox */
.stagebar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.stagebar a { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); text-decoration: none; font-size: calc(13.5px * var(--ts, 1)); }
.stagebar a b { color: var(--head); }
.stagebar a:hover { background: var(--hover); }
.stagebar a[aria-current="true"] { background: var(--head); border-color: var(--head); color: var(--surface); }
.stagebar a[aria-current="true"] b { color: var(--surface); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding: 2px 2px 10px; align-items: start; }
.kcol { background: var(--grey-soft); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; max-height: calc(100vh - 150px); min-height: 180px;
  border: 2px solid transparent; transition: border-color .12s, background .12s; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; font-size: calc(14px * var(--ts, 1)); color: var(--head); }
.kcol-head .count { font-size: calc(12px * var(--ts, 1)); font-weight: 700; color: var(--faint); background: var(--surface); border-radius: 999px; padding: 0 7px; }
.kcol-head .grow { flex: 1; }
.kcol-head form { margin: 0; }
.kcol-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; min-height: 60px; }
.kempty { color: var(--faint); font-size: calc(13px * var(--ts, 1)); text-align: center; padding: 16px 0; margin: 0; }
.board.dragging .kcol[data-stage]:not(.can-drop) { opacity: .55; }
.kcol.can-drop { border-color: var(--line-strong); border-style: dashed; }
.kcol.can-drop.over, .drop.over { border-color: var(--ok); background: var(--ok-soft); }
.drops { display: none; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.board.dragging .drops { display: flex; }
.drop { border: 2px dashed var(--line-strong); border-radius: 8px; padding: 10px; text-align: center; font-size: calc(13px * var(--ts, 1)); color: var(--muted); background: var(--surface); }
.board.dragging .drop:not(.can-drop) { opacity: .4; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 1px rgba(23,34,45,.05); }
.kcard[draggable="true"] { cursor: grab; }
.kcard.dragging { opacity: .45; }
.kcard.busy { opacity: .5; pointer-events: none; }
.kcard.dead { opacity: .7; }
.kcard.just-moved { animation: kflash 1.2s ease-out; }
@keyframes kflash { from { box-shadow: 0 0 0 3px var(--ok); } to { box-shadow: 0 1px 1px rgba(23,34,45,.05); } }
.kc-top { display: flex; gap: 8px; align-items: center; }
.kc-who { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.kc-name { font-weight: 700; color: var(--head); text-decoration: none; font-size: calc(14px * var(--ts, 1)); line-height: 1.25; }
.kc-name:hover { text-decoration: underline; }
.kc-inst { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: calc(12.5px * var(--ts, 1)); color: var(--faint); }
.kc-reply { font-size: calc(12px * var(--ts, 1)); font-weight: 700; color: var(--go); text-decoration: none; white-space: nowrap; align-self: flex-start; }
.kc-reply.kc-review { color: var(--warn); }
.kc-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.kc-tags:empty { display: none; }
.tag-warn { color: var(--warn); border-color: var(--warn); }
.tag-info { color: var(--info); border-color: var(--info); text-decoration: none; }
.kc-reason { font-size: calc(13px * var(--ts, 1)); color: var(--ink); }
.kc-trail { font-size: calc(12.5px * var(--ts, 1)); color: var(--muted); }
.kc-trail .ok, .plist .ok { color: var(--ok); font-weight: 600; }
.kc-trail .bad, .plist .bad { color: var(--bad); font-weight: 600; }
.kc-sugg { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ts, 1)); background: var(--info-soft); color: var(--info);
  border-radius: 8px; padding: 4px 4px 4px 8px; }
.kc-act { display: flex; gap: 6px; flex-wrap: wrap; }
details.moveto > summary { font-size: calc(12px * var(--ts, 1)); color: var(--faint); cursor: pointer; list-style: none; width: max-content; }
details.moveto > summary::-webkit-details-marker { display: none; }
details.moveto > summary:hover { color: var(--ink); }
.moveto-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.moveto-list button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; font-size: calc(12px * var(--ts, 1)); padding: 2px 9px; cursor: pointer; }
.moveto-list button:hover { background: var(--sel); }
.plist .grouprow td { background: var(--raised); font-weight: 700; color: var(--head); font-size: calc(13px * var(--ts, 1)); letter-spacing: .03em; }
.plist .grouprow label { display: inline-flex; gap: 8px; align-items: center; }
.bulkbar select.btn { color: var(--ink); }
/* the review, one scholar at a time */
.rv { display: flex; flex-direction: column; gap: 14px; }
.rv-progress { display: flex; align-items: center; gap: 12px; }
.rv-progress .progress { flex: 1; max-width: 420px; }
.rv-main { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rv-person { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.rv-person .name { font-family: var(--serif); font-size: calc(22px * var(--ts, 1)); font-weight: 600; color: var(--head); text-decoration: none; line-height: 1.2; }
.rv-arrow { margin-top: 10px; padding: 8px 10px; background: var(--info-soft); color: var(--info); border-radius: 8px; font-size: calc(14px * var(--ts, 1)); }
.rv-evidence { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; min-width: 0; }
.rv-list { margin: 0 0 6px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: calc(14px * var(--ts, 1)); }
.rv-actions { position: sticky; bottom: 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.rv-big { font-size: calc(16px * var(--ts, 1)); padding: 9px 16px; }
.rv-choose { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
kbd { font: 600 calc(11px * var(--ts, 1))/1 var(--sans); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 4px; color: var(--muted); background: var(--raised); }
.btn.go kbd { color: var(--go-ink); background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); }
@media (max-width: 900px) { .rv-main { grid-template-columns: 1fr; } .board { grid-auto-columns: minmax(240px, 82vw); } }
.pick { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); cursor: pointer; }
.pick:has(input:checked) { border-color: var(--head); background: var(--sel); }
.pick > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick input { width: auto; }

/* ---- the Inbox as a help desk (Decision 0004): views | list | the conversation beside what the desk knows */
@media (min-width: 901px) {
  .shell.compact { grid-template-columns: 58px minmax(0, 1fr); }
  .shell.compact .rail { padding: 12px 8px; }
  .shell.compact .rail .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .shell.compact .rail .group { font-size: 0; padding: 0; margin: 8px 6px; border-top: 1px solid var(--line); }
  .shell.compact .rail a { justify-content: center; padding: 9px 0; position: relative; }
  .shell.compact .rail a .badge { position: absolute; top: 1px; right: 0; margin: 0; font-size: calc(10.5px * var(--ts, 1)); padding: 0 5px; min-width: 16px; }
  .shell.compact main { padding: 18px 22px 40px; }
}
.inbox3 { display: grid; grid-template-columns: 206px minmax(300px, 370px) minmax(0, 1fr); gap: 14px; align-items: start; }
.inbox3.outgoing { grid-template-columns: 206px minmax(0, 1fr); }
.views { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 86px); overflow-y: auto; }
.views-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.views-h h1 { font-size: calc(24px * var(--ts, 1)); }
.views-list { display: flex; flex-direction: column; gap: 1px; }
.views-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--ink);
  text-decoration: none; font-size: calc(14.5px * var(--ts, 1)); }
.views-list a:hover { background: var(--hover); }
.views-list a[aria-current="page"] { background: var(--sel); color: var(--head); font-weight: 700; box-shadow: inset 3px 0 0 var(--go); }
.views-list .count { font-size: calc(12.5px * var(--ts, 1)); font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.views-list a.due .count { background: var(--go); color: var(--go-ink); border-radius: 999px; padding: 0 7px; }
.views-sep { height: 1px; background: var(--line); margin: 5px 10px; }
.views-filter { display: flex; flex-direction: column; gap: 6px; }
.views-filter input[type=search], .views-filter select { width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(14px * var(--ts, 1)); }
.views .about { margin: 0; }
.inbox3 .pane-list { position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow-y: auto; }
.list-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; font-size: calc(14px * var(--ts, 1)); color: var(--head); }
.seg.small { padding: 2px; border-radius: 8px; }
.seg.small a { padding: 3px 9px; font-size: calc(12.5px * var(--ts, 1)); border-radius: 6px; }
.convo .pill { font-size: calc(11.5px * var(--ts, 1)); padding: 0 7px; }
.pane-read, .pane-out { min-width: 0; }
.pane-read { container-type: inline-size; }
.read-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.read-head h2 { font-size: calc(22px * var(--ts, 1)); margin: 0; }
.reader { display: flex; flex-direction: column; gap: 12px; }
.reader-main { min-width: 0; }
.reader-main .msgs { margin-top: 0; }
.ctx { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ctx-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: calc(14px * var(--ts, 1)); }
.ctx-sec.ctx-ask { border-style: dashed; background: var(--raised); }
.ctx-h, .ctx-sub { font-size: calc(11.5px * var(--ts, 1)); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.ctx-sub { margin-top: 2px; }
.ctx-who { display: flex; gap: 10px; align-items: center; }
.ctx-who .name { font-family: var(--serif); font-size: calc(17px * var(--ts, 1)); font-weight: 600; color: var(--head); text-decoration: none; line-height: 1.2; }
.ctx-who .name:hover { text-decoration: underline; }
.ctx-row label { display: flex; align-items: center; gap: 8px; }
.ctx-row select, .ctx-input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(13.5px * var(--ts, 1)); }
.ctx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: calc(13.5px * var(--ts, 1)); }
.ctx-list li { display: flex; justify-content: space-between; gap: 8px; }
.ctx-list a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx details > summary { cursor: pointer; }
@container (min-width: 860px) {
  .reader { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 14px; }
  .reader-side { order: 2; position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow-y: auto; }
  .ctx { grid-template-columns: 1fr; }
}
/* notes among the emails, and the composer's two tabs */
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: 12px; padding: 10px 14px; }
.note .ava { background: var(--surface); color: var(--warn); }
.note-body { flex: 1; min-width: 0; }
.note-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.note-head form { margin-left: auto; }
.note-text { margin-top: 2px; overflow-wrap: anywhere; }
.compose { display: flex; flex-direction: column; gap: 0; scroll-margin-top: 80px; }
.compose > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.ctabs { display: flex; gap: 2px; }
.ctabs label { padding: 6px 14px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 10px 10px 0 0; cursor: pointer; font-size: calc(14px * var(--ts, 1)); font-weight: 600; color: var(--muted); background: var(--raised); }
.ct-reply:checked ~ .ctabs label[for^="ct-reply"], .ct-note:checked ~ .ctabs label[for^="ct-note"] { background: var(--surface); color: var(--head); }
.ct-note:checked ~ .ctabs label[for^="ct-note"] { background: var(--warn-soft); color: var(--warn); }
.ct-reply:focus-visible ~ .ctabs label[for^="ct-reply"], .ct-note:focus-visible ~ .ctabs label[for^="ct-note"] { outline: 2px solid var(--go); outline-offset: 2px; }
.ct-reply:checked ~ .c-note, .ct-note:checked ~ .c-reply { display: none; }
.ctabs + .composer { border-top-left-radius: 0; }
.c-note { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.c-note:focus-within { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
@media (max-width: 1250px) {
  .inbox3, .inbox3.outgoing { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .views { grid-column: 1 / -1; position: static; max-height: none; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .views-h { padding: 0; }
  .views-list { flex-direction: row; flex-wrap: wrap; gap: 2px; background: var(--grey-soft); padding: 3px; border-radius: 10px; }
  .views-list a { padding: 5px 10px; font-size: calc(13.5px * var(--ts, 1)); }
  .views-list a[aria-current="page"] { background: var(--surface); box-shadow: 0 1px 2px rgba(23,34,45,.14); }
  .views-sep { width: 1px; height: auto; margin: 4px 2px; }
  .views-filter { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .views-filter input[type=search] { flex: 1 1 220px; width: auto; }
  .views-filter select { width: auto; max-width: 100%; }
  .views .about { flex: 1 1 100%; }
  .inbox3.outgoing .pane-out { grid-column: 1 / -1; }
  .inbox3 .pane-list { top: 62px; }
}
@media (max-width: 1100px) {
  .inbox3 { grid-template-columns: minmax(0, 1fr); }
  .inbox3 .pane-list { position: static; max-height: none; }
  .inbox3.reading .pane-list, .inbox3:not(.reading) .pane-read { display: none; }
  .inbox3.reading .views { display: none; }
}
.kc-sugg .btn { white-space: nowrap; flex: none; }

/* ---- Scholars: the directory (directory.js, its styles in directory.css) fills the page beside the narrow menu */
.shell.flush main { padding: 0; }
.shell.flush .messages { margin: 12px 16px 0; }
#dir-loading { padding: 28px 22px; }
/* its PDF: a print view of the ticked scholars, which the browser saves as a PDF (only while it prints) */
#print { display: none; }
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  body.printing { background: #ffffff !important; }
  body.printing > *:not(#print) { display: none !important; }
  body.printing #print { display: block; color: #17222d; font: 9.5pt/1.42 var(--sans); }
  #print .p-head { margin-bottom: 5mm; }
  #print .p-head h1 { margin: 0; font: 500 20pt/1.1 var(--serif); color: #1f3b57; }
  #print .p-head p { margin: 1.5mm 0 0; color: #536170; }
  #print .p-card { display: grid; grid-template-columns: 27mm 1fr; gap: 6mm; padding: 4.5mm 0 3mm; border-top: 1.5pt solid #1f3b57; break-inside: avoid; }
  #print .p-card.nophoto { grid-template-columns: 1fr; }
  #print .p-card > img, #print .p-mono { width: 27mm; height: 36mm; object-fit: cover; object-position: 50% 20%; }
  #print .p-mono { display: grid; place-items: center; background: #eef1f5; color: #7f8d9b; font: 400 20pt var(--serif); }
  #print .p-card h2 { margin: 0; font: 600 13.5pt/1.2 var(--serif); color: #1f3b57; }
  #print .p-sub { margin: .8mm 0 2mm; color: #536170; }
  #print .p-card table { width: 100%; border-collapse: collapse; }
  #print .p-card th { width: 36mm; padding: 1.1mm 3mm 1.1mm 0; vertical-align: top; text-align: left; border: 0;
    font: 600 7pt/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #536170; }
  #print .p-card td { padding: 1.1mm 0; vertical-align: top; border-bottom: .5pt solid #dde3ea; }
}

/* ---- the light / dark switch in the top bar: the moon offers dark, the sun light */
.themebtn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(255,255,255,.28); color: var(--mast-ink);
  border-radius: 6px; padding: 4px 9px; cursor: pointer; font: 600 calc(13px * var(--ts, 1)) var(--sans); }
.themebtn:hover { background: rgba(255,255,255,.1); }
.themebtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.themebtn .moon { fill: currentColor; stroke: none; }
.themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: inline; }
:root[data-theme="dark"] .themebtn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .sun { display: inline; }
  :root:not([data-theme="light"]) .themebtn .moon { display: none; }
}
@media (max-width: 600px) { .themebtn .lbl { display: none; } }

/* ---- Display (top bar): theme, text size, the menu; the fold button at the head of the menu; the keys sheet */
.disp { position: relative; }
.themebtn .aa { fill: none; stroke: currentColor; stroke-width: 1.9; }
.disp-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: min(380px, calc(100vw - 24px)); display: grid; gap: 14px;
  padding: 14px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); }
.disp-panel[hidden] { display: none; }
.disp-row { display: grid; gap: 6px; justify-items: start; }
.disp-l { font-size: calc(12px * var(--ts, 1)); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.disp-l .faint { font-weight: 400; letter-spacing: 0; text-transform: none; margin-left: 4px; }
.disp-keys { justify-self: start; display: inline-flex; gap: 8px; align-items: center; }
.bseg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--grey-soft); border-radius: 10px; }
.bseg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; cursor: pointer; color: var(--muted);
  font: 600 calc(13.5px * var(--ts, 1)) var(--sans); display: inline-flex; align-items: center; justify-content: center; }
.bseg button:hover { color: var(--ink); }
.bseg button[aria-pressed="true"] { background: var(--surface); color: var(--head); box-shadow: 0 1px 2px rgba(23,34,45,.14); }
.bseg button:disabled { opacity: .4; cursor: default; }
.bseg .a1 { font: 700 calc(12px * var(--ts, 1))/1 var(--serif); }
.bseg .a2 { font: 700 calc(18px * var(--ts, 1))/1 var(--serif); }
.bseg .pct { min-width: 58px; font-variant-numeric: tabular-nums; }
.railfold { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 4px; border: 0; border-radius: 8px; background: none;
  color: var(--faint); cursor: pointer; font: inherit; font-size: calc(13.5px * var(--ts, 1)); text-align: left; }
.railfold:hover { background: var(--hover); color: var(--ink); }
.railfold svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell.compact .railfold svg { transform: rotate(180deg); }
@media (min-width: 901px) { .shell.compact .railfold { justify-content: center; padding: 9px 0; } }
@media (max-width: 900px) { .railfold, .disp-row.wide-only { display: none; } }
@media (max-width: 600px) { .disp-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
dialog.keys { max-width: 600px; }
.keys-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.keys-body { padding: 2px 18px 16px; max-height: 72vh; overflow-y: auto; }
.keys-body h3 { margin: 16px 0 8px; }
.keys-body dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 7px 14px; margin: 0; align-items: baseline; }
.keys-body dt { white-space: nowrap; color: var(--faint); font-size: calc(13px * var(--ts, 1)); }
.keys-body dd { margin: 0; }

/* the Inbox, step F: who else is in a conversation, the approved replies, sending with a moment to undo */
.presence { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: calc(13.5px * var(--ts, 1)); margin-bottom: 10px; }
.presence.writing { background: var(--warn-soft); color: var(--warn); }
.read-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.read-actions form { display: contents; }
.snips { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; }
.snips button { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 7px 12px; cursor: pointer; }
.snips button:hover, .snips button:focus { background: var(--hover); }
.snips b { font-size: calc(13.5px * var(--ts, 1)); }
.snips span { font-size: calc(13px * var(--ts, 1)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snips .kind { font-size: calc(11px * var(--ts, 1)); font-weight: 700; color: var(--ok); }
.undo { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; display: flex; gap: 14px; align-items: center; padding: 10px 16px;
  border-radius: 10px; background: var(--mast); color: var(--mast-ink); box-shadow: var(--shadow); font-size: calc(14px * var(--ts, 1)); }
.undo button { border: 0; background: transparent; color: var(--gold); font-weight: 700; text-decoration: underline; cursor: pointer; font: inherit; }
.send-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.send-row select { padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(13.5px * var(--ts, 1)); }
.follow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.follow input[type=date] { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(13.5px * var(--ts, 1)); }
.inbox-bulk[hidden], .presence[hidden], .snips[hidden] { display: none; }
@media (max-width: 1250px) { .views-g { display: none; } }
.kc-ai { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--violet); background: var(--violet-soft); font-size: calc(13px * var(--ts, 1)); }
.kc-ai b { color: var(--violet); }
.kcard .kc-ai { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; }

/* a scholar's whole record on one page (CRM ideas 1-3) */
.rec-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.rec-actions form { margin: 0; }
.rec-pop { position: relative; }
.rec-pop > summary { list-style: none; cursor: pointer; }
.rec-pop > summary::-webkit-details-marker { display: none; }
.rec-pop > form { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(360px, 86vw); box-shadow: var(--shadow); }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .rec-grid { grid-template-columns: minmax(0, 1fr); } }
.rec-next .rec-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rec-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rec-tl li { padding: 9px 0 9px 14px; border-left: 3px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.rec-tl li.rec-in { border-left-color: var(--go); }
.rec-tl li.rec-out { border-left-color: var(--info); }
.rec-tl li.rec-warn { border-left-color: var(--warn); }
.rec-tl li.rec-ok { border-left-color: var(--ok); }
.rec-tl li.rec-note, .rec-tl li.rec-ai { border-left-color: var(--violet); }
.rec-tl-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.rec-tl-h a { color: var(--head); }
.rec-tl-t { color: var(--muted); font-size: calc(14px * var(--ts, 1)); margin-top: 2px; overflow-wrap: anywhere; }

/* Calls: the dedicated phone (the calls plan, 2 Oct 2026) - for the phone's screen first */
.calls-tabs { margin: 4px 0 16px; }
.calls-group { margin-bottom: 16px; }
.calls-group > .pad p { margin: 2px 0 0; }
.calls-group summary { cursor: pointer; }
.calls .call-row { align-items: flex-start; }
.call-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list .call-name b { display: inline; }
.call-hint { margin-top: 4px; color: var(--ink); }
.call-last { margin-top: 2px; font-size: calc(13px * var(--ts, 1)); }
.call-nums { display: flex; flex-direction: column; gap: 6px; min-width: 210px; }
.call-num { display: flex; flex-direction: column; gap: 2px; }
a.dial { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  text-decoration: none; color: var(--head); font-weight: 600; background: var(--surface); }
a.dial svg { width: 18px; height: 18px; stroke: var(--go); fill: none; stroke-width: 1.8; flex: none; }
a.dial:hover { background: var(--hover); }
.call-kind { font-size: calc(12.5px * var(--ts, 1)); padding-left: 14px; }
.call-asleep { color: var(--warn); font-weight: 600; }
.wrongnum { text-decoration: line-through; color: var(--faint); }
.call-focus { border-color: var(--go); }
.calls-foot { margin-top: 8px; max-width: 80ch; }
.calls-filter { margin-bottom: 8px; align-items: flex-end; }
dialog.call-sheet { max-width: 560px; }
.call-sheet [hidden] { display: none !important; }
.call-choices, .call-later { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.call-later { flex-direction: column; }
.call-choices legend, .call-later legend { font-weight: 600; color: var(--head); margin-bottom: 6px; padding: 0; }
.choice { position: relative; display: inline-block; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.choice input:checked + span { background: var(--go); border-color: var(--go); color: var(--go-ink); font-weight: 600; }
.choice input:focus-visible + span { outline: 2px solid var(--go); outline-offset: 2px; }
.call-later input { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.call-script summary { cursor: pointer; font-weight: 600; color: var(--go); }
.call-script .letter { padding: 12px 14px; font-size: calc(15px * var(--ts, 1)); max-height: 40vh; overflow: auto; }
@media (max-width: 640px) {
  .calls .call-row { flex-direction: column; gap: 8px; padding: 12px 14px; }
  .call-nums { min-width: 0; width: 100%; }
  a.dial { width: 100%; min-height: 46px; font-size: calc(16px * var(--ts, 1)); }
  .calls .call-row > .btn { width: 100%; padding: 9px; }
  dialog.call-sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog.call-sheet form { padding: 14px 16px; }
}
.btn > svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; }
.tag-ok { color: var(--ok); border-color: var(--ok); }

/* The Sheet (8 Oct 2026): the scholars in one table, as the team's Mastersheet and Frappe's Report view */
.sheet-views { align-items: center; }
.sheet-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-bar input[type="search"] { flex: 1 1 320px; min-width: 220px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.sheet-bar select, .sheet-views select { padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.sheet-cols-wrap { position: relative; }
.sheet-cols { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 300px; max-height: 60vh; overflow: auto; padding: 10px 12px; box-shadow: var(--shadow); }
.sheet-col-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; }
.sheet-ticked { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; background: var(--sel); border-radius: 10px; }
.sheet-ticked[hidden] { display: none; }
.sheet-main { display: flex; gap: 14px; align-items: flex-start; }
.sheet-side { flex: 0 0 210px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.sheet-side h3 { font-family: var(--sans); font-size: calc(12px * var(--ts, 1)); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 0 0 4px; }
.sheet-side ul { list-style: none; margin: 0; padding: 0; }
.sheet-side-btn { width: 100%; display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 3px 8px; border-radius: 6px; cursor: pointer; color: var(--ink); font: inherit; font-size: calc(13.5px * var(--ts, 1)); text-align: left; }
.sheet-side-btn:hover { background: var(--hover); }
.sheet-side-btn.on { background: var(--sel); font-weight: 600; color: var(--head); }
.sheet-side-btn .num { color: var(--faint); }
.sheet-wrap { flex: 1 1 auto; min-width: 0; overflow: auto; max-height: calc(100vh - 170px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table.sheetgrid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: calc(13.5px * var(--ts, 1)); }
.sheetgrid th, .sheetgrid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; background: var(--surface); }
.sheetgrid thead th { position: sticky; z-index: 3; background: var(--raised); color: var(--head); white-space: nowrap; }
.sheetgrid thead tr:first-child th { top: 0; height: 22px; }
.sheetgrid thead tr.sheet-filters th { top: 35px; padding: 4px 6px; font-weight: 400; }
.sheet-filters input, .sheet-filters select { width: 100%; min-width: 90px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(12.5px * var(--ts, 1)); }
.sheet-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--head); cursor: pointer; white-space: nowrap; }
.sheet-arrow { color: var(--go); }
.sheetgrid .sheet-tick { position: sticky; left: 0; z-index: 2; box-sizing: border-box; width: 40px; min-width: 40px; max-width: 40px; padding: 6px 0; text-align: center; }
.sheetgrid .sheet-first { position: sticky; left: 0; z-index: 2; min-width: 220px; max-width: 280px; box-shadow: 1px 0 0 var(--line-strong); }
.sheetgrid.has-ticks .sheet-first { left: 40px; }
.sheetgrid thead .sheet-tick, .sheetgrid thead .sheet-first { z-index: 4; }
.sheetgrid tbody tr:hover td { background: var(--hover); }
.sheetgrid .sheet-dead td { color: var(--faint); }
.sheet-group th { background: var(--grey-soft) !important; color: var(--head); text-align: left; position: static; }
.sheet-group-l { color: var(--faint); font-weight: 400; }
.sheetgrid td { vertical-align: middle; }
.sheetgrid .cv { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.sheetgrid .c-name .cv { max-width: 270px; }
.sheetgrid .c-designation .cv, .sheetgrid .c-comment .cv, .sheetgrid .c-institution .cv { max-width: 300px; }
.sheetgrid.wrap .cv { white-space: normal; overflow: visible; }
.sheetgrid.wrap .c-designation .cv, .sheetgrid.wrap .c-comment .cv, .sheetgrid.wrap .c-institution .cv { min-width: 220px; }
.sheet-cell-link { color: inherit; text-decoration: none; }
.sheet-cell-link:hover { text-decoration: underline; }
.sheet-cell-btn { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: inherit; }
.sheet-cell-btn:hover { color: var(--info); }
.nowrap { white-space: nowrap; }
.narrow-only { display: none; }
.sheet-ok { color: var(--ok); font-weight: 600; }
.sheet-bad { color: var(--bad); font-weight: 600; }
.sheet-none { padding: 30px; text-align: center; }
@media (max-width: 900px) {
  .narrow-only { display: inline-block; }
  .sheet-main { flex-direction: column; }
  .sheet-side { display: none; position: static; flex: none; width: 100%; max-height: none; flex-direction: row; overflow-x: auto; gap: 18px; }
  .sheet-side.open { display: flex; }
  .sheet-side-sec { min-width: 180px; }
  .sheet-wrap { max-height: 75vh; width: 100%; }
  .sheetgrid .sheet-first { min-width: 150px; }
}
