@font-face {
  font-family: 'Geist';
  src: url("fonts/Geist-latin.a147f99cd533.woff2") format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url("fonts/GeistMono-latin.a15f9d568fb0.woff2") format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gloock';
  src: url("fonts/Gloock-latin.0f08cdb558d2.woff2") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f4ee;
  --bg-2: #efede5;
  --surface: #fffef9;
  --surface-2: #faf8f2;
  --sunk: #ecebe3;
  --fg: #172a28;
  --fg-2: #34463f;
  --muted: #5b6b65;
  --faint: #6f7c76;
  --line: #e3e1d7;
  --line-2: #d3d2c6;
  --accent: #b84e2d;
  --accent-ink: #9c3f22;
  --accent-fg: #fffef9;
  --accent-soft: #f4e5dd;
  --accent-line: #e8c8b8;
  --good: #276b54;
  --good-soft: #e2eee7;
  --warn: #85590a;
  --warn-soft: #f6ecd6;
  --bad: #a3333a;
  --bad-soft: #f6e1e0;
  --info: #2e5a8a;
  --info-soft: #e3ebf4;
  --note: #8a5a08;
  --note-soft: rgba(154, 106, 18, 0.08);
  --note-line: rgba(154, 106, 18, 0.35);
  --scrim: rgba(23, 42, 40, 0.45);
  --font-serif: 'Gloock', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-control: 8px;
  --r-panel: 10px;
  --r-card: 12px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #172a28;
  --bg-2: #13231f;
  --surface: #1e3431;
  --surface-2: #223a37;
  --sunk: #284340;
  --fg: #eeece4;
  --fg-2: #d3dbd5;
  --muted: #a6b5ae;
  --faint: #8d9e98;
  --line: #2c4642;
  --line-2: #3a5752;
  --accent: #e27a50;
  --accent-ink: #f09068;
  --accent-fg: #14100d;
  --accent-soft: #45291e;
  --accent-line: #6a3c29;
  --good: #5cc39a;
  --good-soft: #1e3e33;
  --warn: #e0b25a;
  --warn-soft: #3d321a;
  --bad: #ef7f7f;
  --bad-soft: #452628;
  --info: #86b2e6;
  --info-soft: #1f3347;
  --note: #e0b25a;
  --note-soft: rgba(224, 178, 90, 0.1);
  --note-line: rgba(224, 178, 90, 0.35);
  --scrim: rgba(5, 12, 11, 0.6);
  color-scheme: dark;
}

*, ::before, ::after {
  box-sizing: border-box;
  border: 0 solid var(--line);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, pre, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

h1, h2, h3, h4 {
  font-size: inherit;
  font-weight: inherit;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b, strong {
  font-weight: 600;
}

pre, code {
  font-family: var(--font-mono);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: transparent;
  cursor: pointer;
}

table {
  border-collapse: collapse;
}

summary {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  border-radius: var(--r-control);
  background: var(--surface);
  padding: 8px 12px;
  color: var(--fg);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

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

.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 16px 12px;
  font-size: 14px;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  margin: 2px 6px 14px;
  color: var(--fg);
}

.wm {
  display: block;
  height: 22px;
  width: auto;
}

.wm-dot {
  fill: var(--accent);
}

.brand-product {
  font: 400 20px/1 var(--font-serif);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 12px 8px 4px;
  font: 500 11px var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--fg-2);
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--sunk);
  color: var(--fg);
}

.nav-item[aria-current='page'] {
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
}

.nav-count {
  font: 400 12px var(--font-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav-count-due {
  color: var(--accent);
  font-weight: 600;
}

.side-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 14px 8px 0;
}

.who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.who .pill[title] {
  border-radius: 8px;
  white-space: normal;
}

.who-email {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-2);
}

.side-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-tools form {
  display: contents;
}

.theme-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  font-size: 16px;
  color: var(--fg);
}

.theme-btn:hover {
  background: var(--surface);
}

