/* AGORA brand (agora.ooo crimson #780000) · font: Inter · day/night themes */
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic-ext-italic.ae340a0bea48.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic-italic.b865cacd5d2d.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-greek-ext-italic.835e02a4d22c.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-greek-italic.d9c48c9af414.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-vietnamese-italic.56a57d7d0e6f.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-italic.426540d878df.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-italic.6960e1e36129.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic-ext.1ccb3a727cc2.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic.9b525081d757.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-greek-ext.f1df20cef90e.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-greek.0e729a968283.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-vietnamese.9b7ac2047bc6.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext.e7fdb0113866.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin.e990806dbc9b.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --ink: #1a1a1a; --ink-2: #4a4a4a; --muted: #6b6b6b; --line: #ebe4e4; --line-2: #f3eeee;  /* muted ≥ 4.5:1 on every light surface */
  --bg: #f7f6f6; --panel: #fff; --card: #fff; --row-alt: #fcfbfb;
  --brand: #780000; --brand-dark: #560000; --brand-2: #a00000; --brand-faint: #f9f0f0; --brand-tint: #fbf4f4;
  --brand-fill: #780000; --brand-fill-hover: #560000; --on-brand: #fff;
  --accent: #a00000; --accent-soft: #e8c5c5; --focus: #a00000;  /* focus rings: ≥ 3:1 on every surface */
  --good: #29784a; --good-bg: #e7f5ec; --warn: #9a5b00; --warn-bg: #fdf1dc; --bad: #b3261e; --bad-bg: #fcebe9;
  --info: #1f5fae; --info-bg: #eaf2fc; --shadow: none;
  --radius: 0; --side: 248px;
  --fs-s: .8462rem; --fs-m: 1rem; --fs-l: 1.1538rem; --fs-xl: 1.4615rem;  /* 11 / 13 / 15 / 19 px – the only sizes */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;  /* spacing scale */
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-optical-sizing: auto; font-feature-settings: "cv11", "ss03"; color: var(--ink);
}
/* Night: "auto" follows the device; the switch can force day or night (stored per device). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ink: #ece7e7; --ink-2: #c9c1c1; --muted: #978d8d; --line: #332c2d; --line-2: #2a2425;
  --bg: #131112; --panel: #1c1819; --card: #1c1819; --row-alt: #201b1c;
  --brand: #f19a9a; --brand-dark: #ffb4b4; --brand-2: #e07a7a; --brand-faint: #3a1d1f; --brand-tint: #2a1e1f;
  --brand-fill: #a00000; --brand-fill-hover: #bd1a1a; --on-brand: #fff;
  --accent: #e07a7a; --accent-soft: #5c2c2e; --focus: #e07a7a;
  --good: #7fd09a; --good-bg: #17301f; --warn: #f0b55a; --warn-bg: #3a2a10; --bad: #ff8b82; --bad-bg: #3d1d1c;
  --info: #8ab8f0; --info-bg: #152a42; --shadow: none;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --ink: #ece7e7; --ink-2: #c9c1c1; --muted: #978d8d; --line: #332c2d; --line-2: #2a2425;
  --bg: #131112; --panel: #1c1819; --card: #1c1819; --row-alt: #201b1c;
  --brand: #f19a9a; --brand-dark: #ffb4b4; --brand-2: #e07a7a; --brand-faint: #3a1d1f; --brand-tint: #2a1e1f;
  --brand-fill: #a00000; --brand-fill-hover: #bd1a1a; --on-brand: #fff;
  --accent: #e07a7a; --accent-soft: #5c2c2e; --focus: #e07a7a;
  --good: #7fd09a; --good-bg: #17301f; --warn: #f0b55a; --warn-bg: #3a2a10; --bad: #ff8b82; --bad-bg: #3d1d1c;
  --info: #8ab8f0; --info-bg: #152a42; --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: 13px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; transition: background-color .15s; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--sp-3); letter-spacing: -0.011em; }
p { margin: 0 0 var(--sp-3); }
h1 { font-size: var(--fs-xl); font-weight: 700; }
h2 { font-size: var(--fs-l); font-weight: 600; }
h3 { font-size: var(--fs-m); font-weight: 600; }
small, .muted { color: var(--muted); }
small { font-size: var(--fs-s); }
code { background: var(--line-2); padding: 1px 5px; border-radius: 0; font-size: .9em; }

/* ---------- sidebar ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: var(--sp-5) var(--sp-3) var(--sp-3); overflow-y: auto; z-index: 20; }
.side .brand { display: block; padding: 0 8px; text-decoration: none; }
.side .brand img { height: 30px; display: block; }
.side .brand span { display: block; color: var(--muted); font-size: var(--fs-s); letter-spacing: .02em; margin-top: 6px; }
.side .brand-rule { height: 3px; border-radius: 0; margin: var(--sp-3) var(--sp-2) var(--sp-4); background: linear-gradient(90deg, var(--brand) 0 55%, var(--brand-2) 55% 80%, var(--accent-soft) 80%); }
.side .switcher { width: 100%; margin-bottom: var(--sp-3); font-weight: 500; }
.side nav { flex: 1; }
.side .side-menu { flex: 1; }
.side .side-menu[hidden] { display: none; }
/* admins: Retreats | AGORA admin */
.side-mode { display: flex; margin: 0 0 var(--sp-3); border: 1px solid var(--line); }
.side-mode button { flex: 1; border: 0; background: transparent; padding: 6px var(--sp-2); font: inherit; font-size: var(--fs-s); font-weight: 600;
  color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.side-mode button[aria-selected="true"] { background: var(--brand-faint); color: var(--brand); }
.side-mode button:hover { color: var(--brand); }
.side nav a { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2); border-radius: 0; color: var(--ink); font-size: var(--fs-m); }
.side nav a i { font-style: normal; width: 18px; text-align: center; color: var(--muted); font-size: var(--fs-m); }
.side nav a:hover { background: var(--brand-tint); text-decoration: none; }
.side nav a.on { background: var(--brand-faint); color: var(--brand); font-weight: 600; }
.side nav a.on i { color: var(--brand); }
.side nav .label { font-size: var(--fs-s); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: var(--sp-4) var(--sp-2) var(--sp-1); }
.side .me { border-top: 1px solid var(--line); margin-top: 14px; padding: 12px 8px 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: var(--fs-m); }
.side .me small { word-break: break-all; }
.badge { margin-left: auto; background: var(--brand-faint); color: var(--brand); border-radius: 0; font-size: var(--fs-s); padding: 1px 7px; font-weight: 600; }

