/* ============================================================
   CSS custom properties
   ============================================================ */
:root {
    --color-bg:          #ffffff;
    --color-surface:     #f9f9f9;
    --color-text:        #2d2d2d;
    --color-muted:       #666666;
    --color-border:      #e8e8e8;
    --color-accent:      #1f71bc;
    --color-accent-dark: #155a96;
    --color-code-bg:     #f5f5f5;

    --font-body:   system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono:   ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

    --size-base:     1rem;
    --size-sm:       0.875rem;
    --size-lg:       1.125rem;
    --size-xl:       1.5rem;
    --size-2xl:      2rem;

    --line-height:   1.7;
    --radius:        4px;
    --max-width:     1100px;
    --prose-width:   720px;
    --spacing:       1.5rem;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.75rem;
    line-height: 1.3;
    color: var(--color-accent);
    font-weight: 700;
}

h1 { font-size: var(--size-2xl); }
h2 { font-size: var(--size-xl); }
h3 { font-size: var(--size-lg); }

p { margin: 0 0 var(--spacing); }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); text-decoration: underline; }

ul, ol { margin: 0 0 var(--spacing); padding-left: 1.5rem; }
li { margin-bottom: 0.25rem; }

img { max-width: 100%; height: auto; display: block; }

figure { margin: 0 0 var(--spacing); }
figcaption { font-size: var(--size-sm); color: var(--color-muted); margin-top: 0.5rem; }

blockquote {
    margin: 0 0 var(--spacing);
    padding: 0.75rem 1.25rem;
    border-left: 4px solid var(--color-accent);
    color: var(--color-muted);
    font-style: italic;
}

hr { border: none; border-top: 1px solid var(--color-border); margin: var(--spacing) 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: var(--spacing); font-size: var(--size-sm); }
th, td { padding: 0.5rem 0.75rem; border: 1px solid var(--color-border); text-align: left; }
th { background: var(--color-code-bg); font-weight: 600; }

/* ============================================================
   Skip link (accessibility)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #fff;
    z-index: 1000;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Layout containers
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--spacing);
}

.container--narrow {
    max-width: var(--prose-width);
}

/* ============================================================
   Site header & navigation
   ============================================================ */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    font-size: var(--size-lg);
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    white-space: nowrap;
}
.site-logo:hover { color: var(--color-accent-dark); text-decoration: none; }

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    font-size: var(--size-sm);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--color-accent); }

/* Hamburger toggle - hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* Mobile nav */
@media (max-width: 640px) {
    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem var(--spacing);
    }

    .site-header--open .site-nav { display: block; }
    .site-nav ul { flex-direction: column; gap: 0.75rem; }

    .site-header--open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-header--open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-header--open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   Main content area
   ============================================================ */
main {
    padding: calc(var(--spacing) * 2) 0;
    min-height: 60vh;
}

/* ============================================================
   Site footer
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: var(--spacing) 0;
    font-size: var(--size-sm);
    color: var(--color-muted);
}
.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--color-accent); }
.site-footer p { margin: 0; }
.footer-cookie-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--color-muted);
    cursor: pointer;
}
.footer-cookie-btn:hover { color: var(--color-accent); }

/* ============================================================
   Client logo carousel
   ============================================================ */
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.clients {
    margin: calc(var(--spacing) * 1.5) 0;
    padding: var(--spacing) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.clients__label {
    text-align: center;
    font-size: var(--size-sm);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin: 0 0 var(--spacing);
}

.clients__viewport {
    overflow: hidden;
    /* fade edges */
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.clients__track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.clients__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 48px;
    min-width: 120px;
}

.clients__item img {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter 0.2s, opacity 0.2s;
}

.clients__item img:hover {
    filter: grayscale(0);
    opacity: 1;
}

.clients__item--invert img {
    filter: grayscale(1) invert(1);
}

.clients__item--invert img:hover {
    filter: grayscale(0) invert(1);
}

/* Placeholder shown until real logos are added */
.clients__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 1.25rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    font-size: var(--size-sm);
    color: var(--color-muted);
    white-space: nowrap;
    background: var(--color-code-bg);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .clients__track { animation: none; }
}

/* ============================================================
   Home hero
   ============================================================ */
