/* ============================================================
   CompanyTracker — design system  v4  "Workbench"
   A clean, professional delivery-intelligence console in the spirit
   of GitLab: neutral gray surfaces, fine 1px borders, dense tables,
   a single restrained blue accent. Flat, calm, legible.
   IBM Plex Sans for UI, IBM Plex Mono for data. Light default +
   dark via [data-theme] on <html>.
   ============================================================ */

:root,
:root[data-theme="light"] {
    color-scheme: light;

    --ink-900: #f7f7f8;   /* app canvas */
    --ink-850: #ffffff;   /* inputs / wells / sidebar */
    --ink-800: #f0f0f1;
    --panel:   #ffffff;   /* cards */
    --panel-2: #f3f3f5;   /* hover / elevated / chips */
    --border:      #d6d6da;   /* default border */
    --border-soft: #e8e8ec;   /* dividers */

    --text:       #1f1f24;
    --text-muted: #56565e;
    --text-dim:   #86868f;

    /* restrained blue — the single accent (links, primary, active nav) */
    --accent:        #2563eb;
    --accent-strong: #1d4ed8;
    --accent-fill:   #2563eb;   /* button / chip fill */
    --accent-ink:    #ffffff;   /* text on accent fills */
    --accent-glow:   rgba(37, 99, 235, 0.30);   /* focus ring */
    --accent-soft:   rgba(37, 99, 235, 0.09);    /* active-nav / tint bg */

    --success:    #1a7f37;
    --success-bg: rgba(26, 127, 55, 0.10);
    --warn:       #9a6700;
    --warn-bg:    rgba(154, 103, 0, 0.10);
    --danger:     #d1242f;
    --danger-bg:  rgba(209, 36, 47, 0.09);
    --info:       #2563eb;
    --info-bg:    rgba(37, 99, 235, 0.09);

    --shadow:    0 8px 24px -10px rgba(31, 31, 36, 0.18);
    --shadow-sm: 0 1px 2px rgba(31, 31, 36, 0.07);
    --scrim:     rgba(20, 20, 24, 0.45);
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --ink-900: #16161a;   /* app canvas */
    --ink-850: #1c1c22;   /* inputs / wells / sidebar */
    --ink-800: #202028;
    --panel:   #1c1c22;   /* cards */
    --panel-2: #26262e;   /* hover / elevated / chips */
    --border:      #34343d;
    --border-soft: #2a2a32;

    --text:       #ececf0;
    --text-muted: #b2b2bd;
    --text-dim:   #7d7d89;

    --accent:        #6ea0ff;   /* readable blue on dark */
    --accent-strong: #8db6ff;
    --accent-fill:   #3b82f6;
    --accent-ink:    #ffffff;
    --accent-glow:   rgba(110, 160, 255, 0.32);
    --accent-soft:   rgba(110, 160, 255, 0.12);

    --success:    #4ac26b;
    --success-bg: rgba(74, 194, 107, 0.14);
    --warn:       #e3a008;
    --warn-bg:    rgba(227, 160, 8, 0.14);
    --danger:     #ff6b6b;
    --danger-bg:  rgba(255, 107, 107, 0.14);
    --info:       #6ea0ff;
    --info-bg:    rgba(110, 160, 255, 0.14);

    --shadow:    0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --scrim:     rgba(0, 0, 0, 0.55);
}

:root {
    --font-display: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-ui: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --font-serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;

    --radius: 10px;
    --radius-sm: 7px;
    --radius-xs: 5px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
    font-family: var(--font-ui);
    background: var(--ink-900);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .2s ease, color .2s ease;
}
.app-shell, .landing, .auth-screen { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
    margin: 0 0 .4em; color: var(--text);
}
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

.eyebrow, .nav-section, .card.metric h3, .filter-bar .field label, .src-label, .stat-band .s .l {
    font-family: var(--font-mono);
}

/* ============================================================ App shell */
.app-shell { display: flex; min-height: 100vh; }
.nav-cb { position: absolute; opacity: 0; pointer-events: none; }
.nav-scrim { display: none; }

.sidebar {
    width: 244px; flex: 0 0 244px;
    background: var(--ink-850);
    border-right: 1px solid var(--border-soft);
    display: flex; flex-direction: column; padding: 16px 12px;
    position: sticky; top: 0; height: 100vh; z-index: 50;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 18px; font-family: var(--font-display);
    font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text);
}
.brand .logo {
    width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
    background: var(--accent-fill); color: var(--accent-ink);
    display: grid; place-items: center; font-family: var(--font-mono);
    font-weight: 700; font-size: .8rem;
}

/* flex:1 + min-height:0 + overflow lets the link list scroll when it exceeds the viewport
   (brand stays pinned at top, .sidebar-foot at bottom) — needed on short/mobile screens. */
