/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg:           #07080f;
  --bg-card:      #0c1221;
  --bg-card-h:    #101929;
  --bg-card-sel:  #0d1b35;
  --border:       #1a2a45;
  --border-h:     #2a4570;
  --border-acc:   #1a5090;

  --text:         #dde8f8;
  --text-dim:     #6a8abf;
  --text-dimmer:  #3a5580;

  --accent:       #00a8ff;
  --accent-glow:  rgba(0, 168, 255, 0.15);

  --green:        #3dd68c;
  --green-bg:     rgba(61, 214, 140, 0.1);
  --amber:        #ffb74d;
  --amber-bg:     rgba(255, 183, 77, 0.1);
  --red:          #ff5252;
  --red-bg:       rgba(255, 82, 82, 0.08);
  --gray:         #546e8a;
  --gray-bg:      rgba(84, 110, 138, 0.12);

  /* manufacturer accent colours */
  --rsi:          #4fc3f7;
  --anvil:        #ff9800;
  --aegis:        #ef5350;
  --drake:        #66bb6a;
  --misc:         #ba68c8;
  --origin:       #ffd54f;
  --crusader:     #26c6da;
  --banu:         #ff7043;
  --gatac:        #90a4ae;
  --esperia:      #a1887f;
  --mirai:        #f06292;
  --greycat:      #bcaaa4;
  --tumbril:      #8d6e63;
  --argo:         #607d8b;
  --co:           #ffa726;
  --xian:         #ce93d8;
  --kruger:       #9c7cd8;
  --greys:        #8a8a8a;

  --font-body:    'Exo 2', system-ui, sans-serif;
  --font-mono:    'Share Tech Mono', 'Courier New', monospace;

  --radius:       6px;
  --radius-lg:    10px;
  --transition:   0.15s ease;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--accent));
}

.brand-title {
  font-size: 0;
  white-space: nowrap;
}

/* ─── Pixel title ────────────────────────────────────────────────────────── */
.px-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  user-select: none;
}
.px-row {
  display: flex;
  gap: 4px;
}
.px-char {
  display: flex;
  gap: 1px;
}
.px-cell {
  width: 3px;
  height: 3px;
  background: transparent;
}
.px-cell.on {
  background: var(--accent);
  box-shadow: 0 0 3px var(--accent);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dimmer);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 5px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

/* ─── Early access pill ──────────────────────────────────────────────────── */
.early-access-pill {
  display: inline-block;
  margin-left: 6px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(0, 168, 255, 0.35);
  background: rgba(0, 168, 255, 0.08);
  border-radius: 20px;
  padding: 1px 5px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ─── Contribute button ──────────────────────────────────────────────────── */
.contribute-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 183, 77, 0.3);
  background: rgba(255, 183, 77, 0.06);
  color: var(--amber);
  font-size: 13px;
  font-family: var(--font-body);
  flex-shrink: 0;
  transition: all var(--transition);
  cursor: pointer;
}
.contribute-btn:hover {
  border-color: rgba(255, 183, 77, 0.6);
  background: rgba(255, 183, 77, 0.12);
}

/* ─── Community modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  padding: 36px 36px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--text-dimmer);
  font-size: 15px;
  padding: 4px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(0,168,255,0.45));
  margin-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.modal-body {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 12px;
}
.modal-body strong { color: var(--text); }
.modal-body:last-of-type { margin-bottom: 24px; }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-btn-primary {
  display: block;
  text-align: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition);
}
.modal-btn-primary:hover { opacity: 0.88; text-decoration: none; color: #fff; }

.modal-btn-secondary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 9px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dimmer);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}
.modal-btn-secondary:hover { border-color: var(--border-h); color: var(--text); }

/* ─── Timeline link button (on main page) ────────────────────────────────── */
.timeline-link-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--font-body);
  text-decoration: none;
  flex-shrink: 0;
  transition: all var(--transition);
}
.timeline-link-btn:hover {
  border-color: var(--border-h);
  color: var(--text);
  text-decoration: none;
}

/* ─── Search ─────────────────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dimmer);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 30px 7px 32px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-dimmer); }
.search-input:focus {
  border-color: var(--border-acc);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input::-webkit-search-cancel-button { display: none; }

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dimmer);
  font-size: 12px;
  padding: 2px 4px;
  display: none;
  line-height: 1;
}
.search-clear:hover { color: var(--text); }
.search-wrap.has-value .search-clear { display: block; }

/* ─── Patch dropdown ─────────────────────────────────────────────────────── */
.patch-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.patch-icon {
  position: absolute;
  left: 9px;
  width: 13px;
  height: 13px;
  color: var(--text-dimmer);
  pointer-events: none;
  z-index: 1;
}

