html {
  overflow-x: hidden;
}

.cost-guide-page {
  --guide-ink: #0f172a;
  --guide-muted: #475569;
  --guide-soft: #e2e8f0;
  --guide-line: rgba(15, 23, 42, 0.13);
  --guide-line-strong: rgba(15, 23, 42, 0.22);
  --guide-panel: rgba(255, 255, 255, 0.84);
  --guide-panel-strong: #ffffff;
  --guide-slate: #334155;
  --guide-teal: #0f766e;
  --guide-gold: #a16207;
  --guide-green: #15803d;
  --guide-red: #b91c1c;
  --bg: #f8fafc;
  --bg-elevated: var(--guide-panel);
  --bg-strong: var(--guide-panel-strong);
  --text: var(--guide-ink);
  --text-soft: var(--guide-muted);
  --line: var(--guide-line);
  --line-strong: var(--guide-line-strong);
  --brand: var(--guide-teal);
  --brand-deep: #134e4a;
  --accent: var(--guide-gold);
  --accent-deep: #854d0e;
  background:
    linear-gradient(180deg, rgba(226, 232, 240, 0.95), rgba(248, 250, 252, 0.65) 360px, rgba(248, 250, 252, 1)),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

:root[data-theme="dark"] .cost-guide-page {
  --guide-ink: #f8fafc;
  --guide-muted: #cbd5e1;
  --guide-soft: #1e293b;
  --guide-line: rgba(226, 232, 240, 0.15);
  --guide-line-strong: rgba(226, 232, 240, 0.28);
  --guide-panel: rgba(15, 23, 42, 0.76);
  --guide-panel-strong: #111827;
  --guide-slate: #cbd5e1;
  --guide-teal: #5eead4;
  --guide-gold: #facc15;
  --guide-green: #86efac;
  --guide-red: #fca5a5;
  --bg: #020617;
  --bg-elevated: var(--guide-panel);
  --bg-strong: var(--guide-panel-strong);
  --text: var(--guide-ink);
  --text-soft: var(--guide-muted);
  --line: var(--guide-line);
  --line-strong: var(--guide-line-strong);
  --brand: var(--guide-teal);
  --brand-deep: #ccfbf1;
  --accent: var(--guide-gold);
  --accent-deep: #fde68a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cost-guide-page {
    --guide-ink: #f8fafc;
    --guide-muted: #cbd5e1;
    --guide-soft: #1e293b;
    --guide-line: rgba(226, 232, 240, 0.15);
    --guide-line-strong: rgba(226, 232, 240, 0.28);
    --guide-panel: rgba(15, 23, 42, 0.76);
    --guide-panel-strong: #111827;
    --guide-slate: #cbd5e1;
    --guide-teal: #5eead4;
    --guide-gold: #facc15;
    --guide-green: #86efac;
    --guide-red: #fca5a5;
    --bg: #020617;
    --bg-elevated: var(--guide-panel);
    --bg-strong: var(--guide-panel-strong);
    --text: var(--guide-ink);
    --text-soft: var(--guide-muted);
    --line: var(--guide-line);
    --line-strong: var(--guide-line-strong);
    --brand: var(--guide-teal);
    --brand-deep: #ccfbf1;
    --accent: var(--guide-gold);
    --accent-deep: #fde68a;
  }
}

.cost-guide-page *,
.cost-guide-page *::before,
.cost-guide-page *::after {
  min-width: 0;
}

.cost-guide-page .reveal {
  opacity: 1;
  transform: none;
}

.cost-guide-page .site-header {
  background: rgba(248, 250, 252, 0.82);
  border-bottom-color: var(--guide-line);
}

:root[data-theme="dark"] .cost-guide-page .site-header {
  background: rgba(2, 6, 23, 0.82);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cost-guide-page .site-header {
    background: rgba(2, 6, 23, 0.82);
  }
}

.cost-guide-page .logo,
.cost-guide-page h1,
.cost-guide-page h2,
.cost-guide-page h3,
.cost-guide-page .section-heading h2 {
  letter-spacing: 0;
}

