/* Hallmark · genre: modern-minimal · macrostructure: Bento Grid (app) + Split (login)
 * design-system: design.md · designed-as-app · studied: yes · DNA-source: image
 * pre-emit critique: P4 H4 E4 S4 R4 V4
 */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 var(--text-md)/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--color-rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; min-width: 0; }
h1 { font-size: var(--text-display); line-height: 1.12; }
h2 { font-size: var(--text-lg); line-height: 1.3; }
h3 { font-size: var(--text-md); line-height: 1.35; }
p { margin: 0; }
code { font: 0.875em var(--font-mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
::selection { background: var(--color-green-soft); }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
.muted { color: var(--color-ink-3); }
.small { font-size: var(--text-sm); }
.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: var(--space-sm); top: -100px; z-index: 10;
  background: var(--color-ink); color: var(--color-surface); padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
}
.skip:focus { top: var(--space-sm); }

/* ---------- Shell ---------- */
.shell { max-width: 1320px; margin: 0 auto; padding: var(--space-md) var(--space-lg) var(--space-2xl); }
.topbar { display: flex; align-items: center; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2xs); text-decoration: none; font-weight: 600; }
.brand-mark { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--color-green); color: var(--color-green-ink); }
.brand-name { font-size: var(--text-lg); letter-spacing: -0.02em; }
.pillnav { display: flex; gap: var(--space-2xs); flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pillnav::-webkit-scrollbar { display: none; }
.pillnav a {
  flex: none; padding: 10px 20px; border-radius: var(--radius-pill); background: var(--color-surface);
  color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); font-weight: 500; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.pillnav a:hover { background: var(--color-surface-3); color: var(--color-ink); }
.pillnav a[aria-current="page"] { background: var(--color-green); color: var(--color-green-ink); }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2xs); }
.userchip {
  display: inline-flex; align-items: center; gap: var(--space-2xs); padding: 4px 14px 4px 4px;
  border-radius: var(--radius-pill); background: var(--color-surface); text-decoration: none; font-size: var(--text-sm);
  max-width: 220px;
}
.userchip span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip:hover { background: var(--color-surface-3); }
.topbar form { margin: 0; }

@media (max-width: 1080px) {
  .topbar { flex-wrap: wrap; row-gap: var(--space-sm); }
  .pillnav { order: 3; flex-basis: 100%; }
  .topbar-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .shell { padding: var(--space-sm) var(--space-sm) var(--space-2xl); }
  .brand-name, .userchip .userchip-name, .btn-new-label, .logout-label { display: none; }
  .userchip { padding: 4px; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.page-head > div { min-width: 0; }
.crumbs { display: flex; gap: var(--space-2xs); align-items: center; font-size: var(--text-sm); color: var(--color-ink-3); margin-bottom: var(--space-2xs); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--color-ink); }
.page-sub { margin-top: var(--space-2xs); color: var(--color-ink-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  min-height: 44px; padding: 10px 20px; border: 0; border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-ink); font: 500 var(--text-sm)/1.2 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--color-surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; transform: none; }
.btn-green { background: var(--color-green); color: var(--color-green-ink); }
.btn-green:hover { background: var(--color-green-hover); }
.btn-teal { background: var(--color-teal); color: var(--color-teal-ink); }
.btn-teal:hover { background: var(--color-teal-2); }
.btn-soft { background: var(--color-surface-2); }
.btn-soft:hover { background: var(--color-surface-3); }
.btn-ghost { background: transparent; color: var(--color-ink-2); }
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-ink); }
.btn-danger { background: var(--color-red-soft); color: var(--color-red-text); }
.btn-danger:hover { background: var(--color-red-soft); box-shadow: inset 0 0 0 1px var(--color-red-text); }
.btn-sm { min-height: 36px; padding: 7px 14px; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: var(--text-md); }
.btn-icon { width: 44px; padding: 0; }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; }
.row form { margin: 0; }

