/* ============================================================
   GlucoTrack - Soft & Clinical design system
   ============================================================ */

:root {
    --bg:        #F4F6F7;
    --surface:   #FFFFFF;
    --surface-2: #EEF2F3;
    --ink:       #13232A;
    --ink-2:     #475961;
    --ink-3:     #7A8A91;
    --line:      #E2E8EA;
    --line-2:    #CFD9DC;

    --teal:      #0F6E6E;
    --teal-600:  #0B5B5B;
    --teal-50:   #E5F1F0;
    --teal-100:  #CCE4E2;

    --low:       #B42318;   /* below range */
    --low-bg:    #FDECEA;
    --in:        #17734A;   /* in range */
    --in-bg:     #E6F4EC;
    --high:      #A15C07;   /* above range */
    --high-bg:   #FEF3E2;

    --radius:    16px;
    --radius-sm: 10px;
    --shadow:    0 1px 2px rgba(19, 35, 42, .04), 0 6px 20px rgba(19, 35, 42, .05);
    --shadow-lg: 0 2px 6px rgba(19, 35, 42, .05), 0 18px 40px rgba(19, 35, 42, .10);
    --ring:      0 0 0 3px rgba(15, 110, 110, .22);

    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --tabbar-h: 68px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #0E1518;
        --surface:   #152024;
        --surface-2: #1B2A2F;
        --ink:       #E6EEF0;
        --ink-2:     #A9BABF;
        --ink-3:     #7D8F95;
        --line:      #22333A;
        --line-2:    #2E434B;

        --teal:      #4FB3AC;
        --teal-600:  #6CC6BF;
        --teal-50:   #16302F;
        --teal-100:  #1E4341;

        --low:       #F2867C;
        --low-bg:    #3A1D1B;
        --in:        #6FCF9C;
        --in-bg:     #16322A;
        --high:      #F2B45C;
        --high-bg:   #3A2B14;

        --shadow:    0 1px 2px rgba(0, 0, 0, .3);
        --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
        --ring:      0 0 0 3px rgba(79, 179, 172, .3);
    }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-600); }
img, svg { display: block; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: 1.65rem; font-weight: 700; }
h2 { font-size: 1.1rem;  font-weight: 700; }
h3 { font-size: .95rem;  font-weight: 600; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.muted { color: var(--ink-3); }
.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; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand--lg { font-size: 1.25rem; }
.brand--lg .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.brand--lg .brand-mark svg { width: 24px; height: 24px; }

/* ---------- Top bar (desktop + mobile) ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
}
.topbar-inner { max-width: 1080px; margin: 0 auto; height: 64px; padding: 0 20px; display: flex; align-items: center; gap: 24px; }

.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a.is-active { background: var(--teal-50); color: var(--teal); }

.signout { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: .9rem; padding: 8px 10px; border-radius: 10px; }
.signout:hover { color: var(--ink); background: var(--surface-2); }
.signout .icon { width: 18px; height: 18px; }

/* ---------- Bottom tab bar (mobile only) ---------- */
.tabbar { display: none; }

@media (max-width: 767px) {
    .topnav { display: none; }
    .signout span { display: none; }
    .topbar-inner { height: 56px; }

    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        background: var(--surface);
        border-top: 1px solid var(--line);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        box-shadow: 0 -6px 24px rgba(19, 35, 42, .06);
    }
    .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; color: var(--ink-3); font-size: .7rem; font-weight: 600; }
    .tabbar a .icon { width: 22px; height: 22px; }
    .tabbar a.is-active { color: var(--teal); }
    .tabbar a.is-active .icon { stroke-width: 2.2; }

    body.app { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Page layout ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 20px 48px; }
.page--narrow { max-width: 600px; }
@media (min-width: 768px) { .page { padding: 40px 28px 64px; } }

