/* Components of the B1 design (internal/web/UI.md lists them with their
   markup). */

/* ---- Page heading ------------------------------------------------- */
.page-head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 20px 32px; margin-bottom: 0;
}
.page-head > :first-child { min-width: 0; flex: 1 1 420px; }
.page-head h1 { overflow-wrap: anywhere; }
.lede { margin: 8px 0 0; font-size: 16.5px; line-height: 1.5; color: var(--muted); max-width: 680px; overflow-wrap: anywhere; }
.lede strong { color: var(--text); font-weight: 500; }
.page-head + * { margin-top: 24px; }
.section { margin-top: 40px; }
.section > h2 + p, .section-intro { margin: 6px 0 0; font-size: 16px; line-height: 1.6; color: var(--text2); max-width: 760px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.section-head .from { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }

/* ---- Breadcrumbs -------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.crumbs [aria-current] { color: var(--muted); overflow-wrap: anywhere; }

/* ---- Cards -------------------------------------------------------- */
.card { background: var(--card); border: var(--cardBorder); border-radius: var(--r-card); overflow: hidden; }
.card.pad { padding: 22px 24px 24px; }
.card-head { padding: 18px 22px 4px; }
.card-head + .rows { margin-top: 10px; border-top: 1px solid var(--line); }
.card-head p, .card.pad > h3 + p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.card.pad > h2 { font-size: 21px; }
.card + .card, .card + .hint, .hint + .card { margin-top: 24px; }
.stack > * + * { margin-top: 20px; }

/* Day groups: a heading with a count above a card of rows. */
.group { margin-top: 36px; }
.group:first-of-type { margin-top: 32px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 4px 12px; }
.group-head h2 { font-size: 21px; }
.group-meta { font-size: 14.5px; color: var(--muted); }

/* ---- List rows ---------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
	padding: 14px 22px; border-top: 1px solid var(--line); position: relative;
}
.row:first-child { border-top: 0; }
.row.tall { padding: 18px 22px; gap: 12px 20px; }
.row-icon {
	flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
	background: var(--raised); color: var(--text2);
	display: flex; align-items: center; justify-content: center;
}
.row-icon.lg { flex-basis: 40px; width: 40px; height: 40px; border-radius: 11px; }
.row-main { flex: 999 1 360px; min-width: 0; }
.row-main.narrow { flex-basis: 240px; }
.row-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.row-line.center { align-items: center; gap: 6px 10px; }
.row-title { font-weight: 600; font-size: 16.5px; color: var(--text); overflow-wrap: anywhere; }
a.row-title:hover { color: var(--accentText); }
.row-sub { font-size: 15.5px; color: var(--text2); }
.row-meta { margin-top: 3px; font-size: 14.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.row-meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--chipLine); }
.row-meta a:hover { color: var(--text); }
.row-status { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.row-note { font-size: 14.5px; color: var(--muted); }
.row-note.bad { color: var(--bad); font-weight: 600; }
.row-note.warn { color: var(--warn); font-weight: 600; }
.row-nums { flex: 0 0 110px; text-align: right; font-variant-numeric: tabular-nums; }
.row-nums .big { font-size: 15px; color: var(--text); }
.row-nums .small { margin-top: 2px; font-size: 14px; color: var(--muted); }
.row-when { flex: 0 0 72px; text-align: right; font-size: 14px; }
.row-when a { color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions form { margin: 0; }
.row.live-new { animation: row-new 2s ease-out; }
@keyframes row-new { from { background: var(--accentBg); } }

/* ---- Status chips ------------------------------------------------- */
/* Icon and label always; the variant is the state's tint (funcs.go
   chipOf / entryChip, the one place that maps states). */
.chip {
	display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
	padding: 3px 11px 3px 9px; border-radius: var(--r-pill); border: 1px solid transparent;
	background: var(--neutralBg); color: var(--text2); font-size: 14px; font-weight: 600; line-height: 1.45;
}
.chip .icon { width: 15px; height: 15px; stroke-width: 2.2; }
.chip.sm { padding: 2px 10px 2px 8px; font-size: 13.5px; gap: 6px; }
.chip.sm .icon { width: 13px; height: 13px; }
.chip.accent { background: var(--accentBg); color: var(--accentText); border-color: var(--accentLine); }
.chip.ok { background: var(--okBg); color: var(--ok); }
.chip.bad { background: var(--badBg); color: var(--bad); border-color: var(--badLine); }
.chip.warn { background: var(--warnBg); color: var(--warn); }
.chip.outline { background: transparent; color: var(--text2); border-color: var(--chipLine); }
.chip.dashed { background: transparent; color: var(--text2); border: 1px dashed var(--chipLine); }
/* Small rectangular label: "OAuth", "This device", "Optional". */
.tag {
	display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: var(--r-sm);
	background: var(--neutralBg); border: 1px solid var(--chipLine); color: var(--text2);
	font-size: 13px; font-weight: 500; white-space: nowrap;
}

/* Live: a pulsing dot, a striped bar, typing dots. */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
	0% { box-shadow: 0 0 0 0 var(--accentLine); }
	70% { box-shadow: 0 0 0 7px rgba(0, 0, 0, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}
.live-dot.off { animation: none; background: var(--muted); }
/* The wheel of an active run's chip ("chip" template: the live dot, then
   the "running" arc) turns. */
.chip > .live-dot + .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* The stream's state next to a heading (data-live-indicator; .off: lost). */
h1 .live-chip { vertical-align: middle; font-family: var(--sans); letter-spacing: 0; }
.chip.off { background: transparent; color: var(--muted); border-color: var(--chipLine); }
.chip.off .live-dot { animation: none; background: var(--muted); }
.progress-line { margin-top: 9px; display: flex; align-items: center; gap: 12px; max-width: 440px; }
.progress-note { font-size: 14px; color: var(--accentText); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
progress.progress {
	flex: 1; width: 100%; height: 5px; border: 0; border-radius: var(--r-pill);
	background: var(--track); color: var(--accent); overflow: hidden; appearance: none; -webkit-appearance: none;
}
progress.progress::-webkit-progress-bar { background: var(--track); border-radius: var(--r-pill); }
progress.progress::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); }
progress.progress::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }
/* Without a value: the run is going, how far is unknown. */
progress.progress:indeterminate {
	background: repeating-linear-gradient(90deg, var(--accent) 0 14px, var(--accentSoft) 14px 20px);
	background-size: 40px 5px; animation: slide 1.2s linear infinite;
}
progress.progress:indeterminate::-webkit-progress-bar { background: transparent; }
progress.progress:indeterminate::-moz-progress-bar { background: transparent; }
@keyframes slide { from { background-position: 0 0; } to { background-position: 40px 0; } }
/* Steps done of a plan: <span class="steps"><span class="done"></span>…<span class="now"></span><span></span></span> */
.steps { display: flex; gap: 4px; }
.steps > span { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--track); }
.steps > .done { background: var(--ok); }
.steps > .now { background: var(--accentLine); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1.2s infinite; }
.typing > span:nth-child(2) { animation-delay: .2s; }
.typing > span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---- Buttons ------------------------------------------------------ */
/* .button: secondary (44px). .primary: filled accent. .danger: outline.
   .sm: 40px (row actions). .lg: 48px (login). */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 44px; padding: 0 16px; border-radius: var(--r-ctl);
	border: 1px solid var(--fieldLine); background: var(--field); color: var(--text);
	font: inherit; font-weight: 500; font-size: 15px; line-height: 1; white-space: nowrap;
	text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--text); text-decoration: none; border-color: var(--chipLine); background: var(--raised); }
