:root {
  --navy: #1f4e78;
  --navy-900: #14324d;
  --navy-800: #1a4063;
  --gold: #c49a3b;
  --gold-100: #fbf6ea;
  --gold-200: #f0e2c0;
  --ink: #1b2836;
  --muted: #5e6e80;
  --line: #e3e8ee;
  --bg: #f3f5f8;
  --card: #ffffff;
  --red: #9c3b3b;
  --red-bg: #f8ecec;
  --green: #1f7a4d;
  --green-bg: #e7f5ee;
  --blue: #1f4e78;
  --blue-bg: #e7f0f8;
  --orange: #8a4b0f;
  --orange-bg: #fbf1e4;
  --grey: #5e6e80;
  --grey-bg: #eef1f4;
  --shadow: 0 1px 2px rgba(20, 40, 60, 0.05);
  --sidebar: 236px;
  --font: "Segoe UI", Aptos, "Liberation Sans", "Nimbus Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.shell { display: flex; min-height: 100vh; }
.sidebar-toggle {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: calc(var(--sidebar) - 48px);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.gold-bars { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.gold-bars span { display: block; height: 3px; border-radius: 2px; background: var(--gold); }
html.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  transform: translateX(-100%);
  overflow: hidden;
}
html.sidebar-collapsed .sidebar-toggle,
html:not(.sidebar-pinned) .sidebar-toggle {
  left: 12px;
}
@media (min-width: 821px) {
  html:not(.sidebar-collapsed) .sidebar-toggle { left: calc(var(--sidebar) - 48px); }
  html.sidebar-collapsed .topbar { padding-left: 56px; }
}

.sidebar {
  width: var(--sidebar);
  background: var(--navy-900);
  color: #e8eef4;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}
.brand { padding: 18px 52px 14px 16px; border-bottom: 3px solid var(--gold); }
.brand-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 650;
}
.brand-name { display: block; margin-top: 4px; font-size: 18px; font-weight: 650; color: white; }
.brand-sub { display: block; margin-top: 2px; color: #b7c9d8; font-size: 12px; }
.nav { padding: 8px 0 16px; overflow: auto; flex: 1; }
.nav-label {
  margin: 16px 16px 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8eabc4;
}
.nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1px 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #e7eef5;
  text-decoration: none;
}
.nav a:hover { background: rgba(255, 255, 255, 0.06); }
.nav a.active { background: rgba(255, 255, 255, 0.08); box-shadow: inset 3px 0 0 var(--gold); }
.nav-count {
  background: var(--gold);
  color: #1b2836;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
}
.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px 14px;
}
.who { display: block; color: white; font-weight: 650; }
.who-role { display: block; color: #b7c9d8; font-size: 12px; margin-bottom: 8px; }
.signout { margin: 0; }
.signout button {
  background: transparent;
  color: #d5e2ec;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.signout button:hover { border-color: var(--gold); color: white; }
.sidebar-backdrop { display: none; }
.more-label { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.burger {
  display: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.search { flex: 1; }
.search input {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 12px;
}
.search input:focus { background: white; border-color: var(--navy); outline: none; }
.content { padding: 22px 24px 56px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}
h1 { font-size: 26px; line-height: 1.2; margin: 0; color: var(--navy-900); font-weight: 650; }
h2 { font-size: 16px; margin: 0; }
.sub { margin: 4px 0 0; color: var(--muted); }
.page-actions, .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: white;
  text-decoration: none;
  border: 1px solid var(--navy);
  border-radius: 6px;
  padding: 7px 12px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: var(--navy-900); }
.btn.secondary, a.btn.secondary {
  background: white;
  color: var(--navy);
}
.btn.secondary:hover { background: var(--gold-100); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1b2836; }
.btn.gold:hover { filter: brightness(0.96); }
.btn.danger { background: white; color: var(--red); border-color: #e4c6c6; }
.btn.small { padding: 8px 12px; min-height: 44px; font-size: 15px; font-weight: 600; }
.btn:disabled, button.btn[disabled] {
  background: #d5dde6;
  color: #3d4d5c;
  border-color: #c5ced6;
  cursor: not-allowed;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 8px;
  padding: 12px 14px 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.stat:hover { border-color: #c9d4e0; }
.stat.warn { border-top-color: var(--gold); }
.stat.alert { border-top-color: var(--red); }
.stat-value { display: block; font-size: 28px; font-weight: 700; color: var(--navy-900); letter-spacing: -0.03em; }
.stat-label { display: block; margin-top: 2px; font-weight: 650; }
.stat-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat-split { display: flex; gap: 10px; margin-top: 6px; font-size: 13px; }
.stat-split a { text-decoration: none; }
.stat-split strong { color: var(--navy-900); }

.banner {
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.banner a { font-weight: 650; }

.layout-2 {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 16px;
  margin-bottom: 16px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 15px; }
.card-body { padding: 0; }
.card-body.pad { padding: 14px; }

.work-row, .handoff {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.card-body > :first-child { border-top: 0; }
.work-row:hover, .handoff:hover { background: #f7f9fb; }
.when { color: var(--muted); font-size: 13px; }
.when.late { color: var(--red); font-weight: 700; }
.work-title { font-weight: 650; color: var(--navy-900); }
.work-meta { color: var(--muted); font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.handoff { grid-template-columns: 1fr auto; }

.panel { margin-top: 16px; }
.panel > .card-head, .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 8px 0;
}
.segment { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: white; }
.segment a {
  padding: 4px 10px;
  text-decoration: none;
  color: var(--muted);
  border-left: 1px solid var(--line);
}
.segment a:first-child { border-left: 0; }
.segment a.on { background: var(--navy); color: white; }

.month { margin-top: 14px; }
.month > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 4px;
}
.month > header span { color: var(--muted); font-size: 13px; }
.fra-group {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 8px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.fra-group .fra-name { font-weight: 700; color: var(--navy-900); text-decoration: none; }
.fra-group ul { list-style: none; margin: 0; padding: 0; }
.fra-group li {
  display: grid;
  grid-template-columns: 64px minmax(140px, 200px) 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
}
.fra-group time { color: var(--muted); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr:hover td { background: #f7f9fb; }
table.data tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
table.data tr.pending td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
table.data a.rowlink { font-weight: 650; text-decoration: none; color: var(--navy-900); }
table.data a.rowlink:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.pill {
  display: inline-block;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
  background: var(--grey-bg);
  color: var(--grey);
  white-space: nowrap;
}
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.gold { background: var(--gold-100); color: #8a6a1d; }
.pill.orange { background: var(--orange-bg); color: var(--orange); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.grey { background: var(--grey-bg); color: var(--grey); }
.flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.filters input, .filters select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 7px 10px;
}
.filters input[type="search"] { min-width: 220px; }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 8px 0 16px;
  overflow-x: auto;
}
.tabs a {
  padding: 8px 14px;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-weight: 650;
}
.tabs a.on { color: var(--navy); border-bottom-color: var(--gold); }
.tabs a.soon { font-weight: 500; }

.record-head { margin-bottom: 4px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.record-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--navy);
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  margin: 8px 0 0;
}
.facts strong { color: var(--ink); font-weight: 650; }

.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 12px;
  margin: 0;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note {
  white-space: pre-wrap;
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px 12px;
}

.later {
  border: 1px dashed #c9d4e0;
  background: white;
  border-radius: 8px;
  padding: 18px 18px 8px;
}
.later h2 { margin-bottom: 6px; }
.phase {
  display: inline-block;
  background: var(--gold-100);
  color: #8a6a1d;
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field.span-2 { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 650; color: var(--navy-900); }
.req { color: var(--red); margin-left: 3px; }
.help { margin: 0; color: var(--muted); font-size: 12px; }
.error { margin: 0; color: var(--red); font-size: 13px; }
.input, .select, .textarea {
  border: 1px solid #cfd6de;
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  width: 100%;
}
.textarea { min-height: 96px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 4px; }
.checks, form ul { list-style: none; padding: 0; margin: 0; columns: 2; }
form ul li { break-inside: avoid; margin: 3px 0; }

.uw-stats { grid-template-columns: repeat(3, 1fr); }
.board { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.lane {
  flex: 0 0 180px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 120px;
}
.lane.side { background: #fbf7f2; }
.lane header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}
.lane-empty { color: var(--muted); padding: 8px 10px; margin: 0; }
.uw-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  background: white;
}
.uw-card:hover { border-color: var(--navy); }
.swim { margin-top: 18px; }
.swim h2 { margin: 0 0 8px; }
.input.tiny { width: 72px; }
.queue-row { display: block; margin-bottom: 8px; padding: 10px 12px; }

@media (max-width: 980px) {
  .uw-stats { grid-template-columns: 1fr 1fr; }
}

.messages { list-style: none; padding: 0; margin: 0 0 12px; }
.message {
  background: var(--green-bg);
  border-left: 4px solid var(--green);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.message.error { background: var(--red-bg); border-left-color: var(--red); }

.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}
.empty { color: var(--muted); padding: 16px; margin: 0; }

.timeline-event { display: grid; grid-template-columns: 140px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline input, .inline select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }

.login-body { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: white; }
.login-hero {
  background: var(--navy-900);
  color: white;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 0;
  position: relative;
}
.login-hero:after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: var(--gold);
}
.login-hero h1 { color: white; font-size: 40px; margin: 8px 0; }
.login-hero p { max-width: 420px; color: #d5e2ec; font-size: 16px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: min(380px, 100%); }
.login-card h2 { font-size: 22px; margin: 0 0 16px; color: var(--navy-900); }
.login-card input {
  border: 1px solid #cfd6de;
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
}
.login-card .field { margin-bottom: 12px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.or { text-align: center; color: var(--muted); margin: 14px 0; font-size: 13px; }
.btn-microsoft { width: 100%; background: white; color: var(--navy); }

.result-block { margin-bottom: 18px; }
.result-block h2 { margin-bottom: 6px; }
.result-block ul { margin: 0; padding-left: 18px; }
.result-block li { margin: 4px 0; }

@media (max-width: 980px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .layout-2, .split, .fra-group, .login-body { grid-template-columns: 1fr; }
  .fra-group li { grid-template-columns: 64px 1fr; }
  .login-hero { padding: 32px 24px; }
  .login-hero:after { height: 6px; }
}
.center-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin: 0 0 12px;
  border-bottom: 3px solid var(--navy);
}
.center-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--navy);
  font-weight: 650;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px 8px 0 0;
}
.center-nav a.on { background: var(--navy); color: white; }
.tab-count {
  display: inline-block;
  min-width: 1.2em;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--gold);
  color: var(--navy-900);
  font-size: 11px;
  text-align: center;
}
.center-nav a.on .tab-count { background: white; }
.table-scroll { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 8px; -webkit-overflow-scrolling: touch; }
table.dense { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13px; }
table.dense th, table.dense td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; vertical-align: middle; }
table.dense th { background: #eef3f8; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--navy); }
table.dense td.sticky { position: sticky; left: 0; background: white; z-index: 1; box-shadow: 1px 0 0 var(--line); }
table.dense tbody tr:hover td { background: #f7f9fb; }
table.dense tbody tr:hover td.sticky { background: #f7f9fb; }
.cell-form { margin: 0; }
.cell-input, .cell-form select { border: 1px solid #d5dde6; border-radius: 4px; padding: 3px 4px; font-size: 12px; max-width: 148px; background: white; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; }
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.funnel li { display: grid; grid-template-columns: 150px 1fr 36px; gap: 8px; align-items: center; }
.funnel-bar { display: block; height: 12px; background: var(--navy); border-radius: 99px; }
.funnel-count { font-weight: 700; color: var(--navy-900); }
.switcher { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.switcher select { min-width: min(100%, 280px); }
.enroll-jumps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0 0 16px; }
.email-copy { background: var(--gold-100); border-left: 3px solid var(--gold); padding: 8px 10px; margin: 6px 0 12px; }
.bell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
}
.call-search, .topbar .search { position: relative; flex: 1; }
.undo-toast { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff8e8; border: 1px solid var(--gold); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
body.m-shell .m-app > .m-toast { display: none; }
.undo-toast span { flex: 1; }
.call-results, .call-empty {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 40, 60, 0.12);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 50vh;
  overflow: auto;
}
.call-results a { display: flex; gap: 8px; align-items: baseline; text-decoration: none; color: inherit; padding: 8px; border-radius: 6px; }
.call-results a:hover { background: #f4f7fb; }
.call-empty { padding: 12px; color: var(--muted); }
.call-drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100%);
  background: white;
  border-left: 4px solid var(--gold);
  box-shadow: -12px 0 32px rgba(20, 40, 60, 0.16);
  overflow: auto;
  transform: translateX(110%);
}
.call-drawer.open { transform: none; }
.call-head, .call-body { padding: 16px; }
.call-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; background: var(--navy); color: white; }
.call-head h2, .call-head .muted, .call-head .sub { color: white; margin: 0; }
.call-head .pill { background: var(--gold); color: var(--navy-900); }
.stack-form { display: flex; flex-direction: column; gap: 8px; }
.stack-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 650; }
.stack-form input, .stack-form select, .stack-form textarea { font: inherit; border: 1px solid #d5dde6; border-radius: 6px; padding: 8px; }
@media (max-width: 820px) {
  .call-drawer { width: 100%; }
  .call-results, .call-empty { left: 8px; right: 8px; }
}
.add-person { margin-top: 16px; }

@media (max-width: 820px) {
  .funnel li { grid-template-columns: 1fr auto; }
  .funnel-bar { grid-column: 1 / -1; }
  .page-actions { width: 100%; }
  .switcher, .switcher select { width: 100%; }
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.16s ease;
  }
  html.sidebar-pinned .sidebar { transform: none; width: min(85vw, 360px); }
  html.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  html.sidebar-pinned .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    border: 0;
    padding: 0;
    background: rgba(20, 40, 60, 0.45);
    cursor: pointer;
  }
  html.sidebar-pinned .topbar { z-index: 45; }
  body:not(.m-shell) .sidebar-toggle .gold-bars span { background: var(--navy); }
  .nav { display: flex; flex-direction: column; align-items: stretch; }
  .nav a { display: flex; width: auto; }
  body:not(.m-shell) .topbar {
    display: flex;
    gap: 8px;
    height: auto;
    min-height: 58px;
    padding: 6px 8px;
  }
  body:not(.m-shell) .sidebar-toggle {
    position: static;
    left: auto;
    top: auto;
    order: 1;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  body:not(.m-shell) .call-search { order: 2; flex: 1; min-width: 0; }
  body:not(.m-shell) .topbar .bell,
  body:not(.m-shell) .topbar .help-link {
    order: 3;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    justify-content: center;
  }
  body:not(.m-shell) .topbar .help-link { order: 4; }
  body:not(.m-shell) .search input { width: 100%; min-width: 0; min-height: 44px; }
  body.m-shell .topbar {
    display: flex;
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 8px 8px 0;
    background: transparent;
    border: 0;
    z-index: 5;
  }
  body.m-shell.m-roster .topbar .call-search { display: none; }
  body.m-shell .topbar .bell,
  body.m-shell .topbar .help-link { display: inline-flex; }
  body.m-shell .sidebar-toggle {
    position: static;
    left: auto;
    top: auto;
    width: 44px;
    height: 44px;
    background: transparent;
  }
  body.m-shell .m-bar { padding-left: 16px; flex-wrap: nowrap; }
  body.m-shell .m-bar-links { flex-wrap: wrap; }
  .content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
.tone-expired, .tone-soon-30 { background: var(--red-bg); color: var(--red); font-weight: 700; }
.loa { white-space: normal; max-width: 280px; }
.tone-soon-60 { background: var(--gold-100); }
.tone-soon-90 { background: var(--blue-bg); }
.tone-ok, .tone-met { background: var(--green-bg); color: var(--green); }

.flow-nav { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 4px 0 12px; }
.flow-tab {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 650;
}
.flow-tab.on { background: var(--navy); color: white; }
.flow-tab.on .tab-count { background: white; color: var(--navy); }
.flow-more { margin: 0 0 12px; font-size: 13px; }
.flow-more a { margin-right: 12px; }
.flow-guide, .step-guide { color: var(--navy-900); }
.step-guide { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.step-guide li { background: white; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line); font-size: 13px; }
.stage-cards { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 12px 0; padding: 0; }
.stage-card a {
  display: flex; flex-direction: column; gap: 6px; min-height: 150px;
  text-decoration: none; color: inherit; background: white; border-radius: 16px;
  padding: 14px; border: 1px solid var(--line); border-top: 8px solid var(--navy); box-shadow: var(--shadow);
}
.stage-card.stage-pre_app a { border-top-color: var(--gold); }
.stage-card.stage-application a { border-top-color: var(--navy); }
.stage-card.stage-underwriting a { border-top-color: var(--navy-900); }
.stage-card.stage-issue a { border-top-color: var(--navy); }
.stage-card.stage-payments a { border-top-color: var(--gold); }
.stage-kicker { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stage-name { font-weight: 700; font-size: 16px; }
.stage-count { font-size: 32px; font-weight: 700; color: var(--navy-900); line-height: 1; }
.stage-line { font-size: 13px; color: var(--navy); }
.meter { display: inline-block; width: 88px; height: 8px; background: #e6ebf0; border-radius: 99px; vertical-align: middle; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--navy); }
.meter-wide { display: block; width: 100%; }
.flow-funnel { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.flow-funnel li { background: white; border-radius: 12px; padding: 8px 12px; }
.roster-link { margin: 0 0 12px; }
.roster-add, .roster-import, .quick-add, .delivery-day, .copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 12px; }
.roster-import { display: block; background: white; border-radius: 12px; padding: 12px; border-left: 6px solid var(--gold); }
.quick-add input, .quick-add select, .roster-import textarea, .roster-import input, .sheet-form input, .sheet-form select, .sheet-form textarea, .igo-ref input,
.form-grid input, .form-grid select, .form-grid textarea, .policy-form input, .policy-form select, .filters input, .filters select {
  background: #fff;
  color: #1b2836;
  border: 2px solid #1F4E78;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  min-height: 44px;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus,
.sheet-form input:focus, .filters input:focus, .filters select:focus {
  outline: 3px solid #C49A3B;
  outline-offset: 1px;
}
.person-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 2px solid #1F4E78;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.open-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0 0 20px; }
.open-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.open-card h2 { margin: 4px 0; font-size: 22px; }
.open-kicker { margin: 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); font-weight: 700; }
.policy-card { background: #f4f7fb; border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; }
.account-value { font-weight: 700; color: var(--navy); margin: 4px 0; }
.policy-list { padding-left: 18px; }
.roster-import textarea { width: min(100%, 520px); }
.map-row { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-table { width: 100%; border-collapse: collapse; background: white; }
.flow-table th, .flow-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.flow-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy); }
.flow-table th a { color: var(--navy); text-decoration: none; }
.flow-table th a:hover { text-decoration: underline; }
.flow-table select, .signer-action select, .filters select, .uw-fields input {
  min-height: 44px;
  font: inherit;
  padding: 8px 10px;
}
.signer-actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.signer-action, .sent-check, .uw-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sent-check input[type="checkbox"] { width: 22px; height: 22px; }
.signer-done { display: inline-block; border-radius: 999px; padding: 6px 10px; }
.pager { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.app-tools { margin: 0 0 12px; }
.draft-body { white-space: pre-wrap; background: #f4f7fb; border-radius: 10px; padding: 12px; }
.group-filter { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.group-filter legend { padding: 0 4px; color: var(--navy); font-weight: 700; }
.check-line { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.uw-detail .form-grid, .req-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.flow-table select, .uw-detail select, .uw-detail input, .uw-detail textarea, .req-line select {
  min-height: 44px;
  font: inherit;
}
.uw-class-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.waiting-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 8rem; }
.rate-wrap { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rate-wrap:not(:has(input[type="checkbox"]:checked)) .rating-field { display: none; }
.class-readout { font-weight: 700; color: var(--navy); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.step-pill { display: inline-block; border-radius: 999px; padding: 2px 8px; background: #eef3f8; font-size: 12px; font-weight: 650; }
.step-roster { background: #f4f1ea; }
.step-placed { background: var(--green-bg); color: var(--green); }
.view-toggle a { margin-left: 8px; text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.view-toggle a.on { background: var(--navy); color: white; }
.flow-page { border-radius: 16px; }
.flow-preapp { padding: 8px; }
.flow-application { padding: 8px; }
.flow-application.is-igo { box-shadow: inset 0 0 0 2px var(--navy); }
.flow-uw { padding: 8px; }
.flow-issue { padding: 8px; }
.flow-payments { padding: 8px; }
.igo-banner { margin: 0 0 10px; font-weight: 700; color: #2f6f9f; }
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.kanban-col { background: rgba(255,255,255,.8); border-radius: 12px; padding: 10px; min-height: 120px; }
.flow-card { background: white; border-radius: 12px; padding: 10px; margin: 8px 0; box-shadow: 0 4px 12px rgba(20,40,60,.05); }
.signer-row, .req-row { display: flex; flex-wrap: wrap; gap: 6px; }
.signer-chip button, .req-chip button {
  border: 0; border-radius: 999px; padding: 6px 10px; font: inherit; cursor: pointer; background: #eef3f8;
}
.chip-not_sent button.chip-state { background: #f4f1ea; }
.chip-sent button.chip-state { background: #d9e8f5; }
.chip-viewed button.chip-state { background: #f0e2c0; }
.chip-signed button.chip-state { background: var(--green-bg); color: var(--green); }
.chip-expired button.chip-state { background: #f3e4d8; }
.chip-resend { margin-left: 4px; background: white !important; border: 1px solid var(--navy) !important; }
.next-dock { margin: 0 0 12px; }
.next-dock form {
  border: 2px dashed var(--gold); border-radius: 12px; padding: 12px; text-align: center; color: var(--navy); background: white;
}
.pay-day { background: white; border-radius: 16px; padding: 12px; margin: 0 0 16px; border-left: 6px solid var(--navy); border-top: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.sheet-block { background: white; border-radius: 12px; padding: 12px; margin: 0 0 12px; border-top: 4px solid var(--gold); }
.sheet-form .form-grid, .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 650; }
.flow-path { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.flow-path-step { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; padding: 8px 12px; border-radius: 999px; background: white; border: 1px solid var(--line); }
.flow-path-step.on { background: var(--navy); color: white; }
.flow-casebar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.flow-check { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.flow-check li { background: white; border-radius: 999px; padding: 4px 10px; }
.flow-check li.is-done { background: var(--green-bg); color: var(--green); }
.flow-ready { color: var(--green); font-weight: 650; }
.worksheet-meter { background: white; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.sheet-print { background: white; }
.sheet-print .paper { max-width: 720px; margin: 24px auto; }
.moved-note { font-weight: 700; color: var(--navy); }
@media (max-width: 980px) {
  .stage-cards, .sheet-form .form-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet-form { max-width: 100%; }
  .sheet-form input, .sheet-form select, .sheet-form textarea { width: 100%; max-width: 100%; }
}
@media print {
  .no-print { display: none; }
}

/* Calmer underwriting: one accent per stage, one primary action, extra columns tucked away. */
body { font-size: 16px; }
h1 { font-size: 32px; }
.stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
}
.stepper a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 650;
}
.stepper .tab-count { display: none; }
.stepper-arrow { color: var(--muted); }
.stepper-gap { width: 10px; }
.flow-path .stepper-arrow:last-child { display: none; }
.stepper-home.on,
.stepper-step.on,
.flow-path-step.on { background: var(--navy); color: white; border-color: var(--navy); }
.more-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.col-extra { display: none; }
#more-cols:checked ~ .table-scroll .col-extra,
#more-cols:checked ~ form .table-scroll .col-extra,
#more-cols:checked ~ .pay-day .table-scroll .col-extra { display: table-cell; }
.more-cols-label { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--navy); }
.page-menu { position: relative; }
.page-menu:not([open]) > :not(summary) { display: none; }
.page-menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
  color: var(--navy);
}
.page-menu > summary::-webkit-details-marker { display: none; }
.page-menu[open] > :not(summary) {
  position: absolute;
  z-index: 6;
  right: 0;
  top: calc(100% + 6px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(20, 40, 60, 0.12);
}
.page-menu a, .page-menu button { display: block; width: 100%; text-align: left; margin: 2px 0; }
.tour {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--gold-100);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.tour p { margin: 0; }
.quiet-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  margin: 16px 0;
}
.quiet-panel > summary { cursor: pointer; font-weight: 650; color: var(--navy); padding: 6px 0; }
.next-line { color: var(--navy); }
.case-next { font-size: 18px; margin: 4px 0 12px; }
.my-day { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.my-day li {
  background: white;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--navy);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.my-day a { font-weight: 650; text-decoration: none; }
.my-day form { margin-left: auto; }
.req-row, .result-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.req-row .row-actions, .result-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip.on { background: var(--navy); color: white; border-color: var(--navy); }
.next-dock { opacity: 0.72; }
.ask-form fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.ask-form legend { font-weight: 700; margin-bottom: 8px; }
.ask-form .chip {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin: 0 8px 8px 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  font-weight: 650;
}
.ask-form .chip input { width: auto; margin-right: 6px; }
.ask-form .chip:has(input:checked) { background: var(--navy); color: white; border-color: var(--navy); }
.ask-form textarea, .ask-form input[type="text"], .ask-form input:not([type]), .ask-form select {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ask-form .task-only { display: none; }
.ask-form:has(input[value="task"]:checked) .task-only { display: block; }
.ask-form:has(input[value="task"]:checked) .help-only { display: none; }
.ask-form .m-save {
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  font: inherit;
  font-weight: 700;
}
.ask-link { min-height: 44px; }
.row-action { display: inline-flex; }
@media (max-width: 720px) {
  h1 { font-size: 28px; }
  .btn, button.btn, .nav a, .stepper a, .page-menu > summary {
    min-height: 44px;
  }
  .stepper a, .page-menu > summary { display: inline-flex; align-items: center; }
  .nav a { display: flex; align-items: center; min-height: 44px; }
}

@media (max-width: 639px) {
  .more-dots { display: none; }
  .more-label { display: inline; }
  .page-menu > summary { border-radius: 8px; }
  .flow-preapp .tour { display: none; }
  .my-day li {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .my-day a { display: inline; min-height: 0; }
  .my-day form, .my-day .btn, .req-row .btn, .result-row .btn { width: 100%; }
  .filters, .group-filter, .page-actions, .bulk-bar, .app-tools {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .filters > *, .filters input, .filters select, .filters button, .filters label,
  .page-actions > .btn, .page-actions > a.btn, .bulk-bar .btn, .app-tools .btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .filters input[type="search"] { min-width: 0; }
  .group-filter { box-sizing: border-box; }
  .check-line { max-width: 100%; white-space: normal; }
  .table-scroll { overflow: visible; background: transparent; border: 0; }
  .pay-day { overflow: visible; }
  .flow-table, .flow-table tbody { display: block; width: 100%; }
  .flow-table thead { display: none; }
  .flow-table tr {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    margin: 0 0 12px;
  }
  .flow-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    padding: 0;
  }
  .flow-table td.col-extra { display: none; }
  #more-cols:checked ~ .table-scroll .flow-table td.col-extra,
  #more-cols:checked ~ form .table-scroll .flow-table td.col-extra,
  #more-cols:checked ~ .pay-day .table-scroll .flow-table td.col-extra { display: block; }
  .flow-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .flow-table td[data-label="Person"] a,
  .flow-table td[data-label="Insured"] a { font-size: 18px; font-weight: 700; }
  .flow-table .btn, .flow-table button.btn, .flow-table .row-action { width: 100%; }
  .flow-table select, .flow-table input[type="text"], .flow-table input[type="search"],
  .flow-table input:not([type="checkbox"]):not([type="hidden"]) { width: 100%; max-width: 100%; }
  .row-action, .signer-action, .waiting-cell, .uw-class-cell, .advance-gate {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .signer-action .btn, .advance-gate .btn { width: 100%; }
  .page-menu[open] > :not(summary) { position: static; width: 100%; min-width: 0; box-shadow: none; }
  .stepper { max-width: 100%; }
  .content, .main, .topbar, .call-search, .search { max-width: 100%; min-width: 0; }
  .work-row, .handoff { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .nowrap, table.data th, table.data td, .pill { white-space: normal; }
  .table-wrap { overflow: visible; background: transparent; border: 0; }
  table.data, table.data tbody { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    margin: 0 0 12px;
  }
  table.data td { display: block; width: 100%; border: 0; padding: 0; }
  table.data td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }
  table.data a.rowlink { font-size: 18px; }
  table.data .num { text-align: left; }
  .board { flex-direction: column; overflow: visible; }
  .lane { flex: 1 1 auto; width: 100%; }
  .quick-add, .roster-add, .roster-import, .import-block { flex-direction: column; align-items: stretch; width: 100%; max-width: 100%; }
  .quick-add input, .import-block textarea, .import-block input { width: 100%; max-width: 100%; }
  .center-nav { flex-wrap: wrap; overflow: visible; }
  form ul { columns: 1; }
  .fra-group li { grid-template-columns: minmax(0, 1fr); }
  .tour { display: none; }
  .stepper, .flow-path { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .flow-path-step, .chip, .pill, .phone-nav a { white-space: nowrap; }
  .phone-nav a { font-size: 12px; padding: 0 4px; }
  .person-top { display: flex; flex-wrap: wrap; align-items: baseline; }
  .person-page h1 { order: -1; flex: 1 0 100%; margin-right: 0; }
  .person-nav { position: static; margin-left: auto; }
  .person-top .person-actions { flex: 1 0 100%; }
  .person-actions > a.btn, .person-actions > .note-toggle > summary { white-space: nowrap; }
  .waiting-cell, .uw-class-cell, .rate-wrap, .quick-add, .flow-table form { min-width: 0; max-width: 100%; }
  .flow-table select, .flow-table input, .flow-table button, .flow-table form { box-sizing: border-box; }
  body { overflow-x: hidden; }
  .content { padding-bottom: 88px; }
}
.phone-nav { display: none; }
.wait-fresh { color: #1b7f4a; font-weight: 700; }
.wait-mid { color: #8a5a00; font-weight: 700; }
.wait-late { color: #9b2335; font-weight: 700; }
.sort-link { text-decoration: underline; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.person-top { position: relative; }
.person-page h1 { font-size: 2rem; line-height: 1.15; margin: 4px 160px 4px 0; }
.person-nav { position: absolute; top: 0; right: 0; display: flex; gap: 12px; font-size: 13px; }
.person-nav a {
  color: var(--navy);
  text-decoration: none;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 650;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.person-page h1 { margin-right: 240px; }
.confirm-line, .status-form label.confirm-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 450;
}
.status-form label.confirm-line input[type="checkbox"],
.confirm-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
  flex: 0 0 18px;
  display: inline-block;
}
.stacked-fields, .narrow-page, .draft-form { max-width: 40rem; }
.narrow-page { margin-left: auto; margin-right: auto; }
.field-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 16px 12px;
  margin: 0 0 16px;
}
.field-group legend { font-weight: 700; padding: 0 4px; }
.field-group label { display: block; margin: 12px 0; font-weight: 650; }
.field-group input, .field-group select, .field-group textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  min-height: 44px;
  font: inherit;
  font-weight: 400;
  padding: 8px 12px;
}
.draft-body, .draft-card p, .draft-form textarea { font-weight: 400; }
.pill.warn { background: #f3e4d8; color: #9b2335; }
.delivery-date { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.date-input {
  min-height: 48px;
  min-width: 12rem;
  font: inherit;
  padding: 8px 12px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: white;
}
.remind-confirm { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 12rem; }
.inline-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 12px; }
.inline-add label { display: flex; flex-direction: column; gap: 4px; font-weight: 650; }
.person-actions { margin-top: 8px; }
.task-highlight { scroll-margin-top: 72px; }
.card.panel { margin-bottom: 16px; }
.page-actions .btn, .row-actions .btn, .flow-casebar .btn, .quick-actions .btn { min-height: 44px; }
.phone-status { display: none; }
@media (min-width: 1100px) {
  body.m-shell .m-main, .narrow-page, .draft-form { margin-left: auto; margin-right: auto; }
}
.draft-form label, .status-form label { display: block; font-weight: 700; margin: 12px 0; }
.draft-form input, .draft-form textarea, .status-form select, .status-form input {
  display: block; width: 100%; max-width: 40rem; min-height: 44px; margin-top: 6px; font: inherit; padding: 10px 12px;
}
.confirm-box { display: inline-block; }
.confirm-box summary { cursor: pointer; list-style: none; }
.confirm-body { margin-top: 8px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.gate-reason, .advance-gate .help, .flow-casebar .help { font-size: 15px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.quick-actions .btn { min-height: 48px; }
.signer-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.day-block { margin: 0 0 16px; }
.flow-uw .flow-table td { padding: 6px 8px; }
@media (max-width: 820px) {
  .phone-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: white;
    border-top: 1px solid var(--line);
    height: 64px;
  }
  .phone-nav a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    text-align: center;
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
  }
  .phone-nav a[aria-current="page"] { color: var(--gold); }
  .stepper, .flow-path, .phone-nav { flex-wrap: nowrap; }
  .m-chips { flex-wrap: wrap; }
  .stepper, .flow-path { overflow: visible; }
  .stepper a, .flow-path-step, .phone-nav a, .pill, .chip { white-space: nowrap; flex: 0 0 auto; }
  .phone-nav a { flex: 1 1 auto; font-size: 12px; padding: 0 2px; }
  .more-call .m-chips { flex-wrap: wrap; overflow: visible; }
  .more-call .chip { flex: 0 0 auto; max-width: 100%; }
  .person-page .page-actions, .person-page .signer-buttons, .person-page .inline-add, .person-page .quick-add { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .person-page .page-actions .btn, .person-page .page-actions form, .person-page .page-actions form .btn, .person-page .inline-add .btn, .person-page .quick-add select, .person-page .quick-add .btn, .person-page .signer-buttons .btn { width: 100%; }
  .person-page .page-menu .btn, .person-page .page-menu summary { font-size: 16px; font-weight: 400; }
  .filter-sheet > summary, .phone-collapse > summary { display: flex; align-items: center; min-height: 44px; font-weight: 650; cursor: pointer; }
  .content { padding-bottom: 112px; }
  .flow-table td.req-row { display: block; }
  .draft-form { padding-bottom: 24px; }
  .flow-uw .flow-table tr { padding: 8px 10px; margin-bottom: 8px; gap: 4px; }
  .phone-status { display: inline; margin-left: 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
  .flow-uw .flow-table td[data-label="UW Status"],
  .flow-uw .flow-table td[data-label="UW Class"],
  .flow-uw .flow-table td[data-label="HTK Sent"],
  .flow-uw .flow-table td[data-label="BD Approved"],
  .flow-uw .quick-add,
  .flow-uw .waiting-cell > .btn.secondary { display: none; }
  .flow-uw .flow-table td[data-label="Insured"]::before,
  .flow-uw .flow-table td[data-label="Group"]::before { content: none; }
  .flow-uw .flow-table td[data-label="Group"] { font-size: 13px; color: var(--muted); }
  .flow-uw .waiting-cell .btn { width: 100%; }
  .group-filter input[type="checkbox"],
  .filters input[type="checkbox"],
  .confirm-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
  }
}
.stepper-compact { display: none; }
@media (max-width: 820px) {
  .flow-issue details.filter-sheet > summary { display: none; }
  .flow-issue details.filter-sheet:not([open]) > .m-chips { display: flex; flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 480px) {
  .flow-path, .stepper { display: none; }
  .stepper-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 12px;
  }
  .stepper-compact a, .stepper-now {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .stepper-now { font-weight: 700; text-align: center; flex: 1 1 auto; }
}
@media (min-width: 821px) {
  .filter-sheet > summary, .phone-collapse > summary { display: none; }
}
.approvals-page, .draft-form, .narrow-page { max-width: 900px; margin-left: auto; margin-right: auto; }
.content, .m-main, .timeline-event, .my-day, .flow-card, .uw-card, .message, .banner, .next-line, .draft-body, .email-copy, td, .m-meta, .m-title, .work-title, .work-meta {
  overflow-wrap: anywhere;
}
td { overflow-wrap: break-word; }
th { overflow-wrap: normal; word-break: normal; }
.clamp-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.clamp-note.open { display: block; -webkit-line-clamp: unset; }
.note-more {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
}
.draft-form input, .draft-form textarea, .draft-form select { font-weight: 400; }
.btn.danger {
  background: transparent;
  color: var(--red, #8d1d1d);
  border: 1px solid var(--red, #8d1d1d);
}
.task-highlight { outline: 3px solid var(--gold); border-radius: 8px; padding: 8px; }
:focus-visible { outline: 3px solid var(--navy-800); outline-offset: 2px; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.person-actions > a.btn, .person-actions > .note-toggle > summary { flex: 1 1 30%; }
.person-actions > .note-toggle { display: contents; }
.person-actions .inline-add { flex: 1 1 100%; }
.btn, button.btn, .m-log, .m-save, .phone-nav a { min-height: 44px; }
@media (min-width: 821px) {
  .approvals-page, .draft-form, body.m-shell .m-main { max-width: 900px; }
}
.approvals-page .draft-card p, .approvals-page .draft-body, .approvals-page .flow-card p { font-weight: 400; }
.confirm-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-width: 28rem; }
.confirm-dialog::backdrop { background: rgba(20, 32, 48, 0.35); }
.collect-form, .signer-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 8px; }
.collect-form label, .signer-edit label { font-weight: 650; }
.collect-form input, .collect-form select, .signer-edit select { display: block; min-height: 44px; margin-top: 4px; }
.inline-confirm summary { cursor: pointer; list-style: none; }
.chip-filters .chip, a.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); background: white; }
a.chip.on { background: var(--navy); color: white; }
h1, .page-head h1, .person-page h1, .m-main h1 {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  transform: translateY(-160%);
  z-index: 40;
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: none; }
.clamp-wrap { display: block; flex: 1 1 100%; min-width: 0; max-width: 100%; }
.row-added { box-shadow: inset 4px 0 0 var(--gold); background: #fff8e8; }
.owner-tag { color: var(--muted); font-size: 13px; font-weight: 650; margin-left: 6px; }
.mark-done { margin-top: 8px; }
.mark-done form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 8px; }
.move-to { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 14rem; }
.move-to select, .move-to .btn { min-height: 44px; }
.delivery-day { gap: 16px 28px; margin-bottom: 20px; }
.delivery-date { display: flex; flex-direction: column; gap: 8px; }
.delivery-date input { min-width: 12.5rem; }
.approvals-page { width: 100%; max-width: 900px; margin-left: auto; margin-right: auto; }
@media (max-width: 820px) {
  .person-top { display: flex; flex-direction: column; align-items: stretch; }
  .person-page h1 { margin-right: 0; order: 0; flex: 0 0 auto; }
  .person-nav { position: static; top: auto; right: auto; margin: 8px 0 0; width: auto; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 639px) {
  .flow-payments .flow-table tr { gap: 2px; padding: 8px 10px; margin-bottom: 8px; }
  .flow-payments .flow-table td { font-size: 15px; line-height: 1.25; }
  .flow-payments .flow-table td[data-label]:not([data-label=""])::before {
    display: inline;
    margin: 0 6px 0 0;
  }
  .flow-payments .flow-table td[data-label="Select"]::before { content: none; display: none; }
  .flow-payments td[data-label=""]:empty, .flow-payments td[data-label="Select"]:not(:has(input)) { display: none; }
  .flow-payments .next-line { display: none; }
  .flow-payments .flow-table td[data-label=""] { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; align-items: center; }
  .flow-payments .flow-table .row-action { flex: 1 1 auto; min-width: 0; width: auto; }
  .flow-payments .flow-table .btn, .flow-payments .ask-link { width: auto; max-width: 100%; }
  .flow-payments .flow-table .row-action .btn {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
  }
  .flow-issue .flow-table .row-action, .flow-issue .flow-table .row-action .btn { width: auto; align-self: flex-start; }
}
@media (max-width: 480px) {
  .stepper-compact a, .stepper-now {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 46%;
  }
  .stepper-now { max-width: none; flex: 1 1 auto; }
}

.who { text-decoration: none; }
.help-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 99px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}
.bell { position: relative; }
.bell-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--gold);
  box-shadow: 0 0 0 2px white;
}
.tab-jump { display: none; }
.stack-page { display: flex; flex-direction: column; gap: 16px; }
.stack-page .card { width: 100%; }
.card-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.form-grid.flat { background: transparent; border: 0; padding: 0; }
.form-section { border: 0; margin: 12px 0 0; padding: 0; }
.form-section legend { font-weight: 700; font-size: 16px; margin: 0 0 8px; }
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.timeline-head { margin-top: 28px; }
.internal-notes { margin-top: 16px; }
.internal-notes > summary { cursor: pointer; font-weight: 650; }
.license-cards { display: none; list-style: none; margin: 0; padding: 0; }
.view-toggle { display: flex; gap: 8px; flex-wrap: wrap; }
.extra-actions { display: contents; }
.phone-more { display: none; }
.profile-signout { margin-top: 16px; }
.filter-sheet > summary { list-style: none; gap: 8px; }
.filter-sheet > summary::-webkit-details-marker { display: none; }
.filter-sheet > summary .chev {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.filter-sheet[open] > summary .chev { transform: rotate(-135deg); }
.stage-jump { display: none; }
.board-cue { position: relative; }
.scroll-board { scroll-snap-type: x mandatory; }
.scroll-board .lane { scroll-snap-align: start; }
.ask-form .chip { position: relative; cursor: pointer; }
.ask-form .chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
@media (max-width: 820px) {
  .sidebar {
    top: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 48;
  }
  html.sidebar-pinned .topbar { z-index: 45; }
  .phone-nav { z-index: 55; }
  .sidebar .nav { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .sidebar-foot {
    flex: 0 0 auto;
    padding-bottom: 80px;
    background: var(--navy-900);
  }
  .tab-set .tab-jump { display: block; margin: 0 0 12px; }
  .tab-set .tab-jump select { width: 100%; min-height: 44px; }
  .tab-set .tabs { display: none; }
  .record-actions { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  .record-actions > .btn { width: auto; flex: 1 1 auto; }
  .record-actions .extra-actions { display: none; }
  .record-actions .phone-more { display: block; flex: 0 0 auto; }
  .record-actions .phone-more > summary { width: auto; }
  .filter-sheet:not([open]) > :not(summary) { display: none; }
  .stage-jump {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 12px;
    padding-bottom: 4px;
  }
  .stage-jump a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    text-decoration: none;
    color: var(--navy);
    font-weight: 650;
  }
  .scroll-board { flex-direction: row; overflow-x: auto; }
  .scroll-board .lane { flex: 0 0 78vw; width: auto; }
}
@media (min-width: 821px) {
  .filter-sheet > .filters { display: flex; }
}
@media (max-width: 639px) {
  .license-desk, .appt-desk { display: none; }
  .license-cards { display: flex; flex-direction: column; gap: 8px; }
  .license-cards li {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .license-cards strong { font-size: 18px; }
  form.license-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  form.license-form input,
  form.license-form select,
  form.license-form button,
  form.license-form textarea,
  form.license-form ul {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    columns: 1;
  }
  .renewal-cards table.data tr { padding: 8px 10px; gap: 2px; margin-bottom: 8px; }
}

.form-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  padding: 0;
  flex: 0 0 18px;
  align-self: center;
}
.field.check-field { align-items: flex-start; }
.check-field .check-line { font-weight: 650; color: var(--navy-900); }
.stack-page .work-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
}
.stack-page .work-row .stack {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.stack-page .work-title,
.stack-page .when {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stack-page .work-row > .when + .work-title { margin-left: auto; }
.stack-page .work-meta,
.stack-page .work-row > .muted {
  margin-left: auto;
  white-space: nowrap;
  flex: 0 0 auto;
  text-align: right;
}
.timeline-note.clamp-note { -webkit-line-clamp: 3; }
.board-cue.can-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72px;
  background: var(--bg);
  border-left: 2px solid var(--gold);
  pointer-events: none;
  z-index: 2;
}
@media (max-width: 639px) {
  .stack-page .work-meta,
  .stack-page .work-row > .muted {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 58%;
  }
}
.stage-jump .count-badge {
  margin-left: 6px;
  background: var(--gold);
  color: #1b2836;
  border-radius: 99px;
  min-width: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.drawer-close { display: none; }
.who-name { text-decoration: underline; text-underline-offset: 3px; }
.who .who-role { display: block; margin-top: 2px; }
@media (max-width: 820px) {
  .brand { position: relative; }
  .drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }
  .sidebar .nav { padding-top: 4px; padding-bottom: 8px; }
  .sidebar .nav a { min-height: 40px; padding: 4px 12px; margin: 0 8px; }
  .sidebar .nav-label { margin: 8px 16px 2px; }
  .packet-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .packet-form .check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    white-space: normal;
  }
  .packet-form .btn { width: 100%; }
}
.brief { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.brief-objective {
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 12px 14px;
}
.brief-objective .kicker {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.brief-objective p { margin: 0; font-size: 18px; font-weight: 650; }
.brief-facts { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.brief-facts div { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.brief-facts dt { margin: 0; color: var(--muted); font-weight: 650; }
.brief-facts dd { margin: 0; text-align: right; }
.brief-last { margin: 0; }
.brief-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.brief-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.brief-list li.late { background: var(--red-bg); border-color: #e4c6c6; }
.brief-review {
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--gold-100);
  border-radius: 8px;
}
.brief-form label, .brief-form legend { display: block; font-weight: 650; margin: 12px 0 4px; }
.brief-form textarea,
.brief-form input[type="text"],
.brief-form input[type="date"],
.brief-form input[type="time"],
.brief-form select { width: 100%; min-height: 44px; }
.brief-form .btn { margin-top: 12px; min-height: 44px; }
.due-chips { border: 0; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.due-chips legend { width: 100%; }
.due-chips label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-weight: 650;
}
.action-form { margin-top: 4px; }
#this-meeting-items { margin-top: 12px; }
.capture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 820px) {
  .capture-grid { grid-template-columns: 1fr; }
  .brief-facts div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .brief-facts dd { text-align: left; }
  .brief-form .btn { width: 100%; }
}
.brief-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}
.brief-side { align-self: stretch; min-width: 0; }
.brief-capture {
  position: sticky;
  top: 12px;
}
.brief-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.brief-switch .btn { min-height: 44px; }
.jump-notes { display: none; }
.brief .kicker {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.brief-form textarea { min-height: 8rem; }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.save-row .btn { margin-top: 0; width: auto; }
.save-note { margin: 12px 0 0; font-weight: 650; }
.save-note.warn { color: var(--red); }
.group-items { margin-top: 12px; }
.group-items summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 650;
}
.group-items:not([open]) > :not(summary) { display: none; }
.due-chips input.due-custom { display: none; width: auto; min-height: 44px; background: white; }
.due-chips:has(input[value="custom"]:checked) input.due-custom { display: block; }
.my-day a.meet-link, .brief a.meet-link {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  flex: 1 1 100%;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}
.meet-time, .meet-who { font-weight: 700; }
.meet-type { color: var(--muted); }
.meet-objective { flex-basis: 100%; }
.my-day li.next-up {
  background: var(--gold-100);
  border-left-color: var(--gold);
}
.my-day li.in-progress {
  background: var(--green-bg);
  border-left-color: var(--green);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
#person-outstanding li,
#this-meeting-items li {
  min-height: 72px;
  align-items: center;
}
@media (min-width: 821px) {
  .brief-side .chip-row {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .brief-side .chip-row label {
    position: relative;
    flex: 0 0 auto;
    padding: 0 8px;
    gap: 0;
    font-size: 13px;
    white-space: nowrap;
  }
  .brief-side .chip-row input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  .brief-side .chip-row label:has(input:checked) {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
  }
  .brief-side .chip-row label:has(input:focus-visible) {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }
}
@media (max-width: 820px) {
  .brief-layout { grid-template-columns: 1fr; }
  .brief-capture { position: static; }
  .brief-form textarea { min-height: 4.5rem; }
  .jump-notes { display: inline-flex; align-items: center; min-height: 44px; }
  .brief-form .save-row .btn { width: auto; }
  .phone-nav a { font-size: 11px; padding: 0 1px; }
}
.timeline-tools { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.timeline-tools input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--card);
}
.log-history { margin-top: 16px; }
.direction-toggle { margin: 4px 0 8px; }

/* Pipeline: every stage visible on a desktop, totals bar on every width. */
.stage-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.stage-summary a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; text-decoration: none; color: var(--navy); font-weight: 650; }
@media (min-width: 821px) {
  .scroll-board { overflow-x: visible; }
  .scroll-board .lane { flex: 1 1 0; min-width: 0; }
  .scroll-board .lane a { overflow-wrap: break-word; hyphens: auto; }
  .scroll-board .lane.side { flex: 0.6 1 0; }
}
@media (max-width: 820px) {
  .stage-summary { flex-wrap: nowrap; overflow-x: auto; }
}

/* Tasks on a phone: one compact card per task. */
.task-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 0 100%; }
.task-chips a.chip { text-decoration: none; }
.task-chips a.chip.on { background: var(--navy); color: white; }
@media (max-width: 820px) {
  table.data.task-table td::before { display: none !important; content: none !important; }
  table.data.task-table tr { display: flex; flex-direction: row; justify-content: flex-start; text-align: left; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 10px 12px; }
  table.data.task-table td { display: inline-flex; padding: 0 !important; border: 0 !important; width: auto !important; font-size: .9rem; }
  table.data.task-table td[data-label="Task"] { flex: 1 0 100%; display: block; font-size: 1rem; }
  table.data.task-table td[data-label="Owner"] { display: none; }
  table.data.task-table td[data-label="Due"] .muted { margin-left: 4px; }
}
[data-timeline-row][hidden] { display: none !important; }
.my-day .task-group .group-items { list-style: none; margin: 8px 0 0; padding: 0; height: auto; }
.my-day .task-group .group-items > li { display: block !important; padding: 6px 0; border: 0; box-shadow: none; background: none; min-height: 0; }
.my-day .task-group summary { cursor: pointer; }

/* UX round (Oct 17): solid navy and gold, readable nav, visible focus. */
.brand { padding: 14px 52px 12px 16px; }
.nav { padding: 4px 0 10px; min-height: 0; }
.nav-label { margin: 10px 16px 4px; }
.nav a { padding: 6px 12px; }
.nav a.active { background: rgba(255, 255, 255, 0.1); }
.sidebar-foot { padding: 10px 14px 12px; }
.sidebar :focus-visible, .sidebar-toggle:focus-visible { outline-color: var(--gold); }
.focus-gold:focus-visible { outline-color: var(--gold); }
.work-row.single { grid-template-columns: minmax(0, 1fr); }
.stack-page .work-row > .when + .work-title { margin-left: 0; flex: 1 1 auto; }
.client-notes { margin: 0 0 10px; padding: 8px 10px; background: var(--grey-bg); border-radius: 6px; }
.client-notes strong { color: var(--navy-900); }
.meet-note { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; }
.drafts-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--gold); border-left: 4px solid var(--gold); border-radius: 8px; background: var(--gold-100); color: var(--navy-900); font-weight: 650; text-decoration: none; min-height: 44px; }
.drafts-link:hover { background: var(--gold-200); }
.page-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; margin-top: 4px; }
@media (max-width: 820px) {
  .phone-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom); }
  .phone-nav a { position: relative; flex: none; min-width: 0; padding: 0 2px; font-size: 12px; font-weight: 650; color: var(--navy-900); border-top: 3px solid transparent; }
  .phone-nav a[aria-current="page"] { color: var(--navy-900); background: var(--gold-100); border-top-color: var(--gold); font-weight: 800; }
  .phone-nav .nav-count { position: absolute; top: 6px; right: 4px; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  .phone-nav a:focus-visible { outline-offset: -3px; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 820px) {
  .card-head > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
  .content a:not(.btn):not(.chip):not(.flow-path-step):not(.drafts-link) { padding-block: 5px; }
}
@media (min-width: 821px) {
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .sidebar-foot .signout { margin: 0; }
}
@media (min-width: 821px) { .sidebar-foot .who-role { margin-bottom: 0; } }
/* Test-version notice: in the page flow, so it never covers the nav. */
.test-banner { background: var(--navy-900); color: #ffffff; border-bottom: 3px solid var(--gold); padding: 5px 16px; font-size: 13px; line-height: 1.35; text-align: center; }
.test-banner strong { color: var(--gold-200); font-weight: 700; }
@media (max-width: 820px) { .test-banner { font-size: 12px; padding: 4px 10px; text-align: left; } }
.test-banner { position: sticky; top: 0; z-index: 30; }
html.has-test-banner .topbar { top: var(--tbh, 30px); }
@media (min-width: 821px) {
  html.has-test-banner.sidebar-collapsed .sidebar-toggle { top: calc(var(--tbh, 30px) + 1px); }
}
.login-body > .test-banner { grid-column: 1 / -1; align-self: start; }
.login-body { grid-template-rows: auto 1fr; }