.patch-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 5px 26px 5px 28px;
  outline: none;
  cursor: pointer;
  min-width: 140px;
  transition: all var(--transition);
}
.patch-select:hover { border-color: var(--border-h); color: var(--text); }
.patch-select:focus { border-color: var(--border-acc); box-shadow: 0 0 0 3px var(--accent-glow); }
.patch-select.active {
  background: var(--accent-glow);
  border-color: var(--border-acc);
  color: var(--accent);
}
.patch-select option { background: #0c1221; color: var(--text); }

.patch-chevron {
  position: absolute;
  right: 8px;
  width: 12px;
  height: 12px;
  color: var(--text-dimmer);
  pointer-events: none;
}
.patch-select.active ~ .patch-chevron { color: var(--accent); }

/* ─── Role dropdown ──────────────────────────────────────────────────────── */
.role-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.role-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 5px 26px 5px 10px;
  outline: none;
  cursor: pointer;
  min-width: 110px;
  transition: all var(--transition);
}
.role-select:hover { border-color: var(--border-h); color: var(--text); }
.role-select:focus { border-color: var(--border-acc); box-shadow: 0 0 0 3px var(--accent-glow); }
.role-select.active {
  background: var(--accent-glow);
  border-color: var(--border-acc);
  color: var(--accent);
}
.role-select option { background: #0c1221; color: var(--text); }
.role-chevron {
  position: absolute;
  right: 8px;
  width: 12px;
  height: 12px;
  color: var(--text-dimmer);
  pointer-events: none;
}
.role-select.active ~ .role-chevron { color: var(--accent); }

/* ─── Sort ───────────────────────────────────────────────────────────────── */
.sort-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sort-label {
  font-size: 11px;
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.sort-btn {
  font-size: 12px;
  font-family: var(--font-body);
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: all var(--transition);
  white-space: nowrap;
}
.sort-btn:hover {
  border-color: var(--border-h);
  color: var(--text);
}
.sort-btn.active {
  background: var(--accent-glow);
  border-color: var(--border-acc);
  color: var(--accent);
}

/* ─── Status filter buttons ──────────────────────────────────────────────── */
.status-filter-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.status-btn {
  font-size: 12px;
  font-family: var(--font-body);
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.status-btn:hover { border-color: var(--border-h); color: var(--text); }
.status-btn.active[data-status=""] {
  background: var(--accent-glow);
  border-color: var(--border-acc);
  color: var(--accent);
}
.status-btn.active[data-status="flyable"] {
  background: var(--green-bg);
  border-color: rgba(61, 214, 140, 0.35);
  color: var(--green);
}
.status-btn.active[data-status="unreleased"] {
  background: var(--amber-bg);
  border-color: rgba(255, 183, 77, 0.35);
  color: var(--amber);
}

/* ─── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar {
  padding: 5px 20px;
  background: rgba(12, 18, 33, 0.6);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dimmer);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-open-btn {
  font-size: 11px;
  font-family: var(--font-body);
  padding: 3px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dimmer);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.stats-open-btn:hover { border-color: var(--border-h); color: var(--text); }

/* ─── Stats modal ────────────────────────────────────────────────────────── */
.stats-overlay .modal-card { max-width: 780px; padding-bottom: 20px; }
.stats-modal-card { max-height: 85vh; display: flex; flex-direction: column; }
.stats-modal-card .modal-title { flex-shrink: 0; margin-bottom: 20px; }
#stats-modal-content { overflow-y: auto; flex: 1; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
#stats-modal-content::-webkit-scrollbar { width: 4px; }
#stats-modal-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* summary cards */
.sc-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.sc-stat-big {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px 10px;
  text-align: center;
}
.sc-stat-num {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1;
  margin-bottom: 5px;
}
.sc-stat-num.green  { color: var(--green); }
.sc-stat-num.amber  { color: var(--amber); }
.sc-stat-num.accent { color: var(--accent); }
.sc-stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dimmer);
}

/* section title + legend */
.sc-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dimmer);
  border-bottom: 1px solid var(--border);
  padding-bottom: 7px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sc-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dimmer);
  font-weight: 400;
  margin-left: auto;
}
.sc-leg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}
.sc-leg-dot.accent { background: var(--accent); }
.sc-leg-dot.green  { background: var(--green); }

/* year chart */
.sc-year-chart { margin-bottom: 28px; display: flex; flex-direction: column; gap: 5px; }

.sc-yr-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
}
.sc-yr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dimmer);
  text-align: right;
  flex-shrink: 0;
}
.sc-yr-bars { display: flex; flex-direction: column; gap: 2px; }

