/* F1 Apex Optimizer — graphite paddock aesthetic */
:root {
  --bg: #0a0c10;
  --bg-2: #11141a;
  --panel: #161a22;
  --panel-2: #1c212c;
  --line: #232936;
  --line-2: #2e3548;
  --text: #eef1f7;
  --muted: #6f7892;
  --muted-2: #98a0b6;
  --accent: #e10600;            /* racing red */
  --accent-2: #ff3a2e;
  --lime: #d6ff3a;              /* primary CTA accent */
  --lime-2: #bfe320;
  --warn: #ffb020;
  --good: #2ee07a;
  --bad: #ff4757;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 13px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* faint diagonal track lines */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 40px),
    radial-gradient(ellipse at top, rgba(225,6,0,0.06), transparent 60%);
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
.app { position: relative; z-index: 1; }

/* ========== HEADER ========== */
.hdr {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,12,16,0.95), rgba(10,12,16,0.85));
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.logo-block { display: flex; align-items: center; gap: 14px; }
.logo-mark { display: flex; gap: 3px; align-items: center; }
.logo-mark span { width: 4px; height: 22px; background: var(--lime); display: block; }
.logo-mark span:nth-child(2) { height: 16px; background: var(--accent); }
.logo-mark span:nth-child(3) { height: 10px; background: var(--text); }
.logo-title { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: 2px; }
.logo-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1.5px; margin-top: 2px; }
.hdr-tabs { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
.hdr-tabs button {
  background: transparent; border: 0; color: var(--muted);
  padding: 10px 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; font-weight: 600;
  border-right: 1px solid var(--line); transition: 0.15s;
}
.hdr-tabs button:last-child { border-right: 0; }
.hdr-tabs button.on { background: var(--lime); color: #000; }
.hdr-tabs button:disabled { opacity: 0.35; cursor: not-allowed; }
.hdr-tabs button:hover:not(.on):not(:disabled) { color: var(--text); background: var(--panel); }
.hdr-right { display: flex; justify-content: flex-end; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
}
.status-pill .dot { width: 7px; height: 7px; background: var(--good); border-radius: 50%; box-shadow: 0 0 8px var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ========== GRID VIEW ========== */
.grid-wrap { padding: 22px 24px 120px; max-width: 1500px; margin: 0 auto; position: relative; }

.lines-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.grid-cols {
  display: grid; grid-template-columns: 1fr 80px 1fr; gap: 0;
  position: relative;
}
.col { position: relative; }
.col-head { padding: 0 8px 12px; }
.col-title { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; font-weight: 700; color: var(--text); }
.col-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--muted); margin-top: 3px; }
.col-sub .link { background: none; border: 0; color: var(--lime); font-family: var(--mono); font-size: 10px; letter-spacing: 1px; cursor: pointer; text-decoration: underline; padding: 0; }

.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 8px; min-height: 56px; position: relative; }
.col-finish .row { flex-direction: row-reverse; }

