:root {
  --page-max: 1160px;
  --bg: #f7f3ee;
  --bg-soft: #fbf8f4;
  --surface: #ffffff;
  --surface-muted: #fcfaf7;
  --ink: #18212a;
  --muted: #646d76;
  --soft: #8d908f;
  --border: #e8dfd6;
  --border-strong: #d7c8bd;
  --accent: #c66b49;
  --accent-strong: #b25a39;
  --accent-soft: #f5e5de;
  --shadow-sm: 0 8px 22px rgba(24, 33, 42, 0.04);
  --shadow-md: 0 18px 40px rgba(24, 33, 42, 0.06);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(180deg, #f8f4ef 0%, #f3eee7 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(var(--page-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.page-shell--compact {
  padding-top: 14px;
}

.topbar,
.hero-band,
.picker-layout,
.results-shell,
.seo-section,
.compare-header-strip,
.compare-toolbar,
.compare-catalog,
.compare-panel {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark__asset {
  display: block;
  width: auto;
  height: 48px;
  max-width: min(100%, 280px);
}

.brand-mark__text strong {
  display: block;
  font-size: 0.98rem;
}

.brand-mark__text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.topnav a,
.topnav__button {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.topnav a[aria-current="page"],
.topnav a:hover,
.topnav a:focus-visible,
.topnav__button:hover,
.topnav__button:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.topnav__button--saved {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topnav__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.site-footer {
  margin-top: 18px;
  padding: 34px 0 22px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(251, 248, 244, 0.92), rgba(247, 243, 238, 0.98));
}

.site-footer--bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.site-footer__inner {
  width: min(var(--page-max), calc(100% - 2rem));
  margin: 0 auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.site-footer__brand {
  max-width: 620px;
}

.brand-mark--footer {
  align-items: center;
}

.brand-mark__asset--mark {
  height: 44px;
  max-width: none;
}

.site-footer__summary,
.site-footer__context {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer__summary {
  color: var(--ink);
  font-weight: 500;
}

.site-footer__nav {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 8px;
}

.site-footer__heading {
  margin: 0;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer__nav a {
  color: var(--muted);
}

.site-footer__nav a[aria-current="page"],
.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
  color: var(--ink);
}

.site-footer__bottom {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.site-footer__fineprint {
  margin: 0;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.footer-seo {
  margin-top: 0;
  padding: 26px 0 0;
  background: transparent;
}

.footer-seo--bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.footer-seo__inner {
  width: min(var(--page-max), calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 6px;
}

.footer-seo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 18px;
  padding: 18px 0 0;
}

.footer-seo__copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.footer-seo__copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 74ch;
}

.footer-seo__links {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 2px;
}

.footer-seo__links h3 {
  margin: 0;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-seo__links a {
  color: var(--muted);
}

.footer-seo__links a:hover,
.footer-seo__links a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.hero-band,
.picker-layout,
.results-shell,
.seo-section,
.compare-header-strip,
.compare-toolbar,
.compare-catalog,
.compare-panel,
.wizard-card,
.result-panel,
.metric-card,
.summary-card,
.alternative-card,
.profile-card,
.compare-card,
.toolbar-panel,
.compare-table,
.selection-tray,
.notice,
.saved-sheet,
.saved-sheet__card,
.blank-state,
.option-card,
.dimension-slider-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.hero-band,
.seo-section,
.compare-header-strip,
.compare-toolbar,
.compare-catalog,
.compare-panel,
.results-shell {
  margin-top: 12px;
}

.hero-band,
.seo-section,
.compare-header-strip,
.compare-catalog,
.compare-panel,
.results-shell {
  padding: 22px;
}

.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-band h1,
.compare-header-strip h1,
.results-title,
.step-title {
  margin: 8px 0 0;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero-band h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.compare-header-strip h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

.hero-band__copy {
  max-width: 680px;
}

.hero-band__text,
.compare-header-strip__text,
.step-description,
.results-intro,
.section-copy,
.seo-card p,
.card-copy,
.wizard-footnote,
.insight-block p,
.profile-card p,
.compare-card p,
.summary-card p,
.metric-card p,
.option-card p,
.alternative-card p,
.blank-state p,
.saved-sheet__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-band__text,
.compare-header-strip__text {
  margin-top: 10px;
  max-width: 58ch;
}

.seo-section__lead {
  max-width: 72ch;
}

.seo-grid,
.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

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

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

.faq-list {
  grid-template-columns: 1fr;
}

.seo-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.seo-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.seo-card p {
  margin-top: 10px;
}

.seo-card--inline {
  margin-top: 14px;
}

.seo-section--compact {
  padding-top: 18px;
  padding-bottom: 18px;
}

.text-link {
  color: var(--accent-strong);
  font-weight: 600;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

/* Guide Page & Blog Redesign */
.seo-section--blog {
  padding-top: 32px;
  padding-bottom: 64px;
}

.guide-article {
  max-width: 100%;
}

.guide-hero {
  max-width: 78ch;
  margin: 0 auto 48px;
  text-align: center;
}

.guide-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.guide-hero__author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
}

.guide-hero__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.guide-hero__title {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
}

.guide-hero__description {
  margin: 16px auto 0;
  max-width: 65ch;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--muted);
}

.guide-content {
  max-width: 68ch; /* Ideal reading width */
  margin: 0 auto;
  font-size: 1.125rem; /* 18px */
  line-height: 1.8;
  color: #334155; /* Slightly softer than pure ink for long reading */
}

.guide-content h2 {
  margin: 48px 0 24px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.guide-content h3 {
  margin: 32px 0 16px;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--ink);
}

.guide-content p {
  margin: 0 0 24px;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 24px;
  padding-left: 1.5rem;
}

.guide-content li + li {
  margin-top: 12px;
}

.guide-content a {
  color: var(--accent-strong);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 140ms ease, color 140ms ease;
}

.guide-content a:hover,
.guide-content a:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.guide-content hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.guide-content blockquote {
  margin: 32px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink);
}

.guide-content blockquote p:last-child {
  margin-bottom: 0;
}

.guide-content pre {
  margin: 32px 0;
  padding: 24px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.guide-content code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-strong);
}

.guide-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Blog Grid & Cards */
.blog-grid {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--soft);
}

.blog-card__tag {
  color: var(--accent-strong);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card__title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.blog-card__link {
  color: var(--ink);
  text-decoration: none;
}

.blog-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.blog-card__excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  flex-grow: 1;
}

.guide-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-breadcrumb a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.guide-breadcrumb a:hover,
.guide-breadcrumb a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.hero-band__actions,
.compare-header-strip__meta,
.results-actions,
.step-actions,
.compare-actions,
.saved-sheet__actions,
.selection-summary,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-band__actions {
  align-items: center;
  justify-content: flex-end;
}

.compare-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compare-header-strip__meta {
  align-items: center;
  justify-content: flex-end;
}

.eyebrow,
.metric-label,
.profile-kicker,
.leader-kicker,
.insight-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.inline-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-tooltip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--soft);
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.info-tooltip__trigger:hover,
.info-tooltip__trigger:focus-visible {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--bg-soft);
}

.info-tooltip__content {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--muted);
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

.info-tooltip:hover .info-tooltip__content,
.info-tooltip:focus-within .info-tooltip__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.button,
.button-inline,
.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.button:hover,
.button:focus-visible,
.button-inline:hover,
.button-inline:focus-visible,
.toggle-button:hover,
.toggle-button:focus-visible {
  transform: translateY(-1px);
}

.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button--primary:hover,
.button--primary:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button--ghost,
.button-inline,
.toggle-button {
  background: #fff;
}

.button--ghost:hover,
.button-inline:hover,
.toggle-button:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
}

.button--skip {
  color: var(--soft);
}

.button--danger {
  border-color: #e8c4b6;
  color: #a55338;
}

.toggle-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.pill--accent,
.status-chip {
  border-color: #e6c4b6;
  background: var(--accent-soft);
}

.pill--muted {
  color: var(--soft);
  background: #fff;
}

.pill-row--wrap {
  margin-top: 14px;
}

.notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.picker-layout {
  display: block;
  margin-top: 12px;
}

.picker-layout__main {
  min-width: 0;
}

.wizard-card {
  padding: 22px;
}

.wizard-card {
  box-shadow: none;
}

.wizard-card--question {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  min-height: 720px;
}

.wizard-topline,
.wizard-header,
.results-header,
.section-heading,
.catalog-header,
.saved-sheet__header,
.saved-sheet__card-top,
.profile-card__top,
.compare-card__top,
.alternative-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wizard-header,
.results-header {
  margin-top: 12px;
}

.wizard-header--compact {
  align-items: flex-start;
}

.wizard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.step-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.step-description {
  margin-top: 10px;
  max-width: 56ch;
}

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-width: 0;
  justify-content: center;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 600;
}

