/* mbti-test.me — mobile-first, no framework */
:root {
  --bg: #fbfaff;
  --bg-soft: #f3f0ff;
  --surface: #ffffff;
  --text: #1d1a2e;
  --muted: #5d5873;
  --line: #e6e2f3;
  --brand: #7c5cff;
  --brand-ink: #5b3fe0;
  --brand-soft: #efeaff;
  --ok: #0fa47a;
  --warn: #e0563b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29, 26, 46, .06), 0 8px 28px rgba(29, 26, 46, .07);
  --wrap: 960px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --g-NT: #7c5cff; --g-NF: #0fa47a; --g-SJ: #2f7cf6; --g-SP: #f08a12;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12111a; --bg-soft: #1b1928; --surface: #1c1a29; --text: #f1eff8; --muted: #b0aac6;
    --line: #2e2b40; --brand: #9b83ff; --brand-ink: #b9a8ff; --brand-soft: #262040;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); overflow-x: hidden; }
@media (min-width: 720px) { body { font-size: 17px; } }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; hyphens: auto; }
h1, h2, h3, h4, p, li, dd, dt, summary, a, span, small, strong { overflow-wrap: break-word; }
h1 { font-size: clamp(1.85rem, 6vw, 2.9rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 3.6vw, 1.9rem); margin-top: 1.4em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, .35); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #12111a; } .btn-primary:hover { color: #12111a; } }
.btn-secondary { background: var(--brand-soft); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--brand-ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-xl { min-height: 56px; padding: 0 30px; font-size: 1.1rem; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .92rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.logo b { color: var(--brand); }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); }
.lang { position: relative; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: .85rem; color: var(--muted); min-height: 40px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--brand-soft); }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 170px; }
.lang a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.lang a:hover { background: var(--brand-soft); }
.lang a[aria-current] { font-weight: 700; color: var(--brand-ink); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); width: 44px; height: 44px; border-radius: 12px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .lang { margin-inline-start: auto; position: static; }
  /* anchor the menu to the sticky header so it never runs off-screen */
  .lang ul { inset-inline-end: 16px; top: calc(100% - 2px); }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 14px; }
  .nav a { padding: 13px 12px; font-size: 1.05rem; }
}

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 0; margin: 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-inline-end: 6px; }
[dir="rtl"] .crumbs li + li::before { content: "‹"; }
.crumbs a { color: var(--muted); }

