/* eventrace — light theme
 * Brand: violet #7C3AED → blue #2E9BF0 gradient, carried by the logo mark only.
 * UI accent is the gradient midpoint stepped dark enough for text (7.0:1 on white). */

:root {
  --brand-violet:  #7C3AED;
  --brand-blue:    #2E9BF0;
  --brand-blue-ink:#1F6FD0;   /* readable blue for the shared "t" in the wordmark */

  --bg:            #f6f7fa;
  --surface:       #ffffff;
  --surface-2:     #eff0f6;
  --surface-3:     #e4e6f1;
  --border:        #dee0ea;
  --border-strong: #c3c6d6;
  --ink:           #15161c;
  --ink-2:         #52566a;
  --ink-3:         #7c8095;
  --accent:        #4b3be0;
  --accent-deep:   #3a2cb8;
  --accent-weak:   #ecebfc;
  --accent-line:   #bcb6f4;

  --tech:  #4b3be0;
  --biz:   #b45309;
  --warn:  #b45309;
  --good:  #4b3be0;
  --crit:  #b42318;
  /* Status text, as opposed to --good/--warn/--crit which carry chart and
     chip meaning. Separate because this one has to clear 4.5:1 against the
     card in both themes, and the dark theme's card is dark: the literal
     #0f7a52 these used to be measured 3.34:1 there, which is a status line
     that says "everything is fine" and cannot be read. */
  --ok:    #0f7a52;

  --s1: #ecebfc;
  --s2: #cfcbf6;
  --s3: #a79feb;
  --s4: #6f62df;
  --s5: #4b3be0;

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --r: 6px;
  --shadow: 0 1px 2px rgba(20, 27, 29, .06), 0 4px 12px rgba(20, 27, 29, .05);
  --shadow-lg: 0 8px 40px rgba(20, 27, 29, .16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
button, select, input { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ─────────────────────────────────────────────────────── topbar ─── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 0 20px; height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand .mark { width: 23px; height: 23px; flex: none; display: block; }
.wordmark {
  font-size: 17px; font-weight: 500; letter-spacing: -0.018em;
  color: var(--ink); line-height: 1;
}
.wordmark em { font-style: normal; color: var(--brand-blue-ink); }

/* Workspace switch — the two landing workflows. Deliberately the heaviest
   control in the bar: it changes which job the app is doing, not which page. */
.modeswitch {
  display: flex; flex: none; gap: 2px; padding: 2px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px;
}
.modebtn {
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  padding: 4px 12px; border-radius: 5px;
  color: var(--ink-2); font-size: 12.5px; font-weight: 500;
  text-decoration: none;
}
.modebtn:hover { color: var(--ink); }
.modebtn.is-active {
  background: var(--surface); color: var(--accent-deep);
  box-shadow: 0 1px 2px rgba(20, 27, 29, .1); font-weight: 600;
}

.mainnav { display: flex; gap: 2px; margin-right: auto; }
.navbtn {
  background: none; border: 0; cursor: pointer;
  padding: 6px 11px; border-radius: var(--r);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.navbtn:hover { background: var(--surface-2); color: var(--ink); }
.navbtn.is-active { background: var(--accent-weak); color: var(--accent-deep); }

.select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 5px 10px; font-size: 13px; cursor: pointer;
}
.select:hover { border-color: var(--border-strong); }
.select-sm { padding: 3px 8px; font-size: 12.5px; }

/* min-width:0 on the row AND on each child.
   A flex item refuses to shrink below its content by default, so one long
   address or one wide option label pushes the whole bar past the viewport
   rather than truncating — and the page then scrolls sideways, which is what
   Leadership did once it carried a scope select and a drill select at the
   same time. These let each child give way instead. */
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* Only the things that can lose characters gracefully: a select truncates to
   an ellipsis and an address is already elided. A button label must not —
   "Log out" shrinking to "Log" is not a smaller control, it is a wrong one. */
.who .select, .who .authbox, .who .authuser { min-width: 0; }
.who .select { max-width: 20ch; overflow: hidden; text-overflow: ellipsis; }
.who .authbtn, .who .btn, .who .preview-tag { flex: none; }
.preview-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--warn); border: 1px solid var(--warn); border-radius: var(--r);
  padding: 2px 7px; white-space: nowrap;
}
.authbox { display: flex; align-items: center; gap: 8px; }
.authuser {
  font-size: 12.5px; color: var(--ink-2); max-width: 20ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.authbtn {
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  border-radius: var(--r); padding: 5px 11px; font-size: 12.5px; font-weight: 500;
  color: var(--ink); white-space: nowrap;
}
.authbtn:hover { border-color: var(--border-strong); }
.authbtn:disabled { opacity: .55; cursor: default; }
/* Only applies when auth.js is set to REQUIRE_LOGIN. */
body[data-signed-out] main { display: none; }

/* ───────────────────────────────────────────────────── admin console ─── */
.acard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px;
}
.acard h1 { font-size: 21px; margin-bottom: 4px; }
.acard h2 { font-size: 16px; }
.arow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.arow h2 { margin-right: auto; }
.atext {
  width: 100%; margin-top: 10px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--r);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px;
  resize: vertical;
}
.astatus { font-size: 12.5px; color: var(--ink-2); margin: 10px 0 0; }
.astatus.is-good { color: var(--ok); }
.astatus.is-warn { color: var(--warn); }
.astatus.is-bad  { color: var(--crit); }
.apre {
  margin: 12px 0 0; padding: 11px 13px; max-height: 260px; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); font-size: 11.5px; line-height: 1.5;
}
.atablewrap { overflow-x: auto; margin-top: 12px; }
.atable { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 620px; }
.atable th, .atable td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.atable th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.atable td:first-child { white-space: normal; }
.achanged { color: #b26a00; font-weight: 500; }
.amuted { font-size: 12px; color: var(--ink-2); margin-top: 12px; }

/* ──────────────────────────────────────────────────────── layout ─── */
main { max-width: 1360px; margin: 0 auto; padding: 20px 20px 64px; }
.view { display: none; }
.view.is-active { display: block; }

.viewhead { margin-bottom: 18px; }
.viewhead h1 { font-size: 21px; }
.lede { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }

.stack { display: flex; flex-direction: column; gap: 16px; }

/* ─────────────────────────────────────────────────── identity bar ─── */
.idbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px 18px; margin-bottom: 16px;
}
.idbar .who-name { font-weight: 600; font-size: 15px; }
.idbar .who-sub { color: var(--ink-2); font-size: 12.5px; }
.idbar .idcell { padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--border); }
.idbar .idcell:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.idbar .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 2px;
}
.idbar .val { font-size: 13.5px; font-weight: 500; }
.budgetbar { display: block; width: 132px; height: 5px; background: var(--surface-3);
             border-radius: 100px; margin-top: 6px; }
