/* Good Shepherd (an IS43 Health Care facility) — calm clinical palette. No inline styles anywhere (strict CSP). */
@font-face { font-family: 'Instrument Serif'; src: url('/static/fonts/InstrumentSerif-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/Inter-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --serif: 'Instrument Serif', 'New York', ui-serif, 'Iowan Old Style', Georgia, serif; }
:root {
  --ink: #16212b; --ink-2: #3b4a59; --muted: #6b7a89; --line: #e4e9ef; --line-2: #d3dbe4;
  --bg: #f4f7fa; --card: #ffffff;
  --brand-950: #0b2f4a; --brand-900: #0d3a5b; --brand-800: #0f4c70; --brand-700: #0f5c7a; --brand-600: #1a6f90; --brand-300: #9fcbe0; --brand-100: #dcedf5; --brand-50: #eef6fa;
  --teal: #1a8a8f; --teal-100: #d8f0ef;
  --amber-50: #fff7e6; --amber-700: #9a5b00; --amber-200: #ffe2a8;
  --green-50: #e9f7ef; --green-700: #1d6b3a; --green-200: #bfe6cf;
  --blue-50: #e8f1fb; --blue-700: #1d4f91; --blue-200: #bcd3f2;
  --red-50: #fdecea; --red-700: #a32519; --red-200: #f5c2bc;
  --purple-50: #f1ecfb; --purple-700: #5b3fa0; --purple-200: #d8cbf3;
  --gray-50: #f1f4f7; --gray-700: #4c5a68; --gray-200: #d9e0e7;
  --radius: 14px; --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 33, 43, .06), 0 1px 2px -1px rgba(16, 33, 43, .04);
  --shadow-hover: 0 10px 26px -6px rgba(16, 33, 43, .14), 0 2px 8px -2px rgba(16, 33, 43, .06);
  --sidebar: 250px; --t: 150ms cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-700); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(calc(-100% - 16px)); padding: 10px 16px; background: var(--card); color: var(--brand-950); border: 2px solid var(--brand-700); border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { transform: none; outline: 2px solid var(--brand-950); outline-offset: 2px; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 650; letter-spacing: -.005em; margin: 0 0 12px; color: var(--ink); }
h3 { font-size: 15px; margin: 8px 0 4px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
code.secret { font-size: 20px; letter-spacing: 3px; background: var(--brand-50); padding: 4px 10px; border-radius: 6px; }
code.small { font-size: 12px; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; }
.danger { color: var(--red-700); } .struck { text-decoration: line-through; color: var(--muted); }

/* ---- shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: 0 0 var(--sidebar); background: linear-gradient(180deg, var(--brand-950), var(--brand-900) 60%, #0e4a5e); color: #dbe9f1; display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 6px 8px 18px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-weight: 800; letter-spacing: .02em; font-size: 13px; }
.logo-text { display: flex; flex-direction: column; font-weight: 700; line-height: 1.1; } .logo-text small { font-weight: 400; font-size: 11.5px; color: var(--brand-300); margin-top: 3px; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #8fb3c7; padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #c8dce8; text-decoration: none; font-weight: 500; font-size: 14px; transition: background var(--t), color var(--t); }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--brand-700); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.nav-ico { width: 20px; text-align: center; font-size: 15px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 10px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; } .user-meta strong { font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .user-meta span { font-size: 11.5px; color: var(--brand-300); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; background: var(--brand-100); color: var(--brand-800); }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.crumb { font-weight: 600; font-size: 14px; color: var(--ink-2); }
/* The compact header may abbreviate its title; main retains the full wrapped title. */
.topbar > .crumb { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar > .env { flex-shrink: 0; }
.env { font-size: 11.5px; color: var(--amber-700); background: var(--amber-50); border: 1px solid var(--amber-200); border-radius: 999px; padding: 3px 10px; font-weight: 500; white-space: nowrap; }
main { padding: 26px 28px 60px; max-width: 1240px; width: 100%; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; margin-top: auto; }

/* ---- page head ---- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.crumbs { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); } .crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- cards & grids ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card.ok { background: var(--green-50); border-color: var(--green-200); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.link-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow var(--t), transform var(--t); margin: 0; }
.link-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.card-title { font-weight: 650; font-size: 15.5px; margin-bottom: 4px; color: var(--brand-800); }
.card-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 12px; font-size: 12.5px; color: var(--muted); }
.grid.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .sidebar { display: none; } main { padding: 18px 16px 40px; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-700); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); box-shadow: var(--shadow); }
.stat-num { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat.amber { border-left-color: #e3a008; } .stat.blue { border-left-color: #3b7ddd; } .stat.green { border-left-color: #2e9e5b; } .stat.red { border-left-color: #d6362b; }
.note { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-900); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; margin: 0 0 16px; }

/* ---- badges ---- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.5; vertical-align: middle; background: var(--gray-50); color: var(--gray-700); box-shadow: inset 0 0 0 1px var(--gray-200); }
.badge.amber { background: var(--amber-50); color: var(--amber-700); box-shadow: inset 0 0 0 1px var(--amber-200); }
.badge.green { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-200); }
.badge.blue { background: var(--blue-50); color: var(--blue-700); box-shadow: inset 0 0 0 1px var(--blue-200); }
.badge.red { background: var(--red-50); color: var(--red-700); box-shadow: inset 0 0 0 1px var(--red-200); }
.badge.purple { background: var(--purple-50); color: var(--purple-700); box-shadow: inset 0 0 0 1px var(--purple-200); }

/* ---- forms & buttons ---- */
label { display: block; margin: 0 0 12px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; font-size: 15px; color: var(--ink); background: #fff; transition: border-color var(--t), box-shadow var(--t); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(26, 111, 144, .18); }
label.check { font-weight: 400; } label.check input { margin-right: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .form-grid .span2 { grid-column: span 2; } .form-grid > div { grid-column: span 2; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span2, .form-grid > div { grid-column: span 1; } }
button, .btn-primary, .btn-secondary { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: var(--radius-sm); padding: 9px 16px; border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t), transform var(--t), box-shadow var(--t); }
.btn-primary, button:not(.link):not(.btn-secondary):not(.btn-mini) { background: var(--brand-700); color: #fff; }
.btn-primary:hover, button:not(.link):not(.btn-secondary):not(.btn-mini):hover { background: var(--brand-800); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); } .btn-secondary:hover { background: var(--gray-50); }
.btn-primary.wide { width: 100%; justify-content: center; margin-top: 6px; }
button[disabled], .btn-primary[disabled] { background: #c7d2dc !important; color: #fff; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
button.link { background: none; border: 0; color: var(--brand-700); padding: 0; font-size: 13px; font-weight: 500; } button.link.danger { color: var(--red-700); } button.link.light { color: var(--brand-300); }
.btn-mini { padding: 4px 10px; font-size: 12px; background: var(--green-50); color: var(--green-700); border-color: var(--green-200); border-radius: 999px; }
.btn-mini.ghost { background: #fff; color: var(--muted); border-color: var(--line-2); }
form.inline { display: inline-flex; gap: 6px; }
.flash { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-200); margin: 0 0 14px; }
.flash.error { background: var(--red-50); color: var(--red-700); border-color: var(--red-200); }

/* ---- lists ---- */
ul.list, ul.messages, ul.items, ul.transcript { list-style: none; padding: 0; margin: 0 0 12px; }
ul.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } ul.list li > div { flex: 1; min-width: 0; } ul.list li:last-child { border-bottom: 0; }
.ico { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
ul.messages li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); } ul.messages .body { white-space: pre-wrap; } ul.messages .meta { font-size: 13px; }
ul.items li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); } ul.items li > div { flex: 1; }
.evidence { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--brand-300); background: var(--brand-50); color: var(--ink-2); font-size: 13px; font-style: italic; border-radius: 0 6px 6px 0; }
ul.bullets, ol.bullets { margin: 0; padding-left: 20px; } ul.bullets li, ol.bullets li { margin: 4px 0; }
ol.agenda { margin: 0; padding-left: 22px; } ol.agenda li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); } ol.agenda li > div { flex: 1; } ol.agenda li.carried { background: linear-gradient(90deg, var(--amber-50), transparent 40%); margin-left: -22px; padding-left: 22px; border-radius: 6px; }
ul.transcript li { display: grid; grid-template-columns: 52px 150px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.empty { text-align: center; padding: 32px 12px; color: var(--muted); } .empty-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--gray-50); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 8px; } .empty h3 { color: var(--ink); margin: 4px 0; } .empty p { margin: 0; font-size: 13.5px; }
table { width: 100%; border-collapse: collapse; } th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
td { padding: 8px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; } tr:hover td { background: #fafcfd; }
table.small td { font-size: 12.5px; padding: 6px 8px; }
pre.prose { white-space: pre-wrap; font: inherit; margin: 0 0 8px; }

/* ---- auth pages ---- */
body.auth { background: var(--brand-950); min-height: 100vh; }
.auth-bg { position: fixed; inset: 0; background: url('/static/login-bg.svg') center / cover no-repeat; }
.auth-wrap { position: relative; max-width: 440px; margin: 0 auto; padding: 56px 20px 40px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.auth-brand { text-align: center; color: #fff; margin-bottom: 22px; } .auth-brand h1 { font-size: 30px; margin: 10px 0 2px; } .auth-brand p { margin: 0; color: var(--brand-300); font-size: 14px; }
.auth-icon { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; backdrop-filter: blur(6px); }
.auth-card { padding: 28px; border-radius: 18px; box-shadow: 0 24px 48px -12px rgba(0,0,0,.45); } .auth-card h2 { font-size: 20px; margin-bottom: 2px; } .auth-card .muted { margin-top: 0; }
.auth-foot { text-align: center; color: var(--brand-300); font-size: 12px; margin-top: 18px; }
body.auth main.auth-wrap h1 + p { color: var(--brand-300); }

/* temporary dev quick-login box (remove before hosting) */
.dev-box { background: var(--amber-50); border: 2px dashed #e3a008; color: var(--amber-700); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; font-size: 13.5px; }
.dev-box .btn-primary { background: #b45309; margin-top: 10px; }

.time-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; } .time-row select { margin-top: 5px; }

/* ---- meeting tabs + BNYC-style agenda ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin: 0 0 18px; }
.tab { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); } .tab.active { color: var(--brand-700); border-bottom-color: var(--brand-700); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--green-50); border: 1px solid var(--green-200); color: var(--green-700); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; font-weight: 500; }
.toast button.link { font-weight: 700; text-decoration: underline; }
.agenda-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--brand-950), var(--brand-700)); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; border-bottom: 3px solid #e3a008; }
.agenda-head h2 { color: #fff; margin: 2px 0; font-size: 18px; } .agenda-head .muted { color: var(--brand-300); }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-300); font-weight: 700; } .eyebrow.red { color: var(--red-700); }
.pill { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.critical { border: 2px solid var(--red-200); background: #fffafa; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; } .critical h3 { margin: 2px 0 2px; font-size: 17px; }
.crit-card { background: #fff; border: 1px solid var(--red-200); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 10px; }
.crit-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); } .kv:first-of-type { border-top: 0; }
.k { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 3px; }
.cell-list { margin: 0; padding-left: 16px; } .cell-list li { margin: 2px 0; }
.chip { display: inline-block; border-radius: 6px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; } .chip.warn { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-200); }
.chip.date { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-200); } .chip.risk { background: var(--red-50); color: var(--red-700); border: 1px solid var(--red-200); margin-bottom: 4px; }
.agenda-table th:first-child { width: 16%; } .agenda-table tr.crit td:first-child { border-left: 3px solid var(--red-700); } .agenda-table td { vertical-align: top; }
.card.mini { padding: 12px 14px; margin: 0; } .card.mini h3 { margin: 0 0 6px; }
details.closed summary { cursor: pointer; font-size: 15px; } details.closed[open] summary { margin-bottom: 10px; }
@media (max-width: 900px) { .kv { grid-template-columns: 1fr; } .agenda-table thead { display: none; } .agenda-table td { display: block; border-bottom: 0; } .agenda-table tr { display: block; border-bottom: 1px solid var(--line-2); padding: 8px 0; } }

/* ---- Good Shepherd wordmark + minimal login (F2: serif wordmark, Inter UI) ---- */
.wordmark { display: flex; align-items: center; gap: 12px; color: #fff; }
.wordmark .crook { width: 20px; height: 36px; fill: none; stroke: #9fe0e3; stroke-width: 2; stroke-linecap: round; flex: 0 0 auto; }
.wm-name { font-family: var(--serif); font-size: 32px; line-height: 1.05; letter-spacing: -.01em; font-weight: 500; }
.wm-by { margin-top: 5px; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.62); font-weight: 500; }
.auth-wrap .wordmark { justify-content: center; margin-bottom: 26px; }
.auth-card h2.serif { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -.01em; margin-bottom: 14px; }
.auth-card { padding: 26px 26px 22px; }
.auth-foot { margin-top: 16px; }
.logo.wordmark.sm { gap: 10px; padding: 6px 8px 18px; } .logo.wordmark.sm .crook { width: 14px; height: 26px; } .logo.wordmark.sm .wm-name { font-size: 20px; } .logo.wordmark.sm small { display: block; font-weight: 500; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-300); margin-top: 3px; }

/* ---- agenda views A/B (two accents: red = urgent, brand = action) ---- */
.answer { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 14px; flex-wrap: wrap; }
.answer h2 { font-size: 17px; letter-spacing: -.015em; margin: 0 0 2px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg a { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--brand-700); color: #fff; }
.alist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.alist .sec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 16px 4px; }
.arow { display: grid; grid-template-columns: 24px 1fr 170px 120px 150px; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.arow .mark { width: 4px; height: 34px; border-radius: 4px; background: var(--line-2); justify-self: center; } .arow.urgent .mark { background: var(--red-700); }
.arow .what b { font-weight: 600; display: block; } .arow .what span { color: var(--muted); font-size: 12px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; } .who.none { color: var(--amber-700); font-weight: 600; }
.arow .when { font-size: 13px; font-variant-numeric: tabular-nums; } .arow.urgent .when { color: var(--red-700); font-weight: 600; }
.do { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.btn-mini.solid { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.row-details { position: relative; } .row-details summary { list-style: none; cursor: pointer; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.row-details summary::-webkit-details-marker { display: none; } .row-details[open] summary { background: var(--brand-50); }
.row-details > div { position: absolute; right: 0; top: 34px; z-index: 3; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); padding: 10px 12px; text-align: left; }
.persons { display: grid; gap: 12px; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.person .ph { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); } .person .ph b { font-size: 14px; } .person .ph .cnt { margin-left: auto; }
.danger-soft { color: var(--amber-700); }
.ti { display: grid; grid-template-columns: 4px 1fr 110px 150px; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); } .ti:last-child { border-bottom: 0; }
.ti .ubar { width: 4px; height: 30px; border-radius: 4px; background: var(--line-2); } .ti.urgent .ubar { background: var(--red-700); }
.ti .t b { display: block; font-weight: 600; } .ti .t span { color: var(--muted); font-size: 12px; }
.ti .d { font-size: 12.5px; font-variant-numeric: tabular-nums; } .ti.urgent .d { color: var(--red-700); font-weight: 600; }
.bydate h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; } .bydate ul { margin: 0; padding-left: 16px; } .bydate li { margin: 3px 0; font-size: 13px; } .bydate li.urgent { color: var(--red-700); font-weight: 600; }
@media (max-width: 900px) { .arow { grid-template-columns: 24px 1fr; } .arow .who, .arow .when, .arow .do { grid-column: 2; justify-content: flex-start; } .ti { grid-template-columns: 4px 1fr; } }

/* ---- premium pass: icons, topbar tools, today ---- */
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: -3px; }
.nav-ico svg.i { width: 17px; height: 17px; } h1 svg.i { width: 22px; height: 22px; }
.topbar .tools { display: flex; align-items: center; gap: 10px; }
.topsearch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; height: 32px; width: 260px; color: var(--muted); background: var(--bg); }
.topsearch input { border: 0; background: transparent; margin: 0; padding: 0; font-size: 13px; width: 100%; outline: none; } .topsearch input:focus { box-shadow: none; }
.topsearch:focus-within { outline: 2px solid var(--brand-700); outline-offset: 2px; }
.topsearch kbd { font: 11px ui-monospace, Menlo, monospace; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; color: var(--muted); background: #fff; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; display: inline-grid; place-items: center; color: var(--ink-2); position: relative; }
.icon-btn .dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red-700); border: 2px solid #fff; }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); } .row:first-of-type { border-top: 0; }
.row .t { flex: 1; min-width: 0; } .row .t b { font-weight: 600; display: block; font-size: 13.5px; } .row .t span { color: var(--muted); font-size: 12px; } .row .t a { color: inherit; text-decoration: none; } .row .t a:hover { color: var(--brand-700); }
.tile { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand-700); flex: 0 0 auto; }
.tile.red { background: var(--red-50); color: var(--red-700); } .tile.amber { background: var(--amber-50); color: var(--amber-700); } .tile.green { background: var(--green-50); color: var(--green-700); }
.stat .stat-num .muted { font-size: 14px; }

.filters { display: flex; gap: 8px; align-items: center; } .filters input, .filters select { margin: 0; width: auto; flex: 1; } .filters button { margin: 0; }
.row.unread .t b { color: var(--brand-800); } .row.unread::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red-700); flex: 0 0 auto; }
.toast.fade { opacity: .5; transition: opacity .6s ease-out; }