.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.nav-section {
    font-size: .64rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--text-dim); padding: 16px 10px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-weight: 500; font-size: .9rem;
    transition: background .12s, color .12s, box-shadow .12s;
}
.nav-link svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .75; }
.nav-link:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.nav-link.active svg { opacity: 1; color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); }

/* compact collection-status widget (sidebar) */
.coll-status { display: block; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
    background: var(--panel); margin-bottom: 6px; transition: background .12s, border-color .12s; }
.coll-status:hover { background: var(--panel-2); border-color: var(--border); text-decoration: none; }
.coll-row { display: flex; align-items: center; gap: 7px; }
.coll-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--text-dim); }
.coll-status.ok .coll-dot { background: var(--success); }
.coll-status.run .coll-dot { background: var(--accent); animation: coll-pulse 1.4s ease-in-out infinite; }
.coll-status.fail .coll-dot { background: var(--danger); }
.coll-label { font-size: .78rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.coll-meta { margin-left: auto; padding-left: 6px; font-family: var(--font-mono); font-size: .66rem; color: var(--text-muted); white-space: nowrap; flex: 0 0 auto; }
.coll-bar { display: block; height: 3px; margin-top: 7px; background: var(--ink-800); border-radius: 999px; overflow: hidden; }
.coll-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
@keyframes coll-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    min-height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 24px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--ink-850);
    position: sticky; top: 0; z-index: 30;
}
.topbar .title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { padding: 28px; max-width: 1320px; width: 100%; margin: 0 auto; }

.icon-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--panel); color: var(--text-muted); cursor: pointer; padding: 0;
    transition: background .12s, color .12s, border-color .12s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.hamburger { display: none; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 .18em; }
.page-head .sub { color: var(--text-muted); margin: 0; max-width: 64ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-head h2 { margin: 0; }
.stack { display: flex; flex-direction: column; }
.stack-gap { display: flex; flex-direction: column; gap: 14px; }

.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip .uname { font-size: .88rem; color: var(--text-muted); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--accent-fill);
    display: grid; place-items: center; font-family: var(--font-mono);
    font-size: .72rem; font-weight: 700; color: var(--accent-ink); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================ Cards & grid */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    background: var(--panel); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.card h3 { font-family: var(--font-ui); font-size: .82rem; color: var(--text-muted); font-weight: 600; }

.card.metric { position: relative; overflow: hidden; }
.card.metric h3 { text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; color: var(--text-dim); font-weight: 500; }
.card.metric:hover { border-color: var(--border); box-shadow: var(--shadow); }
.card.metric::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent); opacity: 0; transition: opacity .15s;
}
.card.metric:hover::after { opacity: 1; }

.stat { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); }
.stat-row { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
    padding: 2px 8px; border-radius: var(--radius-xs); border: 1px solid var(--border);
    color: var(--text-muted); background: var(--panel-2);
}
.badge.ok     { color: var(--success); border-color: color-mix(in srgb, var(--success) 36%, transparent); background: var(--success-bg); }
.badge.info   { color: var(--info);    border-color: color-mix(in srgb, var(--info) 36%, transparent);    background: var(--info-bg); }
.badge.warn   { color: var(--warn);    border-color: color-mix(in srgb, var(--warn) 36%, transparent);    background: var(--warn-bg); }
.badge.danger { color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 36%, transparent);  background: var(--danger-bg); }
.badge.brand  { color: var(--accent);  border-color: color-mix(in srgb, var(--accent) 40%, transparent);  background: var(--accent-soft); }

/* ============================================================ Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: var(--font-ui); font-weight: 600; font-size: .875rem; line-height: 1;
    padding: 9px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--panel); color: var(--text);
    cursor: pointer; transition: background .12s, border-color .12s, color .12s;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--accent); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: var(--accent-strong); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--border); }
.btn.sm { padding: 6px 11px; font-size: .8rem; }
.btn.icon { padding: 8px; width: 36px; }

/* ============================================================ Auth */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-aux { position: fixed; top: 18px; right: 18px; z-index: 5; }
.auth-card {
    width: 100%; max-width: 420px; text-align: center; background: var(--panel);
    border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 40px 34px; box-shadow: var(--shadow);
}
.auth-card .logo-lg {
    width: 52px; height: 52px; border-radius: 12px; margin: 0 auto 18px;
    background: var(--accent-fill); display: grid; place-items: center; color: var(--accent-ink);
    font-family: var(--font-mono); font-weight: 700; font-size: 1.2rem;
}
.auth-card h1 { font-size: 1.45rem; }