main { padding: var(--sp-5) var(--sp-6) 56px; max-width: 1320px; }
body.has-side main { margin-left: var(--side); }
.mbar, .tabbar, .side-backdrop { display: none; }
@media (max-width: 900px) {
  /* top bar */
  .mbar { display: flex; align-items: center; gap: var(--sp-3); position: sticky; top: 0; z-index: 40; height: 52px; padding: 0 var(--sp-4) 0 var(--sp-2);
    background: var(--panel); border-bottom: 1px solid var(--line); }
  .menu-btn { width: 40px; height: 40px; padding: 10px 9px; border: 0; background: none; display: flex; flex-direction: column; justify-content: space-between; }
  .menu-btn { align-items: stretch; flex: none; }
  .menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .mbar-brand img { height: 20px; display: block; }
  .mbar-title { margin-left: auto; text-align: right; min-width: 0; line-height: 1.2; }
  .mbar-title small, .mbar-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar-title small { font-size: var(--fs-s); color: var(--muted); }
  .mbar-title b { font-size: var(--fs-m); font-weight: 600; }
  /* the menu slides in from the left */
  .side { position: fixed; top: 52px; bottom: 0; left: 0; width: min(86vw, 320px); z-index: 60; transform: translateX(-102%);
    transition: transform .22s ease; box-shadow: none; padding-top: var(--sp-4); -webkit-overflow-scrolling: touch; }
  body.menu-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .side-backdrop { display: block; position: fixed; inset: 52px 0 0 0; z-index: 55; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .side-backdrop { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .side nav a { padding: 9px var(--sp-2); }  /* bigger tap targets */
  .side .brand, .side .brand-rule { display: none; }  /* the top bar already shows the logo */
  .mbar { z-index: 65; }
  body.has-side main { margin-left: 0; }
  main { padding: var(--sp-4) var(--sp-4) var(--sp-6); }
  /* bottom tab bar inside a retreat */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px;
    border: 0; background: none; color: var(--muted); font-size: var(--fs-s); font-weight: 500; line-height: 1.2; text-align: center;
    overflow-wrap: anywhere; text-decoration: none; min-width: 0; }
  .tabbar i { font-style: normal; font-size: 17px; line-height: 1.1; }
  .tabbar .on { color: var(--brand); font-weight: 600; }
  .tabbar .badge { position: absolute; top: 3px; left: 50%; margin-left: 6px; font-size: var(--fs-s); line-height: 1.3; padding: 0 4px; }
  body.has-tabbar main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- page head ---------- */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.head h1 { margin: 0 0 var(--sp-1); }
.head p, .head .muted { margin: 0; color: var(--ink-2); }
.head .actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }

/* ---------- cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: var(--sp-4); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
@media (max-width: 900px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: var(--sp-3) var(--sp-4); color: var(--ink); display: block; }
a.stat:hover { text-decoration: none; background: var(--row-alt); }
.stat.on { background: var(--brand-faint); }
.stat.on .value, .stat.on .label { color: var(--brand); }
.stat .value { font-size: var(--fs-xl); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: var(--fs-m); font-weight: 500; }
.stat .label { font-size: var(--fs-m); color: var(--ink); margin-top: 2px; }
.stat .sub { font-size: var(--fs-s); color: var(--muted); }

/* ---------- buttons ---------- */
.btn, button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 6px var(--sp-3); border-radius: 0; font: inherit; font-size: var(--fs-m); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.btn:hover, button:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.btn.primary, button.primary { background: var(--brand-faint); border-color: var(--brand-faint); color: var(--brand); font-weight: 600; }
.btn.primary:hover, button.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--brand-dark); }
.btn.accent, button.accent { background: var(--brand-faint); border-color: var(--brand-faint); color: var(--brand); font-weight: 600; }
.btn.danger, button.danger { color: var(--bad); }  /* destructive actions read as such: red text, no fill or coloured border */
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.danger:hover, button.danger:hover { background: var(--bad-bg); color: var(--bad); }  /* neutral at rest, red tint on hover */
/* file pickers: the same square, Inter button as the rest instead of the browser's rounded grey one */
input[type=file] { font: inherit; font-size: var(--fs-s); color: var(--ink-2); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 500; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 0; padding: 4px var(--sp-3); margin-right: var(--sp-2); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--brand-tint); color: var(--brand); }
td input[type=file]::file-selector-button { padding: 2px var(--sp-2); margin-right: var(--sp-1); }  /* like .btn.sm in table rows */
.btn.sm, button.sm { padding: 2px var(--sp-2); font-size: var(--fs-s); border-radius: 0; }
button.link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 400; font-size: inherit; }
form.inline { display: inline; margin: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-m); }
th, td { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 600; background: var(--panel); border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.group td { background: var(--brand-faint); font-weight: 600; color: var(--ink); padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
tr.group td small { font-weight: 400; margin-left: 6px; }
td.time { color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; width: 110px; }
td .t { font-weight: 600; }
td.nowrap, th.nowrap { white-space: nowrap; }
td .sub, .sub { color: var(--muted); font-size: var(--fs-m); }
tr.done td { color: var(--muted); }
tr.done td .t { text-decoration: line-through; font-weight: 400; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--brand-tint); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 0; margin-right: 7px; vertical-align: 1px; background: var(--muted); }
.k-plenary { background: var(--brand); } .k-workshop { background: #2563eb; } .k-breakout { background: #0d9488; }
.k-talk { background: #7c3aed; } .k-reflection { background: #16a34a; } .k-social { background: #ea580c; }
.k-meal { background: #d97706; } .k-break, .k-logistics { background: #a3a3a3; }
tr.k-row-break td, tr.k-row-meal td, tr.k-row-logistics td { background: var(--row-alt); }
tr.k-row-break .t, tr.k-row-meal .t, tr.k-row-logistics .t { text-transform: uppercase; letter-spacing: .03em; font-size: var(--fs-m); }

.pill { display: inline-block; font-size: var(--fs-s); font-weight: 600; padding: 2px 9px; border-radius: 0; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.brand { background: var(--brand-faint); color: var(--brand); }
.overdue { color: var(--bad); font-weight: 600; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 5px 12px; border-radius: 0; color: var(--ink-2); font-size: var(--fs-m); border: 1px solid transparent; }
.tabs a.on { background: var(--panel); border-color: var(--line); color: var(--brand); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--brand); }
.tabs a .n { color: var(--muted); margin-left: 4px; font-weight: 400; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 0; margin-bottom: 6px; background: var(--info-bg); color: var(--info); }
.messages li.success { background: var(--good-bg); color: var(--good); }
.messages li.warning { background: var(--warn-bg); color: var(--warn); }
.messages li.error { background: var(--bad-bg); color: var(--bad); }

/* ---------- forms ---------- */
.form > div, .field { margin-bottom: var(--sp-4); }
.form label, .field label { display: block; font-weight: 600; font-size: var(--fs-m); margin-bottom: var(--sp-1); }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=time], input[type=password],
input[type=search], select, textarea {
  width: 100%; padding: 6px var(--sp-2); border: 1px solid var(--line); border-radius: 0; font: inherit; font-size: var(--fs-m); background: var(--panel); color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; margin-right: 6px; accent-color: var(--brand); }
.form .helptext, .helptext { display: block; font-size: var(--fs-s); color: var(--muted); margin-top: var(--sp-1); line-height: 1.4; }
.form ul.errorlist, .errorlist { color: var(--bad); list-style: none; padding: 0; margin: 2px 0; font-size: var(--fs-s); }
.form div:has(> input[type=checkbox]) { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.form div:has(> input[type=checkbox]) label { margin: 0; order: 2; }
.form div:has(> input[type=checkbox]) .helptext { order: 3; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid > .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }
.checklist { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 0; padding: 6px 10px; background: var(--panel); }
.checklist label, .checklist div { font-weight: 400 !important; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filters input[type=search] { width: 260px; }
.filters select { width: auto; min-width: 150px; }
.filters .count { color: var(--muted); font-size: var(--fs-m); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-5); }
fieldset + fieldset { padding-top: var(--sp-4); border-top: 1px solid var(--line-2); }
.form fieldset > div, .form .form-grid > div, .form div:has(> label + input), .form div:has(> label + select), .form div:has(> label + textarea) { margin-bottom: var(--sp-4); }
fieldset legend { font-weight: 600; font-size: var(--fs-s); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 var(--sp-3); padding: 0; color: var(--muted); }

.progress { height: 10px; border-radius: 0; background: var(--line-2); overflow: hidden; display: flex; }
.progress > span { display: block; height: 100%; }
.progress .spent { background: var(--brand-fill); }
.progress .committed { background: var(--brand-2); opacity: .5; }
.progress .planned { background: var(--accent-soft); }
.legend { display: flex; gap: 14px; font-size: var(--fs-s); color: var(--ink-2); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 0; margin-right: 5px; vertical-align: -1px; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: var(--fs-m); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; white-space: pre-line; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.log li { margin-bottom: 6px; font-size: var(--fs-m); }
.mail-body { white-space: pre-wrap; font-family: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 16px; max-height: 600px; overflow: auto; }
.unread td { font-weight: 600; }
iframe.preview { width: 100%; height: 900px; border: 1px solid var(--line); border-radius: 0; background: #fff; color-scheme: light; }
.auth { max-width: 400px; margin: 80px auto; }
.auth-logo { display: block; height: 36px; margin: 0 auto 6px; }
@media print {
  .side, .head .actions, .no-print, .messages { display: none !important; }
  body.has-side main { margin: 0; } main { padding: 0; } .card { border: 0; box-shadow: none; padding: 0; }
  tr.group td { background: #f3f3f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- timeline ---------- */
.countdown { padding: 20px 24px; }
.cd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.cd-nums { display: flex; gap: 34px; }
.cd-nums b { display: block; font-size: var(--fs-xl); font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cd-nums span { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-s); color: var(--ink-2); margin-top: 6px; }
.cd-until { text-align: right; }
.cd-until span { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-s); color: var(--muted); }
.cd-until strong { display: block; font-size: var(--fs-l); }
.cd-until small { color: var(--ink-2); }
.cd-bar { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; font-size: var(--fs-m); }
.cd-bar .progress { height: 8px; }
.cd-bar a.pill:hover { text-decoration: none; }
.nowrap { white-space: nowrap; }

.tl { margin-top: 8px; }
.tl-month { text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-size: var(--fs-m); color: var(--ink-2); padding: 22px 0 8px 6px; }
.tl-item { display: grid; grid-template-columns: 96px 26px 1fr auto; gap: 0 10px; align-items: start; padding: 10px 12px 12px 6px; border-radius: 0; position: relative; }
.tl-item:hover { background: var(--panel); }
.tl-item.is-today { background: var(--brand-tint); }
.tl-item.is-done { opacity: .6; }
.tl-item.is-done .tl-title { text-decoration: line-through; }
.tl-date { text-align: right; color: var(--ink-2); font-size: var(--fs-m); padding-top: 2px; white-space: nowrap; }
.tl-mark { position: relative; align-self: stretch; display: flex; justify-content: center; }
.tl-mark::before { content: ""; position: absolute; top: -12px; bottom: -14px; left: 50%; width: 2px; margin-left: -1px; background: var(--line); }
.tl-mark i { position: relative; margin-top: 4px; width: 14px; height: 14px; background: var(--panel); }
.tl-mark .ring { border-radius: 50%; border: 3px solid var(--brand); }
.tl-mark .diamond { transform: rotate(45deg); border: 3px solid var(--brand); background: var(--brand-faint); width: 13px; height: 13px; }
.tl-mark .late { border-color: var(--bad); }
.tl-mark .diamond.late { background: var(--bad-bg); }
.tl-mark .ok { border-color: var(--good); background: var(--good-bg); }
.tl-title { font-weight: 600; font-size: var(--fs-m); }
.tl-flags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding-top: 2px; }
@media (max-width: 700px) {
  .tl-item { grid-template-columns: 70px 22px 1fr; }
  .tl-flags { grid-column: 3; justify-content: flex-start; margin-top: 4px; }
  .cd-nums b { font-size: var(--fs-xl); } .cd-until { text-align: left; }
}

/* ---------- task groups ---------- */
.send-checks .checks { list-style: none; padding: 0; margin: 8px 0 0; }
.send-checks .checks li { padding: 3px 0; }
.send-checks .checks li > span { display: inline-block; width: 1.2em; font-weight: 600; }
.send-checks .checks li.ok > span { color: var(--good); }
.send-checks .checks li.todo > span { color: var(--warn); }
.mail-status { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
.mail-status .ms { font-size: .72rem; padding: 1px 6px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.mail-status .ms.on { background: var(--good-bg); color: var(--good); }
.mail-status .ms.bad { background: var(--bad-bg); color: var(--bad); }
.mail-status .ms small { font-size: inherit; opacity: .8; }
.inv-list label { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.inv-list .inv-mail { flex-basis: 100%; padding-left: 26px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.task-bar { margin-bottom: 10px; overflow-x: auto; }
.task-filters .task-sort { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: var(--fs-s); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; scroll-snap-type: x proximity; }
.board-col { background: var(--panel); padding: 10px; min-height: 120px; scroll-snap-align: start; }
.board-col h2 { font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .03em; margin: 2px 4px 10px; }
.board-col[data-tone="bad"] h2 { color: var(--bad); }
.board-col.drop { background: var(--brand-faint); }
.board-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.board-card { background: var(--card); border: 1px solid var(--line); padding: 10px 12px; cursor: pointer; }
.board-card[draggable="true"] { cursor: grab; }
.board-card.dragging { opacity: .45; }
.board-card.saving { opacity: .6; }
.board-card.done .t { text-decoration: line-through; color: var(--muted); }
.board-card .t { display: block; font-weight: 500; margin-bottom: 6px; }
.board-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: var(--fs-s); color: var(--ink-2); }
.board-meta + .board-meta { margin-top: 6px; }
.board-add { margin-top: 8px; }
@media (max-width: 720px) { .board { grid-auto-columns: 82%; } }
.task-group { margin-bottom: 16px; }
.tg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 10px; }
.tg-head h2 { margin: 0; text-transform: uppercase; letter-spacing: .03em; font-size: var(--fs-m); }
.task-group table td { padding: 9px 14px; vertical-align: middle; }
.task-group table tr:first-child td { border-top: 1px solid var(--line-2); }

/* ---------- logo per theme, theme switch, footer ---------- */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 0; padding: 2px; gap: 2px; background: var(--bg); }
.theme-switch button { border: 0; background: transparent; color: var(--muted); padding: 3px 9px; border-radius: 0; font-size: var(--fs-s); font-weight: 500; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--brand-faint); color: var(--brand); font-weight: 600; }
.side .foot { border-top: 1px solid var(--line); margin-top: 14px; padding: 10px 8px var(--sp-3); font-size: var(--fs-s); color: var(--muted);
  position: sticky; bottom: calc(-1 * var(--sp-3)); background: var(--panel); margin-bottom: calc(-1 * var(--sp-3)); }  /* stays in view when the menu scrolls */
.side .foot .me { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.side .foot .me > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side .foot .logout-icon { border: 0; background: none; padding: 4px; color: var(--muted); cursor: pointer; display: inline-flex; flex: none; }
.side .foot .logout-icon:hover { color: var(--brand); background: var(--brand-faint); }
.side .foot .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.side .foot a { color: var(--ink-2); }
.side .foot .foot-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side .foot .foot-icon { display: inline-flex; padding: 4px; color: var(--muted); }
.side .foot .foot-icon:hover, .side .foot .foot-icon.on { color: var(--brand); background: var(--brand-faint); }
.side .me { border-top: 0; margin-top: 0; padding: 0 0 10px; }
.changelog h2 { margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--line); }
.changelog h2:first-of-type { border-top: 0; margin-top: 0; }
.changelog li { margin-bottom: 4px; }

/* ---------- right-hand drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(20, 10, 10, .28); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg);
  border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(0,0,0,.14); display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform .24s cubic-bezier(.2,.8,.2,1); }
.drawer.wide .drawer-panel { width: min(860px, 100vw); }
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.drawer-title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-full, .drawer-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 0;
  border: 1px solid transparent; background: transparent; color: var(--muted); font-size: var(--fs-l); padding: 0; text-decoration: none; }
.drawer-full:hover, .drawer-x:hover { background: var(--brand-faint); color: var(--brand); border-color: transparent; text-decoration: none; }
.drawer-x { font-size: var(--fs-xl); line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }
.drawer.loading .drawer-body { opacity: .5; transition: opacity .15s .1s; }
.drawer.loading .drawer-bar { background-image: linear-gradient(90deg, var(--brand-fill) 0 30%, transparent 30%); background-size: 200% 2px; background-repeat: no-repeat; background-position: 0 100%; animation: drawer-load 1s linear infinite; }
@keyframes drawer-load { to { background-position: -200% 100%; } }
.drawer-body .head { margin-bottom: 14px; }
.drawer-body .head h1 { font-size: var(--fs-l); }
.drawer-body .card { max-width: none !important; }
.drawer-body .grid.c2 { grid-template-columns: 1fr; }
.drawer.wide .drawer-body .grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.drawer-lock { overflow: hidden; }
@media (max-width: 700px) { .drawer-panel, .drawer.wide .drawer-panel { width: 100vw; } }

/* ---------- public pages (apply) ---------- */
.public-wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; }
.public-logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 22px; }
.public-logo img { height: 32px; }
.public-logo span { color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; font-size: var(--fs-m); }
.hero-public { background: var(--brand-fill); color: #fff; border-radius: 0; padding: 28px 28px 22px; margin-bottom: 18px; }
.hero-public h1 { font-size: var(--fs-xl); color: #fff; margin: 6px 0 10px; }
.hero-public p, .hero-public li { color: rgba(255,255,255,.92); }
.hero-public ul { padding-left: 18px; margin: 10px 0 0; } .hero-public li { margin-bottom: 4px; }
/* who each tab is for: four short facts on the hero */
.hero-public .who-for { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-5); margin: var(--sp-4) 0;
  padding: var(--sp-4) 0; border-top: 1px solid rgba(255,255,255,.25); border-bottom: 1px solid rgba(255,255,255,.25); }
.hero-public .who-for dt { font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.75); }
.hero-public .who-for dd { margin: 2px 0 0; color: #fff; font-weight: 500; }
.hero-public .hero-switch { margin: var(--sp-3) 0 0; font-size: var(--fs-s); }
.hero-public .hero-switch a { color: #fff; text-decoration: underline; }
@media (max-width: 700px) { .hero-public .who-for { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: var(--fs-s); font-weight: 600; opacity: .8; }
.card .eyebrow { color: var(--brand); opacity: 1; }

/* ---------- contracts ---------- */
.contract { line-height: 1.65; }
.contract h2 { font-size: var(--fs-m); margin: 20px 0 6px; }
.contract blockquote { margin: 0 0 14px; padding: 10px 14px; background: var(--warn-bg); color: var(--warn); border-radius: 0; }
.contract blockquote p { margin: 0; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sig { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 1.6rem; color: var(--ink); border-bottom: 1px solid var(--line); padding: 4px 0; min-height: 2.2rem; }
/* two-column grids set inline (contract, portal settings, questions, chat, invitation editor) stack on phones */
@media (max-width: 900px) { .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; } }
@media print { .contract blockquote { display: none; } }

/* ---------- e-signature envelope ---------- */
@font-face { font-family: "Dancing Script"; font-weight: 600; font-display: swap; src: url("../fonts/dancing-script-latin.c092fca252c5.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC; }
@font-face { font-family: "Dancing Script"; font-weight: 600; font-display: swap; src: url("../fonts/dancing-script-latin-ext.7880332a419a.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+A720-A7FF; }
:root { --sig-ink: #1b2a6b; --tag: #ffd84d; --tag-ink: #3a2c00; }
:root[data-theme="dark"] { --sig-ink: #cfd8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sig-ink: #cfd8ff; } }
.env-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; counter-reset: s; }
.env-steps li { position: relative; padding: 8px 10px 8px 34px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); font-size: var(--fs-m); color: var(--muted); counter-increment: s; }
.env-steps li::before { content: counter(s); position: absolute; left: 9px; top: 9px; width: 18px; height: 18px; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: var(--fs-s); display: grid; place-items: center; font-weight: 600; }
.env-steps li.done { color: var(--ink); border-color: var(--good-bg); }
.env-steps li.done::before { content: "✓"; background: var(--good); color: var(--panel); }
.env-steps small { display: block; color: var(--muted); font-size: var(--fs-s); }
@media (max-width: 800px) { .env-steps { grid-template-columns: 1fr 1fr; } }
.sign-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--tag); color: var(--tag-ink); border-radius: 0; padding: 12px 16px; margin-bottom: 16px; position: sticky; top: 8px; z-index: 5; }
.sign-bar .consent { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-m); margin-top: 6px; cursor: pointer; }
.sign-bar .consent input { margin-top: 3px; }

.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.sig-role { font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.sig-img { display: block; max-height: 70px; max-width: 100%; border-bottom: 1px solid var(--ink-2); padding-bottom: 4px; }
:root[data-theme="dark"] .sig-img { filter: invert(.9) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sig-img { filter: invert(.9) hue-rotate(180deg); } }
.sig-empty { height: 70px; border-bottom: 1px solid var(--ink-2); }
.sig-name { font-weight: 600; margin-top: 6px; }
.sig-title { color: var(--ink-2); }
.sign-tag { height: 70px; width: 100%; justify-content: center; background: var(--tag); color: var(--tag-ink); border: 2px dashed #b38f00; font-weight: 700; border-radius: 0; opacity: .55; }
.sign-tag.ready { opacity: 1; animation: tag-bob 1.6s ease-in-out infinite; }
.sign-tag:hover { color: var(--tag-ink); border-color: #3a2c00; }
.sign-tag.done { background: transparent; border: 0; border-bottom: 1px solid var(--ink-2); opacity: 1; animation: none; padding: 0; justify-content: flex-start; }
.sign-tag.done img { max-height: 66px; max-width: 100%; }
@keyframes tag-bob { 50% { transform: translateY(-3px); } }
.finish-btn:disabled { opacity: .45; cursor: not-allowed; }
.finish-btn.pulse { box-shadow: 0 0 0 4px var(--tag), 0 0 0 6px #b38f00; }
.shake { animation: shake .4s; } @keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,10,10,.4); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel); border-radius: 0; width: min(560px, 100%); padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.sig-pad { position: relative; height: 150px; border: 1px solid var(--line); border-radius: 0; background: var(--bg); touch-action: none; }
.sig-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.sig-line { position: absolute; left: 14px; right: 14px; bottom: 34px; border-bottom: 1px dashed var(--muted); pointer-events: none; }
.audit { list-style: none; padding: 0; margin: 0; } .audit li { padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: var(--fs-m); } .audit li:last-child { border: 0; }

/* ---------- searchable dropdowns (Tom Select) ---------- */
.ts-wrapper.single .ts-control, .ts-wrapper .ts-control { border: 1px solid var(--line); border-radius: 0; padding: 7px 10px; background: var(--panel) !important; color: var(--ink); font: inherit; font-size: var(--fs-m); box-shadow: none; }
.ts-wrapper.focus .ts-control { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.ts-control input { color: var(--ink) !important; font: inherit !important; }
.ts-dropdown { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 0; box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: var(--fs-m); z-index: 70; }
.ts-dropdown .option { padding: 6px 10px; }
.ts-dropdown .active { background: var(--brand-faint); color: var(--brand); }
.ts-dropdown .no-results { padding: 6px 10px; color: var(--muted); }
.ts-wrapper { min-width: 160px; }
.filters .ts-wrapper { width: auto; min-width: 200px; }

/* ---------- notices (toasts) with undo ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 10px; background: #1f1a1b; color: #fff; padding: 10px 10px 10px 14px; border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: var(--fs-m); animation: toast-in .2s ease-out; }
.toast span { flex: 1; }

.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
.toast-undo { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: 3px 10px; font-size: var(--fs-s); }
.toast-undo:hover { background: #fff; color: #1f1a1b; border-color: #fff; }
.toast-x { background: none; border: 0; color: rgba(255,255,255,.6); font-size: var(--fs-l); padding: 0 4px; }
.toast-x:hover { color: #fff; border: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media print { .toasts { display: none; } }

/* ---------- notes & history ---------- */
.note { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.note:last-of-type { border-bottom: 0; }
.note-head { font-size: var(--fs-m); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.note-body { margin-top: 3px; font-size: var(--fs-m); }
.audit li.reverted { opacity: .55; }
.sheet-bar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; }
.sheet-bar input[type=url] { min-width: 420px; flex: 1; }
.page-tabs { border-bottom: 1px solid var(--line); gap: 0; margin: 4px 0 16px; }
.page-tabs a { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 16px; font-weight: 600; background: none !important; }
.page-tabs a.on { border-bottom-color: var(--brand); color: var(--brand); }
.apply-form fieldset { margin-bottom: var(--sp-5); }
.app-field { margin-bottom: var(--sp-4); }
.app-field > label { display: block; font-weight: 600; font-size: var(--fs-m); margin-bottom: 5px; }
.app-field.check .check-row { display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-start; }
.app-field.check .check-row input { flex: none; margin-top: 3px; }
.app-field.check .check-row label { flex: 1; min-width: 0; }
.app-field.check label { font-weight: 400; margin: 0; }
.app-field.check .errorlist { margin-left: 26px; }
.app-field div > div > label { font-weight: 400; display: flex; gap: 6px; align-items: center; }  /* checkbox and radio options */
.word-count { display: block; font-size: var(--fs-s); color: var(--muted); text-align: right; margin-top: 2px; }
.word-count.over { color: var(--bad); font-weight: 600; }
.app-field ul { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; }
.app-field ul label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.req { color: var(--bad); }

/* ---------- Fundraising & Claude ---------- */
.ai-banner { }
.ai-status { margin: 10px 0; padding: 8px 12px; border-radius: 0; font-size: var(--fs-m); background: var(--panel); border: 1px solid var(--line); }
.ai-status.failed { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.ai-status.held { background: var(--warn-bg); color: var(--ink); border-color: transparent; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-head h2 { margin: 0; }
.fit { display: flex; gap: 14px; margin-top: 12px; align-items: flex-start; }
.fit .score { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-l); background: var(--panel); }
.fit .score.good { background: var(--good-bg); color: var(--good); } .fit .score.warn { background: var(--warn-bg); color: var(--warn); } .fit .score.bad { background: var(--bad-bg); color: var(--bad); }
.fit ul { margin: 6px 0; padding-left: 18px; font-size: var(--fs-m); }
.fit ul.plus li::marker { content: "+  "; color: var(--good); } .fit ul.minus li::marker { content: "–  "; color: var(--bad); }
.prose { font-size: var(--fs-m); line-height: 1.55; } .prose p { margin: .5em 0; }
details > summary { cursor: pointer; }
table.found td { vertical-align: top; padding: 10px 6px; border-top: 1px solid var(--line); }
.found-link { border-top: 1px solid var(--line); padding: 10px 0; display: grid; gap: 4px; }
pre.facts { white-space: pre-wrap; font: inherit; font-size: var(--fs-m); color: var(--muted); margin: 0; }
.crumbs { font-size: var(--fs-m); margin: 0 0 4px; color: var(--muted); }
.side .foot .app-version { display: block; margin-top: 8px; font-size: var(--fs-s); color: var(--muted); text-decoration: none; }
.side .foot .app-version:hover { color: var(--accent); }
.crumbbar { display: flex; align-items: center; gap: 4px; margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); min-height: 32px; }
.crumbbar .nav-arrow { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border: 0; background: transparent;
  color: var(--muted); font-size: var(--fs-l); cursor: pointer; }
.crumbbar .nav-arrow:hover:not(:disabled) { background: var(--brand-tint); color: var(--ink); }
.crumbbar .nav-arrow:disabled { opacity: .35; cursor: default; }
.crumbs-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-left: 8px; font-size: var(--fs-s);
  color: var(--muted); min-width: 0; }
.crumbs-trail a { color: var(--muted); text-decoration: none; }
.crumbs-trail a:hover { color: var(--accent); text-decoration: underline; }
.crumbs-trail [aria-current] { color: var(--ink); font-weight: 600; }
.crumbs-trail .sep { opacity: .6; }
@media (max-width: 760px) {
  .crumbbar { margin-top: 0; }
  .crumbs-trail > :not(:nth-last-child(-n+3)) { display: none; }   /* phones: the last two steps */
}
.bar { height: 4px; background: var(--line); border-radius: 0; margin-top: 4px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); }
.section .q-head { font-weight: 600; display: flex; gap: 10px; }
.section .q-head textarea { font-weight: 600; flex: 1; }
.section .qnum { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: var(--fs-s); margin-top: 4px; }
.section .q-meta { display: flex; gap: 10px; align-items: center; justify-content: flex-end; font-size: var(--fs-s); color: var(--muted); margin: 6px 0; }
.section .wc.over { color: var(--bad); font-weight: 600; }
.section .q-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.section .q-actions .instr { flex: 1; min-width: 200px; }
.section .q-actions .danger { margin-left: auto; }
.suggestion { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 0; background: var(--panel); }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 2; }
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Searchable dropdowns: keep the typed text on the same line as the choice ---------- */
.ts-wrapper .ts-control { display: flex; flex-wrap: wrap; align-items: center; min-height: 36px; }
.ts-wrapper .ts-control > input, .ts-wrapper .ts-control > input[type=text] {
  flex: 1 1 4rem; width: auto !important; min-width: 4rem; border: 0 !important; padding: 0 !important; margin: 0 !important;
  background: transparent !important; outline: none !important; box-shadow: none !important; }
.ts-wrapper.single.typing .ts-control > .item { display: none; }  /* while searching, show only what's typed */
.ts-wrapper.single .ts-control::after { border-color: var(--muted) transparent transparent; }

/* ---------- Application form ---------- */
.apply-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; font-size: var(--fs-s); }
.apply-steps a { padding: 4px 10px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); }
.apply-form legend { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-m); letter-spacing: 0; text-transform: none; color: var(--ink); }
.apply-form legend .n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-faint); color: var(--brand); display: grid; place-items: center; font-size: var(--fs-s); }
.form-errors { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 0; margin-bottom: 14px; }
.rank-title { font-size: var(--fs-l); margin: var(--sp-5) 0 var(--sp-2); } .rank-title .sub { font-weight: 400; }
/* The application form is for one kind of event: .apply-page[data-kind] hides the other kind's wording. */
.apply-page[data-kind="retreat"] [data-only="gathering"], .apply-page[data-kind="gathering"] [data-only="retreat"] { display: none !important; }
/* First step of /apply/: choose the kind of event */
.apply-choose { max-width: 820px; margin: 0 auto; }
.apply-choose .eyebrow { color: var(--brand); opacity: 1; }
.apply-choose h1 { font-size: var(--fs-xl); margin: 6px 0 4px; }
.apply-choose > .lead { color: var(--muted); margin: 0 0 var(--sp-4); }
.kind-choices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin: 0 0 var(--sp-5); }
.kind-choice { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; }
.kind-choice:hover { background: var(--brand-tint); text-decoration: none; }
.kind-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.kind-choice b { font-size: var(--fs-l); color: var(--brand); }
.kind-choice .lead { font-size: var(--fs-m); color: var(--ink-2); }
.kind-choice ul { margin: 0; padding-left: 1.1em; font-size: var(--fs-s); color: var(--muted); }
.kind-choice .go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--brand); font-size: var(--fs-m); }
@media (max-width: 640px) { .kind-choices { grid-template-columns: 1fr; } }
.resume-box { background: var(--card); border: 1px solid var(--line); padding: 12px 16px; margin: 0 0 18px; font-size: var(--fs-m); }
.resume-box p { margin: 0 0 6px; }
.resume-form label { display: block; font-size: var(--fs-s); color: var(--muted); margin: 8px 0 4px; }
.resume-row { display: flex; gap: 8px; flex-wrap: wrap; }
.resume-row input { flex: 1; min-width: 200px; }
.apply-actions { position: sticky; bottom: 0; z-index: 3; background: var(--card); margin: 0 calc(-1 * var(--sp-5)) calc(-1 * var(--sp-4)); padding: 8px var(--sp-5);
  border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
/* Wide screens: submit and save sit in the sections menu beside the form (always in view); the bar at the end of the form
   is no longer sticky. Small screens keep a slim sticky bar. */
.apply-side-actions { display: none; }
@media (min-width: 960px) {
  .apply-side-actions { display: flex; flex-direction: column; gap: 8px; margin: var(--sp-4) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); }
  .apply-side-actions button { width: 100%; justify-content: center; }
  .apply-side-actions .sub { font-size: var(--fs-s); color: var(--muted); }
  .apply-page > .apply-steps { max-height: calc(100vh - 2 * var(--sp-4)); overflow-y: auto; }
  .apply-actions { position: static; margin: var(--sp-4) 0 0; padding: var(--sp-4) 0 0; background: none; }
}
@media (max-width: 959px) {
  .apply-actions { gap: 6px; flex-wrap: nowrap; padding: 6px var(--sp-3); margin-left: calc(-1 * var(--sp-3)); margin-right: calc(-1 * var(--sp-3)); }
  .apply-actions button { padding: 7px 8px; font-size: var(--fs-s); line-height: 1.2; white-space: normal; text-align: center; flex: 1 1 0; min-width: 0; justify-content: center; }
  .apply-actions .sub { display: none; }
}
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 0; background: var(--panel); overflow: hidden; }
.input-prefix:focus-within { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.input-prefix > span { padding: 7px 4px 7px 10px; color: var(--muted); font-size: var(--fs-m); white-space: nowrap; background: var(--row-alt); display: flex; align-items: center; }
.input-prefix > input { border: 0 !important; outline: none !important; border-radius: 0; min-width: 0; padding-left: 2px; }
.repeater { margin-top: 6px; }
.repeater .rep-head, .repeater .rep-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr 32px; gap: 8px; align-items: center; }
.repeater.coorg .rep-head, .repeater.coorg .rep-row { grid-template-columns: 1fr 1fr 1.3fr 1.4fr 32px; }
.repeater.budget .rep-head, .repeater.budget .rep-row { grid-template-columns: minmax(170px, 1.2fr) 2fr 130px 32px; }
.repeater.two .rep-head, .repeater.two .rep-row { grid-template-columns: 1fr 1fr 32px; }
.repeater.objectives .rep-head, .repeater.objectives .rep-row { grid-template-columns: 1.2fr 1fr; }
.repeater .rep-head { font-size: var(--fs-s); color: var(--muted); margin-bottom: 4px; }
.repeater .rep-row { margin-bottom: 8px; }
.repeater .rep-row select { padding: 7px 8px; }
.repeater .rep-row input[type=number] { text-align: right; }
.repeater .rep-del { border: 0; background: none; color: var(--muted); font-size: var(--fs-l); line-height: 1; padding: 0; cursor: pointer; }
.repeater .rep-del:hover { color: var(--bad); }
.repeater .num { text-align: right; }
.budget-total { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 4px 28px; margin-top: 12px; padding: 12px 14px; border-radius: 0; background: var(--brand-tint); align-items: start; }
.budget-total > div { display: flex; flex-direction: column; }
.budget-total span { font-size: var(--fs-s); color: var(--muted); }
.budget-total b { font-size: var(--fs-l); font-variant-numeric: tabular-nums; }
.budget-total b.over { color: var(--warn); }
.budget-total .t-rate { grid-column: 1 / -1; }
.legacy-note { margin-top: 8px; font-size: var(--fs-m); color: var(--ink-2); background: var(--row-alt); padding: 8px 10px; border-radius: 0; }
@media (max-width: 640px) {
  .repeater .rep-head { display: none; }
  .repeater .rep-row, .repeater.budget .rep-row { grid-template-columns: 1fr 1fr 32px; }
  .repeater .rep-row > :nth-child(3) { grid-column: 1 / 3; }
  .repeater.two .rep-row > :nth-child(3) { grid-column: auto; }          /* two fields + remove: the × stays on the row */
  .repeater.coorg .rep-row > :nth-child(4) { grid-column: 1 / 3; }      /* LinkedIn gets the full width, × beside it */
  .budget-total { grid-template-columns: 1fr 1fr; }
}

