:root {
    --text: #111418;
    --text-soft: #2b3038;
    --muted: #5b6573;
    --border: #e4e7ec;
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --link: #1b5fb3;
    --link-hover: #0f3d78;
    --content-width: 68ch;
    --wide-width: 1100px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }

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

.container {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    margin-bottom: 2.5rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.site-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    line-height: 1.2;
}
.site-brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.site-brand-tag { font-size: 0.85rem; color: var(--muted); font-weight: 400; margin-top: 0.2rem; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* Main */
main { min-height: 60vh; }

/* Content-page reading column */
article.post, article.page, article.guide {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Homepage wrappers */
.home-hero, .home-intro, .home-body, .home-section {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.home-intro, .home-body { max-width: var(--content-width); }

/* Typography */
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.5rem; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.5rem; line-height: 1.3; margin: 2rem 0 0.75rem; font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 1.15rem; line-height: 1.35; margin: 1.5rem 0 0.5rem; font-weight: 600; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.5rem; }
blockquote {
    border-left: 3px solid var(--border);
    margin: 1.5rem 0;
    padding: 0.4rem 0 0.4rem 1.25rem;
    color: var(--text-soft);
}
blockquote > *:first-child { margin-top: 0; }
blockquote > *:last-child { margin-bottom: 0; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
    background: var(--bg-soft);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}
pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin: 1.5rem 0; }
pre code { display: block; padding: 1rem 1.1rem; overflow-x: auto; background: transparent; line-height: 1.55; }

/* Homepage hero */
.home-hero { padding-top: 1.5rem; padding-bottom: 1rem; }
.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 2rem;
    align-items: start;
}
.home-hero-copy {
    padding: 2rem 0 1rem;
}
.home-eyebrow {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem;
    font-weight: 700;
}
.home-hero h1 { font-size: 3.2rem; max-width: 14ch; margin-bottom: 0.9rem; }
.home-lede { font-size: 1.2rem; color: var(--text-soft); max-width: 58ch; margin: 0; line-height: 1.5; }
.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}
.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}
.button-primary {
    background: var(--text);
    color: #fff;
}
.button-primary:hover { color: #fff; background: #000; }
.button-secondary {
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
}
.button-secondary:hover { color: var(--link); }
.home-proof {
    background: linear-gradient(180deg, #f7f8fa 0%, #ffffff 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.25rem 1.25rem 1.1rem;
    margin-top: 1.25rem;
}
.home-proof-label {
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
}
.home-proof-list {
    margin: 0;
    padding-left: 1.1rem;
}
.home-proof-list li { margin-bottom: 0.55rem; }
.home-section { padding-top: 2.5rem; }
.home-intro { padding-top: 1rem; font-size: 1.05rem; }
.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.section-kicker {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.section-heading-row h2 {
    margin: 0;
    font-size: 1.8rem;
}
.section-link {
    white-space: nowrap;
    font-weight: 600;
    text-decoration: none;
}
.section-link:hover { text-decoration: underline; }
.feature-grid,
.post-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.feature-card,
.post-preview-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.15rem;
    background: #fff;
}
.feature-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}
.feature-title a {
    color: var(--text);
    text-decoration: none;
}
.feature-title a:hover {
    color: var(--link);
    text-decoration: underline;
}
.feature-summary {
    margin: 0.65rem 0 0;
    color: var(--text-soft);
    font-size: 0.98rem;
    line-height: 1.55;
}

/* Post / guide / page header */
.post-kicker { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.25rem; font-weight: 600; }
.post-kicker a { color: var(--muted); text-decoration: none; }
.post-kicker a:hover { color: var(--link); }
.post-meta { color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0 0; }
.post-header, .guide-header, .page-header { padding-top: 0.5rem; margin-bottom: 2.5rem; }

/* Body */
.post-body { font-size: 1.05rem; }
.post-body > *:first-child { margin-top: 0; }
.post-body > *:last-child { margin-bottom: 0; }
.post-body > p:first-of-type { font-size: 1.15rem; line-height: 1.6; color: var(--text); }
.post-body h2 { margin-top: 2rem; margin-bottom: 0.5rem; }
.post-body h3 { margin-top: 1.5rem; margin-bottom: 0.35rem; }

/* Tags */
.tags { list-style: none; padding: 1.25rem 0 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid var(--border); }
.tags li { font-size: 0.8rem; color: var(--muted); background: var(--bg-soft); padding: 0.2rem 0.65rem; border-radius: 999px; }

/* Index pages */
.page-index { max-width: var(--content-width); }
.page-intro { margin-top: 1rem; }
.index-empty { color: var(--muted); }

/* Index lists — shared primitives (guides + blog) */
.guide-list, .post-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.guide-list-item, .post-list-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}
.guide-list-item:first-child, .post-list-item:first-child { padding-top: 0; }
.guide-list-item:last-child, .post-list-item:last-child { border-bottom: none; padding-bottom: 0; }

.item-kicker {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin: 0 0 0.35rem;
}
.item-title { font-size: 1.2rem; line-height: 1.35; margin: 0; font-weight: 600; letter-spacing: -0.005em; }
.item-title a { color: var(--text); text-decoration: none; }
.item-title a:hover { color: var(--link); text-decoration: underline; }
.item-summary { margin: 0.5rem 0 0; color: var(--text-soft); font-size: 0.98rem; line-height: 1.55; }

/* Blog-only meta row */
.item-meta { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.82rem; }
.item-separator { margin: 0 0.15rem; }

/* Pagination — understated, editorial */
.pagination {
    margin: 3rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.pagination-pages {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.85rem;
}
.pagination-pages a {
    color: var(--text-soft);
    text-decoration: none;
}
.pagination-pages a:hover { color: var(--link); text-decoration: underline; }
.pagination-page.is-current span {
    color: var(--text);
    font-weight: 600;
}
.pagination-gap { color: var(--muted); }
.pagination-prev, .pagination-next {
    color: var(--text-soft);
    text-decoration: none;
    white-space: nowrap;
}
.pagination-prev:hover, .pagination-next:hover { color: var(--link); text-decoration: underline; }

@media (max-width: 560px) {
    .pagination { flex-wrap: wrap; row-gap: 0.75rem; }
    .pagination-pages { order: 3; width: 100%; justify-content: center; }
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    padding: 2.5rem 0 2rem;
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.9rem;
}
.site-footer .container { max-width: var(--wide-width); }
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.footer-heading {
    margin: 0 0 0.6rem;
    color: var(--text);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.footer-copy {
    margin: 0;
    max-width: 46ch;
}
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
}
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--link); text-decoration: underline; }
.footer-note { margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); }

@media (max-width: 860px) {
    .home-hero-grid,
    .feature-grid,
    .post-preview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    h1 { font-size: 1.75rem; }
    .home-hero h1 { font-size: 2.25rem; }
    .home-lede { font-size: 1.05rem; }
    .site-header { margin-bottom: 1.5rem; }
    .site-header-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .site-nav ul { gap: 1rem; }
    .home-actions { flex-direction: column; align-items: stretch; }
}
