:root {
    --cf-navy:#071426;
    --cf-navy-2:#0b1d35;
    --cf-blue:#2563eb;
    --cf-blue-2:#3b82f6;
    --cf-cyan:#22d3ee;
    --cf-purple:#8b5cf6;
    --cf-green:#34d399;
    --cf-gold:#f5c451;
    --cf-white:#ffffff;
    --cf-soft:#f4f7fb;
    --cf-line:#dfe7f2;
    --cf-ink:#162033;
    --cf-muted:#69778d;
    --cf-shadow:0 28px 80px rgba(10,29,55,.14);
}

* {
    box-sizing:border-box;
}

body {
    margin:0;
    color:var(--cf-ink);
    background:var(--cf-soft);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.cf-shell {
    width:min(1320px,calc(100% - 40px));
    margin:0 auto;
}

.cf-topbar {
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(255,255,255,.94);
    border-bottom:1px solid rgba(223,231,242,.9);
    backdrop-filter:blur(18px);
}

.cf-topbar-inner {
    min-height:76px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}

.cf-brand {
    display:flex;
    align-items:center;
    gap:12px;
    color:inherit;
    text-decoration:none;
}

.cf-brand-mark {
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:#fff;
    font-weight:900;
    background:
        linear-gradient(
            135deg,
            var(--cf-blue),
            var(--cf-purple)
        );
    box-shadow:0 10px 30px rgba(37,99,235,.25);
}

.cf-brand strong {
    display:block;
    color:#123a86;
    font-size:18px;
}

.cf-brand span {
    display:block;
    margin-top:3px;
    color:var(--cf-muted);
    font-size:12px;
}

.cf-user {
    color:var(--cf-muted);
    font-size:14px;
    font-weight:700;
}

.cf-hero {
    position:relative;
    overflow:hidden;
    padding:100px 0;
    color:#fff;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(34,211,238,.18),
            transparent 28rem
        ),
        radial-gradient(
            circle at 12% 10%,
            rgba(139,92,246,.22),
            transparent 30rem
        ),
        linear-gradient(
            135deg,
            #06101f,
            #0a2141 55%,
            #102d57
        );
}

.cf-hero-grid {
    display:grid;
    grid-template-columns:
        minmax(0,1fr)
        minmax(440px,.9fr);
    align-items:center;
    gap:70px;
}

.cf-eyebrow {
    margin-bottom:16px;
    color:var(--cf-cyan);
    font-size:12px;
    font-weight:900;
    letter-spacing:.16em;
}

.cf-hero h1 {
    max-width:720px;
    margin:0;
    font-size:clamp(48px,6vw,82px);
    line-height:.98;
    letter-spacing:-.055em;
}

