/* notice.mclaughlinfamily.org — tokens first; dark only when chosen (theme-kit toggle). */
:root {
	color-scheme: light;
	--page: #f9f9f7;
	--surface: #fcfcfb;
	--ink: #0b0b0b;
	--ink-2: #52514e;
	--muted: #6f6d68;
	--axis-ink: #6f6d68;
	--grid: #e1e0d9;
	--baseline: #c3c2b7;
	--border: rgba(11, 11, 11, 0.10);
	--wash: rgba(11, 11, 11, 0.04);
	--recession: rgba(11, 11, 11, 0.05);
	--callout-bg: #fbf3e4;
	--callout-line: #e7cf9f;
	--link: #1c5cab;

	--all: #0b0b0b;          /* all Utah quitters: primary ink, the sum of the two groups */
	--sal: #2a78d6;          /* series 1: salaried or under contract */
	--hr: #eb6834;           /* series 2: hourly, no contract */
	--band-alpha: 0.10;

	--radius: 12px;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--page: #0d0d0d;
	--surface: #1a1a19;
	--ink: #f0efec;
	--ink-2: #c3c2b7;
	--muted: #a3a29b;
	--axis-ink: #a3a29b;
	--grid: #2c2c2a;
	--baseline: #383835;
	--border: rgba(255, 255, 255, 0.10);
	--wash: rgba(255, 255, 255, 0.05);
	--recession: rgba(255, 255, 255, 0.06);
	--callout-bg: #2a2418;
	--callout-line: #5c4a25;
	--link: #86b6ef;
	--all: #f0efec;
	--sal: #3987e5;
	--hr: #d95926;
	--band-alpha: 0.12;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font-size: 15px;
	line-height: 1.5;
}
main {
	max-width: 1080px;
	margin: 0 auto;
	padding: 28px 16px 40px;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(25px, 4.6vw, 34px); line-height: 1.15; max-width: 22em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; margin-top: 14px; }