/* Position number */
.pos-cell {
  flex: 0 0 38px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; position: relative;
}
.pos-num { font-size: 20px; color: var(--muted-2); letter-spacing: -1px; }
.col-finish .pos-num { color: var(--text); }
.pos-medal { width: 18px; height: 3px; margin-top: 2px; border-radius: 2px; }
.pos-medal.m1 { background: #ffd24a; box-shadow: 0 0 8px rgba(255,210,74,0.6); }
.pos-medal.m2 { background: #cdd5e0; }
.pos-medal.m3 { background: #d68b54; }

/* Driver chip */
.chip {
  flex: 1; display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 6px 10px 6px 8px;
  background: linear-gradient(90deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: 4px; min-height: 50px; user-select: none; cursor: grab;
  transition: 0.12s ease;
  position: relative;
}
.chip:hover { border-color: var(--line-2); transform: translateY(-1px); }
.chip:active { cursor: grabbing; }
.chip-drag { opacity: 0.35; }
.chip-exc { opacity: 0.35; filter: grayscale(0.7); }
.chip-lock::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: var(--lime);
}
.chip-photo {
  width: 44px; height: 44px; border-radius: 4px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.chip-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; pointer-events: none; }
.chip-body { min-width: 0; overflow: hidden; }
.chip-row1 { display: flex; align-items: baseline; gap: 6px; }
.chip-num { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.chip-name { font-weight: 600; font-size: 14px; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-row2 { display: flex; align-items: baseline; gap: 8px; margin-top: 1px; }
.chip-team { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.chip-sal { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.chip-meta { text-align: right; padding-right: 4px; }
.chip-pts { font-family: var(--mono); font-size: 16px; font-weight: 700; line-height: 1; color: var(--text); }
.chip-pts.warm { color: var(--warn); }
.chip-pts.hot { color: var(--lime); text-shadow: 0 0 12px rgba(214,255,58,0.45); }
.chip-pts-lbl { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; color: var(--muted); margin-top: 2px; }
.chip-gear {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  width: 26px; height: 26px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  transition: 0.15s;
}
.chip-gear:hover, .chip-gear.on { color: var(--lime); border-color: var(--lime); }

/* Empty finish slot */
.empty-slot {
  flex: 1; min-height: 50px; border: 1px dashed var(--line-2); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--muted);
}
.finish-row.hover .empty-slot,
.finish-row.hover .chip { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 0 24px rgba(214,255,58,0.25); background: linear-gradient(90deg, rgba(214,255,58,0.06), var(--panel-2)); }

/* Middle column delta pills */
.col-mid { padding-top: 30px; }
.mid-track { display: flex; flex-direction: column; gap: 6px; }
.mid-row { height: 56px; display: flex; align-items: center; justify-content: center; position: relative; }
.delta-pill {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line);
}
.delta-pill.pos { color: var(--good); border-color: rgba(46,224,122,0.4); }
.delta-pill.neg { color: var(--bad); border-color: rgba(255,71,87,0.4); }

/* Lever panel popover */
.panel-mount { position: absolute; right: 100%; top: 50%; transform: translateY(-50%); margin-right: 8px; z-index: 20; }
.col-finish .panel-mount { right: auto; left: 100%; margin-right: 0; margin-left: 8px; }
.lever-panel {
  width: 260px; background: var(--bg-2); border: 1px solid var(--line-2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55); border-radius: 6px; padding: 10px;
}
.lever-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.lever-title { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; color: var(--muted); }
.x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--text); }
.lever-grid { display: flex; flex-direction: column; gap: 6px; }
.lever-num { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 4px 6px; background: var(--panel); border-radius: 4px; font-size: 12px; }
.lever-num input { width: 60px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 4px 6px; text-align: right; font-family: var(--mono); }
.lever-tog { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: var(--panel); border-radius: 4px; font-size: 12px; cursor: pointer; }
.lever-tog input { accent-color: var(--lime); }

.lever-breakdown {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px;
}
.lbd-title {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted);
  margin-bottom: 4px;
}
.lbd-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; color: var(--muted-2);
}
.lbd-row .v { color: var(--text); font-variant-numeric: tabular-nums; }
.lbd-row .v.pos { color: var(--good); }
.lbd-row .v.neg { color: var(--bad); }
.lbd-row.total {
  margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line);
}
.lbd-row.total span { color: var(--lime); font-weight: 700; font-size: 13px; }
.lbd-row.fppr { font-size: 10px; opacity: 0.65; }

/* ========== STEP NAV BAR (sticky scrollspy) ========== */
.step-nav-bar {
  position: sticky; top: 67px; z-index: 40;
  display: flex; gap: 6px;
  background: linear-gradient(180deg, rgba(10,12,16,0.94), rgba(10,12,16,0.84));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
  margin: 0 -24px 18px;
  align-items: center;
}
.snb-label-prefix {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700;
  margin-right: 4px;
}
.snb-item {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line);
  padding: 7px 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; font-weight: 700;
  color: var(--muted);
  border-radius: 0;
  transition: 0.15s;
  white-space: nowrap;
}
.snb-item:hover { color: var(--text); border-color: var(--line-2); }
.snb-item.active {
  color: #000; background: var(--lime); border-color: var(--lime);
  box-shadow: 0 0 16px rgba(214,255,58,0.25);
}
.snb-item.done:not(.active) { color: var(--good); border-color: rgba(46, 224, 122, 0.35); }
.snb-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  font-weight: 800; font-size: 12px;
  color: inherit;
}
.snb-divider {
  flex: 0 0 auto; width: 16px; height: 1px;
  background: var(--line);
}

