:root {
    --canvas: #f7f7f4;
    --canvas-soft: #fafaf7;
    --surface-card: #ffffff;
    --surface-strong: #e6e5e0;
    --primary: #f54e00;
    --primary-active: #d04200;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --on-primary: #ffffff;
    --hairline: #e6e5e0;
    --hairline-soft: #efeee8;
    --hairline-strong: #cfcdc4;
    --success: #1f8a65;
    --error: #cf2d56;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;
    --sp-xxs: 4px;
    --sp-xs: 8px;
    --sp-sm: 12px;
    --sp-base: 16px;
    --sp-md: 20px;
    --sp-lg: 24px;
    --sp-xl: 32px;
    --sp-xxl: 48px;
    --sp-section: 80px;
    --font-sans: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--canvas);
    color: var(--body);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ink);
    text-decoration: none;
}

a:hover {
    color: var(--primary);
}

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

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-xl);
}

.site-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-xl);
}

.nav-logo {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.nav-logo:hover {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.nav-item a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    line-height: 1.4;
    padding: var(--sp-xxs) 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.nav-item a:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.nav-item--active a {
    color: var(--ink);
    border-bottom-color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--sp-xs);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.hero {
    padding: var(--sp-section) 0;
    border-bottom: 1px solid var(--hairline);
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xxl);
    align-items: center;
}

.hero-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    padding: var(--sp-xxs) var(--sp-sm);
    border-radius: var(--radius-pill);
    margin-bottom: var(--sp-lg);
}

.hero h1 {
    font-size: 56px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--ink);
    margin-bottom: var(--sp-lg);
}

.hero-lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
    margin-bottom: var(--sp-xl);
    max-width: 480px;
}

.hero-meta {
    font-size: 13px;
    color: var(--muted);
}

.hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    aspect-ratio: 4/3;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section {
    padding: var(--sp-section) 0;
}

.section--bordered {
    border-bottom: 1px solid var(--hairline);
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--sp-lg);
}

.section-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: var(--sp-base);
}

.section-lead {
    font-size: 16px;
    line-height: 1.5;
    color: var(--body);
    max-width: 600px;
    margin-bottom: var(--sp-xxl);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
}

.article-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s;
}

.article-card:hover {
    border-color: var(--hairline-strong);
}

.article-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-img img {
    transform: scale(1.03);
}

.article-card-body {
    padding: var(--sp-lg);
}

.article-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    padding: 2px var(--sp-xs);
    border-radius: var(--radius-pill);
    margin-bottom: var(--sp-sm);
}

.article-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: var(--sp-xs);
}

.article-card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
    margin-bottom: var(--sp-base);
}

.article-card-meta {
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--hairline-soft);
    padding-top: var(--sp-sm);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
    margin-top: var(--sp-xxl);
}

.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
}

.feature-card-icon {
    font-size: 24px;
    margin-bottom: var(--sp-base);
}

.feature-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--sp-xs);
}

.feature-card-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--sp-xxl);
    padding: var(--sp-section) 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--sp-xl);
    padding-right: var(--sp-xl);
}

.article-content h1 {
    font-size: 42px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: var(--ink);
    margin-bottom: var(--sp-lg);
}

.article-content h2 {
    font-size: 26px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin-top: var(--sp-xxl);
    margin-bottom: var(--sp-base);
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    margin-top: var(--sp-xl);
    margin-bottom: var(--sp-sm);
}

.article-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
    margin-bottom: var(--sp-base);
}

.article-content ul,
.article-content ol {
    list-style: disc;
    padding-left: var(--sp-xl);
    margin-bottom: var(--sp-base);
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
    margin-bottom: var(--sp-xxs);
}

.article-content a {
    color: var(--primary);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.article-content a:hover {
    border-bottom-color: var(--primary);
}

.article-meta {
    display: flex;
    gap: var(--sp-base);
    align-items: center;
    margin-bottom: var(--sp-xl);
    padding-bottom: var(--sp-xl);
    border-bottom: 1px solid var(--hairline);
    flex-wrap: wrap;
}

.article-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    padding: 2px var(--sp-xs);
    border-radius: var(--radius-pill);
}

.article-date {
    font-size: 13px;
    color: var(--muted);
}

.article-hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin-bottom: var(--sp-xxl);
    aspect-ratio: 21/9;
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-image-inline {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin: var(--sp-xl) 0;
}

.article-image-inline img {
    width: 100%;
    height: auto;
    display: block;
}

.article-image-caption {
    font-size: 13px;
    color: var(--muted);
    padding: var(--sp-xs) var(--sp-sm);
    background: var(--canvas-soft);
}

.article-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.sidebar-widget {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
    margin-bottom: var(--sp-lg);
}

.sidebar-widget-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--sp-base);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.sidebar-links a {
    font-size: 14px;
    color: var(--body);
    padding: var(--sp-xs) 0;
    border-bottom: 1px solid var(--hairline-soft);
    transition: color 0.15s;
}

.sidebar-links a:last-child {
    border-bottom: none;
}

