/* /ai-time-by-job: an interactive explainer of the public data on AI time by job. event.css supplies
   the fonts, tokens, skip link, index, buttons, fields, footer and consent banner; this adds the
   sections, the job finder, the job card and the charts. Phone first, one 720px column.
   Marks: with AI in deep blue, alone in gray-blue, care work and Wisconsin in orange (marks only,
   never text), each at least 3:1 on the page and on white. Text always wears the ink tokens. */
:root {
  --alone: #74899e;
  --ai: #006d9c;
  --mark: #e05a26;
  --mark-bg: #fdeee7;
  --card: #ffffff;
  --track: #e6ecf1;
}

.part { padding-top: clamp(48px, 7vw, 76px); }
.index + .part { padding-top: 28px; }
.part h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem); line-height: 1.08; letter-spacing: -0.022em; }
.part > p { max-width: 36rem; margin-top: 12px; }
.part > .part__lead { margin-top: 12px; font-size: 1.125rem; }
.part__sub { margin: 34px 0 0; font: 700 1.25rem/1.25 var(--display); letter-spacing: -0.01em; }
.part strong { font-weight: 750; }

/* ------------------------------------------------------------- guess first */
.guess { display: grid; gap: 10px; margin-top: 20px; padding: 18px; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); }
.guess__label { font-weight: 700; }
.guess__label output { font-variant-numeric: tabular-nums; color: var(--deep); }
.guess__range { width: 100%; height: 44px; margin: 0; accent-color: var(--ai); cursor: pointer; }
.guess__scale { display: flex; justify-content: space-between; margin-top: -8px; font-size: .8125rem; color: var(--slate); }
.guess .button { justify-self: start; }
.reveal { display: grid; gap: 14px; margin-top: 16px; padding: 18px; border-radius: 16px; background: var(--sky); }
.reveal__answer { font-size: 1.1875rem; line-height: 1.4; }
.reveal .job__bars { margin: 0; }

/* ----------------------------------------------------------- find your job */
.finder { margin-top: 20px; }
.finder__label { display: block; font-weight: 700; }
.finder__box { position: relative; margin-top: 6px; }
.finder__input { width: 100%; min-height: 54px; padding: 12px 16px; border: 1px solid #93a5b5; border-radius: 12px; background: var(--card); font-size: 1.0625rem; }
.finder__input:focus { outline: none; border-color: var(--deep); box-shadow: 0 0 0 3px rgba(0, 109, 156, .25); }
.finder__input::placeholder { color: #66788a; }
.finder__options { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: min(360px, 55vh); margin: 0; padding: 6px; overflow-y: auto; list-style: none; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); box-shadow: 0 18px 40px -20px rgba(6, 21, 37, .45); }
.finder__options li { padding: 11px 12px; border-radius: 8px; line-height: 1.35; cursor: pointer; }
.finder__options li[aria-selected="true"] { background: var(--sky); }
@media (hover: hover) { .finder__options li:hover { background: var(--paper); } .finder__options li[aria-selected="true"]:hover { background: var(--sky); } }
.finder__hint { margin-top: 6px; font-size: .875rem; color: var(--slate); }
.finder__try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: .9375rem; }
.finder__try span { color: var(--slate); font-weight: 650; }
.finder__try button { min-height: 40px; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); font-weight: 650; font-size: .9375rem; cursor: pointer; }
@media (hover: hover) { .finder__try button:hover { border-color: var(--deep); } }

