/* How the island went: the charts on the sheet at the end. Two line charts and a strip of ages
   share one clock along the bottom. The picture has a background of its own (--surface), which
   the rings round the dots and the gaps between the bands are painted in. --gl and --gr are the
   margins either side of every chart: figures up the left, names down the right. */

.recap { --surface: #111b28; --gl: 34px; --gr: 66px; margin: 16px 0 0; padding: 12px 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.recap figcaption h3 { margin: 0 0 4px; }
.modal-card .recap-why { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--ink); }

/* Who is who. A short stroke of the line's colour stands beside each name; the names themselves
   are in the ordinary lettering, never in the colour. */
.recap-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 4px; font-size: 12px; color: var(--ink-2); }
.recap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.recap-key { display: inline-block; flex: none; width: 14px; height: 3px; border-radius: 2px; }

.recap-charts { position: relative; border-radius: 8px; outline: none; touch-action: pan-y; }
.recap-charts:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
.recap-panel h4 { margin: 10px 0 5px var(--gl); font: 600 11px/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.recap-panel h4 small { margin-left: 6px; font: 400 11px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-3); }

.recap-plot { position: relative; height: 84px; margin: 0 var(--gr) 0 var(--gl); }
.recap-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.recap-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.recap-grid { stroke: rgba(255, 241, 208, 0.1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.recap-grid.base { stroke: rgba(255, 241, 208, 0.28); }
.recap-y { position: absolute; right: 100%; margin-right: 7px; transform: translateY(-50%); font: 11px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }

/* Where a line stops: a dot with a ring of background round it, and the tribe's name beside it. */
.recap-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.recap-end { position: absolute; margin-left: 9px; transform: translateY(-50%); font: 11px/1.1 var(--sans); color: var(--ink-2); white-space: nowrap; pointer-events: none; text-shadow: 0 0 2px var(--surface), 0 0 3px var(--surface), 0 0 4px var(--surface), 0 0 5px var(--surface); }
.recap-end.low { transform: translateY(-120%); }
.recap-end[hidden] { display: none; }

/* The moment the words above turn on, and the hairline under the pointer. */
.recap-notes { position: relative; height: 15px; margin: 2px var(--gr) -6px var(--gl); }
.recap-mark-note { position: absolute; top: 0; padding: 0 5px; font: 11px/15px var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.recap-mark-note[data-side='left'] { transform: translateX(-100%); }
.recap-mark { position: absolute; top: -4px; bottom: -4px; width: 1px; margin-left: -0.5px; background: rgba(255, 241, 208, 0.4); pointer-events: none; }
.recap-cross { position: absolute; top: -4px; bottom: -4px; width: 1px; margin-left: -0.5px; background: var(--ink); opacity: 0.85; pointer-events: none; }
.recap-cross[hidden] { display: none; }

/* The strip of ages: a row for each tribe, in bands that get lighter as the tribe moves on. */
.recap-plot.recap-ages { height: auto; }
.recap-age-row { position: relative; height: 16px; margin-bottom: 3px; border-radius: 3px; background: rgba(255, 241, 208, 0.05); }
.recap-age-row:last-of-type { margin-bottom: 0; }
.recap-band { position: absolute; top: 0; bottom: 0; border-radius: 3px; box-shadow: inset -2px 0 0 var(--surface); }
.recap-band span { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); font: 600 10px/1 var(--sans); white-space: nowrap; visibility: hidden; }
.recap-band.named span { visibility: visible; }
.recap-age-name { position: absolute; left: 100%; top: 50%; margin-left: 9px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; font: 11px/1 var(--sans); color: var(--ink-2); white-space: nowrap; }
.recap-age-name .recap-key { width: 9px; }

/* The clock along the bottom. */
.recap-x { position: relative; height: 16px; margin: 5px var(--gr) 0 var(--gl); }
.recap-x span { position: absolute; top: 0; transform: translateX(-50%); font: 11px/16px var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.recap-x span:first-child { transform: none; }

/* How every tribe stood at the moment under the pointer. The figures are what stand out. */
.recap-tip { position: absolute; top: 18px; z-index: 2; display: grid; grid-template-columns: auto auto auto auto; gap: 3px 12px; padding: 7px 10px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: #1e2c40; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); font: 12px/1.3 var(--sans); color: var(--ink-2); white-space: nowrap; pointer-events: none; }
.recap-tip[hidden] { display: none; }
.recap-tip-row { display: contents; }
.recap-tip-row > :first-child { display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.recap-tip-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.recap-tip-row.head span { font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
.recap-tip-row.gone span { color: var(--ink-3); }

/* The same figures as a table. */
.recap-figures { margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.recap-figures summary { padding: 3px 0; cursor: pointer; }
.recap-figures summary:hover { color: var(--ink); }
.recap-scroll { margin-top: 6px; overflow-x: auto; }
.recap-figures table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.recap-figures caption { padding: 4px 0; text-align: left; color: var(--ink-3); }
.recap-figures th, .recap-figures td { padding: 3px 8px; border-bottom: 1px solid rgba(255, 241, 208, 0.08); text-align: right; white-space: nowrap; }
.recap-figures th:first-child { padding-left: 0; text-align: left; }
.recap-figures thead th { font-weight: 600; color: var(--ink-2); }
.recap-figures tbody th { font-weight: 400; color: var(--ink-3); }
.recap-figures td { color: var(--ink); }

@media (max-width: 520px) {
  .recap { --gl: 28px; --gr: 64px; padding: 10px 8px 8px 10px; }
}

/* The hail: the god's painting, the word and the honour. Shown when an island is won, before the sheet of how it went. */
.hail { display: grid; grid-template-columns: minmax(0, 44%) 1fr; gap: 24px; align-items: center; }
.hail-pic { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 3px var(--god, var(--gold)), 0 14px 34px rgba(0, 0, 0, 0.5); }
.hail-words { min-width: 0; }
.modal-card .hail-word { margin: 0; font: 600 13px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--god, var(--gold)); }
.modal-card .hail-rank { margin: 12px 0 4px; font-size: 36px; line-height: 1.05; color: var(--gold); }
.modal-card .hail-title { margin: 0; font: italic 20px/1.25 var(--serif); color: #fdf3d8; }
.modal-card .hail-who { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.modal-card .hail-took { margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 241, 208, 0.14); color: var(--ink-2); }
@media (max-width: 560px) {
  .hail { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .hail-pic { width: min(240px, 72%); margin: 0 auto; }
  .modal-card .hail-rank { font-size: 30px; }
}

