﻿/* ============================================================
   marketing.css — Public marketing / home page (route "/")
   Uses the same design tokens as the app (tokens.css) but with
   more creative layout: full-bleed sections, a dark hero-style
   AI spotlight, and CSS-only mockups instead of screenshots.
   ============================================================ */

.public-shell {
    background: var(--color-surface);
    overflow-x: hidden;
}

/* ── Nav ── */
.public-nav {
    position: sticky;
    top: 0;
    z-index: var(--z-dropdown);
    background: var(--color-surface);
    border-bottom: 1px solid transparent;
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

    .public-nav.scrolled {
        border-bottom-color: var(--color-border);
        box-shadow: var(--shadow-sm);
    }

.public-nav-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-5) var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.public-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-primary);
    text-decoration: none;
}

.public-logo-icon {
    width: 38px;
    height: 38px;
    background: var(--color-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.public-logo-name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.public-logo-full {
    height: 100px;
    width: auto;
}

.public-nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

    .public-nav-links a {
        font-size: var(--font-size-lg);
        font-weight: var(--font-weight-medium);
        color: var(--color-text-secondary);
        text-decoration: none;
    }

        .public-nav-links a:hover {
            color: var(--color-text-primary);
        }

.public-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.public-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--color-text-primary);
    /* 44px is the minimum comfortable touch target, and this is the ONLY way
       to navigate on a phone — it was 34x34. Sized rather than padded so the
       icon stays where it is. */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.public-mobile-menu {
    display: none;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-2) var(--space-8) var(--space-6);
    border-top: 1px solid var(--color-border);
}

    /* :not(.btn) is the whole fix. This rule styles the NAV LINKS, but it
       matched every <a> in the menu — and the menu's calls to action are
       anchors carrying .btn .btn-primary. At 0,1,1 it out-specifies
       .btn-primary's 0,1,0, so the primary button inherited the plain link
       colour: #555D6B text on the indigo fill, a contrast ratio of 1.49:1
       where AA wants 4.5. The same button in the desktop header was white,
       which is what made it look like a one-off rather than a rule.

       Only the COLOUR rule is narrowed. The 44px touch-target rule further
       down deliberately still applies to buttons — they need tapping too. */
    .public-mobile-menu a:not(.btn) {
        font-size: var(--font-size-lg);
        font-weight: var(--font-weight-medium);
        color: var(--color-text-secondary);
        text-decoration: none;
    }

    /* GUARDED BY THE SAME BREAKPOINT that hides the desktop nav. Without the
       media query this rule fired at any width, so opening the menu on a phone
       and then widening — rotating a tablet, or dragging a narrow desktop
       window out — brought the desktop nav back while the mobile menu stayed
       open underneath it, showing Features/Pricing/About and Start free twice.
       The toggle that opened it is itself hidden above this width, so there was
       no way to close it either. */
    @media (max-width: 768px) {
        .public-mobile-menu.open {
            display: flex;
        }
    }

/* ── Shared section scaffolding ── */
.public-section {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-16) var(--space-8);
}

.public-eyebrow {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.public-section-title {
    font-size: 34px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
}

.public-section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 620px;
    margin-top: var(--space-4);
}

/* ── Legal pages (Privacy Policy / Terms of Service) ── */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    /* Same frame as .public-section. The bottom used to be var(--space-20),
       which the scale doesn't define — the whole shorthand was therefore
       dropped and these pages rendered flush against the nav with no padding
       at all, not merely a short bottom margin. */
    padding: var(--space-16) var(--space-8);
}

.legal-page h1 {
    font-size: 34px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2);
}

.legal-page .legal-updated {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-8);
}

.legal-page .legal-intro {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-8);
}

.legal-page .legal-toc {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-10);
}

.legal-page .legal-toc-title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.legal-page .legal-toc ol {
    columns: 2;
    column-gap: var(--space-6);
    margin: 0;
    padding-left: var(--space-5);
}

.legal-page .legal-toc li {
    margin-bottom: var(--space-1);
    font-size: var(--font-size-sm);
    break-inside: avoid;
}

.legal-page .legal-toc a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.legal-page .legal-toc a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.legal-page section {
    margin-bottom: var(--space-10);
    scroll-margin-top: var(--space-8);
}

.legal-page h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.legal-page h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.legal-page p,
.legal-page li {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    font-size: var(--font-size-md);
}

.legal-page p {
    margin-bottom: var(--space-4);
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-6);
}

.legal-page li {
    margin-bottom: var(--space-2);
}

.legal-page strong {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
}

.legal-page a {
    color: var(--color-primary);
}

