/*
 * Linear-inspired landing marketing surface (static HTML; not a copy of Linear’s Next/styled-components bundle).
 * Linear cues: #08090a canvas, cool grays, hairline borders, Inter optical sizes, soft radii, restrained accent.
 */
:root {
    --bg: #08090a;
    --surface: #0c0e12;
    --surface-2: #12141a;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --border-sub: rgba(255, 255, 255, 0.12);
    --text: #f7f8f8;
    --muted: #8a8f98;
    --footer-c: #6e7380;
    --accent: #4512e6;
    --accent-soft: #5e6ad2;
    --accent-l: #8b9bff;
}

html {
    scroll-behavior: smooth;
}

body.nav-drawer-open {
    overflow: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(8, 9, 10, 0.72);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-capsule {
    background: transparent;
    border-radius: 0;
    padding: 0;
    height: auto;
    box-shadow: none;
    border: none;
}

.nav-capsule-left {
    flex-shrink: 0;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    height: 28px;
    width: auto;
    display: block;
}

.nav-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.nav-mobile-backdrop {
    display: none;
}

.nav-mobile-panel {
    display: flex;
    align-items: center;
}

.nav-capsule-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-capsule-right .btn-get-started {
    border-radius: 999px;
    padding: 8px 16px;
}

.nav-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.nav-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-menu-bar {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 1px;
    background: currentColor;
}

@media (max-width: 960px) {
    .nav-menu-toggle {
        display: flex;
        z-index: 1002;
    }

    .nav-mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        pointer-events: none;
    }

    .navbar.nav-open .nav-mobile-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-mobile-panel {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1001;
        height: 100vh;
        height: 100dvh;
        min-width: min(280px, 88vw);
        max-width: 100%;
        margin: 0;
        padding: 4.5rem 1.25rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background: var(--surface-2);
        border-left: 1px solid var(--border);
        box-shadow: -12px 0 48px rgba(0, 0, 0, 0.35);
        transform: translateX(100%);
        transition: transform 0.26s ease;
    }

    .navbar.nav-open .nav-mobile-panel {
        transform: translateX(0);
    }

    .nav-mobile-panel .nav-capsule-right {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .nav-mobile-panel .sign-in,
    .nav-mobile-panel .btn-get-started {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-mobile-backdrop,
    .nav-mobile-panel {
        transition: none;
    }
}

.sign-in {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 450;
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    display: inline-block;
    height: auto;
    line-height: 1.2;
    box-sizing: border-box;
}

.sign-in:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: transparent;
    opacity: 1;
}

.btn-get-started {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #eceef0;
    color: #08090a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    height: auto;
    line-height: 1.2;
    box-sizing: border-box;
}

.btn-get-started:hover {
    background-color: #f7f8f8;
    color: #08090a;
    border-color: rgba(255, 255, 255, 0.12);
}

/* Hero (Linear-like): centered copy, staged mockup */
.landing-hero {
    padding: 140px 0 0;
    position: relative;
    overflow: hidden;
}

.landing-hero-copy {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
}

.landing-hero-copy .landing-eyebrow {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.logos-inner.wrap {
    padding-top: 0;
    padding-bottom: 0;
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--muted);
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

.landing-eyebrow-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-soft);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(94, 106, 210, 0.45);
}

.landing-hero-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: clamp(2.5rem, 4.8vw, 3.85rem);
    line-height: 1.07;
    letter-spacing: -0.045em;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.landing-hero-sub {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.65;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.75rem;
}

.landing-cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-landing-outline--hero {
    border-color: var(--border-strong);
}

.btn-landing-primary,
.btn-landing-outline,
.btn-landing-cta,
.btn-landing-cta-o {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.btn-landing-primary {
    background: #eceef0;
    color: #08090a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 16px;
}

.btn-landing-primary:hover {
    background: #f7f8f8;
    color: #08090a;
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-landing-outline {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border-strong);
    font-weight: 450;
    padding: 10px 16px;
}

.btn-landing-outline:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

/* Pill CTAs must follow base button rules */
.btn-landing-primary.btn-landing-pill,
.btn-landing-outline.btn-landing-pill {
    border-radius: 999px;
    padding: 10px 20px;
}

.landing-hero-panel-wrap {
    margin-top: 3.5rem;
    padding: 0 4rem 5rem;
    background:
        radial-gradient(ellipse 90% 65% at 50% 42%, rgba(120, 130, 180, 0.09) 0%, transparent 55%),
        radial-gradient(ellipse 70% 45% at 50% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
}

.landing-hero-stage {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.landing-hero-panel {
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 32px 100px rgba(0, 0, 0, 0.55),
        0 12px 40px rgba(0, 0, 0, 0.35);
    min-height: 0;
    height: auto;
}

.landing-hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.landing-hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(8, 9, 10, 0.55) 0%, transparent 28%, transparent 72%, rgba(8, 9, 10, 0.25) 100%);
}

.landing-hero-panel-img {
    /*
     * Asset intrinsic ~1354×681; max display ~1.5× prior caps (2031 / 1230px height).
     */
    width: 100%;
    max-width: 2031px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
    object-fit: contain;
    object-position: top center;
    max-height: min(117vh, 1230px);
}

/* Hero: coded product mockup (real Discover page replica) */

/* Remove the photo gradient overlay; not needed for a coded UI */
.landing-hero-panel:has(.app-mock)::before { display: none; }

.app-mock {
    /* DESIGN_STYLE.md demo: dark surfaces align Tailwind demo-shell + DESIGN_SYSTEM §3 */
    /* Demo frame: intrinsic hero asset proportion 1354×681 */
    --m-body:       #212121;
    --m-sidebar:    #212121;
    --m-border:     #2a2a2a;
    --m-card:       #212121;
    --m-active:     #303030;
    --m-preview:    #2b2b2b;
    --m-prev-i:     #2e2e2e;
    --m-text:       #ffffff;
    --m-muted:      #c2c2c2;
    --m-nav-idle:   #c2c2c2;
    --m-snippet:    #e9e9eb;
    --m-dim:        #84848e;
    --m-accent:     #4512e6;
    --m-chart-praise: #5637f5;
    --m-chart-defect: #e53e3e;
    --m-chart-feat:   #b7791f;
    --m-green:      #16a34a;
    --m-red:        #ef4444;

    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
    max-width: min(1354px, 100%);
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 1354 / 681;
    height: auto;
    container-type: size;
    container-name: appmock;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    line-height: 1.4;
    color: var(--m-text);
    background: var(--m-body);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    user-select: none;
}

/* Never show scrollbars anywhere inside the demo shell */
.app-mock,
.app-mock * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.app-mock *::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
    background: transparent;
}

