/* jobsthatwillbereplacedbyai.com: a statistical almanac.
   Two-colour printing on almanac paper: black ink and one rubric red.
   Fraunces for the masthead and openers, Literata for reading,
   Libre Franklin (the gothic of almanac tables) for data and labels. */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/fonts/libre-franklin-latin-wght-normal.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --paper: #f4ecdc;
  --paper-2: #ebe1cb;
  --ink: #1b1814;
  --ink-2: #473f35;
  --ink-3: #695f52;
  --red: #a4241a;
  --rule: rgba(27, 24, 20, 0.16);
  --rule-2: rgba(27, 24, 20, 0.55);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", "Franklin Gothic Medium", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-3) var(--paper-2); accent-color: var(--red); caret-color: var(--red); }
body { margin: 0; font: 400 17px/1.6 var(--serif); color: var(--ink); background: var(--paper); border-top: 6px solid var(--red); overflow-wrap: break-word; }
::selection { background: var(--red); color: var(--paper); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 140ms var(--ease); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.n, table, .tools, .strip { font-variant-numeric: tabular-nums lining-nums; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 41rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 10; font-family: var(--sans); }
.skip:focus { left: 8px; top: 8px; }

/* Masthead: the title over a thick and thin rule, the contents line under it */
.mast .wrap { padding-top: 20px; }
.mast a { text-decoration: none; }
.mast-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding-bottom: 12px; border-bottom: 4px solid var(--ink); }
.mast .name { font: 600 clamp(26px, 4.6vw, 54px)/1.05 var(--display); letter-spacing: -0.015em; color: var(--ink); }
.mast .name:hover { color: var(--red); }
.mast .by { display: inline-flex; align-items: center; gap: 7px; font: 500 14px/20px var(--sans); color: var(--ink-2); }
.mast .by:hover { color: var(--red); }
.mast .by svg { display: block; }
.mast nav { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 3px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font: 500 15px/20px var(--sans); }
.mast nav a { color: var(--ink-2); padding: 10px 0 9px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.mast nav a:hover { color: var(--red); }
.mast nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }

/* Page head */
.top { padding: 40px 0 8px; }
h1 { font: 500 clamp(26px, 2.9vw, 38px)/1.15 var(--display); letter-spacing: -0.012em; max-width: 24em; text-wrap: balance; }
.stamp { margin-top: 14px; font: 400 14px/20px var(--sans); color: var(--ink-3); }
.opening { margin-top: 24px; }
.lead { font-size: 18px; line-height: 1.58; }
.lead p + p, .prose + .prose, .prose p + p { margin-top: 14px; }
.notice { margin-top: 28px; padding-top: 12px; border-top: 4px solid var(--ink); max-width: 41rem; font: 400 14.5px/22px var(--sans); }
.notice h2 { font: 600 19px/1.25 var(--display); margin: 0 0 8px; padding: 0; border: 0; }
.notice h2::before { content: none; }
.notice p { color: var(--ink-2); }
.notice p + p { margin-top: 8px; }
.jump { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 0 24px; font: 500 14px/20px var(--sans); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.jump a { padding: 10px 0; text-decoration: none; }
.jump a::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-right: 1.5px solid var(--red); border-bottom: 1.5px solid var(--red); transform: translateY(-3px) rotate(45deg); }

/* Section openers: thick and thin rule, as over a table in a printed almanac */
section { padding-top: 56px; }
h2 { position: relative; font: 500 clamp(23px, 2.2vw, 29px)/1.2 var(--display); letter-spacing: -0.008em; margin-bottom: 16px; padding-top: 16px; border-top: 4px solid var(--ink); text-wrap: balance; }
h2::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--ink); }
h3 { font: 600 18px/1.35 var(--display); }
section > .prose + .tw, section > .tw + .prose { margin-top: 24px; }
.answer { font-size: 18px; }

sup.k { font: 500 11px/0 var(--sans); margin-left: 2px; }
sup.k a { color: var(--red); text-decoration: none; padding: 0 1px; }
sup.k a:hover { text-decoration: underline; }

