.e31-guide,
.e31-guide * {
  box-sizing: border-box;
}

.e31-guide {
  --e31-primary: #12213a;
  --e31-primary-soft: #1d3355;
  --e31-accent: #d4a64f;
  --e31-accent-soft: #f3e2b7;
  --e31-surface: #ffffff;
  --e31-surface-alt: #f4f6f8;
  --e31-text: #172033;
  --e31-muted: #667085;
  --e31-border: #d0d5dd;
  --e31-danger: #b42318;
  --e31-success: #027a48;
  width: 100%;
  max-width: 1180px;
  margin: 2rem auto;
  color: var(--e31-text);
  line-height: 1.5;
}

.e31-guide img {
  display: block;
  max-width: 100%;
  height: auto;
}

.e31-guide__loading,
.e31-error {
  padding: 1.25rem;
  border: 1px solid var(--e31-border);
  border-radius: 18px;
  background: var(--e31-surface);
}

.e31-error strong {
  display: block;
  margin-bottom: .35rem;
  color: var(--e31-danger);
}

.e31-hero {
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(320px, 1.08fr);
  gap: 1.25rem;
  padding: clamp(1rem, 2vw, 1.6rem);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--e31-primary), var(--e31-primary-soft));
  box-shadow: 0 20px 60px rgba(15, 23, 42, .18);
  overflow: hidden;
}

.e31-hero__media,
.e31-hero__content {
  min-width: 0;
}

.e31-hero__image {
  width: 100%;
  min-height: 100%;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.e31-hero__content {
  padding: clamp(.25rem, 1.5vw, .9rem);
  color: #fff;
}

.e31-eyebrow {
  margin: 0 0 .35rem;
  color: var(--e31-accent-soft);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.e31-title {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.e31-subtitle {
  max-width: 62ch;
  margin: .8rem 0 1.1rem;
  color: rgba(255,255,255,.86);
}

.e31-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0;
}

.e31-field {
  display: grid;
  gap: .35rem;
  min-width: 0;
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.e31-field--static {
  align-content: start;
}

.e31-select,
.e31-static-value {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  color: var(--e31-text);
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.e31-select {
  padding: .62rem .75rem;
}

.e31-static-value {
  display: flex;
  align-items: center;
  padding: .62rem .75rem;
}

.e31-hero__stats,
.e31-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}

.e31-stat {
  padding: .85rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
}

.e31-card .e31-stat {
  border-color: var(--e31-border);
  background: var(--e31-surface-alt);
  backdrop-filter: none;
}

.e31-stat__label,
.e31-stat__detail {
  display: block;
  color: var(--e31-muted);
  font-size: .82rem;
}

.e31-hero .e31-stat__label,
.e31-hero .e31-stat__detail {
  color: rgba(255,255,255,.72);
}

.e31-stat__value {
  display: block;
  margin: .1rem 0;
  color: inherit;
  font-size: 1.05rem;
  line-height: 1.25;
}

.e31-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
  padding: .5rem;
  border: 1px solid var(--e31-border);
  border-radius: 20px;
  background: var(--e31-surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.e31-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--e31-muted);
  cursor: pointer;
  font: inherit;
  font-size: .93rem;
  font-weight: 750;
  padding: .72rem .95rem;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.e31-tab:hover,
.e31-tab:focus-visible {
  background: var(--e31-surface-alt);
  color: var(--e31-text);
}

.e31-tab.is-active {
  background: var(--e31-primary);
  color: #fff;
}

.e31-section {
  animation: e31Fade .2s ease both;
}

@keyframes e31Fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.e31-grid {
  display: grid;
  gap: 1rem;
}

.e31-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.e31-grid--cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.e31-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--e31-border);
  border-radius: 22px;
  background: var(--e31-surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .06);
}

.e31-card--wide {
  margin-top: 1rem;
}

.e31-card__title,
.e31-section__heading,
.e31-checklist-group h3 {
  margin: 0 0 .75rem;
  color: var(--e31-primary);
  font-size: 1.1rem;
  line-height: 1.2;
}

.e31-card p {
  margin: 0 0 .7rem;
}

.e31-card p:last-child {
  margin-bottom: 0;
}

.e31-list {
  margin: 0;
  padding-left: 1.2rem;
}

.e31-list li + li {
  margin-top: .35rem;
}

.e31-list--check {
  padding-left: 0;
  list-style: none;
}

.e31-list--check li {
  position: relative;
  padding-left: 1.6rem;
}

.e31-list--check li::before {
  position: absolute;
  left: 0;
  top: .12rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--e31-accent);
  color: var(--e31-primary);
  content: "✓";
  font-size: .75rem;
  font-weight: 900;
  line-height: 1rem;
  text-align: center;
}

.e31-note {
  color: var(--e31-muted);
  font-size: .9rem;
}

.e31-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.e31-gallery__image,
.e31-wheel-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  object-fit: cover;
  background: var(--e31-surface-alt);
}

.e31-wheel-image {
  aspect-ratio: 4 / 3;
  margin-bottom: .8rem;
}

.e31-compact-dl,
.e31-spec-table {
  display: grid;
  gap: 0;
  margin: 0;
}

.e31-compact-dl {
  grid-template-columns: minmax(90px, .5fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--e31-border);
  border-radius: 14px;
}

