:root {
  --bg: #0b0f17;
  --surface: #121826;
  --surface-2: #1a243c;
  --border: #3a4a6d;
  --text: #f2f4fa;
  --text-muted: #b4bdd4;
  --navy: #1b2a4a;
  --gold: #e0b33a;
  --gold-hover: #f0c75a;
  --gold-ink: #12100a;
  --crimson: #ef5b66;
  --emerald: #3ecf8e;
  --amber: #f0b44a;
  --info: #6aa0ff;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.28);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sidebar: 304px;
  --topbar: 56px;
  --space: 4px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: Inter, system-ui, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color-scheme: dark;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}

img {
  max-width: 100%;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

a.btn:hover,
a.nav:hover,
.nav a:hover,
.search-results a:hover {
  text-decoration: none;
}

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

.app-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0d1424;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar);
  min-width: var(--sidebar);
  padding: 16px 12px;
  z-index: 30;
  overflow: hidden;
}

.sidebar.collapsed {
  width: 72px;
  min-width: 72px;
  padding: 16px 8px;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 8px 18px;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  margin-top: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-text strong {
  letter-spacing: 0;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: break-word;
}

.brand-text span {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.35;
  overflow-wrap: break-word;
}

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

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  position: relative;
  min-height: 40px;
}

.nav a svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.nav a span {
  white-space: nowrap;
  line-height: 1.3;
}

.nav a:hover,
.nav a.active {
  background: var(--surface-2);
  color: var(--text);
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.nav .badge-count {
  margin-left: auto;
  background: var(--crimson);
  color: white;
  font-size: 11px;
  min-width: 18px;
  text-align: center;
  border-radius: 99px;
  padding: 1px 6px;
}

.user-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.user-card img,
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy);
}

.user-card .meta {
  min-width: 0;
  flex: 1;
}

.user-card .meta strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.user-card .meta .muted {
  display: block;
  font-size: 12px;
  margin: 2px 0 6px;
}

.user-card .meta .chip {
  display: inline-flex;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: left;
}

.user-card form {
  margin-left: 4px;
  flex-shrink: 0;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 23, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.icon-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}

.btn:hover,
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: #5a6d99;
}

.btn:active,
.icon-btn:active {
  background: #10182c;
}

.btn-primary {
  background: var(--gold);
  color: var(--gold-ink);
  border-color: var(--gold-hover);
  font-weight: 600;
}

.btn-primary svg {
  stroke: currentColor;
}

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

.btn-danger {
  background: var(--crimson);
  border-color: #ff8a92;
  color: #fff;
}

