/* ==========================================================================
   Crest Editorial & SEO Comparison Page Styles
   Extends styles.css · Aligned with docs/DESIGN.md
   ========================================================================== */

.guide-hero {
  padding-top: 44px;
  padding-bottom: 36px;
}

.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--crest-ink-muted);
}

.guide-breadcrumb a {
  color: var(--crest-ink-secondary);
  transition: color 140ms ease;
}

.guide-breadcrumb a:hover {
  color: var(--crest-action-ink);
}

.guide-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
}

.guide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px 11px;
  border: 1px solid var(--crest-line);
  border-radius: 999px;
  background: var(--crest-card-solid);
  font-size: 12px;
  font-weight: 600;
  color: var(--crest-action-ink);
}

.guide-title {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 760;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--crest-ink);
}

.guide-lead {
  margin: 16px 0 0;
  max-width: 60ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--crest-ink-secondary);
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.guide-summary-card {
  padding: 24px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.guide-summary-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 650;
  color: var(--crest-ink);
}

.guide-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-summary-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--crest-line);
  font-size: 13.5px;
}

.guide-summary-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-summary-list span {
  color: var(--crest-ink-secondary);
}

.guide-summary-list strong {
  font-weight: 650;
  color: var(--crest-ink);
  text-align: right;
}

.guide-summary-list strong.is-accent {
  color: var(--crest-action-ink);
}

/* ==========================================================================
   Comparison Tables
   ========================================================================== */
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.compare-table th,
.compare-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--crest-line);
  vertical-align: top;
}

.compare-table thead th {
  background: rgb(25 33 40 / 2.5%);
  font-size: 13px;
  font-weight: 650;
  color: var(--crest-ink);
  white-space: nowrap;
}

.compare-table thead th.is-crest {
  background: var(--crest-action-tint);
  color: var(--crest-action-ink);
}

.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--crest-ink);
  white-space: nowrap;
}

.compare-table td.is-crest {
  background: rgb(252 76 2 / 3%);
  font-weight: 550;
  color: var(--crest-ink);
}

.compare-table td {
  color: var(--crest-ink-secondary);
}

.compare-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--crest-ink-muted);
}

/* ==========================================================================
   Cost Breakdown Bar
   ========================================================================== */
.cost-card {
  padding: 24px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.cost-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.cost-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cost-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.cost-row-head strong {
  font-weight: 700;
  color: var(--crest-ink);
}

.cost-row-head span {
  color: var(--crest-ink-secondary);
}

.cost-track {
  height: 12px;
  border-radius: 999px;
  background: rgb(25 33 40 / 7%);
  overflow: hidden;
}

.cost-fill {
  height: 100%;
  border-radius: 999px;
  background: #64748b;
}

.cost-fill--crest {
  background: var(--crest-action);
  min-width: 14px;
}

/* ==========================================================================
   Honest Verdict / Two-Column Cards
   ========================================================================== */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.verdict-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.verdict-card--featured {
  border-color: rgb(252 76 2 / 34%);
  background: linear-gradient(180deg, rgb(252 76 2 / 3.5%) 0%, var(--crest-surface) 38%);
}

.verdict-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--crest-ink);
}

.verdict-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verdict-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--crest-ink-secondary);
}

.verdict-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--crest-ink-muted);
}

.verdict-card--featured .verdict-list li::before {
  background: var(--crest-action);
}

/* ==========================================================================
   3-Column Feature / Steps / Trainer Brand Cards
   ========================================================================== */
.editorial-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.editorial-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.editorial-card-step {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--crest-action-tint);
  font-size: 12px;
  font-weight: 700;
  color: var(--crest-action-ink);
}

.editorial-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--crest-ink);
}

.editorial-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--crest-ink-secondary);
}

.brand-models {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.model-chip {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--crest-line);
  border-radius: 7px;
  background: var(--crest-page);
  font-size: 12px;
  font-weight: 550;
  color: var(--crest-ink);
}

.protocol-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgb(16 185 129 / 25%);
  border-radius: 6px;
  background: rgb(16 185 129 / 8%);
  font-size: 11.5px;
  font-weight: 650;
  color: #047857;
}

/* ==========================================================================
   Screenshot Showcase Band
   ========================================================================== */
.guide-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.guide-shot-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.guide-shot-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--crest-line);
}

.guide-shot-caption {
  padding: 16px 18px;
}

.guide-shot-caption h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: var(--crest-ink);
}

