/* ==========================================================================
   Site styles — no external fonts or frameworks, so pages load fast.
   ========================================================================== */
:root {
    --c-brand: #2448c9;
    --c-brand-dark: #1a3594;
    --c-brand-soft: #e8edfc;
    --c-accent: #ffb547;
    --c-accent-dark: #9a6200;
    --c-violet: #7c3aed;
    --c-pink: #ec4899;
    --c-cyan: #06b6d4;
    --c-bg: #f6f8fd;
    --c-surface: #ffffff;
    --c-alt: #eef2fa;
    --c-text: #161d33;
    --c-muted: #566079;
    --c-border: #dfe4f0;
    --grad: linear-gradient(120deg, #2448c9 0%, #5b3df0 55%, #b832d8 100%);
    --grad-warm: linear-gradient(100deg, #ffd166 0%, #ff9f6b 50%, #ff7eb3 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(22, 29, 51, .05), 0 8px 24px rgba(36, 72, 201, .08);
    --shadow-lg: 0 18px 50px rgba(36, 72, 201, .18);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Headings: the same sans stack, heavy and tight (the engine's serif slot). */
    --font-serif: var(--font);
    --w: 1180px;
    --w-narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--c-text); background: var(--c-bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-brand); text-underline-offset: 3px; }
a:hover { color: var(--c-brand-dark); }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.025em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--w)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--w-narrow)); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--c-brand); color: #fff; padding: .5em 1em; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.muted { color: var(--c-muted); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--c-accent-dark); margin-bottom: .6em; }
.lead { font-size: 1.12rem; color: var(--c-muted); max-width: 62ch; }
.empty { padding: 2rem; background: var(--c-surface); border: 1px dashed var(--c-border); border-radius: var(--radius); }