/* ============================================================ Forms */
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.field .hint { font-size: .76rem; color: var(--text-dim); margin: 5px 0 0; }
.input, select.input, textarea.input {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--ink-850); border: 1px solid var(--border); color: var(--text);
    font-family: var(--font-ui); font-size: .92rem; outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--text-dim); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
select.input { cursor: pointer; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: .8rem; margin: 18px 0; font-family: var(--font-mono); }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border-soft); flex: 1; }
.alert { text-align: left; font-size: .86rem; padding: 11px 13px; border-radius: var(--radius-sm);
    background: var(--danger-bg); border: 1px solid color-mix(in srgb, var(--danger) 36%, transparent); color: var(--danger); margin-bottom: 16px; }
.notice { text-align: left; font-size: .86rem; padding: 11px 13px; border-radius: var(--radius-sm);
    background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 36%, transparent); color: var(--info); margin-bottom: 16px; }

details { border-top: 1px solid var(--border-soft); padding: 10px 0; }
details > summary { cursor: pointer; font-weight: 600; padding: 4px 0; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--text); }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; color: var(--accent); font-weight: 700; width: 1ch; }
details[open] > summary::before { content: "–"; }

/* ============================================================ Progress / tables */
.progress { height: 6px; background: var(--ink-800); border-radius: 999px; overflow: hidden; border: 1px solid var(--border-soft); }
.progress-bar { height: 100%; background: var(--accent); transition: width .4s ease; border-radius: 999px; }
.run-row { padding: 13px 0; border-top: 1px solid var(--border-soft); }
.run-row:first-child { border-top: 0; }

.table-wrap { width: 100%; overflow-x: auto; }
table.metrics td { padding: 8px 6px; border-top: 1px solid var(--border-soft); }
table.metrics td:last-child { text-align: right; font-family: var(--font-mono); }
table.data { width: 100%; border-collapse: collapse; }
table.data thead th { text-align: left; color: var(--text-dim); font-family: var(--font-mono); font-size: .7rem;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 500; padding: 10px 11px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data tbody td { padding: 11px 11px; border-top: 1px solid var(--border-soft); vertical-align: middle; }
table.data tbody tr:hover td { background: var(--panel-2); }

/* ============================================================ Tabs / filters / pager */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-soft); margin: 18px 0; overflow-x: auto; }
.tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted);
    font: inherit; font-weight: 600; font-size: .9rem; padding: 11px 14px; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 7px; transition: color .12s, border-color .12s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .count { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); background: var(--panel-2); border-radius: var(--radius-xs); padding: 1px 6px; }
.tab.active .count { color: var(--accent-ink); background: var(--accent); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.filter-bar .field { margin-bottom: 0; min-width: 150px; }
.filter-bar .field label { font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; }
.filter-bar select.input { padding: 8px 10px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pager .info { color: var(--text-muted); font-size: .84rem; font-family: var(--font-mono); }
.pager .controls { display: flex; gap: 8px; align-items: center; }
.k-link { font-family: var(--font-mono); font-size: .82rem; white-space: nowrap; }
.ext-ico { width: 13px; height: 13px; vertical-align: -1px; opacity: .55; }
a.k-link:hover .ext-ico { opacity: 1; }
.cell-title { display: block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td .num, .num { font-family: var(--font-mono); font-size: .85rem; }
.pos { color: var(--success); } .neg { color: var(--danger); }
.empty { text-align: center; color: var(--text-muted); padding: 44px 16px; }
.acct-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.person-id { display: flex; align-items: center; gap: 16px; }
.person-id .avatar { width: 56px; height: 56px; border-radius: 50%; font-size: 1.15rem; }

/* ============================================================ Modal */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
    background: var(--scrim);
    backdrop-filter: blur(2px); animation: fade .15s ease;
}
.modal {
    width: 100%; max-width: 600px; max-height: 88vh; overflow-y: auto;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); animation: pop .16s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: var(--panel); }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-head .back { margin-right: auto; }
.modal-body { padding: 20px; }

.provider-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.provider-card {
    display: flex; align-items: center; gap: 12px; text-align: left;
    padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
    background: var(--panel); cursor: pointer; transition: border-color .12s, background .12s;
    font: inherit; color: var(--text); width: 100%;
}
.provider-card:hover { border-color: var(--accent); background: var(--panel-2); }
.provider-card .pico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 1.2rem; background: var(--panel-2); border: 1px solid var(--border-soft); flex: 0 0 auto; }
.provider-logo { display: block; width: 22px; height: 22px; }
.pico .provider-logo { width: 22px; height: 22px; }
.selected-head .pico .provider-logo { width: 26px; height: 26px; }
.prov-inline { display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--text); }
.prov-inline .provider-logo { width: 18px; height: 18px; }
.src-pill .i { display: inline-grid; place-items: center; }
.src-pill .provider-logo { width: 20px; height: 20px; }
.provider-card .pname { display: block; font-weight: 600; }
.provider-card .pdesc { display: block; font-size: .8rem; color: var(--text-dim); margin-top: 2px; }
.provider-form .selected-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.provider-form .selected-head .pico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; background: var(--panel-2); border: 1px solid var(--border-soft); }

