:root {
  font-family:
    Inter,
    Segoe UI,
    system-ui,
    sans-serif;
  color: #172b3a;
  background: #f3f5f5;
  font-size: 15px;
  --navy: #102a36;
  --green: #126c5e;
  --muted: #5b707a;
  --border: #d8e1e3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  background: white;
  color: var(--navy);
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  border-color: var(--green);
  background: #eaf3f0;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
button.quiet {
  background: transparent;
  color: inherit;
  border-color: #ffffff35;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.danger {
  color: #ab302d;
}
.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #d2e1e6;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brand {
  font-size: 34px;
  letter-spacing: -2px;
  color: white;
  font-weight: 800;
}
.brand-mark {
  color: #72b9a5;
}
.tagline {
  font-size: 12px;
  color: #a0bbc6;
  line-height: 1.5;
  margin-bottom: 30px;
}
.sidebar button {
  text-align: left;
}
.side-footer {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.8;
  color: #a0bbc6;
  padding-top: 35px;
}
.main {
  padding: 36px 44px;
  max-width: 1500px;
  width: 100%;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.8px;
  color: var(--green);
  font-weight: 750;
}
h1 {
  font-size: 31px;
  letter-spacing: -1px;
  margin: 8px 0 10px;
}
h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 12px;
  margin: 6px 0;
}
.topline,
.toolbar,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar {
  justify-content: flex-start;
  margin: 20px 0;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 3px 10px #102a3604;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.stat {
  background: white;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.stat strong {
  display: block;
  font-size: 30px;
  margin-top: 9px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.notice {
  border-left: 3px solid #c49a48;
  background: #faf5e9;
  padding: 12px 16px;
  color: #685329;
  font-size: 13px;
  line-height: 1.6;
}
.source-collection p {
  overflow-wrap: anywhere;
}
.source-collection .actions {
  margin-bottom: 16px;
}
.source-recipient h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}
.reports {
  width: 100%;
  border-collapse: collapse;
}
.reports th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 12px;
}
.reports td {
  border-top: 1px solid var(--border);
  padding: 16px 12px;
  vertical-align: middle;
}
.reports td:first-child button {
  border: 0;
  padding: 0;
  color: var(--green);
  min-height: 25px;
}
.pill {
  display: inline-block;
  border: 1px solid #d4e1e0;
  background: #edf5f2;
  color: #356e61;
  font-size: 11px;
  border-radius: 20px;
  padding: 5px 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.pill.draft {
  background: #f4f1e9;
  color: #846c32;
}
.pill.review {
  background: #eaf0f8;
  color: #355d81;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  min-width: 0;
}
.field label {
  font-size: 13px;
  font-weight: 650;
}
.field input,
.field select,
.field textarea,
input.search {
  width: 100%;
  border: 1px solid #bbcbd0;
  border-radius: 6px;
  padding: 10px;
  background: white;
  color: #172b3a;
  min-height: 42px;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #61a58e;
  outline-offset: 2px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}
.field-grid .wide {
  grid-column: 1/-1;
}
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
}
.editor .card {
  margin: 0 0 20px;
}
.object {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 15px;
  margin: 12px 0;
  min-width: 0;
}
.object > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
}
.array-item {
  border-left: 3px solid #bbd5ce;
  padding-left: 13px;
  margin: 12px 0;
}
.array-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.small {
  font-size: 12px;
  min-height: 30px;
  padding: 5px 10px;
}
.issue {
  padding: 10px 0;
  border-top: 1px solid #ecd9ce;
  font-size: 13px;
  color: #8d3c28;
  overflow-wrap: anywhere;
}
.issue code {
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}
.issue-list {
  max-height: 440px;
  overflow: auto;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.tabs button.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.auth {
  max-width: 470px;
  margin: 7vh auto;
  padding: 0 20px;
}
.auth .brand {
  color: var(--navy);
  margin-bottom: 12px;
}
.auth .card {
  padding: 28px;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
}
.history {
  font-size: 12px;
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f6f6;
  padding: 14px;
  border-radius: 6px;
  font-size: 12px;
  max-height: 420px;
  overflow: auto;
}
#message {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #173d44;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  max-width: min(650px, 90vw);
  box-shadow: 0 6px 25px #0003;
  z-index: 10;
  display: none;
}
#message.error {
  background: #8e332c;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
