/* Shared base for every interactive feature (format = "html"). build.py loads it before the post's own files.
   It keeps custom posts looking like data123: site colours, type, reading width and a few common blocks.
   Shared blocks use the fx- prefix; a post's own CSS uses its own prefix (gw-, dh-, ...) and never restyles fx- or another post. */
.feature {
  --navy: #0b303b; --ink: #102e3a; --teal: #087c75; --teal-2: #158377; --mint: #a7efce; --muted: #5c737b;
  --line: #dce8e4; --soft: #f2f7f5; --paper: #fbfdfc; --ai: #6b3fa8; --ai-soft: #f3eefb;
  --fx-sticky-top: 78px; /* height of the sticky site header */
  --fx-read: 760px;      /* reading column */
  --fx-wide: 1180px;     /* widgets and two-column layouts */
  color: var(--ink);
}
.feature :where(h1, h2, h3) { color: var(--ink); letter-spacing: -.025em; }
.feature :where(img, svg) { max-width: 100%; }
.feature :where([id]) { scroll-margin-top: calc(var(--fx-sticky-top) + 20px); }

/* small mono label above a title */
.fx-kicker { font: 600 12px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin: 0 0 16px; }

/* reading text */
.fx-prose { max-width: var(--fx-read); font-size: 17.5px; line-height: 1.72; }
.fx-prose h2 { font-size: clamp(25px, 3.2vw, 33px); line-height: 1.15; font-weight: 820; margin: 44px 0 14px; }
.fx-prose h3 { font-size: 20px; line-height: 1.3; font-weight: 780; margin: 28px 0 8px; }
.fx-prose p { margin: 0 0 1.05em; }
.fx-prose :where(ol, ul) { padding-left: 1.3em; margin: 0 0 1.2em; }
.fx-prose li { margin: .4em 0; }
.feature :where(.fx-prose, .fx-box) a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.feature :where(.fx-prose, .fx-box) a:hover { color: var(--navy); }

/* a framed aside */
.fx-box { background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin: 26px 0; }
.fx-box > :first-child { margin-top: 0; }
.fx-box > :last-child { margin-bottom: 0; }
.fx-box h2 { font-size: 22px; margin: 0 0 10px; }
.fx-note { background: #fff8ec; border-color: #f0dfbf; font-size: 15.5px; }
.fx-small { font-size: 14px; color: var(--muted); }

/* sources list */
.fx-sources { font-size: 15px; line-height: 1.6; }
.fx-sources li { margin: .5em 0; }

@media (max-width: 640px) {
  .fx-prose { font-size: 16.5px; }
  .fx-box { padding: 18px; border-radius: 12px; }
}
