/* whatjobswillaireplaceby2030.com: a railway timetable printed on tinted stock.
   Green paper, black ink, a thick route line with ring stops, one signal red.
   The line diagram on the front page is the only rich element. */
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --paper: #c9e4cc;
  --sheet: #e3f1e3;
  --white: #f7fbf5;
  --ink: #0f1711;
  --ink-2: #2c4032;
  --ink-3: #3d5444;
  --red: #b3121d;
  --hair: rgba(15, 23, 17, 0.2);
  --band: rgba(15, 23, 17, 0.06);
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 20px;
  --railw: 13rem;
  --gut: 20px;
  --line: 4px;
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink) var(--paper); scroll-padding-top: 72px; }
body { margin: 0; font: 400 17px/1.55 var(--sans); color: var(--ink); background: var(--paper); font-variant-numeric: tabular-nums; caret-color: var(--red); overflow-x: clip; }
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
a:hover { background: var(--white); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
cite { font-style: normal; }
strong { font-weight: 600; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 5; }
.wrap { max-width: 1120px; margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Running head: a black band with the title, then the list of pages */
.mast-head { background: var(--ink); color: var(--paper); }
.mast-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.mast-title { font: 600 26px/1.05 var(--cond); }
.mast-title a { display: inline-flex; align-items: center; gap: 12px; color: var(--paper); text-decoration: none; }
.mast-mark { width: 44px; height: 16px; flex: none; }
.mm-ring { fill: var(--ink); }
.mast-head a:hover { background: none; color: var(--white); text-decoration: underline; text-decoration-thickness: 2px; }
.mast-head :focus-visible { outline-color: var(--paper); }
.by { display: inline-flex; align-items: center; gap: 6px; color: var(--paper); text-decoration: none; font-size: 14px; padding: 6px 0; }
.ulsa-mark { display: block; }
.mast-line { border-bottom: var(--line) solid var(--ink); }
.mast-line .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; font-size: 15px; }
.mast-line nav { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 14.5px; }
.mast-line nav a { font-weight: 600; text-decoration: none; padding: 12px 0 8px; border-bottom: 4px solid transparent; }
.mast-line nav a:hover { background: none; border-bottom-color: var(--hair); }
.mast-line nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.mast-line time { display: none; color: var(--ink-2); padding: 8px 0; }

/* Title block */
.top { padding: 36px 0 44px; }
.top-g { display: grid; gap: 24px; }
.top-g > * { min-width: 0; }
h1 { font: 600 clamp(38px, 5.2vw, 62px)/1 var(--cond); text-wrap: balance; }
h2 { font: 600 28px/1.08 var(--cond); text-wrap: balance; }
h3 { font: 600 19px/1.3 var(--sans); margin: 32px 0 8px; }
p + p { margin-top: 16px; }
.lead { max-width: 39rem; }
.answer { font-size: 18px; line-height: 1.55; }
.direct { font-weight: 600; }
.byline { margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.lbl { font-weight: 600; color: var(--ink); margin-right: 4px; }

/* The line diagram. Default: a vertical strip, stops read downward. */
.lm { align-self: start; }
.lm-yr { position: relative; padding: 0 0 10px 30px; }
.lm-seg { position: absolute; left: 6px; top: 0; width: 6px; height: 100%; overflow: visible; pointer-events: none; }
.lm-h { display: none; }
.lm-seg line { stroke: var(--ink); stroke-width: 6; }
.lm-end .lm-seg line { stroke-dasharray: 12 7; }
.lm-head { position: relative; font: 600 26px/1 var(--cond); padding: 8px 0 2px; }
.lm-head::before { content: ""; position: absolute; left: -21px; top: 50%; width: 14px; height: 6px; margin-top: -1px; background: var(--ink); }
.lm-head a { text-decoration: none; }
.lm-head span { font: 400 13px/1.2 var(--sans); color: var(--ink-2); margin-left: 6px; }
.lm-stop a { position: relative; display: block; padding: 8px 0; min-height: 40px; line-height: 1.3; text-decoration: none; }
.lm-stop a:hover { background: none; }
.lm-stop a:hover .lm-fig, .lm-head a:hover { text-decoration: underline; text-decoration-thickness: 2px; background: none; }
.lm-dot { position: absolute; left: -30px; top: 10px; width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--ink); background: var(--white); z-index: 1; }
.lm-dot.is-job { background: var(--ink); }
.lm-fig { font-weight: 600; font-size: 16px; }
.lm-org { font-size: 14px; color: var(--ink-2); }
.lm-key { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ink); font-size: 13.5px; line-height: 1.4; }
.lm-key .lm-dot { position: static; display: inline-block; width: 14px; height: 14px; border-width: 3px; margin: 0 6px -2px 0; }
.lm-dash { display: inline-block; width: 22px; margin: 0 6px 4px 0; border-top: 4px dashed var(--ink); }
.lm-cap { flex-basis: 100%; color: var(--ink-2); }

