/* =============================================================================
   examples.css — Widget Examples Page Styles
   Builds on style.css design system (variables, typography, shared components)
   All new classes prefixed with ex- to avoid collision
   ============================================================================= */

/* =============================================================================
   Page Hero
   ============================================================================= */

.ex-hero {
  padding: calc(var(--nav-h) + 48px) 0 40px;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  text-align: center;
}

.ex-hero .section-title {
  margin-bottom: 12px;
}

.ex-hero-sub {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1rem;
  line-height: 1.65;
}

.ex-hero-sub strong {
  color: var(--text);
}

/* Data availability grid */
.ex-data-grid {
  max-width: 700px;
  margin: 0 auto 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: left;
}

.ex-data-grid__title {
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-align: center;
}

.ex-data-grid__items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.ex-data-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  grid-template-rows: auto auto;
  gap: 0;
}

.ex-data-item .glow-dot {
  margin-top: 5px;
  margin-right: 0;
  width: 6px;
  height: 6px;
  grid-row: 1;
  grid-column: 1;
}

.ex-data-item__title {
  grid-row: 1;
  grid-column: 2;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.ex-data-item__sub {
  grid-row: 2;
  grid-column: 2;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  padding-top: 2px;
  border-top: 1px solid rgba(90, 214, 255, 0.1);
  margin-top: 3px;
}

/* Quick anchor nav */
.ex-anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ex-anchor {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(13, 177, 231, 0.08);
  color: var(--accent);
  border: 1px solid rgba(13, 177, 231, 0.18);
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.ex-anchor:hover {
  background: rgba(13, 177, 231, 0.16);
  border-color: rgba(13, 177, 231, 0.35);
}

/* =============================================================================
   Widget Section Scaffold
   ============================================================================= */

.ex-widget-section {
  padding: 56px 0;
}

.ex-widget-section:nth-child(odd) {
  background: var(--bg-dark);
}

.ex-widget-section:nth-child(even) {
  background: var(--bg-mid);
}

.ex-widget-header {
  text-align: center;
  margin-bottom: 36px;
}

.ex-widget-header .pill {
  margin-bottom: 12px;
}

.ex-widget-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.ex-widget-desc {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ex-widget-demo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.ex-widget-demo--left {
  justify-content: flex-start;
}

/* Embed code area */
.ex-widget-code {
  max-width: 640px;
  margin: 0 auto;
}

.ex-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(5, 7, 13, 0.6);
  border: 1px solid var(--card-border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ex-copy-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: rgba(13, 177, 231, 0.08);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s;
}

.ex-copy-btn:hover {
  background: rgba(13, 177, 231, 0.18);
}

.ex-copy-btn--done {
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.3);
}

.ex-code-block {
  background: rgba(5, 7, 13, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-x: auto;
  margin: 0;
}

.ex-code-block code {
  display: block;
  padding: 16px;
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-muted);
  white-space: pre;
}

/* =============================================================================
   1. Score Badge (Dark Theme — clickable bar)
   ============================================================================= */

.ex-score-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
  max-width: 520px;
  width: 100%;
}

.ex-score-bar:hover {
  background: rgba(18, 32, 53, 0.9);
  border-color: rgba(13, 177, 231, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ex-score-bar__circle {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.ex-score-bar__circle img {
  width: 100%;
  height: 100%;
  display: block;
}

.ex-score-bar__circle-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
}

.ex-score-bar__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ex-score-bar__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}

.ex-score-bar__source {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.ex-score-bar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ex-score-bar__conf {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
}

.ex-score-bar__cta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--blue);
  white-space: nowrap;
}

.ex-score-bar__cta svg {
  margin-left: 3px;
  vertical-align: middle;
}

/* =============================================================================
   Score Modal (ported from production tyre-score.css)
   ============================================================================= */

.ex-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.ex-modal-overlay.show {
  display: flex;
}

.ex-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: exModalIn 0.25s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@keyframes exModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Header */
.ex-modal__header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid #334155;
  background: #1e293b;
  border-radius: 16px 16px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ex-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #334155;
  border: 1px solid #475569;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
  line-height: 1;
}

.ex-modal__close:hover {
  background: #475569;
  color: #fff;
}

