:root {
    --blue: #0066CC;
    --blue-hover: #004499;
    --blue-light: #3385D6;
    --blue-bg: #EBF4FF;
    --gray-900: #1A1A1A;
    --gray-700: #404040;
    --gray-500: #6B6B6B;
    --gray-300: #D1D1D1;
    --gray-200: #E5E5E5;
    --gray-100: #F5F5F5;
    --white: #FFFFFF;
    --green: #047857;
    --green-bg: #ECFDF5;
    --green-border: #A7F3D0;
    --amber: #B45309;
    --amber-bg: #FFF7ED;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: 'SF Mono', Monaco, Consolas, monospace;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --section-y: clamp(4rem, 7vw, 7rem);
    --hero-top: clamp(7.5rem, 10vw, 9.5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--gray-900); text-wrap: balance; }
h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 24px; font-weight: 600; }

/* ── Header ── */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    min-height: 64px;
    display: flex;
    align-items: center;
    transition: border-color 0.3s;
}

header.scrolled { border-bottom-color: var(--gray-300); }

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 8px;
    width: 100%;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gray-900);
}

.logo-mark {
    width: 32px; height: 32px;
    background: var(--blue);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}

.logo-mark svg { width: 18px; height: 18px; }

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text span { color: var(--gray-500); font-weight: 400; }

nav { display: flex; align-items: center; gap: 32px; }

nav a {
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: var(--gray-900); }

::selection { background: var(--blue-bg); color: var(--gray-900); }

nav a[aria-current="page"] {
    color: var(--gray-900);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--blue);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    background: var(--blue);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease-in-out;
}

.nav-cta:hover { background: var(--blue-hover); }

/* Sign In: set the account actions off from the page-nav links (desktop only) */
@media (min-width: 901px) {
    .nav-signin { position: relative; }
    .nav-signin::before {
        content: '';
        position: absolute;
        left: -16px;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 18px;
        background: var(--gray-300);
    }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
}

.btn-secondary:hover {
    background: var(--blue);
    color: var(--white);
}

.btn:active { transform: translateY(0); }

/* ── Focus states (keyboard) ── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-cta:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── Skip link ── */
.skip-link {
    position: absolute;
    left: 12px;
    top: -56px;
    z-index: 200;
    background: var(--blue);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: top 0.2s ease-in-out;
}

.skip-link:focus { top: 12px; }

main:focus,
section[id]:focus { outline: none; }

/* ── Hero ── */
.hero {
    padding: var(--hero-top) 0 var(--section-y);
    background: var(--white);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue-bg);
    color: var(--blue);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
}

.hero h1 { margin-bottom: 20px; }

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 38ch;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Chat Mockup ── */
.chat-mockup {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

.chat-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
}