.cf-hero h1 span {
    display:block;
    background:
        linear-gradient(
            90deg,
            #7dd3fc,
            #a78bfa,
            #34d399
        );
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

.cf-hero-copy > p {
    max-width:650px;
    margin:28px 0 0;
    color:#c8d5e8;
    font-size:19px;
    line-height:1.7;
}

.cf-actions {
    margin-top:34px;
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:16px;
}

.cf-button {
    min-height:52px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 24px;
    border-radius:14px;
    text-decoration:none;
    font-weight:850;
}

.cf-button-primary {
    color:#071426;
    background:#fff;
    box-shadow:0 16px 44px rgba(0,0,0,.22);
}

.cf-runtime-pill {
    padding:10px 14px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:999px;
    color:#cbd9eb;
    background:rgba(255,255,255,.07);
    font-size:13px;
    font-weight:700;
}

.cf-terminal-card {
    overflow:hidden;
    border:1px solid rgba(255,255,255,.12);
    border-radius:22px;
    background:#050b14;
    box-shadow:0 34px 90px rgba(0,0,0,.38);
}

.cf-terminal-bar {
    min-height:52px;
    padding:0 18px;
    display:flex;
    align-items:center;
    gap:8px;
    border-bottom:1px solid rgba(255,255,255,.08);
    background:#0c1522;
}

.cf-terminal-bar span {
    width:10px;
    height:10px;
    border-radius:50%;
    background:#526175;
}

.cf-terminal-bar strong {
    margin-left:10px;
    color:#aab8cb;
    font-size:12px;
}

.cf-terminal-card pre {
    min-height:330px;
    margin:0;
    padding:30px;
    overflow:auto;
    color:#e4edf8;
    font:15px/1.8
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

.cf-code-purple {
    color:#c4b5fd;
}

.cf-code-green {
    color:#86efac;
}

.cf-code-blue {
    color:#7dd3fc;
}

.cf-output {
    color:#94a3b8;
}

.cf-section {
    padding:90px 0;
}

.cf-section-heading {
    max-width:760px;
}

.cf-section-heading .cf-eyebrow {
    color:var(--cf-blue);
}

.cf-section-heading h2 {
    margin:0;
    color:#102343;
    font-size:clamp(34px,4vw,54px);
    letter-spacing:-.04em;
}

.cf-section-heading p {
    margin:20px 0 0;
    color:var(--cf-muted);
    font-size:17px;
    line-height:1.7;
}

.cf-feature-grid {
    margin-top:46px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.cf-feature {
    padding:30px;
    border:1px solid var(--cf-line);
    border-radius:20px;
    background:#fff;
    box-shadow:0 16px 45px rgba(10,29,55,.06);
}

.cf-feature > strong {
    color:var(--cf-blue);
    font-size:12px;
    letter-spacing:.14em;
}

.cf-feature h3 {
    margin:18px 0 10px;
    color:#12264a;
    font-size:24px;
}

.cf-feature p {
    margin:0;
    color:var(--cf-muted);
    line-height:1.65;
}

/* Studio */

.cf-studio-body {
    min-height:100vh;
    background:#07101d;
}

.cf-studio-header {
    min-height:66px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    border-bottom:1px solid #203047;
    color:#fff;
    background:#0b1728;
}

.cf-studio-brand {
    display:flex;
    align-items:center;
    gap:10px;
    color:#fff;
    text-decoration:none;
    font-weight:850;
}

.cf-studio-brand > span {
    color:var(--cf-cyan);
}

.cf-runtime-status {
    display:flex;
    align-items:center;
    gap:8px;
    color:#aebdd0;
    font-size:12px;
    font-weight:750;
}

.cf-runtime-status > span {
    width:8px;
    height:8px;
    border-radius:50%;
    background:#f5c451;
}

.cf-runtime-status[data-state="ready"] > span {
    background:#34d399;
}

.cf-runtime-status[data-state="error"] > span {
    background:#fb7185;
}

.cf-studio {
    min-height:calc(100vh - 66px);
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);
}

.cf-editor-panel,
.cf-output-panel {
    min-width:0;
    display:flex;
    flex-direction:column;
}

.cf-editor-panel {
    border-right:1px solid #203047;
}

.cf-panel-bar {
    min-height:58px;
    padding:0 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    color:#dce7f5;
    border-bottom:1px solid #203047;
    background:#0e1b2d;
}

.cf-panel-bar strong,
.cf-panel-bar span {
    display:block;
}

.cf-panel-bar span {
    margin-top:2px;
    color:#788aa2;
    font-size:11px;
}

.cf-toolbar {
    display:flex;
    align-items:center;
    gap:8px;
}

.cf-tool-button,
.cf-run-button {
    min-height:36px;
    padding:0 14px;
    border-radius:9px;
    border:1px solid #31445f;
    color:#d7e3f1;
    background:#15243a;
    cursor:pointer;
    font-weight:750;
}

.cf-tool-button:disabled {
    opacity:.45;
    cursor:not-allowed;
}

.cf-run-button {
    border-color:#2563eb;
    color:#fff;
    background:#2563eb;
}

.cf-editor {
    width:100%;
    flex:1;
    min-height:620px;
    resize:none;
    outline:none;
    border:0;
    padding:28px;
    color:#e8eef7;
    background:#091321;
    caret-color:#fff;
    font:
        15px/1.75
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    tab-size:4;
}

.cf-output-console {
    flex:1;
    min-height:620px;
    margin:0;
    padding:28px;
    overflow:auto;
    white-space:pre-wrap;
    word-break:break-word;
    color:#b9fbcf;
    background:#050b13;
    font:
        14px/1.7
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

.cf-sr-only {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}

@media (max-width:960px) {

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

    .cf-feature-grid {
        grid-template-columns:1fr;
    }

    .cf-studio {
        grid-template-columns:1fr;
    }

    .cf-editor-panel {
        border-right:0;
        border-bottom:1px solid #203047;
    }

    .cf-editor,
    .cf-output-console {
        min-height:430px;
    }
}

@media (max-width:620px) {

    .cf-shell {
        width:min(100% - 26px,1320px);
    }

    .cf-user {
        display:none;
    }

    .cf-hero {
        padding:70px 0;
    }

    .cf-hero h1 {
        font-size:46px;
    }

    .cf-terminal-card pre {
        padding:22px;
        font-size:13px;
    }

    .cf-studio-header {
        align-items:flex-start;
        flex-direction:column;
        padding:14px 16px;
    }

    .cf-panel-bar {
        align-items:flex-start;
        flex-direction:column;
        padding:14px;
    }

    .cf-toolbar {
        width:100%;
        flex-wrap:wrap;
    }
}


/* ============================================================
   CF-2C — PREMIUM CODEFORGE PRODUCT HOME
   ============================================================ */

.cf-product-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(109, 72, 255, .15),
            transparent 28rem
        ),
        #07101f;
    color: #f8fbff;
}

.cf-product-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-left: auto;
    margin-right: 1.5rem;
}

.cf-product-nav a {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 700;
}

.cf-product-nav a:hover {
    color: #fff;
}

.cf-product-nav .cf-nav-studio {
    padding: .65rem 1rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.06);
}

.cf-premium-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 8rem) 0 5rem;
}

.cf-premium-hero::before {
    content: "";
    position: absolute;
    width: 32rem;
    height: 32rem;
    left: -14rem;
    top: 4rem;
    border-radius: 50%;
    background: rgba(38, 122, 255, .10);
    filter: blur(20px);
    pointer-events: none;
}

.cf-premium-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns:
        minmax(0, .9fr)
        minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
}

.cf-premium-copy h1 {
    margin: .8rem 0 1.25rem;
    max-width: 720px;
    font-size: clamp(3rem, 6vw, 6.3rem);
    line-height: .96;
    letter-spacing: -.065em;
}

.cf-premium-copy h1 span,
.cf-section-heading h2 span,
.cf-mission-copy h2 span {
    display: block;
    color: #8f7cff;
}

.cf-premium-lead {
    max-width: 650px;
    margin: 0;
    color: rgba(236,243,255,.72);
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.75;
}

.cf-button-secondary {
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.055);
}

.cf-button-secondary:hover {
    background: rgba(255,255,255,.1);
}

.cf-hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    margin-top: 1.6rem;
    color: rgba(231,239,255,.68);
    font-size: .82rem;
    font-weight: 700;
}

.cf-premium-visual {
    position: relative;
}

.cf-premium-visual > img {
    display: block;
    width: 100%;
    min-height: 440px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow:
        0 40px 100px rgba(0,0,0,.5),
        0 0 0 1px rgba(255,255,255,.08);
}

.cf-floating-card {
    position: absolute;
    padding: .9rem 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: rgba(7,16,31,.88);
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
    backdrop-filter: blur(18px);
}

.cf-floating-card small {
    display: block;
    margin-bottom: .25rem;
    color: #8f7cff;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .13em;
}

.cf-floating-card strong {
    display: block;
    font-size: .92rem;
}

.cf-floating-card span {
    display: block;
    margin-top: .2rem;
    color: rgba(255,255,255,.55);
    font-size: .7rem;
}

.cf-floating-runtime {
    left: -1.3rem;
    bottom: 2rem;
}

.cf-floating-build {
    right: -1rem;
    top: 2rem;
}

.cf-command-strip {
    border-top: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.025);
}

.cf-command-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.cf-command-grid > div {
    padding: 1.5rem;
    border-right: 1px solid rgba(255,255,255,.07);
}

.cf-command-grid > div:last-child {
    border-right: 0;
}

.cf-command-grid small {
    display: block;
    margin-bottom: .4rem;
    color: #7464e8;
    font-size: .63rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.cf-command-grid strong {
    font-size: .92rem;
}

.cf-experience-section,
.cf-progress-section {
    padding: clamp(5rem, 9vw, 8rem) 0;
}

.cf-heading-centred {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.cf-section-heading h2 {
    font-size: clamp(2.2rem, 4.5vw, 4.4rem);
    line-height: 1.03;
    letter-spacing: -.05em;
}

.cf-learning-layout {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 1.25rem;
    margin-top: 3rem;
}

.cf-large-feature-card,
.cf-image-feature-card,
.cf-progress-card {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    background: rgba(255,255,255,.035);
}

.cf-large-feature-card {
    position: relative;
    min-height: 640px;
}

.cf-large-feature-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-large-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(5,10,22,.05),
            rgba(5,10,22,.92)
        );
}

