/* xag-points.css  INTERACTIVE POINTS DIAGRAM (owner 2026-11-05). Nine equal tiles in a 3 x 3 grid (2 columns on a phone, the ninth centred at the same width) and ONE framed info
   panel below, the same width as the grid. Tiles: number badge + coloured ring icon + short title only; EXACTLY the same width and height (grid rows 1fr, fixed 2-line title).
   Tokens only (colours come from the category tokens and the shared surface/text roles). Code: xag-points.js. */
.xpts { display: grid; gap: var(--xag-sp-3, 12px); margin: 0; }
.xpts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--xag-sp-2, 8px); }
.xpts-tile { box-sizing: border-box; width: 100%; min-height: 0; margin: 0; padding: var(--xag-sp-2, 8px) var(--xag-sp-3, 12px); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--xag-sp-1, 4px);
  text-align: left; cursor: pointer; font: inherit; color: var(--xag-c-text); border-radius: var(--xag-radius-card, 28px); }
.xpts-tile:hover, .xpts-tile:focus-within { transform: none; }
.xpts-tile.is-on { box-shadow: 0 0 0 2px var(--cat), 0 14px 32px -12px color-mix(in srgb, var(--cat) var(--xag-glow-tile, 86%), transparent); }
.xpts-tile:hover, .xpts-tile:focus-visible, .xpts-tile:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--cat) var(--xag-glow-tile-edge, 63%), transparent), 0 14px 32px -12px color-mix(in srgb, var(--cat) var(--xag-glow-tile, 86%), transparent); }
.xpts-tile.is-on:hover, .xpts-tile.is-on:focus-within { box-shadow: 0 0 0 2px var(--cat), 0 14px 32px -12px color-mix(in srgb, var(--cat) var(--xag-glow-tile, 86%), transparent); }
.xpts-tile:focus-visible { outline: 3px solid var(--xag-c-accent); outline-offset: 3px; }
.xpts-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: var(--xag-sp-2, 8px); }
.xpts-tile .xag-cat-ico { width: 36px; height: 36px; }
.xpts-tile .xag-cat-ico svg { width: 20px; height: 20px; }
.xpts-num { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: inline-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-white); }
.xpts-title { text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; width: 100%; font-weight: 700; font-size: 1rem; line-height: 1.2; height: calc(2 * 1.2em); color: var(--xag-h-sub); overflow-wrap: anywhere; }
.xpts-panel { box-sizing: border-box; width: 100%; padding: var(--xag-sp-3, 12px) var(--xag-sp-4, 16px); border: 1px solid var(--xag-c-line); border-radius: var(--xag-radius-card, 28px); background: var(--xag-c-surface-2); color: var(--xag-c-text); text-align: left; }
.xpts-panel:focus-visible { outline: 3px solid var(--xag-c-accent); outline-offset: 3px; }
.xpts-ph { margin: 0 0 var(--xag-sp-2, 8px); font-size: 1.05rem; line-height: 1.3; color: var(--xag-h-sec); }
.xpts-pb > p { margin: 0 0 var(--xag-sp-2, 8px); line-height: 1.4; max-width: var(--xag-measure, 75ch); color: var(--xag-c-text); text-wrap: pretty; }
.xpts-pb > :last-child { margin-bottom: 0; }
/* desktop and tablet: number + icon on the left, title on the right (one compact row per tile); phone keeps the stacked tile below */
@media (min-width: 641px) {
  .xpts-tile { flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--xag-sp-2, 8px); }
  .xpts-top { width: auto; flex: none; gap: var(--xag-sp-2, 8px); }
  .xpts-title { flex: 1 1 auto; width: auto; min-width: 0; height: auto; max-height: calc(2 * 1.2em); align-self: center; }
}
/* FLOW MODE (a process of steps, owner 2026-11-05): ONE row of equal tiles (--xpts-n columns), a line with an arrow joins each tile to the next (desktop only); the tiles, glow, panel and keyboard are the same as the points. */
.xpts-flow { grid-template-columns: repeat(var(--xpts-n, 4), minmax(0, 1fr)); gap: var(--xag-sp-4, 16px); }
.xpts-flow .xpts-tile { overflow: visible; min-height: 112px; padding: var(--xag-sp-2, 8px); flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--xag-sp-2, 8px); }
.xpts-flow .xpts-top { width: 100%; flex: none; }
.xpts-flow .xpts-title { flex: none; width: 100%; height: calc(2 * 1.2em); max-height: none; font-size: .98rem; }
.xpts-flow .xpts-tile:not(:last-child)::after { content: ""; position: absolute; top: 50%; left: 100%; width: var(--xag-sp-4, 16px); height: 3px; margin-top: -1.5px; background: linear-gradient(90deg, var(--cat), var(--xag-c-accent)); border-radius: 2px; pointer-events: none; }
.xpts-flow .xpts-tile:not(:last-child)::before { content: ""; position: absolute; top: 50%; left: calc(100% + var(--xag-sp-4, 16px) - 8px); width: 9px; height: 9px; margin-top: -4.5px; border-top: 3px solid var(--xag-c-accent); border-right: 3px solid var(--xag-c-accent); transform: rotate(45deg); pointer-events: none; }
@media (max-width: 900px) {
  .xpts-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--xag-sp-2, 8px); }
  .xpts-flow .xpts-tile:not(:last-child)::before, .xpts-flow .xpts-tile:not(:last-child)::after { content: none; }
  .xpts-flow .xpts-tile { min-height: 104px; }
  .xpts-flow .xpts-tile:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - var(--xag-sp-2, 8px) / 2); justify-self: center; }
}
@media (max-width: 640px) {
  .xpts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--xag-sp-2, 8px); }
  .xpts-tile { padding: var(--xag-sp-2, 8px); }
  .xpts-title { font-size: .9rem; }
  /* nine tiles in two columns: the ninth is centred at the SAME width as the others */
  .xpts-tile:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - var(--xag-sp-2, 8px) / 2); justify-self: center; }
  .xpts-panel { padding: var(--xag-sp-3, 12px); }
}
