:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI Variable Text", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  color: #101828;
  background: #fcfcfd;
  --ink: #101828;
  --muted: #475467;
  --faint: #667085;
  --line: #eaecf0;
  --surface: #f6f6f8;
  --accent: #3d5bff;
  --accent-strong: #2f46d9;
  --accent-soft: #eef2ff;
  --electric: linear-gradient(135deg, #00dcff 0%, #3d5bff 55%, #8b3dff 100%);
  --good: #067647;
  --good-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --out: #b42318;
  --out-soft: #fef3f2;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05), 0 1px 3px rgb(16 24 40 / .06);
  --shadow-lg: 0 12px 32px -12px rgb(16 24 40 / .18), 0 4px 10px -4px rgb(16 24 40 / .08);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { display: flex; flex-direction: column; min-height: 100vh; min-width: 280px; margin: 0; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1192px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line); background: rgb(252 252 253 / .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.masthead-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: clamp(24px, 5vw, 65px); }
.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.wordmark strong, .wordmark small { display: block; }
.wordmark strong { font-size: 16.5px; letter-spacing: -.01em; line-height: 1.15; }
.wordmark small { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.brand-mark { display: block; flex: none; width: 34px; height: 34px; border-radius: 26.5%; box-shadow: 0 2px 8px rgb(61 91 255 / .38); }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 14px; font-weight: 500; white-space: nowrap; }
nav a { color: var(--muted); border-radius: 8px; padding: 6px 2px; transition: color .15s; }
nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background:
  radial-gradient(52rem 26rem at 86% -12%, rgb(61 91 255 / .10), transparent 62%),
  radial-gradient(44rem 24rem at 8% 118%, rgb(0 220 255 / .08), transparent 60%),
  #fcfcfd; }
.hero::before { content: ""; position: absolute; inset: 0; background: url('/shop-hero.webp') right center / auto 106% no-repeat; opacity: .5; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #fcfcfd 0%, #fcfcfd 34%, rgb(252 252 253 / .9) 48%, rgb(252 252 253 / .3) 68%, transparent 86%); }
.hero-copy { position: relative; z-index: 1; padding-block: clamp(56px, 8vw, 96px); }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 750; letter-spacing: -.01em; line-height: 1.16; max-width: 15em; }
.hero h1 em { font-style: normal; background: linear-gradient(92deg, #0891b2, #3d5bff 55%, #8b3dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 16px; max-width: 440px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-action { display: inline-flex; align-items: center; gap: 9px; border-radius: 12px; padding: 12px 20px; background: var(--electric); color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: 0 4px 14px -4px rgb(61 91 255 / .45); transition: transform .15s, box-shadow .15s, background .15s; }
.hero-action:hover { background: var(--electric); transform: translateY(-1px); box-shadow: 0 8px 22px -6px rgb(61 91 255 / .5); }
.hero-action.ghost { background: #fff; color: var(--ink); border: 1px solid #d0d5dd; box-shadow: none; }
.hero-action.ghost:hover { border-color: var(--faint); background: var(--surface); }

/* ---------- catalog head ---------- */
.catalog, .guide { scroll-margin-top: 84px; }
.catalog { padding-top: 44px; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.catalog-head h2, .guide h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.catalog-meta { min-height: 19px; margin-top: 6px; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.search { width: min(360px, 100%); display: flex; align-items: center; gap: 10px; border: 1px solid #d0d5dd; border-radius: 12px; padding-inline: 14px; background: #fff; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(61 91 255 / .12); }
.search input { min-width: 0; width: 100%; height: 42px; padding-left: 2px; font-size: 14px; background: none; border: 0; outline: none; }
.search input::placeholder { color: var(--faint); }
.search-mark { position: relative; flex: 0 0 14px; height: 14px; border: 1.8px solid var(--faint); border-radius: 50%; }
.search-mark::after { content: ""; width: 5.5px; height: 1.8px; position: absolute; right: -4.5px; bottom: -2px; transform: rotate(45deg); border-radius: 1px; background: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- filter chips ---------- */
.market-layout { padding-block: 22px 8px; }
.filter-rail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 22px; }
.filter-rail h3 { color: var(--muted); font-size: 13px; font-weight: 550; margin-right: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #d0d5dd; text-align: left; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 500; color: #344054; cursor: pointer; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
.filter:hover { border-color: var(--faint); background: var(--surface); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgb(61 91 255 / .3); }
.filter-count { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.filter[aria-pressed="true"] .filter-count { color: rgb(255 255 255 / .66); }
.stock-filter { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d0d5dd; border-radius: 999px; padding: 7px 14px; background: #fff; font-size: 13.5px; font-weight: 500; color: #344054; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; margin-left: auto; }
.stock-filter:hover { border-color: var(--faint); background: var(--surface); }
.stock-filter input { margin: 0; width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------- product cards ---------- */
.catalog-body { min-width: 0; padding-bottom: 26px; }
.stale { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 18px; border: 1px solid #fedf89; border-radius: 12px; padding: 11px 16px; background: #fffaeb; color: #854602; font-size: 13.5px; line-height: 1.5; }
.stale button { border: 1px solid #fec84b; border-radius: 9px; padding: 7px 13px; background: #fff; color: #7a3e00; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.stale button:hover { background: #fffcf5; border-color: #fdb022; }
.stale button:disabled { cursor: wait; opacity: .65; }
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-link { display: flex; height: 100%; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.product-link:hover { transform: translateY(-3px); border-color: #d6d9f5; box-shadow: var(--shadow-lg); }
.product-media { position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; overflow: hidden; }
.bg-openai { background: radial-gradient(120% 120% at 50% 0%, #f4f7fb 0%, #e6ecf4 100%); }
.bg-gemini { background: radial-gradient(120% 120% at 30% 20%, #f5f1ff 0%, #eae4fc 100%); }
.bg-claude { background: radial-gradient(120% 120% at 70% 10%, #fff5ec 0%, #ffe9da 100%); }
.bg-grok { background: radial-gradient(120% 120% at 50% 0%, #f5f5f4 0%, #e7e5e4 100%); }
.bg-other { background: radial-gradient(120% 120% at 50% 0%, #f4f7fb 0%, #e6ecf4 100%); }
.product-logo { width: min(38%, 96px); height: auto; max-height: 58%; object-fit: contain; transition: transform .3s ease; }
.product-logo-codex { border-radius: 26.5%; }
.product-link:hover .product-logo { transform: scale(1.08); }
.product-fallback { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; border: 1px solid rgb(61 91 255 / .14); background: rgb(255 255 255 / .7); color: var(--accent); font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.chip { position: absolute; top: 10px; left: 10px; border-radius: 999px; padding: 4px 11px; background: rgb(255 255 255 / .78); color: #344054; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; box-shadow: 0 1px 2px rgb(16 24 40 / .06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.product-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 16px 12px; }
.product-title { overflow-wrap: anywhere; font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1.5; }
.product-meta { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-good { color: var(--good); background: var(--good-soft); }
.pill-warn { color: var(--warn); background: var(--warn-soft); }
.pill-out { color: var(--out); background: var(--out-soft); }
.pill-muted { color: var(--muted); background: var(--surface); }
.delivery { color: var(--faint); font-size: 12px; }
.product-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fcfcfd; }
.price { color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.buy { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 8px 16px; background: var(--electric); color: #fff; font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: .01em; white-space: nowrap; box-shadow: 0 2px 8px rgb(61 91 255 / .28); transition: box-shadow .15s ease, background .15s ease; }
.product-link:hover .buy { background: var(--electric); box-shadow: 0 2px 6px rgb(61 91 255 / .3), 0 6px 16px rgb(139 61 255 / .22); }
.buy--ghost { background: #fff; color: var(--muted); border: 1px solid #e4e7ec; box-shadow: none; padding: 7px 15px; }
.product-link:hover .buy--ghost { background: var(--surface); border-color: #d0d5dd; box-shadow: none; }

/* ---------- notice / guide / footer ---------- */
.notice { min-height: 140px; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; border: 1px dashed #d0d5dd; border-radius: var(--radius); color: var(--muted); padding: 24px; background: #fff; }
.notice button { border: 1px solid #d0d5dd; border-radius: 10px; padding: 8px 14px; background: #fff; font-size: 13.5px; font-weight: 550; cursor: pointer; transition: border-color .15s, background .15s; }
.notice button:hover { border-color: var(--faint); background: var(--surface); }
.guide { margin-block: 44px 52px; border-top: 1px solid var(--line); padding-top: 26px; }
.guide p { max-width: 70ch; margin-top: 10px; color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.footer { margin-top: auto; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { padding-block: 20px; color: var(--faint); font-size: 13px; font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1050px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero::before { opacity: .45; }
  .hero::after { background: linear-gradient(90deg, #fcfcfd 0%, #fcfcfd 46%, rgb(252 252 253 / .86) 62%, rgb(252 252 253 / .2) 84%, transparent 100%); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .hero::before { background-size: cover; background-position: center; opacity: .3; }
  .hero::after { background: linear-gradient(180deg, rgb(252 252 253 / .6) 0%, rgb(252 252 253 / .82) 46%, rgb(252 252 253 / .94) 100%); }
  .hero-copy { padding-block: 44px; }
  .catalog-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .search { width: 100%; }
  .filter-rail { gap: 6px; }
  .market-layout { padding-top: 16px; }
  .products { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-link, .product-logo, .hero-action { transition: none; }
  .product-link:hover { transform: none; }
  .product-link:hover .product-logo { transform: none; }
}
