:root {
  color-scheme: light;
  --ink: #17181c;
  --muted: #555260;
  --purple: #6416c8;
  --deep: #4f0fa5;
  --tint: #f5efff;
  --line: #e7e0ef;
  --paper: #fff;
  font: 100%/1.5 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand { line-height: 1.08; letter-spacing: -.055em; }
h1 { font-size: clamp(2.7rem, 7vw, 6rem); font-weight: 780; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.8rem); }
h3 { font-size: 1.35rem; letter-spacing: -.035em; }
button, input { font: inherit; }
small { font-size: .875rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: absolute; top: .5rem; left: .5rem; z-index: 3; background: white; padding: 1rem; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; }
.header-inner, .section-title, .merchant-section { justify-content: space-between; }
.brand { font-size: 2.05rem; font-weight: 820; text-decoration: none; }
.brand span, h1 em { color: var(--purple); font-style: normal; }
.header-inner nav, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.header-inner nav > a, .footer-inner a { text-decoration: none; }
.button { display: inline-flex; align-items: center; justify-content: center; border-radius: .65rem; background: var(--purple); color: white; border: 1px solid transparent; padding: .8rem 1.2rem; text-decoration: none; font-weight: 700; cursor: pointer; min-height: 2.75rem; }
.button:hover { background: var(--deep); }
.button.small { padding: .55rem .9rem; }
.button.quiet { color: var(--deep); background: var(--tint); }
.button.quiet:hover { border-color: var(--purple); }
.button:disabled, fieldset:disabled .button { opacity: .5; cursor: default; }
.text-link { font-weight: 700; color: var(--deep); text-underline-offset: .25em; }
.hero { background: radial-gradient(ellipse at 86% 30%, #eee0ff, transparent 56%), linear-gradient(#fbf9ff, #f8f6fb); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 8vw, 7.5rem); }
.eyebrow { color: var(--deep); text-transform: uppercase; letter-spacing: .11em; font-weight: 750; font-size: .875rem; margin-bottom: .85rem; }
.eyebrow:empty { display: none; }
.lead { max-width: 42rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); margin-block: 1.2rem 1.6rem; }
.search { display: flex; gap: .55rem; margin-bottom: 1rem; max-width: 41rem; }
.search input, .fields input:not([type=submit]) { width: 100%; min-width: 0; border: 1px solid #d5cadf; border-radius: .65rem; padding: .8rem .9rem; background: white; color: var(--ink); }
.comparison-preview, .panel, .product-card { border: 1px solid var(--line); background: white; border-radius: 1.1rem; padding: clamp(1.1rem, 3vw, 2rem); }
.comparison-preview { box-shadow: 0 1.1rem 4rem #3f116418; }
.preview-heading { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.preview-heading h2 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.preview-heading .eyebrow { margin-bottom: .25rem; }
.price-icon { display: grid; flex: 0 0 3rem; height: 3rem; place-items: center; background: var(--purple); color: white; border-radius: .8rem; font-size: 1.5rem; font-weight: 750; }
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem; border-bottom: 1px solid var(--line); }
.preview-row:last-child { border-bottom: 0; }
.preview-row small { display: block; }
.preview-row strong, .metric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.top-offer { background: var(--tint); border: 0; border-radius: .65rem; color: var(--deep); }
.section { padding-block: clamp(2.3rem, 6vw, 4.75rem); }
.section-title, .merchant-section { display: flex; align-items: center; gap: 1rem; }
.steps, .product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.steps article { border-top: 2px solid var(--purple); padding: 1.15rem 0; }
.steps p, .merchant-section p:not(.eyebrow), .panel p, .note { color: var(--muted); margin-top: .55rem; }
.merchant-section { margin-bottom: clamp(2rem, 6vw, 4.75rem); background: var(--tint); border-radius: 1.15rem; padding: clamp(1.25rem, 4vw, 2.5rem); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { flex-wrap: wrap; color: var(--muted); font-size: .9rem; padding-block: .8rem; }
.footer-inner .brand { color: var(--ink); font-size: 1.55rem; }
.footer-inner a:last-child { margin-left: auto; }
.catalog-search, .dashboard-grid { margin-top: 1.5rem; }
.product-card { display: flex; flex-direction: column; gap: .6rem; overflow-wrap: anywhere; }
.product-card h2 { font-size: 1.45rem; }
.product-card h2 a { text-decoration: none; }
.product-card h2 a:hover { color: var(--purple); text-decoration: underline; }
.product-card p { margin: 0; color: var(--muted); }
.card-bottom { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .45rem; margin-top: auto; padding-top: .8rem; }
.card-bottom strong { color: var(--deep); font-size: 1.25rem; }
.pagination { margin-top: 1.5rem; }
.back { display: inline-block; margin-bottom: 1rem; }
.notice { background: var(--tint); border-radius: .55rem; color: var(--deep); padding: .75rem 1rem; margin-block: .85rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 1rem; margin-block: 1.5rem; }
.offers { width: 100%; border-collapse: collapse; text-align: left; }
.offers th, .offers td { padding: 1rem; }
.offers thead { background: var(--tint); }
.offers tbody tr + tr { border-top: 1px solid var(--line); }
.offers td { white-space: nowrap; }
.form-layout, .dashboard-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1rem, 4vw, 3rem); align-items: start; }
.form-layout h1, .dashboard-grid h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); }
.fields fieldset { display: contents; border: 0; margin: 0; padding: 0; }
.fields label { display: block; margin-top: .85rem; margin-bottom: .3rem; font-weight: 700; }
.fields .button, .fields details, .status-panel .button { margin-top: 1rem; }
.fields [aria-live]:not(:empty) { color: var(--deep); margin-top: 1rem; }
.fields small { display: block; margin-top: .45rem; }
.fields .form-footer { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: .85rem; }
.fields summary { cursor: pointer; font-weight: 700; color: var(--deep); }
.status-panel .text-link { display: block; margin-top: .85rem; }
.metric { display: block; color: var(--deep); font-size: 2.5rem; margin-top: .7rem; }
@media (max-width: 850px) {
  .hero-grid, .form-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .steps, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner nav { gap: .65rem; }
  .brand { font-size: 1.7rem; }
  .steps, .product-grid { grid-template-columns: 1fr; }
  .section-title, .merchant-section { align-items: flex-start; flex-direction: column; }
  .offers th, .offers td { padding: .7rem; }
}
