:root {
  --navy-950: #071a2b;
  --navy-900: #0b2438;
  --navy-800: #12334a;
  --navy-700: #1a4862;
  --teal-700: #0c7f7d;
  --teal-600: #129b96;
  --teal-500: #25b6ae;
  --teal-100: #dff7f4;
  --blue-100: #e6f3fb;
  --amber-500: #eba93b;
  --amber-100: #fff4d9;
  --red-600: #c8434f;
  --red-100: #fde9eb;
  --green-600: #2b8b61;
  --green-100: #e5f6ed;
  --purple-600: #7451a6;
  --ink: #172634;
  --muted: #667785;
  --line: #d9e2e8;
  --panel: #ffffff;
  --background: #eef3f5;
  --shadow: 0 14px 40px rgba(13, 39, 57, 0.09);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.45;
}

button,
select,
input,
textarea {
  font: inherit;
}

button,
select,
input[type="range"],
input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline: 3px solid rgba(18, 155, 150, 0.3);
  outline-offset: 2px;
}

.site-header {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 12px 22px;
  background: linear-gradient(120deg, var(--navy-950), var(--navy-800));
  color: #ffffff;
  border-bottom: 4px solid var(--teal-500);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(37, 182, 174, 0.32),
    rgba(255, 255, 255, 0.05)
  );
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.08);
  font-weight: 900;
  letter-spacing: -0.2em;
  padding-right: 0.2em;
}

.brand-mark span:last-child {
  color: var(--teal-500);
  transform: translateY(5px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 1.03rem;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: #b7ccd8;
  font-size: 0.72rem;
}

.header-title {
  text-align: center;
}

.header-title h1 {
  margin: 1px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.1;
}

.eyebrow,
.panel-kicker {
  color: var(--teal-600);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header .eyebrow {
  color: #73d9d2;
}

.header-actions {
  justify-self: end;
  display: flex;
  gap: 8px;
}

.app-shell {
  width: 100%;
  display: grid;
  grid-template-columns: 310px minmax(680px, 1fr) 330px;
  gap: 14px;
  padding: 14px;
  align-items: start;
}

.panel,
.data-card,
.canvas-card {
  background: var(--panel);
  border: 1px solid rgba(24, 58, 76, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel {
  padding: 17px;
}

.controls-panel,
.evidence-panel {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b8c9d2 transparent;
}

.panel-heading,
.card-heading,
.section-title-row,
.range-label,
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.card-heading h2,
.dialog-heading h2 {
  margin: 1px 0 0;
  font-size: 1.15rem;
}

.control-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.control-section:first-of-type {
  margin-top: 12px;
}

.control-section h3,
.saved-runs-section h3,
.dialog-content h3 {
  margin: 0;
  font-size: 0.9rem;
}

.section-title-row {
  margin-bottom: 10px;
}

.field-label,
.range-label {
  display: block;
  margin: 11px 0 6px;
  color: #415464;
  font-size: 0.76rem;
  font-weight: 750;
}

.range-label {
  display: flex;
}

.range-label output {
  min-width: 52px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-700);
  text-align: center;
  font-weight: 850;
}

select,
textarea {
  width: 100%;
  border: 1px solid #cbd8df;
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
}

select {
  min-height: 40px;
  padding: 8px 34px 8px 10px;
}

textarea {
  resize: vertical;
  padding: 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal-600);
}

.mode-grid {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.mode-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 11px;
  border: 1px solid #d2dde3;
  border-radius: 10px;
  background: #f8fbfc;
  color: var(--ink);
  text-align: left;
}

.mode-button strong {
  font-size: 0.8rem;
}

.mode-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.67rem;
}

.mode-button.active {
  border-color: var(--teal-500);
  background: var(--teal-100);
  color: var(--teal-700);
  box-shadow: inset 3px 0 0 var(--teal-600);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
  padding: 4px;
  border-radius: 10px;
  background: #eaf0f3;
}

.segmented-control.compact {
  min-width: 175px;
  margin: 0;
}

.segment {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
}

.segment.active {
  background: #ffffff;
  color: var(--teal-700);
  box-shadow: 0 3px 10px rgba(13, 39, 57, 0.12);
}

.property-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}

