/* Self-test pages: layout for intro, question, memory tasks and result. Tokens come from /assets/css/site.css. */
.t-wrap { max-width: 760px; }
.t-wrap > * + * { margin-top: 1.25rem; }
.facts { display: grid; grid-template-columns: 1fr; gap: .15rem 1.2rem; }
.facts dt { font-weight: 650; font-size: .86rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin-top: .7rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; }
@media (min-width: 640px) {
    .facts { grid-template-columns: 11rem 1fr; }
    .facts dt { margin-top: 0; padding-top: .15rem; }
    .facts dd { padding-bottom: .55rem; }
}
.card h2 { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.2; margin-bottom: .6rem; }
.card h3 { font-family: var(--display); font-size: 1.05rem; letter-spacing: -.01em; margin: 1rem 0 .3rem; }
.card p + p { margin-top: .7rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.row.between { justify-content: space-between; }

.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }

fieldset.q { border: 0; min-width: 0; }
fieldset.q legend { font-family: var(--display); font-size: clamp(1.2rem, 3.6vw, 1.55rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.25; margin-bottom: .9rem; padding: 0; width: 100%; }
fieldset.q legend:focus { outline: none; }
.q-context { margin-bottom: .9rem; padding: .7rem .9rem; border-left: 3px solid var(--line-strong); background: var(--bg); border-radius: 0 10px 10px 0; }
.q-pattern { font-family: var(--mono); font-size: clamp(1.3rem, 5vw, 1.8rem); letter-spacing: .06em; margin-bottom: .9rem; overflow-wrap: anywhere; }
.opts { display: grid; gap: .5rem; }
.choice { display: flex; align-items: center; gap: .75rem; min-height: 44px; margin: 0; padding: .55rem .85rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); cursor: pointer; font-weight: 450; font-size: 1rem; }
.choice:hover { border-color: var(--ink); }
.choice input { width: 1.25rem; height: 1.25rem; flex: none; accent-color: var(--accent); margin: 0; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 640px) { .opts.likert { grid-template-columns: repeat(5, 1fr); } .opts.likert .choice { flex-direction: column; text-align: center; justify-content: center; padding: .7rem .4rem; font-size: .92rem; } }

.rows { display: grid; gap: 1rem; }
.rows li { display: grid; gap: .3rem; }
.rows .rh { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.rows .rv { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rows .rn { font-size: .92rem; color: var(--muted); }
.big-score { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 8vw, 3.4rem); letter-spacing: -.03em; line-height: 1; }
.compare { font-size: .95rem; }
.compare caption { text-align: left; font-weight: 650; padding-bottom: .4rem; }
.compare th { font-weight: 650; }
.review li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.review li:last-child { border-bottom: 0; }
.ok { font-weight: 650; }

/* Memory tasks */
.m-stage { min-height: 9rem; display: grid; place-items: center; text-align: center; padding: 1rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--bg); }
.m-digit { font-family: var(--mono); font-size: clamp(3rem, 14vw, 5rem); font-weight: 600; line-height: 1; }
.m-words { font-family: var(--display); font-size: clamp(1.8rem, 8vw, 2.8rem); font-weight: 650; }
.pads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; width: min(100%, 22rem); margin: 0 auto; }
.pad { min-height: 84px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--surface); font-weight: 650; font-size: 1.1rem; cursor: pointer; }
.pad[data-i="0"] { border-color: var(--c-legal); }
.pad[data-i="1"] { border-color: var(--c-finance); }
.pad[data-i="2"] { border-color: var(--c-creative); }
.pad[data-i="3"] { border-color: var(--c-psychology); }
.pad.lit { background: var(--ink); color: var(--bg); }
.pad:disabled { cursor: default; opacity: 1; }
.grid { display: grid; gap: .5rem; width: min(100%, 18rem); margin: 0 auto; }
.cell { min-height: 56px; aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; padding: 0; }
.cell.lit, .cell[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.cell:disabled { cursor: default; opacity: 1; }
.feedback { font-weight: 650; }
.m-input { max-width: 28rem; }
textarea.m-input { min-height: 96px; }
