/* PrivateOfficeAI — light, flat, functional. No rounding, no shadows, no effects. */

:root {
    --bg: #ffffff;
    --bg-alt: #ffffff;   /* flat white — sections separate with 1px borders, not gray fills */
    --border: #d5d9d9;
    --text: #0f1111;
    --text-dim: #565959;
    --accent: #1a5dab;
    --accent-dark: #144a89;
    --ok: #067d62;
    --err: #c40000;
    --max: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap.full { max-width: none; padding: 0 24px; }

/* Full-bleed section bands: background spans the whole width, content stays readable. */
.band { width: 100%; }
.nav-band { border-bottom: 1px solid var(--border); background: var(--bg); }
.hero-band { background: var(--bg); position: relative; overflow: hidden; isolation: isolate; }
/* Light "tech grid" behind the hero — sits under the copy on its own layer,
   faded at the edges with a radial mask so the text stays crisp. */
.hero-band::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(26,93,171,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26,93,171,0.07) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(115% 105% at 18% 15%, #000 34%, transparent 100%);
            mask-image: radial-gradient(115% 105% at 18% 15%, #000 34%, transparent 100%);
}
.steps-band { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-band { background: var(--bg); }
.cta-band { background: #0f1111; color: #fff; border-top: 1px solid var(--border); position: relative; overflow: hidden; isolation: isolate; }
/* Dark line grid on the closing CTA — mirrors the hero grid, faded so the copy
   stays crisp and the lines fill the empty right side. */
.cta-band::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(105% 130% at 88% 25%, #000 26%, transparent 100%);
            mask-image: radial-gradient(105% 130% at 88% 25%, #000 26%, transparent 100%);
}
.cta-band > .wrap { position: relative; z-index: 1; }

.band-head { text-align: left; max-width: 760px; margin: 0 0 32px; }
.band-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.01em; }
.band-head p { color: var(--text-dim); margin-top: 8px; font-size: 1.05rem; }

/* Nav */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}
.nav .logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.nav .logo span { color: var(--accent); }
.logo, .logo:hover, .topbar .logo:hover { text-decoration: none; }
.nav .links a { margin-left: 20px; font-size: 0.95rem; }
.nav { position: relative; }
.nav .logo { flex-shrink: 0; }
.nav .logo img { height: 32px; width: auto; max-width: 60vw; object-fit: contain; }
.menu-toggle {
    display: none; background: none; border: 0; width: 44px; height: 44px;
    cursor: pointer; align-items: center; justify-content: center;
    color: var(--text); font-size: 0; margin-right: -8px;
}
.menu-toggle::before { content: '\2630'; font-size: 1.35rem; line-height: 1; }
.nav.open .menu-toggle::before { content: '\2715'; font-size: 1.15rem; }
.mobile-only { display: none; }
@media (max-width: 720px) {
    .menu-toggle { display: inline-flex; }
    /* Full-width sheet that slides down from the bar. Kept in the layout
       (visibility, not display) so the open/close transition can animate. */
    .nav .links {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border);
        padding: 4px 16px 14px; z-index: 80;
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    }
    .nav.open .links {
        opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
    }
    .nav .links a { margin: 0; padding: 14px 2px; font-size: 1rem; color: var(--text);
                    border-bottom: 1px solid var(--border); }
    .nav .links a.mobile-only { display: block; }
    .nav .links a.btn { border: 1px solid var(--accent-dark); background: var(--accent); color: #fff;
                        text-align: center; margin-top: 12px; padding: 12px; }
    .nav .links a.btn.ghost { background: #fff; color: var(--text); border-color: var(--border); }
    .mobile-only { display: block; }
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent-dark);
    padding: 9px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

/* Hero (centered legacy fallback) */
.hero { text-align: center; padding: 76px 24px 68px; }

/* Hero — left copy, right product image. Higher specificity than .hero so the
   left alignment wins regardless of source order. */
.hero.hero-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
    text-align: left; padding: 72px 24px;
}
.hero-split .hero-copy { max-width: 600px; }
.hero-split .hero-copy .eyebrow { margin-bottom: 18px; }
.hero-split .hero-copy h1 { margin: 0 0 18px; max-width: none; }
.hero-split .hero-copy p.sub { margin: 0 0 30px; max-width: 560px; }
.hero-split .waitlist { justify-content: flex-start; margin: 0; }
.hero-split .trust { justify-content: flex-start; margin: 30px 0 0; }
/* Image sits at the left of its column so it reads closer to the center. */
.hero-visual { display: flex; justify-content: flex-start; }
.hero-img { width: 100%; max-width: 520px; height: auto; display: block; }
.eyebrow {
    display: inline-block;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--accent); border: 1px solid var(--border); padding: 5px 12px; margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 860px;
    margin: 0 auto 18px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.sub {
    color: var(--text-dim);
    font-size: 1.15rem;
    max-width: 660px;
    margin: 0 auto 30px;
}
.trust {
    list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px 26px; margin: 30px auto 0; max-width: 720px;
    color: var(--text-dim); font-size: 0.95rem;
}
.trust li { position: relative; padding-left: 22px; }
.trust li::before {
    content: ""; position: absolute; left: 4px; top: 50%; width: 8px; height: 8px;
    margin-top: -4px; background: var(--ok);
}

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--bg); border: 1px solid var(--border); padding: 24px 22px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-n {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 32px; height: 32px; background: var(--accent); color: #fff;
    font-weight: 700; font-size: 1rem;
}
.steps h3 { font-size: 1.05rem; margin: 0; }
.steps p { color: var(--text-dim); font-size: 0.95rem; }

/* CTA band */
.cta { text-align: left; padding: 68px 24px; }
.cta h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: -0.01em; }
.cta > p { color: #c9cdcd; margin: 10px 0 26px; font-size: 1.1rem; }
.cta .waitlist input[type="email"] { border-color: #3a3d3d; }
.cta-sub { margin-top: 18px; }
.cta-sub a { color: #fff; text-decoration: underline; }
.cta-sub a:hover { color: #c9cdcd; }

/* Waitlist form */
.waitlist {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 460px;
    margin: 0 auto;
}
.waitlist input[type="email"] {
    flex: 1;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 9px 12px;
    font-size: 0.95rem;
    color: var(--text);
}
.waitlist input[type="email"]:focus { outline: none; border-color: var(--accent); }
.notice { text-align: center; margin: 14px auto 0; font-size: 0.95rem; }
.notice.ok { color: var(--ok); }
.notice.err { color: var(--err); }

/* Feature cards */
.steps-band > .wrap, .features-band > .wrap { padding-top: 64px; padding-bottom: 64px; }
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

/* Horizontal card rail (homepage sections with many cards): arrows + a thin
   accent scrollbar that doubles as the progress indicator. */
.hscroll { position: relative; }
.hscroll .hscroll-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #e8eaed;
}
.hscroll-track > .card { flex: 0 0 330px; scroll-snap-align: start; }
.hscroll-track::-webkit-scrollbar { height: 6px; }
.hscroll-track::-webkit-scrollbar-track { background: #e8eaed; }
.hscroll-track::-webkit-scrollbar-thumb { background: var(--accent); }
.hs-btn {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 40px; height: 40px;
    background: #fff; border: 1px solid var(--border); color: var(--text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hs-btn:hover { border-color: var(--accent); color: var(--accent); }
.hs-btn svg { width: 18px; height: 18px; display: block; }
.hs-prev { left: -16px; }
.hs-next { right: -16px; }
.hs-btn[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 720px) {
    .hs-btn { display: none; }              /* swipe on touch; scrollbar shows progress */
    .hscroll-track > .card { flex-basis: 80vw; }
}
.card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 20px;
}
.card h3 { font-size: 1rem; margin-bottom: 6px; }
.card p { color: var(--text-dim); font-size: 0.92rem; }

/* Cost calculator — the "own once vs rent forever" signature section.
   Boldness is spent here; everything else on the page stays quiet. */
.calc-band { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calc-band > .wrap { padding-top: 64px; padding-bottom: 64px; }
.calc { border: 1px solid var(--border); background: #fff; padding: 28px; }
.calc-controls { display: grid; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.calc-slider label { display: block; font-size: 1rem; color: var(--text-dim); margin-bottom: 12px; }
.calc-slider label strong { color: var(--accent); font-size: 1.5rem; font-variant-numeric: tabular-nums; margin: 0 2px; }
.calc-slider input[type="range"] { width: 100%; accent-color: var(--accent); height: 6px; cursor: pointer; }
.calc-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.calc-presets-l { font-size: 0.85rem; color: var(--text-dim); margin-right: 2px; }
.calc-presets button { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
    background: #fff; border: 1px solid var(--border); padding: 7px 13px; cursor: pointer; font: inherit;
    font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.calc-presets button em { font-style: normal; font-weight: 400; font-size: 0.75rem; color: var(--text-dim); }
.calc-presets button:hover { border-color: var(--text-dim); }
.calc-presets button.on { border-color: var(--accent); background: rgba(26,93,171,0.07); color: var(--accent); }
.calc-presets button.on em { color: var(--accent); }

.calc-results { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; margin-top: 24px; }
.calc-col { padding: 22px; text-align: left; }
.calc-rent { background: rgba(196,0,0,0.045); }
.calc-own { background: rgba(26,93,171,0.055); }
.calc-vs { display: flex; align-items: center; justify-content: center; padding: 0 16px;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.calc-tag { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.calc-own .calc-tag { color: var(--accent); }
.calc-big { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em;
    line-height: 1; font-variant-numeric: tabular-nums; }
.calc-rent .calc-big { color: #c40000; }
.calc-own .calc-big { color: var(--accent); }
.calc-big .unit { font-size: 0.9rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0; }
.calc-col p { font-size: 0.9rem; color: var(--text-dim); margin-top: 10px; line-height: 1.5; }

.calc-verdict { text-align: left; font-size: 1.18rem; line-height: 1.5; max-width: 760px;
    margin: 24px 0 2px; }
.calc-verdict b { color: var(--text); font-weight: 700; }
.calc-verdict .save { color: var(--ok); }

.calc-bars { max-width: none; margin: 24px 0 0; border-top: 1px solid var(--border); padding-top: 22px; }
.calc-bars-h { text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 14px; }
.calc-bar-row { display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.calc-bar-name { font-size: 0.85rem; color: var(--text-dim); }
.calc-bar-track { background: var(--bg-alt); border: 1px solid var(--border); height: 22px; overflow: hidden; }
.calc-bar { display: block; height: 100%; width: 0; transition: width 0.45s cubic-bezier(.4,0,.2,1); }
.calc-bar-rent { background: #c94f4f; }
.calc-bar-own { background: var(--accent); }
.calc-bar-num { font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 72px; }
.calc-cta { margin-top: 26px; }
/* Button pairs sit side-by-side on one row (hero, calculator, final CTA),
   at natural size — they shrink to fit on small screens rather than stacking. */
.btn-row { display: flex; flex-wrap: nowrap; gap: 12px; align-items: center;
    justify-content: flex-start; margin-left: 0; margin-right: 0; max-width: none; }
.btn-row .btn { flex: 0 1 auto; text-align: center; white-space: nowrap; }
.calc-foot { text-align: left; font-size: 0.82rem; color: var(--text-dim); line-height: 1.5;
    max-width: 760px; margin: 16px 0 0; }
.calc-presets button:focus-visible, .calc-slider input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .calc-bar { transition: none; } }
@media (max-width: 640px) {
    .calc { padding: 18px; }
    .calc-band > .wrap { padding-top: 40px; padding-bottom: 40px; }
    .calc-results { grid-template-columns: 1fr; }
    .calc-col { padding: 18px 16px; }
    .calc-vs { padding: 10px 0; }
    /* Presets: label on its own line, three equal buttons underneath */
    .calc-presets { align-items: stretch; }
    .calc-presets-l { flex-basis: 100%; align-self: center; margin: 0 0 2px; }
    .calc-presets button { flex: 1 1 0; align-items: center; text-align: center; padding: 8px 4px; font-size: 0.76rem; }
    .calc-presets button em { font-size: 0.66rem; }
    /* Bars: label on its own line above the bar, so long names never clip */
    .calc-bar-row { grid-template-columns: 1fr auto; grid-template-areas: "name name" "track num";
        row-gap: 5px; column-gap: 8px; margin-bottom: 14px; }
    .calc-bar-name { grid-area: name; font-size: 0.8rem; }
    .calc-bar-track { grid-area: track; }
    .calc-bar-num { grid-area: num; font-size: 0.9rem; min-width: 0; }
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 22px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 24px;
    background: var(--bg);
}
.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 28px;
    width: 100%;
    max-width: 380px;
}
.auth-card .logo { text-align: center; font-weight: 700; font-size: 1.15rem; margin-bottom: 22px; }
.auth-card .logo span { color: var(--accent); }
.auth-card label { display: block; font-size: 0.88rem; font-weight: 600; margin: 12px 0 4px; }
.auth-card input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 11px;
    font-size: 0.95rem;
    color: var(--text);
}
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-card .btn { width: 100%; margin-top: 20px; }
.auth-card .error {
    background: #fff5f5;
    border: 1px solid var(--err);
    color: var(--err);
    padding: 9px 12px;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* Topbar */
.topbar {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 11px 0;
}
.topbar .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: nowrap;
}
.topbar .logo { flex-shrink: 0; }
.topbar .user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.topbar .logo { font-weight: 700; color: var(--text); }
.topbar .logo span { color: var(--accent); }
.topbar .user { color: var(--text-dim); font-size: 0.9rem; }
.topbar .user a { margin-left: 12px; }

/* Dashboard */
.dash { padding: 32px 0 56px; }
.dash h1 { font-size: 1.4rem; margin-bottom: 4px; }
.dash p.sub { color: var(--text-dim); margin-bottom: 22px; }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); }
.table th, .table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.table th { background: var(--bg-alt); font-weight: 600; font-size: 0.82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; }
.table tr:last-child td { border-bottom: 0; }

/* Bits */
.dim { color: var(--text-dim); }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; }
.badge { display: inline-block; padding: 1px 8px; font-size: 0.78rem; border: 1px solid var(--border); color: var(--text-dim); background: var(--bg-alt); }
.badge.ok { color: var(--ok); border-color: var(--ok); background: #fff; }
.badge.off { color: var(--err); border-color: var(--err); background: #fff; }
.input { width: 100%; background: #fff; border: 1px solid var(--border); padding: 8px 11px; font-size: 0.95rem; color: var(--text); }
.input:focus { outline: none; border-color: var(--accent); }
.dash label { display: block; font-size: 0.88rem; font-weight: 600; margin: 12px 0 4px; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 0.9rem; padding: 0; }
.linkbtn:hover { color: var(--accent-dark); text-decoration: underline; }


/* ============ Responsive ============ */
@media (max-width: 900px) {
    .wrap.full { padding: 0 16px; }
}

@media (max-width: 900px) {
    /* Hero stacks: copy on top, product image below — stays LEFT aligned */
    .hero.hero-split { grid-template-columns: 1fr; gap: 26px; padding: 46px 24px; text-align: left; }
    .hero-split .hero-copy { max-width: none; }
    .hero-visual { justify-content: flex-start; }
    .hero-img { max-width: 100%; }
}

@media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 720px) {
    .wrap { padding: 0 16px; }

    /* Nav: logo left, links right, one row, tappable */
    /* Mobile nav lives behind the hamburger (rules near the top of this
       file); only the bar's own spacing belongs here. */
    .nav { padding: 12px 16px; gap: 8px; flex-wrap: nowrap; }

    /* Everything left-aligned on mobile */
    .hero { padding: 44px 16px 40px; text-align: left; }
    .hero h1 { margin-left: 0; margin-right: 0; }
    .hero p.sub { font-size: 1rem; margin-left: 0; margin-right: 0; }
    .band-head { text-align: left; margin: 0 auto 24px; }
    .band-head p { margin-left: 0; }
    .cta { text-align: left; padding: 44px 16px; }
    .cta .waitlist, .waitlist { justify-content: flex-start; margin-left: 0; }
    .waitlist { flex-direction: column; max-width: 400px; }
    .waitlist input[type="email"] { min-width: 0; width: 100%; }
    .waitlist .btn { width: 100%; }
    /* Button pairs stay two-up on one row even on phones — one line each. */
    .btn-row { flex-direction: row; max-width: none; gap: 10px; }
    .btn-row .btn { width: auto; flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; font-size: 0.9rem; }
    .trust { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 24px; }
    .notice { text-align: left; margin-left: 0; }

    /* Bands tighten up */
    .steps-band > .wrap, .features-band > .wrap { padding-top: 40px; padding-bottom: 40px; }
    .cta { padding: 46px 16px; }

    /* Cards + steps stack full width */
    .features { grid-template-columns: 1fr; gap: 12px; }
    .steps { grid-template-columns: 1fr; max-width: none; gap: 12px; }

    /* Pricing */
    .plans { grid-template-columns: 1fr; padding: 20px 0 14px; }
    .plan { padding: 22px; }
    .plan .price { font-size: 1.9rem; }
    .care { flex-direction: column; align-items: flex-start !important; gap: 14px; padding: 20px; }
    .care .btn { width: 100%; text-align: center; }
    .tagline { padding: 34px 0 4px; }

    /* Admin topbar — one row, tabs scroll, actions pinned right */
    .topbar { padding: 9px 0; }
    .topbar .wrap { gap: 10px; }
    .topbar .logo img { height: 20px !important; }
    .topbar .user { gap: 8px; font-size: 0.85rem; }
    .topbar .user a { margin-left: 0; }
    .topbar .user .name-text { display: none; }
    .dash { padding: 22px 0 44px; }

    /* Dashboards */
    .dash { padding: 20px 0 40px; }
    .dash-head { flex-direction: column; align-items: stretch; }
    .dash-head .btn { width: 100%; text-align: center; }

    /* Wide tables scroll instead of breaking the page */
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
    .table { min-width: 640px; }
    .table th, .table td { padding: 9px 10px; font-size: 0.88rem; }

    /* Forms and auth cards */
    .auth-card { padding: 24px 20px; }
    .card { padding: 18px; }

    /* Long text/keys never overflow */
    code, .table td { overflow-wrap: anywhere; }
    footer { font-size: 0.82rem; }
}

@media (max-width: 420px) {
    .hero h1 { font-size: 1.45rem; }
    .nav .logo img { height: 26px; }
}

/* Everything respects its box */
img, table { max-width: 100%; }
* { min-width: 0; }

/* Button variants for the admin */
.btn.sm { padding: 5px 11px; font-size: 0.85rem; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--bg-alt); color: var(--text); border-color: var(--accent); }
.btn.danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn.danger:hover { background: var(--err); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Admin nav as real tabs, not naked links */
.topbar .navbtns {
    display: flex; gap: 6px; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; min-width: 0;
}
.topbar .navbtns::-webkit-scrollbar { display: none; }
.topbar .navbtns a { white-space: nowrap; flex-shrink: 0; }
.topbar .navbtns a {
    padding: 6px 12px; font-size: 0.9rem; font-weight: 600;
    color: var(--text); background: #fff; border: 1px solid var(--border);
    text-decoration: none;
}
.topbar .navbtns a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.topbar .navbtns a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Row actions sit on one line and stay tappable */
.rowacts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rowacts form { display: inline; }

@media (max-width: 720px) {
    .topbar .navbtns a { padding: 6px 10px; font-size: 0.85rem; }
    .rowacts { gap: 4px; }
}

/* Add-on switches: a dot + label + On/Off chip. States are stable — hovering
   never repaints the button into a different state, it just sharpens the border. */
.addonbtns { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.addonbtns form { display: block; }
.btn.toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--text); border-color: var(--border);
    font-weight: 600; min-width: 170px; text-align: left;
}
.btn.toggle::before { content: ''; width: 8px; height: 8px; background: var(--border); flex-shrink: 0; }
.btn.toggle:hover { border-color: var(--accent); background: #fff; color: var(--text); }
.btn.toggle .tstate { margin-left: auto; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.btn.toggle.on { background: #fff; border-color: var(--ok); color: var(--text); }
.btn.toggle.on::before { background: var(--ok); }
.btn.toggle.on .tstate { color: var(--ok); }
.btn.toggle.on:hover { border-color: var(--ok); background: #fff; color: var(--text); }

/* Add-a-customer form: a real grid, every cell bottom-aligned to the input
   row so the button sits exactly level with the fields. */
.addcust { display: grid; grid-template-columns: 130px 1fr 1.2fr 1.4fr auto; gap: 14px; align-items: end; }
.addcust label { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addcust .input { height: 42px; }
.addcust .btn { height: 42px; white-space: nowrap; }
@media (max-width: 980px) {
    .addcust { grid-template-columns: 1fr 1fr; }
    .addcust .btn { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 560px) { .addcust { grid-template-columns: 1fr; } }

/* ---- Admin topbar (single source of truth) ---- */
.topbar .logo { display: flex; align-items: center; gap: 8px; }
.topbar .logo img { height: 24px; display: block; }
.topbar .navbtns { flex: 1 1 auto; }
.topbar .user .name-text { color: var(--text-dim); font-size: 0.88rem; white-space: nowrap; }

/* Content never touches the bar */
.wrap.full.dash { padding-top: 8px; }

.substate { font-size: 0.78rem; margin: 2px 0 6px 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Add-to-home-screen banner (mobile PWA prompt) — flat, matches the brand. */
.a2hs {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
    max-width: 460px; margin: 0 auto;
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid var(--border); padding: 12px 14px;
}
.a2hs[hidden] { display: none; }
.a2hs-icon { width: 38px; height: 38px; flex-shrink: 0; }
.a2hs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.a2hs-text strong { font-size: 0.9rem; }
.a2hs-text span { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }
.a2hs .btn { padding: 8px 16px; flex-shrink: 0; }
.a2hs-x { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--text-dim); cursor: pointer; padding: 0 2px; flex-shrink: 0; }

/* Nav dropdowns (Features / Use cases) — enterprise mega-menu.
   Panel is anchored under its trigger (left:0), and its width is capped against
   the viewport so the rightmost menu can never spill off the right edge. */
.navdrop { position: relative; display: inline-flex; }
.navdrop-t { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.navdrop-t .caret { display: inline-flex; transition: transform 0.18s ease; opacity: 0.85; }
.navdrop-t .caret svg { width: 11px; height: 11px; }
.navdrop:hover .navdrop-t .caret { transform: rotate(180deg); }

/* transparent positioned wrapper — its top padding is the hover bridge over the gap */
.navdrop-panel {
    position: absolute; top: 100%; left: 0; padding-top: 12px;
    opacity: 0; visibility: hidden; transform: translateY(7px);
    transition: opacity 0.17s ease, transform 0.17s ease; z-index: 100; pointer-events: none;
}
.navdrop:hover .navdrop-panel, .navdrop:focus-within .navdrop-panel {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.navdrop-card {
    /* Anchored under the trigger; a small JS nudge (see poai_nav) shifts it left
       only if it would overflow the right edge, so it never spills off page. */
    width: min(600px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--border);
 padding: 10px;
}
.navdrop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ndi { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px;
    text-decoration: none; margin: 0 !important; transition: background 0.12s ease; }
.ndi:hover { background: var(--bg-alt); }
.ndi-ic { flex: 0 0 auto; width: 38px; height: 38px; display: flex;
    align-items: center; justify-content: center; background: rgba(26, 93, 171, 0.09);
    color: var(--accent); transition: background 0.12s ease; }
.ndi:hover .ndi-ic { background: rgba(26, 93, 171, 0.15); }
.ndi-ic svg { width: 20px; height: 20px; display: block; }
.ndi-tx { display: block; min-width: 0; }
.ndi-t { display: block; font-weight: 600; color: var(--text); font-size: 0.92rem; line-height: 1.25; }
.ndi-d { display: block; color: var(--text-dim); font-size: 0.775rem; line-height: 1.4; margin-top: 3px; }
.navdrop-all { display: flex; align-items: center; gap: 6px; margin: 4px 4px 2px; padding: 11px 8px 4px;
    border-top: 1px solid var(--border); color: var(--accent); font-weight: 600; font-size: 0.86rem;
    text-decoration: none; }
.navdrop-all:hover { color: var(--accent-dark); }
.navdrop-all .arw { transition: transform 0.14s ease; }
.navdrop-all:hover .arw { transform: translateX(3px); }

/* Narrow desktop: the viewport-capped card would get cramped as two columns,
   so drop to a single column and a tighter width (still anchored under trigger). */
@media (min-width: 721px) and (max-width: 860px) {
    .navdrop-grid { grid-template-columns: 1fr; }
    .navdrop-card { width: min(360px, calc(100vw - 120px)); }
    .ndi-d { display: none; }
}

@media (max-width: 720px) {
    /* On mobile the hamburger sheet stays clean: Features / Use cases are plain
       links to their hub pages — no giant expanded mega-list. */
    .navdrop { display: block; width: 100%; }
    .navdrop-panel { display: none; }
    .navdrop-t { display: flex; padding: 14px 2px; font-size: 1rem; color: var(--text);
        border-bottom: 1px solid var(--border); }
    .navdrop-t .caret { display: none; }
}

/* ── Feature / use-case article pages ──────────────────────────────── */
.artc-hero { background: linear-gradient(180deg, rgba(26,93,171,0.06), rgba(26,93,171,0)); border-bottom: 1px solid var(--border); }
.artc-hero > .wrap { padding: 36px 24px 42px; max-width: var(--max); }
.crumb { font-size: 0.86rem; color: var(--text-dim); margin: 0 0 20px; }
.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.artc-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 14px; }
.artc-ic { width: 56px; height: 56px; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.artc-ic svg { width: 28px; height: 28px; display: block; }
.artc-hero h1 { font-size: clamp(1.55rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
.artc-hero .lead { font-size: 1.18rem; color: var(--text-dim); line-height: 1.55; max-width: 640px; margin: 0 0 24px; }
.artc-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.artc-main > .wrap { padding: 46px 24px 8px; max-width: var(--max);
    display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 52px; align-items: start; }
.article { line-height: 1.8; font-size: 1.03rem; color: var(--text); min-width: 0; }
.article > p { margin: 0 0 18px; }
.article strong { color: var(--text); }
.article ul { list-style: none; margin: 22px 0 6px; padding: 0; }
.article li { position: relative; padding: 11px 0 11px 32px; border-bottom: 1px solid var(--border); }
.article li:last-child { border-bottom: 0; }
.article li::before { content: ""; position: absolute; left: 0; top: 13px; width: 18px; height: 18px;
 background: rgba(26,93,171,0.12); }
.article li::after { content: ""; position: absolute; left: 5px; top: 17px; width: 7px; height: 4px;
    border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg); }

/* Guide/answer pages: question headings, tables, TL;DR answer box, FAQ — all
   square-cornered and border-based to match the rest of the site. */
.article h2 { font-size: 1.42rem; letter-spacing: -0.01em; line-height: 1.25; margin: 38px 0 14px; }
.article h3 { font-size: 1.12rem; letter-spacing: -0.01em; margin: 26px 0 10px; }
.article h2:first-child, .article h3:first-child { margin-top: 0; }
.article ol { margin: 18px 0 6px; padding-left: 22px; }
.article ol li { padding: 7px 0 7px 6px; border-bottom: 1px solid var(--border); }
.article ol li:last-child { border-bottom: 0; }
.article a { color: var(--accent); text-decoration: none; }
.article a:hover { text-decoration: underline; }
.article .tldr { border: 1px solid var(--border); border-left: 3px solid var(--accent);
    background: var(--bg-alt); padding: 18px 20px; margin: 0 0 26px; }
.article .tldr .tldr-l { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.article .tldr p { margin: 0; font-size: 1.05rem; line-height: 1.65; }
.article .tbl-wrap { overflow-x: auto; margin: 22px 0; }
.article table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.article th, .article td { border: 1px solid var(--border); padding: 11px 14px; text-align: left;
    vertical-align: top; line-height: 1.55; }
.article th { background: var(--bg-alt); font-weight: 700; }
.article .faq { margin: 34px 0 0; border-top: 1px solid var(--border); padding-top: 12px; }
.article .faq h2 { margin-bottom: 6px; }
.article .faq-q { border-bottom: 1px solid var(--border); padding: 16px 0; }
.article .faq-q:last-child { border-bottom: 0; }
.article .faq-q h3 { margin: 0 0 6px; font-size: 1.05rem; }
.article .faq-q p { margin: 0; color: var(--text-dim); line-height: 1.7; }

/* Feature-page hero with the product screenshot (captured from the live demo). */
.feat-hero-grid { display: grid; gap: 36px; align-items: center; }
.feat-hero.has-shot .feat-hero-grid { grid-template-columns: 1fr 1.15fr; }
.feat-hero-copy .artc-head { margin-top: 0; }
.feat-hero-shot { margin: 0; }
/* Browser-style window frame around the screenshot — rounded, bordered, no shadow. */
.shot-win { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.shot-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
    background: #f0f2f4; border-bottom: 1px solid var(--border); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd4d9; flex-shrink: 0; }
.shot-bar i:nth-child(1) { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-url { margin-left: 10px; flex: 1; max-width: 260px; background: #fff; border: 1px solid var(--border);
    border-radius: 999px; font-size: 0.72rem; color: var(--text-dim); padding: 3px 12px; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-win img { display: block; width: 100%; height: auto; }
.feat-hero-shot figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--text-dim); }
.feat-hero-shot figcaption a { color: var(--accent); text-decoration: none; }
.feat-hero-shot figcaption a:hover { text-decoration: underline; }
@media (max-width: 860px) { .feat-hero.has-shot .feat-hero-grid { grid-template-columns: 1fr; } }

.artc-side { position: sticky; top: 84px; }
.side-card { border: 1px solid var(--border); padding: 22px; background: var(--bg-alt); }
.side-card h3 { font-size: 1.08rem; margin: 0 0 7px; letter-spacing: -0.01em; }
.side-card > p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; margin: 0 0 16px; }
.side-card .btn { width: 100%; text-align: center; margin-bottom: 8px; }
.side-card .btn:last-of-type { margin-bottom: 0; }
.side-facts { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
.side-facts li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.88rem;
    color: var(--text-dim); padding: 6px 0; }
.side-facts svg { width: 16px; height: 16px; color: var(--ok); flex-shrink: 0; margin-top: 2px; }

.artc-rel { border-top: 1px solid var(--border); background: var(--bg-alt); margin-top: 44px; }
.artc-rel > .wrap { padding: 48px 24px 56px; max-width: var(--max); }
.artc-rel h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 0 0 22px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 16px; }
.rel-card { display: flex; gap: 13px; align-items: center; background: #fff; border: 1px solid var(--border);
 padding: 16px; text-decoration: none; transition: border-color 0.13s ease, background 0.13s ease; }
.rel-card:hover { border-color: var(--accent); background: var(--bg-alt); }
.rel-ic { flex: 0 0 auto; width: 42px; height: 42px; background: rgba(26,93,171,0.09);
    color: var(--accent); display: flex; align-items: center; justify-content: center; }
.rel-ic svg { width: 21px; height: 21px; display: block; }
.rel-tx { min-width: 0; display: block; }
.rel-card b { display: block; color: var(--text); font-size: 0.95rem; line-height: 1.25; }
/* Scope to the text column only — a bare ".rel-card span" would also hit
   .rel-ic and stomp its display:flex, pinning the icon to the top-left. */
.rel-tx > span { display: block; color: var(--text-dim); font-size: 0.8rem; line-height: 1.42; margin-top: 4px; }

/* Hub pages (all features / all use cases) reuse the hero + rel-grid */
.hub-hero > .wrap { padding: 52px 24px 30px; max-width: var(--max); }
.hub-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 0 0 10px; }
.hub-hero .lead { font-size: 1.18rem; color: var(--text-dim); line-height: 1.5; max-width: 620px; margin: 0; }
.hub-grid > .wrap { padding: 34px 24px 68px; max-width: var(--max); }
.guide-cat { margin-bottom: 40px; }
.guide-cat h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 4px; }
.guide-cat-blurb { color: var(--text-dim); font-size: 0.98rem; line-height: 1.5; margin: 0 0 18px; max-width: 720px; }

/* Contact page — split card: accent info panel + form */
.contact-head { text-align: left; max-width: var(--max); margin: 0 auto; padding: 52px 24px 6px; }
.contact-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin: 0 0 10px; }
.contact-head p { color: var(--text-dim); font-size: 1.1rem; max-width: 540px; margin: 0; line-height: 1.55; }
.contact-wrap { max-width: var(--max); margin: 0 auto; padding: 36px 24px 76px; }
.contact-card { display: grid; grid-template-columns: 370px 1fr; border: 1px solid var(--border);
    overflow: hidden; background: #fff; }
.contact-info { background: var(--accent); color: #fff; padding: 38px 34px; display: flex; flex-direction: column; }
.contact-info h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 0 0 10px; }
.contact-info > p { color: rgba(255,255,255,0.88); line-height: 1.6; margin: 0 0 22px; font-size: 0.97rem; }
.contact-info .mail { color: #fff; font-weight: 600; text-decoration: none; align-self: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.45); padding-bottom: 2px; overflow-wrap: anywhere; }
.contact-info .mail:hover { border-bottom-color: #fff; color: #fff; }
.contact-facts { list-style: none; margin: auto 0 0; padding: 26px 0 0; }
.contact-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0;
    color: rgba(255,255,255,0.92); font-size: 0.92rem; line-height: 1.45; }
.contact-facts svg { flex-shrink: 0; margin-top: 2px; color: #a5e3c8; }
.contact-form-pane { padding: 38px 36px; min-width: 0; }

.cform { display: grid; gap: 18px; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cform label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.cform .req { color: var(--accent); }
.cform .input { padding: 11px 13px; font-size: 0.97rem; }
.cform textarea.input { resize: vertical; min-height: 140px; line-height: 1.55; font-family: inherit; }
.cform .btn { padding: 11px 24px; justify-self: start; }
.cform-done-ic { width: 52px; height: 52px; background: rgba(6,125,98,0.1);
    color: var(--ok); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.cform-done h2 { font-size: 1.3rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.cform-done p { color: var(--text-dim); line-height: 1.6; margin: 0; }

@media (max-width: 860px) {
    .artc-main > .wrap { grid-template-columns: 1fr; gap: 30px; }
    .artc-side { position: static; }
    .side-card { max-width: 460px; }
    .contact-card { grid-template-columns: 1fr; }
    .contact-info { padding: 30px 26px; }
    .contact-facts { margin-top: 4px; padding-top: 18px; }
    .contact-form-pane { padding: 28px 24px; }
}
@media (max-width: 600px) {
    .contact-head { padding: 34px 16px 4px; }
    .contact-wrap { padding: 24px 16px 52px; }
    .cform-row { grid-template-columns: 1fr; }
    /* iOS zooms fields under 16px — keep the form steady on phones. */
    .cform .input { font-size: 16px; }
}
@media (max-width: 720px) {
    .artc-hero > .wrap { padding: 26px 16px 30px; }
    .artc-main > .wrap { padding: 32px 16px 4px; }
    .artc-rel > .wrap { padding: 38px 16px 44px; }
    .hub-hero > .wrap { padding: 34px 16px 22px; }
    .hub-grid > .wrap { padding: 24px 16px 48px; }
}
