:root {
  --ink: #14213d;
  --ink-soft: #3b4a68;
  --paper: #faf7f1;
  --paper-2: #f1ebdf;
  --card: #ffffff;
  --line: #e2d9c8;
  --accent: #f2b134;
  --accent-ink: #7a4f00;
  --link: #1d4ed8;
  --muted: #5d6779;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px rgba(20,33,61,.06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f7;
    --ink-soft: #c4cbd9;
    --paper: #0f1626;
    --paper-2: #151e33;
    --card: #18223a;
    --line: #26314d;
    --accent: #f2b134;
    --accent-ink: #f6c968;
    --link: #8fb2ff;
    --muted: #9aa4b8;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap, .wrap-narrow { padding: 0 28px; } }
.section { padding-top: 56px; padding-bottom: 56px; }
.page-top { padding-top: 48px; }
.small { font-size: .875rem; color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .75em; }
.eyebrow a { color: inherit; text-decoration: none; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.meta { font-size: .85rem; color: var(--muted); margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 36px; border-radius: 9px; background: var(--ink); color: var(--paper); font-family: var(--serif); font-weight: 700; font-size: .8rem; white-space: nowrap; letter-spacing: -.02em; }
.brand-mark span { color: var(--accent); }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.brand-name em, .footer-brand em { font-style: normal; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--accent) 55%, transparent) 58%); }
nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 10px; border-radius: 8px; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav-cta { background: var(--ink); color: var(--paper) !important; }
.nav-cta:hover { background: var(--ink-soft) !important; }
@media (max-width: 520px) { .nav-cta { display: none; } }

/* Hero */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background:
  radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--paper); }
.hero-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.2fr 1fr; gap: 56px; } .hero { padding: 88px 0 72px; } }
.mark { background: linear-gradient(transparent 60%, color-mix(in srgb, var(--accent) 60%, transparent) 60%); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; padding: 13px 20px; border-radius: 10px; border: 2px solid var(--ink); }
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink); }

.decoder { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 8px; }
.decoder figcaption { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.decoder dl { margin: 0; }
.decoder div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px dashed var(--line); }
.decoder div:first-child { border-top: 0; }
.decoder dt { font-family: var(--serif); font-weight: 700; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent); text-decoration-thickness: 2px; }
.decoder dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 560px) { .decoder div { grid-template-columns: 11rem 1fr; gap: 16px; align-items: baseline; } }

/* Sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head a { font-weight: 600; text-decoration: none; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { color: var(--ink-soft); font-size: .95rem; }
.card .meta { margin-top: auto; }
.card-cat, .list-cat { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .4em; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; max-width: 720px; }
.empty-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin-bottom: .3em; }
.topics { border-top: 1px solid var(--line); }
.topic-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; grid-template-columns: 1fr; }
@media (min-width: 560px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
.topic-grid li { background: var(--card); padding: 22px; }
.topic-grid p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.t-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-ink); font-weight: 700; margin-bottom: 10px; }

/* Article list */
.list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.list a { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list a:hover .list-title { text-decoration: underline; }
.list-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.list-desc { color: var(--ink-soft); }
.list time { font-size: .85rem; color: var(--muted); }

/* Subscribe */
.subscribe { background: var(--ink); color: var(--paper); }
.subscribe-inner { max-width: 1120px; margin: 0 auto; padding: 56px 16px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 700px) { .subscribe-inner { padding: 64px 28px; } }
@media (min-width: 900px) { .subscribe-inner { grid-template-columns: 1.3fr 1fr; } }
.subscribe h2 { color: inherit; }
.subscribe p { color: color-mix(in srgb, var(--paper) 82%, transparent); }
.subscribe .eyebrow { color: var(--accent); }
.subscribe a { color: var(--accent); }
.sub-form { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-form input { flex: 1 1 220px; min-width: 0; font: inherit; padding: 13px 14px; border-radius: 10px; border: 2px solid transparent; background: var(--paper); color: #14213d; }
.sub-form button { font: inherit; font-weight: 600; padding: 13px 20px; border-radius: 10px; border: 0; background: var(--accent); color: #14213d; cursor: pointer; }
.sub-form .small { flex-basis: 100%; color: color-mix(in srgb, var(--paper) 70%, transparent); margin: 0; }
.sub-soon { border: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); border-radius: var(--radius); padding: 20px; }
.sub-soon-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--paper) !important; margin-bottom: .25em; }
@media (prefers-color-scheme: dark) {
  .subscribe { background: #0a0f1b; border-top: 1px solid var(--line); }
  .subscribe h2, .subscribe p, .sub-soon-title { color: var(--ink) !important; }
  .subscribe .small { color: var(--muted) !important; }
  .sub-soon { border-color: var(--line); }
}

/* Article */
.post { padding-top: 48px; padding-bottom: 24px; }
.post-header h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
.notice { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; padding: 14px 16px; font-size: .95rem; margin: 24px 0 32px; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.5em; font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); color: var(--ink-soft); font-style: italic; }
.prose code { background: var(--paper-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.post-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.back { font-weight: 600; text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 28px; background: var(--paper-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; margin-bottom: .2em; }
.fine { max-width: 80ch; }
