:root { --bg:#f6f8fb; --fg:#13171f; --muted:#556070; --card:#fff; --line:#dbe1ea; --accent:#0b5fff; --accent-fg:#fff; --accent-soft:#e8f0ff; --good:#0a7a3d; --good-soft:#e6f6ec; --warn:#fff5db; --warn-line:#f0d27a; --bad:#a1260d; --shadow:0 1px 2px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.06); }
@media (prefers-color-scheme: dark) { :root { --bg:#0e1218; --fg:#eef1f6; --muted:#9aa6b6; --card:#161b23; --line:#283140; --accent:#6b9bff; --accent-fg:#0a1020; --accent-soft:#1a2740; --good:#5fd08c; --good-soft:#12281c; --warn:#2a2412; --warn-line:#5a4a14; --bad:#ff8a73; --shadow:none; } }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { scroll-behavior:smooth; scroll-padding-top:76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
a { color:var(--accent); }
.wrap { max-width:1040px; margin:0 auto; padding:0 16px; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip { position:absolute; left:-999px; top:8px; background:var(--card); padding:8px 12px; border-radius:8px; z-index:100; }
.skip:focus { left:8px; }
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }

/* Header */
.top { position:sticky; top:0; z-index:50; background:color-mix(in srgb,var(--card) 92%,transparent); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.bar { display:flex; align-items:center; gap:16px; min-height:60px; flex-wrap:wrap; padding-top:6px; padding-bottom:6px; }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--fg); }
.logo { width:34px; height:34px; border-radius:9px; background:var(--accent); color:var(--accent-fg); display:grid; place-items:center; font-weight:800; }
.logo.sm { width:22px; height:22px; font-size:.8rem; border-radius:6px; display:inline-grid; vertical-align:middle; }
.brand-text { display:flex; flex-direction:column; line-height:1.15; } .brand-text small { color:var(--muted); }
.nav { display:flex; gap:4px; margin-left:8px; overflow-x:auto; }
.nav a { color:var(--fg); text-decoration:none; padding:8px 12px; border-radius:8px; white-space:nowrap; min-height:40px; display:inline-flex; align-items:center; }
.nav a:hover { background:var(--accent-soft); }
@media (max-width:820px) {
  .bar { gap:6px 12px; }
  .actions { order:2; }
  .nav { order:3; width:100%; margin-left:-8px; padding-bottom:2px; }
  .nav a { padding:4px 10px; min-height:44px; }
  .brand-text small { display:none; }
}
.actions { margin-left:auto; display:flex; gap:10px; align-items:center; }
.lang { display:inline-flex; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.lang-btn { background:transparent; color:var(--fg); border:0; padding:0 12px; min-height:40px; font:inherit; font-weight:600; cursor:pointer; }
.lang-btn[aria-pressed="true"] { background:var(--accent); color:var(--accent-fg); }
.draft { background:var(--warn); border-bottom:1px solid var(--warn-line); padding:8px 16px; text-align:center; font-size:.9rem; }

/* Buttons */
button, .btn { font:inherit; }
.btn { min-height:44px; padding:0 18px; border:0; border-radius:10px; background:var(--accent); color:var(--accent-fg); font-weight:700; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px; text-decoration:none; }
.btn-tg { background:#229ed9; color:#fff; min-height:40px; padding:0 14px; }
.btn-main { min-width:200px; }
.btn[disabled], button[disabled] { opacity:.6; cursor:wait; }
.btn-ghost { background:var(--card); color:var(--fg); border:1px solid var(--line); font-weight:600; }

/* Hero */
.hero { padding:36px 0 8px; background:linear-gradient(180deg,var(--accent-soft),transparent); }
h1 { font-size:clamp(1.7rem,4.5vw,2.5rem); line-height:1.15; margin:0 0 10px; letter-spacing:-.02em; }
h2 { font-size:1.5rem; margin:0 0 6px; letter-spacing:-.01em; }
.lead { color:var(--muted); max-width:680px; margin:0 0 14px; font-size:1.05rem; }
.trust { display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:0 0 10px; }
.trust li { background:var(--card); border:1px solid var(--line); border-radius:999px; padding:4px 12px; font-size:.9rem; }
.trust li::before { content:"✓ "; color:var(--good); font-weight:700; }
.status { color:var(--muted); font-size:.9rem; min-height:1.4em; margin:0 0 8px; }

/* Advisor card */
.advisor { margin-top:12px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); padding:16px; }
.tabs { display:flex; gap:6px; margin-bottom:14px; border-bottom:1px solid var(--line); }
.tabs button { background:none; border:0; border-bottom:3px solid transparent; color:var(--muted); padding:10px 12px; min-height:44px; font-weight:600; cursor:pointer; }
.tabs button[aria-selected="true"] { color:var(--fg); border-bottom-color:var(--accent); }
.field { margin:0 0 14px; border:0; padding:0; min-width:0; }
label, legend { display:block; font-weight:600; margin-bottom:6px; padding:0; }
input[type=number], select, textarea, input[type=search] { width:100%; padding:11px 12px; font:inherit; color:inherit; background:var(--bg); border:1px solid var(--line); border-radius:10px; min-height:44px; }
textarea { resize:vertical; }
.stepper { display:flex; gap:8px; max-width:260px; }
.stepper button { width:48px; min-height:44px; border:1px solid var(--line); background:var(--bg); color:var(--fg); border-radius:10px; font-size:1.3rem; cursor:pointer; }
.stepper input { text-align:center; font-weight:700; font-size:1.1rem; }
.pills { display:flex; flex-wrap:wrap; gap:8px; }
.pill { margin:0; font-weight:500; cursor:pointer; }
.pill input { position:absolute; opacity:0; pointer-events:none; }
.pill span { display:inline-flex; align-items:center; min-height:44px; padding:0 14px; border:1px solid var(--line); border-radius:999px; background:var(--bg); }
.pill input:checked + span { background:var(--accent-soft); border-color:var(--accent); font-weight:700; }
.pill input:checked + span::before { content:"✓ "; margin-right:4px; color:var(--accent); }
.pill input:focus-visible + span { outline:3px solid var(--accent); outline-offset:2px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:560px) { .grid2 { grid-template-columns:1fr; } .btn-main { width:100%; } }
.hint { color:var(--muted); font-size:.9rem; margin:4px 0 12px; }
.row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.busy { color:var(--muted); }

/* Result */
.result { margin:18px 0; display:grid; gap:14px; }
.best { border:2px solid var(--accent); background:var(--card); border-radius:16px; padding:18px; box-shadow:var(--shadow); }
.best .kicker { color:var(--muted); font-size:.9rem; margin:0 0 2px; }
.best .name { font-size:1.5rem; font-weight:800; margin:0; letter-spacing:-.01em; }
.best .fee { font-size:2.4rem; font-weight:800; line-height:1.1; margin:6px 0 2px; }
.best .tiernote { color:var(--muted); font-size:.92rem; margin:0 0 10px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; padding:0; list-style:none; }
.chip { font-size:.88rem; border-radius:999px; padding:3px 10px; background:var(--accent-soft); }
.chip.good { background:var(--good-soft); color:var(--good); font-weight:600; }
.chip.warn { background:var(--warn); border:1px solid var(--warn-line); }
.best .meta { color:var(--muted); font-size:.9rem; margin:10px 0 0; }
.save { color:var(--good); font-weight:700; margin:0 0 8px; }
.ai { border:1px dashed var(--line); border-radius:12px; padding:12px 14px; background:var(--card); }
.ai strong { display:inline-block; font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; color:var(--accent); margin-bottom:2px; }
.ai p { margin:2px 0 4px; } .ai small { color:var(--muted); }
.tablewrap { overflow-x:auto; background:var(--card); border:1px solid var(--line); border-radius:12px; }
table { border-collapse:collapse; width:100%; min-width:520px; }
th, td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:.85rem; color:var(--muted); font-weight:600; }
tr:last-child td { border-bottom:0; }
td.fee { font-weight:700; white-space:nowrap; }
.badge { font-size:.8rem; border-radius:6px; padding:2px 7px; white-space:nowrap; }
.badge.ok { background:var(--good-soft); color:var(--good); }
.badge.bad { background:var(--warn); border:1px solid var(--warn-line); }
.badge.na { background:var(--accent-soft); color:var(--muted); }
.notes { display:grid; gap:8px; }
.note { background:var(--warn); border:1px solid var(--warn-line); border-radius:10px; padding:10px 12px; margin:0; }
.excluded { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:4px 14px; }
.excluded summary { cursor:pointer; padding:10px 0; font-weight:600; min-height:44px; }
.excluded ul { margin:0 0 10px; padding-left:18px; color:var(--muted); }
.share { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.share .btn { min-height:40px; font-size:.92rem; }
.msgcard { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; white-space:pre-line; }

/* Sections */
.block { margin-top:44px; }
.sub { color:var(--muted); margin:0 0 14px; }
.searchrow { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.searchrow input { max-width:340px; }
.count { color:var(--muted); font-size:.9rem; }
.plist { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:8px; max-height:460px; overflow:auto; border:1px solid var(--line); border-radius:12px; padding:8px; background:var(--card); }
.plist li { padding:8px 10px; border-radius:8px; display:flex; flex-direction:column; gap:2px; }
.plist li.cmp { background:var(--accent-soft); }
.plist a { font-weight:600; word-break:break-word; }
.plist .tag { font-size:.8rem; color:var(--good); font-weight:600; }
.plist .host { color:var(--muted); font-size:.82rem; }
.steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; list-style:none; counter-reset:s; padding:0; margin:12px 0; }
.steps li { counter-increment:s; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 16px 16px 56px; position:relative; display:flex; flex-direction:column; gap:4px; }
.steps li::before { content:counter(s); position:absolute; left:14px; top:14px; width:30px; height:30px; border-radius:50%; background:var(--accent); color:var(--accent-fg); display:grid; place-items:center; font-weight:800; }
.steps span { color:var(--muted); }
.fine { color:var(--muted); font-size:.88rem; }
#faq-list details { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:2px 16px; margin-bottom:8px; }
#faq-list summary { cursor:pointer; padding:12px 0; font-weight:600; min-height:44px; }
#faq-list p { margin:0 0 12px; color:var(--muted); }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.pcard { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; display:flex; flex-direction:column; gap:8px; }
.pcard h3 { margin:0; font-size:1.05rem; } .pcard p { margin:0; color:var(--muted); flex:1; font-size:.94rem; }
.pcard .btn { align-self:flex-start; min-height:40px; }

/* Footer */
.foot { margin-top:56px; background:var(--card); border-top:1px solid var(--line); padding:28px 0 18px; }
.fgrid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:24px; }
@media (max-width:760px) { .fgrid { grid-template-columns:1fr 1fr; } }
@media (max-width:480px) { .fgrid { grid-template-columns:1fr; } }
.foot h3 { font-size:.9rem; margin:0 0 8px; }
.foot ul { list-style:none; margin:0; padding:0; display:grid; gap:2px; }
.foot li a { display:inline-block; padding:6px 0; color:var(--fg); }
.brandline { margin:0 0 8px; }
.legal { color:var(--muted); font-size:.85rem; padding-top:18px; margin-top:18px; border-top:1px solid var(--line); }
