/* ==========================================================================
   CodeFun — Stylesheet
   Typography: Bricolage Grotesque (display) + Manrope (body) + JetBrains Mono
   Designed with breathing room. No squeezed fonts.
   ========================================================================== */

:root {
    --bg: #08080f;
    --bg-2: #0f0f1a;
    --bg-3: #1a1a2e;
    --text: #ffffff;
    --text-2: rgba(255,255,255,0.72);
    --text-3: rgba(255,255,255,0.55);
    --text-4: rgba(255,255,255,0.35);
    --line: rgba(255,255,255,0.08);
    --line-2: rgba(255,255,255,0.14);

    --primary: #6c63ff;
    --primary-2: #3d5af1;
    --orange: #ff6b35;
    --orange-2: #f7c59f;
    --teal: #00d4aa;

    --max: 1240px;
    --pad: clamp(20px, 4vw, 40px);
    --r-sm: 14px;
    --r-md: 20px;
    --r-lg: 28px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;             /* generous line-height — no squeezing */
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Display typography ---------- */
h1, h2, h3, h4, .display {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    line-height: 1.1;             /* tight for big text */
    letter-spacing: -0.025em;     /* tightens display headlines */
}

p { margin-bottom: 1.4em; line-height: 1.75; }
p:last-child { margin-bottom: 0; }

code, pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    line-height: 1.7;
}

/* ---------- Layout ---------- */
.cf-wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.cf-section { padding: clamp(60px, 10vw, 110px) 0; }
.cf-section--tight { padding: clamp(40px, 6vw, 70px) 0; }

/* ---------- Navigation ---------- */
.cf-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(8,8,15,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--line);
    transition: padding 0.25s ease;
}
.cf-nav__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.cf-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}
.cf-logo__icon {
    background: linear-gradient(135deg, var(--primary), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 22px;
}
.cf-logo__text em {
    background: linear-gradient(90deg, var(--primary), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
}
.cf-nav__links {
    display: flex;
    gap: 36px;
}
.cf-nav__links a {
    color: var(--text-3);
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    position: relative;
}
.cf-nav__links a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 50%;
    width: 0; height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.cf-nav__links a:hover { color: var(--text); }
.cf-nav__links a:hover::after { width: 100%; }

.cf-nav__menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.cf-nav__menu span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.25s;
}
.cf-nav__mobile {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 16px var(--pad) 24px;
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}
.cf-nav__mobile a {
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
    background: rgba(255,255,255,0.03);
    transition: all 0.2s;
}
.cf-nav__mobile.is-open { display: flex; }

@media (max-width: 760px) {
    .cf-nav__links { display: none; }
    .cf-nav__menu { display: flex; }
}

/* ---------- Hero ---------- */
.cf-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 140px var(--pad) 80px;
    overflow: hidden;
}

.cf-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    animation: cf-float 20s ease-in-out infinite;
}
.cf-orb--1 { width: 700px; height: 700px; background: radial-gradient(var(--primary), var(--primary-2)); top: -200px; left: -250px; }
.cf-orb--2 { width: 550px; height: 550px; background: radial-gradient(var(--orange), var(--orange-2)); top: -100px; right: -200px; animation-delay: -7s; }
.cf-orb--3 { width: 450px; height: 450px; background: radial-gradient(var(--teal), #00ff88); bottom: -150px; left: 40%; animation-delay: -14s; }

@keyframes cf-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

.cf-hero__content {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
}

.cf-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(108,99,255,0.12);
    border: 1px solid rgba(108,99,255,0.28);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(20px);
    animation: cf-rise 0.8s ease 0.1s forwards;
}
.cf-badge__dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--primary);
    animation: cf-pulse 2s ease-in-out infinite;
}

@keyframes cf-pulse { 50% { opacity: 0.5; } }
@keyframes cf-rise {
    to { opacity: 1; transform: translateY(0); }
}