.cost-guide-page .site-nav a:hover,
.cost-guide-page .site-nav a:focus-visible,
.cost-guide-page .theme-toggle:hover,
.cost-guide-page .theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.66);
  border-color: var(--guide-line-strong);
}

:root[data-theme="dark"] .cost-guide-page .site-nav a:hover,
:root[data-theme="dark"] .cost-guide-page .site-nav a:focus-visible,
:root[data-theme="dark"] .cost-guide-page .theme-toggle:hover,
:root[data-theme="dark"] .cost-guide-page .theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.cost-hero {
  padding: 3.25rem 0 2.25rem;
}

.cost-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.42rem 0.78rem;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cost-hero h1 {
  max-width: 980px;
  margin: 0.85rem 0 0.8rem;
  font-family: var(--font-heading);
  font-size: 4.2rem;
  line-height: 0.98;
  overflow-wrap: break-word;
}

.cost-subtitle {
  max-width: 940px;
  margin: 0 0 1.35rem;
  color: var(--text-soft);
  font-size: 1.12rem;
}

.quick-reference {
  margin-top: 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--guide-line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(241, 245, 249, 0.84)),
    #f8fafc;
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .quick-reference {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72)),
    #0f172a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .quick-reference {
    background:
      linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72)),
      #0f172a;
  }
}

.quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quick-head h2 {
  margin: 0 0 0.2rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  text-transform: uppercase;
}

.quick-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.quick-head a:not(.cost-button),
.link-row a,
.footer-nav a:hover {
  color: var(--brand);
  font-weight: 800;
}

.cost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 46px;
  padding: 0.78rem 1.05rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 850;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.cost-button:hover,
.cost-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.24);
  outline: none;
}

.cost-button.light {
  background: #ffffff;
  color: #0f172a;
}

.cost-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--guide-line);
  border-radius: 18px;
  background: var(--guide-panel);
  -webkit-overflow-scrolling: touch;
}

.cost-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
}

.cost-table caption {
  padding: 0.9rem 1rem 0.2rem;
  color: var(--text-soft);
  font-weight: 800;
  text-align: left;
}

.cost-table th,
.cost-table td {
  padding: 0.86rem 0.95rem;
  border-bottom: 1px solid var(--guide-line);
  vertical-align: top;
}

