/* The hero graphics (/minimal/hero.js) and the first screen around them, on Home, /solver/, /app/ and /mcp/ (2026-12-02).
   Every size inside a figure is in container units of the figure, so it scales as one picture and never changes height
   while it plays. */
.hero-fig { --ink: #0D0E1F; --klein: #1B2FD1; --acid: #D4FF3A; --verm: #FF4A1C; --white: #fff;
  --mono: "Martian Mono", ui-monospace, Consolas, monospace;
  position: relative; width: 100%; container-type: inline-size; font-family: var(--mono); font-stretch: 87.5%; }
.hero-fig[data-hero="solver"], .hero-fig[data-hero="viewer"] { aspect-ratio: 10 / 7.6; }
.hero-fig[data-hero="suite"] { aspect-ratio: 10 / 9.8; }
.hero-fig *, .hero-fig *::before { box-sizing: border-box; }
.hero-fig .hw { font-family: var(--mono); }
.hero-fig .hw * { font-family: inherit; }
.hero-fig .hw li, .hero-fig .hw li *, .hero-fig .hw .tool { font-family: var(--mono) !important; }   /* the site sets list text in the serif with !important */

/* a window: 3 px ink frame, ink title bar */
.hero-fig .hw { position: absolute; inset: 0; display: flex; flex-direction: column; border: 3px solid var(--ink); background: #f3f3f5; color: var(--ink);
  font-size: 2.05cqi; line-height: 1.25; box-shadow: 1.6cqi 1.6cqi 0 var(--ink); }
