/* the scrollbar's place is always kept, so the header doesn't jump between long and short pages */
html { scrollbar-gutter: stable; }
/* ---- themes: light (default) and dark grey; with no choice in Settings it follows the system ----
   Borders use --line: black in light, #3A3C41 in dark. */
:root {
  --paper: #F5F5F4; --surface: #FFFFFF; --ink: #242424; --soft: #424242; --muted: #616161;
  --rule: #E3E3E0; --grid: #EBEBE8; --hover: #F0F0EE; --code-bg: #1E1E22; --code-fg: #E9E9EC; --line: #D6D6D2;
  --accent: #0E7C86; --hl: #0E7C86; --hl-bg: #E6F2F3; --on-hl: #FFFFFF; --alert-bg: #FFF8F0; --ok-fg: #2E7D4F; --danger: #C4314B;
  --st-failed: #C4314B; --st-late: #6E52B8; --st-missed: #A3366F; --st-odd: #8F5A00;
  --st-running: #2F6FD6; --st-new: #8A8A8A; --st-ok: #2E7D4F; --st-paused: #8A8A8A;
  --radius: 6px; --radius-card: 8px;
  --mono: "Martian Mono", ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #1F2023; --surface: #27282C; --ink: #EDEDEF; --soft: #D0D0D5; --muted: #A0A0A8;
  --rule: #34353A; --grid: #303136; --hover: #2F3035; --code-bg: #18191C; --code-fg: #E4E4E7; --line: #3A3B41;
  --accent: #4FC1C9; --alert-bg: #2E2A24; --ok-fg: #5CC98E; --danger: #FF8597; --hl: #4FC1C9; --hl-bg: #1E3436; --on-hl: #0E1A1B;
  --st-failed: #FF8597; --st-late: #B9A5FF; --st-missed: #F08CC0; --st-odd: #F0B455;
  --st-running: #8DB0FF; --st-new: #A0A0A8; --st-ok: #5CC98E; --st-paused: #A0A0A8;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #1F2023; --surface: #27282C; --ink: #EDEDEF; --soft: #D0D0D5; --muted: #A0A0A8;
    --rule: #34353A; --grid: #303136; --hover: #2F3035; --code-bg: #18191C; --code-fg: #E4E4E7; --line: #3A3B41;
    --accent: #4FC1C9; --alert-bg: #2E2A24; --ok-fg: #5CC98E; --danger: #FF8597; --hl: #4FC1C9; --hl-bg: #1E3436; --on-hl: #0E1A1B;
    --st-failed: #FF8597; --st-late: #B9A5FF; --st-missed: #F08CC0; --st-odd: #F0B455;
    --st-running: #8DB0FF; --st-new: #A0A0A8; --st-ok: #5CC98E; --st-paused: #A0A0A8;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Archivo, system-ui, sans-serif; font-size: 15px; line-height: 1.4; }
a { color: var(--ink); }
a:hover { color: var(--hl); }   /* not the Failed red: a link is not an error */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1320px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.topbar { border-bottom: 1px solid var(--line); }
/* the header stays at the top while the page scrolls (not on phones: there it is two or three rows high);
   app.js keeps --top-h at its height, so sticky side menus and #anchors stop below it */
.topbar { background: var(--paper); }
@media (min-width: 601px) { .topbar { position: sticky; top: 0; z-index: 40; } }
html { scroll-padding-top: calc(var(--top-h, 0px) + 12px); }
/* where you are: Jobs › Project › Job › Code (every part a link, the last one plain text) */
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 0 0 6px; padding: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
/* right under the header, close to the page title (the page's own 26px gap is too much for one small line) */
.main > .crumbs { margin: -14px 0 -12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); overflow-wrap: anywhere; }
.crumbs .sep { color: var(--rule); }
.topbar-in { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.3px; }
.brand-box { fill: var(--hl); }
.brand-pulse { stroke: var(--on-hl); }
.nav { display: flex; flex-wrap: wrap; gap: 22px; }
.nav a { text-decoration: none; color: var(--muted); padding: 4px 0; }
.nav a.active { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--hl); }
.spacer { flex: 1 1 auto; }
.who { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.btn { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn-dark { background: var(--hl); border-color: var(--hl); color: var(--on-hl); }   /* the main action */
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.btn-dark.btn-link:hover { color: var(--on-hl); }
.btn-small { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-danger { border-color: var(--line); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); }

.main { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 26px; }
.main > * { min-width: 0; }   /* wide tables scroll inside their box, not the page */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
h1 { margin: 6px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
h2 { margin: 0; font-size: 17px; font-weight: 700; }
.lede { margin: 10px 0 0; max-width: 760px; color: var(--soft); font-size: 17px; }
.mono { font-family: var(--mono); font-size: 13px; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.strong { font-weight: 600; }
.min0 { min-width: 0; }
.sq { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.error { color: var(--danger); font-weight: 600; }
.ok-note { color: var(--ok-fg); font-weight: 600; }
svg .grid { stroke: var(--grid); }
svg .label { fill: var(--muted); }

/* ---- "?" help bubbles ---- */
.tip { position: relative; display: inline-flex; vertical-align: baseline; margin-left: 5px; }
.tip-btn { position: relative; border: 0; background: transparent; color: var(--muted); padding: 0 1px;
  font: 600 12px/1 Archivo, sans-serif; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; opacity: .8; }
.tip-btn::after { content: ""; position: absolute; inset: -14px -12px; }  /* 44px touch target */
.tip-btn:hover, .tip-btn[aria-expanded="true"] { color: var(--ink); opacity: 1; }
.tip-pop { position: absolute; z-index: 20; top: calc(100% + 8px); left: -8px; width: max-content; max-width: min(300px, 80vw);
  background: var(--ink); color: var(--paper); padding: 10px 12px; font: 400 13px/1.45 Archivo, sans-serif; text-transform: none;
  letter-spacing: 0; white-space: normal; text-align: left; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.tip-pop[hidden] { display: none; }
.tip-pop ul { margin: 4px 0 0; padding-left: 16px; }

/* ---- dashboard ---- */
.today { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; }
.counts { display: flex; flex-wrap: wrap; gap: 22px; }
.count { display: flex; flex-direction: column; gap: 2px; min-width: 64px; }
.count-n { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1; }
.count-l { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); }
.jobs { border-top: 1px solid var(--line); }
.scroll { overflow-x: auto; position: relative; }   /* keeps .sr-only text inside the scroll box */
.table { min-width: 1150px; }
.tr { display: grid; grid-template-columns: 130px minmax(190px, 1.7fr) 230px 130px 170px 110px 120px; gap: 18px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
a.tr:hover { background: var(--hover); color: var(--ink); }
.th { padding: 10px 4px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.8px; color: var(--muted); text-transform: uppercase; }
.th > div { display: flex; align-items: center; }
.status { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.table .status, .tr.mini .status, .status-row .status { color: var(--ink) !important; font-weight: 500; }
.name { font-weight: 600; font-size: 16px; }
.empty { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

/* ---- forms: login, signup, account ---- */
.login { max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.login form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.login label { font-weight: 600; margin-top: 6px; display: flex; align-items: center; }
.login input:not([type=checkbox]) { height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; }
.login .btn { margin-top: 12px; height: 46px; }
.login.block { margin-top: 8px; }
.login h2 { display: flex; align-items: center; }
.digest { display: flex; flex-direction: column; gap: 8px; }
.digest .check { gap: 10px; min-height: 44px; }
.digest .check input { width: 18px; height: 18px; accent-color: var(--hl); }
.digest input[type=time] { width: 160px; }

/* ---- job detail ---- */
.job-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.meta { margin-top: 8px; display: block; line-height: 1.7; }
.meta .with-bi { display: inline-flex; vertical-align: middle; }
.meta .kind { color: var(--hl); font-weight: 600; }            /* what kind of job: the first thing in the line */
.job-head h1 { border-left: 4px solid var(--hl); padding-left: 12px; margin-left: -16px; }
@media (max-width: 720px) { .job-head h1 { margin-left: 0; } }
/* job page: the facts that matter, in one look, above the rhythm */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.fact { padding: 12px 16px; min-width: 0; border-left: 1px solid var(--rule); }
.fact:first-child { border-left: 0; }
.fact-k { font-family: var(--mono); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.fact-v { margin-top: 4px; font-size: 18px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.fact-n { margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; } .fact:nth-child(n+3) { border-top: 1px solid var(--rule); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.alert { border: 2px solid; background: var(--alert-bg); padding: 16px 20px; }
.alert-title { font-weight: 800; font-size: 19px; }
.alert-item { margin-top: 4px; color: var(--soft); }
.block { border-top: 1px solid var(--line); padding-top: 14px; }
.block h2 { margin-bottom: 8px; display: flex; align-items: center; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.big-rhythm { display: block; margin-top: 14px; }
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.grow { flex: 999 1 640px; min-width: 0; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.runs { min-width: 680px; }
.run { display: grid; grid-template-columns: 140px 110px 90px 90px minmax(0, 1fr); gap: 16px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--rule); }
.run.th { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rules { display: flex; flex-direction: column; }
.rule { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); min-height: 44px; }
.rule input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.rule .x { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rule .x input { width: 72px; height: 32px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 6px; font: inherit; font-size: 13px; }
.rule.has-del { grid-template-columns: 22px minmax(0, 1fr) auto 32px; }
.rule .rule-del { width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0; }
.rule .rule-del:hover { color: var(--st-failed); }
.rule-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.rule-add input, .rule-add select { height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; font-size: 13px; min-width: 0; }
.rule-add input[name=metric] { width: 150px; }
.rule-add input[name=threshold] { width: 120px; }
.rule .x-text input { width: 150px; }
@media (max-width: 480px) { .rule .x-text input { width: 110px; } }
.rule-add select { max-width: 100%; }
.rule-add .btn { margin-top: 0; }
.rules .btn, .stack .btn, .settings .btn { align-self: flex-start; margin-top: 12px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.stack { display: flex; flex-direction: column; gap: 8px; }
textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px; resize: vertical; }
.settings { display: flex; flex-direction: column; gap: 10px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.settings label > span { display: flex; align-items: center; }
.settings input, select { height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; font-weight: 400; }
.settings input[type=number] { width: 110px; }
.settings select { width: max-content; max-width: 100%; }
.settings input[name=name] { width: min(100%, 380px); }
.settings input[name=alert_emails] { width: min(100%, 420px); }
/* time inputs: wide enough for the 12-hour format ("07:30 AM") */
input[type=time] { min-width: 132px; }
.suggest { padding: 8px 10px; border: 2px dashed var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
code.ping { display: block; padding: 10px 12px; background: var(--code-bg); color: var(--code-fg); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.danger h2 { color: var(--danger); }
pre { margin: 0; padding: 16px; background: var(--code-bg); color: var(--code-fg); font-family: var(--mono); font-size: 13px; line-height: 1.65; overflow-x: auto; white-space: pre; }

/* ---- new job + generator ---- */
.narrow { max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
legend h2 { margin: 0; display: flex; align-items: center; }
fieldset.block { border-top: 0; padding-top: 0; }
fieldset.block > legend { width: 100%; border-top: 1px solid var(--line); padding-top: 14px; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choices legend { font-size: 13px; font-weight: 600; }
.choice { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; flex-direction: row !important; min-height: 32px; }
.inline-num { width: 80px; height: 32px !important; }
.gen { display: flex; flex-direction: column; gap: 22px; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; }
.tab-radio { position: relative; }
.tab-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tab-radio span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line); margin-left: -2px; font-weight: 500; }
.tab-radio:first-child span { margin-left: 0; }
.tab-radio input:checked + span { background: var(--hl-bg); color: var(--hl); border-color: var(--hl); font-weight: 600; position: relative; }
.tab-radio input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.opts { display: flex; flex-direction: column; }
.opt { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); min-height: 44px; }
.opt[hidden] { display: none; }
.opt.opt-sub { padding-left: 32px; }
.opt.is-locked { cursor: default; }
.opt.is-locked input[type=checkbox] { opacity: 0.55; }
.opt input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.opt > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.inline-text { height: 30px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 8px; font-family: var(--mono); font-size: 12.5px; width: 120px; }
.inline-text.wide { width: 220px; }
.wait { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px dashed var(--muted); font-weight: 600; }
.wait.got { border-style: solid; border-color: var(--ok-fg); color: var(--ok-fg); }
.pulse { width: 12px; height: 12px; background: var(--accent); animation: beat 1.2s infinite; }
.wait.got .pulse { background: var(--ok-fg); animation: none; }
@keyframes beat { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.6); opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ---- alerts history ---- */
.alerts { min-width: 760px; }
.al { display: grid; grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1.3fr) 120px; gap: 16px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--rule); }
.al.th { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.al .status { gap: 6px; }
.arrow { color: var(--muted); margin: 0 6px; }

/* ---- landing ---- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; padding: 24px 0 8px; }
.hero-text { flex: 1 1 420px; min-width: 0; }
.hero h1 { font-size: 52px; max-width: 640px; }
.hero .lede { font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cta .btn { height: 46px; padding: 0 20px; }
.demo { flex: 1 1 420px; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 6px 14px; }
.demo-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 150px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.demo-row:last-child { border-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.step-n { font-family: var(--mono); font-size: 12px; color: var(--hl); font-weight: 600; }
.step h2 { display: flex; align-items: center; margin-top: 4px; }
.foot { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } .hero h1 { font-size: 38px; } h1 { font-size: 25px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- overview ---- */
a.plain { text-decoration: none; color: inherit; }
a.plain:hover { text-decoration: underline; }
a.tile { text-decoration: none; color: inherit; padding: 4px 6px; margin: -4px -6px; }
a.tile:hover { background: var(--hover); }
.kpis { display: flex; flex-wrap: wrap; gap: 28px; }
.kpi { display: flex; flex-direction: column; }
.kpi-n { font-family: var(--mono); font-size: 26px; font-weight: 500; line-height: 1.1; }
.kpi-l { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--soft); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); padding: 6px 2px; }
.day:hover { background: var(--hover); }
.bar { height: 140px; width: 100%; max-width: 64px; display: flex; flex-direction: column-reverse; border-bottom: 1px solid var(--line); }
.seg { display: block; width: 100%; }
.day-l { font-weight: 600; font-size: 13px; }
.day-n { color: var(--ink); }
.tr.mini { min-width: 0; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--soft); }
/* "Most problems this week" (narrow side column): status | job name (takes the rest) | count */
.tr.mini { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; }
.tr.mini > :last-child { justify-self: end; white-space: nowrap; }

/* account: report / alerts settings, Google button */
.row-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.row-fields > div { display: flex; flex-direction: column; gap: 6px; }
.row-fields [hidden], .digest [hidden] { display: none; }
.login select { height: 44px; min-width: 0; max-width: 100%; }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.checks legend { padding: 0; margin-bottom: 2px; }
.checks .check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.checks .check input { width: 18px; height: 18px; accent-color: var(--hl); }
.btn-google { display: flex; justify-content: center; align-items: center; gap: 10px; height: 46px; margin: 8px 0 4px; text-decoration: none; background: var(--surface); }
.btn-google:hover { background: var(--ink); color: var(--paper); }
.or { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line, currentColor); opacity: .4; }

/* account settings: label column on the left, compact forms on the right */
.sett-head { margin-bottom: 0; }
.sett-head h1 { margin-bottom: 4px; }
.sett { border-top: 1px solid var(--line); }
.sett-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px 48px; padding: 22px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.sett-label h2 { font-size: 17px; margin: 0 0 4px; }
.sett-label p { margin: 0; max-width: 240px; }
.sett-body { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.sett-inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; }
.sett-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0; }
.sett-form .f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sett-form .f.grow { flex: 1 1 260px; }
.sett-form .f > label { font-size: 13px; font-weight: 600; display: flex; align-items: center; }
.sett-form .full { flex-basis: 100%; }
.sett-form input:not([type=checkbox]), .sett-form select, .fake-input {
  height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 0 10px; font: inherit; font-size: 14px; min-width: 0; max-width: 100%; }
.sett-form input[type=time] { width: 140px; }
.fake-input { display: inline-flex; align-items: center; border-style: dashed; color: var(--muted); }
.sett-form .btn, .sett-inline .btn { height: 40px; padding: 0 18px; }
.sett-form .ok-note { align-self: center; }
.sett-form .check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 600; }
.sett-form .check input, .sett-form .checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.sett-form .checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.sett-form .checks .check { font-weight: 500; }
.sett-form [hidden] { display: none; }
@media (max-width: 760px) {
  .sett-row { grid-template-columns: 1fr; gap: 10px; }
  .sett-form .f:not(.grow) { flex: 1 1 140px; }
  .sett-form input[type=time] { width: 100%; }
}

/* schedule editor, laid out like a Windows Task Scheduler trigger */
.narrow.wide-ok { max-width: 680px; }
.trigger { border: 1px solid var(--line); padding: 12px 16px 14px; margin: 6px 0; background: var(--surface); }
.trigger legend { padding: 0 6px; font-weight: 800; display: flex; align-items: center; }
.trigger-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0; }
.trigger-kinds { display: flex; flex-direction: column; gap: 2px; padding-right: 14px; border-right: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.trigger-kinds .choice { flex-direction: row; align-items: center; gap: 8px; min-height: 36px; font-weight: 500; }
.trigger-kinds input { width: 16px; height: 16px; accent-color: var(--hl); }
.trigger-body { padding-left: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.trigger label { font-size: 13px; font-weight: 500; }
.trigger-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.trigger-line label { flex-direction: row; align-items: center; gap: 8px; }
.trigger input[type=date], .trigger input[type=time] { height: 36px; padding: 0 8px; width: auto; }
.trigger .inline-num { width: 76px; height: 36px; }
.day-boxes { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.trigger .check { flex-direction: row; align-items: center; gap: 6px; min-height: 32px; }
.trigger .check input { width: 16px; height: 16px; height: 16px; margin: 0; accent-color: var(--hl); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(34px, 1fr)); gap: 3px; max-width: 330px; }
.month-grid .cell { position: relative; }
.month-grid .cell input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.month-grid .cell span { display: flex; justify-content: center; align-items: center; height: 32px; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); font-family: "Martian Mono", monospace; font-size: 12px; }
.month-grid .cell input:checked + span { background: var(--hl); color: var(--on-hl); border-color: var(--hl); }
.month-grid .cell input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.month-grid .cell.wide { grid-column: span 2; }
.trigger-adv { margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; }
.trigger-adv select { height: 36px; }
.trigger-adv select:disabled { opacity: .45; }
.trigger [hidden] { display: none !important; }
.trigger-summary { margin: 10px 0 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) {
  .trigger-grid { grid-template-columns: 1fr; }
  .trigger-kinds { flex-direction: row; flex-wrap: wrap; gap: 0 14px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); padding: 0 0 8px; margin-bottom: 10px; }
  .trigger-body { padding-left: 0; }
}

/* overview: plan vs done */
.plan { margin-bottom: 28px; }
.seg-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg-tabs a { padding: 7px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.seg-tabs a[aria-current] { background: var(--hl-bg); color: var(--hl); }
.plan-sum { margin: 10px 0 8px; }
.ptable { min-width: 820px; }
.pr { display: grid; grid-template-columns: minmax(160px, 1.6fr) minmax(140px, 1.4fr) 70px 110px 80px 70px 60px 110px; gap: 12px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); color: var(--ink); text-decoration: none; }
a.pr:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.pr.th { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 4px; }
.pr.total { font-weight: 800; border-bottom: 0; border-top: 1px solid var(--line); }
.pr .num { text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.pbar { display: inline-block; width: 44px; height: 6px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.pbar span { display: block; height: 100%; background: var(--st-ok); }

/* one Save for the whole account page; leave-without-saving dialog */
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 12px 0; margin-top: 8px; background: var(--paper); border-top: 1px solid var(--line); }
.savebar-msg { margin-right: auto; }
.savebar .btn { height: 42px; padding: 0 20px; }
.sett.is-dirty .savebar { box-shadow: 0 -8px 16px -12px color-mix(in srgb, var(--ink) 60%, transparent); }
.leave-dialog { border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 22px 24px; max-width: min(420px, calc(100vw - 32px)); }
.leave-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.leave-dialog h2 { margin: 0 0 6px; }
.leave-dialog .btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.quiet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; font-weight: 500; font-size: 14px; }
.quiet-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.sett-inline .check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.sett-inline .check input { width: 16px; height: 16px; margin: 0; accent-color: var(--hl); }
.keybox { display: block; padding: 10px 12px; border: 1.5px dashed var(--ink); background: var(--surface); word-break: break-all; user-select: all; }

/* projects */
.member { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 4px 0; }
.member select { height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.sett details summary { cursor: pointer; color: var(--muted); }
.sett details[open] summary { margin-bottom: 8px; }
.proj-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.proj-filter a { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.proj-filter a[aria-current] { background: var(--hl-bg); color: var(--hl); border-color: var(--hl); }

/* ======== new layout pieces, in the original palette ======== */
.btn-ghost { border-color: transparent; }
.tr.is-paused > :not(.rowmenu) { opacity: .5; }   /* not the whole row: its open "…" menu stays solid */
.slow-mark { color: var(--st-late); font-weight: 600; }
.flash { padding: 10px 14px; border: 1px solid var(--line); }
.flash.error { border-color: var(--danger); }
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }

/* jobs page: project sidebar, project header, "…" menu, Share dialog */
.jobs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.proj-side { display: flex; flex-direction: column; gap: 2px; font-size: 14px; position: sticky; top: calc(var(--top-h, 0px) + 16px); border-top: 1px solid var(--line); padding-top: 10px; }
.proj-side a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; color: var(--soft); text-decoration: none; }
.proj-side a:hover { background: var(--hover); color: var(--ink); }
.proj-side a[aria-current] { background: var(--hl); color: var(--paper); font-weight: 600; }
.proj-side .group { margin: 12px 8px 4px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.proj-side details { margin-top: 10px; padding: 0 8px; }
.proj-side summary { cursor: pointer; color: var(--muted); list-style: none; }
.proj-side summary::-webkit-details-marker { display: none; }
.proj-side summary:hover { color: var(--ink); }
.proj-side form { display: flex; gap: 6px; margin-top: 8px; }
.proj-side input { height: 32px; min-width: 0; flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; font-size: 13px; }
.jobs-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.proj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.proj-head h1 { margin: 0; font-size: 28px; }
/* "+ New job ▾": one button that opens the four ways to add jobs (left-aligned under it on phones) */
.more.new-job > summary.btn { width: auto; height: 38px; padding: 0 14px; gap: 6px; }
.more.new-job > summary.btn-dark:hover, .more.new-job[open] > summary.btn-dark { background: color-mix(in srgb, var(--ink) 80%, var(--paper)); color: var(--paper); }
.more.new-job .menu { min-width: 260px; }
.proj-head > .btn-row { margin-left: auto; }   /* stays on the right also when it wraps under a long title: the menu opens inside the screen */
.proj-head .sub { margin-top: 6px; }
.more { position: relative; }
.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid var(--line); font-weight: 800; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover { background: var(--hover); }
/* "…" buttons (not the "+ New job" button): no frame until hover or open, the same everywhere */
.more > summary:not(.btn) { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 4px; color: var(--muted); }
.more > summary:not(.btn):hover, .more[open] > summary:not(.btn) { background: var(--hover); border-color: var(--rule); color: var(--ink); }
.more .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.more .menu form { display: flex; gap: 6px; align-items: center; margin: 0; }
.more .menu input { height: 32px; min-width: 0; flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; font-size: 13px; }
.share-dialog { border: 1px solid var(--line); background: var(--paper); padding: 20px 22px; width: min(480px, calc(100vw - 32px)); }
.share-dialog h2 { margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; }
.share-invite { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.share-invite input { flex: 1 1 200px; height: 38px; min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; }
.share-invite select { height: 38px; width: auto; }
.member { border-top: 1px solid var(--rule); padding: 6px 0; }
.member .x { width: 32px; padding: 0; font-size: 18px; line-height: 1; color: var(--muted); }
@media (max-width: 860px) {
  .jobs-layout { grid-template-columns: 1fr; gap: 12px; }
  .proj-side .group { display: none; }
  .proj-side details { margin: 0; padding: 0; flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .who { display: none; }
}

/* today */
.h1-rest { font-weight: 500; color: var(--muted); font-size: .55em; letter-spacing: 0; white-space: nowrap; }
.att { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.att:first-of-type { border-top: 0; }
.pgroup > summary { list-style: none; cursor: pointer; }
.pgroup > summary::-webkit-details-marker { display: none; }
.pgroup > summary .name::before { content: "▸"; display: inline-block; width: 16px; color: var(--muted); }
.pgroup[open] > summary .name::before { content: "▾"; }
.pgroup > summary:hover { background: var(--hover); }
.pr.sub > div:first-child { padding-left: 16px; }
.pr.sub .status { font-size: 11.5px; }
@media (max-width: 600px) { .att { grid-template-columns: 1fr auto; } .att .status { grid-column: 1 / -1; } }

/* history */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select { height: 34px; font-size: 13px; width: auto; }
.day[aria-current] { background: var(--hover); }

/* settings: sentences and chips; the save bar shows only when something changed */
.sentence { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; line-height: 2; }
.sentence > label:not(.check) { font-weight: 600; }
.sentence select, .sentence input { height: 36px; width: auto; max-width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 0 8px; font: inherit; font-size: 14px; }
.sentence input[type=time] { width: 140px; }
.sentence input[type=date] { width: 160px; }
.sentence .check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sentence .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.sett-body [hidden] { display: none !important; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { width: 100%; margin-bottom: 6px; font-weight: 600; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip > span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent);
  color: var(--soft); font-size: 13.5px; font-weight: 500; user-select: none; }
.chip:hover > span { background: var(--hover); }
.chip input:checked + span { background: var(--hl-bg); border-color: var(--hl); color: var(--hl); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.more-opts summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.more-opts summary:hover { color: var(--ink); }
.more-opts[open] summary { margin-bottom: 10px; }
.sett-form input[type=url] { width: 100%; }
#account-form:not(.is-dirty) .savebar { display: none; }

/* ---- compact jobs table (name + tags, two-line cells, row menu, filter) ---- */
.jobs-tools { display: flex; justify-content: flex-end; padding: 10px 0; }
.jobs-tools input { height: 34px; width: min(260px, 100%); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; font-size: 14px; }
.table.compact { min-width: 0; }
.table.compact .tr { grid-template-columns: 104px minmax(150px, 1.6fr) minmax(90px, 160px) minmax(120px, 180px) minmax(110px, 140px) 80px 40px;
  gap: 12px; padding: 10px 8px 10px 4px; position: relative; }
.table.compact .tr > :last-child { justify-self: end; }
/* narrower screens: drop the rhythm and rows columns instead of cutting the row off */
@media (max-width: 1180px) {
  .table.compact .tr { grid-template-columns: 104px minmax(140px, 1.6fr) minmax(120px, 180px) minmax(110px, 140px) 40px; }
  .table.compact .tr > :nth-child(3), .table.compact .tr > :nth-child(6) { display: none; }
}
@media (max-width: 700px) {
  .table.compact .tr { grid-template-columns: 90px minmax(0, 1fr) 40px; }
  .table.compact .tr > :nth-child(4), .table.compact .tr > :nth-child(5) { display: none; }
}
.table.compact .tr[hidden] { display: none; }
.table.compact .tr:hover { background: var(--hover); }
.rowlink { color: var(--ink); text-decoration: none; }
.rowlink::after { content: ""; position: absolute; inset: 0; }   /* the whole row opens the job */
.rowlink:hover { text-decoration: underline; }
.table.compact .slow-mark, .table.compact .rowmenu { position: relative; z-index: 2; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tag { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 0; border-radius: 4px; background: var(--hover); color: var(--soft); }
.rowmenu > summary:not(.btn) { width: 32px; height: 32px; }
.rowmenu .menu { min-width: 170px; }
.rowmenu .menu .btn { width: 100%; justify-content: flex-start; }

/* ---- schedule editor: duration slider, "Next runs" ---- */
.dur { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dur-range { width: 200px; accent-color: var(--hl); }
.dur .dur-value { width: 76px; height: 34px; }
.dur select { height: 34px; width: auto; }
.expect { margin: 0; color: var(--soft); }
.next-runs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- job page: two columns (about + how to ping | events) ---- */
.detail-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.detail-left { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.detail-right { min-width: 0; }
.copyline { display: flex; gap: 8px; align-items: stretch; }
.copyline code.ping { flex: 1; min-width: 0; }
.examples { margin-top: 10px; }
.examples summary { cursor: pointer; color: var(--muted); }
.examples summary:hover { color: var(--ink); }
.examples[open] summary { margin-bottom: 10px; }
.ex-tabs { margin-bottom: 8px; }
.ex-tabs .tab-radio span { height: 32px; padding: 0 10px; font-size: 13px; }
.ex[hidden] { display: none; }
.ex pre { font-size: 12px; }
.events { min-width: 720px; }
.ev { display: grid; grid-template-columns: 40px 60px 72px 64px 64px 64px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--rule); }
.ev.th { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.badge { display: inline-block; padding: 1px 6px; border: 1px solid; border-radius: 4px; font-family: var(--mono); font-size: 11px; font-weight: 500; }
@media (max-width: 960px) { .detail-cols { grid-template-columns: 1fr; } }

/* ---- first-run panel on a new job ---- */
.first-run { border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.fr-tabs .tab-radio span { height: 32px; padding: 0 10px; font-size: 13px; }
.fr[hidden] { display: none; }
.fr pre { font-size: 12px; max-height: 360px; }

/* ---- landing page ---- */
.hero h1 { font-size: 50px; }
.replica { flex: 1 1 440px; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 4px 14px 8px; }
.rep-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.rep-title { font-weight: 800; font-size: 17px; }
.rep-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 190px); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.rep-row:last-child { border-bottom: 0; }
.rep-name { font-weight: 600; font-size: 14px; }
.land-block { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.land-head h2 { font-size: 28px; letter-spacing: -0.4px; }
.land-head p { margin: 6px 0 0; max-width: 720px; }
.land-code { max-height: 340px; }
.land-code[hidden] { display: none; }
.land-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 760px; }
.myth-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.myth-card { border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.myth-card.is-alert { border-color: var(--st-odd); }
.catches, .setup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.setup { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.setup-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* six cards: two rows of three */
/* comparison cards (landing page, Pricing): one figure each, the whole card is the link */
.cmp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; }
.cmp-card { display: block; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 14px 18px 13px; color: var(--ink); text-decoration: none; }
.cmp-card:hover, .cmp-card:focus-visible { border-color: var(--hl); }
.cmp-card-name { display: block; font-size: 14px; font-weight: 600; color: var(--hl); }
.cmp-card-fig { display: block; margin-top: 4px; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.3px; }
.cmp-card-fig .vs { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.cmp-card-cap { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 640px) { .cmp-cards { grid-template-columns: 1fr; } }
/* use cases and comparisons: the side tree (the Docs layout), the hub as cards, previous / next */
.side-tree > .group:first-child { border-top: 0; margin-top: 4px; padding-top: 0; }
.side-toc a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-layout > .uc { min-width: 0; }
.uc-hub { max-width: 860px; }
.uc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 6px; }
.uc-card { display: block; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 12px 14px 11px; color: var(--ink); text-decoration: none; }
.uc-card:hover, .uc-card:focus-visible { border-color: var(--hl); }
.uc-card b { font-size: 15px; line-height: 1.35; font-weight: 600; }
.uc-card .bi { margin-right: 7px; vertical-align: -3px; }
.uc-card span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.uc-prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 10px; }
.uc-prevnext a { display: block; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 9px 14px; color: var(--ink); font-weight: 600; text-decoration: none; }
.uc-prevnext a:hover, .uc-prevnext a:focus-visible { border-color: var(--hl); }
.uc-prevnext a span { display: block; font-weight: 400; }
.uc-prevnext .next { text-align: right; }
@media (max-width: 640px) {
  .uc-cards { grid-template-columns: 1fr; }
  /* phones: the breadcrumb ends at the group; its last step is the heading right below it */
  .uc .crumbs [aria-current], .uc .crumbs .sep:last-of-type { display: none; }
}
.catches p, .setup p { margin: 4px 0 0; }
.peek { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.peek-card { margin: 0; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.peek-ui { padding: 12px; min-height: 112px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--rule); }
.peek-card figcaption { padding: 10px 12px; font-size: 13px; color: var(--soft); }
.pk-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pk-row .tag { margin-left: auto; }
.pk-ev { display: grid; grid-template-columns: 80px 52px minmax(0, 1fr); gap: 8px; align-items: center; }
.pk-plan { display: grid; grid-template-columns: 80px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.pk-plan .pbar { width: 100%; }
.faq { display: flex; flex-direction: column; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--soft); }
.land-final { border-top: 1px solid var(--line); padding-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.land-final h2 { font-size: 30px; }
@media (max-width: 960px) {
  .peek, .catches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .myth-pair, .peek, .catches, .setup { grid-template-columns: 1fr; }
  .rep-row { grid-template-columns: 80px minmax(0, 1fr); }
  .land-head h2 { font-size: 23px; }
}

/* ---- landing: how it works, a look inside (screens), works with (cards) ---- */
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; }
.how li { display: flex; gap: 12px; align-items: flex-start; }
.how-n { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; font-weight: 500; }
.how p { margin: 4px 0 0; }
.tour { display: flex; flex-direction: column; gap: 44px; }
.tour-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 18px 44px; align-items: center; }
.tour-row:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.tour-row:nth-child(even) .tour-shot { order: 2; }
.tour-shot { margin: 0; min-width: 0; }
.tour-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--surface); }
/* light or dark screenshot: the system's choice until the user picks one in the footer (data-theme) */
.tour-shot .shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .tour-shot .shot-light { display: none; }
  :root:not([data-theme]) .tour-shot .shot-dark { display: block; }
}
:root[data-theme="dark"] .tour-shot .shot-light { display: none; }
:root[data-theme="dark"] .tour-shot .shot-dark { display: block; }
.tour-mail { display: flex; justify-content: center; }
.tour-mail img { max-width: 560px; }
.tour-text h3 { margin: 0 0 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.15; }
.tour-text ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--soft); }
.works-group { display: flex; flex-direction: column; gap: 8px; }
.works-group h3 { margin: 6px 0 0; font-weight: 400; }
.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.works li { min-width: 0; }
.wk { height: 100%; min-height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 14px 8px 12px; text-align: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.wk:hover { background: var(--hover); color: var(--ink); }
.wk-ico { width: 38px; height: 38px; margin-bottom: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.wk-ico .bi { width: 38px; height: 38px; vertical-align: 0; }
.wk-name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.wk-tm { font-size: 9px; font-weight: 500; margin-left: 1px; }
.wk-cat { font-size: 12px; line-height: 1.3; color: var(--muted); }
.wk-untested { white-space: nowrap; }
.works-note { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.works-note a { color: var(--muted); }
@media (max-width: 760px) {
  .how { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tour { gap: 30px; }
  .tour-row, .tour-row:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .tour-row:nth-child(even) .tour-shot { order: 0; }
  .tour-text h3 { font-size: 19px; }
}
@media (max-width: 600px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wk { min-height: 112px; padding: 12px 4px 10px; }
  .wk-ico, .wk-ico .bi { width: 32px; height: 32px; }
  .wk-ico { margin-bottom: 6px; }
  .wk-name { font-size: 14px; }
  .wk-cat { font-size: 11.5px; }
}
@media (max-width: 340px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Settings > Appearance: sun / moon buttons ---- */
.theme-pick { display: flex; gap: 8px; margin: 0; }
.theme-btn { width: 44px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1.5px solid var(--rule); background: var(--surface); color: var(--muted); cursor: pointer; }
.theme-btn:hover { color: var(--ink); }
.theme-btn[aria-pressed="true"] { border: 2px solid var(--ink); color: var(--ink); }
.theme-btn svg { width: 20px; height: 20px; }

/* machines in the jobs sidebar: name + "…" */
.side-item { display: flex; align-items: center; gap: 2px; }
.side-item > a { flex: 1; min-width: 0; }
.side-more > summary:not(.btn) { width: 26px; height: 26px; font-size: 13px; }
.side-more .menu { left: 0; right: auto; }
.host-warn { margin: 0; }

/* no-alert days: their own small block under the settings form */
.quiet-block { margin-top: 18px; }
.quiet-block details summary { cursor: pointer; color: var(--muted); }
.quiet-block details[open] summary { margin-bottom: 8px; }
form.quiet-row { margin: 0; }

/* footer on every page: (c), links, sun / moon */
.site-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 14px; padding-bottom: 22px;
  border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.site-foot .theme-pick { margin-left: auto; }
.site-foot .theme-btn { width: 34px; height: 32px; }
.site-foot .theme-btn svg { width: 16px; height: 16px; }
.site-foot a { color: var(--muted); }
.site-foot .new-dot { display: inline-block; width: 7px; height: 7px; margin: 0 0 6px 3px; border-radius: 50%;
  background: var(--accent); overflow: hidden; text-indent: 20px; white-space: nowrap; vertical-align: middle; }
.site-foot .foot-ver { font-family: var(--mono); font-size: 12px; }

/* What's new (/changelog/) */
.changelog .release { padding-top: 6px; border-top: 1px solid var(--rule); margin-top: 22px; }
.changelog .release h2 { margin: 12px 0 2px; }
.changelog .release-ver { font-family: var(--mono); color: var(--ink); text-decoration: none; margin-right: 6px; }
.changelog .release-date { margin: 0 0 6px; font-size: 13px; }
.changelog h3 { font-size: 14px; margin: 14px 0 4px; }
.changelog ul { margin: 0; padding-left: 20px; }
.changelog li { margin: 3px 0; }

/* ---- landing: code card with tabs, highlighting, "what TaskBeacon receives" ---- */
.cta-note { margin: 10px 0 0; }
.code-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.code-card { border: 1px solid var(--line); background: var(--code-bg); min-width: 0; }
.code-bar { border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 6px 8px 0; }
.code-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: #A9ABB0; padding: 6px 10px 8px;
  font: 600 13px/1 Archivo, sans-serif; cursor: pointer; }
.code-tab:hover { color: #E9E6DF; }
.code-tab[aria-selected="true"] { color: #F2F0EB; border-bottom-color: #F2F0EB; }
.code-pane[hidden] { display: none; }
.code-meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 0; color: #A9ABB0; }
.code-meta .btn { background: transparent; color: #E9E6DF; border: 1px solid rgba(255, 255, 255, .35); }
.code-meta .btn:hover { background: rgba(255, 255, 255, .08); }
/* a bare code block (docs pages) has its own dark box; inside a .code-card the card gives the background */
pre.land-code { margin: 0; border: 0; background: var(--code-bg); color: var(--code-fg); max-height: 380px; font-size: 12.5px; }
.code-card pre.land-code { background: transparent; color: #E9E6DF; }
.docs-body > pre.land-code { margin: 10px 0; }
.hl-c { color: #8E9097; font-style: italic; }
.hl-s { color: #B9D6A8; }
.hl-k { color: #E3C98F; font-weight: 500; }
.hl-u { color: #FF8A70; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.receives { border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.receives p { margin: 6px 0 0; }
.rc-line .muted { display: inline-block; width: 52px; }
.demo-flag { display: inline-block; border: 1.5px dashed var(--st-odd); color: var(--st-odd); padding: 3px 8px; margin: 0 0 8px; }
@media (max-width: 860px) { .code-wrap { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .rep-row { grid-template-columns: 80px minmax(0, 1fr); }
  .rep-row .rep-last { grid-column: 1 / -1; display: block; padding-left: 0; }
}

/* settings: your data; legal drafts */
.your-data { margin-top: 18px; }
.danger-zone summary { cursor: pointer; color: var(--danger); }
.danger-zone[open] summary { margin-bottom: 8px; }
.delete-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.delete-form p { margin: 0; max-width: 620px; }
.legal { max-width: 760px; }
.legal h2 { margin-top: 22px; }
.legal p, .legal li { color: var(--soft); }
.draft-note { border: 2px dashed var(--st-odd); color: var(--st-odd); padding: 10px 14px; font-weight: 600; }
.ph { background: var(--hover); padding: 0 4px; font-family: var(--mono); font-size: .9em; }

/* sidebar tree: jobs under each project and machine */
.side-branch > .side-row { display: flex; align-items: center; gap: 4px; padding-left: 2px; }
.side-branch > .side-row > a { flex: 1; min-width: 0; padding: 5px 6px; }
.side-branch > .side-row > .muted.small { padding-right: 4px; font-family: var(--mono); font-size: 12px; }
.side-branch.is-empty > .side-row > a, .side-branch.is-empty > .side-row > .muted.small { opacity: .5; }   /* nothing here with the other filter */
.proj-side .new-proj { margin-top: 10px; padding: 0 8px; }
@media (max-width: 860px) {
  .side-branch { flex: 0 0 auto; }
}
/* breadcrumb of the Jobs filters: each one has its own × */
.crumb-filter { display: inline-flex; align-items: baseline; gap: 4px; }
.crumbs .crumb-x { padding: 0 3px; font-size: 14px; line-height: 1; color: var(--muted); }
.crumbs .crumb-x:hover { color: var(--ink); text-decoration: none; background: var(--hover); }
/* project / machine tags in the jobs table filter the list (above the row's own link) */
.tag-link { position: relative; z-index: 1; text-decoration: none; color: inherit; }
.tag-link:hover { text-decoration: underline; }
.more .menu > form.move-machine { gap: 6px; padding: 4px 6px; }
.more .menu > form.move-machine select { flex: 1; min-width: 0; height: 32px; }
.more .menu > form.move-machine > .btn { flex: 0 0 auto; width: auto; border: 1px solid var(--line); }

/* job page tabs; Code tab: checklist left, code right */
.job-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.job-tabs a { padding: 8px 0; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.job-tabs a[aria-current] { color: var(--hl); border-bottom-color: var(--hl); }
.code-layout { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.code-side { display: flex; flex-direction: column; gap: 14px; }
.code-side fieldset { border: 0; padding: 0; margin: 0; }
.code-side legend { margin-bottom: 4px; }
.code-lang { display: flex; flex-direction: column; gap: 6px; }
.code-lang select { width: 100%; }
.code-side .opt { grid-template-columns: 22px minmax(0, 1fr); }
.code-side .inline-text.wide { width: 100%; }
.code-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.code-main pre { max-height: 560px; }
@media (max-width: 900px) { .code-layout { grid-template-columns: 1fr; } }

/* ---- docs ---- */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.docs-toc { position: sticky; top: calc(var(--top-h, 0px) + 16px); display: flex; flex-direction: column; gap: 6px; font-size: 14px; max-height: calc(100vh - var(--top-h, 0px) - 32px); overflow: auto; }
.docs-toc input { height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-toc a { display: block; padding: 4px 8px; color: var(--soft); text-decoration: none; }
.docs-toc a:hover { background: var(--hover); color: var(--ink); }
.docs-toc a[aria-current] { background: var(--hl-bg); color: var(--hl); font-weight: 600; }
.docs-toc .group { margin: 14px 0 4px; padding: 10px 8px 0; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink); font-weight: 700; font-family: var(--mono); }
#docs-tree > .group:first-child { border-top: 0; margin-top: 4px; padding-top: 0; }
/* languages are one choice among many: smaller, indented, never louder than the guide pages */
.docs-toc .langs a { font-size: 13px; padding-left: 16px; }
.docs-hits li { padding: 0; }
.docs-body { max-width: 780px; }
.docs-body h2 { scroll-margin-top: 16px; }
.docs-body code { font-family: var(--mono); font-size: .9em; }
.doc-shot { margin: 14px 0; }
.doc-shot img { width: 100%; height: auto; border: 1px solid var(--line); display: block; }
.doc-dl dt { margin-top: 10px; }
.doc-dl dd { margin: 2px 0 0 18px; color: var(--soft); }
.doc-pre { background: var(--code-bg); color: var(--code-fg); padding: 12px; overflow-x: auto; }
.docs-tree-box > summary { display: none; }   /* only phones get the "All docs pages" toggle */
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .docs-layout > * { min-width: 0; }   /* long code lines scroll inside their block, not the page */
  .docs-toc { position: static; max-height: none; }
  .docs-tree-box > summary { display: flex; align-items: center; min-height: 40px; cursor: pointer; color: var(--soft); font-weight: 600; }
}

/* the rhythm shrinks with its column instead of spilling over the next one */
.table.compact .tr > svg { width: 100%; max-width: 160px; min-width: 0; }

/* ======== phones (up to ~600px): desktop above this width is unchanged ======== */
.docs-tree-box > summary::-webkit-details-marker { display: none; }
.docs-tree-box > summary::before { content: "▸"; display: inline-block; width: 16px; color: var(--muted); }
.docs-tree-box[open] > summary::before { content: "▾"; }
@media (max-width: 860px) {
  /* projects / machines: one row of equal chips that wraps (a scroll strip cut off the "…" menus).
     Every chip: 40px high, the same border and padding; the count sits apart, the "…" inside the chip. */
  .proj-side { position: relative; flex-wrap: wrap; flex-direction: row; align-items: flex-start; gap: 6px; overflow: visible;
    border-top: 0; padding: 0; font-size: 14px; }
  .proj-side > a, .side-branch > .side-row, .proj-side .new-proj > summary {
    display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; white-space: nowrap; line-height: 1;
    border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent); color: var(--soft); text-decoration: none; }
  .proj-side > a[aria-current], .side-branch > .side-row:has(> a[aria-current]) { background: var(--hl); border-color: var(--hl); color: var(--paper); font-weight: 600; }
  .side-branch > .side-row > a, .side-branch > .side-row > .ellipsis { flex: 0 1 auto; padding: 0; border: 0; color: inherit; background: none; }
  .side-branch > .side-row > a[aria-current] { background: none; color: inherit; }
  .side-branch > .side-row > a:hover { background: none; text-decoration: underline; }
  .side-branch > .side-row > .muted.small { padding: 0; color: inherit; opacity: .7; font-family: var(--mono); font-size: 12px; }
  .side-branch:has(.side-more) > .side-row { padding-right: 4px; }
  .proj-side .side-more { position: static; display: flex; }
  .jobs-layout { gap: 20px; }
  .proj-side .side-more > summary { width: 30px; height: 30px; padding: 0; border: 0; color: inherit; line-height: 1; }
  .proj-side .side-more > summary:hover { background: color-mix(in srgb, currentColor 15%, transparent); }
  .proj-side .side-more .menu { left: 0; right: 0; top: calc(100% + 6px); min-width: 0; color: var(--ink); font-weight: 400; }
  .proj-side .new-proj { display: flex; padding: 0; margin: 0; }
  .proj-side .new-proj > summary { border-style: dashed; border-color: var(--muted); color: var(--muted); }
  .proj-side .new-proj > summary:hover { color: var(--ink); }
  .proj-side .new-proj[open] { flex-basis: 100%; flex-direction: column; align-items: flex-start; }
  .proj-side .new-proj form { width: 100%; }
  .proj-side .new-proj input { height: 40px; }
  .proj-side .new-proj .btn { height: 40px; }
}
@media (max-width: 600px) {
  /* header: brand and buttons on one line, the menu on its own line below */
  .topbar-in { padding-top: 10px; padding-bottom: 4px; gap: 4px 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .topbar .spacer { display: none; }
  .topbar .spacer + * { margin-left: auto; }
  .topbar .btn { height: 40px; padding: 0 10px; }
  /* signed in: TaskBeacon, the plan chip and Log out on one row, the chip and Log out on the right */
  .topbar[data-app] .plan-chip { margin-left: auto; }
  .topbar[data-app] .btn { height: 36px; padding: 0 10px; font-size: 14px; }
  .nav { order: 5; flex-basis: 100%; gap: 0 20px; }
  .nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0; }
  .nav a.active { border-bottom-width: 2px; }
  .bill-toggle { align-self: stretch; }
  .bill-toggle label { flex: 1 1 0; padding: 10px 8px; }

  /* tap targets */
  .crumbs a { padding: 4px 0; }
  .job-tabs a { padding-top: 10px; padding-bottom: 10px; }
  .more .menu .btn { height: 40px; }
  .more .menu { max-width: calc(100vw - 16px); }
  .rowmenu > summary:not(.btn) { width: 40px; height: 40px; }
  .table.compact .tr { grid-template-columns: 84px minmax(0, 1fr) 40px; }
  .examples summary, .more-opts summary, .quiet-block details summary, .danger-zone summary, .sett details summary,
  .faq summary { padding: 9px 0; }
  .faq details { padding: 4px 0; }
  .code-tab { padding: 12px 10px 14px; }
  .site-foot a { display: inline-flex; align-items: center; min-height: 40px; }
  .site-foot .theme-btn { width: 40px; height: 40px; }
  .proj-filter a, .seg-tabs a { display: inline-flex; align-items: center; min-height: 40px; }
  .filters select, .jobs-tools input { height: 40px; }
  .jobs-tools input { width: 100%; }
  .chip > span { height: 40px; }
  .docs-toc a { padding-top: 9px; padding-bottom: 9px; }
  .docs-toc .langs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
  .docs-toc .langs a { padding: 8px 10px; border: 1px solid var(--line); font-size: 13px; }
  .btn-small { height: 36px; }
  .inline-text, .rule .x input, .dur .dur-value, .dur select, .proj-side input, .more .menu input, .member select { height: 40px; }
  .inline-num { height: 40px !important; }

  /* forms take the full width */
  .settings > label > select, .settings > label > input[type=text], .settings > label > input[type=email], .settings > label > textarea { width: 100%; }
  .sett-form .f, .sett-form .f.grow { flex: 1 1 100%; }
  .sett-form select, .sentence select { max-width: 100%; }
  .savebar { flex-wrap: wrap; }

  /* text and headings */
  .proj-head h1 { font-size: 24px; }
  .docs-body { overflow-wrap: anywhere; }
  .docs-body pre, .docs-body code.ping { overflow-wrap: normal; }
  .leave-dialog, .share-dialog { padding: 18px 16px; }
}

/* ======== "…" menus: an open menu is above every row; all items look the same ======== */
.more[open] { z-index: 60; }
.table.compact .tr:has(.rowmenu[open]) { z-index: 60; }   /* rows are positioned: lift the whole row too */
.table.compact .rowmenu[open] { z-index: 60; }
.proj-side:has(.more[open]) { z-index: 35; }   /* the sidebar is sticky (its own layer): lift it so its "…" menu sits above the jobs table, below the top bar */
.more .menu { padding: 8px; gap: 6px; }
.more .menu > form { flex-wrap: wrap; gap: 6px; }
.more .menu > .btn, .more .menu > form > .btn {
  display: flex; align-items: center; justify-content: flex-start; flex: none; width: 100%;
  height: 36px; padding: 0 12px; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; }
.more .menu > form > .btn { flex: 1 1 100%; }   /* row-wrapping form: each button on its own full line */
.more .menu > form > input[type=text] + .btn { flex: 0 0 auto; width: auto; }   /* Rename next to its field */
.more .menu > .btn:not(.btn-danger):hover, .more .menu > form > .btn:not(.btn-danger):hover { background: var(--hover); color: var(--ink); }
@media (max-width: 600px) { .more .menu > .btn, .more .menu > form > .btn { height: 40px; } }

/* ======== settings: one list of sections; heading left, label + field rows right ======== */
.sett-page { border-top: 1px solid var(--line); }
.sett-page .sett { border-top: 0; }
.sett-page .sett-row { grid-template-columns: 200px minmax(0, 1fr); gap: 12px 40px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.sett-page .sett-label h2 { display: flex; align-items: center; min-height: 40px; margin: 0; font-size: 18px; }
.sett-page .sett-body { gap: 12px; max-width: 640px; }
.field { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 16px; align-items: center; min-height: 40px; min-width: 0; }
.field-l { display: flex; align-items: center; font-size: 14px; font-weight: 600; }
.field-c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.field-c select, .field-c input:not([type=checkbox]):not([type=radio]), .delete-form input[type=text] {
  height: 40px; width: 100%; max-width: 320px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 0 10px; font: inherit; font-size: 14px; }
.field-c input[type=url] { max-width: 100%; }
.field-c input[type=time], .field-c input[type=date] { max-width: 180px; }
.field-c.chips { gap: 6px; }
.field[role=group] > .field-l { align-self: start; min-height: 34px; }   /* lines up with the first row of chips */
.field .check, .radios .check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; font-weight: 600; }
.radios { display: flex; flex-direction: column; gap: 2px; }
.radios .check { font-weight: 500; }
.field .check input, .radios .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.sett-note { margin: 0; color: var(--soft); font-size: 14px; }
.sett-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sett-page .btn { height: 40px; padding: 0 18px; }
.sett-page .more-opts summary { display: flex; align-items: center; min-height: 36px; color: var(--muted); }
.sett-page .more-opts summary::before { content: "▸"; display: inline-block; width: 16px; }
.sett-page .more-opts[open] summary::before { content: "▾"; }
.sett-page .more-opts summary::-webkit-details-marker { display: none; }
.sett-page .more-opts[open] > summary { margin-bottom: 12px; }
.sett-page .more-opts > .field + .field, .quiet-add .field + .field { margin-top: 12px; }
.sett-page .quiet-row .btn { height: 32px; padding: 0 10px; }
.delete-form { gap: 10px; }
.delete-form input[type=text] { max-width: 100%; }
.delete-form .btn-row { margin-top: 8px; }
@media (max-width: 760px) {
  .sett-page .sett-row { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
  .sett-page .sett-label h2 { min-height: 0; }
}
@media (max-width: 600px) {
  .field { grid-template-columns: 1fr; gap: 6px; min-height: 0; }
  .field-l:empty { display: none; }
  .field-c select, .field-c input:not([type=checkbox]):not([type=radio]),
  .field-c input[type=time], .field-c input[type=date] { max-width: 100%; }
  .sett-page .sett-body { gap: 16px; }
}

/* ---- part B: simpler job pages, import, Settings ---- */
.big-rhythm { height: auto; max-height: 100px; }      /* scales with the width: no empty band on a phone */
.notify-line { margin: 8px 0 0; }
.edit-group { display: flex; flex-direction: column; gap: 10px; border-top: 1.5px solid var(--rule); padding-top: 10px; margin-top: 4px; }
.edit-group > legend { font-weight: 800; font-size: 14px; display: flex; align-items: center; float: left; width: 100%; margin-bottom: 4px; }
.edit-group > legend + * { clear: both; }
/* "Send alerts for this job" (Edit job, Edit website check) and the "alerts off" mark on the job page */
.alerts-switch { display: flex; flex-direction: column; gap: 2px; }
.settings label.check-row { flex-direction: row; align-items: center; gap: 8px; min-height: 32px; }
.settings label.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
h1 .head-tag { vertical-align: middle; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.notify-line .tag { margin-right: 4px; }
.settings .more-opts { display: flex; flex-direction: column; gap: 10px; }
.settings .more-opts > summary { margin-bottom: 0; }
.rules .rule-add { margin-top: 10px; }
.sett-body .field-c > .small.muted { display: block; flex-basis: 100%; margin-top: 4px; }
.sett-body > .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.sett-body > .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
label.quiet-row { cursor: pointer; }
.move-jobs { display: flex; flex-direction: column; gap: 6px; }
.move-jobs .check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.move-jobs .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--hl); }
.move-jobs .btn { align-self: flex-start; margin-top: 8px; }
.new-split { display: inline-flex; align-items: stretch; gap: 2px; }
.new-more > summary.btn { padding: 0 10px; list-style: none; height: 100%; }
.new-more > summary::-webkit-details-marker { display: none; }
.new-more .menu { min-width: 170px; }
.import-form textarea { min-height: 160px; font-size: 13px; }
.import-table { width: 100%; border-collapse: collapse; }
.import-table th { text-align: left; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; }
.import-table td { border-bottom: 1px solid var(--rule); padding: 8px 8px 8px 0; vertical-align: top; }
@media (max-width: 600px) {
  .events { min-width: 0; }
  .ev { grid-template-columns: 52px 74px minmax(56px, 1fr) 54px 54px; gap: 8px; }
  .ev .ev-opt { display: none; }
  .who { display: none; }
}

/* ---- part C: fonts, pricing, status link, footer links, skip link ---- */
/* Archivo and Martian Mono (SIL OFL 1.1, licences in fonts/), served from this site; variable fonts, one file per script */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/martian-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/martian-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; font-weight: 600; }
.skip-link:focus { top: 8px; color: var(--paper); }
.main:focus { outline: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

.pricing-head { display: flex; flex-direction: column; gap: 4px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plan-card { position: relative; border: 1px solid var(--line); background: var(--surface); padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-top h2, .plan-top h3 { margin: 0; font-size: 24px; font-weight: 800; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-amount { font-size: 44px; line-height: 1.1; font-weight: 800; letter-spacing: -1px; margin-right: 6px; }
.plan-sub { margin: -6px 0 0; font-size: 15px; }
.plan-list { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; font-size: 15px; }
.plan-list li { position: relative; padding-left: 26px; }
.plan-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok-fg); font-weight: 700; }
/* the cards: Monthly / Yearly switch (two radios, no script), the "Recommended" badge */
.plans-wrap { display: flex; flex-direction: column; gap: 16px; }
.bp-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bill-toggle { align-self: flex-end; display: inline-flex; border: 1px solid var(--line); background: var(--surface); padding: 3px; gap: 3px; }
.bill-toggle label { padding: 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--soft); display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; }
.plan-was { font-size: 20px; font-weight: 600; color: var(--muted); margin-right: 6px; text-decoration-thickness: 2px; }
.bill-save { font-weight: 500; color: var(--ok-fg); margin-left: 4px; }
#bp-month:checked ~ .bill-toggle label[for="bp-month"], #bp-year:checked ~ .bill-toggle label[for="bp-year"] { background: var(--ink); color: var(--paper); }
#bp-year:checked ~ .bill-toggle label[for="bp-year"] .bill-save { color: var(--paper); }
#bp-month:focus-visible ~ .bill-toggle label[for="bp-month"], #bp-year:focus-visible ~ .bill-toggle label[for="bp-year"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-year { display: none; }
#bp-year:checked ~ .plans .pp-month { display: none; }
#bp-year:checked ~ .plans .pp-year { display: inline; }
.plan-note { margin: -4px 0 4px; min-height: 18px; }
.every-plan { margin: 4px 0 0; }
.every-plan > * { display: inline-flex; vertical-align: middle; margin-left: 6px; }
.every-plan > b { display: inline; margin-left: 0; }
.plan-badge { position: absolute; top: -13px; left: 22px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; padding: 3px 9px; }
/* the recommended plan: the calm green of the ticks and the OK status (owner's choice 2026-11-10), in both themes */
.plan-card.is-pick { border-color: var(--ok-fg); }
.plan-card.is-pick .plan-badge { background: var(--ok-fg); color: var(--paper); }
.plan-card .plan-btn { min-height: 46px; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.plan-btn { justify-content: center; text-align: center; height: auto; min-height: 38px; padding: 8px 12px; display: inline-flex; align-items: center; line-height: 1.25; }
.plan-btn.is-soon, .plan-btn.is-current { cursor: default; color: var(--muted); border-style: dashed; font-weight: 500; }
.promise { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 820px; }
.plan-meter { height: 8px; border: 1px solid var(--line); max-width: 320px; }
.plan-meter span { display: block; height: 100%; background: var(--ink); }
/* the plan is full: red meter, and "You've reached your plan's limit" (Plan & billing and the Jobs page) */
.plan-meter.is-full { border-color: var(--danger); }
.plan-meter.is-full span { background: var(--danger); }
.limit-note { border-left: 3px solid var(--danger); padding: 8px 12px; margin: 10px 0; background: var(--surface); }
.limit-note b { color: var(--danger); }
.plan-cards-box { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.plan-cards-box > h2 { margin: 0; }
.plan-chip .chip-up { color: var(--ink); font-weight: 600; }
@media (max-width: 480px) { .plan-chip .chip-up { display: none; } }   /* phones: the header keeps one row for the buttons */
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

.beta-note { border-left: 3px solid var(--st-odd); padding: 6px 10px; color: var(--soft); }
.status-link-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-link-box input { flex: 1 1 260px; min-width: 0; height: 32px; }
.status-snippet { white-space: pre-wrap; word-break: break-all; background: var(--hover); padding: 8px; margin: 0; }
.status-badge-img { vertical-align: middle; }
.status-head { display: flex; flex-direction: column; gap: 4px; }
.status-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 860px; }
.status-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.status-item { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.status-item .status-row { border-bottom: 0; }
.status-name { font-weight: 600; overflow-wrap: anywhere; }
/* 90 days, one cell each: green OK, red failures or missed, grey no runs */
.days { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 1px; height: 26px; }
.day, .day-key { background: var(--rule); }
.day.is-ok, .day-key.is-ok { background: var(--st-ok); }
.day.is-bad, .day-key.is-bad { background: var(--st-failed); }
.day-key { display: inline-block; width: 9px; height: 9px; vertical-align: baseline; }
.days-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.days-meta .pct { margin-right: 10px; white-space: nowrap; }
.status-problems { margin-top: 6px; }
.status-problems ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.status-problems li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
@media (max-width: 600px) {
  .status-row { grid-template-columns: 1fr; gap: 3px; }
  .days { height: 22px; gap: 0.5px; }
  .days-meta > span:first-child, .days-meta > span:last-child { display: none; }
}

/* job page events: a /fail's last lines of output, and values that were not numbers */
.ev-log { padding: 0 4px 8px 50px; border-bottom: 1px solid var(--rule); }
.ev-log pre { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--rule); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.ev-note { color: var(--st-odd); }

/* Integrations (connectors/views.py) */
.pro-tag { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .04em; border: 1px solid var(--line); padding: 1px 5px; vertical-align: middle; }
.intg-list, .intg-pick, .intg-choose { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.intg-list li, .intg-pick li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.intg-choose { max-height: 420px; overflow-y: auto; border: 1px solid var(--rule); padding: 8px; }
.intg-choose label, .settings label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.settings label.inline input, .intg-choose input { height: auto; }
.settings fieldset.days { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.intg-add > summary { list-style: none; cursor: pointer; margin: 6px 0; }
.intg-audit ul { padding-left: 18px; }

/* website checks (uptime): long addresses wrap, the facts list keeps label and value apart */
.up-url { overflow-wrap: anywhere; word-break: break-word; }
.up-info .kv > span:first-child { flex: none; }
.up-info .kv > :last-child { text-align: right; min-width: 0; }
.up-form input[name=url], .up-form input[name=keyword], .up-form input[name=expected_status] { width: min(100%, 460px); }
.up-form .more-opts .settings { gap: 10px; }
.up-form .checks .check { flex-direction: row; font-weight: 400; font-size: 14px; }

/* plans v2: the Pricing table (desktop), plan cards by group (phones), the small "Pro" / "Team" labels */
.plan-group-h { margin: 10px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
/* the plans table is folded: the cards above say the same in short */
.ptable-fold { margin-top: 14px; scroll-margin-top: calc(var(--top-h, 0px) + 16px); }
.ptable-fold > summary { cursor: pointer; font-weight: 600; color: var(--soft); width: fit-content; }
.ptable-fold > summary:hover { color: var(--ink); }
.ptable-box { margin-top: 12px; border: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th, .ptable td { padding: 8px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.ptable thead th { font-size: 16px; font-weight: 800; border-bottom: 1px solid var(--line); }
.ptable tbody th { font-weight: 400; color: var(--soft); }
.ptable td { width: 19%; }
.ptable tr.ptable-group th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); font-weight: 500; padding-top: 16px; background: var(--paper); }
.pt-yes { color: var(--ok-fg); font-weight: 700; }
.pt-no { color: var(--muted); }
.plan-tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.3px; color: var(--muted); border: 1px solid var(--rule); padding: 0 5px; line-height: 17px; vertical-align: middle; white-space: nowrap; text-decoration: none; font-weight: 400; text-transform: none; }
a.plan-tag:hover { color: var(--ink); border-color: var(--line); }
.plan-incl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin-top: 8px; }
.plan-incl-cols h3 { margin: 0 0 4px; }
.plan-incl-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--soft); display: flex; flex-direction: column; gap: 3px; }
.changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.changes li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; align-items: baseline; border-bottom: 1px solid var(--rule); padding: 5px 0; }
@media (max-width: 520px) { .changes li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.rule-plan { margin: 6px 0; }
@media (max-width: 860px) {
  .ptable-box, .ptable-fold { display: none; }
  .bill-toggle { align-self: stretch; }
  .bill-toggle label { flex: 1; text-align: center; }
}

/* alert kinds in Settings: clear on / off toggles (a real checkbox under each chip) */
.kind-toggles .toggles-hint { width: 100%; margin: 0 0 2px; }
.kind-toggles .chip > span { opacity: .5; border-style: dashed; }
.kind-toggles .chip > span::before { content: ""; display: inline-block; width: 12px; }
.kind-toggles .chip input:checked + span { background: var(--surface); color: var(--ink); border: 1px solid var(--line); opacity: 1; font-weight: 600; }
.kind-toggles .chip input:checked + span::before { content: "✓"; color: var(--ok-fg); font-weight: 700; }

/* Settings: with unsaved changes the Save bar is fixed to the bottom of the window, wherever you are on the
   page (also over Plan / Integrations, which are outside the form); hidden when nothing changed */
#account-form.is-dirty .savebar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 30;
  padding: 12px max(24px, calc((100vw - 1320px) / 2 + 24px)) calc(12px + env(safe-area-inset-bottom, 0px)); }
body.has-savebar { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 760px) {
  #account-form.is-dirty .savebar { padding-left: 16px; padding-right: 16px; }
  body.has-savebar { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}

/* buttons: a clear hover and focus state in both themes */
.btn:not(.btn-dark):not(.btn-danger):not([aria-disabled="true"]):hover { background: var(--hover); }
.btn-dark:hover, .btn-dark.btn-link:hover { background: color-mix(in srgb, var(--hl) 85%, var(--ink)); border-color: color-mix(in srgb, var(--hl) 85%, var(--ink)); color: var(--on-hl); }
.btn:focus-visible, .more > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* "+ New job" split button (every page, base.html): one black button, a thin line, a white ▾ */
.new-split { gap: 0; }
.new-split > a.btn-dark { border-right: 0; }
.new-more > summary.btn-dark { width: auto; min-width: 34px; padding: 0 10px; background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-left: 1px solid color-mix(in srgb, var(--paper) 45%, var(--ink)); font-size: 14px; }
.new-more > summary.btn-dark:hover, .new-more[open] > summary.btn-dark { background: color-mix(in srgb, var(--ink) 80%, var(--paper));
  border-color: color-mix(in srgb, var(--ink) 80%, var(--paper)); border-left-color: color-mix(in srgb, var(--paper) 45%, var(--ink)); color: var(--paper); }

/* docs sidebar: its parts never shrink (the search box keeps its 36px height in the scrolling sidebar) */
.docs-toc > * { flex-shrink: 0; }

/* empty Jobs page: the three kinds of jobs */
.empty-lede { width: 100%; margin: 0; }
.kind-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 900px; }
.kind-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.kind-card:hover { background: var(--hover); }
.kind-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { .kind-cards { grid-template-columns: 1fr; } }

/* "…" and "+ New job ▾" menus: one clean panel, full-width rows, dividers only between groups */
.more .menu { min-width: 240px; padding: 6px; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
.rowmenu .menu, .new-more .menu { min-width: 240px; }
.more .menu > form { gap: 0; }
.more .menu > .btn, .more .menu > form > .btn, .more .menu > .menu-item {
  display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 40px; height: auto; padding: 0 12px;
  border: 0; border-radius: 4px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 500;
  white-space: nowrap; text-align: left; text-decoration: none; }
.more .menu > .menu-item { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 7px 12px; }
.more .menu > .menu-item b { font-weight: 600; }
.more .menu > .menu-item span { font-size: 12.5px; color: var(--muted); }
.more .menu > .btn:hover, .more .menu > form > .btn:hover, .more .menu > .menu-item:hover,
.more .menu > .btn:focus-visible, .more .menu > form > .btn:focus-visible, .more .menu > .menu-item:focus-visible {
  background: color-mix(in srgb, var(--ink) 9%, var(--surface)); color: var(--ink); }
.more .menu > .btn:focus-visible, .more .menu > form > .btn:focus-visible, .more .menu > .menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.more .menu > .btn-danger, .more .menu > form > .btn-danger { color: var(--danger); }
.more .menu > .btn-danger:hover, .more .menu > .btn-danger:focus-visible { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.more .menu .menu-sep { height: 1px; margin: 5px 4px; background: var(--rule); flex: none; }
.more .menu > form > input[type=text] + .btn { width: auto; border: 1px solid var(--line); }
.more .menu > form:has(> input[type=text]) { gap: 6px; padding: 4px 6px; }   /* Rename: a gap between the field and its button */
@media (max-width: 600px) { .more .menu { max-width: calc(100vw - 16px); } .more .menu > .menu-item span { white-space: normal; } }

/* ---- History (history_page.py): today line, period picker, cards, ring, runs per day ---- */
.num { font-variant-numeric: tabular-nums; }
.hist-today { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; border: 1px solid var(--line); background: var(--surface); padding: 10px 16px; font-size: 14px; margin-top: -8px; }
.hist-today-t { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.hist-today-p { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.hist-chip { display: inline-flex; align-items: center; gap: 6px; }
.hist-today-a { margin-left: auto; }
.hist-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.hist-periods { flex-wrap: wrap; }
.hist-periods a { font-variant-numeric: tabular-nums; }
.hist-periods a + a { border-left: 1px solid var(--line); }
.hist-periods a:hover:not([aria-current]) { background: var(--hover); color: var(--ink); }
.hist-custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: -12px; }
.hist-custom label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.hist-custom input { height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 8px; font: inherit; font-weight: 400; }
.hist-custom .btn { height: 34px; }
.hist-period { margin: -12px 0 0; font-size: 14px; }
.hist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.hcard { border: 1px solid var(--line); background: var(--surface); padding: 16px 18px 18px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.hcard-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.hcard h2 { font-size: 17px; display: flex; align-items: center; gap: 2px; }
.hcard-sub { font-weight: 600; color: var(--soft); font-size: 14px; margin-left: 8px; }
.hcard-foot { margin: 0; color: var(--soft); border-top: 1px solid var(--rule); padding-top: 10px; }
.hcard-empty { display: flex; align-items: center; gap: 16px; margin: 0; }
.hcard .tr.mini { padding: 10px 2px; }
.hcard .tr.mini:last-child { border-bottom: 0; }
.donut-wrap { display: flex; align-items: center; gap: 28px; }
.donut { width: 168px; height: 168px; flex: 0 0 auto; }
.donut.is-empty { width: 84px; height: 84px; }
.donut-track { stroke: var(--grid); }
.donut-seg:hover { stroke-width: 19; }
.donut-n { fill: var(--ink); font-family: Archivo, system-ui, sans-serif; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut-l { fill: var(--muted); font-family: Archivo, system-ui, sans-serif; font-size: 12px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.legend-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3.6em; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.legend-row:last-child { border-bottom: 0; }
.legend-row.is-zero { color: var(--muted); }
.legend-row.is-zero .sq { opacity: .45; }
.legend-n { font-weight: 600; text-align: right; }
.legend-p { color: var(--muted); text-align: right; }
.legend-inline { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; font-size: 13px; color: var(--soft); }
.legend-inline li { display: inline-flex; align-items: center; gap: 6px; }
.trend { flex: 1 1 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(150px, 1fr) auto; column-gap: 8px; row-gap: 6px; }
.trend-y { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11px; color: var(--muted); margin: -7px 0; }
.trend-plot { grid-row: 1; grid-column: 2; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: 2px; border-bottom: 1px solid var(--soft); }
.trend.is-dense .trend-plot { column-gap: 1px; }
.trend-grid { position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid var(--grid); pointer-events: none; }
.trend-grid.is-mid { top: 50%; }
.tcol { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 100%; text-decoration: none; }
.tcol:hover, a.tcol:focus-visible { background: var(--hover); }
.tbar { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; width: 100%; max-width: 24px; height: 100%; }
.tseg { display: block; width: 100%; min-height: 1px; }
.tbar > :first-child { border-radius: 4px 4px 0 0; }
.trend.is-dense .tbar > :first-child { border-radius: 2px 2px 0 0; }
.trend.is-dense .tbar { gap: 1px; }
.trend-x { grid-row: 2; grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: 2px; font-size: 11px; color: var(--muted); }
.trend-x span { white-space: nowrap; justify-self: center; }
.trend-x .is-first { justify-self: start; }
.trend-x .is-last { justify-self: end; }
.web-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.5em; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.web-row:last-child { border-bottom: 0; }
.web-row:hover { background: var(--hover); color: var(--ink); }
.web-row > :last-child { text-align: right; font-weight: 600; }
@media (max-width: 900px) { .hist-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .donut-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  .donut { align-self: center; width: 156px; height: 156px; }
  .hist-today { gap: 4px 14px; }
  .hist-today-a { margin-left: 0; }
  .hist-periods { display: flex; width: 100%; }
  .hist-periods a { flex: 1 1 auto; text-align: center; padding: 7px 8px; font-size: 13px; }
  .hist-controls .filters, .hist-controls .filters select { width: 100%; }
  .trend { grid-template-rows: 120px auto; }
  .web-row { grid-template-columns: minmax(0, 1fr) 5.5em; }
  .web-row > :nth-child(2) { display: none; }
}
@media (forced-colors: active) { .donut-seg, .tseg { forced-color-adjust: none; } }
/* History > Most problems: the job name is never cut off; long names wrap */
.hcard .tr.mini .name { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
@media (max-width: 520px) { .hcard .tr.mini { gap: 10px; grid-template-columns: 64px minmax(0, 1fr) auto; } }

/* ---- Settings sub-pages: menu on the left; on a phone rows of tabs that wrap ---- */
.sett-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 40px; align-items: start; }
.sett-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 8px; position: sticky; top: calc(var(--top-h, 0px) + 16px); }
.sett-nav a { display: block; padding: 8px 12px; color: var(--muted); text-decoration: none; font-size: 14.5px; border-left: 2px solid transparent; }
.sett-nav a:hover { color: var(--ink); background: var(--hover); }
.sett-nav a[aria-current="page"] { color: var(--hl); font-weight: 700; border-left-color: var(--hl); }
.sett-layout > .sett-page > .sett-row:first-child, .sett-layout > .sett-page > .sett > .sett-row:first-child { padding-top: 16px; }
@media (max-width: 760px) {
  .sett-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* tabs wrap onto a second line, so every tab (Integrations, Plan & billing) stays visible */
  /* three equal tabs a row (Alerts Reports Account / API Integrations Plan & billing): no tab left alone */
  .sett-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding-top: 0; border-top: 0; }
  .sett-nav a { flex: 1 1 calc(33.333% - 6px); min-width: 0; text-align: center; white-space: nowrap; padding: 9px 4px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 14px; }
  .sett-nav a[aria-current="page"] { border-color: var(--hl); background: var(--hl-bg); color: var(--hl); }
}
/* header: the plan next to the email, small and muted */
.plan-chip { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--rule); padding: 1px 6px; line-height: 16px; text-decoration: none; white-space: nowrap; }
.plan-chip:hover { color: var(--ink); border-color: var(--line); }
/* Settings → Plan & billing */
.plan-now { margin: 0; font-size: 16px; }
.upgrade-pick > summary { list-style: none; display: inline-flex; align-items: center; width: max-content; }
.upgrade-pick > summary::-webkit-details-marker { display: none; }
.upgrade-pick[open] > summary { display: none; }
.plan-more { border-bottom: 0 !important; padding-top: 0 !important; }
.sett-page .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* brand logos (sprite /brand-icons.svg, monitor/brand.py): one small size next to the visible name.
   Logos keep their own colours; one-colour ones (Tux, ntfy) and the plain drawings follow the text colour. */
.bi { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; fill: currentColor; }
.with-bi { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
h1.with-bi, h2.with-bi { display: flex; gap: 10px; }
h1 .bi, h2 .bi { width: 20px; height: 20px; }
.pick-bi { display: flex; align-items: center; gap: 8px; }
.pick-bi select { flex: 1; min-width: 0; width: auto; }
.bi-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.docs-toc a .bi { margin-right: 6px; }
.field-l > .with-bi + * { margin-left: 5px; }

/* narrow phones: the brand, Log in and Start free stay on one line */
@media (max-width: 430px) {
  .topbar-in { gap: 4px 6px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand svg { width: 26px; height: 26px; }
  .topbar .btn { padding: 0 8px; font-size: 14px; }
}

/* fields have the same soft corners as buttons (2026-11-12 look) */
input:is([type=text], [type=email], [type=password], [type=number], [type=search], [type=url], [type=date], [type=time], :not([type])), select, textarea, .fake-input { border-radius: var(--radius); }
/* ---- dark theme: edges of form fields, outline buttons and "…" buttons (#34) ----
   --line (#3A3C41) is too faint on the dark surfaces for controls (~1.4:1); controls use --ctl-line
   (#75787F: 3.7:1 on #1F2023, 3.2:1 on #2A2B2F). Cards and tables keep --line. The light theme is unchanged. */
:root[data-theme="dark"] { --ctl-line: #75787F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --ctl-line: #75787F; } }
:root[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea, .fake-input,
  .btn:not(.btn-dark):not(.btn-danger):not(.btn-ghost):not(.code-copy)) { border-color: var(--ctl-line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea, .fake-input,
    .btn:not(.btn-dark):not(.btn-danger):not(.btn-ghost):not(.code-copy)) { border-color: var(--ctl-line); }
}

/* Jobs: the summary above the table (needs attention, healthy, next run, latest change) */
.summary-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); background: var(--surface); padding: 12px 16px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tile.is-alert { border-left: 4px solid var(--st-failed); }
.tile-line { display: flex; align-items: center; gap: 6px; font-size: 13px; text-decoration: none; color: var(--ink); min-width: 0; }
.tile-line:hover .ellipsis { text-decoration: underline; }
.tile-line .sq { flex: none; }
.tile-line .ellipsis { flex: 0 1 auto; max-width: 62%; }   /* the job's name first */
.tile-line .muted { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-more { margin-top: auto; padding-top: 6px; color: var(--hl); text-decoration: none; }
.tile-more:hover { text-decoration: underline; }
@media (max-width: 900px) { .summary-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {   /* two small tiles a row on a phone, so the table is not pushed far down */
  .summary-tiles { gap: 8px; } .tile { padding: 9px 11px; }
  .tile .fact-v { font-size: 16px; } .tile-line .muted { display: none; } }

/* History: "Where" card, by machine or by project (two radios, no script) */
.places .mini.tr { grid-template-columns: minmax(0, 1fr) auto auto; }   /* name | runs | problems */
.places .seg { display: inline-flex; border: 1px solid var(--rule); margin-bottom: 4px; }
.places .seg label { padding: 4px 10px; cursor: pointer; color: var(--muted); }
.places .seg label + label { border-left: 1px solid var(--rule); }
#pl-machine:checked ~ .seg label[for="pl-machine"], #pl-project:checked ~ .seg label[for="pl-project"] { color: var(--hl); background: var(--hl-bg); font-weight: 600; }
#pl-machine:focus-visible ~ .seg label[for="pl-machine"], #pl-project:focus-visible ~ .seg label[for="pl-project"] { outline: 2px solid var(--hl); }
#pl-machine:checked ~ .pl-project, #pl-project:checked ~ .pl-machine { display: none; }

/* softer shapes (2026-11-12 look: thin grey borders, rounded cards and controls, one petrol accent) */
.facts, .tile, .hcard, .alert, .limit-note, dialog { border-radius: var(--radius-card); }
.facts { overflow: hidden; }
.alert { border-width: 1px; }
.tile.is-alert { border-left-width: 3px; }
.job-head h1 { border-left-width: 3px; }
.topbar .brand svg { border-radius: 8px; }
@media (max-width: 860px) { .proj-side > a, .side-branch > .side-row, .proj-side .new-proj > summary { border-radius: var(--radius); border-width: 1px; } }
.proj-side a { border-radius: var(--radius); }
/* History, status changes on a phone: no sideways scrolling that hides the change; two lines per row */
@media (max-width: 600px) {
  .alerts { min-width: 0; }
  .al { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 2px; }
  .al.th { display: none; }
  .al > :nth-child(1) { order: 2; color: var(--muted); }
  .al > :nth-child(2) { order: 1; font-weight: 600; }
  .al > :nth-child(3) { order: 3; grid-column: 1 / -1; }
  .al > :nth-child(4) { order: 4; grid-column: 1 / -1; }
}
input[type=checkbox], input[type=radio] { accent-color: var(--hl); }

/* sidebar: a project and a machine look different (folder / computer icon, and the group name also on a phone) */
.side-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.proj-side a:has(.side-ico) { justify-content: flex-start; align-items: center; gap: 7px; }
@media (max-width: 860px) {
  .proj-side .group { display: block; flex-basis: 100%; margin: 8px 0 0; padding: 0; }
  .proj-side .group:first-of-type { margin-top: 2px; }
}
.tag-link { display: inline-flex; align-items: center; gap: 4px; }
.tag-link .side-ico { width: 12px; height: 12px; }

/* Jobs on a phone: one Filter button instead of rows of project and machine chips before the table */
.side-toggle { display: none; }
@media (max-width: 860px) {
  .proj-side .side-toggle:not([hidden]) { display: flex; align-items: center; gap: 6px; flex-basis: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
  .proj-side .side-toggle .muted { font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .proj-side .side-toggle [aria-hidden] { margin-left: auto; }
  .proj-side.is-collapsed > :not(.side-toggle) { display: none; }
}
.hist-today.is-on { border-color: var(--hl); background: var(--hl-bg); }   /* Today chosen: the box itself shows it */

/* job page: the details under the name as small tags, not one long line of small mono text */
.job-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; line-height: 1.3; }
.job-head .meta .kind { margin-right: 4px; font-size: 14px; }
.mtag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; background: var(--hover); color: var(--soft); font-size: 12.5px; text-decoration: none; }
a.mtag:hover { color: var(--hl); }
.mtag .side-ico { width: 12px; height: 12px; }

/* /demo/: a guided tour in four numbered steps, built from the real components */
.demo-head .lede { max-width: 720px; }
.demo-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; }
.demo-num { width: 32px; height: 32px; border-radius: 50%; background: var(--hl); color: var(--on-hl); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.demo-step h2 { margin: 4px 0 4px; }
.demo-gap { margin-top: 14px; }
.demo-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 20px; margin: 16px 0 0; }
.demo-legend dt { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.demo-legend dd { display: inline; margin: 0 0 0 4px; color: var(--muted); }
.demo-card { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 16px; }
.demo-job { margin: 4px 0 0; font-size: 22px; border-left: 3px solid var(--hl); padding-left: 10px; }
.demo-code { background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius-card); padding: 14px 16px; overflow-x: auto; margin: 12px 0 8px; }
.demo-mail { max-width: 560px; border: 1px solid var(--line); border-top: 3px solid var(--hl); border-radius: var(--radius-card); background: var(--surface); padding: 14px 18px; }
.demo-mail-box { margin: 8px 0; padding: 9px 12px; border-left: 4px solid var(--st-odd); background: var(--hover); border-radius: 0; }
@media (max-width: 600px) { .demo-step { grid-template-columns: minmax(0, 1fr); gap: 6px; } .demo-card { padding: 12px; } }

/* job page: a new rule is added behind "+ Add rule" (no rules until the script sends numbers) */
.rule-adder { margin: 10px 0; }
.rule-adder > summary { list-style: none; display: inline-flex; align-items: center; cursor: pointer; }
.rule-adder > summary::-webkit-details-marker { display: none; }
.rule-adder[open] > summary { background: var(--hl-bg); border-color: var(--hl); color: var(--hl); }
.rule-adder + .btn, .rule-adder > .btn { margin-top: 8px; }

/* the quiet refresh wraps the alert in a box that may be empty: it must not add a gap to the page */
[data-live="alert"] { display: contents; }

/* Settings → AI assistants: the MCP address with Copy, and one row per connected app (2026-11-16) */
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .keybox { flex: 1; min-width: 0; }
.conn-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.consent .cta { display: flex; gap: 8px; margin-top: 8px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 16px; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.doc-table th { color: var(--soft); font-weight: 600; }
@media (max-width: 640px) { .doc-table td:first-child code { word-break: break-all; } }

/* Landing: example conversations with an AI assistant (2026-11-17) */
.ai-chats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 10px; }
.ai-chat { border: 1px solid var(--line); border-radius: var(--radius-card, 8px); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-q { margin: 0; align-self: flex-end; max-width: 90%; background: var(--hl-bg); color: var(--ink); padding: 8px 12px; border-radius: 12px 12px 4px 12px; font-weight: 600; }
.ai-a { margin: 0; color: var(--soft); line-height: 1.5; }
@media (max-width: 760px) { .ai-chats { grid-template-columns: 1fr; } }
/* the AI page (/ai/) */
.ai-hero h1 { max-width: 760px; }
.ai-connect { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ai-card { border: 1px solid var(--line); border-radius: var(--radius-card, 8px); background: var(--surface); padding: 16px 18px; }
.ai-card h3 { margin: 0 0 8px; font-size: 18px; }
.ai-card ol { margin: 0 0 10px; padding-left: 20px; }
.ai-card li { margin: 0 0 6px; }
.ai-card p { margin: 0; }
.ai-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 10px; }
.ai-addr code { font-size: 15px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow-wrap: anywhere; }
.ai-prompts { display: grid; gap: 10px; margin-top: 14px; }
.ai-prompts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-prompt { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 1px solid var(--line);
  border-left: 3px solid var(--hl); border-radius: var(--radius-card, 8px); background: var(--surface); padding: 12px 14px; }
.ai-prompt p { margin: 4px 0 0; }
.ai-prompt .btn { flex: 0 0 auto; }
@media (max-width: 760px) { .ai-connect, .ai-prompts-2 { grid-template-columns: 1fr; } }

/* "TaskBeacon in 40 seconds" (_ai_film.html, ai-film.js). Without JS every step shows; with JS a step waits
   for .shown. The stage keeps one height so the page doesn't jump between scenes. */
.film { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 14px 16px 12px; }
.film-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.film-cap { margin: 0; font-weight: 600; font-size: 17px; }
.film-play { flex: 0 0 auto; }
.film-stage { position: relative; min-height: 510px; margin-top: 12px; border-radius: var(--radius); background: var(--paper);
  padding: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.film-scene { display: none; width: 100%; max-width: 620px; }
.film-scene.on { display: block; }
.film-js .film-step { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.film-js .film-step.shown { opacity: 1; transform: none; }
.film-dim { color: var(--muted); }
.film-term { background: var(--code-bg); color: var(--code-fg); font-family: var(--mono); font-size: 13px; line-height: 1.9;
  border-radius: var(--radius-card); padding: 16px 18px; }
.film-term .film-dim { color: #9a9aa2; }
.film-err { color: #ff8f9f; }
.film-list, .film-mail, .film-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
/* the chat is always a dark AI-app window (in both site themes): the prompt is the hero of the story. Neutral on
   purpose: the app's name as text, no copy of Claude's or ChatGPT's own look or logo. */
.film-chat { background: #1B1C1F; color: #ECECEF; border: 1px solid #34353A; border-radius: 12px; padding: 0 14px 12px;
  display: flex; flex-direction: column; min-height: 420px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.film-chat b { color: #fff; }
.film-chat-head, .film-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px;
  padding: 10px 0; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.film-chat .film-chat-head { border-color: #2E2F34; }
.film-app { font-weight: 700; font-size: 14px; color: #fff; }
.film-conn { font-size: 12px; color: #A9A9B2; }
.film-conn::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5CC98E; margin-right: 6px; }
.film-msgs { flex: 1; }
.film-me, .film-ai { margin: 0 0 10px; padding: 9px 12px; border-radius: 14px; max-width: 88%; font-size: 14px; line-height: 1.5; }
.film-me { margin-left: auto; background: #303136; width: fit-content; }
.film-ai { padding-left: 2px; }
.film-prompt { display: flex; align-items: center; gap: 10px; min-height: 46px; margin-top: 4px; padding: 6px 6px 6px 16px;
  border: 1px solid #3A3B41; border-radius: 22px; background: #26272B; font-size: 15px; }
.film-prompt-text { flex: 1; min-width: 0; }
.film-prompt-text:empty::before { content: "Message\2026"; color: #7D7D86; }
.film-send { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #3A3B41; color: #1B1C1F; font-weight: 700; transition: background .2s; }
.film-prompt:has(.film-typing) .film-send { background: #4FC1C9; }
.film-typing::after { content: "|"; margin-left: 1px; color: #4FC1C9; }
.film-tool { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--hl); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 8px; margin-right: 4px; vertical-align: 1px; }
.film-chat .film-tool { color: #4FC1C9; border-color: #3A3B41; }
.film-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.film-table th { text-align: left; font-weight: 600; color: #fff; padding: 6px 8px 6px 0; border-bottom: 1px solid #3A3B41; }
.film-table td { padding: 7px 8px 7px 0; border-bottom: 1px solid #2E2F34; color: #D6D6DC; vertical-align: top; }
.film-table code { font-family: var(--mono); font-size: 11px; background: #2A2B30; padding: 1px 5px; border-radius: 4px; }
.film-red { color: #FF8597 !important; } .film-amber { color: #F0B455 !important; } .film-pink { color: #F08CC0 !important; }
.film-green { color: #5CC98E !important; }
.film-next { margin: 0 0 8px; color: #D6D6DC; }
.film-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #ECECEF; color: #1B1C1F; font-size: 13px; font-weight: 600; }
.film-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.film-stats > div { border: 1px solid #34353A; border-radius: 10px; padding: 8px 10px; font-size: 12px; color: #A9A9B2; }
.film-stats b { display: block; font-size: 20px; }
.film-code { display: block; margin-top: 8px; padding: 8px 10px; border-radius: var(--radius); background: var(--code-bg);
  color: var(--code-fg); font-family: var(--mono); font-size: 12px; line-height: 1.7; white-space: normal; }
.film-list { padding: 0 14px 6px; }
.film-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0;
  border-top: 1px solid var(--rule); font-size: 14px; }
.film-list-head + .film-row { border-top: 0; }
.film-new { background: var(--hl-bg); margin: 0 -14px; padding: 9px 14px; border-top: 0; }
.film-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.film-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--st-new)); }
.film-mails { display: grid; gap: 12px; }
.film-mail { padding: 12px 14px; font-size: 14px; }
.film-mail-from { display: flex; justify-content: space-between; font-size: 13px; }
.film-mail-subj { margin: 4px 0; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.film-both { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.film-card { padding: 14px 16px; }
.film-card p { margin: 6px 0 0; font-size: 14px; color: var(--soft); }
.film-hl { border-color: var(--hl); box-shadow: inset 3px 0 0 var(--hl); }
.film-end { grid-column: 1 / -1; margin: 4px 0 0; text-align: center; font-weight: 600; }
.film-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.film-dots button { width: 26px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.film-dots button[aria-current="true"] { background: var(--hl); }
.film-dots button:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }
.land-film { margin-top: 8px; }
/* version B: the chat and TaskBeacon side by side */
.film-b .film-scene { max-width: 1000px; }
.film-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.film-tb { align-self: center; }
/* the "scan my computer" scene: a terminal AI app (Claude Code), neutral look */
.film-solo { max-width: 620px; margin: 0 auto; }
.film-cc { font-size: 12.5px; line-height: 1.75; border: 1px solid #34353A; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.film-cc > div { margin-bottom: 4px; }
.film-cc-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font, inherit);
  border-bottom: 1px solid #2E2F34; padding-bottom: 8px; margin-bottom: 10px !important; }
.film-cc-me { color: #fff; font-weight: 600; }
.film-cc-dot { color: #4FC1C9; margin-right: 4px; }
.film-cc-cmd { color: #F0B455; }
.film-cc-out { color: #B9B9C2; padding-left: 16px; }
.film-cc b { color: #fff; }
.film-tb .film-row { grid-template-columns: 96px minmax(0, 1fr) auto; font-size: 13px; }
@media (max-width: 860px) {
  .film-split { grid-template-columns: 1fr; gap: 10px; }
  .film-b .film-chat { min-height: 0; }
  .film-tb .film-row { padding: 6px 0; font-size: 12px; grid-template-columns: 84px minmax(0, 1fr); }
  .film-tb .film-row > :last-child { display: none; }
  .film-tb .film-list-head { padding: 6px 0; margin-bottom: 4px; }
  .film-hide-sm { display: none; }
}
@media (max-width: 600px) {
  .film { padding: 12px; }
  .film-cap { font-size: 15px; }
  .film-stage { min-height: 630px; padding: 10px; }
  .film-me, .film-ai, .film-mail, .film-row { font-size: 13px; }
  .film-me, .film-ai { max-width: 94%; }
  .film-table { font-size: 12px; }
  .film-table th:nth-child(3), .film-table td:nth-child(3) { font-size: 11px; }
  .film-both { grid-template-columns: 1fr; }
  .film-row { grid-template-columns: 90px minmax(0, 1fr); }
  .film-row > :last-child { grid-column: 2; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .film-js .film-step { transition: none; } }
.film:not(.film-js) .film-stage > .film-scene:first-of-type { display: block; }
.film-cap-empty { visibility: hidden; }
.film-quiet { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.film-digest { max-width: 560px; margin: 0 auto; }
.film-table-light th { color: var(--ink); border-color: var(--line); }
.film-table-light td { color: var(--soft); border-color: var(--rule); }
.film-ok-t { color: var(--st-ok) !important; } .film-odd-t { color: var(--st-odd) !important; } .film-bad-t { color: var(--st-missed) !important; }
.film-mails .film-term { margin-bottom: 12px; }
.film-card-title { text-align: center; }
.film-card-title p { font-size: 22px; font-weight: 600; max-width: 560px; margin: 14px auto 0; line-height: 1.35; }
.film-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; }
.film-url { font-size: 18px !important; color: var(--hl); }

/* promo clips (clips.py, clip.html): the film fills a fixed frame; the recorder sets the window to this size */
.clip { margin: 0; background: var(--paper); }
.clip .film { width: var(--clip-w); height: var(--clip-h); box-sizing: border-box; border: 0; border-radius: 0;
  display: flex; flex-direction: column; padding: 18px 26px 14px; background: var(--paper); }
.clip .film-top { min-height: 40px; }
.clip .film-cap { font-size: 22px; }
.clip .film-stage { flex: 1; min-height: 0; background: var(--surface); border: 1px solid var(--line); }
.clip-rec .film-play, .clip-rec .film-dots { display: none; }
.clip-square .film { padding: 14px; }
.clip-square .film-cap { font-size: 18px; }
.clip-wide .film-scene:not(.film-dark), .clip-ph .film-scene:not(.film-dark) { zoom: 1.18; }
.clip-square .film-scene:not(.film-dark) { zoom: 1.05; }
/* square clips: one column; beside a chat or terminal the job list adds nothing at this size, so it goes */
.clip-square .film-split { grid-template-columns: 1fr; gap: 12px; }
.clip-square .film-chat ~ .film-tb, .clip-square .film-cc ~ .film-tb { display: none; }
.clip-square .film-b .film-chat { min-height: 0; }
/* dark full-frame cards (the clips' opening and end): big words rising in one by one, the logo's pulse drawn in */
.film-dark { color: #F2F2F4; }
.film-dark.on { display: flex !important; align-items: center; justify-content: center; position: absolute; inset: 0;
  max-width: none; background: radial-gradient(120% 90% at 50% 40%, #1C3A3D 0%, #141517 55%, #0D0E10 100%); }
.film-dark .film-card-title p { color: #F2F2F4; }
.film-q p { font-size: 54px; font-weight: 800; letter-spacing: -0.02em; max-width: 900px; margin: 0 auto; line-height: 1.12; }
.film-big { font-size: 34px !important; font-weight: 700 !important; max-width: 820px !important; letter-spacing: -0.01em; }
.film-sub { font-size: 20px !important; font-weight: 400 !important; color: #B9C4C6 !important; margin-top: 16px !important; }
.film-dark .film-url { color: #4FC1C9 !important; font-weight: 600; margin-top: 18px !important; }
.film-url-big { font-size: 30px !important; }
.film-hl-t { font-style: normal; color: #4FC1C9; }
.film-bad { font-style: normal; color: #FF7A8C; }
.film-dark .film-brand { font-size: 44px; color: #fff; letter-spacing: -0.02em; }
.film-dark .film-brand svg { filter: drop-shadow(0 0 22px rgba(79, 193, 201, .55)); }
.film-js .film-dark .film-step { transform: none; }
.film-js .film-dark [data-words] { opacity: 1; }
.film-dark [data-words] .w { display: inline-block; opacity: 0; transform: translateY(26px); filter: blur(6px); }
.film-dark .shown[data-words] .w { animation: film-rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 85ms); }
@keyframes film-rise { to { opacity: 1; transform: none; filter: none; } }
.film-dark .film-brand.shown svg { animation: film-pop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes film-pop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.film-pulse { stroke-dasharray: 40; stroke-dashoffset: 40; }
.film-dark .shown .film-pulse { animation: film-draw 1s .35s ease-out forwards; }
@keyframes film-draw { to { stroke-dashoffset: 0; } }
/* the example scenes in a clip come in with a slight zoom */
.clip .film-scene.on:not(.film-dark) { animation: film-in .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes film-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.clip-square .film-q p { font-size: 46px; }
.clip-square .film-big { font-size: 30px !important; }
@media (prefers-reduced-motion: reduce) {
  .film-dark [data-words] .w, .film-pulse { opacity: 1; transform: none; filter: none; stroke-dashoffset: 0; animation: none !important; }
}
.clip { overflow: hidden; }
/* in a clip the dark cards cover the whole frame: positioned against .film, not the stage or the viewport */
.clip .film { position: relative; }
.clip .film-stage { position: static; }
.clip .film-dark.on { position: absolute; inset: 0; z-index: 5; }
.clip-html { overflow: hidden; scrollbar-width: none; }

/* the brand clip (film/brand.html): one dark frame, the logo in the corner, the pulse as the motif */
.clip-bare .film { padding: 0; background: #0F1012; }
.clip-bare .film-top, .clip-bare .film-dots { display: none; }
.clip-bare .film-stage { border: 0; border-radius: 0; padding: 64px 84px 56px; color: #ECECEF;
  background: radial-gradient(110% 80% at 70% 30%, #16302F 0%, #121315 55%, #0E0F11 100%); }
.clip-bare .film-scene.on { animation: none; }
.clip-bare .film-scene:not(.film-dark) { zoom: 1; }
.bt-scene { width: 100%; max-width: none !important; }
.bt-frame { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.bt-frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(90deg, #0E7C86, #4FC1C9 60%, #0E7C86); }
.bt-corner { position: absolute; left: 28px; top: 22px; display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; color: #fff; opacity: .9; }
.bt-corner svg { width: 26px; height: 26px; }
.film:has(.bt-scene.on .bt-hero) .bt-corner { opacity: 0; }

.bt-bigpulse { position: absolute; left: 0; top: 50%; width: 100%; height: 200px; transform: translateY(-60%);
  filter: drop-shadow(0 0 14px rgba(79, 193, 201, .7)); }
.bt-scene.on .bt-bigpulse path { stroke-dasharray: 1700; stroke-dashoffset: 1700;
  animation: bt-draw 1.3s cubic-bezier(.4, 0, .2, 1) forwards, bt-dim .6s 1.4s forwards; }
@keyframes bt-draw { to { stroke-dashoffset: 0; } }
@keyframes bt-dim { to { opacity: .16; } }
.bt-hero { position: relative; text-align: center; }
.bt-logo { display: inline-flex; align-items: center; gap: 22px; font-size: 76px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.bt-logo svg { width: 96px; height: 96px; filter: drop-shadow(0 0 30px rgba(79, 193, 201, .55)); }
.bt-hero p { margin: 18px 0 0; font-size: 28px; color: #B9C4C6; }
.bt-hero .bt-tag { font-size: 44px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.bt-hero .bt-url { font-size: 22px; color: #4FC1C9; font-weight: 600; }

.bt-title { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; color: #fff; margin-bottom: 40px;
  display: flex; align-items: center; gap: 18px; }
.bt-n { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: #0E7C86; color: #fff;
  display: grid; place-items: center; font-size: 26px; box-shadow: 0 0 24px rgba(79, 193, 201, .45); }
.bt-foot { margin: 34px 0 0; font-size: 21px; color: #A9B4B6; }

.bt-flow { display: grid; grid-template-columns: 340px 1fr 150px; align-items: center; column-gap: 0; }
.bt-scripts, .bt-lines { display: grid; gap: 22px; }
.bt-script { height: 74px; box-sizing: border-box; display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: #1C1D21; border: 1px solid #2E3035; border-radius: 12px; font-family: var(--mono); font-size: 17px; color: #fff; }
.bt-script small { white-space: nowrap; margin-left: auto; font-family: inherit; font-size: 13px; color: #8E959A; }
.bt-lang { font-size: 12px; font-weight: 700; color: #0E1A1B; background: #4FC1C9; border-radius: 6px; padding: 3px 7px; }
.bt-line { position: relative; height: 74px; }
.bt-line::before { content: ""; position: absolute; left: 0; right: 18px; top: 50%; height: 3px; margin-top: -1.5px;
  background: linear-gradient(90deg, #1F4A4D, #2B6A6F); border-radius: 2px; }
.bt-line i { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  background: #4FC1C9; box-shadow: 0 0 16px 4px rgba(79, 193, 201, .7); animation: bt-travel 1.5s linear infinite; }
.bt-line:nth-child(2) i { animation-delay: -.5s; }
.bt-line:nth-child(3) i { animation-delay: -1s; }
@keyframes bt-travel { from { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { left: calc(100% - 34px); opacity: 0; } }
.bt-ok { position: absolute; right: 26px; top: 6px; font-size: 13px; letter-spacing: .08em; color: #5CC98E; }
.bt-node { justify-self: end; width: 128px; height: 128px; position: relative; }
.bt-node svg { width: 100%; height: 100%; filter: drop-shadow(0 0 28px rgba(79, 193, 201, .6)); }
.bt-node::after { content: ""; position: absolute; inset: -10px; border-radius: 34px; border: 2px solid #4FC1C9;
  animation: bt-ring 1.5s ease-out infinite; }
@keyframes bt-ring { from { opacity: .8; transform: scale(.9); } to { opacity: 0; transform: scale(1.35); } }
.bt-node-alarm::after { border-color: #F0B455; }
.bt-line-bad::before { background: #F0B455; box-shadow: 0 0 12px rgba(240, 180, 85, .6); }
.bt-line-bad i { background: #F0B455; box-shadow: 0 0 16px 4px rgba(240, 180, 85, .7); animation: bt-stop 1.2s ease-out forwards; }
@keyframes bt-stop { from { left: 0; } to { left: 42%; } }
.bt-line-late i { animation-duration: 5s; background: #B9A5FF; box-shadow: 0 0 16px 4px rgba(185, 165, 255, .6); }
.bt-line-off::before { background: repeating-linear-gradient(90deg, #4A4B50 0 10px, transparent 10px 20px); }
.bt-badge { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 700;
  color: var(--c); background: #16171A; border: 1px solid var(--c); border-radius: 999px; padding: 4px 12px; }
.bt-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.bt-flow-small { grid-template-columns: 280px 1fr 96px; }
.bt-flow-small .bt-script { height: 62px; font-size: 14px; }
.bt-flow-small .bt-line { height: 62px; }
.bt-flow-small .bt-node { width: 92px; height: 92px; }
.bt-mail { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px #2E3035; }
.film-js .bt-mail.film-step { transform: translateX(40px) scale(.97); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.film-js .bt-mail.film-step.shown { transform: none; }
.bt-split-ai { grid-template-columns: 1fr; justify-items: center; }
.bt-chat { width: 820px; min-height: 0 !important; font-size: 16px; }
.bt-chat .film-me, .bt-chat .film-ai { font-size: 16px; }
.bt-shot { position: relative; width: 820px; margin: 0 auto; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px #2E3035; }
.bt-shot img { display: block; width: 100%; height: auto; }
.bt-zoom { position: relative; transform-origin: 10% 22%; }
.bt-scene.on .bt-shot.shown .bt-zoom { animation: bt-kenburns 6s ease-out forwards; }
@keyframes bt-kenburns { from { transform: scale(1); } to { transform: scale(1.12); } }
.bt-ring { position: absolute; left: 1.2%; top: 16.6%; width: 32%; height: 6%; border: 3px solid #4FC1C9; border-radius: 10px;
  box-shadow: 0 0 22px rgba(79, 193, 201, .7); }
.bt-flow-small .bt-script small { display: none; }
.bt-scene:has(.bt-shot) .bt-title { margin-bottom: 22px; justify-content: center; }
/* brand clips: the short ones (film/bt/) */
.bt-lead { font-size: 30px !important; font-weight: 700; color: #4FC1C9 !important; margin-top: 26px !important; }
.bt-term { font-size: 15px; line-height: 1.8; border: 1px solid #2E3035; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.bt-term .film-cc-head { margin-bottom: 12px; }
.bt-list { background: #17181B; border: 1px solid #2E3035; border-radius: 14px; padding: 6px 22px 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5); align-self: center; }
.bt-list-head { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #2A2B30; color: #fff; font-size: 17px; }
.bt-list-head svg { width: 24px; height: 24px; }
.bt-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 0;
  border-top: 1px solid #222327; font-size: 18px; color: #ECECEF; }
.bt-list-head + .bt-row { border-top: 0; }
.bt-row i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.bt-row span { color: #9AA3A6; font-size: 15px; }
.film-js .bt-row.film-step { transform: translateX(24px); }
.film-js .bt-row.film-step.shown { transform: none; background: linear-gradient(90deg, rgba(79, 193, 201, .12), transparent 70%); }
.bt-flow-one { grid-template-columns: 220px 1fr 84px; margin-top: 22px; }
.bt-flow-one .bt-script { height: 58px; font-size: 14px; }
.bt-flow-one .bt-line { height: 58px; }
.bt-flow-one .bt-node { width: 84px; height: 84px; }
.bt-chat-half { width: 100%; }
.bt-node-pink::after { border-color: #F08CC0; }
.bt-email { background: #202125; border-radius: 14px; overflow: hidden; color: #ECECEF; font-size: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px #2E3035; }
.film-js .bt-email.film-step { transform: translateX(40px) scale(.97); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.film-js .bt-email.film-step.shown { transform: none; }
.bt-email-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 3px solid #0E7C86; background: #1A1B1E; }
.bt-email-head svg { width: 26px; height: 26px; }
.bt-email-head b { font-size: 18px; }
.bt-email-head span { margin-left: auto; color: #9AA3A6; font-size: 14px; }
.bt-email-body { padding: 20px 22px 22px; }
.bt-email-kind { border-left: 4px solid var(--c); background: #2A2B30; padding: 10px 14px; font-size: 21px; font-weight: 700; }
.bt-email-kind small { display: block; font-size: 12px; letter-spacing: .08em; color: var(--c); font-weight: 700; }
.bt-email-body p { margin: 14px 0; }
.bt-email-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bt-email-body td { padding: 8px 0; border-top: 1px solid #2E3035; }
.bt-email-body td:first-child { color: #9AA3A6; width: 34%; }
.bt-email-note { color: #9AA3A6; font-size: 14px; }
.bt-email-wide { width: 860px; margin: 0 auto; }
.bt-email-wide td:first-child { color: #ECECEF; width: 38%; }

/* square clips (1080x1080): one column, smaller type */
.clip-square.clip-bare .film-stage { padding: 58px 36px 40px; }
.clip-square .bt-title { font-size: 30px; margin-bottom: 24px; }
.clip-square .bt-n { width: 42px; height: 42px; font-size: 21px; }
.clip-square .bt-logo { font-size: 56px; }
.clip-square .bt-logo svg { width: 72px; height: 72px; }
.clip-square .bt-hero .bt-tag { font-size: 34px; }
.clip-square .bt-hero .bt-url { font-size: 18px; }
.clip-square .bt-lead { font-size: 25px !important; padding: 0 20px; }
.clip-square .bt-split { grid-template-columns: 1fr; gap: 18px; }
.clip-square .bt-flow { grid-template-columns: 250px 1fr 96px; }
.clip-square .bt-flow .bt-script { font-size: 14px; height: 58px; }
.clip-square .bt-flow .bt-line { height: 58px; }
.clip-square .bt-flow .bt-node { width: 90px; height: 90px; }
.clip-square .bt-flow .bt-script small { display: none; }
.clip-square .bt-mail { width: 88%; justify-self: center; }
.clip-square .bt-chat { width: 100%; }
.clip-square .bt-shot { width: 100%; }
.clip-square .bt-email-wide { width: 100%; }
.clip-square .bt-foot { font-size: 17px; margin-top: 20px; }
.clip-square .bt-term { font-size: 13px; }
.clip-square .bt-row { padding: 10px 0; font-size: 16px; }
.clip-square .bt-scene:has(.film-chat) .bt-split > .bt-list,
.clip-square .bt-scene:has(.bt-term) .bt-split > .bt-list { display: none; }
.clip-square.clip-bare .film-stage { padding: 76px 34px 34px; }
.clip-square .bt-title { font-size: 27px; margin-bottom: 20px; }
.clip-square .bt-foot { display: none; }
.clip-square .bt-scripts, .clip-square .bt-lines { gap: 12px; }
.clip-square .bt-flow .bt-script, .clip-square .bt-flow .bt-line { height: 48px; }
.clip-square .bt-flow .bt-node { width: 80px; height: 80px; }
.clip-square .bt-badge { font-size: 13px; padding: 3px 10px; }
.clip-square .bt-mail { width: 66%; }
.clip-square .bt-email:not(.bt-email-wide) table, .clip-square .bt-email:not(.bt-email-wide) .bt-email-note { display: none; }
.clip-square .bt-email-wide td { padding: 6px 0; font-size: 14px; }
.clip-square .bt-shot { width: 96%; }