/* ========== LOCKED STARTING GRID COLUMN ========== */
.col-start .col-head { display: flex; flex-direction: column; gap: 4px; }
.col-start .col-title-row { display: flex; align-items: center; gap: 6px; }
.lock-icon {
  width: 11px; height: 11px;
  color: var(--warn); opacity: 0.95; flex-shrink: 0;
}
.lock-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 176, 32, 0.35);
  background: rgba(255, 176, 32, 0.08);
  color: var(--warn);
  border-radius: 2px;
  width: max-content;
}
.col-start .pos-cell { position: relative; }
.col-start .pos-cell::before {
  content: ""; position: absolute;
  left: -3px; top: 12px; bottom: 12px; width: 2px;
  background: linear-gradient(180deg, transparent, rgba(255,176,32,0.4), transparent);
  border-radius: 1px;
}
.col-start .chip { opacity: 0.92; cursor: grab; }
.col-start .chip-photo img { filter: saturate(0.88); }

/* ========== DELTA-TINTED CHIPS (finish column) ========== */
/* Inline style sets borderLeftColor to team color so we use box-shadow + a
   subtle background tint instead. */
.col-finish .chip.chip-up {
  box-shadow: 0 0 0 1px rgba(46,224,122,0.3), -1px 0 12px -2px rgba(46,224,122,0.35);
  background: linear-gradient(90deg, rgba(46,224,122,0.05), var(--panel) 30%, var(--panel-2));
}
.col-finish .chip.chip-up-strong {
  box-shadow: 0 0 0 1px rgba(46,224,122,0.6), -2px 0 22px -2px rgba(46,224,122,0.55);
  background: linear-gradient(90deg, rgba(46,224,122,0.12), var(--panel) 40%, var(--panel-2));
}
.col-finish .chip.chip-down {
  box-shadow: 0 0 0 1px rgba(255,71,87,0.3), -1px 0 12px -2px rgba(255,71,87,0.35);
  background: linear-gradient(90deg, rgba(255,71,87,0.05), var(--panel) 30%, var(--panel-2));
}
.col-finish .chip.chip-down-strong {
  box-shadow: 0 0 0 1px rgba(255,71,87,0.55), -2px 0 22px -2px rgba(255,71,87,0.5);
  background: linear-gradient(90deg, rgba(255,71,87,0.12), var(--panel) 40%, var(--panel-2));
}

/* ========== DNF / FL CHIP OVERLAYS ========== */
.chip-fl-badge {
  position: absolute; top: 3px; left: 38px;
  min-width: 18px; height: 14px; padding: 0 4px;
  background: var(--lime); color: #000;
  font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px;
  font-family: var(--mono);
  z-index: 2;
  box-shadow: 0 0 0 2px var(--panel);
}
.chip.chip-dnf .chip-photo img { filter: grayscale(0.85) brightness(0.5); }
.chip.chip-dnf .chip-name,
.chip.chip-dnf .chip-num,
.chip.chip-dnf .chip-pts { text-decoration: line-through; opacity: 0.5; }
.chip-dnf-stamp {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--mono); font-size: 14px; font-weight: 800; letter-spacing: 2px;
  color: var(--bad);
  background: rgba(20, 20, 36, 0.85);
  padding: 1px 6px;
  border: 2px solid var(--bad);
  border-radius: 3px;
  pointer-events: none;
  z-index: 3;
}