.hero-fig .hw.dark { background: #16171c; color: #e9eaf2; }
.hero-fig .hw-bar { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 2cqi; height: 6cqi; padding: 0 2cqi;
  background: var(--ink); color: var(--white); font-size: 2.1cqi; letter-spacing: .04em; text-transform: uppercase; }
.hero-fig .hw-bar b { font-weight: 700; color: var(--acid); }
.hero-fig .hw-bar span { color: #c8ccef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-fig .hw-body { flex: 1; min-height: 0; align-content: start; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2cqi; padding: 2cqi; }
.hero-fig .gcol { width: var(--g, 58cqi); height: var(--g, 58cqi); }
.hero-fig[data-hero="viewer"] { --g: 57cqi; }
.hero-fig[data-hero="suite"] { --g: 38cqi; }
.hero-fig .hw { overflow: hidden; }
.hero-fig .side { display: flex; flex-direction: column; gap: 1.6cqi; min-width: 0; }

/* the 13x13 grid */
.hero-fig .g13 { display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(13, 1fr); gap: 1px; width: 100%; height: 100%;
  background: #d5d6de; border: 1px solid #d5d6de; container-type: size; }
.hero-fig .dark .g13 { background: #08090c; border-color: #08090c; }
.hero-fig .g13 .c { position: relative; display: flex; overflow: hidden; background: #fff; }
.hero-fig .dark .g13 .c { background: #2a2c36; }
.hero-fig .g13 .c.out { background: #e7e8ee; }
.hero-fig .dark .g13 .c.out { background: #1f2027; }
.hero-fig .g13 i { flex: 0 1 0; transition: flex-grow .35s cubic-bezier(.3, .7, .2, 1); }
.hero-fig .g13 b { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none;
  font-size: 2.55cqi; font-weight: 700; letter-spacing: -.02em; color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, .45); }
.hero-fig .light .g13 .c.out b { color: #9a9cad; text-shadow: none; }
.hero-fig .dark .g13 .c.out b { color: #5b5d6e; text-shadow: none; }
.hero-fig .g13 .c.pin { outline: 2px solid var(--acid); outline-offset: -2px; z-index: 1; }
.hero-fig .light .g13 .c.pin { outline-color: var(--ink); }
@container (max-width: 210px) { .hero-fig .g13 b { display: none; } }

/* drawn cards (four colours, as in the apps) */
.hero-fig .board { display: flex; gap: .7cqi; }
.hero-fig .cd { display: inline-flex; align-items: baseline; justify-content: center; width: 4.6cqi; height: 6cqi; padding-top: .9cqi; border-radius: .6cqi;
  font-size: 2.6cqi; font-weight: 700; color: #fff; background: #222; }
.hero-fig .cd small { font-size: 1.9cqi; margin-left: .1em; }
.hero-fig .cd.h { background: #d3202f; } .hero-fig .cd.d { background: #1b6fd1; } .hero-fig .cd.c { background: #1e8a3a; }

/* Solver: the action totals, the exploitability line, the status bar */
.hero-fig .tot { list-style: none; margin: 0; padding: 0; display: grid; gap: 1cqi; }
.hero-fig .tot li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3cqi 1cqi; }
.hero-fig .tot u, .hero-fig .insp u { display: inline-block; width: 1.4cqi; height: 1.4cqi; }
.hero-fig .tot b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-fig .tot em { grid-column: 1 / -1; height: .9cqi; background: #e2e3ea; }
.hero-fig .tot em i { display: block; height: 100%; width: 33%; transition: width .2s linear; }
.hero-fig .chart { margin-top: auto; border: 1px solid #d5d6de; background: #fff; padding: 1cqi; }
.hero-fig .chart span { display: block; margin-bottom: .6cqi; font-size: 1.7cqi; letter-spacing: .06em; text-transform: uppercase; color: #5a5d78; }
.hero-fig .chart svg { display: block; width: 100%; height: 9cqi; }
.hero-fig .chart polyline { fill: none; stroke: #7b5cff; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: stroke-dashoffset .09s linear; }
.hero-fig .reset .chart polyline, .hero-fig .reset .tot em i { transition: none; }
.hero-fig .hw-status { flex: none; display: flex; align-items: center; gap: 2.4cqi; height: 5cqi; padding: 0 2cqi; background: var(--klein); color: #dde1fb;
  font-size: 1.8cqi; letter-spacing: .05em; text-transform: uppercase; }
.hero-fig .hw-status b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-fig .hw-status .st { min-width: 9ch; }
.hero-fig .led { width: 1.3cqi; height: 1.3cqi; border-radius: 50%; background: #ffb020; animation: hero-blink .7s steps(2) infinite; }
.hero-fig .solved .led { background: var(--acid); animation: none; }
.hero-fig .solved .exw b { color: var(--acid); }
@keyframes hero-blink { 50% { opacity: .35; } }

/* the inspector: one pinned hand and its mix */
.hero-fig .insp { display: grid; gap: .6cqi; padding: 1.2cqi; border: 1px solid #d5d6de; background: #fff; opacity: 0; transform: translateY(.6cqi); transition: opacity .3s, transform .3s; }
.hero-fig .insp.on { opacity: 1; transform: none; }
.hero-fig .insp > b { font-size: 2.6cqi; }
.hero-fig .insp span { display: flex; align-items: center; gap: 1cqi; }
.hero-fig .insp em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-fig .dark .insp { background: #1f2027; border-color: #34363f; }

/* Viewer: spot tabs and action boxes */
.hero-fig .tabs { flex: none; display: flex; gap: 1px; padding: 1.4cqi 2cqi 0; }
.hero-fig .tabs span { padding: 1cqi 1.6cqi; background: #23242c; color: #b9bbd0; white-space: nowrap; transition: background .25s, color .25s; }
.hero-fig .tabs span.on { background: var(--acid); color: var(--ink); font-weight: 700; }
.hero-fig .acts { display: flex; gap: .6cqi; height: 13cqi; }
.hero-fig .acts div { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 1cqi; color: #fff; transition: flex-grow .45s; }
.hero-fig .acts span { font-size: 1.8cqi; white-space: nowrap; }
.hero-fig .acts b { font-size: 3.6cqi; font-weight: 800; }

/* Home: two smaller windows and the file between them */
.hero-fig .hw.small { inset: auto; width: 72%; font-size: 2.6cqi; }
.hero-fig .hw.small .hw-bar { height: 5.4cqi; font-size: 1.9cqi; }
.hero-fig .hw.small .hw-body { padding: 1.6cqi; gap: 1.6cqi; }
.hero-fig .hw.small .hw-status { height: 4.6cqi; font-size: 1.6cqi; gap: 1.8cqi; }
.hero-fig .hw.small .tot li span, .hero-fig .hw.small .chart span { font-size: 1.5cqi; }
.hero-fig .hw.small .tot { font-size: 1.6cqi; }
.hero-fig .hw.small .insp { font-size: 1.6cqi; }
.hero-fig .hw.small .cd { width: 3.8cqi; height: 5cqi; font-size: 2.1cqi; padding-top: .8cqi; }
.hero-fig .hw.small .cd small { font-size: 1.5cqi; }
.hero-fig .hw.small .g13 b { font-size: 2.6cqi; }
.hero-fig[data-hero="suite"] .hw.light { left: 0; top: 0; }
.hero-fig[data-hero="suite"] .hw.viewer { right: 1.6cqi; bottom: 1.6cqi; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hero-fig[data-hero="suite"] .hw.viewer .hw-body { grid-template-columns: auto minmax(0, 1fr); }
.hero-fig[data-hero="suite"] .hw.viewer.open { transform: translate(-.6cqi, -.6cqi); }
.hero-fig[data-hero="suite"] .hw.light .chart svg { height: 7cqi; }
.hero-fig .file { position: absolute; z-index: 3; left: 20%; top: 58%; padding: 1cqi 1.6cqi; background: var(--acid); color: var(--ink); border: 2px solid var(--ink);
  font-size: 2.2cqi; font-weight: 700; opacity: 0; transform: translate(0, 0); }
.hero-fig.fly .file { opacity: 1; transform: translate(34cqi, 8cqi); transition: transform .85s cubic-bezier(.5, 0, .25, 1), opacity .2s; }
.hero-fig.sent .file { opacity: 0; transition: opacity .25s; transform: translate(34cqi, 8cqi); }
.hero-fig[data-hero="suite"] .hw.viewer .g13 .c i { transition: flex-grow .4s cubic-bezier(.3, .7, .2, 1); }

/* /mcp/: the chat */
.hero-fig[data-hero="chat"] .hw { position: relative; inset: auto; background: #fbfbfd; font-size: clamp(12px, 2.3cqi, 14px); }
.hero-fig .chat-body { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.hero-fig .msg { margin: 0; }
.hero-fig .msg.me { align-self: flex-end; max-width: 88%; padding: 12px 14px; background: var(--klein); color: #fff; font-family: "STIX Two Text", Georgia, serif; font-size: 1.15em; line-height: 1.4; }
.hero-fig .msg.me .hh { display: block; margin-top: 8px; font: 500 .8em/1.5 var(--mono); font-stretch: 87.5%; color: #dde1fb; }
.hero-fig .msg.me .r { color: #ffb4a3; }
.hero-fig .tool { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border: 2px solid var(--ink); background: #fff;
  font-size: .86em; letter-spacing: .04em; text-transform: uppercase; }
.hero-fig .tool i { width: 12px; height: 12px; border: 2px solid var(--klein); border-right-color: transparent; border-radius: 50%; animation: hero-spin .8s linear infinite; }
.hero-fig .tool.done i { border: 0; background: var(--acid); outline: 2px solid var(--ink); border-radius: 0; animation: none; }
@keyframes hero-spin { to { transform: rotate(1turn); } }
.hero-fig .msg.ai { font-size: 1em; }
.hero-fig .msg.ai .rv { width: 100%; border-collapse: collapse; border: 3px solid var(--ink); background: #fff; }
.hero-fig .msg.ai .rv th, .hero-fig .msg.ai .rv td { padding: 9px 10px; text-align: left; vertical-align: baseline; font: 500 .92em/1.35 var(--mono); font-stretch: 87.5%; border-bottom: 1px solid #d7dae8; }
.hero-fig .msg.ai .rv thead th { font-size: .72em; letter-spacing: .08em; text-transform: uppercase; color: #3a3d5c; border-bottom: 2px solid var(--ink); padding: 7px 10px; }
.hero-fig .msg.ai .rv tbody th { white-space: nowrap; font-weight: 700; }
.hero-fig .msg.ai .rv .num { text-align: right; white-space: nowrap; font-weight: 700; }
.hero-fig .msg.ai .rv .ok { color: var(--klein); }
.hero-fig .msg.ai .rv .pick b { display: inline-block; padding: 2px 6px; background: var(--acid); font-weight: 700; }
.hero-fig .msg.ai .r, .hero-fig .rv .r { color: #d3202f; }
.hero-fig .verdict { margin: 10px 0 0; font: 400 1.05em/1.5 "STIX Two Text", Georgia, serif; }
.hero-fig.anim [data-step] { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s cubic-bezier(.2, .8, .2, 1); }
.hero-fig.anim [data-step].in { opacity: 1; transform: none; }
@media (max-width: 560px) {
  .hero-fig .msg.ai .rv thead { display: none; }
  .hero-fig .msg.ai .rv tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid #d7dae8; padding: 8px 10px; gap: 4px 10px; }
  .hero-fig .msg.ai .rv th, .hero-fig .msg.ai .rv td { display: block; padding: 0; border: 0; }
  .hero-fig .msg.ai .rv td[data-k="You"] { grid-column: 1 / -1; grid-row: 2; color: #3a3d5c; }
  .hero-fig .msg.ai .rv td[data-k="You"]::before { content: "You: "; }
  .hero-fig .msg.ai .rv td.pick { grid-column: 1 / -1; grid-row: 3; }
  .hero-fig .msg.ai .rv td.pick::before { content: "Solver: "; }
  .hero-fig .chat-body { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fig *, .hero-fig .file { transition: none !important; animation: none !important; }
}

/* ── Home, cinematic (12-02, second pass): a Klein stage in perspective, a drifting camera, the three products taking
      turns (hero.js sets data-shot 0..5), a floor grid sliding under them ── */
.hero-fig[data-hero="cine"] { aspect-ratio: 10 / 8; background: var(--klein); overflow: hidden; perspective: 1500px; perspective-origin: 50% 40%; --g: 31cqi; }
.hero-fig .cam { position: absolute; inset: 0; transform-style: preserve-3d; animation: hero-cam 16s ease-in-out infinite alternate; }
@keyframes hero-cam { from { transform: rotateY(-5deg) rotateX(2deg); } to { transform: rotateY(5deg) rotateX(-1deg); } }
.hero-fig .floor { position: absolute; left: -60%; right: -60%; bottom: -8%; height: 70%; transform: rotateX(78deg); transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 7cqi 7cqi; animation: hero-floor 3s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); }
@keyframes hero-floor { to { background-position: 0 7cqi; } }
.hero-fig[data-hero="cine"] .hw { inset: auto; left: 50%; top: 46%; width: 58cqi; height: auto; font-size: 2.5cqi; box-shadow: 1.4cqi 1.4cqi 0 var(--ink);
  backface-visibility: hidden; will-change: transform, opacity;
  transition: transform 1.15s cubic-bezier(.7, 0, .16, 1), opacity .8s ease, filter .8s ease;
  transform: translate(-50%, -50%) translate3d(0, 0, -1800px) rotateY(-40deg) rotateX(10deg); opacity: 0; }
.hero-fig.cut .hw, .hero-fig.cut .hw * { transition: none !important; }
.hero-fig[data-hero="cine"] .hw.light .chart svg { height: 6cqi; }
/* the Solver */
.hero-fig[data-shot="1"] .w-sol { transform: translate(-50%, -50%) translate3d(0, 0, 0) rotateY(-12deg) rotateX(6deg); opacity: 1; }
.hero-fig[data-shot="2"] .w-sol { transform: translate(-50%, -50%) translate3d(-46cqi, -6cqi, -700px) rotateY(50deg) rotateX(4deg); opacity: .55; filter: brightness(.85); }
.hero-fig[data-shot="3"] .w-sol { transform: translate(-50%, -50%) translate3d(-64cqi, -16cqi, -1300px) rotateY(56deg); opacity: .2; }
.hero-fig[data-shot="4"] .w-sol { transform: translate(-50%, -50%) translate3d(-22cqi, -17cqi, -420px) rotateY(24deg) rotateX(4deg); opacity: 1; }
.hero-fig[data-shot="5"] .w-sol { transform: translate(-50%, -50%) translate3d(-34cqi, -6cqi, 1100px) rotateY(18deg); opacity: 0; }
/* the Viewer */
.hero-fig[data-hero="cine"] .w-vw { transform: translate(-50%, -50%) translate3d(120cqi, 6cqi, -700px) rotateY(-75deg); }
.hero-fig[data-shot="2"] .w-vw { transform: translate(-50%, -50%) translate3d(2cqi, 2cqi, 0) rotateY(-12deg) rotateX(5deg); opacity: 1; }
.hero-fig[data-shot="3"] .w-vw { transform: translate(-50%, -50%) translate3d(40cqi, -16cqi, -700px) rotateY(-42deg); opacity: .4; filter: brightness(.85); }
.hero-fig[data-shot="4"] .w-vw { transform: translate(-50%, -50%) translate3d(6cqi, -5cqi, -200px) rotateY(12deg) rotateX(4deg); opacity: 1; }
.hero-fig[data-shot="5"] .w-vw { transform: translate(-50%, -50%) translate3d(8cqi, 4cqi, 1100px) rotateY(8deg); opacity: 0; }
/* the AI chat */
.hero-fig[data-hero="cine"] .w-ai { width: 52cqi; background: #fbfbfd; transform: translate(-50%, -50%) translate3d(0, 95cqi, 300px) rotateX(-65deg); }
.hero-fig[data-shot="3"] .w-ai { transform: translate(-50%, -50%) translate3d(0, 6cqi, 80px) rotateY(-8deg) rotateX(6deg); opacity: 1; }
.hero-fig[data-shot="4"] .w-ai { transform: translate(-50%, -50%) translate3d(19cqi, 14cqi, 40px) rotateY(-6deg) rotateX(4deg); opacity: 1; }
.hero-fig[data-shot="5"] .w-ai { transform: translate(-50%, -50%) translate3d(34cqi, 26cqi, 1100px); opacity: 0; }
.hero-fig .chatc .cb { display: flex; flex-direction: column; gap: 1.6cqi; padding: 2cqi; }
.hero-fig .chatc p { margin: 0; }
.hero-fig .chatc .me { align-self: flex-end; padding: 1.4cqi 1.8cqi; background: var(--klein); color: #fff; font-family: "STIX Two Text", Georgia, serif !important; font-size: 2.6cqi; }
.hero-fig .chatc .tl { display: inline-flex; align-self: flex-start; align-items: center; gap: 1.2cqi; padding: .9cqi 1.4cqi; border: 2px solid var(--ink); background: #fff;
  font-size: 1.9cqi; letter-spacing: .04em; text-transform: uppercase; }
.hero-fig .chatc .tl i { width: 1.6cqi; height: 1.6cqi; background: var(--acid); outline: 2px solid var(--ink); }
.hero-fig .chatc .ans { display: grid; grid-template-columns: 1fr auto; gap: .8cqi 2cqi; padding: 1.6cqi; border: 3px solid var(--ink); background: #fff; font-size: 2.2cqi; }
.hero-fig .chatc .ans span { grid-column: 1; }
.hero-fig .chatc .ans em { grid-column: 2; grid-row: 1; font-style: normal; font-weight: 700; }
.hero-fig .chatc .ans mark { background: var(--acid); padding: 0 .6cqi; font-weight: 700; }
.hero-fig .chatc .tl, .hero-fig .chatc .ans, .hero-fig .chatc .ans * { font-family: var(--mono) !important; }
.hero-fig .chatc .tl, .hero-fig .chatc .ans { opacity: 0; transform: translateY(1cqi); transition: opacity .35s, transform .35s; }
.hero-fig .chatc.said .tl { opacity: 1; transform: none; }
.hero-fig .chatc.said .ans { opacity: 1; transform: none; transition-delay: .7s; }
/* the file flies out of the Solver into the Viewer, past the camera */
.hero-fig[data-hero="cine"] .file { left: 50%; top: 46%; opacity: 0; transform: none; transition: none; font-size: 2.8cqi; box-shadow: .8cqi .8cqi 0 var(--ink); }
.hero-fig[data-hero="cine"].fly .file { animation: hero-chip 1.1s cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes hero-chip {
  0% { opacity: 0; transform: translate(-50%, -50%) translate3d(-42cqi, -4cqi, -650px) scale(.6) rotate(-8deg); }
  35% { opacity: 1; transform: translate(-50%, -50%) translate3d(-12cqi, -14cqi, 320px) scale(1.25) rotate(4deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate3d(4cqi, 0, 0) scale(.7) rotate(0); } }
@container (max-width: 480px) {
  .hero-fig[data-hero="cine"] .hw { width: 70cqi; font-size: 2.9cqi; }
  .hero-fig[data-hero="cine"] { --g: 37cqi; }
  .hero-fig[data-hero="cine"] .w-ai { width: 66cqi; }
}

/* the three single heroes: fly in once from depth, then a slow drift */
.hero-fig.enter { perspective: 1400px; }
.hero-fig.enter > .hw { transform: translate3d(0, 0, -800px) rotateY(-30deg) rotateX(16deg); opacity: 0;
  transition: transform 1.5s cubic-bezier(.16, 1, .3, 1), opacity .9s ease; }
.hero-fig.enter.in > .hw { transform: rotateY(-7deg) rotateX(4deg); opacity: 1; animation: hero-drift 9s ease-in-out 1.5s infinite alternate; }
@keyframes hero-drift { from { transform: rotateY(-7deg) rotateX(4deg); } to { transform: rotateY(-1deg) rotateX(1deg) translateY(-.6cqi); } }
@media (prefers-reduced-motion: reduce) { .hero-fig .cam, .hero-fig .floor { animation: none !important; } }
@container (max-width: 480px) {
  .hero-fig[data-shot="4"] .w-ai { transform: translate(-50%, -50%) translate3d(10cqi, 18cqi, 40px) rotateY(-6deg) rotateX(4deg); }
  .hero-fig[data-shot="4"] .w-sol { transform: translate(-50%, -50%) translate3d(-12cqi, -18cqi, -420px) rotateY(24deg) rotateX(4deg); }
  .hero-fig[data-shot="4"] .w-vw { transform: translate(-50%, -50%) translate3d(2cqi, -4cqi, -200px) rotateY(12deg) rotateX(4deg); }
}
