/* Article pages (writing/*.html): same palette and type as the main site */
:root {
  --bg: #f6f5f2; --surface: #ffffff; --surface-2: #efede8; --text: #111318; --muted: #5d6270; --line: #e2dfd8;
  --accent: #2e4fd6; --accent-soft: #e6ebff;
  --serif: "Instrument Serif", Georgia, serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0b0c0f; --surface: #131519; --surface-2: #1a1d23; --text: #eceef3; --muted: #9aa1b0; --line: #262a32; --accent: #8ea4ff; --accent-soft: #1b2340; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0b0c0f; --surface: #131519; --surface-2: #1a1d23; --text: #eceef3; --muted: #9aa1b0; --line: #262a32; --accent: #8ea4ff; --accent-soft: #1b2340; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.w-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.w-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.w-top .w-wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.w-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.w-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--text); color: var(--bg); font: italic 16px var(--serif); }
.w-back { font-size: 14px; font-weight: 500; text-decoration: none; }
.w-article { padding: 48px 0 24px; }
.w-kicker { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.w-article h1 { margin: 0 0 14px; font: 400 clamp(32px, 6vw, 48px)/1.1 var(--serif); letter-spacing: -.01em; }
.w-meta { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.w-meta b { color: var(--text); font-weight: 600; }
.w-note { margin: 0 0 32px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.w-body h2 { margin: 2em 0 .5em; font: 400 30px/1.2 var(--serif); }
.w-body h3 { margin: 1.6em 0 .4em; font-size: 19px; font-weight: 600; line-height: 1.35; }
.w-body h4 { margin: 1.4em 0 .3em; font-size: 16.5px; font-weight: 600; }
.w-body p, .w-body ul, .w-body ol { margin: 0 0 1.1em; }
.w-body li { margin: .3em 0; }
.w-body strong, .w-body b { font-weight: 600; }
.w-body figure { margin: 1.8em 0; }
.w-body img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.w-body figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: 13.5px; }
.w-body figure:has(table) { overflow-x: auto; }
.w-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 1.4em 0; }
.w-body td, .w-body th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.w-body tr:nth-child(odd) td { background: var(--surface); }
.w-body blockquote { margin: 1.4em 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.w-more { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px 0 56px; border-top: 1px solid var(--line); }
.w-more a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: 14.5px; line-height: 1.4; }
.w-more a:hover { border-color: var(--accent); }
.w-more small { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.w-next { grid-column: 2; text-align: right; }
.w-foot { border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 560px) { body { font-size: 16.5px; } .w-more { grid-template-columns: 1fr; } .w-next { grid-column: auto; text-align: left; } .w-back { font-size: 13px; } }
