/*
 * «تست استعدادیابی کلیفتون» — quiz + report look. Quiz classes are `tal-*` (inside #talents-test), report classes live under
 * `.tal` so nothing leaks into the rest of the site. Surfaces use the site tokens (--card, --ink, --muted, --border) so the
 * account dark switch works; the four domain colours get their own dark twin.
 *
 * Domain colour: classes d0..d3 (server SVG; questions.DOMAIN_CODES order executing, influencing, relationship, strategic)
 * and d-executing.. (cards) both just set --c. Neutral, never red-to-green: no domain is "good" or "bad".
 * Group strength (g-core / g-supporting / g-middle / g-quieter) is shown by fill opacity, never by a different hue.
 * Colours: write hex, then `python ../scripts/tokenize_colors.py` (CLAUDE.md) and ship service/payments/theme_palette.json.
 */
.tal, .tal-scope {
  --tal-d0: var(--lc-b8532f, #b8532f); --tal-d1: var(--lc-b8862a, #b8862a); --tal-d2: var(--lc-2f8a6e, #2f8a6e); --tal-d3: var(--lc-4a62b8, #4a62b8);
  --tal-on: var(--lc-ffffff, #ffffff); --tal-soft: rgba(36,74,57,.07); --tal-warn: var(--lc-fbefc7, #fbefc7); --tal-warn-ink: var(--lc-4a3a10, #4a3a10);
}
html[data-theme="dark"] .tal, html[data-theme="dark"] .tal-scope {
  --tal-d0: var(--lc-e0805e, #e0805e); --tal-d1: var(--lc-d9aa4d, #d9aa4d); --tal-d2: var(--lc-56b896, #56b896); --tal-d3: var(--lc-7f93de, #7f93de);
  --tal-on: var(--lc-10202e, #10202e); --tal-soft: rgba(255,255,255,.06); --tal-warn: var(--lc-3a321a, #3a321a); --tal-warn-ink: var(--lc-f0e2b0, #f0e2b0);
}
.d0, .d-executing { --c: var(--tal-d0); }
.d1, .d-influencing { --c: var(--tal-d1); }
.d2, .d-relationship { --c: var(--tal-d2); }
.d3, .d-strategic { --c: var(--tal-d3); }

/* ---------------------------------------------------------------- quiz */
.tal-ready { background: var(--tal-warn, var(--lc-fbefc7, #fbefc7)); color: var(--tal-warn-ink, var(--lt-4a3a10, #4a3a10)); border-radius: 14px; padding: 10px 14px; margin: 14px 0; font-size: 14.5px; }
.tal-ready p { margin: 4px 0 0; }
.tal-check { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; font-size: 14.5px; line-height: 1.8; }
.tal-check input { width: auto; margin-top: 4px; flex: none; }
.tal-warn { color: var(--danger, var(--lt-b03a3a, #b03a3a)); font-size: 13.5px; margin: 6px 0; }
.tal-resume { background: var(--tal-soft, rgba(36,74,57,.07)); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: 14.5px; }
.tal-resume button { margin-inline-start: 8px; }

.tal-timer-opt { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin: 4px 0 10px; }
.tal-timer-opt input { width: auto; }
.tal-round { background: var(--tal-soft, rgba(36,74,57,.07)); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 8px 0; }

.tal-pair { display: grid; gap: 10px; margin: 10px 0 14px; }
.tal-s { max-width: none; margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); font-size: 16.5px; line-height: 2; }
.tal-s::before { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.tal-s--a::before { content: 'جمله‌ی ۱'; }
.tal-s--b::before { content: 'جمله‌ی ۲'; }
#talents-test .test-options { display: block; }
.tal-scale { margin: 4px 0 0; }
.tal-scale__labels { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 13px; color: var(--muted); margin: 0 4px 8px; }
.tal-scale__labels span:last-child { text-align: end; }
.tal-scale__cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
/* five cells, tint and dot size grow toward the two ends: the size says "how much", so no long labels are needed */
#talents-test .tal-cell {
  --tint: 4%; --dot: 22px; position: relative; display: grid; grid-template-columns: 1fr; justify-content: stretch; place-items: center; text-align: center; width: 100%; min-height: 64px; padding: 0;
  border: 1px solid var(--border); border-radius: 14px; cursor: pointer; color: var(--ink);
  background: var(--card); background: color-mix(in srgb, var(--ink) var(--tint), var(--card));
  transition: background .18s, border-color .18s, transform .12s;
}
#talents-test .tal-cell--1, #talents-test .tal-cell--5 { --tint: 12%; --dot: 30px; }
#talents-test .tal-cell--2, #talents-test .tal-cell--4 { --tint: 7%; --dot: 24px; }
#talents-test .tal-cell--3 { --tint: 3%; --dot: 16px; }
#talents-test .tal-cell::after {
  content: ''; width: var(--dot); height: var(--dot); border-radius: 50%; box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--ink) 40%, transparent); background: transparent; transition: background .18s, border-color .18s;
}
@media (hover: hover) { #talents-test .tal-cell:hover { border-color: var(--ink); } }
#talents-test .tal-cell:active { transform: scale(.97); }
#talents-test .tal-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#talents-test .tal-cell.is-selected { background: var(--ink); border-color: var(--ink); }
#talents-test .tal-cell.is-selected::after { background: var(--on-ink, var(--lc-ffffff, #fff)); border-color: var(--on-ink, var(--lc-ffffff, #fff)); }
/* the shared quiz layer's number badges, keyboard hint and "time left" line are noise on this minimal scale (the 1-5 keys still work) */
#talents-test .mpt-key, #talents-test .mpt-keyhint, #talents-test .mpt-pace [data-left] { display: none !important; }
.tal-nudge { text-align: center; color: var(--muted); font-size: 14px; min-height: 1.8em; margin: 10px 0 2px; opacity: 0; transition: opacity .5s; }
.tal-nudge.is-on { opacity: 1; }
@media (max-width: 640px) { #talents-test .tal-cell { min-height: 58px; } }

/* instructions step (shown after the start button) */
.tal-guide__list { list-style: none; display: grid; gap: 12px; margin: 14px 0 18px; padding: 0; }
.tal-guide__list li { position: relative; padding-inline-start: 42px; line-height: 2; }
.tal-guide__list li::before { position: absolute; inset-inline-start: 0; top: 2px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tal-soft, rgba(36,74,57,.07)); font-weight: 700; font-size: 13px; }
.tal-guide__list li:nth-child(1)::before { content: '۱'; }
.tal-guide__list li:nth-child(2)::before { content: '۲'; }
.tal-guide__list li:nth-child(3)::before { content: '۳'; }
.tal-guide__try { font-weight: 700; margin: 6px 0 8px; }
.tal-sample { border: 1px dashed var(--border); border-radius: 18px; padding: 12px; display: grid; gap: 8px; margin-bottom: 12px; }
.tal-sample .tal-s { padding: 10px 14px; font-size: 15.5px; }
.tal-sample__fb { min-height: 1.8em; margin: 2px 0 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- result (2026-10-13 redesign)
 * Rules: only what is useful right now is visible; every explanation sits in a drawer (<details>); one fact once;
 * charts before text; full width with grids instead of one long column. */
.mpt-page .mpt-narrow.tal-wide, .mpt-page .mpt-narrow:has(.tal-res) { max-width: min(1440px, 94vw); }
.mpt-page:has(.tal-res) .res-view-bar { max-width: min(1440px, 94vw); }
.tal { text-align: start; }
.tal .ch { width: 100%; height: auto; display: block; }
.tal-fig { margin: 14px 0; }
.tal-figcap { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.tal-alt summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-top: 6px; }
.tal h2.tal-h { margin-top: 36px; }
.tal-cap, .tal-note { font-size: 13.5px; color: var(--muted); }

/* top: portrait + spider side by side */
.tal-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 8px 28px; align-items: center; margin: 6px 0 22px; }
.tal-top .tal-fig { max-width: 460px; margin: 0 auto; width: 100%; }
@media (max-width: 860px) { .tal-top { grid-template-columns: 1fr; } }
.tal-portrait { border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; background: var(--card); }
.tal-ptype { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--tal-soft); margin-bottom: 8px; }
.tal-notice { background: var(--tal-warn); color: var(--tal-warn-ink); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-size: 14.5px; }

/* core cards */
.tal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 410px), 1fr)); gap: 16px; align-items: start; }
.tal-card, .tal-job { position: relative; border: 1px solid var(--border); border-top: 4px solid var(--c, var(--border)); border-radius: 18px; padding: 16px 18px; background: var(--card); }
.tal-card__h, .tal-job header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tal-card h3, .tal-job h3 { margin: 0; font-size: 18px; line-height: 1.5; }
.tal-card h4 { margin: 12px 0 2px; font-size: 14.5px; }
.tal-rk { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 9px; background: var(--c, var(--tal-soft)); color: var(--tal-on); font-weight: 700; font-size: 13.5px; }
.tal-rk--n { background: var(--ink); color: var(--on-ink, var(--lt-ffffff, #fff)); }
.tal-dom, .tal-job small { font-size: 12.5px; color: var(--muted); }
.tal-lead { font-weight: 600; font-size: 15.5px; line-height: 1.95; margin: 8px 0; }
.tal-use { margin: 8px 0; font-size: 14.8px; }
.tal-use b { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 1px; }
.tal-step { background: var(--tal-soft); border-radius: 12px; padding: 8px 14px; margin: 10px 0; font-size: 14.5px; }
.tal-steps { margin: 4px 0; padding-inline-start: 20px; }

/* drawers: the default way to hold any explanation */
.tal-d, .tal-sup, .tal-k, .tal-method, .tal-week { border: 1px solid var(--border); border-radius: 14px; padding: 2px 14px; margin: 8px 0; background: var(--card); }
.tal-card .tal-d { border-width: 1px 0 0; border-radius: 0; padding: 0; margin: 10px 0 0; background: transparent; }
.tal-card .tal-d + .tal-d { margin-top: 0; }
.tal-d > summary, .tal-sup > summary, .tal-week > summary, .tal-method > summary, .tal-alt > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 9px 0; font-size: 14.5px;
}
.tal-d > summary::-webkit-details-marker, .tal-sup > summary::-webkit-details-marker, .tal-week > summary::-webkit-details-marker, .tal-method > summary::-webkit-details-marker { display: none; }
.tal-d > summary::after, .tal-sup > summary::after, .tal-week > summary::after, .tal-method > summary::after {
  content: ''; margin-inline-start: auto; flex: none; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s;
}
.tal-d[open] > summary::after, .tal-sup[open] > summary::after, .tal-week[open] > summary::after, .tal-method[open] > summary::after { transform: rotate(-135deg); }
.tal-d summary small { font-weight: 400; color: var(--muted); }
.tal-d__b { padding: 2px 0 12px; font-size: 14.5px; }
.tal-d__b ul, .tal-d__b ol { margin: 4px 0; padding-inline-start: 20px; }
.tal-d__b h4 { margin: 12px 0 2px; font-size: 14px; }
.tal-sup { border-inline-start: 4px solid var(--c, var(--border)); }
.tal-sup summary small { margin-inline-start: auto; margin-inline-end: 22px; }
.tal-sup summary .tal-rk { min-width: 26px; height: 26px; font-size: 12.5px; }
.tal-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 14px; align-items: start; }
.tal-src { font-weight: 400; color: var(--muted); }
.tal-others { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 8px; }
.tal-others li { display: flex; gap: 10px; border-inline-start: 4px solid var(--c, var(--border)); padding: 6px 12px; background: var(--card); border-radius: 10px; }
.tal-others li p { margin: 2px 0 0; font-size: 14px; }
.tal-others .tal-rk { min-width: 26px; height: 26px; font-size: 12px; margin-top: 3px; }

/* plain bullet lists inside the report: `mpt-limits` is the site's opt-out from the boxed-list style (result.css) */
.tal ul.mpt-limits:not(.tal-others):not(.tal-joblist) { list-style: disc; padding-inline-start: 20px; margin: 4px 0; color: var(--ink); }
.tal ul.mpt-limits:not(.tal-others):not(.tal-joblist) li { margin: 0 0 4px; line-height: 1.9; max-width: none; }
.tal ul.mpt-limits.tal-joblist li, .tal ul.mpt-limits.tal-others li { max-width: none; }

/* charts: tabs */
.tal-tabbed { margin: 6px 0 10px; }
.tal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.tal-tab { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 16px; border-radius: 99px; border: 1px solid var(--border); background: var(--card); color: var(--ink); cursor: pointer; }
.tal-tab.is-on { background: var(--ink); border-color: var(--ink); color: var(--on-ink, var(--lt-ffffff, #fff)); }
.tal-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tal-panel[hidden] { display: none; }
.tal-expand { font: inherit; font-size: 13px; padding: 5px 14px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; float: inline-end; margin-top: 4px; }

.tal-callout { border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; background: var(--card); margin: 12px 0; }
.tal-callout p { margin: 4px 0; }
.tal-label { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--tal-warn); color: var(--tal-warn-ink); }
.tal-domrow { margin: 10px 0; }
.tal-domrow small { margin-inline-start: 8px; color: var(--muted); }

/* jobs */
.tal-jobsearch { margin: 10px 0 14px; }
.tal-jobsearch input { width: 100%; font: inherit; font-size: 15px; padding: 11px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--ink); }
.tal-jobres { margin-top: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 4px 14px; max-height: 340px; overflow: auto; }
.tal-jobres div { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.tal-jobres div:last-child { border-bottom: 0; }
.tal-jobres small { display: block; color: var(--muted); font-size: 12.5px; }
.tal-jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 14px; align-items: start; margin: 8px 0; }
.tal-job { border-top-color: var(--ink); }
.tal-why { margin: 8px 0; font-size: 14.8px; }
.tal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tal-chips span { font-size: 13px; padding: 3px 11px; border-radius: 99px; background: var(--tal-soft); }
.tal-joblist { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.tal-joblist li { font-size: 14px; }
.tal-grouplist { margin: 4px 0; padding-inline-start: 22px; }
.tal-grouplist li { margin: 8px 0; }
.tal-grouplist p { margin: 2px 0 0; }

/* plan */
.tal-weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; align-items: start; }
.tal-week { margin: 0; }
.tal-week > summary { flex-wrap: wrap; align-items: flex-start; }
.tal-week > summary b { flex: 1 1 100%; }
.tal-week > summary span { font-weight: 400; font-size: 13.5px; color: var(--muted); flex: 1 1 85%; }
.tal-days { margin-top: 4px; font-size: 14px; }

/* ---------------------------------------------------------------- server SVG (engine/talents/charts_svg.py) */
.tal .cell rect { fill: var(--c); }
.tal .cell .t-name, .tal .cell .t-rank { fill: var(--tal-on); }
.tal .hcell rect { fill: var(--c); }
.tal .leg rect { fill: var(--muted); }
.tal .t-ink, .tal .t-name { fill: var(--ink); }
.tal .t-mute, .tal .t-rank { fill: var(--muted); }
.tal .t-on { fill: var(--tal-on); }
.tal .bar { fill: var(--c); }
.tal .trk { fill: var(--border); fill-opacity: .6; }
.tal .dot { fill: var(--c); }
.tal .dot.g-middle { fill-opacity: .6; } .tal .dot.g-quieter { fill-opacity: .4; }
.tal .line { stroke: var(--muted); stroke-width: 2; }
.tal .axis { stroke: var(--border); stroke-width: 1; }
.tal .ring { fill: none; stroke: var(--border); stroke-width: 1; }
.tal .area { fill: var(--muted); fill-opacity: .16; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.tal .lead { stroke: var(--muted); stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 2 3; }
.tal .wave-area { fill: var(--muted); fill-opacity: .12; }
.tal .wdot { stroke: var(--card); stroke-width: 2; }
.tal .chip rect { fill: var(--card); stroke: var(--c); stroke-width: 1.6; }
.tal .chip circle { fill: var(--c); }
.tal .band { fill: var(--ink); }
.tal .band.g-core { fill-opacity: .10; } .tal .band.g-supporting { fill-opacity: .065; } .tal .band.g-middle { fill-opacity: .035; } .tal .band.g-quieter { fill-opacity: .015; }

@media (max-width: 640px) {
  .tal-card, .tal-job { padding: 14px 14px; }
  .tal-tab { padding: 6px 12px; font-size: 13px; }
}
@media print {
  .tal .tal-fig, .tal-card, .tal-job { break-inside: avoid; }
  .tal-panel[hidden] { display: block !important; }
  .tal-tabs, .tal-expand, .tal-jobsearch { display: none !important; }
}
