/* Trait Report. Swiss / International style: a printed questionnaire, not an app.
   Light only. Black ink on white, greys for structure, Helvetica set large, square corners, black rules.
   Red #e30613 only for alerts (unanswered items, warnings). No dark panels, no green, no pills or badges,
   no uppercase letter-spaced labels, no shadows, no gradients, no rounded cards, no illustrations. */
:root {
  --bg: #ffffff; --ink: #000000; --ink-2: #222222; --muted: #666666; --line: #dddddd; --line-2: #bbbbbb;
  --track: #eeeeee; --alert: #e30613;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.wrap.narrow { margin: 0 auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
code { font-family: var(--mono); font-size: .88em; background: #f2f2f2; padding: 1px 4px; }
[hidden] { display: none !important; }

/* ── header ───────────────────────────────────────────────────────── */
.top { border-bottom: 2px solid var(--ink); background: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 21px; letter-spacing: -.02em; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; }
.nav a { padding: 8px 12px; text-decoration: none; font-size: 16px; }
.nav a:hover { background: var(--ink); color: #fff; }
.nav a[aria-current] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (max-width: 760px) {
  .top-in { padding-top: 10px; padding-bottom: 6px; }
  .nav { width: 100%; margin: 0 -12px; }
  .nav a { padding: 8px 12px; font-size: 15px; }
}

/* ── type ─────────────────────────────────────────────────────────── */
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1; letter-spacing: -.035em; font-weight: 700; margin: 0; }
h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 18px; line-height: 1.3; margin: 22px 0 6px; font-weight: 700; }
p { margin: 0 0 12px; }
.lede { font-size: 20px; line-height: 1.45; color: var(--ink-2); margin: 14px 0 0; max-width: 58ch; }
.page-top { padding: 40px 0 28px; }
.crumb { margin: 24px 0 -20px; font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; margin: 20px 0 0; font-size: 15px; border-top: 1px solid var(--ink); }
.facts span { padding: 8px 16px 0 0; margin-right: 16px; border-right: 1px solid var(--line-2); }
.facts span:last-child { border-right: 0; }
@media (max-width: 560px) { .facts span { border-right: 0; margin-right: 0; padding-right: 18px; } }

/* ── blocks ───────────────────────────────────────────────────────── */
.block { border-top: 2px solid var(--ink); padding: 22px 0 34px; }
.copy section { border-top: 2px solid var(--ink); padding: 22px 0 22px; }
.copy h2 + p, .copy p + p { margin-top: 0; }
.copy ul { padding-left: 20px; margin: 0 0 12px; }
.copy li { margin: 0 0 6px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .cols, .cols-3 { grid-template-columns: 1fr; } }
.rows { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.rows a { font-weight: 700; }
.rows-desc li { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 4px 24px; }
.rows-desc span { color: var(--ink-2); }
@media (max-width: 700px) { .rows-desc li { grid-template-columns: 1fr; } }
.tbl { overflow-x: auto; margin: 0 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
th { border-bottom: 2px solid var(--ink); font-weight: 700; }
.faq h3:first-of-type { margin-top: 4px; }
details.items { border-top: 1px solid var(--line); padding: 10px 0; }
details.items summary { cursor: pointer; font-weight: 700; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; border: 2px solid var(--ink); padding: 16px 20px; margin: 0 0 32px; }
.cta p { margin: 0; }

/* ── buttons ──────────────────────────────────────────────────────── */
.btn { display: inline-block; font: inherit; font-weight: 700; font-size: 17px; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 0; padding: 11px 22px; min-height: 48px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #fff; color: var(--ink); }
.btn-2 { background: #fff; color: var(--ink); }
.btn-2:hover { background: var(--ink); color: #fff; }
.btn:disabled { border-color: var(--line-2); background: #fff; color: var(--line-2); cursor: default; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* ── home ─────────────────────────────────────────────────────────── */
.tests-list { border-top: 2px solid var(--ink); margin-bottom: 40px; }
.test-row { display: grid; grid-template-columns: 1.1fr 2fr auto; grid-template-areas: "name desc go" "name meta go"; gap: 4px 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--ink); text-decoration: none; }
.tr-name { grid-area: name; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.tr-desc { grid-area: desc; color: var(--ink-2); }
.tr-meta { grid-area: meta; font-size: 15px; color: var(--muted); }
.tr-go { grid-area: go; font-weight: 700; border: 2px solid var(--ink); padding: 10px 20px; }
.test-row:hover .tr-go { background: var(--ink); color: #fff; }
.test-row:hover .tr-name { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 760px) {
  .test-row { grid-template-columns: 1fr; grid-template-areas: "name" "desc" "meta" "go"; }
  .tr-name { font-size: 26px; }
  .tr-go { justify-self: start; margin-top: 6px; }
}

/* ── test ─────────────────────────────────────────────────────────── */
.test { border-top: 6px solid var(--ink); margin: 0 0 48px; }
.t-head { display: grid; grid-template-columns: 1fr auto; padding: 12px 0 0; position: sticky; top: 0; background: #fff; z-index: 5; }
.t-count { margin: 0 0 8px; font-weight: 700; }
.t-pageno { margin: 0 0 8px; color: var(--muted); }
.t-progress { grid-column: 1 / -1; height: 4px; background: var(--track); }
.t-bar { height: 4px; width: 0; background: var(--ink); }
.t-restored { margin: 14px 0 0; }
.t-form { max-width: 820px; }
.test:not(.js) .t-head, .test:not(.js) .t-nav, .test:not(.js) .t-keys { display: none; }
.q { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 22px 0 24px; min-width: 0; }
.q legend { display: flex; gap: 14px; padding: 0; font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; float: left; width: 100%; }
.q legend + * { clear: both; }
.qn { flex: none; min-width: 2ch; color: var(--muted); font-weight: 400; }
.opts { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; margin-left: calc(2ch + 14px); border: 2px solid var(--ink); }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; cursor: pointer; text-align: center; border-left: 1px solid var(--line-2); }
.opt:first-child { border-left: 0; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 28px; height: 28px; border: 2px solid var(--ink); background: #fff; }
.ol { font-size: 13px; line-height: 1.25; color: var(--ink-2); }
.opt:hover .box { background: var(--track); }
.opt input:checked + .box { background: var(--ink); outline: 3px solid #fff; outline-offset: -6px; }
.opt input:checked ~ .ol { font-weight: 700; color: var(--ink); }
.opt input:focus-visible + .box { outline: 3px solid var(--ink); outline-offset: 3px; }
.q.miss legend .qt { color: var(--alert); }
.q.miss .opts { border-color: var(--alert); }
@media (max-width: 560px) {
  .q legend { font-size: 19px; }
  .opts { margin-left: 0; }
  .ol { font-size: 11px; }
  .opt:nth-child(2) .ol, .opt:nth-child(4) .ol { visibility: hidden; }
}
.alert { color: var(--alert); font-weight: 700; border-left: 6px solid var(--alert); padding: 6px 0 6px 12px; margin: 20px 0 0; }
.t-nav { display: flex; justify-content: space-between; gap: 12px; padding: 24px 0 8px; max-width: 820px; }
.t-keys { color: var(--muted); font-size: 14px; }
@media (hover: none) { .t-keys { display: none; } }

/* ── results ──────────────────────────────────────────────────────── */
.test.done .t-form, .test.done .t-head, .test.done .t-restored { display: none; }
.result { padding: 28px 0 8px; outline: none; }
.r-head { font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 14px; }
.r-lead { font-size: 19px; max-width: 64ch; }
.r-shared { border-left: 6px solid var(--ink); padding: 4px 0 4px 12px; }
.r-body { border-top: 2px solid var(--ink); margin-top: 22px; }
.r-row { display: grid; grid-template-columns: 260px 1fr 150px; grid-template-areas: "name track num" ". sub sub" ". text text"; gap: 6px 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.r-name { grid-area: name; margin: 0; font-size: 19px; font-weight: 400; }
.r-row.top .r-name { font-weight: 700; }
.r-num { grid-area: num; margin: 0; font-weight: 700; font-size: 19px; text-align: right; }
.r-track { grid-area: track; position: relative; height: 18px; background: var(--track); }
.r-bar { height: 18px; background: var(--ink); }
.r-mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--ink); }
.r-sub { grid-area: sub; margin: 0; color: var(--muted); font-size: 15px; }
.r-text { grid-area: text; margin: 4px 0 0; max-width: 64ch; }
@media (max-width: 760px) {
  .r-row { grid-template-columns: 1fr auto; grid-template-areas: "name num" "track track" "sub sub" "text text"; }
}
.r-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.r-note { color: var(--muted); font-size: 15px; max-width: 70ch; }

/* ── footer ───────────────────────────────────────────────────────── */
.foot { border-top: 6px solid var(--ink); margin-top: 56px; padding: 28px 0 40px; font-size: 15px; }
.foot-in { display: grid; grid-template-columns: repeat(3, 1fr) 2fr; gap: 24px 32px; }
.foot-h { font-weight: 700; margin: 0 0 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 6px; }
.foot-note { color: var(--ink-2); }
@media (max-width: 820px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-wide { grid-column: 1 / -1; } }

/* ── print: results only ──────────────────────────────────────────── */
@media print {
  .top, .foot, .page-top .facts, .cols, .faq, .block, .r-actions, .skip, .t-keys { display: none !important; }
  body { font-size: 12pt; }
  .r-track, .r-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .test { border-top-width: 2px; }
}
