/* ===== COMPARISON PAGE STYLES ===== */
/* opus-vs-glm.html only */

/* ===== PAGE-SPECIFIC VARIABLES ===== */
:root {
  --opus: #e8913a;
  --opus-soft: #e8913a88;
  --opus-dim: #e8913a30;
  --opus-glow: #e8913a15;
  --glm: #2dd4bf;
  --glm-soft: #2dd4bf88;
  --glm-dim: #2dd4bf30;
  --glm-glow: #2dd4bf15;
  --accent-line: linear-gradient(90deg, var(--opus), #88888840, var(--glm));
}

/* ===== HERO GRADIENT OVERRIDE ===== */
.hero::before {
  background:
    radial-gradient(ellipse 55% 50% at 30% 45%, var(--opus-dim), transparent),
    radial-gradient(ellipse 55% 50% at 70% 55%, var(--glm-dim), transparent),
    radial-gradient(ellipse 80% 60% at 50% 80%, transparent, var(--bg-deep));
}

/* Main override — wider for comparison */
main { max-width: 1000px; }

/* Accent rule uses comparison gradient */
.accent-rule {
  background: var(--accent-line);
  opacity: 0.5;
}

/* Hero content wider */
.hero-content { max-width: 900px; }

/* ===== VS HEADER ===== */
.hero-vs {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-tertiary);
}
.hero-vs .opus-name { color: var(--opus); }
.hero-vs .glm-name { color: var(--glm); }
.hero-vs .vs-x {
  width: 36px; height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  color: var(--text-secondary);
  letter-spacing: 0;
}

/* Home nav + back-to-top hover uses opus color */
.home-nav a:hover { color: var(--opus); }
.back-to-top:hover { border-color: var(--opus); color: var(--opus); }

/* TOC dot active uses text-primary instead of accent */
.toc-dot.active { background: var(--text-primary); box-shadow: none; }

/* ===== SPEC CARDS ===== */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.spec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.spec-card.opus-card::before { background: var(--opus); }
.spec-card.glm-card::before { background: var(--glm); }
.spec-card-name {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.opus-card .spec-card-name { color: var(--opus); }
.glm-card .spec-card-name { color: var(--glm); }
.spec-card-model {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text-hero);
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .label { color: var(--text-secondary); font-family: var(--sans); font-size: 0.8rem; }
.spec-row .value { color: var(--text-primary); font-family: var(--mono); font-size: 0.82rem; }

/* ===== BENCHMARK CHART ===== */
.bench-chart { margin: 2.5rem 0; }
.bench-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #ffffff06;
}
.bench-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.bench-bars { display: flex; flex-direction: column; gap: 3px; }
.bar-track {
  height: 18px;
  background: #ffffff06;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  position: relative;
}
.bar-fill.opus-bar {
  background: linear-gradient(90deg, var(--opus-dim), var(--opus-soft));
  box-shadow: inset 0 0 12px var(--opus-glow);
}
.bar-fill.glm-bar {
  background: linear-gradient(90deg, var(--glm-dim), var(--glm-soft));
  box-shadow: inset 0 0 12px var(--glm-glow);
}
.bar-fill.winner.opus-bar { background: linear-gradient(90deg, var(--opus-dim), var(--opus)); }
.bar-fill.winner.glm-bar { background: linear-gradient(90deg, var(--glm-dim), var(--glm)); }
.bar-val {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--bg-deep);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s 1s;
}
.bar-fill.animated .bar-val { opacity: 1; }
.bar-val.outside {
  position: absolute;
  right: -4px;
  transform: translateX(100%);
  color: var(--text-tertiary);
}