/* manufacturer chart */
.sc-mfr-chart { display: flex; flex-direction: column; gap: 5px; }

.sc-mfr-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 10px;
}
.sc-mfr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dimmer);
  text-align: right;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* shared bar styles */
.sc-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sc-bar-wrap-mfr { min-height: 14px; }
.sc-bar {
  height: 8px;
  border-radius: 4px;
  min-width: 3px;
  flex-shrink: 0;
  transition: width 0.4s ease;
}
.sc-bar-ann { background: var(--accent); opacity: 0.75; }
.sc-bar-fly { background: var(--green); opacity: 0.8; }
.sc-bar-mfr { background: var(--accent); opacity: 0.5; height: 10px; border-radius: 3px; }
.sc-bar-val {
  font-size: 11px;
  color: var(--text-dimmer);
  flex-shrink: 0;
  font-family: var(--font-mono);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── Column header ──────────────────────────────────────────────────────── */
.list-col-header {
  display: grid;
  grid-template-columns: 36px 1fr 160px 140px 84px 36px;
  align-items: center;
  padding: 0 20px;
  height: 32px;
  background: rgba(12, 18, 33, 0.8);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.list-col-header span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dimmer);
}

/* ─── Ship list ──────────────────────────────────────────────────────────── */
.ship-list {
  flex: 1;
}

/* ─── Ship row wrap ──────────────────────────────────────────────────────── */
.ship-row-wrap {
  border-bottom: 1px solid var(--border);
}

/* ─── Ship list item ─────────────────────────────────────────────────────── */
.ship-item {
  display: grid;
  grid-template-columns: 36px 1fr 160px 140px 84px 36px;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.ship-item:hover { background: var(--bg-card-h); }
.ship-item.selected {
  background: var(--bg-card-sel);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ship-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-flyable    { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-unreleased { background: var(--gray); }

.ship-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}
.ship-item.selected .ship-item-name { color: #fff; }

.ship-item-mfr {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.ship-item-patch {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.ship-item-status { display: flex; }

.ship-item-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dimmer);
  transition: transform 0.25s ease;
}
.ship-item.selected .ship-item-chevron { transform: rotate(180deg); color: var(--accent); }

/* ─── Inline expansion ───────────────────────────────────────────────────── */
.ship-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-card);
}
.ship-expand.open { grid-template-rows: 1fr; }

.ship-expand-inner { overflow: hidden; }

.ship-expand-content {
  padding: 28px 40px 32px;
  border-top: 1px solid var(--border-acc);
}

/* ─── Group header ───────────────────────────────────────────────────────── */
.group-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dimmer);
  padding: 14px 20px 6px;
  background: rgba(7, 8, 15, 0.6);
  border-bottom: 1px solid var(--border);
}

/* ─── Empty / loading ────────────────────────────────────────────────────── */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--text-dimmer);
  text-align: center;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Ship detail card ───────────────────────────────────────────────────── */
.detail-card {
  max-width: 640px;
}

.detail-header {
  margin-bottom: 28px;
}

.detail-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}
.badge-flyable   { background: var(--green-bg);  color: var(--green); border: 1px solid rgba(61,214,140,0.3); }
.badge-unreleased { background: var(--gray-bg);   color: var(--gray);  border: 1px solid rgba(84,110,138,0.3); }

.mfr-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid;
}