/* Lists and definitions */
.plain { max-width: 41rem; }
.plain li { padding: 10px 0 10px 20px; border-top: 1px solid var(--rule); position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: 21px; width: 8px; height: 2px; background: var(--red); }
.plain li:last-child { border-bottom: 1px solid var(--rule); }
.defs { max-width: 64rem; border-bottom: 1px solid var(--rule); }
.defs > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 14px 0; border-top: 1px solid var(--rule); }
.defs dt { font: 600 15px/24px var(--sans); }
.defs dd { color: var(--ink-2); max-width: 41rem; }
.faq { max-width: 41rem; border-bottom: 1px solid var(--rule); }
.faq > div { padding: 16px 0; border-top: 1px solid var(--rule); }
.faq p { margin-top: 6px; color: var(--ink-2); }

/* Figure 1: the strip */
.strip { --d: 8px; --step: 10px; --rows: var(--rn); margin-top: 32px; padding: 16px 12px 12px; border: 1px solid var(--ink); background: var(--paper-2); font: 400 13px/18px var(--sans); }
.axis-t { font: 600 18px/1.3 var(--display); }
.field { position: relative; height: calc(var(--rows) * var(--step) + 52px); margin-top: 8px; border-bottom: 1px solid var(--ink); }
.m { display: block; width: var(--d); height: var(--d); border-radius: 50%; }
.field .m { position: absolute; left: calc(var(--x) * 1%); bottom: calc(var(--ln) * var(--step) + 1px); margin-left: calc(var(--d) / -2); }
.m.shrink { background: var(--red); }
.m.grow { background: var(--ink); }
.m.flat { background: var(--paper); border: 2px solid var(--ink); }
.m.none { border: 1px solid var(--ink-3); }
.m.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.m.grow.on, .m.flat.on, .m.none.on { outline-color: var(--red); }
.zeroline { position: absolute; left: calc(var(--x) * 1%); top: 44px; bottom: 0; border-left: 1px dashed var(--rule-2); }
.call { position: absolute; top: 0; bottom: calc(var(--d) + 4px); color: var(--ink-2); white-space: nowrap; line-height: 16px; }
.call b { font-weight: 600; color: var(--ink); }
.call.l { left: calc(var(--x) * 1%); padding-left: 6px; border-left: 1px solid var(--rule-2); }
.call.r { right: calc(100% - var(--x) * 1%); padding: 20px 6px 0 0; border-right: 1px solid var(--rule-2); text-align: right; }
.axis { position: relative; height: 26px; color: var(--ink-2); }
.tick { position: absolute; left: calc(var(--x) * 1%); top: 0; padding-top: 7px; transform: translateX(-50%); font-size: 12px; }
.tick::before { content: ""; position: absolute; left: 50%; top: 0; height: 5px; border-left: 1px solid var(--ink); }
.tick.alt { display: none; }
.tick.zero { font-weight: 600; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .m { --d: 10px; flex: none; }
.legend .n, .tray .n { font-weight: 600; color: var(--ink); margin-left: 2px; }
.tray { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule-2); color: var(--ink-2); display: grid; gap: 10px 32px; }
.tray-t { font-weight: 600; color: var(--ink); }
.pile { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.readout { min-height: 18px; margin-top: 2px; color: var(--ink-3); }
.readout b { font-weight: 600; color: var(--ink); margin-right: 6px; }
.strip figcaption { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink-2); }

/* Tables: shared */
.tw { max-width: 100%; }
tr[hidden] { display: none !important; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 14px/20px var(--sans); }
caption { caption-side: top; text-align: left; font: 400 14px/20px var(--sans); color: var(--ink-2); padding: 0 0 10px; max-width: 64rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 8px 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
thead th { font-size: 13px; font-weight: 600; color: var(--ink); vertical-align: bottom; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper); padding-top: 8px; }
tbody th { font-weight: 600; }
tbody tr:hover > * { background: var(--paper-2); }
tfoot th, tfoot td { font-weight: 600; border-bottom: 1px solid var(--ink); border-top: 1px solid var(--ink); }
td.n, th.n { text-align: right; white-space: nowrap; }
.na { color: var(--ink-3); }
.xt { max-width: 46rem; }
.ft td { color: var(--ink-2); }
.ft.figs td:first-of-type, .ft.xt td { color: var(--ink); }
.ft.figs td:first-of-type { font-weight: 500; }

