/* BAS Schedule. One stylesheet for every page: tokens, shell, components,
   schedule views. Light and dark follow the system setting. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-latin-wght.woff2?v=3100e775e861) format("woff2-variations"), url(/static/fonts/inter-latin-wght.woff2?v=3100e775e861) 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 {
  color-scheme: light;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eff2f5;
  --border: #e3e7ec;
  --border-strong: #cfd5dd;
  --text: #0f1728;
  --text-2: #344054;
  --muted: #5f6b7d;
  --faint: #8a95a6;
  --brand: #1176bc;
  --brand-hover: #0e64a0;
  --brand-soft: #e8f2fa;
  --brand-soft-2: #cee3f4;
  --brand-text: #0c5a92;
  --on-brand: #ffffff;
  --ok: #2f7d1b;
  --ok-soft: #f1f9ec;
  --ok-border: #c4e6b3;
  --warn: #986000;
  --warn-soft: #fffbe8;
  --warn-border: #f3dd85;
  --bad: #c8323a;
  --bad-soft: #fdf2f2;
  --bad-border: #f5c8cb;
  --info: #175cd3;
  --info-soft: #eff6ff;
  --info-border: #bcd9ff;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 10px -2px rgba(16, 24, 40, 0.09), 0 2px 4px -2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 16px 32px -8px rgba(16, 24, 40, 0.16), 0 4px 8px -4px rgba(16, 24, 40, 0.06);
  --focus: 0 0 0 3px rgba(17, 118, 188, 0.25);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar-w: 252px;
  /* session and avatar tones: lightness and saturation per role */
  --tone-bg-s: 80%;
  --tone-bg-l: 95%;
  --tone-bd-s: 55%;
  --tone-bd-l: 50%;
  --tone-tx-s: 50%;
  --tone-tx-l: 25%;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: #161b23;
    --surface-2: #1a2029;
    --surface-3: #212833;
    --border: #2a323e;
    --border-strong: #3a4452;
    --text: #eef1f5;
    --text-2: #cdd3dc;
    --muted: #98a2b2;
    --faint: #6f7a8b;
    --brand: #5aa8e6;
    --brand-hover: #7ab9ec;
    --brand-soft: rgba(90, 168, 230, 0.14);
    --brand-soft-2: rgba(90, 168, 230, 0.25);
    --brand-text: #a6d0f4;
    --on-brand: #04172b;
    --ok: #82cf62;
    --ok-soft: rgba(130, 207, 98, 0.12);
    --ok-border: rgba(130, 207, 98, 0.35);
    --warn: #efcf5c;
    --warn-soft: rgba(239, 207, 92, 0.12);
    --warn-border: rgba(239, 207, 92, 0.35);
    --bad: #f2777d;
    --bad-soft: rgba(242, 119, 125, 0.12);
    --bad-border: rgba(242, 119, 125, 0.38);
    --info: #6fa8ff;
    --info-soft: rgba(111, 168, 255, 0.12);
    --info-border: rgba(111, 168, 255, 0.35);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 14px -4px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 36px -8px rgba(0, 0, 0, 0.6);
    --focus: 0 0 0 3px rgba(90, 168, 230, 0.38);
    --tone-bg-s: 30%;
    --tone-bg-l: 19%;
    --tone-bd-s: 55%;
    --tone-bd-l: 55%;
    --tone-tx-s: 70%;
    --tone-tx-l: 84%;
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
p + p { margin-top: 8px; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; }
.icon { flex: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-soft-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 200; background: var(--surface); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-md); }
.skip:focus { top: 12px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.code { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-sm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- app shell ---------- */

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px) var(--sidebar-w), transparent var(--sidebar-w)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 2px 14px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-logo { display: block; width: 100%; max-width: 210px; height: auto; padding: 8px 10px; background: #fff; border-radius: 12px; }
.brand-app { padding-left: 12px; font-size: 11px; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.brand-stripe { height: 4px; background: linear-gradient(90deg, #1176bc 0 25%, #ee383a 25% 50%, #f6f06a 50% 75%, #6fbe44 75% 100%); }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 8px; }
.nav-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; transition: border-color 0.12s, color 0.12s; }
.nav-search:hover { border-color: var(--border-strong); color: var(--text-2); }
.nav-search .kbd { margin-left: auto; }
.nav-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); padding: 14px 10px 5px; }
.nav a {
  display: flex; align-items: center; gap: 11px; flex: none;
  padding: 7px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 520; text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav a .icon { color: var(--faint); transition: color 0.12s; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a:hover .icon { color: var(--text-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.nav a[aria-current="page"] .icon { color: var(--brand); }
.nav .count {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: 999px; font-size: 11.5px; font-weight: 650;
  background: var(--brand); color: var(--on-brand);
}
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex: none; }
@media (max-height: 800px) { .brand-logo { max-width: 150px; padding: 6px 8px; } .brand { padding-bottom: 8px; } }
.who { min-width: 0; flex: 1; }
.who-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-role { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.scrim { display: none; }
.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 40px 72px; }
.content.wide { max-width: 1600px; }
.content.narrow { max-width: 860px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .lead { min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.page-title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; max-width: 72ch; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16px; font-weight: 650; }

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: 284px; height: 100%;
    transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-lg);
  }
  .nav-toggle:checked + .app .sidebar { transform: none; }
  .nav-toggle:checked + .app .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 40, 0.45); }
  .topbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 40; height: 56px; padding: 0 12px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--border);
  }
  .topbar .brand { flex-direction: row; align-items: center; gap: 10px; padding: 0; }
  .topbar .brand-logo { width: auto; height: 34px; padding: 4px 6px; border-radius: 8px; }
  .topbar .brand-app { padding-left: 0; }
  .content { padding: 22px 16px 56px; }
  .page-title { font-size: 22px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: 9px;
  border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, color 0.12s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-xs), inset 0 -1px 0 rgba(0, 0, 0, 0.08); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(0.93); color: #fff; }