/* ---------- Application detail (side panel and full page) ---------- */
.app-detail { container-type: inline-size; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 16px; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 8px 12px; }
.facts span { display: block; font-size: var(--fs-s); color: var(--muted); } .facts b { font-size: var(--fs-m); }
.app-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@container (max-width: 980px) { .app-cols { grid-template-columns: minmax(0, 1fr); } .jump-score { display: inline-flex; } }
.jump-score { display: none; }   /* one column (phones): the scoring box sits below the application */
.sect-tools { text-align: right; font-size: var(--fs-s); margin: -6px 0 6px; color: var(--muted); }
details.sect > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
details.sect > summary::-webkit-details-marker { display: none; }
details.sect > summary h2 { margin: 0; font-size: var(--fs-m); }
details.sect > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; display: inline-block; }
details.sect[open] > summary::before { transform: rotate(90deg); }
details.sect[open] > summary { margin-bottom: 12px; }
details.sect h4 { margin: 14px 0 4px; font-size: var(--fs-m); color: var(--ink-2); }
details.sect h4:first-of-type { margin-top: 4px; }
.answer { line-height: 1.6; overflow-wrap: anywhere; }
.app-detail .kv { grid-template-columns: minmax(110px, 170px) minmax(0, 1fr); }
.app-detail .kv dd { overflow-wrap: anywhere; white-space: normal; }
.people { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; }
.budget-table { width: 100%; } .budget-table tfoot th { border-top: 2px solid var(--line); }
.app-side .checks { display: flex; flex-direction: column; gap: 6px; }
.app-side .checks label { font-weight: 400; display: flex; gap: 6px; align-items: center; margin: 0; }

