/* ==========================================================================
   EasyTrack Perf — stylesheet
   Identity: "lake & basalt" — cool mist background, deep lake-blue primary,
   amber for the expected-progress line, condensed instrument-style headings.
   System fonts only (fast on slow networks, nothing to download).
   ========================================================================== */

:root {
    --ink: #18212B;
    --ink-soft: #3B4752;
    --muted: #5F6C76;
    --paper: #EDF2F1;
    --surface: #FFFFFF;
    --surface-alt: #F6F9F8;
    --line: #D3DDDB;
    --line-strong: #B5C3C1;
    --lake: #0E5B6A;
    --lake-deep: #093F4A;
    --lake-soft: #DCEBEC;
    --amber: #D18B17;
    --amber-soft: #FBEFD9;
    --good: #2A7F4F;
    --good-soft: #DFF1E6;
    --warn: #B5730C;
    --warn-soft: #FCEFD6;
    --bad: #B83A28;
    --bad-soft: #F8E1DC;
    --focus: #1D8FA3;

    --font-head: "Bahnschrift", "DIN Alternate", "DIN Next", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;

    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 14px;
    --shadow: 0 1px 2px rgba(16, 40, 48, .06), 0 4px 14px rgba(16, 40, 48, .05);
    --step: clamp(1rem, .96rem + .2vw, 1.0625rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--step);
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    font-variant-numeric: tabular-nums;
}

img, svg { max-width: 100%; }

a { color: var(--lake); text-underline-offset: 2px; }
a:hover { color: var(--lake-deep); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 3px;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.005em;
    margin: 0 0 .5em;
    color: var(--ink);
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 1.2rem + .7vw, 1.75rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 100;
    background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: var(--r-sm);
}
.skip-link:focus { left: 8px; color: #fff; }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .875em;
}
pre {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    padding: .8rem 1rem;
    border-radius: var(--r-md);
    overflow: auto;
}
.copyable { display: flex; gap: .5rem; align-items: stretch; }
.copyable code {
    flex: 1; background: var(--surface-alt); border: 1px solid var(--line);
    padding: .55rem .7rem; border-radius: var(--r-sm); word-break: break-all;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    padding: .62rem 1.05rem;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--lake); color: #fff; }
.btn-primary:hover { background: var(--lake-deep); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--lake); color: var(--lake-deep); }
.btn-ghost { background: transparent; color: var(--lake); }
.btn-ghost:hover { background: var(--lake-soft); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #E3B2A8; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #C7CDD1; }
.btn-google:hover { background: #F3F6F7; color: #1f1f1f; }
.btn-lg { padding: .8rem 1.35rem; font-size: 1rem; }
.btn-sm { padding: .38rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.link-btn {
    background: none; border: 0; padding: 0; font: inherit; color: var(--lake);
    cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn.danger { color: var(--bad); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.05rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field { display: grid; gap: .35rem; align-content: start; }
.field > label, .label {
    font-weight: 600;
    font-size: .92rem;
    color: var(--ink-soft);
}
.field .hint { font-size: .84rem; color: var(--muted); margin: 0; }
.field .error { font-size: .85rem; color: var(--bad); font-weight: 600; margin: 0; }
.input, select.input, textarea.input {
    width: 100%;
    font: inherit;
    font-size: .97rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    padding: .58rem .72rem;
    min-height: 2.6rem;
}
textarea.input { min-height: 5.5rem; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--lake); outline: 3px solid rgba(29, 143, 163, .25); outline-offset: 0; }
.field.has-error .input { border-color: var(--bad); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--lake); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .addon {
    display: flex; align-items: center; padding: 0 .7rem;
    background: var(--surface-alt); border: 1px solid var(--line-strong); border-left: 0;
    border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--muted); font-size: .9rem;
}
fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.15rem 1.15rem; margin: 0; }
legend { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; padding: 0 .4rem; }

.strength { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.strength > span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s; }

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--r-md);
    padding: .75rem 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    margin-bottom: 1rem;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
}
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--good-soft); border-color: #A9D5B9; color: #18492E; }
.alert-error { background: var(--bad-soft); border-color: #E9B4A9; color: #6E2216; }
.alert-warning { background: var(--warn-soft); border-color: #EBCB8F; color: #5E3C06; }
.alert-info { background: var(--lake-soft); border-color: #A9CED3; color: var(--lake-deep); }
.alert .icon { flex: none; margin-top: .15rem; }

/* ---------- Badges & status ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; font-weight: 700;
    padding: .18rem .55rem; border-radius: 999px;
    background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--line);
    white-space: nowrap;
}
.badge.is-good { background: var(--good-soft); color: var(--good); border-color: #B6DCC4; }
.badge.is-warn { background: var(--warn-soft); color: var(--warn); border-color: #EFD39E; }
.badge.is-bad { background: var(--bad-soft); color: var(--bad); border-color: #ECBDB3; }
.badge.is-info { background: var(--lake-soft); color: var(--lake-deep); border-color: #B5D5D9; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Progress bar with expected marker ---------- */
.pbar {
    position: relative;
    height: .62rem;
    background: #E2E9E8;
    border-radius: 999px;
    overflow: visible;
}
.pbar > .fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    border-radius: 999px;
    background: var(--lake);
    max-width: 100%;
}
.pbar.is-good > .fill { background: var(--good); }
.pbar.is-warn > .fill { background: var(--amber); }
.pbar.is-bad > .fill { background: var(--bad); }
.pbar > .expected {
    position: absolute; top: -4px; bottom: -4px; width: 2px;
    background: var(--ink); opacity: .55; border-radius: 1px;
}
.pbar-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Panels / tables ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.35rem;
}
.panel + .panel { margin-top: 1.1rem; }
.grid > .panel, .benefits > .panel { margin-top: 0; }
.panel-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: .6rem; margin-bottom: 1rem;
}
.panel-head h2, .panel-head h3 { margin: 0; }
.panel.flat { box-shadow: none; }
.panel-tight { padding: .9rem 1rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th {
    text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem;
    border-bottom: 1px solid var(--line-strong); padding: .55rem .6rem;
}
.table td { border-bottom: 1px solid var(--line); padding: .65rem .6rem; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }

.empty {
    text-align: center; padding: 2.4rem 1rem; color: var(--muted);
    border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-alt);
}
.empty h3 { color: var(--ink); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; }
dl.facts dd { margin: 0; font-weight: 500; }