.page-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--ink-3); margin-top: 4px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 900px) {
    .grid--main { grid-template-columns: 1.35fr 1fr; align-items: start; }
    .grid--2 { grid-template-columns: 1fr 1fr; }
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > * { margin: 0 !important; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
@media (min-width: 768px) { .card { padding: 24px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head a { font-size: .88rem; font-weight: 600; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }

/* ---------- Big stat ---------- */
.stat-label { font-size: .82rem; font-weight: 600; color: var(--ink-3); }
.stat-value { font-size: 3rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .95rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.stat-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; color: var(--ink-3); font-size: .88rem; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.mini-stat { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.mini-stat b { display: block; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-stat span { font-size: .75rem; color: var(--ink-3); font-weight: 600; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--plain::before { display: none; }
.badge--low  { background: var(--low-bg);  color: var(--low); }
.badge--in   { background: var(--in-bg);   color: var(--in); }
.badge--high { background: var(--high-bg); color: var(--high); }
.badge--tag  { background: var(--teal-50); color: var(--teal); }
.badge--tag::before { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px;
    border: 1px solid transparent; border-radius: 12px;
    font: inherit; font-weight: 700; font-size: .95rem;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-600); color: #fff; }
@media (prefers-color-scheme: dark) { .btn--primary, .btn--primary:hover { color: #0E1518; } }

.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { background: var(--surface-2); color: var(--ink); }

.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: var(--teal-50); }

.btn--danger { background: transparent; color: var(--low); border-color: var(--line-2); }
.btn--danger:hover { background: var(--low-bg); color: var(--low); }

.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
.btn--icon { min-height: 40px; width: 40px; padding: 0; border-radius: 10px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }

/* Quick action tiles */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); font-weight: 700; transition: border-color .15s, transform .15s; }
.action:hover { color: var(--ink); border-color: var(--teal-100); transform: translateY(-1px); }
.action-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; }
.action small { display: block; font-weight: 500; color: var(--ink-3); font-size: .8rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink-2); margin-bottom: 7px; }
.hint { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }

.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], select {
    width: 100%; min-height: 48px; padding: 0 14px;
    font: inherit; font-size: 16px; /* 16px stops iPhone zooming in */
    color: var(--ink); background: var(--surface);
    border: 1px solid var(--line-2); border-radius: 12px;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8A91' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px;
}
input:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
input::placeholder { color: var(--ink-3); opacity: .8; }

.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
input[type="date"], input[type="time"] { min-width: 0; display: block; }

/* Big number entry for readings */
.big-input { position: relative; }
.big-input input {
    min-height: 88px; padding: 0 110px 0 20px;
    font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
    border-radius: 16px;
}
.big-input .unit { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--ink-3); background: var(--surface-2); padding: 6px 12px; border-radius: 10px; font-size: .9rem; }

/* Chip selector (radio buttons styled as pills) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .15s; }
.chip span:hover { border-color: var(--teal-100); }
.chip input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (prefers-color-scheme: dark) { .chip input:checked + span { color: #0E1518; } }
.chip input:focus-visible + span { box-shadow: var(--ring); }

/* Segmented control */
.segmented { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.segmented a, .segmented button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: .85rem; color: var(--ink-2); padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.segmented .is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: .9rem; font-weight: 500; border: 1px solid transparent; }
.alert--error   { background: var(--low-bg); color: var(--low); }
.alert--success { background: var(--in-bg);  color: var(--in); }
.alert--info    { background: var(--teal-50); color: var(--teal); }

/* ---------- Lists & timeline ---------- */
.list { list-style: none; padding: 0; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item:last-child { padding-bottom: 0; }
.list-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--ink-2); }
.list-icon .icon { width: 18px; height: 18px; }
.list-icon--sugar { background: var(--teal-50); color: var(--teal); }
.list-icon--food  { background: var(--high-bg); color: var(--high); }
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-sub { color: var(--ink-3); font-size: .84rem; margin-top: 2px; overflow-wrap: anywhere; }
.list-end { text-align: right; flex-shrink: 0; }
.list-time { font-size: .82rem; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }

.day-group + .day-group { margin-top: 28px; }
.day-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 10px; }
.day-label h2 { font-size: .95rem; }
.day-label span { font-size: .82rem; color: var(--ink-3); font-weight: 600; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); }
.empty .icon { width: 28px; height: 28px; margin: 0 auto 10px; color: var(--ink-3); }
.empty p { margin-bottom: 14px; }

