*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --canvas: #f7f7f4;
    --canvas-soft: #fafaf7;
    --surface-card: #ffffff;
    --surface-strong: #e6e5e0;
    --primary: #f54e00;
    --primary-active: #d04200;
    --on-primary: #ffffff;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --hairline: #e6e5e0;
    --hairline-soft: #efeee8;
    --hairline-strong: #cfcdc4;
    --semantic-success: #1f8a65;
    --semantic-error: #cf2d56;
    --timeline-thinking: #dfa88f;
    --timeline-grep: #9fc9a2;
    --timeline-read: #9fbbe0;
    --timeline-edit: #c0a8dd;
    --timeline-done: #c08532;
    --rounded-xs: 4px;
    --rounded-sm: 6px;
    --rounded-md: 8px;
    --rounded-lg: 12px;
    --rounded-xl: 16px;
    --rounded-pill: 9999px;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--canvas);
    color: var(--body);
    font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: 1;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    padding: 6px 10px;
    border-radius: var(--rounded-sm);
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--ink);
    background: var(--surface-strong);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--on-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 10px 18px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-primary:hover { background: var(--primary-active); color: var(--on-primary); }
.btn-primary:active { background: var(--primary-active); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 10px 18px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: 1px solid var(--hairline-strong);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-secondary:hover { background: var(--surface-strong); color: var(--ink); }

.hero-band {
    padding: 80px 0 64px;
    border-bottom: 1px solid var(--hairline);
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-label {
    display: inline-block;
    background: var(--surface-strong);
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--rounded-pill);
    margin-bottom: 24px;
}

.hero-band h1 {
    font-size: 72px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -2.16px;
    color: var(--ink);
    max-width: 780px;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--body);
    max-width: 560px;
    margin-bottom: 36px;
}

.hero-image-wrap {
    margin-top: 48px;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    background: var(--surface-card);
    max-height: 460px;
}

.hero-image-wrap img {
    width: 100%;
    height: 460px;
    object-fit: cover;
}

.section {
    padding: 80px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.section-head {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 16px;
}

.section-sub {
    font-size: 16px;
    color: var(--body);
    max-width: 560px;
    margin-bottom: 48px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
}

.feature-card-icon {
    font-size: 28px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.article-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card-image {
    height: 200px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card-image img { transform: scale(1.03); }

.article-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-tag {
    display: inline-block;
    background: var(--surface-strong);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--rounded-pill);
    margin-bottom: 12px;
}

.article-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-card p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
    flex: 1;
}

.article-card-link {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-card-link:hover { color: var(--primary-active); }

.article-page {
    padding: 48px 0 80px;
}

.article-page-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-meta-tag {
    background: var(--surface-strong);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--rounded-pill);
}

.article-meta-date {
    font-size: 13px;
    color: var(--muted);
}

.article-page h1 {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 16px;
}

.article-lede {
    font-size: 18px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 36px;
}

.article-hero-img {
    border-radius: var(--rounded-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin-bottom: 40px;
}

.article-hero-img img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.article-body h2 {
    font-size: 26px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin-top: 48px;
    margin-bottom: 16px;
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-top: 32px;
    margin-bottom: 12px;
}

.article-body p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 8px;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover { color: var(--primary-active); }

.article-body strong { color: var(--ink); font-weight: 600; }

.info-box {
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--rounded-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.info-box p {
    font-size: 14px;
    color: var(--body);
    margin: 0;
}

.code-inline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    padding: 2px 6px;
    border-radius: var(--rounded-xs);
    color: var(--ink);
}

.article-ref {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--hairline);
}

.article-ref h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.article-ref ul { list-style: none; padding: 0; }

.article-ref li {
    font-size: 13px;
    color: var(--body);
    margin-bottom: 6px;
}

.article-ref a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.timeline-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.pill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--rounded-pill);
    color: var(--ink);
}

.pill-thinking { background: var(--timeline-thinking); }
.pill-grep     { background: var(--timeline-grep); }
.pill-read     { background: var(--timeline-read); }
.pill-edit     { background: var(--timeline-edit); }
.pill-done     { background: var(--timeline-done); color: var(--on-primary); }

.contact-section {
    padding: 80px 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline-soft);
}

.contact-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-form {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-md);
    padding: 12px 16px;
    height: 44px;
    font-size: 16px;
    color: var(--ink);
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ink);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--semantic-error);
}

.field-error {
    font-size: 12px;
    color: var(--semantic-error);
    margin-top: 4px;
    display: none;
}

.field-error.visible { display: block; }

.form-status {
    margin-top: 16px;
    font-size: 14px;
    color: var(--semantic-success);
    display: none;
    padding: 12px 16px;
    background: #eef7f4;
    border: 1px solid #c2e0d7;
    border-radius: var(--rounded-md);
}

.form-status.visible { display: block; }

.form-loading {
    font-size: 14px;
    color: var(--muted);
    display: none;
    margin-top: 12px;
}

.form-loading.visible { display: block; }

.page-band {
    padding: 48px 0 16px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 48px;
}

.page-band h1 {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 12px;
}

.page-band p {
    font-size: 16px;
    color: var(--body);
}

.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.page-content h2 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    margin-top: 40px;
    margin-bottom: 12px;
}

.page-content p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 16px;
}

.page-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 16px;
}

.page-content li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 8px;
}

.page-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 48px;
}

.about-stat {
    border-top: 2px solid var(--primary);
    padding-top: 16px;
}

.about-stat .stat-num {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
}

.about-stat p {
    font-size: 14px;
    color: var(--body);
    margin: 0;
}

.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 64px 0 48px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 32px;
}

.footer-brand {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.footer-heading {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }

.footer-link {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}

.footer-link:hover { color: var(--ink); }

.footer-body {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid var(--hairline);
}

.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-card);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 24px rgba(38,37,30,0.08);
    z-index: 200;
    max-width: 600px;
    width: calc(100% - 48px);
    flex-wrap: wrap;
}

.cookie-banner p {
    font-size: 14px;
    color: var(--body);
    flex: 1;
}

.cookie-banner p a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner.hidden { display: none; }

.cookie-actions {
    display: flex;
    gap: 8px;
}

.breadcrumb {
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.breadcrumb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.breadcrumb ol {
    display: flex;
    gap: 6px;
    align-items: center;
    list-style: none;
    padding: 0;
}

.breadcrumb li {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb li::after { content: '/'; color: var(--muted-soft); }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--body); }
.breadcrumb a:hover { color: var(--ink); }

.related-articles {
    padding: 48px 0;
    border-top: 1px solid var(--hairline-soft);
    margin-top: 48px;
}

.related-articles h3 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .hero-band h1 { font-size: 56px; letter-spacing: -1.5px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: repeat(3, 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;
        padding: 16px 24px;
        gap: 4px;
    }
    .nav-menu.open { display: flex; }
    .nav-inner { position: relative; }
    .hero-band h1 { font-size: 36px; letter-spacing: -0.72px; }
    .hero-band { padding: 48px 0 40px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .article-page h1 { font-size: 28px; }
    .section { padding: 48px 0; }
    .section-head { font-size: 28px; }
}

@media (max-width: 640px) {
    .footer-inner { grid-template-columns: 1fr; }
    .hero-image-wrap img { height: 220px; }
}
