/* TraitTests — "a deck of trait cards": cool paper, one indigo primary, teal marker. */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #5b6577;
  --line: #e2e8f0;
  --soft: #eef2f7;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #14b8a6;
  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.06);
  --shadow-2: 0 8px 24px rgba(0,0,0,.08);
  --head: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--primary-dark); }
a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 16px; letter-spacing: -.01em; }
h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; z-index: 10; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font: 700 22px/1 var(--head); }
.brand svg { width: 32px; height: 32px; flex: none; }
.top-nav { display: flex; gap: 24px; }
.top-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px; }
.top-nav a:hover { color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: var(--radius); border: 2px solid var(--primary); background: var(--primary); color: #fff; font: 600 16px/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary-dark); }
.btn-ghost:hover { background: var(--soft); color: var(--primary-dark); }
.btn-big { min-height: 56px; padding: 16px 32px; font-size: 18px; }
.linkbtn { background: none; border: 0; padding: 8px 0; color: var(--primary-dark); font: 600 16px/1.4 var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { color: var(--muted); opacity: .5; cursor: default; text-decoration: none; }

/* home */
.hero { padding-top: 48px; padding-bottom: 24px; }
.hero h1 { max-width: 18ch; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 62ch; }
.deck { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; padding-bottom: 48px; }
.tcard { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 24px 32px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); }
.tcard::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 6px; border-radius: 0 6px 6px 0; background: var(--hue, var(--primary)); }
.tcard:hover { box-shadow: var(--shadow-2); color: var(--text); }
.tcard h2, .tcard h3 { font-size: 22px; margin: 0; }
.tcard p { color: var(--muted); font-size: 16px; margin: 0; }
.tcard .meta { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: auto; padding-top: 8px; }
.tcard .go { font-weight: 600; color: var(--primary-dark); }
.tcard.feature { grid-row: span 2; justify-content: flex-start; padding: 32px 32px 32px 40px; }
.tcard.feature h2 { font-size: 28px; }
.tcard .chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tcard .chips li { background: var(--soft); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; color: var(--primary-dark); }
.tcard .spectrum { height: 10px; border-radius: 5px; background: var(--soft); position: relative; margin: 16px 0 8px; }
.tcard .spectrum i { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-1); }

.band { padding-top: 48px; padding-bottom: 48px; }
.band-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 16px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
.steps li::before { content: counter(s); width: 48px; height: 48px; border-radius: 50%; background: var(--soft); color: var(--primary-dark); font: 700 22px/48px var(--head); text-align: center; }
.steps strong { display: block; }