.budgetbar i { display: block; height: 100%; background: var(--accent); border-radius: 100px; }

/* ─────────────────────────────────────────────────────── filters ─── */
.split { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.filters {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  position: sticky; top: 68px;
}
.filters-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.side-h { font-size: 13px; }
.linkbtn {
  background: none; border: 0; cursor: pointer; padding: 0;
  color: var(--accent); font-size: 12px; text-decoration: underline;
  text-underline-offset: 2px;
}
.fgroup { border: 0; padding: 0; margin: 0 0 16px; }
.fgroup:last-child { margin-bottom: 0; }
.fgroup legend {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); padding: 0; margin-bottom: 7px;
}
.check, .radio {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.8px; padding: 2.5px 0; cursor: pointer; color: var(--ink-2);
}
.check:hover, .radio:hover { color: var(--ink); }
.check input, .radio input { accent-color: var(--accent); margin: 0; flex: none; }
.catgroup { font-weight: 600; font-size: 11.5px; color: var(--ink); margin: 8px 0 3px; }
.catgroup:first-child { margin-top: 0; }
.range { width: 100%; accent-color: var(--accent); margin: 2px 0 0; }
.rangeout { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }

/* ────────────────────────────────────────────────────── search ─── */
.searchrow { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar {
  display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 14px;
}
.toolbar .searchbox { flex: 1 1 280px; }
.inline-field { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }

.searchbox {
  display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 0 11px; height: 34px;
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.searchicon { width: 14px; height: 14px; flex: none; color: var(--ink-3); }
.searchbox input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none;
  font-size: 13.2px; padding: 0;
}
.searchbox input::placeholder { color: var(--ink-3); }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchnote { font-size: 12.2px; color: var(--ink-2); margin: -6px 0 14px; }
.searchnote b { font-weight: 600; color: var(--ink); }

.notice {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--warn); border-radius: var(--r);
  padding: 11px 14px; margin-bottom: 16px;
}
.notice svg { width: 15px; height: 15px; flex: none; color: var(--warn); margin-top: 2px; }
.notice p { font-size: 12.6px; color: var(--ink-2); line-height: 1.5; }
.notice em { font-style: normal; font-family: var(--mono); font-size: 11.8px; color: var(--ink); }