/* ============================================================ Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 440px;
    border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.msg { max-width: 78%; padding: 12px 15px; border-radius: 12px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--accent-fill); color: var(--accent-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; font-weight: 500; }
.msg.assistant { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border-soft); border-bottom-left-radius: 4px; }
.msg.assistant > p:first-child { margin-top: 0; }
.msg.assistant > p:last-child { margin-bottom: 0; }
.msg.assistant p { margin: .5em 0; }
.msg.assistant ul, .msg.assistant ol { margin: .5em 0; padding-left: 1.3em; }
.msg.assistant li { margin: .2em 0; }
.msg.assistant a { color: var(--accent); text-decoration: underline; }
.msg.assistant code { font-family: var(--font-mono); font-size: .85em; background: var(--ink-800); border: 1px solid var(--border-soft); border-radius: 5px; padding: 1px 5px; }
.msg.assistant pre { background: var(--ink-800); border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px; overflow-x: auto; }
.msg.assistant pre code { border: 0; padding: 0; background: none; }
.msg.assistant h1, .msg.assistant h2, .msg.assistant h3 { font-size: 1rem; margin: .6em 0 .3em; }
.msg.assistant table { border-collapse: collapse; margin: .5em 0; }
.msg.assistant th, .msg.assistant td { border: 1px solid var(--border-soft); padding: 5px 9px; text-align: left; }
.msg .src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.msg.user .src { border-top-color: color-mix(in srgb, var(--accent-ink) 25%, transparent); }
.src-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin-right: 2px; }
.msg.user .src-label { color: color-mix(in srgb, var(--accent-ink) 75%, transparent); }
.src-chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
    padding: 2px 9px; border-radius: var(--radius-xs); background: var(--panel); border: 1px solid var(--border); color: var(--text-muted);
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.src-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
a.src-chip::after { content: "↗"; font-size: .72em; opacity: .7; }
.msg.user .src-chip { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); color: var(--accent-ink); }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border-soft); background: var(--ink-850); }
.chat-input .input { flex: 1; }
.typing { align-self: flex-start; color: var(--text-dim); font-size: .86rem; padding: 4px 2px; font-family: var(--font-mono); }

/* ============================================================ Charts */
/* minmax(0,1fr) pins the track minimum to 0 instead of min-content, so cards with long
   titles can't push the grid wider than .content (it was spilling past the page action button). */
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card h3 { font-family: var(--font-ui); font-size: .82rem; color: var(--text-muted); font-weight: 600; margin: 0 0 14px; }
.chart-card .chart-note { color: var(--text-dim); font-size: .76rem; margin: 10px 0 0; }

/* vertical bars */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; }
.cb-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.cb-val { font-family: var(--font-mono); font-size: .64rem; color: var(--text-dim); min-height: 1em; }
.cb-track { width: 100%; height: var(--chart-h, 150px); display: flex; align-items: flex-end; }
.cb-fill { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .4s ease; }
.cb-lab { font-size: .64rem; color: var(--text-muted); white-space: nowrap; }