/* Opens the "Talk to us" modal from inside a sentence, where an email address
   used to sit. A button, because it does something rather than going
   somewhere, but it has to read as part of the prose: inherited font, no
   padding, baseline aligned. */
.legal-contact-link {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
}

.legal-contact-link:hover {
    text-decoration: none;
}

.legal-page .legal-placeholder {
    background: var(--color-warning-light);
    color: var(--color-text-primary);
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .legal-page .legal-toc ol {
        columns: 1;
    }
}

/* ── Hero ── */
.public-hero {
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-surface) 100%);
}

.public-hero-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-16) var(--space-8);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.public-hero-title {
    font-size: 48px;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
}

.public-hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    max-width: 520px;
    margin-bottom: var(--space-8);
}

.public-hero-ctas {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.public-hero-checks {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

    .public-hero-checks span {
        display: inline-flex;
        align-items: center;
        gap: var(--space-2);
    }

    .public-hero-checks svg {
        color: var(--color-success);
        flex-shrink: 0;
    }

/* Hero visual — CSS-only "product" mockup: window chrome + stat
   cards + a tiny bar chart + an invoice row. No screenshots. */
.public-hero-visual {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.public-mockup-chrome {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-light);
}

.public-mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

    .public-mockup-dot.red { background: #f87171; }
    .public-mockup-dot.amber { background: #fbbf24; }
    .public-mockup-dot.green { background: #4ade80; }

.public-mockup-url {
    margin-left: var(--space-3);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-4);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.public-mockup-body {
    padding: var(--space-6);
}

.public-mockup-greeting {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.public-mockup-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
}

.public-mockup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.public-mockup-stat {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.public-mockup-stat-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.public-mockup-stat-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.public-mockup-cashflow-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.public-mockup-cashflow-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.public-mockup-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 60px;
}

.public-mockup-bar-pair {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}

.public-mockup-bar-pair .bar {
    width: 7px;
    border-radius: var(--radius-sm);
}

    .public-mockup-bar-pair .bar.dark {
        background: var(--color-primary);
    }

    .public-mockup-bar-pair .bar.light {
        background: #c7d2fe;
    }

.public-mockup-invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
}

.public-mockup-invoice-id {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}

.public-mockup-invoice-customer {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-left: var(--space-3);
}

/* ── Feature highlights ── */
.public-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.public-feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    position: relative;
}

.public-feature-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.public-feature-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.public-feature-desc {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
}

.public-badge-soon {
    display: inline-block;
    background: var(--color-admin-bg);
    color: var(--color-admin-text);
    border: 1px solid var(--color-admin-border);
    border-radius: var(--radius-full);
    padding: 2px var(--space-3);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
}

/* ── Time-saving section ── */
.public-timesave-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-6);
    margin-top: var(--space-10);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.public-timesave-compare-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    text-align: left;
}

    .public-timesave-compare-card.featured {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
        border-color: transparent;
        box-shadow: var(--shadow-xl);
    }

.public-timesave-compare-badge {
    position: absolute;
    top: -12px;
    right: var(--space-6);
    background: var(--color-white);
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px var(--space-3);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.public-timesave-compare-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

    .public-timesave-compare-card.featured .public-timesave-compare-label {
        color: #e0e1fd;
    }

.public-timesave-compare-number {
    font-size: 44px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--space-4);
}

    .public-timesave-compare-number span {
        font-size: var(--font-size-lg);
        font-weight: var(--font-weight-bold);
    }

    .public-timesave-compare-card.featured .public-timesave-compare-number {
        color: var(--color-white);
    }

.public-timesave-compare-bar {
    height: 8px;
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

    .public-timesave-compare-card.featured .public-timesave-compare-bar {
        background: rgba(255, 255, 255, 0.25);
    }

    .public-timesave-compare-bar span {
        display: block;
        height: 100%;
        background: var(--color-primary);
        border-radius: var(--radius-full);
    }

    .public-timesave-compare-card.featured .public-timesave-compare-bar span {
        background: var(--color-white);
    }

.public-timesave-compare-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
}

    .public-timesave-compare-card.featured .public-timesave-compare-desc {
        color: #e0e1fd;
    }

.public-timesave-compare-plus {
    font-size: 28px;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-disabled);
}

.public-timesave-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin-top: var(--space-10);
}

.public-timesave-item {
    text-align: left;
}

.public-timesave-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.public-timesave-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.public-timesave-desc {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
}

.public-timesave-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
    margin-top: var(--space-10);
}

/* Every other .public-timesave-bottom is a single closing line, which reads
   fine centred across the full 1140px section. A full PARAGRAPH does not:
   three lines at that width is about 150 characters a line, and the eye
   loses the start of the next one. Opt in per paragraph rather than capping
   the base class, so the existing one-liners keep the width they were
   written for. */