.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.page-login {
  max-width: none;
  padding: 0;
}

.main-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 18px;
}

.page-title {
  font: 400 28px/1.15 var(--font-serif);
  color: var(--fg);
  overflow-wrap: anywhere;
}

.page-meta {
  font: 400 12.5px var(--font-mono);
  color: var(--faint);
}

.page-lead {
  flex-basis: 100%;
  max-width: 860px;
  font-size: 14px;
  color: var(--muted);
}

.card {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 0 16px 16px;
}

.card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 -16px 14px;
  border-bottom: 1px solid var(--line);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px 14px;
  border-bottom: 1px solid var(--line);
  padding: 7px 16px;
}

.card-head .card-title {
  margin: 0;
  border: 0;
  padding: 4px 0;
}

.card-meta {
  margin-left: auto;
  font: 400 12px var(--font-mono);
  white-space: nowrap;
  color: var(--faint);
}

.title-note {
  flex: 1 1 240px;
  font-size: 13px;
  font-weight: 400;
  text-align: right;
  color: var(--muted);
}

.card-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px -16px -16px;
  border-top: 1px solid var(--line);
  padding: 11px 16px;
  font: 400 12.5px var(--font-mono);
  color: var(--muted);
}

.step-n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--sunk);
  font: 600 12px var(--font-mono);
  color: var(--fg-2);
}

.muted {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.error-text {
  font-size: 14px;
  color: var(--bad);
}

.link {
  color: var(--accent-ink);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.strong {
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: var(--font-mono);
}

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.my-1 { margin-top: 4px; margin-bottom: 4px; }
.mr-2 { margin-right: 8px; }

.push-right {
  margin-left: auto;
}

.inline-form {
  display: inline;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.input {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  background: var(--surface);
  padding: 7px 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--fg);
}

.input::placeholder {
  color: var(--faint);
}

.input:hover:not(:disabled) {
  border-color: var(--muted);
}

.input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
}

.input:disabled {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--fg-2);
}

textarea.input {
  resize: vertical;
}

select.input {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 15px center, right 10px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select.input:disabled {
  background-image: none;
  padding-right: 10px;
}

input[type='file'].input {
  padding: 5px 6px;
  font-size: 13px;
}

input[type='file'].input::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--sunk);
  padding: 4px 10px;
  font: 600 13px var(--font-sans);
  color: var(--fg);
  cursor: pointer;
}

input[type='checkbox'], input[type='radio'] {
  accent-color: var(--accent);
}