/* ==========================================================================
   Public site (landing, auth)
   ========================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.wrap { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
    color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.brand img { max-height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.lang-switch a {
    padding: .32rem .6rem; font-size: .82rem; font-weight: 700; text-decoration: none; color: var(--ink-soft);
}
.lang-switch a[aria-current="true"] { background: var(--ink); color: #fff; }

.hero { padding: clamp(2.5rem, 5vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.hero .wrap {
    display: grid; gap: clamp(2rem, 4vw, 3.5rem);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
}
.hero h1 {
    font-size: clamp(2.2rem, 1.5rem + 3vw, 3.7rem);
    line-height: 1.02;
    letter-spacing: -.02em;
    margin-bottom: .45em;
    max-width: 14ch;
}
.hero .lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); color: var(--ink-soft); max-width: 46ch; }
.hero .btn-row { margin-top: 1.6rem; }
.hero-note { margin-top: 1rem; font-size: .88rem; color: var(--muted); }

/* Signature element: live-looking progress chart */
.hero-chart {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.15rem 1.2rem 1rem;
    box-shadow: var(--shadow);
}
.hero-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
.hero-chart-head strong { font-family: var(--font-head); font-size: 1.05rem; }
.hero-chart .score { font-family: var(--font-head); font-size: 2.3rem; font-weight: 700; line-height: 1; color: var(--lake); }
.hero-chart svg { display: block; width: 100%; height: auto; }
.hero-chart .curve { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.8s .25s ease-out forwards; }
.hero-chart .curve-dot { opacity: 0; animation: appear .3s 2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .82rem; color: var(--muted); margin-top: .5rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--lake); }
.chart-legend i.exp { background: repeating-linear-gradient(90deg, var(--amber) 0 5px, transparent 5px 8px); }
.chart-legend i.tgt { background: var(--ink); opacity: .45; }
.chart-legend i.proj { background: repeating-linear-gradient(90deg, var(--lake) 0 2px, transparent 2px 5px); }

.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.steps { display: grid; gap: 1.2rem; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 2.6rem; border-top: 3px solid var(--line-strong); }
.steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; top: .7rem; left: 0;
    font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--lake);
}
.steps li:first-child { border-top-color: var(--lake); }
.steps h3 { font-size: 1.12rem; }
.steps p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

.features { display: grid; gap: 1.6rem 2.2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature h3 { font-size: 1.08rem; display: flex; gap: .55rem; align-items: center; }
.feature h3 svg { color: var(--lake); flex: none; }
.feature p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; background: var(--surface); }
.compare th, .compare td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font-family: var(--font-head); font-size: 1rem; border-bottom: 2px solid var(--line-strong); }
.compare .us { background: var(--lake-soft); }
.compare thead .us { background: var(--lake); color: #fff; border-radius: var(--r-md) var(--r-md) 0 0; }
.compare .yes { color: var(--good); font-weight: 700; }
.compare .no { color: var(--bad); }
.compare .partial { color: var(--warn); }
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }

.benefits { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.benefits ul { margin: 0; padding-left: 1.15rem; }
.benefits li { margin-bottom: .45rem; color: var(--ink-soft); }

.faq details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-head); font-size: 1.3rem; line-height: 1; color: var(--lake); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .6rem 0 0; color: var(--ink-soft); max-width: 70ch; }