.property-grid > div,
.equation-card > div {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid #e0e8ec;
  border-radius: 8px;
  background: #f8fbfc;
}

.property-grid span,
.equation-card span,
.mini-readout span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.property-grid strong,
.equation-card strong,
.mini-readout strong {
  margin-top: 2px;
  color: var(--navy-800);
  font-size: 0.77rem;
}

.equation-card {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

.equation-card > div {
  border-left: 3px solid var(--teal-500);
}

.mini-readout {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f2f7f9;
}

.transport-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.transport-tags span,
.run-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3f6;
  color: #536876;
  font-size: 0.61rem;
  font-weight: 750;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.prediction-message,
.claim-feedback {
  min-height: 19px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.workspace {
  min-width: 0;
}

.simulation-toolbar {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(24, 58, 76, 0.1);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(13, 39, 57, 0.06);
}

.time-display {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.72rem;
}

.time-display strong {
  color: var(--navy-800);
  font-size: 1rem;
}

.transport-controls,
.view-controls,
.speed-control,
.layer-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speed-control,
.layer-control {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.speed-control select {
  width: 68px;
  min-height: 35px;
  padding: 6px;
}

.layer-control select {
  width: 130px;
  min-height: 35px;
  padding: 6px;
}

.view-controls {
  justify-self: end;
}

.display-options {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(24, 58, 76, 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.display-options input {
  accent-color: var(--teal-600);
}

.canvas-card {
  position: relative;
  padding: 8px;
  overflow: hidden;
}

#simulationCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 13px;
  background: #e2f2f7;
}

.canvas-instructions,
.status-pill {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(7, 26, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 15px rgba(7, 26, 43, 0.12);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
  font-weight: 750;
}

.canvas-instructions {
  left: 19px;
  bottom: 19px;
  padding: 7px 11px;
}

.status-pill {
  top: 19px;
  right: 19px;
  padding: 7px 11px;
  color: var(--navy-800);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(43, 139, 97, 0.15);
}

.status-pill.running .status-dot {
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(37, 182, 174, 0.16);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.35);
  }
}

.scale-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 8px;
}

.scale-bar > div {
  display: flex;
  flex-direction: column;
  padding: 7px 9px;
  border: 1px solid #dce5ea;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
}

.scale-bar span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
}

.scale-bar strong {
  margin-top: 1px;
  color: var(--navy-800);
  font-size: 0.72rem;
}

.workspace-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, 0.8fr);
  gap: 10px;
  margin-top: 10px;
}

.data-card {
  min-width: 0;
  padding: 15px;
}

#graphCanvas {
  width: 100%;
  height: 240px;
  display: block;
  margin-top: 10px;
  border-radius: 9px;
  background: #fbfdfe;
}

.graph-legend {
  min-height: 21px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.graph-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.claim-card .primary-button {
  margin-top: 11px;
}

.sample-count {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-600);
  font-size: 0.69rem;
  font-weight: 850;
}

.budget-card {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 4px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--purple-600);
  color: #ffffff;
  font-size: 0.72rem;
}

.well-button-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 13px 0;
}

.well-sample-button {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd8df;
  border-radius: 10px;
  background: #f9fbfc;
  color: var(--navy-800);
  font-weight: 850;
}

.well-sample-button small {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 700;
}

.well-sample-button:hover {
  border-color: var(--teal-500);
  background: var(--teal-100);
}

.well-sample-button.alert {
  border-color: #e8a0a7;
  background: var(--red-100);
  color: var(--red-600);
}

.threshold-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 12px;
  padding: 9px 10px;
  border-left: 3px solid var(--amber-500);
  border-radius: 7px;
  background: var(--amber-100);
  font-size: 0.69rem;
}

.threshold-note span {
  color: #725d38;
}

.table-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.69rem;
}

.sample-table th,
.sample-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e6edf1;
  text-align: left;
  white-space: nowrap;
}

.sample-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7f9;
  color: #536876;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.sample-table tr:last-child td {
  border-bottom: 0;
}

.empty-row td {
  padding: 24px 8px;
  color: var(--muted);
  text-align: center;
  white-space: normal;
}

.evidence-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 11px;
}

