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

:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #dce3ec;
  --line-strong: #bac6d5;
  --focus: #6aa9d8;
  --text: #172238;
  --muted: #66748a;
  --accent: #0b6f93;
  --accent-contrast: #ffffff;
  --accent-soft: #e8f4f7;
  --ok: #247a52;
  --ok-soft: #e9f6ef;
  --warn: #9b6500;
  --warn-soft: #fff5d9;
  --danger: #ba3b45;
  --danger-soft: #fcecee;
  --table-row-hover: #f4f8fb;

  --surface-raised: var(--panel);
  --surface-sunken: color-mix(in srgb, var(--bg) 74%, var(--panel) 26%);
  --header-bg: color-mix(in srgb, var(--panel) 96%, var(--accent-soft) 4%);
  --control-bg: var(--panel);
  --chart-grid: color-mix(in srgb, var(--muted) 24%, transparent);
  --shadow-panel: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent), 0 8px 24px color-mix(in srgb, var(--text) 4%, transparent);
  --shadow-popover: 0 18px 48px color-mix(in srgb, var(--text) 20%, transparent);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-1: 4px;
  --radius-2: 6px;
  --radius-3: 8px;
  --font-label: 11px;
  --font-body: 14px;
  --font-title: 16px;
  --font-page-title: 28px;
  --font-value: 18px;
  --line-body: 1.45;
  --control-height: 36px;
  --control-height-mobile: 42px;
  --button-padding-x: 12px;
  color-scheme: light;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--font-body);
  line-height: var(--line-body);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

a:hover {
  text-decoration: none;
}

strong {
  font-weight: 650;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0;
}

h1 {
  font-size: var(--font-page-title);
  line-height: 1.16;
}

h2 {
  font-size: var(--font-title);
  line-height: 1.3;
}

h3,
h4 {
  font-size: 14px;
  line-height: 1.35;
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

.hidden,
.is-hidden {
  display: none !important;
}

.app-frame {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--header-bg) 96%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--panel) 70%, transparent);
}

.app-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
  width: min(100%, 1480px);
  min-height: 64px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  color: var(--text);
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line) 66%);
  border-radius: var(--radius-2);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.nav {
  min-width: 0;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.nav a:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.nav a.active,
.nav a.active:hover {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line) 82%);
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-plugin-mount {
  justify-self: end;
  min-width: 0;
  margin: 0;
}

.app-header #local-theme-plugin .ltp {
  gap: var(--space-1);
}

.app-header #local-theme-plugin .ltp button {
  min-height: 32px;
  border-radius: var(--radius-2);
}

.app-header #local-theme-plugin .ltp-panel {
  border-color: var(--line-strong);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-popover);
}

.app-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) 48px;
}

.solar-page,
.timeline-shell {
  display: grid;
  gap: var(--space-6);
  width: 100%;
  min-width: 0;
}

.solar-sections,
.timeline-runs {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.page-heading {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.eyebrow,
.runtime-kicker,
.noaa-cycle-label {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
}

.meta,
.panel-note,
.timeline-note,
.timeline-timezone,
.noaa-monitor-updated,
.noaa-monitor-empty,
.noaa-progress-note {
  color: var(--muted);
  font-size: 12px;
}

.page-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  margin: 0;
  padding: 0 var(--button-padding-x);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--control-bg);
  color: var(--text);
  box-shadow: 0 1px 1px color-mix(in srgb, var(--text) 5%, transparent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

button:hover,
.button:hover {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line-strong) 44%);
  background: var(--accent-soft);
  color: var(--accent);
}

button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 40%, transparent);
  outline-offset: 2px;
}

button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary,
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}

button.primary:hover,
.button.primary:hover {
  border-color: color-mix(in srgb, var(--accent) 84%, var(--text) 16%);
  background: color-mix(in srgb, var(--accent) 88%, var(--text) 12%);
  color: var(--accent-contrast);
}

button.subtle,
.button.subtle {
  background: var(--panel);
  color: var(--accent);
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="search"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--control-bg);
  color: var(--text);
  line-height: 1.3;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 76%, transparent);
}

label {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.panel,
.block,
.timeline-run,
.noaa-monitor-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.panel,
.block {
  overflow: hidden;
}

.panel-head,
.subsection-head,
.noaa-section-head,
.noaa-progress-head,
.timeline-chart-head,
.tempo-trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.panel-head {
  min-height: 58px;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 96%, var(--panel-soft) 4%);
}

.panel-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.panel-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

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

.count-badge,
.noaa-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.empty-state {
  padding: var(--space-5) var(--space-3);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.runtime-indicators {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.runtime-heading {
  display: grid;
  align-content: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--line);
  background: var(--panel-soft);
}

.runtime-title {
  color: var(--text);
  font-size: 13px;
}

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

.runtime-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--line);
}

.runtime-item:last-child {
  border-right: 0;
}

.runtime-primary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.runtime-dot,
.noaa-status-dot,
.noaa-row-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: currentColor;
}

.runtime-item.is-running .runtime-dot {
  color: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 12%, transparent);
}

.runtime-item.is-idle .runtime-dot {
  color: var(--warn);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 12%, transparent);
}

.runtime-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.runtime-state {
  display: inline-flex;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.runtime-item.is-running .runtime-state {
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line) 72%);
  background: var(--ok-soft);
  color: var(--ok);
}

.runtime-item.is-idle .runtime-state {
  border-color: color-mix(in srgb, var(--warn) 28%, var(--line) 72%);
  background: var(--warn-soft);
  color: var(--warn);
}

.runtime-times {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.runtime-times span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-switcher-form,
.source-segments {
  display: inline-flex;
  align-items: center;
}

.source-switcher-form {
  gap: var(--space-2);
}

.source-segments {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
}

.source-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.source-switcher-form .source-button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 11px;
}

.source-switcher-form .source-button:last-child {
  border-right: 0;
}

.source-switcher-form .source-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.source-switcher-form .source-button.is-active,
.source-switcher-form .source-button.is-active:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

.overview-grid-container,
#timeline-container,
#noaa-monitor-container,
.tempo-root,
.noaa-reference {
  min-width: 0;
  padding: var(--space-4);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(220px, 0.7fr) minmax(220px, 0.7fr);
  gap: var(--space-4);
}

.overview-col {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel);
}

.overview-col-files {
  grid-column: 1 / -1;
}

.subsection-head {
  min-height: 42px;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.data-table-scroll,
.overview-files-wrap,
.noaa-table-wrap,
.tempo-trace-table-wrap,
.timeline-d3-chart,
.tempo-chart,
.tempo-chart-wrap {
  max-width: 100%;
  overflow: auto;
}

.table,
.noaa-monitor-table,
.tempo-trace-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}

.table th,
.table td,
.noaa-monitor-table th,
.noaa-monitor-table td,
.tempo-trace-table th,
.tempo-trace-table td {
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: normal;
}

.table th,
.noaa-monitor-table th,
.tempo-trace-table th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody tr:last-child td,
.noaa-monitor-table tbody tr:last-child td,
.tempo-trace-table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover,
.noaa-monitor-table tbody tr:hover,
.tempo-trace-table tbody tr:hover {
  background: var(--table-row-hover);
}

.table tr.is-active td {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 650;
}

.numeric,
.num,
.time,
.timeline-context strong,
.run-metric strong,
.noaa-status-fact .value {
  font-variant-numeric: tabular-nums;
}

th.numeric,
td.numeric,
td.num {
  text-align: right;
}

.parameter-code-link,
.code-cell,
.file-cell,
.noaa-file-name {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.parameter-code-link {
  font-weight: 700;
}

.path-cell {
  max-width: 440px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  word-break: break-all;
}

.table-files {
  min-width: 760px;
}

.overview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
}

.overview-summary strong {
  color: var(--text);
}

.tempo-root {
  display: grid;
  gap: var(--space-3);
}

.tempo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.tempo-search-details {
  flex: 1 1 280px;
  min-width: 0;
}

.tempo-search-details > summary,
.noaa-reference-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  list-style: none;
}

.tempo-search-details > summary::-webkit-details-marker,
.noaa-reference-details > summary::-webkit-details-marker {
  display: none;
}

.tempo-search-details > summary::before,
.noaa-reference-details > summary::before {
  content: none;
}

.tempo-search-details > summary::after,
.noaa-reference-details > summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.tempo-search-details[open] > summary::after,
.noaa-reference-details[open] > summary::after {
  content: "−";
}

.tempo-search-details[open] {
  flex-basis: 100%;
}

.tempo-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
}

.tempo-field {
  display: grid;
  align-content: start;
  gap: var(--space-1);
  min-width: 0;
}

.tempo-field-service {
  grid-column: span 2;
}

