/* =====================================================================
   Miles Hub — base styles: tokens, layout, shared components.
   Page-specific styles live in home.css, results.css, details.css, plan.css, account.css, miles.css.
   ===================================================================== */
:root {
  --bg: #f4f7fd;
  --bg-2: #e9eef9;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --text: #10203d;
  --muted: #5b6a8a;
  --border: #dfe5f1;
  --primary: #2459e6;
  --primary-2: #4f7cff;
  --primary-hover: #1b47c2;
  --primary-ink: #ffffff;
  --primary-soft: #e3ebff;
  --sky-1: #dff0ff;
  --sky-2: #9ec9ff;
  --sky-3: #2f6fe4;
  --accent: #ff7a1a;
  --accent-soft: #fff0e4;
  --warn: #9a5b00;
  --warn-bg: #fff3dc;
  --danger: #b42318;
  --danger-bg: #fde8e6;
  --ok: #157347;
  --ok-bg: #e3f5ea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -14px rgba(16, 24, 40, .22);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 40px -16px rgba(36, 89, 230, .35);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --bg-2: #0f1830; --surface: #141c30; --surface-2: #1b2540; --text: #e8edf8; --muted: #97a4c4; --border: #26314f;
  --primary: #6f8fff; --primary-2: #86a1ff; --primary-hover: #8fa9ff; --primary-ink: #0b1020; --primary-soft: #1d2a52;
  --sky-1: #0f1b36; --sky-2: #1a2f5e; --sky-3: #4f7cff; --accent: #ff9548; --accent-soft: #3a2412;
  --warn: #f3b654; --warn-bg: #3a2a10; --danger: #ff8075; --danger-bg: #3d1a1a; --ok: #4fd38a; --ok-bg: #12331f;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 28px -14px rgba(0,0,0,.7); --shadow-hover: 0 2px 4px rgba(0,0,0,.5), 0 18px 40px -16px rgba(111,143,255,.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --bg-2: #0f1830; --surface: #141c30; --surface-2: #1b2540; --text: #e8edf8; --muted: #97a4c4; --border: #26314f;
    --primary: #6f8fff; --primary-2: #86a1ff; --primary-hover: #8fa9ff; --primary-ink: #0b1020; --primary-soft: #1d2a52;
    --sky-1: #0f1b36; --sky-2: #1a2f5e; --sky-3: #4f7cff; --accent: #ff9548; --accent-soft: #3a2412;
    --warn: #f3b654; --warn-bg: #3a2a10; --danger: #ff8075; --danger-bg: #3d1a1a; --ok: #4fd38a; --ok-bg: #12331f;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 28px -14px rgba(0,0,0,.7); --shadow-hover: 0 2px 4px rgba(0,0,0,.5), 0 18px 40px -16px rgba(111,143,255,.35);
    color-scheme: dark;
  }
}

