:root {
  color-scheme: light;
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ink: #161419;
  --muted: #5e5767;
  --navy: #19151e;
  --navy-deep: #131116;
  --mint: #c9b2ff;
  --accent: #5926c8;
  --violet-deep: #421aa0;
  --lilac: #f1ebff;
  --canvas: #f6f5f7;
  --line: #e5e1e8;
  --white: #fff;
  --radius: 16px;
  --shadow: 0 2px 8px #1e102006, 0 12px 28px #1e102006;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .65; }
a { color: var(--accent); text-underline-offset: .19em; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #20a77b;
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; }
h1 { font-size: clamp(1.95rem, 3.25vw, 3.05rem); font-weight: 760; }
h2 { font-size: clamp(1.22rem, 2vw, 1.6rem); font-weight: 730; }
h3 { font-size: 1.06rem; font-weight: 700; }
p + p { margin-top: .55rem; }
small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.15rem 0; }

.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 29px 18px 20px;
  overflow: auto;
  background: linear-gradient(166deg, #13243a 0%, var(--navy-deep) 58%, #102b2b 100%);
  border-right: 1px solid #2b3c51;
  color: #f6fbff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 1px 8px;
  color: inherit;
  font-size: 1.13rem;
  font-weight: 770;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #c9f7dd, #98deba);
  color: var(--navy-deep);
  font-weight: 850;
  letter-spacing: -.06em;
  box-shadow: 0 0 0 1px #c5f6d4a6, inset 0 1px 6px #edfef3a8;
}

