* {
  box-sizing: border-box;
}

:root {
  --sh6-font-family: verdana, arial, tahoma, sans-serif;
  --sh6-font-size-base: 8pt;
  --sh6-font-size-small: 9pt;
  --sh6-font-size-ui: 10pt;
  --sh6-font-size-label: 12px;

  --sh6-bg-app: #ffffff;
  --sh6-bg-surface: #ffffff;
  --sh6-bg-muted: #f7f7f7;
  --sh6-bg-soft: #f8faff;
  --sh6-bg-soft-accent: #eef3ff;
  --sh6-bg-soft-accent-2: #eef5ff;

  --sh6-text-primary: #000000;
  --sh6-text-secondary: #34527a;
  --sh6-text-muted: #555555;
  --sh6-text-soft: #444444;
  --sh6-text-accent: #0d3a73;
  --sh6-danger: #c62828;

  --sh6-border-subtle: #cccccc;
  --sh6-border-dotted: #999999;
  --sh6-border-soft: #d7dff2;
  --sh6-border-accent-soft: #c9d5f2;
  --sh6-border-accent: #aac3e8;

  --sh6-link: #0000ff;
  --sh6-link-hover: #cc0000;

  --sh6-radius-sm: 4px;
  --sh6-radius-md: 8px;
  --sh6-radius-lg: 10px;
  --sh6-radius-pill: 999px;

  --sh6-space-1: 4px;
  --sh6-space-2: 8px;
  --sh6-space-3: 10px;
  --sh6-space-4: 12px;
  --sh6-space-5: 16px;

  --sh6-focus-ring: #2b6fc6;
}

body {
  margin: 0;
  font-family: var(--sh6-font-family);
  font-size: var(--sh6-font-size-base);
  background: var(--sh6-bg-app);
  color: var(--sh6-text-primary);
  max-width: 100%;
  overflow-x: hidden;
}

body.is-loading,
body.is-loading * {
  cursor: progress;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  color: var(--sh6-text-soft);
  font-size: var(--sh6-font-size-small);
}

.loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--sh6-border-subtle);
  border-top-color: var(--sh6-text-muted);
  animation: sh6-spin 0.8s linear infinite;
}

.raw-log {
  font-family: "Courier New", courier, monospace;
  font-size: var(--sh6-font-size-small);
  background: var(--sh6-bg-muted);
  border: 1px solid var(--sh6-border-subtle);
  padding: 8px;
  white-space: pre;
  overflow: auto;
  max-height: 70vh;
}

.compare-window-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 12px;
  margin: 10px 0;
  background: var(--sh6-bg-soft-accent-2);
  border: 1px solid var(--sh6-border-accent);
  font-size: var(--sh6-font-size-ui);
  max-width: 100%;
  box-sizing: border-box;
}

.compare-window-text {
  font-weight: bold;
  text-align: center;
}

.compare-window-actions button {
  font-size: var(--sh6-font-size-ui);
  padding: 4px 10px;
  margin-left: 6px;
}

.compare-building {
  color: var(--sh6-danger);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #f2bcbc;
  border-top-color: var(--sh6-danger);
  animation: sh6-spin 0.8s linear infinite;
}

@keyframes sh6-spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: var(--sh6-link);
  text-decoration: underline;
}

a:visited {
  color: var(--sh6-link);
}

a:hover {
  color: var(--sh6-link-hover);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--sh6-bg-surface);
  border-bottom: 1px dotted var(--sh6-border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.brand-logo-link:hover,
.brand-logo-link:focus-visible {
  text-decoration: none;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.logo {
  font-weight: 700;
  font-size: 20px;
}

.subtitle {
  font-size: 14px;
  color: var(--sh6-text-muted);
}

.version-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sh6-text-accent);
  background: #e3edfb;
  border: 1px solid #c5daf8;
  border-radius: var(--sh6-radius-sm);
  text-decoration: none;
}

.version-badge:hover {
  background: #d6e6fb;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sh6-space-2);
}

.load-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 8px 10px;
  border: 1px solid #d5def0;
  border-radius: var(--sh6-radius-md);
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.load-panel-head-main {
  flex: 1 1 260px;
  min-width: 0;
}

.load-panel-reset-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.load-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f3f6f;
}

.load-panel-subtitle {
  margin-top: 2px;
  color: #35557d;
  font-size: 12px;
}

.load-step {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--sh6-border-soft);
  background: var(--sh6-bg-soft);
  border-radius: var(--sh6-radius-lg);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

.load-step-title {
  font-weight: 700;
  color: var(--sh6-text-accent);
  font-size: 13px;
  margin-bottom: 4px;
}

.load-step-note {
  font-size: 12px;
  color: var(--sh6-text-secondary);
  margin-bottom: 6px;
}

.load-tip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #f0c15a;
  background: linear-gradient(135deg, #fff7d1 0%, #ffe7a1 100%);
  color: #5b3b00;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(124, 83, 0, 0.18);
  text-transform: none;
}

body.analysis-mode-dxer .load-tip-badge {
  display: none !important;
}

.load-tip-title {
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff1b6;
  border: 1px solid #f0c15a;
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.compare-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--sh6-border-accent-soft);
  background: var(--sh6-bg-soft-accent);
  border-radius: var(--sh6-radius-md);
  margin-bottom: 8px;
}

.compare-toggle-title {
  font-weight: 700;
  color: var(--sh6-text-accent);
}

.compare-options {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.compare-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.compare-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compare-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--sh6-radius-pill);
  border: 1px solid #c5daf8;
  background: var(--sh6-bg-surface);
  color: var(--sh6-text-accent);
  font-weight: 700;
  font-size: 12px;
}

.compare-option input:checked + span {
  background: #1e5bd6;
  border-color: #1e5bd6;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(30, 91, 214, 0.25);
}

.compare-option input:focus-visible + span {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.compare-helper {
  font-size: 12px;
  color: var(--sh6-text-secondary);
}

.analysis-mode-diff-hint {
  margin: 0;
  padding: 0;
  color: #6f8fb8;
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-decoration-color: #6f8fb8;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  opacity: 0.9;
  cursor: help;
  font-size: 11px;
  white-space: nowrap;
  text-align: center;
  align-self: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
  border-bottom: 1px solid transparent;
  letter-spacing: 0;
  font-weight: 700;
  min-height: auto;
  min-width: auto;
}

.analysis-mode-diff-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.analysis-mode-diff-tooltip {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  left: 0;
  max-width: 280px;
  width: max-content;
  padding: 8px 10px;
  border-radius: var(--sh6-radius-md);
  border: 1px solid #c6d8f2;
  background: #f7fbff;
  color: var(--sh6-text-accent);
  font-size: 11px;
  line-height: 1.35;
  box-shadow: 0 4px 14px rgba(18, 53, 100, 0.12);
  white-space: normal;
  text-align: left;
  display: none;
}

.analysis-mode-diff-tooltip[aria-hidden="false"],
.analysis-mode-diff-tooltip.analysis-mode-diff-tooltip-visible {
  display: block;
}

.analysis-mode-diff-hint:hover,
.analysis-mode-diff-hint:focus-visible {
  color: #4a6b95;
}


.spots-controls {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #e0e6f4;
  background: #f7f9ff;
  border-radius: var(--sh6-radius-md);
  font-size: 12px;
  color: var(--sh6-text-secondary);
}

.spots-controls input[type="range"] {
  width: min(420px, 100%);
  margin-top: 6px;
}


.spots-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.spots-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #e0e6f4;
  border-radius: var(--sh6-radius-pill);
  background: var(--sh6-bg-surface);
}

.spots-filter input {
  margin: 0;
}

.spots-heat-cell {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  border-radius: 3px;
  min-width: 24px;
  min-height: 20px;
  padding: 1px 4px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

.spots-heat-cell:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.spots-heat-cell.active {
  border-color: #ffe08a;
  box-shadow: 0 0 0 1px rgba(255, 224, 138, 0.5);
  font-weight: 700;
}

.spots-drill-panel {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border: 1px solid #d6e2f7;
  background: #f8fbff;
  border-radius: var(--sh6-radius-md);
}

.spots-drill-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.spots-drill-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #21466d;
}

.spots-drill-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 4px 0;
}

.spots-drill-filter-label {
  min-width: 72px;
  font-size: 11px;
  font-weight: 700;
  color: #2f4f76;
}

.spots-drill-filter-btn {
  border: 1px solid #bdd0ee;
  background: var(--sh6-bg-surface);
  color: #25456b;
  border-radius: var(--sh6-radius-pill);
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 8px;
  cursor: pointer;
}

.spots-drill-filter-btn:hover {
  background: #eef5ff;
}

.spots-drill-filter-btn.type-continent {
  border-color: #9ec8b4;
}

.spots-drill-filter-btn.type-cq {
  border-color: #b8c3eb;
}

.spots-drill-filter-btn.type-itu {
  border-color: #d2b8e8;
}

.spots-drill-filter-all {
  font-weight: 600;
}

.spots-drill-filter-btn.active {
  border-color: #2e64b0;
  background: #dce9fb;
  color: #173a66;
  font-weight: 700;
}

.spots-click-hint {
  display: inline-block;
  margin-left: 8px;
  color: #2f4f76;
}

.spots-coach-grid {
  margin: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.spots-coach-card {
  border: 1px solid #d3deef;
  border-radius: 8px;
  background: #fcfdff;
  padding: 8px 10px;
}

.spots-coach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.spots-coach-card h4 {
  margin: 0;
  color: #22456e;
  font-size: 12px;
}

.spots-coach-note {
  margin: 0 0 5px;
  font-size: 11px;
  color: #395980;
}

.spots-coach-list {
  margin: 0;
  padding-left: 16px;
  color: #2e4d74;
}

.spots-coach-list li {
  margin: 2px 0;
}

.spots-coach-action {
  margin-top: 7px;
  min-height: 34px;
  border: 1px solid #b7cbe8;
  border-radius: 7px;
  background: #ffffff;
  color: #1f446f;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.spots-coach-action:hover {
  background: #edf4ff;
}

.spots-coach-action:focus-visible {
  outline: none;
  border-color: #2f65b3;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.spots-align-block {
  width: 100%;
}

.rbn-signal-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
}

.rbn-signal-card {
  border: 1px solid #d0dbee;
  border-radius: 10px;
  background: #fcfdff;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
}

.rbn-signal-body {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-direction: column;
}

.rbn-signal-plot {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.rbn-signal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.rbn-signal-head h4 {
  margin: 0;
  color: #25456b;
  font-size: 12px;
}

.rbn-signal-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #23466f;
  font-weight: 700;
}