/* ---- reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased; display: flex; flex-direction: column;
}
main.app { flex: 1; min-height: 60vh; outline: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .6rem; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; } .bold { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 2rem 0; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: .5rem .8rem; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.icon { display: inline-block; vertical-align: -.2em; }
.row-flex { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; text-decoration: none !important; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 14px -6px var(--primary); transition: transform .25s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.06); }
.main-nav { display: flex; gap: .15rem; margin-left: .25rem; }
.main-nav a { color: var(--muted); font-weight: 600; padding: .45rem .75rem; border-radius: 999px; text-decoration: none !important; transition: background .2s, color .2s; white-space: nowrap; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); }
.main-nav a.nav-ai { color: var(--accent); }
.main-nav a.nav-ai::before { content: "✦ "; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.auth-area { display: flex; align-items: center; gap: .4rem; }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .7rem .3rem .3rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; transition: box-shadow .2s; }
.user-chip:hover { box-shadow: var(--shadow); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; font-size: .8rem; }
.menu-btn { display: none; }
@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; height: auto; padding: .6rem 1rem; }
  .menu-btn { display: inline-grid; order: 3; }
  .main-nav { display: none; order: 5; width: 100%; flex-wrap: wrap; gap: .25rem; padding: .4rem 0 .2rem; }
  .topbar.open .main-nav { display: flex; }
  .top-actions { order: 2; margin-left: auto; }
  .switch-label { display: none; }
}

/* ---- switch ---- */
.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none; font-size: .88rem; font-weight: 600; color: var(--muted); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track .knob { transform: translateX(18px); }
.switch input:checked ~ .switch-label { color: var(--primary); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; padding: .6rem 1rem; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s; line-height: 1.2;
}
.btn:hover { background: var(--surface-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px var(--primary); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 12px 24px -10px var(--primary); }
.btn.accent { background: linear-gradient(135deg, var(--accent), #ffb35c); border-color: transparent; color: #1a1200; }
.btn.accent:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn.soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn.danger:hover { background: var(--danger-bg); }
.btn.sm { padding: .42rem .75rem; font-size: .88rem; border-radius: var(--radius-xs); }
.btn.lg { padding: .85rem 1.4rem; font-size: 1.05rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.pill { border-radius: 999px; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: default; transform: none !important; box-shadow: none !important; }
.btn .icon { flex: none; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.05rem; line-height: 1; transition: background .2s, color .2s, transform .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---- inputs ---- */
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .62rem .8rem; transition: border-color .2s, box-shadow .2s;
}
.input:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea.input { min-height: 80px; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.field { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.field .input { margin-top: .35rem; font-weight: 500; color: var(--text); text-transform: none; letter-spacing: 0; font-size: .97rem; }
.field.inline { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .9rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .form .row, .form .row-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 2.2rem; }
.help-text { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.error-text { font-size: .85rem; color: var(--danger); margin: .3rem 0; }

/* ---- chips & tabs ---- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); }
.tab-btn { border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: .6rem .9rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: .4rem; transition: color .2s, border-color .2s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: .35rem .8rem; border-radius: 999px; cursor: pointer; transition: all .2s; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---- cards & surfaces ---- */
.card, .panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card.hoverable:hover, a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.panel { padding: 1.1rem 1.2rem; }
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform .6s var(--ease); }
.card:hover .img-zoom img { transform: scale(1.06); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.tile .label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tile .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: .15rem 0; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: .82rem; color: var(--muted); }
.tile.warn .value { color: var(--warn); }
.divider { text-align: center; color: var(--muted); font-size: .8rem; margin: 1rem 0 .8rem; position: relative; }
.divider::before, .divider::after { content: ""; position: absolute; top: 50%; width: 42%; border-top: 1px solid var(--border); }
.divider::before { left: 0; } .divider::after { right: 0; }

/* ---- badges, pills, ratings, price tag ---- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.cheapest { background: var(--ok); color: #fff; }
.badge.demo { border: 1px dashed var(--border); background: transparent; }
.rating { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.rating .score { background: var(--primary); color: #fff; padding: .15rem .45rem; border-radius: 7px 7px 7px 0; font-size: .85rem; }
.rating .label { font-size: .85rem; } .rating .count { color: var(--muted); font-weight: 500; font-size: .8rem; }
.price-tag { display: inline-flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.price-tag .before { color: var(--muted); font-size: .9rem; text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.price-tag .arrow { color: var(--muted); font-size: .85rem; }
.price-tag .after { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.price-tag em { font-style: normal; font-size: .75rem; font-weight: 800; color: var(--ok); background: var(--ok-bg); padding: .1rem .4rem; border-radius: 999px; }
.price-tag .unit { color: var(--muted); font-size: .8rem; }
.price-tag.lg .after { font-size: 2rem; }

/* ---- logos ---- */
.logo-wrap { --s: 40px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 22%; background: var(--surface); border: 1px solid var(--border); overflow: hidden; flex: none; vertical-align: middle; }
.logo-wrap img { width: 84%; height: 84%; object-fit: contain; }
.logo-wrap .logo-badge { display: none; position: absolute; inset: 0; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * .34); letter-spacing: .02em; }
.logo-wrap.fallback img { display: none; } .logo-wrap.fallback .logo-badge { display: grid; }
.logo-wrap.round { border-radius: 50%; }
.logo-wrap.sm { --s: 28px; } .logo-wrap.lg { --s: 56px; } .logo-wrap.xl { --s: 72px; }
.logo-stack { display: inline-flex; } .logo-stack .logo-wrap { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); } .logo-stack .logo-wrap:first-child { margin-left: 0; }

/* ---- modal ---- */
#modal-root { display: none; } #modal-root.open { display: block; }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8, 12, 24, .55); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow: auto; }
.modal { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: pop .2s var(--ease); }
.modal.wide { max-width: 760px; } .modal.xl { max-width: 980px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .4rem; }
.modal-head h2 { font-size: 1.2rem; }
.modal-body { padding: .6rem 1.25rem 1.25rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .6rem; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.notice { font-size: .88rem; padding: .65rem .85rem; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--text); margin-bottom: .8rem; display: flex; gap: .5rem; align-items: flex-start; }
.notice.warn { background: var(--warn-bg); color: var(--warn); } .notice.ok { background: var(--ok-bg); color: var(--ok); } .notice.danger { background: var(--danger-bg); color: var(--danger); }

/* ---- toasts ---- */
#toasts { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 120; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: .65rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; opacity: 0; transform: translateY(8px); transition: .25s; box-shadow: var(--shadow); max-width: 92vw; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); color: #fff; } .toast.success { background: var(--ok); color: #fff; }

/* ---- onboarding pointer ---- */
.pointer-hint { position: absolute; z-index: 60; max-width: 260px; background: var(--accent); color: #1a1200; font-weight: 700; font-size: .88rem; padding: .6rem .8rem; border-radius: 12px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); animation: bob 1.2s ease-in-out infinite; cursor: pointer; }
.pointer-hint::after { content: ""; position: absolute; left: 22px; bottom: -9px; border: 10px solid transparent; border-top-color: var(--accent); border-bottom: 0; }
.pointer-hint .ph-arrow { display: inline-block; margin-right: .35rem; transform: rotate(135deg); }
.pointer-hint .ph-close { float: right; margin-left: .6rem; opacity: .7; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---- skeletons / empty ---- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { height: 180px; border-radius: var(--radius); margin-bottom: 1rem; }
.empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty .big { font-size: 2.4rem; margin-bottom: .5rem; }
.empty h2 { margin-bottom: .4rem; }
.empty .btn-row { justify-content: center; margin-top: 1rem; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-line { display: flex; align-items: center; gap: .6rem; color: var(--muted); padding: 1rem 0; }

/* ---- tables ---- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.table td.num.pos { color: var(--ok); } .table td.num.neg { color: var(--danger); }
.table td.best { background: var(--ok-bg); }

/* ---- compare tray ---- */
.compare-tray { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.45); padding: .5rem .6rem .5rem .8rem; display: flex; align-items: center; gap: .6rem; max-width: 96vw; animation: pop .25s var(--ease); }
.compare-tray .thumbs { display: flex; gap: .35rem; }
.compare-tray .thumb { position: relative; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.compare-tray .thumb img { width: 100%; height: 100%; object-fit: cover; }
.compare-tray .thumb button { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: .7rem; line-height: 1; cursor: pointer; }
.compare-tray .count { font-weight: 700; white-space: nowrap; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 3rem; }
.footer-inner { padding: 1.5rem 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.footer-links a { color: var(--muted); font-size: .88rem; }
.footer-note { width: 100%; margin: 0; }

/* ---- page header blocks ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.page-head h1 { font-size: 1.6rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.crumbs a { color: var(--muted); }

/* ---- misc helpers ---- */
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: .6rem; font-size: .92rem; border: 1px solid transparent; }
.alert.soon, .alert.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert.expired, .alert.danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert.info { background: var(--primary-soft); color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; }
.demo-banner { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); }
.ai-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .15rem .55rem; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }
