:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e3e6eb;
  --text: #14171c;
  --muted: #5d6573;
  --faint: #8b93a1;
  --accent: #16a34a;
  --accent-strong: #15803d;
  --accent-soft: #dcfce7;
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn-soft: #fef3c7;
  --warn-ink: #92400e;
  --mp: #f08a24;
  --vt: #0a9ea6;
  --eb: #3665f3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .12);
  --radius: 14px;
  --radius-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a21; --surface-2: #1f232c; --border: #2a2f3a;
    --text: #eef0f4; --muted: #a2a9b6; --faint: #6f7785;
    --accent: #22c55e; --accent-strong: #4ade80; --accent-soft: #12311f; --accent-ink: #06210f;
    --danger: #f87171; --danger-soft: #3a1717; --warn-soft: #3a2c0c; --warn-ink: #fcd34d;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-hover: 0 12px 32px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --surface-2: #1f232c; --border: #2a2f3a;
  --text: #eef0f4; --muted: #a2a9b6; --faint: #6f7785;
  --accent: #22c55e; --accent-strong: #4ade80; --accent-soft: #12311f; --accent-ink: #06210f;
  --danger: #f87171; --danger-soft: #3a1717; --warn-soft: #3a2c0c; --warn-ink: #fcd34d;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-hover: 0 12px 32px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2.6; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--text); }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: block; }
}

/* hero */
.hero { padding: 32px 0 20px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(24px, 4.2vw, 36px); line-height: 1.15; letter-spacing: -.02em; }
.lede { margin: 0; max-width: 60ch; color: var(--muted); }

/* panel / form */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-panel { padding: 16px; }
@media (min-width: 720px) { .search-panel { padding: 20px; } }
.search-row { display: flex; gap: 10px; }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-input input {
  width: 100%; height: 50px; padding: 0 14px 0 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 16px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search-input input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search-input input[aria-invalid="true"] { border-color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.search-row .btn { height: 50px; padding: 0 22px; border-radius: 12px; }
.btn .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) {
  .search-row { flex-direction: column; }
  .search-row .btn { width: 100%; }
}

.suggestions, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions { margin-top: 12px; }
@media (max-width: 640px) {
  .suggestions { flex-wrap: nowrap; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
  .suggestions::-webkit-scrollbar { display: none; }
  .suggestions .chip { flex: none; }
  .hero { padding: 20px 0 14px; }
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip small { color: var(--faint); }

.controls { display: grid; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
@media (min-width: 640px) { .controls { grid-template-columns: 1fr 1fr; gap: 20px 28px; } }
@media (min-width: 1000px) {
  .controls { grid-template-columns: repeat(12, 1fr); }
  .controls > .control { grid-column: span 4; }
  .controls > .control-discount, .controls > .control-cities { grid-column: span 6; }
  .controls > fieldset.control:has(.toggles) { grid-column: span 5; }
  .controls > .control-small { grid-column: span 3; }
}
.optional { font-weight: 400; color: var(--faint); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .dash { color: var(--faint); }
.money-input { position: relative; flex: 1; min-width: 0; }
.money-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 14px; }
.money-input input { width: 100%; height: 42px; padding: 0 10px 0 26px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); -moz-appearance: textfield; }
.money-input input::-webkit-outer-spin-button, .money-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.money-input input:focus { outline: none; border-color: var(--accent); }
.control { min-width: 0; border: 0; padding: 0; margin: 0; }
.control > label, .control legend, .control-head label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; padding: 0; }
.control-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-head label { margin: 0; }
.discount-value { display: inline-flex; align-items: center; gap: 2px; padding: 2px 10px 2px 4px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.discount-value input { width: 44px; border: 0; background: transparent; text-align: right; font-weight: 700; color: inherit; -moz-appearance: textfield; }
.discount-value input::-webkit-outer-spin-button, .discount-value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.discount-value input:focus { outline: none; }

input[type="range"] { width: 100%; margin: 12px 0 4px; height: 24px; background: transparent; -webkit-appearance: none; appearance: none; --p: 22%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--p), var(--surface-2) var(--p)); border: 1px solid var(--border); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: grab; }
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }

.toggles { display: flex; gap: 8px; }
.toggles .toggle { flex: 1; min-width: 0; }
.toggles .toggle span { justify-content: center; }
.toggle { position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; transition: all .15s; }
.toggle .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
.toggle-mp input:checked + span { color: var(--mp); border-color: var(--mp); background: color-mix(in srgb, var(--mp) 10%, var(--surface)); }
.toggle-vt input:checked + span { color: var(--vt); border-color: var(--vt); background: color-mix(in srgb, var(--vt) 10%, var(--surface)); }
.toggle input:checked + span .dot { background: currentColor; }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

