:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f0f1ed;
  --surface-3: #e9ebe5;
  --text: #1e211d;
  --muted: #676c63;
  --faint: #62685f;
  --border: #dcded8;
  --border-strong: #c7cac2;
  --accent: #a95124;
  --accent-hover: #8f411a;
  --accent-soft: #f8e9df;
  --accent-contrast: #ffffff;
  --shadow: 0 18px 55px rgba(31, 34, 29, 0.07);
  --radius: 12px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171817;
    --surface: #20211f;
    --surface-2: #272925;
    --surface-3: #2d302b;
    --text: #f1f2ed;
    --muted: #a7aba2;
    --faint: #a0a59b;
    --border: #373a35;
    --border-strong: #4a4e47;
    --accent: #e08a52;
    --accent-hover: #efa06b;
    --accent-soft: #38291f;
    --accent-contrast: #171817;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { transform: translateY(0); }
.noscript-message { padding: 12px 20px; background: var(--accent-soft); color: var(--accent); text-align: center; }

.container { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.header-inner { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark, .vendor-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}
.brand-mark { width: 30px; height: 30px; font-size: 11px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: 13px; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { background: var(--surface-2); color: var(--text); }

.hero { padding: 82px 0 60px; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); align-items: end; gap: 52px; }
.hero-copy { max-width: 780px; }
.eyebrow, .section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero h1 { margin: 0; max-width: 760px; font-size: clamp(34px, 5vw, 58px); line-height: 1.13; letter-spacing: -0.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 660px; margin: 18px 0 0; color: var(--muted); font-size: 16px; }
.updated-line { display: block; margin-top: 20px; color: var(--faint); font-size: 12px; }
.updated-line strong { color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); box-shadow: var(--shadow); }
.stat { display: flex; min-height: 94px; flex-direction: column; align-items: center; justify-content: center; background: var(--surface); }
.stat strong { font-size: 25px; line-height: 1.1; letter-spacing: -0.03em; }
.stat span { margin-top: 6px; color: var(--muted); font-size: 12px; }

.section { padding-top: 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 32px); line-height: 1.25; letter-spacing: -0.025em; }
.section-heading > p { max-width: 460px; margin: 0; color: var(--muted); text-align: right; }
.compact-heading { margin-bottom: 14px; }