/* ---- per-person tints (stable hue per owner; red reserved for urgent) ---- */
.p0 { --p-bg: #eaf2ff; --p-fg: #1e40af; --p-edge: #3b6fd8; }   /* blue */
.p1 { --p-bg: #e3f4f3; --p-fg: #0f5f63; --p-edge: #1a8a8f; }   /* teal */
.p2 { --p-bg: #f1ecfb; --p-fg: #4c3391; --p-edge: #7c5cc4; }   /* violet */
.p3 { --p-bg: #e8f6ee; --p-fg: #166534; --p-edge: #2e9e5b; }   /* green */
.p4 { --p-bg: #fff4db; --p-fg: #7c4a03; --p-edge: #d99a1e; }   /* gold */
.p5 { --p-bg: #eef1f5; --p-fg: #334155; --p-edge: #64748b; }   /* slate */
.p6 { --p-bg: #e6f3fb; --p-fg: #0c4a6e; --p-edge: #2a8ac4; }   /* sky */
.p-none { --p-bg: var(--amber-50); --p-fg: var(--amber-700); --p-edge: #e3a008; }
.avatar.tint { background: var(--p-edge); color: #fff; }
.person.p0, .person.p1, .person.p2, .person.p3, .person.p4, .person.p5, .person.p6, .person.p-none { border-left: 4px solid var(--p-edge); background: linear-gradient(180deg, var(--p-bg), var(--card) 56px); }
.person .ph { background: var(--p-bg); border-bottom: 1px solid var(--line); } .person .ph b { color: var(--p-fg); }
.who.p0, .who.p1, .who.p2, .who.p3, .who.p4, .who.p5, .who.p6 { color: var(--p-fg); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .p0 { --p-bg: #13213f; --p-fg: #9db9ff; } .p1 { --p-bg: #0f2a2c; --p-fg: #8fd9d6; } .p2 { --p-bg: #251b3f; --p-fg: #c4b2ef; } .p3 { --p-bg: #0f2d1c; --p-fg: #7fd4a2; } .p4 { --p-bg: #3a2a0a; --p-fg: #f5c36a; } .p5 { --p-bg: #1b2330; --p-fg: #c3ccd8; } .p6 { --p-bg: #0e2a3d; --p-fg: #8ed0f5; }
}

.seg button { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: transparent; border: 0; margin: 0; box-shadow: none; } .seg button:hover { transform: none; box-shadow: none; background: var(--line); } .seg button.on { background: var(--brand-700); color: #fff; }

/* ---- channels (v5) ---- */
.chan-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.chan { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .15s; }
.chan:first-child { border-top: 0; } .chan:hover { background: var(--bg); }
.chan .tile { width: 36px; height: 36px; }
.chan-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chan-name { display: flex; align-items: center; gap: 8px; } .chan-name b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.chan.unread .chan-name b { color: var(--brand-800); }
.chan-preview { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.count { background: var(--brand-700); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.avatars { display: inline-flex; } .avatar.xs { width: 22px; height: 22px; font-size: 10px; margin-left: -6px; border: 2px solid var(--card); } .avatar.xs:first-child { margin-left: 0; } .avatar.more { background: var(--gray-200); color: var(--gray-700); }
details.modal summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; } details.modal summary::-webkit-details-marker { display: none; } details.modal summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); margin-right: 8px; } details.modal[open] summary { margin-bottom: 12px; } details.modal[open] summary::before { content: '–'; }
.thread { padding: 8px 20px 16px; }
.msg { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); } .msg:first-child { border-top: 0; } .msg-body { flex: 1; min-width: 0; } .msg .body { white-space: pre-wrap; font-size: 14px; } .msg .meta { font-size: 13px; }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); } .composer textarea { margin: 0; flex: 1; resize: vertical; } .composer button { margin: 0; }
.uploader { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; } .uploader label { flex: 1; margin: 0; } .uploader button { margin: 0; }

/* ---- responsive: phones and tablets ---- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .shell { flex-direction: column; } .sidebar { display: none; }
  .content { min-width: 0; }
  .topbar { padding: 10px 12px; gap: 8px; position: sticky; top: 0; flex-wrap: wrap; }
  .topbar .crumb { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topsearch { width: auto; flex: 1; min-width: 0; } .topsearch kbd { display: none; }
  .topbar > .env { display: block; flex-basis: 100%; order: 2; text-align: center; padding: 2px 8px; border-radius: 6px; }
  main { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line-2); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(16,33,43,.06); }
  .tab-item, .tabbar summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px; cursor: pointer; list-style: none; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tab-item.active { color: var(--brand-700); background: var(--brand-50); }
  .tab-item svg.i, .tabbar summary svg.i { width: 20px; height: 20px; }
  .tabbar .more[open] summary { color: var(--brand-700); }
  .drawer { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); max-height: calc(100vh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior-y: contain; scroll-padding-block: 10px; background: var(--card); border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0; box-shadow: 0 -12px 32px rgba(16,33,43,.14); padding: 10px 10px 12px; display: grid; gap: 2px; }
  .drawer a, .drawer button.link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; width: 100%; justify-content: flex-start; }
  .drawer a:hover, .drawer a:active { background: var(--bg); }
  .page-head { flex-direction: column; align-items: flex-start; } .page-head .actions { width: 100%; }
  .page-head .actions .btn-primary, .page-head .actions .btn-secondary { flex: 1; justify-content: center; }
  .two-col, .grid.cards, .stats, .form-grid, .cols { grid-template-columns: 1fr; }
  .form-grid .span2, .form-grid > div { grid-column: span 1; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; } .tab { white-space: nowrap; }
  .answer { flex-direction: column; align-items: stretch; } .seg { justify-content: center; }
  .arow { grid-template-columns: 20px 1fr; gap: 8px 10px; } .arow .what { grid-column: 2; } .arow .who, .arow .when, .arow .do { grid-column: 2; justify-content: flex-start; }
  .ti { grid-template-columns: 4px 1fr; } .ti .d, .ti .do { grid-column: 2; justify-content: flex-start; }
  .row-details > div { right: auto; left: 0; width: min(320px, 86vw); }
  .chan { grid-template-columns: 36px 1fr; } .chan-meta { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .kv { grid-template-columns: 1fr; }
  .composer, .uploader, .filters { flex-wrap: wrap; } .composer textarea, .filters input, .filters select { width: 100%; flex: 1 1 100%; } .composer button, .filters button { width: 100%; }
  .wm-name { font-size: 26px; } .auth-wrap { padding: 32px 16px 24px; }
  /* tables stack into cards; each cell shows its column label */
  table, thead, tbody, tr, td, th { display: block; }
  thead { position: absolute; left: -9999px; top: -9999px; }
  tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 0; background: var(--card); }
  td { border: 0; padding: 6px 12px; font-size: 14px; } td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
  td[data-label=""]::before { display: none; }
  tr:hover td { background: transparent; }
  ul.transcript li { grid-template-columns: 1fr; gap: 2px; }
  .toast { flex-wrap: wrap; }
}
/* touch targets and iOS zoom prevention */
@media (max-width: 900px), (pointer: coarse) {
  button, .btn-primary, .btn-secondary, .btn-mini, .tab, .seg button, .link, .icon-btn, summary { min-height: 44px; }
  .tab { min-width: 44px; }
  .btn-mini { padding: 0 14px; } button.link { min-height: 44px; display: inline-flex; align-items: center; }
  input:not([type=checkbox]), select, textarea, .topsearch input { font-size: 16px; min-height: 44px; }
  .topsearch { height: 44px; } .icon-btn { width: 44px; height: 44px; } label.check input { width: 22px; height: 22px; }
}
@media (min-width: 901px) and (max-width: 1100px) { .sidebar { width: 220px; flex-basis: 220px; } .two-col { grid-template-columns: 1fr 1fr; } }
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; }
.card, .alist, .chan-list, .answer, .person { min-width: 0; } pre.prose, .msg .body, .cell-list { overflow-wrap: anywhere; }
/* Accepted user text must fit its layout, including unbroken subjects and URLs.
   Let grid/flex children shrink instead of expanding adjacent forms offscreen. */
.two-col.conversation-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.two-col.conversation-layout > *, .page-head > *, .form-grid > * { min-width: 0; max-width: 100%; }
@media (min-width: 901px) and (max-width: 1100px) { .two-col.conversation-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 900px) { .two-col.conversation-layout { grid-template-columns: 1fr; } }
.page-head h1, .crumbs, .row .t, .card-title, .msg .meta { overflow-wrap: anywhere; }
.composer textarea, .form-grid input, .form-grid textarea, .form-grid select { min-width: 0; max-width: 100%; }

@media (max-width: 900px), (pointer: coarse) {
  .row-details summary { width: 44px; height: 44px; }
  ul.list li > div > a, .row .t b a, .card-head a, .crumbs a { display: inline-block; padding: 11px 0; }
  .card-head a { padding: 11px 12px; margin: -11px -12px; border-radius: 8px; }
  input[type=file] { padding: 10px; }
}

@media (max-width: 900px), (pointer: coarse) {
  ul.list li > div > a, .row .t b a, .card-head a, .crumbs a, p.kv a { padding-top: 14px; padding-bottom: 14px; min-height: 44px; min-width: 44px; box-sizing: border-box; display: inline-block; }
  button.link { min-width: 44px; justify-content: center; }
  .card-head a { padding: 13px 12px; margin: -13px -12px; }
  label.check { display: flex; align-items: center; min-height: 44px; gap: 10px; } label.check input { width: 26px; height: 26px; margin: 0; padding: 9px; box-sizing: content-box; }
}

/* HR + resident portal */
.crisis { border-left: 4px solid #d6362b; background: #fff5f4; font-size: 14px; }
.crisis strong { display: inline-flex; align-items: center; gap: 6px; color: #a3261d; }
.note { border-left: 4px solid #e3a008; background: #fffaeb; font-size: 14px; }
a.link-row { color: inherit; text-decoration: none; } a.link-row:hover b { text-decoration: underline; }
.row.unread b { color: var(--brand-700); }
.form-grid label.span, .form-grid p.span, .form-grid .span { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
td.wrap { white-space: pre-wrap; max-width: 320px; }
.msg.staff .msg-body { background: #eef4fb; border-radius: 8px; padding: 6px 10px; }
body.portal .sidebar { background: linear-gradient(180deg, #0f3b2e, #184a3a 60%, #1f5c48); }
body.portal .topbar .env { background: #e8f3ee; color: #184a3a; }

/* Research quick wins (2026-10-27): sign-in help, help page, end-shift button, Needs-you first, offline page */
.auth-help { margin: 14px 0 0; text-align: center; }
.auth-help a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 600; }
.faq { margin: 0; }
.faq dt { font-weight: 700; margin-top: 16px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 4px 0 0; line-height: 1.5; }
.help-card .btn-secondary.wide { display: flex; justify-content: center; align-items: center; min-height: 48px; }
.needs-you { margin-bottom: 16px; }
.needs-you .row a { text-decoration: none; }
.drawer form.end-shift { display: grid; gap: 6px; margin-top: 8px; padding: 10px 2px 0; border-top: 1px solid var(--line-2); }
.drawer form.end-shift button.btn-secondary { min-height: 48px; width: 100%; justify-content: center; font-size: 15px; }
.offline-card h1 { margin-top: 0; }
.offline-card .btn-primary.wide { display: flex; justify-content: center; align-items: center; min-height: 48px; }
/* Teams join link (Meetings list and meeting page) */
.join-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.join-card .join-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.btn-join { min-height: 44px; justify-content: center; }
@media (max-width: 700px) { .join-card .btn-join { width: 100%; } }
.teams-admin input[type=url] { width: 100%; }
/* ---- meeting agenda in the BNYC stand-up layout: band → Critical cards → all items → to-dos by person ---- */
.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; }
.ag-kick { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #f5d77c; }
.ag-kick.dark { color: var(--brand-950); letter-spacing: .14em; } .ag-kick.red { color: #be123c; } .ag-kick.gold { color: #8a6c17; letter-spacing: .14em; }
.ag-summary p { margin: 4px 0; } .ag-summary > p:nth-of-type(3) { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink); margin: 10px 0 6px; }
.ag-band { margin: 0 0 12px; padding: 14px 16px; border-radius: var(--radius); border-bottom: 4px solid #d4a72c; background: linear-gradient(90deg, #0f172a, var(--brand-950), #0f172a); color: #fff; box-shadow: var(--shadow); }
.ag-band-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ag-band h2 { margin: 0; color: #fff; font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.ag-pill { font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.ag-band-sub { margin: 6px 0 0; font-size: 12px; color: rgba(255,255,255,.72); }
.ag-crit { margin-bottom: 12px; padding: 16px; border: 2px solid #fda4af; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.ag-crit h2, .ag-todos h2 { margin: 2px 0 2px; font-family: var(--serif); font-size: 18px; color: var(--brand-950); }
.ag-grid { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ag-ccard { min-width: 0; border: 1px solid #fecdd3; border-left: 4px solid #be123c; border-radius: var(--radius-sm); background: #fff8f7; padding: 12px; }
.ag-ctitle { margin: 0; font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--brand-950); }
.ag-lab, .ag-nl { display: block; margin: 10px 0 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; }
.ag-gap { margin-top: 10px; }
.ag-dots { margin: 2px 0 0; padding: 0; list-style: none; } .ag-dots li { position: relative; padding: 2px 0 2px 14px; line-height: 1.45; }
.ag-dots li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: #d4a72c; }
.ag-dots li.crit { color: #9f1239; font-weight: 600; } .ag-dots li.crit::before { background: #be123c; }
.ag-due { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-950); }
.ag-due.none { padding: 5px 10px; border: 1px solid #fcd34d; border-radius: 8px; background: #fffbeb; color: #92400e; font-weight: 700; }
.ag-due svg, .ag-risk svg { width: 14px; height: 14px; flex: none; }
.ag-risk { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 3px 8px; border: 1px solid #fecdd3; border-radius: 8px; background: #fff1f2; color: #9f1239; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ag-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: #be123c; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.ag-do { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ag-board { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfaf6; box-shadow: var(--shadow); overflow: hidden; }
.ag-board-head { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ag-table { table-layout: fixed; border-collapse: collapse; }
.ag-table thead th { background: var(--brand-950); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; padding: 10px 12px; border-right: 1px solid rgba(255,255,255,.15); }
.ag-table thead th:nth-child(1) { width: 18%; } .ag-table thead th:nth-child(2) { width: 15%; } .ag-table thead th:nth-child(3) { width: 33%; } .ag-table thead th:nth-child(4) { width: 13%; }
.ag-table tbody th, .ag-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; text-align: left; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink-2); background: var(--card); }
.ag-table tr.alt > * { background: #fbfaf6; } .ag-table tr.crit > th { box-shadow: inset 3px 0 0 #be123c; } .ag-table tbody th b { color: var(--ink); }
.ag-table .ag-nl { display: none; } .ag-table tr:hover td { background: inherit; }
.ag-todos { margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfaf6; }
.ag-todo { padding: 12px; } .ag-todo h3 { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid #d4a72c; font-size: 15px; color: var(--p-fg, var(--brand-950)); }
@media (max-width: 900px) {
  .ag-table, .ag-table thead, .ag-table tbody, .ag-table tr, .ag-table th, .ag-table td { display: block; }
  .ag-table thead { position: absolute; left: -9999px; top: -9999px; }
  .ag-table tbody { display: grid; gap: 12px; padding: 12px; }
  .ag-table tr { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
  .ag-table tbody th, .ag-table td { border-right: 0; padding: 10px 14px; } .ag-table td:last-child { border-bottom: 0; }
  .ag-table td::before { display: none; } .ag-table .ag-nl { display: block; margin-top: 0; color: var(--brand-950); }
  .ag-table tr.crit { border-left: 4px solid #be123c; } .ag-table tr.crit > th { box-shadow: none; }
  .ag-band h2 { font-size: 18px; }
}
/* Passkeys (Face ID / fingerprint sign-in). Buttons start hidden; static/passkeys.js reveals them where WebAuthn works. */
[data-passkey] [hidden] { display: none !important; }
.passkey-login .or { display: flex; align-items: center; gap: 10px; color: var(--muted, #5b6b7a); font-size: 13px; margin: 14px 0 6px; }
.passkey-login .or::before, .passkey-login .or::after { content: ""; flex: 1; border-top: 1px solid #d8e0e8; }
.passkey-login .btn-secondary.wide, .passkey-card .btn-secondary.wide { width: 100%; justify-content: center; margin-top: 6px; }
.passkey-card { max-width: 560px; }
.passkey-points { padding-left: 18px; line-height: 1.5; }
.passkey-table { width: 100%; table-layout: fixed; } .passkey-table td, .passkey-table th { overflow-wrap: anywhere; word-break: break-word; }
/* Agenda on phones: compact tiles, two across (owner, deadline and a short status line show without a tap); a tapped tile opens full width. Wider screens keep cards and the table. */
.ag-tiles, .ag-phone { display: none; }
@media (max-width: 699px) {
  .ag-wide { display: none !important; } .ag-phone { display: block; }
  .ag-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .ag-board .ag-tiles { margin: 0; padding: 8px; }
  .ag-crit, .ag-todos { padding: 12px 10px; } .ag-board-head { padding: 10px 12px; }
  .ag-tile { min-width: 0; border: 1px solid var(--line); border-top: 3px solid #d4a72c; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); }
  .ag-tile.crit { border-top-color: #be123c; background: linear-gradient(180deg, #fff1f2, var(--card) 40px); }
  .ag-ptile { border-top-color: var(--p-edge, #d4a72c); background: linear-gradient(180deg, var(--p-bg, var(--card)), var(--card) 40px); }
  .ag-tile > summary { display: flex; flex-direction: column; align-items: stretch; gap: 3px; height: 100%; min-height: 96px; padding: 9px 10px 10px; list-style: none; cursor: pointer; }
  .ag-tile > summary::-webkit-details-marker { display: none; } .ag-tile > summary::marker { content: ''; }
  .ag-t-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13.5px; line-height: 1.3; color: var(--brand-950); overflow-wrap: anywhere; }
  .ag-t-status { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
  .ag-tile[open] .ag-t-status { display: none; }
  .ag-ptile .ag-t-title { color: var(--p-fg, var(--brand-950)); }
  .ag-t-meta { font-size: 11.5px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; } .ag-t-title + .ag-t-meta, .ag-t-status + .ag-t-meta { margin-top: auto; }
  .ag-t-meta.warn { color: #92400e; font-weight: 700; } .ag-t-meta.crit { color: #be123c; font-weight: 700; }
  .ag-tile .ag-tag { align-self: flex-start; margin: 2px 0 0; font-size: 9px; padding: 1px 5px; }
  .ag-tile[open] { grid-column: 1 / -1; } .ag-tile[open] > summary { min-height: 44px; height: auto; border-bottom: 1px solid var(--line); }
  .ag-tile[open] .ag-t-title { -webkit-line-clamp: unset; font-size: 14px; }
  .ag-t-body { padding: 4px 12px 12px; font-size: 14px; overflow-wrap: anywhere; } .ag-t-body .ag-lab:first-child { margin-top: 6px; }
}
@media (max-width: 699px) and (prefers-color-scheme: dark) { .ag-tile.crit { background: linear-gradient(180deg, #3a1219, var(--card) 40px); } }
/* Profile menu (2026-10-28): the top-bar avatar opens name, Face ID / fingerprint, Sign out, Sign out on every phone. */
.pmenu { position: relative; }
.pmenu > summary { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; cursor: pointer; list-style: none; }
.pmenu > summary::-webkit-details-marker { display: none; } .pmenu > summary::marker { content: ''; }
.pmenu > summary:focus-visible .avatar, .pmenu[open] > summary .avatar { box-shadow: 0 0 0 3px var(--brand-100), 0 0 0 5px var(--brand-700); }
.pmenu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 250px; max-width: calc(100vw - 24px); display: grid; gap: 2px; padding: 8px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,33,43,.18); }
.pmenu-who { margin: 0 0 4px; padding: 6px 10px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; overflow-wrap: anywhere; } .pmenu-who span { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.pmenu-panel a, .pmenu-panel button.link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; justify-content: flex-start; }
.pmenu-panel a:hover, .pmenu-panel button.link:hover { background: var(--bg); } .pmenu-panel form { margin: 0; }
.drawer form.end-shift:first-child { margin: 0 0 6px; padding: 2px 2px 10px; border-top: 0; border-bottom: 1px solid var(--line-2); }