/* ---------- Chart ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .band { fill: var(--in-bg); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--teal); stroke-width: 2; }
.chart .dot--low  { stroke: var(--low); }
.chart .dot--high { stroke: var(--high); }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); font-weight: 600; }

/* ---------- Food entry ---------- */
.food-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 124px 46px; gap: 8px; align-items: start; padding: 12px; background: var(--surface-2); border-radius: 14px; margin-bottom: 10px; }
.food-row .food-name { position: relative; }
.food-row .remove { min-height: 48px; width: 46px; }
.food-row .nutri { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-3); font-weight: 500; }
.food-row .nutri:empty { display: none; }
.food-row .nutri b { color: var(--ink); font-weight: 700; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
@media (max-width: 560px) {
    .food-row { grid-template-columns: minmax(0, 1fr) 124px 46px; padding: 10px; }
    .food-row .food-name { grid-column: 1 / -1; }
}

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); list-style: none; padding: 6px; margin: 0; max-height: 320px; overflow-y: auto; }
.suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li:hover, .suggest li.is-active { background: var(--teal-50); }
.suggest li b { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); }
.suggest li span { font-size: .78rem; color: var(--ink-3); }
.suggest .suggest-note { cursor: default; color: var(--ink-3); font-size: .85rem; }
.suggest .suggest-note:hover { background: transparent; }

.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 20px; }
.total { background: var(--teal-50); border-radius: 14px; padding: 14px 16px; }
.total b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.total span { font-size: .78rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }

.source-note { font-size: .78rem; color: var(--ink-3); margin-top: 14px; }

/* ---------- Auth pages ---------- */
body.auth {
    background:
        radial-gradient(1000px 500px at 50% -10%, var(--teal-50), transparent 70%),
        var(--bg);
}
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 18px calc(32px + env(safe-area-inset-bottom)); gap: 22px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px 22px; }
@media (min-width: 480px) { .auth-card { padding: 36px 32px; } }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-card .lead { color: var(--ink-3); margin-bottom: 24px; font-size: .93rem; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: .88rem; font-weight: 600; }
.auth-foot { font-size: .8rem; color: var(--ink-3); }
.code-input { text-align: center; letter-spacing: .5em; font-size: 1.5rem !important; font-weight: 700; padding-left: calc(14px + .5em) !important; }