/* ---------- Cards ---------- */
.card { background: var(--color-surface); border-radius: var(--radius-card); padding: var(--space-lg); min-width: 0; }
.card-tint { background: var(--color-surface-2); }
.card-teal { background: var(--color-teal); color: var(--color-teal-ink); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-md); }
.card-head > div { min-width: 0; }
.eyebrow { font-size: var(--text-sm); color: var(--color-ink-3); margin-bottom: 2px; }
.card-teal .eyebrow { color: var(--color-teal-muted); }
.round-link {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--color-surface); color: var(--color-ink);
}
.card:not(.card-tint) .round-link { background: var(--color-surface-2); }
.round-link:hover { background: var(--color-surface-3); }
.stack { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: var(--space-md); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.empty { display: grid; justify-items: start; gap: var(--space-xs); padding: var(--space-sm) 0; color: var(--color-ink-2); }
.empty .icon { width: 28px; height: 28px; color: var(--color-ink-3); }
.empty-center { justify-items: center; text-align: center; padding: var(--space-xl) var(--space-sm); }

/* ---------- Notices ---------- */
.notice { display: flex; gap: var(--space-xs); align-items: flex-start; border-radius: var(--radius-inner); padding: var(--space-sm) var(--space-md); margin-bottom: var(--space-md); }
.notice .icon { margin-top: 2px; }
.notice > div { min-width: 0; }
.notice-info { background: var(--color-teal-soft); color: var(--color-teal-text); }
.notice-warn { background: var(--color-warn-soft); color: var(--color-warn-text); }
.notice-error { background: var(--color-red-soft); color: var(--color-red-text); white-space: pre-wrap; }
.notice form { margin-top: var(--space-xs); }

/* ---------- Badges & avatars ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 500; white-space: nowrap; background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-rule); color: var(--color-ink-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-plain::before { display: none; }
.badge-done { color: var(--color-green-text); box-shadow: inset 0 0 0 1px var(--color-green-line); }
.badge-progress { color: var(--color-teal-text); box-shadow: inset 0 0 0 1px var(--color-teal-line); }
.badge-problem { color: var(--color-red-text); box-shadow: inset 0 0 0 1px var(--color-red-line); }
.badge-live { color: var(--color-green-ink); background: var(--color-green); box-shadow: none; }
.badge-live::before { background: var(--color-green-ink); }
.badge-soon { color: var(--color-ink-2); }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.avatar {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  font-size: var(--text-sm); font-weight: 600; background: var(--color-teal-soft); color: var(--color-teal-text);
}
.avatar-sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar-lg { width: 48px; height: 48px; }
.avatar[data-tone="1"] { background: var(--color-green-soft); color: var(--color-green-text); }
.avatar[data-tone="2"] { background: var(--color-sand-soft); color: var(--color-sand-text); }
.avatar[data-tone="3"] { background: var(--color-surface-3); color: var(--color-ink-2); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 3px var(--stack-ring, var(--color-surface)); }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--color-surface-2); color: var(--color-ink-2); font-size: var(--text-xs); font-weight: 500; vertical-align: 2px; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: var(--space-md); align-items: start; }
.dash-main { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-md); }
.dash-next { grid-column: span 5; grid-row: span 2; display: flex; flex-direction: column; }
.dash-week { grid-column: span 7; }
.dash-trend { grid-column: span 7; }
.dash-month { grid-column: span 5; }
.dash-agree { grid-column: span 7; }
.dash-rail { background: var(--color-surface-2); border-radius: var(--radius-card); padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); }
@media (max-width: 1240px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 1080px) {
  .dash-next { grid-column: span 12; grid-row: auto; }
  .dash-week { grid-column: span 12; }
  .dash-trend { grid-column: span 12; }
  .dash-month, .dash-agree { grid-column: span 6; }
}
@media (max-width: 720px) {
  .dash-month, .dash-agree { grid-column: span 12; }
  .dash-rail { grid-template-columns: minmax(0, 1fr); }
}

.next-card { position: relative; overflow: hidden; min-height: 360px; }
.next-card::after {
  content: ""; position: absolute; right: -80px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%;
  border: 44px solid var(--color-teal-ring); pointer-events: none;
}
.next-card h2 { font-size: var(--text-xl); margin: var(--space-2xs) 0 var(--space-lg); }
.next-when { display: grid; gap: 4px; margin-bottom: var(--space-lg); }
.next-time { font-size: var(--text-stat); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.next-date { color: var(--color-teal-muted); }
.next-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); position: relative; z-index: 1; }
.next-card .avatar-stack { --stack-ring: var(--color-teal); }
.next-card .avatar { background: var(--color-teal-2); color: var(--color-teal-ink); }
.next-card .btn-ghost { color: var(--color-teal-ink); }
.next-card .btn-ghost:hover { background: var(--color-teal-2); }
.next-card .empty { color: var(--color-teal-muted); }
.next-card .empty .icon { color: var(--color-teal-muted); }

.week-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); gap: var(--space-md); }
@media (max-width: 640px) { .week-layout { grid-template-columns: minmax(0, 1fr); } }
.stat-row { display: flex; align-items: baseline; gap: var(--space-xs); flex-wrap: wrap; }
.stat { font-size: var(--text-stat); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.stat-unit { font-size: var(--text-lg); color: var(--color-ink-2); }
.dots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2xs); margin-top: var(--space-lg); max-width: 420px; }
.dots-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dots-stack { display: flex; flex-direction: column-reverse; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--chart-empty); }
.dot.is-on { background: var(--chart-progress); }
.dots-col.is-today .dot.is-on { background: var(--chart-done); }
.dots-label { font-size: var(--text-xs); color: var(--color-ink-3); }
.dots-col.is-today .dots-label { color: var(--color-ink); font-weight: 600; }
.chart-key { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); font-size: var(--text-xs); color: var(--color-ink-3); }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.key-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.mini-stack { display: grid; gap: var(--space-2xs); align-content: stretch; }
.mini { border-radius: var(--radius-inner); padding: var(--space-sm) var(--space-md); display: grid; gap: 2px; }
.mini-teal { background: var(--color-teal); color: var(--color-teal-ink); }
.mini-teal .muted { color: var(--color-teal-muted); }
.mini-line { box-shadow: inset 0 0 0 2px var(--color-teal); }
.mini-num { font-size: var(--text-2xl); font-weight: 500; line-height: 1.1; }

.trend svg { width: 100%; height: auto; overflow: visible; }
.trend-grid { stroke: var(--color-rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trend svg { max-height: 220px; }
.trend-area { fill: var(--chart-line); opacity: 0.1; }
.trend-hit { fill: transparent; }
.trend-dot { fill: var(--chart-line); stroke: var(--color-surface); stroke-width: 2; }
.trend-peak { fill: var(--chart-line); stroke: var(--color-surface); stroke-width: 3; }
.trend-tip rect { fill: var(--color-ink); }
.trend-tip text { fill: var(--color-surface); font: 500 11px var(--font-body); }
.trend-axis { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--color-ink-3); margin-top: var(--space-2xs); }

.gauge { position: relative; max-width: 240px; margin: 0 auto; }
.gauge svg { width: 100%; height: auto; }
.gauge-track { fill: none; stroke: var(--chart-empty); stroke-width: 18; stroke-linecap: round; }
.gauge-seg { fill: none; stroke-width: 18; stroke-linecap: butt; }
.gauge-seg[data-kind="done"] { stroke: var(--chart-done); }
.gauge-seg[data-kind="progress"] { stroke: var(--chart-progress); }
.gauge-seg[data-kind="problem"] { stroke: var(--chart-problem); }
.gauge-center { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.gauge-num { font-size: var(--text-stat); font-weight: 500; line-height: 1; }
.legend { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); }
.legend li { display: flex; align-items: center; gap: var(--space-2xs); }
.legend li strong { margin-left: auto; font-weight: 500; }
.legend .key-dot { width: 12px; height: 12px; border-radius: 4px; }

.agree-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.agree-list li { background: var(--color-surface-2); border-radius: var(--radius-inner); padding: var(--space-xs) var(--space-sm); display: grid; gap: 2px; overflow-wrap: anywhere; }
.agree-list a { text-decoration: none; }
.agree-list a:hover { text-decoration: underline; }

.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.rail-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-xs); padding: var(--space-xs); border-radius: var(--radius-inner); text-decoration: none; }
.rail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2xs); margin-top: 4px; }
.rail-item:hover, .rail-item:focus-visible { background: var(--color-surface); }
.rail-item strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-week { background: var(--color-teal); color: var(--color-teal-ink); border-radius: var(--radius-card); padding: var(--space-md); display: grid; gap: var(--space-sm); }
.rail-week .muted { color: var(--color-teal-muted); }
.rail-week > *, .rail-pills li, .dash-rail > * { min-width: 0; }
.rail-pills { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.rail-pills a {
  overflow: hidden; display: flex; justify-content: space-between; gap: var(--space-sm); padding: 10px 16px; border-radius: var(--radius-pill);
  text-decoration: none; background: var(--color-teal-2); color: var(--color-teal-ink); font-size: var(--text-sm);
}
.rail-pills li:first-child a { background: var(--color-green); color: var(--color-green-ink); }
.rail-pills a span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rail-pills a:hover { filter: brightness(1.06); }
.rail-week-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }

/* ---------- Meetings list ---------- */
.section { margin-bottom: var(--space-xl); }
.section-head { display: flex; align-items: baseline; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.meeting-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.mrow {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-md); align-items: center;
  background: var(--color-surface); border-radius: var(--radius-inner); padding: var(--space-sm) var(--space-md) var(--space-sm) var(--space-sm);
}
.mrow.is-live { box-shadow: inset 0 0 0 2px var(--color-green); }
.datebox { display: grid; place-items: center; background: var(--color-surface-2); border-radius: 16px; padding: var(--space-2xs) 0; line-height: 1.1; }
.datebox-day { font-size: var(--text-xl); font-weight: 500; }
.datebox-mon { font-size: var(--text-xs); color: var(--color-ink-3); }
.mrow-title { font-weight: 500; font-size: var(--text-md); text-decoration: none; overflow-wrap: anywhere; }
.mrow-title:hover { text-decoration: underline; }
.mrow-meta { display: flex; flex-wrap: wrap; gap: 4px var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-3); margin-top: 2px; }
.mrow-meta span { display: inline-flex; align-items: center; gap: 5px; }
.mrow-go { display: flex; align-items: center; gap: var(--space-xs); }
@media (max-width: 640px) {
  .mrow { grid-template-columns: 56px minmax(0, 1fr); }
  .mrow-go { grid-column: 1 / -1; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-md); }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); padding: 0; }