/* ========== CONSTRUCTOR CARD DRIVER LIST ========== */
.con-drivers {
  display: flex; flex-direction: column; gap: 3px;
  margin: 0 0 8px;
  padding: 6px 8px;
  background: var(--bg-2);
  border-radius: 3px;
  border: 1px solid var(--line);
}
.con-drv {
  display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px;
  align-items: center;
  font-size: 11px;
}
.con-drv-photo {
  width: 22px; height: 22px;
  background: var(--panel-2);
  border-radius: 2px;
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.con-drv-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.con-drv-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.con-drv-pos {
  font-family: var(--mono); font-weight: 700; font-size: 10px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
  padding: 2px 5px; border-radius: 2px;
}
.con-drv-pos.podium { color: var(--lime); border-color: var(--lime); }
.con-drv-pos.top10  { color: var(--good); border-color: rgba(46,224,122,0.4); }
.con-drv-status {
  font-family: var(--mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.8px;
}
.con-drv-status.dnf { color: var(--bad); font-weight: 700; }

/* ========== LAPS LED PROGRESS BAR ========== */
.ri-laps-progress {
  display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 200px;
}
.ri-laps-bar {
  flex: 1; min-width: 100px;
  height: 6px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
  position: relative;
}
.ri-laps-fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--good), var(--lime));
  transition: width 0.18s;
}
.ri-laps-fill.under { background: linear-gradient(90deg, var(--warn), #ffd56a); }
.ri-laps-fill.over  { background: linear-gradient(90deg, var(--bad), #ff8a92); }
.ri-laps-target {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--muted);
  white-space: nowrap;
}

/* ========== DROP INSERTION INDICATOR (drag) ========== */
.row.drop-above::before, .row.drop-below::after {
  content: ""; position: absolute;
  left: 46px; right: 0;
  height: 2px;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(214,255,58,0.6);
  z-index: 5;
  border-radius: 1px;
}
.row.drop-above::before { top: -4px; }
.row.drop-below::after { bottom: -4px; }

/* ========== ERROR + RETRY ========== */
.sa-retry {
  background: var(--bad); color: #fff; border: 0;
  padding: 5px 12px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  border-radius: 2px; margin-left: 10px;
}
.sa-retry:hover { background: #ff6b78; }

/* ========== SESSION TIMESTAMP META ========== */
.sa-meta {
  font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.5px;
  padding: 0 8px 8px; display: flex; align-items: center; gap: 12px;
}
.sa-meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 6px var(--good);
  display: inline-block;
}
.sa-meta .dot.stale { background: var(--warn); box-shadow: 0 0 6px var(--warn); }

/* ========== SCORE GRADIENT IN ANALYSIS TABLE ========== */
.sa-table tbody tr td.r.hi { position: relative; }
.sa-table tbody tr:nth-child(1) td.r.hi { color: var(--lime); font-weight: 800; }
.sa-table tbody tr:nth-child(2) td.r.hi,
.sa-table tbody tr:nth-child(3) td.r.hi { color: rgb(189, 226, 67); font-weight: 700; }
.sa-table tbody tr:nth-child(n+4):nth-child(-n+8) td.r.hi { color: var(--good); }
.sa-table tbody tr:nth-child(n+9):nth-child(-n+15) td.r.hi { color: var(--text); font-weight: 600; }
.sa-table tbody tr:nth-child(n+16) td.r.hi { color: var(--muted); }

/* ========== SESSION ANALYSIS (STEP 0) ========== */
.session-analysis {
  margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.sa-head { align-items: center; }
.sa-head-actions { margin-left: auto; display: flex; gap: 8px; }
.sa-error {
  font-family: var(--mono); font-size: 11px; color: var(--bad);
  padding: 8px 10px; border: 1px solid rgba(255,71,87,0.3); border-radius: 4px;
  background: rgba(255,71,87,0.05); margin: 8px 8px 12px;
}
.sa-templates {
  display: flex; align-items: center; gap: 14px;
  padding: 0 8px 8px; flex-wrap: wrap;
}
.sa-templates-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700;
}
.sa-template-pills {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.sa-pill {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted-2);
  padding: 6px 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; font-weight: 700;
  border-radius: 0; transition: 0.12s;
}
.sa-pill:hover:not(.on) { color: var(--text); border-color: var(--line-2); }
.sa-pill.on { background: var(--lime); color: #000; border-color: var(--lime); }
.sa-method-desc {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2); line-height: 1.5;
  padding: 0 8px 12px; max-width: 1100px;
}
.sa-method-locked {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--lime);
  border-radius: 4px; padding: 10px 14px;
}
.saml-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--lime);
  background: rgba(214,255,58,0.1); padding: 4px 8px; border-radius: 2px; font-weight: 700;
  white-space: nowrap;
}
.saml-text { font-family: var(--mono); font-size: 11px; color: var(--muted-2); line-height: 1.4; }
.saml-text strong { color: var(--text); font-weight: 700; }