.e31-compact-dl dt,
.e31-compact-dl dd {
  margin: 0;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--e31-border);
}

.e31-compact-dl dt {
  background: var(--e31-surface-alt);
  color: var(--e31-muted);
  font-weight: 800;
}

.e31-compact-dl dd {
  min-width: 0;
}

.e31-compact-dl dt:nth-last-of-type(1),
.e31-compact-dl dt:nth-last-of-type(1) + dd {
  border-bottom: 0;
}

.e31-spec-table {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.e31-spec-row {
  display: grid;
  grid-template-columns: minmax(120px, .55fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--e31-border);
  border-radius: 14px;
}

.e31-spec-row dt,
.e31-spec-row dd {
  margin: 0;
  padding: .72rem .8rem;
}

.e31-spec-row dt {
  background: var(--e31-surface-alt);
  color: var(--e31-muted);
  font-weight: 800;
}

.e31-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .4rem 0 .75rem;
}

.e31-tag,
.e31-price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--e31-accent-soft);
  color: var(--e31-primary);
  font-size: .78rem;
  font-weight: 800;
  padding: .28rem .55rem;
}

.e31-tag--muted {
  background: var(--e31-surface-alt);
  color: var(--e31-muted);
}

.e31-price {
  margin-top: .35rem;
}

.e31-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.e31-color-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  min-width: 0;
  padding: .72rem;
  border: 1px solid var(--e31-border);
  border-radius: 16px;
  background: var(--e31-surface-alt);
}

.e31-swatch {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(15, 23, 42, .2);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

.e31-color-card strong,
.e31-color-card span {
  display: block;
  min-width: 0;
}

.e31-color-card__meta,
.e31-color-card__note {
  color: var(--e31-muted);
  font-size: .78rem;
}

.e31-checklist-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--e31-border);
  border-radius: 20px;
  background: var(--e31-surface);
}

.e31-progress__text {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
  color: var(--e31-primary);
}

.e31-progress__bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--e31-surface-alt);
}

.e31-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--e31-accent), var(--e31-success));
}

.e31-button {
  appearance: none;
  border: 1px solid var(--e31-border);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: .7rem 1rem;
}

.e31-button--ghost {
  background: var(--e31-surface-alt);
  color: var(--e31-primary);
}

.e31-checklist-group {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--e31-border);
  border-radius: 22px;
  background: var(--e31-surface);
}

.e31-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  padding: .85rem;
  border: 1px solid var(--e31-border);
  border-left-width: 5px;
  border-radius: 16px;
  cursor: pointer;
}

.e31-check-item + .e31-check-item {
  margin-top: .65rem;
}

.e31-check-item input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .2rem;
  accent-color: var(--e31-success);
}

.e31-check-item__body strong,
.e31-check-item__body span,
.e31-check-item__body em {
  display: block;
}

.e31-check-item__body span {
  color: var(--e31-muted);
}

.e31-check-item__body em {
  margin-top: .35rem;
  color: var(--e31-muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .08em;
}

.e31-severity--critical { border-left-color: #7f1d1d; }
.e31-severity--high { border-left-color: var(--e31-danger); }
.e31-severity--medium { border-left-color: var(--e31-accent); }
.e31-severity--low { border-left-color: var(--e31-success); }

.e31-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.e31-link-cloud a,
.e31-source-list a,
.e31-card a {
  color: var(--e31-primary);
  font-weight: 800;
  text-decoration: none;
}

.e31-link-cloud a {
  display: inline-flex;
  border: 1px solid var(--e31-border);
  border-radius: 999px;
  background: var(--e31-surface-alt);
  padding: .55rem .75rem;
}

.e31-link-cloud a:hover,
.e31-card a:hover {
  text-decoration: underline;
}

.e31-source-list {
  display: grid;
  gap: .65rem;
}

.e31-source-list article {
  display: grid;
  gap: .1rem;
  padding: .7rem;
  border: 1px solid var(--e31-border);
  border-radius: 14px;
  background: var(--e31-surface-alt);
}

.e31-source-list span {
  color: var(--e31-muted);
  font-size: .9rem;
}

@media (max-width: 980px) {
  .e31-hero,
  .e31-grid--2 {
    grid-template-columns: 1fr;
  }

  .e31-grid--cards,
  .e31-color-grid,
  .e31-spec-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .e31-guide {
    margin: 1rem auto;
  }

  .e31-hero {
    border-radius: 20px;
  }

  .e31-controls,
  .e31-hero__stats,
  .e31-mini-stats,
  .e31-grid--cards,
  .e31-color-grid,
  .e31-gallery,
  .e31-spec-table,
  .e31-checklist-head {
    grid-template-columns: 1fr;
  }

  .e31-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .65rem;
  }

  .e31-tab {
    white-space: nowrap;
  }

  .e31-card,
  .e31-checklist-group {
    border-radius: 18px;
  }

  .e31-spec-row,
  .e31-compact-dl {
    grid-template-columns: 1fr;
  }

  .e31-compact-dl dt,
  .e31-compact-dl dd,
  .e31-spec-row dt,
  .e31-spec-row dd {
    border-bottom: 0;
  }

  .e31-spec-row dt,
  .e31-compact-dl dt {
    padding-bottom: .2rem;
  }

  .e31-spec-row dd,
  .e31-compact-dl dd {
    padding-top: .2rem;
  }
}