a {
  color: var(--green);
}
.loading {
  padding: 40px;
}
input.search {
  max-width: 340px;
}
.required {
  color: #9a5528;
  font-weight: 400;
}
.footer-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
}
@media (max-width: 1000px) {
  .main {
    padding: 25px;
  }
  .shell {
    grid-template-columns: 175px 1fr;
  }
  .sidebar {
    padding: 24px 16px;
  }
  .editor {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 14px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 27px;
  }
  .tagline,
  .side-footer {
    display: none;
  }
  .sidebar button {
    font-size: 12px;
    min-height: 34px;
    padding: 6px 10px;
  }
  .main {
    padding: 22px 16px;
  }
  .stats {
    gap: 7px;
  }
  .stat {
    padding: 13px 10px;
  }
  .stat strong {
    font-size: 25px;
  }
  .stat span {
    font-size: 10px;
  }
  h1 {
    font-size: 27px;
  }
  .card {
    padding: 18px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .reports th:nth-child(3),
  .reports td:nth-child(3) {
    display: none;
  }
  .reports td {
    padding: 12px 6px;
  }
  .reports th {
    padding: 10px 6px;
  }
  .reports {
    font-size: 12px;
  }
  .toolbar button {
    font-size: 12px;
  }
  .editor {
    gap: 0;
  }
}
@media print {
  .sidebar,
  .toolbar,
  .tabs,
  button,
  #message {
    display: none !important;
  }
  .shell,
  .editor {
    display: block;
  }
  .main {
    padding: 0;
    max-width: none;
  }
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #aaa;
  }
  input,
  textarea,
  select {
    border: 0 !important;
  }
  body {
    background: white;
  }
  .notice {
    background: white;
  }
  .issue-list,
  pre {
    max-height: none;
  }
  .stats {
    display: none;
  }
}
.lab-banner {
  background: #ffe2a8;
  color: #382400;
  padding: 12px 20px;
  font-weight: 700;
  border-bottom: 2px solid #9d6500;
  overflow-wrap: anywhere;
}
/* Original incident workspace: source context, section rail and actionable checks. */
:root {
  --border: #dae2e7;
  --green: #176b61;
  background: #eef2f5;
}
button,
input,
select,
textarea {
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #2b9181;
  outline-offset: 3px;
}
.sidebar {
  background: #122936;
  border-right: 1px solid #ffffff12;
}
.brand {
  letter-spacing: -1.5px;
}
.main {
  max-width: 1700px;
}
.card {
  border-radius: 12px;
  box-shadow: 0 5px 20px #17354b05;
}
.incident-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 18px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}
.incident-context > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.context-label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.context-status {
  font-weight: 650;
  font-size: 12px;
  text-transform: capitalize;
  color: var(--green);
}
.requirements-heading {
  margin: 22px 0 8px;
  font-size: 12px;
  color: var(--green);
}
.required-section {
  display: block;
  width: 100%;
  margin: 6px 0;
  text-align: left;
  font-size: 12px;
  padding: 9px 10px;
}
.branch-editor {
  border-left: 3px solid #a5c8bf;
  padding-left: 14px;
  margin: 14px 0;
}
.branch-editor > .field {
  margin-top: 0;
}
.retained-sections {
  margin: 24px 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.incident-context strong {
  font-size: 13px;
  line-height: 1.5;
}
.context-action {
  padding: 0;
  border: 0;
  min-height: 25px;
  color: var(--green);
  text-align: left;
  font-size: 13px;
}
.report-workspace {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}
.report-workspace .editor {
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 20px;
}
.section-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 12px;
  background: #ffffffb8;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.nav-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 8px 6px 12px;
}
.section-nav button {
  text-align: left;
  font-size: 12px;
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  padding: 10px;
}
.section-nav button.active {
  background: #173c48;
  color: white;
  border-color: #173c48;
}
.section-nav select {
  width: 100%;
  min-width: 0;
  padding: 8px 3px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  background: white;
  font-size: 11px;
  margin-top: 10px;
}
.report-workspace aside {
  position: sticky;
  top: 20px;
}
.report-workspace aside .card {
  padding: 20px;
}
.report-workspace aside .toolbar {
  gap: 7px;
}
.report-workspace aside .toolbar button {
  font-size: 12px;
  padding: 8px 11px;
}
.guided-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.guided-form > h2,
.guided-form > h3,
.guided-form > p,
.guided-form > button {
  grid-column: 1 / -1;
}
.guided-form > h3 {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 16px;
  color: #1c4e58;
}
.unit-switch {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #eef3f5;
  border-radius: 8px;
  margin: 20px 0 10px;
}
.unit-switch button {
  flex: 1;
  font-size: 12px;
  background: transparent;
  border-color: transparent;
}
.unit-switch button.active {
  background: white;
  border-color: var(--border);
  box-shadow: 0 2px 5px #19374908;
}
.unit-card {
  margin: 22px 0;
  border: 1px solid var(--border);
  border-top: 3px solid #5f9c92;
  border-radius: 9px;
  padding: 20px;
  background: #fff;
}
.unit-card h3 {
  font-size: 19px;
  margin: 0;
  overflow-wrap: anywhere;
}
.unit-card h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin: 22px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.unit-card .field label {
  font-size: 12px;
}
.unit-card .field-grid {
  gap: 0 16px;
}
.timeline-fields input {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.unit-details {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
  font-size: 13px;
}
.unit-details > summary {
  cursor: pointer;
  color: var(--muted);
}
.compact {
  padding: 28px 12px;
  background: #f5f8f8;
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin: 20px 0;
}
.compact h3 {
  margin-bottom: 7px;
}
.issue-link {
  display: block;
  border: 0;
  padding: 2px 0;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #95452d;
  min-height: 30px;
  background: transparent;
  width: 100%;
}
.issue .hint {
  display: block;
  font-size: 10px;
}
.source-receipt {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #edf5f2;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 12px;
  color: #245f51;
  margin: 20px 0;
}
.cad-change {
  border: 1px solid var(--border);
  border-radius: 9px;
  margin: 16px 0;
  overflow: hidden;
}
.change-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.change-heading input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.comparison-grid > div {
  padding: 16px;
  min-width: 0;
}
.comparison-grid > div + div {
  border-left: 1px solid var(--border);
  background: #f3f8f5;
}
.comparison-grid pre {
  margin: 10px 0 0;
  background: transparent;
  padding: 0;
}
.mobile-save-bar {
  display: none;
}
@media (max-width: 650px) {
  .mobile-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: #fffffff5;
    box-shadow: 0 -3px 18px #1834440d;
    z-index: 8;
    font-size: 12px;
    color: var(--muted);
  }
  .mobile-save-bar button {
    min-height: 44px;
  }
  .main:has(.mobile-save-bar) {
    padding-bottom: 100px;
  }
  body:has(.mobile-save-bar) #message {
    bottom: 85px;
  }
}
@media print {
  .mobile-save-bar {
    display: none;
  }
}
@media (max-width: 650px) {
  .sidebar .side-footer {
    display: block;
    margin: 0;
    padding: 0;
  }
  .sidebar .side-footer > strong,
  .sidebar .side-footer > div {
    display: none;
  }
}
@media (max-width: 1300px) {
  .report-workspace .editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-workspace aside {
    position: static;
  }
}
@media (max-width: 850px) {
  .report-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .section-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    padding: 8px;
  }
  .nav-heading {
    display: none;
  }
  .section-nav button {
    min-height: 34px;
    padding: 7px 9px;
  }
  .section-nav select {
    width: auto;
    max-width: 100%;
    margin: 0;
  }
  .incident-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .guided-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .incident-context {
    padding: 16px;
    gap: 16px;
  }
  .unit-card {
    padding: 14px;
  }
  .unit-switch {
    flex-direction: column;
  }
  .comparison-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .comparison-grid > div + div {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}