/* ─────────────────────────────────────────────────────── speakers ─── */
.spk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.spkcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.spkcard.is-rel { border-left: 3px solid var(--accent); }

.spk-head { display: flex; gap: 11px; align-items: flex-start; }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent-deep);
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .02em;
}
.avatar.av-headline { background: var(--accent); color: #fff; }
.spk-id { min-width: 0; flex: 1 1 auto; }
.spk-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.spk-role { display: block; font-size: 12.2px; color: var(--ink-2); margin-top: 1px; }
.tierbadge {
  flex: none; font-family: var(--mono); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--border);
  border-radius: 3px; padding: 1.5px 6px; white-space: nowrap;
}
.tierbadge.t-headline { color: var(--accent-deep); border-color: var(--accent-line); background: var(--accent-weak); }
.spk-rel { font-size: 12.2px; color: var(--ink-2); display: flex; align-items: flex-start; gap: 6px; }
.spk-rel svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--accent); }
.spk-rel b { font-weight: 500; color: var(--ink); }

.appears { display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--border); padding-top: 10px; }
.appear {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 5px;
  padding: 8px 10px; cursor: pointer;
}
.appear:hover { border-color: var(--accent-line); background: var(--accent-weak); }
.appear[disabled] { cursor: default; opacity: .8; }
.appear[disabled]:hover { border-color: transparent; background: var(--surface-2); }
.appear-top { display: flex; justify-content: space-between; gap: 9px; align-items: baseline; }
.appear-name { font-size: 12.8px; font-weight: 500; }
.appear-when { display: block; font-size: 11.8px; color: var(--ink-2); margin-top: 2px; }
.appear-session { display: block; font-size: 11.8px; color: var(--ink-3); margin-top: 2px; font-style: italic; }