.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    /* bleed to full viewport width */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: calc(var(--spacing) * 3) calc(50vw - min(var(--max-width), 100vw) / 2 + 1.5rem);
    margin-bottom: calc(var(--spacing) * 2);
    overflow: hidden;
}
/* background image layer */
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/hero-code-bg.jpg') center / cover no-repeat;
    filter: blur(3px) brightness(0.45);
    transform: scale(1.05); /* prevents blur edge fringing */
    z-index: 0;
}
/* content sits above the bg */
.home-hero > * { position: relative; z-index: 1; }

.home-hero__text { flex: 1; }
.home-hero__name {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.1;
}
.home-hero__role {
    font-size: var(--size-lg);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: var(--spacing);
}
.home-hero__social {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.home-hero__social a { display: inline-flex; opacity: 0.8; transition: opacity 0.15s; }
.home-hero__social a:hover { opacity: 1; }
.home-hero__social img { display: block; filter: brightness(0) invert(1); }
.home-hero__photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
@media (max-width: 640px) {
    .home-hero { flex-direction: column-reverse; align-items: flex-start; }
    .home-hero__photo img { width: 120px; height: 120px; }
}

/* Home content sections */
.home-section {
    margin-bottom: calc(var(--spacing) * 2);
}
.home-section h2 {
    margin-top: calc(var(--spacing) * 1.5);
    margin-bottom: var(--spacing);
}

/* ============================================================
   Post list (archive pages)
   ============================================================ */
.section-title {
    font-size: var(--size-xl);
    margin-bottom: var(--spacing);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.all-posts-link {
    display: inline-block;
    margin-top: var(--spacing);
    font-weight: 600;
}

.recent-posts { margin-top: calc(var(--spacing) * 2); }

/* Post card */
.post-card {
    display: flex;
    gap: 1.25rem;
    padding-bottom: var(--spacing);
    border-bottom: 1px solid var(--color-border);
    align-items: flex-start;
}
.post-card:last-child { border-bottom: none; }

.post-card__image {
    flex: 0 0 160px;
    width: 160px;
    height: 110px;
    overflow: hidden;
    border-radius: 6px;
}
.post-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}
.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.2s ease;
}
.post-card__image:hover img { transform: scale(1.04); }

.post-card__body { flex: 1; min-width: 0; }

.post-card__title {
    font-size: var(--size-lg);
    margin-bottom: 0.35rem;
}
.post-card__title a { color: var(--color-text); }
.post-card__title a:hover { color: var(--color-accent); text-decoration: none; }

.post-card__meta {
    font-size: var(--size-sm);
    color: var(--color-muted);
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.post-card__meta a { color: var(--color-muted); }
.post-card__meta a:hover { color: var(--color-accent); }

.post-card__excerpt { margin: 0; font-size: var(--size-sm); color: var(--color-muted); }

@media (max-width: 540px) {
    .post-card { flex-direction: column; gap: 0.75rem; }
    .post-card__image { flex: none; width: 100%; height: 180px; }
}

/* ============================================================
   Archive header
   ============================================================ */
.archive__header {
    margin-bottom: calc(var(--spacing) * 1.5);
    padding-bottom: var(--spacing);
    border-bottom: 2px solid var(--color-border);
}
.archive__title { color: var(--color-text); }
.archive__description { color: var(--color-muted); margin: 0; }
.archive__empty { color: var(--color-muted); }

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
    margin-bottom: var(--spacing);
    font-size: var(--size-sm);
}
.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.breadcrumb li { color: var(--color-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 0.25rem; }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb [aria-current="page"] { color: var(--color-text); }

/* ============================================================
   Single post
   ============================================================ */
.post__header { margin-bottom: calc(var(--spacing) * 1.5); }

.post__title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: var(--size-sm);
    color: var(--color-muted);
}
.post__reading-time::before { content: "·"; margin-right: 0.25rem; }
.post__updated { font-style: italic; }

/* Post body prose styles */
.post__content { max-width: var(--prose-width); }
.post__content h2,
.post__content h3,
.post__content h4 { margin-top: calc(var(--spacing) * 1.5); }
.post__content a { text-decoration: underline; text-underline-offset: 2px; }
.post__content img { border-radius: var(--radius); margin: var(--spacing) 0; }

/* Inline code */
.post__content code:not(pre code) {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--color-code-bg);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    color: #c7254e;
}

