/* THETIS online test: puzzles, timer, forms, results. Uses the site's color tokens (light and dark). */
.fx { --fx-gap: 10px; --fx-lit: #E8A317; --fx-gray: #9EA5B0; }
.fx-hidden { display: none !important; }
.fx-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: clamp(16px, 3.4vw, 30px); }
.fx-card + .fx-card { margin-top: 18px; }
.fx h3 { margin-top: 0; }
.fx-form { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fx-form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fx-form { grid-template-columns: 1fr; } }
.fx-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.fx-field .hint { display: block; font-size: .86rem; color: var(--ink-3); margin-top: 4px; }
.fx-field input[type="text"], .fx-field input[type="email"], .fx-field input[type="number"], .fx-field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--wall); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 12px; min-height: 46px; }
.fx-field input:focus-visible, .fx-field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fx-check { display: flex; gap: 10px; align-items: flex-start; }
.fx-check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--indigo); }
.fx-error { color: var(--rust); font-weight: 700; min-height: 1.4em; margin: 6px 0 0; }
.fx-note { font-size: .92rem; color: var(--ink-2); }
.fx-price { font: 600 1.9rem/1 var(--font-display); color: var(--ink); }
.fx-paybox { display: grid; gap: 16px; grid-template-columns: 1fr minmax(260px, 360px); align-items: start; }
@media (max-width: 760px) { .fx-paybox { grid-template-columns: 1fr; } }
#fx-paypal { min-height: 60px; }
.fx-summary { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fx-summary li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }

/* runner */
.fx-run { scroll-margin-top: calc(var(--header-h) + 12px); }
.fx-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; justify-content: space-between; margin-bottom: 12px; }
.fx-count { font: 600 .82rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fx-timer { display: flex; align-items: center; gap: 10px; min-width: 200px; flex: 1 1 220px; max-width: 420px; }
.fx-timer .bar { flex: 1; height: 8px; border-radius: 99px; background: var(--wall-2); overflow: hidden; }
.fx-timer .bar i { display: block; height: 100%; width: 100%; background: var(--indigo); transform-origin: left center; }
.fx-timer .t { font: 600 1.05rem/1 var(--font-mono); min-width: 4.6ch; text-align: right; color: var(--ink); }
.fx-timer.low .bar i { background: var(--rust); }
.fx-timer.low .t { color: var(--rust); }
.fx-prompt { font-size: 1rem; margin: 0 0 6px; color: var(--ink-2); }
.fx-ask { font-weight: 700; font-size: 1.06rem; margin: 10px 0 0; color: var(--ink); }
.fx-stim { margin: 14px 0 16px; overflow-x: auto; padding-bottom: 4px; }
.fx-opts { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-opts.wide { grid-template-columns: 1fr; }
.fx-opts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fx-opts.text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .fx-opts.six-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 420px) { .fx-opts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-opts.text { grid-template-columns: 1fr; } }
.fx-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
  padding: 26px 8px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink);
  cursor: pointer; font: inherit; text-align: left; }
