/* Testimonials and 404 (v5 draft). Built by tools/build_pages.py; the hero and hire block come from work.css. */
.tm-page main > section, .nf-page main > section { padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- testimonials: one big quote per row, a script numeral, who said it underneath ---------- */
.tm-list { padding-top: 140px; }
.tm-list .row-meta a { color: var(--mid); transition: color .3s; }
.tm-list .row-meta a:hover { color: var(--grey); }
.tm-q { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, .45fr); gap: 24px 32px; padding: 48px 0; border-bottom: 1px solid var(--line); }
.tm-n { font-family: var(--script); font-size: clamp(48px, 5vw, 84px); line-height: .9; color: var(--grey); }
.tm-text { font-size: clamp(22px, 2vw, 32px); line-height: 1.2; letter-spacing: -.035em; color: var(--grey); max-width: 860px; }
.tm-text::before { content: "“"; }
.tm-text::after { content: "”"; }
.tm-by { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; font-size: 14px; line-height: 1.35; letter-spacing: -.02em; color: var(--mid); }
.tm-by b { font-weight: 400; font-size: 18px; color: var(--grey); }

/* ---------- the form: underlined fields like the contact page, two to a row ---------- */
.tm-give { padding-top: 160px; }
.tm-give-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; padding-top: 36px; }
.tm-note { margin-top: 20px; max-width: 460px; font-size: 16px; line-height: 1.45; letter-spacing: -.02em; color: var(--mid); }
.tm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.tf { display: flex; flex-direction: column; gap: 6px; }
.tf-wide, .tm-consent, .tm-cap, .tm-error, .tm-send { grid-column: 1 / -1; }
.tf span { font-size: 13px; letter-spacing: -.02em; color: var(--mid); }
.tf input, .tf textarea { width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; letter-spacing: -.02em; outline: none; transition: border-color .3s; }
.tf textarea { resize: vertical; min-height: 120px; line-height: 1.4; }
.tf input::placeholder, .tf textarea::placeholder { color: var(--soft); }
.tf input:focus, .tf textarea:focus { border-bottom-color: var(--grey); }
.tf [aria-invalid="true"] { border-bottom-color: var(--grey); border-bottom-width: 2px; }
.tm-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; letter-spacing: -.02em; color: var(--mid); cursor: pointer; }
.tm-consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--grey); }
.tm-cap:empty { display: none; }   /* Netlify fills this with its CAPTCHA on the live site */
.tm-error { padding: 6px 10px; background: var(--grey); color: var(--bg); font-size: 13px; letter-spacing: -.02em; }   /* dark grey, never red */
.tm-error a { color: inherit; text-decoration: underline; }
.tm-send { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.tm-send:disabled { opacity: .5; cursor: default; }
.tm-sent:focus { outline: none; }
.tm-sent-text { margin-top: 14px; font-size: 16px; color: var(--mid); }

/* ---------- 404: a giant script 404, one line, and the four ways back as list rows ---------- */
.nf { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 120px; padding-bottom: 80px; }
.nf .lbl { font-size: 14px; line-height: 20px; letter-spacing: -.05em; color: var(--grey); }
.nf-num { font-family: var(--script); font-size: clamp(140px, 22vw, 380px); line-height: 1.1; color: var(--grey); }
.nf-title { font-size: clamp(44px, 6vw, 110px); line-height: .9; font-weight: 400; letter-spacing: -.06em; color: var(--grey); }
.nf-text { margin-top: 22px; max-width: 520px; font-size: 18px; line-height: 1.4; letter-spacing: -.02em; color: var(--mid); }
.nf-links { margin-top: 56px; border-top: 1px solid var(--line); max-width: 900px; }
.nf-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: clamp(28px, 3vw, 48px); letter-spacing: -.05em; color: var(--grey); }
.nf-row svg { width: 26px; transition: transform .5s var(--ease); }
.nf-row:hover svg { transform: translateX(10px); }

@media (max-width: 900px) {
  .tm-q { grid-template-columns: 60px minmax(0, 1fr); }
  .tm-by { grid-column: 2; }
  .tm-give-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tm-list { padding-top: 90px; }
  .tm-give { padding-top: 100px; }
  .tm-q { grid-template-columns: 1fr; gap: 14px; padding: 36px 0; }
  .tm-by { grid-column: 1; }
  .tm-form { grid-template-columns: 1fr; }
  .nf-row svg { width: 20px; }
}

/* ---------- play (2026-10-30): a grid of game cards; a game opens in a panel over the page (games.js) ---------- */
.gm-page main > section { padding-left: var(--pad); padding-right: var(--pad); }
.gp { padding-top: 120px; }
.gp-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 32px; }
.gp-card { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; }
.gp-art { width: 100%; aspect-ratio: 3 / 2; display: block; border-radius: 3px; overflow: hidden; background: #fdfcf8; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .4s, transform .5s var(--ease); }
.gp-art img { display: block; width: 100%; height: auto; }   /* a still from the game itself, shown whole (3:2 like its box) */
.gp-card:hover .gp-art { box-shadow: inset 0 0 0 1px var(--grey), 0 14px 30px rgba(0,0,0,.12); transform: translateY(-4px); }
.gp-art svg { width: 46%; fill: none; stroke: var(--grey); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); }
.gp-card:hover .gp-art svg { transform: scale(1.08) rotate(-2deg); }
.gp-n { margin-top: 18px; font-family: var(--script); font-size: 34px; line-height: 1; color: var(--mid); }
.gp-name { margin-top: 6px; font-size: clamp(28px, 2.6vw, 42px); line-height: 1; letter-spacing: -.05em; color: var(--grey); }
.gp-line { margin-top: 10px; font-size: 15px; line-height: 1.4; letter-spacing: -.02em; color: var(--mid); max-width: 380px; }
.gp-foot { width: 100%; margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--mid); }
.gp-go { color: var(--grey); }
.gp-card:hover .gp-go span { display: inline-block; transform: translateX(6px); transition: transform .4s var(--ease); }