.public-timesave-bottom.is-paragraph {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Who it's for ── */
.public-who-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.public-who-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: left;
}

.public-who-icon {
    font-size: 28px;
    display: block;
    margin-bottom: var(--space-3);
}

.public-who-label {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.public-who-sub {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ── Trust & security ── */
.public-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.public-trust-item {
    text-align: left;
}

.public-trust-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.public-trust-title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.public-trust-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
}

/* ── FAQ ── */
.public-faq-list {
    max-width: 760px;
    margin: var(--space-10) auto 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.public-faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

    .public-faq-item:hover {
        border-color: var(--color-primary);
    }

    .public-faq-item[open] {
        border-color: var(--color-primary);
        box-shadow: var(--shadow-sm);
    }

    .public-faq-item summary {
        cursor: pointer;
        list-style: none;
        font-size: var(--font-size-md);
        font-weight: var(--font-weight-semibold);
        color: var(--color-text-primary);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-4);
    }

        .public-faq-item summary::-webkit-details-marker {
            display: none;
        }

        .public-faq-item summary::after {
            content: "";
            flex-shrink: 0;
            width: 28px;
            height: 28px;
            border-radius: var(--radius-full);
            background: var(--color-primary-light);
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center / 14px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center / 14px no-repeat;
            background-color: var(--color-primary);
            transition: transform var(--transition-fast);
        }

    .public-faq-item[open] summary::after {
        transform: rotate(135deg);
    }

    .public-faq-item p {
        margin-top: var(--space-4);
        padding-top: var(--space-4);
        border-top: 1px solid var(--color-border-light);
        font-size: var(--font-size-sm);
        color: var(--color-text-muted);
        line-height: var(--line-height-relaxed);
    }

/* ── AI spotlight (dark) ── */
.public-ai-section {
    background: var(--color-sidebar-bg);
    color: var(--color-white);
}

.public-ai-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-16) var(--space-8);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.public-ai-eyebrow {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: var(--space-4);
}

.public-ai-title {
    font-size: 34px;
    font-weight: var(--font-weight-extrabold);
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-5);
}

.public-ai-desc {
    font-size: var(--font-size-lg);
    color: var(--color-sidebar-item);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-6);
}

.public-ai-note {
    font-size: var(--font-size-sm);
    color: var(--color-sidebar-item);
    margin-bottom: var(--space-6);
}

.public-ai-chat {
    background: var(--color-sidebar-bg-darker);
    border: 1px solid var(--color-sidebar-active);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.public-chat-bubble {
    max-width: 82%;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-md);
    line-height: var(--line-height-normal);
}

    .public-chat-bubble.user {
        align-self: flex-end;
        background: var(--color-primary);
        color: var(--color-white);
        border-bottom-right-radius: var(--radius-sm);
    }

    .public-chat-bubble.assistant {
        align-self: flex-start;
        background: var(--color-sidebar-active);
        color: var(--color-white);
        border-bottom-left-radius: var(--radius-sm);
    }

/* The file chip on the user's bubble in the inventory demo. Sits above the
   text the way a real attachment does in the chat drawer, because the reply
   underneath claims the supplier's invoice was attached to the expense — and
   Nova can only do that with a file the person actually sent. */
.public-chat-attachment {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    padding: 2px var(--space-3);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.18);
    font-size: var(--font-size-xs);
    line-height: 1.6;
    word-break: break-all;
}

/* A visual beat showing Nova's propose/confirm safety step — nothing
   in the real chat drawer executes a change without this same kind of
   explicit confirmation, so the mockup shows it too. */
.public-chat-confirm {
    align-self: flex-start;
    max-width: 82%;
    background: var(--color-sidebar-bg);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-sm);
    padding: var(--space-4) var(--space-5);
}

.public-chat-confirm-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: var(--space-3);
}

.public-chat-confirm-body {
    font-size: var(--font-size-sm);
    color: var(--color-sidebar-item);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-4);
}

    .public-chat-confirm-body strong {
        color: var(--color-white);
    }

.public-chat-confirm-btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-md);
}

.public-chat-timing {
    text-align: right;
    font-size: var(--font-size-xs);
    color: var(--color-sidebar-item);
    margin-top: var(--space-2);
}