.recommendation-tabs { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.recommendation-tab, .segment-button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
}
.recommendation-tab { padding: 7px 13px; }
.recommendation-tab.is-active, .segment-button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 5px rgba(0, 0, 0, .08); }
.recommendation-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recommendation-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.recommendation-rank { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.recommendation-card a { font-size: 16px; font-weight: 700; text-decoration: none; }
.recommendation-card a:hover { color: var(--accent); }
.rating { margin-left: 9px; color: var(--accent); font-size: 10px; letter-spacing: 1px; }
.recommendation-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.recommendation-card li + li { margin-top: 4px; }

.compare-section { scroll-margin-top: 70px; }
.compare-heading { align-items: center; }
.segments { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.segment-button { padding: 9px 15px; }
.segment-count { display: inline-grid; min-width: 20px; height: 20px; margin-left: 4px; place-items: center; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 11px; }
.segment-button.is-active .segment-count { background: var(--accent-soft); color: var(--accent); }
.measurement-notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--accent-soft); }
.measurement-notice strong { white-space: nowrap; color: var(--accent); }
.measurement-notice span { color: var(--muted); }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, .42fr) minmax(160px, .36fr); gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; background: var(--surface); }
.toolbar label { display: block; }
.control-label { display: block; margin-bottom: 5px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.toolbar input, .toolbar select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--bg);
  color: var(--text);
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.result-meta { min-height: 30px; padding: 7px 2px 5px; color: var(--faint); font-size: 12px; }
.comparison-shell { overflow: hidden; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.comparison-head, .platform-summary {
  display: grid;
  grid-template-columns: minmax(185px, 1.25fr) minmax(245px, 2fr) minmax(90px, .7fr) minmax(130px, 1fr) minmax(130px, .9fr);
  align-items: center;
  gap: 16px;
}
.comparison-head { min-height: 44px; padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table-heading { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.compare-entry { border-bottom: 1px solid var(--border); }
.compare-entry:last-child { border-bottom: 0; }
.platform-summary { position: relative; min-height: 88px; padding: 14px 18px; transition: background .15s ease; }
.compare-entry:hover > .platform-summary, .compare-entry.is-open > .platform-summary { background: var(--surface-2); }
.row-toggle { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; background: transparent; cursor: pointer; }
.row-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.platform-cell { grid-area: auto; display: flex; min-width: 0; align-items: center; gap: 10px; }
.vendor-mark { width: 36px; height: 36px; }
.platform-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-cell span:not(.vendor-mark) { display: block; color: var(--muted); font-size: 12px; }
.platform-cell .platform-billing { color: var(--accent) !important; }
.models-cell, .entry-price, .price-pair, .subscribe-cell { min-width: 0; }
.mobile-field-label { display: none; }
.model-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.model-chip { max-width: 190px; overflow: hidden; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-more { color: var(--accent); }
.entry-price strong { display: block; font-size: 17px; }
.entry-price span { color: var(--muted); font-size: 11px; }
.price-pair { display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.price-pair span { color: var(--faint); }
.subscribe-cell { position: relative; z-index: 2; }
.subscribe-button, .tier-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  font-weight: 650;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.subscribe-button { min-height: 36px; padding: 0 12px; }
.subscribe-button:hover, .tier-action:hover { border-color: var(--accent); color: var(--accent); }
.subscribe-button.is-highlighted, .tier-action.is-highlighted { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.subscribe-button.is-highlighted:hover, .tier-action.is-highlighted:hover { background: var(--accent-hover); color: var(--accent-contrast); }

.tier-preview { display: none; padding: 0 18px 18px 64px; background: var(--surface-2); }
.compare-entry.is-open .tier-preview { display: block; }
@media (hover: hover) and (pointer: fine) { .compare-entry:hover .tier-preview { display: block; } }
.tier-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.tier-preview-head strong { color: var(--text); }
.tier-preview-grid, .detail-tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tier-card { display: flex; min-width: 0; flex-direction: column; padding: 17px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.tier-card-compact { padding: 14px; }
.tier-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tier-card h4 { margin: 0; font-size: 15px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.status-badge, .intro-price { display: inline-block; padding: 2px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.billing-badge, .intro-price { background: var(--accent-soft); color: var(--accent); }
.status-muted { opacity: .8; }
.tier-price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; }
.tier-price strong { font-size: 25px; line-height: 1; letter-spacing: -0.03em; }
.tier-price span { color: var(--muted); }
.renewal { margin: 7px 0 12px; color: var(--muted); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-bottom: 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--border); }
.metric { min-width: 0; padding: 8px; background: var(--surface-2); }
.metric span, .metric strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric span { color: var(--faint); font-size: 9px; }
.metric strong { margin-top: 2px; font-size: 11px; }
.detail-label { display: block; margin-bottom: 6px; color: var(--faint); font-size: 10px; font-weight: 700; }
.tier-models { padding-top: 1px; }
.feature-list { margin: 14px 0; padding: 12px 0 0; border-top: 1px solid var(--border); list-style: none; color: var(--muted); }
.feature-list li { position: relative; padding-left: 17px; overflow-wrap: anywhere; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.feature-list li + li { margin-top: 5px; }
.feature-empty { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11px; }
.tier-card-foot { margin-top: auto; padding-top: 4px; }
.tier-action { min-height: 34px; padding: 0 10px; font-size: 12px; }
.empty-state { padding: 42px; text-align: center; }
.empty-state strong { display: block; margin-bottom: 12px; }
.empty-state button { padding: 7px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text); cursor: pointer; }

.platforms-section { padding-bottom: 20px; }
.platform-directory { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.platform-directory a { padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; text-decoration: none; }
.platform-directory a:hover { border-color: var(--accent); color: var(--accent); }
.platform-details { display: grid; gap: 10px; }
.platform-detail { scroll-margin-top: 70px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.platform-detail[open] { box-shadow: inset 3px 0 0 var(--accent); }
.platform-detail > summary { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; cursor: pointer; list-style: none; }
.platform-detail > summary::-webkit-details-marker { display: none; }
.platform-detail-title { display: flex; align-items: center; gap: 11px; }
.platform-detail-title h3 { margin: 0; font-size: 16px; }
.platform-detail-title span:not(.vendor-mark) { color: var(--muted); font-size: 11px; }
.platform-detail-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.detail-chevron { font-size: 18px; transition: transform .18s ease; }
.platform-detail[open] .detail-chevron { transform: rotate(180deg); }
.platform-detail-body { padding: 0 18px 18px 65px; }
.plan-type-group + .plan-type-group { margin-top: 18px; }
.plan-type-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 9px; }
.plan-type-heading h4 { margin: 0; font-size: 13px; }
.plan-type-heading span { color: var(--faint); font-size: 11px; }

.faq-section { padding-bottom: 72px; }
.faq-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq-list details + details { border-top: 1px solid var(--border); }
.faq-list summary { padding: 16px 18px; cursor: pointer; font-weight: 650; }
.faq-list p { margin: -4px 18px 18px; max-width: 860px; color: var(--muted); }
.site-footer { padding: 24px 0 38px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11px; text-align: center; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; margin-top: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .stats { max-width: 520px; }
  .comparison-head, .platform-summary { grid-template-columns: minmax(170px, 1.2fr) minmax(210px, 1.7fr) 90px 120px 120px; gap: 11px; }
  .tier-preview-grid, .detail-tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .container { width: min(100% - 24px, 1240px); }
  .site-header { position: static; }
  .header-inner { min-height: 54px; }
  .site-nav a:nth-child(-n+2) { display: none; }
  .hero { padding: 54px 0 42px; }
  .hero h1 { font-size: clamp(32px, 10vw, 46px); }
  .section { padding-top: 54px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading > p { text-align: left; }
  .recommendation-tabs { display: flex; overflow-x: auto; }
  .recommendation-tab { flex: 0 0 auto; }
  .recommendation-panel { grid-template-columns: 1fr; }
  .compare-heading { align-items: stretch; }
  .segments { align-self: stretch; }
  .segment-button { flex: 1; }
  .measurement-notice { flex-direction: column; gap: 3px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .comparison-head { display: none; }
  .comparison-shell { border-radius: var(--radius); }
  .platform-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "platform action" "models models" "price pair";
    min-height: 0;
    gap: 12px;
    padding: 16px;
  }
  .platform-cell { grid-area: platform; }
  .models-cell { grid-area: models; }
  .entry-price { grid-area: price; }
  .price-pair { grid-area: pair; justify-self: end; }
  .entry-price .mobile-field-label, .price-pair .mobile-field-label {
    display: block;
    color: var(--faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
  }
  .entry-price > span:last-child { display: block; }
  .price-pair { display: grid; grid-template-columns: auto auto auto; align-items: end; }
  .price-pair .mobile-field-label { grid-column: 1 / -1; }
  .subscribe-cell { grid-area: action; justify-self: end; }
  .tier-preview { padding: 0 12px 14px; }
  .tier-preview-head { padding-top: 4px; }
  .tier-preview-grid, .detail-tier-grid { grid-template-columns: 1fr; }
  .platform-detail-body { padding: 0 12px 12px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .brand > span:last-child { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-nav { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat { min-height: 68px; }
  .recommendation-card { grid-template-columns: 25px minmax(0, 1fr); padding: 14px; }
  .toolbar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .segments { display: grid; grid-template-columns: 1fr 1fr; }
  .segment-button { padding-inline: 8px; }
  .platform-detail > summary { padding: 12px; }
  .platform-detail-meta > span:first-child { display: none; }
  .tier-preview-head { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