/* ---------- Contract template editor ---------- */
.tpl-title { width: min(640px, 100%) !important; font-size: var(--fs-l) !important; font-weight: 700; border-color: transparent !important; padding: 2px 6px !important; margin-left: -6px; background: transparent !important; }
.tpl-title:hover { border-color: var(--line) !important; }
.tpl-active { display: flex; align-items: center; gap: 4px; font-weight: 400; margin: 0 8px 0 0; }
.tpl-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .tpl-panes { grid-template-columns: minmax(0, 1fr); } }
.tpl-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: var(--fs-s); }
.tpl-toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.chip { border: 1px solid var(--line); background: var(--row-alt); border-radius: 0; padding: 3px 10px; font-size: var(--fs-s); color: var(--ink); cursor: pointer; }
.chip:hover { color: var(--brand); background: var(--brand-tint); }
#tpl-body { min-height: 60vh; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-m); line-height: 1.6; resize: none; overflow: hidden; }
.tpl-preview { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.tpl-preview-head { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.app-field.follow-up { margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.field-note { margin-top: 6px; font-size: var(--fs-s, .8571rem); color: var(--warn); }
.ts-wrapper .ts-control, .ts-dropdown, .ts-wrapper.multi .ts-control > div { border-radius: 0 !important; }
.lang-switch { flex: 1 1 100%; } .lang-switch select { width: 100%; padding: 4px 8px; font-size: var(--fs-s); margin-bottom: var(--sp-2); }
.side .foot .row { flex-wrap: wrap; }
td select[name=role] { width: auto; min-width: 160px; padding: 4px 8px; }

/* ---------- Application scoring & dashboard ---------- */
.score-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.score-head h2 { margin: 0; }
.score-big { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.score-big small { font-size: var(--fs-s); font-weight: 500; color: var(--muted); }
.score-big.good { color: var(--good); } .score-big.warn { color: var(--warn); } .score-big.bad { color: var(--bad); } .score-big.none { color: var(--muted); }
.checks-list { list-style: none; padding: 0; margin: var(--sp-3) 0; display: grid; gap: 2px; font-size: var(--fs-s); }
.checks-list li::before { content: "● "; } .checks-list .good::before { color: var(--good); } .checks-list .warn::before { color: var(--warn); }
.checks-list .bad::before { color: var(--bad); } .checks-list .info::before { color: var(--muted); }
.ai-box { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: var(--sp-3) 0; margin-bottom: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ai-box .ai-sum { width: 100%; font-size: var(--fs-m); } .ai-box .ai-sum p { margin: var(--sp-1) 0; }
.ai-box h4 { margin: var(--sp-2) 0 2px; font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ai-box ul, .ai-box ol { margin: 0; padding-left: 18px; }
table.rubric { width: 100%; } table.rubric th, table.rubric td { padding: var(--sp-2) var(--sp-1); border-bottom: 1px solid var(--line-2); }
.rubric .crit { font-weight: 600; } .rubric .w { color: var(--muted); font-weight: 400; font-size: var(--fs-s); }
.rubric .guide { font-size: var(--fs-s); color: var(--muted); line-height: 1.4; margin-top: 2px; }
.rubric .ai-reason { font-size: var(--fs-s); color: var(--ink-2); margin-top: var(--sp-1); }
.rubric .scale, .rubric .scale-head { white-space: nowrap; width: 1%; }
.rubric .scale-head span { display: inline-block; width: 24px; text-align: center; font-weight: 500; }
.rubric .scale label { display: inline-block; margin: 0; cursor: pointer; }
.rubric .scale input { position: absolute; opacity: 0; width: 0; }
.rubric .scale label span { display: inline-block; width: 24px; height: 24px; line-height: 22px; text-align: center; border: 1px solid var(--line); margin-left: -1px; font-size: var(--fs-s); }
.rubric .scale input:checked + span { background: var(--brand-faint); color: var(--brand); font-weight: 700; }
.rubric .scale input:focus-visible + span { outline: 2px solid var(--focus); }
.score-form .rec { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin: var(--sp-3) 0 var(--sp-2); font-size: var(--fs-m); }
.score-form .rec label { font-weight: 400; display: flex; align-items: center; gap: 4px; margin: 0; }
.reviews { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); font-size: var(--fs-m); }
.funnel { display: flex; gap: 2px; min-height: 32px; }
.funnel .seg { display: flex; align-items: center; gap: 4px; padding: 0 var(--sp-2); background: var(--line-2); color: var(--ink); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; min-width: 28px; }
.funnel .seg:hover { text-decoration: none; color: var(--brand); }
.funnel .s-approved { background: var(--good-bg); } .funnel .s-rejected, .funnel .s-withdrawn { background: var(--bad-bg); }
.funnel .s-interview, .funnel .s-review { background: var(--warn-bg); } .funnel .s-new { background: var(--info-bg); }
table.ranking th.crit-col { text-align: center; width: 34px; cursor: help; }
table.ranking td.cell { text-align: center; font-variant-numeric: tabular-nums; font-size: var(--fs-s); }
td.cell.hi { background: var(--good-bg); } td.cell.mid { background: var(--line-2); } td.cell.lo { background: var(--bad-bg); }
.bar-score { width: 60px; height: 6px; background: var(--line-2); display: inline-block; margin-right: 6px; vertical-align: middle; }
.bar-score i { display: block; height: 100%; } .bar-score i.good { background: var(--good); } .bar-score i.warn { background: var(--warn); } .bar-score i.bad { background: var(--bad); }
.flag { margin-right: 3px; font-size: var(--fs-s); cursor: help; } .flag.warn { color: var(--warn); } .flag.bad { color: var(--bad); }
table.countries td { vertical-align: middle; }
.chip-app { display: inline-block; border: 1px solid var(--line); padding: 2px var(--sp-2); margin: 2px 4px 2px 0; font-size: var(--fs-s); color: var(--ink); }
.chip-app.sel { background: var(--good-bg); } .chip-app.out { color: var(--muted); text-decoration: line-through; }

.crit-legend { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); margin: var(--sp-2) 0 0; }

/* ---------- Phones: pages ---------- */
@media (max-width: 700px) {
  .head { flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
  .head .actions { width: 100%; }
  .head .actions .btn, .head .actions button { flex: 1 1 auto; justify-content: center; white-space: normal; text-align: center; }
  h1 { font-size: var(--fs-l); }
  /* stats become one swipeable row of compact boxes */
  .stats { display: flex; overflow-x: auto; gap: var(--sp-2); margin: 0 calc(-1 * var(--sp-4)) var(--sp-4); padding: 0 var(--sp-4) 2px;
    scroll-snap-type: x proximity; scrollbar-width: none; }
  .stats::-webkit-scrollbar { display: none; }
  .stat { flex: 0 0 auto; min-width: 116px; max-width: 170px; padding: var(--sp-2) var(--sp-3); scroll-snap-align: start; }
  .stat .value { font-size: var(--fs-l); }
  .stat .sub { display: none; }
  .card { padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
  .card.flush { padding: 0; }
  th, td { padding: var(--sp-2); }
  .table-wrap, .card.flush { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .filters { flex-wrap: wrap; }
  .filters input[type=search] { flex: 1 1 100%; width: 100%; min-width: 0; }
  .filters select, .filters .ts-wrapper { flex: 1 1 9rem; width: auto; min-width: 9rem; }  /* filters wrap to a new line instead of shrinking */
  .table-wrap td, .card.flush td { white-space: nowrap; }  /* compact rows; the table scrolls sideways */
  .table-wrap td .sub, .card.flush td .sub { white-space: nowrap; }
  .table-wrap td.wrap, .card.flush td.wrap, .table-wrap td.wrap .sub, .card.flush td.wrap .sub { white-space: normal; }  /* the cell people read */
  .table-wrap td.wrap::before, .card.flush td.wrap::before { content: ""; display: block; width: 13rem; }  /* table cells ignore min-width */
  .hide-phone { display: none; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; }
  .kv, .app-detail .kv { grid-template-columns: 1fr; gap: 0; } .kv dt { margin-top: var(--sp-2); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  input, select, textarea { font-size: 16px !important; }  /* stops iOS zooming into fields */
  .drawer-bar { position: sticky; top: 0; }
  .toasts { left: var(--sp-3); right: var(--sp-3); }
}
@media (max-width: 900px) { body.has-tabbar .toasts { bottom: calc(70px + env(safe-area-inset-bottom)); } }
@media (max-width: 900px) { .drawer { z-index: 90; } .drawer-bar { min-height: 52px; } }

/* ---------- App: offline / sync bar ---------- */
.net-bar { position: fixed; left: 50%; transform: translateX(-50%); top: var(--sp-2); z-index: 85; background: var(--brand-faint); color: var(--brand);
  padding: 6px var(--sp-3); font-size: var(--fs-s); max-width: calc(100vw - 24px); text-align: center; }
.net-bar a { color: inherit; text-decoration: underline; }
@media (max-width: 900px) { .net-bar { top: 56px; } }
ol.steps { padding-left: 20px; margin: 0 0 var(--sp-3); display: grid; gap: var(--sp-1); }

/* ---------- All-retreats dashboard ---------- */
.attention h2 { margin-bottom: var(--sp-2); }
.todo { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.todo a { color: var(--brand); }
.retreat-card { color: inherit; text-decoration: none; display: block; }
.retreat-card:hover { text-decoration: none; background: var(--row-alt); }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2); }
.rc-head h2 { margin: 0 0 2px; }
.rc-nums { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); font-size: var(--fs-s); color: var(--muted); }
.rc-nums b { font-size: var(--fs-l); color: var(--ink); } .rc-nums small { color: var(--muted); }
.rc-flags { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-3); }
@media (max-width: 700px) { .filters input[type=search] { min-width: 0; } }

/* ---------- View as (admins only, testing aid) ---------- */
.viewas { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 95; font-size: var(--fs-s); }
.viewas-pill { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-top: 0; padding: 2px var(--sp-3); cursor: default; }
.viewas.on .viewas-pill { background: var(--brand-faint); color: var(--brand); font-weight: 600; }
.viewas-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 280px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: var(--sp-2) 0; }
.viewas:hover .viewas-menu, .viewas:focus-within .viewas-menu { display: block; }
.viewas-title { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-s); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.viewas-menu button, .viewas-menu a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px var(--sp-3); color: var(--ink); font-size: var(--fs-m); }
.viewas-menu button:hover, .viewas-menu a:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.viewas-menu .cur { color: var(--brand); font-weight: 600; }
.viewas-note { padding: 4px var(--sp-3) 6px; color: var(--muted); font-size: var(--fs-s); }
.viewas-menu { max-height: 70vh; overflow-y: auto; }
.viewas-menu small { color: var(--muted); font-weight: 400; }
@media (max-width: 900px) { .viewas { top: 52px; } .viewas-pill { border-top: 1px solid var(--line); }
  main:has(> .viewas) { padding-top: calc(var(--sp-4) + var(--sp-5)); } }  /* keep the pill off the page title */

.stat .value .unit { font-size: var(--fs-s); font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* autosaved drafts: offer to restore unsaved input */
.draft-bar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3);
  background: var(--brand-faint); color: var(--ink); font-size: var(--fs-s); }
.draft-bar span { flex: 1; min-width: 200px; }

/* Gatherings: check-in list, meals table, question threads */
.checkin-list { list-style: none; margin: 0; padding: 0; }
.checkin-list li { border-top: 1px solid var(--line-2); }
.checkin-list li:first-child { border-top: 0; }
.checkin-list form { margin: 0; }
.checkin-btn { display: flex; width: 100%; align-items: center; gap: 14px; padding: 14px 16px; border: 0; background: none; text-align: left; font-size: var(--fs-l); cursor: pointer; }
.checkin-btn:hover { background: var(--brand-tint); color: var(--ink); }
.checkin-box { width: 30px; height: 30px; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line); color: transparent; font-weight: 700; }
.checkin-list li.in .checkin-box { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.checkin-list li.in .checkin-name b { color: var(--good); }
.checkin-name { flex: 1; }
.checkin-name .sub { display: block; font-size: var(--fs-s); }
.quick-table input, .quick-table select { width: 100%; min-width: 90px; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li a { display: block; padding: 12px 16px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.thread-list li.on a, .thread-list li a:hover { background: var(--brand-tint); }
.thread-list .sub { display: block; }
.note-team { border-left: 3px solid var(--brand); padding-left: 10px; }
.faq-edit { border-top: 1px solid var(--line-2); padding: 8px 0; }
.faq-edit summary { cursor: pointer; }
.faq-edit form { display: grid; gap: 6px; margin-top: 8px; }

/* Admin planning dashboard (retreats/_planning.html) */
.rag { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: 0; background: var(--line); }
.rag.red { background: var(--bad); } .rag.amber { background: var(--warn); } .rag.green { background: var(--good); } .rag.done { background: var(--muted); opacity: .5; }
.planning td { vertical-align: top; }
.planning .sub { display: block; margin-top: 3px; }
.reason-red { color: var(--bad); font-weight: 600; }
.attention-list li.tone-bad a, .attention-list li.tone-bad { color: var(--bad); }

/* ---------- MEL surveys ---------- */
.survey { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--sp-3); }
.survey-head { display: flex; gap: var(--sp-3); align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.survey-head h2 { margin: 0; }
.survey-who { margin: 0; }
.survey-problem { margin: 0; color: var(--warn); background: var(--warn-bg); padding: var(--sp-2) var(--sp-3); }
.rate { display: grid; gap: var(--sp-1); }
.rate-bar { position: relative; height: 10px; background: var(--line-2); max-width: 520px; }
.rate-bar span { position: absolute; inset: 0 auto 0 0; background: var(--warn); max-width: 100%; }
.rate-bar.ok span { background: var(--good); }
.rate-bar i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.survey-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: flex-start; }
.survey-send { display: contents; }  /* its note and button join the row of actions */
.survey-send details { flex-basis: 100%; }
.survey-send textarea { max-width: 520px; margin-top: var(--sp-2); }
.survey-people summary, .survey-settings summary { cursor: pointer; }
.survey-people .table-wrap { margin-top: var(--sp-2); }
.survey-settings .form { margin-top: var(--sp-2); max-width: 560px; }

/* ---------- outcomes report ---------- */
.outcome-block { display: grid; gap: var(--sp-3); }
.outcome-block .empty-note { margin: 0; color: var(--ink-2); background: var(--row-alt); padding: var(--sp-3) var(--sp-4); }
.outcome-form { max-width: 760px; }
.outcome-form #id_momentum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1) var(--sp-4); }
.outcome-form #id_momentum label { font-weight: 400; display: flex; gap: var(--sp-2); align-items: baseline; }
.six-table select, .six-table input[type=text] { width: 100%; min-width: 9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) { .outcome-form #id_momentum { grid-template-columns: minmax(0, 1fr); } }

/* preview of the public application form */
.preview-banner { background: var(--warn-bg); color: var(--warn); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.preview-banner a { color: inherit; text-decoration: underline; }

/* ---------- program schedule: days side by side on a time grid; sessions are dragged and resized ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); background: var(--panel); }
.seg a { padding: 5px var(--sp-3); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--brand-tint); color: var(--brand); }
.schedule-help { margin: 0 0 var(--sp-3); max-width: 80ch; }
.schedule-help .help-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .schedule-help .help-touch { display: inline; } .schedule-help .help-pointer { display: none; } }
.schedule-wrap { overflow-x: auto; }
.schedule { --ppm: 1.1px; position: relative; display: grid;
  grid-template-columns: 56px repeat(var(--days), minmax(170px, 1fr));
  grid-template-rows: auto calc((var(--last) - var(--first)) * var(--ppm));
  min-width: calc(56px + var(--days) * 170px); }
.sch-corner, .sch-dayhead { border-bottom: 1px solid var(--line); background: var(--panel); }
.sch-dayhead { padding: var(--sp-2) var(--sp-3); border-left: 1px solid var(--line); font-size: var(--fs-s); color: var(--muted); }
.sch-dayhead b { display: block; color: var(--ink); font-size: var(--fs-m); }
.sch-times { position: relative; }
.sch-times span { position: absolute; right: 8px; top: calc((var(--m) - var(--first)) * var(--ppm)); transform: translateY(-50%);
  font-size: var(--fs-s); color: var(--muted); font-variant-numeric: tabular-nums; }
.sch-times span:first-child { transform: none; }
.sch-times span:last-child:not(:first-child) { transform: translateY(-100%); }
.sch-day { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 100% calc(60 * var(--ppm)), 100% calc(30 * var(--ppm)); }
.sch-block { position: absolute; z-index: 1; top: calc((var(--s) - var(--first)) * var(--ppm));
  height: calc(var(--len) * var(--ppm) - 2px); min-height: 18px;
  left: calc(var(--lane, 0) * 100% / var(--lanes, 1) + 3px); width: calc(100% / var(--lanes, 1) - 6px);
  display: flex; flex-direction: column; gap: 1px; overflow: hidden; padding: 3px 6px 6px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-size: var(--fs-s); line-height: 1.3; cursor: grab; user-select: none; -webkit-user-select: none; }
.sch-block:hover { z-index: 2; border-color: var(--ink-2); text-decoration: none; }
.sch-block:focus-visible { z-index: 3; }
.sch-block.dragging { z-index: 5; cursor: grabbing; outline: 2px solid var(--focus); outline-offset: 0; }
.sch-block.saving { opacity: .6; }
.sch-block.open-end { border-bottom-style: dashed; }
.sch-time { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sch-title { font-weight: 600; overflow-wrap: anywhere; }
.sch-title .dot { margin-right: 5px; }
.sch-meta { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.sch-ghost { position: absolute; left: 3px; right: 3px; height: calc(30 * var(--ppm)); pointer-events: none; z-index: 0;
  background: var(--brand-tint); color: var(--brand); font-size: var(--fs-s); padding: 2px 6px; }
.k-bg-plenary { background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.k-bg-workshop { background: color-mix(in srgb, #2563eb 10%, var(--panel)); }
.k-bg-breakout { background: color-mix(in srgb, #0d9488 10%, var(--panel)); }
.k-bg-talk { background: color-mix(in srgb, #7c3aed 10%, var(--panel)); }
.k-bg-reflection { background: color-mix(in srgb, #16a34a 10%, var(--panel)); }
.k-bg-social { background: color-mix(in srgb, #ea580c 10%, var(--panel)); }
.k-bg-meal { background: color-mix(in srgb, #d97706 10%, var(--panel)); }
.k-bg-break, .k-bg-logistics { background: var(--row-alt); }
.schedule-legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-3); }
.schedule-legend .dot { margin-right: 5px; }
@media print { .schedule-wrap { overflow: visible; } }

/* ---------- questionnaire (MEL survey page) ---------- */
.survey-page { max-width: 680px; margin: 0 auto; padding: 32px 16px 60px; }
.survey-logo { text-align: center; margin: 4px 0 22px; }
.survey-logo img { height: 34px; margin: 0 auto; }
.survey-form { margin-top: var(--sp-4); }
.survey-q { border: 0; padding: 0; margin: 0 0 var(--sp-5); }
.survey-q legend { font-weight: 600; margin-bottom: 10px; padding: 0; text-transform: none; letter-spacing: normal; font-size: var(--fs-m); color: var(--ink, inherit); }
.survey-q .req { color: var(--accent); }
.survey-scale { display: flex; flex-wrap: wrap; gap: 0; }
.survey-goal { margin: 0 0 14px; } .survey-goal .goal-text { margin: 0 0 6px; font-weight: 600; }
.survey-scale label { margin: 0; cursor: pointer; }
.survey-scale input { position: absolute; opacity: 0; width: 0; height: 0; }
.survey-scale label span { display: inline-block; min-width: 48px; padding: 10px 12px; text-align: center; border: 1px solid var(--line); margin-left: -1px; background: var(--card); }
.survey-scale input:checked + span { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.survey-scale input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.survey-scale-labels { display: flex; justify-content: space-between; gap: 12px; max-width: 300px; margin-top: 6px; color: var(--muted); font-size: var(--fs-s); }
.survey-q textarea { width: 100%; }
.survey-q.has-error legend { color: var(--bad); }
.survey-q .error { color: var(--bad); margin: 6px 0 0; font-size: var(--fs-s); }
@media (max-width: 480px) { .survey-scale label span { min-width: 0; width: 20vw; max-width: 56px; padding: 10px 0; } }
.q-list { list-style: decimal; padding-left: 22px; margin: 0; }
.q-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q-list li:last-child { border-bottom: 0; }
.q-list li.empty { display: list-item; color: var(--muted); }
@media (max-width: 600px) { .q-list li { flex-direction: column; } }

/* Platform report (AGORA admin › Platform report): content from core/report/report.json */
.rpt { display: grid; gap: var(--sp-4); }
.rpt h2 { font-size: var(--fs-l); margin: var(--sp-4) 0 0; }
.rpt .sub, .rpt .note { color: var(--muted); margin: 0; max-width: 75ch; }
.rpt code { font: 500 .9em ui-monospace, Menlo, monospace; background: var(--line-2); padding: 1px 4px; }
.rpt .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.rpt .st { background: var(--card); padding: var(--sp-3) var(--sp-4); display: grid; gap: 2px; }
.rpt .st b { font-size: var(--fs-xl); font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.rpt .st span { font-size: var(--fs-s); color: var(--muted); }
.rpt .ws-list { display: grid; gap: var(--sp-3); }
.rpt .ws, .rpt .rm { background: var(--card); border: 1px solid var(--line); padding: var(--sp-4); }
.rpt .ws header { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rpt .ws h3 { font-size: var(--fs-l); margin: 0; }
.rpt .lede { color: var(--ink-2); margin: 6px 0 var(--sp-3); }
.rpt ul.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.rpt ul.checks li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--sp-3); align-items: baseline; padding-top: var(--sp-2); border-top: 1px solid var(--line-2); }
.rpt .chip { display: inline-block; font-size: var(--fs-s); font-weight: 600; padding: 1px 8px; white-space: nowrap; text-align: center; background: var(--line-2); color: var(--ink-2); }
.rpt .s-done { color: var(--good); background: var(--good-bg); }
.rpt .s-progress { color: var(--info); background: var(--info-bg); }
.rpt .s-waiting { color: var(--warn); background: var(--warn-bg); }
.rpt .s-blocked { color: var(--bad); background: var(--bad-bg); }
.rpt .phase { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.rpt .phase:first-child { border-top: 0; padding-top: 0; }
.rpt .ph-when { font-size: var(--fs-s); color: var(--muted); font-variant-numeric: tabular-nums; }
.rpt .phase h3 { font-size: var(--fs-l); margin: 4px 0 6px; color: var(--brand); }
.rpt .phase header p { margin: 0; font-size: var(--fs-s); color: var(--ink-2); }
.rpt .rels { border: 1px solid var(--line); background: var(--card); }
.rpt details.rel + details.rel { border-top: 1px solid var(--line-2); }
.rpt details.rel summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); align-items: baseline; }
.rpt > .rels details.rel summary { grid-template-columns: minmax(0, 1fr) auto; }
.rpt details.rel summary::-webkit-details-marker { display: none; }
.rpt details.rel summary:hover { background: var(--brand-tint); }
.rpt details.rel[open] summary { background: var(--brand-faint); }
.rpt .ver { font: 600 var(--fs-s) ui-monospace, Menlo, monospace; color: var(--brand); }
.rpt .rt { font-weight: 500; }
.rpt .rd { font-size: var(--fs-s); color: var(--muted); font-variant-numeric: tabular-nums; }
.rpt .rb { padding: 4px var(--sp-4) var(--sp-3) 88px; font-size: var(--fs-s); color: var(--ink-2); }
.rpt > .rels .rb { padding-left: var(--sp-4); }
.rpt .rb ul { margin: 6px 0; padding-left: 18px; } .rpt .rb li { margin: 4px 0; } .rpt .rb p { margin: 6px 0; }
.rpt .pending { background: var(--card); border: 1px solid var(--line); padding: var(--sp-4); margin: 0; color: var(--ink-2); }
.rpt .tw { overflow-x: auto; border: 1px solid var(--line); background: var(--card); }
.rpt table.findings { border-collapse: collapse; width: 100%; font-size: var(--fs-s); }
.rpt .findings th { text-align: left; font-weight: 600; color: var(--muted); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); }
.rpt .findings td { padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line-2); vertical-align: top; }
.rpt .findings td.id { font: 600 var(--fs-s) ui-monospace, Menlo, monospace; color: var(--muted); white-space: nowrap; }
.rpt .findings .det { color: var(--ink-2); margin-top: 3px; }
.rpt .findings .where { color: var(--muted); font: var(--fs-s) ui-monospace, Menlo, monospace; margin-top: 4px; word-break: break-all; }
.rpt .sev { font-weight: 600; white-space: nowrap; }
.rpt .v-critical, .rpt .v-high { color: var(--bad); } .rpt .v-medium { color: var(--warn); } .rpt .v-low { color: var(--muted); }
.rpt .roadmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.rpt .rm h3 { font-size: var(--fs-m); color: var(--brand); margin: 0 0 var(--sp-2); }
.rpt .rm ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.rpt .rm-t { display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
.rpt .rm p { margin: 3px 0 0; font-size: var(--fs-s); color: var(--ink-2); }
@media (max-width: 760px) {
  .rpt .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt .phase { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .rpt .roadmap { grid-template-columns: minmax(0, 1fr); }
  .rpt ul.checks li { grid-template-columns: minmax(0, 1fr); gap: 4px; } .rpt ul.checks .chip { justify-self: start; }
  .rpt details.rel summary { grid-template-columns: 56px minmax(0, 1fr); } .rpt .rd { display: none; }
  .rpt .rb { padding: 4px var(--sp-3) var(--sp-3); }
}

/* Platform testing (AGORA admin › Testing) */
.test-start { display: flex; gap: var(--sp-3); align-items: flex-end; flex-wrap: wrap; }
.test-run-head { display: flex; justify-content: space-between; gap: var(--sp-4); align-items: flex-start; flex-wrap: wrap; }
.test-run-head h2 { margin: 0 0 var(--sp-1); }
.test-progress { display: grid; gap: 4px; min-width: 160px; text-align: right; }
.test-progress span { display: block; height: 6px; background: var(--line-2); position: relative; }
.test-progress span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--good); }
.test-tip { color: var(--ink-2); margin: var(--sp-3) 0; max-width: 80ch; }
.test-people code { font-size: var(--fs-s); user-select: all; }
.test-finished { background: var(--good-bg); color: var(--good); }
.test-steps { list-style: none; margin: var(--sp-4) 0; padding: 0; display: grid; gap: var(--sp-2); }
.tstep { background: var(--card); border: 1px solid var(--line); }
.tstep.current { border-color: var(--accent-soft); }
.tstep summary { list-style: none; cursor: pointer; display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); flex-wrap: wrap; }
.tstep summary::-webkit-details-marker { display: none; }
.tstep summary:hover { background: var(--brand-tint); }
.tstep .tnum { width: 28px; height: 28px; display: inline-grid; place-items: center; background: var(--line-2); font-weight: 600; flex: none; }
.tstep.is-passed .tnum { background: var(--good-bg); color: var(--good); }
.tstep.is-failed .tnum { background: var(--bad-bg); color: var(--bad); }
.tstep.is-skipped .tnum { background: var(--warn-bg); color: var(--warn); }
.tstep.current .tnum { background: var(--brand-faint); color: var(--brand); }
.tstep .ttitle { font-weight: 600; flex: 1 1 240px; }
.tstep.is-locked .ttitle, .tstep.is-locked .tnum { color: var(--muted); }
.tstep .tbody { padding: 0 var(--sp-4) var(--sp-4) calc(var(--sp-4) + 28px + var(--sp-3)); }
.tstep .tdo { margin: 0 0 var(--sp-3); padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.tstep .tdo code, .tstep .tbody code { font-size: var(--fs-s); background: var(--line-2); padding: 1px 4px; user-select: all; }
.tchecks { list-style: none; margin: var(--sp-3) 0 var(--sp-1); padding: 0; display: grid; gap: 4px; }
.tchecks li { display: flex; gap: var(--sp-2); }
.tchecks li.ok > span:first-child { color: var(--good); font-weight: 700; }
.tchecks li.no { color: var(--bad); } .tchecks li.no > span:first-child { font-weight: 700; }
.tsmall { font-size: var(--fs-s); margin: 0; }
.tactions { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin-top: var(--sp-3); }
.tskip { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.tskip input { min-width: 200px; }
@media (max-width: 640px) { .tstep .tbody { padding-left: var(--sp-4); } .test-progress { text-align: left; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.test-runs { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.report-lede { margin: 0 0 var(--sp-4); max-width: 80ch; }

/* Application decision: three choices, one open at a time */
.decision .choice { border-top: 1px solid var(--line-2); }
.decision .choice > summary { cursor: pointer; padding: var(--sp-2) 0; list-style: none; display: grid; gap: 2px; }
.decision .choice > summary::-webkit-details-marker { display: none; }
.decision .choice > summary b::before { content: "▸ "; color: var(--muted); }
.decision .choice[open] > summary b::before { content: "▾ "; }
.decision .choice > summary:hover b { color: var(--brand); }
.decision .choice form { padding: 0 0 var(--sp-3); }

/* Image drop zone (invitation header) */
.dropzone { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: var(--sp-5) var(--sp-4);
  border: 1px dashed var(--line); background: var(--panel); cursor: pointer; font-weight: 400; }
.dropzone.over, .dropzone:hover { background: var(--brand-tint); border-color: var(--accent-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-preview { max-width: 100%; max-height: 160px; display: block; }
.dropzone .dz-text { font-weight: 600; color: var(--ink-2); }

/* Quick add (participants, send invitations) */
.quick-add-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr) auto; gap: var(--sp-2); }
.quick-add-form input { min-width: 0; width: 100%; }
@media (max-width: 760px) { .quick-add-form { grid-template-columns: repeat(2, minmax(0,1fr)); } .quick-add-form button { grid-column: 1 / -1; } }

/* Mail: a conversation, one card per message */
.conversation { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.mail-card { background: var(--card); border: 1px solid var(--line); padding: var(--sp-4) var(--sp-5); }
.mail-card.current { border-color: var(--accent-soft); }
.mail-card header { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: flex-start; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.mail-card .mail-date { white-space: nowrap; }
.mail-card .mail-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-atts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.mail-att { border: 1px solid var(--line); padding: 6px 10px; text-decoration: none; }
.mail-reply textarea { min-height: 140px; }
.mail-card .mail-body { border: 0; padding: 0; background: none; }

/* Onboarding: the steps from approval to a running event */
.journey { list-style: none; margin: 0; padding: 0; counter-reset: j; }
.journey li { position: relative; padding: 0 0 var(--sp-3) 34px; counter-increment: j; }
.journey li::before { content: counter(j); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: var(--fs-s); font-weight: 600; display: grid; place-items: center; }
.journey li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--line); }
.journey li.done::before { content: "✓"; background: var(--good-bg); color: var(--good); }
.journey li.now::before { background: var(--brand-faint); color: var(--brand); }
.journey li.now .j-label { font-weight: 600; color: var(--brand); }
.journey li.later .j-label, .journey li.skip .j-label { color: var(--muted); }
.journey li.skip::before { content: "–"; }
.journey form, .journey .btn { margin-top: 4px; }
.journey-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; }
.journey-dots li { width: 10px; height: 10px; background: var(--line-2); }
.journey-dots li.done { background: var(--good); }
.journey-dots li.now { background: var(--brand); }
.journey-dots li.skip { background: transparent; border: 1px dashed var(--line); }

/* Sidebar footer: compact – name and log out on one line, language, theme and report on the next */
.side .foot { margin-top: 10px; padding: 8px 8px 10px; }
.side .foot .me { padding: 0; margin-bottom: 6px; font-size: var(--fs-s); }
.side .foot .me .who { font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.side .foot .row { flex-wrap: nowrap; gap: 6px; margin-bottom: 0; justify-content: flex-start; }
.side .foot .lang-switch { flex: 1 1 auto; min-width: 0; }
.side .foot .lang-switch select { width: 100%; margin: 0; padding: 2px 6px; font-size: var(--fs-s); min-height: 0; height: 26px; }
.side .foot .theme-switch { padding: 1px; flex: none; }
.side .foot .theme-switch button { padding: 2px 7px; line-height: 1.3; }
.side .foot .foot-icon, .side .foot .logout-icon { padding: 4px; }
.side .foot .foot-icon { margin-left: auto; }
.bank-summary { margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4); background: var(--row-alt); }
.bank-summary h3 { margin-top: 0; }
.kv-table td { padding: 2px 12px 2px 0; border: 0; } .kv-table td:first-child { color: var(--muted); }
details.inline-form > summary { list-style: none; display: inline-flex; cursor: pointer; } details.inline-form > summary::-webkit-details-marker { display: none; }
.app-field .tbd { margin-top: 6px; }
.mail-bulk { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; flex-wrap: wrap; }
.mail-bulk[hidden] { display: none; }
.mail-list td.pick { cursor: default; }
.public-wrap.wide { max-width: 1180px; }
.mail-card.agora { background: var(--brand-faint); }

/* Admin calendar */
.cal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-head h2 { margin: 0; }
.cal-legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-days div { padding: 6px 8px; font-size: var(--fs-s); color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 96px; padding: 4px 0 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); min-width: 0; }
.cal-row .cal-cell:last-child { border-right: 0; }
.cal-cell.out { background: var(--row-alt); }
.cal-cell.out .cal-date { color: var(--muted); }
.cal-date { font-size: var(--fs-s); padding: 0 8px 4px; font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-date { color: var(--brand); font-weight: 700; }
.cal-ev { display: block; font-size: var(--fs-s); line-height: 1.5; padding: 0 6px; margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-ev:hover { text-decoration: none; filter: brightness(0.97); }
.cal-ev.retreat { background: var(--brand-faint); color: var(--brand); }
.cal-ev.gathering { background: var(--info-bg); color: var(--info); }
.cal-ev.archived { opacity: .55; }
.cal-legend .cal-ev { display: inline-block; }
.cal-month { font-size: var(--fs-m); margin: var(--sp-3) 0 4px; color: var(--muted); }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal-dot { display: inline-block; width: 8px; height: 8px; vertical-align: middle; }
.cal-dot.retreat { background: var(--brand); } .cal-dot.gathering { background: var(--info); }
@media (max-width: 700px) {
  .cal-cell { min-height: 64px; }
  .cal-ev { font-size: 11px; padding: 0 3px; }
  .cal-days div { padding: 4px; }
}
.mel-results th, .mel-results td { vertical-align: top; }
.mel-results td.num, .mel-results th.num { min-width: 96px; }
.mel-results .overall { background: var(--row-alt); }
.mel-results td.wrap { min-width: 260px; }

/* Platform report › Next steps: items to tick off */
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); max-width: 80ch; }
.next-steps li { background: var(--panel); border: 1px solid var(--line); padding: var(--sp-3); }
.next-steps .step { display: flex; gap: var(--sp-3); align-items: flex-start; margin: 0; }
.next-steps .step-body { flex: 1; min-width: 0; }
.next-steps .step-body p { margin: 4px 0 0; color: var(--ink-2); }
.next-steps .step-body code { word-break: break-all; }
.next-steps details { margin-top: 6px; }
.next-steps textarea { width: 100%; margin: 6px 0; }
.next-steps .tick { flex: none; width: 22px; height: 22px; padding: 0; margin-top: 1px; background: var(--panel); border: 1px solid var(--muted);
  border-radius: 0; cursor: pointer; }
.next-steps .tick:hover { border-color: var(--ink-2); }
.next-steps .tick.on { background: var(--brand-faint); color: var(--brand); }
.next-steps .tick.on::after { content: "✓"; font-weight: 700; }
.next-steps.done li { background: transparent; }
.next-steps.done b { color: var(--muted); font-weight: 600; }
.next-steps .step-note { white-space: pre-line; }

/* Ticket attachments: screenshots as thumbnails, documents as links */
.ticket-files { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.ticket-shot img { display: block; max-width: 220px; max-height: 160px; border: 1px solid var(--line); background: var(--panel); }
.ticket-doc { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line); background: var(--panel); }

/* Application form: an outline of the sections on the left, each ✓ (all required answers given) or ✗ */
.public-wrap.apply-wrap { max-width: 1200px; }
@media (min-width: 960px) {
  .apply-page { display: grid; grid-template-columns: 230px minmax(0, 1fr); column-gap: var(--sp-6); }
  .apply-page > * { grid-column: 2; }
  .apply-page > .apply-steps { grid-column: 1; grid-row: 1 / span 30; align-self: start; position: sticky; top: var(--sp-4);
    flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; }
  .apply-page > .apply-steps a { background: transparent; border: 0; border-left: 2px solid var(--line); padding: 6px 10px; }
  .apply-page > .apply-steps a:hover { background: var(--panel); text-decoration: none; }
}
.apply-steps .outline-title { display: none; font-size: var(--fs-s); color: var(--muted); margin: 0 0 6px 12px; font-weight: 600; }
@media (min-width: 960px) { .apply-steps .outline-title { display: block; } }
.apply-steps a { display: flex; gap: 8px; align-items: baseline; }
.apply-steps .st { flex: none; width: 1em; text-align: center; font-weight: 700; }
.apply-steps a.done .st { color: var(--good); }
.apply-steps a.todo .st { color: var(--muted); }
.apply-steps a.current { background: var(--brand-faint); color: var(--brand); font-weight: 600; }
@media (min-width: 960px) { .apply-page > .apply-steps a.current, .apply-page > .apply-steps a.current:hover { background: var(--brand-faint); } }
.budget-total .t-pp-missing { display: block; font-weight: 400; font-size: var(--fs-s); color: var(--brand); }
.budget-total .t-pp-missing[hidden] { display: none; }
/* jump targets land a little below the top of the screen */
.apply-page .app-field, .apply-page fieldset { scroll-margin-top: 24px; }
/* Statistics */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-4); margin: var(--sp-4) 0; align-items: start; }
.stats-chart { padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.stats-chart .bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.stats-chart .bars span { flex: 1; min-width: 2px; background: var(--brand-2); opacity: .7; }
.stats-chart .bars-axis { display: flex; justify-content: space-between; font-size: var(--fs-s); color: var(--muted); margin-top: 4px; }
.wrap-anywhere { overflow-wrap: anywhere; }
.card .pad { padding: 0 var(--sp-4) var(--sp-3); }
/* Visual text editor (newsletter) */
.rte { border: 1px solid var(--line); background: var(--panel); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--row-alt); }
.rte-bar button { font-size: var(--fs-s); padding: 3px 8px; min-height: 0; background: transparent; border: 1px solid transparent; color: var(--ink); }
.rte-bar button:hover, .rte-bar button:focus-visible { background: var(--brand-faint); color: var(--brand); }
.rte-bar button.b { font-weight: 700; } .rte-bar button.i { font-style: italic; }
.rte-box { min-height: 140px; padding: 10px 12px; outline: none; line-height: 1.55; overflow-wrap: anywhere; }
.rte-box:focus { box-shadow: inset 0 0 0 2px var(--focus); }
.rte-box p { margin: 0 0 .7em; } .rte-box h3 { font-size: var(--fs-l); margin: .6em 0 .4em; }
.rte-box ul, .rte-box ol { margin: 0 0 .7em 1.4em; padding: 0; } .rte-box blockquote { margin: 0 0 .7em; padding-left: 12px; color: var(--ink-2); border-left: 2px solid var(--line); }
.rte-box a { color: var(--brand); text-decoration: underline; }
.mail-track { font-size: var(--fs-s); color: var(--muted); margin-top: 2px; }
.survey-section { margin: var(--sp-6) 0 var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.survey-section h2 { margin: 0 0 4px; font-size: var(--fs-l); }
.survey-section .sub { margin: 0; }
.survey-help { margin: -4px 0 10px; }
.survey-followup { margin-left: var(--sp-4); padding-left: var(--sp-4); border-left: 2px solid var(--line); }
.survey-followup[hidden] { display: none; }
.survey-options { display: grid; gap: 6px; }
.survey-options .check-row { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; cursor: pointer; }
.survey-options .check-row input { flex: none; margin-top: 3px; }
.survey-scale10 label span { min-width: 34px; }
.survey-number { max-width: 160px; }
.survey-scale10 { flex-wrap: nowrap; }
.survey-q { min-width: 0; }   /* a fieldset is as wide as its content by default: the 0–10 row would push the page sideways */
@media (max-width: 480px) { .survey-scale10 label span { width: auto; max-width: none; min-width: 0; flex: 1; padding: 10px 0; } .survey-scale10 label { flex: 1; } }
.survey-scale10 label { flex: 1; }
.survey-scale10 label span { display: block; min-width: 0; padding: 10px 0; }
.result-dist { list-style: none; margin: 0; padding: 0; font-size: var(--fs-s); }
.result-dist li { display: flex; justify-content: space-between; gap: 8px; }
.q-list li { padding-left: calc(var(--depth, 0) * 22px); }
.q-list li.q-section b { text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-s); }
.survey-results { margin-top: var(--sp-4); border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.survey-results h3 { font-size: var(--fs-m); margin: var(--sp-4) 0 var(--sp-2); }
.survey-results h4 { font-size: var(--fs-m); margin: var(--sp-3) 0 4px; }
.results-table tr.follow td:first-child { padding-left: 22px; color: var(--ink-2); }
.results-table .good { color: var(--good); } .results-table .bad { color: var(--bad); }
.dist { display: inline-flex; gap: 2px; align-items: flex-end; height: 34px; }
.dist span { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 16px; height: 100%; }
.dist i { display: block; width: 100%; background: var(--brand-2); opacity: .7; min-height: 1px; }
.dist small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.analysis-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.analysis-theme blockquote { margin: 6px 0; padding-left: 12px; border-left: 2px solid var(--line); color: var(--ink-2); font-style: italic; }
.survey-privacy { background: var(--brand-tint); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0 var(--sp-4); }
.survey-privacy h2 { font-size: var(--fs-m); margin: 0 0 6px; }
.survey-privacy ul { margin: 0; padding-left: 18px; font-size: var(--fs-s); color: var(--ink-2); display: grid; gap: 4px; }
.received-form input[type="date"] { width: auto; display: inline-block; padding: 2px 6px; font-size: var(--fs-s); }
.funding-log h2 { font-size: var(--fs-m); margin: var(--sp-4) 0 var(--sp-2); }
.funding-log h2:first-of-type { margin-top: 0; }
.received-form { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.event-details-preview .prose h2 { font-size: var(--fs-l); margin: var(--sp-3) 0 var(--sp-2); }
.event-details-preview .prose h3 { font-size: var(--fs-m); margin: var(--sp-4) 0 var(--sp-1); }
/* Task blueprint: drag rows to move them; "when" as amount + unit + before/after */
.blueprint-filters label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--muted); }
.blueprint-table .drag-col { width: 28px; padding-right: 0; }
.blueprint-table .drag-handle { cursor: grab; color: var(--muted); letter-spacing: -2px; user-select: none; }
.blueprint-table tr[draggable="true"] { cursor: grab; }
.blueprint-table tr.dragging { opacity: .5; background: var(--brand-tint); }
.when-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.when-row input { max-width: 110px; }
.when-row select { width: auto; flex: 0 1 auto; }
.form .field.check-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form .field.check-row input { width: auto; flex: none; }
.form .field.check-row .helptext { flex-basis: 100%; margin-top: 0; }
.field-warning { margin: 8px 0 0; padding: 8px 12px; background: var(--brand-tint); color: var(--ink); font-size: var(--fs-s); }
tr.row-link { cursor: pointer; } tr.row-link:hover td { background: var(--brand-tint); }
.agora-signature .sig-preview { display: flex; gap: var(--sp-4); align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.agora-signature .sig-preview img { max-width: 280px; max-height: 90px; background: #fff; padding: 6px 10px; border: 1px solid var(--line); }
/* the platform's own confirmation dialog (static/js/app.js) */
.confirm-modal { z-index: 90; }
.confirm-modal .modal-card { width: min(460px, 100%); }
.confirm-modal .confirm-text { margin: 0 0 var(--sp-4); font-size: var(--fs-m); line-height: 1.5; white-space: pre-line; }
.confirm-modal .confirm-actions { justify-content: flex-end; margin: 0; }

/* Assistant (admins) */
.assistant { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: var(--sp-4); align-items: start; }
.assistant-thread { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.assistant-msg { background: var(--card); border: 1px solid var(--line); padding: var(--sp-3) var(--sp-4); min-width: 0; }
.assistant-msg.from-user { background: var(--brand-tint, var(--panel)); }
.assistant-msg .text, .assistant-proposal .summary { white-space: normal; overflow-wrap: anywhere; }
.assistant-proposal { margin: var(--sp-2) 0 0; padding: var(--sp-3); }
.assistant-list { display: grid; gap: 2px; padding: var(--sp-3); }
.assistant-list h2 { font-size: var(--fs-m); margin: 0 0 6px; }
.assistant-list a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; text-decoration: none; color: var(--ink-2); overflow-wrap: anywhere; }
.assistant-list a.on, .assistant-list a:hover { background: var(--panel); color: var(--brand); }
@media (max-width: 860px) { .assistant { grid-template-columns: minmax(0, 1fr); } .assistant-list { order: -1; } }

/* Application: score each part right after reading it */
.section-scores { margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.section-scores h4 { margin: 0 0 4px; }
.sec-crit { padding: 8px 0; border-top: 1px solid var(--line-2); }
.sec-crit:first-of-type { border-top: 0; }
.sec-crit .guide { color: var(--muted); font-size: var(--fs-s); margin-top: 2px; }
.ai-take { margin: 6px 0 4px; padding: 6px 10px; background: var(--brand-tint); font-size: var(--fs-s); }
.sec-scale { display: flex; gap: 6px; margin-top: 6px; max-width: 560px; }
.sec-scale button { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; align-items: center; gap: 1px; padding: 6px 4px; text-align: center; }
.sec-scale button b { font-size: var(--fs-l); line-height: 1.1; }
.sec-scale button small { font-size: 11px; line-height: 1.2; color: var(--muted); font-weight: 400; }
.sec-scale button.on small { color: var(--brand); }
@media (max-width: 480px) { .sec-scale button small { display: none; } }
.sec-scale button.on { background: var(--brand-faint); color: var(--brand); font-weight: 700; }
.sec-scale button { position: relative; }
.sec-scale button.ai::after { content: "✦"; position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--brand); }

/* Follow-ups */
.fu-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-5); align-items: start; }
.fu-side .card { padding: var(--sp-3) var(--sp-4); }
.fu-side h3, .fu-group { font-size: var(--fs-m); margin: 0 0 var(--sp-2); display: flex; align-items: center; gap: 8px; }
.fu-group { margin-top: var(--sp-4); }
.fu-line { display: block; padding: 6px 0; border-top: 1px solid var(--line-2); color: var(--ink); font-size: var(--fs-m); }
.fu-line:first-of-type { border-top: 0; }
a.fu-line:hover { text-decoration: none; color: var(--brand); }
.fu-date { font-variant-numeric: tabular-nums; margin-right: 4px; }
.pill.fu-p1 { background: var(--brand-faint); color: var(--brand); }
.pill.fu-p2 { background: var(--warn-bg); color: var(--warn); }
.pill.fu-p3 { background: var(--line-2); color: var(--muted); }
.fu-list { display: block; }
.fu-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 16px; border-top: 1px solid var(--line-2); cursor: pointer; }
.fu-row:first-child { border-top: 0; }
.fu-row.has-pick { grid-template-columns: auto minmax(0, 1fr) auto; }
.fu-pick, .fu-pick-all { width: 16px; height: 16px; margin: 3px 0 0; cursor: pointer; }
.fu-group .fu-pick-all { margin: 0 4px 0 0; vertical-align: -2px; }
.fu-row-acts { display: inline-flex; gap: 4px; }
.fu-bulk { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px;
  margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.fu-bulk[hidden] { display: none; }
.fu-bulk select { width: auto; min-width: 0; padding: 4px 8px; font-size: var(--fs-s); }
.fu-bulk .fu-danger, .fu-danger { color: var(--bad); }
.fu-item-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fu-item-acts .fu-snooze { width: auto; }
.fu-row:hover { background: var(--hover, var(--brand-tint)); }
.fu-what { min-width: 0; }
.fu-what .fu-title { overflow-wrap: anywhere; }
.fu-meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; justify-content: flex-end; max-width: 330px; }
.fu-meta select { width: auto; min-width: 0; padding: 3px 6px; font-size: var(--fs-s); }
.fu-meta .fu-when { flex-basis: 100%; text-align: right; }
.fu-meta select, .fu-meta .btn.sm { height: 30px; box-sizing: border-box; }
.fu-meta .fu-link { width: 190px; max-width: 100%; text-overflow: ellipsis; }
.fu-meta-foot { flex-basis: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.fu-meta-foot .fu-when { flex-basis: auto; }
.fu-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 70ch; }
.fu-next { font-size: var(--fs-s); margin-top: 3px; }
.fu-doubt { color: var(--warn); }
select.fu-saved { background: var(--good-bg); }
.fu-when { font-size: var(--fs-s); }
.fu-connect { background: var(--brand-tint); }
.fu-tasks { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
.fu-tasks li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line-2); }
.fu-tasks li:first-child { border-top: 0; }
.fu-tasks li.done .fu-task-text { text-decoration: line-through; color: var(--muted); }
.fu-task-text { flex: 1; }
.fu-check { width: 22px; height: 22px; padding: 0; justify-content: center; font-weight: 700; color: var(--brand); }
.fu-tasks li.done .fu-check { background: var(--brand-faint); }
.fu-x { border: 0; background: none; color: var(--muted); font-size: var(--fs-l); padding: 0 6px; }
.fu-add { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--sp-2); }
.fu-add input[type=text], .fu-add input:not([type]) { flex: 1; min-width: 160px; }
.fu-add input[type=date], .fu-add input[type=time] { width: auto; }
.fu-doubts { background: var(--warn-bg); }
.fu-doubts ul { margin: 4px 0 0; padding-left: 18px; }
.fu-item-actions { display: flex; gap: 8px; margin: 0 0 var(--sp-4); }
.fu-links { margin-top: 4px; font-size: var(--fs-s); }
.fu-proposal { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.fu-proposal input { margin-top: 4px; }
.fu-proposal p { margin: 6px 0; }
.fu-prop-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fu-mini { margin: 4px 0; padding-left: 18px; font-size: var(--fs-s); }
.fu-pre { white-space: pre-wrap; font: inherit; font-size: var(--fs-s); max-height: 320px; overflow: auto; background: var(--panel); padding: 8px; }
.fu-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.fu-thumbs img { max-width: 160px; max-height: 120px; object-fit: cover; border: 1px solid var(--line); }
.fu-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-5); }
.fu-lane { background: var(--panel); border: 1px solid var(--line); padding: var(--sp-3); }
.fu-lane h3 { font-size: var(--fs-m); margin: 0 0 var(--sp-2); }
.fu-person { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--card); margin-bottom: 4px; color: var(--ink); }
.fu-person:hover { background: var(--brand-tint); text-decoration: none; }
.fu-avatar { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-faint); color: var(--brand); font-weight: 700; font-size: var(--fs-s); }
.fu-pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fu-pmain b, .fu-pmain .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-in { font-size: 11px; font-weight: 700; padding: 1px 4px; background: var(--info-bg); color: var(--info); }
.fu-orgs { display: flex; gap: 6px; flex-wrap: wrap; }
.fu-steps li { margin-bottom: 6px; }
@media (max-width: 1100px) { .fu-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .fu-row { grid-template-columns: 1fr; }
  .fu-row.has-pick { grid-template-columns: auto minmax(0, 1fr); }
  .fu-row.has-pick .fu-meta { grid-column: 2; }
  .fu-meta { justify-content: flex-start; max-width: none; }
  .fu-meta .fu-when { flex-basis: auto; text-align: left; align-self: center; }
  .fu-meta-foot { justify-content: flex-start; }
  /* follow-up tables become stacked rows on phones: first cell on its own line, the rest after it */
  table.fu-stack thead { display: none; }
  table.fu-stack, table.fu-stack tbody { display: block; }
  table.fu-stack tr { display: block; padding: 10px 14px; border-top: 1px solid var(--line-2); }
  table.fu-stack tr:first-child { border-top: 0; }
  table.fu-stack td { display: inline-block; vertical-align: top; padding: 2px 10px 2px 0; border: 0; white-space: normal !important; text-align: left; }
  table.fu-stack td::before { display: none !important; }
  table.fu-stack td:first-child { display: block; }
  table.fu-stack td .sub { white-space: normal !important; }
}
.fu-add-date { display: grid; grid-template-columns: 150px 120px minmax(0, 1fr) auto; }
.fu-add-date > * { min-width: 0; width: 100%; }
@media (max-width: 600px) { .fu-add-date { grid-template-columns: 1fr 1fr; } }