.public-nova-bullets {
    list-style: none;
    margin: var(--space-6) 0 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

    .public-nova-bullets li {
        display: flex;
        align-items: flex-start;
        gap: var(--space-3);
        font-size: var(--font-size-sm);
        color: var(--color-sidebar-item);
        line-height: var(--line-height-normal);
    }

    .public-nova-bullets li::before {
        content: "";
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        margin-top: 2px;
        border-radius: var(--radius-full);
        background: var(--color-primary);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
    }

/* ── Pricing comparison table (live from Polar) ── */
/* ── Plan cards ───────────────────────────────────────────────
   NEUTRAL SURFACES, ONE ACCENT. The tier scale used to put four different
   indigo fills behind text, which is what produced two rounds of contrast
   failures — white on the light tiers measured 1.99:1 and 2.98:1. Here every
   card is the same surface and the hierarchy comes from a border and a badge,
   so no text sits on a colour that varies. Nothing to re-measure when the
   brand shifts. */
.public-plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-10);
    /* The recommended card lifts out of the row; without this its badge and
       border are clipped by the grid's own bounds on some browsers. */
    padding-top: var(--space-3);
}

/* Each card carries its own accent, deepening left to right, so the row reads
   as a progression at a glance. USED FOR DECORATION ONLY — a top bar, a tick,
   a rule — never as a fill behind text. That is the whole difference from the
   old tier scale, which put white on indigo-300 at 1.99:1 and needed two
   rounds of fixes; a 4px bar with nothing on it cannot fail contrast. */
.public-plan-card {
    --tier-accent: var(--color-border);

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    position: relative;
    /* NO overflow:hidden. It was here to make the top bar follow the card's
       rounded corners, and it clipped the Recommended badge — which is
       positioned to straddle the top edge on purpose. The bar rounds its own
       corners instead. */
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

    /* The bar itself. Inside the card's rounded corners via overflow:hidden,
       so it follows the radius without a second border-radius to keep in sync. */
    .public-plan-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--tier-accent);
        /* Its own radius, since the card no longer clips it. Slightly inside
           the card's own so it sits within the border rather than over it. */
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .public-plan-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    /* Deepening indigo, matched to the order the plans sort in by price. The
       :nth-child hooks are deliberate: the plan list comes from Polar, so a
       class per plan name would break the moment a product is renamed, while
       position always means "cheaper to dearer". */
    .public-plan-cards .public-plan-card:nth-child(1) { --tier-accent: #a5b4fc; }
    .public-plan-cards .public-plan-card:nth-child(2) { --tier-accent: #818cf8; }
    .public-plan-cards .public-plan-card:nth-child(3) { --tier-accent: var(--color-primary); }
    .public-plan-cards .public-plan-card:nth-child(4) { --tier-accent: var(--color-primary-hover); }

    .public-plan-card.recommended {
        border: 2px solid var(--color-primary);
        /* Compensates for the extra border pixel so the recommended card's
           CONTENT still lines up with its neighbours. */
        padding: calc(var(--space-6) - 1px);
        box-shadow: var(--shadow-xl);
        /* A wash, not a fill: it fades to the card surface within the first
           third, so every line of text still sits on plain white. */
        background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-surface) 32%);
        transform: translateY(-6px);
    }

        .public-plan-card.recommended:hover {
            transform: translateY(-8px);
        }

.public-plan-card-badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    left: var(--space-6);
    background: var(--color-primary);
    color: var(--color-primary-text);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    padding: 2px var(--space-3);
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

.public-plan-card-name {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
}

.public-plan-card-price {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: var(--space-2) 0 var(--space-5);
}

.public-plan-card-interval {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
}

.public-plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6);
}

    .public-plan-card-features li {
        padding: var(--space-2) 0;
        border-bottom: 1px solid var(--color-border-light);
        font-size: var(--font-size-sm);
    }

/* Label and value. The flex lives HERE rather than on the <li> so an add-on
   note can sit under the pair instead of being squeezed into the value
   column, which is what made the note unusable the first time. */
.public-plan-card-feature-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    align-items: baseline;
}

.public-plan-card-feature-note {
    margin-top: 2px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.4;
}

    .public-plan-card-features li:last-child {
        border-bottom: none;
    }

.public-plan-card-feature-label {
    color: var(--color-text-muted);
}