@media print {
  .report-workspace {
    display: block;
  }
  .section-nav {
    display: none;
  }
  .incident-context {
    break-inside: avoid;
  }
  .report-workspace aside {
    position: static;
  }
  .unit-card {
    break-inside: avoid;
  }
}

.cad-history {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cad-history > h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
}
.cad-history .history-summary,
.cad-history .history-values {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr);
  gap: 0.5rem 1rem;
  margin: 1.2rem 0;
}
.history-summary dt,
.history-values dt {
  color: var(--muted);
}
.history-summary dd,
.history-values dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.history-event {
  border-left: 3px solid #a7c9c2;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  background: #f6f9fa;
}
.history-event-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.outcome-section {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 16px;
}
.outcome-section .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.summary-bar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(5rem, 1fr) 3rem;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.summary-bar meter {
  width: 100%;
}
.summary-bar strong {
  text-align: right;
}
@media (max-width: 480px) {
  .summary-bar {
    grid-template-columns: minmax(0, 1fr) 3rem;
  }
  .summary-bar meter {
    grid-column: 1;
    grid-row: 2;
  }
  .summary-bar strong {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}
.attachment-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  margin: 0.8rem 0;
  overflow-wrap: anywhere;
}
.attachment-hash {
  font-family: monospace;
  overflow-wrap: anywhere;
}
.attachment-dialog {
  width: min(32rem, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-wrap: anywhere;
}
.attachment-dialog::backdrop {
  background: #102a3699;
}
.attachment-dialog progress {
  width: 100%;
}
.unit-narrative {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
}
.unit-contribution {
  overflow-wrap: anywhere;
}
.unit-version {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.queue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.builder-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.builder-results meter {
  display: block;
  width: 100%;
  min-width: 5rem;
  margin-top: 0.3rem;
}
.builder-results .builder-timing {
  min-width: 62rem;
}
.builder-results .builder-counts {
  min-width: 34rem;
}
.builder-results caption {
  text-align: left;
}
.builder-quality {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1rem;
}
.builder-quality dt {
  text-transform: capitalize;
}
.builder-quality dd {
  margin: 0;
}

#geography-view {
  min-width: 0;
}
#geography-view .page-heading {
  margin-bottom: 1.5rem;
}
#geography-view .page-heading h1 {
  margin: 0.4rem 0;
}
#geography-view .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0.5rem 1.25rem;
}
#geography-view .table-scroll {
  width: 100%;
  overflow-x: auto;
}
.geo-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}
.geo-stats strong,
.geo-stats span {
  display: block;
}
.geo-stats strong {
  font-size: 2rem;
  color: var(--green);
  line-height: 1.4;
}
.geo-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}
.geo-map-title,
.geo-drill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.geo-map-title h2 {
  margin-top: 0.3rem;
}
.geo-canvas {
  width: 100%;
  height: clamp(320px, 35vw, 480px);
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
}
.geo-map-caption {
  margin-bottom: 0;
}
.geo-table {
  min-width: 42rem;
}
.geo-trends {
  min-width: 29rem;
}
.geo-trends meter {
  width: 100%;
  min-width: 8rem;
  accent-color: var(--green);
}
.geo-drill-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
#geography-view .card {
  margin-bottom: 1rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