.cf-hero h1 {
    font-size: clamp(40px, 8vw, 88px);
    line-height: 1.04;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(30px);
    animation: cf-rise 0.9s ease 0.2s forwards;
}
.cf-hero h1 .cf-grad {
    background: linear-gradient(135deg, var(--primary), var(--orange), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cf-hero__sub {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-3);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.7;
    opacity: 0;
    animation: cf-rise 1s ease 0.3s forwards;
}

.cf-search {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
    opacity: 0;
    animation: cf-rise 1s ease 0.4s forwards;
}
.cf-search input {
    width: 100%;
    padding: 20px 28px 20px 56px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 60px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.cf-search input:focus {
    border-color: rgba(108,99,255,0.5);
    background: rgba(108,99,255,0.06);
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
}
.cf-search input::placeholder { color: var(--text-4); }
.cf-search__icon {
    position: absolute;
    left: 22px; top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

/* Stats */
.cf-stats {
    display: flex;
    justify-content: center;
    gap: clamp(28px, 6vw, 70px);
    flex-wrap: wrap;
    margin-top: 60px;
    opacity: 0;
    animation: cf-rise 1s ease 0.5s forwards;
}
.cf-stat__num {
    font-family: 'Bricolage Grotesque', serif;
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.cf-stat__lbl {
    font-size: 11.5px;
    color: var(--text-4);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 500;
}

/* ---------- Section header ---------- */
.cf-shead { text-align: center; margin-bottom: 56px; }
.cf-shead__eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.cf-shead h2 {
    font-size: clamp(30px, 4.5vw, 52px);
    margin-bottom: 14px;
}
.cf-shead h2 .cf-grad {
    background: linear-gradient(90deg, var(--primary), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cf-shead p {
    color: var(--text-3);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Filter chips ---------- */
.cf-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
}
.cf-chip {
    padding: 10px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    border-radius: 30px;
    color: var(--text-3);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.cf-chip:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.cf-chip.is-active {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: var(--text);
}

/* ---------- Language card ---------- */
.cf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.cf-card {
    display: block;
    padding: 28px 26px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.cf-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--card-color, var(--primary)), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.cf-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-color, var(--primary));
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px var(--card-glow, rgba(108,99,255,0.15));
}
.cf-card:hover::before { opacity: 0.08; }

.cf-card__badge {
    position: absolute;
    top: 16px; right: 16px;
    padding: 4px 12px;
    background: linear-gradient(90deg, var(--orange), var(--orange-2));
    color: #1a0a00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    border-radius: 20px;
    text-transform: uppercase;
}

.cf-card__icon {
    font-size: 38px;
    margin-bottom: 16px;
    display: inline-block;
}
.cf-card__name {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.cf-card__cat {
    font-size: 11px;
    color: var(--card-color, var(--primary));
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.cf-card__desc {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.65;
    margin-bottom: 20px;
}
.cf-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cf-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: var(--text-3);
}
.cf-tag--salary {
    background: rgba(108,99,255,0.15);
    color: #a8a3ff;
    border: 1px solid rgba(108,99,255,0.3);
}

/* ---------- Language detail page ---------- */
.cf-lang-hero {
    padding: 140px var(--pad) 60px;
    position: relative;
    overflow: hidden;
}
.cf-lang-hero__inner {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.cf-crumbs {
    display: flex;
    gap: 8px;
    color: var(--text-4);
    font-size: 13px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.cf-crumbs a { color: var(--text-3); }
.cf-crumbs a:hover { color: var(--text); }
.cf-crumbs span { color: var(--text-4); }

.cf-lang-hero__top {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.cf-lang-hero__icon {
    font-size: 64px;
    line-height: 1;
}
.cf-lang-hero__title h1 {
    font-size: clamp(36px, 6vw, 62px);
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}
.cf-lang-hero__cat {
    color: var(--lang-color, var(--primary));
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.cf-lang-tagline {
    font-size: clamp(18px, 2.4vw, 24px);
    color: var(--text-2);
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 36px;
    max-width: 760px;
    letter-spacing: -0.005em;
}

.cf-lang-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 28px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 56px;
}
.cf-lang-stat__lbl {
    font-size: 11px;
    color: var(--text-4);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}
.cf-lang-stat__val {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

/* Article body */
.cf-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--pad);
}
.cf-article h2 {
    font-size: clamp(26px, 3.5vw, 36px);
    margin: 56px 0 20px;
}
.cf-article h2:first-child { margin-top: 0; }
.cf-article p {
    font-size: 17px;
    line-height: 1.85;        /* very generous for reading */
    color: var(--text-2);
    margin-bottom: 1.5em;
}
.cf-article ul {
    margin: 0 0 28px 0;
    padding-left: 0;
}
.cf-article li {
    padding: 12px 0 12px 28px;
    border-bottom: 1px solid var(--line);
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.6;
    position: relative;
}
.cf-article li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--lang-color, var(--primary));
    font-weight: 700;
}
.cf-article li:last-child { border-bottom: 0; }

.cf-callout {
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(247,197,159,0.05));
    border: 1px solid rgba(255,107,53,0.25);
    border-left: 4px solid var(--orange);
    border-radius: var(--r-sm);
    margin: 32px 0 40px;
}
.cf-callout__lbl {
    font-size: 11px;
    color: var(--orange);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}
.cf-callout p {
    color: var(--text);
    font-size: 16px;
    margin: 0;
    line-height: 1.7;
}

/* Code block */
.cf-code {
    background: #0d1117;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 28px 28px;
    margin: 32px 0;
    overflow-x: auto;
}
.cf-code__lbl {
    font-size: 11px;
    color: var(--text-4);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 600;
}
.cf-code pre {
    color: #a8ff78;
    margin: 0;
    white-space: pre;
    font-size: 13.5px;
    line-height: 1.75;
}

/* Platform pills inside language pages */
.cf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 40px;
}
.cf-pill {
    padding: 10px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    transition: all 0.2s;
}
.cf-pill:hover {
    background: var(--lang-color, var(--primary));
    border-color: transparent;
    color: var(--text);
    transform: translateY(-2px);
}

/* Related grid */
.cf-related {
    margin: 80px 0 0;
    padding: 56px 0;
    border-top: 1px solid var(--line);
}
.cf-related h3 {
    text-align: center;
    font-size: clamp(22px, 3vw, 30px);
    margin-bottom: 32px;
}

/* ---------- Apps section ---------- */
.cf-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.cf-app {
    padding: 24px 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.cf-app:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-3px);
    border-color: var(--line-2);
}
.cf-app__icon { font-size: 32px; margin-bottom: 14px; }
.cf-app__name {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.cf-app__stack {
    font-size: 12.5px;
    color: var(--app-color, var(--primary));
    font-weight: 600;
    line-height: 1.5;
}

/* ---------- CTA banner ---------- */
.cf-cta {
    text-align: center;
    padding: clamp(56px, 8vw, 88px) clamp(28px, 5vw, 56px);
    background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(255,107,53,0.08));
    border: 1px solid rgba(108,99,255,0.22);
    border-radius: var(--r-lg);
    margin: 80px 0 0;
}
.cf-cta h2 {
    font-size: clamp(28px, 4.5vw, 50px);
    margin-bottom: 20px;
    line-height: 1.15;
}
.cf-cta p {
    color: var(--text-3);
    font-size: 17px;
    max-width: 540px;
    margin: 0 auto 36px;
}
.cf-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    border-radius: 50px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(108,99,255,0.4);
    transition: all 0.25s;
}
.cf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(108,99,255,0.5);
}
.cf-btn--ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line-2);
    box-shadow: none;
    margin-left: 8px;
}
.cf-btn--ghost:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: none;
}