/* prose */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 32px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 16px; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--soft); font-weight: 600; }
.prose blockquote { margin: 0 0 16px; padding: 16px 24px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.prose :target { scroll-margin-top: 24px; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 24px; }

/* test page */
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); padding-top: 24px; }
.crumbs a { color: var(--muted); }
.test-top { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; padding-top: 16px; padding-bottom: 48px; }
.test-intro h1 { font-size: 44px; }
.lede { font-size: 18px; color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.test-body { padding-bottom: 64px; }

/* quiz box */
.quiz { --hue: var(--primary); position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 32px; min-height: 420px; scroll-margin-top: 16px; border-top: 6px solid var(--hue); }
.q-kicker { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.q-start-title { font: 700 28px/1.2 var(--head); margin: 0 0 12px; }
.q-start-text { color: var(--muted); }
.q-resume { font-size: 16px; color: var(--muted); margin-top: 16px; }
.q-note { font-size: 14px; color: var(--muted); margin: 24px 0 0; }
.q-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.q-count { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.q-bar { flex: 1; height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.q-bar span { display: block; height: 100%; background: var(--hue); border-radius: 4px; transition: width .2s; }
.q-ask { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.q-text { font: 700 28px/1.25 var(--head); margin: 0 0 24px; min-height: 2.5em; outline: none; }
.q-opts { display: grid; gap: 8px; }
.q-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); font: 600 16px/1.3 var(--body); text-align: left; cursor: pointer; }
.q-opt:hover { border-color: var(--hue); background: var(--soft); }
.q-opt[aria-pressed="true"] { border-color: var(--hue); background: var(--soft); }
.q-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.q-opt[aria-pressed="true"] .q-dot { border-color: var(--hue); background: var(--hue); box-shadow: inset 0 0 0 3px #fff; }
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.q-hint { font-size: 14px; color: var(--muted); }

/* result */
.r-shared { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; background: var(--soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; font-size: 16px; }
.r-title { font-size: 36px; margin: 0 0 8px; outline: none; }
.r-sub { font-weight: 600; color: var(--hue); margin: 0 0 16px; }
.r-text { font-size: 17px; }
.r-rows { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 24px; }
.r-row-top { display: flex; justify-content: space-between; gap: 16px; }
.r-val { font-weight: 600; color: var(--muted); font-size: 16px; }
.r-track { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.r-track span { display: block; height: 100%; background: var(--hue); border-radius: 6px; }
.r-ends { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.r-row-text { font-size: 16px; color: var(--text); margin: 8px 0 0; }
.r-more { display: inline-block; font-weight: 600; margin-bottom: 24px; }
.r-map { max-width: 280px; margin: 8px 0 16px; }
.r-map .m-off { fill: var(--soft); }
.r-map .m-on { fill: var(--hue); }
.r-map .m-lab { font: 600 14px var(--body); fill: var(--muted); }
.r-map rect.m-on + .m-lab { fill: #fff; }
.r-map .m-dot { fill: var(--accent); stroke: #fff; stroke-width: 4; }
.r-map-leg { font-size: 14px; color: var(--muted); margin: 4px 0 0; white-space: pre; }
.r-card { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; background: var(--bg); border-radius: var(--radius); padding: 16px; }
.r-card img { display: block; width: 200px; height: auto; border-radius: 8px; box-shadow: var(--shadow-1); background: var(--card); aspect-ratio: 4 / 5; }
.r-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.r-msg { font-size: 14px; color: var(--muted); width: 100%; }

/* faq + more */
.faq { max-width: 70ch; margin-top: 48px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 16px 24px; font-weight: 600; }
.faq details p { padding: 0 24px 16px; margin: 0; }
.more { margin-top: 64px; }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.more-card { --hue: var(--primary); display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--hue); border-radius: var(--radius); padding: 16px 24px; color: var(--text); text-decoration: none; }
.more-card:hover { box-shadow: var(--shadow-2); color: var(--text); }
.more-card span { color: var(--muted); font-size: 16px; }

/* plain pages */
.page { padding: 32px 24px 64px; }
.contact-box { max-width: 70ch; min-width: 0; display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 32px; }
.field { display: grid; gap: 4px; min-width: 0; font-weight: 600; font-size: 16px; }
.field input, .field select, .field textarea { width: 100%; max-width: 100%; min-width: 0; font: 400 16px/1.5 var(--body); padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text); }
.form-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { color: var(--muted); font-size: 16px; }

/* footer */
.foot { background: var(--text); color: #cbd5e1; padding: 48px 0 24px; margin-top: 0; }
.foot a { color: #e2e8f0; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .brand { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-about p { font-size: 16px; margin-top: 16px; max-width: 46ch; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.foot-col h2 { font: 600 14px/1.4 var(--body); text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin: 0 0 4px; }
.foot-base { border-top: 1px solid #334155; margin-top: 32px; padding-top: 16px; font-size: 14px; color: #94a3b8; }
.foot-base p { margin: 0; }

@media (max-width: 900px) {
  .test-top, .split { grid-template-columns: 1fr; gap: 24px; }
  .deck { grid-template-columns: 1fr 1fr; }
  .tcard.feature { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  h1, .test-intro h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .hero { padding-top: 32px; padding-bottom: 16px; }
  .top-nav { gap: 16px; }
  .top-nav a:nth-child(n+2) { display: none; }
  .deck, .more-grid, .foot-grid { grid-template-columns: 1fr; }
  .quiz { padding: 24px 16px; min-height: 0; }
  .q-text { font-size: 22px; }
  .q-hint { display: none; }
  .r-title { font-size: 28px; }
  .r-card { grid-template-columns: 1fr; }
  .r-card img { width: 100%; max-width: 320px; margin: 0 auto; }
  .r-acts .btn { flex: 1 1 100%; }
  .btn-big { width: 100%; }
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 8px; }
}
