/*
  Long-form write-ups. Loads after style.css.
  The posts' own figure styles still use their original token names (--text-strong, --surface, ...),
  so those names are mapped onto the site palette here instead of rewriting every chart rule.
*/
:root {
  --text-strong: var(--text);
  --text-mid: var(--mid);
  --text-dim: var(--dim);
  --border: var(--rule);
  --border-hover: var(--dim);
  --blue: var(--link);
  --accent: var(--link);
  --mark-bg: color-mix(in srgb, var(--link) 9%, transparent);
  --surface: #fffdf8;
  --card-shadow: none;
  --transition: .2s ease;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --surface: #1c1c19; }
}
:root[data-theme="dark"] { --surface: #1c1c19; }

/* post header */
.post-kind { font: var(--fs-meta)/1.6 var(--mono); color: var(--dim); text-transform: lowercase; margin-bottom: 10px; }
main h1 { font: 600 34px/1.2 var(--serif); letter-spacing: -0.01em; color: var(--text); margin-bottom: 12px; }
.post-sub { font-size: 19px; line-height: 1.5; color: var(--mid); font-style: italic; margin-bottom: 18px; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  font: var(--fs-meta)/1.6 var(--mono); color: var(--dim);
  padding-bottom: 22px; border-bottom: 1px solid var(--rule); margin-bottom: 36px;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags span { font: 12px/1.6 var(--mono); padding: 1px 8px; border: 1px solid var(--rule); border-radius: 3px; color: var(--dim); }

/* body copy */
article { font-size: var(--fs-body); line-height: 1.7; color: var(--text); }
article p { margin-bottom: 20px; }
article h2 { font: 600 24px/1.3 var(--serif); color: var(--text); margin: 48px 0 14px; }
article h3 { font: 600 19px/1.35 var(--serif); color: var(--text); margin: 32px 0 10px; }
article ul, article ol { padding-left: 24px; margin-bottom: 20px; }
article li { margin-bottom: 8px; }
article strong { color: var(--text); }
article code { font-family: var(--mono); font-size: .84em; background: var(--mark-bg); padding: 1px 5px; border-radius: 3px; }

/* links back out */
.post-foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 10px 20px; font: var(--fs-meta)/1.6 var(--mono); }

@media (max-width: 620px) {
  main h1 { font-size: 28px; }
  .post-sub { font-size: 17px; }
}