/* macOS chrome */
.app-mock-chrome {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.7em;
    height: 2.3em;
    padding: 0 1em;
    background: #0f0f0f;
    border-bottom: 1px solid var(--m-border);
}
.app-mock-dots { display: inline-flex; gap: 0.38em; }
.app-mock-dot { width: 0.55em; height: 0.55em; border-radius: 50%; }
.app-mock-dot--r { background: #ff5f57; }
.app-mock-dot--y { background: #febc2e; }
.app-mock-dot--g { background: #28c840; }
.app-mock-url { flex: 1; text-align: center; font-size: 0.8em; color: var(--m-dim); }

/* Scale chrome + shell with mock box (cqw/cqh), not viewport; fills 1354∶681 frame */
.app-mock-chrome,
.app-mock-body {
    font-size: clamp(10px, 2.65vw, 13px);
}
@supports (font-size: 1cqw) {
    .app-mock-chrome,
    .app-mock-body {
        font-size: clamp(10px, min(1.12cqw, 2.18cqh), 15.5px);
    }
}

/* Body fills remaining area below chrome inside fixed 1354∶681 frame */
.app-mock-body {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
}
.app-mock-stage {
    display: flex;
    flex: 1;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

/* ── Sidebar (components/demo/demo-shell.tsx) ── */
.app-mock-sidebar {
    flex-shrink: 0;
    width: min(11.5rem, 19%);
    min-width: 9rem;
    display: flex;
    flex-direction: column;
    padding: 0.35em 0.5em 0.15em;
    background: var(--m-sidebar);
    border-right: 1px solid var(--m-border);
    overflow: hidden;
}
.am-logo-row {
    display: flex;
    align-items: center;
    height: 2.25em;
    padding: 0;
}
.am-logo { height: 1.35em; width: auto; display: block; }
.am-hr {
    border: none;
    border-top: 1px solid var(--m-border);
    margin: 0.45em -0.5em 0.65em;
}
.am-nav-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.28em;
}
.am-new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0.42em 0.65em;
    margin-bottom: 0.35em;
    font-size: 0.88em;
    font-weight: 300;
    color: var(--m-text);
    background: #303030;
    border: none;
    border-radius: 0.5em;
    white-space: nowrap;
    cursor: pointer;
}
.am-nav {
    display: flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.35em 0.38em;
    font-size: 0.94em;
    font-weight: 300;
    color: var(--m-nav-idle);
    border-radius: 0.5em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.am-icon { flex-shrink: 0; width: 1.05em; height: 1.05em; }
.am-nav--sidebar-static {
    cursor: default;
    pointer-events: none;
}
.am-nav--active { background: var(--m-active); color: var(--m-text); font-weight: 300; }
.am-chats-hdr {
    display: flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.28em 0.45em 0.12em;
    font-size: 0.94em;
    color: #504f5e;
    font-weight: 300;
}
.app-mock .am-chats-hdr { color: var(--m-nav-idle); }
.am-chats-sub {
    padding-left: 1.5em;
    border-left: 1px solid var(--m-border);
    margin-left: 0.65em;
    margin-bottom: 0.12em;
    display: flex;
    flex-direction: column;
    gap: 0.08em;
}
.app-mock-sidebar .am-chats-sub + .am-nav {
    margin-top: 0.45em;
    padding-top: 0.5em;
    border-top: 1px solid var(--m-border);
}
.am-chat-link {
    display: block;
    font-size: 0.72em;
    font-weight: 300;
    color: var(--m-nav-idle);
    padding: 0.12em 0.35em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.am-sidebar-foot {
    border-top: 1px solid var(--m-border);
    margin-top: auto;
}

/* ── Main ── */
.app-mock-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--m-body);
    overflow: hidden;
}

/* Topbar (components/demo/demo-page-header.tsx) */
.am-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.35em;
    padding: 0.35em 0.85em;
    border-bottom: 1px solid var(--m-border);
    background: var(--m-body);
}
.am-bc { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15em; font-size: 0.87em; font-weight: 300; }
.am-bc-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.am-bc-page-title {
    font-size: 1.08em;
    font-weight: 500;
    color: var(--m-text);
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.am-topbar--discover-page .am-bc {
    font-size: 1em;
}
.am-topbar--discover-page .am-bc-crumb {
    display: none !important;
}
.am-topbar--discover-page .am-bc-page-title {
    display: block;
}
.am-bc-fixed,
.am-bc-leaf { color: var(--m-text); }
.am-bc-sep { color: var(--m-muted); margin: 0 0.2em; }
.am-topbar--discover-page {
    min-height: 3.55em;
    padding-top: 0.42em;
    padding-bottom: 0.42em;
}
.am-topbar-right { display: flex; align-items: center; gap: 0.45em; }
.am-dark-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85em;
    height: 1.85em;
    border-radius: 0.35em;
    color: var(--m-muted);
}
.am-user-av {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: rgba(196, 181, 253, 0.28);
    color: #ede9fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72em;
    font-weight: 700;
}

/* Content area: demo pages px-4 md:px-6 pt-4 pb-6 */
.app-mock-content {
    flex: 1;
    overflow: hidden;
    padding: 0.5em 0.75em 0.42em;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* "Discover" header row */
.am-section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.28em;
}
.am-section-label { font-size: 0.9em; font-weight: 500; color: var(--m-text); }
.am-section-hdr--discover-toolbar {
    justify-content: flex-end;
    margin-bottom: 0.35em;
}
.am-actions-row { display: flex; align-items: stretch; gap: 0.45em; flex-wrap: wrap; }

/* Search: dark square icon + field (reference toolbar) */
.am-search-wrap {
    display: inline-flex;
    align-items: stretch;
    border-radius: 0.4em;
    overflow: hidden;
    border: 1px solid var(--m-border);
    flex: 1;
    min-width: 0;
    max-width: min(22rem, 100%);
}
.am-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15em;
    min-width: 2.15em;
    flex-shrink: 0;
    background: #2a2a2a;
    color: #ffffff;
}
.am-search-input {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.65em;
    font-size: 0.72em;
    font-weight: 300;
    color: #81818b;
    background: #303030;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Primary actions: white surface, black label (product toolbar) */
.am-add-kw {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.38em 0.75em;
    font-size: 0.72em;
    font-weight: 500;
    color: #0a0a0a;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 0.45em;
    flex-shrink: 0;
}

/* Tabs */
.am-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--m-border);
    margin-bottom: 0.62em;
}
.am-tab {
    padding: 0.28em 0.05em;
    margin-right: 1.1em;
    font-size: 0.8em;
    color: var(--m-dim);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.am-tab--active { color: var(--m-text); border-bottom-color: #ffffff; }
.am-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    font-size: 0.8em;
    padding: 0.04em 0.38em;
    color: var(--m-muted);
    margin-left: 0.28em;
}

/* Page heading */
.am-page-h {
    margin: 0 0 0.1em;
    font-size: 1.28em;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--m-text);
    line-height: 1.2;
}
.am-page-sub {
    margin: 0 0 0.48em;
    font-size: 0.75em;
    font-weight: 300;
    color: var(--m-dim);
    line-height: 1.5;
}