.button .icon { width: 16px; height: 16px; }
.button.primary { background: var(--accent); border-color: transparent; color: var(--onAccent); font-weight: 600; padding: 0 20px; }
.button.primary:hover { background: var(--accentSoft); color: var(--onAccent); }
.button.danger, .button.danger-outline { background: transparent; border-color: var(--badLine); color: var(--bad); }
.button.danger:hover, .button.danger-outline:hover { background: var(--badBg); color: var(--bad); }
.button.strong { font-weight: 600; }
.button.sm { height: 40px; }
.button.lg { height: 48px; padding: 0 22px; font-size: 16px; }
.button.full { display: flex; width: 100%; }
.button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
/* A quiet text action next to a button: "Cancel". */
.button.quiet { background: none; border-color: transparent; color: var(--text2); padding: 0 6px; }
.button.quiet:hover { color: var(--text); text-decoration: underline; }
/* A square icon button (44px), e.g. "Back". */
.iconbtn {
	width: 44px; height: 44px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--text);
	display: inline-flex; align-items: center; justify-content: center;
}
.iconbtn:hover { background: var(--neutralBg); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.actions form { margin: 0; }

/* ---- Segmented control (also the sub-navigation and the tabs) ------- */
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 2px; background: var(--segBg); border-radius: var(--r-pill); }
.seg > a, .seg > button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 8px 18px; border: 0; border-radius: var(--r-pill); background: transparent;
	color: var(--text2); font: inherit; font-weight: 500; font-size: 15px; line-height: 1.3; text-decoration: none; cursor: pointer;
}
.seg > a:hover, .seg > button:hover { color: var(--text); text-decoration: none; }
.seg > [aria-current="page"], .seg > [aria-current="true"], .seg > [aria-selected="true"], .seg > [aria-pressed="true"] {
	background: var(--segOn); color: var(--text); font-weight: 600; box-shadow: var(--segShadow);
}
.seg .seg-count { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Full width, equal parts: the run page's tabs. */
.seg.block { display: flex; }
.seg.block > * { flex: 1; min-height: 38px; padding: 6px 12px; font-size: 14.5px; }
.seg.sm > * { padding: 6px 12px; font-size: 14px; }
.tab-panel + .tab-panel { margin-top: 32px; }
[data-tabs].enhanced .tab-panel + .tab-panel { margin-top: 0; }
[role="tabpanel"] { margin-top: 20px; }

/* Bottom tab bar (phone run page). */
.tabbar {
	position: sticky; bottom: 0; z-index: 10; display: flex; padding: 6px 8px 10px;
	background: var(--nav); border-top: 1px solid var(--navLine);
}
.tabbar > a, .tabbar > button {
	flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	border: 0; background: transparent; border-radius: var(--r-ctl);
	color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; text-decoration: none;
}
.tabbar .pill { position: relative; width: 52px; height: 30px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; }
.tabbar .icon { width: 20px; height: 20px; stroke-width: 1.9; }
.tabbar [aria-selected="true"], .tabbar [aria-current="page"] { color: var(--accentText); font-weight: 600; }
.tabbar [aria-selected="true"] .pill, .tabbar [aria-current="page"] .pill { background: var(--accentBg); }
.tabbar .badge-n {
	position: absolute; top: -2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
	background: var(--badgeBg); color: var(--text); font-size: 11.5px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.tabbar .badge-n.bad { background: var(--badBg); border: 1px solid var(--badLine); color: var(--bad); }
.tabbar-only { display: none; }
/* Compact page header on phones: back, title, status line. */
.phone-head { background: var(--nav); padding: 6px 12px 14px; }
.phone-head .bar { display: flex; align-items: center; gap: 4px; }
.phone-head .bar > .where { flex: 1; font-size: 15px; color: var(--muted); }
.phone-head h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; padding: 4px 6px 0; }
@media (max-width: 640px) {
	.tabbar-only { display: flex; }
	.wide-only { display: none !important; }
}

/* ---- On/off switch ------------------------------------------------ */
/* <button class="switch" role="switch" aria-checked="true"> in a form that
   toggles (works without JS), or <input type="checkbox" class="switch"
   role="switch"> in a form with a save button. */
.switch {
	position: relative; width: 46px; height: 28px; flex: none; margin: 0; padding: 2px;
	border-radius: var(--r-pill); border: 1.5px solid var(--muted); background: transparent;
	display: inline-flex; align-items: center; justify-content: flex-start; cursor: pointer;
	appearance: none; -webkit-appearance: none;
}
.switch::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch[aria-checked="true"], input.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::before, input.switch:checked::before { background: var(--onAccent); transform: translateX(18px); }
.switch-line { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
.switch-line form { margin: 0; display: inline-flex; }
.switch-word { width: 24px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.switch-word.on { color: var(--accentText); }

/* ---- Forms -------------------------------------------------------- */
.field > label, .field > .label, .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; color: var(--text); }
.label .optional, .optional { font-weight: 400; color: var(--muted); }
.field + .field, .fields + .field, .field + .fields { margin-top: 20px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 24px; }
.help { margin: 7px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.help code { font-size: 13px; padding: 1px 5px; }
.field-error { margin: 7px 0 0; font-size: 14px; color: var(--bad); font-weight: 600; }
/* A select with its chevron: <div class="select"><select>…</select>{{icon "chevron-down"}}</div> */
.select { position: relative; }
.select > .icon { position: absolute; right: 14px; top: 14px; pointer-events: none; color: var(--muted); }
/* An input with a leading icon: <label class="input-icon">{{icon "search"}}<input></label> */
.input-icon {
	display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
	background: var(--field); border: 1px solid var(--fieldLine); border-radius: var(--r-ctl); color: var(--muted);
}
.input-icon:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.field > .input-icon { display: flex; margin-bottom: 0; font-weight: 400; }
.input-icon > input {
	flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; outline: 0;
}
.input-icon > input::-webkit-search-cancel-button { filter: grayscale(1); }
.input-icon > input:focus-visible { outline: 0; }
/* The form row of a single field and its button. */
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.inline-form > .field { flex: 999 1 360px; min-width: 0; }
/* Write-only secret values: never echoed, masked while typed. */
.secret-input { font-family: var(--mono); font-size: 15px; -webkit-text-security: disc; }

/* Checkbox and radio with their label. */
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 16px; }
.check.top { align-items: flex-start; }
.check.top > input { margin-top: 2px; }
.check .muted { font-size: 14.5px; }
/* A list of checkable rows: <div class="checklist"><label class="check">… */
.checklist { border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.checklist > .check { min-height: 56px; padding: 10px 16px; flex-wrap: wrap; gap: 8px 14px; border-top: 1px solid var(--line); }
.checklist > .check:first-child { border-top: 0; }
.checklist > .check:has(input:checked) { background: var(--accentBg); }
.checklist .end { margin-left: auto; font-size: 14px; color: var(--text2); }

/* Option cards: radio (or checkbox) cards, side by side. */
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.option {
	flex: 1 1 300px; min-width: 0; display: flex; gap: 12px; align-items: flex-start;
	padding: 14px 16px; border-radius: var(--r-ctl); border: 1px solid var(--fieldLine); background: transparent; cursor: pointer;
}
.option > input { margin-top: 2px; }
.option:hover { border-color: var(--chipLine); }
.option:has(input:checked) { border-color: var(--accentLine); background: var(--accentBg); }
.option-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 600; font-size: 15.5px; color: var(--text); }
.option-text { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--text2); }
/* The risky choice: red even unchecked. */
.option.danger { border: 2px solid var(--badLine); background: var(--badBg); }
.option.danger > input { accent-color: var(--bad); }
.option.danger:has(input:checked) { border-color: var(--bad); background: var(--badBg); }
.option.danger .option-title { color: var(--bad); }
.option.lg { padding: 18px 20px; border-radius: 14px; gap: 14px; }

/* ---- Tables ------------------------------------------------------- */
/* <div class="table-box"><table class="table">…: scrolls sideways inside. */
.table-box { background: var(--card); border: var(--cardBorder); border-radius: var(--r-card); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; color: var(--text); }
.table.wide { min-width: 980px; }
.table th {
	text-align: left; padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--muted);
	border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 14px 20px; vertical-align: top; font-size: 15px; line-height: 1.45; border-top: 1px solid var(--line); }