/* hero + quiz */
.hero { scroll-margin-top: 62px; background: radial-gradient(1200px 500px at 85% -10%, #e9e2ff, transparent 60%), radial-gradient(900px 400px at -10% 20%, #dff7ef, transparent 60%); padding: 24px 0 32px; }
@media (prefers-color-scheme: dark) { .hero { background: radial-gradient(1200px 500px at 85% -10%, #2a2150, transparent 60%), radial-gradient(900px 400px at -10% 20%, #12322a, transparent 60%); } }
.hero__inner { max-width: 760px; text-align: center; }
.eyebrow { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.22rem); color: var(--muted); }
.intro__actions { margin: 26px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.resume { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.last-result { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); margin-bottom: 16px; }
.last-result em { color: var(--brand-ink); font-style: normal; font-weight: 600; }
.stats { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; font-size: .82rem; color: var(--muted); }
.stats strong { display: block; font-size: 1.35rem; color: var(--text); }
.note { font-size: .9rem; color: var(--muted); }

.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 14px 16px; text-align: center; max-width: 680px; margin: 0 auto; }
@media (min-width: 720px) { .quiz { padding: 26px 34px 30px; } }
.quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9rem; color: var(--muted); }
.quiz__eta { margin: 0; text-align: end; font-size: .78rem; color: var(--muted); }
.quiz__count { font-weight: 700; color: var(--text); white-space: nowrap; }
.progress { height: 8px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--g-NF), var(--brand)); border-radius: 99px; transition: width .35s ease; }
.question { border: 0; margin: 0; padding: 0; min-width: 0; }
.question__text { display: flex; align-items: center; justify-content: center; min-height: 5.6em; font-size: clamp(1.1rem, 3.6vw, 1.45rem); font-weight: 650; line-height: 1.35; padding: 14px 2px 14px; width: 100%; outline: none; }
.question.swap .question__text { animation: qin .32s ease; }
@keyframes qin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.scale { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 16px); }
.opt { position: relative; display: inline-flex; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt .dot { display: block; border-radius: 50%; border: 3px solid; transition: transform .15s, background .15s; }
.opt-0 .dot, .opt-6 .dot { width: clamp(44px, 11vw, 58px); height: clamp(44px, 11vw, 58px); }
.opt-1 .dot, .opt-5 .dot { width: clamp(38px, 9.5vw, 48px); height: clamp(38px, 9.5vw, 48px); }
.opt-2 .dot, .opt-4 .dot { width: clamp(32px, 8vw, 40px); height: clamp(32px, 8vw, 40px); }
.opt-3 .dot { width: clamp(28px, 7vw, 34px); height: clamp(28px, 7vw, 34px); }
.opt-0 .dot, .opt-1 .dot, .opt-2 .dot { border-color: var(--warn); }
.opt-3 .dot { border-color: #a7a2bb; }
.opt-4 .dot, .opt-5 .dot, .opt-6 .dot { border-color: var(--ok); }
.opt:hover .dot { transform: scale(1.08); }
.opt-0 input:checked + .dot, .opt-1 input:checked + .dot, .opt-2 input:checked + .dot { background: var(--warn); }
.opt-3 input:checked + .dot { background: #a7a2bb; }
.opt-4 input:checked + .dot, .opt-5 input:checked + .dot, .opt-6 input:checked + .dot { background: var(--ok); }
.opt input:focus-visible + .dot { outline: 3px solid var(--brand); outline-offset: 3px; }
.scale__ends { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; margin: 10px 2px 0; }
.scale__ends span:first-child { color: var(--warn); }
.scale__ends span:last-child { color: var(--ok); }
.quiz__toast { min-height: 1.5em; margin: 10px 0 0; font-size: .92rem; font-weight: 650; color: var(--brand-ink); }
.quiz__hint { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
@media (hover: none) { .quiz__hint { display: none; } }
.calculating { padding: 60px 0; }
.spinner { display: inline-block; width: 48px; height: 48px; border: 5px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sections */
.section { padding: 18px 16px; }
.section > h2:first-child { margin-top: 1.2em; }
.steps, .features, .dims, .traits { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .features, .dims, .traits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steps li, .features li, .dims li, .traits li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps { counter-reset: s; }
.steps li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps p, .features p, .traits p { margin: 0; color: var(--muted); }
.dim p { margin: .3em 0; }
.dim__axis { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-ink); }
.dim abbr { text-decoration: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); margin-inline-end: 4px; }

/* types grid */
.group { margin: 26px 0; }
.group__head h2, .group__head h3 { margin: 0 0 4px; }
.group__head span { color: var(--muted); font-weight: 600; font-size: .8em; }
.group__head p { color: var(--muted); margin-bottom: 12px; }
.type-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 860px) { .type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.type-card { display: flex; flex-direction: column; height: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gc); }
.type-card .type-art { width: 56px; height: 56px; margin-bottom: 10px; }
.type-card__code { font-size: 1.3rem; margin: 0; color: var(--gc); letter-spacing: .02em; }
.type-card__name { font-weight: 700; }
.type-card__tag { font-size: .86rem; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.g-NT { --gc: var(--g-NT); } .g-NF { --gc: var(--g-NF); } .g-SJ { --gc: var(--g-SJ); } .g-SP { --gc: var(--g-SP); }

/* faq */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; }
.faq summary { cursor: pointer; padding-block: 16px; padding-inline: 18px 48px; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 18px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq summary h3 { display: inline; font-size: 1.04rem; margin: 0; }
.faq details > div { padding: 0 18px 6px; color: var(--muted); }

/* pages */
.page { padding-top: 10px; padding-bottom: 40px; }
.page-head { max-width: 820px; padding-top: 14px; }
.quick { background: var(--brand-soft); border-inline-start: 5px solid var(--brand); border-radius: 14px; padding: 16px 18px; margin: 18px 0; }
.quick strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--brand-ink); margin-bottom: 4px; }
.quick p { margin: 0; }
.meta-line { font-size: .88rem; color: var(--muted); }
.prose { max-width: 760px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin: .35em 0; }
.legal .prose h2 { font-size: 1.3rem; }
.center { text-align: center; padding: 60px 16px; }
.cta-box { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; margin: 36px 0; padding: 24px; border-radius: 22px; background: linear-gradient(135deg, var(--brand), #4d8bff); color: #fff; }
.cta-box h2 { margin: 0 0 4px; font-size: 1.4rem; }
.cta-box p { margin: 0; opacity: .92; }
.cta-box .btn-primary { background: #fff; color: #3b2bb0; box-shadow: none; }
@media (min-width: 720px) { .cta-box { flex-direction: row; align-items: center; justify-content: space-between; } }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.data caption { caption-side: bottom; text-align: start; padding: 10px 14px; font-size: .82rem; color: var(--muted); }
table.data th, table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.data thead th { background: var(--bg-soft); font-size: .85rem; }
.bar-cell { display: inline-block; width: 70px; height: 8px; background: var(--bg-soft); border-radius: 9px; margin-inline-end: 8px; vertical-align: middle; overflow: hidden; }
.bar-cell span { display: block; height: 100%; background: var(--brand); }

/* type page */
.type-hero { background: linear-gradient(160deg, color-mix(in srgb, var(--gc) 16%, var(--bg)), var(--bg)); padding: 14px 0 16px; }
.type-hero__inner { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.type-hero__inner > div { display: contents; }
.type-hero .type-art { grid-row: 1 / 3; width: 64px; height: 64px; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--gc) 35%, transparent)); }
.type-hero .eyebrow { justify-self: start; margin: 0; font-size: .72rem; padding: 4px 10px; }
.type-hero h1 { font-size: clamp(1.6rem, 6.5vw, 2.6rem); margin: 0; }
.type-hero .lead, .type-hero .meta-line { grid-column: 1 / -1; margin: 6px 0 0; }
.type-hero .lead { font-size: 1rem; }
.type-hero .eyebrow { color: var(--gc); background: color-mix(in srgb, var(--gc) 13%, transparent); }
@media (min-width: 720px) { .type-hero { padding: 24px 0 26px; } .type-hero__inner { grid-template-columns: 120px minmax(0, 1fr); gap: 6px 26px; } .type-hero .type-art { width: 120px; height: 120px; grid-row: 1 / 5; } .type-hero .lead, .type-hero .meta-line { grid-column: 2; } .type-hero .lead { font-size: 1.12rem; } }
.type-layout { display: grid; gap: 26px; }
.type-side { order: -1; min-width: 0; }
.type-main { min-width: 0; }
@media (min-width: 980px) { .type-layout { grid-template-columns: minmax(0, 1fr) 260px; } .type-side { position: sticky; top: 80px; align-self: start; order: 2; max-height: calc(100vh - 96px); overflow-y: auto; } }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; }
.facts h2 { font-size: 1.05rem; margin: 0 0 8px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; font-size: .92rem; }
.facts dl > div { min-width: 0; }
.facts dl > div:first-child { grid-column: 1 / -1; }
@media (min-width: 980px) { .facts dl { grid-template-columns: 1fr; } }
.facts dt { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; font-weight: 600; }
.facts abbr { text-decoration: none; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 12px; }
.toc h2 { font-size: 1.05rem; margin: 0; display: inline; }
.toc h2 span { color: var(--muted); font-weight: 600; }
.toc summary { cursor: pointer; list-style: none; position: relative; padding-inline-end: 28px; min-height: 28px; display: flex; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "▾"; position: absolute; inset-inline-end: 2px; top: 50%; transform: translateY(-50%); color: var(--brand); transition: transform .15s; }
.toc details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.toc details[open] ol { margin-top: 10px; }
.toc ol { margin: 0; padding-inline-start: 1.2em; font-size: .93rem; }
.toc li { margin: 4px 0; }
.toc--inline { max-width: 760px; }
.type-main h2 { scroll-margin-top: 80px; }
.type-main section, .prose section { scroll-margin-top: 80px; }
.traits li h3 { color: var(--gc, var(--brand-ink)); margin-bottom: 4px; }
.sw { display: grid; gap: 14px; margin-top: 26px; }
@media (min-width: 720px) { .sw { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.sw__col { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.sw__col ul { margin: 0; padding-inline-start: 1.2em; }
.sw__plus h3 { color: var(--ok); } .sw__minus h3 { color: var(--warn); }
.stack { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.stack li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stack h3 { font-size: 1.02rem; margin: 0 0 2px; } .stack small { color: var(--muted); font-weight: 600; }
.stack p { margin: 0; color: var(--muted); font-size: .95rem; }
.fn-badge { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--gc, var(--brand)); color: #fff; font-weight: 800; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { background: color-mix(in srgb, var(--gc, var(--brand)) 12%, var(--surface)); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .94rem; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-inline-start: 30px; margin: 8px 0; }
.check-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .78rem; display: grid; place-items: center; margin-top: .2em; }
.matches { list-style: none; padding: 0; display: grid; gap: 10px; }
@media (min-width: 600px) { .matches { grid-template-columns: repeat(3, 1fr); } }
.match { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); }
.match:hover { border-color: var(--gc); }
.match .type-art { width: 44px; height: 44px; flex: none; }
.match strong { display: block; color: var(--gc); }
.others { padding-bottom: 30px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: inherit; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--gc, var(--text)); font-weight: 700; text-decoration: none; }
.chip:hover { border-color: var(--gc, var(--brand)); }

/* compatibility */
.checker { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); max-width: 820px; }
.checker__form { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px 8px; align-items: end; }
.checker__form .btn { grid-column: 1 / -1; }
@media (min-width: 720px) { .checker__form { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; } .checker__form .btn { grid-column: auto; } }
.checker label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.checker select { font: inherit; font-size: .95rem; padding: 10px 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); min-height: 46px; width: 100%; min-width: 0; }
.checker__plus { text-align: center; font-size: 1.4rem; color: var(--muted); padding-bottom: 10px; }
.checker__out { display: block; }
.compat-score { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin: 22px 0 8px; }
@media (min-width: 600px) { .compat-score { flex-direction: row; text-align: start; } }
.ring { --p: 0; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--bg-soft) 0); }
.ring span { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: var(--surface); font-weight: 800; font-size: 1.35rem; }
.compat-dims { list-style: none; padding: 0; display: grid; gap: 10px; }
.compat-dims li { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.compat-dims b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.best-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.best-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.best-list .mini { margin-inline-start: auto; font-size: .85rem; }

/* guides */
.guide-grid { list-style: none; padding: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
.guide-card { display: block; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.guide-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.guide-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.guide-card p { color: var(--muted); }
.guide-card span { color: var(--brand-ink); font-weight: 700; }
.guide .prose h2 { scroll-margin-top: 80px; }
.prose dl dt { font-weight: 700; margin-top: .8em; }
.prose dl dd { margin: .2em 0 0; color: var(--muted); }

/* result: compact card — one column on phones, two columns on larger screens */
.result { padding: 14px 12px 40px; max-width: 980px; }
.result__card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 18px 16px 20px; display: grid; gap: 0 32px; grid-template-areas: "intro" "body" "actions"; }
.r-intro { grid-area: intro; text-align: center; min-width: 0; }
.r-body { grid-area: body; min-width: 0; }
.r-actions { grid-area: actions; text-align: center; min-width: 0; }
@media (min-width: 860px) {
  .result { padding-top: 22px; }
  .result__card { grid-template-columns: 290px minmax(0, 1fr); grid-template-areas: "intro body" "actions body"; align-items: start; padding: 26px 30px; }
  .r-intro { padding-top: 6px; }
  .r-actions { align-self: end; }
  .r-body h2:first-child { margin-top: 0; }
}
.result .eyebrow { margin-bottom: 10px; font-size: .74rem; }
.result__art .type-art { width: 76px; height: 76px; margin: 0 auto; }
@media (min-width: 860px) { .result__art .type-art { width: 92px; height: 92px; } }
.result__type { font-size: clamp(2.4rem, 11vw, 3.2rem); margin: 6px 0 2px; color: var(--gc, var(--brand)); }
.result__type small { display: block; font-size: 1.15rem; color: var(--text); letter-spacing: 0; margin-top: 2px; }
.result__tag { color: var(--muted); font-size: .98rem; margin-bottom: 10px; }
.result__close { background: #fff6e5; color: #7a4a00; padding: 9px 12px; border-radius: 12px; font-size: .9rem; text-align: start; }
@media (prefers-color-scheme: dark) { .result__close { background: #3a2b10; color: #ffd591; } }
.result h2 { font-size: 1.05rem; margin: 1.1em 0 .6em; }
.result__quick { font-size: .95rem; color: var(--muted); margin: 14px 0 0; }
.axes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.axis__labels { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; font-weight: 600; }
.axis__labels .on { color: var(--gc, var(--brand)); font-weight: 800; }
.axis__track { position: relative; height: 10px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; margin-top: 5px; }
.axis__fill { position: absolute; top: 0; bottom: 0; background: var(--gc, var(--brand)); border-radius: 99px; transition: width .8s ease; }
.result .check-list { margin: 0; }
.result .check-list li { margin: 6px 0; font-size: .95rem; }
.btn-block { display: flex; width: 100%; margin-top: 16px; text-align: center; }
.result__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.result__actions .btn { flex: 1 1 150px; min-height: 42px; padding: 6px 14px; font-size: .92rem; line-height: 1.2; }
@media (min-width: 860px) { .result__actions .btn { flex-basis: 100%; } }
.share-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.share { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: .84rem; font-weight: 700; text-decoration: none; color: #fff; border: 0; cursor: pointer; }
.share--wa { background: #1fa855; } .share--x { background: #111; } .share--fb { background: #1877f2; } .share--tg { background: #229ed9; } .share--copy { background: var(--brand-soft); color: var(--brand-ink); }
.result__more { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.result__empty { text-align: center; padding: 40px 0; }

/* lang banner */
.lang-banner { display: flex; align-items: center; gap: 10px; justify-content: center; background: var(--text); color: var(--bg); padding: 6px 12px 6px 16px; font-size: .9rem; text-align: center; }
.lang-banner a { color: var(--bg); font-weight: 800; margin-inline-start: 4px; }
.lang-banner button { background: none; border: 0; color: var(--bg); font-size: 1.2rem; cursor: pointer; width: 32px; height: 32px; flex: none; }

/* footer */
.site-footer { margin-top: 40px; background: var(--bg-soft); border-top: 1px solid var(--line); padding: 36px 0 20px; font-size: .94rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr .8fr; } }
.footer-brand p { color: var(--muted); margin-top: 10px; max-width: 34ch; }
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--brand-ink); text-decoration: underline; }
.type-links { display: grid; grid-template-columns: repeat(4, auto); gap: 0 14px; justify-content: start; }
.footer-legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* content images */
.fig { margin: 18px 0 22px; }
.fig img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: #fbfaff; }
.fig figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); text-align: center; }
.fig--home { max-width: 300px; margin: 22px auto 6px; }
.fig--home img { border-radius: 22px; box-shadow: var(--shadow); border: 0; }
.fig a { display: block; }
img.type-art { display: block; border-radius: 22%; }
.logo__img { display: block; flex: none; }

/* right-to-left languages */
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .eyebrow, [dir="rtl"] .dim__axis, [dir="rtl"] .quick strong { letter-spacing: 0; }

/* language menu with many languages */
.lang ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: min(340px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.lang a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .94rem; }
