:root {
  color-scheme: light;
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-muted: #eef1ef;
  --text: #17211d;
  --muted: #65706b;
  --line: #d8dedb;
  --brand: #0f6647;
  --brand-strong: #0a4c35;
  --accent: #245b8f;
  --danger: #a43b36;
  --warning: #95620a;
  --shadow: 0 10px 28px rgba(23, 33, 29, 0.09);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* These project-workspace overrides must follow the shared responsive rules. */
.status-band.user-management-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 620px) {
  .status-band.user-management-summary {
    grid-template-columns: 1fr;
  }
}

body[data-project-id], body.platform-home, body.platform-gated { visibility: hidden; }
body.platform-access-ready { visibility: visible; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.platform-home {
  background: var(--bg);
}


.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 26px; }
.access-source { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.platform-positioning {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 42px;
  margin-top: 42px;
  padding: 30px 0 4px;
  border-top: 1px solid var(--line);
}
.platform-positioning h2 { margin: 0 0 12px; font-size: 24px; }
.platform-positioning h3 { margin: 2px 0 12px; font-size: 17px; }
.platform-positioning p { margin: 0 0 12px; color: var(--muted); }
.platform-positioning a { color: var(--brand); font-weight: 700; }
.project-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.project-card:hover { border-color: var(--brand); }
.project-card-locked { background: var(--surface-muted); }
.project-card h3 { margin: 20px 0 8px; font-size: 19px; line-height: 1.25; }
.project-card p { margin: 0; color: var(--muted); }
.project-state { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.project-card-action { margin-top: auto; padding-top: 24px; }
.project-open { display: inline-flex; font-weight: 750; }
.access-request-dialog { width: min(520px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.access-request-dialog::backdrop { background: rgba(23, 33, 29, 0.45); }
.access-request-dialog form { display: grid; gap: 18px; }
.access-request-dialog textarea { width: 100%; resize: vertical; }
.request-project-name { margin: 0; font-weight: 750; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.security-note, .boundary-warning { display: flex; gap: 16px; margin-top: 30px; padding: 18px 20px; border-left: 4px solid var(--warning); background: #fff8e8; color: #664b19; }
.check-row { display: flex; align-items: center; gap: 9px; }
.access-table { width: 100%; border-collapse: collapse; }
.access-table th, .access-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.access-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }

.inspection-copilot-launcher {
  position: static;
  flex: 0 0 auto;
  align-self: flex-end;
  margin-left: auto;
}

.inspection-copilot {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  width: min(410px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 40px));
  grid-template-rows: auto minmax(170px, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(23, 33, 29, 0.2);
}

.inspection-copilot[hidden] { display: none; }

.inspection-copilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.inspection-copilot-header h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.preview-badge {
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.inspection-copilot-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
  background: var(--bg);
}

.inspection-copilot-message {
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.inspection-copilot-message.user {
  align-self: flex-end;
  border-color: var(--brand);
  background: #eef8f3;
}

.inspection-copilot-message span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.inspection-copilot-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.inspection-copilot-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.inspection-copilot-suggestion {
  flex: 0 0 min(230px, 72vw);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.inspection-copilot-suggestion:hover,
.inspection-copilot-suggestion:focus-visible {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.inspection-copilot-form {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.inspection-copilot-form label {
  font-size: 12px;
  font-weight: 750;
}

.inspection-copilot-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}

.inspection-copilot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.inspection-copilot-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.inspection-copilot-boundary {
  margin: 0;
  padding: 10px 18px 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .inspection-copilot-launcher {
    width: fit-content;
    margin-left: auto;
  }

  .inspection-copilot {
    inset: 0;
    width: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
}
.login-projects { margin: 18px 0; border: 1px solid var(--line); }
@media (max-width: 850px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 200px; }
  .app-header { grid-template-columns: 1fr auto; padding: 10px 14px; }
  .app-nav { grid-column: 1 / -1; overflow-x: auto; order: 3; }
}

.analytics-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.analytics-list {
  border-top: 1px solid var(--line);
}

.analytics-list-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.analytics-list-row span {
  overflow-wrap: anywhere;
}

.analytics-list-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.analytics-list-copy small {
  color: var(--muted);
  font-size: 11px;
}

.user-management-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.user-management-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  align-items: start;
  gap: 28px;
}

.user-directory,
.user-detail {
  min-width: 0;
}

.directory-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 12px;
}

.directory-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.directory-view {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.directory-view:last-child { border-right: 0; }
.directory-view.active { background: var(--surface-muted); color: var(--brand-strong); }

.directory-controls input,
.directory-controls select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  background: var(--surface);
}

.user-directory-list {
  display: grid;
  max-height: 670px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.user-directory-list > div + div {
  border-top: 1px solid var(--line);
}

.user-directory-item {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 14px 16px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.user-directory-item:hover,
.user-directory-item.selected {
  border-left-color: var(--brand);
  background: var(--surface-muted);
}

.user-directory-item > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-item-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.directory-item-meta > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.state-badge.enabled { background: #e3f2e9; color: #185b3d; }
.state-badge.disabled { background: #f5e7e5; color: #85332f; }
.state-badge.pending { background: #fff0cf; color: #76500a; }

.user-detail {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.user-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.user-detail-heading h2 {
  margin: 0;
  font-size: 22px;
}

.user-detail form {
  display: grid;
}

.identity-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px 0;
}

.identity-fields label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.identity-fields input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  background: var(--surface);
}

.identity-fields input[readonly] {
  background: var(--surface-muted);
  color: var(--muted);
}

.permission-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(280px, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.permission-section h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.permission-section p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.project-permission-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.project-permission,
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
}

.project-permission:has(input:checked),
.switch-row:has(input:checked) {
  border-color: #6fa68e;
  background: #f3f8f5;
}

.project-permission input,
.switch-row input {
  flex: none;
  margin-top: 3px;
}

.project-permission span,
.switch-row span {
  display: grid;
  gap: 2px;
}

.project-permission small,
.switch-row small {
  color: var(--muted);
  font-size: 11px;
}

.request-review {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--warning);
  background: #fff8e8;
}

.request-review p {
  margin: 5px 0 0;
}

.request-review small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.analysis-project-list {
  display: grid;
  gap: 12px;
}

.analysis-project {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.analysis-project-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.analysis-project h3 {
  margin: 8px 0 4px;
  font-size: 17px;
}

.analysis-project p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.analysis-project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.analysis-project-metric {
  padding: 5px 8px;
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.analysis-project-actions {
  display: grid;
  grid-template-columns: minmax(240px, 0.5fr);
  margin-top: 14px;
}

.analysis-project-actions .route-link {
  min-height: 88px;
}

.workspace-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  gap: 6px;
  border: 1px dashed #aebbb5;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
}

.workspace-empty strong {
  color: var(--text);
  font-size: 15px;
}

@media (max-width: 900px) {
  .user-management-layout,
  .permission-section {
    grid-template-columns: 1fr;
  }

  .user-detail {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .directory-controls {
    grid-template-columns: 1fr 1fr;
  }

  .directory-controls .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .user-management-summary,
  .identity-fields,
  .directory-controls {
    grid-template-columns: 1fr;
  }

  .directory-controls .search-field {
    grid-column: auto;
  }

  .analysis-project-heading {
    display: grid;
  }

  .analysis-project-heading .button {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 58px;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

.brand span {
  color: var(--brand);
}

.app-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.app-nav a {
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav a:hover,
.app-nav a[aria-current="page"] {
  background: var(--surface-muted);
  color: var(--text);
}

.session-area {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.session-email {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-shell.wide {
  width: min(1500px, calc(100% - 40px));
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.week-picker {
  display: grid;
  grid-template-columns: minmax(170px, 220px) auto auto;
  align-items: end;
  gap: 8px;
}

.week-picker label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weekly-coverage {
  display: grid;
  grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  background: var(--surface);
}
.weekly-coverage[hidden] { display: none; }
.weekly-coverage[data-state="attention"] { border-left-color: var(--warning); }
.weekly-coverage[data-state="unavailable"] { border-left-color: var(--muted); }
.weekly-coverage-metric > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.weekly-coverage-metric strong { font-size: 28px; line-height: 1; }
.weekly-coverage-metric span { color: var(--muted); font-size: 13px; font-weight: 700; }
.weekly-coverage-explanation h2 { margin: 0 0 5px; font-size: 15px; }
.weekly-coverage-explanation p { margin: 0; color: var(--muted); }

.weekly-cost-heading,
.weekly-cost-detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.weekly-cost-heading p,
.weekly-cost-detail-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.weekly-cost-controls {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  gap: 6px 10px;
  min-width: min(100%, 390px);
}

.weekly-cost-controls label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pipeline-artifact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
  min-width: 0;
}

.pipeline-artifact-actions .button {
  min-height: 36px;
}

.status-band.weekly-cost-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.pipeline-cost-section .status-band.weekly-cost-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pipeline-cost-section h3 {
  margin: 24px 0 12px;
  font-size: 15px;
}

.pipeline-step-cost-table {
  min-width: 1050px;
}

.pipeline-cost-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.weekly-cost-chart {
  display: grid;
  gap: 9px;
  margin: 22px 0;
}

.weekly-cost-chart-row {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-height: 26px;
  font-size: 12px;
}

.weekly-cost-chart-row > span:first-child {
  color: var(--muted);
}

.weekly-cost-chart-row strong {
  text-align: right;
}

.weekly-cost-chart-track {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-muted);
}

.weekly-cost-chart-track span {
  display: block;
  min-width: 0;
}

.weekly-cost-chart-aws {
  background: var(--brand);
}

.weekly-cost-chart-google {
  background: var(--accent);
}

.weekly-cost-detail-heading {
  margin-top: 26px;
}

.weekly-cost-detail-heading h3,
.weekly-cost-unmeasured-heading {
  margin: 0;
  font-size: 15px;
}

.weekly-cost-detail-heading label {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weekly-cost-detail-heading select {
  min-width: 280px;
}

.weekly-cost-unmeasured-heading {
  margin-top: 24px;
}

.weekly-cost-unmeasured .analytics-list-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(280px, 1fr);
}

.weekly-cost-unmeasured span {
  color: var(--muted);
}

.week-picker select,
.week-picker .button {
  min-height: 38px;
}

.content-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.status-item {
  min-height: 92px;
  padding: 16px;
  background: var(--surface);
}

.status-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-value {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 650;
}

.release-build-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.release-history { display: grid; gap: 14px; }
.release-entry {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.release-entry header, .support-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.release-entry h3, .support-panel h2 { margin: 0; font-size: 18px; }
.release-entry header p, .support-panel p { margin: 6px 0 0; color: var(--muted); }
.release-entry-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.release-entry ul { margin: 18px 0 0; padding-left: 20px; }
.release-entry li + li { margin-top: 8px; }
.support-panel {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.route-link {
  display: block;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.route-link:hover {
  border-color: var(--brand);
}

.route-link strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
}

.route-link span {
  color: var(--muted);
  font-size: 13px;
}

.activity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-date-range input {
  min-height: 36px;
}

.muted-copy {
  color: var(--muted);
  font-size: 12px;
}

.activity-actions label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.activity-actions select {
  height: 38px;
  padding: 0 8px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  background: var(--surface);
}

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

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.activity-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e5e9e7;
  text-align: left;
  vertical-align: middle;
}

.activity-table th {
  background: var(--surface-muted);
  color: #4c5852;
  font-size: 11px;
  text-transform: uppercase;
}

.activity-table td strong,
.activity-table td span {
  display: block;
}

.activity-table td span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.activity-table .activity-path {
  max-width: 260px;
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-number {
  font-variant-numeric: tabular-nums;
  text-align: right !important;
}

.activity-state {
  color: var(--muted);
  font-weight: 700;
}

.activity-state.active {
  color: var(--brand);
}

.analytics-scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.analytics-page-status {
  min-height: 20px;
  margin: -10px 0 14px;
  color: var(--muted);
}

.analytics-page-status[data-state="error"],
.timeline-status[data-state="error"] {
  color: var(--danger);
}

.analytics-page-layout {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}

.analytics-section-rail {
  position: sticky;
  top: 82px;
  min-width: 0;
}

.analytics-section-nav {
  display: grid;
  border-left: 2px solid var(--line);
}

.analytics-section-nav a {
  margin-left: -2px;
  padding: 9px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.analytics-section-nav a:hover {
  color: var(--text);
}

.analytics-section-nav a[aria-current="location"] {
  border-left-color: var(--brand);
  color: var(--brand-strong);
}

.analytics-scope-summary {
  display: grid;
  gap: 3px;
  margin-top: 20px;
  padding: 0 12px;
}

.analytics-scope-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.analytics-scope-summary strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.analytics-content {
  min-width: 0;
}

.analytics-page-section {
  scroll-margin-top: 76px;
}

.analytics-overview-section {
  padding-bottom: 22px;
}

.analytics-overview-section > .section-heading {
  align-items: flex-start;
}

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

.overview-evidence-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(480px, 1.2fr);
  gap: 12px;
  margin-top: 16px;
}

.chart-panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.overview-metric-table th,
.overview-metric-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.overview-metric-table th:first-child,
.overview-metric-table td:first-child {
  text-align: left;
}

.overview-metric-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.section-actions {
  display: flex;
  gap: 6px;
}

.similarity-chart-shell {
  min-height: 280px;
  overflow-x: auto;
}

.similarity-chart-shell canvas {
  display: block;
}

.timeline-heading,
.composition-heading {
  align-items: end;
  gap: 18px;
}

.analytics-timeline-section {
  scroll-margin-top: 74px;
}

.analytics-view-tabs {
  display: flex;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
  margin: 4px 0 20px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.analytics-view-tabs button {
  flex: none;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.analytics-view-tabs button:hover {
  color: var(--text);
}

.analytics-view-tabs button[aria-selected="true"] {
  border-bottom-color: var(--brand);
  color: var(--brand-strong);
}

.analytics-view-tabs button:focus-visible,
.analytics-section-nav a:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(15, 102, 71, 0.35);
  outline-offset: -2px;
}

.analytics-tab-panel {
  min-width: 0;
}

.timeline-status {
  margin-top: 8px;
  color: var(--muted);
}

.timeline-controls {
  display: grid;
  grid-template-columns: 130px minmax(210px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.timeline-chart-shell {
  width: 100%;
  min-height: 410px;
  overflow-x: auto;
  overflow-y: hidden;
}

.timeline-chart {
  display: block;
}

.timeline-note {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.composition-heading {
  margin-top: 6px;
}

.composition-heading .field {
  min-width: 240px;
}

.timeline-composition {
  display: grid;
  gap: 9px;
}

.timeline-composition-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.timeline-composition-content {
  display: grid;
  gap: 7px;
}

.timeline-composition-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--text);
  font-size: 11px;
}

.timeline-composition-values span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
  background: var(--composition-color);
  content: "";
}

.timeline-stacked-bar {
  display: flex;
  width: 100%;
  height: 22px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-muted);
}

.timeline-stacked-bar span {
  display: block;
  height: 100%;
}

.timeline-composition-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 20px 132px;
  color: var(--muted);
  font-size: 11px;
}

.timeline-composition-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.timeline-composition-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.timeline-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.timeline-table th,
.timeline-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-table th:first-child,
.timeline-table td:first-child,
.timeline-table th:nth-child(7),
.timeline-table td:nth-child(7) {
  text-align: left;
}

.timeline-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.bar-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.distribution-controls {
  display: flex;
  align-items: end;
  gap: 12px;
}

.distribution-mode-field {
  margin: 0;
}

.distribution-pie {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.distribution-pie[hidden] {
  display: none;
}

#export-distribution-csv {
  margin: 14px 0 0 auto;
}

.donut-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 12px;
}

.classification-tabs {
  margin-bottom: 16px;
}

.classification-view {
  min-height: 224px;
}

.classification-panel {
  width: min(760px, 100%);
}

.chart-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.chart-panel h3 {
  margin: 0 0 14px;
  font-size: 14px;
}

.chart-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.chart-panel-heading h3 {
  margin: 0;
}

.distribution-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
}

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

.distribution-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.distribution-table th:nth-child(1),
.distribution-table td:nth-child(1),
.distribution-table th:nth-child(3),
.distribution-table td:nth-child(3),
.distribution-table th:nth-child(4),
.distribution-table td:nth-child(4) {
  width: 100px;
  text-align: right;
}

.bar-chart {
  display: grid;
  gap: 11px;
}

.bar-chart-row {
  min-width: 0;
}

.bar-chart-label {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 11px;
}

.bar-chart-label span {
  overflow: hidden;
  color: #46524c;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-chart-label strong {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.bar-chart-track {
  height: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: #e7ebe9;
}

.bar-chart-track span {
  display: block;
  height: 100%;
  border-radius: 3px;
}

.donut-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.donut-chart {
  width: 190px;
  height: 190px;
}

.chart-legend {
  display: grid;
  gap: 7px;
}

.chart-legend > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.chart-legend > div > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.chart-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-strong);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: #aeb8b3;
  background: var(--surface-muted);
}

.button.subtle {
  min-height: 32px;
  padding: 5px 9px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button.subtle:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.icon-button:hover {
  background: var(--surface-muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(190px, 1.2fr) auto minmax(250px, 1.2fr);
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.toggle-control {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.toggle-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.link-role-badge {
  display: inline-flex;
  min-width: 70px;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 750;
}

.link-role-badge.standard {
  background: #e9eeeb;
  color: #44524c;
}

.link-role-badge.parent {
  background: #dcefe7;
  color: #14583e;
}

.link-role-badge.child {
  background: #fff0cf;
  color: #76500a;
}

.link-role-button {
  border: 1px solid currentcolor;
  cursor: pointer;
  font-family: inherit;
}

.link-role-button:hover,
.link-role-button:focus-visible {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand);
}

.relationship-dialog {
  width: min(720px, calc(100% - 32px));
}

.relationship-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.relationship-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.relationship-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.relationship-identity {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.relationship-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relationship-evidence {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.display-settings {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.display-settings summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.display-settings-summary {
  padding: 2px 6px;
  border-radius: 3px;
  background: #e8efeb;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.display-settings-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
  gap: 12px;
  padding: 4px 0 14px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
}

.child-asset-setting p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  background: #ffffff;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(15, 102, 71, 0.15);
}

.field select:disabled {
  background: var(--surface-muted);
  color: #909a95;
}

.asset-search-field {
  position: relative;
}

.asset-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid #aebbb5;
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.asset-suggestion {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.asset-suggestion:last-child {
  border-bottom: 0;
}

.asset-suggestion:hover,
.asset-suggestion.active {
  background: var(--surface-muted);
}

.asset-suggestion strong {
  color: var(--accent);
  font-size: 14px;
}

.asset-suggestion span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.asset-export-controls {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
}

.asset-export-controls .button {
  min-height: 40px;
}

.column-filters {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.column-sorts {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.column-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(145px, 0.7fr) minmax(180px, 1fr) 36px;
  gap: 8px;
}

.column-sort-row {
  display: grid;
  grid-template-columns: 36px minmax(190px, 1fr) minmax(140px, 0.5fr) 36px 36px 36px;
  gap: 8px;
}

.column-sort-row select {
  width: 100%;
  height: 36px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  background: var(--surface);
}

.sort-priority {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.column-filter-row select,
.column-filter-row input {
  width: 100%;
  height: 36px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  background: var(--surface);
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  color: var(--muted);
  font-size: 12px;
}

.results-meta > div:first-child {
  display: flex;
  gap: 2px;
}

.table-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.table-actions .button {
  min-height: 34px;
  padding: 5px 10px;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.results-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.results-table th,
.results-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e5e9e7;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.results-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-muted);
  color: #4c5852;
  font-size: 11px;
  text-transform: uppercase;
}

.table-sort-button {
  display: inline-flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}

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

.table-sort-indicator {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.site-plan-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-plan-actions a {
  white-space: nowrap;
}

.results-table tbody tr:hover {
  background: #f7faf8;
}

.results-table tbody tr.selected {
  background: #edf6f1;
}

.results-table .selection-column,
.results-table .pinned-column {
  position: sticky;
  z-index: 2;
  background: var(--surface);
}

.results-table thead .selection-column,
.results-table thead .pinned-column {
  z-index: 4;
  background: var(--surface-muted);
}

.results-table tbody tr:hover .selection-column,
.results-table tbody tr:hover .pinned-column {
  background: #f7faf8;
}

.results-table tbody tr.selected .selection-column,
.results-table tbody tr.selected .pinned-column {
  background: #edf6f1;
}

.results-table .selection-column {
  left: 0;
}

.results-table [data-pinned-column="Path"] {
  box-shadow: 3px 0 4px rgba(23, 33, 29, 0.08);
}

.asset-select {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

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

.asset-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 750;
}

.cell-secondary {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9eeeb;
  color: #46524c;
  font-size: 11px;
  font-weight: 750;
}

.badge.new {
  background: #e6f0f8;
  color: #285d87;
}

.badge.assigned {
  background: #fff2d8;
  color: #80590c;
}

.badge.repaired,
.badge.assessed {
  background: #e3f2ea;
  color: #226046;
}

.priority-high {
  color: var(--danger);
  font-weight: 750;
}

.priority-medium {
  color: var(--warning);
  font-weight: 750;
}

.empty-state {
  padding: 48px 20px !important;
  color: var(--muted);
  text-align: center !important;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 62px;
}

.pagination-actions {
  display: flex;
  grid-column: 1;
  justify-self: start;
  gap: 6px;
}

.pagination-status {
  grid-column: 2;
  justify-self: center;
  color: var(--muted);
  font-size: 12px;
}

.page-jump {
  display: flex;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  gap: 7px;
}

.page-jump label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.page-jump input {
  width: 72px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
}

.page-jump .button {
  min-width: 54px;
}

.road-plan-workspace {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.road-plan-view-tabs {
  display: flex;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.road-plan-view-tabs button {
  min-width: 140px;
  padding: 11px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.road-plan-view-tabs button:hover {
  color: var(--text);
}

.road-plan-view-tabs button[aria-selected="true"] {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.road-plan-view-tabs button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.road-plan-history-panel {
  padding-top: 28px;
}

.road-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.road-plan-header h2 {
  margin: 0;
  font-size: 20px;
}

.road-plan-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.road-history-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(160px, 220px) minmax(130px, 170px) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.road-history-filter-actions,
.road-history-actions,
.road-history-metadata-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.road-history-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.35fr);
  gap: 22px;
  margin-top: 20px;
}

.road-history-list-section,
.road-history-detail {
  min-width: 0;
}

.road-history-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.road-history-item {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.road-history-item:hover {
  background: var(--surface-muted);
}

.road-history-item[data-selected="true"] {
  border-left-color: var(--brand);
  background: #f3f8f5;
}

.road-history-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.road-history-item > span:not(.road-history-item-heading),
.road-history-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.road-history-item-state,
.road-history-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.road-history-badge[data-adopted="true"] {
  border-color: #8eb7a7;
  background: #edf7f2;
  color: var(--brand);
}

.road-history-pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.road-history-detail {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.road-history-detail-empty {
  padding: 36px 0;
  color: var(--muted);
}

.road-history-detail-empty h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
}

.road-history-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  margin: 12px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.road-history-metrics > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.road-history-metrics > div:last-child {
  border-right: 0;
}

.road-history-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.road-history-metrics strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.road-history-stops-section {
  margin-top: 22px;
}

.road-history-stops-section h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

.road-history-stops {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.road-history-stops li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.road-history-stop-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.road-history-stops strong,
.road-history-stops span,
.road-history-stops small {
  display: block;
}

.road-history-stops span,
.road-history-stops small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.road-history-metadata {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 200px);
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.road-history-adopted-control {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.road-history-name-field,
.road-history-notes-field,
.road-history-metadata-actions {
  grid-column: 1 / -1;
}

.road-history-notes-field textarea {
  width: 100%;
  min-height: 92px;
  padding: 9px 10px;
  border: 1px solid #bcc6c1;
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.road-history-metadata-actions {
  justify-content: flex-end;
}

.road-history-metadata-actions span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .road-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .road-history-layout {
    grid-template-columns: 1fr;
  }

  .road-history-detail {
    padding-top: 20px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

@media (max-width: 620px) {
  .road-history-filters,
  .road-history-metadata {
    grid-template-columns: 1fr;
  }

  .road-history-filter-actions,
  .road-history-notes-field,
  .road-history-metadata-actions {
    grid-column: 1;
  }

  .road-history-metrics {
    grid-template-columns: 1fr;
  }

  .road-history-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .road-plan-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.road-plan-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.road-plan-api-estimate {
  grid-column: 1 / -1;
  min-height: 20px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.road-plan-api-estimate[data-state="warning"] {
  color: #855a00;
}

.road-plan-api-estimate[data-state="error"] {
  color: var(--danger);
}

.road-place-form {
  display: grid;
  grid-template-columns:
    minmax(120px, 0.45fr)
    minmax(140px, 0.55fr)
    minmax(170px, 0.7fr)
    minmax(260px, 1.3fr)
    auto;
  align-items: end;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid #d59a1f;
  border-radius: 6px;
  background: var(--surface);
}

.road-place-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.segmented-field {
  min-width: 190px;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 40px;
  padding: 3px;
  border: 1px solid #bcc6c1;
  border-radius: 5px;
  background: var(--surface-muted);
}

.segmented-control label {
  display: contents;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.segmented-control input:checked + span {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(23, 33, 29, 0.12);
  color: var(--text);
}

.road-plan-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(520px, 1.6fr);
  gap: 18px;
  margin-top: 18px;
}

.road-plan-sidebar {
  min-width: 0;
}

.road-boundary-places {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.road-boundary-place {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #b9c8c0;
  border-left: 3px solid var(--brand);
  border-radius: 5px;
  background: #f3f8f5;
}

.road-boundary-place.empty {
  border-left-color: var(--line);
  background: var(--surface-muted);
}

.road-boundary-place strong,
.road-boundary-place span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.road-boundary-place span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.road-plan-assets,
.road-plan-legs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.road-plan-asset {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.road-plan-asset:first-child {
  border-top: 1px solid var(--line);
}

.road-plan-asset.dragging {
  opacity: 0.45;
}

.road-plan-asset.custom-stop {
  border-left: 3px solid #d59a1f;
  background: #fffaf0;
}

.road-plan-drag {
  color: var(--muted);
  cursor: grab;
  font-size: 18px;
  text-align: center;
}

.road-plan-asset strong,
.road-plan-asset span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.road-plan-asset .road-plan-asset-address {
  margin-top: 3px;
  color: #46524c;
}

.road-plan-asset span {
  color: var(--muted);
  font-size: 11px;
}

.remove-road-asset {
  width: 32px;
  height: 32px;
}

.road-plan-asset-actions {
  display: flex;
  gap: 4px;
}

.road-plan-asset-actions .icon-button {
  font-size: 14px;
}

.road-plan-message {
  min-height: 42px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.road-plan-message.error {
  color: var(--danger);
}

.road-plan-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--line);
}

.road-plan-summary div {
  padding: 12px;
  background: var(--surface);
}

.road-plan-summary span,
.road-plan-navigation span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.road-plan-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
}

.road-plan-feasibility {
  margin-top: 10px;
  padding: 11px 12px;
  border-left: 3px solid var(--warning);
  background: #fff8e8;
  color: #664b19;
  font-size: 12px;
  line-height: 1.45;
}

.road-plan-navigation {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.road-plan-navigation img {
  width: 116px;
  height: 116px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.road-plan-navigation .button {
  width: 100%;
  margin-bottom: 7px;
}

.export-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.export-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.road-plan-map-column {
  min-width: 0;
}

.road-plan-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.road-plan-map-legend[hidden] {
  display: none;
}

.road-plan-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.road-plan-map-legend i {
  width: 11px;
  height: 11px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  background: var(--accent);
}

.road-plan-map-legend i[data-marker="start"] { background: var(--brand); }
.road-plan-map-legend i[data-marker="stop"] { background: var(--warning); }
.road-plan-map-legend i[data-marker="end"] { background: var(--danger); }

.road-plan-map {
  width: 100%;
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e7ebe9;
}

.road-plan-map-empty {
  display: grid;
  min-height: inherit;
  margin: 0;
  place-items: center;
  padding: 24px;
  color: #4c5852;
  text-align: center;
}

.road-plan-legs {
  margin-top: 14px;
}

.road-plan-leg {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.road-plan-leg-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.road-plan-leg-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.road-plan-leg-header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.road-plan-leg details {
  margin-top: 8px;
}

.road-plan-leg-addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.road-plan-leg-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border-left: 3px solid #9fb9aa;
  background: var(--surface);
}

.road-plan-leg-address span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.road-plan-leg-address p {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  user-select: text;
}

.road-plan-leg-address .button {
  min-width: 52px;
}

.road-plan-leg summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
}

.road-plan-instructions {
  margin: 10px 0 0;
  padding-left: 24px;
  color: var(--muted);
  font-size: 12px;
}

.road-plan-warning {
  margin-top: 5px;
  color: var(--warning) !important;
  white-space: normal !important;
}

.detail-dialog {
  width: min(860px, calc(100% - 30px));
  max-height: min(820px, calc(100vh - 40px));
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(10, 20, 16, 0.54);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dialog-header h2 {
  margin: 0;
  font-size: 19px;
}

.dialog-body {
  padding: 4px 22px 26px;
}

.detail-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.detail-grid .wide {
  grid-column: 1 / -1;
}

.column-dialog {
  width: min(780px, calc(100% - 30px));
  height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.column-dialog::backdrop {
  background: rgba(10, 20, 16, 0.54);
}

.column-dialog-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  height: calc(100% - 128px);
  padding: 16px 22px;
}

.column-dialog-actions {
  display: flex;
  gap: 8px;
}

.column-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 1px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--line);
}

.column-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--surface);
  cursor: pointer;
}

.column-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.column-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-option:has(input:disabled) {
  color: var(--muted);
  cursor: default;
}

.column-dialog-footer {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
}

.column-dialog-footer span {
  color: var(--muted);
  font-size: 12px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #e9eeeb;
}

.login-shell {
  width: min(420px, 100%);
}

.login-brand {
  margin-bottom: 18px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.login-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0 0 6px;
  font-size: 24px;
  text-align: center;
}

.login-panel > p {
  margin: 0 0 24px;
  color: var(--muted);
  text-align: center;
}

.login-panel .button {
  width: 100%;
  margin-top: 16px;
}

.login-panel .button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.form-status.timeline-status {
  color: var(--muted);
}

.form-status.timeline-status[data-state="error"] {
  color: var(--danger);
}

.form-status[data-state="loading"],
.form-status[data-state="ready"] {
  color: var(--muted);
}

.preformatted {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101713;
  color: #dce8e1;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 8px 18px;
  }

  .app-nav {
    order: 3;
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .session-area {
    justify-self: end;
  }

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

  .platform-positioning,
  .weekly-coverage {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

  .road-place-actions {
    grid-column: 1 / -1;
  }

  .road-plan-layout {
    grid-template-columns: minmax(260px, 0.8fr) minmax(430px, 1.2fr);
    overflow-x: auto;
  }

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

  .analytics-page-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .analytics-section-rail {
    position: sticky;
    z-index: 15;
    top: 102px;
    padding: 5px 0 8px;
    background: var(--surface);
  }

  .analytics-page-section {
    scroll-margin-top: 180px;
  }

  .analytics-section-nav {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    border-left: 0;
    scrollbar-width: thin;
  }

  .analytics-section-nav a {
    flex: none;
    margin: 0 0 -1px;
    padding: 9px 11px;
    border-bottom: 2px solid transparent;
    border-left: 0;
  }

  .analytics-section-nav a[aria-current="location"] {
    border-bottom-color: var(--brand);
    border-left-color: transparent;
  }

  .analytics-scope-summary {
    display: flex;
    gap: 8px;
    margin-top: 9px;
    padding: 0;
  }

  .bar-chart-grid {
    grid-template-columns: 1fr;
  }

  .overview-evidence-grid {
    grid-template-columns: 1fr;
  }

  .donut-chart-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .filter-actions {
    align-self: end;
  }

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

  .column-sort-row {
    grid-template-columns: 36px minmax(180px, 1fr) minmax(140px, 0.7fr) repeat(3, 36px);
    overflow-x: auto;
  }
}

@media (max-width: 680px) {
  .relationship-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 12px;
  }

  .session-email {
    display: none;
  }

  .app-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 2px;
    overflow: visible;
  }

  .app-nav a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .session-area {
    gap: 6px;
  }

  .page-shell,
  .page-shell.wide {
    width: min(100% - 24px, 1500px);
    padding-top: 20px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .weekly-cost-heading,
  .weekly-cost-detail-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-cost-controls {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .weekly-cost-controls label {
    grid-column: 1;
  }

  .weekly-cost-chart-row {
    grid-template-columns: 92px minmax(100px, 1fr) 78px;
    gap: 8px;
  }

  .weekly-cost-detail-heading label {
    margin-left: 0;
  }

  .weekly-cost-detail-heading select {
    width: 100%;
    min-width: 0;
  }

  .weekly-cost-unmeasured .analytics-list-row {
    grid-template-columns: 1fr;
  }

  .week-picker {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .week-picker label {
    grid-column: 1;
  }

  .status-band,
  .activity-summary,
  .route-grid,
  .filter-bar,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .release-entry header,
  .support-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .release-entry-meta { justify-items: start; }

  .status-band.weekly-cost-summary {
    grid-template-columns: 1fr;
  }

  .pipeline-cost-section .status-band.weekly-cost-summary,
  .pipeline-cost-detail-grid {
    grid-template-columns: 1fr;
  }

  .analytics-scope,
  .analytics-summary,
  .donut-chart-grid,
  .timeline-controls {
    grid-template-columns: 1fr;
  }

  .analytics-overview-section > .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-view-tabs button {
    padding-inline: 10px;
    font-size: 12px;
  }

  .analytics-section-rail {
    top: 88px;
    padding-bottom: 5px;
  }

  .analytics-page-section {
    scroll-margin-top: 142px;
  }

  .analytics-scope-summary {
    display: none;
  }

  .timeline-heading,
  .composition-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-composition-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .distribution-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .distribution-pie {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .timeline-composition-legend {
    margin-left: 0;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .chart-legend {
    width: 100%;
  }

  .detail-grid .wide {
    grid-column: auto;
  }

  .session-email {
    display: none;
  }

  .filter-actions .button {
    flex: 1;
  }

  .display-settings-controls {
    grid-template-columns: 1fr;
  }

  .results-meta {
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 0;
  }

  .table-actions {
    width: 100%;
    margin-left: 0;
  }

  .table-actions .button {
    flex: 1;
  }

  .column-filter-row {
    grid-template-columns: 1fr;
  }

  .column-sort-row {
    grid-template-columns: 36px minmax(0, 1fr) repeat(3, 36px);
    overflow: visible;
  }

  .column-sort-row .sort-priority {
    grid-column: 1;
    grid-row: 1;
  }

  .column-sort-row select:first-of-type {
    grid-column: 2 / 6;
    grid-row: 1;
  }

  .column-sort-row select:nth-of-type(2) {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .column-sort-row button:nth-of-type(1) {
    grid-column: 3;
    grid-row: 2;
  }

  .column-sort-row button:nth-of-type(2) {
    grid-column: 4;
    grid-row: 2;
  }

  .column-sort-row button:nth-of-type(3) {
    grid-column: 5;
    grid-row: 2;
  }

  .column-filter-row .icon-button {
    justify-self: end;
  }

  .results-table .pinned-column:not(.pin-asset) {
    position: static;
    box-shadow: none;
  }

  .column-options {
    grid-template-columns: 1fr;
  }

  .road-plan-controls,
  .road-place-form,
  .road-plan-layout {
    grid-template-columns: 1fr;
  }

  .road-place-actions {
    grid-column: auto;
  }

  .road-place-actions .button {
    flex: 1;
  }

  .road-plan-layout {
    overflow: visible;
  }

  .road-plan-map {
    min-height: 380px;
  }

  .road-plan-leg-addresses {
    grid-template-columns: 1fr;
  }

  .pagination {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 12px 0;
  }

  .pagination-actions,
  .pagination-status,
  .page-jump {
    grid-column: 1;
    justify-self: center;
  }

  .activity-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

.workspace-band {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 20px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workspace-band h2 {
  margin: 0;
}

.section-heading-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.inspection-selection-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 32;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 4px 14px rgba(28, 48, 39, 0.24);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 21px;
}

.inspection-selection-launcher strong {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 12px;
  background: #57635e;
  font-size: 11px;
}

.inspection-selection-launcher.has-selection strong {
  background: #a56800;
}

.inspection-selection-launcher:focus-visible {
  outline: 3px solid rgba(36, 91, 143, 0.35);
  outline-offset: 3px;
}

.inspection-selection-popover {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 31;
  width: min(390px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 120px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(28, 48, 39, 0.2);
  overflow: auto;
}

.inspection-selection-popover[hidden] { display: none; }

.inspection-selection-popover header,
.inspection-selection-popover footer,
.inspection-selection-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspection-selection-popover h2 {
  margin: 0;
  font-size: 16px;
}

.inspection-selection-popover p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.inspection-selection-items {
  display: grid;
  gap: 0;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.inspection-selection-items li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.inspection-selection-items li > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.inspection-selection-items span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-selection-empty {
  color: var(--muted);
  font-size: 12px;
}

.inspection-selection-popover footer {
  justify-content: flex-end;
}

.analytics-failure-summary {
  margin-top: 14px;
}

.failure-stage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.failure-stage-summary span {
  padding: 5px 8px;
  border: 1px solid #e0c98f;
  border-radius: 4px;
  background: #fff7e5;
  color: #624611;
  font-size: 12px;
  font-weight: 700;
}

.failure-table-controls {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.analytics-failure-table-shell {
  max-height: 430px;
  margin-top: 12px;
}

.analytics-failure-table {
  min-width: 1060px;
}

.analytics-failure-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-muted);
}

.analytics-failure-table td:last-child {
  min-width: 300px;
  white-space: normal;
}

.analysis-workspace {
  display: grid;
  gap: 20px;
}

.analysis-workspace > * {
  min-width: 0;
}

.catalog-search,
.analysis-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.catalog-table {
  min-width: 980px;
  table-layout: auto;
}

.catalog-table th:first-child,
.catalog-table td:first-child {
  min-width: 110px;
  font-weight: 700;
}

.analysis-failure {
  color: var(--danger);
  font-weight: 600;
}

.analysis-cache-reused {
  color: var(--brand) !important;
  font-weight: 700;
}

.analysis-retry-notice {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.analysis-task-list {
  display: grid;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.analysis-task-list > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, auto) 70px;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}

.analysis-task-list > div:last-child {
  border-bottom: 0;
}

.analysis-task-list > div > span:last-child {
  color: var(--muted);
  text-align: right;
}

.analysis-task-status {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analysis-task-status.succeeded,
.analysis-task-status.completed-with-warnings,
.analysis-task-status.no-data {
  color: var(--brand);
}

.analysis-task-status.failed {
  color: var(--danger);
}

.analysis-task-status.running {
  color: var(--accent);
}

.analysis-task-status.not-completed {
  color: var(--muted);
}

.analysis-history-table-wrap {
  margin-top: 16px;
}

.analysis-history-table {
  min-width: 1620px;
  table-layout: auto;
}

.analysis-history-table th:first-child,
.analysis-history-table td:first-child {
  min-width: 125px;
}

.analysis-history-table th:nth-child(5),
.analysis-history-table td:nth-child(5) {
  min-width: 190px;
}

.analysis-history-table th:nth-child(6),
.analysis-history-table td:nth-child(6) {
  min-width: 180px;
}

.analysis-history-table th:nth-child(8),
.analysis-history-table td:nth-child(8) {
  min-width: 165px;
}

.analysis-history-table th:last-child,
.analysis-history-table td:last-child {
  min-width: 220px;
}

.analysis-asset-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analysis-asset-link:hover,
.analysis-asset-link:focus-visible {
  color: var(--brand);
}

.analysis-progress-context {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.analysis-detail-actions {
  justify-content: flex-end;
  margin: 4px 0 12px;
}

.analysis-history-table .button.compact {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.analysis-form-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.analysis-form-grid .wide {
  grid-column: 1 / -1;
}

.form-notice {
  border-left: 3px solid var(--warning);
  padding: 10px 12px;
  background: var(--surface-muted);
}

.analysis-result-dialog {
  width: min(900px, calc(100vw - 32px));
}

.analysis-result-summary,
.analysis-result-steps,
.analysis-result-artifacts {
  margin-top: 12px;
}

.analysis-processing-details {
  margin-top: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.analysis-processing-details > summary,
.analysis-supporting-files > summary {
  cursor: pointer;
  font-weight: 700;
}

.analysis-result-step {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.analysis-result-step h4,
.analysis-result-step p {
  margin: 0 0 6px;
}

.analysis-result-step p,
.analysis-result-artifacts span {
  color: var(--muted);
}

.analysis-result-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 10px 0 0;
}

.analysis-result-values > div,
.analysis-result-artifacts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.analysis-result-values dd {
  margin: 0;
  text-align: right;
}

.analysis-result-artifacts > .analysis-artifact-row {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.analysis-artifact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.analysis-artifact-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.analysis-artifact-row strong,
.analysis-artifact-row span {
  overflow-wrap: anywhere;
}

.analysis-artifact-download {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
}

.analysis-supporting-files {
  margin-top: 10px;
}

.analysis-sharepoint-link {
  display: inline-flex;
  margin: 2px 0 10px;
}

.analysis-supporting-files[open] > summary {
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .catalog-search,
  .analysis-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .inspection-selection-launcher {
    right: 16px;
    bottom: 16px;
  }

  .inspection-selection-popover {
    right: 16px;
    bottom: 80px;
  }

  .failure-table-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .catalog-search,
  .analysis-form-grid {
    grid-template-columns: 1fr;
  }

  .analysis-form-grid .wide {
    grid-column: auto;
  }

  .analysis-artifact-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
