/* The page engine's own styles (connection pages, signal hubs, Feder vs
   pages). Everything else comes from world.css. --accent is the page's
   signal colour, set on <body> by the template. Nothing here loops, and
   nothing hides words: the only motion is the world's one-time reveal. */
.pg { display: grid; gap: 18px; }
.pg h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; }
.pg h3 { margin: 10px 0 0; font: 600 13px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.pg p, .pg li, .pg dd { margin: 0; font-size: 17px; line-height: 1.6; }
.pg a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pg.light h3 { color: var(--mint-d); }
.pg-crumbs { font: 600 12px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); text-shadow: 0 1px 2px rgba(8,14,12,0.7), 0 2px 18px rgba(8,14,12,0.75); }
.pg-crumbs a { color: inherit; text-decoration: none; }
.pg-crumbs a:hover, .pg-crumbs a:focus-visible { text-decoration: underline; }
.beat .eyebrow { color: var(--accent); }
.pg-reads, .pg-plain, .pg-sibs, .pg-claims, .pg-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.pg-reads { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.pg-reads li, .pg-claims li { padding: 20px; border-radius: 18px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: rgba(246,243,234,0.04); display: grid; gap: 8px; align-content: start; }
.pg-reads b { font: 500 24px/1.15 var(--serif); }
.pg-sig { font: 600 12px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.pg .small { font-size: 14px; color: var(--muted); }
.pg-plain li { padding-left: 22px; position: relative; }
.pg-plain li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pg-steps { counter-reset: step; }
.pg-steps li { counter-increment: step; padding-left: 44px; position: relative; min-height: 30px; }
.pg-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 14px/1 var(--sans); color: var(--ink); background: var(--accent); }
.pg-sibs { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.pg-sibs li { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); display: grid; gap: 4px; }
.pg-sibs a { font: 500 19px/1.2 var(--serif); text-decoration: none; }
.pg-sibs a:hover, .pg-sibs a:focus-visible { text-decoration: underline; }
.pg-sibs span { font-size: 14px; color: var(--muted); }
.pg-qa { margin: 0; display: grid; gap: 6px; }
.pg-qa dt { font: 500 20px/1.25 var(--serif); margin-top: 10px; }
.pg-qa dd { color: var(--muted); }
.pg-claims q { font-style: italic; }
/* The centerpiece: one Example reading per page. */
.pg-reading { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px 28px; align-items: center; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: rgba(8,14,12,0.45); }
.pg-stat { display: grid; gap: 6px; }
.pg-stat b { font: 500 clamp(40px, 5vw, 60px)/1 var(--serif); color: var(--accent); }
.pg-bad .pg-stat b { color: var(--coral); }
.pg-stat span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.pg-ex { justify-self: start; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold) !important; font: 600 11px/1 var(--sans) !important; letter-spacing: 0.1em; text-transform: uppercase; }
.pg-chart { width: 100%; height: auto; max-height: 180px; }
.pg-usual { fill: rgba(246,243,234,0.1); }
.pg-today, .pg-reading .small { grid-column: 1 / -1; }
.pg-today { padding: 14px 16px; border-radius: 14px; background: rgba(246,243,234,0.06); border-left: 3px solid var(--accent); }
.pg-bad .pg-today { border-left-color: var(--amber); }
.pg-today b { display: block; font: 600 12px/1.6 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* A held page says so on the preview. It never reaches production. */
.pg-held { position: fixed; z-index: 6; right: 12px; bottom: 12px; max-width: min(440px, calc(100vw - 24px)); margin: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--gold); background: rgba(8,14,12,0.86); font: 500 12px/1.45 var(--sans); color: var(--gold); }
@media (max-width: 640px) {
  .pg-reading { grid-template-columns: 1fr; }
  .pg p, .pg li, .pg dd { font-size: 16px; }
  .pg-held { bottom: 72px; }
}
/* These pages carry a question and its answer in the hero, so the headline
   is a step smaller than the world's and the copy sits lower on the still. */
[data-place="pages"] h1 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.05; }
[data-place="pages"] .beat.hero { padding-top: 96px; padding-bottom: clamp(56px, 12svh, 120px); }
[data-place="pages"] .beat h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; }
.pg-vol { display: block; margin-top: 4px; font: 500 12px/1.45 var(--sans); color: var(--gold); }
/* The glossary: a dictionary, not a list. A to Z strip, a letter down the
   left, each term its own row with a hairline between. The definition is the
   first sentence at full size; the rest, and where the word comes from, sit
   below it in a quieter voice. A signal's entry carries its own colour. */
.pg-az { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.pg-az a, .pg-az span { min-width: 32px; height: 34px; padding: 0 3px; display: grid; place-items: center; border-radius: 9px; font: 500 16px/1 var(--serif); }
.pg .pg-az a { border: 1px solid var(--line); text-decoration: none; }
.pg .pg-az a:hover, .pg .pg-az a:focus-visible { border-color: var(--accent); color: var(--accent); }
.pg-az span { opacity: 0.28; }
.pg-gloss { display: grid; }
.pg-letter { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 24px; padding-top: 28px; scroll-margin-top: 88px; }
.pg-letter + .pg-letter { margin-top: 8px; border-top: 1px solid var(--line); }
.pg .pg-letter-mark { margin: 0; padding-top: 18px; align-self: start; font: 400 48px/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--accent); }
.pg .pg-terms { margin: 0; display: grid; }
.pg-term { --term: var(--accent); display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.pg-term:first-child { border-top: 0; }
.pg-term dt { grid-row: 1 / span 3; margin: 0; font: 500 24px/1.2 var(--serif); scroll-margin-top: 104px; overflow-wrap: anywhere; }
.pg-term[data-kind="signal"] dt::before { content: ""; display: inline-block; width: 10px; height: 10px; margin: 0 10px 2px 0; border-radius: 50%; background: var(--term); vertical-align: middle; }
.pg .pg-term .pg-def { grid-column: 2; font-size: 19px; line-height: 1.5; }
.pg .pg-term .pg-more { grid-column: 2; font-size: 16px; line-height: 1.6; color: var(--muted); }
.pg .pg-term .pg-from { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.pg-kind { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font: 600 11px/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.pg-term[data-kind="signal"] .pg-kind { border-color: var(--term); color: var(--term); }
.pg-see a { text-decoration-color: var(--line); }
.pg-see a:hover, .pg-see a:focus-visible { text-decoration-color: var(--accent); color: var(--ivory, inherit); }
.pg-term:has(dt:target) { margin: 0 -16px; padding-inline: 16px; border-radius: 14px; background: rgba(246,243,234,0.06); box-shadow: inset 3px 0 0 var(--term); }
@media (max-width: 760px) {
  .pg-letter { grid-template-columns: 1fr; padding-top: 22px; }
  .pg-letter + .pg-letter { margin-top: 0; border-top: 0; }
  .pg .pg-letter-mark { position: static; padding: 0 0 6px; font-size: 38px; border-bottom: 1px solid var(--line); }
  .pg-term { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .pg-term dt { grid-row: auto; font-size: 22px; }
  .pg .pg-term .pg-def, .pg .pg-term .pg-more, .pg .pg-term .pg-from { grid-column: 1; }
  .pg .pg-term .pg-def { font-size: 17px; }
  .pg-az a, .pg-az span { min-width: 30px; height: 30px; font-size: 15px; }
}
.pg-sibs .pg-tl { line-height: 1.6; }
.pg-sibs .pg-tl a { font: inherit; text-decoration: underline; }