.cta-band { background: var(--lake-deep); color: #E8F2F2; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.cta-band h2 { color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.cta-band .btn-secondary { border-color: transparent; }

.site-footer { padding: 1.6rem 0; font-size: .88rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); }

/* Auth pages */
.auth-shell { min-height: calc(100vh - 130px); display: grid; place-items: start center; padding: clamp(1.5rem, 5vw, 3.5rem) 1rem; }
.auth-card {
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(1.4rem, 4vw, 2.1rem);
    box-shadow: var(--shadow);
}
.auth-card.wide { width: min(620px, 100%); }
.auth-card h1 { font-size: 1.7rem; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1.1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-foot { margin-top: 1.2rem; font-size: .93rem; text-align: center; color: var(--muted); }

/* ==========================================================================
   App shell
   ========================================================================== */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    background: var(--lake-deep);
    color: #CFE1E2;
    padding: 1.1rem .8rem 1.4rem;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 1.2rem;
}
.sidebar .brand { color: #fff; padding: .2rem .55rem; }
.sidebar .brand:hover { color: #fff; }
.nav { display: grid; gap: .15rem; }
.nav-title { font-size: .76rem; font-weight: 700; color: #8FB4B8; padding: .9rem .6rem .3rem; }
.nav a {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem .65rem; border-radius: var(--r-md);
    color: #D7E7E8; text-decoration: none; font-weight: 500; font-size: .95rem;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 3px 0 0 var(--amber); }
.nav a svg { flex: none; opacity: .9; }
.nav .count {
    margin-left: auto; background: var(--amber); color: #2B1B00; font-size: .72rem; font-weight: 800;
    padding: .05rem .45rem; border-radius: 999px;
}
.sidebar-foot { margin-top: auto; font-size: .85rem; display: grid; gap: .55rem; padding: 0 .55rem; }
.sidebar-foot .who { color: #fff; font-weight: 600; }
.sidebar-foot .role { color: #9FC1C4; font-size: .8rem; }
.sidebar-foot a, .sidebar-foot .link-btn { color: #CFE1E2; font-size: .88rem; }
.sidebar .lang-switch { border-color: rgba(255,255,255,.25); align-self: start; }
.sidebar .lang-switch a { color: #CFE1E2; }
.sidebar .lang-switch a[aria-current="true"] { background: #fff; color: var(--lake-deep); }

.topbar { display: none; }
.main { padding: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2.4rem) 3rem; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: .3rem 0 0; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: .35rem; }
.breadcrumb a { color: var(--muted); }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.stat .label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat .value { font-family: var(--font-head); font-size: 2rem; font-weight: 700; line-height: 1.1; margin-top: .2rem; }
.stat .meta { font-size: .85rem; color: var(--muted); }
.stat.is-good .value { color: var(--good); }
.stat.is-warn .value { color: var(--warn); }
.stat.is-bad .value { color: var(--bad); }

/* Big gauge on dashboard */
.gauge-card { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: center; }
.gauge { width: 168px; height: 168px; }
.gauge .num { font-family: var(--font-head); font-weight: 700; }

.obj-list { display: grid; gap: .8rem; }
.obj-item {
    display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 1rem; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem 1.1rem;
}
.obj-item h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.obj-item h3 a { color: var(--ink); text-decoration: none; }
.obj-item h3 a:hover { color: var(--lake); text-decoration: underline; }
.obj-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; font-size: .85rem; color: var(--muted); align-items: center; }
.obj-progress .pct { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }

.indicator {
    border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
    padding: 1.1rem 1.2rem;
}
.indicator + .indicator { margin-top: 1rem; }
.indicator-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; align-items: flex-start; }
.indicator-head h3 { margin: 0 0 .2rem; font-size: 1.08rem; }
.smart-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; margin: .8rem 0; }
.smart-grid div { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-md); padding: .45rem .55rem; font-size: .82rem; }
.smart-grid b { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--lake); }

.chart-box { margin-top: .6rem; }
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-box .axis text, .chart-box text { font-size: 13px; fill: var(--muted); font-family: var(--font-body); }

.grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* SMART form steps */
.smart-form fieldset { position: relative; padding-left: 3.2rem; }
.smart-form .letter {
    position: absolute; left: .9rem; top: .9rem;
    width: 1.75rem; height: 1.75rem; border-radius: 6px;
    display: grid; place-items: center;
    background: var(--lake); color: #fff; font-family: var(--font-head); font-weight: 700;
}
.ai-box { border: 1px solid #B5D5D9; background: #F2F8F8; border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.ai-box h3 { font-size: 1.02rem; display: flex; gap: .45rem; align-items: center; }
.ai-result { margin-top: .8rem; display: grid; gap: .7rem; }
.ai-box ul { font-size: .93rem; }
details.record { margin-top: 1rem; }
details.record > summary { list-style: none; display: inline-flex; }
details.record > summary::-webkit-details-marker { display: none; }
details.record[open] > summary { display: none; }
.ai-result ul { margin: 0; padding-left: 1.1rem; }
.score-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.score-pill { font-size: .8rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.score-pill.ok { color: var(--good); border-color: #B6DCC4; }
.score-pill.ko { color: var(--bad); border-color: #ECBDB3; }

/* Evaluation report */
.verdict {
    display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center;
    padding: 1.4rem 1.5rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
}
.verdict .big { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: 1; }
.verdict.is-good { border-left: 6px solid var(--good); }
.verdict.is-warn { border-left: 6px solid var(--amber); }
.verdict.is-bad { border-left: 6px solid var(--bad); }
.report-section h3 { margin-top: .2rem; }
.report-section ul { padding-left: 1.15rem; }
.report-section li { margin-bottom: .45rem; }
.resource {
    display: grid; gap: .25rem; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-alt);
}
.resource + .resource { margin-top: .6rem; }
.resource .title { font-weight: 600; }

.notif { display: grid; gap: .2rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.notif.unread { background: #F4FAFA; box-shadow: inset 3px 0 0 var(--lake); }
.notif:last-child { border-bottom: 0; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs a {
    padding: .6rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem;
    border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--lake-deep); border-bottom-color: var(--lake); }

.pagination { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; }
.pagination a, .pagination span {
    padding: .35rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm);
    text-decoration: none; font-size: .88rem; background: var(--surface);
}
.pagination span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

.inline-form { display: inline; }

/* ==========================================================================
   Installer
   ========================================================================== */
.install-body { background: var(--paper); }
.install-shell { width: min(820px, 100% - 2rem); margin: 0 auto; padding: 2rem 0 3rem; }
.install-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.stepper { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .3rem; margin-bottom: .5rem; list-style: none; padding: 0; }
.stepper li { height: 6px; border-radius: 3px; background: var(--line); }
.stepper li.done { background: var(--lake); }
.stepper li.current { background: var(--amber); }
.stepper-label { font-size: .88rem; color: var(--muted); margin-bottom: 1.2rem; }
.install-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.2rem, 4vw, 2rem); box-shadow: var(--shadow); }
.install-card h1 { font-size: 1.75rem; }
.req-table td:last-child { text-align: right; white-space: nowrap; }
.req-ok { color: var(--good); font-weight: 700; }
.req-fail { color: var(--bad); font-weight: 700; }
.req-warn { color: var(--warn); font-weight: 700; }
.lang-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.lang-choice button {
    font: inherit; cursor: pointer; text-align: left;
    padding: 1.2rem; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface);
}
.lang-choice button:hover, .lang-choice button:focus-visible { border-color: var(--lake); }
.lang-choice strong { display: block; font-family: var(--font-head); font-size: 1.3rem; }
.service-block { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.2rem; }
.service-block:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.toggle-target[hidden] { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; width: min(290px, 85vw); z-index: 50;
        transform: translateX(-100%); transition: transform .2s ease;
    }
    .shell.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 30, 35, .45); }
    .topbar {
        display: flex; align-items: center; justify-content: space-between; gap: .6rem;
        background: var(--lake-deep); color: #fff; padding: .55rem 1rem; position: sticky; top: 0; z-index: 40;
    }
    .topbar .brand { color: #fff; font-size: 1.08rem; }
    .topbar button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--r-md); padding: .4rem .55rem; cursor: pointer; }
    .grid-main, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .hero .wrap { grid-template-columns: 1fr; }
    .benefits { grid-template-columns: 1fr; }
    .smart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .features, .steps { grid-template-columns: 1fr; }
    .obj-item { grid-template-columns: 1fr; }
    .gauge-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .verdict { grid-template-columns: 1fr; }
    .site-nav .btn-ghost { display: none; }
    .lang-choice { grid-template-columns: 1fr; }
    dl.facts { grid-template-columns: 1fr; }
    .stat .value { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .hero-chart .curve { stroke-dashoffset: 0; }
    .hero-chart .curve-dot { opacity: 1; }
}

/* ==========================================================================
   Print (evaluation reports, dashboard)
   ========================================================================== */
@media print {
    body { background: #fff; font-size: 11pt; }
    .sidebar, .topbar, .no-print, .site-header, .site-footer, .btn, .tabs { display: none !important; }
    .shell { display: block; }
    .main { padding: 0; }
    .panel, .indicator, .verdict, .stat { border-color: #bbb; break-inside: avoid; box-shadow: none; }
    a { color: inherit; text-decoration: none; }
    .print-only { display: block !important; }
}
.print-only { display: none; }