/* horizontal bars */
.chart-hbars { display: flex; flex-direction: column; gap: 9px; }
.hb-row { display: flex; align-items: center; gap: 10px; }
.hb-lab { flex: 0 0 32%; font-size: .8rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { flex: 1 1 auto; height: 9px; background: var(--ink-800); border-radius: 999px; overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.hb-val { flex: 0 0 auto; font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); min-width: 44px; text-align: right; }

/* donut */
.chart-donut { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-ring { position: relative; width: 124px; height: 124px; flex: 0 0 auto; }
.donut-svg { width: 100%; height: 100%; display: block; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center b { font-family: var(--font-mono); font-size: 1.2rem; color: var(--text); line-height: 1; }
.donut-center small { font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin-top: 2px; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; }
.dl-item { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-muted); }
.dl-item i { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
.dl-item b { color: var(--text); font-family: var(--font-mono); font-size: .78rem; }

/* line */
.line-svg { width: 100%; height: 120px; display: block; }
.line-axis { stroke: var(--border-soft); stroke-width: 1; }
.line-x { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--font-mono); font-size: .64rem; color: var(--text-dim); }
.line-legend { display: flex; gap: 14px; margin-top: 10px; }
.line-legend span { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-muted); }
.line-legend i { width: 12px; height: 3px; border-radius: 2px; }

.spark { width: 100%; height: 26px; display: block; margin-top: 8px; }

@media (max-width: 860px) { .charts-grid { grid-template-columns: minmax(0, 1fr); } }

/* retro markdown body */
.retro-body h2 { font-size: 1.05rem; margin: 1.1em 0 .4em; color: var(--text); }
.retro-body h2:first-child { margin-top: 0; }
.retro-body h3 { font-size: .95rem; margin: .9em 0 .3em; }
.retro-body p { color: var(--text-muted); margin: .5em 0; }
.retro-body ul, .retro-body ol { color: var(--text-muted); margin: .5em 0; padding-left: 1.4em; }
.retro-body li { margin: .25em 0; }
.retro-body strong { color: var(--text); }

/* timeline */
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border-soft); }
.tl-row:first-child { border-top: 0; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--text-dim); transform: translateY(-1px); }
.tl-dot.ok { background: var(--success); } .tl-dot.info { background: var(--accent); } .tl-dot.warn { background: var(--warn); }
.tl-date { flex: 0 0 auto; font-family: var(--font-mono); font-size: .74rem; color: var(--text-dim); width: 84px; }
.tl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-title { font-size: .88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.tl-title:hover { color: var(--accent); }
.tl-meta { font-size: .74rem; color: var(--text-dim); }

/* risk / task / PR lists */
.risk-list { display: flex; flex-direction: column; }
.risk-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border-soft); min-width: 0; }
.risk-row:first-child { border-top: 0; }
.risk-key { flex: 0 0 auto; font-family: var(--font-mono); font-size: .72rem; color: var(--accent); white-space: nowrap; }
.risk-main { flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
/* min-width:0 lets this flex item shrink past its content's intrinsic width so the ellipsis
   engages instead of the long title overflowing the card (caused horizontal scroll on mobile). */
.risk-title { font-size: .88rem; color: var(--text); min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.risk-title:hover { color: var(--accent); }
.risk-reason { font-size: .76rem; color: var(--text-dim); overflow-wrap: anywhere; }
.risk-owner { flex: 0 0 auto; font-size: .74rem; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; }

/* project-health metric tiles — each dimension + the overall score as its own counter */
.health-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.htile { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px;
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--panel);
    text-decoration: none; transition: border-color .12s, background .12s; }
a.htile:hover { border-color: var(--border); background: var(--panel-2); text-decoration: none; }
.htile.overall { background: var(--panel-2); border-color: var(--border); }
.htile-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htile-val { font-size: 1.55rem; font-weight: 600; line-height: 1.05; font-family: var(--font-display); }
.htile-sub { font-size: .7rem; color: var(--text-muted); }

/* ============================================================ Blazor error UI */
#blazor-error-ui { background: var(--panel-2); color: var(--text); bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none; left: 0; padding: 0.7rem 1.4rem; position: fixed; width: 100%; z-index: 1000; border-top: 1px solid var(--danger); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: 0.6rem; }

/* ============================================================ Responsive */
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
    .nav-cb:checked ~ .sidebar { transform: translateX(0); }
    .nav-cb:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: var(--scrim); }
    .hamburger { display: inline-grid; }
    .content { padding: 20px 16px; }
    .topbar { padding: 0 16px; }
}
@media (max-width: 720px) {
    .grid.cols-3, .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
    .provider-grid { grid-template-columns: minmax(0, 1fr); }
    .topbar .title { display: none; }
    .user-chip .uname { display: none; }
    h1 { font-size: 1.4rem; }
}
@media (max-width: 560px) {
    .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
    .msg { max-width: 90%; }
    .auth-card { padding: 30px 22px; }
    .page-head .actions { width: 100%; }
}

/* ============================================================ Landing (light · compact) */
.lz { --bg:#ffffff; --bg2:#f6f7f9; --card:#ffffff; --ink:#0f1729; --ink2:#48505f; --ink3:#8a92a2;
    --line:#e7e9ef; --line2:#d7dbe4; --accent:#2563eb; --accent2:#1d4ed8; --accent-soft:#eaf0ff;
    --ok:#1a7f37; --ok-soft:#e6f4ea; --warn:#b45309; --warn-soft:#fdf0e3; --danger:#d1242f; --danger-soft:#fbe9ea;
    --rad:14px; --rad-sm:10px;
    --fd:"Hanken Grotesk", system-ui, sans-serif; --fb:"IBM Plex Sans", system-ui, sans-serif; --fm:"IBM Plex Mono", monospace;
    background:var(--bg); color:var(--ink); font-family:var(--fb); min-height:100vh; -webkit-font-smoothing:antialiased; }