/* ---------- Footer ---------- */
.cf-foot {
    padding: 80px 0 40px;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    margin-top: 80px;
}
.cf-foot__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}
.cf-foot__brand p {
    color: var(--text-3);
    font-size: 14.5px;
    line-height: 1.7;
    margin-top: 18px;
}
.cf-foot__credit { color: var(--text-4) !important; font-size: 13px !important; }
.cf-foot__credit a { color: var(--primary); }
.cf-foot__col h4 {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 18px;
}
.cf-foot__col li { margin-bottom: 11px; }
.cf-foot__col a {
    color: var(--text-3);
    font-size: 14.5px;
    transition: color 0.2s;
}
.cf-foot__col a:hover { color: var(--primary); }

.cf-foot__bottom {
    max-width: var(--max);
    margin: 56px auto 0;
    padding: 28px var(--pad) 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--text-4);
    font-size: 13px;
}
.cf-foot__bottom p { margin: 0; }

@media (max-width: 760px) {
    .cf-foot__inner { grid-template-columns: 1fr; gap: 36px; }
    .cf-foot__bottom { justify-content: flex-start; }
}

/* ---------- About page ---------- */
.cf-about {
    padding: 140px var(--pad) 60px;
    max-width: 760px;
    margin: 0 auto;
}
.cf-about h1 {
    font-size: clamp(40px, 6vw, 64px);
    margin-bottom: 28px;
    line-height: 1.05;
}

/* ---------- Quiz ---------- */
.cf-quiz {
    padding: 140px var(--pad) 60px;
    max-width: 760px;
    margin: 0 auto;
}
.cf-quiz__q {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 32px 28px;
    margin-bottom: 16px;
}
.cf-quiz__q h3 {
    font-size: 20px;
    margin-bottom: 18px;
}
.cf-quiz__opts {
    display: grid;
    gap: 10px;
}
.cf-quiz__opt {
    padding: 14px 22px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-2);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    width: 100%;
}
.cf-quiz__opt:hover {
    background: rgba(108,99,255,0.1);
    border-color: var(--primary);
    color: var(--text);
}
.cf-quiz__opt.is-selected {
    background: rgba(108,99,255,0.15);
    border-color: var(--primary);
    color: var(--text);
}
.cf-quiz__result {
    text-align: center;
    padding: 48px 28px;
    background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(0,212,170,0.06));
    border: 1px solid rgba(108,99,255,0.25);
    border-radius: var(--r-lg);
    margin-top: 24px;
}
.cf-quiz__result.is-hidden { display: none; }
.cf-quiz__result__icon { font-size: 56px; margin-bottom: 16px; }
.cf-quiz__result h3 {
    font-size: 30px;
    margin-bottom: 14px;
}
.cf-quiz__result p {
    color: var(--text-3);
    margin-bottom: 24px;
    font-size: 16px;
}

/* ---------- Utility classes ---------- */
.cf-mt-lg { margin-top: 56px; }
.cf-tx-center { text-align: center; }

/* ---------- Mobile refinements ---------- */
@media (max-width: 600px) {
    body { font-size: 15.5px; }
    .cf-grid { grid-template-columns: 1fr; gap: 18px; }
    .cf-card { padding: 24px 22px; }
    .cf-lang-stats { padding: 22px; }
    .cf-article p { font-size: 16px; }
    .cf-code { padding: 22px 18px; }
}

/* ---------- Print ---------- */
@media print {
    .cf-nav, .cf-foot, .cf-orb { display: none !important; }
    body { background: white; color: black; }
}

/* ============================================================
   v2 ADDITIONS — TL;DR, Author, FAQ, HowTo, Sources, Playground,
   Compare, Salary Calculator, Button variants
   ============================================================ */

/* ---- Button size variants ---- */
.cf-btn--xs { padding: 8px 14px; font-size: 13px; }
.cf-btn--sm { padding: 11px 20px; font-size: 14px; }
.cf-btn--lg { padding: 18px 36px; font-size: 17px; }

/* ---- TL;DR (featured snippet bait) ---- */
.cf-tldr {
    background: rgba(108,99,255,0.08);
    border-left: 4px solid var(--lang-color, var(--primary));
    border-radius: 0 14px 14px 0;
    padding: 22px 26px;
    margin: 32px 0 24px;
}
.cf-tldr__lbl {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lang-color, var(--primary));
    margin-bottom: 10px;
}
.cf-tldr p {
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-2);
}

/* ---- Author block ---- */
.cf-author {
    display: flex;
    gap: 22px;
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    margin: 28px 0;
}
.cf-author__avatar {
    flex: 0 0 64px;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Bricolage Grotesque', serif;
    font-size: 22px;
    font-weight: 800;
}
.cf-author__body { flex: 1; min-width: 0; }
.cf-author__top {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.cf-author__name {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-1);
}
.cf-author__name span { color: var(--primary); }
.cf-author__role {
    font-size: 13px;
    color: var(--text-4);
    font-weight: 500;
}
.cf-author__bio {
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.65;
    margin: 8px 0 14px;
}
.cf-author__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12.5px;
    color: var(--text-4);
    margin-bottom: 12px;
}
.cf-author__meta strong { color: var(--text-2); font-weight: 600; }
.cf-author__links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
}
.cf-author__links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.cf-author__links a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .cf-author { flex-direction: column; padding: 22px; }
    .cf-author__avatar { width: 52px; height: 52px; flex: 0 0 52px; font-size: 18px; }
}

/* ---- HowTo numbered list ---- */
.cf-howto {
    list-style: none;
    counter-reset: cf-howto;
    padding: 0;
    margin: 18px 0 28px;
}
.cf-howto li {
    counter-increment: cf-howto;
    padding: 20px 22px 20px 70px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--lang-color, var(--primary));
    border-radius: 0 12px 12px 0;
    position: relative;
    line-height: 1.7;
}
.cf-howto li::before {
    content: counter(cf-howto);
    position: absolute;
    left: 22px; top: 18px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--lang-color, var(--primary));
    color: white;
    font-family: 'Bricolage Grotesque', serif;
    font-size: 16px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.cf-howto strong { display: block; color: var(--text-1); margin-bottom: 4px; font-size: 16px; }