select { height: 42px; width: 100%; padding: 0 36px 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; -webkit-appearance: none; appearance: none; cursor: pointer; }

.form-error { margin: 12px 0 0; color: var(--danger); font-size: 14px; font-weight: 500; }

/* results */
#results { padding: 24px 0 48px; min-height: 320px; }
.section-label { margin: 24px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.how { display: grid; gap: 10px; }
@media (min-width: 720px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how-step { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--border); color: var(--muted); }
.how-step b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; flex: none; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat:first-child .stat-value { color: var(--accent-strong); }
.stat-sub { font-size: 12px; color: var(--faint); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 14px; }
.result-title { margin: 0; font-weight: 600; }
.result-title span { color: var(--muted); font-weight: 400; }
.toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sort select { width: auto; min-width: 180px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: 34px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
@media (max-width: 520px) {
  .toolbar-right, .seg, .sort, .sort select { width: 100%; }
  .seg button { flex: 1; }
}

.notice { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1140px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; animation: rise .35s ease both; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { animation: none; transform: none; } }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media.no-img::after { content: ""; position: absolute; inset: 0; background: center / 48px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 16l-5-5-8 8'/%3E%3C/svg%3E"); }
.badge-off { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .01em; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.badge-off.hot { background: #dc2626; }
.badge-src { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.badge-src.marktplaats { background: var(--mp); }
.badge-src.vinted { background: var(--vt); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 10px; flex: 1; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 22px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.market { color: var(--faint); text-decoration: line-through; font-size: 14px; font-variant-numeric: tabular-nums; }
.savebar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.savebar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.save { margin: 0; font-size: 13px; color: var(--accent-strong); font-weight: 600; }
.meta { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cta { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 14px 14px; height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 14px; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.card-cta svg { width: 16px; height: 16px; }
.card-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* skeleton */
.skel { pointer-events: none; animation: none; }
.skel .card-media, .skel .sk { background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel .sk { height: 12px; border-radius: 6px; }
.skel .sk.lg { height: 22px; width: 45%; }
.skel .sk.md { width: 80%; }
.skel .sk.sm { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* states */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 16px; }
.state.state-idle { display: block; text-align: left; padding: 0; }
.state h2 { margin: 12px 0 6px; font-size: 20px; }
.state p { margin: 0 0 18px; color: var(--muted); max-width: 46ch; }
.state-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--muted); }
.state-icon svg { width: 26px; height: 26px; }
.state-error .state-icon { background: var(--danger-soft); color: var(--danger); }
.state-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.footer { padding-bottom: 32px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--border); padding-top: 16px; }
.footer p { margin: 0 0 6px; }
.footer code { font-size: 12px; }

/* advanced filters */
.advanced { margin-top: 16px; }
.advanced summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.advanced[open] summary::before { transform: rotate(45deg); }
.advanced summary:hover { color: var(--text); }
.advanced-body { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 760px) { .advanced-body { grid-template-columns: 1fr 1fr; align-items: end; gap: 28px; } }
.text-input { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.text-input:focus { outline: none; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check small { display: block; color: var(--faint); font-size: 12px; }

/* suspicious deals */
.badge-warn { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: rgba(146, 64, 14, .92); color: #fff; font-size: 12px; font-weight: 700; }
.card.is-suspicious { border-style: dashed; border-color: #d97706; }
.card.is-suspicious .card-media img { filter: saturate(.4); }
.card.is-suspicious .badge-off { background: #d97706; }
.card.is-suspicious .savebar i { background: #d97706; }
.card.is-suspicious .save { color: #b45309; }


/* cities */
.city-input { position: relative; }
.city-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.city-input .text-input { padding-left: 38px; }
.check-sm { margin-top: 10px; font-size: 13px; }
.check-sm input { width: 16px; height: 16px; }
.control > label.check { display: flex; margin: 10px 0 0; font-weight: 400; color: var(--text); }
.city-row { display: flex; gap: 8px; }
.city-row .city-input { flex: 1; min-width: 0; }
.city-row select { width: auto; flex: none; min-width: 104px; }

/* ===== eBay ===== */
.toggle-eb input:checked + span { color: var(--eb); border-color: var(--eb); background: color-mix(in srgb, var(--eb) 10%, var(--surface)); }
.badge-src.ebay { background: var(--eb); }
.toggles { flex-wrap: wrap; }
.toggles .toggle { min-width: 96px; }

/* ===== shared bits ===== */
.boot { display: grid; place-items: center; min-height: 60vh; }
.spinner-lg { display: inline-block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.guest-nav { display: flex; gap: 6px; align-items: center; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 38px; padding: 0 14px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
a.btn { text-decoration: none; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.fine { margin: 12px 0 0; font-size: 13px; color: var(--faint); }
.fine a { color: var(--accent-strong); }
.center { text-align: center; }
.muted { color: var(--muted); margin: 0 0 14px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-strong); cursor: pointer; font-size: inherit; text-decoration: underline; }
@media (max-width: 480px) { .guest-nav .btn-ghost { display: none; } .account-email { display: none; } .account-btn { padding-right: 8px; } }

/* ===== account menu ===== */
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; max-width: 260px; }
.account-btn:hover { background: var(--surface-2); }
.account-btn svg { width: 16px; height: 16px; color: var(--faint); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.account-email { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 8px; z-index: 20; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); }
.menu-label { display: block; font-size: 12px; color: var(--faint); }
.menu-head strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.menu-facts { margin: 0; padding: 8px 10px; display: grid; gap: 6px; border-bottom: 1px solid var(--border); }
.menu-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.menu-facts dt { color: var(--muted); }
.menu-facts dd { margin: 0; text-align: right; font-weight: 600; }
#menuPlan[data-status="active"], #menuPlan[data-status="trialing"] { color: var(--accent-strong); }
#menuPlan[data-status="past_due"] { color: var(--danger); }
.menu-item { display: block; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 14px; }
.menu-item:hover { background: var(--surface-2); }
#logoutBtn { color: var(--danger); }

/* ===== landing ===== */
.land-hero { display: grid; gap: 32px; padding: 40px 0 24px; align-items: center; }
@media (min-width: 900px) { .land-hero { grid-template-columns: 1.1fr 1fr; padding: 64px 0 40px; } }
.land-hero h1 { margin: 0 0 14px; font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -.03em; }
.land-hero .lede { font-size: 17px; }
.land-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.land-visual { position: relative; min-height: 340px; }
.mini-card { position: absolute; width: 260px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.land-visual { min-height: 420px; }
.mini-card { top: 0; left: 0; transform: rotate(-3deg); }
.mini-2 { top: 70px; left: auto; right: 0; transform: rotate(2.5deg); z-index: 1; }
.mini-3 { top: 250px; left: 14%; transform: rotate(-1deg); z-index: 2; }
.mini-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mini-top .badge-off, .mini-top .badge-src, .site-chips .badge-src, .country-sites .badge-src { position: static; display: inline-block; }
.mini-title { margin: 0 0 6px; font-weight: 600; }
.mini-price { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.mini-price s { font-size: 14px; font-weight: 400; color: var(--faint); }
.mini-save { margin: 8px 0 0; font-size: 13px; color: var(--accent-strong); font-weight: 600; }
@media (max-width: 899px) {
  .land-visual { min-height: 0; display: grid; gap: 12px; }
  .mini-card, .mini-2, .mini-3 { position: static; transform: none; width: auto; }
  .mini-2, .mini-3 { display: none; }
}
.land-section { padding: 28px 0; border-top: 1px solid var(--border); }
.land-section h2 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.01em; }
.land-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .land-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.site-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.price-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow); }
.price-card.flat { border-width: 1px; border-color: var(--border); box-shadow: none; background: var(--surface-2); margin: 18px 0; }
.plan-name { margin: 0; font-weight: 700; color: var(--muted); }
.plan-price { margin: 4px 0 14px; color: var(--muted); }
.plan-price span { font-size: 40px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.checks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.price-card.flat .checks { margin: 0; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }

/* ===== auth + subscribe ===== */
.auth { display: grid; place-items: start center; padding: 40px 16px 56px; }
.auth-card { width: 100%; max-width: 440px; padding: 24px; }
@media (min-width: 520px) { .auth-card { padding: 32px; } }
.auth-tabs { display: flex; padding: 3px; margin-bottom: 22px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.auth-tabs a { flex: 1; text-align: center; padding: 8px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); }
.auth-tabs a[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.auth-title { margin: 0 0 18px; font-size: 24px; letter-spacing: -.01em; }
.auth-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { font-weight: 400; color: var(--faint); }
.field input { width: 100%; height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field select { height: 46px; font-size: 16px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.pw-toggle:hover { background: var(--surface-2); }
.country-sites { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: -4px; }
.auth-form .form-error, .subscribe-card .form-error { margin: 0; }
.subscribe-card .notice { margin: 0 0 4px; }
.subscribe-card .auth-title { margin-bottom: 10px; }
.toggles .toggle { flex: 1 1 auto; }
@media (max-width: 420px) { .toggle .dot { display: none; } .toggle span { padding: 0 6px; } }
.badge-auction { padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--eb) 14%, var(--surface)); color: var(--eb); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
#errorText { white-space: pre-line; overflow-wrap: anywhere; }
.notice { overflow-wrap: anywhere; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.why-list li { color: var(--muted); }
.why-list strong { color: var(--text); }