/* Notifications */
.bell { position: relative; display: inline-grid; place-items: center; width: 34px; height: 32px; color: var(--ink-2); margin-left: auto; flex: none; }
.bell:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.bell.has { color: var(--brand); }
.bell .n { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; background: var(--brand-faint); color: var(--brand); }
.mbar .bell { margin-left: 4px; }
.nt-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-2); color: var(--ink); }
.nt-row:first-child { border-top: 0; }
.nt-row:hover { background: var(--hover, var(--brand-tint)); text-decoration: none; }
.nt-dot { width: 8px; height: 8px; margin-top: 7px; flex: none; background: transparent; }
.nt-row.unread .nt-dot { background: var(--brand); }
.nt-row:not(.unread) b { font-weight: 500; }
.nt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nt-kind { font-size: var(--fs-s); color: var(--muted); }
.nt-desktop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nt-push-actions { display: flex; gap: 8px; margin-left: auto; }
.nt-desktop p { flex-basis: 100%; margin: 0; }
.nt-prefs td.num input { width: 18px; height: 18px; }
.nt-push-actions [hidden], .bell .n[hidden] { display: none !important; }
@media (max-width: 900px) { .crumbbar .bell { display: none; } } @media (min-width: 901px) { .mbar .bell { display: none; } }
.fu-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; font-size: var(--fs-s); font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.fu-tag.sm { font-size: 11px; padding: 0 5px; font-weight: 500; vertical-align: 1px; }
.fu-tag span { color: var(--muted); font-weight: 400; }
a.fu-tag:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.fu-tag.on { background: var(--brand-faint); color: var(--brand); }
.fu-tagbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 8px; }
.fu-tagpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.fu-tagpick > .sub { flex-basis: 100%; }
.fu-tagpick label.fu-tag { cursor: pointer; padding: 4px 9px; }
.fu-tagpick input { position: absolute; opacity: 0; pointer-events: none; }
.fu-runs-actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fu-runs-actions select { width: auto; }