.sa-controls {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 0 8px 12px;
}
.sa-weights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sa-weight {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 4px;
}
.saw-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--text); display: flex; justify-content: space-between; align-items: baseline;
}
.saw-sub {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.8px; color: var(--muted); font-weight: 500;
}
.sa-weight input[type="range"] { accent-color: var(--lime); width: 100%; }
.saw-val {
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--lime); text-align: right;
}
.sa-import {
  background: var(--lime); color: #000; border: 0;
  padding: 12px 22px; font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 1.5px;
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--lime), 4px 4px 0 0 var(--accent);
  transition: 0.12s; white-space: nowrap;
}
.sa-import:hover { transform: translate(-1px, -1px); box-shadow: 0 0 0 1px var(--lime), 5px 5px 0 0 var(--accent); }
.sa-import:active { transform: translate(1px, 1px); box-shadow: 0 0 0 1px var(--lime), 3px 3px 0 0 var(--accent); }
.sa-table-wrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  margin: 0 8px;
}
.sa-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.sa-table thead th {
  text-align: left; padding: 8px 12px; background: var(--bg-2);
  font-size: 10px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.sa-table thead th.r { text-align: right; }
.sa-table tbody td { padding: 6px 12px; border-bottom: 1px solid var(--line); }
.sa-table tbody tr:hover { background: var(--panel-2); }
.sa-table tbody tr:nth-child(-n+3) { background: rgba(214,255,58,0.04); }
.sa-table tbody tr:nth-child(-n+3):hover { background: rgba(214,255,58,0.08); }
.sa-table .r-rank { color: var(--lime); font-weight: 800; font-size: 13px; width: 50px; }
.sa-table tbody tr:nth-child(n+4) .r-rank { color: var(--muted); }

/* ========== STEP MARKER ========== */
.step-marker {
  display: flex; align-items: baseline; gap: 12px;
  padding: 0 8px 14px;
}
.step-num {
  font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--lime);
  line-height: 1; letter-spacing: -1px;
}
.step-title {
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px; font-weight: 700; color: var(--text);
  text-transform: uppercase;
}
.step-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--muted);
}

/* ========== RACE INPUTS (STEP 2) ========== */
.race-inputs {
  margin-top: 32px; padding: 18px 0 0; border-top: 1px solid var(--line);
}
.ri-summary-bar {
  display: flex; gap: 24px; padding: 0 8px 12px;
}
.ri-stat { display: flex; flex-direction: column; }
.ri-stat-l { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); }
.ri-stat-v { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; }
.ri-autofill {
  margin-left: auto;
  background: transparent; color: var(--lime); border: 1px solid var(--lime);
  padding: 8px 16px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  border-radius: 0; transition: 0.12s; white-space: nowrap;
}
.ri-autofill:hover { background: var(--lime); color: #000; }
.ri-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px;
}
.ri-row {
  display: grid; grid-template-columns: 38px 1fr 64px 36px 44px;
  gap: 6px; align-items: center;
  padding: 6px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
}
.ri-row.ri-dnf-on { opacity: 0.5; background: var(--panel-2); }
.ri-pos { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.ri-name { font-weight: 600; font-size: 13px; letter-spacing: -0.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-row .ri-laps {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 3px;
  padding: 5px 6px; font-family: var(--mono); font-size: 11px; width: 100%; text-align: right;
}
.ri-row .ri-laps:focus { border-color: var(--lime); outline: none; }
.ri-fl, .ri-dnf {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 5px 0; font-family: var(--mono); font-size: 9px; letter-spacing: 1px; border-radius: 3px;
  font-weight: 700; transition: 0.12s;
}
.ri-fl:hover { color: var(--text); border-color: var(--line-2); }
.ri-fl.on { background: var(--lime); color: #000; border-color: var(--lime); }
.ri-dnf:hover { color: var(--text); border-color: var(--line-2); }
.ri-dnf.on { background: var(--bad); color: #fff; border-color: var(--bad); }

/* ========== CONSTRUCTORS STRIP ========== */
.con-strip { margin-top: 32px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.con-strip-head { padding: 0 8px 12px; }
.con-bonuses-readout { display: flex; gap: 4px; margin-bottom: 6px; }
.bonus-badge {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 5px 0; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; border-radius: 3px;
  text-align: center; opacity: 0.45;
}
.bonus-badge.on { background: var(--lime); color: #000; border-color: var(--lime); opacity: 1; }
.con-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.con-card {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--line-2);
  border-radius: 4px; padding: 10px;
}
.con-card.lock { box-shadow: inset 3px 0 0 var(--lime); }
.con-card.exc { opacity: 0.4; }
.con-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.con-logo { width: 36px; height: 36px; object-fit: contain; filter: brightness(1.4); }
.cn { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.cs { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.con-bonuses { display: flex; gap: 4px; margin-bottom: 6px; }
.tog {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  padding: 5px 0; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; border-radius: 3px;
  transition: 0.15s;
}
.tog.on { background: var(--lime); color: #000; border-color: var(--lime); }
.con-actions { display: flex; gap: 4px; }
.mini {
  flex: 1; background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 4px 0; font-family: var(--mono); font-size: 9px; letter-spacing: 1px; border-radius: 3px;
}
.mini.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ========== EXECUTE BAR ========== */
.exec-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 16px 24px; background: linear-gradient(0deg, var(--bg) 70%, transparent);
  border-top: 1px solid var(--line); z-index: 30;
}
.exec-stats { display: flex; gap: 28px; align-items: center; max-width: 1500px; margin: 0 auto; width: 100%; }
.es { display: flex; flex-direction: column; }
.es-l { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); }
.es-v { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--text); margin-top: 2px; }
.es-v input { background: transparent; border: 0; color: var(--text); font: inherit; width: 90px; padding: 0; }
.es-v input:focus { outline: 1px solid var(--lime); }
.es-v.num { color: var(--lime); }

.exec-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--lime); color: #000; border: 0;
  padding: 16px 36px; font-family: var(--mono); font-size: 14px; font-weight: 800; letter-spacing: 2px;
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--lime), 6px 6px 0 0 var(--accent);
  transition: 0.12s;
}
.exec-btn:hover { transform: translate(-2px, -2px); box-shadow: 0 0 0 1px var(--lime), 8px 8px 0 0 var(--accent); }
.exec-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 1px var(--lime), 2px 2px 0 0 var(--accent); }
.exec-arrow { font-size: 12px; }

/* ========== DRAG GHOST ========== */
.drag-ghost {
  position: fixed; pointer-events: none; z-index: 1000;
  transform: rotate(-1.5deg) scale(1.04);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.6));
}
.drag-ghost .chip { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime); }