/* Toolbar */
.tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; padding: 4px 0 16px; font: 400 14px/20px var(--sans); }
.tools[hidden], .empty[hidden] { display: none; }
.tools label { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.tools fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.tools legend { padding: 0 0 4px; color: var(--ink-2); float: left; width: 100%; }
.tools input, .tools select, .tools button { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-2); border-radius: 6px; height: 40px; padding: 0 12px; }
.tools input { width: 240px; max-width: 100%; }
.tools input::placeholder { color: var(--ink-3); opacity: 1; }
.tools select { max-width: 100%; }
.tools button { cursor: pointer; color: var(--ink-2); transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease); }
.tools button:hover { border-color: var(--ink); color: var(--ink); }
.tools button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 500; }
.tools output { font-size: 13px; color: var(--ink-2); padding-bottom: 10px; margin-left: auto; }
.empty { padding: 16px 0; color: var(--ink-2); max-width: 41rem; }

/* Occupation table */
.occ .note { color: var(--ink-2); font-size: 13px; }
.occ .words { color: var(--ink-3); font-size: 12px; line-height: 16px; }
.occ .src { white-space: nowrap; font-size: 13px; }
.occ .pct { white-space: nowrap; }
.occ .pct .v { display: inline-block; font-weight: 500; }
.bar { position: relative; display: inline-block; vertical-align: middle; width: 88px; height: 12px; margin-left: 8px; }
.bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--rule-2); }
.bar i { position: absolute; top: 2px; height: 8px; background: var(--ink); }
.bar i.dn { background: var(--red); }
.occ thead th[aria-sort] { color: var(--red); }
.occ thead button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
.occ thead button:hover { color: var(--red); }
.occ thead button::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: 2px; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.occ thead th[aria-sort="ascending"] button::after { border-bottom: 5px solid currentColor; }
.occ thead th[aria-sort="descending"] button::after { border-top: 5px solid currentColor; }

/* Sources */
.srcs > .prose { font-size: 16px; color: var(--ink-2); }
.sources { max-width: 64rem; font: 400 14px/21px var(--sans); border-bottom: 1px solid var(--rule); margin-top: 12px; }
.sources li { display: grid; grid-template-columns: 28px 1fr; gap: 0 4px; padding: 9px 0; border-top: 1px solid var(--rule); color: var(--ink-2); scroll-margin-top: 56px; }
.sources li:target { background: var(--paper-2); box-shadow: -8px 0 0 var(--paper-2), 8px 0 0 var(--paper-2); }
.sources .letter { font: 600 17px/21px var(--display); color: var(--red); }
.sources .org { color: var(--ink); font-weight: 500; }
.sources .url { display: block; font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.sources .read { color: var(--ink-3); }

/* Ulsa block: set like a publisher's notice */
.ulsa { margin-top: 64px; padding: 20px; border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 3px; max-width: 41rem; }
.ulsa h2 { font-size: 21px; margin-bottom: 6px; padding: 0; border: 0; }
.ulsa h2::before { content: none; }
.ulsa p { color: var(--ink-2); font-size: 16px; }
.ulsa .go { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 400 13.5px/20px var(--sans); color: var(--ink-2); }
.ulsa .go span { flex: 1 1 16rem; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 600 15px/20px var(--sans); text-decoration: none; transition: background-color 140ms var(--ease); }
.btn:hover { background: var(--red); color: var(--paper); }

/* Footer: colophon */
.foot { margin-top: 72px; font: 400 14px/20px var(--sans); color: var(--ink-2); padding: 0 0 40px; }
.foot .wrap { position: relative; padding-top: 24px; }
.foot .wrap::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 8px; border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink); }
.foot h2 { font: 600 18px/1.3 var(--display); margin-bottom: 8px; padding: 0; border: 0; color: var(--ink); }
.foot h2::before { content: none; }
.foot li { padding: 6px 0; border-top: 1px solid var(--rule); max-width: 64rem; }
.foot .ds p { padding-top: 8px; border-top: 1px solid var(--rule); max-width: 64rem; }
.foot .pub { margin-top: 24px; color: var(--ink-2); }
.foot .pub a { margin-left: 12px; white-space: nowrap; }