.btn-danger-soft { background: var(--surface); color: var(--bad); border-color: var(--bad-border); }
.btn-danger-soft:hover { background: var(--bad-soft); color: var(--bad); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
button { font: inherit; }
form.inline { display: inline; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .opt { font-weight: 450; color: var(--faint); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, input[type="text"], input[type="email"], input[type="date"], input[type="time"], input[type="search"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 9px;
  font: inherit; font-size: 14.5px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[disabled], select[disabled] { background: var(--surface-2); color: var(--muted); }
select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a95a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input[type="time"], input[type="date"] { font-variant-numeric: tabular-nums; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--brand); width: 17px; height: 17px; margin: 0; flex: none; }
input[type="file"] { font: inherit; font-size: 13.5px; color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; font-size: 13.5px; height: 36px; padding: 0 14px; margin-right: 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-xs); cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px 16px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
@media (max-width: 760px) { .form-grid > * { grid-column: 1 / -1; } }
.form-section { padding: 22px 24px; border-top: 1px solid var(--border); }
.form-section:first-child { border-top: 0; }
.form-section-title { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.form-actions .grow { margin-right: auto; }

/* segmented control: view switches and weekday pickers */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; border: 1px solid var(--border); }
.seg > a, .seg > label { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 7px; color: var(--text-2); font-weight: 560; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg > a:hover, .seg > label:hover { color: var(--text); }
.seg > a[aria-current="page"], .seg > label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label:has(input:focus-visible) { box-shadow: var(--focus); }
.seg-days > label { min-width: 52px; justify-content: center; }
.field > .seg { align-self: flex-start; max-width: 100%; overflow-x: auto; }

/* ---------- cards, callouts, badges ---------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); color: inherit; }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.callout > .icon { margin-top: 1px; color: var(--muted); }
.callout-title { font-weight: 650; }
.callout-body { color: var(--text-2); }
.callout .grow { min-width: 0; }
.callout-ok { background: var(--ok-soft); border-color: var(--ok-border); } .callout-ok > .icon { color: var(--ok); }
.callout-warn { background: var(--warn-soft); border-color: var(--warn-border); } .callout-warn > .icon { color: var(--warn); }
.callout-bad { background: var(--bad-soft); border-color: var(--bad-border); } .callout-bad > .icon { color: var(--bad); }
.callout-info { background: var(--info-soft); border-color: var(--info-border); } .callout-info > .icon { color: var(--info); }
.callout-brand { background: var(--brand-soft); border-color: var(--brand-soft-2); } .callout-brand > .icon { color: var(--brand); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}
.badge .icon { width: 13px; height: 13px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-border); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.badge-brand { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-soft-2); }
.badge-solid { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; font: 650 11px/1 var(--font); color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.stat-label { color: var(--muted); font-weight: 600; font-size: 13px; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat-icon.warn { background: var(--warn-soft); color: var(--warn); }
.stat-icon.bad { background: var(--bad-soft); color: var(--bad); }
.stat-icon.ok { background: var(--ok-soft); color: var(--ok); }
.stat-icon.sun { background: #fdf6d3; color: #8a6400; }
@media (prefers-color-scheme: dark) { .stat-icon.sun { background: rgba(239, 207, 92, 0.14); color: #efcf5c; } }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.stat-note { color: var(--muted); font-size: 13px; }

.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--p, 0%); background: var(--brand); border-radius: 999px; transition: width 0.3s; }
.progress.over > span { background: var(--bad); }
.progress.lg { height: 10px; }

/* lists and tables */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 22px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.list-item:first-child { border-top: 0; }
a.list-item:hover, .list-item.hover:hover { background: var(--surface-2); color: inherit; }
.list-item .grow { min-width: 0; }
.list-title { font-weight: 600; color: var(--text); }
.list-sub { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); padding: 10px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }

/* empty states */
.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-soft); color: var(--brand); }
.empty h3 { font-size: 16.5px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.empty .row { justify-content: center; margin-top: 18px; }

/* avatars */
.avatar {
  --h: 200;
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  background: hsl(var(--h) 65% 91%); color: hsl(var(--h) 50% 28%);
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 60px; height: 60px; font-size: 20px; }
@media (prefers-color-scheme: dark) { .avatar { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 70% 85%); } }

/* toasts */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start;
  min-width: 300px; max-width: 440px; padding: 13px 14px 13px 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); animation: toast-in 0.22s ease-out;
}
.toast > .icon { color: var(--ok); margin-top: 1px; }
.toast.bad > .icon { color: var(--bad); }
.toast .grow { min-width: 0; }
.toast button { margin: -4px -6px 0 0; }
.toast.hide { animation: toast-out 0.2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 1023px) { .toasts { top: 66px; left: 12px; right: 12px; } .toast { min-width: 0; max-width: none; } }