.brand-name { line-height: 1.12; }
.sidebar .brand .muted { margin-top: 2px; color: #a9bed2; font-size: .78rem; font-weight: 570; letter-spacing: .06em; }
.brand small { display: block; margin-top: .25rem; color: #a9bed2; font-weight: 500; letter-spacing: 0; }
.sidebar-footer { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #2b3c51; color: #b7c7d7; font-size: .875rem; }
.sidebar-footer .button { width: 100%; margin-top: 8px; }
.nav { display: grid; gap: 5px; }
.nav-label { margin: 0 9px 5px; color: #a9bed2; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav a, .nav button, .nav-item {
  display: flex;
  align-items: center;
  gap: .62rem;
  min-height: 44px;
  width: 100%;
  padding: .64rem .74rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #d3e1ed;
  text-align: left;
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
}

.nav :is(a, button, .nav-item):hover { background: #ffffff12; color: #fff; }
.nav :is(.active, [aria-current]:not([aria-current="false"])) {
  background: #234235;
  border-color: #436654;
  color: #c8f9df;
  box-shadow: inset 3px 0 0 #a0e8c7;
}
.nav svg, .topbar svg, .button svg { flex: 0 0 auto; width: 1.15em; height: 1.15em; }

.main {
  min-width: 0;
  width: min(100%, 1520px);
  margin-inline: auto;
  padding: 25px clamp(18px, 3vw, 47px) 46px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  min-height: 47px;
  margin-bottom: 21px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.topbar .eyebrow { margin: 0; }
.topbar .button { min-height: 40px; }
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 20px 30px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 21px;
  padding: clamp(24px, 3.4vw, 44px);
  border: 1px solid #223b50;
  border-radius: 21px;
  background: linear-gradient(121deg, #142a43 0%, #182e46 57%, #214c4e 100%);
  color: #f7fffd;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  top: -170px;
  right: -66px;
  border: 1px solid #a6edcc36;
  border-radius: 50%;
  box-shadow: 0 0 0 33px #a6edcc0b, 0 0 0 66px #a6edcc08, 0 0 0 99px #a6edcc06;
  pointer-events: none;
}

.hero-copy { max-width: 690px; }
.hero p { max-width: 56ch; color: #d4e1eb; margin-top: .62rem; }
.hero .eyebrow { color: #b8f0d9; }
.hero .muted { color: #d4e1eb; }
.hero :is(a, .button):focus-visible, .sidebar :is(a, button):focus-visible { outline-color: var(--mint); }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.eyebrow {
  margin: 0 0 .45rem;
  color: var(--accent);
  font-size: .78rem;
  line-height: 1.4;
  font-weight: 760;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.grid, .stats, .split { display: grid; gap: 16px; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 21px; }
.grid > *, .stats > *, .split > * { min-width: 0; }
.card, .stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.card { padding: clamp(16px, 2.35vw, 26px); }
.card + .card, .card + .grid, .grid + .card, .split + .card { margin-top: 16px; }
:is(.grid, .stack, .split) > .card { margin-top: 0; }
.card-header { display: flex; align-items: start; justify-content: space-between; gap: 12px 18px; margin-bottom: 15px; }
.card-body { min-width: 0; }
.card h2 + p, .card h3 + p { margin-top: .55rem; }
.card h2 + .table-wrap, .card h2 + .list, .card h2 + .field { margin-top: .75rem; }
.stat { padding: 15px 18px; }
.stat-label { color: var(--muted); font-size: .875rem; font-weight: 650; }
.stat-value, .stat > strong { display: block; margin-top: .27rem; color: var(--ink); font-size: clamp(1.45rem, 2.75vw, 2.25rem); line-height: 1.15; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-caption { margin-top: .25rem; color: var(--muted); font-size: .85rem; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: .58rem .85rem; }
.stack { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.row > *, .stack > * { min-width: 0; }
.stack > :is(p, .card) + :is(p, .card) { margin-top: 0; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: .24rem .56rem;
  border-radius: 999px;
  background: #ebf0f4;
  color: #344d61;
  font-size: .81rem;
  line-height: 1.35;
  font-weight: 690;
}
.badge.success, .badge.ok, .badge.approved { color: #185840; background: #dcf5e9; }
.badge.warning, .badge.pending { color: #75470c; background: #fff0d5; }
.badge.critical, .badge.error, .badge.danger { color: #922f37; background: #ffe9e9; }
.hero .badge { color: #d5f9ec; background: #ffffff16; }

.button, button:not(.nav-item):not(.unstyled), input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: .58rem .91rem;
  border: 1px solid #c9d8dd;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: .93rem;
  font-weight: 690;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
  transition: background .15s, border-color .15s;
}
.button:hover, button:not(.nav-item):not(.unstyled):hover { background: #f0f5f6; border-color: #a8bdc5; }
:is(.button, button, input[type="submit"]).primary { border-color: #1b6951; background: #1b6951; color: #fff; }
:is(.button, button, input[type="submit"]).primary:hover { background: #11503c; border-color: #11503c; }
:is(.button, button).danger:not(.badge) { color: #a22731; border-color: #eac3c5; background: #fff5f5; }
:is(.button, button).danger:not(.badge):hover { background: #ffe5e5; border-color: #dbb0b2; }
:is(.hero, .sidebar) :is(.button, button).primary { border-color: var(--mint); background: var(--mint); color: #0d382a; }
:is(.hero, .sidebar) :is(.button, button).primary:hover { border-color: #cbf8e4; background: #cbf8e4; }
:is(.hero, .sidebar) :is(.button, button).secondary { border-color: #718b99; background: transparent; color: #f6fcff; }
:is(.hero, .sidebar) :is(.button, button).secondary:hover { background: #ffffff1a; }
.sidebar .nav button:not(.nav-item):not(.unstyled) { justify-content: flex-start; padding: .64rem .74rem; border-color: transparent; background: transparent; color: #d3e1ed; text-align: left; }
.sidebar .nav button:not(.nav-item):not(.unstyled):hover { background: #ffffff12; color: #fff; }
.sidebar .nav button:not(.nav-item):not(.unstyled):is(.active, [aria-current]:not([aria-current="false"])) { border-color: #436654; background: #234235; color: #c8f9df; }

.field { display: grid; align-content: start; gap: .35rem; min-width: 0; }
label, legend { color: var(--ink); font-size: .94rem; font-weight: 670; }
fieldset { min-width: 0; margin: 0; padding: .75rem 1rem 1rem; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 .35rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea {
  min-height: 44px;
  max-width: 100%;
  width: 100%;
  padding: .55rem .68rem;
  border: 1px solid #c5d4da;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  line-height: 1.35;
}
input::placeholder, textarea::placeholder { color: #677c8d; opacity: 1; }
select { appearance: none; padding-right: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23526777' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-position: right .65rem center; background-repeat: no-repeat; background-size: 1rem; }
input[type="checkbox"], input[type="radio"] { width: 1rem; height: 1rem; accent-color: var(--accent); }
textarea { min-height: 100px; resize: vertical; }
details { border: 1px solid var(--line); border-radius: 11px; padding: .72rem .85rem; }
details > summary { cursor: pointer; font-weight: 680; }
details[open] > summary { margin-bottom: .62rem; }

.check { padding: .75rem .88rem; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfc; }
.check + .check { margin-top: 9px; }
.check .row { justify-content: space-between; }
.check p { margin-top: .3rem; }
.check label:not(.field) { display: inline-flex; align-items: center; gap: .45rem; }

.audit-dock {
  position: sticky;
  z-index: 6;
  top: 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-block: 0 16px;
  padding: 10px 14px;
  border: 1px solid #b9d6cd;
  border-radius: 13px;
  background: #f9fdfc;
  box-shadow: 0 6px 18px #17334413;
}
.audit-dock > * { min-width: 0; }
.audit-dock > p { margin: 0; }
.audit-dock .progress, .audit-dock progress { display: block; height: 6px; }
.audit-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  min-width: 0;
  margin-bottom: 16px;
  scroll-margin-block-start: 120px;
}
.audit-steps :is(button, a).audit-step {
  display: flex;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid #d1dfdf;
  border-radius: 9px;
  background: #fff;
  color: #324b58;
  line-height: 1.2;
  text-align: start;
  overflow-wrap: anywhere;
}
.audit-steps :is(button, a).audit-step:hover {
  border-color: #93b3a7;
  background: #f1f8f5;
  color: #18533d;
}
.audit-steps .step-index {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border: 1px solid #d4e4df;
  border-radius: 7px;
  background: #edf6f1;
  color: #2f604d;
  font-size: .75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.audit-steps .audit-step > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.audit-steps .audit-step :is(small, [data-step-count]) {
  color: #526b65;
  font-size: .78rem;
}
.audit-steps .audit-step [data-step-count] { font-weight: 700; }
.audit-steps .audit-step:is(.active, [aria-current]:not([aria-current="false"])) {
  border-color: #25523f;
  background: #173d31;
  color: #f1fff7;
  box-shadow: 0 2px 4px #173d3125;
}
.audit-steps .audit-step:is(.active, [aria-current]:not([aria-current="false"])) .step-index {
  border-color: #a6edcc;
  background: #a6edcc;
  color: #183b30;
}
.audit-steps .audit-step:is(.active, [aria-current]:not([aria-current="false"])) :is(small, [data-step-count]) { color: #d2eee1; }
.audit-steps .audit-step:focus-visible { outline: 3px solid #168464; outline-offset: 2px; }
.audit-panel { min-width: 0; }
.audit-panel[hidden] { display: none !important; }
.audit-next:not(button, a) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 14px;
}
.audit-next :is(button, .button), :is(button, a).audit-next { min-height: 44px; }
.audit-next > .primary:only-child { margin-inline-start: auto; }
.audit-review {
  min-width: 0;
  border-color: #ccdfd6;
  background: #f7fbf8;
  overflow-wrap: anywhere;
}
.audit-review > :is(h2, h3) { color: #214b3d; }
.audit-review > :is([data-issues], .row) { margin-top: 15px; }
.audit-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
  color: var(--muted);
  font-size: .88rem;
  overflow-wrap: anywhere;
}
.audit-meta strong { color: var(--ink); }
.audit-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding: 3px 3px 4px;
}
.audit-shortcuts > :is(a, button, .button) {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 7px 11px;
  border-color: #cbdcd8;
  background: #fff;
  color: #275448;
  white-space: nowrap;
}
.audit-shortcuts > :is(a, button, .button):hover {
  border-color: #91b9aa;
  background: #ebf7f1;
  color: #164c36;
}
.audit-shortcuts > a {
  display: inline-flex;
  align-items: center;
  border-width: 1px;
  border-style: solid;
  border-radius: 9px;
  font-size: .93rem;
  font-weight: 690;
  text-decoration: none;
}
.section-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}
.section-progress :is(.progress, progress) { flex: 1 1 95px; max-width: 220px; }
.status-line, .queue-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.status-line strong, .queue-meta strong { color: var(--ink); }
.report-callout {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 15px;
  border: 1px solid #c9e2d7;
  border-left: 4px solid #388367;
  border-radius: 11px;
  background: #eff9f4;
  color: #245343;
  overflow-wrap: anywhere;
}
.report-callout :is(h2, h3) { color: #22493a; }
.report-callout p { margin: 0; }
form[data-form="audit"] [id], .main :is([id^="audit-"], [id^="sample-"], [id^="check-"], [id^="manager-"], #team-checks) {
  scroll-margin-block-start: 180px;
}
.main [tabindex="-1"]:focus-visible {
  outline: 2px solid #31856a;
  outline-offset: 3px;
}

.table-wrap { max-width: 100%; overflow-x: auto; }
.staff-contact { min-width: 135px; max-width: 220px; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { font-weight: 700; background: #f2f7f7; color: #354d60; }
td, th { padding: .65rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .91rem; }
thead th { white-space: nowrap; }
td:first-child, th:first-child { padding-left: .72rem; }
tbody tr:hover { background: #f7fafb; }
tbody tr:last-child td { border-bottom: 0; }

.notice {
  padding: .83rem 1rem;
  border: 1px solid #c7e3dc;
  border-left: 4px solid #388367;
  border-radius: 9px;
  background: #eff9f4;
  color: #245343;
}
.notice.warning { border-color: #ecd6ab; border-left-color: #a36515; background: #fff7e8; color: #664519; }
.notice.critical, .notice.error { border-color: #efc7ca; border-left-color: #b54750; background: #fff3f4; color: #78262e; }
.notice :is(ol, ul) { padding-left: 1.2rem; margin: .35rem 0 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list > * { padding: .72rem 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.empty { color: var(--muted); background: #f7fafb; padding: 1.15rem; border: 1px dashed #c5d6da; border-radius: 11px; text-align: center; }
.progress, progress { height: 8px; width: 100%; border: 0; border-radius: 99px; overflow: hidden; background: #e3edef; }
.progress > *, progress::-webkit-progress-value { height: 100%; background: #31856a; border-radius: 99px; }
progress::-webkit-progress-bar { background: #e3edef; }
progress::-moz-progress-bar { background: #31856a; border-radius: 99px; }

.login {
  display: grid;
  align-content: center;
  gap: 15px;
  width: min(calc(100% - 32px), 470px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}
.login .brand { color: var(--navy); padding: 0 0 4px; }
.login .brand small { color: var(--muted); }
.login h1 { font-size: clamp(1.75rem, 4vw, 2.3rem); }
.login form { margin-top: 1.15rem; }
.login form > .button, .login form > button { width: 100%; }

.overview-hero {
  align-items: center;
  gap: 24px 34px;
  min-height: 213px;
  padding: clamp(24px, 3.55vw, 48px);
  border-color: #2e4656;
  background: radial-gradient(ellipse at 84% 11%, #45645a87 0%, transparent 59%), linear-gradient(118deg, #112338 0%, #193446 54%, #1f4b43 100%);
}
.overview-hero::before {
  content: "";
  position: absolute;
  isolation: isolate;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(#b3f1d2, #c7ad71);
  pointer-events: none;
}
.overview-hero .eyebrow { color: #c0efda; }
.overview-hero::after {
  top: -164px;
  right: -54px;
  border-color: #d2e6be4d;
  box-shadow: 0 0 0 42px #cbefc00c, 0 0 0 84px #cbefc00a, 0 0 0 126px #f5d9a007;
}
.overview-identity { flex: 1 1 330px; min-width: 0; }
.overview-identity :is(h1, h2) { max-width: 20ch; }
.overview-identity p { max-width: 54ch; }
.overview-period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #c1dfcc59;
  border-radius: 12px;
  background: #10233366;
  color: #ecf7ef;
  font-weight: 650;
}
.overview-period p { margin: 0; }
.overview-period label { color: inherit; }
.overview-period :is(input, select, button) { min-width: 0; max-width: 100%; }

.coverage-card {
  background: linear-gradient(130deg, #fff 48%, #f0f8f3);
  border-color: #d2e3dc;
}
.coverage-card > * + * { margin-top: 12px; }
.coverage-card h2 + p { color: var(--muted); }
.coverage-segments {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: clamp(3px, .48vw, 8px);
  padding: 4px 0;
}
.coverage-segment {
  display: block;
  min-width: 0;
  height: clamp(10px, 1.25vw, 17px);
  border: 1px solid #d6e2e3;
  border-radius: 4px;
  background: #e5ecee;
}
.coverage-segment.is-complete { border-color: #377d64; background: #4a977b; }
.coverage-segment.is-draft { border-color: #9f793b; background: #d7ad63; }
.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 15px;
  color: #486273;
  font-size: .87rem;
}
.coverage-legend :is(span, li) { display: inline-flex; align-items: center; gap: 6px; }
.coverage-legend .coverage-segment { flex: 0 0 11px; width: 11px; height: 11px; border-radius: 3px; }
.coverage-legend > span:not(:has(.coverage-segment))::before {
  content: "";
  flex: 0 0 10px;
  height: 10px;
  border: 1px solid #cad8db;
  border-radius: 3px;
  background: #e5ecee;
}
.coverage-legend > span:nth-child(1):not(:has(.coverage-segment))::before { border-color: #377d64; background: #4a977b; }
.coverage-legend > span:nth-child(2):not(:has(.coverage-segment))::before { border-color: #9f793b; background: #d7ad63; }
.coverage-legend :is(.is-complete, .is-draft):not(.coverage-segment)::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #4a977b;
}
.coverage-legend .is-draft:not(.coverage-segment)::before { background: #b68536; }

.work-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 16px;
}
.work-grid > .card { margin-top: 0; }
.work-grid > .card > h2 { color: #203f47; }
.work-grid .card > :is(.work-item, .empty) { margin-top: 10px; }
.work-grid .card > h2 + :is(.work-item, .empty) { margin-top: 15px; }
.work-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 7px 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dae6e4;
  border-radius: 12px;
  background: #f8fbfa;
  overflow-wrap: anywhere;
}
.work-item :is(h2, h3) { color: #203e46; }
.work-item p { margin: 0; }
.work-item .button { grid-column: 2; justify-self: start; margin-top: 4px; max-width: 100%; }
.work-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 36px;
  padding: .28rem .49rem;
  border-radius: 8px;
  background: #e3f2e9;
  color: #245f49;
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
  font-weight: 740;
}
.work-item:nth-child(2n) .work-index { background: #f6ecda; color: #755320; }

.branch-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.branch-list > * {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.branch-list > *:last-child { border-bottom: 0; }
.branch-list > *:hover { background: #f7faf9; }
.branch-heading { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.branch-heading > * { min-width: 0; }
.branch-heading p { margin-top: 2px; }
.branch-avatar {
  flex: 0 0 36px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d9e8e3;
  border-radius: 10px;
  background: #eff7f2;
  color: #275c4b;
  font-size: .78rem;
  font-weight: 780;
  letter-spacing: .04em;
}
.branch-portal-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
  background: linear-gradient(115deg, #fcf8ee, #f8fbf6);
  border-color: #e6dbbf;
  color: #354541;
  overflow-wrap: anywhere;
}
.branch-portal-brief :is(p, h2, h3) { max-width: 65ch; }
.branch-portal-brief .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.branch-portal-brief .stat { box-shadow: none; }
.branch-portal-brief .report-callout { max-width: none; }
.branch-portal-brief .eyebrow { color: #725524; }
.report-callout .eyebrow { color: #245646; }
.report-callout.warning { background: #fdf8eb; border-color: #eadab8; border-left-color: #9b732f; color: #5c4727; }
.report-callout.warning :is(h2, h3, .eyebrow) { color: #63461d; }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 207px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .main { padding-inline: 23px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; gap: 11px; padding: 12px 15px; border: 0; }
  .sidebar .brand { padding-inline: 0; }
  .brand-mark { flex-basis: 34px; height: 34px; border-radius: 9px; }
  .sidebar .nav { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
  .nav-label { display: none; }
  .nav a, .nav button, .nav-item { width: auto; padding: .48rem .56rem; }
  .sidebar-footer { padding: 0; margin: 0; border: 0; }
  .sidebar-footer .button { width: auto; margin-top: 0; }
  .main { padding: 16px 14px 34px; }
  .hero { margin-bottom: 15px; border-radius: 16px; }
  .topbar { margin-bottom: 15px; padding-bottom: 8px; }
  .stats { margin-bottom: 15px; }
  .grid { grid-template-columns: 1fr; }
  .stat { padding: 12px 13px; }
  .card-header { flex-wrap: wrap; }
  .audit-dock { top: 0; gap: 5px; padding: 8px 10px; }
  .audit-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-dock .audit-steps {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 3px;
  }
  .audit-dock .audit-steps .audit-step { flex: 0 0 auto; white-space: nowrap; }
  .audit-next .button { max-width: 100%; }
  .audit-shortcuts { margin-inline: -3px; }
  .audit-dock .section-progress, .audit-dock .status-line { column-gap: 8px; }
  .overview-hero { min-height: auto; gap: 17px; }
  .overview-period { padding: 7px 10px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .branch-portal-brief .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .branch-portal-brief .button { width: fit-content; }
  form[data-form="audit"] [id], .main :is([id^="audit-"], [id^="sample-"], [id^="check-"], [id^="manager-"], #team-checks) {
    scroll-margin-block-start: 205px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.coverage-card > .split {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.coverage-card > .split > .badge { align-self: start; justify-self: end; }
.coverage-card + .work-grid { margin-top: 16px; }
.work-grid + .card { margin-top: 16px; }

/* BEX brand palette and architectural treatment. */
:is(button, a, input, select, textarea, summary):focus-visible { outline-color: var(--accent); }
h1 { color: #141118; font-weight: 820; letter-spacing: -.052em; }
h2, h3 { letter-spacing: -.032em; }

.sidebar {
  background: linear-gradient(166deg, #18151d 0%, #131116 72%, #231936 100%);
  border-color: #2e2735;
  color: #faf9fb;
}
.sidebar-footer { border-color: #3b3044; color: #cec5d6; }
.sidebar .brand .muted, .sidebar .brand small, .sidebar .nav-label { color: #c2b9cb; }
.brand-mark {
  border: 0;
  background: #fff;
  color: #0a090b;
  box-shadow: inset 0 0 0 1px #e3dce9;
  font-family: "Arial Black", "Aptos", "Segoe UI", sans-serif;
  font-size: .89rem;
  font-weight: 900;
  letter-spacing: -.1em;
}
.bex-wordmark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: .11em;
  min-width: 56px;
  padding: .42em .58em .48em;
  border: 1px solid #e6e0e9;
  border-radius: 7px;
  background: #fff;
  color: #07070a;
  font-family: "Arial Black", "Aptos", "Segoe UI", sans-serif;
  font-size: 1.06rem;
  line-height: 1;
}
.bex-wordmark > strong { font-size: 1.27em; line-height: .87; font-weight: 950; letter-spacing: -.115em; }
.bex-wordmark > span { padding-left: .17em; font-size: .42em; font-weight: 850; letter-spacing: .17em; }
.sidebar .portal-brand { gap: 9px; }
.sidebar .portal-brand > .brand-name { color: #f8f5fb; font-size: .93rem; line-height: 1.22; letter-spacing: -.018em; }
.sidebar .nav :is(a, button, .nav-item) { color: #e0dbe5; }
.sidebar .nav :is(a, button, .nav-item):hover { color: #fff; background: #ffffff11; }
.sidebar .nav :is(a, button, .nav-item):is(.active, [aria-current]:not([aria-current="false"])) {
  border-color: #544368;
  background: #302140;
  color: #f5edff;
  box-shadow: inset 3px 0 #b493ff;
}
.sidebar :is(a, button):focus-visible { outline-color: #c8b3ff; }
.topbar { color: var(--ink); }

.hero, .overview-hero {
  border-color: #ddd6e4;
  background: linear-gradient(108deg, #fff 2%, #f8f6fa 51%, #efebf4 100%);
  color: var(--ink);
}
.hero::after, .overview-hero::after {
  inset: 0 0 0 auto;
  width: min(67%, 665px);
  height: 100%;
  border: 0;
  border-radius: 0;
  background: repeating-linear-gradient(90deg, #d7cfde 0 1px, #fbf9fd 1px 3px, #efebf3 3px 18px, #e0d9e8 18px 21px, #f0edf3 21px 24px);
  box-shadow: none;
  opacity: .54;
  mask-image: linear-gradient(90deg, transparent 0%, #000 46%);
}
.overview-hero::before {
  width: 4px;
  background: linear-gradient(#7141e4, #ab8aee);
}
.hero :is(p, .muted) { color: #514959; }
.hero .eyebrow, .overview-hero .eyebrow { color: var(--violet-deep); }
.hero :is(a, button, .button):focus-visible { outline-color: var(--accent); }
.overview-period {
  border-color: #d8cced;
  background: #fcfaffeb;
  color: #322547;
}
.hero .badge { background: #e8e0fa; color: #4b2889; }
.hero .badge.success { background: #dcf5e9; color: #185840; }
.hero .badge.pending, .hero .badge.warning { background: #fff0d5; color: #75470c; }
.hero .badge.critical, .hero .badge.danger { background: #ffe9e9; color: #922f37; }
:is(.button, button, input[type="submit"]).primary,
:is(.hero, .sidebar) :is(.button, button).primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
:is(.button, button, input[type="submit"]).primary:hover,
:is(.hero, .sidebar) :is(.button, button).primary:hover {
  border-color: var(--violet-deep);
  background: var(--violet-deep);
  color: #fff;
}
:is(.button, button).secondary:not(.nav-item),
.hero :is(.button, button).secondary {
  border-color: #d8d0e2;
  background: #fff;
  color: #322448;
}
:is(.button, button).secondary:not(.nav-item):hover,
.hero :is(.button, button).secondary:hover {
  border-color: #b7a2d8;
  background: #f4eeff;
}
.sidebar :is(.button, button).secondary {
  border-color: #51445e;
  background: #21192b;
  color: #f5edff;
}
.sidebar :is(.button, button).secondary:hover { background: #302140; }

.login > .card {
  position: relative;
  overflow: hidden;
  padding: clamp(23px, 4vw, 43px);
  border-color: #ddd5e7;
  background: linear-gradient(150deg, #faf7ff 0%, #fff 42%);
}
.login > .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #ac90e9 68%, #e6d9f7);
}
.login .brand-mark {
  width: 66px;
  height: 45px;
  margin-bottom: 16px;
  font-size: 1.26rem;
  border-radius: 9px;
}
.login-brand { display: flex; margin-bottom: 17px; }
.login-brand .bex-wordmark { min-width: 73px; font-size: 1.43rem; }

.card, .stat { border-color: var(--line); }
.check, .work-item { border-color: #e8e2ed; background: #fcfafc; }
.work-item :is(h2, h3), .work-grid > .card > h2 { color: var(--ink); }
.work-index { background: var(--lilac); color: #4f278f; }
.work-item:nth-child(2n) .work-index { background: #f6ecda; color: #755320; }
.branch-avatar { border-color: #e3dced; background: #f2edf8; color: #4f278f; }
.branch-list > *:hover, tbody tr:hover { background: #f8f5fb; }
th { background: #f5f1f8; color: #45384e; }
.branch-portal-brief {
  border-color: #e6daee;
  background: linear-gradient(115deg, #f8f2fe, #fffcfb);
  color: #3a3140;
}
.branch-portal-brief .eyebrow { color: var(--violet-deep); }
.coverage-card {
  border-color: #e3dce9;
  background: linear-gradient(120deg, #fff 49%, #f7f0fe);
}
.coverage-segment { border-color: #d8d1de; background: #e9e4ed; }
.coverage-segment.is-complete { border-color: #6231c3; background: #7748d4; }
.coverage-segment.is-draft { border-color: #a4722d; background: #d8a15a; }
.coverage-legend { color: var(--muted); }
.coverage-legend > span:not(:has(.coverage-segment))::before { border-color: #d8d1de; background: #e9e4ed; }
.coverage-legend > span:nth-child(1):not(:has(.coverage-segment))::before,
.coverage-legend .is-complete:not(.coverage-segment)::before { border-color: #6231c3; background: #7748d4; }
.coverage-legend > span:nth-child(2):not(:has(.coverage-segment))::before,
.coverage-legend .is-draft:not(.coverage-segment)::before { border-color: #a4722d; background: #d8a15a; }

.audit-dock { border-color: #d9cce9; background: #fcfaff; box-shadow: 0 6px 18px #24173c13; }
.audit-shortcuts > :is(a, button, .button) { border-color: #d9cde8; }
.audit-shortcuts > :is(a, button, .button).primary { border-color: var(--accent); }
.audit-shortcuts > :is(a, button, .button):not(.primary) { background: #fff; color: #47305d; }
.audit-shortcuts > :is(a, button, .button):not(.primary):hover { background: #f4eeff; color: var(--violet-deep); }
.audit-steps :is(button, a).audit-step {
  border-color: #ddd5e6;
  background: #fff;
  color: #3e3545;
}
.audit-steps :is(button, a).audit-step:hover { border-color: #bcabd8; background: #fbf8ff; color: var(--violet-deep); }
.audit-steps .step-index { border-color: #e3d7f8; background: var(--lilac); color: #542bb1; }
.audit-steps .audit-step :is(small, [data-step-count]) { color: #645b70; }
.audit-steps .audit-step:is(.active, [aria-current]:not([aria-current="false"])) {
  border-color: var(--violet-deep);
  background: var(--violet-deep);
  color: #fff;
  box-shadow: 0 2px 4px #421aa026;
}
.audit-steps .audit-step:is(.active, [aria-current]:not([aria-current="false"])) .step-index {
  border-color: #ddcaff;
  background: #e7d8ff;
  color: #3d1a83;
}
.audit-steps .audit-step:is(.active, [aria-current]:not([aria-current="false"])) :is(small, [data-step-count]) { color: #f0e7ff; }
.audit-steps .audit-step:focus-visible, .main [tabindex="-1"]:focus-visible { outline-color: var(--accent); }
.audit-review { border-color: #e4dceb; background: #fcf9ff; }
.audit-review > :is(h2, h3) { color: #382353; }
:is(.report-callout, .notice):not(.critical, .danger, .error, .warning) {
  border-color: #dfd3f0;
  border-left-color: #7042cc;
  background: #f6f0ff;
  color: #433061;
}
.report-callout:not(.warning) :is(h2, h3, .eyebrow) { color: #503281; }
.notice.danger { border-color: #efc7ca; border-left-color: #b54750; background: #fff3f4; color: #78262e; }
.progress, progress { background: #eae3f1; }
.progress > * { background: #7042cc; }
progress::-webkit-progress-bar { background: #eae3f1; }
progress::-webkit-progress-value { background: #7042cc; }
progress::-moz-progress-bar { background: #7042cc; }

@media (max-width: 700px) {
  .hero::after, .overview-hero::after { width: 83%; opacity: .32; }
}

.hero.overview-hero.coffee-hero {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-height: clamp(250px, 25vw, 352px);
  border-color: #3a2d47;
  background: #130e1e;
  color: #fff;
}
.hero.overview-hero.coffee-hero::before,
.coffee-login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  z-index: -3;
  border: 0;
  border-radius: 0;
  background: #130e1e url("/coffee-hero.png") no-repeat 63% 76% / cover;
  box-shadow: none;
  transform-origin: 74% 56%;
  animation: coffee-drift 12s ease-out 1 both;
  pointer-events: none;
}
.hero.overview-hero.coffee-hero::after {
  inset: 0;
  width: auto;
  height: auto;
  z-index: -2;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, #110c1af5 0%, #110c1ac7 34%, #110c1a51 68%, #110c1a1a 100%),
    linear-gradient(0deg, #100b1b5c, transparent 62%);
  box-shadow: none;
  mask-image: none;
  opacity: 1;
}
.coffee-hero .overview-identity,
.coffee-hero .overview-period {
  position: relative;
  z-index: 1;
  animation: coffee-entry 620ms ease-out both;
}
.coffee-hero .overview-identity { flex: 0 1 auto; }
.coffee-hero .overview-identity h1 { color: #fff; text-wrap: balance; }
.coffee-hero .overview-identity p { color: #efe7f5; }
.coffee-hero .overview-identity .eyebrow { color: #dbc9ff; }
.coffee-hero .overview-period {
  border-color: #c9a6f46b;
  background: #1d132bea;
  color: #f7efff;
}
.coffee-hero :is(a, button, .button):focus-visible { outline-color: #dfc6ff; }
.coffee-shimmer {
  position: absolute;
  z-index: -1;
  inset: -12% -3%;
  background: linear-gradient(113deg, transparent 42%, #d8abf032 49%, #f3deff21 51%, transparent 59%);
  opacity: 0;
  pointer-events: none;
  animation: coffee-glint 1100ms 300ms ease-out 1 both;
}

.login.coffee-login {
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  width: min(calc(100% - 44px), 1040px);
  min-height: 100svh;
}
.coffee-login .card {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: clamp(28px, 4.5vw, 66px);
  border-radius: 0 16px 16px 0;
}
.coffee-login .card::before { display: none; }
.coffee-login-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  min-height: 510px;
  border: 1px solid #422c58;
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background: #130e1e;
  box-shadow: var(--shadow);
}
.coffee-login-art::before { background-position: 86% 58%; }

@keyframes coffee-drift {
  from { transform: scale(1.005) translate3d(0, 0, 0); }
  40%, to { transform: scale(1.05) translate3d(-.5%, -.3%, 0); }
}
@keyframes coffee-glint {
  from { transform: translateX(-65%); opacity: 0; }
  40% { opacity: .66; }
  to { transform: translateX(65%); opacity: 0; }
}
@keyframes coffee-entry {
  from { transform: translateY(7px); }
  to { transform: none; }
}

@media (max-width: 760px) {
  .login.coffee-login {
    grid-template-columns: minmax(0, 1fr);
    width: min(calc(100% - 28px), 500px);
    padding-block: 24px;
  }
  .coffee-login .card { border-radius: 0 0 16px 16px; }
  .coffee-login-art {
    min-height: clamp(150px, 42vw, 240px);
    border-right: 1px solid #422c58;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
  }
  .coffee-login-art::before { background-position: 73% 57%; }
  .hero.overview-hero.coffee-hero::before { background-position: 70% 54%; }
  .hero.overview-hero.coffee-hero::after {
    background: linear-gradient(90deg, #110c1aee 0%, #110c1ae0 27%, #110c1a99 69%, #110c1a5c 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.overview-hero.coffee-hero::before, .coffee-login-art::before,
  .coffee-hero .overview-identity, .coffee-hero .overview-period {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .coffee-shimmer { display: none; }
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-block: 16px;
}
.insight-grid > .card { min-width: 0; margin: 0; }
.insight-head {
  display: grid;
  gap: 5px;
  margin-bottom: 15px;
}
.insight-head > * { min-width: 0; }
.insight-head :is(h2, h3) { max-width: 27ch; }
.insight-head p:not(.insight-kicker) { color: var(--muted); font-size: .91rem; }
.insight-kicker {
  margin: 0 0 .35rem;
  color: var(--violet-deep);
  font-size: .75rem;
  font-weight: 760;
  letter-spacing: .095em;
  line-height: 1.3;
  text-transform: uppercase;
}
.score-chart, .issue-chart {
  display: grid;
  gap: 5px;
  min-width: 0;
  --metric-columns: minmax(0, 1fr) minmax(42px, 1.35fr) minmax(26px, auto);
}
.score-row, .issue-row, .score-axis,
.score-chart button.score-row, .issue-chart button.issue-row {
  display: grid;
  grid-template-columns: var(--metric-columns);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  text-align: start;
  font-variant-numeric: tabular-nums;
}
.score-row, .issue-row,
.score-chart button.score-row, .issue-chart button.issue-row {
  min-height: 44px;
  padding: .55rem .6rem;
  border: 1px solid #eee8f3;
  border-radius: 9px;
  background: #fcfafc;
  font-size: .91rem;
  font-weight: 650;
}
.score-chart button.score-row:hover, .issue-chart button.issue-row:hover {
  border-color: #d7c6ef;
  background: #f5efff;
}
.score-chart .score-row.below-target > strong { color: #885027; }
:is(.score-row, .issue-row) > :first-child { min-width: 0; overflow-wrap: anywhere; }
:is(.score-row, .issue-row) > :last-child { justify-self: end; white-space: nowrap; }
.score-axis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 8px;
  color: #686071;
  font-size: .78rem;
  font-weight: 600;
}
.score-axis > span {
  display: grid;
  gap: 1px;
  justify-self: stretch;
  padding: .45rem .55rem;
  border: 1px solid #eee7f3;
  border-radius: 8px;
  background: #f9f6fc;
}
.score-axis > span > strong { color: var(--violet-deep); font-size: 1rem; }
.issue-row, .issue-chart button.issue-row { grid-template-columns: minmax(0, 1.45fr) minmax(40px, 1fr); }
.issue-row > div { display: grid; gap: 2px; }
.issue-row > div > span { color: #6d5d54; font-size: .78rem; font-weight: 600; }
.score-track, .issue-track {
  display: block;
  width: 100%;
  min-width: 0;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #eae3f2;
}
.issue-track { background: #f0e6dd; }
.score-fill, .issue-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.score-fill { background: linear-gradient(90deg, #5d2ac8, #9969f0); }
.issue-fill { background: linear-gradient(90deg, #8a4c2e, #c28555); }
meter.score-track, meter.issue-track { appearance: none; accent-color: var(--accent); }
meter.score-track::-webkit-meter-bar { height: 9px; border: 0; border-radius: 99px; background: #eae3f2; }
meter.issue-track::-webkit-meter-bar { height: 9px; border: 0; border-radius: 99px; background: #f0e6dd; }
meter.score-track::-webkit-meter-optimum-value,
meter.score-track::-webkit-meter-suboptimum-value,
meter.score-track::-webkit-meter-even-less-good-value { background: linear-gradient(90deg, #5d2ac8, #9969f0); border-radius: 99px; }
meter.issue-track::-webkit-meter-optimum-value,
meter.issue-track::-webkit-meter-suboptimum-value,
meter.issue-track::-webkit-meter-even-less-good-value { background: linear-gradient(90deg, #8a4c2e, #c28555); border-radius: 99px; }
meter.score-track::-moz-meter-bar { background: linear-gradient(90deg, #5d2ac8, #9969f0); border-radius: 99px; }
meter.issue-track::-moz-meter-bar { background: linear-gradient(90deg, #8a4c2e, #c28555); border-radius: 99px; }

@media (max-width: 1040px) {
  .insight-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 440px) {
  .score-chart, .issue-chart { --metric-columns: minmax(0, 1fr) minmax(35px, .72fr) minmax(24px, auto); }
  .score-row, .issue-row, .score-axis, .score-chart button.score-row, .issue-chart button.issue-row { gap: 6px; }
}
.team-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-block: 16px; }
.team-result > div { display: grid; gap: 3px; padding: 12px; background: #f8f5fd; border: 1px solid #e6dcf3; border-radius: 10px; }
.team-result strong { color: #421aa0; font-size: 1.35rem; }
.priority-grid { grid-template-columns: minmax(0, 1fr); }
.finding-coach { margin-block: 12px; padding: 14px 16px; }
.finding-coach ol { margin-block: 9px; padding-inline-start: 22px; }
.finding-coach ol li + li { margin-top: 5px; }
.finding-coach > .split { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
@media (max-width: 500px) {
  .finding-coach > .split { grid-template-columns: minmax(0, 1fr); }
  .finding-coach > .split .badge { justify-self: start; }
}
.monthly-followup { margin-block-start: 16px; }
.monthly-followup .stats { grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); }
.shift-table { min-width: 760px; }
.shift-table :is(td,th) { vertical-align: top; padding: 8px 10px; }
.shift-table thead th { background: #272033; color: #fff; white-space: nowrap; }
.shift-table thead small { display: block; margin-top: 2px; font-size: .76rem; font-weight: 500; color: #e4d9fa; }
.shift-table tbody th { white-space: nowrap; }
.shift-table td[data-shift-kind] { width: 19%; min-width: 116px; }
.shift-table td[data-shift-kind="leave"] { background: #f6f4f8; }
.shift-items { display: grid; gap: 4px; }
.shift-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px; align-items: center; background: #f8f5fd; border: 1px solid #e6dcf3; border-radius: 8px; padding: 3px 7px; }
.shift-item strong { overflow-wrap: anywhere; }
.shift-item small { display: block; }
#app .shift-menu summary { list-style: none; cursor: pointer; min-width: 25px; text-align: center; font-size: 1rem; }
#app .shift-menu summary::-webkit-details-marker { display: none; }
.shift-menu[open] { grid-column: 1 / -1; }
.shift-actions { display: flex; flex-wrap: wrap; gap: 4px; }
#app .shift-actions .button,#app .shift-items > .button { min-height: 29px; padding: 3px 7px; font-size: .75rem; }
.shift-items > .button { justify-self: start; }
.shift-personnel .row { gap: 10px 16px; }
.shift-personnel label { display: inline-flex; align-items: baseline; gap: 6px; }
.shift-times .sales-replace { margin-top: 8px; }
.monthly-followup .work-item { grid-template-columns: minmax(0, 1fr) auto; }
.monthly-followup .work-item .button { grid-column: auto; margin: 0; }
@media (max-width: 480px) {
  .monthly-followup .work-item { grid-template-columns: minmax(0, 1fr); }
}
.branch-photo-hero { position: relative; isolation: isolate; overflow: hidden; }
.branch-photo-hero .overview-identity,.branch-photo-hero .overview-period { position: relative; z-index: 1; }
.branch-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -3; }
.hero.branch-photo-hero.has-branch-photo::before { display: none; }
.hero.branch-photo-hero.has-branch-photo::after {
  z-index: -2; inset: 0; width: auto; height: auto; border: 0; border-radius: 0; opacity: 1; mask-image: none;
  background: linear-gradient(90deg,#110c1af5,#110c1ac9 40%,#110c1a27 90%);
}
.branch-photo-hero.has-branch-photo .overview-identity :is(h1,p) { color: #fff; }
.branch-photo-hero .overview-identity .button { display: inline-flex; margin-top: 12px; }
.branch-photo-hero .branch-photo-empty { margin-top: 12px; font-size: .9rem; }
.branch-photo-preview { width: min(500px,100%); aspect-ratio: 16 / 8; object-fit: cover; border-radius: 12px; }
.photo-credit {
  position: absolute; bottom: 10px; right: 12px; z-index: 2;
  background: #170f25eb; color: #fff; padding: 5px 9px; border-radius: 6px;
  font-size: .78rem; text-decoration: underline;
}
.sales-replace { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.sales-replace input[type="checkbox"] { width: auto; min-height: auto; margin-top: .2rem; accent-color: #5926c8; }
.sales-insights { margin-block: 16px; }
.sales-insights .check { border-inline-start: 3px solid #b69ae8; }
.sales-insights .check p { margin-bottom: 0; }
.sales-filters .field { width: min(100%, 240px); }
.sales-chart { max-width: 100%; }
.sales-chart svg { width: 100%; display: block; max-height: 330px; }
.sales-chart svg text { fill: #625671; font-size: 12px; }
@media(max-width:530px){.sales-chart svg text{font-size:16px;}}
.sales-chart svg line { stroke: #e9e0f1; stroke-width: 1px; }
.sales-chart .amount { color: #6938b3; }
.sales-chart .previous { color: #71627d; }
.sales-chart svg path { stroke: currentColor; stroke-width: 2.5px; }
.sales-chart svg circle { fill: currentColor; }
.sales-chart .previous path { stroke-dasharray: 5 4; }
.sales-legend { gap: 14px; color: #625671; }
.sales-legend span::before { content: ""; display: inline-block; width: 18px; vertical-align: middle; margin-inline-end: 7px; border-top: 3px solid #6938b3; }
.sales-legend span + span::before { border-top: 3px dashed #71627d; }
.sales-action h3 { margin: 0 0 8px; }
.sales-action p { margin: 5px 0; }
.cashier-card > :is(.grid,.split,button,details) { margin-block: 10px; }
.cashier-transcript { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; }
.cashier-transcript li { border-radius: 12px; padding: 10px 14px; width: fit-content; max-width: min(88%, 620px); overflow-wrap: anywhere; }
.cashier-transcript li.customer { background: #f0e8fc; border: 1px solid #dbc9f5; }
.cashier-transcript li.cashier { background: #f5f5f7; border: 1px solid #dfdce4; align-self: flex-end; }
.cashier-transcript p { margin: .25em 0 0; white-space: pre-wrap; }
.conversation-stage {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-block: 16px 0;
  padding: 11px 14px;
  border: 1px solid #decef3;
  border-radius: 12px;
  background: #f6f0ff;
  color: #402365;
}
.conversation-stage span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.conversation-log {
  max-height: clamp(12rem, 42vh, 28rem);
  overflow: auto;
  padding: 14px;
  border: 1px solid #e4ddeb;
  border-radius: 12px;
  background: #fdfbff;
}
.cashier-card [data-cashier-note], .cashier-card [data-cashier-decision] { margin-block-end: 8px; }
.personnel-question { min-width: 0; border: 1px solid #e3d8f5; border-radius: 12px; padding: 12px; }
.personnel-question legend { padding-inline: 6px; font-weight: 700; }
.personnel-question label { display: flex; align-items: center; gap: 10px; padding: 9px 10px; min-height: 44px; border-radius: 8px; }
.personnel-question label:has(input:checked) { background: #f1ebff; }
.personnel-question input { width: auto; min-height: auto; accent-color: #5926c8; }
.recipe-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.recipe-pages a {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 12px;
  border: 1px solid #e4ddeb;
  border-radius: 10px;
  background: #fdfbff;
  color: #402365;
  font-weight: 700;
}
.recipe-pages span { margin-bottom: 4px; color: #625870; font-size: .85rem; font-weight: 500; }
.recipe-pages a:hover { background: #f1eafa; }
.recipe-nav-count:not([hidden]) {
  display: inline-block;
  margin-inline-start: .4rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eedcff;
  color: #43237a;
  font-size: .75rem;
  font-weight: 700;
}
.recipe-notices article { border-inline-start: 3px solid #8b5cce; }
.recipe-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.calibration-reading + .calibration-reading {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e4ddeb;
}
.recipe-versions { list-style: none; padding: 0; }
.recipe-versions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #e4ddeb;
}