.chat-dot { width: 10px; height: 10px; border-radius: 50%; }
.chat-dot:nth-child(1) { background: #ff5f57; }
.chat-dot:nth-child(2) { background: #febc2e; }
.chat-dot:nth-child(3) { background: #28c840; }

.chat-title {
    margin-left: 8px;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.chat-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 88%;
}

.chat-msg.agent { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.chat-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.chat-msg.agent .chat-avatar { background: var(--blue); color: white; }
.chat-msg.user .chat-avatar {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.chat-sender {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.chat-bubble {
    max-width: 48ch;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-msg.agent .chat-bubble {
    background: var(--gray-100);
    color: var(--gray-900);
    border-radius: 12px 12px 12px 4px;
}

.chat-msg.user .chat-bubble {
    background: var(--blue);
    color: white;
    border-radius: 12px 12px 4px 12px;
}


/* ── Section common ── */
section { padding: var(--section-y) 0; }
section[id] { scroll-margin-top: 80px; }

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}


.section-header h2 { margin-bottom: 16px; }

.section-header p {
    max-width: 53ch;
    margin-left: auto;
    margin-right: auto;
    color: var(--gray-700);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ── How It Works ── */
.how-it-works { background: var(--gray-100); }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    background: var(--white);
    border-radius: 8px;
    padding: 32px 24px;
    border: 1px solid var(--gray-300);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.step-number {
    width: 40px; height: 40px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 20px;
}

.step h3 { font-size: 1.25rem; margin-bottom: 6px; }

.step .step-meta {
    font-size: 0.875rem;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 12px;
}

.step p { color: var(--gray-700); font-size: 0.95rem; }

.step-chat {
    background: var(--gray-100);
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.step-chat .agent-line { color: var(--blue); font-weight: 600; }
.step-chat .user-line { color: var(--gray-700); margin-top: 6px; }

/* ── Split feature sections (Agents / Concierge / Ship) ── */
.forge-section { background: var(--white); }

.team-section { background: var(--gray-100); }
.concierge-section { background: var(--gray-100); }

.forge-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
}

/* Flip: visual left, copy right on desktop; copy stays first on mobile */

.forge-section h2,
.team-section h2,
.concierge-section h2 { margin-bottom: 20px; }

.forge-desc {
    color: var(--gray-700);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.forge-feature-list {
    list-style: none;
    margin-bottom: 36px;
}

.forge-feature-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-300);
}

.forge-feature-list li:last-child { border-bottom: none; }

.forge-feature-icon {
    width: 36px; height: 36px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.forge-feature-icon svg { width: 18px; height: 18px; color: var(--blue); }

.forge-feature-list strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--gray-900);
}

.forge-feature-list span {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Forge demo mockup artifacts */
.forge-artifacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.forge-artifact {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.forge-artifact-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.forge-artifact-icon.task-icon { background: var(--amber-bg); }
.forge-artifact-icon.task-icon svg { color: var(--amber); width: 14px; height: 14px; }

.forge-artifact-text { flex: 1; }

.forge-artifact-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.forge-artifact-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 1px;
}

.forge-artifact-check {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--green);
}

/* ── Platform substrate ── */
.platform-section { background: var(--white); }

/* ── Agent badge ── */
.agent-badge {
    display: inline-flex;
    align-items: center;
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid rgba(0,102,204,0.25);
    border-radius: 100px;
    padding: 1px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Team roster mockup ── */
.roster { padding: 6px 0 0; }

.roster-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.roster-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.roster-avatar.is-agent { background: var(--blue); color: var(--white); border-color: var(--blue); }

.roster-info { flex: 1; min-width: 0; }

.roster-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.roster-role { font-size: 0.875rem; color: var(--gray-500); margin-top: 1px; }

.roster-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
}

.roster-status::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gray-300);
}

.roster-status.online { color: var(--green); }
.roster-status.online::before { background: var(--green); }
.roster-status.working { color: var(--blue); }
.roster-status.working::before { background: var(--blue); }

.roster-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 20px 18px;
    padding: 12px 14px;
    background: var(--gray-100);
    border: 1px dashed var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-700);
}

.roster-note svg { width: 16px; height: 16px; color: var(--blue); flex-shrink: 0; }

/* ── Keyboard keys / Command palette mockup ── */
.kbd {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--gray-700);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 7px;
    white-space: nowrap;
}
.forge-artifact-icon.live-icon { background: var(--green-bg); }
.forge-artifact-icon.live-icon svg { color: var(--green); width: 14px; height: 14px; }

/* ── Pricing ── */
.pricing { background: var(--white); }

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.plan {
    min-width: 0;
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

/* emphasis by weight, not by colour or a banner */
.plan-paid { border-color: var(--gray-900); }

.plan-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.plan-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.plan-figure {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--gray-900);
    font-variant-numeric: tabular-nums;
}

.plan-period { font-size: 0.95rem; font-weight: 500; color: var(--gray-500); }

.plan-for {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem;
    color: var(--gray-700);
}

.plan-list { list-style: none; display: grid; gap: 12px; }

.plan-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--gray-700);
}

.plan-list svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    color: var(--green);
}

.plan-list li span { min-width: 0; overflow-wrap: anywhere; }

.plan-list .is-not { color: var(--gray-500); }
.plan-list .is-not svg { color: var(--gray-500); }

.price-foot { margin-top: 40px; text-align: center; }

.price-foot .cta-note { max-width: 52ch; margin: 20px auto 0; }

@media (max-width: 640px) { .plan { padding: 24px; } }

/* Tier 2: the rest, compact */
.caps-compact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 32px;
}

@media (max-width: 1024px) { .caps-compact { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 640px)  { .caps-compact { grid-template-columns: 1fr; } }

.cap-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 0;
    border-top: 1px solid var(--gray-200);
}

.cap-item-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    background: var(--blue-bg);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}

.cap-item-icon svg { width: 17px; height: 17px; color: var(--blue); }

.cap-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }

.cap-item p {
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ── CTA ── */
.cta-section {
    padding: clamp(5.5rem, 10vw, 9rem) 0;
    background: var(--gray-100);
    text-align: center;
}

.cta-section h2 { margin-bottom: 16px; }

.cta-subtitle {
    color: var(--gray-700);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-note {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 20px;
}


/* ── Footer ── */
footer {
    background: var(--white);
    border-top: 1px solid var(--gray-300);
    padding: 64px 0 32px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.footer-brand p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 8px;
    max-width: 280px;
}

.footer-links { display: flex; gap: 48px; }

.footer-column h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.footer-column a {
    display: block;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-column a:hover { color: var(--blue); }

.footer-bottom {
    border-top: 1px solid var(--gray-300);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p { color: var(--gray-500); font-size: 0.875rem; }

.footer-bottom a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-bottom a:hover { color: var(--blue); }

/* ── Mobile ── */
.mobile-menu-toggle {
    order: 3;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--gray-900);
    cursor: pointer;
}

@media (max-width: 1024px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    .hero .container { grid-template-columns: 1fr; gap: 48px; }
    .hero-subtitle { max-width: 38ch; }
    .forge-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

@media (max-width: 900px) {
    header nav { display: none; }
    .mobile-menu-toggle { display: flex; }

    header.nav-open nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--white);
        border-bottom: 1px solid var(--gray-300);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        padding: 8px 24px 20px;
    }

    header.nav-open nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        font-size: 1rem;
        border-bottom: 1px solid var(--gray-200);
    }

    header.nav-open nav .nav-cta {
        justify-content: center;
        margin-top: 16px;
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .steps { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 24px; }
    .footer-links { flex-direction: column; gap: 20px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── Scroll animations ── */
.js .animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .js .animate-on-scroll { opacity: 1; transform: none; }
}

/* ── Seat diagram (#agents): the roster reads as a diagram, not a screenshot ── */
/* One shell for every device, so they read as one family.
   The Float shadow stays exclusive to the hero, per DESIGN.md. */
.seat-diagram,
.cmdk {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.seat-diagram { overflow: hidden; }

/* ── Command bar (#concierge): a real primitive, not an invented screenshot ── */
.cmdk {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
}

.cmdk .kbd { margin-top: 2px; }

.cmdk .kbd {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 0.875rem;
    color: var(--gray-700);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 3px 8px;
}

.cmdk-typed { color: var(--gray-900); font-size: 1.05rem; line-height: 1.4; }

.cmdk-caption {
    margin-top: 14px;
    max-width: 46ch;
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ── Platform clusters: an argument, not a nine-item inventory ── */
.cap-group + .cap-group { margin-top: clamp(2rem, 3vw, 2.75rem); }

.cap-group > h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

/* ── Conversion ending ── */

.cta-subtitle { max-width: 52ch; margin-left: auto; margin-right: auto; }

.cta-note { max-width: 52ch; margin-left: auto; margin-right: auto; }

.cta-trust {
    max-width: 52ch;
    margin: 0 auto 32px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gray-900);
}

/* ── Reflow: artifact rows stack once the panel is too narrow to hold a row.
   600px, not 480px: the mockup is already cramped well above the phone breakpoint. ── */
.forge-artifact-text { min-width: 0; }
.forge-artifact-title { overflow-wrap: anywhere; }

@media (max-width: 600px) {
    .forge-artifact { display: block; }
    .forge-artifact-icon { margin-bottom: 8px; }
    .forge-artifact-check { display: inline-block; margin-top: 8px; }
}


/* alternate which side the device sits on, so consecutive split sections differ */
@media (min-width: 1025px) {
    .forge-layout.flip > :first-child { order: 2; }
}

/* grid tracks default to a min-content floor; without this the seat diagram
   forces the page wider than the viewport at 200% zoom and at 320px */

.forge-layout > * { min-width: 0; }

.roster-row { flex-wrap: wrap; }

/* Long words in headings and inside the mockups were the real drivers of
   horizontal overflow at 200% text zoom. overflow-x:hidden was clipping
   them away instead of reflowing them. */
h1, h2, h3, h4 { overflow-wrap: break-word; }

.hero .container > *,
.container > * { min-width: 0; }

nav { flex-wrap: wrap; min-width: 0; }

.roster-info,
.roster-name,
.roster-role,
.chat-bubble,
.chat-msg > div,
.forge-feature-list li > div,
.cap-item > div { min-width: 0; overflow-wrap: break-word; }

/* the badge and the typed line are flex items with a min-content floor;
   without these two rules they push the page wider than a 320px viewport */
.roster-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.roster-info { min-width: 0; }

.cmdk { flex-wrap: wrap; }

.cmdk-typed { min-width: 0; overflow-wrap: anywhere; }

/* At 200% text zoom these inline-flex pills and buttons size to max-content and
   push past a 320px viewport. PRODUCT.md commits to 200% without horizontal scroll. */
.btn,
.nav-cta,
.hero-badge,
.agent-badge,
.roster-status,
.profile-flag {
    max-width: 100%;
}

.btn { flex-wrap: wrap; }

.roster-status { margin-left: auto; }

/* Measures capped from MEASURED characters per line, not from the ch unit.
   ch is the advance of "0"; the real ratio varies with font-size, so each
   value below was derived by measuring and adjusting, not by assumption. */
.forge-desc { max-width: 52ch; }

.forge-feature-list li > div:last-of-type { max-width: 46ch; }

/* Cap the description span only. A bare `span` selector also caught the nested
   .kbd and mono spans and promoted them to block boxes on their own line. */
.forge-feature-list li > div > span { display: block; max-width: 40ch; }

.forge-feature-list span span { display: inline; max-width: none; }

.roster-note { max-width: 36ch; }

.cap-item p { max-width: 46ch; }

.chat-sender { flex-wrap: wrap; }

.agent-badge, .roster-status { overflow-wrap: anywhere; }

/* below this width the avatar and status leave the name/role too little room;
   give the text the whole row instead of letting the diagram clip it */
@media (max-width: 600px) {
    .roster-info { flex: 1 1 100%; }
}


/* Environment profiles: real structure, not invented telemetry */
.profiles {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.profile { padding: 18px 20px; }

.profile + .profile { border-top: 1px solid var(--gray-200); }

.profile-name {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.profile p {
    max-width: 52ch;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.profile-flag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 100px;
    padding: 2px 10px;
}

.profile-flag.is-yes {
    color: var(--green);
    background: var(--green-bg);
    border-color: var(--green-border);
}

.profiles-caption {
    margin-top: 16px;
    max-width: 46ch;
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
}


/* ══ Use cases: segments ══ */

.page-hero { padding: var(--hero-top) 0 clamp(3rem, 5vw, 4.5rem); background: var(--white); }

.page-hero h1 { margin-bottom: 22px; max-width: 16ch; }

.page-hero p {
    max-width: 46ch;
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.segment-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    align-items: stretch;
    gap: 16px;
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

.segment-index a {
    display: block;
    padding: 22px 20px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    font-size: 1rem;
    font-weight: 400;
    transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.segment-index a:hover { border-color: var(--blue-light); transform: translateY(-2px); }

.segment-index strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.segment-index span {
    display: block;
    max-width: 30ch;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.segment-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: clamp(2rem, 3.5vw, 3rem);
}

.segment-copy { min-width: 0; max-width: 52ch; }

.segment-head h2 { margin-bottom: 16px; }

.segment-head p { font-size: 1.1rem; line-height: 1.7; color: var(--gray-700); }

.jobs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 32px;
    border-top: 1px solid var(--gray-300);
}

.jobs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.job { padding: 24px 0; border-bottom: 1px solid var(--gray-200); min-width: 0; }

.job h3 {
    min-height: 2lh;
    margin-bottom: 3px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    overflow-wrap: break-word;
}

.job p { max-width: 44ch; color: var(--gray-700); font-size: 0.95rem; line-height: 1.65; }

.job-surfaces {
    display: block;
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--gray-500);
    overflow-wrap: anywhere;
}

.job-surfaces a {
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
    box-shadow: inset 0 -1px 0 var(--gray-300);
}

.job-surfaces a:hover { color: var(--blue); box-shadow: inset 0 -1px 0 var(--blue); }

.job-sub { color: var(--gray-500); }

.mono { font-family: var(--mono); font-size: 0.9em; }

.segment-back {
    margin-top: clamp(1.5rem, 2.5vw, 2rem);
    font-size: 0.875rem;
}

.segment-back a {
    color: var(--gray-500);
    text-decoration: none;
    box-shadow: inset 0 -1px 0 var(--gray-300);
}

.segment-back a::before { content: '\2191\00a0'; }

.segment-back a:hover { color: var(--blue); box-shadow: inset 0 -1px 0 var(--blue); }

.segment-note {
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
    padding: 18px 22px;
    background: var(--blue-bg);
    border-radius: 8px;
    max-width: 50ch;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--gray-900);
}

@media (max-width: 1024px) {
    .jobs, .jobs-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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



/* ── Job artifacts: the work itself, not a claim about it ── */

.job-art {
    min-width: 0;
    max-width: min(100%, 25rem);
    padding: 18px 20px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.job-art > * + * { margin-top: 4px; }

.job-art-title {
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    color: var(--gray-500);
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.job-art-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 20px;
    color: var(--gray-700);
}

.job-art-row span,
.job-art-task span,
.job-art-cmd span { min-width: 0; overflow-wrap: anywhere; }

.job-art-row span:last-child {
    color: var(--gray-900);
    font-weight: 500;
    text-align: right;
}

.job-art-said { color: var(--gray-700); }

.job-art-task {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    color: var(--gray-900);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.job-art-box {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border: 1px solid var(--gray-500);
}

.job-art-rule {
    height: 1px;
    margin: 12px 0;
    background: var(--gray-200);
}

.job-art-cmd {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
}

.job-art-cmd .kbd { flex-shrink: 0; }

.job-art-mono {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--gray-700);
    overflow-wrap: anywhere;
}

.job-art-state {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
}

.job-art-state::before {
    content: '';
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray-300);
}

.job-art-state.is-live { color: var(--green); }
.job-art-state.is-live::before { background: var(--green); }

.job-art-by {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.job-art-by strong { color: var(--gray-700); font-weight: 600; }

@media (max-width: 1024px) {
    .segment-head { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .job-art { max-width: min(100%, 30rem); }
}
