/* xag-policy.css  POLICY PAGE TEMPLATE (shared, owner 2026-11-05): the one look of every policy, legal and trust text page.
   Page = main.xpol (hand-written policy pages) or main.legal (generated /legal/ pages):
     h1 (standard yellow heading with the dot)  >  ul.chips (Version, Last updated, language note)  >  framed section rows (.xag-sec-row)  >  Related documents row (Contact lives in the footer only)
   The notices box (disclaimers.js) is the last block; nothing else is a free-standing disclaimer box. Heading, chips and rows share ONE left edge and the shared content width.
   Numbered points: main ol.xpol-points (class xc-grid) of li.xc-card, three columns on desktop and ONE column below 900px (so there is never a lone box), separators li.xpol-sep span the full text width
   between row groups. Version history is a collapsible list near the bottom. Tokens only (no colours or fonts here). Tests: test/policy-template.test.mjs; sweep: scripts/policy-sweep.mjs. */
main.xpol { max-width: var(--xag-w-content, 1320px); margin: 0 auto; padding: var(--xag-sp-2, 8px) var(--xag-sp-4, 16px) var(--xag-sp-6, 32px); box-sizing: border-box; }
main.xpol > *, main.xpol > .xag-sec-row { max-width: none; margin-inline: 0; }
main.xpol > .lt { display: none; max-width: none; margin: 0 0 var(--xag-sp-2, 8px); color: var(--xag-c-text-2); }
body:has(> main.xpol), body:has(.tl-layout main.xpol) { margin: 0; background: var(--xag-c-bg); color: var(--xag-c-text); font: 16px/1.6 var(--xag-font-body); }
main.xpol a:not(.btn) { color: var(--xag-c-accent-text); }

/* page heading: the standard yellow heading with the dot (same as the Events / News page titles) */
html body :is(h1.xag-h1, main.xpol > h1, main.legal > h1):not(#xag) { color: var(--xag-h-sec); font-size: clamp(1.6rem, 4.5vw, 2.25rem); line-height: 1.2; font-weight: 700; letter-spacing: 0; margin: 0 0 var(--xag-sp-3, 12px); max-width: none; text-align: left; overflow-wrap: anywhere; }
html body :is(h1.xag-h1, main.xpol > h1, main.legal > h1):not(#xag)::before { content: ""; display: inline-block; width: .42em; height: .42em; margin-inline-end: .5em; border-radius: 50%; vertical-align: .12em; background: var(--xag-h-sec); }

/* chip row: Version, Last updated, language note (single-line pills, never a run-on) */
main.xpol .chips { display: flex; flex-wrap: wrap; gap: var(--xag-sp-2, 8px); margin: 0 0 var(--xag-sp-4, 16px); padding: 0; list-style: none; max-width: none; }
main.xpol .chips li { white-space: nowrap; background: var(--xag-c-surface-2); border: 1px solid var(--xag-c-line); border-radius: var(--xag-btn-radius, 28px); padding: var(--xag-sp-1, 4px) var(--xag-sp-3, 12px); font-size: .8rem; color: var(--xag-c-text-2); }
main.xpol .chips li.draft { border-color: var(--xag-c-accent); color: var(--xag-c-text); font-weight: 600; }

/* numbered points: equal-height grid, even count, badges aligned, separators full width between row groups */
main ol.xpol-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--xag-sp-4, 16px); counter-reset: xpol; align-items: stretch; }
main ol.xpol-points > li.xc-card { counter-increment: xpol; display: grid; grid-template-columns: 2rem minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--xag-sp-3, 12px); row-gap: var(--xag-sp-2, 8px); align-content: start; align-items: start; margin: 0; padding: var(--xag-sp-4, 16px); }
main ol.xpol-points > li.xc-card::before { content: counter(xpol); position: static; margin: 0; grid-column: 1; grid-row: 1; align-self: start; width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: var(--xag-btn-grad, var(--xag-c-accent)); color: var(--xag-c-on-accent); }
main ol.xpol-points > li.xc-card > :is(h2, h3) { grid-column: 2; grid-row: 1; margin: 0; align-self: start; min-height: 2rem; display: flex; align-items: center; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; color: var(--xag-h-sub); font-weight: 700; }
main ol.xpol-points > li.xc-card > :is(p, .xpol-body) { grid-column: 1 / -1; grid-row: 2; margin: 0; overflow-wrap: anywhere; max-width: none; }
main ol.xpol-points > li.xpol-sep { display: none; }
/* the separator item: same bar as xag-sep, re-declared because a list-item card rule (.legal ol.policy > li) would otherwise paint it as a box */
main ol.xpol-points > li.xpol-sep { background: linear-gradient(90deg, transparent 0%, var(--xag-c-teal-text) 22%, var(--xag-c-gold) 50%, var(--xag-c-purple-text) 78%, transparent 100%); box-shadow: 0 0 14px color-mix(in srgb, var(--xag-c-teal-text) 55%, transparent), 0 0 28px color-mix(in srgb, var(--xag-c-purple-text) 30%, transparent); border: 0; padding: 0; min-height: 0; transform: none; }
main ol.xpol-points > li.xpol-sep::before { content: none; }
main ol.xpol-points > li.xc-card:hover { transform: none; }
main ol.xpol-points > li.xc-card > .xpol-body > :last-child { margin-bottom: 0; }
main ol.xpol-points > li.xc-card > .xpol-body > :first-child { margin-top: 0; }
@media (min-width: 900px) {
  /* three columns; every card spans two shared rows (title row, text row) through a subgrid, so titles of one or three lines still start every text on the same line */
  main ol.xpol-points { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 0; column-gap: var(--xag-sp-4, 16px); }
  main ol.xpol-points > li.xc-card { grid-row: span 2; grid-template-rows: subgrid; }
  main ol.xpol-points > li.xpol-sep { display: block; grid-column: 1 / -1; height: 3px; margin: var(--xag-sp-4, 16px) 0; padding: 0; border: 0; list-style: none; }
}
main ol.xpol-points > li.xpol-sep.xag-sep { max-width: none; }
@media (min-width: 900px) {
  /* legal documents: two columns, an odd last card spans the whole row */
  main ol.xpol-points.xpol-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main ol.xpol-points > li.xpol-wide { grid-column: 1 / -1; }
}
/* a list of points with an odd count (or one that is read as a list): ONE column of full-width equal-padding cards, never a grid with a lone box */
@media (min-width: 900px) {
  main ol.xpol-points.xpol-points-list { grid-template-columns: minmax(0, 1fr); row-gap: var(--xag-sp-3, 12px); }
  main ol.xpol-points.xpol-points-list > li.xc-card { grid-row: auto; grid-template-rows: auto auto; }
}
.xpol-lead { margin: 0 0 var(--xag-sp-4, 16px); max-width: var(--xag-measure, 70ch); color: var(--xag-c-text-2); text-wrap: pretty; }
.xag-sec-row > main ol.xpol-points + p { margin-top: var(--xag-sp-3, 12px); }