.guide-shot-caption p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--crest-ink-secondary);
}

/* ==========================================================================
   Bottom Conversion CTA Banner
   ========================================================================== */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border: 1px solid rgb(252 76 2 / 26%);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.cta-banner-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--crest-ink);
}

.cta-banner-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--crest-ink-secondary);
}

.cta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: none;
}

/* ==========================================================================
   Interactive FTP & Power Zones Calculator
   ========================================================================== */
.calc-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
}

.calc-panel {
  padding: 24px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-lg);
  background: var(--crest-surface);
  box-shadow: var(--crest-shadow-sm);
}

.calc-panel-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--crest-ink);
}

.calc-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--crest-line);
  border-radius: 10px;
  background: var(--crest-page);
}

.calc-mode-btn {
  height: 32px;
  padding-inline: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crest-ink-secondary);
  cursor: pointer;
  transition:
    background-color 140ms ease,
    color 140ms ease;
}

.calc-mode-btn.is-active {
  background: #ffffff;
  color: var(--crest-ink);
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.calc-field {
  margin-bottom: 16px;
}

.calc-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.calc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--crest-ink);
}

.calc-hint {
  font-size: 12px;
  color: var(--crest-ink-muted);
}

.calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-input {
  width: 100%;
  height: 44px;
  padding: 0 46px 0 14px;
  border: 1px solid var(--crest-line-strong);
  border-radius: 10px;
  background: #ffffff;
  font-size: 17px;
  font-weight: 700;
  color: var(--crest-ink);
  appearance: textfield;
}

.calc-input::-webkit-inner-spin-button,
.calc-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-input:focus {
  outline: 2px solid var(--crest-action);
  outline-offset: 1px;
  border-color: var(--crest-action);
}

.calc-unit {
  position: absolute;
  right: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--crest-ink-muted);
  pointer-events: none;
}

.calc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--crest-line);
}

.calc-kpi {
  padding: 12px;
  border: 1px solid var(--crest-line);
  border-radius: 10px;
  background: var(--crest-page);
}

.calc-kpi span {
  display: block;
  font-size: 11.5px;
  color: var(--crest-ink-muted);
}

.calc-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 760;
  color: var(--crest-ink);
}

.calc-kpi--accent strong {
  color: var(--crest-action-ink);
}

.zone-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zone-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 118px 82px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--crest-line);
  border-radius: 10px;
  background: #ffffff;
}

.zone-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--crest-ink);
  white-space: nowrap;
}

.zone-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: none;
}

.zone-meta {
  min-width: 0;
}

.zone-desc {
  display: block;
  font-size: 12.5px;
  color: var(--crest-ink-secondary);
}

.zone-bar-track {
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgb(25 33 40 / 7%);
  overflow: hidden;
}

.zone-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.zone-watts {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--crest-ink);
  text-align: right;
  white-space: nowrap;
}

.zone-pct {
  font-size: 12px;
  color: var(--crest-ink-muted);
  text-align: right;
  white-space: nowrap;
}

.erg-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.erg-preview-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--crest-line-strong);
  border-radius: var(--radius-md);
  background: var(--crest-surface);
}

.erg-preview-card span {
  font-size: 12px;
  color: var(--crest-ink-muted);
}

.erg-preview-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--crest-ink);
}

.erg-preview-watt {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 760;
  color: var(--crest-action-ink);
}

.erg-preview-card p {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--crest-ink-secondary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 920px) {
  .guide-hero-grid,
  .verdict-grid,
  .guide-shot-grid,
  .calc-shell {
    grid-template-columns: 1fr;
  }

  .editorial-grid-3,
  .erg-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .guide-hero {
    padding-top: 26px;
    padding-bottom: 24px;
  }

  .guide-actions {
    flex-direction: column;
  }

  .guide-actions .btn,
  .cta-banner-actions,
  .cta-banner-actions .btn {
    width: 100%;
  }

  .editorial-grid-3,
  .erg-preview-grid {
    grid-template-columns: 1fr;
  }

  .calc-kpi-grid {
    grid-template-columns: 1fr;
  }

  .zone-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }

  .zone-meta {
    grid-column: 1 / -1;
    order: 3;
  }

  .zone-pct {
    display: none;
  }

  .compare-table th,
  .compare-table td {
    padding: 12px 13px;
    font-size: 13px;
  }

  .cta-banner {
    padding: 20px;
  }
}