/* a wide table in a card scrolls sideways instead of being cut off (at every width) */
.card.flush.table-wrap, .card.flush > .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fu-steps code, .fu-runs-actions, .fu-pre { overflow-wrap: anywhere; word-break: break-word; }

/* Two-step sign-in */
.twofa-steps { padding-left: 20px; }
.twofa-steps li { margin-bottom: 10px; }
.twofa-qr { margin: 8px 0; }
.twofa-qr svg { width: 200px; height: 200px; display: block; }
.twofa-key { word-break: break-all; font-size: var(--fs-m); font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; user-select: all; }
.twofa-codes { columns: 2; list-style: none; padding: 0; font-size: var(--fs-l); }
.twofa-codes li { padding: 3px 0; }
.auth .check { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: var(--fs-m); }

/* a gathering's survey goals: the application's objective above each rephrasing */
.goals-note { margin: 8px 0 12px; }
.goal-row { padding: 10px 0; border-top: 1px solid var(--line-2); }
.goal-row:first-of-type { border-top: 0; }
.goal-row label { display: block; margin-bottom: 4px; }
.goal-original { font-size: var(--fs-s); margin-bottom: 6px; }
.goal-row.goal-problem { background: var(--bad-bg); padding: 10px; }

/* matching funds */
.match-meter { margin: 4px 0; max-width: 180px; }
.match-cell { min-width: 220px; }
.match-edit summary { cursor: pointer; margin-top: 4px; }
.match-form { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 6px 0; font-size: var(--fs-s); }
.match-form label { display: inline-flex; align-items: center; gap: 4px; }
.match-form .match-num { width: 90px; padding: 3px 6px; }

