/* Blue Sparkle Pool Care — shared design system. Pool-water blues + white, phone-first, sunlight-readable. */
:root{
  --blue-900:#062F4A;--blue-800:#0A4A73;--blue-700:#0B5F94;--blue-600:#0B7AC0;--blue-500:#1493DB;--blue-400:#4FB3EA;--blue-200:#BFE4F7;--blue-100:#E3F4FC;--blue-50:#F2FAFE;
  --aqua:#06B6D4;--aqua-dark:#0891B2;--sun:#F59E0B;--ok:#15803D;--ok-bg:#DCFCE7;--warn:#B45309;--warn-bg:#FEF3C7;--bad:#B91C1C;--bad-bg:#FEE2E2;
  --bg:#F5FAFD;--surface:#FFFFFF;--surface-2:#EEF6FB;--text:#0F2536;--muted:#4B6478;--line:#D5E5EF;--shadow:0 6px 24px rgba(6,47,74,.10);
  --radius:16px;--radius-sm:10px;--nav-h:64px;--max:1160px;
  --font:"Inter","Segoe UI",system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;
}
[data-theme="dark"]{
  --bg:#07131C;--surface:#0E1F2C;--surface-2:#132A3A;--text:#EAF4FA;--muted:#9DB6C8;--line:#22405A;--shadow:0 6px 24px rgba(0,0,0,.45);
  --blue-100:#0F2E44;--blue-50:#0B2131;--blue-200:#164A6B;--ok-bg:#0F3A22;--warn-bg:#3A2A0B;--bad-bg:#3D1414;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.5;font-size:16px;min-height:100vh;overflow-x:hidden}
img,svg{max-width:100%;display:block}
a{color:var(--blue-700)}
/* dark surfaces: mid-blue text is too dim (3.6:1) — lift plain-link text to a light blue (≈7:1).
   Buttons (.btn) are EXCLUDED: they carry their own background + text pairing (white on blue, dark on white/aqua)
   and this rule's specificity (0,1,1) would otherwise beat .btn-primary/.btn-light/.btn-aqua (0,1,0) and paint
   light-blue text over a blue/white/aqua button (1–2:1). */
[data-theme="dark"] a:not(.btn){color:var(--blue-400)}
h1,h2,h3,h4{margin:0 0 .5rem;line-height:1.15;letter-spacing:-.01em}
h1{font-size:clamp(2rem,6vw,3.25rem)}h2{font-size:clamp(1.5rem,4vw,2.125rem)}h3{font-size:1.25rem}h4{font-size:1.05rem}
p{margin:0 0 1rem}
.muted{color:var(--muted)}
.small{font-size:.875rem}
.price,.money,[data-money]{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700}
.num{font-variant-numeric:tabular-nums}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hidden{display:none!important}

/* nav */
.nav{position:sticky;top:0;z-index:50;height:var(--nav-h);background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.nav-inner{max-width:var(--max);margin:0 auto;height:100%;display:flex;align-items:center;gap:12px;padding:0 16px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);font-weight:800;font-size:1.05rem;min-height:44px}
.brand img{height:36px;width:auto}
.brand small{display:block;font-weight:600;font-size:.7rem;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.nav-links{display:flex;gap:4px;margin-left:auto;align-items:center}
.nav-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;text-decoration:none;color:var(--text);font-weight:600}
.nav-links a:hover,.nav-links a:focus-visible{background:var(--blue-100);outline:none}
.nav-links a.active{background:var(--blue-600);color:#fff}
.nav-cta{margin-left:6px}
/* the account CTA is a .btn inside .nav-links — .nav-links a would otherwise win and paint dark text on blue (3.4:1) */
.nav-links a.nav-cta{background:var(--blue-700);color:#fff;border-color:var(--blue-700)}
.nav-links a.nav-cta:hover,.nav-links a.nav-cta:focus-visible{background:var(--blue-800);color:#fff}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer}
.icon-btn:hover{background:var(--blue-100)}
.menu-btn{display:none}
@media (max-width:900px){
  .nav-links{display:none;position:absolute;top:var(--nav-h);left:0;right:0;background:var(--surface);border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch;padding:8px 16px 16px;gap:4px;box-shadow:var(--shadow)}
  .nav-links.open{display:flex}
  .nav-links a{min-height:48px}
  .menu-btn{display:inline-flex;margin-left:auto}
  .nav-cta{margin:8px 0 0}
}

/* layout */
.container{max-width:var(--max);margin:0 auto;padding:0 16px}
section.block{padding:56px 0}
@media (max-width:640px){section.block{padding:40px 0}}
.section-head{margin-bottom:28px}
.section-head h2{margin-bottom:.35rem}
.grid{display:grid;gap:20px}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:8px;min-width:0}
.card h3{margin:0}
.card .price-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.card .price-row .price{font-size:1.75rem;color:var(--blue-700)}
.card ul{margin:0;padding-left:20px}
.card .spacer{flex:1}
.stat{display:flex;flex-direction:column;gap:4px}
.stat .label{font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700}
.stat .value{font-size:1.9rem;font-weight:800;line-height:1.1;white-space:nowrap;font-variant-numeric:tabular-nums}
.stat .value.ok{color:var(--ok)}.stat .value.warn{color:var(--warn)}.stat .value.blue{color:var(--blue-700)}
[data-theme="dark"] .card .price-row .price,[data-theme="dark"] .stat .value.blue,[data-theme="dark"] .choice .price,[data-theme="dark"] .summary-box .total .price{color:var(--blue-400)}

/* hero */
.hero{position:relative;overflow:hidden;color:#fff;background:radial-gradient(1200px 600px at 80% -10%,#4FB3EA 0%,transparent 60%),radial-gradient(900px 500px at -10% 110%,#06B6D4 0%,transparent 55%),linear-gradient(160deg,var(--blue-900),var(--blue-700) 55%,var(--blue-600))}
.hero::after{content:"";position:absolute;inset:auto -10% -40px -10%;height:140px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'><path d='M0 80 C 240 140 480 20 720 70 S 1200 140 1440 60 V140 H0Z' fill='rgba(255,255,255,0.10)'/><path d='M0 100 C 300 40 600 140 900 90 S 1300 40 1440 100 V140 H0Z' fill='rgba(255,255,255,0.14)'/></svg>") center/cover no-repeat;pointer-events:none}
.hero-inner{max-width:var(--max);margin:0 auto;padding:72px 16px 96px;display:grid;gap:32px;grid-template-columns:1.2fr .8fr;align-items:center}
@media (max-width:900px){.hero-inner{grid-template-columns:1fr;padding:48px 16px 80px}}
.hero h1{font-size:clamp(2.25rem,6.5vw,3.75rem);line-height:1.05;letter-spacing:-.02em;margin-bottom:1rem}
.hero .lead{font-size:1.2rem;max-width:34rem;opacity:.95}
.hero .actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:1.5rem}
.hero .eyebrow{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.3);padding:6px 12px;border-radius:999px;font-size:.85rem;font-weight:600;margin-bottom:1rem}
.hero-card{background:rgba(255,255,255,.96);color:var(--text);border-radius:var(--radius);padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
[data-theme="dark"] .hero-card{background:var(--surface)}
.hero-card h3{margin-bottom:.35rem}
.trust{display:flex;gap:18px;flex-wrap:wrap;margin-top:1.5rem;font-size:.9rem;opacity:.95}
.trust span{display:inline-flex;align-items:center;gap:6px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:999px;border:2px solid transparent;font:inherit;font-weight:700;font-size:1rem;cursor:pointer;text-decoration:none;transition:transform .08s,background .15s,box-shadow .15s;white-space:nowrap}
.btn:active{transform:translateY(1px)}
.btn:focus-visible{outline:3px solid var(--sun);outline-offset:2px}
.btn-primary{background:var(--blue-600);color:#fff}
.btn-primary:hover{background:var(--blue-700)}
.btn-aqua{background:var(--aqua);color:#032b33}
.btn-aqua:hover{background:var(--aqua-dark);color:#fff}
.btn-light{background:#fff;color:var(--blue-800)}
.btn-light:hover{background:var(--blue-100)}
/* dark: hover surface becomes deep navy (#0F2E44) — keep the label readable on it */
[data-theme="dark"] .btn-light:hover{color:#fff}
.btn-outline{background:transparent;border-color:var(--blue-700);color:var(--blue-700)}
.btn-outline:hover{background:var(--blue-100)}
/* dark: #0B7AC0 on #0E1F2C is 3.6:1 — use the light blue (≈7:1) */
[data-theme="dark"] .btn-outline{border-color:var(--blue-400);color:var(--blue-400)}
.btn-ghost{background:transparent;color:var(--text);border-color:var(--line)}
.btn-ghost:hover{background:var(--surface-2)}
.btn-danger{background:var(--bad);color:#fff}
.btn-ok{background:var(--ok);color:#fff}
.btn-sm{min-height:40px;padding:0 14px;font-size:.9rem}
.btn-block{width:100%}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.btn-row{display:flex;gap:10px;flex-wrap:wrap}

/* forms */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;min-width:0}
.field label{font-weight:700;font-size:.95rem}
.field .hint{font-size:.85rem;color:var(--muted)}
input,select,textarea{font:inherit;font-size:1rem;color:var(--text);background:var(--surface);border:2px solid var(--line);border-radius:var(--radius-sm);padding:12px 14px;min-height:48px;width:100%}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--blue-500);box-shadow:0 0 0 4px rgba(20,147,219,.18)}
.form-grid{display:grid;gap:0 16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.choice-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr))}
.choice{display:flex;flex-direction:column;gap:6px;border:2px solid var(--line);border-radius:var(--radius);padding:16px;cursor:pointer;background:var(--surface);min-height:64px;position:relative}
.choice input{position:absolute;opacity:0;pointer-events:none}
.choice:has(input:checked){border-color:var(--blue-600);background:var(--blue-50);box-shadow:0 0 0 3px rgba(11,122,192,.18)}
.choice strong{font-size:1.05rem}
.choice .price{color:var(--blue-700);font-size:1.25rem}
.pill-group{display:flex;gap:8px;flex-wrap:wrap}
.pill{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:999px;border:2px solid var(--line);background:var(--surface);font-weight:600;cursor:pointer}
.pill:has(input:checked),.pill.active{border-color:var(--blue-600);background:var(--blue-600);color:#fff}
.pill input{position:absolute;opacity:0;pointer-events:none}
.check{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);cursor:pointer;min-height:48px}
.check input{width:26px;height:26px;min-height:0;margin:0;flex:0 0 auto;accent-color:var(--blue-600)}
.check:last-child{border-bottom:none}
.notice{border-radius:var(--radius-sm);padding:12px 14px;border:1px solid var(--line);background:var(--surface-2);display:flex;gap:10px;align-items:flex-start}
.notice.ok{background:var(--ok-bg);border-color:var(--ok);color:var(--ok)}
.notice.warn{background:var(--warn-bg);border-color:var(--warn);color:var(--warn)}
.notice.bad{background:var(--bad-bg);border-color:var(--bad);color:var(--bad)}
[data-theme="dark"] .notice.ok{color:#86EFAC}[data-theme="dark"] .notice.warn{color:#FCD34D}[data-theme="dark"] .notice.bad{color:#FCA5A5}
.error-list{margin:0 0 12px;padding-left:20px;color:var(--bad)}

/* tags */
.tag{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:.78rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.tag.ok{background:var(--ok-bg);color:var(--ok)}.tag.warn{background:var(--warn-bg);color:var(--warn)}.tag.bad{background:var(--bad-bg);color:var(--bad)}.tag.blue{background:var(--blue-100);color:var(--blue-700)}
[data-theme="dark"] .tag.ok{color:#86EFAC}[data-theme="dark"] .tag.warn{color:#FCD34D}[data-theme="dark"] .tag.bad{color:#FCA5A5}[data-theme="dark"] .tag.blue{color:#9BD5F5}

/* tables & lists */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
table{width:100%;border-collapse:collapse;font-size:.95rem;min-width:520px}
th,td{text-align:left;padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:top}
th{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);background:var(--surface-2)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
tr:last-child td{border-bottom:none}
.list{display:flex;flex-direction:column;gap:12px}
.row{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.item{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:6px}
.item .row{align-items:flex-start}
.item.clickable{cursor:pointer}
.item.clickable:hover{border-color:var(--blue-400)}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;font-size:.95rem}
.kv dt{color:var(--muted)}.kv dd{margin:0;min-width:0;overflow-wrap:anywhere}
.divider{height:1px;background:var(--line);margin:16px 0}
.empty{padding:36px 20px;text-align:center;color:var(--muted);border:2px dashed var(--line);border-radius:var(--radius)}

/* faq */
details.faq{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);margin-bottom:10px}
details.faq summary{cursor:pointer;padding:16px 18px;font-weight:700;list-style:none;display:flex;justify-content:space-between;gap:12px;min-height:48px;align-items:center}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary::after{content:"+";font-size:1.4rem;color:var(--blue-600)}
details.faq[open] summary::after{content:"–"}
details.faq .body{padding:0 18px 16px;color:var(--muted)}

/* gallery */
.gallery{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))}
.tile{border-radius:var(--radius);overflow:hidden;background:var(--surface);border:1px solid var(--line);display:flex;flex-direction:column}
.tile .img{aspect-ratio:4/3;background:linear-gradient(160deg,var(--blue-400),var(--blue-700));display:flex;align-items:center;justify-content:center;color:#fff;position:relative}
.tile .img img{width:100%;height:100%;object-fit:cover}
.tile .cap{padding:12px 14px;font-size:.9rem}
.tile .cap strong{display:block}
.before-after{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.before-after figure{margin:0;border-radius:var(--radius-sm);overflow:hidden;background:var(--surface-2);border:1px solid var(--line)}
.before-after img{width:100%;aspect-ratio:4/3;object-fit:cover}
.before-after figcaption{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;font-weight:700;padding:6px 10px;color:var(--muted)}
.before-after .ph{aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:.85rem;text-align:center;padding:10px}

/* footer */
footer{margin-top:40px;background:var(--blue-900);color:#CFE8F7;padding:44px 0 28px}
footer .cols{display:grid;gap:28px;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
footer h4{color:#fff}
footer a,[data-theme="dark"] footer a{color:#fff}
footer .fine{margin-top:28px;border-top:1px solid rgba(255,255,255,.15);padding-top:16px;font-size:.85rem;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
footer .trust-row{display:flex;gap:16px;flex-wrap:wrap;margin-top:8px}
footer .trust-row span{display:inline-flex;gap:6px;align-items:center;font-weight:600;color:#fff}

/* toast + dialog */
.toasts{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:200;width:min(94vw,440px)}
.toast{background:var(--blue-900);color:#fff;padding:14px 18px;border-radius:12px;box-shadow:var(--shadow);display:flex;gap:10px;align-items:flex-start;animation:toast .25s ease-out;font-weight:600}
.toast.ok{background:var(--ok)}.toast.bad{background:var(--bad)}
@keyframes toast{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
dialog{border:none;border-radius:var(--radius);padding:0;max-width:min(94vw,520px);width:100%;background:var(--surface);color:var(--text);box-shadow:0 30px 80px rgba(0,0,0,.35)}
dialog::backdrop{background:rgba(6,47,74,.55);backdrop-filter:blur(3px)}
dialog .dlg{padding:22px}
dialog .dlg h3{margin-bottom:.5rem}
dialog .dlg .btn-row{justify-content:flex-end;margin-top:16px}

/* steps */
.steps{display:flex;gap:6px;margin-bottom:20px}
.steps span{flex:1;height:6px;border-radius:3px;background:var(--line)}
.steps span.done{background:var(--blue-600)}
.summary-box{background:var(--blue-50);border:1px solid var(--blue-200);border-radius:var(--radius);padding:18px}
.summary-box .total{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:1.1rem}
.summary-box .total .price{font-size:1.6rem;color:var(--blue-700)}
[data-theme="dark"] .summary-box .total .price{color:var(--blue-400)}

/* page */
.page{padding:32px 0 60px}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.page-head h1{font-size:clamp(1.75rem,4.5vw,2.5rem)}
.subnav{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}
.subnav a,.subnav button{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;border:2px solid var(--line);background:var(--surface);color:var(--text);text-decoration:none;font-weight:600;cursor:pointer;font:inherit}
.subnav a.active,.subnav button.active{background:var(--blue-600);border-color:var(--blue-600);color:#fff}
.loading{padding:40px;text-align:center;color:var(--muted)}
.spinner{width:28px;height:28px;border:3px solid var(--line);border-top-color:var(--blue-600);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 10px}
@keyframes spin{to{transform:rotate(360deg)}}
.rating{display:flex;gap:6px}
.rating button{width:48px;height:48px;border-radius:12px;border:2px solid var(--line);background:var(--surface);cursor:pointer;color:var(--muted)}
.rating button.on{border-color:var(--sun);color:var(--sun);background:var(--warn-bg)}
.map-list{display:flex;flex-direction:column;gap:8px}
.map-list .stop{display:grid;grid-template-columns:36px 1fr auto;gap:12px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:10px 12px}
.map-list .stop .n{width:36px;height:36px;border-radius:50%;background:var(--blue-600);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.map-list .stop .km{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);font-weight:700}
.chart{display:flex;align-items:flex-end;gap:6px;height:120px}
.chart .bar{flex:1;background:var(--blue-400);border-radius:6px 6px 0 0;min-height:4px;position:relative}
.chart .bar span{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:.7rem;white-space:nowrap;color:var(--muted)}