.tempo-service-controls,
.tempo-options,
.tempo-form-actions,
.tempo-range-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.tempo-service-controls {
  margin-top: var(--space-1);
}

.tempo-service-controls .tempo-service-btn {
  min-height: 28px;
  padding: 0 8px;
  font-size: 10px;
}

.tempo-options {
  grid-column: span 3;
  align-self: end;
}

.tempo-controls .tempo-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.tempo-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.tempo-form-actions {
  align-self: end;
  justify-content: flex-end;
}

.tempo-range-controls {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 1px;
}

.tempo-range-btn {
  min-height: 34px;
  box-shadow: none;
}

.tempo-range-btn.is-active,
.tempo-service-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tempo-status,
.tempo-summary {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.tempo-runs {
  color: var(--text);
  font-weight: 650;
}

.tempo-status.is-error {
  color: var(--danger);
}

.tempo-chart-wrap,
.timeline-d3-chart {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--surface-sunken);
}

.tempo-chart,
.timeline-d3-chart {
  width: 100%;
}

.tempo-chart svg,
.timeline-d3-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.tempo-chart svg text,
.timeline-d3-chart svg text {
  fill: var(--muted) !important;
  font-family: Inter, ui-sans-serif, "Segoe UI", sans-serif;
}

.tempo-chart svg .domain,
.tempo-chart svg .tick line,
.timeline-d3-chart svg .domain,
.timeline-d3-chart svg .tick line {
  stroke: var(--chart-grid) !important;
}

.tempo-trace-panel {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.tempo-trace-head {
  justify-content: flex-end;
}

.tempo-root-meta {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
}

.tempo-root-meta-title,
.tempo-root-meta-subtitle {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.tempo-root-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
}

.tempo-root-meta-grid p {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tempo-root-meta-grid .key {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.tempo-root-meta-grid .value {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
}

.tempo-root-meta-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.tempo-root-meta-block {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel);
}

.tempo-root-meta-text {
  max-height: 280px;
  margin-top: var(--space-2);
  overflow: auto;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  white-space: pre-wrap;
}

.tempo-trace-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
}

.tempo-trace-table {
  min-width: 980px;
}

.tempo-trace-table tbody tr.is-error {
  background: var(--danger-soft);
}

.tempo-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 24px));
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-popover);
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  white-space: pre-line;
}

.timeline-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
}

.timeline-controls {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
}

.timeline-date-field {
  display: grid;
  gap: var(--space-1);
}

.timeline-date-field input {
  width: 158px;
}

.timeline-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-4);
  color: var(--muted);
  font-size: 11px;
}

.timeline-context strong {
  color: var(--text);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--muted);
  font-size: 11px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-item::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid color-mix(in srgb, currentColor 32%, var(--line) 68%);
  border-radius: 2px;
  background: var(--panel-soft);
}

.legend-item.started::before { background: color-mix(in srgb, var(--muted) 30%, var(--panel) 70%); }
.legend-item.download-start::before { background: color-mix(in srgb, var(--accent) 24%, var(--panel) 76%); }
.legend-item.download::before { background: color-mix(in srgb, var(--accent) 64%, var(--panel) 36%); }
.legend-item.processed::before { background: color-mix(in srgb, var(--warn) 46%, var(--panel) 54%); }
.legend-item.wind-range::before { background: color-mix(in srgb, var(--danger) 44%, var(--panel) 56%); }
.legend-item.completed::before { background: color-mix(in srgb, var(--ok) 50%, var(--panel) 50%); }

.timeline-run {
  min-width: 0;
  overflow: hidden;
}

.timeline-run-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.timeline-run-identity {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.timeline-run-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, auto));
  gap: var(--space-4);
}

.run-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.run-metric strong {
  color: var(--text);
  font-size: 13px;
}

.timeline-d3-wrap {
  min-width: 0;
  padding: var(--space-3);
  background: var(--panel);
}

.timeline-chart-head {
  margin-bottom: var(--space-2);
}

.timeline-d3-chart {
  min-height: 160px;
}

.timeline-section .timeline-run {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.timeline-section .timeline-run:first-child {
  border-top: 0;
}

.timeline-section .timeline-toolbar {
  margin-bottom: var(--space-3);
}

.noaa-monitor-shell {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.noaa-monitor-shell > .panel-head {
  min-height: auto;
  padding: 0 0 var(--space-3);
  border: 0;
  background: transparent;
}

.noaa-monitor-shell #noaa-monitor-container {
  padding: 0;
}

.noaa-monitor-panel {
  display: grid;
  gap: var(--space-4);
}

.noaa-monitor-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.noaa-monitor-title,
.noaa-file-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}

.noaa-cycle-identity {
  display: grid;
  gap: 2px;
}

.noaa-status-badge,
.noaa-row-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.noaa-status-badge.is-published,
.noaa-status-badge.is-processing,
.noaa-row-status.is-stored,
.noaa-row-status.is-partial-success {
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line) 72%);
  background: color-mix(in srgb, var(--ok-soft) 86%, var(--panel) 14%);
  color: color-mix(in srgb, var(--ok) 88%, var(--text) 12%);
}

.noaa-status-badge.is-downloading,
.noaa-row-status.is-downloaded,
.noaa-row-status.is-available,
.noaa-row-status.is-pending {
  border-color: color-mix(in srgb, var(--warn) 28%, var(--line) 72%);
  background: color-mix(in srgb, var(--warn-soft) 86%, var(--panel) 14%);
  color: color-mix(in srgb, var(--warn) 88%, var(--text) 12%);
}

.noaa-status-badge.is-blocked,
.noaa-row-status.is-error,
.noaa-row-status.is-import-failed {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line) 72%);
  background: color-mix(in srgb, var(--danger-soft) 86%, var(--panel) 14%);
  color: color-mix(in srgb, var(--danger) 88%, var(--text) 12%);
}

.noaa-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.noaa-status-fact {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--line);
}

.noaa-status-fact:last-child {
  border-right: 0;
}

.noaa-status-fact.is-risk {
  background: var(--danger-soft);
}

.noaa-status-fact .label,
.noaa-status-fact .value,
.noaa-status-fact .sub {
  display: block;
}

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

.noaa-status-fact .value {
  margin-top: 2px;
  color: var(--text);
  font-size: var(--font-value);
  font-weight: 700;
}

.noaa-status-fact .sub {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.noaa-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.noaa-progress-block {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel);
}

.noaa-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 78%, var(--panel-soft) 22%);
}

.noaa-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.noaa-progress-fill.is-processing {
  background: var(--ok);
}

.noaa-monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  align-items: start;
  gap: var(--space-4);
}

.noaa-monitor-section {
  min-width: 0;
  overflow: hidden;
}

.noaa-section-head {
  min-height: 48px;
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.noaa-monitor-table {
  min-width: 980px;
}

.noaa-monitor-table .time {
  white-space: nowrap;
}

.noaa-error {
  max-width: 260px;
  overflow: hidden;
  color: var(--danger);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.noaa-monitor-aside {
  display: grid;
  gap: var(--space-3);
}

.noaa-definition-list {
  display: grid;
  padding: var(--space-2) var(--space-3);
}

.noaa-definition-list > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}

.noaa-definition-list > div:last-child {
  border-bottom: 0;
}

.noaa-definition-list dt,
.noaa-file-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.noaa-definition-list dd,
.noaa-file-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.noaa-runs-list {
  display: grid;
}

.noaa-run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.noaa-run-row:last-child {
  border-bottom: 0;
}

.noaa-run-row:hover {
  background: var(--table-row-hover);
}

.noaa-run-main,
.noaa-run-main strong,
.noaa-run-main small {
  display: block;
  min-width: 0;
}

.noaa-run-main small,
.noaa-run-metrics {
  color: var(--muted);
  font-size: 10px;
}

.noaa-run-metrics {
  grid-column: 1 / -1;
}

.noaa-files-mobile {
  display: none;
}

.noaa-reference-details {
  margin: 0;
}

.noaa-reference-details > summary {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  padding: 0 var(--space-4);
}

.noaa-reference-details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.reference-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-3);
}

.reference-search {
  display: grid;
  gap: var(--space-1);
  width: min(100%, 300px);
}

.reference-table {
  min-width: 760px;
}

html.local-theme-enabled .app-header .nav a.active,
html.local-theme-enabled .app-header .nav a.active:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line) 72%);
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 1100px) {
  .runtime-item {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

  .runtime-times {
    justify-items: start;
  }

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

  .overview-col-files {
    grid-column: 1 / -1;
  }

  .tempo-controls {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .tempo-field-service,
  .tempo-options {
    grid-column: span 2;
  }

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

  .noaa-status-fact:nth-child(3) {
    border-right: 0;
  }

  .noaa-status-fact:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .noaa-status-fact:nth-child(4) {
    grid-column: span 2;
  }

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

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

@media (max-width: 820px) {
  .app-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2) var(--space-4);
    padding: var(--space-2) var(--space-4);
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    margin: 0 calc(var(--space-4) * -1) calc(var(--space-2) * -1);
    padding: var(--space-1) var(--space-4);
  }

  .nav ul {
    width: max-content;
  }

  .nav a {
    min-height: 32px;
  }

  .theme-plugin-mount {
    grid-column: 2;
    grid-row: 1;
  }

  .app-header #local-theme-plugin.theme-plugin-mount {
    margin: 0;
  }

  .app-shell {
    padding: var(--space-5) var(--space-4) var(--space-8);
  }

  .page-header {
    align-items: flex-start;
  }

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

  .runtime-heading {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .timeline-run-head {
    align-items: flex-start;
  }

  .timeline-run-metrics {
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --font-page-title: 24px;
  }

  .app-header-inner {
    padding-right: var(--space-3);
    padding-left: var(--space-3);
  }

  .nav {
    margin-right: calc(var(--space-3) * -1);
    margin-left: calc(var(--space-3) * -1);
    padding-right: var(--space-3);
    padding-left: var(--space-3);
  }

  .brand {
    gap: var(--space-2);
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .brand-subtitle {
    display: none;
  }

  .app-header #local-theme-plugin .ltp-panel {
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 24px));
  }

  .app-shell {
    padding: var(--space-4) var(--space-3) var(--space-6);
  }

  .solar-page,
  .timeline-shell {
    gap: var(--space-5);
  }

  .page-header {
    display: grid;
    gap: var(--space-4);
  }

  .page-actions {
    justify-content: flex-start;
  }

  button,
  .button,
  input[type="text"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    min-height: var(--control-height-mobile);
  }

  .panel-head {
    align-items: flex-start;
    min-height: 54px;
    padding: var(--space-3);
  }

  .panel-note {
    text-align: right;
  }

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

  .runtime-item {
    grid-template-columns: auto minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .runtime-item:last-child {
    border-bottom: 0;
  }

  .runtime-times {
    justify-items: end;
  }

  .overview-grid-container,
  #timeline-container,
  .tempo-root,
  .noaa-reference {
    padding: var(--space-3);
  }

  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .overview-col-files {
    grid-column: auto;
  }

  .source-label {
    display: none;
  }

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

  .tempo-range-controls {
    justify-content: flex-start;
  }

  .tempo-controls {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-3);
  }

  .tempo-field-service,
  .tempo-options,
  .tempo-form-actions {
    grid-column: auto;
  }

  .tempo-form-actions {
    justify-content: stretch;
  }

  .tempo-form-actions button {
    width: 100%;
  }

  .tempo-root-meta-grid,
  .tempo-root-meta-extra {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline-toolbar {
    display: grid;
    align-items: stretch;
  }

  .timeline-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .timeline-date-field input {
    width: 100%;
  }

  .timeline-context {
    justify-content: flex-start;
  }

  .legend {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .timeline-run-head {
    display: grid;
  }

  .timeline-run-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .timeline-d3-chart svg,
  .tempo-chart svg {
    min-width: 720px;
  }

  .noaa-monitor-shell > .panel-head,
  .noaa-monitor-topline {
    display: grid;
    align-items: start;
  }

  .noaa-monitor-updated {
    justify-self: start;
  }

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

  .noaa-status-fact,
  .noaa-status-fact:nth-child(3),
  .noaa-status-fact:nth-child(4) {
    grid-column: auto;
    border-top: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .noaa-status-fact:nth-child(2n) {
    border-right: 0;
  }

  .noaa-status-fact:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .noaa-status-fact:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .noaa-progress-grid,
  .noaa-monitor-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-only {
    display: none;
  }

  .noaa-files-mobile {
    display: grid;
  }

  .noaa-file-card {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-3);
    border-bottom: 1px solid var(--line);
  }

  .noaa-file-card:last-child {
    border-bottom: 0;
  }

  .noaa-file-card-head strong {
    min-width: 0;
    overflow: hidden;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .noaa-file-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2) var(--space-3);
  }

  .noaa-file-facts > div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .noaa-file-error {
    padding: var(--space-2);
    border-left: 3px solid var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 11px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .ltp-toggle__label {
    display: none;
  }

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

  .page-actions > * {
    width: 100%;
  }

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

  .runtime-times {
    justify-items: start;
  }

  .panel-note {
    display: none;
  }

  .noaa-monitor-title,
  .noaa-file-card-head {
    align-items: flex-start;
  }
}

.download-settings-shell {
  display: grid;
  gap: var(--space-5);
  width: 100%;
  min-width: 0;
}

.settings-notice {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-2);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.settings-notice strong {
  color: var(--text);
}

.settings-notice.is-success {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok-soft) 62%, var(--panel) 38%);
}

.settings-notice.is-warning {
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn-soft) 62%, var(--panel) 38%);
}

.settings-notice.is-danger {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger-soft) 62%, var(--panel) 38%);
}

.settings-activity {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(480px, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.settings-activity-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: var(--space-2) var(--space-4);
  min-width: 0;
  padding: var(--space-4);
  border-right: 1px solid var(--line);
}

.settings-activity-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-activity-message {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.settings-status-badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.settings-status-badge.is-queued,
.settings-status-badge.is-running,
.settings-status-badge.is-incomplete {
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line) 70%);
  background: var(--warn-soft);
  color: var(--warn);
}

.settings-status-badge.is-succeeded {
  border-color: color-mix(in srgb, var(--ok) 30%, var(--line) 70%);
  background: var(--ok-soft);
  color: var(--ok);
}

.settings-status-badge.is-failed {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line) 70%);
  background: var(--danger-soft);
  color: var(--danger);
}

.settings-activity-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.settings-activity-facts > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--line);
}

.settings-activity-facts > div:last-child {
  border-right: 0;
}

.settings-activity-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-activity-facts dd {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.settings-form {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.settings-group {
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.settings-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.settings-group-head > div:first-child {
  display: grid;
  gap: 2px;
}

.settings-group-note,
.settings-field-hint {
  color: var(--muted);
  font-size: 11px;
}

.settings-group-note {
  max-width: 420px;
  text-align: right;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.settings-grid-common {
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
}

.settings-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-field-full {
  grid-column: 1 / -1;
}

.settings-field label,
.settings-field legend {
  display: block;
  padding: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.settings-field textarea {
  min-height: 76px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.settings-field [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 16%, transparent);
}

.settings-field-error {
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
}

.settings-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.settings-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
  min-width: 0;
  min-height: 58px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
  cursor: pointer;
}

.settings-choice:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line) 64%);
}

.settings-choice input,
.settings-confirm input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.settings-choice span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-choice strong {
  color: var(--text);
  font-size: 12px;
}

.settings-choice small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.settings-preview > span {
  display: inline-flex;
  gap: 4px;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.settings-preview strong {
  color: var(--text);
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--panel-soft);
}

.settings-action-copy {
  display: grid;
  gap: 2px;
  max-width: 680px;
}

.settings-action-copy strong {
  color: var(--text);
  font-size: 12px;
}

.settings-action-copy span {
  color: var(--muted);
  font-size: 11px;
}

.settings-action-controls {
  display: grid;
  justify-items: end;
  gap: var(--space-2);
}

.settings-confirm {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
}

.settings-buttons {
  display: flex;
  gap: var(--space-2);
}

button.warning {
  border-color: var(--warn);
  background: var(--warn);
  color: #ffffff;
  box-shadow: none;
}

button.warning:hover {
  border-color: color-mix(in srgb, var(--warn) 84%, var(--text) 16%);
  background: color-mix(in srgb, var(--warn) 88%, var(--text) 12%);
  color: #ffffff;
}

@media (max-width: 980px) {
  .settings-activity {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-activity-main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-actions {
    display: grid;
    align-items: stretch;
  }

  .settings-action-controls {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .download-settings-shell .page-header,
  .settings-group-head {
    display: grid;
    align-items: start;
  }

  .settings-group-note {
    max-width: none;
    text-align: left;
  }

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

  .settings-field-full {
    grid-column: auto;
  }

  .settings-preview {
    justify-content: flex-start;
  }

  .settings-group,
  .settings-actions {
    padding: var(--space-4);
  }

  .settings-notice {
    display: grid;
  }

  .settings-buttons {
    display: grid;
    width: 100%;
  }

  .settings-buttons button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .nav ul {
    gap: 0;
  }

  .nav a {
    padding-right: var(--space-2);
    padding-left: var(--space-2);
    font-size: 12px;
  }
}

@media (max-width: 460px) {
  .settings-activity-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-activity-message {
    grid-column: auto;
  }

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

  .settings-activity-facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-activity-facts > div:last-child {
    border-bottom: 0;
  }
}
