@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

*, *::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;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --on-primary: #ffffff;
    --hairline: #e6e5e0;
    --hairline-soft: #efeee8;
    --hairline-strong: #cfcdc4;
    --timeline-thinking: #dfa88f;
    --timeline-grep: #9fc9a2;
    --timeline-read: #9fbbe0;
    --timeline-edit: #c0a8dd;
    --timeline-done: #c08532;
    --semantic-success: #1f8a65;
    --semantic-error: #cf2d56;
    --rounded-xs: 4px;
    --rounded-sm: 6px;
    --rounded-md: 8px;
    --rounded-lg: 12px;
    --rounded-xl: 16px;
    --rounded-pill: 9999px;
}

html { font-size: 16px; 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;
    font-weight: 400;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; display: block; }

code, pre, .code { font-family: 'JetBrains Mono', monospace; font-size: 13px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.site-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-wordmark {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
}

.nav-wordmark span { color: var(--primary); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.4;
    transition: color 0.15s;
}

.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }

.nav-cta {
    background: var(--primary);
    color: var(--on-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    height: 40px;
    border-radius: var(--rounded-md);
    display: inline-flex;
    align-items: center;
    transition: background 0.15s;
}

.nav-cta:hover { background: var(--primary-active); color: var(--on-primary); }

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.2s;
}

.nav-mobile {
    display: none;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 16px 24px;
}

.nav-mobile.open { display: block; }

.nav-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-mobile a {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
}

.nav-mobile a:hover { color: var(--ink); }

/* HERO */
.hero-band {
    padding: 80px 0;
    background: var(--canvas);
}

.hero-band h1 {
    font-size: 72px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -2.16px;
    color: var(--ink);
    max-width: 760px;
    margin-bottom: 20px;
}

.hero-band .hero-sub {
    font-size: 16px;
    color: var(--body);
    max-width: 520px;
    line-height: 1.5;
    margin-bottom: 36px;
}

.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.btn-download {
    background: var(--ink);
    color: var(--canvas);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    height: 44px;
    border-radius: var(--rounded-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.15s;
}

.btn-download:hover { opacity: 0.85; color: var(--canvas); }

.btn-text-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-text-link:hover { color: var(--ink); }

.hero-img {
    margin-top: 56px;
    border-radius: var(--rounded-lg);
    border: 1px solid var(--hairline);
    overflow: hidden;
    max-height: 440px;
    object-fit: cover;
    width: 100%;
}

/* SECTION */
.section { padding: 80px 0; }
.section-alt { background: var(--canvas-soft); }

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.section-title {
    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;
    line-height: 1.5;
    margin-bottom: 48px;
}

/* CARDS */
.cards-grid {
    display: grid;
    gap: 20px;
}

.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 15px;
    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-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.article-card-title {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-card-excerpt {
    font-size: 15px;
    color: var(--body);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 20px;
}

.article-card-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-card-link:hover { color: var(--primary-active); }

/* BADGE */
.badge-pill {
    display: inline-flex;
    align-items: center;
    background: var(--surface-strong);
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    border-radius: var(--rounded-pill);
    padding: 4px 10px;
}

/* ARTICLE PAGE */
.article-hero {
    padding: 60px 0 40px;
}

.article-hero h1 {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -1.2px;
    color: var(--ink);
    max-width: 760px;
    margin-bottom: 16px;
}

.article-meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.article-meta span { display: flex; align-items: center; gap: 6px; }

.article-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--rounded-lg);
    border: 1px solid var(--hairline);
    margin-bottom: 56px;
}

.article-body { max-width: 720px; }

.article-body h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    line-height: 1.25;
    margin: 48px 0 16px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
    margin: 32px 0 12px;
}

.article-body p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.65;
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin: 0 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-body li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.6;
}

.article-body .code-block {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--ink);
    line-height: 1.5;
    overflow-x: auto;
    margin-bottom: 24px;
}

.article-body .note-block {
    border-left: 3px solid var(--timeline-grep);
    background: var(--canvas-soft);
    border-radius: 0 var(--rounded-md) var(--rounded-md) 0;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 15px;
    color: var(--body);
    line-height: 1.55;
}

.article-body .note-block strong { color: var(--ink); }

.article-body a { color: var(--primary); text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color 0.15s; }
.article-body a:hover { text-decoration-color: var(--primary); }

/* TIMELINE PILLS */
.timeline-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }

.tpill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    border-radius: var(--rounded-pill);
    padding: 4px 10px;
    color: var(--ink);
}