/* Code blocks */
.post__content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: var(--spacing) 0;
    position: relative;
}
.post__content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* Copy button (injected by Stimulus) */
.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-family: var(--font-body);
    background: rgba(255,255,255,0.1);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.code-copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.code-copy-btn--copied { color: #4ec9b0; }

/* Author box */
.author-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: calc(var(--spacing) * 2);
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface, #f9f9f9);
}
.author-box__photo {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}
.author-box__body { flex: 1; min-width: 0; }
.author-box__name {
    font-weight: 600;
    margin: 0 0 0.35rem;
}
.author-box__name a { color: var(--color-text); text-decoration: none; }
.author-box__name a:hover { color: var(--color-accent); }
.author-box__bio {
    margin: 0;
    font-size: var(--size-sm);
    color: var(--color-muted);
    line-height: 1.6;
}

/* Category links in post meta */
.post__meta-sep { color: var(--color-border); }
.post__meta-cat {
    color: var(--color-muted);
    text-decoration: none;
}
.post__meta-cat:hover { color: var(--color-accent); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: calc(var(--spacing) * 2);
    padding-top: var(--spacing);
    border-top: 1px solid var(--color-border);
    font-size: var(--size-sm);
}
.pagination__info { color: var(--color-muted); }
.pagination__prev,
.pagination__next { font-weight: 600; color: var(--color-accent); }

/* ============================================================
   Error pages
   ============================================================ */
.error-page { padding: calc(var(--spacing) * 3) 0; text-align: center; }
.error-page h1 { color: var(--color-text); }

/* ============================================================
   Landing pages (freelancer, etc.)
   ============================================================ */

/* Stripped landing page header - logo only, no nav, no bottom border */
.site-header--lp .nav-toggle,
.site-header--lp .site-nav { display: none; }

/* Hero */
.lp-hero {
    position: relative;
    /* full-viewport bleed */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: calc(var(--spacing) * 3.5) calc(50vw - min(var(--max-width), 100vw) / 2 + 1.5rem);
    margin-bottom: calc(var(--spacing) * 2);
    overflow: hidden;
    background: linear-gradient(135deg, #0d2137 0%, #1f71bc 100%);
}

.lp-hero--bg-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--lp-hero-bg) center / cover no-repeat;
    filter: blur(2px) brightness(0.25);
    transform: scale(1.05);
    z-index: 0;
}

.lp-hero--bg-image > * { position: relative; z-index: 1; }