/* ========== RESULTS VIEW ========== */
.results-wrap { padding: 22px 24px 60px; max-width: 1500px; margin: 0 auto; }
.results-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; border-radius: 0;
}
.ghost:hover { border-color: var(--lime); color: var(--lime); }
.results-stats { display: flex; gap: 24px; font-family: var(--mono); font-size: 12px; }
.results-stats .muted { color: var(--muted); font-size: 10px; letter-spacing: 1px; margin-right: 6px; }
.results-stats strong { color: var(--text); font-weight: 700; }

.lineups { display: flex; flex-direction: column; gap: 12px; }

.lu-card {
  display: grid; grid-template-columns: 70px 1fr 130px; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); padding: 14px 18px;
  border-radius: 4px; position: relative; overflow: hidden;
}
.lu-card.podium-1 { border-color: rgba(214,255,58,0.4); box-shadow: 0 0 30px rgba(214,255,58,0.08); }
.lu-card.podium-1::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--lime); }
.lu-card.podium-2::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #cdd5e0; }
.lu-card.podium-3::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #d68b54; }

.lu-rank { text-align: center; }
.rk-num { font-family: var(--mono); font-size: 36px; font-weight: 800; line-height: 1; color: var(--text); letter-spacing: -2px; }
.rk-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); margin-top: 4px; }
.lu-mid { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lu-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.lu-bar { position: relative; height: 22px; background: var(--bg); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.lu-bar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--good), var(--lime)); }
.lu-bar-label { position: relative; z-index: 1; padding: 0 8px; font-family: var(--mono); font-size: 11px; line-height: 22px; color: var(--text); mix-blend-mode: difference; }
.lu-bar-label .muted { color: var(--text); opacity: 0.7; }

.lu-pts { text-align: right; }
.pt-num { font-family: var(--mono); font-size: 32px; font-weight: 800; line-height: 1; color: var(--lime); letter-spacing: -1.5px; text-shadow: 0 0 16px rgba(214,255,58,0.3); }
.pt-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); margin-top: 4px; }

.slot {
  background: var(--bg-2); border: 1px solid var(--line); border-top-width: 3px; border-radius: 3px;
  padding: 8px 8px 6px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0;
}
.slot-tag { font-family: var(--mono); font-size: 8px; letter-spacing: 1.2px; color: var(--muted); }
.slot-cpt .slot-tag { color: var(--lime); }
.slot-photo { height: 56px; border-radius: 3px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.slot-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.slot-logo { width: 100%; height: 56px; object-fit: contain; padding: 6px; filter: brightness(1.4); }
.slot-name { font-weight: 600; font-size: 13px; letter-spacing: -0.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-team { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; }
.slot-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.slot-meta .pts { color: var(--lime); font-weight: 700; }

/* Loader */
.loader { padding: 80px 0; text-align: center; }
.loader-spin {
  width: 48px; height: 48px; margin: 0 auto 18px;
  border: 3px solid var(--line); border-top-color: var(--lime); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--text); }
.loader-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--muted); margin-top: 6px; }
.empty { padding: 80px 0; text-align: center; }
.empty-title { font-family: var(--mono); font-size: 16px; letter-spacing: 2px; color: var(--accent); }
.empty-sub { color: var(--muted); margin-top: 8px; margin-bottom: 24px; }