.status {
  flex: none; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em;
  text-transform: uppercase; padding: 1.5px 6px; border-radius: 3px; white-space: nowrap;
  border: 1px solid var(--border); color: var(--ink-2); background: var(--surface);
}
.st-confirmed   { border-color: var(--accent-line); background: var(--accent-weak); color: var(--accent-deep); }
.st-expected    { border-color: #e3cfa8; background: #fbf3e6; color: #8a5b08; }
.st-unconfirmed { border-color: #e8bdb8; background: #fbeceb; color: #9a2c22; }
.st-past        { border-color: var(--border); background: var(--surface-2); color: var(--ink-3); }

/* ────────────────────────────────────────────────── monthly trend ─── */
.trend { display: flex; gap: 5px; align-items: flex-end; overflow-x: auto; padding-bottom: 3px; }
.tcol { flex: 1 1 0; min-width: 44px; display: flex; flex-direction: column;
        align-items: center; gap: 4px; }
.tval { font-family: var(--mono); font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tplot { display: flex; align-items: flex-end; width: 100%; height: 120px; }
.tbar { display: block; width: 100%; min-height: 2px; background: var(--accent);
        border-radius: 4px 4px 0 0; }
.tlab { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.tsub { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

/* ───────────────────────────────────────────── sortable roster ─── */
.scroller { max-height: 432px; overflow: auto; }
.scroller thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--border); border-bottom: 0;
}
.sortbtn {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.sortbtn:hover { color: var(--ink); }
.sortbtn .car { font-size: 8px; line-height: 1; opacity: 0; }
.sortbtn.is-sorted { color: var(--accent-deep); }
.sortbtn.is-sorted .car { opacity: 1; }
th.r .sortbtn { flex-direction: row-reverse; }

.sharebar { display: block; background: var(--surface-2); height: 6px;
            border-radius: 100px; min-width: 64px; }
.sharebar i { display: block; height: 100%; border-radius: 100px; background: var(--accent); }
.rowtag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; background: var(--accent-weak); color: var(--accent-deep);
  white-space: nowrap; margin-left: 6px;
}
.rowtag.rt-warn { background: #fbf3e6; color: #8a5b08; }

/* ───────────────────────────────────────────────────────── blocks ─── */
.block { margin-bottom: 22px; }
.block:last-child { margin-bottom: 0; }
.block-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.block-head h2 { font-size: 14.5px; }
.count { color: var(--ink-3); font-weight: 400; font-family: var(--mono); font-size: 12.5px; }
.hint { color: var(--ink-3); font-size: 12px; }
.sortwrap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }

/* ────────────────────────────────────────────────────────── cards ─── */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 12px; }
.cards { display: flex; flex-direction: column; gap: 9px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 9px;
  text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit;
}
.card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.card.is-rec { border-left: 3px solid var(--accent); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.card-org { color: var(--ink-3); font-size: 12px; margin-top: 1px; }

.score { display: flex; align-items: center; gap: 7px; flex: none; }
.score-val { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent-deep); }
.score-bar { width: 40px; height: 4px; background: var(--surface-3); border-radius: 100px; }
.score-bar i { display: block; height: 100%; background: var(--accent); border-radius: 100px; }

.card-when { font-size: 12.8px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 5px 9px; align-items: center; }
.card-when .sep { color: var(--border-strong); }

.signals { display: flex; flex-direction: column; gap: 4px; }
.sig {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12.4px; color: var(--ink-2); line-height: 1.45;
}
.sig svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--accent); }
.sig b { font-weight: 500; color: var(--ink); }
.sig.sig-muted svg { color: var(--ink-3); }

.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; border-top: 1px solid var(--border); padding-top: 9px; flex-wrap: wrap;
}
.cost { font-family: var(--mono); font-size: 12.5px; }
.cost b { font-weight: 500; }
.cost .over { color: var(--warn); }