.fx-opts.wide .fx-opt, .fx-opts.text .fx-opt { padding: 10px 12px 10px 44px; justify-content: flex-start; }
.fx-opt .lab { position: absolute; top: 6px; left: 8px; font: 700 .8rem/1 var(--font-mono); color: var(--ink-3); }
.fx-opts.wide .fx-opt .lab, .fx-opts.text .fx-opt .lab { top: 50%; transform: translateY(-50%); left: 14px; font-size: .95rem; }
.fx-opt:hover { border-color: var(--ink-3); }
.fx-opt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fx-opt[aria-checked="true"] { border-color: var(--indigo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 28%, transparent); }
.fx-opt[aria-checked="true"] .lab { color: var(--indigo); }
.fx-opt.right { border-color: #2E7D4F; }
.fx-opt.wrong { border-color: var(--rust); }
.fx-opt svg { display: block; max-width: 100%; height: auto; }
.fx-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.fx-status { min-height: 1.4em; color: var(--ink-2); }

/* figures */
.fx-rows { display: grid; gap: 12px; }
.fx-mrow { display: flex; align-items: center; gap: 6px; }
.fx-mrow .cell { flex: 0 1 78px; min-width: 0; }
.fx-mrow .cell.n4 { flex-basis: 88px; }
.fx-arrow { flex: none; color: var(--ink-3); font-size: .95rem; }
.fx-panel { fill: var(--paper); stroke: var(--line); stroke-width: 1.6; }
.fx-panel.q { stroke: var(--ink-3); stroke-dasharray: 5 4; fill: var(--wall); }
.fx-socket { fill: var(--line); }
.fx-tok-b { fill: var(--ink); }
.fx-tok-w { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.fx-qmark { fill: var(--ink-3); font: 700 22px/1 var(--font-display); }
.fx-srow { display: flex; align-items: center; gap: 8px; }
.fx-srow .t { font: 600 .78rem/1 var(--font-mono); color: var(--ink-3); min-width: 2.2ch; text-align: right; }
.fx-cell-b { fill: var(--ink); }
.fx-cell-w { fill: var(--paper); stroke: var(--line); stroke-width: 1.4; }
.fx-cell-q { fill: var(--wall); stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 3; }
.fx-ring-note { font-size: .86rem; color: var(--ink-3); margin: 6px 0 0; }
.fx-keys { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fx-key { text-align: center; font: 700 .8rem/1.2 var(--font-mono); color: var(--ink-2); }
.fx-cardbox { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.4; }
.fx-shape-0 { fill: var(--ink); stroke: var(--ink); }
.fx-shape-1 { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.fx-shape-2 { fill: var(--fx-gray); stroke: var(--ink); stroke-width: 1; }
.fx-shape-3 { fill: url(#fx-hatch); stroke: var(--ink); stroke-width: 1.4; }
.fx-hatch-line { stroke: var(--ink); stroke-width: 1.5; }
.fx-ledger { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fx-ledger li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--wall); }
.fx-ledger .n { font: 600 .72rem/1 var(--font-mono); color: var(--ink-3); min-width: 2ch; }
.fx-ledger .to { font: 700 .86rem/1 var(--font-mono); }
.fx-ok { color: #2E7D4F; font-weight: 700; }
.fx-no { color: var(--rust); font-weight: 700; }
.fx-next { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-weight: 700; }
.fx-trow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--wall); }
.fx-trow .who { font: 600 .78rem/1.2 var(--font-mono); color: var(--ink-3); min-width: 9.5ch; }
.fx-trow .op { color: var(--ink-3); font-weight: 700; }
.fx-trow.query { background: var(--paper); border-style: dashed; }
.fx-bead-1 { fill: var(--ink); }
.fx-bead-0 { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.fx-tile-1 { fill: var(--ocher-fill); stroke: var(--ink); stroke-width: 1.2; }
.fx-tile-0 { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.2; }
.fx-dot-1 { fill: var(--indigo); }
.fx-grid3 { fill: var(--paper); stroke: var(--line); stroke-width: 1.2; }
.fx-runs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fx-lamps { border-collapse: separate; border-spacing: 0; font: 600 .8rem/1.2 var(--font-mono); }
.fx-lamps caption { text-align: left; font: 700 .9rem/1.3 var(--font-body); color: var(--ink); padding-bottom: 6px; caption-side: top; }
.fx-lamps caption small { display: block; font-weight: 400; color: var(--ink-3); }
.fx-lamps th, .fx-lamps td { padding: 3px 5px; text-align: center; }
.fx-lamps th { color: var(--ink-2); }
.fx-lamps th.held { color: var(--indigo); }
.fx-lamps td.tick { color: var(--ink-3); text-align: right; padding-right: 8px; }
.fx-lamp-1 { fill: var(--fx-lit); stroke: var(--ink); stroke-width: 1.4; }
.fx-lamp-0 { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.fx-lamp-h { fill: var(--wall-2); stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 2 2; }
.fx-lamp-held { stroke: var(--indigo); stroke-width: 2.6; }
.fx-hq { fill: var(--ink-3); font: 700 9px/1 var(--font-mono); }
.fx-board { display: inline-flex; gap: 4px; align-items: center; }
.fx-board .nm { font: 600 .7rem/1 var(--font-mono); color: var(--ink-3); }

/* results */
.fx-result { text-align: center; }
.fx-iq { font: 600 clamp(3.4rem, 11vw, 5.6rem)/1 var(--font-display); color: var(--indigo); margin: 6px 0 4px; }
.fx-iq small { font: 400 1rem/1 var(--font-body); color: var(--ink-3); }
.fx-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 10px 0 18px; color: var(--ink-2); }
.fx-sub b { color: var(--ink); }
.fx-result .cta-row { justify-content: center; }
.fx-verify-out { margin-top: 16px; }
.fx-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.fx-badge.ok { background: color-mix(in srgb, #2E7D4F 14%, transparent); color: #2E7D4F; }
.fx-badge.no { background: color-mix(in srgb, var(--rust) 14%, transparent); color: var(--rust); }
.fx-stats { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.fx-stats li { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--paper); }
.fx-stats b { display: block; font: 600 1.7rem/1.1 var(--font-display); color: var(--indigo); }
@media (max-width: 860px) { .fx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-fams { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); list-style: none; padding: 0; margin: 0; }
.fx-fams li { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--paper); }
.fx-fams h3 { font-size: 1rem; margin: 8px 0 4px; }
.fx-fams p { font-size: .9rem; margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .fx-fams { grid-template-columns: 1fr; } }
.fx-practice-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fx-practice-nav button[aria-pressed="true"] { background: var(--indigo); color: var(--on-indigo); border-color: var(--indigo); }
.fx-explain { margin-top: 12px; padding: 12px 14px; border-left: 4px solid var(--ocher-fill); background: var(--wall); border-radius: 0 10px 10px 0; }
.fx .sr-only, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fx-hero .hero-art img { aspect-ratio: 1 / 1; }

/* focus mode during a test */
.fx-testing [data-view="thetis"] > :not(#fx-start) { display: none !important; }
.fx-testing #fx-start .section-head { display: none; }
.fx-testing .site-footer { display: none; }
.fx-explain-score { max-width: 62ch; margin: 0 auto 18px; color: var(--ink-2); font-size: .95rem; }
/* reconnect help under the test status line */
.fx-reconnect { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line, #c9c2b3); border-radius: 10px; }
.fx-reconnect p { margin: 0 0 8px; font-size: .95rem; }

/* Turnstiles (marble machines) */
.fx-gwrap { display: grid; gap: 16px; grid-template-columns: minmax(250px, 360px) minmax(0, 1fr); align-items: start; }
@media (max-width: 720px) { .fx-gwrap { grid-template-columns: 1fr; } }
.fx-gm { max-width: 380px; }
.fx-gmach { display: block; width: 100%; height: auto; }
.fx-g-wire { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
.fx-g-head { fill: var(--ink-3); }
.fx-g-gate { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; }
.fx-g-name { fill: var(--ink); font: italic 700 15px/1 var(--font-display); }
.fx-g-entry { fill: var(--wall-2); stroke: var(--ink); stroke-width: 1.3; }
.fx-g-elab { fill: var(--ink); font: 700 11px/1 var(--font-mono); }
.fx-g-cup { fill: var(--wall); stroke: var(--ink); stroke-width: 1.6; }
.fx-g-num { fill: var(--ink); font: 700 13px/1 var(--font-mono); }
.fx-grec-cap { font: 600 .76rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.fx-grec { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.fx-grec li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; background: var(--wall); }
.fx-grec .n { font: 600 .72rem/1 var(--font-mono); color: var(--ink-3); min-width: 3.2ch; }
.fx-grec .io { font: 700 .95rem/1 var(--font-mono); color: var(--ink); white-space: nowrap; }
.fx-grec li.mark { border-color: var(--indigo); box-shadow: inset 0 0 0 1.5px var(--indigo); }
.fx-grec li.mark .n { color: var(--indigo); }
.fx-grec li.q, .fx-grec li.q2 { background: var(--paper); border-style: dashed; border-color: var(--ink-3); }
.fx-opts.nolab .fx-opt { padding: 12px 14px; justify-content: center; }
.fx-opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) { .fx-opts.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-gopt { font: 700 1.02rem/1.2 var(--font-body); }
/* Orbits (tokens on rings) */
.fx-orbits { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.fx-orbits figure { margin: 0; text-align: center; width: 128px; }
@media (max-width: 560px) { .fx-orbits figure { width: calc((100% - 20px) / 3); } }
.fx-orbits figcaption { font: 600 .76rem/1.2 var(--font-mono); color: var(--ink-3); margin-top: 4px; }
.fx-orbits figure.q figcaption { color: var(--ink); }
.fx-oring { display: block; width: 100%; height: auto; }
.fx-opt .fx-oring { max-width: 128px; }
.fx-o-bg { fill: var(--paper); stroke: var(--line); stroke-width: 1.4; }
.fx-o-bg.q { fill: var(--wall); stroke: var(--ink-3); stroke-dasharray: 5 4; }
.fx-o-spoke { stroke: var(--line); stroke-width: .9; }
.fx-o-ring { fill: none; stroke: var(--ink-3); stroke-width: 1.1; opacity: .7; }
.fx-o-ring.h { stroke-dasharray: 3 3; opacity: 1; }
/* short puzzle wording: cue chips and the family rules on request */
.fx-cues { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.fx-cues li { font: 600 .78rem/1.2 var(--font-mono); letter-spacing: .02em; color: var(--indigo); border-radius: 999px; padding: 4px 10px;
  background: color-mix(in srgb, var(--indigo) 9%, transparent); border: 1px solid color-mix(in srgb, var(--indigo) 30%, transparent); }
.fx-rules-now { margin: 8px 0 0; }
.fx-rules-now summary { cursor: pointer; font-weight: 700; color: var(--indigo); font-size: .92rem; min-height: 32px; display: list-item; }
.fx-rules-now summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.fx-rule-body { margin-top: 6px; padding: 10px 12px; border-left: 3px solid var(--indigo); background: var(--wall); border-radius: 0 10px 10px 0;
  font-size: .93rem; color: var(--ink-2); }
.fx-rule-body p { margin: 0 0 6px; }
.fx-rule-body p:last-child { margin: 0; }
/* the "How the puzzles work" section */
.fx-rules { display: grid; gap: 10px; }
.fx-rules details { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 12px 16px; }
.fx-rules summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.fx-rules summary small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.fx-rules .fx-rule-text { margin-top: 8px; color: var(--ink-2); }
.fx-rules .fx-rule-text p { margin: 0 0 8px; }
.fx-rules .fx-rule-text p:last-child { margin: 0; }
.fx-principle { border-left: 4px solid var(--ocher-fill); background: var(--wall); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 0 0 14px; }

/* Deploy Preview copy (no payments, separate data) */
.fx-preview-bar { margin: 0 0 18px; padding: 12px 16px; border: 1px dashed var(--rust); border-radius: 10px;
  background: var(--wall-2); color: var(--ink); font-size: .95rem; line-height: 1.5; }
.fx-preview-pay { margin: 0; padding: 12px 14px; border: 1px dashed var(--rust); border-radius: 8px; background: var(--paper);
  color: var(--ink); font-size: .95rem; line-height: 1.5; }

/* optional validation questionnaire on the result screen */
.fx-prior { display: grid; gap: 12px; }
.fx-prior-row { display: grid; gap: 8px; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr); }
.fx-prior-row input[data-k="name"] { grid-column: 1 / -1; }
.fx-prior-row select, .fx-prior-row input { width: 100%; font: inherit; color: var(--ink); background: var(--wall);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 11px; min-height: 44px; }
.fx-prior-row select:focus-visible, .fx-prior-row input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) { .fx-prior-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fx-prior-row select[data-k="test"] { grid-column: 1 / -1; } }

/* code box in the payment step: same field style as the registration form */
.fx-promo input[type="text"] {
  font: inherit; color: var(--ink); background: var(--wall); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; }
.fx-promo input[type="text"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