.step-dot.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.step-dot.is-complete {
  border-color: var(--border-strong);
  color: var(--ink);
}

.option-grid,
.summary-grid,
.results-grid,
.alternatives-grid,
.compare-grid,
.compare-profile-grid,
.dimension-slider-grid {
  display: grid;
  gap: 14px;
}

.option-grid {
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
  align-content: start;
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 150px;
  padding: 16px;
  border-radius: var(--radius-lg);
  text-align: left;
  box-shadow: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.option-card:hover,
.option-card:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.option-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-card__top {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.option-card__top h3,
.summary-card h3,
.result-panel h3,
.alternative-card h3,
.profile-card h3,
.compare-card h3,
.saved-sheet__card h3,
.blank-state h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.option-card p {
  margin-top: 8px;
}

.option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.wizard-footnote {
  display: inline-flex;
  align-items: center;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.step-actions {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  margin-top: 18px;
  align-items: center;
  gap: 16px;
}

.step-actions__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.step-actions__group:last-child {
  justify-content: flex-end;
}

.summary-grid {
  margin-top: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid--tight {
  gap: 12px;
}

.summary-card,
.metric-card,
.result-panel,
.alternative-card,
.profile-card,
.compare-card,
.dimension-slider-card,
.saved-sheet__card {
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.summary-card h3,
.metric-card .metric-value {
  margin-top: 8px;
}

.summary-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-card__top .metric-label {
  margin: 0;
}

.info-tooltip--compact .info-tooltip__trigger {
  width: 26px;
  height: 26px;
  border-color: transparent;
  background: var(--bg-soft);
  color: var(--soft);
}

.info-tooltip--compact .info-tooltip__trigger:hover,
.info-tooltip--compact .info-tooltip__trigger:focus-visible {
  border-color: var(--border);
  background: #fff;
}

.info-tooltip--compact .info-tooltip__content {
  left: auto;
  right: 0;
  width: min(220px, 70vw);
}

.metric-card {
  background: var(--surface-muted);
}

.metric-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.metric-value--small {
  font-size: 1rem;
}

.tuning-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.review-lock {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.review-lock p {
  margin: 8px 0 0;
  color: var(--muted);
}

.review-summary {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.review-summary__header p {
  margin-top: 8px;
}

.review-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.review-summary-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.review-summary-item strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.review-summary-item.is-skipped {
  background: var(--bg-soft);
}

.review-summary-item.is-skipped strong {
  color: var(--soft);
}

.tuning-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  list-style: none;
  cursor: pointer;
}

.tuning-panel summary::-webkit-details-marker {
  display: none;
}

.tuning-panel summary strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.3;
}

.tuning-panel__hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tuning-panel__status {
  display: inline-flex;
  align-items: center;
}

.tuning-panel__chevron {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.tuning-panel[open] .tuning-panel__chevron {
  transform: rotate(225deg);
}

.tuning-body {
  padding: 0 16px 16px;
}

.tuning-guide {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.tuning-guide__caption {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.tuning-guide__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3eee7 0%, #fff 50%, #f5e5de 100%);
}

.tuning-guide__track span {
  position: relative;
  text-align: center;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tuning-guide__track span::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: var(--accent);
}

.tuning-group + .tuning-group {
  margin-top: 18px;
}

.tuning-guide + .tuning-group {
  margin-top: 18px;
}

.dimension-slider-grid {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dimension-slider-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dimension-slider-card h4 {
  margin: 0;
  font-size: 0.98rem;
}

.dimension-slider-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

input[type="range"] {
  width: 100%;
  margin-top: 14px;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--accent) 0%,
      var(--accent) var(--fill, 0%),
      #eadfd7 var(--fill, 0%),
      #eadfd7 100%
    );
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 4px 10px rgba(24, 33, 42, 0.12);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 4px 10px rgba(24, 33, 42, 0.12);
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.results-shell {
  padding: 22px;
}

.results-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.results-intro {
  margin-top: 10px;
  max-width: 46ch;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.results-actions__secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.result-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-muted);
}

.result-strip__main {
  display: grid;
  align-content: start;
}

.result-strip__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.result-fact {
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}

.result-fact strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.result-strip__graph {
  display: grid;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.result-strip__graph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leader-name {
  margin: 8px 0 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.results-nudges {
  margin-top: 12px;
}

.suggested-architecture {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-muted);
}

.architecture-title {
  margin: 0 0 14px 0;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}

.architecture-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.architecture-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 120px;
}

.architecture-node__system {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.architecture-node__role {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.architecture-arrow {
  color: var(--soft);
  font-size: 1.2rem;
  font-weight: bold;
}

.results-subnav {
  position: sticky;
  top: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.results-subnav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition:
    background 140ms ease,
    color 140ms ease;
}

.results-subnav button:hover,
.results-subnav button:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.results-subnav button.is-active {
  background: var(--accent);
  color: #fff;
}

.results-grid {
  margin-top: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.results-grid--group {
  min-height: 420px;
  align-content: start;
}

.result-panel {
  grid-column: span 6;
}

.result-panel--wide {
  grid-column: span 7;
}

.result-panel--narrow {
  grid-column: span 5;
}

.result-panel--full {
  grid-column: span 12;
}

.signal-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.rationale-list {
  margin: 14px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.rationale-list li + li {
  margin-top: 10px;
}

.rationale-list li {
  line-height: 1.6;
}

.signal-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.signal-card__top,
.signal-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signal-card__top {
  align-items: flex-start;
}

.signal-card__top strong {
  font-size: 1rem;
  line-height: 1.3;
}

.signal-card__label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.signal-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.signal-bar {
  position: relative;
  overflow: hidden;
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  background: #eadfd7;
}

.signal-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.signal-bar--fit span,
.signal-card--fit .signal-card__label {
  background: #f2e3d8;
}

.signal-bar--fit span {
  background: var(--accent);
}

.signal-bar--risk {
  background: #efe8e1;
}

.signal-bar--risk span {
  background: #c78a6d;
}

.signal-card--risk .signal-card__label {
  background: #f7ece5;
}

.signal-bar--priority {
  background: #ece5dd;
}

.signal-bar--priority span {
  background: linear-gradient(90deg, var(--ink) 0%, var(--accent) 100%);
}

.signal-card--priority .signal-card__label {
  background: #f1ebe5;
}

.signal-card--caveat {
  background: var(--surface-muted);
}

.radar-card {
  margin-top: 10px;
}

.radar-chart {
  display: grid;
  place-items: center;
  min-height: 250px;
}

.radar-chart svg {
  width: 100%;
  max-width: 240px;
  height: auto;
  overflow: visible;
}

.radar-grid polygon,
.radar-axes line {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.radar-axes text {
  fill: #555d66;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-anchor: middle;
}

.radar-area {
  fill: rgba(198, 107, 73, 0.16);
}

.radar-outline,
.radar-chart circle {
  fill: #d88b6766;
  stroke: var(--accent);
  stroke-width: 1.5;
}

.score-track,
.dimension-track {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #eadfd7;
}

.score-track span,
.dimension-track span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--accent);
}

.score-note {
  color: var(--soft);
  font-size: 0.86rem;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  line-height: 1.52;
}

.alternatives-section {
  margin-top: 18px;
}

.section-heading {
  align-items: center;
}

.section-heading--tight {
  margin-bottom: 12px;
}

.section-heading h3,
.catalog-header h2 {
  margin: 6px 0 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

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

.alternatives-grid--inline,
.review-summary-list--results {
  margin-top: 14px;
}

.compare-toolbar {
  padding: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.toolbar-panel {
  padding: 16px;
  box-shadow: none;
}

.toolbar-panel__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
}

.field-group {
  display: grid;
  gap: 6px;
}

.toolbar-panel input,
.toolbar-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

.compare-catalog,
.compare-panel {
  margin-top: 14px;
}

.catalog-header {
  align-items: end;
}

.catalog-header--tight {
  margin-bottom: 14px;
}

.compare-profile-grid {
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-card {
  box-shadow: none;
}

.profile-card.is-selected {
  border-color: var(--accent);
  background: #fffaf7;
}

.profile-card__footer,
.saved-sheet__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.profile-note-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-note-line {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.profile-note-line strong {
  font-size: 0.82rem;
}

.mono-note {
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.45;
}

.selection-tray {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
}

.selection-summary {
  gap: 8px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  font-weight: 600;
}

.selection-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #efe5dd;
}

.compare-grid {
  display: grid;
  gap: 14px;
}

.compare-grid--compact {
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compare-card {
  box-shadow: none;
}

.compare-table {
  padding: 16px;
  overflow-x: auto;
  box-shadow: none;
}

.compare-table--primary {
  border-color: var(--border-strong);
}

.compare-table h3 {
  margin: 0;
  font-size: 1.12rem;
}

.compare-table p {
  margin: 8px 0 0;
  color: var(--muted);
}

.compare-table table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare-score-cell {
  min-width: 170px;
}

.compare-score-cell .dimension-track {
  margin-top: 6px;
}

.empty-compare,
.blank-state {
  padding: 20px;
  border-style: dashed;
  box-shadow: none;
  text-align: center;
}

.saved-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  padding: 18px;
  background: rgba(24, 33, 42, 0.2);
  backdrop-filter: blur(6px);
}

.saved-sheet {
  width: min(460px, 100%);
  max-height: calc(100vh - 36px);
  padding: 18px;
  overflow: hidden;
  border-radius: 24px;
}

.saved-sheet__body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.saved-sheet__card-top {
  align-items: flex-start;
}

.saved-sheet__card h3 {
  margin-top: 6px;
}

.saved-sheet__actions {
  margin-top: 14px;
  justify-content: flex-start;
}

@media (max-width: 1080px) {
  .picker-layout,
  .result-strip,
  .toolbar-panel__grid,
  .compare-profile-grid,
  .compare-grid--compact,
  .seo-grid--three,
  .summary-grid,
  .results-grid,
  .radar-card {
    grid-template-columns: 1fr;
  }

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

  .result-panel,
  .result-panel--wide,
  .result-panel--narrow,
  .result-panel--full {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(var(--page-max), calc(100% - 1rem));
    padding-top: 12px;
  }

  .topbar,
  .hero-band,
  .site-footer,
  .compare-header-strip,
  .results-header,
  .section-heading,
  .catalog-header,
  .saved-sheet__header,
  .selection-tray,
  .step-actions,
  .profile-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-actions {
    display: flex;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
  }

  .brand-mark__asset {
    height: 42px;
    max-width: 220px;
  }

  .topnav a,
  .topnav__button {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero-band,
  .seo-section,
  .compare-header-strip,
  .compare-catalog,
  .compare-panel,
  .results-shell,
  .wizard-card,
  .saved-sheet {
    padding: 18px;
  }

  .hero-band__actions,
  .compare-header-strip__meta,
  .results-actions,
  .results-actions__secondary,
  .compare-actions,
  .saved-sheet__actions {
    width: 100%;
  }

  .site-footer {
    padding-top: 28px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__nav {
    width: 100%;
    padding-top: 0;
  }

  .footer-seo__grid {
    grid-template-columns: 1fr;
  }

  .button,
  .button-inline,
  .toggle-button {
    width: 100%;
  }

  .option-grid,
  .review-summary-list,
  .dimension-slider-grid,
  .alternatives-grid,
  .seo-grid--two,
  .seo-grid--three,
  .compare-profile-grid,
  .compare-grid--compact {
    grid-template-columns: 1fr;
  }

  .results-subnav {
    border-radius: var(--radius-lg);
  }

  .signal-card__top,
  .signal-card__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .selection-tray {
    align-items: stretch;
  }

  .saved-sheet-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .saved-sheet {
    width: 100%;
    max-height: 86vh;
    border-radius: 24px 24px 0 0;
  }

  .wizard-card--question {
    min-height: auto;
  }
}