p { margin: 0; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
.muted { color: var(--muted); }
.kicker { color: var(--muted); font-size: 13px; letter-spacing: 0.02em; margin-bottom: 4px; }
.lede { color: var(--ink-2); margin-top: 8px; max-width: 46em; font-size: 16px; }
.masthead { margin-bottom: 16px; padding-right: 44px; }

.callout {
	background: var(--callout-bg);
	border: 1px solid var(--callout-line);
	border-radius: var(--radius);
	padding: 10px 14px;
	color: var(--ink-2);
	max-width: 62em;
	margin-bottom: 18px;
}
.callout strong { color: var(--ink); }

/* ---------- the ticker: three stat tiles ---------- */
.ticker {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
.tick {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px 16px 12px;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "label label" "value spark" "range spark" "delta delta";
	column-gap: 10px;
	align-items: end;
}
.tick-label { grid-area: label; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.tick-value { grid-area: value; font-size: 40px; font-weight: 650; line-height: 1.1; margin-top: 4px; letter-spacing: -0.02em; }
.tick-range { grid-area: range; color: var(--muted); font-size: 13px; }
.tick-delta { grid-area: delta; color: var(--ink-2); font-size: 13px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.tick-delta .arrow { display: inline-block; width: 1em; text-align: center; }
.tick-spark { grid-area: spark; width: 96px; height: 40px; align-self: center; }
.tick-spark svg { display: block; }
.asof { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin-top: 2px; }

.key-line { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--ink); border-radius: 2px; flex: none; }
.key-line.all { border-top-color: var(--all); }
.key-line.sal { border-top-color: var(--sal); }
.key-line.hr { border-top-color: var(--hr); }
.key-line.dash { border-top: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--ink-2) 0 4px, transparent 4px 7px); }
.key-band { display: inline-block; width: 16px; height: 10px; border-radius: 3px; background: var(--wash); flex: none; }
.key-band.sal { background: color-mix(in srgb, var(--sal) calc(var(--band-alpha) * 100%), transparent); }
.key-band.hr { background: color-mix(in srgb, var(--hr) calc(var(--band-alpha) * 100%), transparent); }
.key-band.rec { background: var(--recession); }

/* ---------- cards ---------- */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	margin-top: 16px;
}
.card-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.card p + p, .card ul + p, .card p + ul { margin-top: 10px; }
.card ul, .card ol { margin: 8px 0 0; padding-left: 20px; }
.card li + li { margin-top: 6px; }
.prose { max-width: 50em; color: var(--ink-2); }
.prose strong { color: var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: var(--page); }
.seg button {
	font: inherit; font-size: 13px; color: var(--ink-2); background: none; border: 0;
	padding: 4px 12px; border-radius: 999px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--border); font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--sal); outline-offset: 1px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.legend span.item { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- chart ---------- */
.chart { position: relative; outline: none; touch-action: pan-y; }
.chart:focus-visible { box-shadow: 0 0 0 2px var(--sal); border-radius: 6px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 12px system-ui, -apple-system, "Segoe UI", sans-serif; }
.tip {
	position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2;
	background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	padding: 8px 10px; font-size: 13px; min-width: 210px; max-width: 280px;
	opacity: 0; transition: opacity 0.08s;
}
.tip.on { opacity: 1; }
.tip-head { color: var(--ink-2); margin-bottom: 4px; }
.tip-row { display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 8px; padding: 2px 0; }
.tip-row b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tip-row span.name { color: var(--ink-2); }
.tip-row span.rng { grid-column: 3; color: var(--muted); font-size: 12px; margin-top: -2px; }
.tip-foot { color: var(--muted); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; font-size: 12px; }
.note { color: var(--muted); font-size: 13px; margin-top: 8px; max-width: 62em; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.partial td { color: var(--ink-2); }
.surveys td:first-child { min-width: 11em; }
.surveys td.use { color: var(--muted); font-size: 13px; }
.params td:nth-child(2), .params td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }

.formula {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px;
	background: var(--page); border: 1px solid var(--border); border-radius: 8px;
	padding: 10px 12px; margin-top: 10px; overflow-x: auto; white-space: pre; color: var(--ink);
}

.text-btn {
	font: inherit; font-size: 13px; color: var(--link); background: none; border: 1px solid var(--border);
	border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.text-btn:hover { background: var(--wash); }

footer { color: var(--muted); font-size: 13px; margin-top: 22px; }
footer p + p { margin-top: 4px; }

.err { color: #b42318; }
:root[data-theme="dark"] .err { color: #f97066; }

/* theme-kit toggle (~/theme-kit/toggle.css) */
.theme-toggle{position:fixed;top:10px;right:10px;z-index:9999;width:34px;height:34px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;font:16px/1 system-ui,sans-serif;
  background:var(--tk-bg,#ffffff);color:var(--tk-fg,#222222);border:1px solid var(--tk-line,rgba(0,0,0,.18));
  box-shadow:0 1px 4px rgba(0,0,0,.18);opacity:.9;min-width:0;min-height:0;max-width:none;margin:0;flex:none;
  text-transform:none;letter-spacing:normal;transform:none}
.theme-toggle:hover,.theme-toggle:focus-visible{opacity:1}
.theme-toggle.inline{position:static;box-shadow:none}
:root[data-theme="dark"] .theme-toggle{--tk-bg:#26262b;--tk-fg:#f0efec;--tk-line:rgba(255,255,255,.22)}

@media (max-width: 760px) {
	.ticker { grid-template-columns: 1fr; }
	/* the two prose tables become stacked rows on a phone */
	.stack thead { display: none; }
	.stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
	.stack td { display: block; border: 0; padding: 2px 0; white-space: normal !important; min-width: 0; }
	.stack td:first-child { font-weight: 600; }
	.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
	.tick-value { font-size: 34px; }
	main { padding-top: 20px; }
}
@media print {
	.theme-toggle, .seg, .text-btn { display: none; }
	.card, .tick { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
	.tip { transition: none; }
}