.public-plan-card-feature-value {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
    text-align: right;
}

    /* A limit this plan RAISES over the cheaper one. Pro is why: it adds no
       capability over Growth, so without marking the numbers its card would
       look like Growth's and the dearest plan would appear to offer nothing
       more. Colour on white, never white on colour — 6.29:1. */
    .public-plan-card-features li.raised .public-plan-card-feature-value,
    .public-plan-card-features li.unlimited .public-plan-card-feature-value {
        color: var(--color-primary);
        font-weight: var(--font-weight-bold);
    }

        /* The value and its pill sit on one line, right-aligned with the
           label. No arrow: the pill already says the number went up, and
           carrying both put three marks on one short row. */
        .public-plan-card-features li.raised .public-plan-card-feature-value {
            display: inline-flex;
            align-items: baseline;
            gap: 4px;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

/* A chip, not a line of green text. It is the strongest thing on the card
   for the one plan that has it — the only offer on the page that costs
   nothing to accept — and it was reading as a footnote. 6.49:1. */
.public-plan-card-trial {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 4px;
    background: var(--color-success-light);
    color: var(--color-success-text);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    padding: 3px var(--space-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

/* The trial card's big figure sits closer to the price line under it. */
.public-plan-card-price-free { margin-bottom: var(--space-1); }
.public-plan-card-price-free .public-plan-card-interval { margin-left: var(--space-1); }
.public-plan-card-then {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-5);
}

/* ── Sign-up: what happens with a free month ──────────────────
   Green because it is the good news on the page, sitting directly above the
   button that used to say "Continue to payment". */
.signup-trial-callout {
    margin-top: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-success-light);
    color: var(--color-success-text);
}
.signup-trial-callout-head {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
}
.signup-trial-callout-body {
    font-size: var(--font-size-sm);
    margin-top: var(--space-1);
}
.signup-trial-callout-note {
    font-size: var(--font-size-xs);
    margin-top: var(--space-2);
}

/* ── "Everything in X, plus" ──────────────────────────────────
   The capability half of the card. Limits say how MUCH; this says WHAT, and a
   card carrying only the first reads as a page about allowances. */
.public-plan-card-includes {
    margin-bottom: var(--space-6);
    /* Takes the slack instead of the limits list, so every CTA still lines up
       across the row when one card names five capabilities and another names
       none. */
    flex: 1;
}

.public-plan-card-includes-heading {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-2);
}

    .public-plan-card-includes ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .public-plan-card-includes li {
        font-size: var(--font-size-sm);
        color: var(--color-text-primary);
        padding: 3px 0 3px var(--space-5);
        position: relative;
    }

        /* A tick per line, drawn rather than typed: the ✓ in the table is a
           text glyph in a cell, and here it has to sit on the first line of a
           label that may wrap. */
        .public-plan-card-includes li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: var(--tier-accent);
            font-weight: var(--font-weight-bold);
        }

        /* Anything the ENTRY plan lacks — the reasons to pay more. Emphasised
           on every plan that carries it, not only the one where it arrives:
           marking it only on arrival left Pro's list reading as a plain copy
           of Growth's, when those five capabilities are just as much a reason
           to be on Pro. */
        .public-plan-card-includes li.premium {
            font-weight: var(--font-weight-semibold);
        }

            .public-plan-card-includes li.premium::before {
                color: var(--color-primary);
            }

/* Tinted rather than filled. Five solid pills down the Growth card shouted
   over the feature names they were meant to annotate; the semibold label and
   the accent tick already carry the signal, so this only has to confirm it.
   Still 5.62:1, comfortably past AA. */
.public-plan-card-new {
    display: inline-block;
    margin-left: var(--space-2);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 10px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.03em;
    padding: 0 5px;
    border-radius: var(--radius-sm);
    vertical-align: 1px;
    /* Keeps "New" from being orphaned onto its own line under a long label. */
    white-space: nowrap;
}

.public-plan-card-cta {
    width: 100%;
    /* No global box-sizing reset in this project — see pos.css. Without this
       the padding is added to 100% and the button overhangs its card, which is
       the same defect the dropdown rows had. */
    box-sizing: border-box;
    justify-content: center;
}

/* ── "Compare all features" ───────────────────────────────────
   Collapsed at every width, including desktop. The 22-row matrix is for
   someone choosing between two tiers; everyone else has already been answered
   by the cards. <details> rather than a scripted toggle: keyboard and screen
   reader behaviour comes free and it works before Blazor connects. */
.public-pricing-compare {
    margin-top: var(--space-8);
}

    .public-pricing-compare > summary {
        cursor: pointer;
        font-weight: var(--font-weight-semibold);
        color: var(--color-primary);
        padding: var(--space-3) 0;
        /* 44px so it is tappable, per the touch-target pass below. */
        min-height: 44px;
        display: flex;
        align-items: center;
    }

.public-pricing-table-wrap {
    margin-top: var(--space-10);
    overflow-x: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    /* Slim, brand-coloured scrollbar instead of the bulky OS default —
       -webkit-overflow-scrolling gives momentum/inertia scrolling on iOS. */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-bg);
}

    .public-pricing-table-wrap::-webkit-scrollbar {
        height: 8px;
    }

    .public-pricing-table-wrap::-webkit-scrollbar-track {
        background: var(--color-bg);
    }

    .public-pricing-table-wrap::-webkit-scrollbar-thumb {
        background: var(--color-primary);
        border-radius: var(--radius-full);
    }

    .public-pricing-table-wrap::-webkit-scrollbar-thumb:hover {
        background: var(--color-primary-hover);
    }