.interpretation-card {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  padding: 11px;
  border: 1px solid #dce7eb;
  border-radius: 10px;
  background: var(--blue-100);
}

.interpretation-card strong {
  margin-top: 2px;
  color: var(--navy-800);
  font-size: 0.78rem;
}

.interpretation-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.saved-runs-section {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.saved-runs {
  display: grid;
  gap: 8px;
}

.empty-state {
  margin: 0;
  padding: 13px;
  border: 1px dashed #c7d4db;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.saved-run-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdfe;
}

.saved-run-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.saved-run-card strong {
  font-size: 0.76rem;
}

.saved-run-card small {
  color: var(--muted);
}

.run-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.run-result {
  margin-top: 7px;
  color: var(--navy-800);
  font-size: 0.68rem;
  font-weight: 750;
}

.first-alert-card {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  padding: 12px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
  color: #ffffff;
}

.first-alert-card .panel-kicker {
  color: #72d9d1;
}

.first-alert-card strong {
  margin-top: 3px;
  font-size: 1rem;
}

.first-alert-card small {
  margin-top: 2px;
  color: #c2d5df;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.text-button,
.info-dot {
  border: 0;
  font-weight: 800;
  transition: 0.16s ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 9px;
}

.primary-button {
  background: var(--teal-600);
  color: #ffffff;
  box-shadow: 0 5px 13px rgba(18, 155, 150, 0.23);
}

.primary-button:hover {
  background: var(--teal-700);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid #c6d3da;
  background: #f7fafb;
  color: var(--navy-800);
}

.secondary-button:hover {
  border-color: var(--teal-500);
  background: var(--teal-100);
}

.ghost-button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #eaf4f7;
  font-size: 0.72rem;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #edf3f6;
  color: var(--navy-800);
  font-size: 1.12rem;
}

.icon-button:hover {
  background: var(--teal-100);
  color: var(--teal-700);
}

.text-button {
  padding: 4px;
  background: transparent;
  color: var(--teal-700);
  font-size: 0.7rem;
}

.text-button:hover {
  text-decoration: underline;
}

.info-dot {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e5eef2;
  color: #506674;
  font-size: 0.7rem;
}

.info-dot:hover {
  background: var(--teal-100);
  color: var(--teal-700);
}

.full-width {
  width: 100%;
}

.hidden {
  display: none !important;
}

.good-text {
  color: var(--green-600) !important;
}

.alert-text {
  color: var(--red-600) !important;
}

#helpDialog {
  width: min(760px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

#helpDialog::backdrop {
  background: rgba(4, 19, 31, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-card {
  padding: 20px;
}

.dialog-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 18px 0;
}

.dialog-content section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdfe;
}

.dialog-content p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.model-limitations {
  grid-column: 1 / -1;
  padding: 12px;
  border-left: 4px solid var(--amber-500);
  border-radius: 8px;
  background: var(--amber-100);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 50;
  max-width: min(470px, calc(100% - 24px));
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--navy-950);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1420px) {
  .app-shell {
    grid-template-columns: 290px minmax(640px, 1fr) 305px;
    gap: 10px;
    padding: 10px;
  }

  .panel {
    padding: 14px;
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-title {
    display: none;
  }

  .app-shell {
    grid-template-columns: 285px minmax(0, 1fr);
  }

  .evidence-panel {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(450px, 1.2fr);
    gap: 15px;
  }

  .evidence-panel > .panel-heading,
  .evidence-panel > .budget-card,
  .evidence-panel > .well-button-grid,
  .evidence-panel > .threshold-note,
  .evidence-panel > .evidence-actions,
  .evidence-panel > .interpretation-card {
    grid-column: 1;
  }

  .evidence-panel > .table-wrap {
    grid-column: 2;
    grid-row: 1 / span 6;
    max-height: 330px;
  }

  .saved-runs-section,
  .first-alert-card {
    grid-column: 1 / -1;
  }

  .simulation-toolbar {
    grid-template-columns: 1fr auto;
  }

  .view-controls {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 850px) {
  .site-header {
    min-height: auto;
    padding: 10px 13px;
  }

  .brand-copy small,
  #fullscreenButton {
    display: none;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    padding: 8px;
  }

  .controls-panel,
  .evidence-panel {
    position: static;
    width: 100%;
    max-height: none;
  }

  .simulation-toolbar {
    grid-template-columns: 1fr;
  }

  .time-display {
    align-items: center;
  }

  .transport-controls,
  .view-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .workspace-bottom-grid {
    grid-template-columns: 1fr;
  }

  .scale-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .evidence-panel {
    display: block;
  }

  .evidence-panel > * {
    margin-top: 12px;
  }

  .canvas-instructions {
    display: none;
  }

  .dialog-content {
    grid-template-columns: 1fr;
  }

  .model-limitations {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .header-actions {
    gap: 4px;
  }

  .ghost-button {
    padding: 6px 8px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .property-grid,
  .evidence-actions {
    grid-template-columns: 1fr;
  }

  .well-button-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scale-bar {
    grid-template-columns: 1fr;
  }
}

/* Learning alerts */

.model-alerts {
  position: absolute;
  z-index: 8;
  top: 18px;
  left: 18px;
  width: min(340px, calc(100% - 180px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.model-alert {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  gap: 9px;
  align-items: start;
  padding: 10px 9px 10px 10px;
  border: 1px solid rgba(7, 26, 43, 0.15);
  border-left: 4px solid var(--teal-600);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(7, 26, 43, 0.18);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  animation: model-alert-in 0.22s ease-out;
}

.model-alert.removing {
  opacity: 0;
  transform: translateY(-7px);
  transition: 0.18s ease;
}

.model-alert--important {
  border-left-color: var(--amber-500);
}

.model-alert--threshold {
  border-left-color: var(--red-600);
}

.model-alert__icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 0.92rem;
  font-weight: 900;
}

.model-alert--important .model-alert__icon {
  background: var(--amber-100);
  color: #95661c;
}

.model-alert--threshold .model-alert__icon {
  background: var(--red-100);
  color: var(--red-600);
}

.model-alert__copy {
  min-width: 0;
}

.model-alert__category {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.model-alert__copy strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.78rem;
  line-height: 1.25;
}

.model-alert__copy p {
  margin: 3px 0 0;
  color: #536876;
  font-size: 0.69rem;
  line-height: 1.35;
}

.model-alert__close {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6c7d88;
  font-size: 1rem;
  line-height: 1;
}

.model-alert__close:hover {
  background: #edf3f6;
  color: var(--navy-900);
}

@keyframes model-alert-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 650px) {
  .model-alerts {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
  }
}
/* Groundwater model usability updates */
.reset-run-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 0.7rem;
}

.reset-run-button span {
  font-size: 1rem;
  line-height: 1;
}

.prediction-context {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d8e5ea;
  border-left: 3px solid var(--teal-500);
  border-radius: 9px;
  background: var(--blue-100);
}

.prediction-context span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.prediction-context strong {
  color: var(--navy-800);
  font-size: 0.8rem;
}

.prediction-context small,
.prediction-helper {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.4;
}

.prediction-helper {
  margin: -1px 0 7px;
}

.live-well-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.live-well-heading-row,
.sample-history-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.live-well-heading-row h3,
.sample-history-heading-row h3 {
  margin: 1px 0 0;
  color: var(--navy-800);
  font-size: 0.84rem;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal-700);
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
}

.live-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(37, 182, 174, 0.15);
}

.live-well-description {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.live-table-wrap {
  max-height: 250px;
}

.live-well-table th,
.live-well-table td {
  padding-left: 5px;
  padding-right: 5px;
  font-size: 0.63rem;
}

.well-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 850;
  white-space: nowrap;
}

.well-status--clear {
  background: #edf3f6;
  color: #536876;
}

.well-status--detected {
  background: var(--amber-100);
  color: #725d38;
}

.well-status--threshold {
  background: var(--red-100);
  color: var(--red-600);
}

.well-status--muted {
  background: #f1edf7;
  color: var(--purple-600);
}

.sample-history-section {
  margin-top: 14px;
}

.sample-history-heading-row {
  margin-bottom: 7px;
}

.sample-history-heading-row small {
  max-width: 150px;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.25;
  text-align: right;
}