.cf-howto span { color: var(--text-3); font-size: 15px; }

/* ---- FAQ section ---- */
.cf-faq {
    margin: 18px 0 28px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.cf-faq__item {
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: background 0.2s;
}
.cf-faq__item[open] {
    background: rgba(255,255,255,0.02);
}
.cf-faq__q {
    cursor: pointer;
    padding: 20px 24px 20px 16px;
    font-family: 'Bricolage Grotesque', serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    position: relative;
    list-style: none;
    transition: color 0.2s;
}
.cf-faq__q::-webkit-details-marker { display: none; }
.cf-faq__q::after {
    content: '+';
    position: absolute;
    right: 18px; top: 18px;
    font-size: 24px;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.2s;
}
.cf-faq__item[open] .cf-faq__q::after { content: '−'; }
.cf-faq__q:hover { color: var(--primary); }
.cf-faq__a {
    padding: 0 24px 22px 16px;
    color: var(--text-3);
    line-height: 1.75;
    font-size: 15.5px;
}

/* ---- Sources ---- */
.cf-sources {
    list-style: none;
    padding: 0;
    margin: 16px 0 8px;
}
.cf-sources li {
    padding: 14px 18px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    color: var(--text-3);
    font-size: 14.5px;
    line-height: 1.65;
}
.cf-sources strong { color: var(--text-1); font-weight: 700; }
.cf-sources a { color: var(--primary); text-decoration: none; }
.cf-sources a:hover { text-decoration: underline; }

/* ---- Quick action button row (under hero stats) ---- */
.cf-lang-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* ---- Playground ---- */
.cf-pg-main { padding-bottom: 0; }

.cf-pg-hero {
    padding-top: 60px;
    padding-bottom: 0;
    position: relative;
}

.cf-pg-langs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 14px;
    scrollbar-width: thin;
}
.cf-pg-lang {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}
.cf-pg-lang:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--card-color, var(--primary));
    transform: translateY(-1px);
}
.cf-pg-lang.is-current {
    background: var(--card-color, var(--primary));
    border-color: var(--card-color, var(--primary));
    color: white;
}

.cf-editor-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
    min-height: 420px;
}
@media (max-width: 900px) {
    .cf-editor-wrap { grid-template-columns: 1fr; }
}

.cf-editor, .cf-output {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cf-editor__bar {
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.cf-editor__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--text-3);
    font-weight: 600;
}
.cf-editor__btns { display: flex; gap: 8px; }
#cfEditor { flex: 1; min-height: 380px; }
#cfEditor .CodeMirror { height: 100% !important; min-height: 380px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }

.cf-output__body {
    flex: 1;
    padding: 16px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-2);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 380px;
}
.cf-output__hint { color: var(--text-4); font-style: italic; }
.cf-output__preview {
    width: 100%;
    height: 380px;
    border: none;
    background: white;
}
.cf-output__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.cf-output__table th, .cf-output__table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cf-output__table th { background: rgba(108,99,255,0.15); color: var(--primary); font-weight: 700; }

.cf-pg-status {
    margin: 14px 0;
    padding: 12px 16px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 10px;
    color: #f59e0b;
    font-size: 13.5px;
    font-weight: 500;
}

.cf-pg-static {
    text-align: center;
    padding: 60px 30px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    max-width: 720px;
    margin: 0 auto;
}
.cf-pg-static__icon { font-size: 80px; margin-bottom: 18px; }
.cf-pg-static h2 { font-family: 'Bricolage Grotesque', serif; font-size: 28px; margin-bottom: 14px; letter-spacing: -0.02em; }
.cf-pg-static p { color: var(--text-3); margin-bottom: 28px; font-size: 16px; line-height: 1.7; }
.cf-pg-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.cf-pg-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.cf-pg-example {
    text-align: left;
    padding: 18px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.cf-pg-example:hover {
    background: rgba(108,99,255,0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.cf-pg-example strong {
    display: block;
    font-family: 'Bricolage Grotesque', serif;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-1);
}
.cf-pg-example pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-4);
    margin: 0;
    white-space: pre-wrap;
    overflow: hidden;
    line-height: 1.5;
}