.rbn-signal-picker select {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #c8d7f0;
  background: #ffffff;
  color: #23456f;
  max-width: min(320px, 100%);
}

.rbn-signal-copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.rbn-signal-reset-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.rbn-signal-copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

.rbn-signal-copy-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.rbn-signal-copy-btn.is-working {
  opacity: 0.72;
  cursor: progress;
}

.rbn-signal-status {
  flex: 1 1 100%;
}

.rbn-signal-hint {
  flex: 1 1 100%;
  font-size: 11px;
}

.rbn-signal-canvas {
  width: 100%;
  display: block;
  border: 1px solid #c8d7f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
  cursor: crosshair;
  touch-action: none;
}

.rbn-signal-canvas.is-zoom-dragging {
  cursor: ew-resize;
}

.spots-signal-canvas {
  cursor: crosshair;
  touch-action: none;
}

.rbn-signal-zoom-box,
.chart-zoom-box {
  position: absolute;
  border: 1px solid rgba(42, 95, 170, 0.9);
  background: rgba(88, 147, 234, 0.2);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

.rbn-signal-empty {
  color: #666666;
  font-size: 11px;
}

.rbn-signal-legend {
  width: 100%;
  min-width: 0;
  border-top: 1px dashed rgba(34, 69, 111, 0.18);
  padding-top: 10px;
  display: flex;
  /* Keep legend on a single row; scroll horizontally if needed. */
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  gap: 8px 12px;
  font-size: 11px;
  color: #23466f;
}

.rbn-signal-legend-bands {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
}

.rbn-signal-meta {
  margin-top: 6px;
  font-size: 11px;
}

.rbn-legend-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #193d6e;
}

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

.rbn-legend-item i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(31, 63, 111, 0.25);
}

.rbn-legend-shape {
  font-weight: 700;
  color: #2a4f80;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-left: auto;
}

.rbn-slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(35, 70, 111, 0.28);
  border-radius: 6px;
  background: #ffffff;
  color: #23466f;
  white-space: nowrap;
}

.rbn-slot-chip-call {
  font-weight: 800;
  color: #193d6e;
}

.rbn-slot-marker {
  flex: 0 0 auto;
  display: block;
}

.rbn-slot-line {
  flex: 0 0 auto;
  display: block;
}

/* Legend is always below the plot to keep the chart as wide as possible. */

/* Hide verbose analysis blocks (kept in code for later iterations). */
.sh6-hide-advanced-analysis .sh6-advanced-analysis {
  display: none !important;
}

.log-panel {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #c8d4ea;
  background: #fcfdff;
}

.log-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.log-panel-title {
  font-weight: 700;
  margin-bottom: 0;
  color: #1f3f6f;
}

.slot-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--sh6-radius-pill);
  border: 1px solid #c4c4c4;
  background: #f5f5f5;
  color: #333333;
  font-weight: 700;
}

.slot-status.status-loaded {
  border-color: #7ac16b;
  background: #eaf6ed;
  color: #0b3d13;
  font-weight: 700;
}

.slot-status.status-empty {
  border-color: #f1c76c;
  background: #fff7e6;
  color: #7a5b1d;
}

.slot-status.status-skipped {
  border-color: #a6a6a6;
  background: #f0f0f0;
  color: #555555;
}

.slot-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}

.slot-choice {
  border: 1px solid #b9b9b9;
  background: #f7f7f7;
  color: #2a3f63;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.slot-choice:hover:not(.is-active) {
  background: #eef2f8;
  border-color: #8ea3c3;
}

.slot-choice:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.slot-choice.is-active {
  background: #2a3f63;
  color: #ffffff;
  border-color: #2a3f63;
}

.slot-choice-archive {
  border-color: #f0c15a;
  background: #ffe7a1;
  color: #5b3b00;
  font-weight: 700;
}

.slot-choice-archive.is-active {
  background: #f0c15a;
  border-color: #e1a83a;
  color: #4a3100;
}

.slot-choice-demo {
  border-color: #7ec9b0;
  background: #e9fbf4;
  color: #0f5f47;
  font-weight: 700;
}

.slot-choice-demo.is-active {
  background: #2fa079;
  border-color: #2fa079;
  color: #ffffff;
}

.slot-choice-skip {
  border-color: #d5a2a2;
  color: #8b1f1f;
  background: #fff5f5;
}

.slot-choice-skip.is-active {
  background: #8b1f1f;
  border-color: #8b1f1f;
  color: #ffffff;
}

.slot-panels {
  display: grid;
  gap: 10px;
}

.slot-panel {
  display: none;
  border: 1px solid #d9d9d9;
  background: #ffffff;
  border-radius: 6px;
  padding: 10px;
}

.slot-panel.is-active {
  display: block;
}

.slot-action-title {
  font-weight: 600;
  color: #2a3f63;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.slot-panel .controls {
  gap: 6px;
}

.slot-note {
  font-size: 12px;
  color: #374151;
  margin-left: 6px;
}

.slot-summary {
  margin-top: 8px;
  font-size: 12px;
  padding: 5px 7px;
  border: 1px dashed #c6cfdf;
  border-radius: 6px;
  background: #f7faff;
}

.log-panel.is-skipped {
  opacity: 0.85;
}

.log-panel.is-loaded {
  border-color: #6f9dd8;
  background: #e8f7e8;
}

@media (max-width: 900px) {
  .slot-choices {
    justify-content: flex-start;
  }
}

.compare-only {
  display: none;
}

.compare-count-2 .compare-only-2,
.compare-count-3 .compare-only-2,
.compare-count-4 .compare-only-2 {
  display: block;
}

.compare-only-3 {
  display: none;
}

.compare-count-3 .compare-only-3,
.compare-count-4 .compare-only-3 {
  display: block;
}

.compare-only-4 {
  display: none;
}

.compare-count-4 .compare-only-4 {
  display: block;
}

.remote-picker {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dotted #999999;
  background: #f7f7f7;
}

.remote-label {
  font-weight: 600;
  margin-bottom: 4px;
}

#repoSearch,
#repoSearchB,
#repoSearchC,
#repoSearchD {
  width: min(520px, 100%);
  padding: 6px 8px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#repoSearch:focus-visible,
#repoSearchB:focus-visible,
#repoSearchC:focus-visible,
#repoSearchD:focus-visible {
  outline: none;
  border-color: #7fa0ce;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.repo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}

.repo-filters:empty {
  display: none;
  margin: 0;
}

.repo-filter {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #444444;
  gap: 2px;
}

.repo-filter select {
  padding: 4px 6px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
  font-size: 12px;
  min-width: 120px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.repo-filter select:focus-visible {
  outline: none;
  border-color: #7fa0ce;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.repo-results {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.repo-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px dashed #9fb6dd;
  background: #eef4ff;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}

.repo-tree {
  border: 1px solid #c3c3c3;
  background: #ffffff;
  padding: 6px 8px;
}

.repo-tree details {
  margin: 4px 0;
}

.repo-tree .repo-year {
  margin-left: 14px;
}

.repo-tree .repo-subcat {
  margin-left: 28px;
}

.repo-tree summary {
  cursor: pointer;
  font-weight: 700;
}

.repo-tree .repo-year summary {
  font-weight: 600;
  color: #1f3e74;
}

.repo-tree .repo-subcat summary {
  font-weight: 600;
  color: #3b3b3b;
}

.repo-tree button.repo-leaf {
  width: 100%;
  text-align: left;
  border: 1px solid #c3c3c3;
  background: #ffffff;
  padding: 4px 6px;
  margin: 4px 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.repo-tree button.repo-leaf:hover {
  background: #f0f6ff;
}

.repo-tree button.repo-leaf:focus-visible {
  outline: none;
  border-color: #7fa0ce;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.repo-tree button.repo-leaf {
  margin-left: 42px;
}

.repo-list {
  display: grid;
  gap: 6px;
}

.repo-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid #d2d2d2;
  background: #ffffff;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.repo-row:hover {
  border-color: #2a3f63;
  background: #f3f6fb;
}

.repo-row:focus-visible {
  outline: none;
  border-color: #7fa0ce;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.repo-path {
  font-size: 11px;
  color: #666666;
}

.repo-file {
  font-weight: 600;
  color: #1f2f4a;
}

.link-button {
  background: transparent;
  border: none;
  color: #2a3f63;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.link-button:hover {
  color: #1d3558;
}

.link-button:focus-visible {
  outline: none;
  border-radius: 3px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.load-summary {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #c8c8c8;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.load-summary-title {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #2a3f63;
}

.load-summary-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-chip {
  border: 1px solid #b9b9b9;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  background: #ffffff;
  color: #333333;
}

.summary-chip.loaded {
  border-color: #7ac16b;
  background: #eaf6ed;
  color: #1f6b2c;
}

.summary-chip.skipped {
  border-color: #a6a6a6;
  background: #f0f0f0;
  color: #555555;
}

.summary-chip.empty {
  border-color: #f1c76c;
  background: #fff7e6;
  color: #7a5b1d;
}

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

.load-summary-actions #viewReportsBtn {
  background: #2b6fe8;
  border-color: #1e56bf;
  color: #ffffff;
  font-weight: 700;
}

.load-summary-actions #viewReportsBtn:hover:not(:disabled) {
  background: #255fcb;
  border-color: #1a4aa5;
}

.load-summary-actions #viewReportsBtn:disabled {
  background: #b9c6e8;
  border-color: #9fb2e5;
  color: #f6f8ff;
}

.load-summary-hint {
  font-size: 12px;
  color: #555555;
}

.drop-replace {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
}

.drop-replace.active {
  display: flex;
}

.drop-replace-card {
  background: #ffffff;
  border: 1px solid #d2d2d2;
  border-radius: 10px;
  padding: 16px 20px;
  width: min(520px, 90vw);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  display: grid;
  gap: 10px;
}

.drop-replace-title {
  font-weight: 700;
  color: #2a3f63;
}

.drop-replace-text {
  font-size: 13px;
  color: #444444;
}

.drop-replace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.compare-workspace {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 0 10px;
  border: 1px solid #c4d3ea;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
  box-shadow: 0 5px 14px rgba(29, 62, 111, 0.12);
  padding: 8px 10px;
}

.compare-workspace-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.compare-workspace-title {
  font-size: 12px;
  font-weight: 800;
  color: #193d6e;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.compare-workspace-report {
  font-size: 11px;
  color: #2a4f80;
  font-weight: 600;
}