/* Group headers */
.am-group-hdr {
    display: inline-flex;
    align-items: center;
    gap: 0.38em;
    font-size: 0.8em;
    font-weight: 500;
    color: var(--m-text);
    margin-bottom: 0.36em;
    padding-top: 0.5em;
}
.am-group-hdr-chev {
    flex-shrink: 0;
    width: 0.55em;
    height: 0.95em;
    margin-top: 0.04em;
    color: var(--m-muted);
}
.am-group-hdr--mt {
    margin-top: 0.72em;
    padding-top: 0.62em;
}

/* Discover watchlist Discover tab: horizontal rails (DESIGN_STYLE § app/demo/watchlist) */
.am-discover-group { margin-bottom: 0.06em; }
.am-discover-group--quiet-only {
    margin-bottom: 0;
}
.am-discover-group--quiet-only .am-group-hdr--mt {
    margin-top: 0.72em;
    padding-top: 0.62em;
    margin-bottom: 0;
}
.am-discover-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 0.02em;
    scrollbar-width: none;
    -ms-overflow-style: none;
    container-type: inline-size;
    container-name: discover-rail;
}
.am-discover-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.am-discover-rail {
    display: flex;
    flex-direction: row;
    gap: 0.45em;
    width: max-content;
    padding: 0.05em 0.1em 0.35em 0;
}
.am-dcard {
    --am-dcard-gap: 0.45em;
    /* ~3 cards plus peek of 4th → hints horizontal scroll */
    --am-dcard-peek: 3.22;
    flex: 0 0 calc((100cqi - 3 * var(--am-dcard-gap)) / var(--am-dcard-peek));
    width: calc((100cqi - 3 * var(--am-dcard-gap)) / var(--am-dcard-peek));
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
    background: var(--m-card);
    border: 1px solid var(--m-border);
    border-radius: 0.55em;
    padding: 0.48em 0.52em 0.44em;
    display: flex;
    flex-direction: column;
    gap: 0.26em;
    box-shadow: none;
}
.am-dcard:hover { border-color: rgba(255, 255, 255, 0.14); }
.am-dcard--clickable {
    cursor: pointer;
}
.am-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.18em;
    white-space: nowrap;
    font-size: inherit;
}
.am-trend--up { color: var(--m-green); }
.am-trend--up svg { flex-shrink: 0; }
.am-trend--down { color: var(--m-red); }
.am-trend--down svg { flex-shrink: 0; }
.am-trend--stable { color: #a3a3a3; font-weight: 400; }
.am-dcard .am-avs {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0.1em;
    padding: 0.06em 0.22em 0.06em 0.12em;
    border: 1px solid #2e2e2e;
    border-radius: 999px;
}
.am-dcard .am-av { margin-left: -0.32em; border-color: var(--m-card); }

/* Dashboard (DESIGN_STYLE dashboard/page metric strip) */
.am-dash-head { margin-bottom: 0.45em; }
.am-dash-title {
    margin: 0;
    font-size: 1.08em;
    font-weight: 500;
    color: var(--m-text);
    letter-spacing: -0.02em;
}
.am-dash-sub {
    display: block;
    margin-top: 0.1em;
    font-size: 0.72em;
    font-weight: 300;
    color: var(--m-dim);
}
.am-metric-card--flat {
    box-shadow: none;
    background: var(--m-body);
}
.am-bar-fill--defect { background: var(--m-chart-defect); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Insights: dashboard table (reference layout) */
.app-mock .am-view--insights {
    overflow-x: hidden;
    overflow-y: hidden;
}
.am-insights-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.42em 0.52em 0.48em;
    font-size: 1em;
}
.am-insights-title {
    margin: 0 0 0.18em;
    font-size: 1.12em;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--m-text);
    line-height: 1.22;
}
.am-insights-subtitle {
    margin: 0 0 0.5em;
    font-size: 0.64em;
    font-weight: 300;
    color: var(--m-dim);
    line-height: 1.35;
    max-width: none;
    white-space: nowrap;
}
.am-insights-clear-topic {
    align-self: flex-start;
    margin: 0 0 0.38em;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.68em;
    font-weight: 400;
    color: var(--m-accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}
.am-insights-clear-topic:hover { color: #6b4ef5; }
.am-insights-empty {
    margin: 0.55em 0 0;
    font-size: 0.72em;
    color: var(--m-dim);
    font-weight: 300;
    flex-shrink: 0;
}
.am-insights-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45em;
    flex-shrink: 0;
    margin-bottom: 0.42em;
}
.am-insights-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.35em;
}
.am-insights-toolbar-label {
    font-size: 0.74em;
    font-weight: 500;
    color: var(--m-text);
}
.am-insights-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35em;
    height: 1.35em;
    padding: 0 0.38em;
    border-radius: 999px;
    font-size: 0.62em;
    font-weight: 700;
    color: #fff;
    background: #6b4ef5;
    line-height: 1;
}
.am-insights-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.3em;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.am-search-wrap--insights {
    flex: 0 1 auto;
    max-width: min(11rem, 46vw);
}
.am-it-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28em;
    padding: 0.32em 0.45em;
    border-radius: 0.38em;
    border: 1px solid var(--m-border);
    background: var(--m-body);
    color: var(--m-muted);
    font-family: inherit;
    font-size: 0.68em;
    font-weight: 400;
    cursor: default;
}
.am-it-tool-btn svg { flex-shrink: 0; }
.am-it-view-toggle {
    width: 2em;
    height: 2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--m-border);
    border-radius: 0.35em;
    background: var(--m-body);
    color: var(--m-muted);
    padding: 0;
    cursor: default;
}
.am-it-view-toggle--active {
    border-color: #6b4ef5;
    color: #c4b5fd;
    background: rgba(107, 78, 245, 0.18);
}
.am-insights-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--m-border);
    border-radius: 0.5em;
    background: var(--m-body);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.am-insights-table-wrap::-webkit-scrollbar {
    display: none;
}
.am-insights-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.92em;
}
.am-it-th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    padding: 0.52em 0.42em;
    font-weight: 500;
    color: var(--m-muted);
    background: #252525;
    border-bottom: 1px solid var(--m-border);
    white-space: nowrap;
}
.am-it-td {
    padding: 0.48em 0.42em;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--m-text);
    font-weight: 300;
    line-height: 1.45;
}
.am-it-row { cursor: pointer; }
.am-it-row .am-it-kebab { cursor: pointer; }
.am-it-td--prio { white-space: nowrap; }
.am-it-prio {
    display: inline-flex;
    align-items: center;
    gap: 0.32em;
}
.am-it-prio-ico {
    display: block;
    flex-shrink: 0;
    width: 0.95em;
    height: 1.02em;
    object-fit: contain;
    object-position: center bottom;
}
.am-it-prio-num { font-weight: 600; font-size: 1em; color: var(--m-text); }
.am-it-th--prio { width: 9%; }
.am-it-th--insight { width: 26%; }
.am-it-th--cat { width: 14%; }
.am-it-th--sub { width: 14%; }
.am-it-th--type { width: 12%; }
.am-it-th--quote { width: 23%; }
.am-it-th--act {
    width: 2.25rem;
    min-width: 2.25rem;
}
.am-it-td--insight {
    font-weight: 400;
    word-wrap: break-word;
}
.am-it-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.32em;
}
.am-it-cat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    flex-shrink: 0;
}
.am-it-td--sub { color: var(--m-muted); font-weight: 300; }
.am-it-pill {
    display: inline-block;
    padding: 0.22em 0.42em;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.045em;
    white-space: nowrap;
}
.am-it-pill--praise { background: #16a34a; color: #fff; }
.am-it-pill--defect { background: #ea580c; color: #fff; }
.am-it-pill--featreq { background: #2563eb; color: #fff; }
.am-it-td--quote {
    color: var(--m-dim);
    font-size: 0.98em;
    word-wrap: break-word;
}
.am-it-td--act { text-align: right; width: 2rem; }
.am-it-kebab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18em;
    border: none;
    background: transparent;
    color: var(--m-muted);
    cursor: default;
    border-radius: 0.28em;
    line-height: 0;
}
.am-it-kebab:hover {
    color: var(--m-text);
    background: rgba(255, 255, 255, 0.06);
}

/* Insight detail modal (hero mock) */
.am-id-overlay:not([hidden]) {
    display: flex;
}
.am-id-overlay {
    position: absolute;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 0.65em;
    box-sizing: border-box;
}
.am-id-overlay[hidden] {
    display: none !important;
}
.am-id-backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}
.am-id-modal {
    position: relative;
    z-index: 1;
    width: min(58em, 98%);
    max-height: min(90cqh, 92%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.85em;
    box-shadow: 0 1.5em 4em rgba(0, 0, 0, 0.55);
    font-size: clamp(13px, 1.18cqw, 15.5px);
}
.am-id-close {
    position: absolute;
    top: 0.7em;
    right: 0.7em;
    width: 2.15em;
    height: 2.15em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.35em;
    padding: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}
.am-id-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}
.am-id-bc {
    margin: 0 0 0.55em;
    font-size: 0.76em;
    font-weight: 400;
    line-height: 1.4;
    color: #a3a3ad;
}
.am-id-bc-prefix,
.am-id-bc-sep {
    color: #a3a3ad;
}
.am-id-bc-sep {
    margin: 0 0.28em;
}
.am-id-bc-leaf {
    word-break: break-word;
    color: #9785ea;
    font-weight: 500;
}
.am-id-title {
    margin: 0 0 0.55em;
    font-size: 1.42em;
    font-weight: 700;
    letter-spacing: -0.028em;
    line-height: 1.2;
    color: #ffffff;
}
.am-id-gen-row {
    display: flex;
    align-items: center;
    gap: 0.45em;
    margin: 0;
    padding-bottom: 0.15em;
    font-size: 0.76em;
    font-weight: 400;
    color: #a0a0a0;
}
.am-id-gen-row svg {
    flex-shrink: 0;
    color: #8b7bd8;
}
.am-id-split {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(11.5rem, 1fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: 0;
    align-items: stretch;
}
.am-id-left {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #1e1e1e;
}
.am-id-head {
    flex-shrink: 0;
    padding: 1.05em 3.35rem 1.05em 1.25em;
    margin: 0;
    background: #1e1e1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.am-id-main {
    flex: 1;
    min-height: 0;
    padding: 1.25em 0 1.35em 1.25em;
    overflow-y: auto;
    scrollbar-width: thin;
}
.am-id-main::-webkit-scrollbar {
    width: 6px;
}
.am-id-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
.am-id-block {
    margin-bottom: 1.25em;
}
.am-id-block:last-child {
    margin-bottom: 0;
}
.am-id-block-h {
    margin: 0 0 0.48em;
    font-size: 0.9em;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}
.am-id-block-p {
    margin: 0;
    font-size: 0.84em;
    font-weight: 400;
    color: #a0a0a0;
    line-height: 1.65;
}
.am-id-block-p em {
    font-style: italic;
    color: #e4e4ea;
}
.am-id-aside {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    box-sizing: border-box;
    padding: 1.05em 1.35em 1.25em 1.2em;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    background: #242426;
    overflow-y: auto;
    scrollbar-width: thin;
}
@media (max-width: 52rem) {
    .am-id-split {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        row-gap: 0;
    }
    .am-id-left {
        grid-column: 1;
        grid-row: 1;
    }
    .am-id-main {
        padding: 1.25em 1.25em 1.35em;
    }
    .am-id-aside {
        grid-column: 1;
        grid-row: 2;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding: 1.25em 1.25em 1.35em;
        background: #242426;
    }
}
.am-id-aside-h {
    margin: 0;
    padding-bottom: 0.35em;
    margin-bottom: 0.3em;
    font-size: 0.9em;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}
.am-id-detail-list {
    display: flex;
    flex-direction: column;
}
.am-id-aside-h--file {
    margin-top: 1em;
    margin-bottom: 0.5em;
    padding-top: 0;
    padding-bottom: 0;
}
.am-id-detail-row {
    display: grid;
    grid-template-columns: 1em minmax(0, 1fr) minmax(0, max-content);
    column-gap: 0.55em;
    align-items: center;
    padding: 0.42em 0;
    margin-bottom: 0;
}
.am-id-detail-icon {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    margin-top: 0;
    object-fit: contain;
    display: block;
}
.am-id-detail-label {
    min-width: 0;
    font-size: 0.82em;
    font-weight: 400;
    color: #9b9aa3;
    line-height: 1.45;
}
.am-id-detail-val {
    justify-self: end;
    text-align: right;
    font-size: 0.82em;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.45;
    min-width: 0;
}
.am-id-detail-val.am-id-val-ft {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.42em;
    flex-wrap: nowrap;
}
.am-id-prio-val {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}
.am-id-detail-val.am-id-val-prio {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 100%;
}
.am-id-val-prio .am-it-prio-ico {
    flex-shrink: 0;
    display: block;
    width: 15px;
    height: 16px;
    min-width: 15px;
    min-height: 16px;
    object-fit: contain;
}
.am-id-prio-val > span:last-child {
    font-weight: 600;
}
.am-id-ft-val {
    display: inline-flex;
    align-items: center;
    gap: 0.32em;
}
.am-id-ft-ico {
    width: 0.9em;
    height: 0.9em;
    flex-shrink: 0;
}
.am-id-ft-ico--praise {
    color: #22c55e;
}
.am-id-ft-ico--defect {
    color: #f97316;
}
.am-id-ft-ico--feat {
    color: #60a5fa;
}
.am-id-ft-text {
    font-weight: 500;
    font-size: 1em;
    white-space: nowrap;
}
.am-id-ft-text--praise {
    color: #22c55e;
}
.am-id-ft-text--defect {
    color: #fb923c;
}
.am-id-ft-text--feat {
    color: #93c5fd;
}
.am-id-file-card {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.42em;
    width: 100%;
    max-width: 260px;
    height: 44px;
    padding: 0 10px;
    border-radius: 6px;
    background: #3b3b3b;
    border: none;
    opacity: 1;
}
.am-id-file-ico {
    flex-shrink: 0;
    width: 1.15em;
    height: 1.32em;
    color: #8b7bd8;
}
.am-id-detail-val .am-id-ft-ico {
    vertical-align: middle;
}
.am-id-file-name {
    flex: 1;
    min-width: 0;
    font-size: 0.84em;
    font-weight: 400;
    color: var(--m-text);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chat: transcript + composer share 787px column; horizontal inset matches scroll + inner padding */
.am-chat-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 0.5rem;
    background: var(--m-body);
}
@media (min-width: 48rem) {
    .am-chat-scroll {
        padding: 1.5rem 1rem 1rem;
    }
}
.am-chat-inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 787px;
    margin: 0 auto;
    padding: 0 0.5rem;
}
@media (min-width: 48rem) {
    .am-chat-inner {
        padding: 0 1.25rem;
    }
}
.am-chat-user-wrap {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}
.am-chat-user-col {
    width: fit-content;
    max-width: min(28rem, 100%);
    margin-left: auto;
}
.am-chat-user {
    background: #303030;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 300;
    color: #eaeaea;
    line-height: 1.5;
    text-align: left;
    opacity: 0.9;
    font-size: 0.875rem;
}
@media (min-width: 48rem) {
    .am-chat-user {
        font-size: 1rem;
    }
}
/* Assistant: prose shell (StreamingMarkdown / prose-sm parity) */
.am-chat-assist.markdown-content {
    width: 100%;
    padding-top: 1.15rem;
    padding-bottom: 0.35rem;
}
/* Chat markdown: rendered prose (headings, HRs, lists, tables, footer) */
.am-chat-assist {
    font-size: 0.875rem;
    font-weight: 300;
    color: #eaeaea;
    line-height: 1.55;
}
.am-md-doc {
    font-size: 1em;
}
.am-md-h1 {
    margin: 0 0 0.45em;
    font-size: 1.22em;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1.25;
}
.am-md-h2 {
    margin: 0.85em 0 0.4em;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.3;
}
.am-md-h3 {
    margin: 0.65em 0 0.28em;
    font-size: 0.95em;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}
.am-md-hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.85em 0;
}
.am-md-p {
    margin: 0 0 0.55em;
    font-weight: 300;
    color: #bdbdbd;
    line-height: 1.62;
}
.am-md-p strong {
    font-weight: 600;
    color: #eaeaea;
}
.am-md-meta-line {
    margin: 0 0 0.42em;
    font-size: 0.96em;
    font-weight: 300;
    color: #bdbdbd;
    line-height: 1.55;
}
.am-md-meta-line strong {
    font-weight: 600;
    color: #cbcacf;
}
.am-md-sev--critical {
    color: #dc2626;
    font-weight: 600;
}
.am-md-sev--high {
    color: #e68c12;
    font-weight: 600;
}
.am-md-sev--medium {
    color: #28c2f0;
    font-weight: 600;
}
.am-md-trend--up {
    color: #16a34a;
    font-weight: 600;
}
.am-md-trend--down {
    color: #16a34a;
    font-weight: 600;
}
.am-md-trend--stable {
    color: #a6a6a6;
    font-weight: 500;
}
.am-md-trend--warn {
    color: #e68c12;
    font-weight: 600;
}
.am-md-subhead {
    margin: 0.48em 0 0.22em;
    font-size: 0.88em;
    font-weight: 700;
    color: #eaeaea;
}
.am-md-ul {
    margin: 0 0 0.55em;
    padding-left: 1.15em;
    color: #bdbdbd;
    line-height: 1.58;
}
.am-md-ul li {
    margin: 0.28em 0;
}
.am-md-ul li em {
    font-style: italic;
    color: #cbcacf;
}
.am-md-ul--tight li {
    margin: 0.14em 0;
}
.am-md-routing {
    color: #a6a6a6;
    font-size: 0.96em;
}
.am-md-table-wrap {
    overflow-x: auto;
    margin: 0.35em 0 0.65em;
}
.am-md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
    text-align: left;
}
.am-md-table th,
.am-md-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.42em 0.52em;
    vertical-align: top;
}
.am-md-table th {
    font-weight: 600;
    color: #fafafa;
    background: rgba(49, 48, 66, 0.55);
}
.am-md-table td {
    color: #bdbdbd;
}
.am-md-table td:nth-child(2),
.am-md-table th:nth-child(2) {
    min-width: 6em;
}
.am-md-table tbody tr:hover td {
    background: rgba(117, 77, 245, 0.06);
}
.am-md-pill-prio {
    display: inline-block;
    min-width: 1.65em;
    padding: 0.08em 0.35em;
    border-radius: 0.28em;
    font-size: 0.82em;
    font-weight: 700;
    text-align: center;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.am-md-pill-prio--p0 {
    background: rgba(224, 27, 27, 0.18);
    color: #f87171;
}
.am-md-pill-prio--p1 {
    background: rgba(230, 140, 18, 0.18);
    color: #fbbf24;
}
.am-md-pill-prio--p2 {
    background: rgba(40, 194, 240, 0.12);
    color: #67e8f9;
}
.am-md-footer {
    margin: 0.6em 0 0;
    font-size: 0.88em;
    font-weight: 300;
    color: #848484;
    line-height: 1.55;
}
.am-md-footer em {
    font-style: italic;
    color: #7e7e7e;
}
.am-md-footer a {
    font-style: normal;
    font-weight: 500;
    color: #754df5;
    text-decoration: none;
}
.am-md-footer a:hover {
    text-decoration: underline;
    color: #9779ff;
}
/* Chat input: static shell matching ChatInput (dark) */
.am-chat-input-area {
    flex-shrink: 0;
    z-index: 10;
    padding: 0 0.5rem;
    background: transparent;
}
@media (min-width: 48rem) {
    .am-chat-input-area {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Chat view: more vertical space for transcript; composer sits on mock floor */
.app-mock-content:has(.am-view--chat:not([hidden])) {
    padding-bottom: 0.35rem;
}
.am-view--chat .am-chat-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: 0.35rem;
}
@media (min-width: 48rem) {
    .am-view--chat .am-chat-scroll {
        padding-bottom: 0.45rem;
    }
}
.am-view--chat .am-chat-input-area {
    margin-top: auto;
    background: var(--m-body);
}
.am-view--chat .am-chat-input-outer {
    padding: 0 0.5rem 0.5rem;
    margin-bottom: 0;
}
@media (min-width: 48rem) {
    .am-view--chat .am-chat-input-outer {
        padding: 0 1.25rem 0.55rem;
    }
}
.am-view--chat .am-chat-input-stack {
    border-radius: 0;
}
.am-view--chat .am-chat-ta {
    border-radius: 1rem 1rem 0 0;
}
.am-chat-input-outer {
    box-sizing: border-box;
    width: 100%;
    max-width: 787px;
    margin: 0 auto;
    padding: 0 0.5rem 1rem;
}
@media (min-width: 48rem) {
    .am-chat-input-outer {
        padding: 0 1.25rem 1rem;
    }
}
.am-chat-input-stack {
    position: relative;
    overflow: hidden;
}
.am-chat-ta {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin: 0;
    resize: none;
    padding: 0.55rem 0.75rem;
    padding-bottom: 2.5rem;
    min-height: 0;
    border-radius: 1rem 1rem 0.5rem 0.5rem;
    border: none;
    background: #303030;
    color: #ffffff;
    font-family: inherit;
    font-weight: 300;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    cursor: not-allowed;
}
@media (min-width: 48rem) {
    .am-chat-ta {
        padding: 0.65rem 0.875rem;
        padding-bottom: 2.625rem;
        font-size: 1rem;
    }
}
.am-chat-ta::placeholder {
    color: #9ca3af;
    font-weight: 300;
    font-size: 0.875rem;
}
@media (min-width: 48rem) {
    .am-chat-ta::placeholder {
        font-size: 1rem;
    }
}
.am-chat-ta:focus {
    outline: none;
}
.am-chat-input-actions {
    position: absolute;
    bottom: 0.45rem;
    left: 0.65rem;
    right: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 20;
}
@media (min-width: 48rem) {
    .am-chat-input-actions {
        bottom: 0.55rem;
        left: 0.875rem;
        right: 0.875rem;
        gap: 0.4rem;
    }
}
.am-chat-chip {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    height: 1.75rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.625rem;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    cursor: not-allowed;
    opacity: 0.6;
    border: 1px solid #383838;
    background: #303030;
    color: #ffffff;
}
@media (min-width: 48rem) {
    .am-chat-chip {
        height: 2rem;
        padding: 0 0.65rem;
        font-size: 0.75rem;
    }
}
.am-chat-chip--source .am-chat-book-ico {
    flex-shrink: 0;
    margin-right: 0.1rem;
    display: block;
}
.am-chat-globe-ico {
    flex-shrink: 0;
    margin-right: 0.12rem;
    color: currentColor;
}
.am-chat-send-slot {
    margin-left: auto;
}
.am-chat-send-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.375rem;
    border: none;
    border-radius: 0.5rem;
    background: #6a6a6a;
    color: #a0a0a0;
    cursor: not-allowed;
    line-height: 0;
}
@media (min-width: 48rem) {
    .am-chat-send-btn {
        width: 2rem;
        height: 2rem;
        padding: 0.5rem;
    }
}
.am-chat-send-btn img {
    display: block;
    width: 0.75rem;
    height: 0.75rem;
}

/* Projects (components/demo/demo-project-card.tsx status badges) */
.am-proj-pub { background: #b414b4; color: #fff; }
.am-proj-priv { background: #097bed; color: #fff; }
.am-proj-meta { font-size: 0.72em; color: var(--m-muted); }

/* Card grid */
.am-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.52em;
}
.am-card {
    background: var(--m-body);
    border: 1px solid var(--m-border);
    border-radius: 0.72em;
    padding: 0.62em 0.68em 0.58em;
    display: flex;
    flex-direction: column;
    gap: 0.28em;
    min-width: 0;
}
.am-card-top { display: flex; align-items: center; justify-content: space-between; overflow: visible; }
.am-type { display: inline-flex; align-items: center; gap: 0.28em; font-size: 0.71em; color: var(--m-dim); }
.am-watchlist-on,
.am-watchlist-add {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    display: block;
    color: var(--m-dim);
}
.am-card-title {
    font-size: 0.84em;
    font-weight: 500;
    color: var(--m-text);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.am-meta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.2em;
    font-size: 0.69em;
    color: var(--m-dim);
    overflow: hidden;
}
.am-insight-ct { color: var(--m-muted); white-space: nowrap; }
.am-dot { color: var(--m-border); }
.am-avs { display: inline-flex; align-items: center; flex-shrink: 0; margin-left: 0.1em; }
.am-av {
    width: 1.42em;
    height: 1.42em;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62em;
    font-weight: 600;
    border: 1.5px solid var(--m-card);
    color: #fff;
    margin-left: -0.36em;
}
.am-av:first-child { margin-left: 0; }
.am-c1 { background: #4512e6; }
.am-c2 { background: #0891b2; }
.am-c3 { background: #059669; }
.am-c4 { background: #d97706; }
.am-c5 { background: #dc2626; }

/* Insight previews */
.am-previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.26em;
    background: var(--m-preview);
    border-radius: 0.42em;
    padding: 0.26em;
    margin-top: 0.04em;
}
.am-preview-item {
    background: var(--m-prev-i);
    border-radius: 0.3em;
    padding: 0.3em 0.36em;
    font-size: 0.66em;
    font-weight: 300;
    color: var(--m-snippet);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Discover fills fixed-aspect mock: rails share vertical space; cards stretch */
.app-mock .am-view--discover {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}
.app-mock .am-view--discover > .am-section-hdr,
.app-mock .am-view--discover > .am-tabs {
    flex-shrink: 0;
}
.app-mock .am-view--discover > .am-discover-group:not(.am-discover-group--quiet-only) {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
.app-mock .am-view--discover > .am-discover-group--quiet-only {
    flex: 0 0 auto;
}
.app-mock .am-discover-group:not(.am-discover-group--quiet-only) .am-group-hdr {
    flex-shrink: 0;
}
.app-mock .am-discover-group:not(.am-discover-group--quiet-only) .am-discover-scroll {
    flex: 1 1 auto;
    min-height: 0;
}
.app-mock .am-discover-rail {
    height: 100%;
    align-items: stretch;
}
.app-mock .am-dcard {
    align-self: stretch;
    min-height: 0;
}
.app-mock .am-previews {
    flex: 1 1 auto;
    min-height: 0;
}
.app-mock .am-preview-item {
    -webkit-line-clamp: 10;
    line-clamp: 10;
}

/* View switching */
[data-nav] { cursor: pointer; }
.am-view { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.am-view[hidden] { display: none; }
.am-view--chat { overflow: hidden; overflow-y: hidden; }

/* Dashboard view */
.am-metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.52em;
    margin-bottom: 0.55em;
}
.am-metric-card {
    background: var(--m-body);
    border: 1px solid var(--m-border);
    border-radius: 0.72em;
    padding: 0.65em 0.7em;
    display: flex;
    flex-direction: column;
    gap: 0.22em;
}
.am-metric-label { font-size: 0.72em; color: var(--m-dim); font-weight: 300; }
.am-metric-value { font-size: 1.5em; font-weight: 500; color: var(--m-text); letter-spacing: -0.04em; line-height: 1.1; }
.am-metric-unit { font-size: 0.5em; color: var(--m-muted); font-weight: 300; }
.am-metric-trend { font-size: 0.72em; color: var(--m-green); display: inline-flex; align-items: center; gap: 0.2em; }
.am-metric-driver { font-size: 1em; }
.am-metric-sub { font-size: 0.72em; color: var(--m-dim); }
.am-metric-chips { display: flex; flex-wrap: wrap; gap: 0.22em; margin-top: 0.1em; }
.am-mchip { font-size: 0.65em; padding: 0.15em 0.38em; border-radius: 999px; font-weight: 400; }
.am-mchip--praise { background: rgba(34,197,94,0.15); color: #86efac; }
.am-mchip--defect { background: rgba(239,68,68,0.15); color: #fca5a5; }
.am-mchip--feat { background: rgba(245,158,11,0.15); color: #fcd34d; }
.am-chart-block { background: var(--m-body); border: 1px solid var(--m-border); border-radius: 0.72em; padding: 0.65em 0.7em; flex: 1; min-height: 0; }
.am-chart-title { font-size: 0.8em; font-weight: 500; color: var(--m-text); margin-bottom: 0.5em; }
.am-bars { display: flex; flex-direction: column; gap: 0.38em; }
.am-bar-row { display: flex; align-items: center; gap: 0.45em; }
.am-bar-label { font-size: 0.7em; color: var(--m-muted); min-width: 10em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-bar-track { flex: 1; height: 0.45em; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.am-bar-fill { height: 100%; background: #4512e6; border-radius: 999px; }
.am-bar-val { font-size: 0.68em; color: var(--m-dim); min-width: 1.5em; text-align: right; }

/* Insights view: legacy row list removed; grid styles above */
/* Chat layout: flex column (content above uses .am-chat-scroll) */
.am-view--chat {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Projects view */
.am-proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.52em; }
.am-proj-card {
    background: var(--m-body);
    border: 1px solid var(--m-border);
    border-radius: 0.72em;
    padding: 0.65em 0.7em;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    transition: border-color 0.15s ease;
}
.am-proj-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.am-proj-head { display: flex; align-items: center; justify-content: space-between; gap: 0.3em; }
.am-proj-name { font-size: 0.84em; font-weight: 500; color: var(--m-text); }
.am-proj-badge { font-size: 0.58em; font-weight: 600; padding: 0.2em 0.45em; border-radius: 999px; letter-spacing: 0.04em; color: #fff; }
.am-proj-desc { font-size: 0.72em; color: var(--m-dim); font-weight: 300; line-height: 1.45; margin: 0; flex: 1; }
.am-proj-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.15em; gap: 0.35em; }
.am-proj-date { font-size: 0.68em; color: var(--m-dim); }

@media (max-width: 600px) {
    .app-mock-sidebar { display: flex; }
}

/* Logos strip hidden per landing refresh */
.landing-logos {
    display: none;
}

.logos-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.logos-label {
    font-size: 12px;
    color: var(--footer-c);
}

/* Statement */
.landing-statement {
    padding: 140px 0;
}

.landing-statement-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: clamp(1.75rem, 2.8vw, 2.75rem);
    line-height: 1.28;
    letter-spacing: -0.035em;
    max-width: 820px;
    color: var(--text);
}

.landing-dim {
    color: var(--muted);
    font-weight: 400;
}

/* Action Tracker: tighter block, no hairlines, shorter frame (clips bottom of 1672×941 mock) */
#actions.landing-feature {
    padding: 56px 0 64px;
    border-top: none;
}
#actions .landing-feature-head {
    margin-bottom: 2rem;
}
#actions .landing-feat-desc {
    padding-top: 2rem;
}

/* Watchlist: shorter section from bottom */
#watchlist.landing-feature {
    padding: 100px 0 48px;
}

#watchlist .landing-feat-card--embed {
    aspect-ratio: 1672 / 780;
}

/* Features */
.landing-feature {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.landing-feature-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
    margin-bottom: 4rem;
}

.landing-feat-eye {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--footer-c);
    margin-bottom: 0.75rem;
}

.landing-feat-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: clamp(1.65rem, 2.5vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--text);
}

.landing-feat-desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.82;
    padding-top: 3.5rem;
}

.landing-feat-desc strong {
    color: #ffffff;
    font-weight: 400;
}

.landing-feat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    /* Same frame as Discover asset (1672×941) */
    aspect-ratio: 1672 / 941;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-feat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.landing-feat-card--embed {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    /* Match page canvas (--bg) so iframe sits on same black as the landing */
    background: var(--bg);
    border: none;
    aspect-ratio: 1672 / 941;
    border-radius: 28px;
}

/* Action Tracker only: shorter frame so the section doesn’t dominate the page */
#actions .landing-feat-card--embed {
    aspect-ratio: 1672 / 720;
    border-radius: 16px;
}

.landing-feat-iframe {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    border: 0;
    display: block;
    background: var(--bg);
}

/* CTA band */
.landing-cta-band {
    background: #f4f5f7;
    padding: 120px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.landing-cta-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 3rem;
    text-align: center;
}

.landing-cta-band-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    color: #08090a;
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 2rem;
}

.landing-cta-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-landing-cta {
    background: #08090a;
    color: #f7f8f8;
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-weight: 500;
    padding: 10px 18px;
}

.btn-landing-cta:hover {
    background: #1a1c22;
}

.btn-landing-cta-o {
    background: #fff;
    color: #3d434d;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 450;
    padding: 10px 18px;
}

.btn-landing-cta-o:hover {
    border-color: rgba(0, 0, 0, 0.2);
    color: #08090a;
    background: #fafbfc;
}

/* Footer */
.footer {
    background-color: var(--bg);
    border-top: 1px solid var(--border);
    padding: 72px 0 40px;
}

.footer-wrap {
    padding-left: 3rem;
    padding-right: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 60px;
}

.footer-brand-col {
    min-width: 0;
}

.footer-logo-mark-img {
    height: auto;
    width: 100%;
    max-width: 200px;
    margin-bottom: 1rem;
    display: block;
}

.footer-tag {
    font-size: 13px;
    color: var(--footer-c);
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 1.5rem;
}

.footer-contact-block {
    margin-bottom: 1rem;
}

.footer-contact-block .contact-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--footer-c);
    margin: 0 0 4px 0;
}

.footer-contact-block .contact-link {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    display: inline-block;
}

.footer-contact-block .contact-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--accent-soft) 0%, transparent 100%);
    opacity: 0.9;
}