/* Sections: heading in the left rail under a thick rule */
.sec { border-top: var(--line) solid var(--ink); padding-top: 16px; padding-bottom: 56px; }
.wrap.sec, .wrap.timeline { background-clip: content-box; }
.sec-h { margin-bottom: 16px; }
.sec-b > p, .sec-b > h3, .sec-b > ul, .sec-b > .why, .sec-b > figcaption, .sec-b > .chart-cap { max-width: 38rem; }
.sec-b > h3:first-child { margin-top: 0; }
.sec-b > ul { margin-top: 16px; }
.sec-b > ul + p { margin-top: 20px; }
.sec-b > ul li { position: relative; padding-left: 22px; margin-top: 12px; }
.sec-b > ul li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 9px; height: 9px; border: 2px solid var(--ink); border-radius: 50%; }
article > .wrap.sec, article > .wrap.timeline { border-top: 0; position: relative; }
article > .wrap.sec::before { content: ""; display: block; height: var(--line); background: var(--ink); margin-bottom: 16px; }
article > .wrap.sec { padding-top: 0; }

/* Kind labels: a boxed code beside every figure, as a timetable sets its notes */
.kind { font: 600 13px/1.2 var(--sans); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; padding: 2px 6px 3px; white-space: nowrap; background: var(--sheet); }

/* Timeline: year plate, route line, ring stops */
.tl-head { border-top: var(--line) solid var(--ink); padding-bottom: 28px; }
.tl-head .sec-b p { max-width: 38rem; color: var(--ink-2); }
.yr { position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; background: var(--ink); color: var(--paper); padding: 6px 12px 8px; }
.yr h3 { font: 600 34px/1 var(--cond); margin: 0; }
.yr-count { font-size: 14px; }
.rail { position: relative; border-left: var(--line) solid var(--ink); margin-left: 7px; padding: 16px 0 40px var(--gut); min-width: 0; }
.year:last-child .rail { border-left-style: dashed; }
.yr-note { font-size: 15px; color: var(--ink-2); max-width: 36rem; padding-bottom: 16px; }
.entry { position: relative; padding: 20px 0 28px; border-top: 1px solid var(--hair); scroll-margin-top: 64px; }
.entry::before { content: ""; position: absolute; left: calc(-1 * var(--gut) - var(--line) / 2 - 9px); top: 32px; width: 18px; height: 18px; border: 4px solid var(--ink); border-radius: 50%; background: var(--white); }
.entry:target::before { background: var(--red); }
.fig { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.num { font: 600 38px/1.05 var(--cond); }
.measure { margin-top: 8px; }
.also { margin-top: 16px; }
.also li { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.also .num { font-size: 26px; }
.also .m { flex: 1 1 14rem; font-size: 15px; color: var(--ink-2); }
.quote { margin-top: 16px; font-size: 15px; color: var(--ink-2); background: var(--sheet); padding: 10px 12px; }
.caveat, .check { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.check .lbl { color: var(--red); }
.e-side { margin-top: 16px; }
.facts { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--hair); }
.facts dt { color: var(--ink); font-weight: 600; }
.src { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.src a, .sources a, .bar-text a { text-decoration-thickness: 1px; }
.src-kind { display: inline-block; font-weight: 600; color: var(--ink); }
.record { background: var(--sheet); border: 1.5px solid var(--ink); padding: 16px 16px 20px; margin-top: 8px; }
.record h4 { font: 600 22px/1.15 var(--cond); margin-bottom: 4px; }
.record > p { font-size: 15px; color: var(--ink-2); }
.record li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 15px; color: var(--ink-2); }
.record li strong { font: 600 24px/1 var(--cond); color: var(--ink); margin-right: 2px; }

/* Kinds legend */
.kinds { margin-top: 12px; border-top: 1px solid var(--ink); }
.kinds div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.kinds dd { font-size: 15px; color: var(--ink-2); max-width: 40rem; }

/* Tables: black head row, banded lines, as in a timetable */
.scroll { overflow-x: auto; margin-top: 16px; scrollbar-color: var(--ink) var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--sheet); }
th, td { text-align: right; padding: 9px 12px; font-weight: 400; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; min-width: 11rem; }
tbody th { font-weight: 600; }
caption { caption-side: top; text-align: left; padding-bottom: 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); background: var(--paper); }
thead th { font-size: 14px; font-weight: 600; background: var(--ink); color: var(--paper); vertical-align: bottom; }
tbody tr:nth-child(even) { background: var(--band); }
tbody tr:last-child { border-bottom: 2px solid var(--ink); }
.sec-b > .scores + p, .sec-b > .scroll + p { margin-top: 24px; }
.sister { margin-top: 24px; font-size: 15px; color: var(--ink-2); }

