/* Reading pages (guides, comparisons, 404), 29 Oct 2026 elegance pass. Loaded on top of
   site.css by every page that is not the home page (build.py). The home page's atmosphere
   (two hairlines, a whisper of grain) and its editorial type: Instrument Serif headings,
   Figtree body at a comfortable reading size, gold kept for links and accents.
   Hindi, Japanese, Korean and Chinese keep the sans for headings (the serif is Latin only). */

@font-face {
  font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/instrument-serif.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}

body.inner {
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --grid-line: rgba(240, 232, 216, 0.05);
  --read: #ddd3c0;
  --glow-mid: rgba(212, 165, 68, 0.2);
  --edge: min(624px, calc(50vw - 8px));
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.inner::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line), var(--grid-line)), linear-gradient(var(--grid-line), var(--grid-line));
  background-size: 1px 100%; background-repeat: no-repeat;
  background-position: calc(50% - var(--edge)) 0, calc(50% + var(--edge)) 0;
}
body.inner::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.inner > * { position: relative; z-index: 1; }
body.inner header.site { position: sticky; z-index: 20; }
body.inner header.site .wrap { max-width: 1240px; }

/* The article column */
body.inner main { padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 120px); }
body.inner main .wrap:not(.wide) { max-width: 720px; }
body.inner main h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6vw, 68px); line-height: 1.02;
  letter-spacing: -0.015em; margin: 0 0 var(--space-4); text-wrap: balance;
}
body.inner main .wrap:not(.wide) h1 { font-size: clamp(42px, 6vw, 68px); line-height: 1.02; }
body.inner .page-date { font-size: 14px; color: var(--faint); margin-bottom: var(--space-10); }
body.inner main h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.08;
  letter-spacing: -0.01em; margin: var(--space-16) 0 var(--space-4);
}
body.inner main .wrap:not(.wide) h2 { margin-top: var(--space-16); }
body.inner main h3 { font-family: var(--font); font-weight: 600; font-size: 18px; letter-spacing: 0; margin: var(--space-8) 0 var(--space-2); }
body.inner main p, body.inner main li { font-size: 17.5px; line-height: 1.72; color: var(--read); }
body.inner main .wrap:not(.wide) > p, body.inner main .wrap:not(.wide) > ul, body.inner main .wrap:not(.wide) > ol { max-width: 64ch; }
body.inner main li { margin-bottom: var(--space-3); }
body.inner main strong { color: var(--text); font-weight: 650; }
body.inner main a:not(.button) { text-decoration: underline; text-decoration-color: rgba(232, 200, 106, 0.35); text-underline-offset: 4px; }
body.inner main a:not(.button):hover { text-decoration-color: var(--gold-2); }
body.inner main ol { padding-left: 1.3em; }
body.inner main ol li::marker { font-family: var(--serif); font-style: italic; font-size: 1.15em; color: var(--gold-2); }
body.inner main ul li::marker { color: var(--gold); }
body.inner main blockquote {
  background: none; border: 0; border-left: 2px solid var(--gold); border-radius: 0; padding: var(--space-1) 0 var(--space-1) var(--space-6); margin: var(--space-8) 0;
}
body.inner main blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 27px); line-height: 1.35; color: var(--text); }
body.inner main .table-scroll { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: var(--space-6) 0; }
body.inner main table { font-size: 15.5px; }
body.inner main th { font-family: var(--font); font-weight: 600; color: var(--faint); font-size: 13.5px; }
body.inner main td { color: var(--read); line-height: 1.55; }
body.inner main .table-scroll td:first-child { color: var(--text); font-weight: 600; }

/* Guide lists (the guides index and the home page links) */
body.inner main .links ul { max-width: none; border-top: 1px solid var(--line); margin-top: var(--space-6); }
body.inner main .links li { margin: 0; padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
body.inner main .links li a { display: block; text-decoration: none; font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.15; color: var(--text); margin-bottom: var(--space-1); }
body.inner main .links li a:hover { color: var(--gold-2); }

/* The closing call to action: the cracking egg from the home page beside the button. */
body.inner .cta-egg {
  display: flex; align-items: center; gap: var(--space-6); margin: var(--space-12) 0 var(--space-4); padding: var(--space-6) var(--space-8);
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden;
}
body.inner .cta-egg::before {
  content: ""; position: absolute; left: -10%; top: 50%; width: 60%; aspect-ratio: 1; transform: translateY(-50%);
  background: radial-gradient(closest-side, var(--glow-mid), transparent 70%); pointer-events: none;
}
body.inner .cta-egg img { position: relative; width: 84px; height: auto; flex: none; transform-origin: 50% 92%; animation: egg-wobble 3.4s ease-in-out infinite; filter: drop-shadow(0 12px 16px var(--shade)); }
body.inner .cta-egg .button { position: relative; margin: 0; }
@keyframes egg-wobble {
  0%, 72%, 100% { transform: rotate(0); }
  76% { transform: rotate(-5deg); } 80% { transform: rotate(4deg); } 84% { transform: rotate(-3deg); } 88% { transform: rotate(1.5deg); }
}
@media (max-width: 520px) {
  body.inner .cta-egg { flex-direction: column; text-align: center; padding: var(--space-6); }
  body.inner .cta-egg .button { white-space: normal; text-align: center; }
}

/* Scripts the serif does not cover keep the sans for headings and list titles. */
:lang(ja) body.inner main :is(h1, h2, .links li a), :lang(ko) body.inner main :is(h1, h2, .links li a),
:lang(zh) body.inner main :is(h1, h2, .links li a), :lang(hi) body.inner main :is(h1, h2, .links li a) {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
}
:lang(ja) body.inner main h1, :lang(ko) body.inner main h1, :lang(zh) body.inner main h1, :lang(hi) body.inner main h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.2; }
:lang(ja) body.inner main h2, :lang(ko) body.inner main h2, :lang(zh) body.inner main h2, :lang(hi) body.inner main h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.3; }
:lang(ja) body.inner main .links li a, :lang(ko) body.inner main .links li a, :lang(zh) body.inner main .links li a, :lang(hi) body.inner main .links li a { font-size: 21px; }
:lang(ja) body.inner main :is(h1, h2, p, li) { word-break: auto-phrase; line-break: strict; }

@media (prefers-reduced-motion: reduce) {
  body.inner .cta-egg img { animation: none; }
}

/* Exercise pages (2026-11-01): the app's demo, only for the two moves whose demos the site
   already ships (assets/img/break/, Higgsfield-generated). Under Reduce Motion the <picture>
   serves the first-frame still instead. */
body.inner .ex-demo { margin: var(--space-6) 0; width: min(240px, 100%); aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }
body.inner .ex-demo img { display: block; width: 100%; height: 100%; object-fit: contain; }
