/* Bench — people directory for Marlow Goods.
   HR desk: navy rail, warm paper canvas, a people table and a profile sheet.
   Familjen Grotesk runs the tool; Source Serif 4 names the people. */

:root {
  --brand: #1b2c4a;
  --brand-accent: #c46b4a;
  --brand-ink: #121c30;
  --navy: var(--brand);
  --navy-ink: var(--brand-ink);
  --ink: #16213a;
  --ink-2: #3a4760;
  --muted: #5d6b82;
  --faint: #8e9ab0;
  --canvas: #f3f0ea;
  --card: #ffffff;
  --line: #e2ddd4;
  --line-2: #cfc8bd;
  --hover: #faf7f2;
  --clay: #c46b4a;
  --clay-ink: #6e321c;
  --clay-soft: #f8e6de;
  --good-bg: #dff0e4;
  --good: #185c37;
  --bad-bg: #f6dcd7;
  --bad: #7d2a21;
  --wait-bg: #fbe9d2;
  --wait: #7a4a0c;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, serif;
  --sans: "Familjen Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(18, 28, 48, 0.06);
  --shadow-lg: 0 1px 2px rgba(18, 28, 48, 0.06), 0 16px 40px rgba(18, 28, 48, 0.12);
  --rail: 232px;
  --col: min(40rem, calc(100% - 2rem));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
::selection { background: var(--navy); color: #fff; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
svg { display: block; }
:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.mast :focus-visible { outline-color: #fff; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-120%);
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  border-radius: 0 0 8px 8px;
  z-index: 50;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { transform: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  width: min(28rem, calc(100% - 2rem));
  background: var(--navy);
  color: #fff;
  border-left: 4px solid var(--brand-accent);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(18, 28, 48, 0.3);
}
.toast--err { background: var(--card); color: var(--clay-ink); border: 1px solid var(--line); border-left: 4px solid var(--clay); }

/* ───────────── Brand lockup ───────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand [data-brand="logo"] { display: inline-flex; flex: none; line-height: 0; }
.brand-mark, [data-brand="logo"] svg { width: 1.6rem; height: 1.6rem; color: var(--brand-accent); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-word { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-co { font-family: var(--serif); font-weight: 600; font-size: 0.82rem; color: #c6cfdd; }

/* ───────────── Sidebar rail ───────────── */
.mast {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 12px 14px;
  background: var(--navy);
  color: #eef1f6;
}
.mast .brand { padding: 0 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-kicker {
  margin: 8px 6px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9ab8;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d4dbe8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.3;
}
.nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(196, 107, 74, 0.32); color: #fff; font-weight: 600; }
.nav-ico { width: 16px; height: 16px; flex: none; color: #e0a288; }
.nav a[aria-current="page"] .nav-ico { color: #ffd3c3; }
.nav-count {
  margin-left: auto;
  background: var(--brand-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  min-width: 1.35rem;
  text-align: center;
  padding: 0 7px;
  border-radius: 99px;
  line-height: 1.5;
}
.who {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.who:empty { display: none; }
.who-card { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-width: 0; }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.who-name { font-weight: 600; font-size: 0.9rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-sub { font-size: 0.78rem; color: #a9b5ca; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-out {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.88rem;
}
.btn-out:hover { background: rgba(255, 255, 255, 0.08); }

/* Avatars */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
  color: #fff;
  background: var(--navy);
}
.avatar.tone-1 { background: #1b2c4a; }
.avatar.tone-2 { background: #c46b4a; }
.avatar.tone-3 { background: #2f6b5a; }
.avatar.tone-4 { background: #6a4c93; }
.avatar.tone-5 { background: #a0522d; }
.avatar.tone-6 { background: #3b6ea5; }
.avatar--sm { width: 22px; height: 22px; font-size: 0.58rem; }
.avatar--who { width: 32px; height: 32px; font-size: 0.74rem; }
.avatar--xl { width: 56px; height: 56px; font-size: 1.15rem; border-radius: 14px; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.person--sm { gap: 7px; }
.person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.person-name { font-weight: 600; color: var(--ink); }
.person-sub { font-size: 0.8rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person--link:hover .person-name { text-decoration: underline; text-underline-offset: 3px; }
.you-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--clay-soft);
  color: var(--clay-ink);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: middle;
}
.dim { color: var(--faint); }
.dot { color: var(--faint); margin: 0 6px; }

/* ───────────── Canvas ───────────── */
main { flex: 1; min-width: 0; margin-left: var(--rail); }
.workspace { padding: 22px 28px 60px; }
.workspace .col { width: 100%; max-width: 1280px; margin: 0 auto; }
.foot { margin-left: var(--rail); padding: 0 28px 24px; color: var(--muted); font-size: 0.86rem; }
.foot .col { width: 100%; max-width: 1280px; margin: 0 auto; }
.foot-dim { margin-top: 4px; }
body:has(#nav:not([hidden])) .foot > .col > p:first-child { display: none; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
h1 { font-family: var(--sans); font-weight: 700; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.page-sub { margin-top: 2px; color: var(--muted); font-size: 0.92rem; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.head { margin-bottom: 14px; }
.head .lede { color: var(--clay-ink); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.head p:not(.lede) { margin-top: 4px; color: var(--muted); max-width: 64ch; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: var(--card); color: var(--navy); border-color: var(--line-2); box-shadow: var(--shadow); }
.btn-ghost:hover { background: var(--hover); }
.btn-wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.linklike {
  border: 0;
  background: none;
  padding: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Fields */
.field { margin-bottom: 12px; }
.field label, .search-label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.field input, .field textarea, .field select, .search-input {
  width: 100%;
  border: 1px solid var(--line-2);
  background: var(--card);
  padding: 8px 10px;
  border-radius: 8px;
  min-height: 38px;
  color: var(--ink);
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .search-input:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 0; border-color: var(--brand-accent); }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.field-hint { color: var(--muted); font-size: 0.84rem; margin-top: 4px; }
.form-err {
  background: var(--bad-bg);
  color: var(--bad);
  padding: 8px 10px;
  border-radius: 8px;
  margin: 0 0 10px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Pills */
.team {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: #ece8e0;
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.status {
  display: inline-block;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 2px 9px;
  border-radius: 99px;
  line-height: 1.5;
  white-space: nowrap;
}
.status--active { background: var(--good-bg); color: var(--good); }
.status--off { background: #ece8e0; color: var(--muted); }
.status--pending { background: var(--wait-bg); color: var(--wait); }
.status--approved { background: var(--good-bg); color: var(--good); }
.status--denied { background: var(--bad-bg); color: var(--bad); }
.status--active::before, .status--pending::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: 1px;
}

/* ───────────── Toolbar ───────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.search { position: relative; width: min(100%, 340px); margin: 0; }
.search-ico { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .search-input { padding-left: 32px; min-height: 36px; font-size: 0.9rem; }
.search .search-input::placeholder { color: var(--faint); }
.search .form-err { margin: 8px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
  min-height: 32px;
  padding: 2px 10px 2px 11px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.86rem;
  box-shadow: var(--shadow);
}
.chip:hover { border-color: var(--navy); color: var(--ink); }
.chip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-n { font-size: 0.72rem; font-weight: 700; color: var(--muted); background: #ece8e0; padding: 0 6px; border-radius: 99px; line-height: 1.5; }
.chip.is-on .chip-n { background: rgba(255, 255, 255, 0.18); color: #fff; }
.results-count { margin-left: auto; color: var(--muted); font-size: 0.86rem; font-weight: 500; }

/* ───────────── Tables ───────────── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  background: #faf8f4;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 0.92rem;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.row { cursor: pointer; }
.table tbody tr.row:hover td { background: var(--hover); }
.table tbody tr.row.is-open td { background: #f6efe6; }
.table tbody tr.row.is-open td:first-child { box-shadow: inset 3px 0 0 var(--brand-accent); }
.people .person { gap: 10px; }
.col-since { color: var(--muted); white-space: nowrap; }

/* ───────────── Blocks, panels, empty ───────────── */
.panel, .block, .empty, .loading {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
}
.panel h2, .block h2 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.block h2 .request-total, .count { font-size: 0.78rem; font-weight: 700; color: var(--muted); background: #ece8e0; padding: 0 7px; border-radius: 99px; line-height: 1.5; vertical-align: middle; margin-left: 4px; }
.empty h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.empty p { color: var(--muted); margin-bottom: 12px; }
.empty h1 { font-size: 1.15rem; margin-bottom: 4px; }
.loading { color: var(--muted); }
.desk {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* Requests */
.request-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.request-filters button { min-height: 32px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--card); color: var(--ink-2); padding: 2px 11px; font-size: 0.86rem; font-weight: 600; }
.request-filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.requests { display: grid; gap: 10px; }
.request {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.requests--compact .request { padding: 10px 12px; }
.request--yours { border-left: 3px solid var(--brand-accent); }
.request-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; align-items: center; }
.request-name { font-weight: 600; text-decoration: none; }
.request-name .avatar { width: 26px; height: 26px; font-size: 0.62rem; }
.request-when { margin-top: 8px; font-weight: 600; }
.request-duration { color: var(--muted); font-size: 0.84rem; margin-top: 1px; }
.request-reason { margin-top: 6px; color: var(--ink-2); }
.request-note { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
.decide { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Org chart */
.org { margin: 0; padding: 0; }
.org ul { margin: 6px 0 6px 18px; padding: 0 0 0 16px; border-left: 2px solid var(--line-2); }
.org-person {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 34rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.org-person:hover { border-color: var(--line-2); background: var(--hover); }
.org-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.org-name { font-weight: 600; }
.org-role { color: var(--muted); font-size: 0.84rem; }
.org-n { margin-left: auto; color: var(--faint); font-size: 0.78rem; white-space: nowrap; }
.block--org { background: transparent; border: 0; box-shadow: none; padding: 0; }

/* ───────────── Profile sheet ───────────── */
.sheet-scrim {
  position: fixed;
  inset: 0;
  left: var(--rail);
  background: rgba(18, 28, 48, 0.28);
  z-index: 20;
}
.sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100%);
  z-index: 21;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
body.has-sheet { overflow: hidden; }
.sheet-head { position: relative; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); background: #faf8f4; }
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
  border-radius: 8px;
}
.sheet-close svg { width: 14px; height: 14px; }
.sheet-close:hover { background: var(--hover); color: var(--ink); }
.sheet-back { display: inline-block; font-size: 0.82rem; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 12px; }
.sheet-back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sheet-back::before { content: "← "; }
.sheet-id { display: flex; gap: 14px; align-items: center; }
.sheet-id-text { min-width: 0; }
.sheet-title { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; }
.sheet-role { color: var(--ink-2); font-weight: 500; margin-top: 2px; }
.sheet-meta { display: flex; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 0.86rem; margin-top: 6px; }
.sheet-actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet-body { padding: 6px 22px 28px; }
.sheet-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sheet-section:last-child { border-bottom: 0; }
.sheet-section h2 { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.summary { font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; color: var(--ink-2); }
.facts { display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; align-items: center; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.report-list { display: grid; gap: 8px; }
.report-list .person:hover .person-name { text-decoration: underline; text-underline-offset: 3px; }

/* Company setup */
.setup-panel { margin-top: 16px; }
.setup-panel h2 { margin-bottom: 10px; }
.setup-roster { margin-top: 6px; }
.setup-roster li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setup-roster li:last-child { border-bottom: 0; }
.setup-roster li div { min-width: 0; overflow-wrap: anywhere; }
.setup-roster li span { display: block; color: var(--muted); font-size: 0.86rem; }
.setup-roster button { flex: none; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-status input { width: auto; min-height: auto; accent-color: var(--brand); }
.setup-status label { display: flex; align-items: center; gap: 8px; }

/* ───────────── Sign-in gate ───────────── */
body:has(#gate:not([hidden])) .mast,
body:has(#gate:not([hidden])) .foot { display: none; }
body:has(#gate:not([hidden])) main { margin-left: 0; }
#gate.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px 44px;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(196, 107, 74, 0.35), transparent 55%),
    #1b2c4a;
}
#gate .col { width: min(520px, 100%); background: #f7f3ee; padding: 26px 24px 22px; border-radius: 16px; box-shadow: var(--shadow-lg); }
#gate .lede { color: var(--clay-ink); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px; }
#gate h1 { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.15; }
#gate .intro { margin-top: 8px; color: var(--muted); }
.roster--sample { display: grid; gap: 8px; margin: 14px 0 16px; }
.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.mono { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: 0.76rem; border-radius: 50%; }
.card-body { min-width: 0; display: flex; flex-direction: column; }
.card-name { font-weight: 600; }
.card-role { color: var(--ink-2); font-size: 0.9rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0 10px; color: var(--muted); font-size: 0.82rem; }
#gate .panel { margin-top: 0; padding: 16px 18px 18px; }
#gate .panel h2 { font-size: 1.1rem; }
.setup-entry { margin-top: 12px; }
.setup-register { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.setup-register .btn { margin-top: 6px; }
.demo { margin-top: 14px; background: #efe9e0; padding: 12px 14px; border-radius: 10px; }
.demo-title { font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.demo-rows { display: grid; gap: 2px; margin-bottom: 10px; font-size: 0.9rem; }
.demo-rows div { display: flex; justify-content: space-between; gap: 1rem; }
.demo-rows dt { color: var(--muted); }
.demo-rows dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ───────────── Responsive ───────────── */
@media (max-width: 960px) {
  .desk { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .mast {
    position: sticky;
    width: auto;
    bottom: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 14px;
  }
  .mast .brand { flex: 1 1 auto; }
  .nav { order: 3; flex: 1 0 100%; flex-direction: row; flex-wrap: wrap; overflow-x: visible; gap: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-kicker { display: none; }
  .nav a { flex: 1 1 calc(50% - 4px); padding: 6px 10px; font-size: 0.88rem; }
  .nav-count { margin-left: 0; }
  .who { margin: 0; padding: 0; border: 0; flex-direction: row; align-items: center; gap: 8px; }
  .who-text { display: none; }
  .avatar--who { width: 28px; height: 28px; font-size: 0.68rem; }
  main, .foot { margin-left: 0; }
  .workspace { padding: 16px 14px 48px; }
  .foot { padding: 0 14px 20px; }
  .search { width: 100%; }
  .results-count { margin-left: 0; }
  .sheet-scrim { left: 0; }
  .sheet { width: 100%; border-left: 0; }

  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 3px 0; border: 0; }
  .table td::before { content: attr(data-label); display: block; color: var(--faint); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
  .table td[data-label="Person"]::before { display: none; }
  .table td[data-label="Person"] { padding-bottom: 8px; }
  .table tbody tr.row.is-open td { box-shadow: none; }
  .facts div { grid-template-columns: 1fr; gap: 1px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
  .org-person { max-width: none; }
  .org ul { margin-left: 10px; padding-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ───────────── Motion ─────────────
   Pages ease in when they change. The profile sheet slides in from the right
   over a scrim that fades; closing runs the same path back. A page that is
   waiting on the network stays put, dimmed. Reduced motion drops it all. */
:root { --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); --dur: 180ms; }
html { scrollbar-gutter: stable; }
@keyframes view-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.view-enter { animation: view-enter var(--dur) var(--ease-out) both; }
#view { transition: opacity 160ms var(--ease-out) 120ms; }
#view.is-stale { opacity: 0.55; pointer-events: none; }
.nav a, .btn, .btn-out, .chip, .request-filters button, .table tbody tr.row td, .org-person, .person-name, .linklike, .sheet-close, .sheet-back {
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

@keyframes sheet-in {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes sheet-out {
  from { transform: none; opacity: 1; }
  to { transform: translateX(28px); opacity: 0; }
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrim-out { from { opacity: 1; } to { opacity: 0; } }
.sheet { animation: sheet-in 220ms var(--ease-out) both; will-change: transform, opacity; }
.sheet-scrim { animation: scrim-in 180ms var(--ease-out) both; }
.sheet.is-closing { animation: sheet-out 180ms cubic-bezier(0.4, 0, 1, 1) both; pointer-events: none; }
.sheet-scrim.is-closing { animation: scrim-out 180ms cubic-bezier(0.4, 0, 1, 1) both; pointer-events: none; }
.sheet[aria-busy="true"] .sheet-body { opacity: 0.85; }
.sheet .sheet-body { transition: opacity 160ms var(--ease-out); }

@media (max-width: 760px) {
  @keyframes sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
  @keyframes sheet-out {
    from { transform: none; opacity: 1; }
    to { transform: translateY(24px); opacity: 0; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .view-enter, .sheet, .sheet-scrim { opacity: 1; transform: none; }
  .sheet.is-closing, .sheet-scrim.is-closing { display: none; }
}
