:root {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --page: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #e8f4ed;
  --ink: #13251d;
  --muted: #5c6c63;
  --line: #d5dfd9;
  --line-strong: #9caf9f;
  --accent: #08783f;
  --accent-strong: #055d31;
  --accent-contrast: #ffffff;
  --secondary: #145da0;
  --highlight: #d9f3e4;
  --warning: #a94e16;
  --shadow: 0 12px 32px rgba(19, 37, 29, 0.12);
  --content: 1180px;
}

html[data-design="ledger"] {
  --font-display: Georgia, "Times New Roman", serif;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f1e7;
  --ink: #191919;
  --muted: #5e5e5e;
  --line: #b8b8b8;
  --line-strong: #191919;
  --accent: #b3342d;
  --accent-strong: #8e241f;
  --accent-contrast: #ffffff;
  --secondary: #12634a;
  --highlight: #f6e49b;
  --warning: #a84a17;
  --shadow: 0 12px 30px rgba(25, 25, 25, 0.14);
}

html[data-design="compass"] {
  --page: #edf6f8;
  --surface: #ffffff;
  --surface-soft: #dff2ef;
  --ink: #17324d;
  --muted: #5a7280;
  --line: #bfd5db;
  --line-strong: #6b98a4;
  --accent: #087c73;
  --accent-strong: #055f58;
  --accent-contrast: #ffffff;
  --secondary: #d94f43;
  --highlight: #ffe39a;
  --warning: #a14322;
  --shadow: 0 14px 34px rgba(23, 50, 77, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  letter-spacing: 0;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select,
input[type="range"] {
  cursor: pointer;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  background: #ffffff;
  color: #111111;
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #1b78d0;
  outline-offset: 3px;
}

/* Design review toolbar */
.lab-bar {
  position: relative;
  z-index: 300;
  border-bottom: 1px solid #30363d;
  background: #111820;
  color: #ffffff;
}

.lab-bar-inner {
  width: min(100% - 32px, var(--content));
  min-height: 62px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 20px;
}

.lab-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.lab-title strong {
  font-size: 14px;
}

.lab-title span {
  color: #aeb9c4;
  font-size: 12px;
}

.design-switcher {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #48515b;
  background: #202933;
}

.design-switcher button {
  min-width: 104px;
  min-height: 44px;
  border: 0;
  border-right: 1px solid #48515b;
  background: transparent;
  color: #dfe7ee;
  padding: 5px 14px;
  text-align: left;
}

.design-switcher button:last-child {
  border-right: 0;
}

.design-switcher button[aria-pressed="true"] {
  background: #ffffff;
  color: #111820;
}

.design-switcher span,
.design-switcher small {
  display: block;
}

.design-switcher span {
  font-size: 13px;
  font-weight: 800;
}

.design-switcher small {
  font-size: 10px;
  text-transform: uppercase;
}

.lab-exit {
  justify-self: end;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

/* Site shell */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: min(100% - 40px, var(--content));
  min-height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
}

.brand img {
  width: 245px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.site-menu-button span {
  width: 20px;
  height: 2px;
  background: currentColor;
}

.trust-strip {
  min-height: 58px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 10px 20px;
}

.trust-strip > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.trust-strip > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.trust-strip img {
  width: auto;
  height: 22px;
  max-width: 104px;
  opacity: 0.72;
}

/* Intro and provenance */
.intro {
  width: min(100% - 40px, var(--content));
  min-height: 226px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  align-items: center;
  gap: 60px;
  padding: 40px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.06;
  letter-spacing: 0;
}

.intro-copy > p:last-child {
  max-width: 650px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.market-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.market-summary > div {
  min-height: 112px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.market-summary > div:last-child {
  border-right: 0;
}

.market-summary strong,
.market-summary span {
  display: block;
}

.market-summary strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1;
}

.market-summary span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.provenance {
  width: 100%;
  min-height: 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 12px max(20px, calc((100% - var(--content)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.provenance p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.provenance p:nth-child(2) {
  text-align: center;
}

.provenance p:last-child {
  text-align: right;
}

/* Shared comparison workspace */
.workspace {
  width: min(100% - 40px, var(--content));
  margin: 42px auto 72px;
}

.filters {
  margin-bottom: 24px;
  border-top: 2px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) minmax(330px, 2fr) 160px 180px;
  align-items: end;
  gap: 12px;
}

.filters-heading {
  align-self: center;
}

.filters-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
}

.filters-heading button,
.results-actions button,
.compare-dock button,
.detail-button,
.comparison-remove {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filters-heading button {
  margin-top: 5px;
  padding: 0;
}

.search-field,
.select-field,
.price-field,
.sort-field {
  display: block;
  min-width: 0;
}

.search-field > span,
.select-field > span,
.price-field > span:first-child,
.sort-field > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input,
.select-field select,
.sort-field select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  padding: 0 11px;
  font-size: 14px;
}

.category-filter {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.category-filter legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.category-options {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-options button {
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-right: 0;
  background: var(--surface);
  color: var(--muted);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 700;
}

.category-options button:last-child {
  border-right: 1px solid var(--line-strong);
}

.category-options button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}

.category-options button span {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  opacity: 0.75;
}

.price-field output {
  color: var(--ink);
}

.price-field input {
  width: 100%;
  accent-color: var(--accent);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.results-toolbar {
  min-height: 82px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line-strong);
}

.results-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.results-toolbar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
}

.results-toolbar h2 + p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.results-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.filter-toggle {
  display: none;
  height: 42px;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  padding: 0 15px;
  color: var(--ink) !important;
  text-decoration: none !important;
}

.sort-field {
  width: 210px;
}

.result-columns {
  display: grid;
  grid-template-columns: 42px minmax(210px, 2fr) 105px 105px 120px 120px 150px;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-results > li {
  margin: 0;
  padding: 0;
}

.loading-state,
.empty-state,
.error-state,
.noscript-note {
  padding: 42px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.plan-card {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: 42px minmax(210px, 2fr) 105px 105px 120px 120px 230px;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 16px 14px;
}

.plan-card:hover {
  background: color-mix(in srgb, var(--surface-soft) 42%, var(--surface));
}

.compare-choice {
  width: 38px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.plan-rank {
  display: none;
}

.plan-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.carrier-logo-wrap {
  width: 72px;
  height: 48px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
}

.carrier-logo {
  width: auto;
  height: auto;
  max-width: 58px;
  max-height: 30px;
  object-fit: contain;
}

.carrier-initials {
  color: #243341;
  font-size: 15px;
  font-weight: 900;
}

.carrier-name {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
}

.plan-tags {
  min-height: 19px;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.plan-tag {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-tag.requirement {
  border-color: color-mix(in srgb, var(--warning) 45%, var(--line));
  color: var(--warning);
}

.plan-price strong,
.plan-price span,
.plan-fact strong,
.plan-fact span {
  display: block;
}

.plan-price strong {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
}

.plan-price span,
.plan-fact span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.plan-fact strong {
  font-size: 13px;
  line-height: 1.25;
}

.plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.detail-button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.carrier-link {
  min-width: 78px;
  min-height: 38px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.carrier-link:hover {
  background: var(--accent-strong);
  color: var(--accent-contrast);
}

.plan-detail {
  grid-column: 1 / -1;
  margin: 2px -14px -16px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 20px 56px;
}

.plan-detail[hidden] {
  display: none;
}

.detail-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.detail-facts div {
  min-width: 0;
}

.detail-facts dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-facts dd {
  margin: 0;
  font-size: 13px;
}

.detail-features {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.detail-opinion {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.detail-opinion-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-opinion h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
}

.detail-opinion > p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.detail-review-link {
  min-height: 38px;
  border-bottom: 1px solid currentColor;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.decision-note {
  width: 100%;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 46px max(20px, calc((100% - var(--content)) / 2));
}

.decision-note h2 {
  max-width: 700px;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 25px;
}

.decision-note > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.decision-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.decision-note strong {
  color: var(--ink);
}

/* Compare controls */
.compare-dock {
  position: fixed;
  z-index: 250;
  right: 24px;
  bottom: 24px;
  width: 360px;
  min-height: 78px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compare-dock[hidden] {
  display: none;
}

.compare-dock p {
  margin: 0;
}

.compare-dock strong,
.compare-dock span {
  display: block;
}

.compare-dock strong {
  font-size: 13px;
}

.compare-dock span {
  color: var(--muted);
  font-size: 10px;
}

.compare-dock > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-dock button {
  min-height: 38px;
  padding: 0 12px;
}

#openCompare {
  min-width: 92px;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
}

#openCompare:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.compare-dialog {
  width: min(100% - 32px, 1040px);
  max-height: calc(100vh - 48px);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow);
}

.compare-dialog::backdrop {
  background: rgba(10, 18, 24, 0.68);
}

.dialog-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 82px;
  border-bottom: 2px solid var(--line-strong);
  background: var(--surface);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-heading p,
.dialog-heading h2 {
  margin: 0;
}

.dialog-heading p {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-heading h2 {
  font-family: var(--font-display);
  font-size: 24px;
}

.dialog-heading button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 27px;
  line-height: 1;
}

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

.comparison-plan {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 24px;
}

.comparison-plan:last-child {
  border-right: 0;
}

.comparison-plan .carrier-logo-wrap {
  margin-bottom: 16px;
}

.comparison-plan h3 {
  min-height: 48px;
  margin: 3px 0 18px;
  font-family: var(--font-display);
  font-size: 20px;
}

.comparison-plan .plan-price {
  margin-bottom: 22px;
}

.comparison-facts {
  margin: 0 0 22px;
}

.comparison-facts div {
  min-height: 58px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.comparison-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-facts dd {
  margin: 3px 0 0;
  font-size: 13px;
}

.comparison-plan .carrier-link {
  width: 100%;
}

.comparison-remove {
  margin-top: 12px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line-strong);
  background: var(--surface);
}

.site-footer-inner {
  width: min(100% - 40px, var(--content));
  min-height: 190px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px 50px;
}

.site-footer img {
  width: 205px;
  height: auto;
}

.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
}

.site-footer nav a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.site-footer-inner > p {
  grid-column: 1 / -1;
  margin: -38px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Ledger: editorial evidence system */
html[data-design="ledger"] .site-header-inner {
  min-height: 118px;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 18px 0 12px;
}

html[data-design="ledger"] .brand img {
  width: 272px;
}

html[data-design="ledger"] .site-nav {
  width: 100%;
  border-top: 1px solid var(--line-strong);
  padding-top: 11px;
  justify-content: center;
}

html[data-design="ledger"] .site-nav a {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

html[data-design="ledger"] .trust-strip {
  background: #f8f8f5;
}

html[data-design="ledger"] .intro {
  min-height: 260px;
  grid-template-columns: minmax(0, 1fr) 390px;
  border-bottom: 1px solid var(--line-strong);
}

html[data-design="ledger"] .intro h1 {
  max-width: 720px;
  font-size: 52px;
  font-weight: 400;
}

html[data-design="ledger"] .market-summary {
  border: 1px solid var(--line-strong);
  background: var(--highlight);
}

html[data-design="ledger"] .market-summary strong {
  color: var(--ink);
  font-weight: 400;
}

html[data-design="ledger"] .provenance {
  background: #ffffff;
}

html[data-design="ledger"] .filters {
  border: 1px solid var(--line-strong);
  box-shadow: 5px 5px 0 var(--highlight);
}

html[data-design="ledger"] .category-options button[aria-pressed="true"] {
  background: var(--ink);
  color: #ffffff;
}

html[data-design="ledger"] .results-toolbar {
  border-bottom-width: 4px;
}

html[data-design="ledger"] .results-toolbar h2 {
  font-size: 32px;
  font-weight: 400;
}

html[data-design="ledger"] .result-columns {
  grid-template-columns: 64px minmax(210px, 2fr) 105px 105px 120px 120px 150px;
  background: #f4f4ef;
}

html[data-design="ledger"] .plan-card {
  grid-template-columns: 64px minmax(210px, 2fr) 105px 105px 120px 120px 150px;
  min-height: 126px;
}

html[data-design="ledger"] .compare-choice {
  position: absolute;
  left: 30px;
  bottom: 14px;
  width: 22px;
  min-height: 22px;
}

html[data-design="ledger"] .plan-rank {
  display: block;
  align-self: start;
  padding-top: 7px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

html[data-design="ledger"] .carrier-logo-wrap {
  border: 0;
  padding: 0;
  justify-content: flex-start;
}

html[data-design="ledger"] .plan-name {
  font-size: 20px;
  font-weight: 400;
}

html[data-design="ledger"] .carrier-link {
  background: var(--ink);
  border-color: var(--ink);
}

html[data-design="ledger"] .plan-tag {
  border-color: var(--ink);
}

html[data-design="ledger"] .decision-note {
  border-top: 4px solid var(--ink);
  background: #f5f1e7;
}

/* Compass: guided shopping system */
html[data-design="compass"] .site-header {
  border-bottom: 4px solid #f4c34c;
}

html[data-design="compass"] .site-header-inner {
  min-height: 86px;
}

html[data-design="compass"] .brand img {
  width: 258px;
}

html[data-design="compass"] .site-nav a[aria-current="page"] {
  border-bottom: 3px solid var(--secondary);
  padding-bottom: 5px;
}

html[data-design="compass"] .intro {
  width: 100%;
  max-width: none;
  min-height: 236px;
  padding: 40px max(20px, calc((100% - var(--content)) / 2));
  background: var(--surface-soft);
}

html[data-design="compass"] .intro h1 {
  font-size: 43px;
}

html[data-design="compass"] .market-summary {
  border: 0;
  background: var(--surface);
  box-shadow: 7px 7px 0 #f4c34c;
}

html[data-design="compass"] .market-summary > div {
  min-height: 118px;
}

html[data-design="compass"] .provenance {
  background: #17324d;
}

html[data-design="compass"] .provenance,
html[data-design="compass"] .provenance a,
html[data-design="compass"] .provenance p {
  color: #ffffff;
}

html[data-design="compass"] .workspace {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

html[data-design="compass"] .filters {
  position: sticky;
  top: 18px;
  margin: 0;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 6px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

html[data-design="compass"] .filters-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

html[data-design="compass"] .filters-heading button {
  margin: 0;
}

html[data-design="compass"] .category-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow: visible;
}

html[data-design="compass"] .category-options button,
html[data-design="compass"] .category-options button:last-child {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 7px;
  text-align: left;
}

html[data-design="compass"] .category-options button span {
  display: block;
  margin: 1px 0 0;
}

html[data-design="compass"] .category-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
}

html[data-design="compass"] .results-toolbar {
  padding-top: 0;
}

html[data-design="compass"] .result-columns {
  display: none;
}

html[data-design="compass"] .plan-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 16px;
}

html[data-design="compass"] .loading-state,
html[data-design="compass"] .empty-state,
html[data-design="compass"] .error-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: var(--surface);
}

html[data-design="compass"] .plan-card {
  min-height: 356px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(80px, auto);
  grid-template-rows: auto auto auto auto;
  align-items: start;
  gap: 16px 12px;
}

html[data-design="compass"] .plan-card:hover {
  border-color: var(--accent);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 18%, transparent);
}

html[data-design="compass"] .compare-choice {
  grid-column: 1;
  grid-row: 1;
  width: 28px;
  min-height: 44px;
}

html[data-design="compass"] .plan-rank {
  display: none;
}

html[data-design="compass"] .plan-identity {
  grid-column: 2 / -1;
  grid-row: 1;
  grid-template-columns: 62px minmax(0, 1fr);
}

html[data-design="compass"] .carrier-logo-wrap {
  width: 62px;
  height: 48px;
  border-radius: 4px;
}

html[data-design="compass"] .plan-name {
  font-size: 18px;
}

html[data-design="compass"] .plan-price {
  grid-column: 1 / 3;
  grid-row: 2;
  padding: 14px;
  border-radius: 4px;
  background: var(--highlight);
}

html[data-design="compass"] .plan-price strong {
  font-size: 32px;
}

html[data-design="compass"] .plan-data {
  grid-column: 3;
  grid-row: 2;
  align-self: stretch;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

html[data-design="compass"] .plan-network {
  grid-column: 1 / 3;
  grid-row: 3;
}

html[data-design="compass"] .plan-hotspot {
  grid-column: 3;
  grid-row: 3;
}

html[data-design="compass"] .plan-actions {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: end;
  justify-content: stretch;
}

html[data-design="compass"] .detail-button,
html[data-design="compass"] .carrier-link {
  flex: 1 1 0;
}

html[data-design="compass"] .detail-button {
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
}

html[data-design="compass"] .carrier-link {
  border-radius: 4px;
}

html[data-design="compass"] .plan-detail {
  grid-column: 1 / -1;
  grid-row: 5;
  margin: 0 -18px -18px;
  border-radius: 0 0 6px 6px;
  padding: 18px;
}

html[data-design="compass"] .detail-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-design="compass"] .decision-note {
  border-top: 5px solid #f4c34c;
}

/* Responsive */
@media (max-width: 1120px) {
  .filters {
    grid-template-columns: 150px minmax(190px, 1fr) minmax(390px, 2fr);
  }

  .select-field,
  .price-field {
    grid-column: span 1;
  }

  .price-field {
    grid-column: 2 / -1;
  }

  .result-columns,
  .plan-card {
    grid-template-columns: 42px minmax(190px, 2fr) 95px 95px 110px 210px;
  }

  .result-columns > span:nth-child(6),
  .plan-hotspot {
    display: none;
  }

  html[data-design="ledger"] .result-columns,
  html[data-design="ledger"] .plan-card {
    grid-template-columns: 64px minmax(190px, 2fr) 95px 95px 110px 210px;
  }

  html[data-design="compass"] .plan-hotspot {
    display: block;
  }
}

@media (max-width: 900px) {
  .lab-title span,
  .lab-exit {
    display: none;
  }

  .lab-bar-inner {
    grid-template-columns: auto 1fr;
  }

  .design-switcher {
    justify-self: end;
  }

  .site-header-inner {
    min-height: 70px;
  }

  .brand img,
  html[data-design="ledger"] .brand img,
  html[data-design="compass"] .brand img {
    width: 215px;
  }

  .site-menu-button {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 14px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  html[data-design="ledger"] .site-nav a {
    min-height: 44px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-sans);
    font-size: 14px;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  html[data-design="ledger"] .site-header-inner {
    min-height: 70px;
    flex-direction: row;
    justify-content: space-between;
    padding: 0;
  }

  html[data-design="ledger"] .site-nav {
    padding-top: 14px;
  }

  .trust-strip {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .trust-strip > div {
    min-width: 650px;
  }

  .intro,
  html[data-design="ledger"] .intro {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  html[data-design="ledger"] .intro h1 {
    font-size: 45px;
  }

  .provenance {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .provenance p:nth-child(2),
  .provenance p:last-child {
    text-align: left;
  }

  .filters {
    display: none;
    grid-template-columns: 1fr 1fr;
  }

  .filters.is-open {
    display: grid;
  }

  .filters-heading,
  .category-filter,
  .price-field {
    grid-column: 1 / -1;
  }

  .filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .result-columns {
    display: none;
  }

  .plan-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 16px;
  }

  .loading-state,
  .empty-state,
  .error-state {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .plan-card,
  html[data-design="ledger"] .plan-card {
    min-height: 340px;
    height: 100%;
    border: 1px solid var(--line);
    padding: 16px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(76px, auto);
    grid-template-rows: auto auto auto auto;
    align-items: start;
    gap: 14px 10px;
  }

  .compare-choice,
  html[data-design="ledger"] .compare-choice {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 28px;
    min-height: 42px;
  }

  .plan-rank,
  html[data-design="ledger"] .plan-rank {
    display: none;
  }

  .plan-identity {
    grid-column: 2 / -1;
    grid-row: 1;
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .carrier-logo-wrap {
    width: 62px;
  }

  .plan-price {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .plan-data {
    grid-column: 3;
    grid-row: 2;
  }

  .plan-network {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .plan-hotspot {
    display: block;
    grid-column: 3;
    grid-row: 3;
  }

  .plan-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    align-self: end;
  }

  .plan-detail,
  html[data-design="ledger"] .plan-detail {
    grid-column: 1 / -1;
    grid-row: 5;
    margin: 0 -16px -16px;
    padding: 16px;
  }

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

  .detail-opinion {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-review-link {
    justify-self: start;
  }

  html[data-design="compass"] .workspace {
    display: block;
  }

  html[data-design="compass"] .filters {
    position: static;
    display: none;
    margin-bottom: 22px;
  }

  html[data-design="compass"] .filters.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  html[data-design="compass"] .category-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .decision-note > div {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .plan-results,
  html[data-design="compass"] .plan-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lab-bar-inner {
    width: 100%;
    min-height: 74px;
    padding: 8px 12px;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .lab-title {
    display: none;
  }

  .design-switcher {
    width: 100%;
    justify-self: stretch;
  }

  .design-switcher button {
    min-width: 0;
    text-align: center;
  }

  .site-header-inner {
    width: calc(100% - 28px);
    min-height: 64px;
  }

  .brand img,
  html[data-design="ledger"] .brand img,
  html[data-design="compass"] .brand img {
    width: 198px;
  }

  .trust-strip {
    min-height: 48px;
    gap: 16px;
    padding: 8px 14px;
  }

  .trust-strip > div {
    min-width: 560px;
    gap: 20px;
  }

  .trust-strip img {
    height: 18px;
  }

  .intro,
  html[data-design="ledger"] .intro,
  html[data-design="compass"] .intro {
    width: 100%;
    min-height: 0;
    padding: 32px 18px;
  }

  .intro h1,
  html[data-design="ledger"] .intro h1,
  html[data-design="compass"] .intro h1 {
    font-size: 35px;
  }

  .intro-copy > p:last-child {
    font-size: 15px;
  }

  .market-summary > div {
    min-height: 96px;
    padding: 14px 10px;
  }

  .market-summary strong {
    font-size: 25px;
  }

  .market-summary span {
    font-size: 9px;
  }

  .provenance {
    padding: 14px 18px;
  }

  .workspace {
    width: calc(100% - 28px);
    margin: 28px auto 54px;
  }

  .filters,
  .filters.is-open,
  html[data-design="compass"] .filters.is-open {
    grid-template-columns: 1fr;
  }

  .filters > *,
  html[data-design="compass"] .filters > * {
    grid-column: 1;
  }

  .category-options,
  html[data-design="compass"] .category-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .category-options button,
  .category-options button:last-child {
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
  }

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-actions {
    width: 100%;
  }

  .filter-toggle {
    flex: 0 0 auto;
  }

  .sort-field {
    flex: 1 1 auto;
    width: auto;
  }

  .plan-results,
  html[data-design="compass"] .plan-results {
    grid-template-columns: 1fr;
  }

  .plan-card,
  html[data-design="ledger"] .plan-card,
  html[data-design="compass"] .plan-card {
    min-height: 328px;
  }

  .plan-actions {
    justify-content: stretch;
  }

  .detail-button,
  .carrier-link {
    flex: 1 1 0;
  }

  .detail-button {
    border: 1px solid var(--line);
    text-decoration: none;
  }

  .decision-note {
    padding: 36px 18px;
  }

  .compare-dock {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .compare-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .comparison-plan {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-footer-inner {
    width: calc(100% - 36px);
    padding: 34px 0;
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .site-footer-inner > p {
    grid-column: 1;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