/* Win counter */
.win-tally {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.win-tally-item { text-align: center; }
.win-tally-num {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}
.win-tally-num.opus-c { color: var(--opus); }
.win-tally-num.glm-c { color: var(--glm); }
.win-tally-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* ===== ARENA CHART ===== */
.arena-chart {
  margin: 2.5rem 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 320px;
  padding: 0 1rem;
  position: relative;
}
.arena-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 90px;
  height: 100%;
  justify-content: flex-end;
}
.arena-elo {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s 1.2s;
}
.arena-bar-wrap.animated .arena-elo { opacity: 1; }
.arena-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  height: 0%;
  transition: height 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 2px;
  position: relative;
}
.arena-bar.neutral { background: linear-gradient(to top, #333340, #44445580); }
.arena-bar.opus-arena { background: linear-gradient(to top, var(--opus-dim), var(--opus)); box-shadow: 0 0 20px var(--opus-dim); }
.arena-bar.glm-arena { background: linear-gradient(to top, var(--glm-dim), var(--glm)); box-shadow: 0 0 20px var(--glm-dim); }
.arena-name {
  font-family: var(--sans);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
  letter-spacing: 0.03em;
  max-height: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arena-bar-wrap.animated .arena-bar { height: var(--h); }
.arena-baseline {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}

/* ===== COST VIS ===== */
.cost-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2.5rem 0;
}
.cost-col { text-align: center; }
.cost-label-top {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.cost-label-top.opus-c { color: var(--opus); }
.cost-label-top.glm-c { color: var(--glm); }
.cost-circles { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.cost-circle {
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.cost-circle:hover { transform: scale(1.05); }
.cost-circle .amount {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
}
.cost-circle .type {
  font-family: var(--sans);
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 0.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cost-opus-input {
  width: 130px; height: 130px;
  background: radial-gradient(circle, var(--opus-dim), var(--opus-glow));
  border: 1px solid var(--opus-soft);
}
.cost-opus-input .amount { font-size: 1.4rem; color: var(--opus); }
.cost-opus-output {
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--opus-dim), var(--opus-glow));
  border: 1px solid var(--opus-soft);
}
.cost-opus-output .amount { font-size: 1.8rem; color: var(--opus); }
.cost-glm-input {
  width: 50px; height: 50px;
  background: radial-gradient(circle, var(--glm-dim), var(--glm-glow));
  border: 1px solid var(--glm-soft);
}
.cost-glm-input .amount { font-size: 0.7rem; color: var(--glm); }
.cost-glm-output {
  width: 75px; height: 75px;
  background: radial-gradient(circle, var(--glm-dim), var(--glm-glow));
  border: 1px solid var(--glm-soft);
}
.cost-glm-output .amount { font-size: 0.85rem; color: var(--glm); }
.cost-multiplier {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cost-multiplier .big {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--glm), #60e8d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cost-multiplier .desc {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ===== RADAR CHART ===== */
.radar-container {
  display: flex;
  justify-content: center;
  margin: 3rem 0;
}
.radar-svg {
  max-width: 520px;
  width: 100%;
}
.radar-ring { fill: none; stroke: var(--border); stroke-width: 0.5; }
.radar-axis { stroke: var(--border); stroke-width: 0.5; }
.radar-label {
  font-family: var(--sans);
  font-size: 10px;
  fill: var(--text-secondary);
  letter-spacing: 0.05em;
}
.radar-poly-opus {
  fill: var(--opus-dim);
  stroke: var(--opus);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.8s 0.3s;
}
.radar-poly-glm {
  fill: var(--glm-dim);
  stroke: var(--glm);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.8s 0.6s;
}
.radar-container.in-view .radar-poly-opus,
.radar-container.in-view .radar-poly-glm { opacity: 0.85; }
.radar-dot {
  r: 3;
  opacity: 0;
  transition: opacity 0.8s 1s;
}
.radar-container.in-view .radar-dot { opacity: 1; }
.radar-dot.opus-dot { fill: var(--opus); }
.radar-dot.glm-dot { fill: var(--glm); }
.radar-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.radar-legend-item { display: flex; align-items: center; gap: 0.5rem; }
.radar-legend-swatch {
  width: 12px; height: 12px;
  border-radius: 2px;
}

/* ===== CONTEXT VIS ===== */
.context-vis {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.context-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.context-bar {
  width: 100%;
  border-radius: 4px;
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
  height: 0;
}
.context-bar.opus-ctx {
  background: linear-gradient(to top, var(--opus-dim), var(--opus-soft));
  border: 1px solid var(--opus-soft);
}
.context-bar.glm-ctx {
  background: linear-gradient(to top, var(--glm-dim), var(--glm-soft));
  border: 1px solid var(--glm-soft);
}
.context-vis.in-view .opus-ctx { height: 200px; }
.context-vis.in-view .glm-ctx { height: 40px; }
.context-val {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
}
.context-val.opus-c { color: var(--opus); }
.context-val.glm-c { color: var(--glm); }
.context-desc {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-align: center;
}

/* ===== INSIGHT CARDS ===== */
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.insight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.insight-card.opus-edge::before { background: var(--opus); }
.insight-card.glm-edge::before { background: var(--glm); }
.insight-card.neutral-edge::before { background: var(--border-light); }
.insight-card h4 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-hero);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.insight-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
  text-indent: 0 !important;
}
.insight-card p:last-child { margin-bottom: 0; }
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.8rem;
}
.tag.opus-tag { background: var(--opus-dim); color: var(--opus); }
.tag.glm-tag { background: var(--glm-dim); color: var(--glm); }
.tag.draw-tag { background: #ffffff10; color: var(--text-secondary); }

/* ===== VERDICT ===== */
.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 2.5rem 0;
}
.verdict-cell {
  background: var(--bg-card);
  padding: 1.2rem 1.5rem;
}
.verdict-cell .use-case {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
}
.verdict-cell .pick {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
}
.verdict-cell .pick.opus-c { color: var(--opus); }
.verdict-cell .pick.glm-c { color: var(--glm); }
.verdict-cell .pick.draw-c { color: var(--text-secondary); font-style: italic; }

.final-word {
  text-align: center;
  padding: 4rem 2rem;
  margin: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.final-word .score-line {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.final-word .score-line .opus-c { color: var(--opus); }
.final-word .score-line .glm-c { color: var(--glm); }
.final-word p {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
  text-indent: 0 !important;
}

/* ===== INLINE HIGHLIGHTS ===== */
.hl-opus { color: var(--opus); font-weight: 600; }
.hl-glm { color: var(--glm); font-weight: 600; }
.mono { font-family: var(--mono); font-size: 0.9em; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .spec-grid { grid-template-columns: 1fr; }
  .bench-row { grid-template-columns: 120px 1fr; gap: 0.6rem; }
  .bench-label { font-size: 0.68rem; }
  .cost-compare { grid-template-columns: 1fr; gap: 1.5rem; }
  .verdict-grid { grid-template-columns: 1fr; }
  .arena-chart { height: 240px; gap: 3px; }
  .arena-name { font-size: 0.5rem; }
  .context-vis { flex-direction: row; align-items: flex-end; }
  .radar-label { font-size: 8px; }
}
@media (max-width: 560px) {
  .bench-row { grid-template-columns: 90px 1fr; }
  .bench-label { font-size: 0.62rem; }
  .arena-bar-wrap { max-width: 50px; }
}