/* The job card. */
.job { margin-top: 20px; padding: 20px; border: 1px solid var(--rule); border-top: 4px solid var(--ai); border-radius: 16px; background: var(--card); box-shadow: 0 1px 2px rgba(6, 21, 37, .05), 0 24px 44px -34px rgba(6, 21, 37, .55); scroll-margin-top: calc(var(--index) + 16px); }
.job--care { border-top-color: var(--mark); }
.job__group { font-size: .8125rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--slate); }
.job__title { margin: 4px 0 0; font: 700 clamp(1.35rem, 1.1rem + 1vw, 1.7rem)/1.15 var(--display); letter-spacing: -0.015em; }
.job__bars { display: grid; gap: 10px; margin-top: 18px; }
.job__row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.job__k { font-weight: 650; font-size: .9375rem; }
.job__track { height: 14px; border-radius: 0 4px 4px 0; background: var(--track); overflow: hidden; }
.job__fill { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; transition: width 900ms var(--ease); }
.job__fill.is-in { width: var(--w); }
.job__fill--alone { background: var(--alone); }
.job__fill--ai { background: var(--ai); }
.job__fill--guess { background: var(--navy); }
.job__v { min-width: 6.5rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.job__big { margin-top: 16px; font-size: 1.1875rem; line-height: 1.4; }
.job__big strong { color: var(--deep); }
.job__note { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: var(--mark-bg); font-size: .9375rem; }
.job__split { display: flex; gap: 2px; height: 12px; margin-top: 20px; border-radius: 4px; overflow: hidden; }
.job__part--auto { background: var(--navy); }
.job__part--aug { background: var(--ai); }
.job__split-key { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 8px; font-weight: 650; font-size: .9375rem; }
.job__dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: 0; }
.job__dot--auto { background: var(--navy); }
.job__dot--aug { background: var(--ai); }
.job__explain { margin-top: 6px; font-size: .875rem; color: var(--slate); }
.job__facts { display: grid; gap: 12px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: .9375rem; }
.job__facts dt { font-weight: 700; font-size: .8125rem; color: var(--slate); }
.job__facts dd { margin: 2px 0 0; }
.job__made { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.job__made li { padding: 3px 10px; border-radius: 999px; background: var(--paper); }
.job__made span { color: var(--slate); font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .job__facts > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; align-items: baseline; } .job__facts dd { margin: 0; } }
.job__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; }
.job__share { min-height: 44px; padding: 8px 16px; border: 1px solid var(--navy); border-radius: 999px; background: var(--card); color: var(--navy); font-weight: 650; cursor: pointer; }
.job__shared { flex-basis: 100%; font-size: .875rem; color: var(--slate); overflow-wrap: anywhere; }
.job__shared:empty { display: none; }

/* --------------------------------------------------------------- tables */
.table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.table th[scope="row"], .table thead th:first-child { text-align: left; white-space: normal; min-width: 11rem; font-weight: 600; }
.table thead th { font-size: .8125rem; color: var(--slate); font-weight: 700; background: var(--paper); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tr.is-care th[scope="row"], .table tr.is-wi th[scope="row"] { box-shadow: inset 4px 0 0 var(--mark); }
.table tr.is-wi > * { font-weight: 750; }
.table__personal { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 500; color: var(--slate); }
.table__open { padding: 0; border: 0; background: none; color: var(--deep); font: inherit; font-weight: 650; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; cursor: pointer; }
.table-note { margin-top: 8px; }
/* On a phone the common jobs fit without scrolling sideways: job titles wrap, and each time stays
   on one line ("7 h 59 min", not three lines of it). */
@media (max-width: 599px) {
  .table { font-size: .875rem; }
  .table th, .table td { padding: 8px 6px; white-space: normal; }
  .table th[scope="row"], .table thead th:first-child { min-width: 7rem; }
  #your-job .table td { white-space: nowrap; }
  #your-job .table th[scope="row"], #your-job .table thead th:first-child { min-width: 6.25rem; }
}
@media (max-width: 379px) { #your-job .table { font-size: .8125rem; } }

/* --------------------------------------------------------------- charts */
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 26px; }
.chart-head__title { font-weight: 750; }
.part > .chart-head__title { margin-top: 26px; }
.sort { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); }
.sort button { min-height: 38px; padding: 6px 14px; border: 0; border-radius: 999px; background: none; font-weight: 650; font-size: .875rem; cursor: pointer; }
.sort button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .875rem; color: var(--slate); }
.legend__swatch { flex: none; width: 14px; height: 14px; border-radius: 4px; }
.legend__swatch--care { background: var(--mark); }