.btn-danger:hover {
  background: #ff6f79;
  color: #fff;
  border-color: #ffb0b5;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn[disabled],
.btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.search-wrap {
  flex: 1;
  position: relative;
  max-width: 560px;
}

.search-wrap input {
  width: 100%;
}

.input,
select,
textarea,
input:not([type]),
input[type="text"],
input[type="search"],
input[type="datetime-local"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  max-width: 100%;
  background: #0e1524;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 11px;
  font: inherit;
  line-height: 1.4;
}

.input-caps {
  text-transform: uppercase;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px #0e1524 inset;
  transition: background-color 9999s ease-out;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field {
  margin-bottom: 14px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  position: relative;
}

.field-label > label,
.field-label > legend,
.field-label > span {
  display: inline;
  width: auto;
  margin: 0;
}

legend.field-label {
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.field-info {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.field-info:hover,
.field-info[aria-expanded="true"] {
  background: rgba(224, 179, 58, 0.16);
}

.field-info svg {
  width: 14px;
  height: 14px;
}

.field-info-pop {
  position: fixed;
  z-index: 80;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  font-weight: 400;
}

.field-info-pop p {
  margin: 0 0 8px;
  color: var(--text-muted);
}

.field-info-pop p:last-child {
  margin-bottom: 0;
}

.field-info-pop strong {
  display: block;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.field-info-options {
  margin: 0;
  padding-left: 1.1em;
  color: var(--text-muted);
}

.field-info-options li {
  margin: 0 0 6px;
}

.field-info-options li:last-child {
  margin-bottom: 0;
}

.field-info-options strong {
  display: inline;
  text-transform: none;
  letter-spacing: 0;
  font-size: inherit;
  color: var(--text);
}

.field-label.is-icon-only {
  display: inline-flex;
  margin: 0;
  width: auto;
}

.people-role-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.charge-defense-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media print {
  .field-info,
  .field-info-pop {
    display: none !important;
  }
}

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

h1,
h2,
h3 {
  overflow-wrap: break-word;
  line-height: 1.25;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.page-header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 650;
}

.page-header .muted {
  margin: 0;
}

.callsign-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.callsign-form label {
  margin: 0;
  white-space: nowrap;
}

.callsign-form input {
  width: 140px;
  min-width: 120px;
}

.callsign-form .btn {
  white-space: nowrap;
}

.page-foot {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.3;
  border: 1px solid var(--border);
  background: var(--surface-2);
  white-space: normal;
  overflow-wrap: anywhere;
}

.chip button {
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font: inherit;
  line-height: 1;
}

.chip button:hover {
  color: var(--text);
}

.chip.crimson { color: #ffd4d7; border-color: #7a2a31; background: #2a1216; }
.chip.emerald { color: #c7f5e3; border-color: #1e6b4b; background: #10261d; }
.chip.amber { color: #ffe3b0; border-color: #8a6a24; background: #2a210f; }
.chip.gold { color: #f3e2a1; border-color: #8a7424; background: #2a230f; }
.chip.info { color: #c9dcff; border-color: #2a4d8a; background: #10182a; }
.chip.violet { color: #e3d4ff; border-color: #5a3d8a; background: #1a122a; }

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

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

.stats-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0 0 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 14px 16px;
}

.dash a.card.stat,
.dash a.card.stat:hover,
.dash a.card.stat .stat-label,
.dash a.card.stat .n {
  color: inherit;
  text-decoration: none;
}

.dash a.card.stat:hover {
  border-color: var(--gold);
}

.stat-label {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.stat .n {
  color: var(--text);
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dash {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.dash-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.dash-main > .dash-panel:only-child {
  grid-column: 1 / -1;
}

.dash-panel {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.dash-list li:last-child {
  border-bottom: 0;
}

.dash-cases {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.case-card h3 {
  margin: 8px 0;
  font-size: 16px;
  font-weight: 650;
}

.case-card h3 a {
  color: inherit;
}

.case-card h3 a:hover {
  color: var(--gold);
  text-decoration: none;
}

.case-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.case-card.is-compact {
  padding: 0;
}

.case-card.is-compact .case-card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
}

.case-card.is-compact .case-card-row:hover {
  color: inherit;
  text-decoration: none;
}

.case-card.is-compact .mono {
  color: var(--gold);
}

.case-card.is-compact:hover {
  border-color: var(--gold);
}

.case-card.is-compact h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-card.is-compact .case-card-flags {
  justify-content: flex-end;
  flex-wrap: nowrap;
  align-items: center;
}

.case-card.is-compact .chip {
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.case-card.is-compact .case-card-when {
  font-size: 12px;
  white-space: nowrap;
}

.dash-panel .empty {
  padding: 8px 0 0;
}

.strength-bar {
  height: 4px;
  background: #0e1524;
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar > span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.strength-bar.crimson > span { background: var(--crimson); }
.strength-bar.amber > span { background: var(--amber); }
.strength-bar.emerald > span { background: var(--emerald); }
.strength-bar.gold > span { background: var(--gold); }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 0;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a,
.tabs button {
  background: none;
  border: 0;
  color: var(--text-muted);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.tabs a:hover,
.tabs button:hover {
  color: var(--text);
  text-decoration: none;
}

.tabs a.active,
.tabs button.active {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.banner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0;
  background: var(--surface-2);
}

.banner.warning {
  border-color: #8a6a24;
  background: #2a210f;
  color: #ffe3b0;
}

.banner.danger {
  border-color: #7a2a31;
  background: #2a1216;
  color: #ffd4d7;
}

.stamp {
  position: absolute;
  right: 24px;
  top: 80px;
  border: 3px solid currentColor;
  padding: 6px 12px;
  letter-spacing: 0.2em;
  font-weight: 800;
  opacity: 0.35;
  transform: rotate(-12deg);
  pointer-events: none;
}

.case-header {
  position: relative;
}

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

.case-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.case-identity .confidential {
  margin: 0 0 4px;
}

.case-identity h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.case-identity h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.case-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.case-controls .btn,
.case-status-select {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
}

.case-status-select {
  min-width: 240px;
  width: auto;
  padding-top: 0;
  padding-bottom: 0;
}

.case-insight {
  display: flex;
  gap: 14px;
  align-items: stretch;
  transition: gap 280ms var(--ease);
}

.status-tracker-card,
.helper-panel {
  margin: 0;
}

.status-tracker-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1.5 1 0;
  min-width: 0;
  overflow: hidden;
  opacity: 1;
  transition: flex 280ms var(--ease), opacity 220ms var(--ease), padding 220ms var(--ease), border-width 220ms var(--ease);
}

.helper-panel {
  flex: 0.9 1 280px;
  min-width: 0;
  transition: flex 280ms var(--ease);
}

.case-insight.is-checklist-open {
  gap: 0;
}

.case-insight.is-checklist-open .status-tracker-card {
  flex: 0 0 0;
  opacity: 0;
  padding: 0;
  border-width: 0;
  pointer-events: none;
}

.case-insight.is-checklist-open .helper-panel {
  flex: 1 1 100%;
}

.case-insight.is-checklist-open .helper-checklist {
  columns: 2;
  column-gap: 28px;
}

.status-tracker {
  --progress: 0;
  position: relative;
  display: flex;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.status-tracker::before,
.status-tracker::after {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 7px;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  z-index: 0;
}

.status-tracker::after {
  right: auto;
  width: calc(75% * var(--progress) / 100);
  background: var(--gold);
}

.status-tracker-step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 0;
}

.status-tracker-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  box-sizing: border-box;
}

.status-tracker-step.is-done .status-tracker-pin {
  background: var(--gold);
  border-color: var(--gold);
}

.status-tracker-step.is-current .status-tracker-pin,
.status-tracker-step.is-returned .status-tracker-pin {
  box-shadow: 0 0 0 4px rgba(224, 179, 58, 0.22);
}

.status-tracker-step.is-current .status-tracker-pin {
  background: var(--gold);
  border-color: var(--gold);
}

.status-tracker-step.is-returned .status-tracker-pin {
  background: var(--crimson);
  border-color: var(--crimson);
  box-shadow: 0 0 0 4px rgba(239, 91, 102, 0.22);
}

.status-tracker-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.status-tracker-step.is-done .status-tracker-label,
.status-tracker-step.is-current .status-tracker-label {
  color: var(--text);
}

.status-tracker-step.is-returned .status-tracker-label,
.status-tracker-note {
  color: var(--crimson);
}

.status-tracker-note {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-tracker-step.is-current .status-tracker-note {
  color: var(--gold);
}

.helper-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.helper-heading {
  min-width: 0;
}

.helper-top h3 {
  margin: 0 0 6px;
}

.helper-actions {
  margin-left: auto;
  flex-shrink: 0;
}

.helper-next {
  margin: 0 0 8px;
  padding-left: 18px;
}

.helper-next li + li {
  margin-top: 4px;
}

.helper-panel details {
  margin-top: 4px;
}

.helper-panel details summary {
  cursor: pointer;
  color: var(--gold);
}

.helper-checklist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.helper-checklist-toggle::-webkit-details-marker,
.helper-checklist-toggle::marker {
  display: none;
}

.helper-checklist-toggle svg {
  width: 16px;
  height: 16px;
}

.helper-checklist-toggle .helper-checklist-open-label,
.helper-checklist-toggle .helper-checklist-close-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.helper-panel details .helper-checklist-close-label,
.helper-panel details[open] .helper-checklist-open-label {
  display: none;
}

.helper-panel details[open] .helper-checklist-close-label {
  display: inline-flex;
}

.helper-checklist {
  margin: 10px 0 0;
  padding-left: 18px;
}

.helper-checklist li {
  margin: 0 0 6px;
  break-inside: avoid;
}

.helper-checklist li.is-done {
  color: var(--text-muted);
}

.helper-panel.suggestions-hidden [data-helper-suggestions] {
  display: none;
}

.case-file.suggestions-hidden .helper-lead {
  display: none;
}

.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.panel-toolbar .muted {
  flex: 1 1 240px;
  margin: 0;
}

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

.tab-panel > h3 {
  margin: 6px 0 0;
}

.charge-select-all {
  margin-left: auto;
}

.charge-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.charge-item:has(.charge-pick) {
  grid-template-columns: auto minmax(0, 1fr);
}

.charge-pick {
  margin: 14px 0 0;
}

.charge-item form[id^="charge-del-"] {
  display: none;
}

.charge-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.charge-reason {
  margin: 0;
  max-width: 72ch;
  line-height: 1.45;
}

.charge-person {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.charge-person > h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.charge-card.card {
  padding: 0;
}

.charge-card > summary.charge-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  flex-wrap: wrap;
}

.charge-card > summary.charge-head::-webkit-details-marker,
.charge-card > summary.charge-head::marker {
  display: none;
}

.charge-toggle {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--gold);
}

.charge-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s var(--ease);
  margin-top: -2px;
}

.charge-card[open] > summary .charge-toggle::before {
  transform: rotate(45deg);
  margin-top: 0;
}

.charge-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.charge-name {
  font-weight: 650;
}

.charge-progress {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.charge-progress.is-done {
  color: var(--emerald);
}

.charge-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.charge-synopsis {
  margin: 0;
  max-width: 72ch;
  color: var(--text-muted);
  line-height: 1.45;
}

.charge-defenses {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.charge-defenses-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 2px;
}

.charge-element {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0e1524;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.charge-element-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.charge-element-top .btn,
.charge-element-top .autosave-status {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
}

.charge-element-line {
  align-items: flex-start;
  flex: 1 1 auto;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  margin: 0;
}

.charge-linked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.charge-support > summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 13px;
  list-style: none;
}

.charge-support > summary .field-label {
  display: inline-flex;
  margin: 0;
  color: var(--gold);
}

.charge-support > summary .field-label label {
  color: var(--gold);
  cursor: pointer;
}

.charge-support > summary::-webkit-details-marker,
.charge-support > summary::marker {
  display: none;
}

.charge-support > summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  vertical-align: 1px;
}

.charge-support[open] > summary::before {
  transform: rotate(45deg);
}

.support-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 14px;
  margin: 8px 0 0;
}

.support-item {
  align-items: flex-start;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.support-item .sticker {
  flex-shrink: 0;
}

.support-title {
  color: var(--text-muted);
}

.charge-note {
  margin: 0;
}

.card > h3:first-child,
.card > .panel-head:first-child {
  margin-top: 0;
}

.card .panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.case-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 14px;
}

.case-facts {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.case-facts div {
  display: grid;
  gap: 2px;
}

.case-facts dt {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.case-facts dd {
  margin: 0;
}

.case-edit {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.case-edit summary {
  cursor: pointer;
  color: var(--gold);
  margin-bottom: 12px;
}

.evidence-filters {
  margin: 0;
}

.evidence-filters .field {
  margin-bottom: 0;
}

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

.person-file.card {
  width: 100%;
  padding: 0;
}

.person-file > summary.person-file-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  margin: 0;
}

.person-file > summary.person-file-head::-webkit-details-marker,
.person-file > summary.person-file-head::marker {
  display: none;
}

.person-file[open] > summary .charge-toggle::before {
  transform: rotate(45deg);
  margin-top: 0;
}

.person-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.person-name {
  font-weight: 650;
  font-size: 16px;
}

.autosave-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.autosave-status[data-state="saved"] {
  color: var(--emerald);
}

.autosave-status[data-state="error"] {
  color: var(--crimson);
}

.person-file-head form {
  margin: 0;
}

.person-file-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.person-file-form {
  margin: 0;
}

.stepper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.stepper .step {
  flex: 1;
  min-width: 90px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.stepper .step.done,
.stepper .step.current {
  color: var(--text);
  border-color: var(--gold);
}

.stepper .step.current {
  background: #2a230f;
}

.helper-panel .gauge {
  width: 72px;
  height: 72px;
  margin: 0;
  flex-shrink: 0;
}

.gauge-label {
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
  animation: fade 180ms var(--ease);
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
}

.wizard-hide {
  display: none !important;
}

.wizard-modal {
  width: min(1240px, calc(100vw - 32px));
  height: min(900px, calc(96vh - 16px));
  max-height: calc(96vh - 16px);
  padding: 24px 28px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#openCaseForm {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.wizard-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.wizard-case-number {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.wizard-case-number .mono {
  color: var(--gold);
  font-weight: 600;
  margin-left: 6px;
}

.wizard-steps {
  display: flex;
  flex-shrink: 0;
  margin: 16px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.wizard-steps button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 12px 8px;
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}

.wizard-steps button.is-current {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--gold);
}

.step-mark {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid #d64545;
  color: #d64545;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.step-mark::after {
  content: "✕";
}

.wizard-steps button.is-complete .step-mark {
  border-color: #2ea86a;
  background: #2ea86a;
  color: #fff;
}

.wizard-steps button.is-complete .step-mark::after {
  content: "✓";
}

.wizard-steps button.is-incomplete .step-mark {
  border-color: #d64545;
  background: transparent;
  color: #d64545;
}

.wizard-pane {
  display: none;
  padding: 22px 4px 12px;
}

.wizard-pane.is-active {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.wizard-pane .field:last-child {
  margin-bottom: 0;
}

.wizard-lead {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.wizard-title-preview {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.request-page {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 16px 48px;
}

.request-page .card {
  margin-top: 16px;
}

body.request-public {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(224, 179, 58, 0.08), transparent 60%),
    var(--bg);
}

.request-wrap {
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.request-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.request-brand img {
  width: 52px;
  height: 52px;
}

.request-brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-brand strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 650;
}

.request-wrap > h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.request-for {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
  color: var(--gold);
}

.request-ref {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.request-agent {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
}

.request-agent img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.request-agent-body {
  min-width: 0;
}

.request-agent-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.request-agent-name {
  margin: 0;
  font-weight: 650;
  line-height: 1.3;
}

.request-agent-meta {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.request-discord {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.request-copy {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 4px;
  padding: 2px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.request-copy:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.request-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 7px 12px;
  border: 1px solid rgba(224, 179, 58, 0.35);
  border-radius: 999px;
  background: rgba(224, 179, 58, 0.08);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
}

.request-timer svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.request-timer.is-soon {
  border-color: rgba(240, 180, 74, 0.55);
  color: var(--amber);
}

.request-timer.is-expired {
  border-color: rgba(239, 91, 102, 0.45);
  background: rgba(239, 91, 102, 0.1);
  color: var(--crimson);
}

.request-lede {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.55;
}

.request-message {
  padding: 16px 18px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.request-message h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.request-message p {
  margin: 0;
  line-height: 1.55;
}

.request-message p + p {
  margin-top: 8px;
}

.request-form {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 22px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.request-form h2 {
  margin: 18px 0 6px;
  font-size: 15px;
}

.request-form h2:first-child {
  margin-top: 0;
}

.request-form > .btn {
  align-self: flex-start;
}

.file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #0e1524;
  cursor: pointer;
  text-align: center;
}

.file-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop:hover,
.file-drop.is-over {
  border-color: var(--gold);
  background: #151c2e;
}

.file-drop-name {
  margin: 8px 0 4px;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.request-submit {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.request-submit .btn-primary {
  width: 100%;
  min-height: 44px;
}

.request-question-row .inventory-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.request-link-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
}

.request-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

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

.request-filter select {
  width: auto;
  min-width: 148px;
}

.request-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.request-card.card {
  padding: 0;
}

.request-card > summary.request-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  flex-wrap: wrap;
}

.request-card > summary.request-head::-webkit-details-marker,
.request-card > summary.request-head::marker {
  display: none;
}

.request-card[open] > summary .charge-toggle::before {
  transform: rotate(45deg);
  margin-top: 0;
}

.request-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.request-name {
  font-weight: 650;
}

.request-meta {
  font-size: 12.5px;
  white-space: nowrap;
}

.request-actions {
  position: relative;
  flex-shrink: 0;
}

.request-submitter {
  max-width: 36ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.request-narrative,
.request-answers {
  max-width: 72ch;
}

.request-answer {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0e1524;
}

.request-answer h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.request-answer .md-preview {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.request-asked {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.menu-drop {
  position: relative;
}

.menu-drop-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-drop-list .btn,
.menu-drop-list form {
  width: 100%;
  margin: 0;
}

.menu-drop-list .btn {
  justify-content: flex-start;
}

.wizard-nav {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 16px 0 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.wizard-nav [data-save-draft] {
  margin-right: auto;
}

.wizard-done {
  text-align: center;
  padding: 36px 12px;
}

.person-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.person-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0e1524;
}

.person-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(168px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
}

.person-row-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(88px, 0.55fr);
  gap: 10px;
  align-items: end;
}

.person-row .field {
  margin: 0;
}

.person-row .grow {
  min-width: 0;
}

.person-age {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.person-age.has-age {
  color: var(--text);
  border-style: solid;
}

.field-check {
  display: flex;
  align-items: flex-end;
  min-height: 62px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  margin: 0;
  cursor: pointer;
}

.check input {
  width: auto;
  margin: 0;
  accent-color: var(--gold);
}

input[type="datetime-local"],
input[type="date"] {
  color-scheme: dark;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
}

@keyframes pop {
  to { transform: none; }
}

.slide-over {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 220ms var(--ease);
  overflow: auto;
  padding: 20px;
}

.slide-over.open {
  transform: none;
}

.type-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.type-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 36px 14px 14px;
  cursor: pointer;
  background: #0e1524;
  text-align: left;
  display: block;
}

.type-card > .field-label {
  position: absolute;
  top: 8px;
  right: 8px;
}

.type-card svg {
  display: block;
  width: 20px;
  height: 20px;
}

.type-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--text);
}

.type-card .muted {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  min-height: 2.8em;
}

.type-card.selected {
  border-color: var(--gold);
  background: #2a230f;
}

.type-card:hover {
  border-color: #5a6d99;
}

.physical-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}

.physical-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 28px 10px 10px;
  cursor: pointer;
  background: #0e1524;
  display: block;
}

.physical-card > .field-label {
  position: absolute;
  top: 4px;
  right: 4px;
}

.physical-card svg {
  display: block;
  width: 18px;
  height: 18px;
}

.physical-card strong {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text);
}

.physical-card.selected {
  border-color: var(--gold);
  background: #2a230f;
}

.physical-card:hover {
  border-color: #5a6d99;
}

.forensics-card {
  margin: 16px 0;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #0e1524;
}

.forensics-card h4 {
  margin: 0 0 8px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.evidence-section {
  margin: 18px 0 8px;
}

.evidence-section > h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  margin: 0 0 10px;
}

.evidence-section > h3 .muted {
  font-weight: 500;
  font-size: 12px;
}

.evidence-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}

.evidence-tile.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.evidence-tile .thumb {
  position: relative;
  height: 140px;
  width: 100%;
  overflow: hidden;
  background: #0e1524;
}

.evidence-tile .thumb.is-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted, #8b97b3);
  text-transform: capitalize;
  font-size: 12px;
}

.evidence-tile .thumb > img,
.evidence-tile .evidence-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.slide-over .evidence-photo {
  position: static;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-top: 8px;
  border-radius: 8px;
}

.ev-relevance {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  margin: 4px 0 0;
}

.evidence-tile-body {
  padding: 10px;
}

.ev-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(10, 14, 24, 0.72);
  border-radius: 6px;
  padding: 2px 4px;
}

.evidence-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #121826;
  position: sticky;
  top: 0;
  z-index: 4;
}

.evidence-bulk[hidden] {
  display: none;
}

.evidence-title-input {
  width: 100%;
  font-size: 18px;
  font-weight: 650;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  padding: 4px 0;
}

.linked-people {
  max-height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 12px 0;
}

.linked-person {
  display: flex;
  align-items: center;
  gap: 8px;
}

.linked-people-head {
  margin: 8px 0 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8b97b3);
}

.embed-preview iframe,
.embed-preview video,
.embed-preview img,
.slide-over iframe,
.slide-over video {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 8px;
  margin-top: 8px;
  background: #0e1524;
}

.slide-over img {
  max-width: 100%;
  border-radius: 8px;
}

.slide-over iframe.pdf-frame,
.pdf-frame {
  width: 100%;
  height: min(70vh, 640px);
  border: 0;
  border-radius: 8px;
  margin-top: 8px;
  background: #0e1524;
}

.sticker {
  font-family: var(--mono);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.timeline {
  border-left: 2px solid var(--border);
  margin-left: 12px;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  margin-bottom: 18px;
}

.timeline-item strong {
  display: block;
  font-weight: 650;
}

.timeline-item .muted {
  margin-top: 2px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.time-chart-add {
  margin-bottom: 18px;
}

.time-chart {
  list-style: none;
  margin: 8px 0 0;
  padding: 4px 0 8px 36px;
  border-left: 2px solid var(--gold);
}

.time-chart > li {
  position: relative;
  margin: 0 0 22px;
  padding: 0 0 2px 12px;
}

.time-chart > li:last-child {
  margin-bottom: 0;
}

.time-chart-index {
  position: absolute;
  left: -49px;
  top: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.time-chart time {
  display: block;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.time-chart p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.time-chart details {
  margin-top: 8px;
}

.time-chart summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
}

.time-chart details form {
  margin-top: 10px;
}

@media print {
  .time-chart details {
    display: none;
  }
}

.avatar-stack {
  display: flex;
}

.avatar-stack img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  margin-left: -6px;
}

.avatar-stack img:first-child {
  margin-left: 0;
}

.flash {
  position: relative;
  margin: 12px 24px 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: opacity 280ms var(--ease), transform 280ms var(--ease);
}

.flash.leaving {
  opacity: 0;
  transform: translateY(-6px);
}

.flash.success { background: #10261d; border-color: #1e6b4b; color: #c7f5e3; }
.flash.error { background: #2a1216; border-color: #7a2a31; color: #ffd4d7; }

.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  min-width: 240px;
  animation: slidein 220ms var(--ease);
}

.toast.success {
  background: #143326;
  border-color: var(--emerald);
  color: #d4ffe8;
}

.toast.error {
  background: #3a151c;
  border-color: var(--crimson);
}

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

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

@keyframes slidein {
  from { transform: translateX(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.empty {
  text-align: left;
  padding: 20px 4px 8px;
  color: var(--text-muted);
}

.empty h3 {
  margin: 8px 0 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.empty p {
  margin: 0;
  font-size: 13px;
}

.inventory-form {
  margin-top: 12px;
}

.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inventory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(90px, 0.55fr) minmax(110px, 0.6fr) minmax(120px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.inventory-list[data-kind="FIREARM"] .inventory-row {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(110px, 0.7fr) minmax(130px, 0.7fr) auto;
}

.weight-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
}

.lab-results-hint {
  margin: 0 0 8px;
}

.lab-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}

.lab-result-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0b1220;
}

.lab-result-row .field {
  margin: 0;
}

.lab-result-row .field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-muted);
}

.lab-result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.lab-result-actions .btn {
  min-height: 42px;
}

.lab-result-row:only-child .lab-result-actions {
  grid-template-columns: 1fr;
}

.lab-result-row:only-child [data-remove-lab-row] {
  display: none;
}

.lab-results-table {
  margin: 8px 0 12px;
}

.forensics-facts {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.forensics-facts span:not(:last-child)::after {
  content: "·";
  margin: 0 8px;
  color: var(--text-muted);
}

.inventory-row .field {
  margin: 0;
}

.inventory-remove [data-remove-inventory-row] {
  min-height: 42px;
  width: 100%;
}

.inventory-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.inventory-search {
  position: relative;
}

.wizard-pane[data-ois-pane] h3,
#people-involved h3,
#people-involved h4 {
  margin: 18px 0 8px;
}

.people-toolbar {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.people-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.people-title {
  margin: 0 0 4px;
}

.people-lead {
  margin: 0;
  max-width: 52rem;
}

.people-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.people-jump a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12.5px;
  text-decoration: none;
  background: #0e1524;
}

.people-jump a:hover {
  color: var(--text);
  border-color: var(--gold);
}

.people-block {
  margin-bottom: 28px;
}

.people-block-head {
  margin-bottom: 8px;
}

.people-block-head h3 {
  margin: 0 0 4px;
}

.ois-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ois-extra {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.ois-extra summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

.injury-block {
  margin-top: 8px;
}

.injury-flags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
  margin-bottom: 8px;
}

.injury-flags .field {
  margin: 0;
}

.injury-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

.injury-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0e1524;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.injury-kind.selected {
  border-color: var(--injury-color, var(--gold));
  box-shadow: 0 0 0 1px var(--injury-color, var(--gold));
  background: #161b2c;
}

.injury-kind-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  border-radius: 999px;
  background: var(--injury-color);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.injury-panel {
  margin: 16px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.injury-panel > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 10px;
}

[data-ois-readonly] .injury-kind,
[data-ois-readonly] .body-map,
[data-ois-readonly] input,
[data-ois-readonly] .check {
  pointer-events: none;
}

.ois-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0;
}

.ois-card.card {
  padding: 0;
}

.ois-card > summary.ois-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  flex-wrap: wrap;
  margin: 0;
}

.ois-card > summary.ois-card-head::-webkit-details-marker,
.ois-card > summary.ois-card-head::marker {
  display: none;
}

.ois-card[open] > summary .charge-toggle::before {
  transform: rotate(45deg);
  margin-top: 0;
}

.ois-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ois-card-title {
  font-weight: 650;
}

.ois-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.ois-card .check {
  margin: 12px 0;
}

.ois-weapon-list .inventory-row {
  grid-template-columns: minmax(0, 1.8fr) minmax(90px, 0.5fr) auto;
}

.ois-weapon-list .field.grow {
  min-width: 0;
}

.body-maps {
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.body-map-view {
  text-align: center;
}

.body-map-caption {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.body-map {
  width: min(360px, 44vw);
  min-width: 260px;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.body-map .body-chart {
  pointer-events: none;
}

.body-map .region {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
}

.body-map .region:hover {
  fill: rgba(224, 179, 58, 0.28);
  stroke: var(--gold);
  stroke-width: 2;
}

.body-map .region-labels {
  pointer-events: none;
  fill: #1b2436;
  font-size: 11px;
  font-weight: 650;
}

.body-map .region-labels text {
  paint-order: stroke fill;
  stroke: #fff;
  stroke-width: 3.5px;
  stroke-linejoin: round;
}

.body-map .wound-mark {
  cursor: pointer;
}

.body-map .wound-mark line,
.body-map .wound-mark .wound-dot {
  stroke: var(--injury-color, #e23d3d);
  stroke-width: 3.2;
  stroke-linecap: round;
  pointer-events: none;
}

.body-map .wound-mark .wound-dot {
  fill: var(--injury-color, #e23d3d);
  stroke: none;
}

.body-map .wound-mark .wound-code {
  fill: var(--injury-color, #e23d3d);
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
}

.wound-counter {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.wound-total {
  margin: 0;
  font-size: 13px;
}

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

.wound-counts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  background: #10192c;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

[data-ois-readonly] .ois-card-head button,
[data-ois-readonly] [data-add-ois-weapon],
[data-ois-readonly] [data-remove-ois-weapon],
[data-ois-readonly] input,
[data-ois-readonly] select {
  pointer-events: none;
}

[data-ois-readonly] .ois-card-head button,
[data-ois-readonly] [data-add-ois-weapon],
[data-ois-readonly] [data-remove-ois-weapon] {
  display: none;
}

.inventory-search .results {
  position: fixed;
  background: #152038;
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 70;
  max-height: 260px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.inventory-search .results button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}

.inventory-search .results button.is-custom {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.inventory-search .results button[aria-selected="true"],
.inventory-search .results button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.table tfoot th {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.agent-picker {
  position: relative;
}

.agent-picker > input,
.agent-picker .input {
  width: 100%;
}

.agent-picker .results {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 10;
  max-height: 240px;
  overflow: auto;
}

.agent-picker .results button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.agent-picker .results button[aria-selected="true"],
.agent-picker .results button:hover {
  background: var(--surface-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.progress-ring {
  width: 42px;
  height: 42px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.code-detail summary {
  cursor: pointer;
  font-weight: 600;
}

.code-detail p,
.code-detail ol,
.code-detail ul {
  margin: 10px 0 0;
  white-space: pre-wrap;
  max-width: 62ch;
}

.code-detail h4 {
  margin: 14px 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: none;
  z-index: 40;
  max-height: 360px;
  overflow: auto;
}

.search-results.open {
  display: block;
}

.search-results h4 {
  margin: 8px 12px 4px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
}

.search-results a:hover {
  background: var(--surface-2);
}

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 162, 39, 0.08), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(27, 42, 74, 0.8), transparent 40%),
    var(--bg);
}

.landing-card {
  width: min(520px, 92vw);
  text-align: center;
  padding: 40px 32px;
}

.landing-card img {
  width: 112px;
  height: 112px;
}

.landing-card h1 {
  margin: 12px 0 6px;
  font-size: 26px;
  font-weight: 650;
  line-height: 1.25;
}

.dept-name {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.lock-notice {
  color: var(--text-muted);
  font-size: 13px;
  margin: 16px 0 24px;
  line-height: 1.5;
}

.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 0.2em;
  opacity: 0.04;
  transform: rotate(-24deg);
  z-index: 0;
}

.share-banner {
  background: #2a210f;
  border-bottom: 1px solid #8a6a24;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
}

.review-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  z-index: 15;
}

.admin-nav {
  margin: 0 0 16px;
}

.admin-delete-case {
  display: inline-block;
}

.admin-delete-case summary {
  cursor: pointer;
  color: var(--crimson);
  list-style: none;
}

.admin-delete-case summary::-webkit-details-marker {
  display: none;
}

.admin-delete-case form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #2a1216;
  min-width: 280px;
}

.admin-delete-case .field {
  margin: 0;
  min-width: 180px;
}

.confidential {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.dropzone {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: #0e1524;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone.drag {
  border-color: var(--gold);
}

.skeleton {
  background: linear-gradient(90deg, #121826, #1a243c, #121826);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
  height: 14px;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.md-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.md-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #0e1524;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.print-header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid #1b2a4a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.sticker-print {
  width: 4in;
  padding: 16px;
  border: 2px solid #1b2a4a;
  color: #0b0f17;
  background: white;
}

body.print-body {
  background: white;
  color: #111;
}

body.print-body .content {
  animation: none;
}

@media print {
  .no-print {
    display: none !important;
  }
  @page {
    margin: 16mm;
  }
  body.print-body .page-foot::after {
    content: "CONFIDENTIAL — SADPS CID — Page " counter(page) " of " counter(pages);
  }
}

@media (max-width: 1280px) {
  .grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .grid-5,
  .grid-3,
  .type-cards {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    flex-wrap: wrap;
  }
  .stat {
    flex: 1 1 calc(33.33% - 12px);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar,
  .sidebar.collapsed {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 220ms var(--ease);
    width: min(var(--sidebar), 86vw);
    min-width: 0;
    padding: 16px 12px;
  }
  .sidebar.open {
    transform: none;
  }
  .case-card.is-compact .case-card-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .case-card.is-compact .case-card-row > .mono,
  .case-card.is-compact h3 {
    grid-column: 1;
  }
  .case-card.is-compact .case-card-flags {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .grid-2,
  .grid-3,
  .grid-5,
  .dash-main,
  .type-cards,
  .person-row-main,
  .person-row-demo,
  .inventory-row,
  .inventory-list[data-kind="FIREARM"] .inventory-row,
  .ois-weapon-list .inventory-row,
  .request-link-row,
  .request-question-row .inventory-row {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    flex-wrap: wrap;
  }
  .stat {
    flex: 1 1 calc(50% - 12px);
  }
  .wizard-steps button {
    font-size: 11px;
    padding: 8px 2px 10px;
  }
  .wizard-modal {
    width: calc(100vw - 16px);
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    padding: 16px 16px 0;
  }
  .case-insight,
  .case-overview {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .status-tracker-card,
  .helper-panel,
  .case-insight.is-checklist-open .helper-panel {
    flex: 1 1 auto;
  }
  .case-insight.is-checklist-open .helper-checklist {
    columns: 1;
  }
  .body-map {
    width: min(300px, 86vw);
    min-width: 0;
  }
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav a span,
.sidebar.collapsed .nav .badge-count,
.sidebar.collapsed .user-card .meta {
  display: none;
}

.sidebar.collapsed .brand {
  justify-content: center;
  padding: 4px 0 16px;
}

.sidebar.collapsed .nav a {
  justify-content: center;
  padding: 10px 8px;
}

.sidebar.collapsed .nav a.active::before {
  top: 8px;
  bottom: 8px;
}

.sidebar.collapsed .user-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
}

.sidebar.collapsed .user-card form {
  margin: 0;
}

.sidebar.collapsed .user-card .btn {
  padding: 8px;
}

.case-settings form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.case-settings .type-cards,
.case-settings .grid {
  width: 100%;
  align-self: stretch;
}

.case-settings .type-card {
  padding: 12px;
}

.case-settings .type-card .muted {
  min-height: 0;
}

.case-settings .field {
  width: 100%;
  max-width: 420px;
  margin: 0;
}

.case-settings .muted {
  margin: 0;
}

.case-settings-narrow {
  max-width: 640px;
}

.case-settings-narrow .field {
  max-width: 320px;
}

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