.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag {
  font-size: 11px; padding: 1.5px 7px; border-radius: 3px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.tag-tech { background: var(--accent-weak); color: var(--accent-deep); }
.tag-biz  { background: #f7ece0; color: #8a4208; }

/* The browser's own [hidden] rule is `[hidden] { display: none }` — a single
   attribute selector, which any class that sets a display beats on
   specificity. That is not a corner case here: .navbtn, .preview-tag, .authbtn
   and .btn all set one, so each needed its own [hidden] override and each new
   one was a silent bug waiting — an element marked hidden that stayed on
   screen. !important ends the argument for every element at once. */
[hidden] { display: none !important; }

.btn {
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: var(--r); padding: 5px 13px; font-size: 12.5px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  display: inline-block; text-decoration: none;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border-strong); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-sm { padding: 3px 9px; font-size: 11px; }

.pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; padding: 2.5px 8px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap;
}
.pill-ok { border-color: var(--accent-line); background: var(--accent-weak); color: var(--accent-deep); }
.pill-wait { border-color: #e3cfa8; background: #fbf3e6; color: #8a5b08; }

.empty { color: var(--ink-3); font-size: 13px; padding: 22px; text-align: center;
         background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r); }

/* ───────────────────────────────────────────────────────── panels ─── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
              margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 14.5px; }
.panel-tools { display: flex; align-items: center; gap: 8px; }
.print-only { display: none; }
.loc { white-space: nowrap; }
/* The count of other cities is an aside, not a second place name. */
.locmore { margin-left: 5px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.panel-note { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
              text-transform: uppercase; color: var(--ink-3); }
.panel-sub { color: var(--ink-3); font-size: 12.2px; margin: -8px 0 12px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; margin-bottom: 20px; }
.kpi { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.kpi .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
            text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.kpi .val { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .sub { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.2px; color: var(--ink-2); margin-bottom: 8px; }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }

.split-bar { display: flex; gap: 2px; height: 34px; border-radius: 5px; overflow: hidden; }
.split-bar > div { min-width: 2px; }
.split-labels { display: flex; gap: 2px; font-family: var(--mono); font-size: 12px;
                color: var(--ink-2); margin-top: 6px; }

.hbars { display: grid; grid-template-columns: max-content 1fr max-content max-content;
         row-gap: 7px; column-gap: 11px; align-items: center; }
.hbars .lbl { font-size: 12.5px; color: var(--ink-2); text-align: right; }
.hbars .track { background: var(--surface-2); border-radius: 3px; height: 16px; }
.hbars .bar { display: block; height: 100%; border-radius: 3px; min-width: 2px; background: var(--tech); }
.hbars .val { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.hbars .pct { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

table { border-collapse: collapse; width: 100%; font-size: 12.8px; }
.tblwrap { overflow-x: auto; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th {
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }

.heat { display: grid; gap: 3px; min-width: 560px; }
.heat .hd { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
            color: var(--ink-3); text-align: center; align-self: end; padding-bottom: 4px; }
.heat .rw { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center;
            justify-content: flex-end; padding-right: 9px; white-space: nowrap; }
.heat .cl { border-radius: 3px; text-align: center; padding: 8px 4px;
            font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.ramp { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); margin-top: 9px; }
.ramp i { width: 20px; height: 9px; border-radius: 2px; display: block; }

.meter { display: block; background: var(--surface-2); height: 7px; border-radius: 100px; min-width: 90px; }
.meter i { display: block; height: 100%; border-radius: 100px; background: var(--accent); }

/* ───────────────────────────────────────────────────────── drawer ─── */
.scrim { position: fixed; inset: 0; background: rgba(20, 27, 29, .34); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 94vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); z-index: 50;
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .drawer { transition: transform .18s ease, visibility .18s; }
}
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border); flex: none;
}
.drawer-head h2 { font-size: 16px; line-height: 1.3; }
.drawer-body { overflow-y: auto; padding: 16px 18px 32px; }
.iconbtn {
  background: none; border: 1px solid transparent; border-radius: var(--r);
  padding: 4px; cursor: pointer; color: var(--ink-3); line-height: 0; flex: none;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn svg { width: 17px; height: 17px; }

.dsec { margin-bottom: 20px; }
.dsec:last-child { margin-bottom: 0; }
.dsec h3 {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px; font-weight: 500;
}
.dsec p { font-size: 13px; color: var(--ink-2); }

.breakdown { display: grid; grid-template-columns: max-content 1fr max-content; gap: 6px 10px; align-items: center; }
.breakdown .bl { font-size: 12.5px; color: var(--ink-2); }
.breakdown .bt { background: var(--surface-2); height: 6px; border-radius: 100px; }
.breakdown .bt i { display: block; height: 100%; background: var(--accent); border-radius: 100px; }
.breakdown .bv { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

.costgrid { display: grid; grid-template-columns: 1fr max-content; gap: 4px 14px; font-size: 12.8px; }
.costgrid .k { color: var(--ink-2); }
.costgrid .v { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.costgrid .tot { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 3px; font-weight: 600; }

.edrow {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 6px;
}
.edrow.is-near { border-color: var(--accent-line); background: var(--accent-weak); }
.edrow .ed-city { font-weight: 500; font-size: 13px; }
.edrow .ed-when { font-size: 11.8px; color: var(--ink-2); }
.edrow .ed-right { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.edrow .ed-dist { font-size: 11px; color: var(--ink-3); }

.note {
  background: var(--surface-2); border-radius: var(--r); padding: 10px 12px;
  font-size: 12.6px; color: var(--ink-2); margin-top: 6px;
}
.note .who-line { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }

.stars { color: var(--accent); font-size: 12px; letter-spacing: 1px; }

/* ───────────────────────────────────────────────────────── narrow ─── */
@media (max-width: 1040px) {
  .topbar { gap: 14px; }
}

/* Brand, workspace switch, six nav buttons and a context select run out of room
   well before the rest of the layout does, so the topbar wraps on its own. */
@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap; gap: 10px;
    height: auto; min-height: 52px; padding-bottom: 8px;
  }
  .modeswitch { order: 1; }
  .who { order: 2; margin-left: auto; min-width: 0; }
  .mainnav { order: 3; flex-basis: 100%; margin-right: 0; }
  .topbar .select { max-width: 100%; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 12px 8px; }
  .brand span { display: none; }
  .modebtn { padding: 4px 10px; }
  .topbar .select { max-width: 190px; }
  .spk-grid { grid-template-columns: 1fr; }
  .toolbar { gap: 8px 14px; }
  .mainnav { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .navbtn { white-space: nowrap; }
  main { padding: 14px 12px 48px; }
  .idbar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .idbar .idcell { border-right: 0; padding-right: 0; margin-right: 0; }
  .idbar .idcell:first-child { grid-column: 1 / -1; }
  .filters { position: static; }
  .budgetbar { width: 100%; }
}

.foot {
  max-width: 1360px; margin: 0 auto; padding: 18px 20px 28px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

/* ── admin: watchlist ─────────────────────────────────────────────────────
   Added for the tracked-events section. Reuses .acard / .atable / .astatus;
   only the form grid, the row-level buttons and the checkbox column are new. */
.asub {
  font-size: 13px; font-weight: 600; margin: 22px 0 0;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.acheck { width: 28px; text-align: center; }
.acheck input { margin: 0; cursor: pointer; }

/* A cell that acts like a link but is a real button, so it is reachable by
   keyboard and needs no href that would navigate. */
.alink {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--accent); text-align: left;
}
.alink:hover { text-decoration: underline; }
.alink-danger { color: var(--crit); font-size: 12px; }

/* A watch with no source URL cannot be refreshed; the row says so quietly
   rather than failing only once someone ticks it.
   
   A marker rather than a background wash. The wash was a literal near-white,
   which meant that on the dark theme the one row asking for attention was a
   white slab — the exact failure the token system exists to prevent. */
.aincomplete td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

.afields {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
}
.afield { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.afield > span { color: var(--ink-2); }
.afield em { font-style: normal; color: var(--ink-3); }
.afield input, .afield select {
  font: inherit; font-size: 13px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 7px 9px; width: 100%;
}
.afield input:focus, .afield select:focus,
.acheck input:focus-visible, .alink:focus-visible {
  outline: 2px solid var(--accent-line); outline-offset: 1px;
}
.afield-wide { margin-top: 12px; }
/* A month picker beside a heading, not stacked under a label. */
.afield-inline { flex-direction: row; align-items: center; margin-left: auto; }
/* Role checkboxes read as a set of switches, not a form column. */
.acheckbox {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
  padding: 4px 10px 4px 8px; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--surface);
}
.acheckbox:hover { border-color: var(--border-strong); color: var(--ink); }
.acheckbox input { accent-color: var(--accent); margin: 0; }
/* Role chips in the table: identity at a glance, not a comma list. */
.rolechip {
  display: inline-block; margin-right: 4px; padding: 1px 7px;
  border-radius: 999px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--accent-line); background: var(--accent-weak); color: var(--accent-deep);
}
.rolechip.is-admin { border-color: var(--warn); background: transparent; color: var(--warn); }
/* Status carries meaning, so it gets form as well as colour. */
.pstatus { font-family: var(--mono); font-size: 10.5px; }
.pstatus.is-suspended { color: var(--warn); }
.pstatus.is-invited { color: var(--ink-3); }
.tel-denied { color: var(--warn); }
.tel-allowed { color: var(--ink-3); }
.afield-wide .atext { margin-top: 0; }

/* ── admin: the section menu ───────────────────────────────────────────────
   The console had grown to nine cards on one scroll, which made finding the
   watchlist a matter of remembering roughly how far down it was. A rail on the
   left indexes them and shows one at a time; the counts beside each entry mean
   the menu also answers most of the questions the panels do. */
.alayout {
  display: grid; gap: 20px;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
}
.amenu {
  position: sticky; top: 16px;
  display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 12px;
}
.amenu-group { display: flex; flex-direction: column; gap: 2px; }
.amenu-h {
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 5px 9px;
}
.amenu-item {
  display: flex; align-items: center; gap: 8px;
  font: inherit; font-size: 13px; color: var(--ink-2); text-align: left;
  background: none; border: 0; border-radius: var(--r);
  padding: 7px 9px; cursor: pointer; width: 100%;
}
.amenu-item:hover { background: var(--surface-2); color: var(--ink); }
.amenu-item.is-active { background: var(--accent-weak); color: var(--accent-deep); font-weight: 500; }
.amenu-item:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
/* A count, and — when something needs attention — a colour. Never colour
   alone: the number is the information and the colour is emphasis. */
.amenu-n {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
}
.amenu-n.is-warn { color: var(--warn); font-weight: 600; }
.amenu-item.is-active .amenu-n { color: var(--accent-deep); }
.apanel > .acard:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  /* The rail becomes a strip of chips above the panel rather than a column
     squeezed to nothing. */
  .alayout { grid-template-columns: minmax(0, 1fr); }
  .amenu { position: static; flex-direction: row; flex-wrap: wrap; gap: 10px 16px; }
  .amenu-group { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .amenu-h { margin: 0 4px 0 0; align-self: center; }
  .amenu-item { width: auto; }
}

/* ── admin: newsletter ─────────────────────────────────────────────────────
   Readiness as a list rather than a paragraph. A send has four preconditions
   and three of them fail silently, so each one says its own state. */
.achecks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.acheckline {
  display: flex; align-items: baseline; gap: 9px;
  font-size: 12.5px; color: var(--ink-2);
}
.acheckline b { font-weight: 500; color: var(--ink); min-width: 92px; }
.acheckline .acheckmark { font-family: var(--mono); font-size: 11px; }
.acheckline.is-good .acheckmark { color: var(--ok); }
.acheckline.is-warn .acheckmark { color: var(--warn); }
.acheckline.is-bad  .acheckmark { color: var(--crit); }

/* The preview. White ground whatever the console's theme, because that is the
   ground the email is designed against — showing it on a dark page would be
   previewing something nobody receives. */
.anlframe {
  width: 100%; height: 620px; margin-top: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
}

/* The one card that sends mail to other people. Marked, and its button with
   it, because everything else on this page is reversible and this is not. */
.acard-live { border-color: var(--warn); }
.authbtn-live { border-color: var(--warn); color: var(--warn); font-weight: 500; }
.authbtn-live:hover:not(:disabled) { background: var(--warn); color: var(--surface); border-color: var(--warn); }

.nlreason { font-family: var(--mono); font-size: 10.5px; }
.nlreason.is-new { color: var(--ok); }
.nlreason.is-changed { color: var(--warn); }
.nlreason.is-upcoming { color: var(--ink-3); }

/* A first column that is a timestamp, not prose. `.atable td:first-child`
   wraps by design so a long event name can break; a date must not. */
.atable td.anowrap { white-space: nowrap; }

/* Inline code in admin prose. Used where the guidance names a real URL and the
   difference between two of them is the whole point — an index page and an
   event page differ by one path segment, which is invisible in body text. */
.amuted code, .lede code {
  font-family: var(--mono); font-size: .92em;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 5px;
}

/* ── following a conference ────────────────────────────────────────────────
   The card is itself a <button> — a button inside a button is neither valid
   nor clickable — so the follow control is a sibling, and the wrapper is what
   positions it. Bottom right, clear of the score in the top corner. */
.cardwrap { position: relative; }
.followbtn {
  position: absolute; right: 12px; bottom: 12px;
  font: inherit; font-size: 11.5px; line-height: 1;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--border);
}
.followbtn:hover:not(:disabled) { border-color: var(--accent-line); color: var(--accent-deep); }
.followbtn:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.followbtn:disabled { opacity: .55; cursor: default; }
/* Following is a state, so it gets a filled treatment rather than only a
   colour — the difference has to survive a colourblind reader and a
   screenshot. aria-pressed carries it for everyone else. */
.followbtn.is-on {
  background: var(--accent-weak); color: var(--accent-deep);
  border-color: var(--accent-line); font-weight: 500;
}
/* The foot's last item would otherwise sit under the control. */
.cardwrap .card-foot { padding-right: 92px; }

/* Not yet tracked by anyone. Dashed, because it is an invitation rather than
   a state — following is something you are, tracking is something you start. */
.followbtn.is-new { border-style: dashed; color: var(--ink-3); }
.followbtn.is-new:hover:not(:disabled) { border-style: solid; color: var(--accent-deep); }