/* Buttons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .75em 1.35em; border-radius: 999px; border: 2px solid transparent; font: 700 .97rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(91, 61, 240, .28); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(91, 61, 240, .38); }
.btn-ghost { background: transparent; color: var(--c-brand); border-color: var(--c-brand); }
.btn-ghost:hover { background: var(--c-brand-soft); transform: translateY(-2px); }
.btn-text, .icon-btn { background: none; border: 0; font: 600 .95rem var(--font); color: var(--c-text); cursor: pointer; text-decoration: none; padding: .5em .6em; border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: .3em; }
.btn-text:hover, .icon-btn:hover { background: var(--c-alt); color: var(--c-text); }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--c-border); }
.site-header::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, #2448c9, #7c3aed, #ec4899, #f59e0b, #10b981, #06b6d4); }
.header-row { display: flex; align-items: center; gap: 1.2rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; color: var(--c-text); text-decoration: none; letter-spacing: -.02em; }
.logo:hover { color: var(--c-text); }
.logo-first { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo--light .logo-first { background: none; color: #fff; }
.logo--light, .logo--light:hover { color: #fff; }
.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { display: block; padding: .42em .85em; border-radius: 999px; color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .93rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--c-brand-soft); color: var(--c-brand-dark); }
.header-actions { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.menu-toggle { display: none; }
.topics-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.topics-menu { border-top: 1px solid var(--c-border); background: var(--c-surface); box-shadow: var(--shadow); max-height: 70vh; overflow: auto; }
.topics-menu-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0 .5rem; }
.topics-menu-grid { list-style: none; margin: 0; padding: 0 0 1.2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .25rem 1rem; }
.topics-menu-grid a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45em .6em; border-radius: var(--radius-sm); color: var(--c-text); text-decoration: none; }
.topics-menu-grid a span { display: inline-flex; align-items: center; gap: .55em; }
.topics-menu-grid a .ui-icon { color: var(--tc, var(--c-brand)); }
.topics-menu-grid a:hover { background: var(--c-brand-soft); background: color-mix(in srgb, var(--tc, #2448c9) 10%, #fff); }
.topics-menu-grid small { color: var(--c-muted); }

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6rem); color: #fff;
    background: radial-gradient(700px 420px at 88% 8%, rgba(236, 72, 153, .45) 0%, transparent 62%), radial-gradient(760px 520px at 6% 110%, rgba(6, 182, 212, .42) 0%, transparent 62%), linear-gradient(135deg, #18237a 0%, #2448c9 45%, #6236ee 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 90%); mask-image: linear-gradient(to bottom, #000 0%, transparent 90%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; z-index: -1; background: var(--c-bg); clip-path: ellipse(75% 100% at 50% 100%); }
.hero-blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(48px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.hero-blob--a { width: 340px; height: 340px; right: 8%; top: -120px; background: #ff8fab; }
.hero-blob--b { width: 300px; height: 300px; left: -80px; bottom: -120px; background: #3ee0ff; animation-delay: -6s; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .45em; padding: .45em 1em; border-radius: 999px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); color: #ffe2a3; letter-spacing: .1em; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 850; letter-spacing: -.035em; color: #fff; }
.hero h1 .hl { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: rgba(255, 255, 255, .84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 2rem; }
.hero .btn-primary { background: var(--grad-warm); color: #23123d; box-shadow: 0 8px 24px rgba(255, 126, 179, .35); }
.hero .btn-primary:hover { color: #23123d; box-shadow: 0 12px 30px rgba(255, 126, 179, .5); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.stats { list-style: none; padding: 0; margin: 0; display: flex; gap: .8rem; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 1.6rem; line-height: 1.1; color: var(--c-brand); font-weight: 850; }
.stats span { color: var(--c-muted); font-size: .9rem; }
.hero .stats li { padding: .6rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.hero .stats strong { color: #fff; }
.hero .stats span { color: rgba(255, 255, 255, .75); }
.stats--boxed { justify-content: space-between; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.2rem 1.6rem; margin: 1.5rem 0 2rem; box-shadow: var(--shadow); }
.stats--boxed strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-visual { position: relative; padding: 1.6rem 0; }
.hero-card { position: relative; background: rgba(255, 255, 255, .97); color: var(--c-text); border-radius: 20px; box-shadow: 0 30px 70px rgba(10, 16, 60, .35); overflow: hidden; transform: rotate(-1.2deg); transition: transform .3s; }
.hero-card:hover { transform: rotate(0deg) translateY(-3px); }
.browser-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: #f1f3fa; border-bottom: 1px solid var(--c-border); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff6b6b; } .dot--y { background: #ffc145; } .dot--g { background: #34d399; }
.browser-url { flex: 1; margin-left: .6rem; padding: .25rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--c-border); color: var(--c-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card-body { padding: 1.3rem 1.4rem 1.4rem; }
.hero-card-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--c-muted); margin: 0 0 .7rem; }
.hero-feature { display: grid; gap: .35rem; margin-top: .3rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--c-brand-soft); background: linear-gradient(135deg, color-mix(in srgb, var(--tc, #2448c9) 14%, #fff), color-mix(in srgb, var(--tc, #2448c9) 4%, #fff)); border: 1px solid color-mix(in srgb, var(--tc, #2448c9) 25%, #fff); color: var(--c-text); text-decoration: none; transition: transform .15s; }
.hero-feature strong { font-size: 1.08rem; line-height: 1.35; }
.hero-feature:hover { transform: translateX(3px); color: var(--c-text); }
.hero-feature:hover strong { color: var(--tc-ink, var(--c-brand-dark)); }
.float-badge { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .4em; padding: .5em .9em; border-radius: 999px; background: #fff; color: var(--c-text); font-size: .82rem; font-weight: 800; box-shadow: 0 12px 30px rgba(10, 16, 60, .25); animation: float 5s ease-in-out infinite; white-space: nowrap; }
.float-badge--code { top: -2px; right: -10px; color: #be123c; }
.float-badge--speed { bottom: 4px; left: -22px; color: #6d28d9; animation-delay: -1.8s; }
.float-badge--fresh { bottom: 46%; right: -26px; color: #047857; animation-delay: -3.2s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.15); } }

/* Chips & pills ------------------------------------------------------------- */
.chips { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4em; padding: .38em .9em; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text); text-decoration: none; font-size: .92rem; font-weight: 600; }
.chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.chip small { color: var(--c-muted); font-weight: 500; }
.chip--topic .ui-icon { color: var(--tc); }
.chip--topic:hover { border-color: var(--tc); color: var(--tc-ink); background: color-mix(in srgb, var(--tc) 9%, #fff); transform: translateY(-1px); }
.chip { transition: transform .15s, background .15s, border-color .15s; }
.pill { display: inline-flex; align-items: center; gap: .4em; padding: .3em .85em; border-radius: 999px; background: var(--c-brand-soft); background: color-mix(in srgb, var(--tc, #2448c9) 13%, #fff); color: var(--tc-ink, var(--c-brand-dark)); font-size: .8rem; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.pill:hover { color: var(--tc-ink, var(--c-brand-dark)); background: color-mix(in srgb, var(--tc, #2448c9) 20%, #fff); }

/* Sections ---------------------------------------------------------------- */
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-alt { background: radial-gradient(900px 340px at 100% 0%, #efe8ff 0%, transparent 70%), radial-gradient(800px 340px at 0% 100%, #e0f6ff 0%, transparent 70%), var(--c-alt); }
.section-title { position: relative; }
.section-head .section-title::after, .with-sidebar > div > .section-title::after { content: ""; display: block; width: 46px; height: 4px; margin-top: .45rem; border-radius: 4px; background: var(--grad); }
.section-title.center::after { content: ""; display: block; width: 46px; height: 4px; margin: .5rem auto 0; border-radius: 4px; background: var(--grad); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; }
.section-head a { font-weight: 600; text-decoration: none; }
.section-title { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 1rem; }
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.page-head { padding: 2rem 0 1.5rem; }

.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.topic-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1.2rem 1.25rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); text-decoration: none; color: var(--c-text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.topic-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tc, var(--c-brand)); transform: scaleX(.25); transform-origin: left; transition: transform .25s; }
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px color-mix(in srgb, var(--tc, #2448c9) 22%, transparent); border-color: color-mix(in srgb, var(--tc, #2448c9) 45%, #fff); color: var(--c-text); }
.topic-card:hover::before { transform: scaleX(1); }
.topic-card span { color: var(--c-muted); font-size: .9rem; }
.topic-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: .55rem; border-radius: 13px; color: var(--tc-ink, var(--c-brand)); background: var(--c-brand-soft); background: color-mix(in srgb, var(--tc, #2448c9) 14%, #fff); transition: transform .2s, background .2s, color .2s; }
.topic-card:hover .topic-icon { transform: rotate(-6deg) scale(1.08); background: var(--tc, var(--c-brand)); color: #fff; }
.topic-icon--lg { width: 52px; height: 52px; margin: 0 .8rem 0 0; vertical-align: middle; border-radius: 15px; background: var(--tc, var(--c-brand)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--tc, #2448c9) 35%, transparent); }
.topic-head { position: relative; }
.topic-head h1 { display: flex; align-items: center; }
.topic-head::after { content: ""; position: absolute; right: 0; top: 1rem; width: 220px; height: 220px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tc, #2448c9) 18%, transparent), transparent 70%); pointer-events: none; }
.topic-card small { color: var(--c-muted); margin-top: .3rem; line-height: 1.45; }
.topic-grid--full { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Cards ------------------------------------------------------------------- */
.card-list { display: grid; gap: .9rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card { position: relative; background: var(--c-surface); border: 1px solid var(--c-border); border-left: 4px solid var(--tc, var(--c-brand)); border-radius: var(--radius); padding: 1.25rem 1.4rem; transition: box-shadow .2s, border-color .2s, transform .2s; }
.card:hover { box-shadow: 0 14px 34px color-mix(in srgb, var(--tc, #2448c9) 16%, transparent); border-color: color-mix(in srgb, var(--tc, #2448c9) 40%, #fff); border-left-color: var(--tc, var(--c-brand)); transform: translateY(-2px); }
.card-cat { display: inline-flex; align-items: center; gap: .4em; padding: .22em .7em; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--tc-ink, var(--c-accent-dark)); background: color-mix(in srgb, var(--tc, #2448c9) 12%, #fff); text-decoration: none; margin-bottom: .5rem; }
.card-cat:hover { color: var(--tc-ink, var(--c-accent-dark)); background: color-mix(in srgb, var(--tc, #2448c9) 20%, #fff); }
.card-title { font-size: 1.16rem; margin: 0 0 .35rem; }
.card-title a { color: var(--c-text); text-decoration: none; }
.card-title a:hover { color: var(--c-brand); text-decoration: underline; }
.card-excerpt { color: var(--c-muted); margin: 0 0 .55rem; font-size: .97rem; }
.card-meta { color: var(--c-muted); font-size: .85rem; margin: 0; }

.sidebar { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.4rem; position: sticky; top: 90px; box-shadow: var(--shadow); }
.ranked { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ranked li { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; }
.ranked .rank { font: 850 1.45rem/1 var(--font); color: var(--c-violet); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; min-width: 2ch; }
.ranked a { color: var(--c-text); font-weight: 600; text-decoration: none; line-height: 1.35; }
.ranked a:hover { color: var(--c-brand); text-decoration: underline; }
.ranked small, .link-list small { display: block; color: var(--c-muted); font-size: .82rem; margin-top: .15rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.5rem; }
.feature { position: relative; overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.feature::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: color-mix(in srgb, var(--tc, #2448c9) 10%, transparent); }
.feature:hover { transform: translateY(-4px); box-shadow: 0 16px 36px color-mix(in srgb, var(--tc, #2448c9) 18%, transparent); }
.feature h3 { color: var(--c-text); }
.feature p { margin: 0; color: var(--c-muted); }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 2rem; }
.link-list a { font-weight: 600; color: var(--c-text); text-decoration: none; }
.link-list a:hover { color: var(--c-brand); text-decoration: underline; }

/* Pagination --------------------------------------------------------------- */
.pagination { margin-top: 1.8rem; }
.pagination ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.page-link, .page-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .8rem; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text); text-decoration: none; font-weight: 600; }
.page-link:hover { border-color: var(--c-brand); color: var(--c-brand); }
.page-link.is-current { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.page-gap { border: 0; background: none; }
.page-count { color: var(--c-muted); font-size: .9rem; margin: .7rem 0 0; }

/* Breadcrumbs --------------------------------------------------------------- */
.breadcrumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; font-size: .88rem; color: var(--c-muted); }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin: 0 .5em; color: #a3adc2; }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-brand); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--c-text); }
.related-topics { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.related-topics .chips { margin: 0; }

/* Article ------------------------------------------------------------------- */
.article { padding: 2rem 0 1rem; }
.article-header { margin-bottom: 1.5rem; }
.article-header h1 { font-family: var(--font-serif); margin-top: .6rem; }
.article-meta { color: var(--c-muted); font-size: .92rem; }
.article-image { margin: 0 0 1.5rem; }
.article-image img { border-radius: var(--radius); width: 100%; }
.short-answer { position: relative; background: linear-gradient(135deg, #eef1ff 0%, #f6efff 100%); border: 1px solid #dcd6fb; border-radius: var(--radius); padding: 1.2rem 1.4rem 1.2rem 1.6rem; margin: 0 0 1.6rem; overflow: hidden; }
.short-answer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }
.short-answer-label { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--c-brand-dark); margin-bottom: .4rem; }
.short-answer p:last-child { margin: 0; font-size: 1.06rem; }
.toc { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: .9rem 1.3rem; margin-bottom: 2rem; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ol { margin: .7rem 0 .2rem; }
.toc li { margin: .25rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 2.1rem; font-size: clamp(1.35rem, 2.6vw, 1.6rem); }
.prose h3 { margin-top: 1.6rem; }
.prose li { margin: .35rem 0; }
.prose blockquote { margin: 1.6rem 0; padding: 1rem 1.3rem; background: #fff6e2; border-left: 5px solid var(--c-accent); border-radius: var(--radius-sm); }
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: var(--radius-sm); margin: 1.2rem 0; }
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.prose th, .prose td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.prose th { background: var(--c-alt); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
/* Q&A articles from the publisher (App\Libraries\QaArticle) */
.qa-box { margin: 1.8rem 0; padding: 1rem 1.3rem; border-radius: var(--radius-sm); background: var(--c-surface); border: 1px solid var(--c-border); }
.qa-box--tip { border-left: 5px solid var(--c-accent); background: #fff6e2; }
.qa-box--facts { background: var(--c-alt); }
.qa-box__label { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--c-accent-dark); margin: 0 0 .4rem; }
.qa-box > :last-child, .qa-box ul:last-child { margin-bottom: 0; }
.qa-mistakes ul { list-style: none; padding-left: 0; }
.qa-mistakes li { position: relative; margin: .6rem 0; padding: .75rem 1rem .75rem 2.6rem; background: #fdecea; border-radius: var(--radius-sm); }
.qa-mistakes li::before { content: "\2715"; position: absolute; left: 1rem; top: .75rem; color: #b42318; font-weight: 700; }
.disclaimer { margin-top: 2rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--c-alt); color: var(--c-muted); font-size: .9rem; }
.ad-slot { margin: 1.5rem 0; text-align: center; min-height: 1px; }

/* Author, byline, share, previous/next -------------------------------------- */
.kicker { display: block; margin: 0 0 .2rem; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-accent-dark); }
.avatar { --size: 48px; width: var(--size); height: var(--size); flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--c-brand-soft); }
.avatar--initials { display: inline-grid; place-items: center; background: var(--c-brand); color: #fff; font-weight: 700; font-size: calc(var(--size) * .38); letter-spacing: .02em; }
.byline { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.byline__text { display: grid; gap: .1rem; line-height: 1.35; }
.byline__author { font-weight: 600; }
.byline__author a { color: var(--c-text); text-decoration: none; border-bottom: 1px solid var(--c-border); }
.byline__author a:hover { color: var(--c-brand); border-color: var(--c-brand); }
.byline__role { color: var(--c-muted); font-weight: 400; }

.post-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; margin-top: 2rem; padding: 1.2rem 0; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.post-foot__group { display: grid; gap: .45rem; align-content: start; }
.post-foot__group .chip { justify-self: start; }
.share { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.share__btn { display: inline-flex; align-items: center; padding: .38em .85em; border-radius: 999px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font: 600 .86rem var(--font); text-decoration: none; cursor: pointer; }
.share__btn:hover, .share__btn.is-copied { border-color: var(--c-brand); color: var(--c-brand); }

.author-box { display: flex; gap: 1.2rem; margin-top: 2rem; padding: 1.4rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.author-box__photo { flex-shrink: 0; line-height: 0; }
.author-box__name { margin: 0; font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; }
.author-box__name a { color: var(--c-text); text-decoration: none; }
.author-box__name a:hover { color: var(--c-brand); }
.author-box__role { margin: .1rem 0 0; color: var(--c-muted); font-size: .92rem; }
.author-box__bio { margin: .7rem 0 .8rem; }
.author-box__links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; list-style: none; margin: 0; padding: 0; font-size: .92rem; font-weight: 600; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.post-nav__link { display: grid; gap: .3rem; align-content: start; padding: 1rem 1.2rem; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.post-nav__link:hover { border-color: var(--c-brand); box-shadow: var(--shadow); }
.post-nav__link--next { grid-column: 2; text-align: right; }
.post-nav__label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.post-nav__title { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.post-nav__link:hover .post-nav__title { color: var(--c-brand); }

/* Author archive ------------------------------------------------------------ */
.author-hero { display: flex; gap: 1.4rem; align-items: flex-start; margin-top: .5rem; }
.author-hero h1 { font-family: var(--font-serif); margin: 0; }
.author-hero__role { margin: .2rem 0 .6rem; color: var(--c-accent-dark); font-weight: 700; }
.author-hero .lead { margin: 0 0 .6rem; }
.author-hero .author-box__links { margin-top: .4rem; }

/* Static pages ------------------------------------------------------------- */
.page { padding: 2rem 0 2.5rem; }
.page-header h1 { font-family: var(--font-serif); }
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 2rem; }
.steps li { counter-increment: step; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.2rem; display: grid; gap: .3rem; }
.steps li::before { content: "0" counter(step); font-weight: 800; color: var(--c-accent-dark); }
.steps span { color: var(--c-muted); font-size: .95rem; }
.page-cta { margin-top: 2rem; }
.not-found { text-align: left; }

/* Forms ------------------------------------------------------------------- */
.search-form { display: flex; gap: .5rem; }
.search-form input { flex: 1; min-width: 0; }
input[type="text"], input[type="email"], input[type="search"], textarea { width: 100%; font: 1rem var(--font); padding: .75em 1em; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-text); }
input:focus, textarea:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }
.search-form--page { max-width: 620px; margin: 1rem 0; }
.contact-form { display: grid; gap: 1rem; margin-top: 1.5rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field-error { color: #b42318; font-size: .88rem; margin: .3rem 0 0; min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 600; }
.notice--success { background: #e5f5ec; color: #11633a; margin-top: 1.5rem; }
.notice--error { background: #fdecea; color: #b42318; }

/* CTA ----------------------------------------------------------------------- */
.cta { color: #fff; padding: 2.8rem 0; }
.cta-inner { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 1.5rem; align-items: center; padding: clamp(1.6rem, 4vw, 2.4rem); border-radius: 24px; background: var(--grad); box-shadow: var(--shadow-lg); }
.cta-inner::before, .cta-inner::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.cta-inner::before { width: 260px; height: 260px; right: -60px; top: -120px; background: rgba(255, 255, 255, .12); }
.cta-inner::after { width: 180px; height: 180px; left: 30%; bottom: -110px; background: rgba(255, 209, 102, .22); }
.cta h2 { margin-bottom: .3rem; }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta input { border-color: transparent; }
.cta .btn-primary { background: var(--grad-warm); color: #23123d; box-shadow: none; }
.cta .btn-primary:hover { color: #23123d; }
.cta .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Footer ------------------------------------------------------------------ */
.site-footer { position: relative; background: radial-gradient(700px 300px at 100% 0%, rgba(124, 58, 237, .25), transparent 70%), radial-gradient(600px 260px at 0% 100%, rgba(6, 182, 212, .16), transparent 70%), #0f1630; color: #b9c2d6; padding: 3.2rem 0 1.5rem; font-size: .95rem; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #2448c9, #7c3aed, #ec4899, #f59e0b, #10b981, #06b6d4); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: #e6ebf5; text-decoration: none; }
.site-footer a:hover { color: var(--c-accent); text-decoration: underline; }
.footer-brand p { margin-top: 1rem; max-width: 40ch; }
.footer-bottom { border-top: 1px solid #26304d; margin-top: 2.5rem; padding-top: 1.3rem; font-size: .85rem; color: #8d97ad; }
.footer-bottom p { margin: 0 0 .5rem; }

/* Search overlay ---------------------------------------------------------- */
.search-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(17, 26, 51, .55); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 1rem 1rem; }
.search-overlay[hidden] { display: none; }
.search-panel { width: min(100%, 680px); background: var(--c-surface); border-radius: calc(var(--radius) + 4px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.search-overlay-form { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--c-border); color: var(--c-muted); }
.search-overlay-form input { border: 0; box-shadow: none !important; font-size: 1.1rem; padding: .6em .2em; }
.search-results { list-style: none; margin: 0; padding: .4rem; max-height: 55vh; overflow: auto; }
.search-results:empty { display: none; }
.search-results a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm); color: var(--c-text); text-decoration: none; }
.search-results a small { color: var(--c-muted); white-space: nowrap; }
.search-results [aria-selected="true"] a, .search-results a:hover { background: var(--c-brand-soft); }
.search-results .is-topic a span::before { content: "# "; color: var(--c-accent-dark); font-weight: 700; }
.search-hints { margin: 0; padding: .6rem 1rem; font-size: .8rem; color: var(--c-muted); border-top: 1px solid var(--c-border); background: var(--c-bg); }
kbd { display: inline-block; padding: .05em .4em; margin: 0 .15em; border: 1px solid var(--c-border); border-bottom-width: 2px; border-radius: 5px; background: var(--c-surface); font: .78rem var(--font); }

/* Cookie banner ----------------------------------------------------------- */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 80; max-width: 720px; margin: 0 auto; display: flex; gap: 1rem; align-items: center; justify-content: space-between; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); padding: 1rem 1.2rem; font-size: .92rem; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-actions .btn { padding: .55em 1em; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 980px) {
    .hero-grid, .with-sidebar { grid-template-columns: 1fr; }
    .hero-visual { max-width: 560px; }
    .float-badge--fresh { right: 0; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    body { font-size: 16px; }
    .menu-toggle { display: inline-flex; }
    .hide-mobile { display: none; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding: .8rem 1.25rem 1rem; box-shadow: var(--shadow); }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; }
    .features, .steps, .link-list, .field-row { grid-template-columns: 1fr; }
    .stats { gap: 1.4rem; }
    .stats--boxed { flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr; }
    .cookie-banner { flex-direction: column; align-items: stretch; }
    .search-form { flex-direction: column; }
    .author-box, .author-hero { flex-direction: column; gap: .9rem; }
    .header-row { gap: .6rem; }
    .logo { font-size: .95rem; line-height: 1.1; gap: .45rem; }
    .logo-first { display: block; }
    .float-badge--fresh, .float-badge--speed { display: none; }
    .float-badge--code { right: 4px; }
    .hero-card { transform: none; }
    .topic-icon--lg { width: 44px; height: 44px; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav__link--next { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}