/* a grant split across funders */
.split { margin-top: 12px; }
.split summary { cursor: pointer; }
.split-form table { margin-top: 8px; }
.split-form .split-amount { width: 130px; text-align: right; }
.split-form tr.split-over td, .split-form tr.split-error td { background: var(--bad-bg); }
.split-gap.good { color: var(--good); }
.split-gap.bad { color: var(--bad); }

/* Organizing team: co-organizers from the application, not invited yet */
.planned-invite { display: flex; gap: var(--sp-2); margin-top: 6px; max-width: 420px; }
.planned-invite input { flex: 1; min-width: 0; }

/* AGORA admin › Claude */
.claude-state h3 { margin: 0 0 4px; }
.claude-state.is-paused, .claude-state.is-off { background: var(--warn-bg); border-color: transparent; }
.claude-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-4); }
.claude-mode { display: grid; gap: 4px; align-content: start; text-align: left; white-space: normal; padding: var(--sp-3); background: var(--panel);
  border: 1px solid var(--line); color: var(--ink); font-weight: 400; height: auto; }
.claude-mode b { font-size: var(--fs-l); }
.claude-mode span { color: var(--muted); font-size: var(--fs-s); line-height: 1.45; }
.claude-mode.on { background: var(--brand-tint); border-color: transparent; }
.claude-mode.on b { color: var(--brand); }
@media (max-width: 720px) { .claude-modes { grid-template-columns: 1fr; } }