@media (min-width: 600px) {
  .strip { padding: 20px 20px 16px; }
  .tray { grid-template-columns: 33fr 39fr; }
  .tray-t { grid-column: 1 / -1; }
}

/* Wide screens: real table, sticky header, margin note beside the opening */
@media (min-width: 960px) {
  .wrap { padding: 0 32px; }
  .foot .wrap::before { left: 32px; right: 32px; }
  .mast .wrap { padding-top: 28px; }
  .top { padding-top: 56px; }
  .with-notice { display: grid; grid-template-columns: minmax(0, 41rem) minmax(0, 22rem); justify-content: space-between; column-gap: 48px; align-items: start; }
  .with-notice .notice { grid-column: 2; grid-row: 1; margin-top: 6px; }
  .with-notice .strip { grid-column: 1 / -1; grid-row: 2; }
  .strip { --d: 17px; --step: 19px; --rows: var(--rw); padding: 24px 28px 18px; }
  .field .m { bottom: calc(var(--lw) * var(--step) + 1px); }
  .call.r { padding-top: 0; }
  .tick.alt { display: block; }
  .tick { font-size: 13px; }
  .pile { gap: 4px; }
  .pile .m { --d: 11px; }
  .defs > div { grid-template-columns: 17rem 1fr; gap: 24px; }
  .tw { overflow-x: auto; }
  .occ tbody th { width: 22%; }
  .occ .c-note { width: 30%; }
  .occ .c-ms, .occ .c-an { width: 92px; }
  .occ .c-emp, .occ .c-pct, .occ .c-num, .occ .c-ms, .occ .c-an { text-align: right; }
  .occ .c-pct { padding-right: 108px; }
  .occ td.words { text-align: right; }
  .occ td.note { padding-left: 12px; }
  .occ .c-note { padding-left: 12px; }
  .occ td:last-child, .occ th:last-child { padding-right: 0; }
  .f-sort { display: none !important; }
  .ft.figs tbody th { width: 28%; }
  .ft.figs td:first-of-type { width: 30%; }
  .ft:not(.figs):not(.xt) tbody th { width: 26%; }
  .ft:not(.figs):not(.xt) td:last-child { width: 30%; }
}
@media (min-width: 960px) and (max-width: 1139px) {
  .occ .emp, .occ .c-emp { display: none; }
  .bar { width: 64px; }
  .occ .c-pct { padding-right: 84px; }
}
@media (min-width: 1140px) {
  .occw { overflow: visible; }
  .occ thead th { position: sticky; top: 0; z-index: 2; }
}

/* Narrow screens: each row becomes a labelled record */
@media (max-width: 959px) {
  table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table, caption, tbody, tfoot, tr, th, td { display: block; }
  table { font-size: 15px; line-height: 22px; }
  caption { border-bottom: 1px solid var(--ink); }
  tbody tr, tfoot tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  tbody tr:hover > * { background: none; }
  tbody th, tfoot th { border: 0; padding: 0 0 4px; font-weight: 600; font-size: 16px; }
  td, tfoot td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; text-align: right; }
  td::before { content: attr(data-label); flex: none; max-width: 50%; text-align: left; font-size: 13px; color: var(--ink-3); white-space: normal; }
  td.n { white-space: normal; }
  .occ td.nil:not(.words) { display: none; }
  .occ .words { font-size: 13px; }
  .occ td.note, .ft:not(.xt) td { display: block; text-align: left; }
  .occ td.note::before { content: none; }
  .occ td.note { padding-top: 4px; font-size: 14px; }
  .ft:not(.xt) td::before { display: block; max-width: none; }
  .ft:not(.xt) td { padding: 4px 0; }
  .bar { width: 72px; }
  .tools { align-items: stretch; }
  .tools label, .tools input, .tools select { width: 100%; }
  .tools output { margin-left: 0; padding: 0; }
  .mast nav { gap: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  body { border-top: 0; }
  .tools, .skip, .ulsa, .readout { display: none; }
  .occ thead th { position: static; }
}