.lp-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.lp-hero__eyebrow {
    font-size: var(--size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.lp-hero__headline {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.lp-hero__sub {
    font-size: var(--size-lg);
    color: rgba(255, 255, 255, 0.82);
    max-width: 52ch;
    margin-bottom: calc(var(--spacing) * 1.5);
}

.lp-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lp-hero__photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .lp-hero__inner { flex-direction: column-reverse; align-items: flex-start; }
    .lp-hero__photo img { width: 120px; height: 120px; }
    .lp-hero__headline { font-size: 1.75rem; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--size-sm);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn--primary {
    background: #ffffff;
    color: #1f71bc;
    border: 2px solid transparent;
}
.btn--primary:hover {
    background: #e8f1fb;
    color: #155a96;
    text-decoration: none;
}

.btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.btn--lg {
    padding: 0.85rem 2rem;
    font-size: var(--size-base);
}

/* Sections */
.lp-section {
    padding: calc(var(--spacing) * 2.5) 0;
}

.lp-section--surface {
    background: var(--color-surface);
    /* full-viewport bleed */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - min(var(--max-width), 100vw) / 2 + 1.5rem);
    padding-right: calc(50vw - min(var(--max-width), 100vw) / 2 + 1.5rem);
}

.lp-section__title {
    font-size: var(--size-xl);
    margin-bottom: calc(var(--spacing) * 1.5);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

/* Grid */
.lp-grid {
    display: grid;
    gap: 1.5rem;
}

.lp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.lp-grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
    .lp-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .lp-grid--3,
    .lp-grid--2 { grid-template-columns: 1fr; }
}

/* Cards */
.lp-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.75rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.lp-card:hover {
    box-shadow: 0 4px 20px rgba(31, 113, 188, 0.1);
    border-color: #b3d0ef;
}

.lp-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #e8f1fb;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.lp-card__icon img {
    display: block;
    width: 24px;
    height: 24px;
    filter: invert(33%) sepia(98%) saturate(400%) hue-rotate(185deg) brightness(85%) contrast(100%);
}

.lp-card h3 {
    font-size: var(--size-base);
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.lp-card p { margin: 0; font-size: var(--size-sm); color: var(--color-muted); }

.lp-card--flat {
    background: none;
    border: none;
    padding: 0;
}
.lp-card--flat strong { display: block; margin-bottom: 0.4rem; }
.lp-card--flat p { font-size: var(--size-sm); color: var(--color-muted); margin: 0; }

/* Timeline */
.lp-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.lp-timeline__item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    align-items: start;
}

.lp-timeline__year {
    font-size: var(--size-sm);
    font-weight: 700;
    color: var(--color-accent);
    padding-top: 0.1rem;
    white-space: nowrap;
}

.lp-timeline__body { font-size: var(--size-sm); color: var(--color-muted); line-height: 1.65; }
.lp-timeline__body strong { color: var(--color-text); }

.lp-timeline__clients {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0;
}
.lp-timeline__clients li {
    margin: 0;
    color: var(--color-text);
    font-weight: 500;
}
.lp-timeline__clients li::after {
    content: '·';
    margin: 0 0.4rem;
    color: var(--color-border);
    font-weight: 400;
}
.lp-timeline__clients li:last-child::after { content: ''; margin: 0; }

@media (max-width: 560px) {
    .lp-timeline__item { grid-template-columns: 1fr; gap: 0.25rem; }
    .lp-timeline__year { padding-top: 0; }
}

/* Tag list */
.lp-tag-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lp-tag-list li {
    margin: 0;
    background: var(--color-code-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    font-size: var(--size-sm);
    color: var(--color-text);
    font-family: var(--font-mono);
}

/* Lead paragraph */
.lp-lead {
    font-size: var(--size-lg);
    color: var(--color-muted);
    max-width: 72ch;
    margin-bottom: calc(var(--spacing) * 1.5);
}

/* Legacy item */
.lp-legacy-item h3 {
    font-size: var(--size-base);
    color: var(--color-accent);
    margin-bottom: 0.4rem;
}
.lp-legacy-item p { font-size: var(--size-sm); color: var(--color-muted); margin: 0; }

/* CTA banner */
.lp-cta {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: calc(var(--spacing) * 1.5);
    padding: calc(var(--spacing) * 3) calc(50vw - min(var(--max-width), 100vw) / 2 + 1.5rem);
    background: linear-gradient(135deg, #0d2137 0%, #1f71bc 100%);
    text-align: center;
}

.lp-cta__inner { max-width: 620px; margin-inline: auto; }

.lp-cta h2 {
    color: #ffffff;
    font-size: var(--size-xl);
    margin-bottom: 0.75rem;
}

.lp-cta p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing);
}

.lp-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* ============================================================
   Landing page extras
   ============================================================ */

/* Stat strip below hero */
.lp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: calc(var(--spacing) * 2.5);
}

.lp-stat {
    flex: 1 1 180px;
    padding: 1.25rem 1.75rem;
    border-right: 1px solid var(--color-border);
    text-align: center;
}

.lp-stat:last-child { border-right: none; }

.lp-stat__value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.lp-stat__label {
    font-size: var(--size-sm);
    color: var(--color-muted);
}

@media (max-width: 640px) {
    .lp-stat { border-right: none; border-bottom: 1px solid var(--color-border); }
    .lp-stat:last-child { border-bottom: none; }
}

/* Vignette highlight box */
.lp-vignette {
    border-left: 4px solid var(--color-accent);
    background: var(--color-surface);
    border-radius: 0 8px 8px 0;
    padding: 1.75rem 2rem;
    margin-bottom: calc(var(--spacing) * 1.5);
}

.lp-vignette p {
    margin: 0;
    font-size: var(--size-base);
    color: var(--color-text);
    line-height: 1.75;
}

/* Lead magnet box */
.lp-magnet {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #e8f1fb;
    border: 1px solid #b3d0ef;
    border-radius: 8px;
    padding: 2rem 2.25rem;
    margin-top: calc(var(--spacing) * 1.5);
}

.lp-magnet__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--color-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-magnet__icon img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.lp-magnet__body { flex: 1; }