.sidebar-links a:hover {
    color: var(--primary);
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.toc-list a {
    font-size: 14px;
    color: var(--body);
    padding: 3px 0;
    border-left: 2px solid transparent;
    padding-left: var(--sp-sm);
    transition: color 0.15s, border-color 0.15s;
}

.toc-list a:hover {
    color: var(--ink);
    border-left-color: var(--primary);
}

.info-box {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: var(--sp-base) var(--sp-lg);
    margin: var(--sp-xl) 0;
}

.info-box p {
    margin-bottom: 0;
    font-size: 15px;
}

.sources-list {
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    margin-top: var(--sp-xxl);
}

.sources-list h3 {
    margin-top: 0;
}

.sources-list ol {
    list-style: decimal;
    padding-left: var(--sp-xl);
}

.sources-list li {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: var(--sp-xs);
}

.sources-list a {
    color: var(--body);
}

.page-header {
    padding: var(--sp-xxl) 0;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: var(--sp-xxl);
}

.page-header h1 {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.8px;
    color: var(--ink);
    margin-bottom: var(--sp-sm);
}

.page-header p {
    font-size: 16px;
    color: var(--muted);
}

.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--sp-xl) var(--sp-section);
}

.page-content h2 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    margin-top: var(--sp-xxl);
    margin-bottom: var(--sp-base);
}

.page-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
    margin-bottom: var(--sp-base);
}

.page-content ul {
    list-style: disc;
    padding-left: var(--sp-xl);
    margin-bottom: var(--sp-base);
}

.page-content li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--body);
    margin-bottom: var(--sp-xxs);
}

.contact-form {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--sp-xxl);
    margin-top: var(--sp-xxl);
}

.form-group {
    margin-bottom: var(--sp-lg);
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--sp-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--surface-card);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-md);
    padding: 12px var(--sp-base);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.15s;
    height: 44px;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ink);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error);
}

.form-error {
    font-size: 13px;
    color: var(--error);
    margin-top: var(--sp-xxs);
    display: none;
}

.form-error.visible {
    display: block;
}

.form-status {
    font-size: 14px;
    padding: var(--sp-sm) var(--sp-base);
    border-radius: var(--radius-md);
    margin-top: var(--sp-base);
    display: none;
}

.form-status.success {
    background: #e8f5f0;
    color: var(--success);
    border: 1px solid #b3ddd0;
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.btn--primary {
    background: var(--primary);
    color: var(--on-primary);
    padding: 10px 18px;
    height: 40px;
}

.btn--primary:hover {
    background: var(--primary-active);
    color: var(--on-primary);
}

.btn--secondary {
    background: var(--surface-card);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    padding: 10px 18px;
    height: 40px;
}

.btn--secondary:hover {
    background: var(--surface-strong);
    color: var(--ink);
}

.btn--submit {
    background: var(--ink);
    color: var(--canvas);
    padding: 12px var(--sp-md);
    height: 44px;
    width: 100%;
}

.btn--submit:hover {
    background: #3d3c35;
    color: var(--canvas);
}

.btn--submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 64px var(--sp-xl) 48px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-xxl);
    margin-bottom: var(--sp-xxl);
}

.footer-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
    margin-bottom: var(--sp-sm);
}

.footer-tagline {
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
}

.footer-heading {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--sp-sm);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.footer-links a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--ink);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--hairline);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: var(--sp-xs);
}

.footer-disclaimer {
    font-size: 12px;
}

.cookie-banner {
    position: fixed;
    bottom: var(--sp-lg);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - var(--sp-xl) * 2);
    max-width: 760px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--radius-lg);
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(38, 37, 30, 0.15);
}

.cookie-inner {
    padding: var(--sp-lg) var(--sp-xl);
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
}

.cookie-inner p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--canvas);
    flex: 1;
}

.cookie-actions {
    display: flex;
    gap: var(--sp-sm);
    flex-shrink: 0;
}

.breadcrumb {
    display: flex;
    gap: var(--sp-xs);
    align-items: center;
    padding: var(--sp-base) 0;
    font-size: 13px;
    color: var(--muted);
    border-bottom: 1px solid var(--hairline-soft);
    margin-bottom: var(--sp-xxl);
}

.breadcrumb a {
    color: var(--muted);
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: var(--ink);
}

.breadcrumb-sep {
    color: var(--muted-soft);
}

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: var(--sp-xl);
    }

    .hero h1 {
        font-size: 48px;
    }

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

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

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--canvas);
        border-bottom: 1px solid var(--hairline);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--sp-base) var(--sp-xl);
        gap: var(--sp-sm);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: -0.8px;
    }

    .hero-lead {
        font-size: 16px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--sp-xl);
    }

    .cookie-inner {
        flex-direction: column;
        gap: var(--sp-base);
        align-items: flex-start;
    }

    .section-title {
        font-size: 26px;
    }

    .container {
        padding: 0 var(--sp-base);
    }

    .article-content h1 {
        font-size: 28px;
    }

    .article-content h2 {
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    :root {
        --sp-section: 48px;
    }
}