.tpill-thinking { background: var(--timeline-thinking); }
.tpill-grep { background: var(--timeline-grep); }
.tpill-read { background: var(--timeline-read); }
.tpill-edit { background: var(--timeline-edit); }
.tpill-done { background: var(--timeline-done); color: #fff; }

/* RELATED LINKS */
.related-articles { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--hairline); }

.related-articles h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
}

.related-list { display: flex; flex-direction: column; gap: 12px; }

.related-list a {
    font-size: 15px;
    color: var(--body);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    transition: border-color 0.15s;
}

.related-list a:hover { border-color: var(--hairline-strong); color: var(--ink); }

/* CTA BAND */
.cta-band {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 96px 0;
    text-align: center;
}

.cta-band h2 {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 20px;
}

.cta-band p {
    font-size: 16px;
    color: var(--body);
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* FORM */
.form-section {
    background: var(--canvas);
    padding: 80px 0;
}

.form-wrapper {
    max-width: 600px;
}

.form-row { margin-bottom: 20px; }

.form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-row input, .form-row textarea {
    width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-md);
    padding: 12px 16px;
    font-size: 15px;
    color: var(--ink);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.form-row input::placeholder, .form-row textarea::placeholder { color: var(--muted-soft); }
.form-row input:focus, .form-row textarea:focus { border-color: var(--primary); }

.form-row textarea { height: 120px; resize: vertical; }

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}

.btn-primary:hover { background: var(--primary-active); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.form-message {
    display: none;
    padding: 14px 16px;
    border-radius: var(--rounded-md);
    font-size: 14px;
    margin-top: 16px;
}

.form-message.success {
    display: block;
    background: #e8f7f2;
    color: var(--semantic-success);
    border: 1px solid #b4e0d0;
}

/* FOOTER */
.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 64px 0 48px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 32px;
}

.footer-brand .footer-wordmark {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.footer-brand .footer-wordmark span { color: var(--primary); }

.footer-brand p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 220px;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-col ul li a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}

.footer-col ul li a:hover { color: var(--ink); }

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--muted);
}

.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--ink); }

/* COOKIE BANNER */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    color: var(--canvas);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 999;
    flex-wrap: wrap;
}

#cookie-banner p {
    font-size: 14px;
    line-height: 1.5;
    max-width: 640px;
}

#cookie-banner a { color: var(--timeline-read); text-decoration: underline; }

.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }

.btn-cookie-accept {
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--rounded-md);
    cursor: pointer;
    transition: background 0.15s;
}

.btn-cookie-accept:hover { background: var(--primary-active); }

.btn-cookie-reject {
    background: transparent;
    color: var(--canvas);
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--rounded-md);
    cursor: pointer;
    transition: border-color 0.15s;
}

.btn-cookie-reject:hover { border-color: rgba(255,255,255,0.6); }

/* PAGE HEADER (about/privacy/terms) */
.page-header {
    padding: 64px 0 40px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 56px;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -1.2px;
    color: var(--ink);
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: var(--body);
    max-width: 520px;
}

.page-content { max-width: 760px; padding-bottom: 80px; }

.page-content h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin: 40px 0 14px;
}

.page-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin: 28px 0 10px;
}

.page-content p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.65;
    margin-bottom: 18px;
}

.page-content ul, .page-content ol {
    margin: 0 0 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-content li { font-size: 16px; color: var(--body); line-height: 1.6; }
.page-content a { color: var(--primary); }
.page-content a:hover { text-decoration: underline; }

/* BREADCRUMB */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { color: var(--muted-soft); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero-band h1 { font-size: 56px; letter-spacing: -1.5px; }
    .footer-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
    .cards-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu, .nav-cta { display: none; }
    .nav-hamburger { display: flex; }
    .hero-band h1 { font-size: 36px; letter-spacing: -0.9px; }
    .hero-band { padding: 48px 0; }
    .section { padding: 56px 0; }
    .section-title { font-size: 28px; }
    .article-hero h1 { font-size: 32px; letter-spacing: -0.6px; }
    .page-header h1 { font-size: 32px; }
    .cta-band h2 { font-size: 26px; }
}

@media (max-width: 640px) {
    .hero-band h1 { font-size: 32px; letter-spacing: -0.6px; }
    .cards-grid-3, .cards-grid-2 { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .hero-img { max-height: 220px; }
    #cookie-banner { flex-direction: column; align-items: flex-start; }
}