/* BESTrack — Patient Band world */
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* BES brand */
  --navy: #02295D;
  --navy-hi: #0B3A78;
  --blue: #336792;
  --brand-red: #B32727;
  /* ground + ink */
  --ground: #EEF2F8;
  --surface: #FFFFFF;
  --surface-2: #F6F8FC;
  --line: #D5DDE8;
  --line-strong: #B4C1D3;
  --ink: #0B1F3F;
  --mute: #51647F;
  --on-navy: #FFFFFF;
  --on-navy-mute: #B9C8DF;
  /* status (never brand red) */
  --done: #02295D;
  --ok: #1A7350;
  --soon: #E8A317;
  --on-soon: #2A1D00;
  --late: #141B2B;
  --late-hatch: rgba(255, 255, 255, 0.14);
  --vetoed: #8593A8;
  --danger: #9E1F1F;
  --danger-tint: #FBEDED;
  --focus: #336792;
  /* org-chart branch identity (not status) */
  --br-exec: #02295D;
  --br-ext: #B32727;
  --br-od: #336792;
  --br-ops: #7A1F2B;
  --br-fin: #1F4A7A;
  --selection: #C9DAF0;
  --shadow: 0 1px 2px rgba(2, 41, 93, 0.06), 0 6px 16px rgba(2, 41, 93, 0.06);

  --font: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  /* type scale ~1.2 */
  --t-xs: 0.75rem; --t-sm: 0.875rem; --t-md: 1rem; --t-lg: 1.125rem; --t-xl: 1.375rem; --t-2xl: 1.75rem; --t-num: 2.25rem;
  /* spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 8px; --r-md: 12px; --r-band: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--t-md); line-height: 1.45; color: var(--ink); background: var(--ground); font-variant-numeric: tabular-nums; }
::selection { background: var(--selection); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
* { scrollbar-color: var(--line-strong) transparent; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--navy) 232px, transparent 232px); }
#view:focus { outline: none; }
.rail { background: var(--navy); color: var(--on-navy); padding: var(--s5) var(--s4); display: flex; flex-direction: column; gap: var(--s1); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: var(--s3); font-weight: 700; font-size: var(--t-xl); padding: 0 var(--s2); margin-bottom: var(--s6); color: inherit; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); padding: 3px; }
.rail nav { display: flex; flex-direction: column; gap: var(--s1); }
.rail a.nav { white-space: nowrap; display: flex; align-items: center; gap: var(--s3); color: var(--on-navy-mute); text-decoration: none; padding: 10px var(--s3); border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 500; transition: background 150ms var(--ease), color 150ms var(--ease); }
.rail a.nav:hover { background: rgba(255, 255, 255, 0.08); color: var(--on-navy); }
.rail a.nav[aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: var(--on-navy); font-weight: 700; }
.rail a.nav[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }
.rail .soon { margin-left: auto; font-size: 0.6875rem; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--r-band); padding: 0 var(--s2); }
.rail-foot { margin-top: auto; font-size: var(--t-xs); color: var(--on-navy-mute); display: grid; gap: var(--s2); padding: 0 var(--s2); }
.rail-foot .who { color: var(--on-navy); font-weight: 700; font-size: var(--t-sm); }
.rail-foot button { justify-self: start; background: none; border: 1px solid rgba(255, 255, 255, 0.3); color: var(--on-navy); border-radius: var(--r-sm); padding: 6px var(--s3); font: inherit; cursor: pointer; }
.rail-foot button:hover { background: rgba(255, 255, 255, 0.1); }

.page { padding: var(--s6); min-width: 0; }
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); align-items: start; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.head h1 { font-size: var(--t-2xl); }
.sub { color: var(--mute); font-size: var(--t-sm); margin-top: var(--s1); }
.notice { display: flex; gap: var(--s3); align-items: center; background: var(--surface); border: 1px solid var(--soon); border-radius: var(--r-md); padding: var(--s3) var(--s4); font-size: var(--t-sm); margin-bottom: var(--s4); }
.notice .icon { color: #9A6500; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--s2); font: inherit; font-size: var(--t-sm); font-weight: 700; padding: 10px var(--s4); border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; transition: background 150ms var(--ease), border-color 150ms var(--ease); }
.btn:hover { background: var(--surface-2); border-color: var(--mute); }
.btn.primary { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-hi); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-tint); }
.btn.danger.solid { background: var(--danger); color: var(--on-navy); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }

.chips { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.chip { font: inherit; font-size: var(--t-sm); padding: 6px 14px; border-radius: var(--r-band); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--mute); }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.chip .n { color: inherit; opacity: 0.7; margin-left: var(--s1); }

/* ---------- the band ---------- */
.bands { display: grid; gap: var(--s3); }
.band { display: grid; grid-template-columns: 104px minmax(0, 1fr) repeat(4, 96px); align-items: center; min-height: 80px; padding: 0 var(--s3) 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-band); color: inherit; text-decoration: none; position: relative; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.band::before { content: ""; position: absolute; left: 22px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--ground); box-shadow: inset 0 1px 2px rgba(2, 41, 93, 0.35); }
a.band:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.band.is-late { border-color: var(--late); box-shadow: 0 0 0 3px rgba(20, 27, 43, 0.08); }
.band.is-vetoed { opacity: 0.6; border-style: dashed; }
.band.is-clear .days { color: var(--done); }
.days { text-align: right; padding-right: var(--s4); font-size: var(--t-num); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.days small { display: block; font-size: 0.625rem; font-weight: 500; color: var(--mute); letter-spacing: 0.08em; text-transform: uppercase; margin-top: var(--s1); }
.days .check { width: 30px; height: 30px; stroke-width: 2.5; }
.band-id { font-family: var(--mono); font-size: var(--t-xs); color: var(--mute); letter-spacing: 0.04em; }
.band-title { font-weight: 700; font-size: var(--t-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-next { font-size: var(--t-xs); color: var(--mute); }
.band-main { min-width: 0; padding-right: var(--s3); }

.clip { height: 50px; margin: 0 var(--s1); border-radius: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; border: 2px solid transparent; line-height: 1.2; animation: snap 220ms var(--ease) both; }
.clip span { font-size: 0.6875rem; font-weight: 400; letter-spacing: 0; }
.clip.done { background: var(--done); color: var(--on-navy); }
.clip.ok { background: var(--ok); color: var(--on-navy); }
.clip.soon { background: var(--soon); color: var(--on-soon); }
.clip.late { background: var(--late) repeating-linear-gradient(135deg, transparent 0 6px, var(--late-hatch) 6px 12px); color: var(--on-navy); }
.clip.none { border-color: var(--line-strong); color: var(--mute); background: var(--surface); }
.clip.idle { border-color: var(--line); color: var(--mute); background: var(--surface-2); border-style: dashed; }
@keyframes snap { from { transform: scale(0.92); } to { transform: none; } }

.mini-clips { display: grid; grid-template-columns: repeat(4, 96px); gap: var(--s1); }
.clip.mini { height: 40px; margin: 0; border-radius: 8px; font-size: 0.6875rem; animation: none; }
.clip.mini span { font-size: 0.6875rem; white-space: nowrap; }
.band-open { display: none; }
.preview-mark { background: var(--blue); color: var(--on-navy); text-align: center; padding: 4px var(--s4); font-size: var(--t-xs); font-weight: 700; }
.logout-m { display: none; }
.term-m { display: none; }
.nb { white-space: nowrap; }
/* ---------- directory ---------- */
.search { margin-bottom: var(--s5); max-width: 560px; }
input[type="search"], input[type="email"], input[type="tel"] { font: inherit; font-size: var(--t-md); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 var(--s3); width: 100%; height: 46px; caret-color: var(--navy); }
input[readonly] { background: var(--surface-2); color: var(--mute); }
.branch { margin-bottom: var(--s6); }
.branch h2 { font-size: var(--t-lg); display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.br-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: var(--s1); vertical-align: -1px; }
.br-exec { background: var(--br-exec); } .br-ext { background: var(--br-ext); } .br-od { background: var(--br-od); } .br-ops { background: var(--br-ops); } .br-fin { background: var(--br-fin); }
.cbands { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.band.cband { grid-template-columns: 104px minmax(0, 1fr) 56px; }
.label-m { display: none; }
.cband-go { color: var(--mute); display: grid; place-items: center; }
.band.person { grid-template-columns: 104px minmax(0, 1fr) auto; padding-right: var(--s4); }
.band.person::before { display: none; }
.disc { width: 52px; height: 52px; border-radius: 50%; color: var(--on-navy); display: grid; place-items: center; font-weight: 700; font-size: var(--t-lg); justify-self: end; margin-right: var(--s5); letter-spacing: 0.02em; }
.contact { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.contact .btn { padding: 8px var(--s3); font-weight: 500; }
.btn.icon-only { padding: 8px 10px; }
.no-mobile { font-size: var(--t-xs); color: var(--mute); }
.radio-row.stack { flex-direction: column; align-items: stretch; }
.radio-row.stack label { height: auto; padding: var(--s3); align-items: flex-start; }
.radio-row.stack label span { display: grid; gap: 2px; }
.radio-row.stack small { color: var(--mute); font-weight: 400; }
.radio-row.stack input { margin-top: 3px; }
.legend { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--t-xs); color: var(--mute); margin-top: var(--s4); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: var(--s1); vertical-align: -1px; }

/* ---------- empty + skeleton ---------- */
.empty { border: 2px dashed var(--line-strong); border-radius: 40px; padding: var(--s6); display: grid; gap: var(--s3); justify-items: start; background: var(--surface-2); }
.empty h2 { font-size: var(--t-xl); }
.empty p { color: var(--mute); max-width: 60ch; }
.skel { height: 80px; border-radius: var(--r-band); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%; border: 1px solid var(--line); animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- side panel ---------- */
.side { display: grid; gap: var(--s4); position: sticky; top: var(--s6); }
.panel.compact { padding: var(--s4) var(--s5); }
.panel.compact .sub { margin-bottom: var(--s3); }
.week { list-style: none; margin: 0; padding: 0; display: grid; }
.week li + li { border-top: 1px solid var(--line); }
.week a { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s3) 0; color: inherit; text-decoration: none; }
.week a:hover b { text-decoration: underline; }
.week b { display: block; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week small { color: var(--mute); font-size: var(--t-xs); }
.wk-day { font-size: var(--t-xs); font-weight: 700; text-align: center; padding: 6px 4px; border-radius: 8px; border: 2px solid transparent; }
.wk-day.late { background: var(--late) repeating-linear-gradient(135deg, transparent 0 6px, var(--late-hatch) 6px 12px); color: var(--on-navy); }
.wk-day.soon { background: var(--soon); color: var(--on-soon); }
.wk-day.ok { background: var(--ok); color: var(--on-navy); }
.wk-day.none { border-color: var(--line-strong); color: var(--mute); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); }
.panel h2 { font-size: var(--t-lg); }
.panel .sub { margin-bottom: var(--s4); }
.seal { display: inline-flex; align-items: center; gap: var(--s2); color: var(--navy); font-weight: 700; font-size: var(--t-sm); }
.seal .icon { width: 22px; height: 22px; }

/* ---------- manage: table ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th { text-align: left; font-size: var(--t-xs); font-weight: 700; color: var(--mute); letter-spacing: 0.06em; text-transform: uppercase; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td a.row-link { font-weight: 700; color: var(--ink); text-decoration: none; }
td a.row-link:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: var(--t-xs); font-weight: 700; padding: 2px var(--s2); border-radius: var(--r-band); border: 1px solid var(--line-strong); color: var(--mute); white-space: nowrap; }
.tag.warn { border-color: var(--soon); color: #7A5000; background: #FDF4E1; }
.tag.st-done { background: var(--done); border-color: var(--done); color: var(--on-navy); }
.tag.st-ok { background: var(--ok); border-color: var(--ok); color: var(--on-navy); }
.tag.st-soon { background: var(--soon); border-color: var(--soon); color: var(--on-soon); }
.tag.st-late { background: var(--late); border-color: var(--late); color: var(--on-navy); }
.tag.st-idle { border-style: dashed; }
.tag.vetoed { border-color: var(--vetoed); color: var(--mute); border-style: dashed; }

/* ---------- forms ---------- */
.form { display: grid; gap: var(--s5); max-width: 880px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); display: grid; gap: var(--s4); }
.section h2 { font-size: var(--t-lg); }
.section > p { color: var(--mute); font-size: var(--t-sm); margin-top: calc(-1 * var(--s3)); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-size: var(--t-sm); font-weight: 700; }
.field .hint { font-size: var(--t-xs); color: var(--mute); }
input[type="text"], input[type="date"], select, textarea { font: inherit; font-size: var(--t-md); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px var(--s3); width: 100%; caret-color: var(--navy); }
input:hover, select:hover, textarea:hover { border-color: var(--mute); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--selection); border-color: var(--blue); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="text"], input[type="date"], select { height: 46px; padding-block: 0; }
textarea { min-height: 88px; resize: vertical; }
.check-row { display: flex; gap: var(--s2); align-items: center; font-size: var(--t-sm); }
.check-row input { width: 18px; height: 18px; accent-color: var(--navy); }
.radio-row { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.radio-row label { height: 46px; }
.radio-row label { display: flex; align-items: center; gap: var(--s2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px var(--s3); font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.radio-row input { accent-color: var(--navy); margin: 0; }
.radio-row label:has(input:checked) { border-color: var(--navy); background: var(--surface-2); font-weight: 700; }
.computed { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.computed div { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: var(--s3); font-size: var(--t-sm); }
.computed b { display: block; font-size: var(--t-xs); color: var(--mute); letter-spacing: 0.06em; text-transform: uppercase; }
.actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.error { color: var(--danger); font-size: var(--t-sm); font-weight: 700; }
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }
.toast { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-navy); padding: var(--s3) var(--s5); border-radius: var(--r-band); font-size: var(--t-sm); font-weight: 700; box-shadow: var(--shadow); animation: rise 220ms var(--ease) both; z-index: 10; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.back { display: inline-flex; gap: var(--s1); align-items: center; font-size: var(--t-sm); margin-bottom: var(--s3); }

/* ---------- detail ---------- */
.detail-band { margin-bottom: var(--s5); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.facts div b { display: block; font-size: var(--t-xs); color: var(--mute); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--s4); background: var(--navy); }
.login-card { background: var(--surface); border-radius: 28px; padding: var(--s7) var(--s6); max-width: 420px; width: 100%; display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.login-card img { width: 96px; }
.login-card h1 { font-size: var(--t-2xl); }
.login-card p { color: var(--mute); font-size: var(--t-sm); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .board-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .rail { position: sticky; height: auto; flex-direction: row; align-items: center; padding: var(--s2) var(--s4); gap: var(--s3); z-index: 5; }
  .brand { margin: 0; font-size: var(--t-lg); padding: 0; }
  .brand img { width: 28px; height: 28px; }
  .rail nav { flex-direction: row; overflow-x: auto; margin-left: auto; }
  .rail a.nav { padding: 8px 10px; white-space: nowrap; }
  .rail a.nav[aria-disabled="true"], .rail .soon { display: none; }
  .rail { flex-wrap: wrap; row-gap: var(--s1); }
  .rail nav { order: 3; width: 100%; margin: 0 calc(-1 * var(--s2)); }
  .rail a.nav { font-size: var(--t-xs); }
  .logout-m { display: inline-flex; align-items: center; gap: var(--s1); margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, 0.3); color: var(--on-navy); border-radius: var(--r-sm); padding: 6px var(--s2); font: inherit; font-size: var(--t-xs); cursor: pointer; }
  .logout-m .icon { width: 16px; height: 16px; }
  .rail-foot { display: none; }
  .side { position: static; }
  .term-m { display: block; }
  .band.person, .band.cband { grid-template-columns: 56px minmax(0, 1fr); border-radius: 28px; }
  .band.cband { grid-template-columns: 72px minmax(0, 1fr) 32px; }
  .disc { width: 44px; height: 44px; margin: 0; font-size: var(--t-md); justify-self: start; }
  .contact { grid-column: 1 / -1; justify-content: flex-start; }
  .band.person { position: relative; }
  .band.person .edit { position: absolute; top: var(--s3); right: var(--s3); }
  .band.person .band-main { padding-right: 48px; }
  .cbands { grid-template-columns: minmax(0, 1fr); }
  .rail a.nav .label-short { display: none; }
  .rail a.nav .label-m { display: inline; }
  .contact .contact-text { font-size: var(--t-sm); }
  .head .actions { flex-wrap: nowrap; }
  .page { padding: var(--s5) var(--s4); }
  .head { flex-wrap: nowrap; align-items: center; margin-bottom: var(--s4); }
  .head .btn { padding: 8px var(--s3); white-space: nowrap; flex: none; }
  .head h1 { font-size: var(--t-xl); }
  .band { grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto auto; border-radius: 28px; padding: var(--s3); row-gap: var(--s3); }
  .band::before { display: none; }
  .days { font-size: var(--t-2xl); padding-right: var(--s3); }
  .clips { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); }
  .clip { margin: 0 2px; }
  /* the single most at-risk band owns the first screen */
  .board-bands > .band:first-child:not(.is-clear) { min-height: 56vh; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--s5); padding: var(--s5); border-radius: 36px; }
  .board-bands > .band:first-child:not(.is-clear) .days { text-align: left; font-size: 5rem; padding: 0; }
  .board-bands > .band:first-child:not(.is-clear) .days small { font-size: var(--t-sm); margin-top: var(--s2); }
  .board-bands > .band:first-child:not(.is-clear) .band-title { white-space: normal; font-size: var(--t-2xl); }
  .board-bands > .band:first-child:not(.is-clear) .band-next { font-size: var(--t-md); color: var(--ink); margin-top: var(--s1); }
  .board-bands > .band:first-child:not(.is-clear) .clips { display: grid; gap: var(--s1); }
  .board-bands > .band:first-child:not(.is-clear) .clip { height: 68px; margin: 0; font-size: var(--t-xs); }
  .board-bands > .band:first-child:not(.is-clear) .band-open { display: flex; margin-top: auto; justify-content: center; font-weight: 700; font-size: var(--t-sm); color: var(--on-navy); background: var(--navy); border-radius: var(--r-band); padding: var(--s3); }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--s4)); padding: 2px var(--s4); scrollbar-width: none; }
  .chip { flex: none; }
  .grid-2, .grid-4, .computed, .facts { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 901px) { .clips { display: contents; } }
@media (max-width: 520px) {
  .grid-2, .facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
