/* Shared styles for forss.org /writing pages */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #999;
    --accent: #d40000;
    --accent-hover: #b30000;
    --border: #e0e0e0;
    --sans: 'Inter', -apple-system, Helvetica Neue, sans-serif;
    --mono: 'Space Mono', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.7; }

/* ── Navigation ── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 20px 48px; display: flex; justify-content: space-between; align-items: center;
    background: rgba(250, 250, 250, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); transition: var(--transition);
}
nav .brand { font-weight: 700; font-size: 0.875rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
nav .brand .dot { color: var(--accent); }
nav .links { display: flex; gap: 32px; list-style: none; align-items: center; }
nav .links a { font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; transition: color 0.2s; }
nav .links a:hover { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; z-index: 101; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-secondary); transition: var(--transition); }

/* ── Breadcrumb ── */
.breadcrumb { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border); }

/* ── Article ── */
.article-wrap { max-width: 720px; margin: 0 auto; padding: 140px 48px 96px; }
.article-meta { font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 16px; }
h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 24px; }
.standfirst { font-size: 1.2rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.article-body p { font-size: 1.05rem; color: var(--text); margin-bottom: 24px; }
.article-body h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; margin: 40px 0 16px; }
.article-body strong { font-weight: 600; }
.article-body ul { margin: 0 0 24px 1.1rem; }
.article-body li { font-size: 1.05rem; margin-bottom: 10px; }

.callout { margin: 48px 0; padding: 24px 28px; border-left: 3px solid var(--accent); background: rgba(212, 0, 0, 0.03); font-size: 0.95rem; color: var(--text-secondary); }
.callout a { color: var(--accent); font-weight: 600; text-decoration: none; }
.callout a:hover { text-decoration: underline; }

.article-foot { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.article-foot .label { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 20px; }
.related a { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; transition: var(--transition); }
.related a:last-child { border-bottom: 1px solid var(--border); }
.related a:hover { color: var(--accent); }
.related h4 { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.related .meta { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); white-space: nowrap; }

.back-home { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; color: var(--accent); font-size: 0.75rem; font-weight: 500; text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; transition: gap 0.2s; }
.back-home:hover { gap: 12px; }

/* ── Hub ── */
.wrap { max-width: 760px; margin: 0 auto; padding: 140px 48px 96px; }
.page-label { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px; }
.intro { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 56px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.list { display: flex; flex-direction: column; }
.list a { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 22px 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; transition: var(--transition); }
.list a:last-child { border-bottom: 1px solid var(--border); }
.list a:hover { color: var(--accent); }
.list .main { display: flex; flex-direction: column; gap: 6px; }
.list h2 { font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.list .meta { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.list .badge { color: var(--accent); }
.list .arrow { color: var(--accent); flex-shrink: 0; }

/* ── Footer ── */
footer { padding: 32px 48px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 768px) {
    nav { padding: 16px 24px; }
    nav.menu-open { bottom: 0; flex-direction: column; background: #fafafa; backdrop-filter: none; -webkit-backdrop-filter: none; }
    nav .links { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 32px; }
    nav.menu-open .links { display: flex; flex: 1; }
    nav .links a { font-size: 1rem; letter-spacing: 0.08em; color: var(--text); }
    .nav-toggle { display: flex; }
    .article-wrap, .wrap { padding: 112px 24px 72px; }
    h1 { font-size: 1.9rem; }
    .standfirst { font-size: 1.05rem; }
    footer { padding: 24px; flex-direction: column; gap: 8px; }
}
