/* The memory page (public/memory.html): on top of /site.css (tokens, navigation, footer, buttons, lists, tables, labels).
   Colour means what it means elsewhere: amber is work done (a delivery), green is live data, and the rainbow is kept for
   a loop that cleared, so this page has none. */

/* the hero: the thesis beside the three questions */
.mem-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding: 2.4rem 0 3rem; }
.mem-hero h1 { margin: 0 0 1.3rem; font-size: clamp(2rem, 8.6vw, 4.2rem); line-height: 1.08; letter-spacing: -0.015em; }
.mem-hero h1 .h1a, .mem-hero h1 .h1b { display: block; }
.mem-hero .h1b { color: var(--dust); }
.mem-hero .lede { margin: 0 0 1.4rem; }
.mem-hero .lede + .lede { margin-top: -0.4rem; }
.mem-hero cite { font-style: normal; color: var(--line); border-bottom: 1px solid var(--rule-strong); }
.mem-hero .cta { margin-top: 0.4rem; }

/* the triangle of the three questions */
.tri { margin: 0; min-width: 0; }
.tri-svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.tri-k { fill: var(--line); font: 400 12px var(--mono); letter-spacing: 0.16em; }
.tri-q { fill: var(--dust); font: 300 13px var(--sans); }
/* the edge flows once as the page opens, for under 5 s, then rests (WCAG 2.2.2: nothing moves on beside the text) */
.tri-edge { animation: tri-flow 4.5s ease-out 1 both; }
@keyframes tri-flow { from { stroke-dashoffset: 54; } to { stroke-dashoffset: 0; } }
.caption { margin: 0; color: var(--dust); font-size: 0.9rem; max-width: 40em; }
.tri .caption { border-top: 1px solid var(--rule); padding-top: 0.9rem; margin-top: 0.6rem; }

/* sections */
.mem-sec { border-top: 1px solid var(--rule); padding: 3rem 0 2.6rem; }
.mem-sec .wide { max-width: 44em; margin: 0 0 1.2rem; }
.mem-sec .list { max-width: 44em; }
.list strong { font-weight: 400; color: var(--line); }
.more { color: var(--dust); font-size: 0.95rem; }
.more:hover { color: var(--line); }
.built { margin: -0.3rem 0 1.2rem; }

/* the live line: what is read, from where, and when */
.live-line { margin: -0.2rem 0 1.4rem; color: var(--dust); font-size: 0.92rem; }
.live-line a { color: var(--dust); }
.live { display: inline-flex; align-items: center; gap: 0.45em; color: var(--dust); }
.live.on { color: var(--line); }
.live.on::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--live); flex: none; }

/* the three cards: the kind in words; a delivery wears the amber of work done */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0 0 1.6rem; }
.card { position: relative; border: 1px solid var(--rule); border-top-color: var(--rule-strong); border-radius: 2px; padding: 1.3rem 1.3rem 1.2rem; background: var(--panel); }
.c-del { border-top-color: var(--work); }
.card-k { margin: 0 0 0.9rem; font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dust); }
.big { margin: 0; font: 300 clamp(2.4rem, 7vw, 3.4rem)/1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-u { margin: 0.35rem 0 0.9rem; color: var(--line); font-size: 0.98rem; }
.card-d { margin: 0 0 0.9rem; font: 400 0.8rem/1.6 var(--mono); color: var(--line); font-variant-numeric: tabular-nums; }
.card-n { margin: 0; color: var(--dust); font-size: 0.9rem; }
.groups { margin: 0 0 0.8rem; max-width: 44em; }
.honest { max-width: 44em; margin: 0; }

/* the attacks table: the kind of each scenario in words, never by colour alone */
.atk-wrap { border: 1px solid var(--rule); border-radius: 2px; }
.atk { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.atk caption { text-align: left; caption-side: bottom; padding: 0.7rem 0.9rem; border-top: 1px solid var(--rule); }
.atk th, .atk td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.atk thead th { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dust); }
.atk tbody th { font-weight: 400; color: var(--line); }
.atk .kind { display: block; margin-top: 0.2rem; font: 400 0.75rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dust); }
.atk .kind.attack { color: var(--caution); }
.atk td { font: 400 0.82rem/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.atk td.takes { color: var(--line); }
.atk td.refuses { color: var(--dust); }
.atk tr.attack td.takes { color: var(--caution); }   /* an attack that gets credit: it says "takes" in words too */
.atk .empty { color: var(--dust); }
.callout { margin: 0 0 1.4rem; padding: 1rem 1.2rem; max-width: 44em; border-left: 2px solid var(--rule-strong); background: var(--panel); }
.callout .n { font-family: var(--mono); color: var(--line); }

@media (min-width: 820px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .mem-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 3rem; padding-top: 3.4rem; }
  .mem-hero h1 { font-size: clamp(2.4rem, 3.6vw, 3.5rem); }
  .mem-hero .lede { font-size: 1.18rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tri-edge { animation: none; }
}
/* Forced colours (Windows contrast themes): a page's colours are forced, an SVG's fills and strokes are not, so the
   triangle takes the system's colours (its words and lines CanvasText on Canvas), and the live dot keeps its green */
@media (forced-colors: active) {
  .tri-k, .tri-q, .tri-dot { fill: CanvasText; }
  .tri-edge, .tri-v { stroke: CanvasText; }
  .tri-v { fill: Canvas; }
  .live.on::before { forced-color-adjust: none; }
}