/* ========== TABLE VIEW ========== */
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
.view-toggle button {
  background: transparent; border: 0; color: var(--muted);
  padding: 8px 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; font-weight: 600;
  border-right: 1px solid var(--line);
}
.view-toggle button:last-child { border-right: 0; }
.view-toggle button.on { background: var(--lime); color: #000; }
.view-toggle button:hover:not(.on) { color: var(--text); background: var(--panel); }

.lu-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lu-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.lu-table thead th {
  text-align: left; padding: 10px 12px; background: var(--bg-2);
  font-size: 10px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
.lu-table thead th.sortable { cursor: pointer; transition: 0.12s; }
.lu-table thead th.sortable:hover { color: var(--lime); background: var(--panel-2); }
.lu-table thead th.r { text-align: right; }
.sort-ind { color: var(--lime); margin-left: 6px; font-size: 9px; }
.lu-table tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.lu-table tbody tr:hover { background: var(--panel-2); }
.lu-table tbody tr.row-1 { background: rgba(214,255,58,0.05); }
.lu-table tbody tr.row-1:hover { background: rgba(214,255,58,0.09); }
.lu-table tbody tr.row-1 .r-rank { color: var(--lime); font-weight: 800; }
.lu-table tbody tr.row-2 .r-rank { color: #cdd5e0; }
.lu-table tbody tr.row-3 .r-rank { color: #d68b54; }
.r-rank { font-weight: 700; font-size: 13px; color: var(--muted); width: 40px; }
.r-cpt { font-family: var(--sans); font-weight: 600; font-size: 13px; }
.r-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.r-flex { color: var(--muted-2); font-size: 11px; }
.r-con { font-weight: 600; letter-spacing: 0.5px; }
.r.right { text-align: right; font-variant-numeric: tabular-nums; }
.r.hi { color: var(--lime); font-weight: 700; font-size: 13px; }
.r.muted { color: var(--muted); }
.r.bad { color: var(--bad); }

.exp-bar {
  position: relative; display: inline-block; width: 120px; height: 18px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; vertical-align: middle;
}
.exp-fill { position: absolute; inset: 0 auto 0 0; opacity: 0.55; }
.exp-bar span {
  position: relative; z-index: 1; display: block; line-height: 18px;
  font-family: var(--mono); font-size: 10px; color: var(--text); padding: 0 6px;
  text-align: right;
}

/* ========== RACE FORECAST VIEW ========== */
.forecast-wrap {
  padding: 28px 32px 80px;
  max-width: 1700px;
  margin: 0 auto;
}

.fc-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  align-items: center;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-left: 4px solid var(--lime);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.fc-hero::after {
  content: ""; position: absolute; right: -100px; top: -50%; width: 400px; height: 200%;
  background: radial-gradient(ellipse, rgba(214,255,58,0.08), transparent 70%);
  pointer-events: none;
}
.fc-hero-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2.5px;
  color: var(--lime); font-weight: 700;
  margin-bottom: 6px;
}
.fc-hero-title {
  font-family: var(--mono); font-size: 42px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text); line-height: 1; margin-bottom: 8px;
}
.fc-hero-year {
  color: var(--lime); font-weight: 800;
  text-shadow: 0 0 20px rgba(214,255,58,0.4);
}
.fc-hero-sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px;
  color: var(--muted-2); font-weight: 500;
}
.fc-hero-stats {
  display: flex; gap: 28px; align-items: center;
  position: relative; z-index: 1;
}
.fc-stat {
  text-align: right;
}
.fc-stat-num {
  font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--text);
  letter-spacing: -0.5px; line-height: 1;
}
.fc-stat-lbl {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px;
  color: var(--muted); margin-top: 4px; font-weight: 700;
}

.fc-cols {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px;
}
.fc-section-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  color: var(--muted); font-weight: 700; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}