.cost-table th {
  background: rgba(15, 23, 42, 0.04);
  color: var(--guide-slate);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

:root[data-theme="dark"] .cost-table th {
  background: rgba(255, 255, 255, 0.05);
}

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

.cost-table td:first-child {
  font-weight: 800;
}

.cost-table.compact {
  max-width: 560px;
  min-width: 420px;
}

.quick-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.quick-metrics div {
  padding: 0.95rem;
  border: 1px solid var(--guide-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
}

:root[data-theme="dark"] .quick-metrics div {
  background: rgba(255, 255, 255, 0.05);
}

.quick-metrics span {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.quick-metrics strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

.cost-guide-page .section {
  padding: 2.3rem 0 3.6rem;
}

.cost-guide-page .section-heading {
  max-width: 860px;
}

.cost-guide-page .section-heading h2 {
  font-family: var(--font-heading);
  font-size: 2.55rem;
  line-height: 1.08;
}

.cost-guide-page .section-heading p {
  margin-bottom: 0;
}

.factor-grid,
.addon-grid,
.quote-grid,
.related-grid,
.table-pair {
  display: grid;
  gap: 1rem;
}

.factor-grid {
  grid-template-columns: repeat(7, minmax(230px, 1fr));
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.factor-card {
  min-height: 280px;
  padding: 1.1rem;
  border: 1px solid var(--guide-line);
  border-radius: 18px;
  background: var(--guide-panel);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.factor-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand);
  font-family: var(--font-heading);
  font-weight: 900;
}

.factor-card h3,
.quote-card h3,
.related-card h3 {
  margin: 0.85rem 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.factor-card p,
.related-card p,
.quote-card li,
.cost-tip {
  color: var(--text-soft);
}

.factor-card strong {
  display: block;
  margin-top: 0.9rem;
  color: var(--guide-gold);
}

.material-details {
  display: grid;
  gap: 0.85rem;
}

.material-details details,
.guide-faq details {
  border: 1px solid var(--guide-line);
  border-radius: 18px;
  background: var(--guide-panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.material-details summary,
.guide-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 850;
  list-style: none;
}

.material-details summary::-webkit-details-marker,
.guide-faq summary::-webkit-details-marker {
  display: none;
}

.material-details summary::after,
.guide-faq summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.35rem;
  line-height: 1;
}

.material-details details[open] summary::after,
.guide-faq details[open] summary::after {
  content: "-";
}

.material-details details > div,
.guide-faq details > div {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.1rem 1.15rem;
}

.material-details p,
.guide-faq p {
  margin: 0;
  color: var(--text-soft);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.link-row a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0.46rem 0.72rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
}

.table-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.cost-tip {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--guide-gold);
  border-radius: 0 16px 16px 0;
  background: rgba(250, 204, 21, 0.1);
  font-weight: 650;
}

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

.addon-grid article,
.quote-card,
.related-card {
  border: 1px solid var(--guide-line);
  border-radius: 18px;
  background: var(--guide-panel);
  box-shadow: var(--shadow-soft);
}

.addon-grid article {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
}

.addon-grid strong {
  font-family: var(--font-heading);
}

.addon-grid span {
  color: var(--guide-gold);
  font-weight: 900;
}

.addon-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

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

.quote-card {
  padding: 1.1rem;
}

.quote-card h3 {
  margin-top: 0;
}

.quote-card ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.1rem;
}

.quote-card:not(.warning) li::marker {
  color: var(--guide-green);
}

.quote-card.warning li::marker {
  color: var(--guide-red);
}

.guide-faq {
  display: grid;
  gap: 0.8rem;
}

.guide-cta {
  display: grid;
  gap: 0.9rem;
  align-items: start;
  justify-items: start;
  margin-bottom: 2rem;
  padding: 2rem;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94)),
    #0f172a;
  color: #ffffff;
  overflow: hidden;
  position: relative;
}

.guide-cta::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transform: rotate(-16deg);
}

.guide-cta h2 {
  margin: 0;
  max-width: 700px;
  font-family: var(--font-heading);
  font-size: 2.3rem;
  line-height: 1.08;
}

.guide-cta p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.guide-cta > * {
  position: relative;
  z-index: 1;
}

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

.related-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.1rem;
}

.related-card span {
  color: var(--brand);
  font-weight: 900;
}

.related-card h3,
.related-card p {
  margin: 0;
}

.related-card a {
  margin-top: 0.2rem;
  color: var(--brand);
  font-weight: 850;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .addon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .cost-hero h1 {
    font-size: 3.35rem;
  }

  .quick-head,
  .table-pair,
  .quote-grid {
    grid-template-columns: 1fr;
  }

  .quick-head {
    display: grid;
  }
}

@media (max-width: 720px) {
  .cost-hero {
    padding: 2rem 0 1.4rem;
  }

  .cost-hero h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .cost-subtitle {
    font-size: 1rem;
  }

  .quick-reference,
  .guide-cta {
    border-radius: 18px;
    padding: 1rem;
  }

  .quick-head h2 {
    font-size: 1.02rem;
    line-height: 1.18;
  }

  .quick-reference .cost-button {
    display: block;
    min-height: 44px;
    padding: 0.68rem 0.82rem;
    border-radius: 18px;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
  }

  .quick-metrics,
  .addon-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .cost-guide-page .section {
    padding: 1.7rem 0 2.6rem;
  }

  .cost-guide-page .section-heading h2 {
    font-size: 2rem;
  }

  .factor-grid {
    grid-template-columns: 1fr;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .factor-card {
    min-height: 0;
  }

  .cost-button {
    width: 100%;
  }

  .cost-table {
    min-width: 560px;
  }

  .cost-table th,
  .cost-table td {
    padding: 0.78rem 0.8rem;
  }
}