.lz ::selection { background:var(--accent); color:#fff; }
.lz a { color:var(--accent); text-decoration:none; }
.lz-wrap { max-width:1080px; margin:0 auto; padding:0 24px; }

.lz-nav { position:sticky; top:0; z-index:30; background:color-mix(in srgb,var(--bg) 88%, transparent); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.lz-nav-in { max-width:1080px; margin:0 auto; padding:13px 24px; display:flex; align-items:center; gap:20px; }
.lz-logo { font-family:var(--fd); font-weight:800; font-size:1.08rem; letter-spacing:-0.02em; color:var(--ink); display:flex; align-items:center; gap:8px; }
.lz-logo i { width:11px; height:11px; border-radius:3px; background:var(--accent); }
.lz-links { margin-left:auto; display:flex; gap:22px; align-items:center; }
.lz-links a { color:var(--ink2); font-weight:500; font-size:.88rem; }
.lz-links a:hover { color:var(--ink); }
.lz-navcta { display:flex; gap:9px; align-items:center; }

.lz-btn { display:inline-flex; align-items:center; gap:7px; padding:10px 18px; border-radius:9px; cursor:pointer; font-family:var(--fb); font-weight:600; font-size:.92rem; border:1px solid var(--line2); background:var(--card); color:var(--ink); transition:.15s; }
.lz-btn:hover { border-color:var(--ink3); text-decoration:none; }
.lz-btn.pri { background:var(--accent); color:#fff; border-color:transparent; }
.lz-btn.pri:hover { background:var(--accent2); }
.lz-btn.lg { padding:12px 22px; font-size:.96rem; }

.lz-sec { padding:50px 0; }
.lz-head { margin-bottom:26px; }
.lz-kick { font-family:var(--fm); font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); }
.lz-h2 { font-family:var(--fd); font-weight:700; letter-spacing:-0.02em; line-height:1.08; font-size:clamp(1.6rem,3vw,2.1rem); margin:10px 0 8px; }
.lz-sub { color:var(--ink2); font-size:1rem; line-height:1.55; margin:0; max-width:62ch; }

.lz-hero { display:grid; grid-template-columns:1.05fr .95fr; gap:46px; align-items:center; padding:58px 0 50px; }
.lz-eyebrow { display:inline-flex; align-items:center; gap:7px; font-family:var(--fm); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--accent); background:var(--accent-soft); border-radius:999px; padding:5px 12px; }
.lz-hero h1 { font-family:var(--fd); font-weight:800; letter-spacing:-0.03em; line-height:1.02; font-size:clamp(2.2rem,4.6vw,3.4rem); margin:18px 0 0; }
.lz-hero h1 em { font-style:normal; color:var(--accent); }
.lz-lead { color:var(--ink2); font-size:1.08rem; line-height:1.55; margin:16px 0 0; max-width:46ch; }
.lz-actions { display:flex; gap:11px; margin-top:24px; flex-wrap:wrap; }
.lz-fine { margin-top:14px; font-family:var(--fm); font-size:.75rem; color:var(--ink3); }

.lz-win { background:var(--card); border:1px solid var(--line); border-radius:var(--rad); overflow:hidden; box-shadow:0 24px 50px -30px rgba(15,23,41,.30), 0 3px 10px -6px rgba(15,23,41,.12); }
.lz-winbar { display:flex; align-items:center; gap:6px; padding:11px 14px; border-bottom:1px solid var(--line); background:var(--bg2); }
.lz-winbar i { width:8px; height:8px; border-radius:50%; background:var(--line2); }
.lz-winbar .u { margin-left:9px; font-family:var(--fm); font-size:.71rem; color:var(--ink3); }
.lz-winbody { padding:16px; display:grid; gap:12px; }
.lz-top { display:flex; align-items:center; gap:13px; }
.lz-ring { position:relative; width:54px; height:54px; border-radius:50%; flex:0 0 auto; background:conic-gradient(var(--accent) calc(var(--p,80)*1%), var(--line) 0); display:grid; place-items:center; }
.lz-ring::before { content:""; position:absolute; inset:6px; border-radius:50%; background:var(--card); }
.lz-ring b { position:relative; font-family:var(--fm); font-weight:600; }
.lz-th { flex:1 1 auto; min-width:0; }
.lz-th .t { font-family:var(--fd); font-weight:700; font-size:.96rem; }
.lz-th .s { color:var(--ink3); font-size:.76rem; }
.lz-pill { font-family:var(--fm); font-size:.7rem; padding:3px 8px; border-radius:999px; color:var(--ok); background:var(--ok-soft); }
.lz-tiles { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.lz-tile { border:1px solid var(--line); border-radius:9px; padding:10px 11px; background:var(--bg2); }
.lz-tile .k { display:block; color:var(--ink3); font-size:.64rem; text-transform:uppercase; letter-spacing:.06em; margin-bottom:2px; }
.lz-tile .v { font-family:var(--fm); font-weight:600; font-size:1.2rem; }
.lz-tile .v small { font-size:.66rem; color:var(--ink3); }
.lz-ins { display:grid; grid-template-columns:auto 1fr; gap:10px; border:1px solid var(--line); border-left:3px solid var(--danger); border-radius:9px; padding:11px 12px; background:var(--danger-soft); }
.lz-ins.warn { border-left-color:var(--warn); background:var(--warn-soft); }
.lz-ins .dot { width:8px; height:8px; border-radius:50%; background:var(--danger); margin-top:5px; }
.lz-ins.warn .dot { background:var(--warn); }
.lz-ins strong { font-family:var(--fd); font-weight:700; font-size:.86rem; display:block; }
.lz-ins span { color:var(--ink2); font-size:.8rem; }

.lz-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.lz-feat .ic { width:30px; height:30px; border-radius:8px; background:var(--accent-soft); color:var(--accent); display:grid; place-items:center; margin-bottom:9px; }
.lz-feat .ic svg { width:16px; height:16px; }
.lz-feat b { font-family:var(--fd); font-weight:700; font-size:.96rem; display:block; }
.lz-feat span { color:var(--ink2); font-size:.86rem; line-height:1.45; }

.lz-ex { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.lz-card { border:1px solid var(--line); border-radius:var(--rad); background:var(--card); padding:16px; }
.lz-card .lab { font-family:var(--fm); font-size:.66rem; letter-spacing:.1em; text-transform:uppercase; color:var(--ink3); }
.lz-card h3 { font-family:var(--fd); font-weight:700; font-size:1rem; margin:12px 0 4px; }
.lz-card p { margin:0; color:var(--ink2); font-size:.86rem; line-height:1.45; }
.lz-card .mock { margin:11px 0; }
.lz-chat { display:grid; gap:8px; }
.lz-bub { max-width:92%; padding:8px 11px; border-radius:11px; font-size:.79rem; line-height:1.4; }
.lz-bub.u { justify-self:end; background:var(--accent); color:#fff; border-bottom-right-radius:3px; }
.lz-bub.a { justify-self:start; background:var(--bg2); border:1px solid var(--line); border-bottom-left-radius:3px; }
.lz-srcs { display:flex; gap:5px; flex-wrap:wrap; margin-top:6px; }
.lz-srcs b { font-family:var(--fm); font-size:.6rem; font-weight:500; padding:2px 6px; border-radius:4px; background:var(--accent-soft); color:var(--accent); }
.lz-bars { display:flex; align-items:flex-end; gap:5px; height:66px; }
.lz-bars i { flex:1; background:var(--accent); border-radius:3px 3px 0 0; opacity:.85; }
.lz-bars i.dim { background:var(--line2); opacity:1; }

.lz-chips { display:flex; flex-wrap:wrap; gap:9px; }
.lz-chip { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line); background:var(--card); border-radius:999px; padding:8px 14px; font-weight:600; font-size:.88rem; color:var(--ink); }
.lz-chip .provider-logo { width:17px; height:17px; }

.lz-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; }
.lz-step { border:1px solid var(--line); border-radius:var(--rad); padding:18px; background:var(--card); }
.lz-step .n { font-family:var(--fd); font-weight:800; font-size:1.4rem; color:var(--accent); line-height:1; }
.lz-step h3 { font-family:var(--fd); font-weight:700; font-size:.98rem; margin:9px 0 4px; }
.lz-step p { margin:0; color:var(--ink2); font-size:.86rem; }

.lz-mets { display:flex; flex-wrap:wrap; gap:8px; }
.lz-met { border:1px solid var(--line); border-radius:999px; padding:7px 13px; font-size:.84rem; color:var(--ink2); background:var(--card); }
.lz-met b { color:var(--ink); font-family:var(--fd); font-weight:600; }

.lz-prices { display:grid; grid-template-columns:1fr 1.3fr; gap:14px; align-items:start; }
.lz-price { border:1px solid var(--line); border-radius:var(--rad); background:var(--card); padding:24px 22px; }
.lz-price.pick { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.lz-price .tier { font-family:var(--fm); font-size:.7rem; text-transform:uppercase; letter-spacing:.12em; color:var(--ink3); }
.lz-price .big { font-family:var(--fd); font-weight:800; font-size:2.2rem; letter-spacing:-0.02em; margin:10px 0 4px; }
.lz-price .note { color:var(--ink2); font-size:.88rem; margin:0 0 14px; }
.lz-terms { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 16px; }
.lz-term { flex:1 1 110px; border:1px solid var(--line); border-radius:var(--rad-sm); padding:11px 13px; background:var(--bg2); }
.lz-term.best { border-color:color-mix(in srgb,var(--accent) 50%, transparent); }
.lz-term .t { font-family:var(--fm); font-size:.68rem; text-transform:uppercase; letter-spacing:.08em; color:var(--ink3); }
.lz-term .p { font-family:var(--fd); font-weight:700; font-size:1.3rem; margin-top:3px; }
.lz-term .pm { font-family:var(--fm); font-size:.7rem; color:var(--ink2); }
.lz-term .save { font-family:var(--fm); font-size:.68rem; color:var(--ok); margin-top:2px; }
.lz-feats { list-style:none; margin:0 0 18px; padding:0; display:grid; gap:8px; }
.lz-feats li { display:grid; grid-template-columns:17px 1fr; gap:9px; color:var(--ink2); font-size:.9rem; align-items:start; }
.lz-feats li svg { width:13px; height:13px; color:var(--accent); margin-top:3px; }

.lz-faq details { border:1px solid var(--line); border-radius:var(--rad-sm); padding:14px 16px; margin-bottom:9px; background:var(--card); }
.lz-faq summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:14px; font-family:var(--fd); font-weight:600; font-size:.96rem; }
.lz-faq summary::-webkit-details-marker { display:none; }
.lz-faq summary::after { content:"+"; font-family:var(--fm); color:var(--ink3); }
.lz-faq details[open] summary::after { content:"\2013"; }
.lz-faq p { margin:10px 0 0; color:var(--ink2); font-size:.9rem; line-height:1.55; }

.lz-cta { background:var(--accent); border-radius:var(--rad); padding:38px 34px; display:flex; align-items:center; justify-content:space-between; gap:22px; flex-wrap:wrap; }
.lz-cta h2 { font-family:var(--fd); font-weight:800; letter-spacing:-0.02em; font-size:clamp(1.5rem,2.8vw,2.1rem); margin:0; color:#fff; max-width:20ch; }
.lz-cta p { margin:6px 0 0; color:rgba(255,255,255,.85); font-size:.95rem; }
.lz-cta .lz-btn { background:#fff; color:var(--accent); border-color:transparent; }
.lz-foot { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; padding:26px 0; border-top:1px solid var(--line); margin-top:46px; color:var(--ink3); font-size:.83rem; }
.lz-foot .lz-mono { font-family:var(--fm); }

.lz-hero-t>* { animation:lz-rise .55s cubic-bezier(.2,.7,.2,1) backwards; }
.lz-hero-t>*:nth-child(1){animation-delay:.03s} .lz-hero-t>*:nth-child(2){animation-delay:.09s}
.lz-hero-t>*:nth-child(3){animation-delay:.15s} .lz-hero-t>*:nth-child(4){animation-delay:.21s} .lz-hero-t>*:nth-child(5){animation-delay:.27s}
.lz-win { animation:lz-rise .65s cubic-bezier(.2,.7,.2,1) .14s backwards; }
@keyframes lz-rise { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }

@media (max-width:880px){
    .lz-hero{grid-template-columns:1fr; gap:30px; padding:40px 0 36px;}
    .lz-strip{grid-template-columns:1fr 1fr;}
    .lz-ex{grid-template-columns:1fr;}
    .lz-steps{grid-template-columns:1fr;}
    .lz-prices{grid-template-columns:1fr;}
    .lz-links{display:none;}
}
@media (max-width:520px){ .lz-strip{grid-template-columns:1fr;} .lz-cta{padding:26px 20px;} }


/* ============================================================ Product tour (tour.js) */
.ct-tour-ov { position: fixed; inset: 0; z-index: 9998; background: rgba(10,12,16,.55); }
.ct-tour-hl { position: fixed; z-index: 9998; border-radius: 8px; pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(10,12,16,.55), 0 0 0 2px var(--accent); transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease; }
.ct-tour-tip { position: fixed; z-index: 10000; width: 300px; max-width: calc(100vw - 28px);
    background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.ct-tour-step { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.ct-tour-tip h4 { margin: 6px 0 6px; font-family: var(--font-display); font-size: 1.02rem; color: var(--text); }
.ct-tour-tip p { margin: 0 0 14px; color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
.ct-tour-actions { display: flex; align-items: center; gap: 8px; }
.ct-tour-btn { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 7px; padding: 7px 14px; font-weight: 600; font-size: .85rem; cursor: pointer; font-family: var(--font-ui); }
.ct-tour-btn:hover { border-color: var(--accent); }
.ct-tour-btn.primary { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.ct-tour-skip { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: .82rem; font-family: var(--font-ui); }
.ct-tour-skip:hover { color: var(--text); }

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