.input, .field input:not([type="checkbox"]), .field select {
  width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: var(--radius-input);
  background: var(--color-surface-2); color: var(--color-ink); font: 400 var(--text-md)/1.3 var(--font-body);
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.card-tint .field input:not([type="checkbox"]), .card-tint .field select { background: var(--color-surface); }
.field input:hover, .field select:hover { box-shadow: inset 0 0 0 1px var(--color-rule); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--color-red-text); background: var(--color-red-soft); }
.hint { font-size: var(--text-sm); color: var(--color-ink-3); }
.err { font-size: var(--text-sm); color: var(--color-red-text); display: flex; gap: 6px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
@media (max-width: 640px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.form-narrow { max-width: 460px; }

.picker-search { margin-bottom: var(--space-2xs); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--space-2xs); max-height: 340px; overflow-y: auto; padding: 2px; }
.pick-grid-1 { grid-template-columns: minmax(0, 1fr); max-height: 240px; }
.pick {
  position: relative; display: flex; gap: var(--space-xs); align-items: center; padding: var(--space-xs); border-radius: var(--radius-inner);
  background: var(--color-surface-2); cursor: pointer; overflow-wrap: anywhere;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.pick:hover { background: var(--color-surface-3); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-check {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none; margin-left: auto; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--color-ink-3); color: transparent;
}
.pick-check .icon { width: 14px; height: 14px; }
.pick:has(input:checked) { background: var(--color-green-soft); box-shadow: inset 0 0 0 1.5px var(--color-green); }
.pick:has(input:checked) .pick-check { background: var(--color-green); box-shadow: none; color: var(--color-green-ink); }
.pick:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.pick-text { min-width: 0; font-size: var(--text-sm); }
.pick-text strong { display: block; font-weight: 500; font-size: var(--text-md); }

/* ---------- Tables-as-lists (people, staff) ---------- */
.plist { list-style: none; margin: 0; padding: 0; display: grid; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-xs) 0; border-top: 1px solid var(--color-rule); }
.prow:first-child { border-top: 0; }
.prow-name { font-weight: 500; overflow-wrap: anywhere; }
.prow-sub { font-size: var(--text-sm); color: var(--color-ink-3); overflow-wrap: anywhere; }
.prow-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.prow-actions form { margin: 0; }
.prow.is-blocked .prow-main { opacity: 0.6; }
@media (max-width: 720px) {
  .prow { grid-template-columns: auto minmax(0, 1fr); }
  .prow-extra { grid-column: 2; }
  .prow-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.inline-pass { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.inline-pass input { flex: 1 1 160px; min-height: 36px; padding: 6px 12px; border: 0; border-radius: var(--radius-pill); background: var(--color-surface-2); font: inherit; font-size: var(--text-sm); color: var(--color-ink); }
.details-btn summary { list-style: none; }
.details-btn summary::-webkit-details-marker { display: none; }
.details-btn[open] { flex-basis: 100%; }
.details-btn[open] summary { margin-bottom: 6px; background: var(--color-teal-soft); }

/* ---------- Meeting detail ---------- */
.meta-chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-sm); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--color-surface); font-size: var(--text-sm); color: var(--color-ink-2); }
.kv { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: var(--space-xs) var(--space-sm); font-size: var(--text-sm); }
.kv dt { color: var(--color-ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy-field { display: flex; gap: 6px; }
.kv .kv-wide { grid-column: 1 / -1; }
.kv dt.kv-wide { margin-bottom: -6px; }
.kv .badge { white-space: normal; }
.copy-field input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--radius-input); background: var(--color-surface-2); font: inherit; font-size: var(--text-sm); color: var(--color-ink-2); }
.player { width: 100%; border-radius: var(--radius-inner); background: var(--color-ink); margin-bottom: var(--space-sm); }
audio.player { background: transparent; }
.prose p + p { margin-top: var(--space-xs); }
.agreements { list-style: none; counter-reset: agr; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.agreements li { counter-increment: agr; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-xs); background: var(--color-surface-2); border-radius: var(--radius-inner); padding: var(--space-xs) var(--space-sm); }
.agreements li::before { content: counter(agr); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--color-green); color: var(--color-green-ink); font-size: var(--text-sm); font-weight: 600; }
.transcript { max-height: 560px; overflow-y: auto; display: grid; gap: var(--space-2xs); padding-right: var(--space-2xs); }
.transcript p { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs); align-items: baseline; }
.ts { font: 500 var(--text-xs) var(--font-mono); color: var(--color-teal-text); background: var(--color-teal-soft); border: 0; border-radius: var(--radius-pill); padding: 3px 9px; cursor: pointer; }
.ts:hover { background: var(--color-teal-soft-hover); }
.pipeline-steps { list-style: none; margin: var(--space-sm) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pipeline-steps li { font-size: var(--text-xs); color: var(--color-ink-3); display: grid; gap: 6px; }
.pipeline-steps li::before { content: ""; height: 6px; border-radius: var(--radius-pill); background: var(--chart-empty); }
.pipeline-steps li.is-done::before { background: var(--chart-done); }
.pipeline-steps li.is-now { color: var(--color-ink); font-weight: 500; }
.pipeline-steps li.is-now::before { background: var(--chart-progress); }

/* ---------- Login ---------- */
.login-body { background: var(--login-paper); color: var(--login-ink); min-height: 100vh; }
.login { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); min-height: 100vh; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: var(--space-xl); isolation: isolate; background: var(--login-art); }
.login-art .brand { color: var(--login-ink); gap: var(--space-xs); }
.login-art .brand-mark { background: transparent; color: var(--login-ink); box-shadow: inset 0 0 0 1.5px var(--login-rule); }
.login-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.login-scene .slab {
  position: absolute; left: -10%; right: -30%; top: 12%; height: 18%;
  background: linear-gradient(180deg, var(--scene-1), var(--scene-2));
  transform: skewY(-8deg);
}
.login-scene .led {
  position: absolute; left: -10%; right: -30%; top: calc(30% - 1px); height: 2px;
  background: var(--login-gold); transform: skewY(-8deg);
  box-shadow: 0 0 18px 4px var(--login-glow), 0 0 60px 12px var(--scene-glow-wide);
}
.login-scene .wall {
  position: absolute; left: 16%; top: 30%; bottom: 34%; width: 58%;
  background: linear-gradient(90deg, var(--scene-3), var(--scene-4) 45%, var(--scene-5));
}
.login-scene .doorway {
  position: absolute; left: 34%; top: 36%; bottom: 34%; width: 22%;
  background: radial-gradient(120% 90% at 50% 100%, var(--scene-door-light), var(--scene-door-dark) 72%);
}
.login-scene .steps {
  position: absolute; left: 0; right: 0; bottom: 22%; height: 12%;
  background: repeating-linear-gradient(180deg, var(--scene-step-1) 0 10px, var(--scene-step-2) 10px 14px);
}
.login-scene .ground {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 24%;
  background: linear-gradient(180deg, var(--scene-ground-1), var(--scene-ground-2));
}
.login-scene .ground::before {
  content: ""; position: absolute; left: 0; right: 0; top: 28%; height: 2px; background: var(--login-gold-2);
  box-shadow: 0 0 16px 3px var(--login-glow); transform: skewY(-4deg); opacity: 0.8;
}
.login-scene .vignette { position: absolute; inset: 0; background: linear-gradient(180deg, var(--scene-vignette-top), var(--scene-vignette-bottom) 88%); }
.login-welcome { border-left: 3px solid var(--login-gold-2); padding-left: var(--space-sm); display: grid; gap: var(--space-xs); }
.login-welcome h2 { font-size: var(--text-2xl); line-height: 1.12; font-weight: 500; }
.login-welcome p { color: var(--login-ink-2); font-size: var(--text-sm); }
.login-copy { color: var(--login-ink-2); font-size: var(--text-xs); margin-top: var(--space-xl); }
.login-main { display: grid; place-items: center; align-content: center; gap: var(--space-md); padding: var(--space-xl) var(--space-md); }
.login-card {
  width: 100%; max-width: 440px; background: var(--login-surface); border-radius: var(--radius-card);
  padding: var(--space-2xl) var(--space-xl) var(--space-xl); box-shadow: inset 0 0 0 1px var(--login-rule), 0 30px 80px var(--login-shadow);
}
.login-medal { width: 72px; height: 72px; margin: 0 auto var(--space-md); border-radius: 50%; display: grid; place-items: center; background: var(--login-surface-2); box-shadow: inset 0 0 0 1px var(--login-rule); color: var(--login-gold); }
.login-medal svg { width: 30px; height: 30px; }
.login-card h1 { text-align: center; font-size: var(--text-2xl); }
.login-lead { text-align: center; color: var(--login-ink-2); font-size: var(--text-sm); margin: var(--space-2xs) 0 var(--space-xl); }
.login-card .field > label { color: var(--login-ink); }
.input-wrap { position: relative; }
.input-wrap > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--login-ink-2); pointer-events: none; }
.login-card .field input {
  min-height: 52px; padding: 14px 48px; background: var(--login-surface-2); color: var(--login-ink);
  box-shadow: inset 0 0 0 1px var(--login-rule);
}
.login-card .field input::placeholder { color: var(--login-ink-2); opacity: 0.85; }
.login-card .field input:hover { box-shadow: inset 0 0 0 1px var(--login-rule-hover); }
.login-card .field input:focus-visible { outline: 2px solid var(--login-gold); outline-offset: 1px; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--login-ink-2); display: grid; place-items: center; cursor: pointer;
}
.pass-toggle:hover { color: var(--login-ink); background: var(--login-hover); }
.pass-toggle:focus-visible { outline: 2px solid var(--login-gold); outline-offset: 0; }
.login-help { text-align: right; font-size: var(--text-sm); color: var(--login-gold); margin-top: -6px; }
.btn-gold {
  width: 100%; min-height: 52px; justify-content: space-between; padding: 14px 22px; border-radius: var(--radius-input);
  background: linear-gradient(135deg, var(--login-gold), var(--login-gold-2)); color: var(--login-gold-ink); font-size: var(--text-md); font-weight: 600;
  box-shadow: 0 8px 28px var(--login-glow);
}
.btn-gold:hover { background: linear-gradient(135deg, var(--login-gold-hover), var(--login-gold-2-hover)); }
.btn-gold:focus-visible { outline: 2px solid var(--login-ink); outline-offset: 3px; }
.login-notice { display: flex; gap: var(--space-2xs); align-items: flex-start; border-radius: var(--radius-input); padding: var(--space-xs) var(--space-sm); margin-bottom: var(--space-md); font-size: var(--text-sm); }
.login-notice-error { background: var(--login-error-soft); color: var(--login-error-text); }
.login-notice-info { background: var(--login-surface-2); color: var(--login-ink); }
.login-foot { display: flex; align-items: center; gap: var(--space-2xs); color: var(--login-ink-2); font-size: var(--text-sm); }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
}
@media (max-width: 420px) {
  .login-card { padding: var(--space-xl) var(--space-md) var(--space-md); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .spinner { animation: none; }
}
