/* Competitive Spaces — v1 prototype styles.
   Relies on the design tokens defined in styles.css :root. */

.space-section {
  margin-top: 30px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.sec-head h2 {
  font-size: 18px;
}

.sec-head .muted {
  font-size: 13px;
  color: var(--muted);
}

/* Verdict — the headline answer */
.verdict {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-top: 22px;
}

.verdict-text {
  font-size: 19px;
  line-height: 1.5;
  margin: 8px 0 0;
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
}

.kpi strong {
  font-size: 13px;
}

.kpi .muted {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.kpi-src {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Tiers */
.tier {
  margin-bottom: 24px;
}

.tier-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tier-name {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.tier-blurb {
  font-size: 12px;
  color: var(--muted);
}

.tierlabel-leading { color: var(--positive); }
.tierlabel-challenging { color: var(--accent); }
.tierlabel-in-the-mix { color: var(--ink); }
.tierlabel-fading { color: var(--warning); }
.tierlabel-entering { color: var(--ink); }
.tierlabel-not-competing { color: var(--muted); }

.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Company card */
.co-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
}

.tier-leading .co-card { border-left: 3px solid var(--positive); }
.tier-challenging .co-card { border-left: 3px solid var(--accent); }
.tier-fading .co-card { border-left: 3px solid var(--warning); }
.tier-entering .co-card { border-left: 3px dashed var(--ink); }

.co-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.co-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.co-name {
  font-size: 15px;
  line-height: 1.1;
}

.co-type {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.co-headline {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.pos-badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid;
  white-space: nowrap;
}

.pos-leading { color: var(--positive); border-color: var(--positive); background: rgba(19, 121, 91, 0.08); }
.pos-challenging { color: var(--accent); border-color: var(--accent); background: #fff3ea; }
.pos-in-the-mix { color: var(--muted); border-color: var(--border); background: var(--surface-strong); }
.pos-fading { color: var(--warning); border-color: var(--warning); background: rgba(183, 121, 31, 0.08); }
.pos-entering { color: var(--ink); border-color: var(--ink); border-style: dashed; background: var(--surface-strong); }
.pos-not-competing { color: var(--muted); border-color: var(--border); background: transparent; }

/* Evidence */
.evidence {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ev {
  font-size: 13px;
  line-height: 1.4;
}

.ev-label {
  color: var(--muted);
}

.ev-label::after {
  content: ": ";
}

.ev-value {
  color: var(--ink);
  font-weight: 600;
}

.co-foot {
  margin-top: 2px;
}

.confidence {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.conf-High { color: var(--positive); }
.conf-Medium { color: var(--warning); }
.conf-Low { color: var(--negative); }

/* Compact not-competing cards */
.co-card--compact {
  gap: 6px;
  background: transparent;
  border-style: dashed;
  padding: 12px 14px;
}

.co-card--compact .co-headline {
  font-size: 13px;
  color: var(--muted);
}

/* Movement */
.movement {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
}

.movement p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Notes */
.notes {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.roster-note {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 12px;
}

.notes details {
  font-size: 13px;
}

.notes summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.notes details ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.notes details li {
  margin-bottom: 6px;
}

.status-line {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* Space switcher */
.space-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.space-tab {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
}

.space-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.space-tab.active {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface-strong);
}

/* Home — state of the races */
.races-intro {
  max-width: 700px;
  font-size: 17px;
  line-height: 1.55;
  margin: 24px 0 0;
}

.races-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.race-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}

a.race-card.live:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow);
}

.race-card.planned {
  background: transparent;
  border-style: dashed;
}

.race-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.race-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.race-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid;
}

.race-status.live {
  color: var(--positive);
  border-color: var(--positive);
  background: rgba(19, 121, 91, 0.08);
}

.race-status.planned {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface-strong);
}

.race-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.race-q {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.race-leaders-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--positive);
  margin-bottom: 6px;
}

.leader-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.leader-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.race-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.race-go {
  font-weight: 700;
  color: var(--accent);
}

/* Sponsor / ad placeholders */
.ad-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 16px 18px;
}

.ad-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-body {
  font-size: 13px;
  color: var(--muted);
}