.scores { margin-top: 16px; font-size: 15px; border-top: 2px solid var(--ink); background: var(--sheet); }
.scores li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 12px; border-bottom: 1px solid var(--hair); break-inside: avoid; }
.scores .n { font-weight: 600; }

/* Disagreement page */
.chart-cap { font-size: 15px; color: var(--ink-2); margin-bottom: 20px; }
.bar-row { padding: 12px 0; border-top: 1px solid var(--hair); }
.bar-label { font-size: 15px; }
.bar-label span { color: var(--ink-2); margin-left: 4px; }
.bar-row svg { display: block; width: 100%; height: 20px; margin: 8px 0; background: var(--sheet); }
.b-lost { fill: var(--ink-3); }
.b-made { fill: var(--ink); }
.b-zero { fill: var(--ink); }
.b-net { fill: var(--red); }
.bar-text { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.axis { position: relative; height: 24px; border-top: 2px solid var(--ink); font-size: 13px; color: var(--ink-2); }
.axis span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.axis span:first-child { transform: none; }
.axis span:last-child { transform: translateX(-100%); }
figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

.sides { display: grid; gap: 16px; }
.side { background: var(--sheet); border-top: 2px solid var(--ink); padding: 12px 14px 16px; }
.who { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.side .measure { font-size: 16px; color: var(--ink-2); }
.vs { font: 600 20px/1 var(--cond); color: var(--ink); margin: 0; align-self: center; }
.why { margin-top: 24px; font-size: 16px; }
.why .differs { font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }

/* Publisher notice */
.notice { background: var(--ink); color: var(--paper); padding: 20px 20px 24px; max-width: 38rem; }
.notice p { font-size: 16px; }
.notice ::selection { background: var(--paper); color: var(--ink); }
.go { display: inline-block; font-weight: 600; background: var(--paper); color: var(--ink); text-decoration: none; padding: 10px 18px; border-radius: 6px; }
.go:hover { background: var(--white); }
.notice :focus-visible { outline-color: var(--paper); }
.top .go { background: var(--ink); color: var(--paper); }
.top .go:hover { background: var(--ink-2); }

/* Footer */
.foot { margin-top: 24px; padding-bottom: 40px; }
.sources { border-top: var(--line) solid var(--ink); padding-top: 16px; }
.sources h2 { margin-bottom: 4px; }
.sources-note { font-size: 14px; color: var(--ink-2); }
.sources ul { margin-top: 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.sources li { padding: 6px 0; border-top: 1px solid var(--hair); break-inside: avoid; }
.publisher { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--ink); font-size: 14px; color: var(--ink-2); }
.publisher a { margin-left: 8px; }

@media (min-width: 620px) {
  :root { --pad: 32px; --gut: 28px; }
  .mast-title { font-size: 32px; }
  .mast-line time { display: block; }
  .mast-line nav { gap: 0 24px; font-size: 15px; }
  h2 { font-size: 30px; }
  .num { font-size: 44px; }
  .sides { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; }
  .scores { columns: 2; column-gap: 0; }
  .sources ul { columns: 2; column-gap: 40px; }
}

@media (min-width: 760px) {
  .top-g { grid-template-columns: minmax(0, 1fr) 19rem; gap: 28px 48px; }
  .top-g h1 { grid-column: 1 / -1; }
  .lm-stop a { padding: 5px 0; min-height: 32px; }
  .lm-dot { top: 7px; }
}

@media (min-width: 900px) {
  :root { --gut: 44px; }
  .top { padding: 48px 0 56px; }
  .sec { display: grid; grid-template-columns: var(--railw) minmax(0, 1fr); column-gap: 48px; }
  article > .wrap.sec::before { grid-column: 1 / -1; }
  .sec-h { margin: 0; }
  .sec-h h2 { position: sticky; top: 16px; }
  .year { display: grid; grid-template-columns: var(--railw) minmax(0, 1fr); }
  .yr { top: 16px; align-self: start; display: block; background: none; color: var(--ink); padding: 0 24px 24px 0; }
  .yr h3 { display: inline-block; background: var(--ink); color: var(--paper); font-size: 68px; padding: 2px 14px 8px; }
  .yr-count { margin-top: 8px; color: var(--ink-2); }
  .rail { margin-left: 0; padding-top: 0; padding-bottom: 56px; }
  .entry:first-child { border-top: 0; padding-top: 4px; }
  .entry:first-child::before { top: 16px; }
  .yr-note { padding: 0 0 16px; }
  .scores { columns: 2; }
  .sources ul { columns: 3; }
}

@media (min-width: 1100px) {
  .entry { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; column-gap: 40px; align-items: start; }
  .e-side { margin-top: 8px; }
}

/* Wide screens: the strip turns on its side and runs under the title block */
@media (min-width: 1200px) {
  .top-g { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lead { max-width: none; display: grid; grid-template-columns: 6fr 5fr; column-gap: 56px; align-items: start; }
  .lead .answer { grid-row: 1 / span 3; }
  .lead p + p { margin-top: 0; }
  .lead .byline { margin-top: 20px; }
  .top-g .lm { margin-top: 8px; }
  .lm-yrs { display: flex; gap: 20px; padding-right: 96px; }
  .lm-yr { flex: var(--n) 1 0; min-width: 0; padding: 0; display: grid; grid-template-rows: 196px auto; }
  .lm-seg { left: 0; top: 182px; width: calc(100% + 21px); height: 6px; }
  .lm-end .lm-seg { width: calc(100% + 64px); }
  .lm-v { display: none; }
  .lm-h { display: inline; }
  .lm-stops { grid-row: 1; display: flex; }
  .lm-stop { flex: 1; position: relative; min-width: 0; }
  .lm-stop a { position: absolute; inset: 0; padding: 0; }
  .lm-dot { left: 50%; top: auto; bottom: 2px; margin-left: -9px; }
  .lm-label { position: absolute; left: 50%; bottom: 30px; display: block; white-space: nowrap; line-height: 1.1; transform-origin: 0 100%; transform: rotate(-60deg); }
  .lm-fig, .lm-org { display: block; }
  .lm-fig { font-size: 15px; }
  .lm-org { font-size: 12.5px; }
  .lm-head { grid-row: 2; margin-top: 14px; padding: 8px 0 0; border-top: 1px solid var(--ink); font-size: 30px; }
  .lm-head::before { content: none; }
  .lm-head span { display: block; margin: 4px 0 0; white-space: nowrap; }
  .lm-key { margin-top: 20px; }
  .lm-cap { flex-basis: auto; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}
@media print {
  .skip, .mast-line nav { display: none; }
  .yr, .sec-h h2 { position: static; }
}