/* Driver forecast cards */
.fc-cards { display: flex; flex-direction: column; gap: 8px; }
.fc-card {
  display: grid; grid-template-columns: 56px 64px 1fr;
  gap: 16px; align-items: stretch;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid var(--line-2);
  border-radius: 4px;
  position: relative;
}
.fc-card-winner {
  background: linear-gradient(90deg, rgba(214,255,58,0.06), var(--panel) 50%);
  box-shadow: 0 0 30px rgba(214,255,58,0.1);
}
.fc-card-winner::before {
  content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px;
  background: var(--lime);
}
.fc-card-podium { background: linear-gradient(90deg, rgba(255,255,255,0.04), var(--panel) 50%); }

.fc-card-rank {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 28px; font-weight: 800;
  color: var(--text); letter-spacing: -1px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 3px;
}
.fc-card-winner .fc-card-rank { color: var(--lime); border-color: rgba(214,255,58,0.4); }

.fc-card-photo {
  width: 64px; height: 64px;
  border-radius: 4px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.fc-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.fc-card-body { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; }
.fc-card-name {
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  grid-column: 1; grid-row: 1; line-height: 1;
}
.fc-card-team {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; font-weight: 700;
  grid-column: 1; grid-row: 2; line-height: 1;
}
.fc-card-pts {
  text-align: right;
  grid-column: 2; grid-row: 1 / span 2;
  display: flex; flex-direction: column; align-items: flex-end;
}
.fc-card-pts-num {
  font-family: var(--mono); font-size: 24px; font-weight: 800; color: var(--lime);
  text-shadow: 0 0 14px rgba(214,255,58,0.25);
  letter-spacing: -0.5px; line-height: 1;
}
.fc-card-pts-lbl {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1.2px;
  color: var(--muted); margin-top: 4px; font-weight: 700;
}

.fc-card-bars {
  grid-column: 1 / -1; grid-row: 3;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.fc-pb { display: flex; flex-direction: column; gap: 3px; }
.fc-pb-row { display: flex; justify-content: space-between; align-items: baseline; }
.fc-pb-lbl {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1.2px;
  color: var(--muted); font-weight: 700;
}
.fc-pb-val {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.fc-pb-track {
  height: 4px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.fc-pb-fill {
  height: 100%; transition: width 0.2s;
  border-radius: 999px;
}

.fc-card-meta {
  grid-column: 1 / -1; grid-row: 4;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.8px;
  color: var(--muted-2);
  margin-top: 4px;
}
.fc-meta-up { color: var(--good); font-weight: 700; }
.fc-meta-down { color: var(--bad); font-weight: 700; }

/* Model comparison matrix */
.fc-matrix-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.fc-matrix {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
}
.fc-matrix thead th {
  text-align: center; padding: 8px 6px;
  background: var(--bg-2);
  font-size: 9px; letter-spacing: 1.3px;
  color: var(--muted); font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.fc-matrix thead th:first-child { text-align: left; padding-left: 12px; }
.fc-matrix tbody td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.fc-matrix tbody tr:hover { background: var(--panel-2); }
.fcm-drv {
  text-align: left !important; padding-left: 12px !important;
  font-family: var(--sans); font-size: 12px;
}
.fcm-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 8px; vertical-align: middle;
}
.fcm-cell.ok   { color: var(--good); }
.fcm-cell.warn { color: var(--warn); }
.fcm-cell.bad  { color: var(--bad); }
.fcm-std.ok   { color: var(--good); }
.fcm-std.warn { color: var(--warn); }
.fcm-std.bad  { color: var(--bad); }

/* Constructor outlook */
.fc-con-list { display: flex; flex-direction: column; gap: 8px; }
.fc-con-row {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 3px; padding: 10px 12px;
}
.fc-con-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.fc-con-logo {
  width: 24px; height: 24px; object-fit: contain;
  filter: brightness(1.4);
}
.fc-con-name {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.fc-con-rank {
  margin-left: auto;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.8px;
  color: var(--muted);
}
.fc-con-bars {
  height: 14px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 2px; overflow: hidden;
  position: relative;
}
.fc-con-bar {
  height: 100%; opacity: 0.85;
  display: flex; align-items: center; padding: 0 8px;
  font-family: var(--mono); font-size: 9px; font-weight: 800;
  color: #000; letter-spacing: 0.5px;
  white-space: nowrap;
  min-width: 60px;
  transition: width 0.2s;
}

@media (max-width: 1200px) {
  .fc-cols { grid-template-columns: 1fr; }
  .fc-hero { grid-template-columns: 1fr; }
  .fc-hero-stats { justify-content: flex-start; }
}

/* small responsive */
@media (max-width: 1100px) {
  .grid-cols { grid-template-columns: 1fr 60px 1fr; }
}