/* version history: collapsible list, every version one bullet */
.xpol-hist > summary { cursor: pointer; font-weight: 700; color: var(--xag-h-sub); list-style: none; display: flex; align-items: center; gap: var(--xag-sp-2, 8px); }
.xpol-hist > summary::-webkit-details-marker { display: none; }
.xpol-hist > summary::after { content: "+"; margin-left: auto; font-weight: 700; }
.xpol-hist[open] > summary::after { content: "-"; }
.xpol-hist[open] > summary { margin-bottom: var(--xag-sp-3, 12px); }
.xpol-hist ul { margin: 0; }

/* the three-row table of the recruitment policy */
.xpol-tblwrap { overflow-x: auto; }
.xpol .tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.xpol .tbl th, .xpol .tbl td { border: 1px solid var(--xag-c-line); padding: var(--xag-sp-2, 8px) var(--xag-sp-3, 12px); vertical-align: top; text-align: left; }
.xpol .tbl th { width: 28%; color: var(--xag-h-sub); }
.xpol .tbl td { text-wrap: pretty; }
/* Related documents row: a short line and the standard buttons (purple primary first, glass outline others) */
.xag-sec-row > p + .xag-sec-actions { margin-top: var(--xag-sp-3, 12px); }

/* members-only stub (scripts/lib/members-docs.mjs): lock line and sign-in button, every colour a token */
main.xag-members-doc { color: var(--xag-c-text); }
main.xag-members-doc .md-lock { display: flex; align-items: center; gap: var(--xag-sp-2, 8px); margin: var(--xag-sp-4, 16px) 0 0; color: var(--xag-c-text-2); }
main.xag-members-doc .md-lock-i { flex: none; }
main.xpol :is(p, li, dd, dt, td, th, summary, figcaption) { color: var(--xag-c-text); }

/* legal documents whose neighbouring sections differ a lot in length: ONE stacked column of full-width cards (the animated bars between them come from xag-seps-li) */
main.legal ol.policy.xpol-1col { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: var(--xag-s-4, 16px); }
main.legal ol.policy.xpol-1col > li { width: 100%; box-sizing: border-box; }
