/* co-arising.github.io — base: reset, typography, layout primitives */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-offset, 84px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--red); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
a:hover { border-bottom-color: var(--red); }
a.muted { color: var(--ink-3); border-bottom-color: var(--line-strong); }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); font-weight: 800; margin: 0; letter-spacing: -.02em; }
h3 { font-size: var(--fs-h3); font-weight: 700; margin: 26px 0 10px; }
p { margin: 0 0 12px; }
code { font-family: var(--font-mono); font-size: .87em; background: color-mix(in srgb, var(--bg-sink) 75%, transparent); padding: .08em .32em; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 96px; }

/* ---------- numbered section headers (house style) ---------- */
section { padding: 52px 0 6px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.sec-head .no { font-family: var(--font-mono); font-size: 13px; color: var(--red); font-weight: 600; }
.sec-sub { color: var(--ink-2); max-width: 52em; margin: 6px 0 26px; }
.small { font-size: var(--fs-small); color: var(--ink-3); }
.src { font-size: var(--fs-tiny); color: var(--ink-3); }
.src a { color: var(--ink-3); border-bottom-color: var(--line-strong); }

.kicker {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--teal);
  margin: 0 0 12px;
}

/* ---------- page hero (band styling lives in pages.css; keep typography here) ---------- */
.page-hero .over {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .14em;
  color: var(--ink-3); text-transform: uppercase; margin: 0 0 14px;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.15;
  margin: 0 0 14px; letter-spacing: -.025em;
}
.page-hero h1 .accent { color: var(--red); }
.page-hero .thesis { font-size: clamp(16.5px, 2.2vw, 19.5px); color: var(--ink-2); max-width: 46em; margin: 0; }

/* ---------- injected chrome (nav + footer) ---------- */
#site-nav { position: sticky; top: 0; z-index: 30; }
#site-footer { margin-top: 64px; }

[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; background: var(--bg-raised); padding: 10px 16px; }
.skip-link:focus { top: 8px; }
main, header, section, .card, .feature, .site-footer .cols > div { min-width: 0; }
p, li, td, .thesis { overflow-wrap: anywhere; }
html:lang(zh-CN) h1, html:lang(zh-CN) h2 { letter-spacing: 0; line-height: 1.3; }
html:lang(zh-CN) .kicker, html:lang(zh-CN) .over { letter-spacing: .04em; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 620px) {
  .callout { grid-template-columns: minmax(0, 1fr); }
  .callout b { white-space: normal; }
}