/* the panel */
.gx { position: fixed; z-index: 115; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.gx[hidden] { display: none; }
.gx.is-open { opacity: 1; }
.gx-in { width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 16px; border-radius: 6px; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); transform: translateY(14px) scale(.98); transition: transform .45s var(--ease); }
.gx.is-open .gx-in { transform: none; }
.gx-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.gx-lbl { font-size: 13px; color: var(--mid); }
.gx-title { font-size: clamp(30px, 3.4vw, 52px); line-height: 1; font-weight: 400; letter-spacing: -.05em; color: var(--grey); }
.gx-stats { display: flex; align-items: center; gap: 20px; }
.gx-stats p { display: flex; flex-direction: column; font-size: 11px; color: var(--mid); font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.gx-stats b { font-family: var(--sans); font-weight: 400; font-size: 26px; letter-spacing: -.04em; text-transform: none; color: var(--ink); min-width: 2ch; }
.gx-btn { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px; background: none; color: var(--grey); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.gx-btn:hover { border-color: var(--grey); }
.gx-close { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 2px; background: var(--grey); color: var(--bg); cursor: pointer; }
.gx-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.gx-stage { position: relative; }
.gx-body { position: relative; width: 100%; height: min(600px, calc(100svh - 200px)); border-radius: 4px; background: var(--card); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.gx-canvas { display: block; }
.gx-hint { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--mid); }
.gx-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; border-radius: 4px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gx-over[hidden] { display: none; }
.gx-over-title { font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -.06em; color: var(--grey); }
.gx-over-text { font-size: 17px; color: var(--mid); }
.gx-over-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.gx-over-btns .btn { border: 0; cursor: pointer; font-family: inherit; }
.gx-over-btns .gx-line { background: none; color: var(--grey); box-shadow: inset 0 0 0 1px var(--grey); }
html.is-game { overflow: hidden; }
html.is-game .hd { opacity: 0; pointer-events: none; }

/* noughts & crosses */
.xo { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.xo-grid { width: min(360px, 78%, 52vh); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xo-cell { border: 0; border-radius: 4px; background: var(--bg); cursor: pointer; display: grid; place-items: center; transition: background-color .3s; }
.xo-cell:not(:disabled):hover { background: color-mix(in srgb, var(--bg) 70%, var(--line)); }
.xo-cell:disabled { cursor: default; }
.xo-cell svg { width: 62%; fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; }
.xo-cell svg path, .xo-cell svg circle { stroke: #1b1b1b; }   /* ink */
.xo-cell.is-win { background: repeating-linear-gradient(-45deg, #fdfcf8 0 4px, rgba(27,27,27,.35) 4px 5px); }
.xo-cell.is-win svg path, .xo-cell.is-win svg circle { stroke: #1b1b1b; }
.xo-status { font-size: 20px; letter-spacing: -.03em; color: var(--grey); }
.xo-tally { font-family: var(--mono); font-size: 12px; color: var(--mid); }

/* memory */
.mm { height: 100%; display: grid; place-items: center; padding: 16px; }
.mm-grid { width: min(720px, 100%); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mm-card { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; background: none; cursor: pointer; perspective: 800px; }
.mm-back, .mm-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 3px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s var(--ease); }
.mm-back { background: var(--grey); color: var(--bg); font-family: "Outfit", var(--sans); font-weight: 800; font-size: clamp(20px, 2.4vw, 34px); letter-spacing: -.05em; }
.mm-face { background: #f0f0ee; transform: rotateY(180deg); padding: 14% 18%; box-shadow: inset 0 0 0 1px var(--line); }
.mm-face img { width: 100%; height: 100%; object-fit: contain; }   /* the mark, whole */
.mm-card.is-up .mm-back { transform: rotateY(-180deg); }
.mm-card.is-up .mm-face { transform: none; }
.mm-card.is-done .mm-face { box-shadow: inset 0 0 0 2px var(--grey); }

@media (max-width: 1000px) { .gp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .gp { padding-top: 80px; }
  .gp-grid { grid-template-columns: 1fr; gap: 32px; }
  .gx { padding: 0; }
  .gx-in { width: 100%; height: 100%; border-radius: 0; padding: 14px 12px 12px; }
  .gx-body { height: calc(100svh - 150px); }
  .gx-stats { gap: 12px; } .gx-stats b { font-size: 22px; }
  .mm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

/* spider web: the board is the web itself, the fly is the pointer */
.gx-body.is-spider { cursor: none; }
html.is-web .cur-dot, html.is-web .cur-trail { display: none; }

/* pen-and-ink games (2026-10-30): paper behind every game, ink cards and cells */
.gx-body { background: #fdfcf8; }
.xo-cell { background: #fdfcf8; box-shadow: inset 0 0 0 2px #1b1b1b; border-radius: 2px; }
.mm-back { background: repeating-linear-gradient(-45deg, #fdfcf8 0 5px, rgba(27,27,27,.55) 5px 6px), #fdfcf8; color: #1b1b1b; box-shadow: inset 0 0 0 2px #1b1b1b; text-shadow: 0 0 6px #fdfcf8, 0 0 3px #fdfcf8; }
.mm-face { background: #fdfcf8; box-shadow: inset 0 0 0 2px #1b1b1b; }
.mm-card.is-done .mm-face { box-shadow: inset 0 0 0 3px #1b1b1b; }