.table tbody tr:first-child td { border-top: 0; }
.table .num { text-align: right; }
.table td .muted { font-size: 14px; }
.table td form { display: inline-flex; margin: 0; }
.table .cell-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Key/value lists: <dl class="dl"><div><dt>…</dt><dd>…</dd></div> */
.dl { margin: 0; padding: 4px 16px; background: var(--card); border: var(--cardBorder); border-radius: 14px; font-size: 15px; line-height: 1.45; }
.dl > div { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dl > div:first-child { border-top: 0; }
.dl dt { flex: 0 0 110px; color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---- Notes, hints, flashes --------------------------------------- */
/* .note (role=note): a tinted box. .hint: an icon and muted text. */
.note {
	margin: 0; padding: 12px 14px; border-radius: var(--r-ctl);
	background: var(--neutralBg); color: var(--text2); font-size: 15px; line-height: 1.55;
	display: flex; gap: 10px; align-items: flex-start;
}
.note > .icon { margin-top: 3px; }
.note strong { color: var(--text); }
.note.warn { background: var(--warnBg); border: 1px solid var(--warnLine); }
.note.warn > .icon, .note.warn .lead { color: var(--warn); }
.note.bad { background: var(--badBg); border: 1px solid var(--badLine); }
.note.bad > .icon, .note.bad .lead { color: var(--bad); }
.note.ok { background: var(--okBg); }
.note.ok > .icon { color: var(--ok); }
.note.accent { background: var(--accentBg); border: 1px solid var(--accentLine); }
.note.accent > .icon { color: var(--accentText); }
.note .grow { flex: 999 1 280px; min-width: 0; }
.note.split { flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hint { margin: 14px 4px 0; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.hint > .icon { margin-top: 1px; }
.flash {
	margin: 0 0 24px; padding: 12px 16px; border-radius: var(--r-ctl);
	background: var(--okBg); color: var(--ok); font-weight: 600; font-size: 15px;
	display: flex; gap: 10px; align-items: center;
}
.flash.bad { background: var(--badBg); color: var(--bad); }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ok); }
.status-line.bad { color: var(--bad); }
.page > .note, .page > .flash + .note { margin-bottom: 0; }
.page-head ~ .note { margin-top: 24px; }

/* ---- Empty states ------------------------------------------------- */
.empty { text-align: center; padding: 48px 24px; }
.empty > .icon { width: 40px; height: 40px; color: var(--muted); stroke-width: 1.6; margin-bottom: 14px; }
.empty h2 { font-size: 21px; }
.empty p { margin: 8px auto 0; max-width: 32rem; color: var(--muted); font-size: 15.5px; }
.empty .actions { justify-content: center; margin-top: 20px; }
.empty.sm { padding: 22px; text-align: left; }
.empty.sm p { margin: 4px 0 0; max-width: none; }

/* ---- Pager -------------------------------------------------------- */
.pager { margin-top: 28px; display: flex; justify-content: center; align-items: center; gap: 16px; font-size: 14.5px; color: var(--muted); }
.pager .button { background: var(--card); border: var(--cardBorder); font-weight: 500; }

/* ---- Filters (above a list) -------------------------------------- */
.filters { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters > .input-icon { flex: 1 1 320px; }
.filters .select select { width: auto; min-width: 9rem; }
.filters form { margin: 0; }
/* A quick filter: dashed pill, filled when on (aria-current / aria-pressed). */
.pill-toggle {
	height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
	background: transparent; border: 1px dashed var(--chipLine); border-radius: var(--r-pill);
	font: inherit; font-size: 15px; color: var(--text2); text-decoration: none; cursor: pointer;
}
.pill-toggle:hover { color: var(--text); text-decoration: none; border-color: var(--muted); }
.pill-toggle[aria-current="true"], .pill-toggle[aria-pressed="true"] {
	border-style: solid; border-color: var(--accentLine); background: var(--accentBg); color: var(--accentText); font-weight: 600;
}
.pill-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ---- Two columns: main and a rail (stacks on narrow screens) ---------- */
.with-rail { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 48px; }
.with-rail > .main { flex: 999 1 560px; min-width: 0; }
.with-rail > .rail { flex: 1 1 300px; max-width: 360px; min-width: 0; }
.rail h2 { font-size: 19px; }

/* ---- Responsive rows --------------------------------------------- */
@media (max-width: 640px) {
	.page-head > :first-child { flex-basis: 100%; }
	.row { padding: 14px 16px; gap: 8px 14px; }
	.row-main { flex-basis: calc(100% - 50px); }
	.row-status { flex: 1 1 auto; }
	.row-nums { flex: 0 0 auto; }
	.row-when { flex: 0 0 auto; }
	.card.pad { padding: 18px 16px 20px; }
	.card-head { padding: 16px 16px 4px; }
	.filters .select, .filters .select select { flex: 1 1 auto; width: 100%; }
	.filters > .select { flex: 1 1 40%; }
	.seg.scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
	.seg.scroll > * { white-space: nowrap; }
}

/* schedules & secrets (the scheduled-run pages and the secrets pages) */
/* Columns of a row: a label above a value ("Next run", "Last run"). */
.row-icon.off { color: var(--muted); }
.row-col { flex: 0 0 160px; min-width: 0; }
.row-col.lg { flex-basis: 220px; }
.row-label { font-size: 14px; color: var(--muted); }
.row-value { margin-top: 2px; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.row-chips { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.row-when-text { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-detail { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row-line.sched { margin-top: 4px; gap: 4px 10px; font-size: 15.5px; color: var(--text); }
.row-line.sched code { font-size: 13.5px; padding: 1px 6px; }
.row-tz { font-size: 14.5px; color: var(--muted); }
.row-actions { align-items: center; gap: 8px 14px; }
/* A note across a row, below its parts (e.g. why it turned off). */
.row > .note { flex: 1 1 100%; margin-left: 60px; min-width: 0; }
a.chip { text-decoration: none; }
a.chip:hover { text-decoration: underline; color: inherit; }
.chip.ok:is(a):hover { color: var(--ok); }
.chip.bad:is(a):hover { color: var(--bad); }
.chip.warn:is(a):hover { color: var(--warn); }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.state-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
/* Where a secret can be used: a fieldset per kind of run; its allowed
   requests: rows of method, path and "Remove". */
.scope-kind { border: 0; margin: 0; padding: 0; min-width: 0; }
.scope-kind + .scope-kind, .form-card > .help + .scope-kind { margin-top: 22px; }
.form-card > .title-line + .help, .form-card > h2 + .help { margin-top: 6px; }
.scope-title { padding: 0; font-weight: 600; font-size: 16px; }
.scope-kind > .help { margin-top: 4px; }
.scope-kind > .checklist { margin-top: 10px; }
.rule-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.rule-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rule-row:not(:has(.rule-remove)) { grid-template-columns: 132px minmax(0, 1fr); }
.rule-remove { min-height: 44px; font-size: 15px; color: var(--text2); }
.where-line + .where-line { margin-top: 2px; }
@media (max-width: 640px) {
	.rule-row, .rule-row:not(:has(.rule-remove)) { grid-template-columns: 110px minmax(0, 1fr); }
	.rule-remove { grid-column: 2; }
}

/* A form of titled cards: <form class="form-stack"><section class="card
   form-card"><h2>…</h2>… (a fieldset's legend is its title). */
.form-stack { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.form-stack > * + *, .form-stack > .card + .card, .rail-stack > * + *, .rail-stack > .card + .card { margin-top: 0; }
.fields > * + *, .fields > .field + .field { margin-top: 0; }
code.step-text { background: none; padding: 0; font-size: 13px; }
.rule-table .table th[scope="row"], .rule-table .table td { vertical-align: middle; }
.form-card { padding: 22px 26px; }
.form-card > h2, .form-card > legend, .title-line > h2 { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.3; }
.form-card > legend { float: left; width: 100%; margin-bottom: 16px; }
.form-card > legend + * { clear: both; }
.form-card > :is(h2, legend, .title-line) + :is(.field, .fields, .note, .checklist, .radios, .options) { margin-top: 18px; }
.form-card > legend + .help { margin-top: -10px; }
.form-card > .help + .checklist, .form-card > .field-error + .checklist { margin-top: 14px; }
.form-card > .field + .note, .form-card > .note + .field { margin-top: 16px; }
.title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.title-line > .muted { font-size: 14.5px; }
.field.narrow-field { max-width: 360px; }
.fields.wide-first { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.fields.narrow-cols { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.top-gap { margin-top: 22px; }
.check.top-gap { margin-top: 16px; }
.options.col { flex-direction: column; gap: 8px; }
.options.col > .option { flex: none; padding: 11px 14px; }
.options.col .option-text { margin-top: 2px; font-size: 14px; }
.radios { display: flex; flex-direction: column; gap: 4px; }
.indent { margin-left: 32px; }
.check-name { font-size: 15px; font-weight: 500; background: none; padding: 0; color: var(--text); }
.checklist .end code { background: none; padding: 0; font-size: 13.5px; }
[aria-invalid="true"] { border-color: var(--bad); }
.actions-note { margin-left: auto; font-size: 14px; color: var(--muted); }
.form-card textarea:disabled { background: transparent; border-style: dashed; border-color: var(--chipLine); resize: none; cursor: not-allowed; }
.form-card .label.muted, .form-card label.muted { color: var(--muted); }

/* A computed preview below fields: a schedule's next runs, an env name. */
.preview { margin-top: 20px; padding: 16px 18px; border-radius: var(--r-ctl); background: var(--raised); }
.preview-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.preview-head > .icon { color: var(--accentText); }
.preview-head .muted { font-size: 14.5px; }
.preview-title { font-weight: 600; font-size: 16.5px; }
.preview-label { margin-top: 12px; font-size: 14px; color: var(--muted); }
.preview.inline { margin-top: 14px; padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; color: var(--text2); }
.preview.inline code { font-size: 14.5px; font-weight: 500; padding: 2px 8px; }
/* Small pills of values, e.g. fire times; the first stands out. */
.pills { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills > li {
	padding: 5px 12px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line);
	font-size: 14.5px; color: var(--text2); font-variant-numeric: tabular-nums;
}
.pills > li:first-child { color: var(--text); font-weight: 600; }

/* A table of checkboxes in a form (outcome × channel rules): <div class="table-box rule-table"><table class="table">. */
.rule-table .table { min-width: 360px; font-size: 15px; }
.rule-table .table thead th { background: var(--raised); color: var(--text2); padding: 10px 16px; }
.rule-table .table th[scope="row"] { padding: 4px 16px; text-align: left; font-weight: 500; border-top: 1px solid var(--line); }
.rule-table .table td { padding: 0; }
.rule-table .table tbody tr:first-child th { border-top: 0; }
.rule-table .center { text-align: center; width: 120px; }
.rule-table.table-box { margin-top: 8px; background: transparent; border: 1px solid var(--line); border-radius: var(--r-ctl); }
label.cell-check { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.form-card > .help.indent { margin-top: 8px; }

/* The page heading of a detail page: a status line above the title. */
.page-head.top { align-items: flex-start; }
.page-head.top h1 { margin-top: 12px; font-size: 34px; line-height: 1.2; }
.page-head.top .lede { margin-top: 10px; font-size: 16px; color: var(--text2); }
.page-head.top form { margin: 0; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14.5px; }
.with-rail.top-gap, .page-head + .with-rail, .note + .with-rail { margin-top: 32px; }
.rail-stack { display: flex; flex-direction: column; gap: 28px; }
.rail .card, .rail .dl { margin-top: 12px; }
.rail-stack > .card { margin-top: 0; }
.rail h2 + p { margin: 4px 0 0; }
.rail h2 + p { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.rail .hint { margin-top: 14px; }
/* Compact linked rows in a rail (recent runs). */
.rows.compact > li { border-top: 1px solid var(--line); }
.rows.compact > li:first-child { border-top: 0; }
.run-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 16px; color: var(--text); text-decoration: none; }
.run-link:hover { background: var(--neutralBg); color: var(--text); text-decoration: none; }
.run-link > .chip { flex: none; }
.run-link-text { flex: 1; min-width: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.run-link-text .row-detail { margin-top: 0; }
.rail .dl { font-size: 14.5px; }
.rail .dl dt { flex-basis: 96px; }
.rail .dl > div { padding: 9px 0; }
/* A destructive action at the end of a rail. */
.danger-zone.card.pad { padding: 16px 18px; }
.rail .danger-zone h2, .danger-zone h2 { font-family: var(--sans); font-size: 16px; font-weight: 600; }
.danger-zone p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--text2); }
.danger-zone .note { margin-top: 12px; font-size: 14.5px; }
/* A confirmation behind a summary button: <details class="disclose"><summary class="button danger">… */
.disclose { margin-top: 12px; }
.disclose > summary { list-style: none; }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > form { margin: 12px 0 0; }
.button.danger.fill { background: var(--bad); border-color: var(--bad); color: var(--bg); font-weight: 600; white-space: normal; height: auto; min-height: 44px; padding: 8px 18px; text-align: left; }
.button.danger.fill:hover { background: var(--bad); color: var(--bg); opacity: .9; }

/* Numbered steps in a card: "What a run sees". */
.steps-list { list-style: none; margin: 0; padding: 4px 16px; font-size: 14.5px; line-height: 1.5; }
.steps-list > li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps-list > li:first-child { border-top: 0; }
.steps-list > li > span:last-child { min-width: 0; }
.steps-list strong { display: block; font-weight: 600; color: var(--text); }
.step-n {
	flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); color: var(--text2);
	font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-text { display: block; margin-top: 3px; color: var(--text2); overflow-wrap: anywhere; }
.step-text code { font-size: 13px; background: none; padding: 0; }

/* Side-by-side explainer cards; .card.tint-bad for the risky one. */
.cards { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.cards > * { flex: 1 1 380px; min-width: 0; }
.cards .card.pad { padding: 18px 22px; }
.card.tint-bad { background: var(--badBg); border: 1px solid var(--badLine); }
.card-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.card-title-line .muted, .card-title-line .text2 { font-size: 14px; }
.cards p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--text2); }
.card.tint-bad p { color: var(--text); }
.section-title { margin: 0 4px 12px; font-size: 21px; }

/* A table's name cell with an icon tile and a line below. */
.table th[scope="row"] { text-align: left; font-weight: 400; vertical-align: top; }
.table tr.bad { background: var(--badBg); }
.cell-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.cell-name:hover { color: var(--accentText); }
.cell-name code { font-size: 15px; font-weight: 500; background: none; padding: 0; color: inherit; }
.cell-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--raised); color: var(--text2); display: flex; align-items: center; justify-content: center; flex: none; }
.cell-sub { margin: 4px 0 0 42px; font-size: 14px; color: var(--muted); }
.cell-sub code { font-size: 13px; background: none; padding: 0; }
.cell-warn { margin-top: 6px; max-width: 200px; font-size: 14px; line-height: 1.4; color: var(--bad); font-weight: 500; }
.table .nowrap, .table td code, .table td > .muted { white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.cards > * + * { margin-top: 0; }
.table td > .muted:not(:first-child) { margin-top: 3px; }

/* The secrets list: a fixed layout of five columns, every cell wraps, so
   it fits the content column without scrolling from 1024px on. */
.secrets-table { table-layout: fixed; min-width: 760px; }
.secrets-table .col-name { width: 27%; }
.secrets-table .col-mode { width: 22%; }
.secrets-table .col-where { width: 22%; }
.secrets-table .col-used { width: 15%; }
.secrets-table .col-when { width: 14%; }
.secrets-table th, .secrets-table td { padding-left: 16px; padding-right: 16px; }
.secrets-table th[scope="row"] { white-space: normal; }
.secrets-table .cell-name { display: flex; min-width: 0; }
.secrets-table .cell-name code, .secrets-table .cell-sub code, .secrets-table td code { white-space: normal; overflow-wrap: anywhere; }
.secrets-table .cell-sub { overflow-wrap: anywhere; }
.cell-upstream { margin-top: 8px; overflow-wrap: anywhere; }
.cell-upstream code { font-size: 13.5px; }
.cell-upstream .muted { display: block; margin-top: 3px; font-size: 14px; }
.used-line { overflow-wrap: break-word; }
.used-line + .used-line { margin-top: 2px; }
.cell-facts { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.secrets-table .cell-facts code { font-size: 13px; background: none; padding: 0; color: var(--text2); white-space: nowrap; }
.secrets-table .where-line { overflow-wrap: break-word; }
/* Phones: every row is a card; a cell's label (data-label) is its column's. */
@media (max-width: 640px) {
	.table-box:has(> .secrets-table) { overflow: visible; background: none; border: 0; }
	.secrets-table, .secrets-table tbody, .secrets-table tr, .secrets-table th, .secrets-table td { display: block; min-width: 0; }
	.secrets-table { table-layout: auto; }
	.secrets-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.secrets-table tr { padding: 14px 16px; background: var(--card); border: var(--cardBorder); border-radius: var(--r-card); }
	.secrets-table tr.bad { background: var(--badBg); }
	.secrets-table tr + tr { margin-top: 12px; }
	.secrets-table th[scope="row"], .secrets-table td, .secrets-table th:first-child, .secrets-table td:first-child { padding: 0; border: 0; }
	.secrets-table td { position: relative; margin-top: 12px; padding-left: 94px; }
	.secrets-table td::before { content: attr(data-label); position: absolute; left: 0; top: 0; width: 84px; font-size: 14px; color: var(--muted); line-height: 1.45; }
	.secrets-table .cell-warn { max-width: none; }
}
.option-text.strong-text { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--text); }
.option-title > .icon { color: var(--accentText); }
.option.danger .option-title > .icon { color: var(--bad); }
.option.lg .option-title { font-size: 17px; }
.option-text code { font-size: 13px; }
h1 .title-code { font-size: .8em; font-weight: 500; background: none; padding: 0; color: var(--text); }
.dl.flat { margin-top: 16px; background: var(--raised); border: 0; }
.form-card > .title-line + .dl { margin-top: 16px; }

@media (max-width: 640px) {
	.row > .note { margin-left: 0; }
	.row-col, .row-col.lg { flex: 1 1 40%; align-self: flex-start; }
	.form-card { padding: 18px 16px 20px; }
	.fields.wide-first { grid-template-columns: minmax(0, 1fr); }
	.indent { margin-left: 0; }
	.rule-table .table { min-width: 0; }
	.rule-table .center { width: 76px; }
	.rule-table .table thead th { padding: 10px 8px; }
	.rule-table .table th[scope="row"] { padding: 4px 8px 4px 12px; white-space: normal; }
	.actions-note { margin-left: 0; flex-basis: 100%; }
	.page-head.top h1 { font-size: 28px; }
}
.step-text.text-bad { color: var(--bad); }
.table-box { position: relative; } /* keeps .sr-only cells inside its scroll box */

/* settings & admin ---------------------------------------------------
   Components of the settings, inbox, admin and sign-in pages (UI.md). */

/* A section's parts below its intro, and forms in cards. */
.section-body, .section-card { margin-top: 16px; }
.form-body { margin-top: 14px; }
.form-body legend.label { margin-bottom: 8px; }
.form-body fieldset + .inline-form, .form-actions { margin-top: 18px; }
.inline-form > .field { margin-bottom: 0; }
.card-note { margin: 0 22px 20px; }
.empty.sm h2 { font-size: 18px; }
.empty.sm.flush { padding: 16px 0 8px; }
.end-note { margin: 20px 4px 0; font-size: 14.5px; color: var(--muted); }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.actions.sm { gap: 8px; margin-top: 10px; }

/* Two columns that stack: <div class="cols"><… class="col-main">…<… class="col-side"> */
.cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.page-head + .cols { margin-top: 40px; }
.cols > .card + .card, .cards > .card + .card { margin-top: 0; }
.card.pad > h2 { margin-bottom: 0; }
.cols > .col-main { flex: 999 1 520px; min-width: 0; }
.cols > .col-side { flex: 1 1 360px; min-width: 0; }

/* A card's head, body and a tinted foot with an explanation and an action. */
.card-head h2 { font-size: 21px; margin: 0; }
.card-head p { max-width: 720px; }
.card-foot {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
	padding: 16px 24px; border-top: 1px solid var(--line);
}
.card-foot > p { flex: 999 1 300px; margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.card-foot form { margin: 0; }

/* A linked account's card (accounts.html): head, facts, foot. .off: not linked. */
.link-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 20px 24px; }
.link-title { flex: 999 1 200px; min-width: 0; }
.link-title h2 { font-size: 21px; margin: 0; }
.link-title p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.link-title p.text2 { font-size: 15px; color: var(--text2); }
.link-card .card-foot { background: var(--raised); }
.link-card .card-foot > p { font-size: 15px; color: var(--text2); }
.card.link-card.off { background: transparent; border: 1px dashed var(--chipLine); }
.link-help { margin: 0 24px 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.facts { margin: 0; display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); }
.facts > div { flex: 1 1 160px; padding: 14px 24px; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd {
	margin: 3px 0 0; display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere;
	font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }

/* "What linking does": points with an icon badge. */
.benefits-rail h2 { font-size: 19px; }
.benefits-rail h3 { margin-top: 20px; }
.benefits { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.benefits > li { display: flex; gap: 12px; align-items: flex-start; }
.benefit-icon {
	flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
	background: var(--accentBg); color: var(--accentText); display: flex; align-items: center; justify-content: center;
}
.benefit-title { display: block; font-weight: 600; font-size: 15.5px; color: var(--text); }
.benefit-text { display: block; margin-top: 2px; font-size: 15px; line-height: 1.55; color: var(--text2); }
.benefits-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* A matrix of checkboxes (the notification rules): a rowgroup per source,
   44px cells. */
.matrix-box { overflow-x: auto; margin-top: 12px; }
.matrix { width: 100%; min-width: 440px; border-collapse: collapse; }
.matrix thead { background: var(--raised); }
.matrix thead th { padding: 11px 16px; text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.matrix thead th:first-child, .matrix tbody th { padding-left: 24px; }
.matrix tbody { border-top: 1px solid var(--line); }
.matrix tbody th { padding: 12px 16px 12px 24px; text-align: left; vertical-align: top; font-weight: 600; font-size: 15.5px; color: var(--text); white-space: nowrap; }
.matrix td { padding: 2px 16px; font-size: 15.5px; color: var(--text); }
.matrix .cell-check { width: 120px; padding: 0 8px; text-align: center; }
.matrix thead .cell-check { color: var(--text2); text-align: center; }
.matrix .cell-check label { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.th-icon { display: inline-flex; align-items: center; gap: 8px; }
.th-icon > .icon { color: var(--muted); }

/* A list in a padded card (push devices): an icon, then the text and actions. */
.card.pad > h2 + p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.push { margin-top: 16px; }
.push .help:empty { display: none; }
.push .note { margin-top: 14px; }
.note-title { margin: 0; font-weight: 600; color: var(--text); }
.note ol { margin: 6px 0 0; padding-left: 20px; }
.note ol .icon { vertical-align: -2px; }
.note > div { min-width: 0; }
.note > div > .help { margin: 6px 0 0; }
.list { list-style: none; margin: 12px 0 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-main { flex: 1 1 auto; min-width: 0; }
.list-main .row-title { font-size: 16px; }
.list-main .status-line { margin: 6px 0 0; }

/* Inbox rows: an unread dot, the title as the open button. */
.dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.unread > .dot { background: var(--accent); }
.inbox-row .row-main form { margin: 0; }
button.row-title {
	padding: 0; border: 0; background: none; font: inherit; font-size: 16.5px; text-align: left; cursor: pointer;
	font-weight: 500; color: var(--text2); overflow-wrap: anywhere;
}
.unread button.row-title { font-weight: 600; color: var(--text); }
button.row-title:hover { color: var(--accentText); text-decoration: underline; }
.row-chip { flex: 0 0 130px; }
.inbox-row .row-when { flex-basis: 80px; color: var(--muted); }
.row-end { flex: 0 0 112px; display: flex; justify-content: flex-end; font-size: 14px; }
.row-end form { margin: 0; }

/* Table cells of the admin lists. */
.user-cell { display: flex; gap: 12px; align-items: flex-start; min-width: 220px; }
.user-cell .muted { font-size: 14px; }
.user-cell .row-icon { flex-basis: 32px; width: 32px; height: 32px; }
code.id { display: inline-block; margin-top: 4px; padding: 0; background: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.table td > .muted { display: block; margin-top: 4px; }
.table td > .cell-note { white-space: normal; min-width: 120px; }
.table .cell-actions { align-items: center; }
.table .cell-actions > .muted { font-size: 14px; }
.section-head + .note { margin-top: 14px; }
.note + .table-box, .note + .card { margin-top: 16px; }

/* Confirm a destructive action in place: <details class="confirm"><summary
   class="button danger">Delete…</summary><div class="confirm-panel">… */
.confirm { position: relative; }
.confirm > summary { list-style: none; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { display: none; }
.confirm-panel {
	max-width: 22rem; padding: 12px 14px; border-radius: var(--r-ctl);
	background: var(--badBg); border: 1px solid var(--badLine); color: var(--text); font-size: 14.5px; line-height: 1.5;
	white-space: normal;
}
.confirm-panel p { margin: 0 0 10px; }
.confirm-panel form { margin: 0; }

/* Filters as pills with counts, with a note at the end. */
.filters.split { justify-content: space-between; gap: 12px 24px; margin-top: 32px; }
.filter-label { font-size: 15px; color: var(--muted); margin-right: 4px; align-self: center; }
.pill-toggle .seg-count { font-weight: 500; }

/* Cards in a column (dead deliveries): main part and an action. */
.dead-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.filters + .section-body { margin-top: 24px; }
.card.dead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; padding: 20px 24px; }
.card.dead > form { flex: 0 0 auto; margin: 0; }
.dead-main { flex: 999 1 560px; min-width: 0; }
.dead-key { min-width: 0; font-size: 15.5px; font-weight: 500; background: none; padding: 0; overflow-wrap: break-word; }
.facts-inline { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: 15px; }
.facts-inline > div { min-width: 0; }
.facts-inline dt { font-size: 14px; color: var(--muted); }
.facts-inline dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.facts-inline a { font-weight: 600; }
.dead-error { margin-top: 14px; font-size: 14px; }
.dead-error pre { margin-top: 4px; border-radius: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The sign-in pages (Page.Bare): a card in the middle, the brand mark on top. */
.page.bare { max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; min-height: 560px; }
.page.bare > .flash { width: 100%; max-width: 440px; }
.auth-card {
	width: 100%; max-width: 440px; padding: 40px 36px 32px; text-align: center;
	background: var(--card); border: var(--cardBorder); border-radius: 20px;
}
.auth-card.sm { max-width: 380px; padding: 32px 32px 28px; }
.auth-card h1 { margin-top: 18px; font-size: 32px; }
.auth-card.sm h1 { margin-top: 16px; font-size: 26px; line-height: 1.2; }
.auth-lede { margin: 10px 0 0; font-size: 16.5px; line-height: 1.55; color: var(--text2); }
.auth-card.sm .auth-lede { margin-top: 8px; font-size: 15.5px; color: var(--muted); }
.auth-lede strong { color: var(--text); }
.auth-card > .button { margin-top: 28px; }
.auth-card.sm > .button { margin-top: 22px; }
.auth-note { margin: 18px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.auth-card .mark { display: block; margin: 0 auto; }
.auth-card.sm .mark { width: 36px; height: 36px; }
.auth-card .mark .logo-bg { fill: var(--logoBg); }
.auth-card .mark .logo-fg { fill: var(--logoFg); }
.auth-icon {
	display: flex; width: 52px; height: 52px; margin: 0 auto; border-radius: 14px;
	align-items: center; justify-content: center; background: var(--badBg); color: var(--bad);
}

@media (max-width: 640px) {
	/* The sub-navigation scrolls inside the column instead of overflowing it. */
	.page-head > .seg.scroll { min-width: 0; flex: 1 1 100%; }
	.page-head > .seg.scroll > * { flex: 1 0 auto; padding: 8px 12px; font-size: 14.5px; }
	.link-head, .card-foot { padding-left: 16px; padding-right: 16px; }
	.facts > div { padding: 12px 16px; border-right: 0; border-top: 1px solid var(--line); flex-basis: 100%; }
	.facts > div:first-child { border-top: 0; }
	.link-help { margin: 0 16px 16px; }
	.card-note { margin: 0 16px 16px; }
	.matrix { min-width: 0; }
	.matrix thead th { padding: 10px 8px; }
	.matrix thead th:first-child, .matrix tbody th { padding-left: 16px; }
	.matrix tbody th { padding-right: 8px; white-space: normal; }
	.matrix td { padding: 2px 8px; }
	.matrix .cell-check { width: 60px; padding: 0 4px; }
	.matrix thead .cell-check .th-icon { flex-direction: column; gap: 2px; }
	.row-chip, .inbox-row .row-when, .row-end { flex: 0 0 auto; }
	.inbox-row .row-main { flex-basis: calc(100% - 74px); }
	.inbox-row .row-chip { margin-left: 24px; }
	.row-end { margin-left: auto; }
	.card.dead { padding: 18px 16px; }
	.auth-card { padding: 32px 22px 26px; }
}

/* run pages */
/* A strip of numbers: <dl class="stats"><div><dt>Elapsed</dt><dd>4m 12s
   <span class="unit">…</span></dd></div>…</dl>; .grow for a wider part
   (with a <progress>). */
.stats { margin: 0; display: flex; flex-wrap: wrap; background: var(--card); border: var(--cardBorder); border-radius: var(--r-card); overflow: hidden; }
.stats > div { flex: 1 1 150px; min-width: 0; padding: 14px 22px; border-right: 1px solid var(--line); }
.stats > div.grow { flex-basis: 200px; }
.stats > div:last-child { border-right: 0; }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd {
	margin: 3px 0 0; display: flex; align-items: center; gap: 12px; min-height: 31px;
	font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stats .unit { font-size: 15.5px; font-weight: 400; color: var(--muted); }
.stats dd > progress { flex: 1; min-width: 40px; }
/* A link out of the platform, with its icon after the text. */
a.ext { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
/* Error pages (404, 403, 500): an empty state with a heading. */
.error-page { max-width: 640px; margin: 24px auto 0; }
.error-page h1 { font-size: 30px; }
.error-page .error-msg { font-size: 16.5px; }

/* ---- Choices that show their own fields (no JS) ------------------- */
/* <div class="reveal">: radios .reveal-1, .reveal-2, .reveal-3 in a
   child fieldset or .options; children .reveal-when.when-N show only
   while radio N is checked. Nests (each box looks at its own children);
   without :has everything shows. The server reads only the chosen part. */
.reveal:has(> :is(fieldset, .options) .reveal-1:checked) > .reveal-when:not(.when-1),
.reveal:has(> :is(fieldset, .options) .reveal-2:checked) > .reveal-when:not(.when-2),
.reveal:has(> :is(fieldset, .options) .reveal-3:checked) > .reveal-when:not(.when-3) { display: none; }
.reveal > .reveal-when, .reveal > fieldset + .field { margin-top: 20px; }
/* A segmented choice of radios: <div class="seg choice"><label><input
   type="radio">Label</label>…</div>. */
.seg > label {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px;
	padding: 8px 18px; border-radius: var(--r-pill); color: var(--text2); font-weight: 500; font-size: 15px; line-height: 1.3; cursor: pointer;
}
.seg.sm > label { padding: 6px 14px; font-size: 14.5px; }
.seg > label > input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg > label:hover { color: var(--text); }
.seg > label:has(input:checked) { background: var(--segOn); color: var(--text); font-weight: 600; box-shadow: var(--segShadow); }
.seg > label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.field > .seg.choice { display: flex; width: fit-content; max-width: 100%; }
/* A code editor: a monospace textarea that keeps its lines. */
textarea.code-editor {
	display: block; width: 100%; min-height: 18rem; font-family: var(--mono); font-size: 14px; line-height: 1.6;
	tab-size: 4; white-space: pre; overflow-wrap: normal; overflow-x: auto; background: var(--codeBg);
}
/* A command's reference in a rail: usage, options, codes, examples. */
.ref-card { font-size: 14.5px; line-height: 1.5; }
.ref-card h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 600; }
.ref-card h3 code { font-size: 13.5px; }
.ref-card pre { font-size: 12.5px; line-height: 1.55; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ref-usage { margin-bottom: 12px; }
.ref-list { margin: 0; }
.ref-list > div { display: grid; grid-template-columns: minmax(0, 7.2em) minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.ref-list > div:first-child { border-top: 0; }
.ref-list dt code { font-size: 12.5px; background: none; padding: 0; color: var(--text); }
.ref-list dd { margin: 0; color: var(--text2); }
.ref-list.codes > div { grid-template-columns: 1.6em minmax(0, 1fr); }
.ref-list.codes dt { font-family: var(--mono); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ref-note { margin: 8px 0 0; color: var(--text2); }
.ref-note code { font-size: 12.5px; }
.ref-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ref-foot > p:first-child { margin: 0 0 8px; font-weight: 600; }
.ref-foot .help { margin-top: 8px; }
/* The kind of a run in its row ("Script · 3 sessions"). */
.row-kind { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.row-kind > .icon { color: var(--muted); }
