@font-face {
    font-family: "Manrope";
    src: url("/fonts/Manrope-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

/* NinjaTrader Xen landing page */
.landing-body {
    background: radial-gradient(circle at 72% 8%, rgba(240, 68, 22, .09), transparent 28rem), #111;
}

.landing-header {
    position: relative;
    z-index: 10;
    max-width: 1240px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.landing-brand,
.preview-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.landing-brand .brand-mark,
.preview-brand .brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: #fff;
    background: var(--primary);
    font-size: 13px;
}

.landing-brand > span:last-child {
    font-size: 10px;
    letter-spacing: .07em;
}

.landing-nav {
    display: flex;
    gap: 28px;
}

.landing-nav a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.landing-nav a:hover {
    color: var(--text);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(520px, 1.14fr);
    gap: 64px;
    align-items: center;
    max-width: 1240px;
    min-height: 650px;
    margin: auto;
    padding: 76px 24px 96px;
}

.landing-hero h1 {
    max-width: 650px;
    font-size: clamp(3.35rem, 6vw, 5.8rem);
}

.landing-hero .lead {
    max-width: 590px;
    margin-bottom: 34px;
    font-size: 1.08rem;
}

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

.landing-primary-action {
    min-height: 44px;
    padding: 0 22px;
}

.landing-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 32px 0 0;
    padding: 0;
    color: var(--muted);
    font-size: 12px;
    list-style: none;
}

.landing-highlights li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 9px 1px 0;
    border-radius: 50%;
    background: var(--primary);
}

.product-preview {
    overflow: hidden;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    background: #0d0d0d;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .48);
}

.preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 16px;
    border-bottom: 1px solid #303030;
    background: #191919;
}

.preview-brand {
    font-size: 12px;
}

.preview-brand .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 10px;
}

.preview-brand small {
    color: var(--primary-bright);
    font-size: 8px;
    font-weight: 800;
}

.preview-credit {
    padding: 7px 10px;
    border: 1px solid #393939;
    border-radius: 4px;
    color: #c8c8c8;
    font-size: 10px;
}

.preview-layout {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    min-height: 410px;
}

.preview-tasks {
    padding: 20px 12px;
    border-right: 1px solid #303030;
    background: #151515;
}

.preview-label {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-bright);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .13em;
}

.preview-tasks > strong {
    display: block;
    margin-bottom: 18px;
    font-size: 11px;
}

.preview-task {
    margin: 0 -12px;
    padding: 13px 12px;
    border-top: 1px solid #292929;
    color: #999;
    font-size: 10px;
}

.preview-task.active {
    border-left: 3px solid var(--primary);
    color: #fff;
    background: rgba(240, 68, 22, .11);
}

.preview-workspace {
    padding: 24px;
}

.preview-workspace h2 {
    margin: 0 0 48px;
    font-size: 18px;
}

.preview-message {
    padding: 18px 0 24px;
    border-top: 1px solid #2d2d2d;
    border-bottom: 1px solid #2d2d2d;
    color: #ddd;
    font-size: 11px;
    line-height: 1.65;
}

.preview-message span {
    display: block;
    margin-bottom: 9px;
    color: #a7c7ef;
    font-size: 8px;
    font-weight: 800;
}

.preview-code {
    margin-top: 20px;
    padding: 17px;
    border: 1px solid #333;
    border-radius: 6px;
    color: #d4d4d4;
    background: #151515;
    font: 10px/1.8 "Cascadia Code", Consolas, monospace;
}

.preview-code span {
    color: #ff8d80;
}

.landing-section {
    max-width: 1240px;
    margin: auto;
    padding: 96px 24px;
    border-top: 1px solid var(--border);
}

.landing-video-section {
    padding-top: 88px;
    padding-bottom: 104px;
}

.landing-video-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 72px;
    align-items: end;
    margin-bottom: 42px;
}

.landing-video-heading h2 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.landing-video-intro {
    padding-bottom: 5px;
}

.landing-video-intro p {
    max-width: 520px;
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.75;
}

.landing-video-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    aspect-ratio: 16 / 9;
    border: 1px solid #454545;
    border-radius: 10px;
    background: #080808;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .46), 0 0 0 1px rgba(240, 68, 22, .08);
}

.landing-video-frame::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    pointer-events: none;
}

.landing-video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 42px;
}

.section-heading h2,
.model-section h2,
.landing-cta h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.section-heading > p:last-child,
.model-section > p,
.landing-cta > p {
    color: var(--muted);
    line-height: 1.7;
}

.landing-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.landing-card {
    min-height: 245px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #191919;
}

.landing-card:hover {
    border-color: #4b4b4b;
    background: #1d1d1d;
}

.card-number {
    color: var(--primary-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.landing-card h3,
.workflow-steps h3,
.faq-grid h3 {
    margin: 30px 0 10px;
    font-size: 17px;
}

.landing-card p,
.workflow-steps p,
.faq-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.workflow-section {
    display: grid;
    grid-template-columns: .75fr 1.25fr;
    gap: 80px;
}

.prompt-builder-feature {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 80px;
    align-items: start;
    border: 1px solid #503024;
    border-right: 0;
    border-left: 0;
    background: linear-gradient(90deg, rgba(240, 68, 22, .08), transparent);
}

.prompt-builder-feature h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.prompt-builder-feature-copy > p:last-child {
    margin-top: 20px;
    color: var(--muted);
    line-height: 1.7;
}

.prompt-builder-feature-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.prompt-builder-feature-steps li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 18px;
    padding: 21px 0;
    border-top: 1px solid var(--border);
}

.prompt-builder-feature-steps li > span {
    color: var(--primary-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.prompt-builder-feature-steps h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

.prompt-builder-feature-steps p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.workflow-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-steps li {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 18px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.workflow-steps li > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(240, 68, 22, .6);
    border-radius: 50%;
    color: var(--primary-bright);
    font-size: 11px;
    font-weight: 800;
}

.workflow-steps h3 {
    margin: 2px 0 7px;
}

.model-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding-top: 70px;
    padding-bottom: 70px;
    border: 1px solid #503024;
    border-right: 0;
    border-left: 0;
    background: linear-gradient(90deg, rgba(240, 68, 22, .08), transparent);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 48px;
}

.faq-grid article {
    padding: 8px 0 26px;
    border-top: 1px solid var(--border);
}

.faq-grid h3 {
    margin-top: 22px;
}

.landing-cta {
    max-width: 1192px;
    margin: 0 auto 96px;
    padding: 60px;
    border: 1px solid #4c3028;
    border-radius: 9px;
    text-align: center;
    background: radial-gradient(circle at 50% 120%, rgba(240, 68, 22, .2), transparent 60%), #181818;
}

.landing-cta p {
    margin: 18px auto 28px;
}

.landing-footer {
    padding: 0 24px;
    border-top: 1px solid #2e2e2e;
    background: #0e0e0f;
    color: #aaa9a7;
}

.landing-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 0 34px;
}

.landing-footer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.landing-footer-heading h2 {
    margin: 0;
    color: #f4f2ef;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.landing-footer-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--text);
    white-space: nowrap;
}

.landing-footer-brand strong {
    font-size: 18px;
    letter-spacing: .12em;
}

.landing-footer-brand span {
    color: var(--primary-bright);
    font-size: 12px;
    font-weight: 800;
}

.landing-footer-copy {
    max-width: 1160px;
}

.landing-footer-copy p {
    margin: 0;
    line-height: 1.72;
    font-size: 12px;
}

.landing-footer-copy p + p {
    margin-top: 17px;
}

.landing-footer-copy strong,
.landing-footer-trademark {
    color: #d8d5d1;
}

.landing-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid #292929;
    color: #d8d5d1;
    font-size: 12px;
}

.landing-footer-bottom p {
    margin: 0;
}

.landing-footer-links {
    display: flex;
    align-items: center;
    gap: 11px;
}

.landing-footer-links a {
    color: #f4f2ef;
    text-decoration: none;
}

.landing-footer-links a:hover,
.landing-footer-links a:focus-visible {
    color: var(--primary-bright);
    text-decoration: underline;
}

.landing-footer-links span {
    color: #5f5d5a;
}

@media (max-width: 1000px) {
    .landing-nav {
        display: none;
    }

    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .landing-header .nav-actions .button:first-child {
        display: none;
    }

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

    .landing-hero h1 {
        font-size: clamp(3rem, 15vw, 4.4rem);
    }

    .preview-layout {
        grid-template-columns: 1fr;
    }

    .preview-tasks {
        display: none;
    }

    .landing-card-grid,
    .landing-video-heading,
    .prompt-builder-feature,
    .workflow-section,
    .model-section,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .workflow-section,
    .landing-video-heading,
    .prompt-builder-feature,
    .model-section {
        gap: 28px;
    }

    .landing-video-section {
        padding-top: 64px;
        padding-bottom: 72px;
    }

    .landing-video-heading {
        margin-bottom: 30px;
    }

    .landing-cta {
        margin-right: 20px;
        margin-left: 20px;
        padding: 42px 24px;
    }

    .landing-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .landing-footer-inner {
        padding-top: 38px;
    }

    .landing-footer-heading,
    .landing-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .landing-footer-heading {
        gap: 18px;
    }

    .landing-footer-bottom {
        gap: 16px;
    }
}

/* Landing page refresh */
.landing-body {
    overflow-x: hidden;
    background: #090a0c;
    color: #f3f4f6;
}

.landing-header {
    position: relative;
    max-width: 1280px;
    padding: 22px 28px;
}

.landing-header::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 0;
    left: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #262a30 12%, #262a30 88%, transparent);
}

.landing-brand .brand-mark {
    border-radius: 8px;
    box-shadow: 0 0 24px rgba(240, 68, 22, .3);
}

.landing-nav {
    gap: 8px;
    padding: 5px;
    border: 1px solid #282c32;
    border-radius: 999px;
    background: rgba(20, 22, 26, .82);
}

.landing-nav a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #a5a8ae;
    font-size: 12px;
}

.landing-nav a:hover {
    color: #fff;
    background: #23262c;
}

.landing-header .button {
    border-radius: 999px;
}

.landing-hero {
    position: relative;
    display: block;
    max-width: 1280px;
    min-height: 0;
    padding: 90px 28px 76px;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: -240px;
    left: 50%;
    width: 900px;
    height: 580px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 68, 22, .15), rgba(240, 68, 22, .025) 48%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.landing-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto 62px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 26px;
    padding: 8px 13px;
    border: 1px solid #343942;
    border-radius: 999px;
    color: #c6c9cf;
    background: rgba(18, 20, 24, .88);
    font-size: 12px;
    font-weight: 700;
}

.hero-pill span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-bright);
    box-shadow: 0 0 12px rgba(255, 84, 37, .8);
}

.landing-hero h1 {
    max-width: 960px;
    margin: 0 auto;
    font-size: clamp(3.8rem, 7vw, 6.8rem);
    line-height: .98;
    letter-spacing: -.07em;
}

.landing-hero h1 em,
.signature-feature h2 em,
.pricing-feature h2 em {
    color: #ff6a42;
    font-style: normal;
}

.landing-hero .lead {
    max-width: 710px;
    margin: 28px auto 32px;
    color: #a7aab0;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.7;
}

.landing-hero-actions {
    justify-content: center;
}

.landing-primary-action {
    min-height: 50px;
    padding: 0 25px;
    border-radius: 9px;
    box-shadow: 0 12px 30px rgba(240, 68, 22, .2);
}

.landing-primary-action span {
    margin-left: 8px;
    font-size: 18px;
}

.hero-secondary-action {
    min-height: 50px;
    padding: 0 22px;
    border-color: #383c44;
    border-radius: 9px;
    background: rgba(18, 20, 24, .7);
}

.landing-highlights {
    justify-content: center;
    gap: 12px 30px;
    margin-top: 27px;
    color: #898d94;
}

.landing-highlights li::before {
    width: 5px;
    height: 5px;
    background: #65d6a0;
}

.product-preview {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    border-color: #343840;
    border-radius: 14px;
    text-align: left;
    background: #0d0f12;
    box-shadow: 0 45px 110px rgba(0, 0, 0, .62), 0 0 80px rgba(240, 68, 22, .07);
}

.preview-browser-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 52px;
    padding: 0 16px;
    border-bottom: 1px solid #292d33;
    background: #15171b;
}

