/* howaiaffectsmyjob.com: a printed worksheet. One sheet of paper on a blue-grey
   desk. Form ink (cobalt) draws the frame; the reader's own marks are pencil
   and one yellow highlighter. */
@font-face { font-family: "Red Hat Display"; src: url("/fonts/red-hat-display-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Red Hat Text"; src: url("/fonts/red-hat-text-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --desk: #dbe3ec;
  --paper: #fdfdfa;
  --tint: #edf1fa;
  --ink: #131c33;
  --ink-2: #39445c;
  --ink-3: #566178;
  --form: #1b3491;
  --form-deep: #12246b;
  --line: rgba(27, 52, 145, 0.2);
  --line-2: rgba(27, 52, 145, 0.45);
  --hl: #ffe24d;
  --pencil: #1d1d22;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Red Hat Display", "Red Hat Text", system-ui, sans-serif;
  --pad: 20px;
}

* { box-sizing: border-box; }
html { background: var(--desk); color-scheme: light; -webkit-text-size-adjust: 100%; scrollbar-color: var(--form) var(--desk); accent-color: var(--form); caret-color: var(--form); }
body { margin: 0; font: 400 17px/1.6 "Red Hat Text", system-ui, sans-serif; color: var(--ink); background: var(--desk); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
[hidden] { display: none !important; }
::selection { background: var(--hl); color: var(--ink); }

a { color: var(--form); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
a:hover { color: var(--form-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--form); outline-offset: 2px; box-shadow: 0 0 0 5px var(--hl); border-radius: 2px; }
legend:focus, .result:focus { outline: none; box-shadow: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 2; }

/* The sheet */
.sheet { max-width: 1216px; margin: 0 auto; padding: 0 var(--pad); background: var(--paper); border-top: 6px solid var(--form); }

/* Masthead: the form's title block. Name, publisher, and the pages as a ruled row. */
.mast { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 16px; padding: 16px 0 0; }
.mast .name { font: 600 20px/1.2 var(--display); color: var(--form); text-decoration: none; }
.mast .name:hover { color: var(--form-deep); }
.by { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.by .ulsa-mark { color: var(--ink); display: block; }
.tabs { grid-column: 1 / -1; display: flex; overflow-x: auto; border-top: 2px solid var(--form); border-bottom: 1px solid var(--line-2); margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scrollbar-width: none; }
.tabs a { flex: none; padding: 12px 14px; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink-2); text-decoration: none; border-right: 1px solid var(--line); }
.tabs a:first-child { border-left: 1px solid var(--line); }
.tabs a:hover { background: var(--tint); color: var(--form-deep); }
.tabs a[aria-current] { order: -1; background: var(--form); color: #fff; }

main { padding: 32px 0 0; }
.solo, .col, .grid > article, .top { max-width: 41rem; }

/* Top of page */
.top { padding: 0 0 8px; }
.grid > .top { padding-bottom: 20px; border-bottom: 1px solid var(--line-2); }
h1 { font: 600 34px/1.08 var(--display); letter-spacing: -0.005em; margin: 0 0 20px; text-wrap: balance; }
.answer { margin: 0 0 12px; font-size: 18px; }
.after { margin: 0 0 12px; color: var(--ink-2); }
.src { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.stamp { margin: 0; font-size: 15px; color: var(--ink-3); }

h2 { font: 600 25px/1.2 var(--display); margin: 0 0 12px; text-wrap: balance; }
h3 { font: 600 19px/1.3 var(--display); margin: 28px 0 8px; }
h4 { font: 600 16px/1.3 "Red Hat Text", sans-serif; margin: 24px 0 8px; color: var(--form-deep); }
p { margin: 0 0 16px; }
small, .small { font-size: 15px; color: var(--ink-3); }
strong { font-weight: 600; }

/* The rail: result map and running totals on quiz pages, contents elsewhere. */
.rail { margin: 16px 0 0; }
.map { margin: 0; border: 1.5px solid var(--form); background: var(--paper); }
.map svg { display: block; width: 100%; height: auto; aspect-ratio: 340 / 282; }
.map figcaption { padding: 10px 12px; border-top: 1px solid var(--line-2); font-size: 14px; line-height: 1.4; color: var(--ink-2); background: var(--tint); }
.ln { fill: none; stroke: var(--form); stroke-width: 1.5; }
.rg { fill: var(--form); stroke: none; }
.rg-reach { fill-opacity: 0; }
.rg-edges { fill-opacity: 0.06; }
.rg-held { fill-opacity: 0.13; }
.rg-open { fill: url(#hatch); }
.ht { stroke: var(--form); stroke-width: 1.6; stroke-opacity: 0.38; }
.lb { font: 600 13.5px/1 var(--display); fill: var(--form-deep); text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.tk { font: 500 11.5px/1 "Red Hat Text", sans-serif; fill: var(--ink-2); text-anchor: middle; }
.tky { text-anchor: end; }
.ax { font: 500 12px/1 "Red Hat Text", sans-serif; fill: var(--ink-2); text-anchor: middle; }
.mark { display: none; transition: transform 420ms var(--ease); }
.mark.on { display: block; }
.mark circle { fill: var(--hl); stroke: var(--pencil); stroke-width: 1.2; }
.mark path { fill: none; stroke: var(--pencil); stroke-width: 2.6; stroke-linecap: round; }

.tally { display: none; }
.tally-h { margin: 0; padding: 7px 12px; background: var(--form); color: #fff; font: 600 15px/1.3 var(--display); }
.tally dl { margin: 0; border: 1.5px solid var(--form); border-top: 0; }
.tally dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.tally dl div:first-child { border-top: 0; }
.tally dt { font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.tally dd { flex: none; margin: 0; min-width: 84px; height: 34px; padding: 0 8px; border: 1px solid var(--line-2); background: var(--paper); font-weight: 600; line-height: 32px; text-align: right; }
.tally dd.set { background: var(--hl); border-color: var(--pencil); }

.toc { display: none; }
.toc p { margin: 0; padding: 7px 12px; background: var(--form); color: #fff; font: 600 15px/1.3 var(--display); }
.toc ul { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--form); border-top: 0; }
.toc li + li { border-top: 1px solid var(--line); }
.toc a { display: block; padding: 9px 12px; font-size: 15px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.toc a:hover { background: var(--tint); color: var(--form-deep); }

/* The question: one line of the worksheet at a time. */
.check { margin: 24px 0 0; }
.card { border: 1.5px solid var(--form); background: var(--paper); }
.prog { display: none; }
.count { margin: 0; font: 600 15px/1.3 var(--display); color: #fff; }
.bar { display: flex; gap: 4px; }
.bar i { width: 12px; height: 12px; border: 1.5px solid rgba(255, 255, 255, 0.75); transition: background-color 150ms var(--ease); }
.bar i.done { background: var(--hl); border-color: var(--hl); }
.bar i.at { border-color: #fff; background: #fff; }

.q { border: 0; padding: 24px 16px 0; margin: 0 0 24px; min-width: 0; }
.q + .q { border-top: 1.5px solid var(--form); }
.q legend { display: block; float: left; width: 100%; padding: 0; font: 600 25px/1.18 var(--display); text-wrap: balance; }
.help { clear: both; margin: 0; padding: 12px 0 16px; color: var(--ink-2); }
.opts { display: grid; border-top: 1px solid var(--line-2); }
.opt { position: relative; display: block; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.o { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 8px; font-weight: 500; line-height: 1.3; transition: background-color 150ms var(--ease); }
.ol { flex: 1; }
.bx { position: relative; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--form); background: var(--paper); }
.bx::before, .bx::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 2.6px; margin: -1.3px 0 0 -13px; border-radius: 2px; background: var(--pencil); opacity: 0; }
.bx::before { transform: rotate(45deg); }
.bx::after { transform: rotate(-45deg); }
.opt:hover .o { background: var(--tint); }
.opt input:checked + .o { background: var(--hl); }
.opt input:checked + .o .bx { border-color: var(--pencil); }
.opt input:checked + .o .bx::before, .opt input:checked + .o .bx::after { opacity: 1; }
.opt input:focus-visible + .o { outline: 3px solid var(--form); outline-offset: -3px; }
.pts { flex: none; font-weight: 400; color: var(--ink-2); }
.from { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); }
.hint { min-height: 24px; margin: 0; padding: 0 16px; font-size: 16px; font-weight: 500; color: var(--form-deep); }

.nav { display: none; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 16px 16px; }
.tb { min-height: 48px; padding: 0 4px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.tb:hover { color: var(--form); }
.tb.fwd { padding: 0 24px; background: var(--form); color: #fff; text-decoration: none; border-radius: 2px; }
.tb.fwd:hover { background: var(--form-deep); color: #fff; }
.tb:disabled { visibility: hidden; }
.fine { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-3); }

/* With JavaScript: one question at a time, running totals in the rail. */
.js .prog { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; background: var(--form); }
.js .nav { display: flex; }
.js .q { margin-bottom: 8px; }
.js .q + .q { border-top: 0; }
.js .pts, .js .byhand, .js .plain, .js .check .tname, .js .check .trule, .js .check .type .tlede { display: none; }

/* Without it: the working, on paper. */
.byhand { margin: 40px 0 0; }
.steps { list-style: none; counter-reset: st; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line-2); }
.steps li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.steps li::before { content: counter(st); font-weight: 600; color: var(--form); }

/* Result */
.result { margin: 40px 0 0; }
.js .check .result { margin-top: 20px; scroll-margin-top: 16px; }
.hl { background: var(--hl); color: var(--ink); padding: 1px 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tname { margin-top: 40px; }
.trule { color: var(--ink-2); font-size: 15px; }
.type h3.tname { font-size: 23px; line-height: 1.45; }
.type { border-top: 2px solid var(--form); margin-top: 32px; }
.type .tname { margin-top: 16px; }
.js .check .type { border-top: 0; margin-top: 0; }
.facts { list-style: none; margin: 0 0 16px; padding: 0; }
.facts li { position: relative; margin-bottom: 12px; padding-left: 24px; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 9px; border: 1.5px solid var(--form); }

/* The filled-in totals sheet. */
.receipt { border: 1.5px solid var(--form); background: var(--paper); padding: 0 16px 8px; }
.band { margin: 0 -16px 16px; padding: 9px 16px; background: var(--form); color: #fff; font: 600 15px/1.3 var(--display); }
.receipt h2 { font-size: 28px; line-height: 1.45; margin: 0 0 12px; }
.receipt .tlede { font-weight: 500; }
.notodds { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.receipt h3 { margin: 20px -16px 4px; padding: 16px 16px 0; border-top: 1.5px solid var(--form); font-size: 17px; color: var(--form-deep); }
.lines { list-style: none; margin: 0 0 12px; padding: 0; }
.lines li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 16px; line-height: 1.35; }
.what { flex: 0 1 auto; max-width: 68%; }
.dots { flex: 1 1 16px; min-width: 12px; border-bottom: 1.5px dotted var(--line-2); }
.amt { flex: none; min-width: 64px; padding: 3px 8px; border: 1px solid var(--line-2); font-weight: 500; text-align: right; white-space: nowrap; }
.lines .sum { margin-top: 4px; font-weight: 600; }
.lines .sum .amt { font-weight: 600; background: var(--hl); border-color: var(--pencil); }
.lines .sum .dots { border-bottom-color: var(--ink); }
.bn { font-size: 16px; color: var(--ink-2); }
.formula { margin: 20px -16px 0; padding: 16px 16px 0; border-top: 1px solid var(--line-2); font-size: 15px; color: var(--ink-3); }
.receipt .nav { display: flex; padding: 0 0 8px; }

/* The one call to action, after the result. */
/* Set as a tear-off slip: perforated along the top edge. */
.next { margin: 48px 0 0; padding: 24px 20px; background: var(--tint); border: 1.5px solid var(--form); border-top: 2px dashed var(--form); }
.next h2 { font-size: 22px; }
.go { margin: 20px 0 12px; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 2px; background: var(--form); color: #fff; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--form-deep); color: #fff; }
.next .small { margin: 0; }
.next + .stamp { margin-top: 16px; }

/* Reading pages: each section opens under a form rule. */
.prose section, .why, .faq { margin-top: 48px; }
.prose section > h2:first-child, section.prose > h2:first-child, .result.open > h2, .check .result > h2.plain { padding-top: 14px; border-top: 2px solid var(--form); }
.prose > .top + section { margin-top: 32px; }
.trace { margin: 0; border-bottom: 1px solid var(--line-2); }
.trace div { padding: 20px 0; border-top: 1px solid var(--line-2); }
.trace dt { font: 600 19px/1.3 var(--display); }
.trace dd { margin: 8px 0 0; }
.trace .from { margin-top: 4px; }

.direct { font-weight: 500; }
.faq h3 { margin-top: 32px; font-size: 21px; }
.bytype .tname { font-size: 21px; line-height: 1.5; }

/* The figures table: a ruled form grid. Scrolls inside its own box on a phone. */
.scroll { overflow-x: auto; margin: 0 calc(var(--pad) * -1) 16px; padding: 0 var(--pad); scrollbar-width: thin; }
.figs { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 16px; line-height: 1.4; border: 1.5px solid var(--form); }
.figs caption { caption-side: bottom; padding-top: 12px; text-align: left; font-size: 14px; color: var(--ink-3); }
.figs th, .figs td { padding: 12px; text-align: left; vertical-align: top; border: 1px solid var(--line-2); }
.figs thead th { background: var(--form); border-color: var(--form); color: #fff; font: 600 15px/1.3 var(--display); }
.figs tbody th { width: 30%; font-size: 15px; font-weight: 500; background: var(--tint); }
.figs td:last-child { width: 32%; font-size: 15px; color: var(--ink-2); }

/* Bottom of the sheet: the other pages as ruled rows, then one line. */
.more { margin-top: 72px; }
.more h2 { margin: 0; padding: 12px 0; border-top: 2px solid var(--form); font: 600 16px/1.3 var(--display); color: var(--form-deep); }
.more ul { list-style: none; margin: 0; padding: 0; }
.more li { padding: 10px 0; border-top: 1px solid var(--line-2); }
.more a { font-weight: 600; }
.more span { display: block; font-size: 15px; color: var(--ink-3); }
.foot { margin-top: 0; padding: 20px 0 32px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--ink-3); }
.foot p { margin: 0; }

@media (min-width: 40rem) {
  :root { --pad: 40px; }
  body { padding: 24px 24px 48px; }
  .sheet { box-shadow: 0 1px 2px rgba(19, 28, 51, 0.12), 0 12px 32px -12px rgba(19, 28, 51, 0.28); }
  .mast .name { font-size: 22px; }
  .tabs a[aria-current] { order: 0; }
  h1 { font-size: 46px; }
  .q { padding: 28px 24px 0; }
  .q legend { font-size: 30px; }
  .nav { padding: 8px 24px 20px; }
  .hint { padding: 0 24px; }
  .js .prog { padding: 9px 24px; }
  .receipt { padding: 0 24px 12px; }
  .band, .receipt h3, .formula { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .next { padding: 28px; }
  .more li { display: grid; grid-template-columns: 18rem 1fr; gap: 16px; align-items: baseline; }
  .rail { max-width: 24rem; }
}

@media (min-width: 68rem) {
  :root { --pad: 56px; }
  main { padding-top: 48px; }
  .grid { display: grid; grid-template-columns: minmax(0, 41rem) minmax(0, 22rem); justify-content: space-between; column-gap: 56px; align-items: start; }
  .grid > .top, .grid > .col, .grid > article { grid-column: 1; }
  .grid > .rail { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; margin: 0; max-width: none; }
  .js .tally { display: block; margin-top: 16px; }
  .toc { display: block; }
  .map + .toc { margin-top: 16px; }
  h1 { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