.cf-card-overlay {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding: 2rem;
}

.cf-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    border-radius: 10px;
    background: rgba(132,109,255,.18);
    color: #a797ff;
    font-size: .76rem;
    font-weight: 900;
}

.cf-card-overlay small,
.cf-image-feature-card small,
.cf-progress-card small {
    color: #8f7cff;
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .13em;
}

.cf-card-overlay h3 {
    margin: .45rem 0;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.cf-card-overlay p {
    max-width: 580px;
    margin: 0;
    color: rgba(255,255,255,.67);
    line-height: 1.65;
}

.cf-learning-stack {
    display: grid;
    gap: 1.25rem;
}

.cf-image-feature-card {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    min-height: 300px;
}

.cf-image-feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-image-feature-card > div {
    padding: 1.6rem;
}

.cf-image-feature-card h3 {
    margin: .7rem 0;
    font-size: 1.45rem;
}

.cf-image-feature-card p {
    margin: 0;
    color: rgba(255,255,255,.62);
    line-height: 1.65;
}

.cf-mission-section {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background:
        linear-gradient(
            135deg,
            rgba(67,45,156,.20),
            rgba(9,18,35,.3)
        );
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.cf-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.cf-mission-visual img {
    display: block;
    width: 100%;
    border-radius: 26px;
    box-shadow: 0 35px 80px rgba(0,0,0,.35);
}

.cf-mission-copy h2 {
    margin: .7rem 0 1rem;
    font-size: clamp(2.3rem, 4vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -.05em;
}

.cf-mission-copy > p {
    color: rgba(255,255,255,.67);
    line-height: 1.75;
}

.cf-mission-list {
    margin-top: 2rem;
}

.cf-mission-list > div {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .9rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.cf-mission-list strong {
    color: #8f7cff;
    font-size: .72rem;
}

.cf-mission-list span {
    font-weight: 700;
}

.cf-progress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.7rem;
}

.cf-progress-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.cf-progress-card > div {
    padding: 1.5rem;
}

.cf-progress-card h3 {
    margin: .55rem 0;
    font-size: 1.35rem;
}

.cf-progress-card p {
    margin: 0;
    color: rgba(255,255,255,.62);
    line-height: 1.65;
}

.cf-build-banner {
    padding: 2rem 0 5rem;
}

.cf-build-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 28px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(130,100,255,.25),
            transparent 18rem
        ),
        rgba(255,255,255,.045);
}

.cf-build-banner h2 {
    max-width: 650px;
    margin: .5rem 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.cf-build-banner p {
    margin-bottom: 0;
    color: rgba(255,255,255,.62);
}

.cf-product-footer {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 2rem 0;
    color: rgba(255,255,255,.55);
}

.cf-product-footer .cf-shell {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.cf-product-footer strong {
    color: rgba(255,255,255,.82);
}

@media (max-width: 1000px) {

    .cf-product-nav {
        display: none;
    }

    .cf-premium-hero-grid,
    .cf-learning-layout,
    .cf-mission-grid {
        grid-template-columns: 1fr;
    }

    .cf-premium-visual {
        max-width: 760px;
        margin: 0 auto;
    }

    .cf-command-grid,
    .cf-progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cf-large-feature-card {
        min-height: 520px;
    }
}

@media (max-width: 640px) {

    .cf-premium-hero {
        padding-top: 3rem;
    }

    .cf-premium-copy h1 {
        font-size: clamp(2.7rem, 13vw, 4rem);
    }

    .cf-premium-visual > img {
        min-height: 320px;
    }

    .cf-floating-card {
        display: none;
    }

    .cf-command-grid,
    .cf-progress-grid,
    .cf-image-feature-card {
        grid-template-columns: 1fr;
    }

    .cf-command-grid > div {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.07);
    }

    .cf-image-feature-card img {
        max-height: 230px;
    }

    .cf-large-feature-card {
        min-height: 460px;
    }

    .cf-card-overlay {
        padding: 1.4rem;
    }

    .cf-build-banner-inner,
    .cf-product-footer .cf-shell {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============================================================
   CF-2C-P1B LANDING POLISH
   Academy CodeForge
   Scope: landing page only
   Purpose:
   - restore header/navigation contrast
   - restore headline contrast
   - tighten hero transition
   - improve imported artwork presentation
   - preserve Studio and application behaviour
   ============================================================ */


/* ------------------------------------------------------------
   1. HEADER / NAVIGATION CONTRAST
   ------------------------------------------------------------ */

.cf-landing-page header {
    position: relative;
    z-index: 100;
}

.cf-landing-page header nav a {
    color: #24345f !important;
    opacity: 1 !important;
}

.cf-landing-page header nav a:hover,
.cf-landing-page header nav a:focus-visible {
    color: #5b5cf0 !important;
}

.cf-landing-page header nav a:last-child {
    color: #24345f !important;
}


/* ------------------------------------------------------------
   2. HERO
   Remove excessive vertical dead space while preserving the
   cinematic split-screen composition.
   ------------------------------------------------------------ */

.cf-landing-page .cf-hero {
    min-height: auto !important;
}

.cf-landing-page .cf-hero-inner {
    min-height: min(720px, calc(100vh - 92px)) !important;
}

.cf-landing-page .cf-hero-copy {
    align-self: center;
}

.cf-landing-page .cf-hero-media {
    align-self: stretch;
    overflow: hidden;
}

.cf-landing-page .cf-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% center;
    display: block;
}


/* ------------------------------------------------------------
   3. HEADLINE CONTRAST
   Generated screenshots revealed several headline fragments
   inheriting a near-black/navy colour against the dark canvas.
   Landing-page headings should remain intentionally legible.
   ------------------------------------------------------------ */

.cf-landing-page h1,
.cf-landing-page h2,
.cf-landing-page h3 {
    text-wrap: balance;
}

.cf-landing-page section h2 {
    color: #f7f8ff;
}

.cf-landing-page section h2 span,
.cf-landing-page .cf-accent {
    color: #8f73ff;
}


/* Specifically protect the large editorial journey/progress
   headings from low-contrast inherited colour. */

.cf-landing-page .cf-journey-section h2,
.cf-landing-page .cf-progress-section h2 {
    color: #f7f8ff !important;
}

.cf-landing-page .cf-journey-section h2 span,
.cf-landing-page .cf-progress-section h2 span {
    color: #8f73ff !important;
}


/* ------------------------------------------------------------
   4. SECTION RHYTHM
   Reduce the oversized transition immediately after the hero.
   ------------------------------------------------------------ */

.cf-landing-page .cf-hero + section {
    margin-top: 0 !important;
}

.cf-landing-page .cf-journey-section,
.cf-landing-page .cf-progress-section {
    position: relative;
}


/* ------------------------------------------------------------
   5. IMPORTED ARTWORK PRESENTATION
   We retain the current temporary assets but crop them as
   editorial imagery rather than allowing their generated edges
   to dominate the composition.
   ------------------------------------------------------------ */

.cf-landing-page img[src*="codeforge-learning-path-production.webp"],
.cf-landing-page img[src*="codeforge-python-runtime-production.webp"],
.cf-landing-page img[src*="codeforge-challenges-production.webp"],
.cf-landing-page img[src*="codeforge-smart-missions-production.webp"],
.cf-landing-page img[src*="codeforge-student-progress-production.webp"],
.cf-landing-page img[src*="codeforge-achievement-production.webp"],
.cf-landing-page img[src*="codeforge-ai-mentor-production.webp"] {
    display: block;
    width: 100%;
    object-fit: cover;
}


/* ------------------------------------------------------------
   6. ACCESSIBILITY / INTERACTION POLISH
   ------------------------------------------------------------ */

.cf-landing-page a:focus-visible,
.cf-landing-page button:focus-visible {
    outline: 3px solid rgba(109, 224, 255, .85);
    outline-offset: 4px;
}


/* ------------------------------------------------------------
   7. RESPONSIVE SAFETY
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    .cf-landing-page .cf-hero-inner {
        min-height: auto !important;
    }

    .cf-landing-page .cf-hero-media img {
        object-position: center;
    }

    .cf-landing-page section h2 {
        text-wrap: pretty;
    }
}


/* ============================================================
   CF-2C-P4B
   Academy Portal official brand integration + mobile journey
   polish.
   ============================================================ */

.cf-brand-lockup {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.cf-academy-logo {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
}

.cf-footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cf-footer-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 auto;
}

.cf-footer-brand > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/*
 * On compact screens, preserve the production learning-path
 * artwork instead of covering the learner with a large overlay.
 * The content becomes a dedicated lower information panel.
 */
@media (max-width: 640px) {

    .cf-brand {
        gap: 9px;
    }

    .cf-brand-lockup {
        gap: 6px;
    }

    .cf-academy-logo {
        width: 34px;
        height: 34px;
    }

    .cf-brand-mark {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .cf-large-feature-card {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .cf-large-feature-card > img {
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .cf-large-feature-card .cf-card-overlay {
        position: relative;
        inset: auto;
        display: flex;
        align-items: flex-start;
        gap: 14px;
        padding: 22px 20px 24px;
        background: #151827;
    }

    .cf-large-feature-card .cf-card-overlay::before {
        display: none;
    }

    .cf-large-feature-card .cf-card-overlay h3 {
        margin-top: 8px;
    }

    .cf-large-feature-card .cf-card-overlay p {
        margin-bottom: 0;
    }

    .cf-product-footer .cf-footer-brand {
        align-items: flex-start;
    }

    .cf-footer-logo {
        width: 42px;
        height: 42px;
    }
}



/* ============================================================
   CF-4B-P2E-P17C-R1Q — ACADEMY TUTOR STUDIO UI
   ============================================================ */

.cf-tutor-button {
    min-height:36px;
    padding:0 14px;
    border:1px solid rgba(103,232,249,.42);
    border-radius:9px;
    color:#dffaff;
    background:
        linear-gradient(
            135deg,
            rgba(14,116,144,.32),
            rgba(79,70,229,.28)
        );
    cursor:pointer;
    font-weight:800;
    white-space:nowrap;
}

.cf-tutor-button:hover {
    border-color:#67e8f9;
    background:
        linear-gradient(
            135deg,
            rgba(14,116,144,.48),
            rgba(79,70,229,.42)
        );
}

.cf-tutor-panel {
    margin:18px;
    border:1px solid rgba(103,232,249,.22);
    border-radius:18px;
    overflow:hidden;
    color:#eaf7ff;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(79,70,229,.18),
            transparent 18rem
        ),
        #0b1728;
    box-shadow:
        0 20px 55px rgba(0,0,0,.28);
}

.cf-tutor-panel[hidden] {
    display:none;
}

.cf-tutor-heading {
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:14px;
    align-items:start;
    padding:20px;
    border-bottom:1px solid #203047;
}

.cf-tutor-mark {
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:13px;
    color:#07101d;
    background:#67e8f9;
    font-size:21px;
    font-weight:900;
    box-shadow:
        0 10px 28px rgba(103,232,249,.16);
}

.cf-tutor-eyebrow {
    display:block;
    margin-bottom:4px;
    color:#67e8f9;
    font-size:10px;
    font-weight:900;
    letter-spacing:.16em;
}

.cf-tutor-heading h2 {
    margin:0;
    color:#fff;
    font-size:20px;
}

.cf-tutor-heading p {
    margin:5px 0 0;
    color:#8fa5bd;
    font-size:13px;
    line-height:1.5;
}

.cf-tutor-close {
    width:34px;
    height:34px;
    border:1px solid #31445f;
    border-radius:9px;
    color:#aebdd0;
    background:#15243a;
    cursor:pointer;
    font-size:22px;
    line-height:1;
}

.cf-tutor-response {
    margin:18px;
    padding:18px;
    border:1px solid rgba(255,255,255,.07);
    border-radius:14px;
    background:rgba(5,11,19,.72);
}

.cf-tutor-response strong {
    color:#fff;
    font-size:14px;
}

.cf-tutor-response p {
    margin:7px 0 0;
    color:#aebdd0;
    font-size:13px;
    line-height:1.65;
}

.cf-tutor-actions {
    display:flex;
    align-items:center;
    gap:14px;
    padding:0 18px 18px;
}

.cf-tutor-primary {
    min-height:40px;
    padding:0 18px;
    border:0;
    border-radius:10px;
    color:#07101d;
    background:#67e8f9;
    cursor:pointer;
    font-weight:900;
}

.cf-tutor-safety {
    color:#788aa2;
    font-size:11px;
    line-height:1.45;
}

@media (max-width:620px) {

    .cf-tutor-button,
    .cf-run-button {
        flex:1;
    }

    .cf-tutor-panel {
        margin:12px;
    }

    .cf-tutor-heading {
        grid-template-columns:auto 1fr auto;
        padding:16px;
    }

    .cf-tutor-actions {
        align-items:stretch;
        flex-direction:column;
    }

    .cf-tutor-primary {
        width:100%;
    }
}

/*
 * R1S-G — Academy Tutor conversation UI
 * CodeForge presentation only.
 */

.cf-tutor-question {
    display: grid;
    gap: 8px;
    margin: 18px 0;
}

.cf-tutor-question label {
    font-weight: 700;
    color: #f4f8ff;
}

.cf-tutor-question-input {
    width: 100%;
    min-height: 88px;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid rgba(95, 218, 239, 0.28);
    border-radius: 14px;
    padding: 13px 15px;
    background: rgba(3, 12, 25, 0.78);
    color: #f5f8ff;
    font: inherit;
    line-height: 1.5;
    outline: none;
}

.cf-tutor-question-input::placeholder {
    color: rgba(220, 231, 246, 0.55);
}

.cf-tutor-question-input:focus {
    border-color: #5fdaef;
    box-shadow: 0 0 0 3px rgba(95, 218, 239, 0.12);
}

.cf-tutor-response h3 {
    margin: 0 0 10px;
}

.cf-tutor-response p {
    margin: 8px 0;
    line-height: 1.55;
}

.cf-tutor-response ol {
    margin: 8px 0 14px 22px;
    padding: 0;
}

.cf-tutor-response li {
    margin: 6px 0;
}

.cf-tutor-response pre {
    overflow-x: auto;
    margin: 8px 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
}

.cf-tutor-response code {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", monospace;
}

.cf-tutor-encouragement {
    opacity: 0.88;
}

/* ============================================================
   CodeForge Studio — My Learning return navigation
   CF-V1-UX-NAV-2
   ============================================================ */

.cf-studio-header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
}

.cf-studio-learning-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.cf-studio-learning-link:hover,
.cf-studio-learning-link:focus-visible {
    border-color: rgba(96, 165, 250, 0.65);
    background: rgba(59, 130, 246, 0.08);
}

.cf-studio-learning-link:active {
    transform: translateY(1px);
}

@media (max-width: 700px) {
    .cf-studio-header-actions {
        gap: 0.65rem;
    }

    .cf-studio-learning-link {
        min-height: 38px;
        padding: 0.5rem 0.7rem;
        font-size: 0.875rem;
    }
}

/* ============================================================
   CF-V1-RUNTIME-STDIN-I1
   Academy CodeForge — bounded Program Input
   ============================================================ */

.cf-program-input {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(7, 16, 29, 0.72);
}

.cf-program-input label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 9px;
}

.cf-program-input label span {
    color: #e8f3ff;
    font-size: 13px;
    font-weight: 800;
}

.cf-program-input label small {
    color: #8295aa;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}

.cf-program-input-field {
    display: block;
    width: 100%;
    min-height: 68px;
    resize: vertical;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid #263b55;
    border-radius: 10px;
    outline: none;
    color: #dfffe9;
    background: #06111d;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 13px;
    line-height: 1.5;
}

.cf-program-input-field::placeholder {
    color: #536a82;
}

.cf-program-input-field:focus {
    border-color: #67e8f9;
    box-shadow:
        0 0 0 3px rgba(103, 232, 249, 0.10);
}

@media (max-width: 700px) {
    .cf-program-input label {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .cf-program-input label small {
        text-align: left;
    }
}


/* ============================================================
   CF-V1-UX-M1 — STUDIO MASTERY JOURNEY
   ============================================================ */

.cf-mastery-journey {
    padding:18px 20px;
    border-bottom:1px solid #203047;
    background:
        radial-gradient(
            circle at 90% 0,
            rgba(34,211,238,.08),
            transparent 16rem
        ),
        linear-gradient(
            135deg,
            #0b1728,
            #0d1d32
        );
}

.cf-mastery-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}

.cf-mastery-heading > div {
    min-width:0;
}

.cf-mastery-eyebrow {
    display:block;
    margin-bottom:4px;
    color:#67e8f9;
    font-size:10px;
    font-weight:900;
    letter-spacing:.15em;
}

.cf-mastery-heading strong {
    display:block;
    color:#f3f7fc;
    font-size:14px;
}

.cf-mastery-count {
    flex:0 0 auto;
    padding:7px 11px;
    border:1px solid #2d4564;
    border-radius:999px;
    color:#aebdd0;
    background:#101f34;
    font-size:11px;
    font-weight:800;
}

.cf-mastery-journey[data-mastered="true"]
.cf-mastery-count {
    border-color:rgba(52,211,153,.38);
    color:#a7f3d0;
    background:rgba(52,211,153,.10);
}

.cf-mastery-track {
    display:grid;
    grid-template-columns:
        max-content minmax(22px,1fr)
        max-content minmax(22px,1fr)
        max-content;
    align-items:center;
    gap:10px;
    margin-top:16px;
}

.cf-mastery-stage {
    display:flex;
    align-items:center;
    gap:7px;
    color:#8192a9;
}

.cf-mastery-stage > span {
    width:25px;
    height:25px;
    display:grid;
    place-items:center;
    border:1px solid #31445f;
    border-radius:50%;
    background:#111f32;
    font-size:10px;
    font-weight:900;
}

.cf-mastery-stage strong {
    font-size:11px;
    letter-spacing:.02em;
}

.cf-mastery-line {
    height:2px;
    border-radius:999px;
    background:#25364e;
}

.cf-mastery-journey[data-mastered="true"]
.cf-mastery-stage {
    color:#d1fae5;
}

.cf-mastery-journey[data-mastered="true"]
.cf-mastery-stage > span {
    border-color:#34d399;
    color:#052e26;
    background:#34d399;
    box-shadow:0 0 0 4px rgba(52,211,153,.08);
}

.cf-mastery-journey[data-mastered="true"]
.cf-mastery-line {
    background:
        linear-gradient(
            90deg,
            #34d399,
            #22d3ee
        );
}

.cf-mastery-success {
    margin-top:16px;
    padding:14px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    border:1px solid rgba(52,211,153,.28);
    border-radius:14px;
    background:
        linear-gradient(
            135deg,
            rgba(52,211,153,.11),
            rgba(34,211,238,.06)
        );
}

.cf-mastery-success[hidden] {
    display:none;
}

.cf-mastery-success-mark {
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:12px;
    color:#052e26;
    background:#34d399;
    font-size:20px;
    font-weight:950;
    box-shadow:0 10px 28px rgba(52,211,153,.16);
}

.cf-mastery-success-copy {
    min-width:0;
}

.cf-mastery-success-copy span {
    display:block;
    color:#6ee7b7;
    font-size:9px;
    font-weight:950;
    letter-spacing:.14em;
}

.cf-mastery-success-copy strong {
    display:block;
    margin-top:2px;
    color:#f0fdf4;
    font-size:12px;
}

.cf-mastery-success-copy small {
    display:block;
    min-height:14px;
    margin-top:3px;
    color:#a7f3d0;
    font-size:10px;
    font-weight:800;
}

.cf-mastery-continue {
    min-height:36px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 13px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:10px;
    color:#071426;
    background:#fff;
    text-decoration:none;
    white-space:nowrap;
    font-size:11px;
    font-weight:900;
    transition:
        transform .16s ease,
        box-shadow .16s ease;
}

.cf-mastery-continue:hover,
.cf-mastery-continue:focus-visible {
    transform:translateY(-1px);
    box-shadow:0 10px 26px rgba(0,0,0,.22);
}

@media (max-width:620px) {
    .cf-mastery-journey {
        padding:16px 14px;
    }

    .cf-mastery-heading {
        align-items:flex-start;
        flex-direction:column;
        gap:10px;
    }

    .cf-mastery-track {
        grid-template-columns:1fr;
        gap:7px;
    }

    .cf-mastery-line {
        width:2px;
        height:12px;
        margin-left:12px;
    }

    .cf-mastery-success {
        grid-template-columns:auto 1fr;
    }

    .cf-mastery-continue {
        grid-column:1 / -1;
        width:100%;
    }
}

/* ==========================================================
   CF-V1-PROJECTLAB-M2H-4B
   Project Lab identity contrast
   Scoped exclusively to Project Lab Studio stages.
   ========================================================== */

.cf-project-lab-journey .cf-project-lab-stage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
}

.cf-project-lab-journey .cf-project-lab-stage > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.cf-project-lab-journey .cf-project-lab-stage span {
    color: #7dd3fc;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.cf-project-lab-journey .cf-project-lab-stage strong {
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.cf-project-lab-journey .cf-project-lab-stage small {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .cf-project-lab-journey .cf-project-lab-stage {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .cf-project-lab-journey .cf-project-lab-stage small {
        white-space: normal;
    }
}