.lp-magnet__body strong {
    display: block;
    font-size: var(--size-lg);
    color: var(--color-text);
    margin-bottom: 0.3rem;
}

.lp-magnet__body p {
    margin: 0 0 0.9rem;
    color: var(--color-muted);
    font-size: var(--size-sm);
}

.btn--accent {
    background: var(--color-accent);
    color: #ffffff;
    border: 2px solid transparent;
}
.btn--accent:hover {
    background: var(--color-accent-dark);
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 640px) {
    .lp-magnet { flex-direction: column; gap: 1.25rem; }
}

/* Checklist page */
.checklist-hero {
    background: linear-gradient(135deg, #0d2137 0%, #1f71bc 100%);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: calc(var(--spacing) * 3) calc(50vw - min(var(--max-width), 100vw) / 2 + 1.5rem);
    margin-bottom: calc(var(--spacing) * 2);
}

.checklist-hero__eyebrow {
    font-size: var(--size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.5rem;
}

.checklist-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.checklist-hero p {
    font-size: var(--size-lg);
    color: rgba(255,255,255,0.82);
    max-width: 60ch;
    margin: 0;
}

.checklist-section {
    margin-bottom: calc(var(--spacing) * 2.5);
}

.checklist-section__title {
    font-size: var(--size-lg);
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.checklist-section__title::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}

.checklist-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.checklist-items li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: var(--size-sm);
    color: var(--color-text);
    margin: 0;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
}

.checklist-items li:last-child { border-bottom: none; }

.checklist-items li::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--color-border);
    border-radius: 3px;
    background: var(--color-bg);
}

.checklist-items li span {
    flex: 1;
    line-height: 1.5;
}

.checklist-items li em {
    display: block;
    font-style: normal;
    color: var(--color-muted);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.checklist-risk {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.checklist-risk--high { background: #fde8e8; color: #c0392b; }
.checklist-risk--med  { background: #fef3cd; color: #8a6400; }
.checklist-risk--low  { background: #e6f4ea; color: #2e7d32; }

.checklist-cta {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-top: calc(var(--spacing) * 2);
}

.checklist-cta p { color: var(--color-muted); margin-bottom: var(--spacing); }

/* Interactive checklist */
.checklist-progress-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    margin-bottom: 0.4rem;
    overflow: hidden;
}

.checklist-progress-bar__fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.checklist-progress-label {
    font-size: var(--size-sm);
    color: var(--color-muted);
    margin-bottom: calc(var(--spacing) * 1.5);
}

.checklist-items li {
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 4px;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.checklist-items li:hover { background: var(--color-surface); }

.checklist-items li input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    cursor: pointer;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

.checklist-items li.is-checked {
    opacity: 0.45;
}

.checklist-items li.is-checked span {
    text-decoration: line-through;
    text-decoration-color: var(--color-muted);
}

/* Email results form */
.checklist-send {
    background: #e8f1fb;
    border: 1px solid #b3d0ef;
    border-radius: 8px;
    padding: 2rem 2.25rem;
    margin-top: calc(var(--spacing) * 2);
}

.checklist-send h2 {
    font-size: var(--size-lg);
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.checklist-send p {
    color: var(--color-muted);
    font-size: var(--size-sm);
    margin-bottom: 1.1rem;
}

.checklist-send__row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.checklist-send__input {
    flex: 1 1 240px;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: var(--size-base);
    font-family: var(--font-body);
    background: #fff;
}

.checklist-send__input:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
    border-color: var(--color-accent);
}

.checklist-send__done {
    color: #2e7d32;
    font-weight: 600;
    padding: 0.5rem 0;
}

.checklist-send__error {
    color: #c0392b;
    font-size: var(--size-sm);
    margin-top: 0.5rem;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .checklist-cta,
    .btn { display: none !important; }

    .checklist-hero {
        background: none !important;
        padding: 0;
        margin: 0 0 1.5rem;
    }

    .checklist-hero h1 { color: #000; font-size: 1.5rem; }
    .checklist-hero p,
    .checklist-hero__eyebrow { color: #444; }

    body { font-size: 11pt; color: #000; }

    .checklist-section { break-inside: avoid; }

    .checklist-items li::before {
        border-color: #999;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .checklist-risk {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    main { padding: 0; }
}

/* ============================================================
   Utility
   ============================================================ */
.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;
}