/* ---- Compare page ---- */
.cf-cmp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0 24px;
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    overflow: hidden;
}
.cf-cmp-table th, .cf-cmp-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 14.5px;
}
.cf-cmp-table th {
    background: rgba(108,99,255,0.12);
    color: var(--text-1);
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 700;
    font-size: 13.5px;
}
.cf-cmp-table td:first-child { color: var(--text-3); font-weight: 500; }
.cf-cmp-table tr:last-child td { border-bottom: none; }
@media (max-width: 600px) {
    .cf-cmp-table th, .cf-cmp-table td { padding: 11px 12px; font-size: 13px; }
}

.cf-cmp-verdict {
    background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(255,107,53,0.08));
    border: 1px solid rgba(108,99,255,0.25);
    border-radius: 18px;
    padding: 26px 28px;
    margin: 28px 0;
}
.cf-cmp-verdict__lbl {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}
.cf-cmp-verdict p { margin: 0; font-size: 17px; line-height: 1.75; color: var(--text-1); }

.cf-cmp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 24px 0 32px;
}
@media (max-width: 700px) {
    .cf-cmp-grid { grid-template-columns: 1fr; }
}
.cf-cmp-pick {
    padding: 26px;
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.07);
    border-radius: 18px;
}
.cf-cmp-pick__head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
}
.cf-cmp-pick__head span { font-size: 28px; }
.cf-cmp-pick ul { padding-left: 22px; margin: 0 0 6px; }
.cf-cmp-pick li {
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ---- Salary calculator ---- */
.cf-calc {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 28px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    margin-top: 12px;
}
@media (max-width: 800px) {
    .cf-calc { grid-template-columns: 1fr 1fr; }
    .cf-calc .cf-btn { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
    .cf-calc { grid-template-columns: 1fr; padding: 22px; }
}
.cf-calc__field { display: flex; flex-direction: column; gap: 7px; }
.cf-calc__field label {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    letter-spacing: 0.02em;
}
.cf-calc__field select {
    padding: 12px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-1);
    font-family: 'Manrope', sans-serif;
    font-size: 14.5px;
    cursor: pointer;
    transition: border 0.2s;
}
.cf-calc__field select:focus {
    outline: none;
    border-color: var(--primary);
}

.cf-calc-result {
    margin-top: 28px;
    padding: 32px 28px;
    background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(255,107,53,0.08));
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: 20px;
    text-align: center;
}
.cf-calc-result.is-hidden { display: none; }
.cf-calc-result__icon { font-size: 44px; margin-bottom: 12px; }
.cf-calc-result__top { color: var(--text-3); font-size: 14.5px; margin-bottom: 14px; }
.cf-calc-result__top strong { color: var(--text-1); }
.cf-calc-result__big {
    font-family: 'Bricolage Grotesque', serif;
    font-size: clamp(38px, 7vw, 58px);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #6c63ff, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1.1;
}
.cf-calc-result__sub { color: var(--text-3); font-size: 15px; margin-bottom: 4px; }
.cf-calc-result__hr {
    border: none;
    border-top: 1px dashed rgba(255,255,255,0.15);
    margin: 24px 0 16px;
}
.cf-calc-result__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14.5px;
}
.cf-calc-result__row span { color: var(--text-3); }
.cf-calc-result__row strong { color: var(--text-1); font-family: 'Bricolage Grotesque', serif; font-size: 16px; }
.cf-calc-result__note {
    margin-top: 18px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    color: var(--text-4);
    font-size: 12.5px;
    line-height: 1.6;
    text-align: left;
}

/* ---- v2 mobile refinements ---- */
@media (max-width: 600px) {
    .cf-tldr { padding: 18px 20px; }
    .cf-tldr p { font-size: 15px; }
    .cf-faq__q { font-size: 15.5px; padding: 16px 38px 16px 14px; }
    .cf-faq__q::after { right: 14px; top: 14px; }
    .cf-faq__a { padding: 0 14px 18px 14px; font-size: 14.5px; }
    .cf-howto li { padding: 18px 18px 18px 60px; }
    .cf-howto li::before { left: 18px; top: 16px; width: 28px; height: 28px; font-size: 14px; }
    .cf-cmp-verdict { padding: 22px; }
    .cf-cmp-verdict p { font-size: 15.5px; }
    .cf-pg-hero { padding-top: 40px; }
    .cf-editor-wrap { min-height: auto; }
    .cf-output__body, #cfEditor { min-height: 280px; }
    .cf-output__preview { height: 300px; }
}
