:root {
    --bg: #f4efe6;
    --bg-elev: #fbf7f0;
    --ink: #1a1a1a;
    --ink-soft: #5c5851;
    --ink-mute: #8c8679;
    --line: #e4dcc9;
    --line-strong: #c9bfa6;
    --accent: #c45a2a;
    --accent-ink: #7a3214;
    --accent-soft: #f3d9c4;
    --ok: #3d6b4a;
    --ok-soft: #dfeadd;
    --radius: 2px;
    --max: 1080px;
    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; }
h2 { font-size: 1.6rem; line-height: 1.15; }
h3 { font-size: 1.2rem; }
h1:focus, h2:focus { outline: none; }

a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-bottom-color: currentColor; }

/* ---------- boot ---------- */
.boot { display: flex; align-items: center; justify-content: center; flex-direction: column; height: 100vh; gap: 1rem; font-family: var(--font-serif); }
.boot-mark { font-size: 3rem; color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.boot-logo { width: 6rem; height: auto; animation: pulse 1.4s ease-in-out infinite; }
.boot-text { font-size: 1.25rem; color: var(--ink-soft); letter-spacing: 0.05em; }
@keyframes pulse { 0%,100% { opacity: .3; transform: translateY(0) } 50% { opacity: 1; transform: translateY(-4px) } }

/* ---------- layout ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.beta-banner {
    background: var(--accent); color: #fff; text-align: center;
    font-size: .82rem; font-weight: 600; letter-spacing: .01em;
    padding: .4rem 1rem;
    display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap;
}
.beta-banner-text { line-height: 1.3; }

/* "Prijavi napako / idejo" pill in the beta banner */
.beta-report-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(255,255,255,.16); color: #fff;
    border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
    padding: .15rem .7rem; font: inherit; font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: background .15s, border-color .15s;
}
.beta-report-btn:hover { background: rgba(255,255,255,.28); border-color: #fff; }
.beta-report-btn svg { flex: 0 0 auto; }

/* ---------- feedback (report issue / idea) modal ---------- */
.fb-overlay {
    position: fixed; inset: 0; z-index: 1300;
    display: flex; align-items: center; justify-content: center; padding: 1.25rem;
    background: rgba(20,16,12,.55); overflow-y: auto;
}
/* Hide the dialog while the screen-capture frame is grabbed so it isn't in the screenshot. */
.fb-overlay.fb-capturing { visibility: hidden; }
/* Dedicated backdrop element is the only close target, so drag-selecting text inside the card and
   releasing outside it can't bubble a click into a close (the card is a sibling, not a child). */
.fb-backdrop { position: absolute; inset: 0; z-index: 0; }
.fb-card {
    position: relative; z-index: 1; width: min(34rem, 100%);
    background: var(--bg); border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    padding: 1.9rem 1.8rem 1.5rem; margin: auto;
    text-align: left; color: var(--ink);
}
.fb-close {
    position: absolute; top: .5rem; right: .7rem; border: 0; background: none;
    font-size: 1.6rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
}
.fb-close:hover { color: var(--ink); }
.fb-title { font-size: 1.3rem; margin: 0 1.5rem .35rem 0; }
.fb-sub { margin: 0 0 1rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }

.fb-type { display: inline-flex; gap: .4rem; margin: 0 0 1rem; }
.fb-type-opt {
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-soft);
    border-radius: 999px; padding: .35rem .9rem; font: inherit; font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.fb-type-opt.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.fb-label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft);
    margin: .85rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
.fb-input {
    width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 8px;
    padding: .55rem .7rem;
}
.fb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fb-textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }

.fb-image-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.fb-img-btn { font-size: .85rem; cursor: pointer; }
.fb-img-btn.btn-ghost { border: 1px dashed var(--line-strong); }
.fb-file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.fb-preview {
    position: relative; display: inline-block; max-width: 100%;
    border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg-elev);
}
.fb-preview img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.fb-preview-remove {
    position: absolute; top: .3rem; right: .3rem; width: 1.6rem; height: 1.6rem;
    border: 0; border-radius: 50%; background: rgba(20,16,12,.7); color: #fff;
    font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.fb-error {
    margin-top: .85rem; padding: .55rem .7rem; border-radius: 8px;
    background: #f8e8e8; color: #7a2020; font-size: .85rem; border: 1px solid #d9b5b5;
}
.fb-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.3rem; }
.fb-meta-note { margin: .8rem 0 0; font-size: .73rem; color: var(--ink-mute); line-height: 1.4; }

.fb-success { text-align: center; padding: 1rem .5rem; }
.fb-success-mark {
    width: 3rem; height: 3rem; margin: 0 auto .5rem; border-radius: 50%;
    background: var(--ok-soft); color: var(--ok); font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center;
}
.fb-success h3 { margin: 0 0 .4rem; }
.fb-success p { margin: 0 0 1.2rem; color: var(--ink-soft); }

/* ---------- feedback survey (Anketa) ---------- */
/* The survey is taller than the bug/idea form, so let the card scroll within the viewport. */
.fb-card.is-survey { max-height: calc(100vh - 2.5rem); overflow-y: auto; }

.fb-q { margin: 1.1rem 0 0; }
.fb-q-label { display: block; font-size: .92rem; font-weight: 600; color: var(--ink); margin: 0 0 .5rem; line-height: 1.4; }
.fb-q-hint { font-weight: 400; color: var(--ink-mute); font-size: .8rem; }

.fb-options { display: flex; flex-direction: column; gap: .4rem; }
.fb-opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.fb-opt {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .7rem; border: 1px solid var(--line-strong); border-radius: 8px;
    background: var(--bg-elev); cursor: pointer; font-size: .88rem; color: var(--ink-soft);
    transition: border-color .15s, background .15s, color .15s; line-height: 1.35;
}
.fb-opt:hover { border-color: var(--accent); }
.fb-opt.is-checked { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.fb-opt input { accent-color: var(--accent); width: 1rem; height: 1rem; flex: 0 0 auto; margin: 0; }
.fb-opt-consent { align-items: flex-start; }
.fb-opt-consent input { margin-top: .15rem; }
.fb-other-input { margin-top: .45rem; }

.fb-nps { display: flex; gap: .3rem; flex-wrap: wrap; }
.fb-nps-btn {
    width: 2rem; height: 2rem; border: 1px solid var(--line-strong); border-radius: 6px;
    background: var(--bg-elev); color: var(--ink-soft); font: inherit; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.fb-nps-btn:hover { border-color: var(--accent); }
.fb-nps-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.fb-nps-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-mute); margin-top: .3rem; }

@media (max-width: 480px) { .fb-opt-grid { grid-template-columns: 1fr; } }

/* ---------- feedback floating button + second-login nudge ---------- */
/* Bottom-left, opposite the AI assistant fab (bottom-right) so they never overlap. */
.fb-fab-wrap {
    position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 60;
    display: flex; flex-direction: column; align-items: flex-start; gap: .65rem;
}
.fb-fab {
    position: relative; isolation: isolate;
    width: 3.4rem; height: 3.4rem; border-radius: 50%; border: none; cursor: pointer;
    background: var(--accent); color: #fff;
    box-shadow: 0 10px 24px rgba(40, 30, 18, .28);
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.fb-fab:hover {
    background: var(--accent-ink); transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(40, 30, 18, .34);
}
/* attention glow: an expanding "ping" ring + a gentle breathing halo, both behind the button */
.fb-fab::before, .fb-fab::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    z-index: -1; pointer-events: none;
}
.fb-fab::before {
    box-shadow: 0 0 0 0 rgba(196, 90, 42, .5);
    animation: fb-fab-ping 2.4s ease-out infinite;
}
.fb-fab::after {
    box-shadow: 0 0 14px 3px rgba(196, 90, 42, .5);
    animation: fb-fab-breathe 2.4s ease-in-out infinite;
}
@keyframes fb-fab-ping {
    0%   { box-shadow: 0 0 0 0 rgba(196, 90, 42, .5); }
    70%  { box-shadow: 0 0 0 16px rgba(196, 90, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 90, 42, 0); }
}
@keyframes fb-fab-breathe {
    0%, 100% { opacity: .5; }
    50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .fb-fab::before, .fb-fab::after { animation: none; }
}

.fb-nudge {
    position: relative; width: 16.5rem; max-width: calc(100vw - 3rem);
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 12px;
    box-shadow: 0 14px 34px rgba(40, 30, 18, .22);
    padding: .9rem 1rem 1rem; animation: fb-nudge-in .25s ease;
}
/* little speech-bubble tail pointing down toward the fab */
.fb-nudge::after {
    content: ""; position: absolute; left: 1.4rem; bottom: -7px; width: 12px; height: 12px;
    background: var(--bg-elev); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
    transform: rotate(45deg);
}
.fb-nudge-text { margin: 0 0 .7rem; font-size: .86rem; line-height: 1.45; color: var(--ink-soft); }
.fb-nudge-cta { width: 100%; justify-content: center; }
.fb-nudge-close {
    position: absolute; top: .25rem; right: .45rem; border: 0; background: none;
    font-size: 1.25rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
}
.fb-nudge-close:hover { color: var(--ink); }
@keyframes fb-nudge-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- e-mail confirmation gate (projects screen) ---------- */
.email-confirm-card {
    display: flex; gap: 1rem; align-items: flex-start;
    background: var(--accent-soft); border: 1px solid var(--line-strong);
    border-radius: 12px; padding: 1.1rem 1.25rem; margin: 0 0 1.75rem;
}
.email-confirm-ico {
    flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
}
.email-confirm-body { flex: 1; min-width: 0; }
.email-confirm-body h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.email-confirm-body p { margin: 0 0 .85rem; color: var(--ink-soft); line-height: 1.55; }
.email-confirm-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.email-confirm-msg { margin: .8rem 0 0; font-size: .9rem; font-weight: 600; color: var(--accent-ink); }

/* ---------- onboarding (guided spotlight tour) ---------- */
/* Full-screen layer that captures clicks (blocks the page underneath). For centered steps it dims
   directly; for targeted steps the dimming comes from the spotlight hole's huge box-shadow. */
.onboard { position: fixed; inset: 0; z-index: 1200; }
.onboard.is-centered { background: rgba(20,16,12,.55); }
/* Transparent cutout over the highlighted element — the big spread shadow darkens everything else. */
.onboard-hole {
    position: fixed; border-radius: 12px; pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(20,16,12,.62);
    outline: 2px solid var(--accent); outline-offset: 2px;
    transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.onboard-card {
    position: fixed; width: min(21.25rem, 92vw);
    background: var(--bg); border-radius: var(--radius-lg, 16px);
    box-shadow: 0 24px 70px rgba(0,0,0,.35); padding: 1.6rem 1.6rem 1.25rem; text-align: center;
    transition: top .25s ease, left .25s ease;
}
.onboard-card.is-centered { top: 50%; left: 50%; width: min(30rem, 92vw); transform: translate(-50%, -50%); padding: 2rem 1.9rem 1.5rem; }
.onboard-close {
    position: absolute; top: .6rem; right: .7rem; border: 0; background: none;
    font-size: 1.5rem; line-height: 1; color: var(--ink-mute); cursor: pointer;
}
.onboard-art { font-size: 2.4rem; line-height: 1; }
.onboard-step { margin-top: .6rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.onboard-title { margin: .35rem 0 .5rem; font-size: 1.4rem; }
.onboard-body { margin: 0 auto; max-width: 28rem; color: var(--ink-soft); line-height: 1.6; }
.onboard-dots { display: flex; justify-content: center; gap: .4rem; margin: 1.25rem 0; }
.onboard-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: background .2s, width .2s; }
.onboard-dot.is-active { background: var(--accent); width: 18px; border-radius: 999px; }
.onboard-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.onboard-actions-right { display: flex; gap: .5rem; }
.app-nav {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: saturate(1.4) blur(6px);
}
.app-nav-inner {
    max-width: var(--max); margin: 0 auto; padding: 1rem clamp(1.5rem, 4vw, 4rem);
    display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.brand {
    font-family: var(--font-serif); font-weight: 800; font-size: 1.15rem;
    color: var(--ink); display: inline-flex; align-items: center; gap: .5rem;
    border: none;
}
.brand-mark { color: var(--accent); font-size: 1.3rem; }
.brand-logo { height: 3.25rem; width: auto; display: block; }
.brand-glyph { width: 1em; height: 1em; vertical-align: -0.12em; }
.brand-tag {
    font-family: var(--font-sans); font-weight: 500; font-size: .8rem;
    color: var(--ink-mute); letter-spacing: .01em;
}
.brand:hover { border: none; }

.nav-links {
    display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap;
    align-items: center;
    font-size: .875rem;
}
.nav-links a {
    display: inline-flex; align-items: center;
    padding: .35rem .75rem; border-radius: var(--radius);
    color: var(--ink-soft); border: none; font-weight: 500;
    white-space: nowrap; line-height: 1.4;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-elev); }
.nav-links a.active { color: var(--ink); background: var(--bg-elev); }
.nav-links a .count { color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: .75rem; margin-left: .35rem; }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    appearance: none; border: none; background: transparent;
    padding: .35rem .75rem; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .875rem; font-weight: 500;
    color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
    transition: background .15s, color .15s;
}
.nav-dropdown-toggle:hover { color: var(--ink); background: var(--bg-elev); }
.nav-dropdown.open .nav-dropdown-toggle { color: var(--ink); background: var(--bg-elev); }
.nav-dropdown-chevron {
    font-size: .7rem; color: var(--ink-mute); transition: transform .15s;
}
.nav-dropdown.open .nav-dropdown-chevron { transform: rotate(180deg); color: var(--ink-soft); }
.nav-dropdown-backdrop {
    position: fixed; inset: 0; z-index: 18; background: transparent; cursor: default;
}
.nav-dropdown-menu {
    position: absolute; top: calc(100% + .35rem); left: 0; z-index: 20;
    min-width: 16rem; background: var(--bg-elev);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(40, 30, 18, .12);
    padding: .35rem; display: flex; flex-direction: column; gap: 0;
}
.nav-dropdown-menu .nav-dropdown-item {
    display: flex; align-items: baseline; gap: .75rem;
    padding: .55rem .75rem; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
    color: var(--ink-soft); border: none;
    white-space: nowrap;
}
.nav-dropdown-menu .nav-dropdown-item:hover { background: var(--bg); color: var(--ink); }
.nav-dropdown-menu .nav-dropdown-item.active { background: var(--bg); color: var(--ink); }
.nav-dropdown-menu .nav-dropdown-item .nav-dropdown-dot {
    flex: none; width: .55rem; height: .55rem; border-radius: 50%;
    background: var(--phase-color, var(--accent)); align-self: center;
}
.nav-dropdown-menu .nav-dropdown-item.active .nav-dropdown-dot {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--phase-color, var(--accent)) 30%, transparent);
}
.nav-dropdown-menu .nav-dropdown-item > span:nth-child(2) { flex: 1; }
.nav-dropdown-menu .nav-dropdown-item .count {
    color: var(--ink-mute); font-variant-numeric: tabular-nums;
    font-size: .78rem; margin-left: 0;
}
/* Phase marked "ni relevantno": dim the row and strike its title (matches the phase header). */
.nav-dropdown-menu .nav-dropdown-item.is-irrelevant { opacity: .6; }
.nav-dropdown-menu .nav-dropdown-item.is-irrelevant .nav-phase-title {
    text-decoration: line-through; text-decoration-color: var(--ink-mute);
}

/* Reusable circular phase badge: phase color + phase number. */
.phase-badge {
    flex: none; align-self: center;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.3rem; height: 1.3rem; border-radius: 50%;
    background: var(--phase-color, var(--accent)); color: #fff;
    font-size: .68rem; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--phase-color, var(--accent)) 22%, transparent);
}
.phase-cell { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- hamburger (collapses the nav links on phones) ---------- */
.nav-hamburger {
    display: none; /* desktop: links are shown inline, no hamburger */
    appearance: none; flex: none; cursor: pointer;
    width: 2.6rem; height: 2.6rem; padding: 0;
    align-items: center; justify-content: center;
    background: var(--bg-elev); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    transition: border-color .15s, background .15s;
}
.nav-hamburger:hover { border-color: var(--ink); }

@media (max-width: 760px) {
    /* Keep the bar to a single row: brand on the left, avatar + hamburger on the right. */
    .app-nav-inner { flex-wrap: nowrap; gap: .6rem; padding-top: .7rem; padding-bottom: .7rem; }
    .app-nav .brand-logo { height: 2.6rem; }
    .nav-user { margin-left: auto; }
    .nav-hamburger { display: inline-flex; }

    /* The links drop into a full-width panel under the bar, toggled by .nav-open. */
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: .1rem;
        margin: 0; padding: .5rem clamp(1.25rem, 4vw, 2rem) .85rem;
        background: var(--bg-elev); border-bottom: 1px solid var(--line-strong);
        box-shadow: 0 16px 28px rgba(40, 30, 18, .14);
    }
    .app-nav.nav-open .nav-links { display: flex; }
    /* Scope everything to .nav-links so the account (UserMenu) dropdown keeps its floating layout. */
    .nav-links > * { width: 100%; }
    .nav-links a,
    .nav-links .nav-dropdown-toggle { width: 100%; padding: .7rem .75rem; font-size: 1rem; }
    /* The "Faze" submenu expands inline within the panel instead of as a floating dropdown. */
    .nav-links .nav-dropdown-menu {
        position: static; min-width: 0; border: none; box-shadow: none;
        padding: .15rem 0 .35rem .5rem;
    }
}

.app-main {
    max-width: var(--max); margin: 0 auto; padding: 3rem clamp(1.5rem, 4vw, 4rem) 6rem;
    width: 100%;
}
/* Wide layout for data-dense pages (Terminski Plan) — uses the available width, capped on huge screens. */
.app-main-wide { max-width: min(1800px, 100%); }

.app-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--ink-mute);
    font-size: .85rem;
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.app-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.app-footer-link {
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
    color: var(--ink-soft); border-bottom: 1px solid transparent; transition: border-color .15s;
}
.app-footer-link:hover { color: var(--accent); border-bottom-color: currentColor; }