/* ---------- week picker ---------- */

.weekpick { display: inline-flex; align-items: center; gap: 4px; }
.weekpick .label { min-width: 170px; text-align: center; font-weight: 650; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .row { gap: 8px; }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { padding-left: 36px; width: 240px; height: 36px; font-size: 14px; }

/* ---------- sessions (shared by every schedule view) ---------- */

.tone { --h: 205; }
.tone-0 { --h: 205; } .tone-1 { --h: 262; } .tone-2 { --h: 330; } .tone-3 { --h: 24; }
.tone-4 { --h: 44; } .tone-5 { --h: 142; } .tone-6 { --h: 178; } .tone-7 { --h: 290; }
.tone-8 { --h: 4; } .tone-9 { --h: 88; } .tone-10 { --h: 228; } .tone-11 { --h: 160; }
.session {
  --h: 205;
  display: block; position: relative;
  padding: 6px 9px 6px 10px; margin-bottom: 6px;
  border-radius: 8px; border-left: 3px solid hsl(var(--h) var(--tone-bd-s) var(--tone-bd-l));
  background: hsl(var(--h) var(--tone-bg-s) var(--tone-bg-l));
  color: hsl(var(--h) var(--tone-tx-s) var(--tone-tx-l));
  font-size: 12.5px; line-height: 1.35; text-decoration: none;
  transition: box-shadow 0.12s, transform 0.12s;
}
.session:last-child { margin-bottom: 0; }
a.session:hover { color: hsl(var(--h) var(--tone-tx-s) var(--tone-tx-l)); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.session-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.session-who { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-time { font-variant-numeric: tabular-nums; font-weight: 550; white-space: nowrap; opacity: 0.9; }
.session-sub { font-size: 11.5px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session.program { --tone-bg-s: 18%; --tone-bd-s: 12%; --tone-tx-s: 20%; --h: 215; }
.session.unassigned { background: var(--surface); border: 1.5px dashed var(--warn); border-left: 3px solid var(--warn); color: var(--warn); }
.session.conflict { box-shadow: 0 0 0 2px var(--bad); }
.session .flag { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--bad); color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.session .flag .icon { width: 11px; height: 11px; stroke-width: 3; }

/* week grid: people by weekday */
.sched-wrap { overflow: auto; max-height: calc(100vh - 230px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.sched { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; table-layout: fixed; }
.sched col.person-col { width: 220px; }
.sched th, .sched td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); vertical-align: top; text-align: left; }
.sched tr > *:last-child { border-right: 0; }
.sched tbody tr:last-child > * { border-bottom: 0; }
.sched thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); padding: 10px 12px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.sched thead th .date { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.sched thead th.today { color: var(--brand-text); box-shadow: inset 0 3px 0 var(--brand); }
.sched thead th:first-child { left: 0; z-index: 4; }
.sched tbody th { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: 10px 12px; font-weight: 500; }
.sched td { padding: 8px; }
.sched td.today { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.sched tbody tr:hover > * { background-color: var(--surface-2); }
.sched tbody tr:hover > td.today { background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface-2)); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
a.person:hover .person-name { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; }
.person-name { display: block; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-meta { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .grow { min-width: 0; }
.group-row th, .group-row td { background: var(--surface-2) !important; padding: 7px 12px !important; font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 1023px) { .sched-wrap, .tl-wrap { max-height: none; } }
@media (max-width: 640px) {
  .sched { min-width: 880px; }
  .session-top { flex-wrap: wrap; column-gap: 6px; }
  .session-who { overflow: visible; }
  .sched col.person-col { width: 128px; }
  .sched tbody th { padding: 10px 8px; }
  .sched .person .avatar, .tl-label .person .avatar { display: none; }
  .tl { --label-w: 128px; min-width: 860px; }
  .toolbar .row { width: 100%; }
  .search, .search input { width: 100%; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
}

/* day timeline */
.tl-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); max-height: calc(100vh - 230px); }
.tl { min-width: 980px; --label-w: 210px; }
.tl-head, .tl-row { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); }
.tl-head { position: sticky; top: 0; z-index: 3; background: var(--surface-2); border-bottom: 1px solid var(--border); height: 38px; }
.tl-head .tl-corner { position: sticky; left: 0; background: var(--surface-2); border-right: 1px solid var(--border); padding: 10px 12px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.tl-axis { position: relative; }
.tl-tick { position: absolute; top: 11px; font-size: 11.5px; font-weight: 550; color: var(--muted); transform: translateX(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-row { border-bottom: 1px solid var(--border); }
.tl-row:last-child { border-bottom: 0; }
.tl-row:hover .tl-label, .tl-row:hover .tl-track { background-color: var(--surface-2); }
.tl-label { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--border); padding: 10px 12px; display: flex; align-items: center; }
.tl-track {
  position: relative; min-height: 54px;
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: calc(100% / var(--hours)) 100%;
}
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 1; }
.tl-bar {
  --h: 205;
  position: absolute; left: calc(var(--l) * 1%); width: calc(var(--w) * 1%);
  top: calc(8px + var(--lane, 0) * 40px); height: 34px;
  padding: 0 8px; display: flex; align-items: center; gap: 6px;
  border-radius: 7px; border-left: 3px solid hsl(var(--h) var(--tone-bd-s) var(--tone-bd-l));
  background: hsl(var(--h) var(--tone-bg-s) var(--tone-bg-l));
  color: hsl(var(--h) var(--tone-tx-s) var(--tone-tx-l));
  font-size: 12px; text-decoration: none; overflow: hidden; white-space: nowrap;
}
.tl-bar b { font-weight: 700; }
.tl-bar span { opacity: 0.85; font-variant-numeric: tabular-nums; }
.tl-bar:hover { box-shadow: var(--shadow-md); z-index: 2; color: hsl(var(--h) var(--tone-tx-s) var(--tone-tx-l)); }
.tl-bar.program { --tone-bg-s: 18%; --tone-bd-s: 12%; --tone-tx-s: 20%; --h: 215; }
.tl-bar.conflict { box-shadow: 0 0 0 2px var(--bad); }
.tl-bar.unassigned { background: var(--surface); border: 1.5px dashed var(--warn); border-left: 3px solid var(--warn); color: var(--warn); }

/* one person's week as a calendar */
.cal { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.cal-head { padding: 10px 10px; font-size: 12.5px; font-weight: 650; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-head:first-child { border-left: 0; }
.cal-head .date { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.cal-head.today { color: var(--brand-text); box-shadow: inset 0 3px 0 var(--brand); }
.cal-hours { position: relative; height: calc(var(--span) * 52px); }
.cal-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; font-weight: 550; color: var(--faint); font-variant-numeric: tabular-nums; }
.cal-col {
  position: relative; height: calc(var(--span) * 52px); border-left: 1px solid var(--border);
  background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 100% 52px;
}
.cal-col.today { background-color: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.cal-event {
  --h: 205;
  position: absolute; top: calc(var(--t) * 52px); height: calc(var(--d) * 52px - 3px);
  left: calc(3px + var(--lane, 0) * (100% - 6px) / var(--lanes, 1)); width: calc((100% - 6px) / var(--lanes, 1) - 2px);
  padding: 5px 8px; overflow: hidden;
  border-radius: 7px; border-left: 3px solid hsl(var(--h) var(--tone-bd-s) var(--tone-bd-l));
  background: hsl(var(--h) var(--tone-bg-s) var(--tone-bg-l));
  color: hsl(var(--h) var(--tone-tx-s) var(--tone-tx-l));
  font-size: 12px; line-height: 1.3; text-decoration: none;
}
.cal-event b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event span { display: block; font-variant-numeric: tabular-nums; opacity: 0.9; white-space: nowrap; }
.cal-event:hover { box-shadow: var(--shadow-md); z-index: 2; color: hsl(var(--h) var(--tone-tx-s) var(--tone-tx-l)); }
.cal-event.program { --tone-bg-s: 18%; --tone-bd-s: 12%; --tone-tx-s: 20%; --h: 215; }
.cal-event.conflict { box-shadow: 0 0 0 2px var(--bad); }
.cal-scroll { overflow-x: auto; }
.cal-scroll .cal { min-width: 640px; }

/* meters (authorization use) */
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.meter-label { font-weight: 600; font-size: 13.5px; }
.meter-value { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.meter-value b { color: var(--text); font-weight: 650; }

/* ---------- review ---------- */

.review { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start; }
.queue { position: sticky; top: 24px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.queue-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.queue-scroll { overflow-y: auto; padding: 4px 8px 10px; }
.queue-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 10px 6px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.queue-item:hover { background: var(--surface-3); color: var(--text); }
.queue-item[aria-current="true"] { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-soft-2); }
.queue-item .day { width: 34px; flex: none; font-size: 12px; font-weight: 650; color: var(--muted); }
.queue-item .what { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .state { flex: none; display: grid; place-items: center; width: 18px; height: 18px; }
.st-conflict { color: var(--bad); }
.st-docs_only, .st-cr_only, .st-partial { color: var(--warn); }
.st-done { color: var(--ok); }
.queue-item.done .what { color: var(--muted); font-weight: 500; }
.decision-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--border); }
.decision-title { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.decision-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); }
.decision-body { padding: 22px 26px; display: flex; flex-direction: column; gap: 24px; }
.sources { display: flex; flex-direction: column; gap: 12px; }
.src-row { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) minmax(110px, 140px); gap: 16px; align-items: center; }
.sources .src-name { font-weight: 600; font-size: 13.5px; }
.sources .src-name small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.sources .src-time { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; font-size: 13.5px; }
.sources .src-time.none { color: var(--faint); font-weight: 500; }
.src-track { position: relative; height: 12px; border-radius: 999px; background: var(--surface-3); }
.src-bar { position: absolute; top: 0; bottom: 0; left: calc(var(--l) * 1%); width: max(6px, calc(var(--w) * 1%)); border-radius: 999px; background: var(--brand); }
.src-bar.cr { background: #6fbe44; }
.src-bar.stale { background: repeating-linear-gradient(45deg, var(--faint) 0 4px, transparent 4px 8px); border: 1px solid var(--faint); }
.src-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.choice:hover { border-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: var(--focus); }
.choice.drop:has(input:checked) { border-color: var(--text-2); background: var(--surface-3); box-shadow: none; }
.choice .grow { min-width: 0; }
.choice-title { font-weight: 650; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.choice-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.choice .times { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.choice .times input { width: 132px; height: 36px; font-size: 14px; }
.decided-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); border: 1px solid var(--ok-border); color: var(--text-2); }
.decided-note .icon { color: var(--ok); }
.why { color: var(--text-2); }
.why li { margin-left: 18px; padding: 2px 0; }
.shortcuts { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.shortcuts span { display: inline-flex; align-items: center; gap: 5px; }
.review-done { text-align: center; padding: 56px 24px; }
.review-done .empty-icon { width: 64px; height: 64px; border-radius: 18px; }
.back-link { display: none; }
@media (max-width: 1023px) {
  .review { grid-template-columns: minmax(0, 1fr); }
  .queue { position: static; max-height: none; }
  .review.has-item .queue { display: none; }
  .review:not(.has-item) > .decision { display: none; }
  .back-link { display: inline-flex; margin-bottom: 12px; }
  .choice .kbd { display: none; }
  .choice .times { flex-wrap: wrap; }
  .choice .times input { width: 124px; }
  .decision-head, .decision-body { padding-left: 18px; padding-right: 18px; }
  .shortcuts { display: none; }
}

@media (max-width: 640px) {
  .src-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .src-row .src-track, .src-row.scale { display: none; }
  .choice { padding: 12px 14px; gap: 12px; }
  .choice .times input { width: 112px; padding: 0 8px; font-size: 13.5px; }
}
.sources .src-time { white-space: nowrap; }

/* ---------- stepper (setup) ---------- */

.steps { display: flex; flex-direction: column; }
.step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding-bottom: 28px; }
.step::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step.done::before { background: var(--brand); }
.step-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); color: var(--muted); font-weight: 700; font-size: 15px; }
.step.done .step-icon { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.step.current .step-icon { border-color: var(--brand); color: var(--brand-text); box-shadow: var(--focus); }
.step-title { font-size: 16px; font-weight: 650; padding-top: 8px; }
.step-desc { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.step-body { margin-top: 14px; }

/* ---------- import ---------- */

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 36px 24px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .empty-icon { margin: 0; }
.dropzone-title { font-weight: 650; font-size: 15.5px; }
.dropzone input[type="file"] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.reqs { display: flex; flex-direction: column; }
.req { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.req:first-child { border-top: 0; }
.req-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.req.found .req-icon { background: var(--ok-soft); color: var(--ok); }
.req-name { font-weight: 600; }
.req-file { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req .grow { min-width: 0; }

/* ---------- generated doc preview ---------- */

.paper-wrap { background: var(--surface-3); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--border); }
.paper { background: #fff; color: #1d2433; max-width: 940px; margin: 0 auto; padding: 44px 52px; border-radius: 4px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12), 0 10px 30px -8px rgba(16, 24, 40, 0.18); color-scheme: light; }
.paper h1 { font-size: 22px; margin: 0 0 10px; color: #111827; }
.paper h2 { font-size: 16px; margin: 22px 0 8px; color: #111827; }
.paper h3 { font-size: 14.5px; margin: 18px 0 6px; color: #111827; }
.paper p { margin: 6px 0; }
.paper table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: 13px; }
.paper th, .paper td { border: 1px solid #d0d5dd; padding: 6px 8px; text-align: left; vertical-align: top; color: #1d2433; }
.paper th { background: #f2f4f7; font-weight: 650; }
@media (max-width: 760px) { .paper-wrap { padding: 10px; } .paper { padding: 22px 18px; } }

/* ---------- sign-in ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
  radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #6fbe44 12%, transparent), transparent 60%),
  var(--bg); }
/* the card's padding holds everything in; the stripe bleeds to the edges */
.auth-card { width: 100%; max-width: 420px; padding: 0 34px 30px; text-align: center; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-card .brand-stripe { margin: 0 -34px 34px; }
.auth-card > .btn-block { display: flex; }
.auth-logo { display: block; width: 300px; max-width: 100%; height: auto; margin: 0 auto 18px; padding: 10px 12px; background: #fff; border-radius: 14px; }
@media (max-width: 420px) { .auth-card { padding: 0 22px 26px; } .auth-card .brand-stripe { margin: 0 -22px 28px; } }
.auth-title { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); margin-top: 6px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 46px; margin-top: 26px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: var(--shadow-xs); transition: background 0.12s, box-shadow 0.12s; }
.gbtn:hover { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-foot { margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.auth-card .callout { text-align: left; margin-top: 20px; }

/* ---------- details / disclosure ---------- */

details.disclose > summary { list-style: none; cursor: pointer; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary .chev { transition: transform 0.15s; color: var(--muted); }
details.disclose[open] > summary .chev { transform: rotate(180deg); }

/* history timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--border); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.tl-dot.create { background: var(--ok-soft); color: var(--ok); }
.tl-dot.update { background: var(--info-soft); color: var(--info); }
.tl-dot.end { background: var(--bad-soft); color: var(--bad); }
.tl-what { font-weight: 600; padding-top: 5px; }
.tl-when { font-size: 12.5px; color: var(--muted); }

/* definition grid for a session's facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; }
.fact-label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fact-value { margin-top: 3px; font-weight: 600; font-size: 14.5px; }

/* role picker */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.role { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 11px; cursor: pointer; background: var(--surface); }
.role:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: var(--focus); }
.role input { margin-top: 2px; }
.role-name { font-weight: 650; }
.role-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) { .roles { grid-template-columns: 1fr; } }

/* to-do */
.todo-item { display: flex; gap: 14px; align-items: flex-start; padding: 15px 22px; border-top: 1px solid var(--border); }
.todo-item:first-child { border-top: 0; }
.todo-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.todo-icon.add { background: var(--ok-soft); color: var(--ok); }
.todo-icon.end { background: var(--bad-soft); color: var(--bad); }
.todo-icon.retime, .todo-icon.restaff { background: var(--info-soft); color: var(--info); }
.todo-icon.wait { background: var(--surface-3); color: var(--muted); }
.todo-title { font-weight: 650; }
.todo-detail { color: var(--text-2); margin-top: 2px; }
.todo-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.todo-hint.row-sm { margin-top: 6px; }
.todo-hint a { color: var(--brand-text); }
.todo-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 12.5px; color: var(--warn); }
.todo-note .icon { flex: none; margin-top: 1px; }
.todo-item > form { flex: none; }
.todo-item.checked .todo-title, .todo-item.checked .todo-detail { text-decoration: line-through; color: var(--faint); }
.todo-check { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }

/* issues */
.issues { display: flex; flex-direction: column; }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--border); }
.issue:first-child { border-top: 0; }
.issue .icon { margin-top: 2px; }
.issue.high .icon { color: var(--bad); }
.issue.medium .icon { color: var(--warn); }
.issue .grow { min-width: 0; }
.issue-kind { font-weight: 650; }

@media print {
  .sidebar, .topbar, .page-actions, .toolbar .seg, .toasts, .no-print { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .sched-wrap, .tl-wrap { max-height: none; overflow: visible; box-shadow: none; }
  body { background: #fff; }
}

/* ---------- quick search (Ctrl+K) ---------- */

.palette { width: min(640px, calc(100vw - 24px)); max-height: min(72vh, 580px); margin: 12vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; }
.palette::backdrop { background: rgba(15, 23, 40, 0.45); backdrop-filter: blur(2px); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette-input input { height: 34px; padding: 0; border: 0; box-shadow: none; background: transparent; font-size: 16px; }
.palette-input input:focus { box-shadow: none; }
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette ul { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 6px; }
.palette li a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none; }
.palette li[aria-selected="true"] a { background: var(--brand-soft); color: var(--brand-text); }
.palette .pal-label { font-weight: 600; }
.palette .pal-sub { color: var(--muted); font-size: 12.5px; }
.palette .pal-kind { margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.palette .pal-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; font-size: 11px; font-weight: 700; }
.palette-empty { padding: 22px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .palette { margin-top: 8px; max-height: 80vh; } .palette-foot { display: none; } }

/* ---------- authorizations ---------- */

.t-bad { color: var(--bad); }
.t-warn { color: var(--warn); }
.t-ok { color: var(--ok); }
.t-info { color: var(--info); }
.seg-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.seg > a[aria-current="page"] .seg-count { background: var(--brand-soft); color: var(--brand-text); }
.th-sub { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--faint); }
.auth-table td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
.auth-table th:nth-child(1) { width: 19%; }
.auth-table th:nth-child(2) { width: 19%; }
.auth-table th:nth-child(3) { width: 23%; }
.auth-table .person { align-items: flex-start; }
.auth-table .person-name { display: flex; align-items: center; gap: 6px; }
.auth-table .person-meta { white-space: normal; }
.auth-table tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.row-flags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0 44px; }
.row-flags .badge { height: auto; min-height: 22px; padding: 3px 8px; white-space: normal; line-height: 1.25; }
.auth-payer { font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auth-dates { color: var(--text-2); font-size: 13.5px; margin-top: 1px; }
.auth-when { margin-top: 6px; }
.auth-meta { color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.auth-more { margin-top: 4px; font-size: 12px; color: var(--muted); }
.auth-more summary { cursor: pointer; color: var(--brand-text); width: max-content; }
.auth-more ul { margin: 4px 0 0; padding-left: 16px; }
.rsteps { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.rsteps form { display: contents; }
.rstep {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 5px 9px 6px; border-radius: 8px; cursor: pointer;
  font: 600 12.5px/1.2 var(--font); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-strong);
}
.rstep .icon { position: absolute; }
.rstep:hover { border-color: var(--brand); color: var(--text); }
.rstep-due { font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.rstep.soon { border-color: var(--warn-border); background: var(--warn-soft); }
.rstep.soon .rstep-due { color: var(--warn); font-weight: 600; }
.rstep.late { border-color: var(--bad-border); background: var(--bad-soft); }
.rstep.late .rstep-due { color: var(--bad); font-weight: 600; }
.rstep.done { position: relative; padding-left: 26px; border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok); }
.rstep.done .icon { left: 8px; top: 7px; }
.rstep.done .rstep-due { color: var(--ok); opacity: 0.8; }
.next { font-size: 13px; font-weight: 600; color: var(--text-2); }
.next .icon { vertical-align: -3px; margin-right: 5px; }
.next.t-bad { color: var(--bad); }
.next.t-warn { color: var(--warn); }
.next.t-info { color: var(--info); }
.next.t-ok { color: var(--ok); }
.hc { display: flex; flex-direction: column; gap: 5px; min-width: 110px; }
.hc .progress { margin-bottom: 1px; }
.hc-top { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hc-top b { font-size: 15px; font-weight: 650; color: var(--text); }
.hc-top.t-bad, .hc-top.t-bad b { color: var(--bad); }
.hc-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hc .progress { height: 6px; }
.foot-note { color: var(--muted); font-size: 12.5px; max-width: 110ch; margin-top: 14px; }
@media (max-width: 1000px) {
  .auth-table thead { display: none; }
  .auth-table, .auth-table tbody, .auth-table tr, .auth-table td { display: block; width: 100%; }
  .auth-table tr { border-bottom: 1px solid var(--border); padding: 12px 0; }
  .auth-table tr:last-child { border-bottom: 0; }
  .auth-table td { border: 0; padding: 6px 16px; }
  .auth-table tbody tr:hover td { background: none; }
  .auth-table tr.row-bad td:first-child { box-shadow: none; }
  .auth-table tr.row-bad { box-shadow: inset 3px 0 0 var(--bad); }
  .auth-table td:nth-child(n+2)::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
  .auth-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-table td:nth-child(-n+3) { grid-column: 1 / -1; }
  .row-flags { margin-left: 0; }
  .hc { min-width: 0; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; gap: 2px; }
  .stat-top { margin-bottom: 4px; }
  .stat-label { font-size: 12.5px; }
  .stat-icon { width: 28px; height: 28px; border-radius: 8px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 24px; }
  .stat-value small { font-size: 13px; }
  .stat-note { font-size: 12px; }
  .auth-table td:nth-child(n+4) { padding-right: 6px; }
  .auth-table td:nth-child(n+4)::before { font-size: 10px; letter-spacing: 0.03em; min-height: 2.6em; }
}

/* ---------- people ---------- */

.cal-avail { position: absolute; left: 0; right: 0; top: calc(var(--t) * 52px); height: calc(var(--d) * 52px); background: color-mix(in srgb, var(--ok-soft) 85%, transparent); border-top: 1px dashed var(--ok-border); border-bottom: 1px dashed var(--ok-border); }
.mini-week { display: inline-flex; gap: 3px; vertical-align: middle; }
.mw-day { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.mw-col { position: relative; display: block; width: 13px; height: 38px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.mw-col i { position: absolute; left: 0; right: 0; display: block; }
.mw-free { background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-border); }
.mw-busy { background: var(--brand); border-radius: 2px; }
.mw-label { font-size: 9.5px; font-weight: 650; color: var(--faint); letter-spacing: 0.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; background: hsl(var(--h, 215) 70% 95%); color: hsl(var(--h, 215) 45% 30%); border: 1px solid hsl(var(--h, 215) 50% 86%); }
a.chip:hover { border-color: hsl(var(--h, 215) 50% 60%); color: hsl(var(--h, 215) 50% 22%); }
.chip.more { --h: 215; background: var(--surface-3); color: var(--muted); border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  .chip { background: hsl(var(--h, 215) 30% 20%); color: hsl(var(--h, 215) 70% 85%); border-color: hsl(var(--h, 215) 30% 30%); }
  a.chip:hover { color: hsl(var(--h, 215) 80% 92%); }
}
.contact { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.contact a:hover { color: var(--brand-text); }
.contact .icon { color: var(--faint); }
.people-table td { vertical-align: middle; }
.people-table .hc { min-width: 120px; }
.avail-text { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
/* availability editor: rows of times per day beside a picture of the week */
.avail-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .avail-editor { grid-template-columns: 1fr; } }
.avail-day { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.avail-day:first-child { border-top: 0; padding-top: 0; }
.avail-day-name { font-weight: 600; padding-top: 8px; }
.avail-ranges { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.avail-rows { display: flex; flex-direction: column; gap: 6px; }
.avail-rows:empty { display: none; }
.avail-range { display: flex; align-items: center; gap: 8px; }
.avail-range input[type="time"] { width: 132px; min-width: 0; }
@media (max-width: 640px) {
  .avail-day { grid-template-columns: 1fr; gap: 6px; }
  .avail-day-name { padding-top: 0; }
  .avail-range input[type="time"] { width: auto; flex: 1 1 0; max-width: 150px; }
}
.avail-to { color: var(--muted); font-size: 13px; }
.avail-none { padding-top: 8px; font-size: 13.5px; }
.avail-add { margin-left: -8px; }
.avail-day.bad input[type="time"] { border-color: var(--bad); }
.avail-form .day-error { color: var(--bad); font-size: 12.5px; }
.avail-days > [data-avail-copy] { margin-top: 12px; }
.avail-preview { position: sticky; top: 84px; }
.ap-grid { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 6px; }
.ap-hours { position: relative; height: 300px; }
.ap-hours span { position: absolute; right: 0; transform: translateY(-50%); font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.ap-day { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ap-col { position: relative; height: 300px; border-radius: 8px; overflow: hidden; background: var(--surface-3) repeating-linear-gradient(to bottom, transparent 0, transparent 39px, var(--border) 39px, var(--border) 40px); }
.ap-col i { position: absolute; display: block; }
.ap-free { left: 0; right: 0; background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-border); border-radius: 4px; }
.ap-busy { left: 22%; right: 22%; background: var(--brand); border-radius: 3px; }
.ap-busy.out { background: var(--bad); }
.ap-label { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.ap-summary { margin: 12px 0 4px; font-weight: 600; font-size: 13.5px; }
.ap-key { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ap-key > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ap-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.ap-swatch.free { background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-border); }
.ap-swatch.busy { background: var(--brand); }
.ap-swatch.out { background: var(--bad); }
@media (max-width: 1000px) {
  .people-table thead { display: none; }
  .people-table, .people-table tbody, .people-table tr, .people-table td { display: block; width: 100%; }
  .people-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .people-table tr:last-child { border-bottom: 0; }
  .people-table td { border: 0; padding: 0; }
  .people-table tbody tr:hover td { background: none; }
  .people-table td:first-child { grid-column: 1 / -1; }
  .people-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
}
.people-cards { align-items: start; }
.add-link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 600; }

/* ---------- find time ---------- */

.find-form .seg-days { flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.matches { display: flex; flex-direction: column; }
.match { padding: 16px 22px; border-top: 1px solid var(--border); }
.match:first-child { border-top: 0; }
.match-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.match-head .row-sm { flex-wrap: wrap; justify-content: flex-end; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 46px; }
.slot { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); text-decoration: none; background: var(--surface-2); border: 1px solid var(--border-strong); }
.slot b { font-weight: 700; color: var(--text); }
.slot .icon { color: var(--brand); }
a.slot:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.slot-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
@media (max-width: 640px) {
  .slots { margin-left: 0; }
  .match { padding: 14px 16px; }
}

/* ---------- attendance ---------- */

.att-date { width: 150px; height: 32px; padding: 0 8px; font-size: 13px; }
.att-card { overflow: visible; }
.att-block + .att-block { border-top: 1px solid var(--border); }
.att-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 22px 6px; }
.att-group .person { gap: 8px; }
.att-group .btn { margin-left: auto; }
.att-row { display: grid; grid-template-columns: 170px minmax(110px, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: start; padding: 8px 22px 8px 58px; }
.att-row:last-child { padding-bottom: 14px; }
.att-row.is-cancelled .att-time, .att-row.is-cancelled .att-who { text-decoration: line-through; color: var(--muted); }
.att-time { font-weight: 600; font-size: 13.5px; padding-top: 4px; }
.att-who { font-weight: 650; padding-top: 4px; }
.att-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-top: 2px; min-width: 0; }
.att-actions { display: flex; align-items: flex-start; gap: 6px; justify-content: flex-end; }
.crbtn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border-radius: 8px; font: 600 12px/1 var(--font); cursor: pointer; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); white-space: nowrap; }
.crbtn.done { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); }
.logf { position: relative; }
.logf > summary { list-style: none; }
.logf > summary::-webkit-details-marker { display: none; }
.logf[open] > summary { background: var(--surface-3); }
.logf-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(560px, calc(100vw - 32px)); padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.logf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; }
.logf-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.logf-grid .logf-notes, .logf-grid .logf-cover, .logf-grid .logf-makeup { grid-column: 1 / -1; }
.logf-form .logf-cover, .logf-form .logf-times, .logf-form .logf-makeup { display: none; }
.logf-form:has(input[name="outcome"][value="cancelled"]:checked) .logf-makeup { display: flex; }
.logf-form:has(input[name="outcome"][value="covered"]:checked) .logf-cover { display: flex; }
.logf-form:has(input[name="outcome"][value="adjusted"]:checked) .logf-times { display: flex; }
.chip.on { background: var(--brand); color: var(--on-brand); border-color: transparent; }
/* on screens with a mouse, the per-row buttons show on hover */
@media (hover: hover) {
  .att-group > .btn, .att-row details.logf:not([open]) > summary.log-new { opacity: 0; transition: opacity 0.12s; }
  .att-block:hover .att-group > .btn, .att-group > .btn:focus-visible, .att-row:hover details.logf > summary.log-new, .att-row details.logf > summary.log-new:focus-visible { opacity: 1; }
}
.att-table td { vertical-align: top; }
.att-notes { max-width: 320px; }
@media (max-width: 900px) {
  .att-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 16px; }
  .att-who { padding-top: 0; }
  .att-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 4px; }
  .att-actions .logf[open] { flex-basis: 100%; }
  .logf-form { position: static; width: 100%; margin-top: 8px; box-shadow: var(--shadow-sm); }
  .att-group { padding: 12px 16px 4px; }
}

/* ---------- changes ---------- */

.tell-card { padding: 16px 20px; }
.tell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tell-actions { flex-wrap: wrap; justify-content: flex-end; }
.tell-actions form { display: contents; }
.tell-lines { margin: 12px 0 0 46px; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 4px; }
.tell-lines li.told { color: var(--muted); }
.tell-contact { margin: 8px 0 0 46px; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
.tell-msg { margin: 10px 0 0 46px; }
.tell-msg summary { cursor: pointer; color: var(--brand-text); width: max-content; }
.tell-msg textarea { margin-top: 8px; width: 100%; font-size: 13px; line-height: 1.5; background: var(--surface-2); resize: vertical; }
@media (max-width: 640px) { .tell-lines, .tell-contact, .tell-msg { margin-left: 0; } .tell-card { padding: 14px 16px; } }