.public-pricing-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: var(--color-surface);
    font-size: var(--font-size-sm);
}

    .public-pricing-table th,
    .public-pricing-table td {
        padding: var(--space-4) var(--space-5);
        text-align: center;
        white-space: nowrap;
    }

    .public-pricing-table thead th {
        font-size: var(--font-size-md);
        font-weight: var(--font-weight-bold);
        color: var(--color-white);
        white-space: nowrap;
    }

    .public-pricing-table thead th.public-pricing-table-feature-col {
        background: var(--color-text-primary);
        text-align: left;
        color: var(--color-white);
    }

    /* Progressively deeper brand indigo per tier, lightest to darkest.

       THE TEXT COLOUR TURNS OVER HALFWAY DOWN THE RAMP, and it has to: the
       th rule above sets white for every tier, which on indigo-300 is 1.99:1
       and on indigo-400 is 2.98:1, against the 4.5 AA wants. Darkening these
       two backgrounds instead would fix the contrast by destroying the
       light-to-dark gradient that is the point of the scale — so the two
       light tiers keep their colour and take dark text (8.90:1 and 5.95:1),
       and the two dark tiers keep white. */
    .public-pricing-table thead th.tier-starter { background: #a5b4fc; color: var(--color-text-primary); }
    .public-pricing-table thead th.tier-solo    { background: #818cf8; color: var(--color-text-primary); }
    .public-pricing-table thead th.tier-growth  { background: var(--color-primary); }
    .public-pricing-table thead th.tier-pro     { background: var(--color-primary-hover); }

    .public-pricing-table tbody td:first-child {
        text-align: left;
        color: var(--color-text-secondary);
        font-weight: var(--font-weight-medium);
    }

    .public-pricing-table tbody tr:nth-child(even) {
        background: var(--color-bg);
    }

    .public-pricing-table-price-row td {
        font-size: var(--font-size-lg);
        font-weight: var(--font-weight-extrabold);
        color: var(--color-text-primary);
    }

        .public-pricing-table-price-row td:first-child {
            font-size: var(--font-size-sm);
            font-weight: var(--font-weight-medium);
            color: var(--color-text-secondary);
        }

        .public-pricing-table-price-row td span {
            font-size: var(--font-size-xs);
            font-weight: var(--font-weight-medium);
            color: var(--color-text-muted);
        }

    .public-pricing-table-check {
        color: var(--color-success);
        font-weight: var(--font-weight-bold);
    }

    .public-pricing-table-cross {
        color: var(--color-text-disabled);
    }

    .public-pricing-table-dash {
        color: var(--color-text-disabled);
    }

    .public-pricing-table-subtext {
        margin-top: var(--space-1);
        font-size: var(--font-size-xs);
        font-weight: var(--font-weight-medium);
        color: var(--color-text-muted);
    }

    .public-pricing-table-cta-row td {
        padding-top: var(--space-5);
        padding-bottom: var(--space-6);
    }

        .public-pricing-table-cta-row .btn {
            width: 100%;
            color: var(--color-white);
            border: none;
        }

        /* Same progressive-indigo scale as the header row, so each button
           visually belongs to its column. */
        /* Dark text on the light half of the ramp — same reasoning as the
           header row above. */
        .public-pricing-table-cta-row .btn.tier-starter { background: #a5b4fc; color: var(--color-text-primary); }
        .public-pricing-table-cta-row .btn.tier-solo    { background: #818cf8; color: var(--color-text-primary); }
        .public-pricing-table-cta-row .btn.tier-growth  { background: var(--color-primary); }
        .public-pricing-table-cta-row .btn.tier-pro     { background: var(--color-primary-hover); }

        /* ONE hover rule for all four tiers, replacing four that each borrowed
           the NEXT tier's colour.

           That borrowing was the root of the contrast problem, not just a
           casualty of it: it walked Solo onto indigo-500, the one shade on
           this ramp where NEITHER text colour passes (dark 3.97:1, white
           4.47:1). Fixing it in place meant flipping Solo's text to white
           mid-hover, so hovering Starter darkened subtly while hovering Solo
           jumped from pale lavender with dark text to deep indigo with white.

           Dimming instead keeps every tier on its own colour, so the text
           colour never changes and no tier can land on a shade that belongs to
           another.

           0.95 rather than a heavier dim, and the margin is the reason.
           brightness() dims the TEXT as well as the background, so the ratio
           has to be computed from BOTH — and --color-text-primary is #1e2433,
           lighter than a true black. At 0.92 that put Solo, the worst case, at
           4.62:1: passing, but 0.12 clear of the line, close enough that any
           later nudge to the palette silently breaks it. At 0.95 the four
           tiers hover at 7.20 / 4.85 / 6.07 / 7.54, measured off computed
           styles rather than the stylesheet. */
        .public-pricing-table-cta-row .btn[class*="tier-"]:hover {
            filter: brightness(0.95);
        }

/* ── Pricing placeholder ── */
.public-pricing-card {
    margin-top: var(--space-10);
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-8);
    text-align: center;
}

.public-pricing-card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.public-pricing-card-desc {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

/* ── Closing CTA banner ── */
.public-cta-banner {
    max-width: var(--content-max-width);
    margin: 0 auto var(--space-16);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    color: var(--color-white);
}

.public-cta-banner h2 {
    font-size: 30px;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--space-4);
}

.public-cta-banner p {
    font-size: var(--font-size-lg);
    color: #e0e1fd;
    margin-bottom: var(--space-7);
}

.public-cta-banner .btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.public-cta-banner .btn-outline-inverse {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.5);
}

    .public-cta-banner .btn-outline-inverse:hover {
        background: rgba(255, 255, 255, 0.1);
    }

.public-cta-note {
    margin: var(--space-6) 0 0;
    font-size: var(--font-size-sm);
    color: #e0e1fd;
}

/* ── Footer ── */
.public-footer {
    background: var(--color-sidebar-bg);
    color: var(--color-sidebar-item);
}

.public-footer-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-12) var(--space-8) var(--space-8);
}