.detail-name {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.detail-mfr-full {
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Timeline table ─────────────────────────────────────────────────────── */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.timeline-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dimmer);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.timeline-row {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.timeline-row:last-child { border-bottom: none; }

.timeline-row-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
  width: 80px;
  flex-shrink: 0;
  padding-top: 1px;
}

.timeline-row-value {
  flex: 1;
}

.timeline-date {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.uncertain-mark {
  font-size: 12px;
  color: var(--amber);
  font-weight: 700;
  cursor: help;
  font-style: normal;
}

.timeline-patch {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(0, 168, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 168, 255, 0.2);
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 5px;
}

.timeline-unreleased {
  font-size: 14px;
  color: var(--gray);
  font-style: italic;
}

/* ─── Duration row ───────────────────────────────────────────────────────── */
.timeline-row-delta {
  background: rgba(0, 168, 255, 0.04);
}

.timeline-delta {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}
.timeline-delta.waiting { color: var(--amber); }
.timeline-row-waiting { background: rgba(255, 183, 77, 0.04); }

.timeline-delta-sub {
  font-size: 11px;
  color: var(--text-dimmer);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ─── Notes ──────────────────────────────────────────────────────────────── */
.detail-note {
  font-size: 12px;
  color: var(--text-dimmer);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 4px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.detail-note-icon { font-size: 13px; flex-shrink: 0; }

/* ─── Manufacturer colour helpers ────────────────────────────────────────── */
.mfr-RSI      { color: var(--rsi);      border-color: rgba(79, 195, 247, 0.3);  background: rgba(79, 195, 247, 0.08); }
.mfr-Anvil    { color: var(--anvil);    border-color: rgba(255, 152, 0, 0.3);   background: rgba(255, 152, 0, 0.08); }
.mfr-Aegis    { color: var(--aegis);    border-color: rgba(239, 83, 80, 0.3);   background: rgba(239, 83, 80, 0.08); }
.mfr-Drake    { color: var(--drake);    border-color: rgba(102, 187, 106, 0.3); background: rgba(102, 187, 106, 0.08); }
.mfr-MISC     { color: var(--misc);     border-color: rgba(186, 104, 200, 0.3); background: rgba(186, 104, 200, 0.08); }
.mfr-Origin   { color: var(--origin);   border-color: rgba(255, 213, 79, 0.3);  background: rgba(255, 213, 79, 0.08); }
.mfr-Crusader { color: var(--crusader); border-color: rgba(38, 198, 218, 0.3);  background: rgba(38, 198, 218, 0.08); }
.mfr-Banu     { color: var(--banu);     border-color: rgba(255, 112, 67, 0.3);  background: rgba(255, 112, 67, 0.08); }
.mfr-Gatac    { color: var(--gatac);    border-color: rgba(144, 164, 174, 0.3); background: rgba(144, 164, 174, 0.08); }
.mfr-Esperia  { color: var(--esperia);  border-color: rgba(161, 136, 127, 0.3); background: rgba(161, 136, 127, 0.08); }
.mfr-Mirai    { color: var(--mirai);    border-color: rgba(240, 98, 146, 0.3);  background: rgba(240, 98, 146, 0.08); }
.mfr-Greycat  { color: var(--greycat);  border-color: rgba(188, 170, 164, 0.3); background: rgba(188, 170, 164, 0.08); }
.mfr-Tumbril  { color: var(--tumbril);  border-color: rgba(141, 110, 99, 0.3);  background: rgba(141, 110, 99, 0.08); }
.mfr-Argo     { color: var(--argo);     border-color: rgba(96, 125, 139, 0.3);  background: rgba(96, 125, 139, 0.08); }
.mfr-CO       { color: var(--co);       border-color: rgba(255, 167, 38, 0.3);  background: rgba(255, 167, 38, 0.08); }
.mfr-XiAn    { color: var(--xian);     border-color: rgba(206, 147, 216, 0.3); background: rgba(206, 147, 216, 0.08); }
.mfr-Kruger  { color: var(--kruger);   border-color: rgba(156, 124, 216, 0.3); background: rgba(156, 124, 216, 0.08); }
.mfr-Greys   { color: var(--greys);    border-color: rgba(138, 138, 138, 0.3); background: rgba(138, 138, 138, 0.08); }

/* ─── Legend ─────────────────────────────────────────────────────────────── */
.legend-uncertain {
  color: var(--amber);
  font-weight: 700;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 11px;
  color: var(--text-dimmer);
  text-align: center;
}
.footer-meta {
  margin-top: 3px;
  opacity: 0.6;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .list-col-header { display: none; }

  .ship-item {
    grid-template-columns: 28px 1fr auto 28px;
    height: 56px;
    padding: 0 14px;
  }
  .ship-item-mfr  { display: none; }
  .col-mfr        { display: none; }

  .ship-expand-content { padding: 20px 16px 24px; }
  .detail-name { font-size: 22px; }

  .site-header { gap: 10px; padding: 10px 14px; }
  .header-controls { width: 100%; gap: 8px; }
  .search-wrap { flex: 1; min-width: 0; }

  /* scale pixel title so it fits without wrapping */
  .px-text { transform: scale(0.78); transform-origin: left center; }
  .brand-sub { font-size: 10px; }

  /* allow filter rows to wrap */
  .status-filter-wrap,
  .sort-wrap { flex-wrap: wrap; }

  .role-select { min-width: 90px; }
  .patch-select { min-width: 110px; }
}

@media (max-width: 540px) {
  .ship-item {
    grid-template-columns: 28px 1fr 28px;
  }
  .ship-item-patch  { display: none; }
  .ship-item-status { display: none; }

  /* hide role + patch dropdowns on very small screens; search + status stay */
  .role-wrap  { display: none; }
  .patch-wrap { display: none; }
}