.w-36 { width: 160px; flex: none; }
.w-48 { width: 210px; flex: none; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filters > input.input {
  flex: 1 1 240px;
  width: auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tutorial {
  max-width: 860px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.tutorial > li .card-title::before {
  counter-increment: step;
  content: counter(step) ". ";
  color: var(--accent);
}

.tutorial > li p {
  margin-bottom: 10px;
}

.btn, .btn-primary, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-control);
  background: transparent;
  padding: 6px 12px;
  font: 600 14px/20px var(--font-sans);
  color: var(--fg);
  text-align: center;
  white-space: nowrap;
}

.btn:hover {
  background: var(--sunk);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  border-color: var(--accent-ink);
  background: var(--accent-ink);
}

.btn-danger {
  border-color: color-mix(in srgb, var(--bad) 35%, transparent);
  background: var(--bad-soft);
  color: var(--bad);
}

.btn-danger:hover {
  border-color: var(--bad);
}

.btn:disabled, .btn-primary:disabled, .btn-danger:disabled {
  border-color: var(--line);
  background: var(--sunk);
  color: var(--faint);
  cursor: not-allowed;
}

.btn-link {
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
}

.btn-link:hover {
  text-decoration: underline;
}

.table-wrap {
  margin: 0 -16px;
  overflow-x: auto;
}

.table-wrap:last-child {
  margin-bottom: -16px;
}

.table {
  width: 100%;
  font-size: 14px;
}

.table th {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  font: 500 11px var(--font-mono);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
  color: var(--fg-2);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap .table th:first-child, .table-wrap .table td:first-child {
  padding-left: 16px;
}

.table-wrap .table th:last-child, .table-wrap .table td:last-child {
  padding-right: 16px;
}

.table form {
  margin: 0;
}

.table-middle td {
  vertical-align: middle;
}

.muted-cell {
  color: var(--muted);
}

.num {
  font: 400 13px var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

.row-title {
  display: block;
  font-weight: 600;
  color: var(--fg);
  overflow-wrap: anywhere;
}

a.row-title:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.row-sub {
  display: block;
  margin-top: 1px;
  font: 400 12.5px var(--font-mono);
  color: var(--muted);
}

.pill {
  display: inline-block;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 9px;
  font: 500 12px/18px var(--font-mono);
  white-space: nowrap;
  vertical-align: middle;
  color: var(--muted);
  background: transparent;
}

.pill-approved, .pill-complete, .pill-good, .pill-pass {
  border-color: transparent;
  background: var(--good-soft);
  color: var(--good);
}

.pill-in_review, .pill-info, .pill-waiting {
  border-color: transparent;
  background: var(--info-soft);
  color: var(--info);
}

.pill-changes_requested, .pill-partial, .pill-caution, .pill-warn, .pill-sent_back {
  border-color: transparent;
  background: var(--warn-soft);
  color: var(--warn);
}

.pill-fail, .pill-bad {
  border-color: transparent;
  background: var(--bad-soft);
  color: var(--bad);
}

.pill-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.pill-retired, .pill-superseded {
  color: var(--faint);
}

.chip {
  display: inline-block;
  margin: 0 4px 4px 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 9px;
  font: 400 12.5px/18px var(--font-mono);
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  display: inline-block;
  border-radius: 6px;
  background: var(--sunk);
  padding: 2px 7px;
  font: 400 12px/18px var(--font-mono);
  white-space: nowrap;
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi {
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface-2);
  padding: 11px 14px;
}

.kpi-label {
  font-size: 13px;
  color: var(--muted);
}

.kpi-n {
  margin-top: 2px;
  font: 400 30px/1.1 var(--font-serif);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.tile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface-2);
  padding: 12px 14px;
}

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--fg);
}

.nl {
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--surface);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--fg);
}

.nl + .nl {
  margin-top: 8px;
}

.micro, .nl-label {
  display: block;
  margin-bottom: 4px;
  font: 400 11px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.nl-built {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.nl-built .nl-label {
  color: var(--accent-ink);
}

.wf {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 8px 10px;
  font-size: 14px;
  color: var(--fg);
}

.check-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.finding {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.finding-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  color: var(--fg);
}

.fx {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.fx > div {
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--fg-2);
}

.fx small {
  display: block;
  margin-bottom: 2px;
  font: 400 11px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fx-off {
  background: var(--bad-soft);
}

.fx-off small {
  color: var(--bad);
}

.finding[data-outcome='caution'] .fx-off {
  background: var(--warn-soft);
}

.finding[data-outcome='caution'] .fx-off small {
  color: var(--warn);
}

.fx-fix {
  background: var(--good-soft);
}

.fx-fix small {
  color: var(--good);
}

.ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(var(--good) calc(var(--p, 0) * 1%), var(--line-2) 0);
}

.ring-bad {
  background: conic-gradient(var(--good) calc(var(--p, 0) * 1%), var(--bad) 0);
}

.ring b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  font: 600 11.5px var(--font-mono);
  color: var(--fg);
}

.score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.evid {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evid li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--fg-2);
}

.evid li > div {
  min-width: 0;
}