#nfirs-view {
  min-width: 0;
}
#nfirs-view fieldset {
  min-width: 0;
}
#nfirs-view pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 32rem;
  overflow: auto;
}
#nfirs-view .hint,
#nfirs-recovery {
  overflow-wrap: anywhere;
}
.nfirs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.5rem 1rem;
}
.nfirs-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 1rem 0;
}
.nfirs-table-wrap table {
  min-width: 35rem;
  width: 100%;
  border-collapse: collapse;
}
.nfirs-table-wrap th,
.nfirs-table-wrap td {
  text-align: left;
  padding: 0.65rem;
  border-bottom: 1px solid var(--line, #dbe3e7);
  vertical-align: top;
}
.nfirs-table-wrap td {
  overflow-wrap: anywhere;
  max-width: 24rem;
}
#nfirs-view .card > button {
  margin: 0.3rem 0.4rem 0.3rem 0;
}
#nfirs-view input[type="file"] {
  max-width: 100%;
}

#performance-view {
  min-width: 0;
}
#performance-view fieldset {
  min-width: 0;
}
#performance-view pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
}
#performance-view .hint,
#performance-view .notice {
  overflow-wrap: anywhere;
}
.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.5rem 1rem;
}
.performance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.performance-stat {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
}
.performance-stat > span {
  display: block;
  color: var(--muted);
}
.performance-stat strong {
  display: block;
  font-size: 1.8rem;
  margin: 0.7rem 0;
  overflow-wrap: anywhere;
}
#performance-view .card > button {
  margin: 0.3rem 0.4rem 0.3rem 0;
}
.performance-selection {
  margin: 1.2rem 0;
}
.performance-selection > summary {
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 650;
}
.performance-selection[open] > summary {
  margin-bottom: 1rem;
}

/* Retained CAD identity observations remain read-only and wrap on phones. */
#cad-identity-panel .identity-observation p,
#cad-identity-panel details,
#cad-identity-panel .identity-key {
  overflow-wrap: anywhere;
}
#cad-identity-panel .identity-key {
  display: block;
  font-size: 1.15rem;
  margin: 10px 0;
}
#cad-identity-panel .identity-result {
  font-weight: 650;
}
#cad-identity-panel .identity-candidates {
  margin-top: 24px;
}

.device-recovery {
  margin: 0 0 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow-wrap: anywhere;
}
.device-recovery > summary {
  cursor: pointer;
  font-size: 0.9rem;
}
.device-recovery button {
  margin: 0.3rem 0.4rem 0.3rem 0;
}
.recovery-copy {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 650px) {
  .device-recovery button {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
  }
}

/* Administration: accounts table and inline checkboxes */
table.accounts { width: 100%; border-collapse: collapse; }
table.accounts th, table.accounts td { text-align: left; padding: 6px 8px; border-bottom: 1px solid currentColor; border-bottom-color: rgba(127, 127, 127, 0.25); vertical-align: middle; }
table.accounts td button { margin: 2px 4px 2px 0; }
label.check { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { table.accounts thead { display: none; } table.accounts tr, table.accounts td { display: block; } }
