/* AI Emergence Snapshot. TPT brand: white page, black copy, horizontal lines, orange accent. */
:root {
  --bg: #ffffff;
  --surface: #faf8f5;
  --ink: #000000;
  --muted: #5c5c5c;
  --line: #d9d5cf;
  --accent: #ff9902;       /* TPT orange: fills and rules only, never text on white */
  --accent-ink: #000000;   /* text sitting on the accent */
  --track: #ece8e2;
  --focus: #0b57d0;
  --error: #b3261e;
  --logo-filter: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --surface: #1c1c1c;
    --ink: #f2f2f2;
    --muted: #b5b5b5;
    --line: #3a3a3a;
    --track: #2c2c2c;
    --focus: #8ab4f8;
    --error: #f2b8b5;
    --logo-filter: invert(1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1c1c1c; --ink: #f2f2f2; --muted: #b5b5b5; --line: #3a3a3a;
  --track: #2c2c2c; --focus: #8ab4f8; --error: #f2b8b5; --logo-filter: invert(1); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 Raleway, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 720px; margin: 0 auto; padding: 0 16px 64px; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }

.site-header { max-width: 720px; margin: 0 auto; padding: 20px 16px 8px; }
.logo, .print-logo { filter: var(--logo-filter); height: auto; }
.logo { width: 120px; }
.print-logo { display: none; }

/* Headline: Oswald, uppercase, wide tracking, accent line below at ~60% width */
.headline {
  font: 400 clamp(26px, 6vw, 38px)/1.2 Oswald, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 28px 0 22px;
  display: inline-block;
}
.headline::after {
  content: "";
  display: block;
  width: 60%;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
}
.headline:focus { outline: none; }
h2 {
  font: 500 15px/1.3 Oswald, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
}
.lede { font-size: 18px; margin: 0 0 20px; }
.meta, .step { color: var(--muted); font-size: 15px; }
.step { font: 400 14px/1 Oswald, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; margin: 22px 0 0; }
.notice { background: var(--surface); padding: 16px; border-left: 4px solid var(--accent); margin-top: 24px; }
.error { color: var(--error); font-weight: 600; }

ul.dots { padding-left: 1.2em; margin: 0 0 16px; }
ul.dots li { margin-bottom: 8px; }
ul.dots li::marker { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px;
  font: 500 15px/1 Oswald, sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: transparent;
  border: 2px solid var(--ink); border-radius: 0; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(0.95); }
.nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 28px; }
.results-actions { justify-content: flex-start; }

/* Form fields */
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field em { font-weight: 400; font-style: normal; color: var(--muted); }
input:not([type=radio]):not([type=checkbox]), select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--muted); border-radius: 0;
}
.check { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 18px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.small-print { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.small-print summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Progress */
.progress { height: 4px; background: var(--track); margin-top: 20px; }
.progress-fill { height: 100%; background: var(--accent); transition: width .3s; }

/* Questions */
.question { border: 0; border-top: 1px solid var(--line); padding: 22px 0 8px; margin: 0; min-width: 0; }
.question > legend { font-weight: 700; font-size: 18px; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.question > legend:focus { outline: none; }
.question > legend + * { clear: both; }
.qnum { color: var(--muted); font-weight: 600; margin-right: 4px; }
.hint { color: var(--muted); font-size: 15px; margin: 0 0 10px; clear: both; }
.options { display: grid; gap: 8px; clear: both; }
.option {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1.5px solid var(--line); cursor: pointer; background: var(--bg);
}
.option input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.option:has(input:checked) { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option.aside { border-style: dashed; color: var(--muted); }
.option.aside:has(input:checked) { color: var(--ink); }

.evidence { margin: 12px 0 8px; padding: 12px 14px; background: var(--surface); border-left: 4px solid var(--accent); }
.evidence fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.evidence legend { font-weight: 600; padding: 0; }
.evidence .hint { margin: 4px 0 10px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1.5px solid var(--line); cursor: pointer; background: var(--bg); min-height: 44px; }
.pill input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.pill:has(input:checked) { border-color: var(--ink); }
.pill:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Results */
.result-head .headline { margin-top: 8px; }
.result-head .meta { margin: 0 0 8px; }
.score-card { background: var(--surface); padding: 20px; border-top: 4px solid var(--accent); margin: 8px 0 28px; }
.score-card p { margin: 0 0 8px; }
.score { font-size: 20px; }
.score-num { font: 400 clamp(30px, 8vw, 44px)/1.1 Oswald, sans-serif; letter-spacing: 0.04em; }
.stage { font-size: 19px; }
.cap { border-left: 4px solid var(--accent); padding-left: 12px; margin-top: 12px !important; }

.block { margin: 0 0 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.two-up { display: grid; gap: 0 28px; }
@media (min-width: 640px) { .two-up { grid-template-columns: 1fr 1fr; } }

.bars { list-style: none; padding: 0; margin: 0 0 12px; }
.bar-row { display: grid; grid-template-columns: 1fr; gap: 4px 12px; margin-bottom: 14px; align-items: center; }
@media (min-width: 560px) { .bar-row { grid-template-columns: 11.5em 1fr 9.5em; margin-bottom: 10px; } }
.bar-name { font-weight: 600; }
.bar-track { height: 14px; background: var(--track); position: relative; display: block; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.bar-band { font-size: 15px; }
.flag { display: inline-block; color: var(--muted); font-size: 13px; }
.flag-note { font-size: 15px; background: var(--surface); padding: 10px 12px; }
.blocks-title { font: 500 13px/1 Oswald, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.blocks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.blocks strong { color: var(--ink); font-weight: 600; }

.ptae { border-bottom: 1px solid var(--line); }
.ptae summary { cursor: pointer; padding: 12px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.ptae p { margin: 0 0 14px; }
.band-tag { font-weight: 400; color: var(--muted); white-space: nowrap; margin-left: auto; }
.ptae summary { list-style: none; }
.ptae summary::-webkit-details-marker { display: none; }
.ptae summary::after { content: "+"; font: 400 20px/1 Oswald, sans-serif; width: 1em; text-align: center; color: var(--ink); }
.ptae[open] summary::after { content: "\2212"; }
.bcount { display: none; }

.result-foot { border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 15px; }
.result-foot p { margin: 0 0 8px; }

/* v2 additions */
.evidence .field { margin-bottom: 6px; }
.evidence .field > span:first-child { font-weight: 600; }
.evidence .hint { display: block; margin: 2px 0 8px; font-weight: 400; }
.evidence .meta { margin: 0; font-size: 14px; }
.warn { border-left: 4px solid var(--error); padding-left: 12px; margin-top: 12px !important; }
.notes p { background: var(--surface); padding: 10px 12px; margin: 0 0 8px; }
.resume-box { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
#resume-form { margin-top: 12px; }
.bar-band .flag { display: block; }
@media (min-width: 560px) { .bar-row { grid-template-columns: 13em 1fr 11em; } }