.tl {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-day {
  padding: 4px 0 10px;
  font: 400 11.5px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.tl-day:not(:first-child) {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  font-size: 14px;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 19px;
  bottom: 1px;
  border-left: 1.5px solid var(--line-2);
}

.tl-item:last-child::before, .tl-item:has(+ .tl-day)::before {
  display: none;
}

.tl-dot {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
}

.tl-dot-good {
  border-color: var(--good);
  background: var(--good-soft);
}

.tl-dot-bad {
  border-color: var(--bad);
  background: var(--bad-soft);
}

.tl-dot-info {
  border-color: var(--info);
  background: var(--info-soft);
}

.tl-what {
  color: var(--fg);
}

.tl-what b {
  font-weight: 600;
}

.tl-ref {
  font: 400 12.5px var(--font-mono);
  color: var(--accent-ink);
}

.tl-detail {
  margin-top: 1px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.tl-time {
  font: 400 12px var(--font-mono);
  white-space: nowrap;
  color: var(--faint);
}

.av {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sunk);
  font: 600 11px var(--font-sans);
  text-transform: uppercase;
  color: var(--fg-2);
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.dialog {
  width: calc(100% - 32px);
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 0 20px 18px;
  color: var(--fg);
}

.dialog .card-title {
  margin: 0 -20px 14px;
  padding: 13px 20px;
}

.dialog-sm {
  max-width: 400px;
}

.dialog::backdrop {
  background: var(--scrim);
}

.dialog-text {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--fg-2);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(448px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: var(--r-panel);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--bg);
}

.toast span {
  flex: 1;
}

.toast-info {
  background: var(--fg);
}

.toast-error {
  background: var(--bad);
}

.toast-close {
  border: 0;
  padding: 0;
  color: inherit;
  opacity: 0.8;
}

.toast-close:hover {
  opacity: 1;
}

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 72px 16px 32px;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
}

.login-top .brand {
  margin: 0;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 22px 24px 24px;
}

.login-title {
  margin-bottom: 8px;
  font: 400 26px/1.2 var(--font-serif);
}

.login-card .btn-primary {
  width: 100%;
  padding: 9px 14px;
}

.code-input {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.3em;
}

.sub-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
}

.upload-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-row, .upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-actions {
  justify-content: space-between;
}

.upload-errors {
  margin-bottom: 10px;
  border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent);
  border-radius: var(--r-control);
  background: var(--bad-soft);
  padding: 8px 12px;
}

.problems {
  border: 1px solid var(--note-line);
  border-radius: var(--r-control);
  background: var(--note-soft);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--fg-2);
}

.problems > b:first-child {
  display: block;
  color: var(--note);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
  font-size: 14px;
}

.facts dt {
  font: 400 11px var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.facts dd {
  overflow-wrap: anywhere;
  white-space: pre-line;
  color: var(--fg);
}

.fact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface-2);
  padding: 10px 12px;
}

.json {
  margin-top: 8px;
  max-height: 480px;
  overflow: auto;
  border-radius: var(--r-control);
  background: var(--surface-2);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-2);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .shell {
    display: block;
  }

  .side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'brand tools' 'nav nav' 'who who';
    gap: 8px 12px;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
  }

  .brand {
    grid-area: brand;
    align-self: center;
    margin: 0;
  }

  .nav {
    grid-area: nav;
    flex-direction: row;
    gap: 2px;
    margin: 0 -16px;
    overflow-x: auto;
    padding: 0 12px;
    scrollbar-width: none;
  }

  .nav-group {
    flex-direction: row;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    padding: 6px 10px;
  }

  .side-foot {
    display: contents;
  }

  .who {
    grid-area: who;
    flex-wrap: nowrap;
    font-size: 12.5px;
  }

  .who-email {
    width: auto;
    min-width: 0;
  }

  .side-tools {
    grid-area: tools;
  }

  .page {
    padding: 18px 16px 32px;
  }
}

@media (max-width: 640px) {
  .who .pill[title] {
    display: none;
  }

  .page-title {
    font-size: 24px;
  }

  .filters > .w-36, .filters > .w-48 {
    flex: 1 1 140px;
  }

  .upload-row {
    flex-wrap: wrap;
  }

  .upload-row .w-48 {
    width: 100%;
  }
}