.footer-social--brand {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.footer-social--brand .social-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.footer-social--brand .social-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--accent-soft) 0%, transparent 100%);
}

.footer-social--brand .social-link:hover {
    opacity: 0.85;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 1.2rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-col ul a {
    font-size: 13px;
    color: var(--footer-c);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: #ffffff;
}

.footer-bot {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 12px;
    color: var(--footer-c);
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    font-size: 12px;
    color: var(--accent-soft);
    text-decoration: none;
    font-weight: 450;
}

.footer-legal a:hover {
    color: var(--accent-l);
}

@keyframes landingFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-hero-anim .landing-hero-copy > * {
    animation: landingFadeUp 0.65s ease both;
}

.landing-hero-anim .landing-hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.landing-hero-anim .landing-hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.landing-hero-anim .landing-hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
.landing-hero-anim .landing-hero-copy > *:nth-child(4) { animation-delay: 0.28s; }

/* Mobile hero panel: fixed pixel mock, zoom-scaled like an iframe, clipped on right */
@media (max-width: 767px) {
    .landing-hero-panel-wrap {
        padding: 0 0 3rem 1.25rem;
        margin-top: 2rem;
        background: none;
    }

    .landing-hero-stage {
        max-width: none;
    }

    .landing-hero-panel {
        /* width collapses to the zoomed mock size; right edge clips off-screen */
        width: max-content;
        min-width: unset;
        border-radius: 10px 0 0 10px;
        border-right: none;
        overflow: hidden;
    }

    /* Lock design dimensions on the mock, then zoom the whole unit down (same idea as scaling an iframe). No internal reflow. */
    .app-mock {
        width: 1354px !important;
        max-width: none !important;
        height: 681px !important;
        aspect-ratio: unset !important;
        zoom: 0.62;
    }

    /* Feature embed mocks: fixed canvas + zoom like hero; clip overflow (no shrink-to-fit iframe) */
    .landing-feat-card.landing-feat-card--embed {
        aspect-ratio: unset;
        height: auto;
        max-height: min(52vh, 560px);
        min-height: 220px;
        width: 100%;
        border-radius: 16px 0 0 16px;
        margin-right: calc(-1 * max(0px, (100vw - 100%) / 2));
        overflow: hidden;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .landing-feat-card--embed .landing-feat-iframe {
        flex: none;
        width: 1672px !important;
        height: 941px !important;
        max-width: none !important;
        zoom: 0.62;
    }

    /*
     * Action Tracker + Watchlist on mobile: full 941px-tall mock (desktop shorter crops stay as-is).
     * Narrow widths make aspect-ratio-only frames tiny; match hero logic: clip box height = zoomed
     * artwork height so the full graphic is visible vertically.
     */
    #actions .landing-feat-card.landing-feat-card--embed,
    #watchlist .landing-feat-card.landing-feat-card--embed {
        aspect-ratio: unset;
        height: calc(941px * 0.62);
        max-height: none;
        min-height: unset;
    }

    #actions .landing-feat-card--embed .landing-feat-iframe {
        height: 941px !important;
    }

    @supports not (zoom: 1) {
        .landing-feat-card--embed .landing-feat-iframe {
            zoom: unset;
            transform: scale(0.62);
            transform-origin: top left;
            margin-bottom: -356px;
            margin-right: -632px;
        }
    }
}

/* Responsive */
@media (max-width: 960px) {
    .wrap,
    .nav-container,
    .logos-inner,
    .footer-wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .landing-feature-head {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-feat-desc {
        padding-top: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-brand-col {
        grid-column: 1 / -1;
    }

    .landing-hero {
        padding-top: 120px;
    }

    .landing-hero-title {
        font-size: clamp(2.25rem, 8vw, 3.25rem);
    }
}

@media (max-width: 600px) {
    .landing-hero-title {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .landing-cta-btns {
        flex-direction: column;
        align-items: center;
    }

}

@media (max-width: 480px) {
    .nav-container {
        padding: 14px 1rem;
    }

    .sign-in,
    .btn-get-started {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .logo-icon {
        height: 24px;
    }

    .landing-statement {
        padding: 80px 0;
    }

    .landing-feature {
        padding: 64px 0;
    }

    .landing-cta-band {
        padding: 80px 0;
    }
}