/* ---------- Tables (settings, etc.) ---------- */
.divider { height: 1px; background: var(--line); margin: 22px 0; border: 0; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ---------- 7-day trend chart (responsive) ---------- */
.trend { position: relative; height: 190px; margin: 8px 0 0 34px; }
.trend svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trend .band { fill: var(--in-bg); }
.trend .gridline { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend .line { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .9; }
.trend .pt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--teal); }
.trend .pt--low  { border-color: var(--low); background: var(--low); }
.trend .pt--high { border-color: var(--high); background: var(--high); }
.trend .ylab { position: absolute; left: -34px; width: 28px; text-align: right; transform: translateY(-50%); font-size: .7rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.trend-x { display: flex; justify-content: space-between; margin: 10px 0 0 34px; font-size: .72rem; font-weight: 600; color: var(--ink-3); }
.trend-x span { flex: 1; text-align: center; }
.trend-x span.is-today { color: var(--teal); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-3); font-weight: 600; margin-top: 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.card-sub { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.actions .action { min-height: 76px; }
.page-head + .actions { margin: -6px 0 16px; }
@media (min-width: 900px) { .actions--wide { grid-template-columns: repeat(2, minmax(0, 320px)); } }

@media (max-width: 420px) {
    .action small { display: none; }
    .action { min-height: 64px; padding: 12px; }
    .mini-stat { padding: 10px; }
}

/* Quiet delete buttons in lists */
.list-end .btn--danger { color: var(--ink-3); border-color: transparent; background: transparent; }
.list-end .btn--danger:hover { color: var(--low); background: var(--low-bg); }

/* ============================================================
   Landing page
   ============================================================ */
body.landing { background: var(--surface); }
.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.lp-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.lp-nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lp-nav-links { display: flex; align-items: center; gap: 6px; }
.lp-nav-links > a:not(.btn) { color: var(--ink-2); font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 10px; }
.lp-nav-links > a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 720px) { .lp-hide-sm { display: none; } }

/* Hero */
.lp-hero { background: radial-gradient(900px 480px at 85% 0%, var(--teal-50), transparent 70%), var(--bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.lp-hero-grid { display: grid; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
@media (min-width: 920px) { .lp-hero-grid { grid-template-columns: 1.05fr .95fr; padding-top: 88px; padding-bottom: 96px; } }
.lp-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; max-width: 13ch; }
.lp-lead { font-size: 1.08rem; color: var(--ink-2); margin-top: 18px; max-width: 46ch; line-height: 1.6; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.lp-cta .btn { min-height: 52px; padding: 0 24px; font-size: 1rem; }
@media (max-width: 480px) { .lp-cta .btn { flex: 1 1 100%; } }
.lp-ticks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; color: var(--ink-3); font-size: .88rem; font-weight: 600; }
.lp-ticks li::before { content: "✓"; color: var(--teal); font-weight: 800; margin-right: 7px; }

.lp-preview { position: relative; max-width: 460px; width: 100%; justify-self: center; padding-bottom: 40px; }
.lp-pcard { box-shadow: var(--shadow-lg); }
.lp-trend { height: 130px; margin: 22px 0 4px; }
.lp-pcard--float { position: absolute; left: -16px; right: 28px; bottom: 0; padding: 14px 16px; }
@media (min-width: 920px) { .lp-pcard--float { left: -48px; } }
@media (max-width: 480px) { .lp-pcard--float { left: 10px; right: 10px; } .lp-pcard--float .list-end { display: none; } }

/* Sections */
.lp-section { padding: 72px 0; }
@media (min-width: 768px) { .lp-section { padding: 96px 0; } }
.lp-section--tint { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-section-head { max-width: 620px; margin-bottom: 40px; }
.lp-section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }

.lp-features { display: grid; gap: 16px; }
@media (min-width: 640px) { .lp-features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .lp-features { grid-template-columns: repeat(4, 1fr); } }
.lp-feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.lp-feature h3 { font-size: 1.02rem; margin: 18px 0 8px; }
.lp-feature p { color: var(--ink-2); font-size: .93rem; }

.lp-steps { list-style: none; padding: 0; display: grid; gap: 16px; counter-reset: none; }
@media (min-width: 768px) { .lp-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.lp-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.lp-step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; margin-bottom: 16px; }
@media (prefers-color-scheme: dark) { .lp-step-num { color: #0E1518; } }
.lp-steps h3 { font-size: 1.02rem; margin-bottom: 6px; }
.lp-steps p { color: var(--ink-2); font-size: .93rem; }

.lp-faq-wrap { max-width: 760px; }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; font-weight: 700; position: relative; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 500; color: var(--teal); transition: transform .2s; }
.lp-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.lp-faq details p { color: var(--ink-2); padding: 0 36px 20px 0; }

.lp-band { background: var(--teal); color: #fff; border-radius: 24px; padding: 48px 24px; text-align: center; }
.lp-band h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.lp-band p { opacity: .9; margin: 10px 0 26px; }
.lp-band-btn { background: #fff; color: var(--teal); min-height: 52px; padding: 0 26px; }
.lp-band-btn:hover { background: var(--teal-50); color: var(--teal-600); }
@media (prefers-color-scheme: dark) {
    .lp-band { background: var(--teal-100); }
    .lp-band-btn { background: var(--teal); color: #0E1518; }
}

.lp-footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: .85rem; }
.lp-footer-inner { display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; }
html { scroll-behavior: smooth; }