.ex-modal__tyre-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  font-size: 1.5rem;
}

.ex-modal__tyre-img svg {
  opacity: 0.5;
}

.ex-modal__tyre-info {
  flex: 1;
  min-width: 0;
  padding-right: 40px;
}

.ex-modal__tyre-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
  line-height: 1.3;
  font-family: 'Sora', sans-serif;
}

.ex-modal__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ex-modal__badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ex-modal__badge--season { background: #e7f5ff; color: #1971c2; }
.ex-modal__badge--tier   { background: #f3f0ff; color: #6741d9; }

.ex-modal__score-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ex-modal__circle {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-modal__circle img {
  width: 100%;
  height: 100%;
  display: block;
}

.ex-modal__circle-value {
  position: absolute;
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.ex-modal__circle-max {
  position: absolute;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  bottom: 15px;
}

/* Meta bar */
.ex-modal__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: #fafbfc;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.78rem;
  color: #666;
}

.ex-modal__meta-sep { color: #ddd; }

.ex-modal__conf-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
}

.ex-modal__conf-badge--high    { background: #d4edda; color: #155724; }
.ex-modal__conf-badge--medium  { background: #fff3cd; color: #856404; }
.ex-modal__conf-badge--limited { background: #e9ecef; color: #6c757d; }

/* About box */
.ex-modal__about {
  margin: 16px 24px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.ex-modal__about p {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* Category sections */
.ex-modal__categories {
  padding: 20px 24px 0;
}

.ex-modal__section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 12px;
}

.ex-modal__section-desc {
  font-size: 0.78rem;
  color: #888;
  line-height: 1.5;
  margin: -4px 0 12px;
}

.ex-modal__cat {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ex-modal__cat-name {
  width: 80px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #444;
  text-align: right;
}

.ex-modal__cat-bar-wrap {
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.ex-modal__cat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.ex-modal__cat-bar--excellent    { background: #28a745; }
.ex-modal__cat-bar--strong       { background: #0db1e7; }
.ex-modal__cat-bar--good         { background: #17a2b8; }
.ex-modal__cat-bar--average      { background: #fd7e14; }
.ex-modal__cat-bar--below-avg    { background: #dc3545; }

.ex-modal__cat-score {
  width: 40px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  text-align: right;
}

.ex-modal__cat-tests {
  width: 80px;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #aaa;
  white-space: nowrap;
}

/* Collapsible sections */
.ex-modal__section {
  border-top: 1px solid #f0f0f0;
  margin-top: 16px;
}

.ex-modal__section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.ex-modal__section-hdr:hover {
  background: #fafafa;
}

.ex-modal__section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.ex-modal__chevron {
  transition: transform 0.25s ease;
  color: #bbb;
}

.ex-modal__section.open .ex-modal__chevron {
  transform: rotate(180deg);
}

.ex-modal__section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ex-modal__section.open .ex-modal__section-body {
  max-height: 2000px;
}

.ex-modal__section-content {
  padding: 0 24px 20px;
}

/* Component cards */
.ex-modal__components {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ex-modal__component {
  flex: 1;
  min-width: 170px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #eee;
}

.ex-modal__component-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2px;
}

.ex-modal__component-weight {
  font-size: 0.72rem;
  color: #999;
  margin-bottom: 8px;
}

.ex-modal__component-detail {
  font-size: 0.76rem;
  color: #666;
  line-height: 1.5;
}

.ex-modal__component-detail div { padding: 1px 0; }
.ex-modal__component-detail strong { color: #333; }

/* Methodology */
.ex-modal__methodology-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  margin-top: 16px;
}

.ex-modal__methodology-subtitle:first-child { margin-top: 0; }

.ex-modal__weight-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ex-modal__weight-label {
  width: 100px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #555;
  text-align: right;
}

.ex-modal__weight-bar-wrap {
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.ex-modal__weight-bar {
  height: 100%;
  border-radius: 4px;
  background: #0db1e7;
}

.ex-modal__weight-pct {
  width: 36px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
}

/* Data Sources table */
.ex-modal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ex-modal__table th {
  text-align: left;
  padding: 8px 10px;
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
}

.ex-modal__table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  vertical-align: top;
}

.ex-modal__pos-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e9ecef;
  color: #333;
}

.ex-modal__pos-badge--top3 {
  background: #d4edda;
  color: #155724;
}

/* =============================================================================
   AI Summary Widgets
   ============================================================================= */

.ex-ai-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 820px;
  width: 100%;
}

.ex-ai-card {
  display: flex;
}

.ex-ai-card .widget-frame {
  width: 100%;
}

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

.ex-ai-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(13, 177, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ex-ai-icon--reviews {
  background: rgba(90, 214, 255, 0.1);
}

.ex-ai-icon--tests {
  background: rgba(52, 211, 153, 0.1);
}

.ex-ai-label {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.ex-ai-basis {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.ex-ai-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.ex-ai-text--sm {
  font-size: 0.78rem;
}

.ex-ai-tags {
  display: flex;
  gap: 16px;
}

.ex-ai-tags-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ex-ai-tags-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.ex-ai-tags-title--pos { color: var(--green); }
.ex-ai-tags-title--neg { color: #f87171; }

.ex-ai-tag {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
}

.ex-ai-tag--pos {
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.ex-ai-tag--neg {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* =============================================================================
   5. Comparison Widget
   ============================================================================= */

.ex-comparison {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 820px;
  width: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 32px rgba(0, 0, 0, 0.25);
}

.ex-comparison__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.ex-comparison__tyre {
  padding: 20px 16px;
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ex-comparison__tyre:last-child {
  border-right: none;
}

.ex-comparison__tyre--best {
  background: rgba(13, 177, 231, 0.04);
  border-bottom: 2px solid var(--blue);
}

.ex-comparison__rank {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  margin-bottom: 8px;
}

.ex-comparison__tyre--best .ex-comparison__rank {
  background: rgba(13, 177, 231, 0.12);
  padding: 2px 10px;
  border-radius: 999px;
}

.ex-comparison__name {
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
  min-height: 2.6em;
}

.ex-comparison__circle {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
}

.ex-comparison__circle img {
  width: 100%;
  height: 100%;
  display: block;
}

.ex-comparison__circle span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.ex-comparison__cats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.ex-comparison__cat {
  display: grid;
  grid-template-columns: 48px 1fr 22px;
  align-items: center;
  gap: 5px;
}

.ex-comparison__cat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: left;
}

.ex-comparison__cat-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.ex-comparison__cat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  border-radius: 2px;
}

.ex-comparison__cat-val {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.ex-comparison__tag {
  font-size: 0.62rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(13, 177, 231, 0.1);
  color: var(--accent);
  border: 1px solid rgba(13, 177, 231, 0.2);
}

/* =============================================================================
   6. Inline Score Badges
   ============================================================================= */

.ex-inline-demo {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ex-fake-listing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(90, 214, 255, 0.08);
  background: rgba(5, 7, 13, 0.3);
}

.ex-fake-listing:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.ex-fake-listing:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
  border-bottom: none;
}

.ex-fake-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-fake-price {
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

/* Inline badge pill */
.ex-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  text-decoration: none;
}

.ex-inline-badge img {
  width: 18px;
  height: 18px;
  display: block;
}

.ex-inline-badge__score {
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.ex-inline-badge__label {
  font-size: 0.55rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
}

/* Score-tier colors */
.ex-inline-badge--excellent { background: #28a745; }
.ex-inline-badge--good      { background: #0db1e7; }
.ex-inline-badge--average    { background: #fd7e14; }
.ex-inline-badge--poor       { background: #dc3545; }

/* =============================================================================
   7. EU Label + Score Combined Widget
   ============================================================================= */

.ex-eu-widget {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 32px rgba(0, 0, 0, 0.25);
}

.ex-eu-widget__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  padding: 20px 16px;
}

.ex-eu-widget__divider {
  width: 1px;
  background: var(--card-border);
  margin: 0 8px;
}

/* EU Label side */
.ex-eu-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ex-eu-label__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ex-eu-label__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-eu-label__icon svg {
  width: 18px;
  height: 18px;
}

.ex-eu-label__rating {
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  width: 32px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.ex-eu-label__rating--a  { background: #22c55e; color: #fff; }
.ex-eu-label__rating--b  { background: #86efac; color: #14532d; }
.ex-eu-label__rating--c  { background: #fde047; color: #713f12; }
.ex-eu-label__rating--db { background: #86efac; color: #14532d; font-size: 0.72rem; width: auto; padding: 0 6px; }
.ex-eu-label__rating--yes { background: rgba(13, 177, 231, 0.15); color: var(--blue); font-size: 0.6rem; width: auto; padding: 0 6px; }

.ex-eu-label__desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Score side */
.ex-eu-widget__score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ex-eu-widget__circle {
  position: relative;
  width: 56px;
  height: 56px;
}

.ex-eu-widget__circle img {
  width: 100%;
  height: 100%;
  display: block;
}

.ex-eu-widget__circle span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.ex-eu-widget__tyre-name {
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.ex-eu-widget__conf {
  font-size: 0.6rem;
  color: var(--green);
  font-weight: 500;
}

.ex-eu-widget__bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.ex-eu-widget__bar {
  display: grid;
  grid-template-columns: 38px 1fr 20px;
  align-items: center;
  gap: 4px;
}

.ex-eu-widget__bar-label {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.ex-eu-widget__bar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.ex-eu-widget__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  border-radius: 2px;
}

.ex-eu-widget__bar-val {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* =============================================================================
   CTA Section
   ============================================================================= */

.ex-cta {
  padding: 56px 0;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid));
  text-align: center;
}

.ex-cta h2 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 12px;
}

.ex-cta p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 900px) {
  .ex-data-grid__items {
    grid-template-columns: 1fr;
  }

  .ex-ai-pair {
    grid-template-columns: 1fr;
  }

  .ex-comparison__grid {
    grid-template-columns: 1fr;
  }

  .ex-comparison__tyre {
    border-right: none;
    border-bottom: 1px solid var(--card-border);
  }

  .ex-comparison__tyre:last-child {
    border-bottom: none;
  }

  .ex-comparison__cats {
    max-width: 300px;
  }

  .ex-modal__header {
    flex-wrap: wrap;
  }

  .ex-modal__score-block {
    margin-top: 4px;
  }

  .ex-modal__circle {
    width: 72px;
    height: 72px;
  }

  .ex-modal__circle-value {
    font-size: 1.5rem;
  }

  .ex-modal__circle-max {
    font-size: 0.55rem;
    bottom: 12px;
  }

  .ex-eu-widget__body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ex-eu-widget__divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .ex-eu-widget__score-side {
    padding-top: 8px;
  }
}

@media (max-width: 600px) {
  .ex-hero {
    padding: calc(var(--nav-h) + 24px) 0 32px;
  }

  .ex-widget-section {
    padding: 36px 0;
  }

  .ex-anchors {
    gap: 6px;
  }

  .ex-anchor {
    font-size: 0.68rem;
    padding: 4px 10px;
  }

  .ex-score-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ex-score-bar__cta {
    display: none;
  }

  .ex-modal-overlay {
    padding: 10px;
  }

  .ex-modal {
    border-radius: 12px;
  }

  .ex-modal__header {
    padding: 16px;
    border-radius: 12px 12px 0 0;
  }

  .ex-modal__tyre-info {
    padding-right: 32px;
  }

  .ex-modal__meta {
    padding: 8px 16px;
  }

  .ex-modal__categories {
    padding: 16px 16px 0;
  }

  .ex-modal__cat-name {
    width: 60px;
    font-size: 0.75rem;
  }

  .ex-modal__section-hdr {
    padding: 12px 16px;
  }

  .ex-modal__section-content {
    padding: 0 16px 16px;
  }

  .ex-modal__components {
    flex-direction: column;
  }

  .ex-modal__about {
    margin: 12px 16px 0;
  }

  .ex-fake-listing {
    flex-wrap: wrap;
    gap: 8px;
  }

  .ex-fake-name {
    flex-basis: 100%;
  }

  .ex-code-block code {
    font-size: 0.7rem;
    white-space: pre-wrap;
    word-break: break-all;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ex-modal {
    animation: none;
  }

  .ex-modal__cat-bar,
  .ex-modal__weight-bar {
    transition: none;
  }
}