/* ---------- admin: invite codes ---------- */
.invite-create {
    display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap;
    margin: 1.25rem 0 1.75rem;
}
.invite-create-field { display: flex; flex-direction: column; gap: .25rem; }
.invite-create-field label { font-size: .75rem; font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.invite-create-field .type-input { width: 9rem; }
.invite-create-note { flex: 1; min-width: 12rem; }
.invite-create-note .type-input { width: 100%; }
.invite-table code.invite-code { font-size: .92rem; font-weight: 600; letter-spacing: .02em; }
.invite-table tr.is-revoked { opacity: .55; }
/* a sent invite is struck through so it's clear it has already been handed out */
.invite-table tr.is-sent code.invite-code {
    text-decoration: line-through; text-decoration-color: var(--ink-mute); color: var(--ink-mute);
}
.invite-status {
    display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem;
    border-radius: 999px; color: #fff; background: var(--ink-mute);
}
.invite-status-active { background: #3f7d4f; }
.invite-status-used { background: var(--ink-mute); }
.invite-status-expired { background: #c6892b; }
.invite-status-revoked { background: #b5483f; }
.invite-table th.invite-sent-col, .invite-table td.invite-sent-col { text-align: center; }
.invite-sent-check { display: inline-flex; cursor: pointer; }
.invite-sent-check input { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: #3f7d4f; }

/* ---------- admin list controls (filter + pagination), shared by Invites & Users ---------- */
.admin-list-controls {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem;
}
/* the pager bar repeated below the table */
.admin-list-controls.is-bottom { justify-content: flex-end; margin: 1rem 0 0; }
.admin-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.admin-filter-input { width: min(24rem, 100%); }
.admin-status-filter { width: auto; }
.admin-pager { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft); }
.admin-pager label { color: var(--ink-mute); font-size: .8rem; }
.admin-pager-size { width: auto; }
.admin-pager-info { color: var(--ink-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* leading sequence-number column */
.admin-seq-col { width: 3rem; text-align: right; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero { margin-bottom: 4rem; }
.hero-eyebrow {
    font-family: var(--font-sans); font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--accent); margin-bottom: 1rem;
}
.hero h1 em {
    font-style: italic; font-weight: 400; color: var(--accent-ink);
}
/* Project title is the page's focal point — larger than the default h1. */
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.02; }
.hero-lead {
    font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.5;
    color: var(--ink-soft); font-weight: 400;
    max-width: 40rem; margin: 1.5rem 0 0;
}
.hero-meta {
    margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
    display: flex; gap: 2rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-mute);
}
.hero-meta strong { color: var(--ink); font-weight: 600; }

/* ---------- timeline ---------- */
.timeline-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.timeline-head h2 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }

.phases { display: grid; gap: 0; position: relative; }
.phase-row { position: relative; }
/* Disable-phase toggle: a sibling of the card link (not nested in the <a>), floated top-right so a
   click toggles relevance instead of navigating into the phase. */
.phase-toggle {
    position: absolute; top: .9rem; right: 1.1rem; z-index: 2;
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-sans); font-size: .72rem; font-weight: 600;
    padding: .28rem .65rem; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-mute);
    transition: border-color .12s, color .12s, background .12s;
}
.phase-toggle:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-elev); }
.phase-toggle.is-on { background: var(--ink-mute); border-color: var(--ink-mute); color: #fff; }
.phase-card {
    display: grid; grid-template-columns: 3rem 1fr auto; gap: 1.5rem;
    padding: 1.75rem 2rem; border-top: 1px solid var(--line);
    border-left: 4px solid var(--phase-color, transparent);
    align-items: center;
    transition: background .15s;
    text-decoration: none; border-bottom: none;
}
.phase-row:last-child .phase-card { border-bottom: 1px solid var(--line); }
.phase-card:hover { background: var(--bg-elev); }
.phase-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: var(--phase-color, var(--accent)); color: #fff;
    font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem;
    line-height: 1; font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--phase-color, var(--accent)) 20%, transparent);
}
.phase-body { min-width: 0; }
.phase-title { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.phase-intro { font-size: .9rem; color: var(--ink-soft); margin-top: .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phase-progress { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; min-width: 8rem; }
.phase-ratio { font-family: var(--font-serif); font-variant-numeric: tabular-nums; color: var(--ink); font-size: 1rem; font-weight: 600; }
.phase-ratio span { color: var(--ink-mute); font-weight: 400; }
.phase-bar { width: 8rem; height: 3px; background: var(--line); overflow: hidden; }
.phase-bar-fill { height: 100%; background: var(--phase-color, var(--accent)); transition: width .3s ease; }
.phase-bar-fill.full { background: var(--ok); }
.phase-card.is-irrelevant { opacity: .55; }
.phase-card.is-irrelevant .phase-num { background: var(--ink-mute); }
.phase-irrelevant-badge {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: #fff; background: var(--ink-mute); padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
}

/* ---------- phase page ---------- */
.phase-header {
    display: flex; justify-content: space-between; gap: 2rem;
    align-items: flex-end; padding-bottom: 2rem;
    border-bottom: 1px solid var(--line); margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.phase-header-text { flex: 1; min-width: 16rem; }
.phase-header .eyebrow {
    font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
    color: var(--phase-color, var(--accent)); margin-bottom: .75rem;
}
.phase-header .intro { color: var(--ink-soft); margin-top: 1rem; max-width: 36rem; }
/* Back link folded into the eyebrow row (breadcrumb-style) so it no longer eats a whole row. */
.phase-eyebrow-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: .75rem; }
.phase-eyebrow-row .eyebrow { margin-bottom: 0; }
.phase-back {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .78rem; color: var(--ink-mute); text-decoration: none;
}
.phase-back::after { content: "·"; margin-left: .55rem; color: var(--line-strong); }
.phase-back:hover { color: var(--accent-ink); }
.phase-stat {
    text-align: right; font-family: var(--font-serif);
}
.phase-stat-num { font-size: 2.5rem; font-weight: 800; line-height: 1; color: var(--ink); }
.phase-stat-num span { color: var(--ink-mute); font-weight: 400; }
.phase-stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; color: var(--ink-mute); margin-top: .5rem; font-family: var(--font-sans); font-weight: 500; }
.phase-stat-bar { width: 9rem; height: 3px; background: var(--line); margin-top: .75rem; margin-left: auto; }
.phase-stat-bar-fill { height: 100%; background: var(--phase-color, var(--accent)); }
.phase-stat-bar-fill.full { background: var(--ok); }
.phase-budget { margin-top: 1rem; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.phase-budget-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.phase-budget-wrap { width: 8rem; }
.phase-budget-input { width: 100%; text-align: right; }
.phase-budget-spent { font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.phase-budget-spent.is-over { color: #b5483f; font-weight: 600; }

.section-block { margin-bottom: 3rem; }
.section-head {
    display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1rem;
    padding-bottom: .5rem; border-bottom: 1px dashed var(--line-strong);
}
.section-head h2 {
    font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600;
}
.section-head .section-count { color: var(--ink-mute); font-size: .8rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.section-intro { color: var(--ink-soft); font-size: .92rem; margin: 0 0 1.25rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }

.item {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color .15s, box-shadow .15s, background .2s;
}
.item:hover { border-color: var(--line-strong); }
.item.is-done { background: var(--ok-soft); border-color: #b7ceb9; }
.item.is-wip { background: #fbf0e2; border-color: #e6c89a; }
.item.is-na { background: #ecead8; border-color: var(--line); opacity: .72; }
.item.is-na .item-label { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: var(--ink-mute); text-decoration-style: dotted; }

/* ---------- important tasks ---------- */
.item-important.is-important {
    color: #c4831c; border-color: #e6b25e; background: #fdf3e0;
}
.item-important.is-important svg { fill: currentColor; }
.item.is-important {
    border-color: #e0a93e;
    box-shadow: 0 0 0 1px #e0a93e, 0 0 16px rgba(224, 169, 62, .4);
}
.gantt-bar.is-important {
    box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #e3a93c, 0 0 10px 2px rgba(227, 169, 60, .9);
}
.timeline-item.is-important .timeline-body {
    border-color: #e0a93e;
    box-shadow: 0 0 0 1px #e0a93e, 0 0 16px rgba(224, 169, 62, .4);
}
.timeline-item.is-important .timeline-dot {
    box-shadow: 0 0 0 1px #e0a93e, 0 0 8px 1px rgba(227, 169, 60, .85);
}

.item-row { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; }

/* Action button-bar on the task row (flag, $, attachment, date). */
.item-actions { display: inline-flex; align-items: center; gap: .3rem; flex-shrink: 0; }

/* Status as a dropdown, tinted by the current state. */
.status-select {
    flex-shrink: 0; appearance: none; -webkit-appearance: none;
    height: 2rem; box-sizing: border-box;
    border: 1px solid var(--line-strong); border-radius: 999px;
    background-color: var(--bg); color: var(--ink-soft);
    font-family: var(--font-sans); font-size: .72rem; font-weight: 700; line-height: 1;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 0 1.7rem 0 .8rem; cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
    background-repeat: no-repeat; background-position: right .55rem center; background-size: .7rem;
    transition: border-color .15s, color .15s;
}
.status-select:focus { outline: none; border-color: var(--accent); }
.status-select.is-todo { color: #c0564b; border-color: #e6b3ac; }
.status-select.is-wip { color: #b07d12; border-color: #e3cf8f; }
.status-select.is-done { color: #4f7d5a; border-color: #b7ceb9; }
.status-select.is-na { color: var(--ink-mute); }

.item-label {
    flex: 1; min-width: 14rem; font-size: .98rem; line-height: 1.4; cursor: text;
    color: var(--ink); user-select: text; font-weight: 700;
}
.item.is-done .item-label { color: var(--ink-soft); }

.note-input {
    display: block; width: 100%; margin-top: .85rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .55rem .7rem; background: var(--bg);
    font-family: var(--font-sans); font-size: .9rem;
    color: var(--ink); resize: vertical; min-height: 4.8rem; line-height: 1.45;
}
.note-input::placeholder { color: var(--ink-mute); font-style: italic; }
.note-input:focus { outline: none; border-color: var(--accent); }

/* ---------- task type ---------- */
.type-pills {
    display: inline-flex; flex-shrink: 0; gap: 0;
    border: 1px solid var(--line-strong); border-radius: 999px;
    background: var(--bg); overflow: hidden; padding: 2px;
}
.type-pill {
    appearance: none; border: none; background: transparent;
    padding: .25rem .65rem; font-family: var(--font-sans);
    font-size: .72rem; font-weight: 600; color: var(--ink-mute);
    cursor: pointer; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .06em;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.type-pill:hover { color: var(--ink); }
.type-pill.active { background: var(--accent); color: white; }

.type-panel {
    margin-top: .85rem; padding: .8rem 1rem;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid; gap: .65rem;
}
.type-panel-inline {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    align-items: end;
}
.type-field { display: flex; flex-direction: column; gap: .3rem; }
.type-field > label {
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute);
}
.type-input {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); padding: .45rem .65rem;
    font-family: var(--font-sans); font-size: .92rem; color: var(--ink);
    width: 100%;
}
.type-input:focus { outline: none; border-color: var(--accent); }
.type-input::placeholder { color: var(--ink-mute); }
textarea.type-input { resize: vertical; min-height: 2.4rem; }

.price-input-wrap { position: relative; }
.price-input { padding-right: 2rem; font-variant-numeric: tabular-nums; }
.price-suffix {
    position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
    color: var(--ink-mute); pointer-events: none;
    font-weight: 600; font-size: .92rem;
}
.duration-summary {
    grid-column: 1 / -1;
    font-size: .8rem; color: var(--ink-soft);
    font-style: italic; font-variant-numeric: tabular-nums;
}

/* ---------- task meta (Rok + add inquiry) ---------- */
.task-meta {
    margin-top: .75rem; display: flex; align-items: center;
    gap: .85rem; flex-wrap: wrap;
}
.task-meta-dates {
    display: inline-flex; align-items: center; gap: .4rem;
    color: var(--ink-soft);
}
.task-meta-label {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute); margin-right: .25rem;
}
.task-meta-input {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: .25rem .5rem;
    font-family: var(--font-sans); font-size: .82rem; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.task-meta-input:focus { outline: none; border-color: var(--accent); }
.task-meta-sep { color: var(--ink-mute); font-weight: 500; }
.task-meta-duration {
    margin-left: .25rem; font-size: .75rem; color: var(--ink-mute);
    font-style: italic; font-variant-numeric: tabular-nums;
}
.task-meta-recommended {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; color: var(--ink-soft);
}
.task-meta-recommended strong { font-variant-numeric: tabular-nums; }
.item-info-btn.is-active { color: var(--accent); }
.task-info {
    margin: .5rem 0 .25rem; padding: .7rem .9rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-left: 3px solid var(--accent); border-radius: var(--radius);
    font-size: .88rem; color: var(--ink-soft); line-height: 1.55; white-space: pre-line;
}
.task-inquiry-add { margin-left: auto; }

/* ---------- inquiries ---------- */
.inquiries {
    margin-top: .85rem; display: grid; gap: .55rem;
}
.inquiry-card {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius); overflow: hidden;
}
.inquiry-summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .75rem; font-size: .85rem;
}
.inquiry-summary::-webkit-details-marker { display: none; }
.inquiry-summary:hover { background: var(--bg-elev); }
.inquiry-chevron { display: inline-flex; color: var(--ink-mute); flex-shrink: 0; transition: transform .15s; }
.inquiry-chevron svg { display: block; }
.inquiry-card[open] .inquiry-chevron { transform: rotate(90deg); }
.inquiry-summary-title {
    flex: 1; min-width: 0; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inquiry-summary-price {
    flex-shrink: 0; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.inquiry-summary-badge {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: .2rem;
    font-size: .68rem; font-weight: 600; color: var(--ok);
    text-transform: uppercase; letter-spacing: .04em;
}
.inquiry-summary-badge svg { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; }
.inquiry-body {
    padding: .55rem .75rem .65rem; display: flex; flex-direction: column; gap: .5rem;
    border-top: 1px solid var(--line);
}
.inquiry-head {
    display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
}
.inquiry-title {
    flex: 1; min-width: 12rem;
}
.inquiry-price { width: 8.5rem; flex-shrink: 0; }
.inquiry-remove {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1.25rem;
    line-height: 1; padding: 0 .35rem; flex-shrink: 0;
}
.inquiry-remove:hover { color: #7a2020; }
.inquiry-company { font-size: .85rem; min-height: 2.4rem; }
.inquiries-summary {
    font-size: .82rem; color: var(--ink-soft); padding: .35rem .5rem;
    font-style: italic;
}
.inquiries-summary strong {
    color: var(--ok); font-style: normal; font-weight: 600;
}
.inquiry-attachments {
    margin-top: 0; padding-top: .5rem;
    border-top: 1px dashed var(--line);
}
.upload-btn-sm {
    align-self: flex-start; font-size: .72rem; padding: .25rem .55rem;
}

/* ---------- gallery (task attachments, pinned to the bottom of the card) ---------- */
.task-gallery { margin-top: .9rem; padding-top: .75rem; border-top: 1px dashed var(--line); }
.task-gallery-head {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute);
}
.task-gallery .attachments { margin-top: .5rem; padding-top: 0; border-top: none; gap: .75rem; }
/* Bigger, multi-row thumbnails for the on-task photo gallery. */
.task-gallery .attachment-thumb { width: 9rem; height: 9rem; }
@media (max-width: 560px) {
    .task-gallery .attachments { gap: .6rem; }
    .task-gallery .attachment-thumb { width: calc(50% - .3rem); height: 8.5rem; }
}

/* ---------- attachments ---------- */
.attachments {
    margin-top: .9rem; padding-top: .75rem;
    border-top: 1px dashed var(--line);
    display: flex; flex-wrap: wrap; gap: .6rem;
}
.attachment-thumb {
    position: relative; width: 6.5rem; height: 6.5rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: 0; overflow: hidden; cursor: zoom-in;
    transition: border-color .15s, transform .15s;
}
.attachment-thumb:hover { border-color: var(--accent); transform: translateY(-1px); }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment-thumb .thumb-placeholder {
    display: grid; place-items: center; width: 100%; height: 100%;
    color: var(--ink-mute); font-size: 1.25rem;
}
.attachment-remove {
    position: absolute; top: 2px; right: 2px;
    width: 1.25rem; height: 1.25rem;
    background: rgba(0,0,0,.55); color: #fff;
    border: none; border-radius: 50%;
    font-size: .85rem; line-height: 1; cursor: pointer;
    display: grid; place-items: center;
}
.attachment-remove:hover { background: var(--accent-ink); }

.attachment-file {
    position: relative; display: inline-flex; align-items: center;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: .35rem .55rem;
    max-width: 100%;
}
.attachment-file .file-link {
    appearance: none; border: none; background: transparent;
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    color: var(--ink); padding: 0; font: inherit;
}
.attachment-file .file-link:hover { color: var(--accent-ink); }
.attachment-file .file-icon { font-size: 1rem; }
.attachment-file .file-name {
    font-size: .85rem; max-width: 14rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attachment-file .file-size {
    color: var(--ink-mute); font-size: .72rem;
    font-variant-numeric: tabular-nums;
}
.attachment-file .attachment-remove {
    position: static; margin-left: .4rem;
    width: 1.1rem; height: 1.1rem; font-size: .75rem;
    background: transparent; color: var(--ink-mute);
}
.attachment-file .attachment-remove:hover { color: #7a2020; background: transparent; }

/* ---------- item foot ---------- */
.item-foot {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin-top: .85rem;
}
.upload-btn {
    display: inline-flex; align-items: center; cursor: pointer;
    font-size: .78rem; font-weight: 500; color: var(--ink-soft);
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    padding: .35rem .7rem; background: transparent;
    transition: color .15s, border-color .15s, background .15s;
}
.upload-btn:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--bg); }
.upload-btn input[type="file"] {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.upload-btn-locked-hint {
    font-size: .72rem; color: var(--ink-mute);
    border: none; padding: .25rem .55rem;
    border-bottom: 1px solid transparent;
}
.upload-btn-locked-hint:hover {
    color: var(--accent-ink); border-bottom-color: var(--accent);
}
.updated {
    margin-left: auto; font-size: .72rem; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; letter-spacing: .02em;
}

/* ---------- lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(20, 16, 10, .88);
    display: grid; place-items: center; padding: 2rem;
    animation: lb-fade .15s ease-out;
}
@keyframes lb-fade { from { opacity: 0 } to { opacity: 1 } }
.lightbox-figure {
    max-width: min(95vw, 1500px); max-height: 92vh;
    margin: 0; display: flex; flex-direction: column; align-items: center;
    gap: .75rem;
}
.lightbox-figure img {
    max-width: 100%; max-height: 85vh; object-fit: contain;
    border-radius: var(--radius); background: #000;
    box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.lightbox-figure figcaption {
    color: var(--bg-elev); font-size: .85rem;
    display: flex; gap: 1rem; align-items: baseline;
}
.lightbox-figure .lightbox-count { color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    appearance: none; border: none; background: rgba(255,255,255,.1);
    color: #fff; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    appearance: none; border: none; background: rgba(255,255,255,.08);
    color: #fff; width: 3rem; height: 3rem; border-radius: 50%;
    font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-nav.prev { left: 1.25rem; }
.lightbox-nav.next { right: 1.25rem; }
@media (max-width: 560px) {
    .lightbox { padding: 1rem; }
    .lightbox-figure { max-width: 96vw; }
    .lightbox-nav { width: 2.5rem; height: 2.5rem; font-size: 1.6rem; }
    .lightbox-nav.prev { left: .4rem; }
    .lightbox-nav.next { right: .4rem; }
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.1rem; font-family: var(--font-sans);
    font-size: .88rem; font-weight: 500; cursor: pointer;
    border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: transparent; color: var(--ink); text-decoration: none;
    transition: all .15s;
}
.btn:hover { background: var(--bg-elev); border-color: var(--ink); border-bottom: 1px solid var(--ink); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: white; }
.btn-ghost { border-color: transparent; color: var(--ink-soft); }
.btn-danger { color: #7a2020; border-color: #d9b5b5; }
.btn-danger:hover { background: #f8e8e8; border-color: #7a2020; }

.phase-nav {
    display: flex; justify-content: space-between; gap: 1rem;
    margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.phase-nav .spacer { flex: 1; }

/* phase marked "not relevant" */
.phase-actions { margin-top: 1.1rem; }
.phase-header.is-irrelevant h1 { text-decoration: line-through; text-decoration-color: var(--ink-mute); }
.phase-irrelevant-banner {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-left: 3px solid var(--ink-mute); border-radius: var(--radius);
    padding: .8rem 1rem; color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.5rem;
}
.phase-sections.is-phase-irrelevant { opacity: .5; }

/* ---------- IDP phase action panel (PDF + AI) ---------- */
/* Compact horizontal card (art · copy + progress · actions), matching the 2D-house card it sits by. */
.idp-actions {
    display: flex; align-items: center; gap: 1rem;
    margin: .25rem 0 1.5rem; padding: 1.1rem 1.25rem;
    border: 1px solid var(--line); border-radius: var(--radius-lg, 14px); background: var(--bg-elev);
}
.idp-actions-art {
    flex: none; width: 56px; height: 56px; display: grid; place-items: center;
    color: var(--accent); opacity: .8;
}
.idp-actions-art svg { width: 38px; height: 38px; }
.idp-actions-copy { flex: 1 1 auto; min-width: 0; }
.idp-actions-copy h3 { margin: 0 0 .2rem; font-size: 1rem; }
.idp-actions-copy p { margin: 0 0 .55rem; color: var(--ink-soft); font-size: .85rem; max-width: 52ch; }
.idp-actions-btns { flex: none; display: flex; flex-direction: column; gap: .4rem; }
.idp-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; }
.idp-action-btn:disabled { opacity: .55; cursor: not-allowed; }
.idp-action-ico { font-size: 1.05em; line-height: 1; }
.idp-actions-progress { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.idp-actions-bar { flex: 1; min-width: 7rem; max-width: 14rem; height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; }
.idp-actions-bar-fill { height: 100%; background: var(--accent); transition: width .25s ease; }
.idp-actions-bar-fill.ok { background: var(--ok); }
.idp-actions-prog-label { font-size: .78rem; color: var(--ink-mute); }
@media (max-width: 560px) {
    .idp-actions { flex-wrap: wrap; }
    .idp-actions-btns { flex-direction: row; width: 100%; }
    .idp-actions-btns .btn { flex: 1; }
}

/* ---------- IDP AI-generated 2D house image ---------- */
.idp-image { margin: 0 0 1.5rem; }
.idp-image-top { margin-top: .5rem; }
.idp-image-status {
    display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1rem;
    border: 1px solid var(--line); border-radius: var(--radius-lg, 14px); background: var(--bg-elev);
    color: var(--ink-soft); font-size: .9rem;
}
.idp-image-err { color: var(--danger, #c0392b); border-color: var(--danger, #c0392b); }
.idp-image-fig {
    margin: 0; padding: .75rem; border: 1px solid var(--line);
    border-radius: var(--radius-lg, 14px); background: var(--bg-elev);
}
.idp-image-fig img {
    display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto;
    border-radius: var(--radius, 10px);
}
.idp-image-fig figcaption {
    margin-top: .6rem; font-size: .8rem; color: var(--ink-mute); text-align: center;
    display: flex; gap: .75rem; justify-content: center; align-items: center; flex-wrap: wrap;
}
.idp-image-acts { display: inline-flex; gap: .75rem; align-items: center; }
.idp-image-dl { font-weight: 600; }

/* Placeholder card shown before an image exists (and the "generating" state). */
.idp-house-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
    border: 1px dashed var(--line); border-radius: var(--radius-lg, 14px); background: var(--bg-elev);
}
.idp-house-card.is-busy { color: var(--ink-soft); font-size: .9rem; }
.idp-house-art {
    flex: none; width: 56px; height: 56px; display: grid; place-items: center;
    color: var(--accent); opacity: .8;
}
.idp-house-art svg { width: 40px; height: 40px; }
.idp-house-copy { flex: 1 1 auto; min-width: 0; }
.idp-house-copy h3 { margin: 0 0 .2rem; font-size: 1rem; }
.idp-house-copy p { margin: 0; color: var(--ink-soft); font-size: .85rem; max-width: 52ch; }
.idp-house-btn { flex: none; display: inline-flex; align-items: center; gap: .45rem; }
.idp-house-btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 560px) {
    .idp-house-card { flex-wrap: wrap; }
    .idp-house-btn { width: 100%; justify-content: center; }
}

/* ---------- toasts (transient notifications) ---------- */
.toast-host {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 1000;
    display: flex; flex-direction: column; gap: .5rem; max-width: min(92vw, 30rem);
}
.toast-item {
    display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .85rem;
    border-radius: var(--radius-lg, 12px); background: var(--bg-elev);
    border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
    font-size: .88rem; color: var(--ink); animation: toast-in .18s ease-out;
}
.toast-item .toast-msg { flex: 1 1 auto; word-break: break-word; }
.toast-close {
    flex: none; border: 0; background: none; cursor: pointer; line-height: 1;
    font-size: 1.1rem; color: var(--ink-mute); padding: 0 .15rem;
}
.toast-error { border-color: var(--danger, #c0392b); border-left: 3px solid var(--danger, #c0392b); }
.toast-success { border-color: var(--ok); border-left: 3px solid var(--ok); }
.toast-info { border-left: 3px solid var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- comments ---------- */
.comments {
    margin-top: .9rem; padding-top: .75rem;
    border-top: 1px dashed var(--line);
}
.comments-list { display: grid; gap: .5rem; margin-bottom: .65rem; }
.comment {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .55rem .75rem;
}
.comment-meta {
    display: flex; align-items: baseline; gap: .55rem;
    font-size: .78rem; color: var(--ink-mute); margin-bottom: .2rem;
}
.comment-meta strong { color: var(--ink-soft); font-weight: 600; }
.comment-time { font-variant-numeric: tabular-nums; }
.comment-remove {
    margin-left: auto; appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1rem; line-height: 1;
    padding: 0 .25rem;
}
.comment-remove:hover { color: #7a2020; }
.comment-body {
    font-size: .92rem; color: var(--ink); white-space: pre-wrap; word-wrap: break-word;
}

.comment-add { display: flex; gap: .5rem; align-items: flex-start; }
.comment-input {
    flex: 1; min-height: 2.1rem; resize: vertical;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .45rem .65rem; background: var(--bg);
    font-family: var(--font-sans); font-size: .9rem; color: var(--ink);
}
.comment-input:focus { outline: none; border-color: var(--accent); }
.comment-input::placeholder { color: var(--ink-mute); font-style: italic; }
.btn-sm { padding: .4rem .8rem; font-size: .8rem; }

/* Inline button spinner (export "loading" state) — inherits the button's text colour. */
.btn-spinner {
    display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; margin-right: .15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---------- nav user ---------- */
.nav-user {
    display: inline-flex; align-items: center;
    padding-left: 1rem; margin-left: .25rem;
    border-left: 1px solid var(--line);
}

/* user avatar + name button that toggles the account dropdown */
.nav-user-toggle {
    appearance: none; border: 1px solid transparent; background: transparent;
    padding: .3rem .55rem .3rem .35rem; border-radius: 999px;
    font-family: var(--font-sans); font-size: .875rem; font-weight: 500;
    color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; gap: .5rem;
    transition: background .15s, color .15s, border-color .15s;
}
.nav-user-toggle:hover { color: var(--ink); background: var(--bg-elev); }
.nav-user-dropdown.open .nav-user-toggle {
    color: var(--ink); background: var(--bg-elev); border-color: var(--line-strong);
}
.nav-user-avatar {
    flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--accent); color: #fff; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .82rem;
}
.nav-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nav-user-label {
    max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* account dropdown opens flush to the right edge of the nav */
.nav-user-menu { left: auto; right: 0; min-width: 15rem; }

.nav-user-head {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .65rem .65rem;
    border-bottom: 1px solid var(--line); margin-bottom: .35rem;
}
.nav-user-avatar-lg { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.nav-user-head-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nav-user-head-name { font-weight: 600; color: var(--ink); font-size: .9rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-head-email { font-size: .75rem; color: var(--ink-mute);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* buttons reused as menu items must shed the UA button chrome */
button.nav-dropdown-item {
    appearance: none; background: transparent;
    font-family: var(--font-sans); font-size: .9rem;
}

.nav-dropdown-sep { height: 1px; background: var(--line); margin: .35rem -.35rem; }

.nav-user-section {
    padding: .35rem .75rem .15rem;
    font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
    color: var(--ink-mute);
}

.nav-user-logout { width: 100%; cursor: pointer; text-align: left; }
.nav-user-logout:hover { color: var(--danger, #b3261e); }

/* ---------- profile page ---------- */
.profile-section {
    margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
/* The header already draws a divider, so the first section skips its own top border (no double line). */
.profile-section:first-of-type { border-top: none; margin-top: 1.25rem; padding-top: 0; }
/* Read-only fields (e.g. e-mail) read as informational, not editable. */
.profile-field input[readonly] { background: var(--bg-elev); color: var(--ink-soft); cursor: default; }
.profile-section h2 {
    font-family: var(--font-serif); font-size: 1.3rem;
    margin-bottom: .35rem;
}
.profile-help {
    color: var(--ink-soft); font-size: .9rem; margin: .35rem 0 1rem;
}
.profile-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .85rem;
}
.profile-field { display: flex; flex-direction: column; gap: .3rem; }
.profile-field > label {
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute);
}
.profile-field-actions { flex-direction: row; gap: .5rem; align-items: end; }
.profile-field-message {
    grid-column: 1 / -1;
    font-size: .85rem; color: var(--ok); font-style: italic;
}
.profile-actions {
    margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.profile-saved {
    color: var(--ok); font-size: .85rem; font-style: italic;
}

/* avatar */
.profile-avatar-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.profile-avatar {
    width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none;
    display: grid; place-items: center; background: var(--bg-elev);
    border: 1px solid var(--line);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-initial { font-size: 2rem; font-weight: 700; color: var(--ink-soft); }
.profile-avatar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
/* the upload button is a <label> wrapping a hidden <input type=file> */
.profile-avatar-actions label.btn { cursor: pointer; }
.profile-avatar-actions label.btn.is-busy { opacity: .65; pointer-events: none; }

/* "coming soon" section + badge */
.profile-section.is-disabled { opacity: .55; }
.profile-badge-soon {
    display: inline-block; margin-left: .5rem; vertical-align: middle;
    font-family: var(--font-sans, inherit); font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px solid var(--line);
    padding: .15rem .45rem; border-radius: 999px;
}

/* ---------- login screen ---------- */
.login-screen {
    min-height: 100vh; display: grid; place-items: center;
    padding: 1.5rem; background: var(--bg);
}

/* ---------- legal documents (Terms, Privacy) ---------- */
.legal-page { min-height: 100vh; background: var(--bg); padding: 2.5rem 1.5rem; }
.legal-doc {
    max-width: 46rem; margin: 0 auto;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 2.5rem 2.25rem;
    color: var(--ink); line-height: 1.6;
}
.legal-doc h1 { font-size: 1.9rem; margin: .5rem 0 .25rem; }
.legal-doc h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.legal-doc p { margin: 0 0 .85rem; color: var(--ink-soft); }
.legal-doc ul { margin: 0 0 .85rem 1.1rem; color: var(--ink-soft); }
.legal-doc li { margin-bottom: .35rem; }
.legal-meta { font-size: .85rem; color: var(--ink-mute); }
.legal-callout {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius); padding: .85rem 1rem;
    font-size: .9rem; color: var(--ink-soft); margin: 1rem 0 1.5rem;
}
.legal-back {
    display: inline-block; margin: 0 0 1rem; font-size: .9rem;
    color: var(--accent); text-decoration: none;
}
.legal-back:last-child { margin: 1.5rem 0 0; }

/* legal doc embedded inside a modal iframe — drop the full-page chrome */
.legal-embed { min-height: 0; padding: 0; background: transparent; }
.legal-embed .legal-doc { border: 0; border-radius: 0; max-width: none; margin: 0; padding: 1.5rem 1.75rem; }

/* legal modals: CSS-only (checkbox) on the auth pages, Blazor-toggled (.is-open) in the footer */
.legal-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.legal-link:hover { color: var(--accent-ink); }
.legal-modal-toggle { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.legal-modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center; padding: 1.25rem;
}
.legal-modal.is-open,
#m-terms:checked ~ .legal-modal--terms,
#m-privacy:checked ~ .legal-modal--privacy { display: flex; }
.legal-modal-backdrop { position: absolute; inset: 0; background: rgba(20,16,12,.55); border: 0; cursor: pointer; }
.legal-modal-card {
    position: relative; width: min(46rem, 100%); height: min(82vh, 100%);
    background: var(--bg); border-radius: var(--radius); overflow: hidden; display: flex;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.legal-modal-close {
    position: absolute; top: .5rem; right: .55rem; z-index: 2;
    width: 2rem; height: 2rem; border: 0; border-radius: 50%;
    background: var(--bg-elev); color: var(--ink); font-size: 1.5rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.legal-modal-close:hover { background: var(--line); }
.legal-modal-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* Newsletter sign-up modal: a small content card (reuses the .legal-modal overlay shell). */
.newsletter-card-modal {
    width: min(26rem, 100%); height: auto; display: block;
    background: var(--bg-elev); border: 1px solid var(--line);
}
.newsletter-modal-body { padding: 2rem 1.85rem 1.85rem; text-align: center; }
.newsletter-modal-title { margin: 0 0 .35rem; font-size: 1.35rem; }
.newsletter-modal-context { margin: 0 0 .5rem; color: var(--ink-mute); font-size: .9rem; }
.newsletter-modal-lead { margin: 0 0 1.25rem; color: var(--ink-soft); }
.newsletter-modal-error { margin: 0 0 .85rem; color: #c0392b; font-size: .9rem; }
.newsletter-modal-submit { width: 100%; }
.newsletter-modal-email { margin: .6rem 0 0; color: var(--ink-mute); font-size: .85rem; }

/* Newsletter Sendy redirect landing pages (server-rendered Razor Pages under /newsletter/*).
   Reuse .login-screen / .login-card / .login-logo / .login-lead; these add the icon + badge. */
.nl-card { text-align: center; }
.nl-icon {
    width: 3.25rem; height: 3.25rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; line-height: 1; margin: .25rem auto 1rem;
}
.nl-icon.ok { background: var(--accent); color: #fff; }
.nl-icon.cross { background: var(--bg); color: var(--ink-soft); border: 2px solid var(--line-strong); }
.nl-icon.warn { background: var(--bg); color: var(--accent); border: 2px solid var(--accent); }
.nl-badge {
    display: inline-block; margin-bottom: .75rem;
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--accent); border: 1px solid var(--accent); padding: .25rem .65rem; border-radius: 100px;
}
.nl-btn { display: inline-block; margin-top: 1.25rem; text-decoration: none; }
.nl-btn.secondary {
    background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
}
.nl-note { margin: 1rem 0 0; font-size: .85rem; color: var(--ink-mute); }
.nl-note a { color: var(--accent); }
.login-card {
    width: 100%; max-width: 26rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.85rem 2.1rem;
    display: flex; flex-direction: column; gap: .7rem;
    box-shadow: 0 12px 40px rgba(20, 14, 6, .07);
}
.login-mark {
    font-size: 2.5rem; color: var(--accent);
    line-height: 1; margin-bottom: .25rem;
}
.login-logo {
    height: 2.9rem; width: auto; display: block;
    align-self: center; margin-bottom: .15rem;
}
.login-eyebrow {
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em;
    color: var(--accent);
}
.login-card h1 { font-size: 1.6rem; line-height: 1.15; margin-bottom: .1rem; }
.login-lead {
    color: var(--ink-soft); font-size: .9rem; line-height: 1.45;
    margin: 0 0 .35rem;
}
.login-input {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg);
    padding: .75rem .9rem;
    font-family: var(--font-sans); font-size: 1rem;
    color: var(--ink);
}
.login-input:focus { outline: none; border-color: var(--accent); }
.login-submit {
    align-self: flex-start;
    padding: .7rem 1.4rem;
}
.login-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- error UI ---------- */
#blazor-error-ui {
    color-scheme: light only;
    background: #2b2318; color: #fbf7f0;
    bottom: 0; box-shadow: 0 -1px 8px rgba(0,0,0,.25);
    box-sizing: border-box; display: none;
    left: 0; padding: .8rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss, #blazor-error-ui .reload { cursor: pointer; color: var(--accent-soft); margin: 0 .5rem; }
#blazor-error-ui .dismiss { position: absolute; right: 1rem; top: .75rem; }

.blazor-error-boundary {
    background: #2b2318; color: white;
    padding: 1rem 1rem 1rem 1rem;
}
.blazor-error-boundary::after { content: "Prišlo je do napake."; }

/* ---------- schedule view tabs ---------- */
.schedule-tabs {
    display: inline-flex; gap: 0;
    border: 1px solid var(--line-strong); border-radius: 999px;
    background: var(--bg); padding: 2px;
}
.schedule-tab {
    appearance: none; border: none; background: transparent;
    padding: .4rem 1rem; font-family: var(--font-sans);
    font-size: .8rem; font-weight: 600; color: var(--ink-mute);
    cursor: pointer; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .06em;
    transition: background .15s, color .15s;
}
.schedule-tab:hover { color: var(--ink); }
.schedule-tab.active { background: var(--ink); color: var(--bg); }

/* ---------- schedule toolbar: tabs + zoom + fullscreen on one line ---------- */
.schedule-toolbar {
    display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.schedule-toolbar .gantt-controls { margin-bottom: 0; }
.schedule-fs-btn { white-space: nowrap; margin-left: auto; }

/* Fullscreen mode: break out of the centered container and fill the viewport.
   Only the Terminski Plan needs the extra horizontal room. */
.schedule-page.is-fullscreen {
    position: fixed; inset: 0; z-index: 70;
    background: var(--bg);
    overflow: auto;
    padding: 1.75rem clamp(1.5rem, 4vw, 4rem) 2.5rem;
}
.schedule-page.is-fullscreen .phase-header { margin-bottom: 1.5rem; }
.schedule-page.is-fullscreen .gantt { max-height: calc(100vh - 13rem); }

/* ---------- calendar ---------- */
.cal-controls {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.cal-month-label {
    font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600;
    min-width: 9rem; text-align: center;
}
.cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); overflow: hidden;
}
.cal-dow {
    padding: .5rem .65rem; background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: .7rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .08em;
}
.cal-dow + .cal-dow { border-left: 1px solid var(--line); }
.cal-grid-week .cal-cell { min-height: 14rem; }
.cal-grid-month .cal-cell { min-height: 5.5rem; }
.cal-cell {
    padding: .35rem .4rem;
    border-top: 1px solid var(--line); border-left: 1px solid var(--line);
    background: var(--bg-elev); display: flex; flex-direction: column; gap: .25rem;
    position: relative;
}
.cal-daynum-suffix {
    margin-left: .25rem; color: var(--ink-mute);
    font-weight: 500; text-transform: lowercase;
}
.cal-event-range {
    margin-left: .25rem; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; font-size: .7rem;
}
.cal-cell:nth-child(7n+1) { border-left: none; }
.cal-cell.is-outside { background: var(--bg); color: var(--ink-mute); opacity: .55; }
.cal-cell.is-today { background: var(--accent-soft); }
.cal-daynum {
    font-size: .78rem; font-weight: 600; color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}
.cal-cell.is-today .cal-daynum { color: var(--accent-ink); }
.cal-event {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .72rem; padding: .12rem .35rem; border-radius: var(--radius);
    color: var(--ink); background: var(--bg);
    border: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-decoration: none;
}
.cal-event:hover { border-color: var(--accent); }
.cal-event-dot {
    width: .5rem; height: .5rem; border-radius: 50%; flex-shrink: 0;
    background: var(--ink-mute);
}
.cal-event.todo .cal-event-dot { background: #e0857a; }
.cal-event.wip .cal-event-dot { background: #e3b93c; }
.cal-event.done .cal-event-dot { background: #4f7d5a; }
.cal-event.na .cal-event-dot { background: #9a9488; }
.cal-event-text { overflow: hidden; text-overflow: ellipsis; }
.cal-empty {
    margin-top: 1.5rem; color: var(--ink-mute); font-style: italic;
}

/* ---------- report ---------- */
.report-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
/* Match the export buttons to the height of the z DDV / brez DDV switch on /costs. */
.report-actions .billing-toggle { margin-bottom: 0; height: 2.4rem; }
.report-actions > .btn { height: 2.4rem; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
.report-filters {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    margin-bottom: 2rem;
}
.report-filters-label {
    font-size: .75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute); margin-right: .25rem;
}
/* Status pills (search/iskalnik task table "Stanje" column) — text + status colour + leading dot. */
.status-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .15rem .6rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; line-height: 1.5;
    border: 1px solid transparent; white-space: nowrap;
    background: var(--bg); color: var(--ink-soft);
}
.status-pill::before {
    content: ""; width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--status-color, var(--ink-mute)); flex: none;
}
.status-pill.todo { --status-color: #e0857a; background: #fbe9e5; color: #8a3322; border-color: #f1c7bd; }
.status-pill.wip  { --status-color: #e3b93c; background: #fbf3da; color: #7a5e12; border-color: #ecd9a0; }
.status-pill.done { --status-color: #4f7d5a; background: #e7f0e9; color: #2f5238; border-color: #bcd6c2; }
.status-pill.na   { --status-color: #9a9488; background: #efedea; color: #5f5a51; border-color: #d6d2ca; }

.report-filters .status-pill {
    border: 1px solid var(--line-strong);
}
.report-print-head {
    display: none; align-items: baseline; justify-content: space-between;
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink);
}
.report-print-head h1 { font-size: 1.5rem; }
.report-print-meta { color: var(--ink-mute); font-size: .85rem; font-variant-numeric: tabular-nums; }
.report-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: .5rem; margin-bottom: 2rem;
}
.report-summary-cell {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .85rem 1rem;
    text-align: center;
}
.report-summary-num {
    font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600;
    color: var(--ink); line-height: 1;
}
.report-summary-label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute); margin-top: .25rem;
}
.report-phase { margin-bottom: 2rem; }
.report-phase-title {
    font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600;
    padding-bottom: .35rem; border-bottom: 1px solid var(--line-strong);
    margin-bottom: 1rem;
}
.report-section { margin-bottom: 1.25rem; }
.report-section-title {
    font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600;
    color: var(--ink-soft); margin-bottom: .5rem;
}
.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.report-item {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .75rem 1rem;
}
.report-item-head {
    display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
}
.report-item-text { font-size: .95rem; color: var(--ink); flex: 1; min-width: 12rem; }
.report-details {
    margin: .55rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .35rem .85rem;
}
.report-detail { margin: 0; display: flex; gap: .4rem; }
.report-detail dt {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-mute); margin: 0;
}
.report-detail dd { margin: 0; font-size: .82rem; color: var(--ink); }
.report-desc {
    margin: .55rem 0 0; font-size: .88rem; color: var(--ink-soft);
    white-space: pre-wrap;
}

@media print {
    @page { margin: 1.5cm; }
    body { background: white; color: black; font-size: 11pt; }
    .app-nav, .app-footer, .report-no-print { display: none !important; }
    .app-main { max-width: none; padding: 0; }
    .report-print-head { display: flex !important; }
    .report-print-only { display: block !important; }
    .report-item, .report-summary-cell { background: white; }
    a { color: black; }
    .status-pill {
        border: 1px solid #888 !important; background: white !important;
        color: black !important; padding: .1rem .45rem;
    }
}

/* ---------- progress timeline ---------- */
.timeline {
    --tl-date-w: 5.5rem;
    list-style: none; padding: 0; margin: 0; position: relative;
}
.timeline::before {
    content: ''; position: absolute; top: .35rem; bottom: 0;
    left: calc(var(--tl-date-w) + .75rem + 9px);
    width: 2px; background: var(--line);
}
.timeline-item {
    position: relative; display: grid;
    grid-template-columns: var(--tl-date-w) 20px minmax(0, 1fr);
    column-gap: .75rem; align-items: start; padding-bottom: 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
    grid-column: 2; margin-top: .35rem;
    width: 20px; height: 20px; display: grid; place-items: center;
    background: var(--bg); z-index: 1;
}
.timeline-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--ink-mute); border: 2px solid var(--bg);
    box-shadow: 0 0 0 1px var(--line-strong);
}
.timeline-item.todo .timeline-dot { background: var(--ink); }
.timeline-item.todo .timeline-dot { background: #e0857a; }
.timeline-item.wip .timeline-dot { background: #e3b93c; }
.timeline-item.done .timeline-dot { background: #4f7d5a; }
.timeline-item.na .timeline-dot { background: #9a9488; }
.timeline-item.na .timeline-dot { background: var(--ink-mute); }
.timeline-body {
    grid-column: 3;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .75rem 1rem;
}
.timeline-meta {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    font-size: .8rem; color: var(--ink-mute); margin-bottom: .35rem;
}
.timeline-date {
    grid-column: 1; text-align: right; padding-top: .3rem;
    font-size: .8rem; line-height: 1.3;
    font-variant-numeric: tabular-nums; color: var(--ink-soft); font-weight: 600;
}
.timeline-phase {
    margin-left: auto; font-size: .75rem; color: var(--accent-ink);
    border-bottom: none;
}
.timeline-title {
    font-size: .98rem; color: var(--ink); font-weight: 500;
}
.timeline-section {
    font-size: .78rem; color: var(--ink-mute); margin-top: .15rem;
}
.timeline-desc {
    margin: .45rem 0 0; font-size: .88rem; color: var(--ink-soft);
    white-space: pre-wrap;
}

/* ---------- phase files (per-phase document/photo dropbox, collapsible) ---------- */
.phase-files {
    margin: 1.25rem 0 1.75rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-left: 3px solid var(--phase-color, var(--line-strong));
    border-radius: var(--radius);
}
/* Accordion header (native <details><summary>) — collapses the whole area since it can get tall. */
.phase-files-summary {
    display: flex; align-items: center; gap: .6rem;
    padding: .9rem 1.2rem; cursor: pointer; list-style: none; user-select: none;
}
.phase-files-summary::-webkit-details-marker { display: none; }
.phase-files-summary::marker { content: ""; }
.phase-files-summary:hover .phase-files-summary-title { color: var(--accent-ink); }
.phase-files-ico { width: 1.15rem; height: 1.15rem; flex: none; color: var(--phase-color, var(--accent)); }
.phase-files-summary-title { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; transition: color .15s; }
.phase-files-chevron {
    width: 1.1rem; height: 1.1rem; flex: none; color: var(--ink-mute);
    margin-left: .15rem; transition: transform .15s;
}
.phase-files[open] .phase-files-chevron { transform: rotate(180deg); }
.phase-files-content { padding: 0 1.2rem 1.25rem; }
.phase-files-sub { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.5; }
.phase-files-examples { margin: .3rem 0 0; font-size: .78rem; color: var(--ink-mute); line-height: 1.5; }
.phase-files-examples strong { color: var(--ink-soft); font-weight: 600; }
.phase-files-count {
    margin-left: auto; flex-shrink: 0;
    font-size: .72rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 999px; padding: .2rem .6rem;
    font-variant-numeric: tabular-nums;
}

/* Drop zone: a transparent full-area file input sits on top so BOTH click and native file-drop
   work; the caption below is pointer-events:none so events reach the input underneath. */
.phase-files-drop {
    position: relative; display: block; margin-top: .85rem;
    border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
    background: var(--bg); padding: 1.1rem 1rem; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.phase-files-drop:hover { border-color: var(--accent); }
.phase-files-drop.is-dragging { border-color: var(--accent); background: var(--ok-soft); }
.phase-files-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.phase-files-drop-inner {
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    text-align: center; pointer-events: none; color: var(--ink-soft);
}
.phase-files-drop-icon { font-size: 1.5rem; line-height: 1; color: var(--phase-color, var(--accent)); }
.phase-files-drop-main { font-size: .9rem; }
.phase-files-drop-hint { font-size: .72rem; color: var(--ink-mute); }

.phase-files-empty { margin: .85rem 0 0; color: var(--ink-mute); font-style: italic; font-size: .88rem; }

.phase-files-grid {
    margin-top: 1rem;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: .9rem;
}
.phase-file-card {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column;
}
.phase-file-thumb {
    appearance: none; border: none; padding: 0; background: var(--bg-elev);
    width: 100%; aspect-ratio: 4/3; overflow: hidden; display: block;
    cursor: zoom-in; text-decoration: none;
}
.phase-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phase-file-thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-mute); }
.phase-file-doc {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; cursor: pointer; color: var(--ink-soft);
    background: linear-gradient(160deg, var(--bg-elev), var(--bg));
}
.phase-file-doc:hover { color: var(--accent-ink); }
.phase-file-doc-icon { width: 2rem; height: 2rem; }
.phase-file-doc-ext { font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-mute); }
/* PDF first-page preview fills the tile; the type badge floats in the corner. */
.phase-file-doc.has-preview { padding: 0; gap: 0; position: relative; background: #fff; align-items: stretch; }
.phase-file-doc-preview { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.phase-file-doc-ext-badge {
    position: absolute; top: .4rem; left: .4rem;
    background: rgba(20, 14, 6, .72); color: #fff; border-radius: 4px;
    padding: .08rem .32rem; font-size: .6rem; letter-spacing: .06em;
}
.phase-file-body { padding: .55rem .65rem .65rem; display: flex; flex-direction: column; gap: .4rem; }
.phase-file-name {
    font-size: .82rem; font-weight: 600; line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.phase-file-meta {
    display: flex; justify-content: space-between; gap: .5rem;
    font-size: .7rem; color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.phase-file-desc { font-size: .8rem; resize: vertical; min-height: 2.1rem; }
.phase-file-actions { display: flex; gap: .4rem; align-items: center; }
.phase-file-actions a.btn { text-decoration: none; }

/* ---------- subscription page ---------- */
.sub-tiers {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.25rem; margin-bottom: 2rem;
}
.sub-tier {
    position: relative;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.5rem 1.25rem 1.25rem;
    display: flex; flex-direction: column; gap: .75rem;
}
.sub-tier.is-featured {
    border-color: var(--accent); box-shadow: 0 12px 28px rgba(196, 90, 42, .12);
}
.sub-tier.is-active {
    border-color: var(--ok); background: var(--ok-soft);
}
.sub-tier-badge {
    position: absolute; top: -.6rem; left: 1rem;
    background: var(--accent); color: white;
    padding: .15rem .55rem; border-radius: 999px;
    font-size: .65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
}
.sub-tier-name {
    font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600;
}
.sub-tier-price {
    font-family: var(--font-serif); font-size: 2rem; font-weight: 700;
    color: var(--ink); line-height: 1;
}
.sub-tier-price span {
    font-size: .85rem; font-weight: 400; color: var(--ink-mute);
}
.sub-tier-lead { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.sub-tier-features {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: .35rem; font-size: .88rem;
    flex: 1;
}
.sub-tier-features li.has { color: var(--ink); }
.sub-tier-features li.no { color: var(--ink-mute); }
.sub-tier-cta { margin-top: auto; align-self: stretch; justify-content: center; }
.sub-saved { color: var(--ok); font-style: italic; }

/* ---------- locked feature screen ---------- */
.locked-feature {
    max-width: 32rem; margin: 4rem auto; text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius);
}
.locked-feature-mark {
    font-size: 2.5rem; color: var(--accent); margin-bottom: .5rem;
}
.locked-feature h2 {
    font-family: var(--font-serif); font-size: 1.75rem; margin-bottom: .5rem;
}
.locked-feature-lead {
    color: var(--ink-soft); font-size: 1rem; margin: 0 0 1rem;
}
.locked-feature-need {
    color: var(--ink-mute); font-size: .9rem; margin: 0 0 1.5rem;
}

/* ---------- nav link variants ---------- */
.nav-link-pricing { color: var(--accent-ink) !important; font-weight: 600; }

/* ---------- AI chat ---------- */
.ai-fab {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 60;
    width: 3.4rem; height: 3.4rem; border-radius: 50%;
    border: none; cursor: pointer;
    background: var(--bg-elev); color: var(--accent);
    font-family: var(--font-serif); font-weight: 700;
    box-shadow: 0 10px 24px rgba(40, 30, 18, .25);
    display: grid; place-items: center;
    transition: transform .2s, background .15s, box-shadow .15s, opacity .15s;
    border: 1px solid var(--line-strong);
}
.ai-fab:hover {
    background: var(--bg); transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(40, 30, 18, .3);
}
.ai-fab.open {
    opacity: 0; pointer-events: none; transform: scale(.85);
}
.ai-fab-mark {
    line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.ai-fab-mark img { width: 2.4rem; height: 2.4rem; display: block; object-fit: contain; }

.ai-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 55;
    width: var(--ai-width, min(28rem, 100vw));
    min-width: 20rem; max-width: 100vw;
    background: var(--bg-elev);
    border-left: 1px solid var(--line-strong);
    box-shadow: -16px 0 30px rgba(40, 30, 18, .12);
    display: flex; flex-direction: column;
    animation: ai-slide-in .25s ease-out;
}
@keyframes ai-slide-in {
    from { transform: translateX(100%); opacity: .4; }
    to { transform: translateX(0); opacity: 1; }
}
.ai-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.ai-head-title {
    font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem;
    color: var(--ink); flex: 1;
}
.ai-head-mark { margin-right: .35rem; }
.ai-head-mark img { width: 1.4rem; height: 1.4rem; vertical-align: -.32em; object-fit: contain; }

/* ---------- backend-unreachable overlay (in-app, when the API dies mid-session) ---------- */
.conn-down {
    position: fixed; inset: 0; z-index: 9999;
    display: grid; place-items: center; padding: 1.5rem;
    background: rgba(244, 239, 230, .86); backdrop-filter: blur(4px);
}
.conn-down-card {
    text-align: center; background: var(--bg-elev);
    border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius); padding: 2.5rem 2.25rem; max-width: 30rem; width: 100%;
    box-shadow: 0 16px 48px rgba(40, 30, 18, .18);
}
.conn-down-logo { height: 34px; margin-bottom: 1.5rem; }
.conn-down-icon {
    width: 3.25rem; height: 3.25rem; margin: 0 auto 1.1rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
}
.conn-down-icon svg { width: 1.7rem; height: 1.7rem; }
.conn-down-title { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 600; margin-bottom: .5rem; }
.conn-down-msg { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; margin: 0 0 1.75rem; }
.conn-down-btn { width: 100%; justify-content: center; }
.conn-down-status {
    margin-top: 1.25rem; font-size: .76rem; color: var(--ink-mute);
    display: inline-flex; align-items: center; gap: .45rem;
}
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: #b5483f; flex: none; }

/* ---------- daily-usage pill (metered AI / lookup features) ---------- */
.usage-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .68rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 999px; padding: .12rem .5rem;
    font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5;
}
.usage-pill-label { text-transform: uppercase; letter-spacing: .05em; }
.usage-pill-count { color: var(--ink-soft); }
.usage-pill-unit { color: var(--ink-mute); font-weight: 400; }
.usage-pill.is-exhausted { background: #fbeae7; border-color: #e2b3a9; color: #8a2f27; }
.usage-pill.is-exhausted .usage-pill-count { color: #8a2f27; }
.ai-head-close {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer;
    width: 2rem; height: 2rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.ai-head-close svg { width: 1.15rem; height: 1.15rem; display: block; }
.ai-head-close:hover { background: var(--bg-elev); color: var(--ink); }

.ai-messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: .65rem;
}
.ai-empty {
    color: var(--ink-soft); font-size: .9rem;
}
.ai-empty ul { padding-left: 1.1rem; margin: .5rem 0 0; }
.ai-empty li { margin-bottom: .25rem; }

.ai-msg {
    display: flex; flex-direction: column; gap: .2rem;
    max-width: 88%;
}
.ai-msg.from-user { align-self: flex-end; align-items: flex-end; }
.ai-msg.from-ai { align-self: flex-start; align-items: flex-start; }
.ai-msg-meta {
    font-size: .7rem; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.ai-msg-body {
    padding: .55rem .75rem; border-radius: var(--radius);
    font-size: .9rem; line-height: 1.4;
    white-space: pre-wrap; word-wrap: break-word;
}
.ai-msg.from-user .ai-msg-body {
    background: var(--ink); color: var(--bg);
}
.ai-msg.from-ai .ai-msg-body {
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--line-strong);
}
.ai-thinking { font-style: italic; color: var(--ink-mute); }

.ai-input-row {
    display: flex; gap: .5rem; align-items: flex-end;
    padding: .75rem 1rem;
    border-top: 1px solid var(--line);
    background: var(--bg);
}
.ai-input {
    flex: 1; min-height: 2.75rem; max-height: 16rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius-lg, 14px);
    padding: .6rem .8rem; font-family: var(--font-sans);
    font-size: .9rem; line-height: 1.5; color: var(--ink); background: var(--bg-elev);
    resize: vertical;                                   /* drag the bottom edge to grow it taller */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-input::placeholder { color: var(--ink-mute); }
.ai-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.ai-send { flex-shrink: 0; }
/* Round action buttons in the chat input row (random / send / stop). */
.ai-round-btn {
    flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; font-size: 1.05rem; line-height: 1; cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-soft);
    transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.ai-round-btn svg { width: 1.15rem; height: 1.15rem; display: block; }
.ai-round-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-ink); background: var(--bg); }
.ai-round-btn:active:not(:disabled) { transform: scale(.92); }
.ai-round-btn:disabled { opacity: .45; cursor: default; }
.ai-send-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.ai-send-btn:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.ai-stop-btn { background: #7a2020; border-color: #7a2020; color: #fff; }
.ai-stop-btn:hover:not(:disabled) { background: #8f2626; border-color: #8f2626; }

.ai-foot {
    padding: .5rem 1rem .75rem;
    font-size: .7rem; color: var(--ink-mute); font-style: italic;
    background: var(--bg); text-align: center;
}
/* Live "thinking" timer shown in the foot while the assistant works. */
.ai-timer {
    display: inline-flex; align-items: center; gap: .4rem;
    font-style: normal; color: var(--ink-soft); font-weight: 600;
}
.ai-timer-dot {
    width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--accent); animation: ai-timer-pulse 1s ease-in-out infinite;
}
.ai-timer-secs { font-variant-numeric: tabular-nums; color: var(--accent-ink); }
@keyframes ai-timer-pulse { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.ai-locked {
    padding: 2.5rem 1.5rem; text-align: center;
    display: flex; flex-direction: column; gap: .65rem; align-items: center;
}
.ai-locked-mark { font-size: 2rem; color: var(--accent); line-height: 1; }
.ai-locked h3 { font-family: var(--font-serif); font-size: 1.25rem; margin: 0; }
.ai-locked p { color: var(--ink-soft); margin: 0; font-size: .92rem; }
.ai-locked strong { color: var(--accent-ink); font-weight: 600; }

/* ---------- AI chat: header tools, suggestions, fullscreen, pin, markdown ---------- */
.ai-head-actions { display: flex; align-items: center; gap: .15rem; }
.ai-head-btn {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer;
    width: 1.9rem; height: 1.9rem; border-radius: var(--radius);
    font-size: 1rem; line-height: 1; display: grid; place-items: center;
    transition: background .12s, color .12s, opacity .12s;
}
.ai-head-btn svg { width: 1.05rem; height: 1.05rem; display: block; }
.ai-head-btn:hover:not(:disabled) { background: var(--bg-elev); color: var(--ink); }
.ai-head-btn:disabled { opacity: .35; cursor: default; }
.ai-head-btn.is-active { color: var(--accent); background: var(--accent-soft); }

.ai-suggestions { display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.ai-suggestion {
    appearance: none; text-align: left; cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink-soft);
    padding: .5rem .65rem; font-family: var(--font-sans); font-size: .85rem; line-height: 1.3;
    transition: border-color .12s, color .12s, background .12s;
}
.ai-suggestion:hover { border-color: var(--accent); color: var(--ink); background: var(--bg-elev); }

.ai-stop { background: #7a2020; color: #fff; border: none; }
.ai-stop:hover { background: #8f2626; }

/* Full-screen takes the whole viewport width. */
.ai-sidebar.is-fullscreen { width: 100vw; }
/* Pinned: docked beside content, no drop shadow (the layout reserves space for it). */
.ai-sidebar.is-pinned { box-shadow: none; }

/* Drag-to-resize handle on the panel's left edge. */
.ai-resize-handle {
    position: absolute; left: 0; top: 0; bottom: 0; width: 6px; z-index: 3;
    cursor: ew-resize; background: transparent; transition: background .12s;
}
.ai-resize-handle:hover, .ai-resize-handle:active { background: var(--accent-soft); }
.ai-sidebar.is-fullscreen .ai-resize-handle { display: none; }

/* "Orodja" details switch in the header. */
.ai-switch-wrap { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; user-select: none; margin-right: .15rem; }
.ai-switch-label { font-size: .68rem; font-weight: 600; color: var(--ink-mute); white-space: nowrap; }
.ai-switch-input { position: absolute; opacity: 0; width: 0; height: 0; }
.ai-switch {
    position: relative; width: 1.85rem; height: 1.05rem; border-radius: 1rem; flex-shrink: 0;
    background: var(--line-strong); transition: background .15s;
}
.ai-switch::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: calc(1.05rem - 4px); height: calc(1.05rem - 4px); border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 18, .3); transition: transform .15s;
}
.ai-switch-input:checked + .ai-switch { background: var(--accent); }
.ai-switch-input:checked + .ai-switch::after { transform: translateX(.8rem); }
.ai-switch-input:focus-visible + .ai-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-switch-wrap:hover .ai-switch-label { color: var(--ink); }

/* Reserve room on the right so a pinned panel sits beside content instead of over it
   (only on wide enough viewports; on narrow screens the panel overlays). The reservation is on
   the SHELL, not the content box: the centered (max-width) content re-centers within the reduced
   width, shifting into the empty side margins — so the whitespace shrinks first and the content
   keeps its size until the margins are used up. */
@media (min-width: 860px) {
    .app-shell.ai-pinned { padding-right: var(--ai-width, min(28rem, 100vw)); transition: padding-right .15s ease; }
}

/* Rendered markdown inside assistant bubbles. The shared .ai-msg-body uses pre-wrap (to keep the
   user's line breaks); markdown is already block-formatted, so reset it — otherwise the blank lines
   in the markdown source render as literal gaps on top of the paragraph margins. */
.ai-md { white-space: normal; }
.ai-md > :first-child { margin-top: 0; }
.ai-md > :last-child { margin-bottom: 0; }
.ai-md p { margin: 0 0 .4rem; }
.ai-md h1, .ai-md h2, .ai-md h3 { font-family: var(--font-serif); margin: .6rem 0 .35rem; line-height: 1.2; }
.ai-md h1 { font-size: 1.05rem; }
.ai-md h2 { font-size: 1rem; }
.ai-md h3 { font-size: .95rem; }
.ai-md ul, .ai-md ol { margin: .25rem 0 .6rem; padding-left: 1.2rem; }
.ai-md li { margin-bottom: .15rem; }
.ai-md a { color: var(--accent-ink); text-decoration: underline; }
.ai-md code {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .05rem .3rem; font-size: .82em;
}
.ai-md pre {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .6rem .7rem; overflow-x: auto; margin: .4rem 0 .6rem;
}
.ai-md pre code { background: none; border: none; padding: 0; }
.ai-md table { border-collapse: collapse; width: 100%; margin: .4rem 0 .6rem; font-size: .82rem; }
.ai-md th, .ai-md td { border: 1px solid var(--line-strong); padding: .3rem .45rem; text-align: left; }
.ai-md th { background: var(--bg); font-weight: 600; }
.ai-md blockquote {
    margin: .4rem 0; padding-left: .7rem; border-left: 3px solid var(--line-strong);
    color: var(--ink-soft);
}

/* Tool-call details (toggled by the "Orodja" switch). */
.ai-tools { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .35rem; max-width: 100%; }
.ai-tool {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); font-size: .78rem; overflow: hidden;
}
.ai-tool-sum {
    cursor: pointer; padding: .3rem .5rem; display: flex; align-items: center; gap: .4rem;
    list-style: none; user-select: none;
}
.ai-tool-sum::-webkit-details-marker { display: none; }
.ai-tool-sum::before { content: "▸"; color: var(--ink-mute); font-size: .7rem; }
.ai-tool[open] .ai-tool-sum::before { content: "▾"; }
.ai-tool-badge {
    font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
    color: var(--accent-ink); background: var(--accent-soft);
    padding: .05rem .3rem; border-radius: var(--radius);
}
.ai-tool-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); }
.ai-tool-io-label {
    font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
    color: var(--ink-mute); padding: .25rem .5rem 0;
}
.ai-tool-io {
    margin: .1rem .5rem .4rem; padding: .35rem .45rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem;
    white-space: pre-wrap; word-break: break-word; max-height: 16rem; overflow: auto;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .app-main { padding: 2rem 1.25rem 4rem; }
    .phase-card { grid-template-columns: 2rem 1fr; gap: 1rem; padding: 1.25rem 1.25rem; }
    .phase-progress { grid-column: 2; align-items: flex-start; margin-top: .5rem; }
    .phase-bar { width: 100%; }
    .hero-meta { gap: 1rem; }
    .phase-header { flex-direction: column; align-items: flex-start; }
    .phase-stat { text-align: left; width: 100%; }
    .phase-stat-bar { margin-left: 0; width: 100%; }
    .phase-budget { align-items: stretch; width: 100%; }
    .phase-budget-wrap { width: 100%; }
    .phase-budget-input { text-align: left; }
    .phase-budget-open { align-self: flex-start; }
    /* section tabs scroll sideways instead of stacking into many rows on a phone */
    .phase-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
    .phase-tab { flex: none; }
}

/* ---------- custom (user-added) tasks ---------- */
.item-remove {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1.4rem;
    line-height: 1; padding: 0 .35rem; flex-shrink: 0; align-self: flex-start;
}
.item-remove:hover { color: #7a2020; }
.custom-add {
    display: flex; gap: .5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap;
}
.custom-add-input {
    flex: 1; min-width: 12rem;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .55rem .7rem; font-family: var(--font-sans); font-size: .95rem;
    color: var(--ink); background: var(--bg-elev);
}
.custom-add-input:focus { outline: none; border-color: var(--accent); }
.custom-add-input::placeholder { color: var(--ink-mute); font-style: italic; }

/* ---------- compact icon action buttons ---------- */
.icon-btn {
    appearance: none; cursor: pointer; flex-shrink: 0;
    width: 2rem; height: 2rem; padding: 0; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--bg);
    color: var(--ink-soft);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover:not(:disabled) { color: var(--accent-ink); border-color: var(--accent); background: var(--bg-elev); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-btn svg { display: block; }
.icon-btn input[type="file"] {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- selected offer (star toggle) ---------- */
.inquiry-select.is-selected {
    color: var(--ok); border-color: var(--ok); background: var(--ok-soft);
}
.inquiry-select.is-selected svg { fill: currentColor; }
.inquiry-card.is-selected { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }

/* ---------- billing toggle ---------- */
.billing-toggle {
    display: inline-flex; align-items: center; gap: .25rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 999px; padding: .25rem; margin-bottom: 1.75rem;
}
.billing-opt {
    appearance: none; border: none; background: none; cursor: pointer;
    font: inherit; font-size: .85rem; color: var(--ink-soft);
    padding: .35rem .95rem; border-radius: 999px; transition: background .15s, color .15s;
}
.billing-opt.active { background: var(--accent); color: #fff; font-weight: 600; }
.billing-save { margin: 0 .35rem 0 .5rem; color: var(--ok); font-size: .78rem; font-weight: 600; }
.sub-tier-annual-note { color: var(--ok); font-size: .78rem; font-weight: 600; margin-top: -.35rem; }

/* ---------- gantt chart ---------- */
.gantt-controls {
    display: flex; align-items: center; justify-content: flex-start;
    gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.gantt-zoom-label {
    font-size: .8rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .04em;
}
.gantt-zoom {
    display: inline-flex; gap: .25rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 999px; padding: .25rem;
}
.gantt-zoom-btn {
    appearance: none; border: none; background: none; cursor: pointer;
    font: inherit; font-size: 1.05rem; line-height: 1; color: var(--ink-soft);
    width: 2rem; height: 2rem; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.gantt-zoom-btn:hover:not(:disabled) { background: var(--accent); color: #fff; }
.gantt-zoom-btn:disabled { opacity: .35; cursor: default; }
.gantt-nav { display: inline-flex; align-items: center; gap: .5rem; }
.gantt-range-label {
    font-variant-numeric: tabular-nums; font-size: .9rem;
    color: var(--ink-soft); min-width: 11rem; text-align: center;
}
.gantt {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev);
    overflow: auto; max-height: 70vh; position: relative;
    width: max-content; max-width: 100%;
    --gantt-label-w: 13rem;
}
.gantt-head {
    display: flex; width: max-content;
    position: sticky; top: 0; z-index: 3;
    border-bottom: 1px solid var(--line-strong); background: var(--bg);
}
.gantt-corner {
    width: var(--gantt-label-w); flex-shrink: 0;
    position: sticky; left: 0; z-index: 4; background: var(--bg);
    border-right: 1px solid var(--line-strong);
    padding: .35rem .6rem; font-size: .7rem; font-weight: 600;
    color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em;
    display: flex; align-items: center;
}
.gantt-head-track { display: flex; flex-direction: column; flex-shrink: 0; }
.gantt-years { display: flex; }
.gantt-year {
    flex-shrink: 0; border-left: 1px solid var(--line-strong);
    font-size: .72rem; font-weight: 700; color: var(--ink);
    padding: .3rem .3rem; text-align: center;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.gantt-year:first-child { border-left: none; }
.gantt-months { display: flex; border-top: 1px solid var(--line); }
.gantt-month {
    flex-shrink: 0; border-left: 1px solid var(--line);
    font-size: .68rem; font-weight: 600; color: var(--ink-soft);
    padding: .35rem .3rem; text-align: center;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.gantt-month:first-child { border-left: none; }
.gantt-month.is-today { color: var(--accent-ink); background: var(--accent-soft); }
.gantt-days { display: flex; border-top: 1px solid var(--line); }
.gantt-day {
    flex-shrink: 0; text-align: center; white-space: nowrap;
    font-size: .58rem; color: var(--ink-mute); padding: .1rem 0;
    font-variant-numeric: tabular-nums;
}
.gantt-day.month-start { border-left: 1px solid var(--line-strong); }
.gantt-day.is-today { color: var(--accent-ink); font-weight: 700; }
.gantt-row {
    display: flex; width: max-content; align-items: stretch; min-height: 2.6rem;
    border-top: 1px solid var(--line);
    cursor: pointer; background: var(--bg-elev);
}
.gantt-row:hover { background: var(--accent-soft); }
.gantt-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gantt-row-label {
    width: var(--gantt-label-w); flex-shrink: 0;
    position: sticky; left: 0; z-index: 2; background: inherit;
    border-right: 1px solid var(--line-strong);
    padding: .4rem .6rem; display: flex; flex-direction: column;
    justify-content: center; gap: .1rem;
}
.gantt-row-title { font-size: .82rem; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.gantt-row-phase { font-size: .68rem; color: var(--ink-mute); }
.gantt-row-track { position: relative; flex-shrink: 0; }
.gantt-today-line {
    position: absolute; top: 0; bottom: 0; width: 0;
    border-left: 2px solid var(--accent); z-index: 1;
}
/* Vertical highlight of a task's day span across every row (on pill hover). */
.gantt-col-hi {
    position: absolute; top: 0; bottom: 0; z-index: 0;
    background: var(--accent-soft); opacity: .55; pointer-events: none;
}
/* Light gray dotted vertical day delimiters (only when zoomed in enough). */
.gantt.has-daygrid .gantt-row-track::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: repeating-linear-gradient(to right,
        rgba(70, 60, 48, .22) 0, rgba(70, 60, 48, .22) 1px, transparent 1px, transparent var(--day-w));
    -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0, #000 2px, transparent 2px, transparent 5px);
            mask-image: repeating-linear-gradient(to bottom, #000 0, #000 2px, transparent 2px, transparent 5px);
}
.gantt-bar {
    position: absolute; top: 50%; transform: translateY(-50%);
    height: 1.6rem; border-radius: 999px;
    width: max-content; min-width: var(--bar-w); max-width: var(--bar-w);
    background: var(--status-color, var(--ink-soft));
    display: flex; align-items: center; gap: .35rem; padding: 0 .55rem 0 .2rem; overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); z-index: 1;
    transition: max-width .28s ease, box-shadow .15s ease;
    cursor: grab; touch-action: none;
}
.gantt-bar:active { cursor: grabbing; }
/* The pill background follows the task STATUS. */
.gantt-bar.todo { --status-color: #e0857a; } /* light red — še načrtovano */
.gantt-bar.wip  { --status-color: #e3b93c; } /* yellow — v teku */
.gantt-bar.done { --status-color: #4f7d5a; } /* green — končano */
.gantt-bar.na   { --status-color: #9a9488; } /* grey — ni relevantno */
/* On hover the pill elevates (no width growth, so its edges keep mapping to start/end —
   the task title is already shown in the frozen left label column). */
.gantt-row:hover .gantt-bar {
    z-index: 6;
    box-shadow: 0 4px 14px rgba(20, 14, 6, .3);
}
/* Edge resize affordance: an ew-resize cursor over the last ~8px of each end. */
.gantt-bar::before, .gantt-bar::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 8px; z-index: 3;
    cursor: ew-resize;
}
.gantt-bar::before { left: 0; }
.gantt-bar::after { right: 0; }
/* While dragging, kill transitions so a resize tracks the pointer instantly. */
.gantt.is-dragging .gantt-bar { transition: none; }
/* Circular badge: phase color + phase number (replaces the old status icon). */
.gantt-bar-phasebadge {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 1.2rem; height: 1.2rem; border-radius: 50%;
    background: var(--phase-color, #5c5851); color: #fff;
    font-size: .62rem; font-weight: 700; line-height: 1;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55);
}
.gantt-bar-label {
    font-size: .68rem; white-space: nowrap; color: #fff;
    overflow: hidden; text-overflow: ellipsis;
}
.gantt-bar-range { opacity: .8; font-weight: 400; }
.gantt-bar.na { opacity: .6; }
.gantt-bar.na .gantt-bar-label { text-decoration: line-through; }

/* ---------- kanban phase filter ---------- */
.kanban-filter {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
    margin-bottom: 1rem;
}
.kanban-filter-label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-mute); margin-right: .2rem;
}
.kanban-filter-chip {
    appearance: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-sans); font-size: .72rem; font-weight: 600;
    padding: .25rem .6rem; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-mute);
    transition: opacity .12s, border-color .12s, color .12s;
}
.kanban-filter-chip:hover { border-color: var(--ink-mute); color: var(--ink); }
.kanban-filter-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border-radius: 999px; flex: none;
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-size: .62rem; font-weight: 700;
}
.kanban-filter-chip.active { color: var(--ink); border-color: var(--phase-color, var(--ink)); }
/* Dimmed = hidden phase. */
.kanban-filter-chip:not(.active) { opacity: .45; }
.kanban-filter-chip:not(.active) .kanban-filter-badge { background: var(--ink-mute); }
.kanban-filter-chip.is-all { font-weight: 700; }
.kanban-filter-chip.is-all.active { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ---------- kanban board ---------- */
.kanban-board {
    display: flex; gap: .9rem; align-items: flex-start;
    overflow-x: auto; padding-bottom: .5rem;
}
.kanban-col {
    flex: 1 1 0; min-width: 14rem;
    display: flex; flex-direction: column;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-top: 3px solid var(--status-color, var(--line-strong));
    border-radius: var(--radius); overflow: hidden;
}
.kanban-col.status-todo { --status-color: #e0857a; }
.kanban-col.status-wip  { --status-color: #e3b93c; }
.kanban-col.status-done { --status-color: #4f7d5a; }
.kanban-col.status-na   { --status-color: #9a9488; }
.kanban-col-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .65rem .8rem; border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.kanban-col-dot {
    width: .6rem; height: .6rem; border-radius: 999px;
    background: var(--status-color, var(--ink-mute)); flex: none;
}
.kanban-col-title {
    font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--ink);
}
.kanban-col-count {
    margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 999px; padding: .05rem .5rem; min-width: 1.5rem; text-align: center;
}
.kanban-cards {
    display: flex; flex-direction: column; gap: .5rem;
    padding: .6rem; min-height: 4rem;
    max-height: calc(100vh - 22rem); overflow-y: auto;
}
.schedule-page.is-fullscreen .kanban-cards { max-height: calc(100vh - 14rem); }
.kanban-card {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-left: 3px solid var(--phase-color, var(--line-strong));
    border-radius: var(--radius); overflow: hidden;
    display: flex; align-items: stretch;
    flex: none; /* keep natural height so a tall column scrolls instead of squishing cards */
    transition: box-shadow .15s, transform .05s;
}
.kanban-card:hover { box-shadow: 0 3px 10px rgba(20, 14, 6, .12); }
/* Drag only via the grip — keeps the rest of the card clickable (touch + mouse). */
.kanban-card-grip {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 1.5rem; color: var(--ink-mute);
    background: var(--bg-elev); border-right: 1px solid var(--line);
    cursor: grab; touch-action: none; user-select: none;
}
.kanban-card-grip:hover { color: var(--ink); background: var(--line); }
.kanban-card-grip:active { cursor: grabbing; }
.kanban-card-body {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: .25rem;
    padding: .5rem .6rem; cursor: pointer;
}
.kanban-card-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.kanban-card-phase {
    display: flex; align-items: center; gap: .35rem;
    font-size: .68rem; font-weight: 600; color: var(--ink-mute);
    text-transform: uppercase; letter-spacing: .04em;
}
.kanban-card-phasebadge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border-radius: 999px; flex: none;
    background: var(--phase-color, var(--ink-mute)); color: #fff;
    font-size: .62rem; font-weight: 700;
}
.kanban-card-title {
    font-family: var(--font-sans); font-size: .85rem; font-weight: 600;
    color: var(--ink); line-height: 1.25;
}
.kanban-card-meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .1rem; }
.kanban-chip {
    display: inline-flex; align-items: center; gap: .2rem;
    font-size: .68rem; font-weight: 600; color: var(--ink-mute);
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 999px; padding: .08rem .42rem; white-space: nowrap;
}
.kanban-chip .icon { opacity: .85; }
.kanban-card.is-important { border-left-width: 5px; }
.kanban-card.is-important .kanban-card-title::after { content: " ★"; color: #e3b93c; }
.kanban-card-dragging {
    opacity: .9; box-shadow: 0 12px 28px rgba(20, 14, 6, .28); transform: scale(1.02);
}
.kanban-board.is-dragging { cursor: grabbing; }
.kanban-board.is-dragging .kanban-cards { background: rgba(0, 0, 0, .02); }
.kanban-empty {
    margin: 0; padding: 1rem .5rem; text-align: center;
    font-size: .75rem; color: var(--ink-mute);
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

/* ---------- task modal (from gantt) ---------- */
.task-modal {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(26, 20, 12, .55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4vh 1rem; overflow-y: auto;
}
.task-modal-card {
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: var(--radius); box-shadow: 0 24px 60px rgba(20, 14, 6, .35);
    width: min(46rem, 100%); margin: auto;
}
.task-modal-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line);
}
.task-modal-titles h2 { font-family: var(--font-serif); font-size: 1.5rem; margin: .15rem 0 0; }
.task-modal-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.task-modal-close {
    appearance: none; border: none; background: transparent;
    color: var(--ink-mute); cursor: pointer; font-size: 1.6rem; line-height: 1; padding: 0 .25rem;
}
.task-modal-close:hover { color: var(--ink); }
.task-modal-body { padding: 1.25rem 1.5rem; margin: 0; }

/* Delete-task confirmation dialog (reuses .task-modal shell, narrower). */
.task-confirm-card { width: min(28rem, 100%); }
.task-confirm-body { padding: 1.25rem 1.5rem 1.5rem; }
.task-confirm-body p { color: var(--ink-soft); margin: 0 0 1.25rem; }
.task-confirm-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- report cost collector ---------- */
.report-costs { margin: 1.5rem 0 2rem; }
.report-costs-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: .75rem; }
.report-costs-table th, .report-costs-table td {
    text-align: left; padding: .55rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
.report-costs-table thead th {
    background: var(--bg-elev); color: var(--ink-soft);
    font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
}
.report-costs-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-costs-item { font-weight: 500; color: var(--ink); }
.report-costs-sub { font-size: .78rem; color: var(--ink-mute); margin-top: .1rem; }
.report-costs-table tfoot td {
    border-top: 2px solid var(--line-strong); border-bottom: none;
    font-weight: 700; color: var(--accent-ink); font-size: 1rem; padding-top: .7rem;
}

/* ---------- cost collector page ---------- */
.report-filters-sep {
    width: 1px; align-self: stretch; min-height: 1.5rem;
    background: var(--line-strong); margin: 0 .35rem;
}
.cost-source {
    display: inline-block; font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em;
    padding: .1rem .45rem; border-radius: 999px;
    border: 1px solid var(--line-strong); color: var(--ink-mute);
}
.cost-source.offer { color: var(--accent-ink); border-color: var(--accent-soft); background: var(--accent-soft); }
.cost-source.manual { color: var(--ok); border-color: var(--ok-soft); background: var(--ok-soft); }

/* inline cost controls (status + DDV) */
.cost-inline { width: auto; min-width: 6rem; padding: .25rem .4rem; font-size: .82rem; }
.cost-incl { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.cost-status-done { color: #2f7d4f; font-weight: 600; }
.cost-status-wip { color: var(--accent); font-weight: 600; }
.report-print-only { display: none; }

.budget-card {
    display: grid; gap: 1rem 1.25rem; align-items: end;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.budget-field { display: flex; flex-direction: column; gap: .35rem; }
.budget-field > label {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute);
}
.budget-stat { text-align: left; }
.budget-stat-label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute); margin-bottom: .15rem;
}
.budget-stat-num {
    font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600;
    color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums;
}
.budget-stat-num.is-over { color: #b5483f; }
.budget-stat-num.is-ok { color: var(--ok); }
.budget-bar-wrap { grid-column: 1 / -1; }
.budget-bar {
    height: 8px; border-radius: 999px; background: var(--line);
    overflow: hidden;
}
.budget-bar-fill {
    height: 100%; background: var(--accent); border-radius: 999px;
    transition: width .3s ease;
}
.budget-bar-fill.is-over { background: #b5483f; }
.budget-bar-meta {
    margin-top: .4rem; font-size: .78rem; color: var(--ink-mute);
    font-variant-numeric: tabular-nums;
}

.cost-add {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1.5rem;
}
.cost-add-title {
    font-size: .8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute); margin: 0 0 .75rem;
}
.cost-add-grid {
    display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
}
.cost-add-grid .type-input { width: 100%; }
.cost-add-grid .cost-f-title { flex: 2 1 9rem; }
.cost-add-grid .cost-f-cat { flex: 1.4 1 8rem; }
.cost-add-grid .cost-f-note { flex: 1.6 1 8rem; }
.cost-add-grid .price-input-wrap { flex: 0 0 7.5rem; }
.cost-add-grid .cost-inline { flex: 0 0 auto; }
.cost-add-grid .cost-incl { flex: 0 0 auto; }
.cost-add-grid > .btn { flex: 0 0 auto; }

/* cost charts + over-budget banner */
.cost-charts {
    display: grid; gap: 1rem; margin-bottom: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cost-chart {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .85rem 1rem 1rem; min-width: 0;
}
.cost-chart-title {
    font-size: .76rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-mute); margin-bottom: .35rem;
}
.cost-chart-svg { width: 100%; min-height: 230px; overflow: hidden; }
.cost-overbudget {
    display: flex; align-items: center; gap: .55rem;
    background: #fbeae7; border: 1px solid #e2b3a9; border-left: 4px solid #b5483f;
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1.25rem;
    color: #8a2f27; font-size: .9rem; font-weight: 500;
}
.budget-headroom { font-weight: 700; font-size: .95rem; }
.budget-headroom.is-ok { color: var(--ok); }
.budget-headroom.is-over { color: #b5483f; }
.budget-bar-sub { color: var(--ink-mute); }

/* financing & contingency panel */
.finance-card {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.1rem 1.5rem; margin-bottom: 1.5rem;
}
.finance-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.finance-gap {
    margin-top: 1rem; padding: .65rem .9rem; border-radius: var(--radius); font-size: .95rem;
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem;
}
.finance-gap.is-short { background: #fbeae7; color: #8a2f27; }
.finance-gap.is-ok { background: #e9f3ec; color: #2f6b43; }
.finance-gap-sub { font-size: .8rem; opacity: .85; font-weight: 400; }
.finance-edit { margin-top: 1rem; }
.finance-edit > summary { cursor: pointer; font-size: .85rem; color: var(--accent); font-weight: 600; }
.finance-edit-grid { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-top: .75rem; }
.finance-f { display: flex; flex-direction: column; gap: .25rem; }
.finance-f > span { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.finance-f .type-input { width: 9rem; }
.finance-proracun { display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); align-self: stretch; justify-content: flex-end; }
.finance-proracun strong { font-family: var(--font-serif); font-size: 1.35rem; color: var(--ink); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.finance-note { margin-top: .85rem; font-size: .82rem; color: var(--ink-mute); }
.rollup-budget { width: 7rem; font-size: .82rem; }
.rollup-budget-cell { display: inline-flex; align-items: center; gap: .45rem; }
.rollup-budget-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); white-space: nowrap; }

/* cost-line attachments (invoice / receipt) */
.cost-atts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .4rem; }
.cost-att { display: inline-flex; align-items: center; gap: .15rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .08rem .15rem .08rem .45rem; font-size: .78rem; }
.cost-att .file-link { background: none; border: 0; cursor: pointer; color: var(--accent-ink); padding: 0; font: inherit; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-att-add { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; color: var(--accent); cursor: pointer; }
.cost-att-add input { display: none; }

.cost-table-title { margin: 0 0 .75rem; }

/* group on/off switches */
.cost-group-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: .3rem .8rem .3rem .55rem; background: var(--bg); cursor: pointer;
    font: inherit; font-size: .82rem; color: var(--ink-soft); transition: background .15s, border-color .15s, color .15s;
}
.cost-group-dot { width: 1.7rem; height: .95rem; border-radius: 999px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.cost-group-dot::after { content: ""; position: absolute; top: 1px; left: 1px; width: calc(.95rem - 2px); height: calc(.95rem - 2px); border-radius: 50%; background: #fff; transition: transform .15s; }
.cost-group-toggle.on { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.cost-group-toggle.on .cost-group-dot { background: var(--accent); }
.cost-group-toggle.on .cost-group-dot::after { transform: translateX(.75rem); }
.cost-group-toggle.off { opacity: .9; }

/* per-phase roll-up */
.phase-rollup {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.1rem 1.5rem; margin-bottom: 1.5rem;
}
.rollup-row { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr minmax(9rem, auto) auto; gap: .85rem; align-items: center; padding: .3rem 0; }
.rollup-label { font-size: .9rem; color: var(--ink); }
.rollup-bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.rollup-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.rollup-bar-fill.is-over { background: #b5483f; }
.rollup-val { font-size: .85rem; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
/* Over-budget phase/category rows: tinted band + warning icon so they stand out at a glance. */
.rollup-row.is-over {
    background: #fbeae7; border-radius: var(--radius);
    padding: .4rem .6rem; margin: 0 -.6rem;
}
.rollup-row.is-over .rollup-label { color: #8a2f27; font-weight: 600; }
.rollup-alert { color: #b5483f; margin-right: .3rem; }
.rollup-over { display: block; margin-top: .1rem; color: #b5483f; font-weight: 600; font-size: .78rem; }

@media (max-width: 720px) {
    .finance-stats { grid-template-columns: 1fr 1fr; }
    .rollup-row { grid-template-columns: 1fr auto; }
    .rollup-bar { display: none; }
}

@media (max-width: 720px) {
    .budget-card { grid-template-columns: 1fr 1fr; }
    .budget-field { grid-column: 1 / -1; }
    .cost-add-grid { grid-template-columns: 1fr 1fr; }
    .cost-add-grid > button { grid-column: 1 / -1; }
    /* keep the 7-column cost table readable: let it scroll instead of crushing columns */
    .table-scroll .report-costs-table { min-width: 44rem; }
}

@media (max-width: 560px) {
    /* financing form: stack into a single full-width column on phones */
    .finance-edit-grid { flex-direction: column; align-items: stretch; gap: .7rem; }
    .finance-f { width: 100%; }
    .finance-f .type-input { width: 100%; }
    .finance-edit-grid > .btn { width: 100%; }
    .finance-proracun { align-items: flex-start; }
}

/* ---------- iskalnik (search) ---------- */
.search-box { margin-bottom: 1rem; }
.search-box input { width: 100%; }

.search-table { table-layout: auto; }
.search-table thead th { padding: 0; vertical-align: middle; }
.search-table .th-sort {
    width: 100%; display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: none; cursor: pointer; font: inherit;
    padding: .55rem .65rem; color: var(--ink-soft);
    text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; font-weight: 600;
}
.search-table .th-sort:hover { color: var(--ink); }
.search-table .th-sort.active { color: var(--accent-ink); }
.search-table .th-sort .sort-arrow { font-size: .7rem; }
.search-table th.num .th-sort { justify-content: flex-end; }
.search-table th.search-flag-col .th-sort { justify-content: center; }
.search-table td { vertical-align: middle; }
.search-phase { color: var(--accent-ink); border-bottom: none; white-space: nowrap; }
.search-flag-col { width: 2.5rem; text-align: center; }
.search-flag { color: var(--accent); font-size: 1rem; }
.search-table tr.is-important td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.search-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: .85rem; color: var(--ink-mute); margin-bottom: .6rem;
    font-variant-numeric: tabular-nums;
}

/* table column show/hide picker */
.col-picker { position: relative; }
.col-picker > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--bg); color: var(--ink-soft); font-size: .8rem; font-weight: 600;
    white-space: nowrap; user-select: none; transition: border-color .15s, color .15s;
}
.col-picker > summary::-webkit-details-marker { display: none; }
.col-picker > summary:hover,
.col-picker[open] > summary { border-color: var(--accent); color: var(--ink); }
.col-picker-menu {
    position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40;
    min-width: 11rem; padding: .5rem; display: flex; flex-direction: column; gap: .1rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius); box-shadow: 0 12px 30px rgba(20, 14, 6, .18);
}
.col-picker-title {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-mute); padding: .15rem .4rem .35rem;
}
.col-picker-opt {
    display: flex; align-items: center; gap: .55rem; cursor: pointer;
    padding: .3rem .45rem; border-radius: var(--radius);
    font-size: .88rem; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400;
}
.col-picker-opt:hover { background: var(--bg); }
.col-picker-opt input { flex: none; margin: 0; }
.col-picker-opt.is-locked { color: var(--ink-mute); cursor: default; }
.col-picker-opt.is-locked:hover { background: transparent; }

/* horizontal scroll for wide tables on small screens (cost + search tables) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media print { .table-scroll { overflow: visible; } }
.search-pager {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 1.25rem; flex-wrap: wrap;
}
.search-pager-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.search-pager .btn[disabled] { opacity: .4; cursor: not-allowed; }
.search-pager-info {
    font-size: .85rem; color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.search-pager-size {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8rem; color: var(--ink-mute);
}

/* filter controls */
/* On the search page the split line sits BELOW the filters: drop the header's divider and add
   one under the controls, so all filters are above the line and the stat counters/results below. */
.search-header { border-bottom: none; padding-bottom: 0; margin-bottom: 1.5rem; }
.search-controls {
    margin-bottom: 1.75rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}
.search-filter-row {
    display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end;
    margin-top: .85rem;
}
/* "Samo pomembne" as a clean rounded toggle that matches the filter row (not a status badge). */
.report-flag-toggle {
    appearance: none; cursor: pointer; align-self: flex-end;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .85rem; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--bg);
    color: var(--ink-soft); font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
    line-height: 1.2; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.report-flag-toggle:hover { border-color: var(--accent); color: var(--ink); }
.report-flag-toggle.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.report-clear-btn { align-self: flex-end; }
.search-filter { display: flex; flex-direction: column; gap: .3rem; }
.search-filter > span {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-mute);
}
.search-select, .search-date {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); color: var(--ink);
    padding: .45rem .6rem; font-family: var(--font-sans); font-size: .9rem;
}
.search-select { min-width: 9rem; }
.search-select:focus, .search-date:focus { outline: none; border-color: var(--accent); }

/* clickable rows */
.search-row { cursor: pointer; }
.search-row:hover td { background: var(--bg-elev); }
.search-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (max-width: 640px) {
    .gantt { --gantt-label-w: 8rem; }
    .gantt-controls { align-items: flex-start; }
}

/* ---------- generic eyebrow ---------- */
.eyebrow {
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em;
    color: var(--accent);
}

/* ---------- login: Google sign-in ---------- */
.login-switch {
    display: flex; gap: .4rem; align-items: center;
    font-size: .9rem; color: var(--ink-soft); margin-top: .25rem;
}
.login-link {
    appearance: none; background: none; border: none; cursor: pointer;
    color: var(--accent-ink); font: inherit; font-weight: 600; padding: 0;
    border-bottom: 1px solid transparent;
}
.login-link:hover { border-bottom-color: currentColor; }
.login-forgot { margin: -.15rem 0 .1rem; font-size: .9rem; }

.btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
    width: 100%; padding: .8rem 1rem;
    background: #fff; color: #3c4043;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    font-family: var(--font-sans); font-size: .95rem; font-weight: 600;
    cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.btn-google:hover { box-shadow: 0 1px 6px rgba(60, 64, 67, .18); border-color: var(--ink-mute); }
.btn-google-icon { display: inline-flex; }

/* mock Google account chooser */
.gchooser-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(26, 20, 12, .55);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.gchooser {
    width: min(26rem, 100%); background: #fff; color: #202124;
    border-radius: 8px; box-shadow: 0 24px 60px rgba(20, 14, 6, .4);
    overflow: hidden; font-family: var(--font-sans);
}
.gchooser-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e8eaed;
}
.gchooser-logo { display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600; color: #5f6368; }
.gchooser-close {
    appearance: none; border: none; background: transparent; cursor: pointer;
    font-size: 1.5rem; line-height: 1; color: #5f6368; padding: 0 .25rem;
}
.gchooser-close:hover { color: #202124; }
.gchooser-body { padding: 1.25rem 1.5rem 1rem; }
.gchooser-title { font-size: 1.35rem; font-weight: 400; }
.gchooser-sub { color: #5f6368; font-size: .9rem; margin-top: .15rem; margin-bottom: 1rem; }
.gaccount-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gaccount {
    display: flex; align-items: center; gap: .9rem; width: 100%;
    padding: .65rem .25rem; background: transparent; border: none; cursor: pointer;
    text-align: left; border-radius: 6px; font: inherit; color: #202124;
}
.gaccount:hover { background: #f1f3f4; }
.gaccount-avatar {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1rem;
}
.gaccount-avatar-plus { background: #e8eaed; color: #5f6368; font-size: 1.4rem; }
.gaccount-text { display: flex; flex-direction: column; min-width: 0; }
.gaccount-name { font-size: .95rem; font-weight: 500; }
.gaccount-email { font-size: .82rem; color: #5f6368; }
.gform { display: flex; flex-direction: column; gap: .7rem; }
.gform-field { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: #5f6368; }
.gform-field input {
    border: 1px solid #c4c7c5; border-radius: 6px;
    padding: .65rem .75rem; font-family: var(--font-sans); font-size: 1rem; color: #202124;
}
.gform-field input:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 1px #1a73e8; }
.gform-submit { align-self: flex-end; }
.gform-back { align-self: flex-start; }

/* login: full-width primary action + tighter card on small screens */
.login-card .gform-submit { align-self: stretch; justify-content: center; }
@media (max-width: 480px) {
    .login-screen { padding: 1rem; }
    .login-card { padding: 1.5rem 1.35rem; }
    .login-card h1 { font-size: 1.45rem; }
}
.gform-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; color: #5f6368; }
.gform-check input { margin-top: .15rem; flex: none; }
.gform-check a { color: var(--accent); }
.login-terms-note { font-size: .82rem; color: var(--ink-mute); text-align: center; margin: .25rem 0 0; }
.login-terms-note a { color: var(--accent); }
.gchooser-foot {
    padding: .85rem 1.5rem; border-top: 1px solid #e8eaed;
    font-size: .78rem; color: #5f6368; background: #f8f9fa;
}

/* ---------- project switcher in nav ---------- */
.project-switch {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--bg-elev); border: 1px solid var(--line-strong);
    border-radius: var(--radius); padding: .3rem .6rem; cursor: pointer;
    font-family: var(--font-sans); color: var(--ink); max-width: 16rem;
    transition: border-color .15s, background .15s;
}
.project-switch:hover { border-color: var(--accent); }
.project-switch-avatar {
    flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .8rem;
}
.project-switch-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; text-align: left; }
.project-switch-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); }
.project-switch-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-switch-chevron { color: var(--ink-mute); font-size: .9rem; }

/* ---------- projects picker screen ---------- */
.projects-screen { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.projects-nav-user { margin-left: auto; }
.projects-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem clamp(1.5rem, 4vw, 4rem);
    border-bottom: 1px solid var(--line); background: var(--bg);
    position: sticky; top: 0; z-index: 10;
}
.projects-user { display: flex; align-items: center; gap: .75rem; }
.projects-avatar {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.projects-user-text { display: flex; flex-direction: column; line-height: 1.15; }
.projects-user-name { font-weight: 600; font-size: .9rem; }
.projects-user-email { font-size: .78rem; color: var(--ink-mute); }

.projects-main { flex: 1; max-width: var(--max); width: 100%; margin: 0 auto; padding: 3rem clamp(1.5rem, 4vw, 4rem) 5rem; }
.projects-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
    flex-wrap: wrap; margin-bottom: 2rem;
}
.projects-head .intro { color: var(--ink-soft); margin-top: 1rem; max-width: 38rem; }
.projects-head h1 { margin-top: .5rem; }
/* Keep the "+ Nov projekt" action top-aligned with the heading block (not floating at the bottom). */
.projects-head > .btn { flex: none; margin-top: .35rem; }
.projects-head-action { flex: none; margin-top: .35rem; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.projects-limit-msg { margin: 0; font-size: .82rem; color: var(--ink-soft); text-align: right; max-width: 18rem; }

.projects-empty {
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    padding: 3.5rem 2rem; text-align: center; background: var(--bg-elev);
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.projects-empty-mark { margin-bottom: .25rem; }
.projects-empty-mark img { width: 4.5rem; height: auto; display: block; }
.projects-empty p { color: var(--ink-soft); max-width: 28rem; margin: 0 0 .75rem; }

.projects-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
}
.project-card {
    position: relative;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); display: flex; flex-direction: column;
    transition: border-color .15s, box-shadow .15s;
}
.project-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(40, 30, 18, .08); }
/* Open / edit / delete as icon buttons in the top-right corner. */
.project-card-tools {
    position: absolute; top: .85rem; right: .85rem; z-index: 2;
    display: flex; gap: .3rem;
}
.project-card-tools .icon-btn { width: 1.9rem; height: 1.9rem; font-size: .95rem; line-height: 1; }
.project-card-tools .icon-btn-danger:hover:not(:disabled) {
    color: #b3261e; border-color: #b3261e;
}
/* Clickable card body — a vertical stack so the description/meta span the FULL card width.
   Only the avatar+name row reserves space for the top-right tools, so text isn't squashed. */
.project-card-open {
    display: flex; flex-direction: column; gap: .9rem; align-items: stretch; text-align: left;
    padding: 1.25rem; background: transparent; border: none; cursor: pointer;
    font: inherit; color: var(--ink); width: 100%; flex: 1 1 auto;
}
.project-card-head {
    display: flex; gap: .85rem; align-items: center; min-width: 0;
    padding-right: 3.75rem; /* clear the two top-right tool buttons (edit / delete) */
}
.project-card-avatar {
    flex: none; width: 2.75rem; height: 2.75rem; border-radius: var(--radius);
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem;
}
.project-card-titles { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.project-card-name {
    font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-address {
    font-size: .82rem; color: var(--ink-soft);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-card-info { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.project-card-desc {
    font-size: .85rem; color: var(--ink-soft); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-meta { font-size: .75rem; color: var(--ink-mute); }
.project-card-loc::before { content: "📍 "; }
.project-card-actions {
    display: flex; gap: .4rem;
    padding: .85rem 1.25rem 1.1rem; border-top: 1px solid var(--line); margin-top: auto;
}
.project-card-cta { width: 100%; justify-content: center; }

.project-create-card {
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); padding: 1.5rem; margin-bottom: 2rem;
}
.project-create-card h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.project-form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.project-field { display: flex; flex-direction: column; gap: .35rem; }
.project-field > span { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.project-field-wide { grid-column: 1 / -1; }
.project-form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.project-modal { width: min(34rem, 100%); }
.project-modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.project-modal-body p { color: var(--ink-soft); margin: 0 0 1rem; }
.project-modal-body .project-form-actions { margin-top: 0; }
.project-delete-confirm-hint { font-size: .9rem; margin: 0 0 .4rem; }
.project-delete-confirm-input { width: 100%; margin-bottom: 1.25rem; }

@media (max-width: 560px) {
    .project-form-grid { grid-template-columns: 1fr; }
    .project-field-wide { grid-column: auto; }
}

/* ---------- profile email ---------- */
.profile-user-email { font-size: .82rem; color: var(--ink-mute); }

/* ---------- drag-to-reorder handle (phase page) ---------- */
.item-drag-handle {
    flex: none; align-self: center; cursor: grab; touch-action: none;
    color: var(--ink-mute); font-size: 1rem; line-height: 1; padding: 0 .15rem;
    user-select: none; transition: color .15s;
}
.item-drag-handle:hover, .item-drag-handle:active { color: var(--ink); cursor: grabbing; }
.item.reorder-dragging {
    opacity: .85; box-shadow: 0 8px 22px rgba(20, 14, 6, .22);
    outline: 2px dashed var(--accent); outline-offset: -2px;
}

/* ---------- task reminder ---------- */
.task-reminder .task-meta-label { display: inline-flex; align-items: center; gap: .3rem; }
.task-reminder .task-meta-label svg { width: 14px; height: 14px; }
.reminder-gcal { text-decoration: none; }

/* ---------- project-wide progress (Home hero) ---------- */
.project-progress {
    display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem;
}
.project-progress-item { flex: 1 1 14rem; min-width: 12rem; }
.project-progress-head {
    display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem;
}
.project-progress-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.project-progress-pct {
    font-family: var(--font-serif); font-variant-numeric: tabular-nums;
    font-weight: 600; color: var(--ink);
}
.project-progress-bar {
    height: 6px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.project-progress-fill {
    height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease;
}
.project-progress-fill.delivery { background: #3f6f8f; }
.project-progress-fill.full { background: var(--ok); }
.project-progress-sub { margin-top: .35rem; font-size: .75rem; color: var(--ink-mute); }

/* ---------- delivery bar on project cards ---------- */
.project-card-delivery { display: flex; flex-direction: column; gap: .25rem; margin-top: .15rem; }
.delivery-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.delivery-bar-fill { display: block; height: 100%; background: #3f6f8f; border-radius: 999px; transition: width .3s ease; }
.delivery-bar-fill.full { background: var(--ok); }
.delivery-meta { font-size: .72rem; color: var(--ink-mute); }

/* ---------- admin catalog editor ---------- */
.catalog-type-group {
    margin-bottom: 2.5rem; padding-top: 1rem; border-top: 2px solid var(--line-strong);
}
.catalog-add-type { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; }
.catalog-add-type .type-input { flex: 1; min-width: 14rem; }
.catalog-type-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.catalog-type-head .catalog-actions { margin-left: auto; }
.catalog-type-title {
    font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--ink);
}
.catalog-add-phase { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; }
.catalog-add-phase .type-input { flex: 1; min-width: 14rem; }
/* Color picker → compact rounded swatch instead of a stretched bordered input box. */
.catalog-color {
    flex: none; width: 2.4rem; height: 2.4rem; min-width: 2.4rem;
    padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); cursor: pointer; overflow: hidden;
    -webkit-appearance: none; appearance: none;
}
.catalog-color:hover { border-color: var(--accent); }
.catalog-color::-webkit-color-swatch-wrapper { padding: 0; }
.catalog-color::-webkit-color-swatch { border: none; border-radius: calc(var(--radius) - 2px); }
.catalog-color::-moz-color-swatch { border: none; border-radius: calc(var(--radius) - 2px); }
.catalog-number { width: 3.5rem; min-width: 3.5rem; flex: none; text-align: center; }
.catalog-phase {
    border: 1px solid var(--line); border-left: 4px solid var(--phase-color, var(--accent));
    border-radius: var(--radius); background: var(--bg-elev);
    padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.catalog-phase-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.catalog-phase-head .type-input { flex: 1; min-width: 8rem; }
.catalog-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--phase-color, var(--accent)); flex: none; }
.catalog-phase-title { font-family: var(--font-serif); font-size: 1.15rem; }
.catalog-muted { color: var(--ink-mute); font-size: .78rem; }
.catalog-actions { display: flex; gap: .3rem; align-items: center; margin-left: auto; }
.catalog-intro { flex-basis: 100%; }
.catalog-section {
    margin: .9rem 0 .9rem 1rem; padding: .6rem .8rem;
    border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg);
}
.catalog-section-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.catalog-section-head .type-input { flex: 1; min-width: 8rem; }
.catalog-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.catalog-task {
    display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
    padding: .35rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.catalog-task .type-input { flex: 1; min-width: 10rem; }
.catalog-task-text { flex: 1; min-width: 8rem; }
.catalog-kind { flex: none; width: auto; min-width: 8rem; }
.catalog-kind-badge {
    flex: none; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .4rem; border-radius: 999px; color: #fff; background: var(--ink-mute);
}
.catalog-kind-badge.kind-1 { background: #c6892b; }
.catalog-kind-badge.kind-2 { background: #b5483f; }
.catalog-days {
    flex: none; width: auto; max-width: 6rem; min-width: 4rem; font-variant-numeric: tabular-nums;
}
.catalog-info { flex-basis: 100%; width: 100%; resize: vertical; }
.catalog-days-badge {
    flex: none; font-size: .68rem; font-weight: 600; color: var(--ink-soft);
    padding: .12rem .45rem; border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--bg); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.catalog-add-task, .catalog-add-section { display: flex; gap: .5rem; margin-top: .6rem; }
.catalog-add-task .type-input, .catalog-add-section .type-input { flex: 1; }
.catalog-add-section { margin-top: .8rem; }

/* Improved (labelled) task editor */
.catalog-task-edit {
    flex-basis: 100%; width: 100%;
    display: flex; flex-direction: column; gap: .7rem;
    padding: .3rem .15rem;
}
.catalog-edit-title {
    font-family: var(--font-serif); font-weight: 600; font-size: 1rem; color: var(--ink);
}
.catalog-field { display: flex; flex-direction: column; gap: .25rem; }
.catalog-field-label {
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute);
}
.catalog-field .type-input { flex: none; width: 100%; min-width: 0; }
.catalog-field-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.catalog-field-row .catalog-field { flex: 1; min-width: 11rem; }
.catalog-field-narrow { flex: 0 0 12rem; }
.catalog-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--ink-soft); }
.catalog-check input { accent-color: var(--accent); }
.catalog-edit-actions { display: flex; gap: .5rem; margin-top: .2rem; }

/* ---------- admin dashboard + users ---------- */
.admin-back { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: 1rem; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.admin-card {
    display: flex; align-items: center; gap: .9rem; text-decoration: none;
    padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.admin-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(40,30,18,.08); }
.admin-card-ico {
    flex: none; width: 2.6rem; height: 2.6rem; border-radius: var(--radius);
    background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.admin-card-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.admin-card-title { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; }
.admin-card-desc { font-size: .85rem; color: var(--ink-soft); }
.admin-card-arrow { flex: none; color: var(--ink-mute); font-size: 1.1rem; }

.admin-users-table td, .admin-users-table th { vertical-align: middle; }
.admin-users-action { text-align: right; white-space: nowrap; }
.admin-users-action .btn + .btn { margin-left: .4rem; }
.admin-users-table .is-disabled-row td { opacity: .6; }
.admin-delete-warn {
    color: #7a2020; background: #f8e8e8; border: 1px solid #d9b5b5;
    border-radius: var(--radius); padding: .6rem .75rem;
}
.project-modal-confirm .login-input { width: 100%; margin: .25rem 0 .25rem; }

/* ── admin analytics ── */
.analytics-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.analytics-search { max-width: 22rem; flex: 1 1 16rem; }
.analytics-meta { color: var(--ink-mute); font-size: .85rem; white-space: nowrap; }
.admin-analytics-table th.analytics-th { cursor: pointer; user-select: none; white-space: nowrap; }
.admin-analytics-table th.analytics-th:hover { color: var(--ink); }
.admin-analytics-table th.analytics-th.is-sorted { color: var(--accent); }
.admin-analytics-table td, .admin-analytics-table th { vertical-align: middle; }
.admin-analytics-table .is-disabled-row td { opacity: .55; }
.analytics-email { display: block; font-weight: 500; color: var(--ink); }
.analytics-name { display: block; font-size: .78rem; color: var(--ink-mute); margin-top: .1rem; }
.user-status {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: .15rem .55rem; border-radius: 999px;
}
.user-status.is-active { background: var(--ok-soft); color: var(--ok); }
.user-status.is-disabled { background: #f3d9d4; color: #9a3a2c; }

/* ── Task sequence number (#1, #2 …) — plain, larger, no chrome ── */
.item-number {
    flex: none; font-size: 1.4rem; font-weight: 800; color: var(--ink-mute);
    font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1;
}

/* ── Task answer options (single / multi + Drugo) ── */
.task-options { display: flex; flex-wrap: wrap; gap: .5rem; margin: .65rem 0 .9rem; }
.task-option {
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none;
    padding: .45rem .85rem; border: 1.5px solid var(--line-strong); border-radius: 10px;
    background: var(--bg-elev); font-size: .9rem; line-height: 1.1; color: var(--ink-soft);
    transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
}
.task-option:hover { border-color: var(--accent); color: var(--ink); background: var(--bg); }
.task-option input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); margin: 0; cursor: pointer; flex: none; }
.task-option.is-checked {
    background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.task-option-other { flex-basis: 100%; border-style: dashed; }
.task-option-other-label { white-space: nowrap; font-weight: 600; }
.task-option-other-input {
    flex: 1; min-width: 8rem; padding: .35rem .55rem; border: 1px solid var(--line-strong);
    border-radius: 8px; background: var(--bg); font-size: .9rem; color: var(--ink);
}
.task-option-other-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Admin inline task editor (from the phase page) ── */
.item-admin-edit { color: var(--accent-ink); }
.admin-edit-card { width: min(34rem, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.admin-edit-body { display: flex; flex-direction: column; gap: .85rem; overflow-y: auto; }
.admin-edit-row { display: flex; gap: .85rem; flex-wrap: wrap; }
.admin-edit-field { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 0; }
.admin-edit-field > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute); }
.admin-edit-field .type-input { width: 100%; }
.admin-edit-days { flex: 0 0 9rem; }
.admin-edit-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.admin-edit-check input { accent-color: var(--accent); }
.admin-edit-foot { display: flex; gap: .6rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); }

/* ── Phase budget builder ── */
.phase-budget-sum { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.phase-budget-open { align-self: flex-end; }

.budget-modal-card { width: min(40rem, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.budget-modal-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.budget-modal-intro { margin: 0 0 1rem; font-size: .9rem; color: var(--ink-soft); }
.budget-section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); margin: 1rem 0 .5rem; }
.budget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.budget-row {
    display: flex; align-items: center; gap: .6rem;
    padding: .4rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
}
.budget-row.is-on { border-color: var(--line-strong); background: var(--bg); }
.budget-row-pick { display: inline-flex; align-items: center; gap: .5rem; flex: 1; cursor: pointer; }
.budget-row-pick input { accent-color: var(--accent); }
.budget-row-name { font-size: .92rem; }
.budget-row-name-input { flex: 1; min-width: 8rem; }
.budget-row-amount { flex: 0 0 7.5rem; }
.budget-row-amount .price-input { text-align: right; width: 100%; }
.budget-row-estimate { font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.budget-add { display: flex; gap: .5rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
.budget-add .budget-row-name-input { flex: 1; min-width: 10rem; }
.budget-modal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.5rem; border-top: 1px solid var(--line);
}
.budget-total { display: flex; flex-direction: column; }
.budget-total span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.budget-total strong { font-family: var(--font-serif); font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Phase section tabs + pagination ── */
.phase-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.25rem 0; }
.phase-tab {
    appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--bg-elev); color: var(--ink-soft); line-height: 1;
    font-family: var(--font-sans); font-size: .85rem; font-weight: 600;
    transition: background .15s, border-color .15s, color .15s;
}
.phase-tab:hover { border-color: var(--phase-color, var(--accent)); color: var(--ink); }
.phase-tab-num {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 1.4rem; height: 1.4rem; border-radius: 50%;
    background: var(--line); color: var(--ink-mute);
    font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.phase-tab.is-complete .phase-tab-num { background: var(--ok); color: #fff; }
.phase-tab.is-current {
    background: var(--phase-color, var(--accent)); border-color: var(--phase-color, var(--accent)); color: #fff;
}
.phase-tab.is-current .phase-tab-num { background: rgba(255, 255, 255, .25); color: #fff; }
.phase-tab-check { color: var(--ok); font-weight: 700; }
.phase-tab.is-current .phase-tab-check { color: #fff; }

.section-pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
.section-pager-pos { font-size: .85rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ── Admin: task option badge + phase potential costs ── */
.catalog-opt-badge {
    flex: none; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .45rem; border-radius: 999px; color: #fff; background: var(--accent);
}
.catalog-allow-other { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink-soft); }
.catalog-allow-other input { accent-color: var(--accent); }
.catalog-phase-costs { margin: .8rem 0 .4rem; padding-top: .8rem; border-top: 1px dashed var(--line-strong); }
.catalog-costs-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); margin-bottom: .5rem; }
.catalog-costs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.catalog-cost { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.catalog-cost-name { flex: 1; min-width: 8rem; }
.catalog-cost-amount { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .85rem; }
.catalog-add-cost { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.catalog-add-cost .type-input:first-child { flex: 1; min-width: 10rem; }

/* ──────────────────────────────────────────────────────────────────────────
   Parcel lookup (lokacijska informacija) — project-page map + OPN widget
   ────────────────────────────────────────────────────────────────────────── */
.parcel {
    position: relative;
    margin: 2.5rem 0;
    padding: 1.6rem 1.6rem 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}
/* Daily-quota pill pinned to the card's top-right corner. */
.parcel-usage { position: absolute; top: 1.1rem; right: 1.1rem; }
.parcel-eyebrow {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
    color: var(--accent); margin-bottom: .35rem;
}
.parcel-head h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.parcel-head p { margin: 0 0 1.35rem; color: var(--ink-soft); font-size: .92rem; max-width: 64ch; }

/* search row */
.parcel-search { display: flex; gap: .9rem; align-items: flex-end; flex-wrap: wrap; }
.parcel-field { display: flex; flex-direction: column; gap: .35rem; }
.parcel-field label {
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute);
}
.parcel-field input {
    width: 12rem; max-width: 100%;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: .6rem .75rem; background: var(--bg);
    font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
    transition: border-color .15s;
}
.parcel-field input:focus { outline: none; border-color: var(--accent); }
.parcel-field input::placeholder { color: var(--ink-mute); font-style: italic; }
.parcel-go { height: 2.65rem; }

.parcel-error {
    margin-top: 1.1rem; padding: .7rem .9rem;
    border: 1px solid #d9b5b5; border-left: 3px solid #7a2020; border-radius: var(--radius);
    background: #f8e8e8; color: #7a2020; font-size: .9rem;
}

/* result: map + info */
.parcel-result {
    margin-top: 1.6rem;
    display: grid; grid-template-columns: minmax(230px, 1fr) minmax(300px, 1.25fr);
    gap: 1.75rem; align-items: start;
}
@media (max-width: 760px) { .parcel-result { grid-template-columns: 1fr; } }

.parcel-map-wrap { margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.parcel-map {
    position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: inset 0 1px 3px rgba(60, 50, 35, .12);
    /* grid shows only until the orthophoto loads (or if the WMS proxy fails) */
    background:
        linear-gradient(rgba(122,50,20,.05) 1px, transparent 1px) 0 0 / 26px 26px,
        linear-gradient(90deg, rgba(122,50,20,.05) 1px, transparent 1px) 0 0 / 26px 26px,
        #fbf7f0;
}
.parcel-ortho { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.parcel-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.parcel-coords {
    font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; text-align: center;
}
.parcel-pin { color: var(--accent); }

/* info panel: summary header + tabbed sections */
.parcel-summary {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1rem;
}
.parcel-summary-title { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.parcel-summary-sub { font-size: .85rem; color: var(--ink-mute); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.parcel-summary-value { flex: none; text-align: right; }
.parcel-summary-value-amount {
    font-family: var(--font-serif); font-size: 1.5rem; font-weight: 800; color: var(--ok); line-height: 1; white-space: nowrap;
}
.parcel-summary-value-k {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute);
    margin-top: .2rem; white-space: nowrap;
}

.parcel-tabs {
    display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--line); margin-bottom: 1.2rem;
}
.parcel-tab {
    appearance: none; background: none; border: none; border-bottom: 2px solid transparent;
    margin-bottom: -1px; padding: .5rem .1rem; cursor: pointer;
    font-family: var(--font-sans); font-size: .85rem; font-weight: 600; color: var(--ink-mute);
    display: inline-flex; align-items: center; gap: .4rem; transition: color .12s, border-color .12s;
}
.parcel-tab:hover { color: var(--ink); }
.parcel-tab.is-active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.parcel-tab-count {
    font-size: .68rem; font-weight: 700; line-height: 1; padding: .14rem .42rem; border-radius: 999px;
    background: var(--line); color: var(--ink-soft);
}
.parcel-tab.is-active .parcel-tab-count { background: var(--accent); color: #fff; }
.parcel-panel > *:last-child { margin-bottom: 0; }

.parcel-zone {
    display: flex; align-items: center; gap: .85rem;
    padding: .85rem .95rem; margin-bottom: 1.1rem;
    background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.parcel-zone-code {
    flex: none; min-width: 2.6rem; height: 2.6rem; padding: 0 .5rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-size: 1.45rem; font-weight: 800; line-height: 1;
    color: #fff; background: var(--accent-ink); border-radius: var(--radius);
}
.parcel-zone-text { min-width: 0; }
.parcel-zone-name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--ink); }
.parcel-zone-meta { font-size: .82rem; color: var(--ink-mute); margin-top: .15rem; }

.parcel-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: .6rem; margin-bottom: 1.2rem;
}
.parcel-stat {
    display: flex; flex-direction: column; gap: .15rem;
    padding: .55rem .65rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.parcel-stat-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.parcel-stat-v { font-size: 1rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.parcel-block-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute);
    margin: 0 0 .4rem;
}
.parcel-note { font-size: .88rem; color: var(--ink-soft); margin: .4rem 0 0; }

.parcel-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.parcel-table th, .parcel-table td {
    text-align: left; padding: .42rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
.parcel-table th { color: var(--ink-soft); font-weight: 600; width: 48%; }
.parcel-table td { color: var(--ink); }

.parcel-act-name { font-size: .9rem; color: var(--ink); }

/* ── ownership (Lastništvo) + eZK (hipoteke) ── */
.parcel-owners { margin-bottom: .9rem; }
.parcel-owners td { text-align: right; white-space: nowrap; }
.parcel-owner-name { display: block; color: var(--ink); font-weight: 600; }
.parcel-owner-name.parcel-owner-masked { color: var(--ink-soft); font-style: italic; font-weight: 500; }
.parcel-owner-sub { display: block; font-size: .8rem; color: var(--ink-mute); font-weight: 400; }
.parcel-owner-share { display: block; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.parcel-owner-type { display: block; font-size: .78rem; color: var(--ink-mute); }

.parcel-zk {
    margin: .4rem 0 1rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface-2, rgba(0, 0, 0, .02));
}
.parcel-zk-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.parcel-zk-text { font-size: .88rem; color: var(--ink-soft); margin: .3rem 0 .45rem; }

.parcel-raw { margin-top: 1rem; }
.parcel-raw summary {
    cursor: pointer; font-size: .82rem; color: var(--ink-mute); font-weight: 600; user-select: none; padding: .25rem 0;
}
.parcel-raw summary:hover { color: var(--ink); }
.parcel-raw[open] summary { margin-bottom: .45rem; }

/* (i) info badge — native title tooltip, matching the app's title= convention */
.parcel-i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; margin-left: .25rem; vertical-align: baseline;
    border: 1px solid var(--line-strong); border-radius: 50%;
    font-family: var(--font-sans); font-size: .62rem; font-weight: 700; font-style: italic;
    color: var(--ink-mute); background: var(--bg); cursor: help; user-select: none;
}
.parcel-i:hover, .parcel-i:focus { color: #fff; background: var(--accent); border-color: var(--accent); outline: none; }

.parcel .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; }

/* Prostorski akti — list of adopted spatial-plan acts, each linking to its PIS record (documents). */
.parcel-acts { list-style: none; margin: 0 0 .4rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.parcel-act-item {
    padding: .7rem .85rem;
    background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    display: flex; flex-direction: column; gap: .25rem;
}
.parcel-act-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.parcel-act-row .parcel-act-name { font-weight: 600; }
.parcel-act-badge {
    flex: none; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em;
    padding: .1rem .45rem; border-radius: 999px;
    color: var(--ink-mute); border: 1px solid var(--line);
}
.parcel-act-badge.is-valid { color: #1a7f37; background: rgba(26, 127, 55, .1); border-color: rgba(26, 127, 55, .3); }
.parcel-act-sub { font-size: .8rem; color: var(--ink-mute); }
.parcel-act-link {
    font-size: .85rem; font-weight: 600; color: var(--accent-ink); text-decoration: none; margin-top: .15rem;
}
.parcel-act-link:hover { text-decoration: underline; }

/* ──────────────────────────────────────────────────────────────────────────
   Public marketing landing page (Landing.razor / LandingLayout)
   ────────────────────────────────────────────────────────────────────────── */
.lp { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); }
.lp > main { flex: 1 0 auto; }

/* header */
.lp-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(244, 239, 230, .85); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.lp-header-inner {
    max-width: var(--max); margin: 0 auto;
    padding: .8rem clamp(1.25rem, 4vw, 4rem);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.lp-brand { display: inline-flex; align-items: center; border: none; text-decoration: none; cursor: pointer; }
.lp-brand:hover, .lp-brand:focus, .lp-brand:focus-visible { text-decoration: none; }
.lp-brand-logo { height: 2.6rem; width: auto; display: block; }
.lp-header-actions { display: flex; align-items: center; gap: .4rem; }
.lp-link {
    background: none; border: 0; font: inherit; font-weight: 600; font-size: .9rem;
    color: var(--ink-soft); cursor: pointer; padding: .55rem .85rem; border-radius: var(--radius);
    transition: color .15s;
}
.lp-link:hover { color: var(--ink); }
.lp-header-cta { padding: .5rem 1.15rem; }

/* hero */
.lp-hero {
    max-width: var(--max); margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 4vw, 3.5rem);
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 880px) { .lp-hero { grid-template-columns: 1fr; } }
.lp-eyebrow {
    font-family: var(--font-sans); font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em; color: var(--accent); margin-bottom: 1rem;
}
.lp-hero-title {
    font-family: var(--font-serif); font-weight: 600;
    font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.03; letter-spacing: -.02em; margin: 0;
}
.lp-hero-title em { font-style: italic; font-weight: 400; color: var(--accent-ink); }
.lp-hero-lead {
    font-family: var(--font-serif); font-weight: 400; font-size: 1.2rem; line-height: 1.55;
    color: var(--ink-soft); max-width: 38rem; margin: 1.4rem 0 0;
}
.lp-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.lp-cta-lg { padding: .8rem 1.5rem; font-size: .95rem; }
.lp-hero-note { margin: 1.1rem 0 0; font-size: .82rem; color: var(--ink-mute); }

/* hero "product peek" card */
.lp-hero-card {
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
    padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 24px 60px rgba(20, 14, 6, .10);
}
.lp-card-head { display: flex; flex-direction: column; gap: .15rem; margin-bottom: 1rem; }
.lp-card-eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--accent); }
.lp-card-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.lp-card-progress { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.lp-card-progress-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.lp-card-progress-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.lp-card-progress-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.lp-card-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.lp-card-steps li {
    display: flex; align-items: center; gap: .7rem; padding: .5rem .55rem;
    border-radius: 8px; font-size: .9rem; color: var(--ink-soft);
}
.lp-card-steps li.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.lp-card-steps li.is-done { color: var(--ink-mute); }
.lp-card-step-num {
    flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; background: var(--bg);
    border: 1px solid var(--line-strong); color: var(--ink-soft);
}
.lp-card-steps li.is-active .lp-card-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.lp-card-steps li.is-done .lp-card-step-num { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.lp-card-step-name { flex: 1; min-width: 0; }
.lp-card-step-tick { color: var(--ok); display: inline-flex; }

/* shared section heading */
.lp-section-head { max-width: 42rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.lp-section-head .lp-eyebrow { margin-bottom: .75rem; }
.lp-section-head h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; }
.lp-section-head p { margin: 1rem 0 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55; }

/* features */
.lp-features { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem); }
.lp-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 880px) { .lp-feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-feature-grid { grid-template-columns: 1fr; } }
.lp-feature {
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem 1.4rem;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.lp-feature:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20, 14, 6, .07); }
.lp-feature-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.8rem; height: 2.8rem; font-size: 1.4rem; color: var(--accent);
    background: var(--accent-soft); border-radius: 10px; margin-bottom: 1rem;
}
.lp-feature h3 { font-family: var(--font-serif); font-size: 1.2rem; margin: 0 0 .4rem; }
.lp-feature p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }

/* journey (the 8 phases) */
.lp-journey {
    background: var(--bg-elev); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem);
}
.lp-journey-list {
    max-width: var(--max); margin: 0 auto; padding: 0; list-style: none;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2.5rem;
}
@media (max-width: 720px) { .lp-journey-list { grid-template-columns: 1fr; } }
.lp-journey-step { display: flex; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.lp-journey-num {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 800; font-size: 1.05rem;
    color: #fff; background: var(--phase-color, var(--accent));
}
.lp-journey-body h3 { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 .25rem; }
.lp-journey-body p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }

/* newsletter band */
.lp-newsletter { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem); }
.lp-newsletter-card {
    background: var(--ink); color: var(--bg); border-radius: 16px;
    padding: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
}
@media (max-width: 760px) { .lp-newsletter-card { grid-template-columns: 1fr; gap: 1.5rem; } }
.lp-newsletter-copy .lp-eyebrow { color: var(--accent-soft); }
.lp-newsletter-copy h2 { font-family: var(--font-serif); color: var(--bg); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .6rem; line-height: 1.1; }
.lp-newsletter-copy p { margin: 0; color: rgba(251, 247, 240, .75); line-height: 1.55; }
.lp-newsletter-form { display: flex; flex-wrap: wrap; gap: .6rem; }
.lp-newsletter-input {
    flex: 1; min-width: 12rem; border: 1px solid rgba(251, 247, 240, .25);
    background: rgba(251, 247, 240, .08); color: var(--bg);
    border-radius: var(--radius); padding: .8rem .9rem; font: inherit; font-size: 1rem;
}
.lp-newsletter-input::placeholder { color: rgba(251, 247, 240, .5); }
.lp-newsletter-input:focus { outline: none; border-color: var(--accent); background: rgba(251, 247, 240, .14); }
.lp-newsletter-submit { padding: .8rem 1.5rem; background: var(--accent); border-color: var(--accent); color: #fff; }
.lp-newsletter-submit:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }
.lp-newsletter-error { flex-basis: 100%; margin: 0; color: #ffb4a0; font-size: .85rem; }
.lp-newsletter-consent { flex-basis: 100%; margin: .25rem 0 0; font-size: .78rem; color: rgba(251, 247, 240, .6); }
.lp-newsletter-done { display: flex; align-items: center; gap: .85rem; }
.lp-newsletter-done p { margin: 0; color: rgba(251, 247, 240, .92); line-height: 1.5; }
.lp-newsletter-done-ico {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--ok); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.lp-inline-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-soft); text-decoration: underline; cursor: pointer; }
.lp-inline-link:hover { color: #fff; }

/* closing CTA */
.lp-final {
    max-width: 46rem; margin: 0 auto; text-align: center;
    padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 4rem) clamp(3rem, 6vw, 5rem);
}
.lp-final h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; }
.lp-final p { margin: 1rem auto 0; max-width: 34rem; color: var(--ink-soft); font-size: 1.05rem; }
.lp-final .lp-hero-actions { justify-content: center; margin-top: 1.75rem; }

.lp-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;
}