.compare-workspace-slot-row {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compare-workspace-slot {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid #bdd0eb;
  background: #ffffff;
  color: #23456f;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  padding: 4px 10px;
}

.compare-workspace-slot.compare-a {
  border-color: #88a9e8;
  background: #ebf2ff;
  color: #184dae;
}

.compare-workspace-slot.compare-b {
  border-color: #e8abab;
  background: #fff1f1;
  color: #ab2525;
}

.compare-workspace-slot.compare-c {
  border-color: #9acda4;
  background: #eef9ef;
  color: #2e7d32;
}

.compare-workspace-slot.compare-d {
  border-color: #d2b6e4;
  background: #f8f0fd;
  color: #702f98;
}

.compare-workspace-controls {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compare-ui-toggle,
.compare-workspace-jump,
.compare-insight-chip {
  min-height: 34px;
  border: 1px solid #b4c8e8;
  border-radius: 8px;
  background: #ffffff;
  color: #23476f;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.compare-ui-toggle:hover,
.compare-workspace-jump:hover,
.compare-insight-chip:hover {
  background: #edf4ff;
}

.compare-ui-toggle.active {
  border-color: #2e64b0;
  background: #dce9fb;
  color: #173a66;
}

.compare-ui-toggle:focus-visible,
.compare-workspace-jump:focus-visible,
.compare-insight-chip:focus-visible {
  outline: none;
  border-color: #2f65b3;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.compare-insight-strip {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.compare-insight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compare-insight-chip {
  flex: 1 1 260px;
  text-align: left;
}

.compare-insight-chip:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.compare-insight-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compare-workspace-jump {
  min-width: 108px;
}

@media (min-width: 768px) {
  .compare-grid.compare-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

.compare-grid.compare-narrow {
  justify-content: start;
  gap: 12px;
}

.compare-grid.compare-stack {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .compare-grid.compare-stack.compare-count-2,
  .compare-grid.compare-stack.compare-count-3,
  .compare-grid.compare-stack.compare-count-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .compare-grid.compare-narrow.compare-count-2 {
    grid-template-columns: max-content max-content;
  }

  .compare-grid.compare-narrow.compare-count-3 {
    grid-template-columns: repeat(3, max-content);
  }

  .compare-grid.compare-narrow.compare-count-4 {
    grid-template-columns: repeat(4, max-content);
  }
}

.compare-panel {
  border: 1px solid #cfd8e8;
  background: #fbfcff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.compare-scroll {
  padding: 8px 10px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  max-width: 100%;
}

.compare-scroll--tall {
  max-height: min(72vh, 980px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.compare-scroll table {
  width: auto !important;
  display: inline-table;
}

.compare-scroll table.mtc {
  max-width: none;
  min-width: max-content;
}

.compare-scroll.compare-scroll-wrap table {
  width: auto !important;
}

.compare-panel .compare-head {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0;
  padding: 8px 10px 7px;
  border-bottom: 1px solid #d9e2f1;
  background: linear-gradient(180deg, #f9fbff 0%, #edf3ff 100%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.compare-head-main {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.compare-head-call {
  font-size: 13px;
  font-weight: 700;
}

.compare-head-meta {
  font-size: 11px;
  color: #38557e;
  font-weight: 600;
}

.compare-slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #b9c8e4;
  background: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.compare-panel.compare-a .compare-head-call,
.compare-panel.compare-a .compare-slot-badge {
  color: #1e5bd6;
}

.compare-panel.compare-a .compare-slot-badge {
  border-color: #8fa9e8;
  background: #edf3ff;
}

.compare-panel.compare-b .compare-head-call,
.compare-panel.compare-b .compare-slot-badge {
  color: #c62828;
}

.compare-panel.compare-b .compare-slot-badge {
  border-color: #e8acac;
  background: #fff1f1;
}

.compare-panel.compare-c .compare-head-call,
.compare-panel.compare-c .compare-slot-badge {
  color: #2e7d32;
}

.compare-panel.compare-c .compare-slot-badge {
  border-color: #9fc9a2;
  background: #eef9ee;
}

.compare-panel.compare-d .compare-head-call,
.compare-panel.compare-d .compare-slot-badge {
  color: #6a1b9a;
}

.compare-panel.compare-d .compare-slot-badge {
  border-color: #d0b3e1;
  background: #f6edfc;
}

.compare-scroll.compare-scroll-sync {
  scrollbar-color: #9db0d9 #eaf0fb;
}

.compare-grid.compare-sticky-off .compare-panel .compare-head {
  position: static;
}

@media (max-width: 760px) {
  .compare-panel .compare-head {
    position: static;
  }

  .compare-head-meta {
    font-size: 10px;
  }

  .compare-scroll {
    padding: 7px 8px 8px;
  }

  .compare-workspace {
    position: static;
  }
}

@media (max-width: 768px) {
  .compare-ui-toggle,
  .compare-workspace-jump,
  .compare-insight-chip,
  .chart-mode-btn,
  .spots-coach-action,
  .coach-choice-btn,
  .cqapi-load-btn {
    min-height: 44px;
  }

  .compare-workspace-slot {
    min-height: 32px;
  }

  .bar-row {
    flex-wrap: wrap;
    gap: 5px;
  }

  .bar-label {
    min-width: 0;
    width: 100%;
  }

  .bar-track {
    flex-basis: 100%;
    max-width: none;
  }

  .bar-value {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
}

.compare-focus {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
  font-size: 12px;
}

.compare-focus select {
  padding: 4px 6px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
}

.compare-grid.compare-chart {
  align-items: stretch;
}

@media (min-width: 768px) {
  .compare-grid.compare-chart.compare-count-3,
  .compare-grid.compare-chart.compare-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .compare-grid.compare-quad.compare-count-3,
  .compare-grid.compare-quad.compare-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.compare-log-wrap {
  overflow-x: auto;
}

.compare-log-wrap--tall {
  max-height: min(74vh, 980px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.compare-log-table th,
.compare-log-table td {
  white-space: nowrap;
}

.compare-bucket {
  background: #f0f0f0;
  font-weight: 600;
  text-align: left;
}

.map-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 6px 0 10px;
  font-size: 12px;
}

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

.map-swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid #333333;
}


.drop-zone {
  width: 100%;
  min-height: 7.5rem;
  border: 2px dashed #b0b0b0;
  border-radius: 6px;
  background: linear-gradient(180deg, #f9f9f9 0%, #f1f1f1 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.drop-zone.drag-over {
  border-color: #1f6feb;
  background: #eaf2ff;
}

.drop-zone:focus-within {
  border-color: #1f6feb;
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.25);
}

.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.drop-zone .drop-hint {
  font-size: 0.9rem;
  color: #4a4a4a;
}

.drop-zone .button {
  background: #dddddd;
  color: #000;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  min-width: 10rem;
}

.drop-zone input:focus + .drop-zone-inner .button,
.drop-zone .button:hover {
  background: #cccccc;
}

.drag-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.55);
  z-index: 9999;
  pointer-events: none;
}

.drag-overlay.active {
  display: flex;
}

.drag-overlay.notice {
  display: flex;
}

.drag-overlay-message {
  background: rgba(255, 255, 255, 0.95);
  border: 2px dashed #1f6feb;
  color: #1f3e74;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1.2rem 1.6rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.status {
  font-size: 13px;
  color: #374151;
}

#logClearFilters {
  font-size: 8pt;
  border-bottom: 1px dotted #0000ff;
  text-decoration: none;
}

.log-filter-note {
  font-size: 8pt;
  margin: 4px 0;
}

.log-filter-hint {
  color: #666666;
  font-style: italic;
}

.recon-note {
  border: 2px solid #c62828;
  background: #fff4f4;
  color: #7a1b1b;
  font-weight: 700;
  padding: 8px 10px;
  margin: 6px 0 10px;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}

.scoring-note {
  border-color: #b26a00;
  background: #fff8e6;
  color: #6f4100;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 56px);
  min-width: 0;
}

.app-layout-shell {
  width: 100%;
  table-layout: fixed;
}

.app-layout-shell > tbody > tr > td {
  min-width: 0;
}

.sidebar {
  border-right: 1px solid #d3dbe8;
  background: #f1f4f8;
  padding: 12px 10px;
  overflow-y: auto;
  vertical-align: top;
}

.sidebar ol {
  padding-left: 20px;
  margin: 0 0 12px;
}

.sidebar #navList {
  list-style: none;
  padding-left: 0;
}

.sidebar li {
  margin: 2px 0;
  padding: 1px 0;
  cursor: pointer;
}

.nav-group-item {
  margin: 4px 0;
}

.nav-section-item {
  margin: 0 0 8px;
  list-style: none;
}

.nav-section {
  margin: 0;
  border: 1px solid #d3dbe8;
  border-radius: 10px;
  background: #f9fbff;
  overflow: hidden;
}

.nav-section-summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 9px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #2d4f79;
  background: linear-gradient(180deg, #edf3ff 0%, #e3ecfb 100%);
  border-bottom: 1px solid #d3dbe8;
}

.nav-section-summary::marker {
  color: #607b9e;
}

.nav-section-list {
  list-style: decimal;
  padding-left: 22px;
  margin: 4px 0 6px;
}

.nav-group {
  margin: 0;
}

.nav-group summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 6px;
}

.nav-group summary::marker {
  color: #666666;
}

.nav-group summary:hover {
  background: #e8eef8;
}

.nav-sublist {
  padding-left: 12px;
  margin: 2px 0 6px;
}

.nav-hidden {
  display: none !important;
}

.sidebar li.active {
  color: #0b4ca5;
}

.sidebar [data-index] {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sidebar [data-index]:focus-visible {
  outline: none;
  background: #e8eef8;
  border-color: #bfd3f6;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.sidebar li:hover > [data-index],
.sidebar li:hover[data-index] {
  background: #e8eef8;
}

.sidebar [data-index].active {
  color: #0f4fb6;
  background: #dce9ff;
  border-color: #bfd3f6;
  font-weight: 700;
}

.data-status {
  font-size: 12px;
  color: #555;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.sidebar-meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

.author-link {
  color: #1c6dd0;
  text-decoration: none;
}

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

.meta-sep {
  color: #9e9e9e;
}

.status-indicator {
  font-weight: 700;
}

.status-row.hidden {
  display: none;
}

.source-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.source-indicator.hidden {
  display: none;
}

.source-local {
  color: #2e7d32;
}

.source-proxy {
  color: #ef6c00;
}

.status-ok {
  color: #2e7d32;
}

.status-error {
  color: #c62828;
}

.status-qrx {
  color: #ef6c00;
  animation: statusPulse 1.2s ease-in-out infinite;
}

.status-loading,
.status-proxy-loading {
  color: #c62828;
  animation: statusPulse 1.2s ease-in-out infinite;
}

@keyframes statusPulse {
  0% { opacity: 0.35; }
  50% { opacity: 1; }
  100% { opacity: 0.35; }
}

.content {
  padding: 16px;
  min-width: 0;
}

.nav-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.nav-buttons button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.nav-buttons button,
.button,
.coach-choice-btn,
.cqapi-load-btn,
.spots-drill-filter-btn,
.spots-heat-cell {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-buttons button:hover:not(:disabled),
.button:hover:not(:disabled) {
  background: #f2f5fb;
  border-color: #9aa9c0;
}

.nav-buttons button:focus-visible,
.button:focus-visible,
.coach-choice-btn:focus-visible,
.cqapi-load-btn:focus-visible,
.spots-drill-filter-btn:focus-visible,
.spots-heat-cell:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.demo-log-btn {
  background: #5266df;
  color: #ffffff;
  border-color: #3f52c8;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  width: 15%;
  align-self: flex-start;
}

.demo-log-btn:hover {
  background: #4458d6;
  border-color: #3649c2;
}

.demo-log-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.nav-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.view-title {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 6px;
  display: inline-block;
  width: 100%;
}

.gradient {
  background: linear-gradient(90deg, #5a6be6, #d3dbff);
  color: #ffffff;
  padding: 4px 8px;
}

.view-container {
  background: #ffffff;
  border: 1px dotted #cccccc;
  border-radius: 0;
  padding: 12px;
  min-height: 300px;
  max-width: 100%;
  overflow-x: hidden;
}

.view-container > * {
  max-width: 100%;
}

.report-intro-card {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #d4deef;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
}

.report-intro-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #1f3f6f;
}

.report-intro-card p {
  margin: 0;
  color: #35557d;
  font-size: 12px;
}

.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.analysis-step-title {
  margin: 8px 0 6px;
  padding: 7px 9px;
  border: 1px solid #c9d7ee;
  border-radius: 8px;
  background: #f5f9ff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.analysis-step-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #aac2e6;
  background: #ffffff;
  color: #204874;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analysis-step-name {
  font-size: 12px;
  font-weight: 700;
  color: #204874;
}

.analysis-step-note {
  font-size: 11px;
  color: #3a5d88;
}

.report-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfd0ec;
  border-radius: 999px;
  background: #ffffff;
  color: #23466f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
}

.state-card {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #d0dbef;
  border-left: 4px solid #4f72de;
  border-radius: 10px;
  background: #f7faff;
}

.state-card h3 {
  margin: 0 0 6px;
  color: #1f3f6f;
  font-size: 14px;
}

.state-card p {
  margin: 0;
  color: #35557d;
  font-size: 12px;
}

.state-card p + p {
  margin-top: 8px;
}

.state-card.state-warn {
  border-left-color: #c08b00;
  background: #fff9ec;
}

.state-card.state-warn h3 {
  color: #704f00;
}

.state-card.state-warn p {
  color: #775614;
}

.state-card.state-error {
  border-left-color: #b43636;
  background: #fff4f4;
}

.state-card.state-error h3 {
  color: #7a1b1b;
}

.state-card.state-error p {
  color: #7a1b1b;
}

.sh6-card,
.view-container,
.compare-panel,
.log-panel,
.slot-panel,
.remote-picker,
.repo-tree,
.load-summary,
.cqapi-card,
.coach-card,
.operator-card {
  border-radius: var(--sh6-radius-md);
}

.sh6-section-title,
.view-title,
.export-title,
.load-step-title,
.log-panel-title,
.slot-action-title,
.load-summary-title {
  letter-spacing: 0.01em;
}

.export-doc {
  font-size: 8pt;
}

.export-section {
  margin: 12px 0 18px;
}

.export-title {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 6px;
}

.export-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.export-page::after {
  content: "Page " counter(page) " / " counter(pages);
  font-size: 8pt;
  color: #333333;
}

@media print {
  .no-print,
  .export-hide {
    display: none !important;
  }
  .export-doc th,
  .export-doc td {
    white-space: normal;
  }
  .export-section,
  table,
  tr,
  td,
  th {
    page-break-inside: avoid;
  }
  .export-section {
    page-break-before: always;
  }
  .export-section:first-child {
    page-break-before: avoid;
  }
}

.export-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.export-dialog {
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 14px 16px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.export-dialog-head {
  margin-bottom: 6px;
}

.export-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.export-dialog-actions button,
.export-dialog-footer button {
  padding: 5px 10px;
}

.export-dialog-list {
  border: 1px solid #eeeeee;
  padding: 8px;
  max-height: 40vh;
  overflow: auto;
}

.export-option {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 4px 0;
  font-size: 12px;
}

.export-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.export-panel {
  padding: 0 0 8px;
}

.export-panel > p {
  margin: 10px 8px;
}

.export-group {
  margin: 10px 8px;
  padding: 8px;
  border: 1px solid #d5deec;
  border-radius: 8px;
  background: #f9fbff;
}

.export-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #25456b;
  margin-bottom: 4px;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px;
}

.export-actions .button {
  padding: 6px 12px;
}

.export-note {
  font-size: 12px;
  color: #374151;
}

.utility-panel {
  padding-bottom: 10px;
}

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

.utility-block {
  border: 1px solid #d5deec;
  border-radius: 8px;
  background: #f9fbff;
  padding: 8px 10px;
}

.utility-block h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: #25456b;
}

.utility-block p {
  margin: 0;
  color: #35557d;
  font-size: 11px;
  line-height: 1.4;
}

.utility-callout {
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid #cddaf0;
  border-left: 3px solid #2f5eb2;
  border-radius: 8px;
  background: #f3f8ff;
  color: #294b75;
  font-size: 12px;
}

.utility-primary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px;
}

.utility-primary-btn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 7px;
  font-weight: 700;
}

.utility-cbr-block {
  margin: 8px;
}

.utility-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.utility-details {
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid #d5deec;
  border-radius: 8px;
  background: #f9fbff;
}

.utility-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #25456b;
}

.utility-details ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.utility-details li {
  margin: 4px 0;
  color: #35557d;
}

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

.appinfo-card {
  border: 1px solid #d5deec;
  border-radius: 8px;
  background: #f9fbff;
  padding: 8px 10px;
}

.appinfo-card h4 {
  margin: 0 0 4px;
  color: #25456b;
  font-size: 12px;
}

.appinfo-card p {
  margin: 0 0 3px;
  color: #35557d;
  font-size: 11px;
}

.band-ribbon {
  margin: 6px 0 8px;
  padding: 4px 0;
}

.period-filter-ribbon {
  margin: 4px 0 8px;
  padding: 4px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.period-filter-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.band-label {
  margin-right: 6px;
  font-weight: 700;
}

.period-label {
  margin-right: 4px;
  font-weight: 700;
  color: var(--sh6-text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.band-pill {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #cccccc;
  margin-right: 4px;
  text-decoration: none;
  color: #000000;
  background: #f7f7f7;
}

.band-pill.active {
  background: #5266df;
  color: #ffffff;
  border-color: #5266df;
}

.period-pill {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #d2ddf5;
  margin-right: 4px;
  margin-bottom: 2px;
  text-decoration: none;
  color: #2d4f80;
  background: #f7f9ff;
  border-radius: var(--sh6-radius-pill);
  font-size: 11px;
}

.period-pill.active {
  background: #1e5bd6;
  color: #ffffff;
  border-color: #1e5bd6;
}

.period-message {
  display: inline-block;
  color: var(--sh6-text-soft);
  font-size: 11px;
}

.log-controls {
  margin-top: 6px;
  margin-bottom: 8px;
}

.log-search {
  margin: 0 0 6px;
}

.log-search input[type="text"] {
  text-transform: uppercase;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  font-size: 24px;
  padding: 2px 4px;
  border: 1px solid #999999;
}

.log-pages {
  display: block;
}

.log-page {
  text-decoration: none;
  border: 1px solid transparent;
}

.log-page.active {
  background: #5266df;
  color: #ffffff;
  border-color: #5266df;
}

.log-table td,
.log-table th {
  font-family: "Courier New", Courier, monospace;
}

.log-qso {
  font-weight: bold;
}

.b160 { background: #d6d6d6; }
.b80 { background: #bcdcff; }
.b40 { background: #bff2bf; }
.b20 { background: #ffe199; }
.b15 { background: #ffc0c0; }
.b10 { background: #dcc6ff; }

.m-cw { background: #ffe680; }
.m-dig { background: #9fe6b3; }
.m-ph { background: #ffcc99; }

.c1 { background: #00ffff; text-align: center; }

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

th, td {
  padding: 3px 5px;
  border: 1px solid #d9dfe8;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.25;
}

.table-wrap {
  display: inline-block;
  width: auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #c8d3e8;
  border-radius: 8px;
  background: #ffffff;
}

.table-wrap--tall {
  max-height: min(72vh, 980px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.table-wrap table {
  width: auto !important;
  display: inline-table;
  min-width: 0;
  margin: 0;
}

.table-wrap tr.td0:hover td,
.table-wrap tr.td1:hover td {
  background: #e8f0ff;
}

.table-wrap table.sticky-head,
.compare-scroll table.sticky-head,
.compare-log-wrap table.sticky-head {
  border-collapse: separate;
  border-spacing: 0;
}

.sticky-head .sticky-head-cell {
  box-shadow: inset 0 -1px 0 #c5d3eb;
  background-clip: padding-box;
}

.sticky-col-cell {
  box-shadow: 2px 0 0 #d4ddec;
  background-clip: padding-box;
}

.sticky-cols-1 .sticky-col-1 {
  min-width: var(--sticky-col-1-width, auto);
}

.sticky-cols-2 .sticky-col-2 {
  min-width: var(--sticky-col-2-width, auto);
}

.sticky-cols-3 .sticky-col-3 {
  min-width: var(--sticky-col-3-width, auto);
}

.sticky-cols-4 .sticky-col-4 {
  min-width: var(--sticky-col-4-width, auto);
}

.report-jumpbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid #c7d4e8;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbff 0%, #edf4ff 100%);
  position: sticky;
  top: 6px;
  z-index: 8;
}

.report-jumpbar-label {
  font-size: 10px;
  font-weight: 700;
  color: #2c4f7c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.report-jumpbar-btn {
  min-height: 28px;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 999px;
}

.wrap-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  max-width: 36ch;
}

.ta1 td {
  vertical-align: top;
}

th {
  background: #edf2f8;
  text-align: left;
}

.mtc {
  border: 1px dotted var(--sh6-border-subtle);
  width: 100%;
  max-width: 100%;
}

table.mtc {
  width: max-content;
  max-width: 100%;
  table-layout: auto;
}

table.mtc.countries-month-heatmap-table {
  width: max-content;
  max-width: none;
  min-width: max-content;
  table-layout: fixed;
}

/* In compare panels, keep wide Spots/RBN matrices wider than the viewport so horizontal panning works. */
.compare-scroll table.mtc {
  width: max-content !important;
  max-width: none !important;
  min-width: max-content;
}

.compare-scroll table.mtc.countries-month-heatmap-table {
  width: max-content !important;
  max-width: none !important;
  min-width: max-content !important;
  table-layout: fixed;
}

.countries-month-heatmap-table col.countries-month-col-index {
  width: 34px;
}

.countries-month-heatmap-table col.countries-month-col-prefix {
  width: 55px;
}

.countries-month-heatmap-table col.countries-month-col-country {
  width: 150px;
}

.countries-month-heatmap-table col.countries-month-col-total {
  width: 118px;
}

.countries-month-heatmap-table col.countries-month-col-month {
  width: 58px;
}

.countries-month-heatmap-table .countries-month-index-cell,
.countries-month-heatmap-table .countries-month-prefix-cell,
.countries-month-heatmap-table .countries-month-total-cell {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.countries-month-heatmap-table .countries-month-country-cell {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.countries-month-heatmap-table .countries-month-cell,
.countries-month-heatmap-table .countries-month-header,
.countries-month-heatmap-table .countries-month-total-header,
.countries-month-heatmap-table .countries-month-total-cell {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.countries-month-heatmap-table .countries-month-cell,
.countries-month-heatmap-table .countries-month-header {
  padding-left: 4px;
  padding-right: 4px;
}

.sh6-table-dense th,
.sh6-table-dense td,
.mtc th,
.mtc td,
.cqapi-table th,
.cqapi-table td,
.cqapi-records th,
.cqapi-records td,
.cqapi-history th,
.cqapi-history td,
.coach-meta th,
.coach-meta td,
.coach-table th,
.coach-table td {
  padding: 4px 6px;
}

.map-card {
  width: 100%;
  max-width: 100%;
}

.thc th,
.thc td {
  background: #5266df;
  color: #ffffff;
  text-align: center;
}

.sh6-row-zebra-a,
.td0 {
  background: #f0f4fa;
}

.sh6-row-zebra-b,
.td1 {
  background: #fcfdff;
}

.sh6-row-selected,
.coach-row-current,
.cqapi-history-current {
  background: #e5eefc;
  font-weight: 700;
}

.thc th.sortable .sort-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.thc th.sortable .sort-link:focus {
  outline: 1px dotted #ffffff;
  outline-offset: 2px;
}

.thc th.sortable .sort-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.85);
  opacity: 0.6;
}

.thc th.sorted-asc .sort-indicator {
  border-top: 0;
  border-bottom: 6px solid rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.thc th.sorted-desc .sort-indicator {
  border-top: 6px solid rgba(255, 255, 255, 0.9);
  opacity: 1;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.bar-label {
  min-width: 82px;
  font-weight: 600;
}

.bar-track {
  flex: 1 1 180px;
  max-width: 240px;
  height: 16px;
  border: 1px solid #d5deec;
  border-radius: 4px;
  background: #f4f7fd;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, #2f6bc4 0%, #4f86d7 55%, #7ba8e8 100%);
  border-radius: 3px;
  min-width: 4px;
}

.chart-bar {
  background: linear-gradient(90deg, #1f5fb8 0%, #3f82d3 55%, #7cb3ec 100%);
}

.bar-value {
  min-width: 88px;
  text-align: right;
  font-weight: 600;
  color: #20446f;
}

.chart-card {
  margin-top: 2px;
}

.chart-mode-controls {
  margin: 2px 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chart-mode-label {
  font-size: 11px;
  font-weight: 700;
  color: #2a4f80;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 2px;
}

.chart-mode-btn {
  min-height: 34px;
  border: 1px solid #b7cbe8;
  border-radius: 7px;
  background: #ffffff;
  color: #21476f;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.chart-mode-btn:hover {
  background: #edf4ff;
}

.chart-mode-btn.active {
  border-color: #2e64b0;
  background: #dce9fb;
  color: #173a66;
}

.chart-mode-btn:focus-visible {
  outline: none;
  border-color: #2f65b3;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.freq-scatter-wrap {
  margin-top: 8px;
}

.freq-scatter {
  width: 100%;
  height: 320px;
  display: block;
}

.freq-plot-bg {
  fill: #ffffff;
  stroke: #e3e3e3;
  stroke-width: 1;
}

.freq-grid {
  stroke: #e9e9e9;
  stroke-width: 1;
}

.freq-axis {
  stroke: #333333;
  stroke-width: 1.2;
}

.freq-dot {
  fill: rgba(30, 111, 235, 0.65);
}

.spot-rate-line {
  fill: none;
  stroke: #1e5bd6;
  stroke-width: 2;
}

.spot-line {
  stroke: #c62828;
  stroke-width: 1;
  opacity: 0.6;
}

.spot-agg {
  fill: rgba(198, 40, 40, 0.3);
}

.spot-dot {
  fill: rgba(194, 40, 40, 0.7);
}

.freq-axis-text {
  font-size: 11px;
  fill: #444444;
}

.freq-axis-title {
  font-size: 12px;
  font-weight: 600;
  fill: #222222;
}

.freq-scatter-note {
  font-size: 12px;
  color: #555555;
  margin-top: 6px;
}

.sum {
  background: #0000ff;
  height: 10px;
}

.break-controls {
  margin: 6px 0 8px;
}

.break-controls input[type="range"] {
  vertical-align: middle;
  margin: 0 6px;
}

.minute-list {
  white-space: normal;
  word-break: break-word;
}

.minute-grid-table th,
.minute-grid-table td {
  padding: 2px 4px;
}

.one-minute-table {
  width: 100%;
  table-layout: fixed;
}

.one-minute-table .col-rate {
  width: 70px;
}

.one-minute-table .col-total {
  width: 80px;
}

.one-minute-table td {
  vertical-align: top;
}

.one-minute-table td.minute-list {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.one-minute-rates {
  margin-top: 5px;
  margin-bottom: 10px;
  font-size: 8pt;
}

.one-minute-header,
.one-minute-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 70px;
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
}

.one-minute-header {
  font-weight: 700;
}

.one-minute-row {
  border-left: 1px solid #dddddd;
  border-right: 1px solid #dddddd;
}

.one-minute-cell {
  min-width: 0;
}

.one-minute-rate,
.one-minute-total {
  text-align: center;
}

.one-minute-rates .log-minute {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 1px 4px;
  background: rgba(82, 102, 223, 0.08);
  border-radius: 3px;
}

.one-minute-rates .minute-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.spot-hunter-meta {
  font-size: 12px;
  color: #34527a;
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.spot-hunter-table .spot-hunter-calls {
  text-align: left;
  word-break: break-word;
}

.spot-hunter-controls {
  display: grid;
  gap: 8px;
}

.spot-hunter-intro {
  margin: 0;
  font-size: 12px;
  color: #34527a;
  line-height: 1.4;
}

.spot-hunter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spot-hunter-group-label {
  font-size: 12px;
  color: #23406d;
}

.spot-hunter-group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-hunter-group-btn {
  border: 1px solid #d0d7ea;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 12px;
  color: #23406d;
  background: #ffffff;
  cursor: pointer;
}

.spot-hunter-group-btn.active {
  background: #1e5bd6;
  border-color: #1e5bd6;
  color: #ffffff;
}

.spot-hunter-controls input[type="range"] {
  width: min(420px, 100%);
  margin-top: 6px;
}

.spot-hunter-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-hunter-mode-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-hunter-filter {
  border: 1px solid #d0d7ea;
  background: #ffffff;
  color: #23406d;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.spot-hunter-filter.active {
  background: #1e5bd6;
  border-color: #1e5bd6;
  color: #ffffff;
}

.rates-grid {
  margin-top: 5px;
  margin-bottom: 10px;
  font-size: 8pt;
}

.rates-subhead {
  margin-top: 10px;
}

.rates-header,
.rates-row {
  display: grid;
  grid-template-columns: 90px 90px 110px 110px 150px 80px 150px 80px;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
}

.rates-row {
  border-left: 1px solid #dddddd;
  border-right: 1px solid #dddddd;
}

.rates-cell {
  min-width: 0;
  text-align: center;
}

@media (max-width: 980px) {
  .rates-header,
  .rates-row {
    grid-template-columns: 70px 80px 90px 90px 1fr 70px 1fr 70px;
  }
}

@media (max-width: 760px) {
  .rates-header,
  .rates-row {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  .rates-header {
    display: none;
  }
  .rates-row .rates-cell {
    text-align: left;
  }
  .rates-row .rates-cell:nth-child(odd)::before {
    font-weight: 700;
    color: #2a3f63;
    display: block;
    margin-bottom: 2px;
  }
  .rates-row .rates-cell:nth-child(1)::before { content: "Period (min)"; }
  .rates-row .rates-cell:nth-child(2)::before { content: "QSOs"; }
  .rates-row .rates-cell:nth-child(3)::before { content: "QSOs / min"; }
  .rates-row .rates-cell:nth-child(4)::before { content: "QSOs / hour"; }
  .rates-row .rates-cell:nth-child(5)::before { content: "From (time)"; }
  .rates-row .rates-cell:nth-child(6)::before { content: "From (QSO #)"; }
  .rates-row .rates-cell:nth-child(7)::before { content: "To (time)"; }
  .rates-row .rates-cell:nth-child(8)::before { content: "To (QSO #)"; }
}

@media (max-width: 900px) {
  .one-minute-header,
  .one-minute-row {
    grid-template-columns: 70px minmax(0, 1fr) 60px;
  }
}

@media (max-width: 720px) {
  .one-minute-header,
  .one-minute-row {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .one-minute-rate,
  .one-minute-total {
    text-align: left;
  }
  .one-minute-header .one-minute-total {
    display: none;
  }
}

.mtc {
  font-size: 8pt;
}

.thc {
  background: #5266df;
  color: #ffffff;
  text-align: center;
}

.td0 {
  background: #f0f4fa;
}

.td1 {
  background: #fcfdff;
}

.mdv {
  background: #dddddd;
}

.sidebar .mdv {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 250px);
}

.sidebar #navList {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.mli,
.cli,
.sli {
  color: #1f2937;
  font-size: 8pt;
  border-bottom: 0;
  margin-top: 1px;
  text-transform: none;
  line-height: 1.3;
}

.mli {
  font-weight: 600;
}

.cli {
  margin-left: 8px;
  color: #33455f;
}

.sli {
  font-weight: 700;
}

.nav-sublist .cli {
  margin-left: 0;
}

.dal {
  border-left: 1px dotted #bbbbbb;
}

.s0 {
  background: #0000ff;
  color: #ffffff;
}

.s1 {
  background: #0060ff;
  color: #ffffff;
}

.s2 {
  background: #00c0ff;
}

.s3 {
  background: #00ffe0;
}

.s4 {
  background: #00ff80;
}

.s5 {
  background: #00ff20;
}

.s6 {
  background: #40ff00;
}

.s7 {
  background: #a0ff00;
}

.s8 {
  background: #ffff00;
}

.s9 {
  background: #ffcc00;
}

.log-page.active {
  font-weight: 700;
  text-decoration: underline;
}

.fields-map td {
  width: 30px;
  height: 20px;
  text-align: center;
  font-size: 8pt;
}

.lm {
  text-align: center;
}

.sum {
  height: 8px;
  background: #0000ff;
}

.tac {
  text-align: center;
}

.tar {
  text-align: right;
}

.tl {
  text-align: left;
}

.c2 { background: #ff0000; color: #ffffff; text-align: center; }
.c3 { background: #ffff00; text-align: center; }
.c4 { background: #0000ff; color: #ffffff; text-align: center; }
.c5 { background: #00ff00; text-align: center; }
.c6 { background: #333333; color: #ffffff; text-align: center; }
.c7 { background: #888888; color: #ffffff; text-align: center; }

.q1, .q2, .q3, .q4, .q5, .q6 {
  font-weight: 700;
  text-align: center;
}

.operator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 10px;
}

.operator-card {
  width: auto;
  border: 1px solid #dddddd;
  background: #fcfcfc;
  text-align: center;
  padding: 6px;
}

.cqapi-card {
  border: 1px solid #d0dbee;
  background: #f7fbff;
  margin-top: 6px;
  margin-bottom: 10px;
}

.cqapi-body {
  padding: 8px 10px;
}

.cqapi-source {
  margin-bottom: 6px;
  font-size: 11px;
  color: #35557d;
  word-break: break-word;
}

.cqapi-helper {
  color: #24558d;
}

.cqapi-source .cqapi-helper {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cqapi-muted {
  color: #666666;
}

.cqapi-msg {
  margin-bottom: 6px;
  font-size: 11px;
  color: #35557d;
}

.cqapi-table,
.cqapi-records,
.cqapi-history {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 8px;
  border-collapse: collapse;
}

.cqapi-table td,
.cqapi-records td,
.cqapi-history td,
.cqapi-table th,
.cqapi-records th,
.cqapi-history th {
  padding: 4px 6px;
}

.cqapi-table td:first-child {
  width: 38%;
}

.cqapi-records td:nth-child(1) {
  width: 14%;
}

.cqapi-records td:nth-child(2) {
  width: 20%;
}

.cqapi-records td:nth-child(3) {
  width: 24%;
}

.cqapi-history-current {
  background: #e5eefc;
  font-weight: 700;
}

.cqapi-history td:nth-child(1) {
  width: 8%;
}

.cqapi-history td:nth-child(2) {
  width: 14%;
}

.cqapi-history td:nth-child(5) {
  white-space: nowrap;
}

.cqapi-history td:nth-child(6) {
  white-space: nowrap;
}

.cqapi-history td:nth-child(7) {
  white-space: nowrap;
}

.cqapi-history-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cqapi-history {
  min-width: 660px;
}

.cqapi-load-cell {
  white-space: nowrap;
}

.cqapi-load-btn {
  display: inline-block;
  min-width: 30px;
  min-height: 28px;
  margin-right: 3px;
  padding: 2px 7px;
  border: 1px solid #b5c7e5;
  border-radius: 3px;
  background: #ffffff;
  color: #23406d;
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}

.cqapi-load-btn:hover:not(:disabled):not(.is-target) {
  background: #eef5ff;
  border-color: #91aed8;
}

.cqapi-load-btn:last-child {
  margin-right: 0;
}

.cqapi-load-btn.is-loading {
  opacity: 0.7;
}

.cqapi-load-btn.is-ok {
  border-color: #1f8a49;
  color: #1f8a49;
}

.cqapi-load-btn.is-error {
  border-color: #b43636;
  color: #b43636;
}

.cqapi-debug {
  margin-top: 6px;
}

.cqapi-debug summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #23406d;
}

.cqapi-debug pre {
  margin-top: 6px;
  padding: 8px;
  background: #eef4ff;
  border: 1px solid #cad8ee;
  max-height: 280px;
  overflow: auto;
  font-size: 10px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.coach-card {
  border-color: #c7d9f3;
  background: #f6fbff;
}

.coach-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
  margin: 6px 0 8px;
}

.coach-control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}

.coach-control-label {
  font-size: 11px;
  font-weight: 700;
  color: #2f4f76;
}

.coach-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.coach-choice-btn {
  border: 1px solid #b9cce8;
  background: #ffffff;
  color: #25456b;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.3;
  padding: 4px 8px;
  cursor: pointer;
}

.coach-choice-btn:hover:not(:disabled) {
  background: #eef5ff;
}

.coach-choice-btn:focus-visible {
  border-color: #2e64b0;
}

.coach-choice-btn.active {
  border-color: #2e64b0;
  background: #dce9fb;
  color: #173a66;
  font-weight: 700;
}

.coach-choice-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.coach-meta,
.coach-table {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 8px;
  border-collapse: collapse;
}

.coach-meta td,
.coach-meta th,
.coach-table td,
.coach-table th {
  padding: 4px 6px;
}

.coach-meta td:first-child {
  width: 34%;
}

.coach-priority-grid {
  margin: 8px 0 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.coach-priority-card {
  border: 1px solid #d0dbee;
  border-radius: 8px;
  background: #fcfdff;
  padding: 8px 10px;
  min-width: 0;
}

.coach-priority-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.coach-priority-head h4 {
  margin: 0;
  color: #25456b;
  font-size: 12px;
}

.coach-priority-card p {
  margin: 0;
  color: #2b4a70;
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.coach-brief-wrap h4 {
  margin: 8px 0 6px;
  font-size: 12px;
  color: #2a4568;
}

.coach-brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.coach-brief-card {
  border: 1px solid #d0dbee;
  border-radius: 8px;
  background: #fcfdff;
  padding: 8px 10px;
  min-width: 0;
}

.coach-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.coach-brief-head h4 {
  margin: 0;
  color: #25456b;
  font-size: 12px;
}

.coach-brief-note {
  margin: 0 0 6px;
  font-size: 11px;
  color: #395980;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.coach-brief-list {
  margin: 0;
  padding-left: 16px;
  color: #2e4d74;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.coach-brief-list li {
  margin: 2px 0;
}

.coach-brief-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coach-brief-btn {
  min-height: 30px;
  border: 1px solid #b7cbe8;
  border-radius: 7px;
  background: #ffffff;
  color: #1f446f;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.coach-brief-btn:hover {
  background: #edf4ff;
}

.coach-brief-btn:focus-visible {
  outline: none;
  border-color: #2f65b3;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.coach-insights-wrap h4 {
  margin: 8px 0 4px;
  font-size: 12px;
  color: #2a4568;
}

.coach-insights {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.coach-insights li {
  margin: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.coach-severity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border: 1px solid #b9cbe7;
  border-radius: 999px;
  background: #ffffff;
  color: #23456f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 7px;
}

.coach-severity-critical,
.coach-priority-critical {
  border-color: #e2b2b2;
  background: #fff2f2;
  color: #8c2b2b;
}

.coach-severity-high,
.coach-priority-high {
  border-color: #e2c3a0;
  background: #fff6ec;
  color: #8b4d09;
}

.coach-severity-medium,
.coach-priority-medium {
  border-color: #d4ca93;
  background: #fffbe9;
  color: #6c5f19;
}

.coach-severity-opportunity,
.coach-priority-opportunity {
  border-color: #a8cfad;
  background: #edf9ef;
  color: #246233;
}

.coach-severity-info,
.coach-priority-info {
  border-color: #b9cbe7;
  background: #f1f6ff;
  color: #23456f;
}

.coach-quick-actions {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid #c8d7f0;
  border-radius: 8px;
  background: #f2f7ff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.coach-quick-hint {
  font-size: 11px;
  color: #23466f;
  font-weight: 600;
}

.coach-quick-load {
  min-width: 188px;
  margin-right: 0;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

.coach-rivals-card,
.coach-driver-card {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #d1dcef;
  border-radius: 8px;
  background: #fcfdff;
}

.coach-rivals-card h4,
.coach-driver-card h4 {
  margin: 0 0 6px;
  color: #25456b;
  font-size: 12px;
}

.coach-rivals-table {
  width: 100%;
  min-width: 720px;
  margin: 0;
}

.coach-rivals-table td:nth-child(6) {
  white-space: nowrap;
}

.coach-driver-list {
  margin: 0;
  padding-left: 18px;
  color: #2a476e;
}

.coach-driver-list li {
  margin: 3px 0;
}

.coach-load-cell {
  white-space: nowrap;
  min-width: 246px;
}

.coach-load-btn {
  min-width: 62px;
  margin-right: 0;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.35;
}

.coach-load-btn + .coach-load-btn {
  border-left: none;
}

.coach-load-btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.coach-load-btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.coach-load-btn.is-target {
  border-color: #2e64b0;
  background: #dce9fb;
  color: #173a66;
  font-weight: 700;
}

.coach-load-control {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.coach-load-prefix {
  font-size: 10px;
  color: #2f4f76;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.coach-load-segment {
  display: inline-flex;
  align-items: center;
}

.coach-last-loaded {
  font-size: 10px;
  color: #1f4e83;
  font-weight: 700;
}

.coach-table {
  min-width: 980px;
}

.coach-row-current {
  background: #e5eefc;
  font-weight: 700;
}

@media (max-width: 760px) {
  .cqapi-body {
    padding: 8px;
  }

  .cqapi-table td:first-child {
    width: 44%;
  }

  .cqapi-source {
    font-size: 10px;
  }

  .cqapi-msg {
    font-size: 10px;
  }

  .cqapi-debug summary {
    font-size: 10px;
  }

  .cqapi-load-btn {
    min-width: 28px;
    min-height: 26px;
    padding: 1px 6px;
    font-size: 10px;
  }

  .coach-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .coach-control-group {
    min-width: 0;
    width: 100%;
  }

  .coach-choice-row {
    width: 100%;
  }

  .coach-choice-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .coach-meta td:first-child {
    width: 42%;
  }

  .coach-quick-actions {
    align-items: stretch;
  }

  .coach-quick-load {
    width: 100%;
    min-width: 0;
  }

  .coach-rivals-table {
    min-width: 640px;
  }

  .coach-load-cell {
    min-width: 166px;
  }

  .coach-load-prefix {
    font-size: 9px;
  }

  .coach-last-loaded {
    font-size: 9px;
  }

  .utility-primary-row {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-primary-btn {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .content {
    padding: 12px;
  }

  .sidebar {
    padding: 10px 8px;
  }

  .mdv {
    min-width: 0 !important;
  }

  .load-tip-badge {
    display: inline-flex;
    margin: 6px 0 0;
  }

  .demo-log-btn {
    width: auto;
    min-width: 150px;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .compare-grid.compare-count-3,
  .compare-grid.compare-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .brand {
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0;
  }

  .load-panel-head {
    align-items: flex-start;
  }

  .load-panel-reset-btn {
    align-self: flex-start;
  }

  .subtitle {
    font-size: 12px;
  }

  .ta1,
  .ta1 > tbody,
  .ta1 > tbody > tr,
  .ta1 > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #d3dbe8;
    max-height: none;
  }

  .sidebar .mdv {
    max-height: none;
    display: block;
  }

  .sidebar #navList {
    overflow: visible;
    padding-right: 0;
  }

  .nav-buttons {
    justify-content: flex-start;
  }

  .compare-grid.compare-count-2,
  .compare-grid.compare-count-3,
  .compare-grid.compare-count-4 {
    grid-template-columns: 1fr;
  }

  .report-jumpbar {
    position: static;
    padding: 5px 6px;
  }
}

@media (min-width: 1440px) {
  .content {
    padding: 18px;
  }

  .compare-grid {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loading-spinner,
  .compare-spinner {
    animation: none !important;
  }

  .status-loading,
  .status-proxy-loading,
  .status-qrx {
    animation: none !important;
  }
}

.map-all-row td {
  background: #f2f2f2;
}

.map-all-row a {
  font-weight: 700;
}

body.landing-only #bandRibbon,
body.landing-only .nav-buttons,
body.landing-only #viewTitle {
  display: none;
}

body.load-active #viewTitle,
body.load-active #viewContainer {
  display: none;
}

body.landing-only .view-container {
  border: none;
  padding: 0;
  min-height: 0;
  background: transparent;
}

body.landing-only .content {
  padding: 20px 24px;
}

.landing-page {
  max-width: 980px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.landing-page.is-hidden {
  display: none;
}

.landing-hero {
  margin-bottom: 18px;
}

.landing-hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.landing-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5266df;
  margin-bottom: 6px;
  font-weight: 700;
}

.landing-logo {
  height: 44px;
  width: auto;
  display: block;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.landing-brand-text {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #2a3f63;
}

.landing-start-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  background: #2a3f63;
  border: 1px solid #1f2f4a;
  border-radius: 999px;
  padding: 10px 18px;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.landing-start-link:hover {
  background: #223456;
  border-color: #1a2942;
}

.landing-start-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.landing-card,
.landing-panel {
  border: 1px solid #dddddd;
  background: #f8f8f8;
  padding: 14px 16px;
}

.landing-card h3,
.landing-panel h3 {
  margin-top: 0;
}

.landing-section {
  margin-top: 18px;
}


.landing-steps {
  margin: 6px 0 10px 20px;
}

.landing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.landing-bullets {
  margin: 6px 0 0 20px;
}

.landing-bullets li {
  margin: 4px 0;
}

.landing-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.landing-status-label {
  font-weight: 700;
  margin-bottom: 4px;
}

.landing-status-text {
  border: 1px solid #dddddd;
  background: #f8f8f8;
  padding: 8px 10px;
  font-size: 12px;
  color: #444444;
}

.not-master-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 6px 0 8px;
}

.not-master-controls button {
  padding: 4px 10px;
}

.np {
  width: 160px;
  height: 120px;
  margin: 0 auto 6px;
  border: 1px dashed #cccccc;
}

.op-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #777777;
  overflow: hidden;
}

.op-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.op-photo-loading {
  background: #f6f6f6;
}

.op-photo-missing {
  color: #999999;
}

.map-preview {
  margin: 8px 0;
  border: 1px solid #cccccc;
  background: #ffffff;
  padding: 4px;
}

#map {
  width: 100%;
  height: 60vh;
  min-height: 520px;
  border: 1px solid #cccccc;
}

.map-controls {
  margin: 6px 0;
}

.map-actions {
  margin: 6px 0 10px;
}

.map-full-link {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #c4c9d6;
  border-radius: 6px;
  background: #ffffff;
  color: #23406d;
  font-size: 12px;
  text-decoration: none;
}

.map-full-link:hover {
  border-color: #1e5bd6;
  color: #1e5bd6;
}

body.map-full .ta1 > tbody > tr > td:not(.sidebar) {
  width: 100% !important;
}

body.map-view .ta1 > tbody > tr > td:not(.sidebar) {
  width: 100% !important;
}

body.map-full .mtc,
body.map-view .mtc {
  width: 100%;
}

body.map-full #map {
  height: 85vh;
  min-height: 700px;
}

body.map-view #map {
  height: 70vh;
  min-height: 620px;
}

/* Phase 1: stronger visual hierarchy, clearer section rhythm, denser-readable tables */

.report-title-hero {
  font-size: 13pt;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #173a66;
}

.report-title-section {
  font-size: 11pt;
  font-weight: 700;
  color: #24486f;
}

.report-note-muted {
  font-size: 11px;
  color: #4b5f7f;
}

.view-title {
  margin-bottom: 10px;
  padding: 0 0 7px;
  border-bottom: 1px solid #d7e1f2;
  color: #1f3f6f;
  font-size: 12pt;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gradient {
  padding: 6px 10px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(90deg, #395dd6 0%, #6f8ef0 56%, #dde6ff 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.view-container {
  border: 1px solid #c9d4e8;
  background: #fcfdff;
  padding: 14px;
}

.load-panel-head {
  border-color: #c8d6ef;
  background: linear-gradient(180deg, #fcfeff 0%, #eef4ff 100%);
}

.load-panel-title {
  font-size: 15px;
}

.load-panel-subtitle {
  color: #2f527e;
}

.load-step {
  margin-bottom: 14px;
  padding: 12px 13px;
  border-color: #ccd8ee;
  background: linear-gradient(180deg, #fdfefe 0%, #f3f7ff 100%);
  box-shadow: 0 1px 0 rgba(24, 39, 75, 0.05);
}

.load-step-title {
  margin-bottom: 5px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.load-step-note {
  margin-bottom: 8px;
  color: #355781;
}

.landing-page {
  line-height: 1.65;
}

.landing-hero h1 {
  margin: 2px 0 8px;
  font-size: 29px;
  line-height: 1.15;
  color: #102d58;
}

.landing-hero p {
  max-width: 74ch;
}

.landing-card,
.landing-panel {
  border: 1px solid #d1dcec;
  border-radius: 10px;
  background: #fbfcff;
  box-shadow: 0 1px 0 rgba(16, 42, 86, 0.04);
}

.landing-card h3,
.landing-panel h3 {
  font-size: 16px;
  color: #1f3f6f;
}

.landing-section {
  margin-top: 16px;
}

.export-actions.export-note {
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid #d5deec;
  border-left: 3px solid #4f72de;
  border-radius: 8px;
  background: #f8fbff;
}

.export-actions.export-note + .mtc,
.export-actions.export-note + .table-wrap {
  margin-top: 4px;
}

table,
th,
td {
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 4px 7px;
  border-color: #d4dceb;
}

.mtc {
  border: 1px solid #c8d3e8;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

/* Spots/RBN panels contain wide matrices; allow overflow so compare scroller can pan horizontally. */
.mtc.export-panel.spots-panel {
  overflow: visible;
}

.thc th,
.thc td {
  background: linear-gradient(180deg, #4f66da 0%, #4259ca 100%);
  color: #ffffff;
  text-align: center;
  font-weight: 700;
}

.thc th.sortable .sort-link:focus {
  outline: 1px dotted #ffffff;
  outline-offset: 3px;
}

.td0 {
  background: #f3f6fc;
}

.td1 {
  background: #fcfdff;
}

.sh6-row-selected,
.coach-row-current,
.cqapi-history-current {
  background: #dde9fb;
}

/* Shared nav/shell controls for classic + NT */
.nav-tools {
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid #d3dbe8;
  border-radius: 8px;
  background: #f7faff;
}

.nav-search-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #2d4e79;
}

#navSearchInput {
  width: 100%;
  border: 1px solid #c0ccdf;
  border-radius: 7px;
  padding: 7px 8px;
  font-size: 12px;
  background: #ffffff;
  color: #1b2f4f;
}

#navSearchInput:focus-visible {
  outline: none;
  border-color: #2f65b3;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--sh6-focus-ring);
}

.ui-theme-switch {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c3d1e7;
  border-radius: 999px;
  overflow: hidden;
  background: #eef4ff;
}

.ui-theme-btn {
  border: 0;
  background: transparent;
  color: #1f3f6f;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
  min-height: 30px;
}

.ui-theme-btn:hover {
  background: #dfe9fb;
}

.ui-theme-btn.active {
  background: #2c64bc;
  color: #ffffff;
  font-weight: 700;
}

/* NT redesign shell baseline */
body.ui-theme-nt {
  background:
    radial-gradient(1200px 500px at 16% -4%, rgba(52, 98, 189, 0.16), transparent 68%),
    radial-gradient(1000px 500px at 100% 0%, rgba(27, 67, 140, 0.12), transparent 65%),
    #f0f4fa;
  color: #122743;
}

body.ui-theme-nt .app-topbar-shell {
  border-bottom: 0 !important;
  border-collapse: collapse;
  background: linear-gradient(102deg, #163a66 0%, #204f86 48%, #3a6ca3 100%);
  box-shadow: 0 10px 24px rgba(14, 36, 70, 0.23);
}

body.ui-theme-nt .app-topbar-shell td {
  padding: 10px 16px;
  border: 0;
}

body.ui-theme-nt .brand {
  gap: 12px;
}

body.ui-theme-nt .brand-logo {
  height: 32px;
}

body.ui-theme-nt .subtitle {
  color: #e4efff;
  font-size: 14px;
  letter-spacing: 0.02em;
}

body.ui-theme-nt .nav-buttons button {
  border: 1px solid rgba(194, 216, 252, 0.45);
  background: rgba(247, 251, 255, 0.17);
  color: #f3f8ff;
  font-weight: 700;
}

body.ui-theme-nt .nav-buttons button:hover:not(:disabled) {
  border-color: rgba(222, 236, 255, 0.8);
  background: rgba(247, 251, 255, 0.3);
}

body.ui-theme-nt .app-layout-shell {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

body.ui-theme-nt .app-layout-shell > tbody > tr > td {
  border: 0;
}

body.ui-theme-nt .app-layout-shell > tbody > tr > td.sidebar {
  width: 300px !important;
  min-width: 300px;
  max-width: 340px;
}

body.ui-theme-nt .sidebar {
  border-right: 1px solid #c7d6ec;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fd 100%);
  padding: 14px 12px;
}

body.ui-theme-nt .sidebar [data-index] {
  border-radius: 8px;
  padding: 4px 7px;
}

body.ui-theme-nt .sidebar [data-index].active {
  border-color: #9eb9ea;
  background: linear-gradient(90deg, #d5e4ff 0%, #edf3ff 100%);
  color: #0e3f87;
}

body.ui-theme-nt .nav-group summary {
  border-radius: 8px;
}

body.ui-theme-nt .sidebar-meta,
body.ui-theme-nt .data-status {
  border-top-color: #cfdaec;
}

body.ui-theme-nt .content {
  padding: 20px 22px;
}

body.ui-theme-nt .view-title {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #c7d4e8;
  border-radius: 12px;
  background: linear-gradient(100deg, #2a5da8 0%, #3f74bc 42%, #dce8fb 100%);
  color: #f6f9ff;
}

body.ui-theme-nt .view-container {
  border: 1px solid #c5d3e9;
  border-radius: 14px;
  background: #fcfdff;
  box-shadow: 0 12px 26px rgba(27, 52, 94, 0.09);
  padding: 16px;
}

body.ui-theme-nt .load-step {
  border-color: #c8d8f2;
  background: linear-gradient(180deg, #fbfdff 0%, #f0f6ff 100%);
  border-radius: 12px;
}

body.ui-theme-nt .log-panel {
  border: 1px solid #c5d5ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
}

body.ui-theme-nt .slot-choice {
  border-color: #b8cae7;
  background: #f7faff;
  border-radius: 999px;
}

body.ui-theme-nt .slot-choice.is-active {
  background: #2c64bc;
  border-color: #2c64bc;
  color: #ffffff;
}

body.ui-theme-nt .mtc {
  border-color: #c7d4ea;
}

body.ui-theme-nt .thc th,
body.ui-theme-nt .thc td {
  background: linear-gradient(180deg, #3c63be 0%, #2f56af 100%);
}

body.ui-theme-nt .export-actions.export-note {
  border-left-color: #3662b8;
  background: #f4f8ff;
}

body.ui-theme-nt .report-intro-card {
  border-color: #c5d5ee;
  background: linear-gradient(180deg, #fafdff 0%, #eef5ff 100%);
}

body.ui-theme-nt .report-chip {
  border-color: #aec4ea;
  color: #173c70;
}

body.ui-theme-nt .state-card {
  border-color: #c5d5ee;
  background: #f4f8ff;
}

body.ui-theme-nt .bar-track {
  border-color: #c1d2ec;
  background: #f2f6fd;
}

body.ui-theme-nt .chart-mode-btn {
  border-color: #aec4ea;
  color: #173c70;
}

body.ui-theme-nt .chart-mode-btn.active {
  background: #dce9fb;
}

body.ui-theme-nt .compare-workspace {
  border-color: #bdd0eb;
  background: linear-gradient(180deg, #fafdff 0%, #edf4ff 100%);
}

body.ui-theme-nt .compare-insight-chip,
body.ui-theme-nt .compare-workspace-jump,
body.ui-theme-nt .compare-ui-toggle {
  border-color: #aec4ea;
  color: #173c70;
}

body.ui-theme-nt .compare-ui-toggle.active {
  background: #dce9fb;
}

@media (max-width: 1024px) {
  body.ui-theme-nt .app-layout-shell > tbody > tr > td.sidebar {
    width: 260px !important;
    min-width: 0;
    max-width: none;
  }

  body.ui-theme-nt .content {
    padding: 14px;
  }
}

@media (max-width: 768px) {
  body.ui-theme-nt .app-topbar-shell td {
    padding: 8px 10px;
  }

  body.ui-theme-nt .sidebar {
    border-right: 0;
    border-bottom: 1px solid #c7d6ec;
    padding: 10px;
  }

  body.ui-theme-nt .view-title {
    border-radius: 10px;
    font-size: 10pt;
  }

  body.ui-theme-nt .view-container {
    border-radius: 10px;
    padding: 10px;
  }
}

@media (min-width: 1440px) {
  body.ui-theme-nt .content {
    padding: 24px 28px;
  }

  body.ui-theme-nt .view-container {
    padding: 20px;
  }

  body.ui-theme-nt .sidebar {
    padding-top: 16px;
  }
}

/* NT compact density tuning */
body.ui-theme-nt .app-topbar-shell td {
  padding: 8px 12px;
}

body.ui-theme-nt .brand {
  gap: 9px;
}

body.ui-theme-nt .subtitle {
  font-size: 13px;
}

body.ui-theme-nt .app-layout-shell > tbody > tr > td.sidebar {
  width: 280px !important;
  min-width: 280px;
  max-width: 320px;
}

body.ui-theme-nt .sidebar {
  padding: 10px 9px;
}

body.ui-theme-nt .nav-section-summary {
  padding: 6px 8px;
  font-size: 10px;
}

body.ui-theme-nt .nav-section-list {
  margin: 2px 0 4px;
}

body.ui-theme-nt .sidebar [data-index] {
  padding: 3px 6px;
}

body.ui-theme-nt .content {
  padding: 14px 16px;
}

body.ui-theme-nt .view-title {
  margin: 0 0 8px;
  padding: 6px 8px;
}

body.ui-theme-nt .view-container {
  border-radius: 12px;
  padding: 11px 12px;
}

body.ui-theme-nt .report-intro-card {
  margin-bottom: 8px;
  padding: 8px 10px;
}

body.ui-theme-nt .analysis-step-title {
  margin: 6px 0 5px;
  padding: 6px 8px;
}

body.ui-theme-nt .analysis-step-note {
  font-size: 10px;
}

body.ui-theme-nt .state-card {
  padding: 9px 10px;
}

body.ui-theme-nt .utility-block,
body.ui-theme-nt .utility-details,
body.ui-theme-nt .utility-callout,
body.ui-theme-nt .appinfo-card {
  border-color: #c6d6ee;
  background: #f5f9ff;
}

body.ui-theme-nt .utility-primary-btn {
  min-height: 30px;
  font-size: 10px;
  padding: 4px 10px;
}

body.ui-theme-nt .mtc th,
body.ui-theme-nt .mtc td {
  padding: 2px 4px;
}

body.ui-theme-nt .compare-grid {
  gap: 10px;
}

body.ui-theme-nt .compare-workspace {
  margin-bottom: 7px;
  padding: 6px 8px;
}

body.ui-theme-nt .compare-workspace-slot-row,
body.ui-theme-nt .compare-workspace-controls {
  margin-top: 5px;
}

body.ui-theme-nt .compare-workspace-slot {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 9px;
}

body.ui-theme-nt .compare-ui-toggle,
body.ui-theme-nt .compare-workspace-jump,
body.ui-theme-nt .compare-insight-chip,
body.ui-theme-nt .chart-mode-btn,
body.ui-theme-nt .spots-coach-action,
body.ui-theme-nt .coach-choice-btn {
  min-height: 30px;
  font-size: 10px;
  padding: 4px 8px;
}

body.ui-theme-nt .compare-insight-chip {
  flex-basis: 220px;
}

body.ui-theme-nt .compare-panel .compare-head {
  padding: 6px 8px 5px;
  gap: 2px;
}

body.ui-theme-nt .compare-head-main {
  gap: 5px;
}

body.ui-theme-nt .compare-head-call {
  font-size: 12px;
}

body.ui-theme-nt .compare-head-meta {
  font-size: 10px;
}

body.ui-theme-nt .compare-slot-badge {
  min-width: 44px;
  padding: 2px 7px;
}

body.ui-theme-nt .compare-scroll {
  padding: 6px 8px 8px;
}

body.ui-theme-nt .coach-controls {
  gap: 6px 8px;
  margin: 4px 0 6px;
}

body.ui-theme-nt .coach-control-group {
  min-width: 200px;
}

body.ui-theme-nt .coach-priority-grid {
  margin: 6px 0 8px;
  gap: 6px;
}

body.ui-theme-nt .coach-priority-card,
body.ui-theme-nt .coach-rivals-card,
body.ui-theme-nt .coach-driver-card,
body.ui-theme-nt .coach-brief-card,
body.ui-theme-nt .spots-coach-card {
  padding: 6px 8px;
}

body.ui-theme-nt .coach-brief-grid {
  gap: 6px;
  margin: 0 0 8px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body.ui-theme-nt .coach-brief-btn {
  min-height: 30px;
  font-size: 10px;
  padding: 4px 8px;
}

body.ui-theme-nt .coach-brief-note {
  font-size: 10px;
}

body.ui-theme-nt .coach-quick-actions {
  margin: 6px 0 8px;
  padding: 6px 8px;
  gap: 6px 8px;
}

body.ui-theme-nt .spots-coach-grid {
  margin: 6px;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body.ui-theme-nt .spots-coach-note {
  margin-bottom: 4px;
  font-size: 10px;
}

body.ui-theme-nt .chart-mode-controls {
  margin: 1px 0 7px;
  gap: 5px;
}

body.ui-theme-nt .bar-row {
  margin: 3px 0;
  gap: 6px;
}

body.ui-theme-nt .bar-track {
  height: 14px;
}

body.ui-theme-nt .bar-value {
  min-width: 78px;
  font-size: 11px;
}

@media (min-width: 1440px) {
  body.ui-theme-nt .content {
    padding: 17px 19px;
  }

  body.ui-theme-nt .view-container {
    padding: 13px 14px;
  }
}