.preview-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.preview-dot.red { background: #ff625a; }
.preview-dot.amber { background: #f2bd4c; }
.preview-dot.green { background: #35c759; }

.preview-address {
    margin-left: 10px;
    color: #777c85;
    font-size: 10px;
}

.preview-credit {
    margin-left: auto;
    border-color: #3a3f48;
    border-radius: 999px;
}

.preview-flow {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 22px 28px;
    border-bottom: 1px solid #292d33;
    background: #111318;
}

.preview-flow-step {
    display: grid;
    grid-template-columns: 26px auto;
    column-gap: 9px;
    align-items: center;
    color: #737780;
}

.preview-flow-step > span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #3b4049;
    border-radius: 50%;
    font-size: 8px;
}

.preview-flow-step strong { color: #b7bac0; font-size: 10px; }
.preview-flow-step small { font-size: 8px; }
.preview-flow-step.complete > span { color: #63d7a0; border-color: rgba(99, 215, 160, .45); background: rgba(99, 215, 160, .08); }
.preview-flow-step.active > span { color: #fff; border-color: var(--primary); background: var(--primary); }
.preview-flow-step.active strong { color: #fff; }
.preview-flow-step.active small { color: #ff8b6b; }
.preview-flow-line { height: 1px; background: #333740; }

.preview-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 440px;
}

.preview-tasks {
    padding: 25px 16px;
    border-color: #292d33;
    background: #111318;
}

.preview-tasks > strong {
    margin-bottom: 23px;
    color: #e5e7ea;
    font-size: 12px;
}

.preview-task {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 12px 8px;
    border: 0;
    border-radius: 6px;
}

.preview-task span {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 1px solid #3a3f48;
    border-radius: 50%;
    font-size: 8px;
}

.preview-task.complete { color: #8f9b96; }
.preview-task.complete span { color: #63d7a0; border-color: rgba(99, 215, 160, .4); }
.preview-task.active { border-left: 0; color: #fff; background: rgba(240, 68, 22, .12); }
.preview-task.active span { border-color: var(--primary); background: var(--primary); }

.preview-workspace { padding: 28px 32px; }
.preview-workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.preview-workspace h2 { margin: 0 0 27px; font-size: 20px; }
.preview-status { padding: 6px 10px; border: 1px solid rgba(240, 68, 22, .4); border-radius: 999px; color: #ff8a69; background: rgba(240, 68, 22, .08); font-size: 9px; }
.preview-message { padding: 14px 16px; border: 1px solid #30343b; border-radius: 7px; background: #13161a; }
.preview-code { min-height: 176px; margin-top: 14px; border-color: #30343b; border-radius: 8px; background: #0a0c0e; }
.preview-code .code-added { margin: 0 -8px; padding: 0 8px; color: #78d9aa; background: rgba(68, 190, 128, .08); }
.preview-verification { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(74, 187, 129, .3); border-radius: 7px; background: rgba(42, 153, 98, .08); }
.preview-verification > span { color: #62d49d; font-size: 16px; }
.preview-verification strong, .preview-verification small { display: block; }
.preview-verification strong { color: #dce9e2; font-size: 10px; }
.preview-verification small { margin-top: 3px; color: #789184; font-size: 8px; }

.landing-proof {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1224px;
    margin: 0 auto;
    padding: 0 28px 92px;
}

.landing-proof > div {
    padding: 21px 24px;
    border-top: 1px solid #30343a;
    border-bottom: 1px solid #30343a;
}

.landing-proof > div + div { border-left: 1px solid #30343a; }
.landing-proof strong, .landing-proof span { display: block; }
.landing-proof strong { margin-bottom: 7px; color: #e8eaed; font-size: 13px; }
.landing-proof span { color: #777b83; font-size: 10px; }

.landing-section {
    max-width: 1224px;
    padding: 112px 28px;
    border-color: #262a30;
}

.signature-feature {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(480px, 1.08fr);
    gap: 86px;
    align-items: center;
}

.signature-copy h2,
.pricing-feature h2 {
    margin: 0;
    font-size: clamp(2.7rem, 4.7vw, 4.7rem);
    line-height: 1.04;
    letter-spacing: -.06em;
}

.signature-copy > p:last-of-type,
.pricing-copy > p:last-of-type {
    margin: 24px 0 30px;
    color: #999da5;
    line-height: 1.75;
}

.signature-steps { margin: 0; padding: 0; list-style: none; }
.signature-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid #292d33; }
.signature-steps li > span { color: #ff7650; font-size: 10px; font-weight: 800; }
.signature-steps strong { font-size: 14px; }
.signature-steps p { margin: 7px 0 0; color: #83878f; font-size: 12px; line-height: 1.65; }

.planner-preview {
    padding: 20px;
    border: 1px solid #343941;
    border-radius: 14px;
    background: linear-gradient(145deg, #15181d, #0d0f12);
    box-shadow: 0 35px 80px rgba(0, 0, 0, .42);
}

.planner-preview-head { display: flex; justify-content: space-between; gap: 20px; padding: 4px 5px 18px; }
.planner-preview-head strong, .planner-preview-head .preview-label { display: block; }
.planner-preview-head > span { align-self: center; padding: 6px 9px; border: 1px solid #3b4048; border-radius: 999px; color: #8e9299; font-size: 9px; }
.planner-question { margin-bottom: 10px; padding: 20px; border: 1px solid rgba(240, 68, 22, .34); border-radius: 9px; background: rgba(240, 68, 22, .075); }
.planner-question small { display: block; margin-bottom: 8px; color: #ff7650; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.planner-question strong { font-size: 13px; line-height: 1.5; }
.planner-question p { margin: 13px 0 0; padding: 12px; border-radius: 6px; color: #b5b8be; background: rgba(0, 0, 0, .26); font-size: 11px; }
.planner-stage { display: grid; grid-template-columns: 30px 1fr auto; gap: 13px; align-items: center; margin-top: 8px; padding: 14px; border: 1px solid #2e333a; border-radius: 8px; background: #111419; }
.planner-stage > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #424750; border-radius: 50%; color: #8c9098; font-size: 9px; }
.planner-stage small, .planner-stage strong { display: block; }
.planner-stage small { margin-bottom: 3px; color: #686d75; font-size: 7px; letter-spacing: .1em; }
.planner-stage strong { font-size: 11px; }
.planner-stage em { color: #6f747c; font-size: 9px; font-style: normal; }
.planner-stage.complete > span { color: #63d7a0; border-color: rgba(99, 215, 160, .4); background: rgba(99, 215, 160, .08); }
.planner-stage.active { border-color: rgba(240, 68, 22, .45); }
.planner-stage.active > span { color: white; border-color: var(--primary); background: var(--primary); }
.planner-stage.active em { color: #ff7650; }

.centered-heading { max-width: 760px; margin-right: auto; margin-left: auto; text-align: center; }
.section-heading h2 { font-size: clamp(2.6rem, 4.8vw, 4.5rem); }
.section-heading > p:last-child { max-width: 650px; margin: 20px auto 0; }

.feature-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-card { min-height: 230px; padding: 27px; border: 1px solid #2d3239; border-radius: 11px; background: #111318; }
.feature-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr .85fr; gap: 60px; align-items: center; min-height: 330px; background: radial-gradient(circle at 85% 20%, rgba(240, 68, 22, .08), transparent 40%), #111318; }
.feature-card h3 { margin: 40px 0 12px; font-size: 20px; }
.feature-card p { margin: 0; color: #8c9098; font-size: 13px; line-height: 1.72; }
.feature-card-wide h3 { max-width: 570px; margin: 13px 0 15px; font-size: clamp(2rem, 3.3vw, 3.15rem); line-height: 1.12; letter-spacing: -.045em; }
.feature-kicker { color: #ff7650; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.feature-icon { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(240, 68, 22, .35); border-radius: 9px; color: #ff7954; background: rgba(240, 68, 22, .07); font: 600 15px/1 Consolas, monospace; }
.verification-list { padding: 8px; border: 1px solid #30353d; border-radius: 10px; background: #0b0d10; }
.verification-list > div { display: grid; grid-template-columns: 27px 1fr auto; gap: 10px; align-items: center; padding: 14px 12px; border-radius: 7px; }
.verification-list > div + div { margin-top: 5px; }
.verification-list span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 6px; font-size: 10px; }
.verification-list strong { font-size: 11px; }
.verification-list small { color: #757a83; font-size: 8px; }
.verification-list .passed { background: rgba(58, 168, 112, .07); }
.verification-list .passed span { color: #63d7a0; background: rgba(58, 168, 112, .14); }
.verification-list .partial { background: rgba(232, 166, 72, .06); }
.verification-list .partial span { color: #e8ab57; background: rgba(232, 166, 72, .13); }

.pricing-feature {
    display: grid;
    grid-template-columns: 1fr minmax(390px, .76fr);
    gap: 90px;
    align-items: center;
}

.pricing-points { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 28px; color: #b7bac0; font-size: 11px; }
.pricing-points span::first-letter { color: #62d49d; }
.credit-card-preview { position: relative; overflow: hidden; padding: 28px; border: 1px solid #3a3f47; border-radius: 14px; background: radial-gradient(circle at 90% 0, rgba(240, 68, 22, .18), transparent 44%), linear-gradient(145deg, #191c21, #0f1114); box-shadow: 0 35px 85px rgba(0, 0, 0, .42); }
.credit-card-preview::before { content: "X"; position: absolute; right: -20px; bottom: -70px; color: rgba(255, 255, 255, .025); font-size: 220px; font-weight: 800; }
.credit-card-top, .credit-card-bottom { position: relative; display: flex; justify-content: space-between; gap: 20px; }
.credit-card-top { color: #7e838c; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.live-indicator { display: flex; align-items: center; gap: 6px; color: #8fada0; letter-spacing: 0; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #58d394; box-shadow: 0 0 8px rgba(88, 211, 148, .7); }
.credit-balance { position: relative; display: block; margin: 28px 0 8px; font-size: 56px; letter-spacing: -.05em; }
.credit-card-preview > p { position: relative; max-width: 340px; margin: 0; color: #8e9299; font-size: 11px; line-height: 1.65; }
.credit-topups { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 27px 0; }
.credit-topups span { display: grid; place-items: center; min-height: 40px; border: 1px solid #383d45; border-radius: 7px; color: #9ea2aa; font-size: 11px; }
.credit-topups .selected { border-color: var(--primary); color: white; background: rgba(240, 68, 22, .14); }
.credit-card-bottom { padding-top: 18px; border-top: 1px solid #30343b; color: #737880; font-size: 9px; }
.credit-card-bottom strong { color: #d9dbdf; font-weight: 600; }

.landing-video-heading { align-items: center; }
.landing-video-intro .button { border-radius: 8px; }
.landing-video-frame { border-color: #343941; border-radius: 14px; }

.faq-grid article { border-color: #2b2f35; }
.landing-cta { max-width: 1168px; border-color: #473029; border-radius: 14px; background: radial-gradient(circle at 50% 130%, rgba(240, 68, 22, .22), transparent 58%), #121418; }
.landing-footer { background: #08090b; }

@media (max-width: 1000px) {
    .landing-hero { padding-top: 72px; }
    .signature-feature, .pricing-feature { grid-template-columns: 1fr; gap: 54px; }
    .signature-copy, .pricing-copy { max-width: 720px; }
    .landing-proof { grid-template-columns: repeat(2, 1fr); }
    .landing-proof > div:nth-child(3) { border-left: 0; }
    .preview-flow-step small { display: none; }
}

@media (max-width: 650px) {
    .landing-header { padding: 18px 20px; }
    .landing-header::after { right: 20px; left: 20px; }
    .landing-brand > span:last-child { display: none; }
    .landing-hero { padding: 58px 20px 55px; }
    .hero-glow { left: 0; width: 100%; transform: none; }
    .landing-hero-copy { margin-bottom: 42px; }
    .landing-hero h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
    .landing-hero .lead { margin-top: 22px; }
    .landing-hero-actions { flex-direction: column; }
    .landing-hero-actions .button { width: 100%; }
    .landing-highlights { gap: 9px 16px; }
    .product-preview { border-radius: 10px; }
    .preview-browser-bar { padding: 0 12px; }
    .preview-address { display: none; }
    .preview-flow { grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 15px 12px; }
    .preview-flow-line { display: none; }
    .preview-flow-step { display: flex; flex-direction: column; gap: 5px; text-align: center; }
    .preview-flow-step strong { font-size: 8px; }
    .preview-layout { min-height: 0; }
    .preview-workspace { padding: 20px 15px; }
    .preview-workspace h2 { font-size: 16px; }
    .preview-code { overflow: hidden; white-space: nowrap; font-size: 8px; }
    .landing-proof { grid-template-columns: 1fr 1fr; padding: 0 20px 64px; }
    .landing-proof > div { padding: 17px 12px; }
    .landing-proof > div:nth-child(odd) { border-left: 0; }
    .landing-section { padding: 78px 20px; }
    .signature-feature h2, .pricing-feature h2 { font-size: clamp(2.7rem, 13vw, 4rem); }
    .planner-preview { padding: 13px; }
    .planner-question { padding: 16px; }
    .planner-stage { grid-template-columns: 28px 1fr; }
    .planner-stage em { display: none; }
    .feature-bento, .feature-card-wide { grid-template-columns: 1fr; }
    .feature-card-wide { gap: 35px; }
    .feature-card { min-height: 210px; padding: 23px; }
    .verification-list > div { grid-template-columns: 25px 1fr; }
    .verification-list small { display: none; }
    .credit-card-preview { padding: 22px; }
    .credit-balance { font-size: 48px; }
    .landing-video-section { padding-top: 76px; padding-bottom: 80px; }
}

@font-face {
    font-family: "Manrope";
    src: url("/fonts/Manrope-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("/fonts/Manrope-SemiBold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #111111;
    --surface: #191919;
    --surface-soft: #202020;
    --surface-raised: #252525;
    --border: #323232;
    --border-strong: #414141;
    --text: #e8e8e8;
    --muted: #969696;
    --primary: #f04416;
    --primary-bright: #ff5425;
    --danger: #ff4c4c;
    --success: #64c66e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--background);
}

a {
    color: var(--primary-bright);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: auto;
    padding: 28px 24px;
}

.brand {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -.03em;
    text-decoration: none;
}

.brand span {
    color: var(--primary-bright);
}

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

.button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    border-color: var(--primary-bright);
}

.button.primary {
    border-color: transparent;
    background: var(--primary);
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 56px;
    align-items: center;
    max-width: 1180px;
    margin: 70px auto 0;
    padding: 24px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--primary-bright);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.3rem);
    line-height: .94;
    letter-spacing: -.065em;
}

.lead {
    max-width: 650px;
    margin: 28px 0;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
}

.feature-card,
.auth-card,
.account-card {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

.feature-card {
    padding: 30px;
}

.feature-card h2 {
    margin-top: 0;
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 15px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.feature-list li::before {
    content: "✓";
    margin-right: 12px;
    color: var(--success);
    font-weight: 900;
}

.auth-shell,
.account-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 100px);
    padding: 32px 20px 70px;
}

.auth-card,
.account-card {
    width: min(100%, 480px);
    padding: 34px;
}

.auth-card h1,
.account-card h1 {
    font-size: 2.25rem;
    line-height: 1.08;
    letter-spacing: -.045em;
}

.auth-card p,
.account-card p {
    color: var(--muted);
    line-height: 1.6;
}

.field {
    display: grid;
    gap: 8px;
    margin: 20px 0;
}

.field label {
    font-size: .9rem;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    outline: none;
    color: var(--text);
    background: #0d0d0d;
    font: inherit;
}

.field input:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .16);
}

.form-message {
    min-height: 24px;
    margin: 16px 0;
    color: var(--muted);
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.full-width {
    width: 100%;
}

.auth-legal-notice {
    margin: 16px 0 0 !important;
    font-size: 11px;
    line-height: 1.55 !important;
    text-align: left;
}

.auth-legal-notice a,
.auth-legal-links a {
    color: #d8d5d1;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #666;
    text-underline-offset: 3px;
}

.auth-legal-notice a:hover,
.auth-legal-notice a:focus-visible,
.auth-legal-links a:hover,
.auth-legal-links a:focus-visible {
    color: var(--primary-bright);
    text-decoration-color: currentColor;
}

.auth-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    color: #666;
    font-size: 11px;
}

.legal-shell {
    width: min(100% - 40px, 900px);
    margin: 32px auto 80px;
}

.legal-card {
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

.legal-card h1 {
    font-size: clamp(2.5rem, 7vw, 4.6rem);
}

.legal-card h2 {
    margin: 36px 0 12px;
    font-size: 1.15rem;
}

.legal-card p,
.legal-card li {
    color: var(--muted);
    line-height: 1.75;
}

.legal-card .legal-updated {
    margin: 16px 0 30px;
    color: #8f8f8f;
    font-size: 12px;
}

.legal-card strong {
    color: #d8d5d1;
}

.legal-card ul {
    padding-left: 22px;
}

.legal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    color: #666;
    font-size: 12px;
}

.legal-footer a {
    color: #c8c6c3;
}

.account-data {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #0a0d16;
}

.account-data div + div {
    margin-top: 10px;
}

.account-card-wide {
    width: min(100%, 760px);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0 30px;
}

.metric-card {
    display: grid;
    gap: 8px;
    min-height: 130px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.metric-card span,
.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    font-size: 1.65rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.account-workspace-link {
    margin-top: 28px;
}

.workspace-body {
    overflow: hidden;
}

.workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 9, 15, .9);
}

.workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-pill {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    font-size: .88rem;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.balance-pill.low {
    color: #ffd27a;
    border-color: rgba(232, 166, 45, .7);
    background: rgba(232, 166, 45, .12);
}

.balance-pill.empty {
    color: #ff8d80;
    border-color: rgba(244, 67, 54, .75);
    background: rgba(244, 67, 54, .13);
}

.workspace {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    height: calc(100vh - 76px);
}

.task-panel {
    overflow-y: auto;
    padding: 28px 20px;
    border-right: 1px solid var(--border);
    background: rgba(10, 13, 22, .86);
}

.task-panel h2 {
    margin-top: 0;
}

.task-buttons {
    display: grid;
    gap: 10px;
}

.task-button {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    background: var(--surface);
    text-align: left;
    cursor: pointer;
}

.task-button span {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.task-button:hover,
.task-button.active {
    border-color: var(--primary-bright);
}

.task-button.active {
    background: rgba(124, 58, 237, .14);
}

.chat-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-width: 0;
    min-height: 0;
    height: calc(100vh - 76px);
    overflow: hidden;
}

.chat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
}

.chat-toolbar h1 {
    font-size: 1.7rem;
}

.chat-toolbar .eyebrow {
    margin-bottom: 7px;
}

.model-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.model-field-label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.model-cost-badge {
    padding: 2px 5px;
    border: 1px solid rgba(62, 207, 142, .32);
    border-radius: 3px;
    color: #73d9aa;
    background: rgba(62, 207, 142, .08);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.1;
}

.model-field select {
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface);
}

.messages {
    overflow-y: auto;
    min-height: 0;
    padding: 30px clamp(20px, 5vw, 80px);
    scrollbar-color: var(--primary) #0a0d16;
    scrollbar-width: thin;
}

.trial-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    max-width: 920px;
    margin: 0 auto 22px;
    padding: 18px 20px;
    border: 1px solid rgba(37, 150, 90, .62);
    border-radius: 7px;
    background: rgba(23, 137, 77, .11);
}

.trial-welcome strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 14px;
}

.trial-welcome p {
    margin: 0;
    color: #b8c8bd;
    font-size: 12px;
    line-height: 1.6;
}

.trial-welcome.trial-unavailable {
    border-color: rgba(214, 157, 45, .62);
    background: rgba(181, 119, 24, .11);
}

.trial-welcome.trial-unavailable p {
    color: #d2c3a8;
}

.trial-welcome.mobile-workspace-notice {
    border-color: rgba(214, 157, 45, .62);
    background: rgba(181, 119, 24, .11);
}

.trial-welcome.mobile-workspace-notice p {
    color: #d2c3a8;
}

.trial-welcome-close {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    color: #9cb1a1;
    background: transparent;
    font: 20px/1 "Manrope", sans-serif;
    cursor: pointer;
}

.trial-welcome-close:hover {
    color: #fff;
}

.messages::-webkit-scrollbar,
.code-block pre::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.messages::-webkit-scrollbar-track,
.code-block pre::-webkit-scrollbar-track {
    background: #0a0d16;
}

.messages::-webkit-scrollbar-thumb,
.code-block pre::-webkit-scrollbar-thumb {
    border: 2px solid #0a0d16;
    border-radius: 999px;
    background: var(--primary);
}

.message {
    max-width: 920px;
    margin: 0 auto 24px;
}

.message-label {
    margin-bottom: 8px;
    color: var(--primary-bright);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.message.user .message-label {
    color: #60a5fa;
}

.message-content {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.message-content p {
    margin: 0 0 14px;
}

.task-switch-actions {
    display: flex;
    margin-top: 16px;
    white-space: normal;
}

.message-content h2,
.message-content h3 {
    margin: 24px 0 10px;
    letter-spacing: -.02em;
}

.message-content h2 {
    font-size: 1.2rem;
}

.message-content h3 {
    font-size: 1.02rem;
}

.message-content ul {
    margin: 8px 0 18px;
    padding-left: 24px;
}

.message-content li + li {
    margin-top: 7px;
}

.message-content .inline-code {
    padding: 2px 5px;
    border: 1px solid #353535;
    border-radius: 4px;
    color: #e8e8e8;
    background: #171717;
    font: .9em/1.4 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.working-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
}

.working-indicator strong {
    margin-left: 6px;
    color: var(--text);
}

.working-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-bright);
    animation: working-pulse 1.2s infinite ease-in-out;
}

.working-dot:nth-child(2) {
    animation-delay: .15s;
}

.working-dot:nth-child(3) {
    animation-delay: .3s;
}

@keyframes working-pulse {
    0%, 70%, 100% {
        opacity: .25;
        transform: translateY(0);
    }
    35% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.send-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.send-button.loading .send-spinner {
    display: inline-block;
}

.send-button.loading .send-label {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.code-block {
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #303850;
    border-radius: 14px;
    background: #080b12;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border-bottom: 1px solid #303850;
    color: var(--muted);
    background: #121725;
    font-size: .78rem;
    font-weight: 700;
}

.code-actions {
    display: flex;
    gap: 8px;
}

.response-code-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.code-action {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    background: #0a0d16;
    cursor: pointer;
}

.code-action:hover {
    border-color: var(--primary-bright);
}

.code-block pre {
    max-height: 620px;
    margin: 0;
    overflow: auto;
    padding: 20px;
    color: #d7def2;
    background: #080b12;
    font: .86rem/1.6 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    tab-size: 4;
}

.syntax-keyword {
    color: #c084fc;
}

.syntax-api {
    color: #67e8f9;
}

.syntax-string {
    color: #86efac;
}

.syntax-comment {
    color: #7f8aa8;
    font-style: italic;
}

.message.user .message-content {
    background: rgba(37, 99, 235, .1);
}

.message.error .message-content {
    border-color: var(--danger);
    color: var(--danger);
}

.rag-debug {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #3f3f3f;
    color: #9db7d5;
    font-size: 10px;
    line-height: 1.5;
}

.rag-debug-row + .rag-debug-row {
    margin-top: 3px;
}

.rag-debug-row.rejected {
    color: #b08d66;
}

.model-feedback-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    color: var(--muted);
    font-size: .78rem;
}

.message-content > .model-feedback-controls {
    justify-content: flex-end;
    margin-top: 12px;
    margin-right: 0;
}

.model-feedback-button {
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    filter: grayscale(1);
    opacity: .7;
}

.model-feedback-button:hover {
    border-color: var(--border);
    filter: none;
    opacity: 1;
}

.model-feedback-controls.saved {
    opacity: .75;
}

.composer {
    margin: 0 clamp(20px, 5vw, 80px) 26px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.composer textarea {
    width: 100%;
    max-height: 240px;
    resize: vertical;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    line-height: 1.5;
}

.source-import {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 2px 2px 11px;
    color: var(--muted);
    font-size: 12px;
}

.analyzer-attachments {
    display: flex;
    flex: 1 0 100%;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 3px;
}

.analyzer-attachments[hidden] {
    display: none;
}

.analyzer-attachment,
.submitted-analyzer-files span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(65, 167, 112, .42);
    border-radius: 6px;
    color: #cfeedd;
    background: rgba(34, 113, 72, .13);
    font-size: 11px;
}

.analyzer-attachment > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analyzer-attachment button {
    padding: 0;
    border: 0;
    color: #a9c8b6;
    background: transparent;
    font: 600 16px/1 Arial, sans-serif;
    cursor: pointer;
}

.analyzer-attachment button:hover {
    color: #fff;
}

.submitted-analyzer-files {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 12px;
}

html[data-theme="light"] .analyzer-attachment,
html[data-theme="light"] .submitted-analyzer-files span {
    border-color: rgba(29, 123, 75, .38);
    color: #175d38;
    background: rgba(29, 123, 75, .09);
}

html[data-theme="light"] .analyzer-attachment button {
    color: #397759;
}

.image-import {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 2px 2px 11px;
    color: var(--muted);
    font-size: 12px;
}

.image-import[hidden],
.image-import input[type="file"] {
    display: none;
}

.image-import .source-file-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.image-preview {
    position: relative;
    width: 58px;
    height: 42px;
}

.image-preview[hidden] {
    display: none;
}

.image-preview img {
    width: 100%;
    height: 100%;
    border: 1px solid #4a4a4a;
    border-radius: 5px;
    object-fit: cover;
}

.image-preview button {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #555;
    border-radius: 50%;
    color: #fff;
    background: #242424;
    cursor: pointer;
}

.submitted-image {
    margin: 0 0 14px;
}

.submitted-image img {
    display: block;
    max-width: min(420px, 100%);
    max-height: 280px;
    border: 1px solid #3f3f3f;
    border-radius: 7px;
    object-fit: contain;
}

.source-import[hidden],
.source-import input[type="file"] {
    display: none;
}

.source-file-button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 12px;
    border-color: #484848;
    background: #292929;
    color: #f0f0f0;
    font-size: 12px;
}

.source-file-button[hidden] {
    display: none;
}

.source-file-button:hover {
    border-color: var(--primary);
}

#sourceFileStatus {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analyzer-export-guide {
    flex: 0 0 auto;
    margin-left: auto;
    color: #a9b9c9;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.analyzer-export-guide:hover,
.analyzer-export-guide:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.analyzer-export-guide[hidden] {
    display: none;
}

html[data-theme="light"] .analyzer-export-guide {
    color: #49677e;
}

html[data-theme="light"] .analyzer-export-guide:hover,
html[data-theme="light"] .analyzer-export-guide:focus-visible {
    color: #173e5b;
}

@media (max-width: 620px) {
    .analyzer-export-guide {
        flex-basis: 100%;
        margin-left: 0;
    }
}

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
}

.chat-status {
    color: var(--muted);
    font-size: .82rem;
}

/* Compact NinjaTrader-inspired professional workspace */
.workspace-header {
    height: 46px;
    padding: 0 10px 0 14px;
    background: #171717;
}

.workspace-brand-area,
.workspace-brand,
.workspace-tabs {
    display: flex;
    align-items: center;
}

.workspace-brand-area {
    align-self: stretch;
    gap: 28px;
}

.workspace-brand {
    gap: 7px;
}

.brand-mark {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid var(--primary);
    color: #fff !important;
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.brand-product {
    color: var(--text) !important;
    font-weight: 800;
    letter-spacing: .09em;
}

.brand-platform {
    color: var(--primary-bright) !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.workspace-tabs {
    align-self: stretch;
}

.workspace-tab {
    display: flex;
    height: 100%;
    align-items: center;
    padding: 0 14px;
    border-bottom: 2px solid transparent;
    color: #888;
    font-size: 12px;
}

.workspace-tab.active {
    border-color: var(--primary);
    color: #fff;
}

.workspace-header-actions {
    gap: 8px;
}

.connection-state {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 11px;
}

.connection-state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(100, 198, 110, .5);
}

.balance-pill {
    padding: 6px 10px;
    border-radius: 2px;
    background: #111;
    font-size: 11px;
}

.workspace {
    grid-template-columns: 248px minmax(0, 1fr);
    height: calc(100vh - 46px);
}

.task-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #161616;
}

.panel-heading {
    padding: 15px 14px 13px;
    border-bottom: 1px solid var(--border);
}

.panel-heading .eyebrow {
    margin: 0;
}

.task-panel h2 {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.task-buttons {
    gap: 0;
}

.workspace-build-version {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .02em;
}

.task-button {
    gap: 4px;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid #292929;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: transparent;
}

.task-button span {
    font-size: 11px;
}

.task-button:hover,
.task-button.active {
    border-color: #292929;
    border-left-color: var(--primary);
}

.task-button.active {
    border-left-color: var(--primary);
    background:
        linear-gradient(90deg, rgba(240, 68, 22, .14), rgba(240, 68, 22, .03) 70%),
        #242424;
    box-shadow: inset 3px 0 0 var(--primary);
}

.task-button.active strong {
    color: #fff;
}

.task-button.active span {
    color: #c4c4c4;
}

.chat-panel {
    height: calc(100vh - 46px);
}

.chat-toolbar {
    min-height: 58px;
    padding: 10px 16px;
    background: #1a1a1a;
}

.chat-toolbar h1 {
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 0;
}

.chat-toolbar .eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
}

.model-field {
    font-size: 10px;
}

.model-field select {
    min-width: 190px;
    padding: 6px 8px;
    border-radius: 2px;
}

.messages {
    padding: 18px clamp(18px, 4vw, 56px);
}

.message {
    margin: 0 auto 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #292929;
}

.message-label {
    margin-bottom: 7px;
    font-size: 10px;
}

.message.user .message-label {
    color: #aeb8c4;
}

.message-content,
.message.user .message-content {
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #d4d4d4;
    background: transparent;
    font-size: 12.5px;
    line-height: 1.55;
}

.composer {
    margin: 0;
    padding: 10px 14px 12px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: #191919;
}

.composer textarea {
    min-height: 52px;
    max-height: 190px;
    padding: 8px 10px;
    border: 1px solid #363636;
    background: #111;
    font-size: 12px;
    line-height: 1.45;
}

.composer-footer {
    padding-top: 7px;
}

.chat-status {
    font-size: 10px;
}

.code-block {
    border-radius: 3px;
    background: #0d0d0d;
}

.code-toolbar {
    background: #1f1f1f;
    font-size: 10px;
}

.code-action {
    border-radius: 2px;
    background: #151515;
}

.code-block pre {
    color: #d0d0d0;
    background: #0d0d0d;
    font: 11.5px/1.55 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.syntax-keyword {
    color: #ff7b57;
}

.syntax-api {
    color: #68b7ff;
}

/* Readability correction: retain the dark orange theme without terminal-scale UI. */
.workspace-header {
    height: 58px;
    padding: 0 18px;
}

.workspace-brand-area {
    gap: 0;
}

.workspace-brand {
    gap: 9px;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 13px;
}

.brand-product {
    font-size: 15px;
}

.brand-platform {
    font-size: 11px;
}

.workspace-header-actions {
    gap: 12px;
}

.connection-state,
.balance-pill {
    font-size: 12px;
}

.balance-pill {
    padding: 8px 12px;
    border-color: rgba(37, 150, 90, .58);
    border-radius: 6px;
    color: #e8e8e8;
    background: #202020;
    font-weight: 400;
}

.workspace {
    grid-template-columns: 280px minmax(0, 1fr);
    height: calc(100vh - 58px);
}

.chat-panel {
    height: calc(100vh - 58px);
}

.panel-heading {
    padding: 20px 18px 17px;
}

.panel-heading .eyebrow {
    font-size: 11px;
}

.task-panel h2 {
    margin-top: 5px;
    font-size: 15px;
}

.task-button {
    gap: 6px;
    padding: 16px 18px;
}

.task-button strong {
    font-size: 14px;
    font-weight: 600;
}

.task-button span {
    font-size: 12.5px;
    line-height: 1.5;
}

.chat-toolbar {
    min-height: 74px;
    padding: 14px 22px;
}

.chat-toolbar h1 {
    font-size: 19px;
}

.chat-toolbar .eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
}

.model-field {
    gap: 7px;
    font-size: 11px;
}

.model-field select {
    min-width: 230px;
    padding: 9px 11px;
    border-radius: 7px;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
}

.messages {
    padding: 28px clamp(24px, 5vw, 76px);
}

.message {
    max-width: 1140px;
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.message-label {
    margin-bottom: 7px;
    font-size: 12px;
}

.message-content,
.message.user .message-content {
    font-size: 14px;
    line-height: 1.7;
}

.message.assistant .message-content {
    color: #e4e4e4;
}

.message.assistant .message-content h2,
.message.assistant .message-content h3 {
    color: #f1f1f1;
    font-weight: 700;
}

.message.user .message-content {
    width: fit-content;
    max-width: min(82%, 860px);
    margin-left: auto;
    padding: 14px 18px;
    border: 1px solid #454545;
    border-radius: 18px;
    color: #f4f4f4;
    background: #303030;
    white-space: pre-line;
    line-height: 1.62;
}

.message.user .message-label {
    text-align: right;
}

.message-content p {
    margin-bottom: 10px;
}

.message-content h2 {
    font-size: 18px;
}

.message-content h3 {
    font-size: 15px;
}

.composer {
    width: calc(100% - 44px);
    max-width: 1140px;
    margin: 0 auto 18px;
    padding: 12px;
    border: 1px solid #3c3c3c;
    border-radius: 10px;
    background: #202020;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .24);
}

.composer textarea {
    min-height: 72px;
    padding: 12px 13px;
    border-color: #454545;
    border-radius: 7px;
    background: #151515;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.composer textarea::placeholder {
    color: #898989;
}

.composer textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(240, 68, 22, .13);
}

.composer textarea:disabled {
    cursor: wait;
    color: #777;
    background: #121212;
    opacity: .72;
}

.composer:has(textarea:disabled) {
    border-color: #343434;
    box-shadow: none;
}

.composer-footer {
    padding: 10px 2px 0;
}

.composer-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.composer-context-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.clear-task-button {
    flex: 0 0 auto;
    border-color: #414141;
    color: #b8b8b8;
    background: transparent;
}

.clear-task-button:hover {
    border-color: #686868;
    color: #f1f1f1;
    background: #292929;
}

.clear-input-button[hidden] {
    display: none;
}

.chat-status {
    font-size: 12px;
}

.cancel-button {
    min-width: 82px;
    border-color: #555;
    color: #d8d8d8;
    background: #242424;
}

.cancel-button:not(:disabled):hover {
    border-color: #d84a2b;
    color: #fff;
    background: rgba(216, 74, 43, .16);
}

.cancel-button:disabled {
    opacity: .38;
}

.send-button {
    min-width: 82px;
}

.workspace-action {
    min-width: 68px;
}

.workspace-action:disabled {
    border-color: var(--border);
    opacity: .42;
    cursor: not-allowed;
}

.workspace-action:disabled:hover {
    border-color: var(--border);
}

.topup-button {
    border-color: #25965a;
    color: #fff;
    background: #17894d;
}

.topup-button:hover {
    border-color: #37b86f;
    background: #1c9f59;
}

.account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.account-actions .button {
    justify-content: center;
}

.payment-body {
    min-height: 100vh;
    background: #111;
}

.payment-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 76px);
    padding: 36px 20px 70px;
}

.payment-card {
    width: min(100%, 560px);
    padding: 34px;
    border: 1px solid #393939;
    border-radius: 10px;
    background: #1b1b1b;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .34);
}

.payment-card h1 {
    margin: 4px 0 12px;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.payment-intro,
.payment-note {
    color: #aaa;
    line-height: 1.65;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    margin: 26px 0 18px;
}

.amount-button {
    min-height: 50px;
    border: 1px solid #454545;
    border-radius: 7px;
    color: #eee;
    background: #151515;
    font: 700 15px "Manrope", sans-serif;
    cursor: pointer;
}

.amount-button:hover {
    border-color: #777;
}

.amount-button.selected {
    border-color: var(--primary);
    color: #fff;
    background: rgba(240, 68, 22, .16);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.topup-summary {
    margin-bottom: 0;
    color: #e7e7e7;
    font-weight: 700;
}

.payment-card .form-message:empty {
    display: none;
}

.payment-card .form-message:not(:empty) {
    min-height: 0;
    margin: 10px 0 0;
}

#checkoutButton {
    margin-top: 18px;
}

.payment-note {
    margin: 18px 0 0;
    font-size: 12px;
}

.payment-assurance {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #333;
    color: #aaa;
    font-size: 11px;
    line-height: 1.55;
}

.payment-terms {
    margin: 0;
}

.payment-assurance a {
    color: #55b9eb;
    font-weight: 700;
    text-decoration: none;
}

.payment-assurance a:hover {
    color: #8ed5f7;
    text-decoration: underline;
}

.stripe-assurance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 9px;
    color: #bdbdbd;
    font-size: 12px;
}

.stripe-assurance img {
    display: block;
    width: auto;
    height: 22px;
    object-fit: contain;
}

.payment-help {
    display: block;
    padding-top: 9px;
    border-top: 1px solid #303030;
    color: #999;
    text-align: center;
}

.payment-help strong {
    margin-right: 4px;
    color: #d7d7d7;
    font-size: 11px;
}

.payment-result {
    text-align: center;
}

.payment-success-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border-radius: 50%;
    color: #fff;
    background: #17894d;
    font-size: 25px;
    font-weight: 800;
}

.payment-balance {
    display: block;
    margin: 20px 0;
    color: #fff;
    font-size: 18px;
}

.payment-result-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.project-title {
    display: block;
    margin-top: 4px;
    max-width: min(720px, 62vw);
    overflow: hidden;
    color: #a8a8a8;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.projects-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
}

.projects-modal[hidden] {
    display: none;
}

.projects-dialog {
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid #454545;
    border-radius: 12px;
    background: #191919;
    box-shadow: 0 26px 90px rgba(0, 0, 0, .6);
}

.projects-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.projects-dialog-header .eyebrow {
    margin: 0 0 4px;
}

.projects-dialog-header h2 {
    margin: 0;
    font-size: 20px;
}

.dialog-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    background: #222;
    font: 22px/1 "Manrope", sans-serif;
    cursor: pointer;
}

.projects-message {
    padding: 18px 22px 0;
    color: var(--muted);
    font-size: 13px;
}

.projects-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 16px 22px 22px;
}

.projects-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
}

.projects-footer[hidden] {
    display: none;
}

.projects-footer button {
    padding: 7px 9px;
    border: 0;
    color: #ff7979;
    background: transparent;
    font: 11px "Manrope", sans-serif;
    text-decoration: underline;
    cursor: pointer;
}

.project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #202020;
}

.project-row + .project-row {
    margin-top: 10px;
}

.project-row.current {
    border-color: var(--primary);
}

.project-open {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border: 0;
    color: var(--text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.project-open strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-open span {
    color: var(--muted);
    font-size: 11px;
}

.project-actions {
    display: flex;
    gap: 7px;
    padding-right: 12px;
}

.project-actions button {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    background: #151515;
    font: 11px "Manrope", sans-serif;
    cursor: pointer;
}

.project-actions button.danger {
    color: #ff7979;
}

.project-actions button.open {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
}

.project-actions button.open:hover {
    border-color: var(--primary-bright);
    background: var(--primary-bright);
}

.modal-open {
    overflow: hidden;
}

.code-toolbar {
    padding: 12px 14px;
    font-size: 11px;
}

.code-action {
    padding: 7px 10px;
    border-radius: 5px;
    font-family: "Manrope", sans-serif;
    font-size: 11px;
}

.code-block {
    border-radius: 8px;
}

.code-block pre {
    font: 13px/1.65 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

@media (max-width: 800px) {
    .hero {
        grid-template-columns: 1fr;
        margin-top: 30px;
    }

    .site-header {
        padding: 20px;
    }

    .workspace-header {
        height: auto;
        min-height: 46px;
        flex-wrap: wrap;
    }

    .workspace-brand-area {
        gap: 10px;
    }

    .workspace-tabs,
    .connection-state {
        display: none;
    }

    .brand-platform,
    .balance-pill {
        display: none;
    }

    h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }

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

    .workspace-body {
        overflow: auto;
    }

    .workspace {
        grid-template-columns: 1fr;
        height: auto;
    }

    .task-panel {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .task-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-panel {
        min-height: 760px;
        height: auto;
        overflow: visible;
    }

    .chat-toolbar {
        align-items: flex-start;
        padding: 20px;
    }

    .messages {
        padding: 24px 20px;
    }

    .composer {
        width: calc(100% - 40px);
        margin: 0 20px 20px;
    }
}
/* Integrated prompt review and clarification */
.prompt-builder-dialog {
    width: min(720px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 32px));
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    background: #181818;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

#promptBuilderModal .prompt-builder-dialog {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    overflow: hidden;
}

.prompt-builder-reason {
    margin: 0;
    padding: 20px 24px 0;
    color: #c7c7c7;
    line-height: 1.55;
}

.prompt-builder-body {
    display: grid;
    gap: 14px;
    min-height: 0;
    padding: 20px 24px;
}

#promptBuilderModal .prompt-builder-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.prompt-builder-body.waiting {
    min-height: 150px;
    place-items: center;
}

.prompt-builder-body.waiting .prompt-builder-loading {
    justify-content: center;
}

.prompt-review-summary,
.prompt-builder-field {
    border: 1px solid #343434;
    border-radius: 8px;
    background: #202020;
}

.prompt-review-summary {
    padding: 18px;
}

.prompt-review-summary p {
    margin: 8px 0 0;
    color: #aaa;
    line-height: 1.5;
}

.prompt-builder-field {
    display: grid;
    gap: 7px;
    padding: 14px;
}

.prompt-builder-field > span {
    font-weight: 600;
    color: #f2f2f2;
}

.prompt-builder-field small {
    color: #aaa;
    line-height: 1.45;
}

.prompt-builder-field textarea,
.prompt-builder-review {
    width: 100%;
    resize: vertical;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 11px 12px;
    background: #111;
    color: #f4f4f4;
    font: inherit;
    line-height: 1.5;
}

.prompt-builder-field textarea:focus,
.prompt-builder-review:focus {
    border-color: #ff4b2b;
    outline: 1px solid #ff4b2b;
}

.prompt-builder-field.suggested {
    border-color: #3d6d59;
}

.prompt-builder-field.invalid {
    border-color: #e05252;
    box-shadow: 0 0 0 1px rgba(224, 82, 82, 0.22);
}

.prompt-builder-field.invalid textarea {
    border-color: #e05252;
}

.prompt-builder-field .prompt-builder-suggestion-note {
    color: #79c99e;
}

.prompt-builder-suggestion-link-row {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 2px;
}

.prompt-builder-suggestion-link {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: #8fc8ff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}

.prompt-builder-suggestion-link:hover,
.prompt-builder-suggestion-link:focus-visible {
    color: #b8dcff;
    text-decoration: underline;
}

.prompt-builder-suggestion-link:disabled {
    color: #666;
    cursor: default;
    text-decoration: none;
}

.prompt-builder-status {
    min-height: 20px;
    margin: 0;
    padding: 10px 24px 14px;
    color: #aaa;
    line-height: 1.45;
}

.prompt-builder-status:empty {
    min-height: 0;
    padding: 0;
}

.prompt-builder-loading {
    min-height: 24px;
}

.prompt-builder-loading .working-dot {
    width: 7px;
    height: 7px;
}

.prompt-builder-loading strong {
    font-weight: 500;
    color: #c7c7c7;
}

.composer-review-loading {
    min-height: 22px;
}

.composer-review-loading .working-dot {
    width: 7px;
    height: 7px;
}

.composer-review-loading strong {
    font-weight: 500;
    color: var(--muted);
}

.prompt-builder-status.error {
    color: #ff7a68;
}

.prompt-builder-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid #303030;
    background: #181818;
}

.active-build-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1140px;
    width: calc(100% - 44px);
    margin: 0 auto 10px;
    padding: 12px 14px;
    border: 1px solid #4a3a35;
    border-radius: 9px;
    background: linear-gradient(90deg, rgba(240, 68, 22, .09), #202020 48%);
}

.active-build-plan[hidden] {
    display: none;
}

.backtest-report-message .message-content {
    display: grid;
    gap: 14px;
}

.backtest-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 18px;
    border: 1px solid #454545;
    border-left: 3px solid var(--primary);
    border-radius: 9px;
    background: linear-gradient(110deg, rgba(240, 68, 22, .1), #202020 48%);
}

.backtest-report-header > div {
    display: grid;
    gap: 4px;
}

.backtest-report-header .eyebrow {
    margin: 0;
    font-size: 9px;
}

.backtest-report-header strong {
    color: #f4f4f4;
    font-size: 17px;
}

.backtest-report-header small {
    color: #aaa;
    font-size: 11px;
}

.backtest-report-pdf {
    flex: 0 0 auto;
    border-color: #555;
    background: #292929;
}

.backtest-report-sections {
    display: grid;
    gap: 12px;
}

.backtest-report-introduction {
    margin: 0;
    padding: 11px 14px;
    border-left: 3px solid var(--primary);
    border-radius: 0 7px 7px 0;
    color: #c8c8c8;
    background: rgba(240, 68, 22, .065);
    font-size: 12px;
    line-height: 1.55;
}

.backtest-report-section {
    padding: 17px 19px;
    border: 1px solid #393939;
    border-radius: 9px;
    background: #1c1c1c;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.backtest-report-section:first-child {
    border-color: #514039;
    background: linear-gradient(135deg, rgba(240, 68, 22, .065), #1c1c1c 45%);
}

.backtest-report-message .backtest-report-section h2,
.backtest-report-message .backtest-report-section h3 {
    margin: 0 0 11px;
    color: #ff7658;
    font-size: 15px;
    letter-spacing: .01em;
}

.backtest-report-section p {
    margin: 0 0 10px;
    color: #d7d7d7;
}

.backtest-report-section p:last-child,
.backtest-report-section ul:last-child {
    margin-bottom: 0;
}

.backtest-report-section ul {
    display: grid;
    gap: 7px;
    margin: 8px 0 0;
    padding-left: 21px;
}

.backtest-report-section li {
    padding-left: 2px;
    color: #d9d9d9;
}

@media (max-width: 640px) {
    .backtest-report-header {
        align-items: stretch;
        flex-direction: column;
    }

    .backtest-report-pdf {
        width: 100%;
    }

    .backtest-report-section {
        padding: 15px;
    }
}

.active-build-plan-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.active-build-plan-copy .eyebrow {
    margin: 0;
    font-size: 9px;
}

.active-build-plan-copy strong {
    overflow: hidden;
    color: #f1f1f1;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-build-plan-copy small {
    color: #aaa;
    font-size: 11px;
    line-height: 1.45;
}

.active-build-plan-controls {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}

.build-plan-exit {
    padding: 5px 2px;
    border: 0;
    color: #aaa;
    background: transparent;
    font: 500 11px/1.4 "Manrope", sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.build-plan-exit:hover,
.build-plan-exit:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prompt-builder-plan-dialog {
    width: min(940px, calc(100vw - 32px));
}

.prompt-builder-plan-dialog .prompt-builder-body {
    align-content: start;
    grid-auto-rows: max-content;
}

.build-plan-instruction,
.build-plan-assumptions,
.build-plan-step {
    margin: 0;
    border: 1px solid #383838;
    border-radius: 8px;
    background: #202020;
}

.build-plan-instruction {
    padding: 14px 16px;
    color: #ddd;
    line-height: 1.55;
}

.build-plan-assumptions {
    padding: 15px 18px;
}

.build-plan-assumptions h3,
.build-plan-step h3 {
    margin: 0;
    font-size: 13px;
}

.build-plan-assumptions ul {
    margin: 10px 0 0;
    padding-left: 20px;
    color: #bbb;
    line-height: 1.55;
}

.build-plan-step {
    overflow: hidden;
}

.build-plan-step.current {
    border-color: rgba(240, 68, 22, .65);
}

.build-plan-step-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid #383838;
}

.build-plan-step pre {
    max-height: 260px;
    overflow: auto;
    margin: 0;
    padding: 15px;
    color: #cfcfcf;
    background: #171717;
    font: 400 12px/1.6 "Manrope", sans-serif;
    white-space: pre-wrap;
}

@media (max-width: 560px) {
    .response-code-actions .code-action {
        flex: 1 1 calc(50% - 4px);
    }

    .prompt-builder-actions .button {
        flex: 1 1 100%;
    }

    .active-build-plan {
        align-items: stretch;
        flex-direction: column;
    }

    .active-build-plan-controls {
        flex-wrap: wrap;
        width: 100%;
    }

    .active-build-plan-controls .button {
        flex: 1;
    }

    .active-build-plan-controls .build-plan-exit {
        flex: 1 1 100%;
        text-align: right;
    }
}

/* Workspace feedback and problem reporting */
.workspace-support {
    margin-top: auto;
    padding: 16px 18px 14px;
    border-top: 1px solid var(--border);
}

.workspace-support .eyebrow {
    margin: 0 0 10px;
    font-size: 9px;
}

.workspace-support-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 0;
    border: 0;
    color: #c7c7c7;
    background: transparent;
    font: 400 12px/1.4 "Manrope", sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.workspace-support-link:hover {
    color: #fff;
}

.workspace-support-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #666;
    border-radius: 50%;
    color: var(--primary-bright);
    font-size: 10px;
    font-weight: 700;
}

.workspace-guide-icon {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 14px;
    height: 17px;
    margin: 0 2px;
    border: 1px solid #777;
    border-radius: 2px;
}

.workspace-guide-icon::before,
.workspace-guide-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    height: 1px;
    background: var(--primary-bright);
}

.workspace-guide-icon::before {
    top: 5px;
}

.workspace-guide-icon::after {
    top: 9px;
}

.workspace-video-icon {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 18px;
    height: 14px;
    border: 1px solid #777;
    border-radius: 4px;
}

.workspace-video-icon::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 7px;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 5px solid var(--primary-bright);
}

.workspace-theme-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
}

.workspace-build-version {
    margin-top: 0;
}

/* Workspace light theme. Code surfaces intentionally remain dark. */
html[data-theme="light"] {
    color-scheme: light;
    --background: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #f1f3f5;
    --surface-raised: #e9edf1;
    --border: #d9dde3;
    --border-strong: #c4cad2;
    --text: #20242a;
    --muted: #66717e;
}

html[data-theme="light"] body.workspace-body {
    color: var(--text);
    background: var(--background);
}

html[data-theme="light"] .workspace-header {
    background: #ffffff;
}

html[data-theme="light"] .task-panel {
    background: #f2f4f6;
}

html[data-theme="light"] .task-button {
    border-bottom-color: #dfe3e8;
}

html[data-theme="light"] .task-button:hover {
    border-color: #dfe3e8;
    border-left-color: var(--primary);
    background: #ffffff;
}

html[data-theme="light"] .task-button.active {
    border-color: #dfe3e8;
    border-left-color: var(--primary);
    color: var(--text);
    background:
        linear-gradient(90deg, rgba(240, 68, 22, .12), rgba(240, 68, 22, .025) 70%),
        #ffffff;
}

html[data-theme="light"] .task-button.active strong {
    color: #171a1f;
}

html[data-theme="light"] .task-button.active span {
    color: #59636f;
}

html[data-theme="light"] .workspace-support-link {
    color: #4e5966;
}

html[data-theme="light"] .workspace-support-link:hover {
    color: #15191e;
}

html[data-theme="light"] .workspace-support-icon {
    border-color: #aeb6c0;
}

html[data-theme="light"] .chat-panel,
html[data-theme="light"] .messages {
    background: #f7f8fa;
}

html[data-theme="light"] .messages {
    scrollbar-color: #aab2bc #eef1f4;
}

html[data-theme="light"] .messages::-webkit-scrollbar-track {
    background: #eef1f4;
}

html[data-theme="light"] .messages::-webkit-scrollbar-thumb {
    border-color: #eef1f4;
    background: #aab2bc;
}

html[data-theme="light"] .chat-toolbar {
    background: #ffffff;
}

html[data-theme="light"] .model-field select,
html[data-theme="light"] .balance-pill {
    color: var(--text);
    background: #ffffff;
}

html[data-theme="light"] .model-cost-badge {
    border-color: rgba(20, 122, 75, .52);
    color: #147a4b;
    background: #e9f7ef;
}

html[data-theme="light"] .message {
    border-bottom-color: #dfe3e8;
}

html[data-theme="light"] .message.assistant .message-content {
    color: #24282e;
}

html[data-theme="light"] .message.assistant .message-content h2,
html[data-theme="light"] .message.assistant .message-content h3 {
    color: #171a1f;
}

html[data-theme="light"] .message.user .message-label {
    color: #687786;
}

html[data-theme="light"] .model-feedback-button {
    min-width: 30px;
    min-height: 28px;
    border-color: #c4cbd3;
    color: #4c5661;
    background: #ffffff;
    filter: grayscale(1) contrast(1.65);
    opacity: 1;
}

html[data-theme="light"] .model-feedback-button:hover {
    filter: none;
    box-shadow: 0 2px 6px rgba(28, 36, 46, .12);
}

html[data-theme="light"] .model-feedback-button[data-vote="up"]:hover {
    border-color: #399364;
    background: #eaf7f0;
}

html[data-theme="light"] .model-feedback-button[data-vote="down"]:hover {
    border-color: #d06a4e;
    background: #fff1ed;
}

html[data-theme="light"] .message.user .message-content {
    border-color: #d1d6dc;
    color: #20242a;
    background: #e8ebef;
}

html[data-theme="light"] .response-code-actions .code-action {
    border-color: #b9c0c9;
    color: #303841;
    background: #ffffff;
}

html[data-theme="light"] .response-code-actions .code-action:hover:not(:disabled) {
    border-color: #7d8793;
    background: #f1f3f5;
}

html[data-theme="light"] .response-code-actions .code-action:disabled {
    border-color: #d4d8dd;
    color: #858d97;
    background: #eef0f2;
    cursor: not-allowed;
    opacity: 1;
}

html[data-theme="light"] .response-code-actions .addon-download-button:not(:disabled) {
    border-color: #087a4d;
    color: #ffffff;
    background: linear-gradient(135deg, #15945f, #087a4d);
    box-shadow: 0 3px 9px rgba(8, 122, 77, .22);
    font-weight: 700;
}

html[data-theme="light"] .response-code-actions .preflight-build-button:not(:disabled):not(.is-checking):not(.needs-build-check) {
    border-color: #086b45;
    color: #ffffff;
    background: linear-gradient(135deg, #117e52, #086b45);
    box-shadow: 0 3px 9px rgba(8, 107, 69, .22);
    font-weight: 700;
}

html[data-theme="light"] .response-code-actions .addon-download-button:hover:not(:disabled),
html[data-theme="light"] .response-code-actions .preflight-build-button:hover:not(:disabled) {
    border-color: #075d3c;
    color: #ffffff;
    background: linear-gradient(135deg, #087a4d, #075d3c);
    box-shadow: 0 4px 12px rgba(8, 107, 69, .3);
}

html[data-theme="light"] .response-code-actions .preflight-build-button.is-checking {
    border-color: #087a4d;
    color: #ffffff;
    background: linear-gradient(135deg, #16a56a, #087a4d);
    box-shadow: 0 0 0 3px rgba(22, 165, 106, .2),
        0 5px 16px rgba(8, 122, 77, .38);
    font-weight: 700;
}

html[data-theme="light"] .response-code-actions .verify-requirements-button {
    border-color: #d06a4e;
    color: #a32f13;
    background: #fff3ef;
}

html[data-theme="light"] .composer {
    border-color: #d3d8df;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(28, 36, 46, .1);
}

html[data-theme="light"] .send-button {
    border-color: #c92f0b;
    color: #ffffff;
    background: linear-gradient(135deg, #f04a20, #d9360f);
    box-shadow: 0 3px 9px rgba(217, 54, 15, .26);
    font-weight: 700;
}

html[data-theme="light"] .send-button:hover:not(:disabled) {
    border-color: #ae2709;
    background: linear-gradient(135deg, #e23d16, #bd2b0b);
    box-shadow: 0 4px 12px rgba(190, 43, 11, .34);
}

html[data-theme="light"] .preflight-result-summary.passed {
    border-color: #09834f;
    color: #ffffff;
    background: #10945b;
    box-shadow: 0 2px 7px rgba(9, 131, 79, .22);
}

html[data-theme="light"] .clear-task-button {
    border-color: #c5cbd2;
    color: #4e5660;
}

html[data-theme="light"] .clear-task-button:hover {
    border-color: #959da7;
    color: #20242a;
    background: #eef0f3;
}

html[data-theme="light"] .composer textarea {
    border-color: #cbd1d9;
    color: #20242a;
    background: #f9fafb;
}

html[data-theme="light"] .composer textarea::placeholder {
    color: #798491;
}

html[data-theme="light"] .composer textarea:disabled {
    color: #7b8490;
    background: #eef1f4;
}

html[data-theme="light"] .source-file-button {
    border-color: #b9c1ca;
    color: #303943;
    background: #ffffff;
}

html[data-theme="light"] .source-file-button:hover:not(:disabled) {
    border-color: #d84624;
    color: #a92e18;
    background: #fff4f1;
}

html[data-theme="light"] .cancel-button {
    border-color: #c4cad2;
    color: #424a54;
    background: #f2f4f6;
}

html[data-theme="light"] .active-build-plan {
    border-color: #e0c9c1;
    background: linear-gradient(90deg, rgba(240, 68, 22, .09), #ffffff 48%);
}

html[data-theme="light"] .backtest-report-header {
    border-color: #d6d0cc;
    border-left-color: var(--primary);
    background: linear-gradient(110deg, rgba(240, 68, 22, .08), #f5f5f5 48%);
}

html[data-theme="light"] .backtest-report-header strong {
    color: #202124;
}

html[data-theme="light"] .backtest-report-header small {
    color: #60646b;
}

html[data-theme="light"] .backtest-report-pdf {
    border-color: #bbb;
    color: #303238;
    background: #fff;
}

html[data-theme="light"] .backtest-report-section,
html[data-theme="light"] .backtest-report-section:first-child {
    border-color: #d7d9dc;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 28, 34, .05);
}

html[data-theme="light"] .backtest-report-introduction {
    color: #4e5551;
    background: rgba(240, 68, 22, .055);
}

html[data-theme="light"] .backtest-report-message .backtest-report-section h2,
html[data-theme="light"] .backtest-report-message .backtest-report-section h3 {
    color: #b52e0c;
}

html[data-theme="light"] .backtest-report-section p,
html[data-theme="light"] .backtest-report-section li {
    color: #303238;
}

html[data-theme="light"] .active-build-plan-copy strong {
    color: #252a30;
}

html[data-theme="light"] .active-build-plan-copy small,
html[data-theme="light"] .project-title {
    color: #697481;
}

html[data-theme="light"] .active-build-plan-controls .button.primary,
html[data-theme="light"] .prompt-builder-actions .button.primary {
    color: #ffffff;
}

html[data-theme="light"] .build-plan-exit {
    color: #59636f;
    text-decoration: underline;
    text-decoration-color: #aeb6bf;
    text-underline-offset: 3px;
}

html[data-theme="light"] .build-plan-exit:hover,
html[data-theme="light"] .build-plan-exit:focus-visible {
    color: #a92e18;
    text-decoration-color: currentColor;
}

html[data-theme="light"] .projects-modal {
    background: rgba(30, 35, 42, .46);
}

html[data-theme="light"] .projects-dialog,
html[data-theme="light"] .prompt-builder-dialog,
html[data-theme="light"] .feedback-dialog {
    border-color: #cbd1d8;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(28, 36, 46, .22);
}

html[data-theme="light"] .dialog-close,
html[data-theme="light"] .project-row,
html[data-theme="light"] .prompt-review-summary,
html[data-theme="light"] .prompt-builder-field,
html[data-theme="light"] .build-plan-instruction,
html[data-theme="light"] .build-plan-assumptions,
html[data-theme="light"] .build-plan-step {
    color: var(--text);
    background: #f5f7f9;
}

html[data-theme="light"] .project-actions button {
    color: var(--text);
    background: #ffffff;
}

html[data-theme="light"] .prompt-builder-reason,
html[data-theme="light"] .prompt-builder-loading strong {
    color: #4f5965;
}

html[data-theme="light"] .prompt-builder-suggestion-link {
    color: #1768b0;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(23, 104, 176, .42);
    text-underline-offset: 3px;
}

html[data-theme="light"] .prompt-builder-suggestion-link:hover,
html[data-theme="light"] .prompt-builder-suggestion-link:focus-visible {
    color: #0d4f89;
    text-decoration-color: currentColor;
}

html[data-theme="light"] .prompt-review-summary p,
html[data-theme="light"] .prompt-builder-field small,
html[data-theme="light"] .prompt-builder-status {
    color: #66717e;
}

html[data-theme="light"] .prompt-builder-field > span {
    color: #252a30;
}

html[data-theme="light"] .prompt-builder-field textarea,
html[data-theme="light"] .prompt-builder-review {
    border-color: #c7cdd5;
    color: #20242a;
    background: #ffffff;
}

html[data-theme="light"] .prompt-builder-field.invalid,
html[data-theme="light"] .prompt-builder-field.invalid textarea {
    border-color: #c83d3d;
}

html[data-theme="light"] .build-plan-assumptions ul {
    color: #4f5965;
}

html[data-theme="light"] .build-plan-step pre {
    color-scheme: dark;
    color: #ffffff;
    background: #111111;
}

html[data-theme="light"] .prompt-builder-actions {
    border-top-color: #d9dde3;
    background: #ffffff;
}

html[data-theme="light"] .feedback-dialog .feedback-form > p:first-child {
    color: #56616d;
}

html[data-theme="light"] .feedback-dialog .feedback-field > span {
    color: #303943;
}

html[data-theme="light"] .feedback-dialog .feedback-field select,
html[data-theme="light"] .feedback-dialog .feedback-field textarea {
    color-scheme: light;
    border-color: #bfc7d0;
    color: #202830;
    background: #ffffff;
}

html[data-theme="light"] .feedback-dialog .feedback-field textarea::placeholder {
    color: #7b8590;
}

html[data-theme="light"] .feedback-dialog .feedback-diagnostics,
html[data-theme="light"] .feedback-dialog .feedback-status {
    color: #5f6975;
}

html[data-theme="light"] .feedback-dialog .feedback-actions .button.primary {
    color: #ffffff;
}

html[data-theme="light"] .code-block,
html[data-theme="light"] .code-block pre,
html[data-theme="light"] .code-toolbar,
html[data-theme="light"] .code-action,
html[data-theme="light"] .code-workspace-dialog {
    color-scheme: dark;
}

html[data-theme="light"] .code-block {
    border-color: #3a414b;
    background: #20242a;
}

html[data-theme="light"] .code-toolbar {
    border-bottom-color: #3a414b;
    color: #aeb7c1;
    background: #292e35;
}

html[data-theme="light"] .code-block pre {
    color: #e2e6eb;
    background: #20242a;
    scrollbar-color: #6f7985 #20242a;
}

html[data-theme="light"] .code-block pre::-webkit-scrollbar-track {
    background: #20242a;
}

html[data-theme="light"] .code-block pre::-webkit-scrollbar-thumb {
    border-color: #20242a;
    background: #6f7985;
}

/* Requirements verification */
.requirements-validation-dialog {
    width: min(780px, calc(100vw - 32px));
    max-height: min(860px, calc(100vh - 32px));
    overflow: auto;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    background: #181818;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.requirements-validation-form {
    display: grid;
    gap: 16px;
    padding: 20px 24px 24px;
}

.requirements-validation-form > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.requirements-validation-model {
    font-size: 11px;
}

.verify-requirements-button {
    border-color: rgba(240, 68, 22, .58);
    color: #ff8b6b;
}

.preflight-build-button {
    border-color: rgba(65, 167, 112, .55);
    color: #79d6a3;
}

.preflight-build-button.is-checking {
    position: relative;
    padding-left: 30px;
    border-color: #56e39a;
    color: #effff6;
    background: linear-gradient(135deg, #1c6a45, #164d35);
    font-weight: 500;
    cursor: progress;
    opacity: 1;
    animation: build-check-glow .95s ease-in-out infinite;
}

.preflight-build-button.is-checking::before {
    position: absolute;
    left: 10px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, .38);
    border-top-color: #fff;
    border-radius: 50%;
    content: "";
    animation: build-check-spinner .7s linear infinite;
}

.preflight-build-button.needs-build-check {
    border-color: #ff8b54;
    color: #ffd9c7;
    animation: build-check-required 600ms ease-in-out 2;
}

@keyframes build-check-required {
    0%,
    100% {
        box-shadow: 0 0 0 rgba(240, 68, 22, 0);
    }

    50% {
        box-shadow: 0 0 0 3px rgba(240, 68, 22, .14),
            0 0 14px rgba(240, 68, 22, .55);
    }
}

@keyframes build-check-glow {
    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(86, 227, 154, .28),
            0 0 12px rgba(65, 210, 136, .48);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(86, 227, 154, .16),
            0 0 28px rgba(65, 210, 136, .88);
    }
}

@keyframes build-check-spinner {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .preflight-build-button.is-checking {
        animation: none;
        box-shadow: 0 0 0 3px rgba(86, 227, 154, .22),
            0 0 16px rgba(65, 210, 136, .58);
    }

    .preflight-build-button.is-checking::before {
        border-color: #bff8d8;
        background: #bff8d8;
        animation: none;
    }
}

.preflight-build-message {
    border-left: 2px solid #d59a32;
    padding-left: 16px;
}

.preflight-build-message.passed {
    border-left-color: #3fc078;
}

.preflight-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.preflight-result-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.preflight-result-summary {
    flex: none;
    padding: 4px 9px;
    border: 1px solid;
    border-radius: 999px;
    font: 700 10px/1.35 "Manrope", sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.preflight-result-summary.passed {
    border-color: rgba(58, 194, 113, .48);
    color: #73dda0;
    background: rgba(35, 145, 82, .14);
}

.preflight-result-summary.failed {
    border-color: rgba(229, 171, 57, .5);
    color: #f1c365;
    background: rgba(176, 119, 20, .15);
}

.preflight-result-description,
.preflight-result-reminder {
    margin: 0;
    color: var(--text-soft);
}

.preflight-diagnostics {
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #0d0d0d;
    scrollbar-color: #484848 #161616;
    scrollbar-width: thin;
}

.preflight-diagnostic {
    display: grid;
    grid-template-columns: minmax(150px, .36fr) minmax(260px, 1fr);
    gap: 16px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
}

.preflight-diagnostic:last-child {
    border-bottom: 0;
}

.preflight-diagnostic-metadata {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
}

.preflight-diagnostic-code {
    flex: none;
    padding: 2px 6px;
    border: 1px solid rgba(229, 171, 57, .42);
    border-radius: 4px;
    color: #f1c365;
    background: rgba(176, 119, 20, .12);
    font: 700 11px/1.45 "Cascadia Code", Consolas, monospace;
}

.preflight-diagnostic-location {
    overflow: hidden;
    color: var(--muted);
    font: 11px/1.55 "Cascadia Code", Consolas, monospace;
    text-overflow: ellipsis;
}

.preflight-diagnostic-message {
    color: #d8d8d8;
    font: 12px/1.55 "Cascadia Code", Consolas, monospace;
}

.preflight-result-reminder {
    margin-top: 14px;
    font-size: 12px;
}

.preflight-build-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.preflight-codex-retry {
    border-color: rgba(89, 148, 223, .58);
    color: #9fc8ff;
    background: rgba(52, 104, 171, .14);
}

.addon-download-button {
    border-color: rgba(65, 167, 112, .62);
    color: #d8ffea;
    background: rgba(34, 113, 72, .22);
}

.addon-download-button:hover {
    border-color: #55c888;
    background: rgba(34, 113, 72, .35);
}

.addon-build-notice {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(232, 166, 45, .62);
    border-radius: 7px;
    color: #ffd98a;
    background: rgba(232, 166, 45, .1);
    font-size: 12px;
    font-weight: 600;
}

.addon-build-notice[hidden] {
    display: none;
}

html[data-theme="light"] .addon-build-notice {
    border-color: rgba(166, 103, 0, .48);
    color: #754900;
    background: rgba(232, 166, 45, .13);
}

html[data-theme="light"] .preflight-diagnostics {
    background: #f7f8fa;
}

html[data-theme="light"] .preflight-diagnostic-message {
    color: #2b3036;
}

@media (max-width: 700px) {
    .preflight-diagnostic {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.requirements-validation-message {
    border-left: 2px solid var(--primary);
    padding-left: 16px;
}

.requirements-validation-note {
    margin-bottom: 14px;
    color: var(--primary-bright);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.requirements-match-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 3px 8px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.4;
    text-transform: uppercase;
    vertical-align: middle;
}

.requirements-match-badge.complete {
    border-color: rgba(58, 194, 113, .48);
    color: #73dda0;
    background: rgba(35, 145, 82, .14);
}

.requirements-match-badge.review {
    border-color: rgba(229, 171, 57, .5);
    color: #f1c365;
    background: rgba(176, 119, 20, .15);
}

.requirements-match-badge.action {
    border-color: rgba(238, 82, 82, .5);
    color: #ff8585;
    background: rgba(179, 45, 45, .15);
}

.requirements-validation-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

html[data-theme="light"] .requirements-validation-dialog {
    border-color: #cbd1d8;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(28, 36, 46, .22);
}

.feedback-dialog {
    width: min(620px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    background: #181818;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.feedback-form {
    display: grid;
    gap: 17px;
    padding: 22px 24px 24px;
}

.feedback-form > p:first-child {
    margin: 0;
    color: #aaa;
    font-size: 13px;
    line-height: 1.6;
}

.feedback-field {
    display: grid;
    gap: 7px;
}

.feedback-field > span {
    color: #e8e8e8;
    font-size: 12px;
    font-weight: 600;
}

.feedback-field select,
.feedback-field textarea {
    width: 100%;
    border: 1px solid #444;
    border-radius: 7px;
    padding: 10px 12px;
    color: #eee;
    background: #111;
    font: 400 13px/1.55 "Manrope", sans-serif;
}

.feedback-field textarea {
    resize: vertical;
}

.feedback-field select:focus,
.feedback-field textarea:focus {
    border-color: var(--primary);
    outline: 1px solid var(--primary);
}

.feedback-diagnostics {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #aaa;
    font-size: 11px;
    line-height: 1.55;
    cursor: pointer;
}

.feedback-diagnostics input {
    margin-top: 3px;
    accent-color: var(--primary);
}

.feedback-status {
    min-height: 19px;
    margin: 0;
    color: #aaa;
    font-size: 11px;
}

.feedback-status.error {
    color: #ff7a68;
}

.feedback-status.success {
    color: #69d58b;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 3px;
}

.feedback-invitation {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid #4a342d;
    border-left: 3px solid var(--primary);
    border-radius: 9px;
    color: #cfcfcf;
    background: linear-gradient(100deg, rgba(255, 72, 40, .09), #181818 58%);
    font-size: 13px;
    line-height: 1.55;
}

.feedback-invitation-copy {
    display: grid;
    gap: 5px;
}

.feedback-invitation-copy strong {
    color: #f3f3f3;
    font-size: 14px;
    font-weight: 650;
}

.feedback-invitation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.feedback-invitation .button {
    min-width: 104px;
    min-height: 36px;
    padding: 7px 14px;
    font-size: 12px;
}

.feedback-invitation .button.primary {
    min-width: 142px;
}

html[data-theme="light"] .feedback-invitation {
    border-color: #e3c2b8;
    border-left-color: var(--primary);
    color: #49515a;
    background: linear-gradient(100deg, #fff1ed, #f8f9fa 58%);
}

html[data-theme="light"] .feedback-invitation-copy strong {
    color: #20262d;
}

@media (max-width: 680px) {
    .feedback-invitation {
        padding: 14px;
    }
}

/* Code workspace and project source snapshots */
.code-workspace-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1320px, calc(100vw - 28px));
    height: min(860px, calc(100vh - 28px));
    overflow: hidden;
    border: 1px solid #3a3a3a;
    border-radius: 11px;
    background: #151515;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
}

.code-workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 0;
}

.code-workspace-editor {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #343434;
}

.code-workspace-prompt {
    display: grid;
    gap: 6px;
    padding: 11px 14px 12px;
    border-bottom: 1px solid #343434;
    background: #181818;
}

.code-workspace-prompt strong {
    color: #f06442;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.code-workspace-prompt p {
    max-height: 96px;
    overflow: auto;
    margin: 0;
    color: #c9c9c9;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.code-workspace-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 58px;
    padding: 10px 14px;
    border-bottom: 1px solid #343434;
    background: #1c1c1c;
}

.code-workspace-toolbar > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.code-workspace-toolbar strong {
    overflow: hidden;
    color: #eee;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-workspace-toolbar span {
    color: #929292;
    font-size: 10px;
}

.code-workspace-toolbar > div:last-child {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.code-workspace-preview {
    overflow: auto;
    margin: 0;
    padding: 20px;
    color: #d6d6d6;
    background: #101010;
    font: 400 12px/1.65 "Cascadia Code", Consolas, monospace;
    tab-size: 4;
    white-space: pre;
}

.revision-panel {
    min-width: 0;
    overflow-y: auto;
    background: #191919;
}

.revision-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 15px 12px;
    border-bottom: 1px solid #323232;
}

.revision-panel-heading .eyebrow {
    margin: 0 0 4px;
    font-size: 9px;
}

.revision-panel-heading h3 {
    margin: 0;
    font-size: 14px;
}

.revision-panel-heading > span {
    color: #8f8f8f;
    font-size: 11px;
}

.revision-help {
    margin: 0;
    padding: 12px 15px;
    border-bottom: 1px solid #303030;
    color: #969696;
    font-size: 11px;
    line-height: 1.55;
}

.revision-message {
    min-height: 18px;
    padding: 9px 15px 0;
    color: #999;
    font-size: 11px;
    line-height: 1.45;
}

.revision-message.error {
    color: #ff7a68;
}

.revision-message.success {
    color: #69d58b;
}

.revision-list {
    display: grid;
    gap: 7px;
    padding: 12px;
}

.revision-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding-bottom: 8px;
    border: 1px solid #353535;
    border-radius: 7px;
    background: #202020;
}

.revision-item.current {
    border-color: rgba(240, 68, 22, .65);
}

.revision-item.selected:not(.current) {
    border-color: #555;
}

.revision-item.pinned {
    border-color: #353535;
    background: #202020;
}

.revision-item.current.pinned {
    border-color: rgba(240, 68, 22, .65);
}

.revision-item.selected.pinned:not(.current) {
    border-color: #555;
}

.revision-item.pinned .revision-details {
    padding-right: 112px;
}

.revision-pinned-marker {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 7px;
    border: 1px solid #f06442;
    border-radius: 999px;
    color: #fff;
    background: #b9361f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
}

.revision-details {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px 11px;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.revision-details strong {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #e8e8e8;
    font-size: 12px;
}

.revision-details strong span {
    overflow: hidden;
    padding: 2px 6px;
    border-radius: 999px;
    color: #aaa;
    background: #2c2c2c;
    font-size: 9px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.revision-details small {
    color: #929292;
    font-size: 10px;
}

.revision-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 8px;
}

.revision-action {
    padding: 6px 8px;
    border: 1px solid #444;
    border-radius: 5px;
    color: #ddd;
    background: #191919;
    font: 600 10px "Manrope", sans-serif;
    cursor: pointer;
}

.revision-action:hover:not(:disabled) {
    border-color: var(--primary);
}

.revision-action.danger {
    color: #ff8b7d;
}

.revision-action:disabled {
    color: #777;
    opacity: .58;
    cursor: default;
}

.revision-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 12px 12px;
    color: #999;
    font-size: 10px;
}

.revision-controls[hidden] {
    display: none;
}

.revision-controls .button {
    padding: 6px 9px;
    font-size: 10px;
}

.revision-delete-history {
    width: calc(100% - 24px);
    margin: 0 12px 14px;
    padding: 8px 10px;
    border: 1px solid #593632;
    border-radius: 5px;
    color: #ff8b7d;
    background: #211918;
    font: 500 10px "Manrope", sans-serif;
    cursor: pointer;
}

.revision-delete-history:hover {
    border-color: var(--primary);
}

html[data-theme="light"] .code-workspace-dialog {
    color-scheme: light;
    border-color: #c5cbd3;
    color: #20242a;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(23, 30, 39, .28);
}

html[data-theme="light"] .code-workspace-header,
html[data-theme="light"] .code-workspace-toolbar {
    border-color: #d6dbe1;
    background: #ffffff;
}

html[data-theme="light"] .code-workspace-header h2,
html[data-theme="light"] .revision-panel-heading h3,
html[data-theme="light"] .code-workspace-toolbar strong {
    color: #1e252d;
}

html[data-theme="light"] .code-workspace-toolbar span,
html[data-theme="light"] .revision-panel-heading > span,
html[data-theme="light"] .revision-help,
html[data-theme="light"] .revision-message,
html[data-theme="light"] .revision-controls {
    color: #626d79;
}

html[data-theme="light"] .code-workspace-editor {
    border-right-color: #d6dbe1;
}

html[data-theme="light"] .code-workspace-prompt {
    border-bottom-color: #d6dbe1;
    background: #f5f7f9;
}

html[data-theme="light"] .code-workspace-prompt strong,
html[data-theme="light"] .revision-panel-heading .eyebrow {
    color: #c93816;
}

html[data-theme="light"] .code-workspace-prompt p {
    color: #38424d;
}

html[data-theme="light"] .code-workspace-preview {
    color-scheme: dark;
    color: #e2e6eb;
    background: #20242a;
    scrollbar-color: #6f7985 #20242a;
}

html[data-theme="light"] .code-workspace-preview::-webkit-scrollbar-track {
    background: #20242a;
}

html[data-theme="light"] .code-workspace-preview::-webkit-scrollbar-thumb {
    border: 2px solid #20242a;
    border-radius: 999px;
    background: #6f7985;
}

html[data-theme="light"] .revision-panel {
    background: #f5f7f9;
}

html[data-theme="light"] .revision-panel-heading,
html[data-theme="light"] .revision-help {
    border-bottom-color: #d8dde3;
}

html[data-theme="light"] .revision-item,
html[data-theme="light"] .revision-item.pinned {
    border-color: #cbd1d8;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(30, 40, 52, .06);
}

html[data-theme="light"] .revision-item.current,
html[data-theme="light"] .revision-item.current.pinned {
    border-color: #d84624;
    background: #fff9f7;
}

html[data-theme="light"] .revision-item.selected:not(.current),
html[data-theme="light"] .revision-item.selected.pinned:not(.current) {
    border-color: #7e8995;
}

html[data-theme="light"] .revision-details strong {
    color: #202830;
}

html[data-theme="light"] .revision-details strong span {
    color: #56616d;
    background: #e9edf1;
}

html[data-theme="light"] .revision-details small {
    color: #68737f;
}

html[data-theme="light"] .revision-action {
    border-color: #b8c0c9;
    color: #303943;
    background: #ffffff;
}

html[data-theme="light"] .revision-action:hover:not(:disabled) {
    border-color: #d84624;
    background: #fff4f1;
}

html[data-theme="light"] .revision-action.danger {
    color: #b52e16;
}

html[data-theme="light"] .revision-action:disabled {
    color: #929aa3;
    background: #eef1f4;
    opacity: 1;
}

html[data-theme="light"] .revision-delete-history {
    border-color: #d89a8e;
    color: #a92e18;
    background: #fff5f2;
}

@media (max-width: 820px) {
    .code-workspace-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(420px, 1fr) 280px;
    }

    .code-workspace-editor {
        border-right: 0;
        border-bottom: 1px solid #343434;
    }

    html[data-theme="light"] .code-workspace-editor {
        border-bottom-color: #d6dbe1;
    }

    .code-workspace-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

.existing-code-attachments {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 6px;
}

.existing-code-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    border: 1px solid #454545;
    border-radius: 6px;
    color: var(--muted);
    background: #1d1d1d;
    font-size: 11px;
}

.existing-code-attachment-remove {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #aaa;
    background: transparent;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.existing-code-attachment-remove:hover:not(:disabled) {
    color: #fff;
    background: #3a3a3a;
}

.existing-code-attachment::before {
    content: "\1F4CE";
    color: #aaa;
    font-size: 12px;
}

.existing-code-review-button {
    min-height: 32px;
    padding: 0 13px;
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
    font-size: 11px;
    box-shadow: 0 3px 10px rgba(240, 68, 22, .22);
}

.existing-code-review-button:hover:not(:disabled) {
    border-color: var(--primary-bright);
    background: var(--primary-bright);
}

.existing-code-upload-button {
    gap: 8px;
    min-height: 40px;
    border-color: #565656;
    color: #f2f2f2;
    background: #292929;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
}

.existing-code-upload-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--primary-bright);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.existing-code-upload-button:hover:not(:disabled) {
    border-color: var(--primary-bright);
    background: #323232;
}

.existing-code-upload-button:focus-visible {
    border-color: var(--primary-bright);
    outline: 2px solid rgba(255, 91, 51, .28);
    outline-offset: 2px;
}

html[data-theme="light"] .existing-code-upload-button {
    border-color: #aeb7c1;
    color: #26313b;
    background: #edf1f5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}

html[data-theme="light"] .existing-code-upload-button:hover:not(:disabled) {
    border-color: var(--primary);
    background: #e3e8ed;
}

.existing-code-help-link {
    width: fit-content;
    color: var(--primary-bright);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.existing-code-help-link:hover {
    text-decoration: underline;
}

/* Keep landing-specific presentation above shared application primitives. */
.landing-body .landing-header {
    max-width: 1280px;
    padding: 22px 28px;
}

.landing-body .landing-primary-action,
.landing-body .hero-secondary-action {
    min-height: 50px;
    padding-right: 25px;
    padding-left: 25px;
    border-radius: 9px;
}

.landing-body .feature-card {
    padding: 27px;
    border-color: #2d3239;
    border-radius: 11px;
    background: #111318;
    box-shadow: none;
}

.landing-body .feature-card-wide {
    background: radial-gradient(circle at 85% 20%, rgba(240, 68, 22, .08), transparent 40%), #111318;
}

@media (max-width: 650px) {
    .landing-body .landing-header {
        padding: 18px 20px;
    }

    .landing-body .feature-card {
        padding: 23px;
    }
}

/* The simpler split hero keeps the product visible without overloading the intro. */
.landing-body .landing-hero-classic {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(520px, 1.14fr);
    gap: 64px;
    align-items: center;
    max-width: 1280px;
    min-height: 650px;
    padding: 76px 28px 96px;
    text-align: left;
}

.landing-hero-classic .landing-hero-copy {
    max-width: none;
    margin: 0;
}

.landing-hero-classic h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(3.35rem, 6vw, 5.8rem);
    line-height: .94;
}

.landing-hero-classic .lead {
    max-width: 590px;
    margin: 28px 0 34px;
    font-size: 1.08rem;
}

.landing-hero-classic .landing-hero-actions,
.landing-hero-classic .landing-highlights {
    justify-content: flex-start;
}

.landing-hero-classic .landing-highlights li::before {
    background: var(--primary);
}

.classic-product-preview {
    max-width: none;
    margin: 0;
    border-radius: 10px;
}

.classic-product-preview .preview-layout {
    grid-template-columns: 165px minmax(0, 1fr);
    min-height: 410px;
}

.classic-product-preview .preview-tasks {
    padding: 20px 12px;
    background: #151515;
}

.classic-product-preview .preview-tasks > strong {
    margin-bottom: 18px;
    font-size: 11px;
}

.classic-product-preview .preview-task {
    display: block;
    margin: 0 -12px;
    padding: 13px 12px;
    border-top: 1px solid #292929;
    border-radius: 0;
    color: #999;
    font-size: 10px;
}

.classic-product-preview .preview-task.active {
    border-left: 3px solid var(--primary);
    color: #fff;
    background: rgba(240, 68, 22, .11);
}

.classic-product-preview .preview-workspace {
    padding: 24px;
}

.classic-product-preview .preview-workspace h2 {
    margin: 0 0 48px;
    font-size: 18px;
}

.classic-product-preview .preview-message {
    padding: 18px 0 24px;
    border: 0;
    border-top: 1px solid #2d2d2d;
    border-bottom: 1px solid #2d2d2d;
    border-radius: 0;
    background: transparent;
}

.classic-product-preview .preview-code {
    min-height: 0;
    margin-top: 20px;
    background: #151515;
}

@media (max-width: 1000px) {
    .landing-body .landing-hero-classic {
        grid-template-columns: 1fr;
    }

    .landing-hero-classic .landing-hero-copy {
        max-width: 760px;
    }

    .classic-product-preview {
        width: 100%;
    }
}

@media (max-width: 650px) {
    .landing-body .landing-hero-classic {
        min-height: 0;
        padding: 48px 20px 64px;
    }

    .landing-hero-classic h1 {
        font-size: clamp(3rem, 15vw, 4.4rem);
    }

    .landing-hero-classic .landing-hero-actions {
        flex-direction: row;
    }

    .landing-hero-classic .landing-hero-actions .button {
        width: auto;
    }

    .classic-product-preview .preview-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .classic-product-preview .preview-tasks {
        display: none;
    }
}