.public-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-8);
    padding-bottom: var(--space-10);
}

.public-footer-brand-desc {
    font-size: var(--font-size-sm);
    color: var(--color-sidebar-item);
    margin: var(--space-4) 0 var(--space-5);
    max-width: 260px;
    line-height: var(--line-height-relaxed);
}

.public-footer-social {
    display: flex;
    gap: var(--space-3);
}

.public-footer-social-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--color-sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.public-footer-col-title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-disabled);
    margin-bottom: var(--space-4);
}

.public-footer-col a {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-sidebar-item);
    margin-bottom: var(--space-3);
    text-decoration: none;
}

    .public-footer-col a:hover {
        color: var(--color-white);
    }

.public-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-sidebar-active);
    font-size: var(--font-size-xs);
    color: var(--color-text-disabled);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .public-hero-inner,
    .public-ai-inner {
        grid-template-columns: 1fr;
    }

    .public-hero-title {
        font-size: 36px;
    }

    .public-feature-grid,
    .public-timesave-grid,
    .public-who-grid {
        grid-template-columns: 1fr;
    }

    .public-timesave-compare {
        grid-template-columns: 1fr;
    }

    .public-timesave-compare-plus {
        text-align: center;
    }

    .public-trust-grid {
        grid-template-columns: 1fr 1fr;
    }

    .public-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Touch targets. Everything below was tall enough to READ and too short to
       TAP — the menu links were 22px, the footer links 17px, and a one-line FAQ
       question 39px. Raised only at this breakpoint: a mouse does not need
       44px, and applying it everywhere would stretch the desktop footer by half
       its height for no one's benefit. */
    .public-mobile-menu a {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    .public-footer-col a {
        display: flex;
        align-items: center;
        min-height: 44px;
        /* The height now supplies the rhythm the margin used to. */
        margin-bottom: 0;
    }

    .public-faq-item summary {
        min-height: 44px;
    }

    /* The LINKS go; the ACTIONS stay. Hiding both left a phone with a logo
       and a hamburger, so a returning customer had no visible way in - the
       one thing they came for. Features/Pricing/About are browsing, and they
       keep their place in the menu. */
    .public-nav-links {
        display: none;
    }

    .public-nav-actions {
        display: flex;
        align-items: center;
        gap: var(--space-1);
    }

    /* Acquisition is already handled: the hero's Get started is full width and
       a few hundred pixels below this. Repeating it here costs the width that
       Sign in needs. */

    /* Trimmed to fit rather than shrinking the wordmark, which carries the
       tagline and is already at the size where it stops being readable. The
       gap was two pixels; the tap target stays at 44. */
    .public-nav-actions .btn {
        padding-left: var(--space-2);
        padding-right: var(--space-2);
        font-size: var(--font-size-sm);
        min-height: 44px;
        white-space: nowrap;
    }

    /* LOOK LIKE A BUTTON. btn-ghost is transparent with secondary-grey text,
       which on desktop sits beside a filled Start free and reads fine as the
       quieter of a pair. Alone on a phone next to a logo it has neither
       contrast nor an edge, so it reads as a caption rather than the way in -
       exactly what it was brought back to be.

       Given the secondary treatment instead: an outline to make it tappable
       and full-strength text. Deliberately NOT btn-primary - the hero's Get
       started is the loud one, and two primaries on the same screen make a new
       visitor choose between them. */
    .public-nav-actions .btn-ghost {
        /* OUTLINE, NOT A SLAB. Filled, it was the heaviest thing on the bar:
           a solid tinted block against a white header, taller than the logo
           mark beside it, competing with the hero button rather than sitting
           under it. An outline says "control" just as clearly and weighs a
           fraction of that.

           Colour does the noticing instead of area - brand indigo, semibold.
           Grey secondary text was what made it invisible the first time, so
           the contrast has to stay; it just does not need a fill to carry it. */
        background: transparent;
        color: var(--color-primary);
        border-color: var(--color-primary);
        font-weight: var(--font-weight-semibold);
    }

    /* 44px is the TOUCH floor and the box was rendering 51: min-height sets the
       floor, and vertical padding added to it rather than filling it. The tap
       area is the whole 44 either way, so the padding bought nothing and cost
       seven pixels of apparent bulk next to a 56px logo. */
    .public-nav-actions .btn {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* AFTER the padding rule above, and that ordering is the point. That rule
       carried a display of its own for a while, and at two classes it outranked
       this hide at one - so Start free came back onto the bar, took 78px, and
       squeezed the logo onto its floor. The button that hides something must
       not be outgunned by a rule that only meant to adjust spacing, so the
       display lives here alone and nowhere else. */
    .public-nav-actions .public-nav-cta {
        display: none;
    }

    .public-mobile-toggle {
        display: flex;
    }

    /* 56px is the CEILING, not the height. Fixed at 56 the wordmark is 187px
       wide, and 187 + a 44px hamburger + an 87px Dashboard button is 318px of
       content in 311px of bar - the header overflowed the moment Sign in was
       allowed back onto it.

       height:auto with a max lets the logo give up a few pixels ONLY when the
       row would not otherwise fit. Signed out - the marketing case, and the
       one this page exists for - the button is "Sign in" and there is room, so
       it renders at the full 56 and the tagline is untouched. Signed in, the
       longer "Dashboard" costs it about 5%, which is the visitor who has least
       need of a tagline. */
    .public-logo-full {
        /* WIDTH drives this, not height. logo.svg carries a viewBox and no
           width/height attributes, so it has no intrinsic size: height:auto
           alone resolved to zero and the logo disappeared from the bar
           entirely. Given a width and the viewBox's own ratio, the height
           follows, and max-width lets it give ground when the row is tight.
           187px is what 56px tall came to, so nothing moves until it has to. */
        width: 187px;
        max-width: 100%;
        height: auto;
        aspect-ratio: 400 / 120;
        /* A FLOOR, because shrinking is not free. At 320px the row squeezed the
           wordmark to 121px, which put the tagline at 3.3px - present in the
           markup and unreadable on the glass, which is worse than honest. 150px
           holds it near 4.1px, the same size it takes on a 375 screen with
           Dashboard in the bar, and still leaves room for Sign in and the menu
           (150 + 59 + 44 = 253 in 256). Below about 310px there is no
           arrangement that fits, and the floor is the right thing to keep. */
        min-width: 150px;
    }

    /* Without min-width:0 a flex item refuses to shrink below its content, so
       the max-width above would never get the chance to apply. */
    .public-logo {
        min-width: 0;
        flex-shrink: 1;
    }

    .public-nav-actions {
        flex-shrink: 0;
    }

    .public-section,
    .public-hero-inner,
    .public-ai-inner {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }

    .public-hero-title {
        font-size: 30px;
    }

    .public-section-title,
    .public-ai-title {
        font-size: 26px;
    }

    /* Still needs horizontal scroll on phones (5 dense columns), but
       tightening padding/font shrinks how far you have to swipe. */
    .public-pricing-table {
        min-width: 600px;
        font-size: var(--font-size-xs);
    }

        .public-pricing-table th,
        .public-pricing-table td {
            padding: var(--space-3);
        }
}

@media (max-width: 480px) {
    .public-footer-grid {
        grid-template-columns: 1fr;
    }

    .public-hero-ctas,
    .public-cta-banner div {
        flex-direction: column;
        align-items: stretch;
    }

    .public-mockup-stats {
        grid-template-columns: 1fr 1fr;
    }

        .public-mockup-stats .public-mockup-stat:last-child {
            grid-column: span 2;
        }

    .public-trust-grid,
    .public-footer-grid {
        grid-template-columns: 1fr;
    }
}
