/* Static pages (#562): About · What the levels mean · How we grade · Terms · Privacy · Status.
   Adapted from the design prototype `surfaces/pages`; scoped under .pg-pages; tokens only. The drop-down
   is the shell's (.drop, styles/app.css). Phone first; at 64 rem the page list is the left column. */
.pg-pages { display: grid; gap: var(--space-4); min-width: 0; margin-top: var(--space-4); }
.pg-main { display: grid; gap: var(--space-4); min-width: 0; align-content: start; }
.pg-header { display: grid; gap: 6px; padding: var(--space-2) 4px 0; }
.pg-label { margin: 0; font-size: var(--t-small); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-small); text-transform: uppercase; color: var(--text-muted); }
.pg-title { font-size: calc(var(--t-head) * 1.3); line-height: 1.2; }
.pg-lead { margin: 0; padding: 0 4px; max-width: var(--measure); font-size: calc(var(--t-head) * 1.1); font-weight: var(--weight-bold); line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }
.pg-meta { margin: 0; font-size: var(--t-sub); color: var(--text-muted); }
.pg-meta-ink { color: var(--text); }
.pg-draft { margin: 0; max-width: var(--measure); padding: 10px 14px; border-radius: var(--radius-l); background: var(--surface-2); border: 1px solid var(--line-strong); font-size: var(--t-sub); font-weight: var(--weight-semibold); line-height: 1.45; }

.pg-card { display: grid; gap: 12px; min-width: 0; padding: var(--space-4); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-card), 0 0 0 1px var(--card-edge); }
.pg-card-head { display: grid; gap: 4px; }
.pg-head { margin: 0; font-size: var(--t-head); font-weight: var(--weight-heavy); line-height: 1.25; color: var(--text); text-transform: none; letter-spacing: normal; }
.pg-p { margin: 0; max-width: var(--measure); font-size: var(--t-body); line-height: var(--leading-body); overflow-wrap: anywhere; }
.pg-noacts { padding-bottom: 20px; }
.pg-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pg-act { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: var(--weight-bold); color: var(--action); }
.pg-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pg-list li { position: relative; padding-left: 18px; }
.pg-list li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }

/* the levels: the chip, then the sentence (a level's colour holds its number and name) */
.pg-lvls { display: grid; margin: 0; padding: 0; list-style: none; }
.pg-lvl { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.pg-lvl:first-child { border-top: 0; padding-top: 0; }
.pg-chip { justify-self: start; max-width: 100%; white-space: normal; background: var(--surface); color: var(--text); }
.pg-chip.lvl-0 { border-style: dashed; }
.pg-chip.lvl-1 { background: var(--level-1); color: var(--level-1-label); }
.pg-chip.lvl-2 { background: var(--level-2); color: var(--level-2-label); }
.pg-chip.lvl-3 { background: var(--level-3); color: var(--level-3-label); }
.pg-chip.lvl-4 { background: var(--level-4); color: var(--level-4-label); }

/* credits */
.pg-cred { display: grid; margin: 0; padding: 0; list-style: none; }
.pg-cred li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.pg-cred li:first-child { border-top: 0; padding-top: 0; }
.pg-credline { margin: 0; font-size: 1rem; font-weight: var(--weight-heavy); line-height: 1.35; overflow-wrap: anywhere; }
.pg-credline a { display: inline-block; min-height: 24px; text-decoration: underline; text-underline-offset: 3px; }

/* the score table, under a drop-down */
.pg-table { width: 100%; border-collapse: collapse; font-size: var(--t-sub); font-variant-numeric: tabular-nums; }
.pg-table th, .pg-table td { padding: 8px 6px 8px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.pg-table thead th { border-top: 0; font-size: var(--t-small); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-small); text-transform: uppercase; color: var(--text-muted); }
.pg-table td { font-weight: var(--weight-bold); }
.pg-pct { font-weight: var(--weight-heavy); }
.pg-panel { display: grid; gap: 10px; padding: 2px 0 16px; }
.pg-panel[hidden] { display: none; }

/* terms and privacy: one drop-down per section, opened in place */
.pg-sections { gap: 0; }
.pg-sections .pg-card-head { padding-bottom: 8px; }
.pg-h3 { margin: 0; font: inherit; }
.pg-pages.is-wide .pg-panel { padding-left: 52px; }

/* status: a word and a mark, never colour alone */
.pg-checks { display: grid; margin: 0; padding: 0 0 4px; list-style: none; }
.pg-checks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: var(--tap); padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--t-sub); font-weight: var(--weight-medium); }
.pg-cn { overflow-wrap: anywhere; }
.pg-cr { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-bold); white-space: nowrap; }
.pg-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: var(--t-small); line-height: 1; }
.pg-checks .is-warn .pg-mark, .pg-checks .is-fail .pg-mark { background: var(--text); color: var(--surface); border-color: var(--text); }
.pg-checks .is-pass .pg-cr { color: var(--text-muted); }

/* the page list (phone: below the page; laptop: the left column) */
.pg-nav { display: grid; gap: 6px; min-width: 0; }
.pg-nav-label { padding: 0 4px; }
.pg-nav-card { display: grid; padding: 0 var(--space-4); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-card), 0 0 0 1px var(--card-edge); }
.pg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pg-row:first-child { border-top: 0; }
.pg-row-t { display: grid; gap: 1px; min-width: 0; }
.pg-row-l { font-size: 1rem; font-weight: var(--weight-heavy); line-height: 1.3; color: var(--action); }
.pg-row-x { font-size: var(--t-sub); font-weight: var(--weight-medium); line-height: 1.35; color: var(--text-muted); }
.pg-row-go { font-size: 1.25rem; font-weight: var(--weight-bold); line-height: 1; color: var(--action); }
.pg-row:hover .pg-row-l { text-decoration: underline; text-underline-offset: 3px; }
.pg-row[aria-current="page"] .pg-row-l { color: var(--text); }
.pg-row[aria-current="page"] .pg-row-go { color: var(--text-muted); }
.pg-foot { margin: 0; padding: 0 4px; max-width: var(--measure); font-size: var(--t-small); color: var(--text-muted); }

/* laptop: the page list on the left (20 rem), the page on the right (one measure wide) */
@media (min-width: 1024px) {
  main:has(> .pg-pages) { max-width: 72rem; }
  .pg-pages.is-wide { grid-template-columns: 20rem minmax(0, 46rem); gap: 32px; justify-content: center; align-items: start; }
  .pg-pages.is-wide .pg-nav { grid-column: 1; grid-row: 1 / span 2; }
  .pg-pages.is-wide .pg-main { grid-column: 2; grid-row: 1; }
  .pg-pages.is-wide .pg-foot { grid-column: 2; grid-row: 2; }
  .pg-pages.is-wide .pg-header { padding-top: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduce"]) .pg-panel:not([hidden]) { animation: pg-slide var(--dur) ease-out both; }
}
@keyframes pg-slide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