.bars { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.bars > li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 3.6rem; grid-template-areas: "label label" "track value"; align-items: center; column-gap: 10px; row-gap: 3px; padding: 4px 6px; border-radius: 8px; }
.bars__label { grid-area: label; font-size: .9375rem; line-height: 1.3; }
.bars__track { grid-area: track; height: 12px; }
.bars__fill { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--ai); transition: width 600ms var(--ease); }
.bars__value { grid-area: value; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bars > li.is-care .bars__fill { background: var(--mark); }
.bars > li.is-picked { background: var(--card); box-shadow: 0 0 0 1px var(--rule); }
.bars__hit { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
@media (hover: hover) { .bars__hit:hover { background: rgba(0, 109, 156, .06); } }
@media (min-width: 640px) {
  .bars > li { grid-template-columns: 16rem minmax(0, 1fr) 3.6rem; grid-template-areas: "label track value"; }
}
/* What sticks: a dashed mark at the 18.5% average, on the same 0 to 60% scale as the bars. */
.bars--sticks .bars__track { position: relative; }
.bars--sticks .bars__track::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: 30.8%; border-left: 2px dashed var(--navy); }
.bars--sticks .bars__fill { background: var(--ai); }
.bars__average { margin-top: 10px; }
.group-detail, .state-detail { margin-top: 12px; padding: 12px 14px; border-left: 4px solid var(--ai); border-radius: 0 10px 10px 0; background: var(--card); font-size: .9375rem; }
.state-detail:empty { display: none; }

.compare { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: .9375rem; }
/* 16px or more, or iOS Safari zooms the page when the list opens. */
.compare select { min-height: 44px; padding: 8px 12px; border: 1px solid #93a5b5; border-radius: 10px; background: var(--card); font: inherit; font-size: 1rem; font-weight: 600; }
.states { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; font-family: var(--text); }
.states__grid { stroke: var(--track); stroke-width: 1; }
.states__grid--one { stroke: var(--slate); stroke-dasharray: 4 3; }
/* SVG text scales with the chart: about 10 to 11px on a 390px phone, 12px in the 720px column. */
.states__tick { fill: var(--slate); font-size: 15px; font-variant-numeric: tabular-nums; }
.states__label { fill: var(--ink); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .states__tick { font-size: 9px; } .states__label { font-size: 10px; } }
.states__state { cursor: pointer; }
.states__hit { fill: transparent; }
.states__col { fill: var(--alone); }
.states__state--wi { cursor: default; }
.states__state--wi .states__col { fill: var(--mark); }
.states__state.is-compared .states__col { fill: var(--ai); }
.states__break { stroke: var(--paper); stroke-width: 2; }
.states__pointer { stroke: var(--ink); stroke-width: 1; }
@media (hover: hover) { .states__state:not(.states__state--wi):not(.is-compared):hover .states__col { fill: var(--slate); } }
.legend--states { flex-wrap: wrap; gap: 6px 16px; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__swatch--compare { background: var(--ai); }
.legend__line { flex: none; width: 18px; border-top: 2px dashed var(--slate); }

.numbers { margin-top: 16px; }
.numbers summary { display: inline-flex; min-height: 44px; align-items: center; color: var(--deep); font-weight: 700; cursor: pointer; }
.numbers .note { margin-top: 10px; }

/* --------------------------------------------------------------- the catch */
.catch { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.catch li { padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.catch strong { display: block; margin-bottom: 2px; }

/* --------------------------------------------------------------- your number */
.part--cta { margin-top: clamp(48px, 7vw, 76px); padding: 26px 22px; border-radius: 20px; background: var(--navy); color: var(--white); }
.part--cta p { color: #d4dee7; }
.part--cta .cta { display: grid; justify-items: start; gap: 14px; margin-top: 20px; }
.part--cta .text-link { color: var(--bright); }
.part--cta .note { color: var(--mist); }
.part--cta :focus-visible { outline-color: var(--bright); }

/* --------------------------------------------------------------- keep going */
.more { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .more { grid-template-columns: 1fr 1fr; } }
.more__link { display: grid; gap: 4px; height: 100%; padding: 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); text-decoration: none; }
.more__link strong { color: var(--deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.more__link span { font-size: .9375rem; color: var(--slate); }
@media (hover: hover) { .more__link:hover { border-color: var(--deep); } }

.sources p { max-width: none; font-size: .9375rem; line-height: 1.55; color: var(--slate); }
.sources strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .job__fill, .bars__fill { transition: none; }
}
@media print {
  .finder, .guess, .sort, .compare, .job__actions { display: none !important; }
  .numbers { display: block; }
}
