/* ============================================================
   THE CLEAN LAYOUT (Basecamp 10492667707).

   A familiar frame around the same product: a plain left panel on a
   desk, a bottom bar with a Film button on a phone, ordinary cards,
   and larger plain text for anything the owner reads. The palette,
   the faces and the lamp grammar are styles.css's own; nothing here
   is a new design language.

   EVERY RULE IS SCOPED to html[data-layout="clean"], the attribute
   index.html stamps before first paint when this browser turned the
   layout on (public/layout.js). Without it this file changes nothing,
   which is why index.html can load it for everyone, and
   tests/clean-layout.test.mjs fails on any selector that escapes.

   What keeps the personality: the machine's face in the wordmark, the
   typewriter face for small labels and numbers only, the red record
   dot on every Film button, the status lamps (green working, amber
   waiting or wearing out, hollow not finished), the red handwriting
   once per screen, and one dark panel where the producer speaks.
   ============================================================ */

html[data-layout="clean"] {
  /* Cards and buttons soften everywhere, including the screens that have
     not been laid out again yet, so the product reads as one thing. */
  --radius: 8px;
  --radius-btn: 6px;
  --rail-w: 250px;
  --cl-rec: #e04a32;        /* the record dot, on ink */
  --cl-lamp-ok: #1f8a4c;    /* a lamp fill; text that says "running" uses --ok */
  --cl-line: rgba(23, 20, 15, 0.3); /* a secondary button's edge */
}
html[data-layout="clean"][data-theme="dark"] {
  --cl-lamp-ok: #79b587;
  --cl-line: rgba(239, 232, 218, 0.34);
}

/* ---------- buttons, everywhere ----------
   Sentence case in the reading face. One black button per card is the
   primary; .secondary is the white one beside it. */
html[data-layout="clean"] .btn {
  font-family: var(--font-text);
  font-size: 15.5px; font-weight: 600; letter-spacing: normal; text-transform: none;
  padding: 11px 20px;
}
html[data-layout="clean"] .btn:hover { background: var(--ink-press); border-color: var(--ink-press); color: var(--paper-3); }
html[data-layout="clean"] .btn.secondary { color: var(--ink); border-color: var(--cl-line); background: var(--surface); }
html[data-layout="clean"] .btn.secondary:hover { background: var(--paper-4); color: var(--ink); border-color: var(--ink); }
html[data-layout="clean"] .btn.danger:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
html[data-layout="clean"] .btn.small { font-size: 14.5px; letter-spacing: normal; padding: 8px 14px; }
/* The filming screen and the take panels are a dark ground (styles.css
   .capture/.take-review): the white-card secondary above would be ink on
   ink there, so "Use this take", "Approve as-is" and "Film another take"
   vanished. Inside those scopes the buttons keep the dark-ground colours. */
html[data-layout="clean"] .capture .btn:hover,
html[data-layout="clean"] .take-review .btn:hover,
html[data-layout="clean"] .rotate-hint .btn:hover { background: #fff; border-color: #fff; color: var(--panel); }
html[data-layout="clean"] .capture .btn.secondary,
html[data-layout="clean"] .take-review .btn.secondary,
html[data-layout="clean"] .rotate-hint .btn.secondary { color: var(--heading); background: transparent; border-color: rgba(239, 232, 218, 0.32); }
html[data-layout="clean"] .capture .btn.secondary:hover,
html[data-layout="clean"] .take-review .btn.secondary:hover,
html[data-layout="clean"] .rotate-hint .btn.secondary:hover { color: var(--heading); background: rgba(239, 232, 218, .08); border-color: rgba(239, 232, 218, 0.6); }

/* ============================================================
   THE FRAME. Built by public/clean-shell.js inside nav#tabbar: .cl-side
   is the desk's panel, .cl-bar is the phone's bar. The classic cells stay
   in the markup for app.js and are hidden here.
   ============================================================ */
html[data-layout="clean"] .tabbar > a,
html[data-layout="clean"] .tabbar > button,
html[data-layout="clean"] .tabbar > .railmore,
html[data-layout="clean"] .tabbar > .tab-glide { display: none; }

html[data-layout="clean"] .tabbar {
  display: block;
  background: var(--surface);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: 0 6px calc(6px + var(--safe-b));
}
html[data-layout="clean"] .cl-side { display: none; }

/* ---------- the phone's bar ---------- */
html[data-layout="clean"] .cl-bar {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center; height: 66px;
}
html[data-layout="clean"] .tabbar a.cl-cell {
  flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; min-height: 52px; padding: 0;
  font-family: var(--font-text);
  font-size: 13px; font-weight: 400; letter-spacing: normal; text-transform: none;
  color: var(--ink-2);
}
html[data-layout="clean"] .tabbar a.cl-cell svg { width: 24px; height: 24px; }
html[data-layout="clean"] .tabbar a.cl-cell.active,
html[data-layout="clean"] .tabbar a.cl-cell.cl-on { color: var(--ink); font-weight: 700; }
html[data-layout="clean"] .tabbar a.cl-cell.active svg,
html[data-layout="clean"] .tabbar a.cl-cell.cl-on svg { color: var(--accent); }
/* Film: the round button in the middle, the record dot at its centre. */
html[data-layout="clean"] .tabbar a.cl-cell-film {
  justify-self: center;
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; min-width: 0; min-height: 0; padding: 0;
  border-radius: 50%; background: var(--panel);
}
html[data-layout="clean"] .cl-rec {
  display: block; flex: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--cl-rec);
}
html[data-layout="clean"] .cl-cell-film .cl-rec { width: 22px; height: 22px; }

/* ---------- lamps and small labels, shared ---------- */
html[data-layout="clean"] .cl-lamp {
  display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--cl-lamp-ok);
}
html[data-layout="clean"] .cl-lamp.amber { background: var(--amber); border-radius: 2px; }
html[data-layout="clean"] .cl-lamp.off { background: transparent; border: 1.5px solid var(--muted); box-sizing: border-box; }
html[data-layout="clean"] .cl-machine {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
}
html[data-layout="clean"] .cl-machine[hidden] { display: none; }
html[data-layout="clean"] .cl-machine .cl-lamp { background: var(--amber); border-radius: 2px; }
html[data-layout="clean"] .cl-machine.ok .cl-lamp { background: var(--cl-lamp-ok); border-radius: 50%; }
html[data-layout="clean"] .cl-label,
html[data-layout="clean"] .cl-group-label {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
html[data-layout="clean"] .cl-count {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
html[data-layout="clean"] .cl-count[hidden] { display: none; }
html[data-layout="clean"] .cl-to-light { display: none; }
html[data-layout="clean"][data-theme="dark"] .cl-to-dark { display: none; }
html[data-layout="clean"][data-theme="dark"] .cl-to-light { display: inline; }

/* ---------- the desk's panel ---------- */
@media (min-width: 900px) {
  html[data-layout="clean"] .tabbar {
    display: flex;
    padding: 20px 14px 14px;
    gap: 0;
  }
  html[data-layout="clean"] .cl-bar { display: none; }
  html[data-layout="clean"] .cl-side {
    display: flex; flex-direction: column; gap: 16px;
    flex: 1 0 auto; min-width: 0;
  }
  html[data-layout="clean"] .tabbar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 2px 8px 0;
    font-size: 19px; line-height: 1; color: var(--heading);
  }
  html[data-layout="clean"] .tabbar-brand .machine.wm-mark { display: block; margin: 0 2px 0 0; }
  /* The name and the face are one link to Today (clean-shell.js). It is the
     wordmark, not a row: no tint, no "you are here" dot, only a focus ring. */
  html[data-layout="clean"] .tabbar a.cl-brand {
    display: block; align-self: flex-start;
    min-width: 0; min-height: 0; padding: 0;
    border-radius: var(--radius-btn);
    color: inherit; text-decoration: none;
    font-size: inherit; letter-spacing: normal; text-transform: none;
  }
  html[data-layout="clean"] .tabbar a.cl-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  /* The face follows the pointer (wireFace in clean-shell.js): its eyes glide
     to where they are told. Only while it is watching, so a mood's own eye
     movement elsewhere is never slowed. */
  html[data-layout="clean"] .cl-brand .machine.cl-watching { transition: --m-look-x .14s ease-out, --m-look-y .14s ease-out; }

  html[data-layout="clean"] .tabbar a.cl-film {
    flex-direction: row; align-items: center; justify-content: center; gap: 10px;
    min-width: 0; min-height: 0; padding: 12px 14px;
    background: var(--ink); color: var(--paper-3);
    border-radius: var(--radius-btn);
    font-family: var(--font-text);
    font-size: 16px; font-weight: 600; letter-spacing: normal; text-transform: none;
  }
  html[data-layout="clean"] .tabbar a.cl-film:hover { background: var(--ink-press); color: var(--paper-3); }

  html[data-layout="clean"] .cl-group { display: flex; flex-direction: column; gap: 2px; }
  html[data-layout="clean"] .cl-group-label { font-size: 11px; letter-spacing: 0.1em; padding: 0 12px 6px; }

  html[data-layout="clean"] .tabbar a.cl-row,
  html[data-layout="clean"] .tabbar button.cl-row {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px;
    box-sizing: border-box; width: 100%;
    min-width: 0; min-height: 38px; padding: 0 12px;
    border: 0; border-radius: var(--radius-btn); background: none; cursor: pointer;
    font-family: var(--font-text);
    font-size: 16px; font-weight: 400; letter-spacing: normal; text-transform: none; text-align: left;
    color: var(--ink-2); text-decoration: none;
  }
  html[data-layout="clean"] .tabbar a.cl-row[hidden] { display: none; }
  html[data-layout="clean"] .tabbar .cl-row:hover { background: var(--hover); color: var(--ink); }
  html[data-layout="clean"] .tabbar a.cl-row.active { background: var(--paper); color: var(--ink); font-weight: 700; }
  /* "You are here": the count gives way to one red dot. */
  html[data-layout="clean"] .tabbar a.cl-row.active .cl-count { display: none; }
  html[data-layout="clean"] .tabbar a.cl-row.active:not(.cl-account):not(:has(.cl-pill-slot))::after {
    content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
  }
  html[data-layout="clean"] .cl-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html[data-layout="clean"] .cl-pill-slot { display: flex; align-items: center; }
  html[data-layout="clean"] .tabbar a .cl-pill-slot .tab-count { position: static; margin: 0; }
  html[data-layout="clean"] .tabbar .cl-group:first-of-type a.cl-row { min-height: 40px; }

  html[data-layout="clean"] .cl-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 10px; }
  html[data-layout="clean"] .cl-foot .cl-machine { padding: 6px 12px 10px; font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; }
  html[data-layout="clean"] .cl-foot a.cl-row, html[data-layout="clean"] .cl-foot button.cl-row { min-height: 36px; }
  html[data-layout="clean"] .tabbar a.cl-account {
    border-top: 1px solid var(--rule-soft); border-radius: 0;
    min-height: 46px; color: var(--ink);
  }
  html[data-layout="clean"] .cl-account .cl-row-label { font-weight: 600; }
  html[data-layout="clean"] .cl-account .stamp { flex: none; font-size: 10px; letter-spacing: 0.1em; padding: 2px 6px; border-width: 1px; }
  html[data-layout="clean"] .tabbar button.cl-theme { color: var(--muted); font-size: 15px; }

  /* The bell leaves the old rail and sits at the page's top right. */
  html[data-layout="clean"] .bell { top: 22px; left: auto; right: 28px; background: var(--surface); }
  html[data-layout="clean"] .bellmenu-pop .navmenu-panel { top: 70px; left: auto; right: 28px; width: 360px; margin-left: 0; }
}

/* ---------- the notifications list (the bell; app.js fillBellMenu) ----------
   The same rows app.js builds, drawn as one of this layout's cards: a plain
   white card with a soft lift, the name in the reading face, the first
   words under it, solid hairlines between rows, and "Needs a reply" as a
   lamp with its words instead of tiny capitals. */
html[data-layout="clean"] .bell {
  background: var(--surface);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-color: var(--rule); color: var(--ink-2);
}
html[data-layout="clean"] .bell:hover,
html[data-layout="clean"] .bell[aria-expanded="true"] { color: var(--ink); border-color: var(--cl-line); background: var(--paper-4); }
html[data-layout="clean"] .bellmenu-pop .navmenu-panel {
  background: var(--surface);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 14px 34px -14px rgba(23, 20, 15, 0.32), 0 2px 6px rgba(23, 20, 15, 0.06);
  padding: 6px 0 6px;
}
html[data-layout="clean"] .bellmenu-pop .navmenu-head {
  padding: 12px 18px 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--muted);
}
html[data-layout="clean"] .bellmenu .navmenu-close { color: var(--muted); }
html[data-layout="clean"] .bellmenu .navmenu-close:hover { color: var(--ink); }
html[data-layout="clean"] .bellmenu .navmenu-item {
  gap: 12px; min-height: 60px; padding: 10px 18px;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink); text-decoration: none;
}
html[data-layout="clean"] .bellmenu .navmenu-item:hover { background: var(--hover); }
html[data-layout="clean"] .bellmenu .navmenu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
html[data-layout="clean"] .bellmenu .nm-label { font-size: 16px; font-weight: 600; color: var(--ink); }
html[data-layout="clean"] .bellmenu .nm-note { font-size: 14.5px; color: var(--muted); }
html[data-layout="clean"] .bellmenu .nm-value { flex-direction: column; align-items: flex-end; gap: 4px; font-family: var(--font-text); font-weight: 400; }
html[data-layout="clean"] .bellmenu .nm-when { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); }
html[data-layout="clean"] .bellmenu .nm-reply {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-text); font-size: 13.5px; font-weight: 600;
  letter-spacing: normal; text-transform: none; color: var(--ink-2);
}
html[data-layout="clean"] .bellmenu .nm-reply::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--amber);
}
html[data-layout="clean"] .bellmenu .nm-chev { color: var(--muted); }
html[data-layout="clean"] .bellmenu .navmenu-item:hover .nm-chev { color: var(--ink); }
/* The last row is the way to every thread: a quiet link, not another person. */
html[data-layout="clean"] .bellmenu .navmenu-item:last-child { min-height: 48px; }
html[data-layout="clean"] .bellmenu .navmenu-item:last-child .nm-label { font-size: 15px; color: var(--ink-2); }
html[data-layout="clean"] .bellmenu .navmenu-quiet { padding: 14px 18px 16px; font-size: 16px; color: var(--muted); }

/* ============================================================
   CARDS, shared by every screen laid out for this layout.
   ============================================================ */
html[data-layout="clean"] .cl-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 26px 8px;
}
html[data-layout="clean"] .cl-card[hidden] { display: none; }
html[data-layout="clean"] .cl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 4px; }
html[data-layout="clean"] .cl-link { font-size: 15px; font-weight: 600; color: var(--ink); }
html[data-layout="clean"] .cl-link:hover { color: var(--accent-deep); }
html[data-layout="clean"] .cl-btn2 {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  font-family: var(--font-text); font-size: 15.5px; font-weight: 600;
  padding: 10px 18px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
html[data-layout="clean"] .cl-btn2:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-4); }

html[data-layout="clean"] .cl-table-wrap { overflow-x: auto; }
html[data-layout="clean"] .cl-table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 16px; }
html[data-layout="clean"] .cl-table th {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 8px 12px;
}
html[data-layout="clean"] .cl-table td { padding: 12px; border-top: 1px solid var(--rule-soft); color: var(--ink); }
html[data-layout="clean"] .cl-table th:first-child,
html[data-layout="clean"] .cl-table td:first-child { padding-left: 0; }
html[data-layout="clean"] .cl-table th:last-child,
html[data-layout="clean"] .cl-table td:last-child { padding-right: 0; }
html[data-layout="clean"] .cl-table .cl-t-name { font-weight: 600; }
html[data-layout="clean"] .cl-table .cl-t-status { white-space: nowrap; }
html[data-layout="clean"] .cl-table .cl-t-status .cl-lamp { margin-right: 8px; }
html[data-layout="clean"] .cl-table .cl-t-num {
  text-align: right; white-space: nowrap;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 15px;
}
html[data-layout="clean"] .cl-table th.cl-t-num { font-size: 11px; }

/* ============================================================
   TODAY. views/home.js paints; public/clean-today.js arranges.
   ============================================================ */
html[data-layout="clean"] .home { display: block; min-height: 0; }
html[data-layout="clean"] .home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
html[data-layout="clean"] .home-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
html[data-layout="clean"] .home-date { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }

/* A phone reads one column: what is next, who is waiting, the machine, what
   is on air, the producer. The side cards live on the More page there. */
html[data-layout="clean"] .home-body { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .home-body > .cl-main { display: contents; }
html[data-layout="clean"] .cl-deck { order: 1; min-width: 0; }
html[data-layout="clean"] .home-body > .cl-wait { order: 2; }
html[data-layout="clean"] .home-body > .panel { order: 3; }
html[data-layout="clean"] .cl-onair { order: 4; }
html[data-layout="clean"] .cl-producer { order: 5; }

/* The light ground. The machine's pieces were drawn for the dark panel and
   name its tokens; on a white card those tokens point at ink instead, and
   the few literal light colours are restated below. */
html[data-layout="clean"] .home .panel,
html[data-layout="clean"] .cl-deck,
html[data-layout="clean"] .cl-wait {
  --panel: var(--surface);
  --panel-ink: var(--ink-2);
  --panel-ink-strong: var(--ink);
  --ok: var(--cl-lamp-ok);
  --amber: #b0802a;
  --accent-live: var(--accent);
}
html[data-layout="clean"][data-theme="dark"] .home .panel,
html[data-layout="clean"][data-theme="dark"] .cl-deck { --amber: #c99a4d; }
html[data-layout="clean"] .home .panel :focus-visible,
html[data-layout="clean"] .cl-deck :focus-visible { outline-color: var(--accent); }
html[data-layout="clean"] .home .panel .lamp,
html[data-layout="clean"] .cl-deck .lamp { width: 9px; height: 9px; border: 0; }
html[data-layout="clean"] .home .panel .lamp.amber,
html[data-layout="clean"] .cl-deck .lamp.amber { border-radius: 2px; }
html[data-layout="clean"] .home .panel .lamp.off,
html[data-layout="clean"] .cl-deck .lamp.off { box-sizing: border-box; border: 1.5px solid var(--muted); }
html[data-layout="clean"] .home .panel .wm,
html[data-layout="clean"] .cl-deck .wm {
  --wm-ink: var(--ink);
  --wm-quiet: var(--muted);
  --wm-track: var(--rule);
  --wm-fill: var(--accent);
}

/* ---------- "Your machine": the shared panel, as an ordinary card ---------- */
html[data-layout="clean"] .home .panel {
  flex: none; justify-content: flex-start; gap: 4px; min-height: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: none; color: var(--ink-2);
  padding: 18px 22px 8px;
}
html[data-layout="clean"] .home .panel-head { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--muted); padding-bottom: 4px; }
html[data-layout="clean"] .home .panel-live { font-size: 12px; letter-spacing: 0.08em; }
html[data-layout="clean"] .home .panel-live.ok { color: var(--ok); }
html[data-layout="clean"] .home .panel-live.amber { color: var(--warn); }
html[data-layout="clean"] .home .panel-live .lamp { width: 9px; height: 9px; background: var(--cl-lamp-ok); }
html[data-layout="clean"] .home .panel-live.amber .lamp { background: var(--amber); border-radius: 2px; }
html[data-layout="clean"] .home .panel-lines { gap: 0; }
html[data-layout="clean"] .home .panel-line { gap: 10px; padding: 11px 0; font-size: 16px; border-bottom: 1px solid var(--rule-soft); }
html[data-layout="clean"] .home .panel-lines > :last-child { border-bottom: 0; }
html[data-layout="clean"] .home .pl-label { color: var(--ink-2); }
html[data-layout="clean"] .home .pl-value { font-size: 16px; font-weight: 500; color: var(--ink); }
html[data-layout="clean"] .home .panel .pl-act,
html[data-layout="clean"] .cl-deck .pl-act { color: var(--ink); border-bottom-color: var(--cl-line); }
html[data-layout="clean"] .home .panel-rule { display: none; }
html[data-layout="clean"] .home .panel-steps { justify-content: flex-start; color: var(--muted); padding: 12px 0 8px; border-top: 1px solid var(--rule-soft); }
html[data-layout="clean"] .home .stepdot { border-color: var(--cl-line); }
html[data-layout="clean"] .home .stepdot.done { border: 0; color: var(--surface); }
html[data-layout="clean"] .home .stepdot.now { border: 2px solid var(--accent); }
html[data-layout="clean"] .home .spot-note { color: var(--muted); }
html[data-layout="clean"] .home .email-form.on-panel { margin: 4px 0 8px; }
html[data-layout="clean"] .home .email-form.on-panel input { background: var(--paper-4); border-color: var(--rule); color: var(--ink); }
html[data-layout="clean"] .home .email-form.on-panel input::placeholder { color: var(--ink-4); }
/* The Facebook card and the market-read wait, on the same white card. */
html[data-layout="clean"] .home .mh-card { border-color: var(--rule); background: var(--paper-4); margin: 6px 0; }
html[data-layout="clean"] .home .mh-steps { color: var(--muted); }
html[data-layout="clean"] .home .mh-steps a { border-bottom-color: var(--cl-line); }
html[data-layout="clean"] .home .mw-bar { background: var(--paper-2); }
html[data-layout="clean"] .home .mw-stage,
html[data-layout="clean"] .home .mw-note { color: var(--muted); }
html[data-layout="clean"] .home .mw-track { border-color: var(--ink-4); }
html[data-layout="clean"] .home .mw-track i { border-color: var(--ink-4); }
html[data-layout="clean"] .home .mw-switch[aria-checked="true"] .mw-track { border-color: var(--ok); }
html[data-layout="clean"] .home .mw-switch[aria-checked="true"] .mw-track i { border-color: var(--ok); }
html[data-layout="clean"] .home .mw-next { border-top-color: var(--rule-soft); }
html[data-layout="clean"] .home .mw-inline { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }

/* ---------- the action cards: "Next", then "After that" ----------
   The same cards home.js deals, in the order it deals them. The sideways
   row becomes a list: the first card is a card of its own, the rest are
   rows of one card under it. */
html[data-layout="clean"] .cl-deck .pcar { gap: 0; }
html[data-layout="clean"] .cl-deck .pcar-arrow,
html[data-layout="clean"] .cl-deck .pcar-dots { display: none; }
html[data-layout="clean"] .cl-deck .pcar-track {
  display: flex; flex-direction: column; gap: 0;
  overflow: visible; scroll-snap-type: none;
  user-select: auto; -webkit-user-select: auto;
}
html[data-layout="clean"] .cl-deck .pcar-track:focus-visible { outline: 0; }
html[data-layout="clean"] .cl-deck .pcar-card {
  position: relative;
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); column-gap: 16px; row-gap: 2px;
  align-items: center; text-align: left;
  background: var(--surface);
  border: 1px solid var(--rule); border-top: 0; border-bottom-color: var(--rule-soft);
  padding: 13px 22px;
}
html[data-layout="clean"] .cl-deck .pcar-card > * { grid-column: 1; }
html[data-layout="clean"] .cl-deck .pcar-card > .pcar-act {
  grid-column: 2; grid-row: 1 / span 3;
  flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px;
  width: auto;
}
html[data-layout="clean"] .cl-deck .pcar-card > .pcar-status { grid-column: 1 / -1; }
html[data-layout="clean"] .cl-deck .pcar-card > .pcar-status[hidden] { display: none; }
/* A card that has opened into its publish form, or says what is in the way,
   gives the form the full width. */
html[data-layout="clean"] .cl-deck .pcar-card:has(.pcar-pub) > .pcar-act,
html[data-layout="clean"] .cl-deck .pcar-card:has(.pcar-act > .pcar-note) > .pcar-act {
  grid-column: 1 / -1; grid-row: auto; align-items: flex-start; padding-top: 8px;
}
html[data-layout="clean"] .cl-deck .pcar-card:last-child { border-bottom-color: var(--rule); border-radius: 0 0 var(--radius) var(--radius); }
/* The eyebrow says what kind of thing the row is; the button already says
   what to do with it, so a row keeps its eyebrow only when it carries a lamp. */
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .pcar-head:not(:has(.lamp)) { display: none; }
html[data-layout="clean"] .cl-deck .pcar-head { justify-content: flex-start; }
html[data-layout="clean"] .cl-deck .panel-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--muted); }
html[data-layout="clean"] .cl-deck .pcar-title {
  font-size: 16.5px; font-weight: 600; letter-spacing: 0; line-height: 1.35;
  overflow-wrap: break-word;
}
html[data-layout="clean"] .cl-deck .pcar-note {
  font-family: var(--font-text); font-size: 15px; line-height: 1.45;
  color: var(--muted); max-width: none;
}
html[data-layout="clean"] .cl-deck .pcar-status {
  align-items: flex-start; max-width: none;
  font-family: var(--font-text); font-size: 15px; color: var(--ink-2);
  padding-top: 6px;
}
html[data-layout="clean"] .cl-deck .pcar-bar { background: var(--paper-2); }

/* The second card opens the "After that" group. */
html[data-layout="clean"] .cl-deck .pcar-card:nth-child(2) {
  border-top: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0;
  padding-top: 46px;
}
html[data-layout="clean"] .cl-deck .pcar-card:nth-child(2):last-child { border-radius: var(--radius); }
html[data-layout="clean"] .cl-deck .pcar-card:nth-child(2)::before {
  content: "Next steps";
  position: absolute; top: 18px; left: 22px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}

/* Past the third row the list folds behind one button (clean-today.js,
   AFTER_ROWS): the first card plus three rows is four cards. */
html[data-layout="clean"] .cl-deck.has-more:not(.open) .pcar-card:nth-child(n+5) { display: none; }
html[data-layout="clean"] .cl-deck.has-more .pcar-card:last-child { border-radius: 0; border-bottom-color: var(--rule-soft); }
html[data-layout="clean"] .cl-deck-more {
  display: block; box-sizing: border-box; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--font-text); font-size: 15px; font-weight: 600;
  min-height: 46px; padding: 0 22px;
}
html[data-layout="clean"] .cl-deck-more:hover { background: var(--paper-4); }

/* The first card is "Next": a card of its own, the one black button. */
html[data-layout="clean"] .cl-deck .pcar-card:first-child {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 20px 22px 22px; margin-bottom: 14px;
}
html[data-layout="clean"] .cl-deck .pcar-card:first-child:last-child { margin-bottom: 0; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .pcar-head { width: 100%; justify-content: space-between; min-height: 28px; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .pcar-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .pcar-note { font-size: 16px; color: var(--ink-2); }
html[data-layout="clean"] .cl-deck .pcar-card:first-child > .pcar-act {
  flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px 14px;
  width: 100%; padding-top: 6px;
}
html[data-layout="clean"] .cl-deck .pcar-card:first-child > .pcar-status { width: 100%; }
/* The red handwriting, once on the screen: it marks where to start. The
   word in the markup stays for a screen reader; the pen writes over it. */
html[data-layout="clean"] .cl-deck .pcar-tag {
  border: 0; padding: 0; font-size: 0; letter-spacing: 0; line-height: 1;
  color: var(--accent);
}
html[data-layout="clean"] .cl-deck .pcar-tag::after {
  content: "start here";
  display: inline-block; transform: rotate(-2deg);
  font-family: var(--font-hand); font-size: 26px; font-weight: 600; text-transform: none;
}

/* The verb buttons. On the dark panel this was a ringed red circle; here it
   is the black button, and the record dot rides on the ones that film. */
html[data-layout="clean"] .cl-deck .film-btn {
  width: auto; height: auto; flex: none;
  border: 1px solid var(--ink); border-radius: var(--radius-btn);
  background: var(--ink); animation: none;
}
html[data-layout="clean"] .cl-deck .film-btn-core {
  width: auto; height: auto; border-radius: 0; gap: 10px;
  background: none; color: var(--paper-3); box-shadow: none;
  font-family: var(--font-text);
  font-size: 16px; font-weight: 600; letter-spacing: normal; text-transform: none;
  padding: 11px 22px;
}
html[data-layout="clean"] .cl-deck .film-btn:hover { background: var(--ink-press); }
html[data-layout="clean"] .cl-deck .film-btn:hover .film-btn-core { background: none; }
html[data-layout="clean"] .cl-deck .film-btn.busy,
html[data-layout="clean"] .cl-deck .film-btn:disabled { opacity: 0.5; }
html[data-layout="clean"] .cl-deck .film-btn[aria-label^="Film"] .film-btn-core::before {
  content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--cl-rec);
}
/* In the "After that" rows every button is the quiet white one. */
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .film-btn { background: var(--surface); border-color: var(--cl-line); }
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .film-btn:hover { background: var(--paper-4); border-color: var(--ink); }
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .film-btn-core { color: var(--ink); font-size: 15.5px; padding: 8px 18px; }
html[data-layout="clean"] .cl-deck .pcar-slab {
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  background: var(--surface); color: var(--ink);
  font-family: var(--font-text);
  font-size: 15.5px; font-weight: 600; letter-spacing: normal; text-transform: none;
  padding: 10px 18px;
}
html[data-layout="clean"] .cl-deck .pcar-slab:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-4); }
html[data-layout="clean"] .cl-deck .pcar-slab.small { font-size: 14.5px; padding: 7px 12px; }
html[data-layout="clean"] .cl-deck .pat-ctl { justify-content: flex-start; min-height: 0; }
html[data-layout="clean"] .cl-deck .pat-link {
  font-family: var(--font-text); font-size: 14.5px; font-weight: 600; letter-spacing: normal; text-transform: none;
  color: var(--ink-2); border-bottom-color: var(--cl-line); white-space: nowrap;
}
html[data-layout="clean"] .cl-deck .pat-when { font-size: 13px; white-space: nowrap; }

/* The publish form a card opens into, on white. */
html[data-layout="clean"] .cl-deck .pcar-pub { max-width: 420px; margin: 0; }
html[data-layout="clean"] .cl-deck .pcar-pub-label { color: var(--muted); font-weight: 500; font-size: 11px; }
html[data-layout="clean"] .cl-deck input.pcar-pub-input { border-color: var(--cl-line); background: var(--surface); }
html[data-layout="clean"] .cl-deck input.pcar-pub-sign { border-bottom-color: var(--cl-line); }
html[data-layout="clean"] .cl-deck input.pcar-pub-input::placeholder,
html[data-layout="clean"] .cl-deck input.pcar-pub-sign::placeholder { color: var(--ink-4); }
html[data-layout="clean"] .cl-deck input.pcar-pub-input:focus { border-color: var(--ink); }
html[data-layout="clean"] .cl-deck .pcar-geo { border-color: var(--rule); }
html[data-layout="clean"] .cl-deck .pcar-geo button { border-bottom-color: var(--rule-soft); }
html[data-layout="clean"] .cl-deck .pcar-geo button:hover { background: var(--hover); }
html[data-layout="clean"] .cl-deck .pcar-chip { border-color: var(--cl-line); }
html[data-layout="clean"] .cl-deck .pcar-chip[aria-pressed="true"],
html[data-layout="clean"] .cl-deck .pcar-chip.on { color: var(--surface); }
html[data-layout="clean"] .cl-deck .pcar-pub-amt span { color: var(--muted); }
html[data-layout="clean"] .cl-deck .pcar-pub-slider::-webkit-slider-runnable-track { background: var(--cl-line); }
html[data-layout="clean"] .cl-deck .pcar-pub-slider::-moz-range-track { background: var(--cl-line); }
html[data-layout="clean"] .cl-deck .pcar-pub-slider::-webkit-slider-thumb { border-color: var(--surface); }
html[data-layout="clean"] .cl-deck .pcar-pub-slider::-moz-range-thumb { border-color: var(--surface); }
html[data-layout="clean"] .cl-deck .pcar-go {
  border-radius: var(--radius-btn);
  font-family: var(--font-text); font-size: 16px; letter-spacing: normal; text-transform: none;
}
html[data-layout="clean"] .cl-deck .pcar-pub-note { font-family: var(--font-text); font-size: 14.5px; color: var(--muted); }

/* Nothing dealt: the engine's one sentence, as the Next card. */
html[data-layout="clean"] .cl-deck .panel-action {
  align-items: flex-start; text-align: left; gap: 14px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px 26px 24px;
}
html[data-layout="clean"] .cl-deck .panel-action h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- the producer: the one dark panel ---------- */
html[data-layout="clean"] .cl-producer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--panel); color: var(--panel-ink);
  border-radius: var(--radius); padding: 20px 26px;
}
html[data-layout="clean"] .cl-producer-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
html[data-layout="clean"] .cl-producer-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #d9a441;
}
html[data-layout="clean"] .cl-producer-eyebrow .cl-lamp { width: 8px; height: 8px; border-radius: 50%; background: #d9a441; }
html[data-layout="clean"] .cl-producer-line { font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--panel-ink-strong); }
html[data-layout="clean"] .cl-producer-btn {
  display: inline-flex; align-items: center; flex: none;
  background: var(--panel-ink-strong); color: var(--panel);
  border-radius: var(--radius-btn);
  font-size: 16px; font-weight: 600; text-decoration: none;
  padding: 12px 22px;
}
html[data-layout="clean"] .cl-producer-btn:hover { background: #ffffff; color: var(--panel); }
html[data-layout="clean"] .cl-producer :focus-visible { outline-color: #fffdf7; }

/* ---------- waiting on you ---------- */
html[data-layout="clean"] .cl-wait { padding: 18px 22px 6px; }
html[data-layout="clean"] .cl-wait-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule-soft); }
html[data-layout="clean"] .cl-card-head + .cl-wait-row { border-top: 0; }
html[data-layout="clean"] .cl-wait-who { min-width: 0; }
html[data-layout="clean"] .cl-wait-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-layout="clean"] .cl-wait-note { font-size: 15px; color: var(--muted); }

/* ---------- the side cards home.js builds ---------- */
html[data-layout="clean"] .home-side .side-card { box-shadow: none; padding: 16px 22px; }

@media (min-width: 900px) {
  html[data-layout="clean"] .view:has(.home) { max-width: 1160px; padding: 32px 40px 48px; }
  html[data-layout="clean"] .home-head { margin-bottom: 24px; padding-right: 56px; }
  html[data-layout="clean"] .home-head h1 { font-size: 34px; }
  html[data-layout="clean"] .home-date { font-size: 13px; }
  html[data-layout="clean"] .home-body { gap: 20px; }
  html[data-layout="clean"] .home-body > .home-side { order: 6; display: flex; flex-direction: column; justify-content: flex-start; gap: 20px; width: auto; }
  html[data-layout="clean"] .cl-deck .pcar-card { padding-left: 26px; padding-right: 26px; }
  html[data-layout="clean"] .cl-deck .pcar-card:nth-child(2)::before { left: 26px; }
  html[data-layout="clean"] .cl-deck .pcar-card:first-child { margin-bottom: 20px; padding: 22px 26px 24px; }
  html[data-layout="clean"] .cl-deck-more { padding: 0 26px; }
}
@media (min-width: 1140px) {
  /* Two columns. The side column's three items sit in three rows that are
     only as tall as their content; the fourth row takes whatever height the
     main column has left over, so nothing in the side column is stretched. */
  html[data-layout="clean"] .home-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-rows: repeat(3, min-content) 1fr;
    column-gap: 24px; row-gap: 0;
    align-items: start;
  }
  html[data-layout="clean"] .home-body > .cl-main {
    display: flex; flex-direction: column; gap: 20px;
    grid-column: 1; grid-row: 1 / span 4; min-width: 0;
  }
  html[data-layout="clean"] .home-body > .cl-wait { grid-column: 2; grid-row: 1; margin-bottom: 20px; }
  html[data-layout="clean"] .home-body > .panel { grid-column: 2; grid-row: 2; margin-bottom: 20px; }
  html[data-layout="clean"] .home-body > .home-side { grid-column: 2; grid-row: 3; }
  /* Before the cards arrive there is only the machine's one line. */
  html[data-layout="clean"] .home-body:not(:has(.cl-main)) > .panel { grid-column: 1 / -1; }
}

/* ============================================================
   MORE, on a phone (public/views/more.js).
   ============================================================ */
html[data-layout="clean"] .cl-more { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; }
html[data-layout="clean"] .cl-more-head { min-height: 44px; display: flex; align-items: center; }
html[data-layout="clean"] .cl-more-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
html[data-layout="clean"] .cl-more-account { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--heading); }
html[data-layout="clean"] .cl-more-name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-layout="clean"] .cl-more-account .stamp { flex: none; font-size: 10px; letter-spacing: 0.1em; padding: 2px 6px; border-width: 1px; }
html[data-layout="clean"] .cl-more-card { padding: 0 16px; }
html[data-layout="clean"] .cl-more-card > .cl-label { padding-top: 14px; font-size: 11px; }
html[data-layout="clean"] .cl-more-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 50px; border-top: 1px solid var(--rule-soft);
  font-size: 17px; color: var(--ink); text-decoration: none;
}
html[data-layout="clean"] .cl-more-row:first-of-type { border-top: 0; }
html[data-layout="clean"] .cl-more-label.strong { font-weight: 600; }
html[data-layout="clean"] .cl-more-row .cl-count { font-size: 13px; }
html[data-layout="clean"] .cl-more-theme {
  align-self: center; background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 12px;
  font-family: var(--font-text); font-size: 15px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
html[data-layout="clean"] .cl-more .cl-machine { justify-content: center; padding-bottom: 8px; }

/* ============================================================
   TODAY, SECOND PASS (Jason's notes, 2026-11-09).
   The first card is "Recommended" and the list under it is "Next
   steps". One button per card: the reminder is a small calendar
   button on the recommended card only, whose words slide out when
   the pointer rests on it. A card lights faintly under the pointer,
   and a card about a script opens the script to read
   (public/clean-today.js, the peek).
   ============================================================ */
html[data-layout="clean"] .cl-deck .pcar-card:first-child .panel-eyebrow { font-size: 0; gap: 0; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .panel-eyebrow .lamp { margin-right: 8px; }
/* On a phone a row is its words, then its button under them: a sentence
   squeezed beside a button breaks into a ragged column. */
@media (max-width: 599.98px) {
  html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) { grid-template-columns: minmax(0, 1fr); padding-top: 16px; padding-bottom: 16px; }
  html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) > .pcar-act {
    grid-column: 1; grid-row: auto; align-items: flex-start; padding-top: 10px;
  }
  html[data-layout="clean"] .cl-deck .pcar-card:nth-child(2) { padding-top: 46px; }
}
html[data-layout="clean"] .cl-deck .pcar-card:first-child .panel-eyebrow::after { content: "Recommended"; font-size: 12px; }

/* Rows read evenly: the words on the left wrap as a block, the button on
   the right is the same width on every row. */
html[data-layout="clean"] .cl-deck .pcar-card { transition: background-color .15s, border-color .15s; }
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) { min-height: 74px; box-sizing: border-box; }
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child):hover { background: var(--paper-4); }
html[data-layout="clean"] .cl-deck .pcar-card:first-child:hover { border-color: var(--cl-line); }
html[data-layout="clean"] .cl-deck .pcar-title,
html[data-layout="clean"] .cl-deck .pcar-note { text-wrap: pretty; }
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .film-btn,
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .pcar-act > .pcar-slab { min-width: 104px; }
html[data-layout="clean"] .cl-deck .film-btn-core { justify-content: center; white-space: nowrap; }
html[data-layout="clean"] .cl-deck .film-btn,
html[data-layout="clean"] .cl-deck .pcar-slab,
html[data-layout="clean"] .cl-btn2,
html[data-layout="clean"] .cl-producer-btn { transition: background-color .15s, border-color .15s, transform .1s; }
html[data-layout="clean"] .cl-deck .film-btn:active,
html[data-layout="clean"] .cl-deck .pcar-slab:active,
html[data-layout="clean"] .cl-btn2:active,
html[data-layout="clean"] .cl-producer-btn:active { transform: translateY(1px); }

/* Talking is the one red button, the machine's own, with a microphone. */
html[data-layout="clean"] .cl-deck .pcar-card:first-child .film-btn[aria-label^="Talk"] { background: var(--accent); border-color: var(--accent); }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .film-btn[aria-label^="Talk"]:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .film-btn[aria-label^="Talk"] .film-btn-core { color: #fffdf7; }
html[data-layout="clean"] .cl-deck .film-btn[aria-label^="Talk"] .film-btn-core::before {
  content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The reminder. Not offered on the rows; a row that already has a time
   booked still shows it. */
html[data-layout="clean"] .cl-deck .pcar-card:not(:first-child) .pat-ctl:not(:has(.pat-when)) { display: none; }
html[data-layout="clean"] .cl-deck .pat-ctl:not(:has(.pat-when)) .pat-link {
  position: relative; box-sizing: border-box;
  height: 46px; max-width: 46px; padding: 0 0 0 44px;
  overflow: hidden; white-space: nowrap; text-align: left;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  font-size: 15px;
  transition: max-width .3s cubic-bezier(.3, .7, .25, 1), padding .3s cubic-bezier(.3, .7, .25, 1), border-color .15s, background-color .15s;
}
html[data-layout="clean"] .cl-deck .pat-ctl:not(:has(.pat-when)) .pat-link::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 20px; height: 20px;
  transform: translateY(-50%);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M4 9.5h16M8 3v4M16 3v4M12 12.5v4M10 14.5h4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M4 9.5h16M8 3v4M16 3v4M12 12.5v4M10 14.5h4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s cubic-bezier(.3, .7, .25, 1);
}
@media (hover: hover) and (pointer: fine) {
  html[data-layout="clean"] .cl-deck .pat-ctl:not(:has(.pat-when)) .pat-link:hover,
  html[data-layout="clean"] .cl-deck .pat-ctl:not(:has(.pat-when)) .pat-link:focus-visible {
    max-width: 300px; padding-right: 16px; border-color: var(--ink); background: var(--paper-4);
  }
  html[data-layout="clean"] .cl-deck .pat-ctl:not(:has(.pat-when)) .pat-link:hover::before { transform: translateY(-50%) rotate(-8deg); }
}

/* ---------- the peek: a script, opened to read ---------- */
html[data-layout="clean"] .cl-peek { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
html[data-layout="clean"] .cl-peek-card {
  position: fixed; box-sizing: border-box; pointer-events: auto;
  max-height: 70vh; overflow-y: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 18px 22px 10px;
  animation: cl-peek-in .16s ease-out backwards;
}
html[data-layout="clean"] .cl-peek-title { font-size: 20px; font-weight: 700; line-height: 1.25; margin: 4px 0 12px; }
html[data-layout="clean"] .cl-peek-body p { margin: 0 0 12px; font-size: 17.5px; line-height: 1.5; color: var(--ink-2); }
html[data-layout="clean"] .cl-peek.sheet { pointer-events: auto; display: flex; align-items: flex-end; }
html[data-layout="clean"] .cl-peek-scrim { position: absolute; inset: 0; background: var(--scrim); }
html[data-layout="clean"] .cl-peek.sheet .cl-peek-card {
  position: relative; width: 100%; max-height: 78vh;
  border-radius: 14px 14px 0 0; border-width: 1px 0 0;
  padding: 18px 22px calc(18px + var(--safe-b));
}
html[data-layout="clean"] .cl-peek-x {
  background: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 0 0 16px;
  font-family: var(--font-text); font-size: 15.5px; font-weight: 600; color: var(--ink);
}
@keyframes cl-peek-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  html[data-layout="clean"] .cl-peek-card { animation: none; }
  html[data-layout="clean"] .cl-deck .pat-ctl .pat-link { transition: none; }
}

/* ---------- Facebook, leading the page while it is the thing to do ---------- */
html[data-layout="clean"] .cl-main > .mh-card {
  --panel: var(--surface);
  --panel-ink: var(--ink-2);
  --panel-ink-strong: var(--ink);
  --amber: #b0802a;
  order: 0; margin: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px 26px 24px;
}
html[data-layout="clean"] .cl-main > .mh-card .panel-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--muted); }
html[data-layout="clean"] .cl-main > .mh-card .lamp { width: 9px; height: 9px; border: 0; border-radius: 2px; }
html[data-layout="clean"] .cl-main > .mh-card .mh-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
html[data-layout="clean"] .cl-main > .mh-card .mh-go {
  font-family: var(--font-text); font-size: 16px; letter-spacing: normal; text-transform: none; box-shadow: none;
  padding: 12px 22px;
}
html[data-layout="clean"] .cl-main > .mh-card .pcar-slab {
  border: 1px solid var(--cl-line); background: var(--surface); color: var(--ink);
  font-family: var(--font-text); font-size: 15.5px; font-weight: 600; letter-spacing: normal; text-transform: none;
  padding: 11px 18px;
}
html[data-layout="clean"] .cl-main > .mh-card :focus-visible { outline-color: var(--accent); }

/* ============================================================
   THE MACHINE WINDOW DRAFT (?today=machine). The recommended step
   goes back inside the dark machine window: its status and three
   lines on top, the step under them, one red button. Everything
   else on the page is the same clean layout. Inside the window the
   paper tokens point at the panel colours, the way the dark theme
   re-points them for a whole page.
   ============================================================ */
html[data-layout="clean"][data-today="machine"] .cl-machine-top,
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child {
  --panel: #17140f; --panel-ink: #efe8da; --panel-ink-strong: #fffdf7;
  --ok: #79b587; --amber: #c99a4d; --warn: #c99a4d; --accent-live: #e75f43;
  --ink: #fffdf7; --ink-2: #efe8da; --ink-4: rgba(239, 232, 218, 0.5); --heading: #fffdf7;
  --muted: rgba(239, 232, 218, 0.62);
  --surface: #17140f; --paper-3: #17140f; --paper-4: rgba(239, 232, 218, 0.07); --paper-2: rgba(239, 232, 218, 0.14);
  --rule: rgba(239, 232, 218, 0.16); --rule-soft: rgba(239, 232, 218, 0.1);
  --cl-line: rgba(239, 232, 218, 0.34); --cl-lamp-ok: #79b587;
  --ink-press: #ffffff; --hover: rgba(239, 232, 218, 0.08);
  background: #17140f; color: #efe8da; border-color: #17140f;
}
html[data-layout="clean"][data-today="machine"] .cl-machine-top {
  display: flex; flex-direction: column; gap: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 22px 4px;
}
html[data-layout="clean"][data-today="machine"] .cl-machine-top .panel-head > span:first-child { display: flex; align-items: center; gap: 10px; }
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child {
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 1px solid rgba(239, 232, 218, 0.14);
}
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child:hover { border-color: #17140f; border-top-color: rgba(239, 232, 218, 0.14); }
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child :focus-visible,
html[data-layout="clean"][data-today="machine"] .cl-machine-top :focus-visible { outline-color: #fffdf7; }
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-tag { color: #f0806c; }
/* The red button, as on the machine. */
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child .film-btn {
  background: var(--accent); border-color: var(--accent); border-radius: 999px;
}
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child .film-btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child .film-btn-core { color: #fffdf7; font-size: 17px; padding: 13px 28px; }
html[data-layout="clean"][data-today="machine"] .cl-deck .pcar-card:first-child .film-btn[aria-label^="Film"] .film-btn-core::before { background: #fffdf7; }
/* The lines moved into the window, so the side card has nothing left to say. */
html[data-layout="clean"][data-today="machine"] .home-body.cl-machine-draft > .panel { display: none; }
/* One dark object on the screen: here the producer card is paper. */
html[data-layout="clean"][data-today="machine"] .cl-producer { background: var(--surface); color: var(--ink-2); border: 1px solid var(--rule); }
html[data-layout="clean"][data-today="machine"] .cl-producer-eyebrow { color: var(--warn); }
html[data-layout="clean"][data-today="machine"] .cl-producer-eyebrow .cl-lamp { background: var(--amber); }
html[data-layout="clean"][data-today="machine"] .cl-producer-line { color: var(--ink); }
html[data-layout="clean"][data-today="machine"] .cl-producer-btn { background: var(--ink); color: var(--paper-3); }
html[data-layout="clean"][data-today="machine"] .cl-producer-btn:hover { background: var(--ink-press); color: var(--paper-3); }
html[data-layout="clean"][data-today="machine"] .cl-producer :focus-visible { outline-color: var(--accent); }
@media (min-width: 900px) {
  html[data-layout="clean"][data-today="machine"] .cl-machine-top { padding: 22px 26px 4px; }
}

/* ============================================================
   SCRIPTS (public/clean-scripts.js). A list beside the script it
   opens, like a mail app; on a phone the list is the page and a
   script opens on its own. Shared pieces first: the page title,
   the tabs, the quiet text buttons, the handwriting.
   ============================================================ */
html[data-layout="clean"] .cl-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
html[data-layout="clean"] .cl-h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
html[data-layout="clean"] .cl-hand {
  display: inline-block; transform: rotate(-2deg);
  font-family: var(--font-hand); font-size: 22px; font-weight: 600; line-height: 1;
  color: var(--accent); white-space: nowrap;
}
html[data-layout="clean"] .cl-tabs { display: flex; flex-wrap: wrap; gap: 0 24px; border-bottom: 1px solid var(--rule); }
html[data-layout="clean"] .cl-tab {
  background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-text); font-size: 16px; color: var(--ink-2);
}
html[data-layout="clean"] .cl-tab:hover { color: var(--ink); }
html[data-layout="clean"] .cl-tab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
html[data-layout="clean"] .cl-tab .cl-count { font-size: 13px; font-weight: 400; }
html[data-layout="clean"] .cl-quiet {
  background: none; border: 0; cursor: pointer; padding: 0;
  min-height: 40px; display: inline-flex; align-items: center;
  font-family: var(--font-text); font-size: 15.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--cl-line); text-underline-offset: 4px;
}
html[data-layout="clean"] .cl-quiet:hover { color: var(--ink); text-decoration-color: var(--ink); }
html[data-layout="clean"] .cl-quiet:disabled { opacity: 0.5; cursor: default; }
html[data-layout="clean"] .cl-empty { padding: 20px 22px; font-size: 16.5px; color: var(--ink-2); }
html[data-layout="clean"] .cl-back {
  display: none; align-items: center; gap: 6px; min-height: 44px;
  font-size: 15.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
html[data-layout="clean"] .cl-back svg { width: 18px; height: 18px; }
html[data-layout="clean"] .btn .cl-rec { width: 10px; height: 10px; }

html[data-layout="clean"] .cl-scripts-body { display: flex; flex-direction: column; gap: 14px; }
/* The moment before the scripts arrive, and the lines that hold the page
   while a sign-in or Billing hand-off happens: one white card. */
html[data-layout="clean"] .cl-scripts-body > .panel-head { display: none; }
html[data-layout="clean"] .cl-scripts-body > .panel-steps { display: none; }
html[data-layout="clean"] .cl-scripts-body > .panel-line {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 22px; font-size: 16.5px;
}
html[data-layout="clean"] .cl-scripts-body > .panel-line .pl-label { color: var(--ink-2); }
html[data-layout="clean"] .cl-scripts-body > .panel-line .lamp { width: 9px; height: 9px; border: 0; border-radius: 2px; background: var(--amber); }

html[data-layout="clean"] .cl-split { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .cl-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
html[data-layout="clean"] .cl-srow {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px 18px; text-decoration: none; color: var(--ink);
  transition: background-color .15s, border-color .15s;
}
html[data-layout="clean"] .cl-srow:hover { background: var(--paper-4); border-color: var(--cl-line); color: var(--ink); }
html[data-layout="clean"] .cl-srow-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
html[data-layout="clean"] .cl-srow-top .cl-label { font-size: 11px; letter-spacing: 0.1em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-layout="clean"] .cl-srow-title { font-size: 18px; font-weight: 700; line-height: 1.25; text-wrap: pretty; }
html[data-layout="clean"] .cl-srow-state { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
html[data-layout="clean"] .cl-list .board-tools { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
html[data-layout="clean"] .cl-list .board-tools .card { margin: 0; box-shadow: none; }

/* The script, opened. Large plain text: this is the thing they read. */
html[data-layout="clean"] .cl-pane { min-width: 0; display: none; flex-direction: column; gap: 8px; }
html[data-layout="clean"] .cl-sheet { padding: 0; }
html[data-layout="clean"] .cl-sheet-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 16px 22px; border-bottom: 1px dashed var(--cl-line);
}
html[data-layout="clean"] .cl-sheet-head .cl-label { display: flex; align-items: center; gap: 8px; }
html[data-layout="clean"] .cl-sheet-title {
  font-family: var(--font-text); text-transform: none; color: var(--ink);
  font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  margin: 0; padding: 22px 22px 0; text-wrap: balance;
}
html[data-layout="clean"] .cl-sheet-angle { padding: 6px 22px 0; font-size: 15.5px; color: var(--muted); }
html[data-layout="clean"] .cl-sheet-body { padding: 16px 22px 10px; }
html[data-layout="clean"] .cl-sheet-body p { margin: 0 0 16px; max-width: 36em; font-size: 19px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
html[data-layout="clean"] .cl-sheet-dir { display: block; margin-top: 3px; font-size: 14.5px; font-style: italic; color: var(--muted); }
html[data-layout="clean"] .cl-sheet-body p.cl-sheet-cta { font-weight: 700; }
html[data-layout="clean"] .cl-sheet-none { color: var(--muted); }
/* The shot list: second to the script. One quiet line until it is opened,
   then a plain list; how to hold the camera shows for the shot under the
   pointer or the thumb, and again in full when filming. */
html[data-layout="clean"] .cl-sheet-shots { border-top: 1px solid var(--rule-soft); padding: 0 22px; }
html[data-layout="clean"] .cl-sheet-shots > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  min-height: 48px; padding: 12px 22px 12px 0; box-sizing: border-box;
  cursor: pointer; list-style: none; position: relative;
}
html[data-layout="clean"] .cl-sheet-shots > summary {
  font-family: var(--font-text); letter-spacing: normal; text-transform: none; color: var(--ink);
}
html[data-layout="clean"] .cl-sheet-shots > summary::before { content: none; display: none; }
html[data-layout="clean"] .cl-sheet-shots > summary::-webkit-details-marker { display: none; }
html[data-layout="clean"] .cl-sheet-shots > summary::after {
  content: ""; position: absolute; right: 2px; top: 20px; width: 8px; height: 8px;
  border-right: 1.8px solid var(--ink-2); border-bottom: 1.8px solid var(--ink-2);
  transform: rotate(45deg); transition: transform .18s;
}
html[data-layout="clean"] .cl-sheet-shots[open] > summary::after { transform: rotate(-135deg); top: 24px; }
html[data-layout="clean"] .cl-shots-word { font-size: 15.5px; font-weight: 600; color: var(--ink); }
html[data-layout="clean"] .cl-shots-say { font-size: 15px; color: var(--muted); }
html[data-layout="clean"] .cl-sheet-shots > summary:hover .cl-shots-word { text-decoration: underline; text-underline-offset: 4px; }
html[data-layout="clean"] .cl-shots { margin: 0; padding: 0 0 4px 20px; }
html[data-layout="clean"] .cl-shot { padding: 5px 0; font-size: 16.5px; line-height: 1.4; color: var(--ink); outline-offset: 4px; }
html[data-layout="clean"] .cl-shot::marker { color: var(--muted); }
html[data-layout="clean"] .cl-shot-how { display: none; font-size: 14.5px; font-style: italic; color: var(--muted); }
html[data-layout="clean"] .cl-shot[data-how] { cursor: help; }
html[data-layout="clean"] .cl-shot[data-how]:hover { color: var(--accent-deep); }
/* How to film a shot: a small card at the pointer that follows it, so the
   page under it never moves (public/clean-scripts.js, the shot tip). */
html[data-layout="clean"] .cl-tip {
  position: fixed; z-index: 70; pointer-events: none;
  width: max-content; max-width: min(280px, calc(100vw - 16px)); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--panel); color: var(--panel-ink-strong);
  border-radius: var(--radius); padding: 12px 14px 13px;
  box-shadow: var(--shadow-lift);
}
html[data-layout="clean"] .cl-tip .cl-label { font-size: 10.5px; color: #d9a441; }
html[data-layout="clean"] .cl-tip-say { font-size: 15.5px; line-height: 1.4; }
html[data-layout="clean"] .cl-tip-art { width: 252px; max-width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: rgba(239, 232, 218, 0.08); }
html[data-layout="clean"] .cl-tip-art[hidden] { display: none; }
html[data-layout="clean"] .cl-sheet-shots .cl-sheet-row { padding: 10px 0 18px; }
html[data-layout="clean"] .cl-srow { -webkit-touch-callout: none; }
html[data-layout="clean"] .cl-sheet-row { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; }
html[data-layout="clean"] .cl-sheet-row .cl-btn2 { gap: 9px; white-space: normal; text-align: center; }
html[data-layout="clean"] .cl-sheet-more { display: flex; flex-wrap: wrap; gap: 2px 22px; border-top: 1px solid var(--rule-soft); padding: 10px 22px 12px; }
html[data-layout="clean"] .cl-sheet .reword { border-top: 1px solid var(--rule-soft); padding: 18px 22px 22px; }

/* On a phone the page is the list, or one script when its address is open. */
html[data-layout="clean"] .cl-scripts-body.has-detail .cl-list,
html[data-layout="clean"] .cl-scripts-body.has-detail .cl-tabs,
html[data-layout="clean"] .cl-scripts-body.has-detail .cl-page-head { display: none; }
html[data-layout="clean"] .cl-scripts-body.has-detail .cl-pane { display: flex; }
html[data-layout="clean"] .cl-scripts-body.has-detail .cl-back { display: inline-flex; }

@media (min-width: 900px) {
  html[data-layout="clean"] .view:has(.cl-scripts) { max-width: 1160px; padding: 32px 40px 48px; }
  html[data-layout="clean"] .cl-h1 { font-size: 34px; }
  html[data-layout="clean"] .cl-page-head { padding-right: 56px; }
  html[data-layout="clean"] .cl-scripts-body { gap: 20px; }
}
/* Side by side: there is always a script open, so nothing is hidden. */
@media (min-width: 1000px) {
  html[data-layout="clean"] .cl-split { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
  html[data-layout="clean"] .cl-pane,
  html[data-layout="clean"] .cl-scripts-body.has-detail .cl-pane { display: flex; position: sticky; top: 24px; }
  html[data-layout="clean"] .cl-scripts-body.has-detail .cl-list { display: flex; }
  html[data-layout="clean"] .cl-scripts-body.has-detail .cl-tabs { display: flex; }
  html[data-layout="clean"] .cl-scripts-body.has-detail .cl-page-head { display: flex; }
  html[data-layout="clean"] .cl-scripts-body.has-detail .cl-back { display: none; }
  html[data-layout="clean"] .cl-srow.on { border: 2px solid var(--ink); padding: 13px 17px; background: var(--surface); }
  html[data-layout="clean"] .cl-sheet-head { padding: 16px 28px; }
  html[data-layout="clean"] .cl-sheet-title { font-size: 28px; padding: 24px 28px 0; }
  html[data-layout="clean"] .cl-sheet-angle { padding-left: 28px; padding-right: 28px; }
  html[data-layout="clean"] .cl-sheet-body { padding: 18px 28px 10px; }
  html[data-layout="clean"] .cl-sheet-body p { font-size: 20px; }
  html[data-layout="clean"] .cl-sheet-shots { padding-left: 28px; padding-right: 28px; }
  html[data-layout="clean"] .cl-sheet-more { padding-left: 28px; padding-right: 28px; }
  html[data-layout="clean"] .cl-sheet .reword { padding-left: 28px; padding-right: 28px; }
}

/* Scripts, Jason's second review (Basecamp 10493043968). The actions under
   a script are short words with an icon, tinted under the pointer; each
   shot in the shot list has its own Save for the To film list; a new edit
   of the ad shows the work meter under the actions. The padding is the
   card's own less the action's, so the first icon lines up with the text. */
html[data-layout="clean"] .cl-act {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 40px; padding: 0 8px; box-sizing: border-box;
  border: 0; border-radius: 8px; background: none; cursor: pointer;
  font-family: var(--font-text); font-size: 15px; font-weight: 600; line-height: 1.2;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
html[data-layout="clean"] .cl-act:hover { background: var(--paper-4); color: var(--ink); }
html[data-layout="clean"] .cl-act:focus { outline: none; }
html[data-layout="clean"] .cl-act:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
html[data-layout="clean"] .cl-act:disabled { opacity: 0.5; cursor: default; }
html[data-layout="clean"] .cl-act-icon { display: block; width: 18px; height: 18px; flex: none; }
html[data-layout="clean"] .cl-act .cl-rec { width: 10px; height: 10px; margin: 0 4px; }
html[data-layout="clean"] .cl-sheet-more { gap: 2px; padding: 8px 14px 10px; }
html[data-layout="clean"] .cl-sheet-wait { padding: 0 22px 18px; }
html[data-layout="clean"] .cl-sheet-wait[hidden] { display: none; }
html[data-layout="clean"] .cl-sheet-wait .wm { margin-top: 4px; }
html[data-layout="clean"] .cl-shots { list-style: none; padding: 0 0 6px; }
html[data-layout="clean"] .cl-shot {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 2px 0; border-top: 1px solid var(--rule-soft);
}
html[data-layout="clean"] .cl-shot:first-child { border-top: 0; }
html[data-layout="clean"] .cl-shot-words { flex: 1 1 auto; min-width: 0; padding: 8px 0; }
html[data-layout="clean"] .cl-shot-save { margin-right: -8px; }
html[data-layout="clean"] .cl-shot-save[aria-pressed="true"] { color: var(--accent-deep); }
html[data-layout="clean"] .cl-shot[data-how]:hover .cl-shot-save { color: var(--ink-2); }
html[data-layout="clean"] .cl-shot[data-how]:hover .cl-shot-save[aria-pressed="true"] { color: var(--accent-deep); }
@media (min-width: 1000px) {
  html[data-layout="clean"] .cl-sheet-more { padding-left: 20px; padding-right: 20px; }
  html[data-layout="clean"] .cl-sheet-wait { padding-left: 28px; padding-right: 28px; }
}

/* ============================================================
   ADS (public/clean-ads.js). One card per ad: its picture, its
   name, a lamp and a word, the numbers when it runs, one button.
   No class here carries an advertising word: ad blockers hide any
   element whose class looks like an ad container
   (tests/adblock-safe-classes.test.mjs), so an ad is a "spot".
   ============================================================ */
html[data-layout="clean"] .cl-spots-body { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .cl-spots-body > .panel-head,
html[data-layout="clean"] .cl-spots-body > .panel-steps { display: none; }
html[data-layout="clean"] .cl-spots-body > .panel-line {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 22px; font-size: 16.5px;
}
html[data-layout="clean"] .cl-spots-body > .panel-line .pl-label { color: var(--ink-2); }
html[data-layout="clean"] .cl-spots-body > .panel-line .lamp { width: 9px; height: 9px; border: 0; border-radius: 2px; background: var(--amber); }
html[data-layout="clean"] .cl-page-sum {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
html[data-layout="clean"] .cl-back.show { display: inline-flex; align-self: flex-start; }
html[data-layout="clean"] .cl-empty-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }

html[data-layout="clean"] .cl-spotlist { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .cl-spot { flex-direction: row; flex-wrap: wrap; gap: 16px 20px; padding: 18px; align-items: stretch; }
html[data-layout="clean"] .cl-spot-pic {
  flex: none; width: 96px; height: 170px; border-radius: 6px; overflow: hidden;
  background: var(--panel); color: var(--panel-ink);
  display: flex; align-items: flex-end; justify-content: center;
  text-decoration: none;
}
html[data-layout="clean"] .cl-spot-pic video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
html[data-layout="clean"] .cl-spot-pic.none span {
  padding-bottom: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
}
html[data-layout="clean"] a.cl-spot-pic:hover { outline: 2px solid var(--ink); outline-offset: 2px; }
html[data-layout="clean"] .cl-spot-main { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
html[data-layout="clean"] .cl-spot-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
html[data-layout="clean"] .cl-spot-title {
  font-family: var(--font-text); text-transform: none; color: var(--ink);
  font-size: 20px; font-weight: 700; letter-spacing: -0.005em; line-height: 1.25; margin: 0; text-wrap: pretty;
}
html[data-layout="clean"] .cl-spot-state { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
html[data-layout="clean"] .cl-spot-meta { font-size: 15px; color: var(--muted); }
html[data-layout="clean"] .cl-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px;
  border-top: 1px solid var(--rule-soft); padding-top: 12px;
}
html[data-layout="clean"] .cl-stat-n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 500; color: var(--ink); }
html[data-layout="clean"] .cl-stat-l { font-size: 14px; color: var(--ink-2); }
html[data-layout="clean"] .cl-spot-tired {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  background: var(--paper-4); border-radius: 6px; padding: 12px 14px; font-size: 15.5px; color: var(--ink-2);
}
html[data-layout="clean"] .cl-spot-tired > span { flex: 1 1 220px; }
html[data-layout="clean"] .cl-spot-tired .cl-btn2 { gap: 9px; }
html[data-layout="clean"] .cl-spot-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 2px; }
html[data-layout="clean"] .cl-spot-acts .btn { gap: 9px; }
html[data-layout="clean"] .cl-spot-acts .cl-edit-btn { gap: 8px; }

/* One ad on its own page: the cut to watch and every take, which
   views/review.js builds. Its buttons and notes were drawn for the dark
   panel and are restated for paper. */
html[data-layout="clean"] .cl-spots-body .spot-sheet { display: flex; flex-direction: column; gap: 14px; overflow: visible; max-height: none; padding: 0; }
html[data-layout="clean"] .cl-spots-body .spot-sheet .card { margin: 0; box-shadow: none; }
html[data-layout="clean"] .cl-spots-body .spot-sheet video { max-width: 320px; }
html[data-layout="clean"] .cl-spots-body .spot-note { font-family: var(--font-text); font-size: 15.5px; color: var(--ink-2); }
html[data-layout="clean"] .cl-spots-body .spot-sheet-acts { display: flex; flex-wrap: wrap; gap: 10px; }
html[data-layout="clean"] .cl-spots-body .spot-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  font-family: var(--font-text); font-size: 15.5px; font-weight: 600; letter-spacing: normal; text-transform: none;
  padding: 10px 18px; text-decoration: none; cursor: pointer;
}
html[data-layout="clean"] .cl-spots-body .spot-btn:hover { border-color: var(--ink); background: var(--paper-4); }

@media (min-width: 900px) {
  html[data-layout="clean"] .view:has(.cl-spots) { max-width: 980px; padding: 32px 40px 48px; }
  html[data-layout="clean"] .cl-spots-body { gap: 20px; }
  html[data-layout="clean"] .cl-spot-pic { width: 108px; height: 192px; }
}

/* ---------- the ad card, second pass (Jason, 2026-11-09) ----------
   The picture is the preview, the corner holds the status and three dots,
   and a card has a button only when the ad is waiting on a next step. */
html[data-layout="clean"] button.cl-spot-pic { position: relative; padding: 0; border: 0; cursor: pointer; }
html[data-layout="clean"] button.cl-spot-pic:hover { outline: 2px solid var(--ink); outline-offset: 2px; }
html[data-layout="clean"] .cl-spot-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(23, 20, 15, 0.62); color: #fffdf7;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background-color .15s;
}
html[data-layout="clean"] .cl-spot-play svg { width: 18px; height: 18px; margin-left: 2px; }
html[data-layout="clean"] button.cl-spot-pic:hover .cl-spot-play { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); }
/* The name's first line of capitals sits level with the top of the picture. */
html[data-layout="clean"] .cl-spot-top { align-items: flex-start; flex-wrap: nowrap; margin-top: -4px; }
html[data-layout="clean"] .cl-spot-title { min-width: 0; padding-top: 1px; }
html[data-layout="clean"] .cl-spot-corner { position: relative; flex: none; display: flex; align-items: center; gap: 6px; min-height: 28px; }
html[data-layout="clean"] .cl-dots {
  width: 36px; height: 36px; margin: -4px -8px -4px 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
html[data-layout="clean"] .cl-dots svg { width: 20px; height: 20px; }
html[data-layout="clean"] .cl-dots:hover,
html[data-layout="clean"] .cl-dots[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
html[data-layout="clean"] .cl-menu {
  position: absolute; right: -8px; top: calc(100% + 4px); z-index: 30;
  min-width: 250px; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--cl-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  animation: cl-peek-in .14s ease-out backwards;
}
html[data-layout="clean"] .cl-menu-item {
  display: flex; align-items: center; min-height: 42px; padding: 0 12px;
  background: none; border: 0; border-radius: var(--radius-btn); cursor: pointer; text-align: left;
  font-family: var(--font-text); font-size: 16px; color: var(--ink); text-decoration: none; white-space: nowrap;
}
html[data-layout="clean"] .cl-menu-item.danger { color: var(--accent-deep); }
html[data-layout="clean"] .cl-menu-item:hover,
html[data-layout="clean"] .cl-menu-item:focus-visible { background: var(--paper-4); color: var(--ink); }
html[data-layout="clean"] .cl-menu-item:disabled { opacity: 0.5; cursor: default; }

/* The preview: the ad, playing. Beside the picture under a pointer; a
   centred player with a way to close it after a tap or a press and hold. */
html[data-layout="clean"] .cl-preview { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
html[data-layout="clean"] .cl-preview-box {
  position: fixed; width: 252px; height: 448px; pointer-events: auto;
  background: var(--panel); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-lift);
  animation: cl-peek-in .16s ease-out backwards;
}
html[data-layout="clean"] .cl-preview-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-layout="clean"] .cl-preview-sound {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px 0 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(23, 20, 15, 0.72); color: #fffdf7;
  font-family: var(--font-text); font-size: 14.5px; font-weight: 600;
}
html[data-layout="clean"] .cl-preview-sound svg { width: 20px; height: 20px; }
html[data-layout="clean"] .cl-preview-sound:hover,
html[data-layout="clean"] .cl-preview-sound[aria-pressed="true"] { background: var(--accent); }
html[data-layout="clean"] .cl-preview-sound:focus-visible,
html[data-layout="clean"] .cl-preview-x:focus-visible { outline-color: #fffdf7; }
html[data-layout="clean"] .cl-preview.pinned { pointer-events: auto; display: flex; align-items: center; justify-content: center; }
html[data-layout="clean"] .cl-preview-scrim { position: absolute; inset: 0; background: var(--scrim-deep); }
html[data-layout="clean"] .cl-preview.pinned .cl-preview-box {
  position: relative; width: min(340px, calc(100vw - 48px)); height: auto; aspect-ratio: 9 / 16; max-height: calc(100vh - 96px);
}
html[data-layout="clean"] .cl-preview-x {
  position: absolute; right: 10px; top: 10px;
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(23, 20, 15, 0.72); color: #fffdf7;
  font-family: var(--font-text); font-size: 14.5px; font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  html[data-layout="clean"] .cl-preview-box,
  html[data-layout="clean"] .cl-menu { animation: none; }
}

/* ---------- the ad card, third pass (Jason, 2026-11-09) ----------
   A heading inside a card is the card's name, not a section break: the
   global h2 draws a dashed rule over itself, which has no business here. */
html[data-layout="clean"] .cl-spot-title,
html[data-layout="clean"] .cl-sheet-title,
html[data-layout="clean"] .cl-peek-title { border-top: 0; }
html[data-layout="clean"] .cl-spot-title { padding-top: 1px; margin: 0; }

/* The status mark: a dot for live, two bars for paused, an exclamation
   for a problem. The words beside it always say the same thing. */
html[data-layout="clean"] .cl-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; }
html[data-layout="clean"] .cl-mark.paused { gap: 3px; background: var(--amber); }
html[data-layout="clean"] .cl-mark.paused i { display: block; width: 3px; height: 8px; border-radius: 1px; background: #fffdf7; }
html[data-layout="clean"] .cl-mark.problem { background: var(--accent); color: #fffdf7; font-size: 13px; font-weight: 700; line-height: 1; }
html[data-layout="clean"] .cl-spot-state.problem { color: var(--accent-deep); }

/* On or off, the way an ads manager shows it. Green and to the right is on. */
html[data-layout="clean"] .cl-switch {
  flex: none; position: relative; width: 44px; height: 26px; padding: 0; margin-left: 6px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink-4);
  transition: background-color .18s;
}
html[data-layout="clean"] .cl-switch i {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fffdf7; box-shadow: 0 1px 2px rgba(23, 20, 15, 0.35);
  transition: transform .18s cubic-bezier(.3, .7, .25, 1);
}
html[data-layout="clean"] .cl-switch[aria-checked="true"] { background: var(--cl-lamp-ok); }
html[data-layout="clean"] .cl-switch[aria-checked="true"] i { transform: translateX(18px); }
html[data-layout="clean"] .cl-switch:hover { filter: brightness(0.94); }

/* What opens at the foot of a card: the question before an ad is switched,
   and the daily budget. It grows into place. */
html[data-layout="clean"] .cl-drawer {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper-4); border-radius: 6px; padding: 14px 16px 16px;
  animation: cl-drawer-in .22s cubic-bezier(.3, .7, .25, 1) backwards;
  transform-origin: top;
}
html[data-layout="clean"] .cl-drawer-say { font-size: 16px; font-weight: 600; color: var(--ink); }
html[data-layout="clean"] .cl-drawer-acts { display: flex; flex-wrap: wrap; gap: 10px; }
html[data-layout="clean"] .cl-budget { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
html[data-layout="clean"] .cl-budget-amt {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--font-mono); font-size: 26px; font-weight: 500; color: var(--ink);
}
html[data-layout="clean"] .cl-budget-amt input {
  width: 4.2ch; box-sizing: content-box; padding: 4px 6px;
  font-family: var(--font-mono); font-size: 26px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
}
html[data-layout="clean"] .cl-budget input[type="range"] { flex: 1 1 200px; min-width: 0; accent-color: var(--ink); }
@keyframes cl-drawer-in { from { opacity: 0; transform: scaleY(0.6); } }
@media (prefers-reduced-motion: reduce) {
  html[data-layout="clean"] .cl-drawer { animation: none; }
  html[data-layout="clean"] .cl-switch, html[data-layout="clean"] .cl-switch i { transition: none; }
}
@media (max-width: 599.98px) {
  html[data-layout="clean"] .cl-spot-top { flex-wrap: wrap; }
  html[data-layout="clean"] .cl-spot-corner { width: 100%; }
  html[data-layout="clean"] .cl-spot-corner .cl-switch { margin-left: auto; }
}
/* Every range slider in the clean layout (the trimmer, the budget on Ads
   and Today, the publish plan, any other): the shared input rule in
   styles.css draws an orange ring on any focus, so a click left a box
   around the slider (Jason, 2026-11-09). The ring is for the keyboard only. */
html[data-layout="clean"] input[type="range"]:focus { outline: none; box-shadow: none; }
html[data-layout="clean"] input[type="range"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; box-shadow: none; }

/* ---------- a signed-out visitor (the sign-in, sign-up and reset pages) ----------
   Nobody is signed in, so there is nowhere for the panel's rows or the phone's
   bar to lead: the desk keeps only the name and the face, the phone has no bar.
   clean-shell.js stamps data-cl-visitor on <html> for those addresses. */
html[data-layout="clean"][data-cl-visitor] .cl-side > :not(.cl-brand):not(.tabbar-brand) { display: none; }
@media (max-width: 899.98px) {
  html[data-layout="clean"][data-cl-visitor] .tabbar { display: none; }
}

/* ---------- a native app's web screen (Basecamp 10495663008) ----------
   Inside the native iPhone and Android apps the native tabs are the
   navigation, so a hosted page is the clean page alone: no panel on a wide
   screen, no bar on a phone, and no room kept for either. The boot script in
   index.html stamps data-cl-hosted on <html> for those screens (the user-agent
   mark without the Google Play app's bridge, public/layout.js); the Google
   Play app and every browser keep the whole frame. The apps also hide
   nav#tabbar themselves, but this does not wait for them. */
html[data-layout="clean"][data-cl-hosted] { --rail-w: 0px; }
html[data-layout="clean"][data-cl-hosted] .tabbar { display: none !important; }
html[data-layout="clean"][data-cl-hosted] body { padding-left: 0; }
html[data-layout="clean"][data-cl-hosted] .view { padding-bottom: calc(40px + var(--safe-b)); }
html[data-layout="clean"][data-cl-hosted] .toast { bottom: calc(24px + var(--safe-b)); }
html[data-layout="clean"][data-cl-hosted] .cl-bk-savebar { bottom: calc(12px + var(--safe-b)); }

/* ============================================================
   TODAY'S STEP: ONE HEADLINE, AN ICON, DETAILS ON A TAP
   (Basecamp 10529533609). home.js buildActionCard draws the
   headline row; the sentence of why and any second choice sit in
   .cl-step-details until the headline is tapped.
   ============================================================ */
html[data-layout="clean"] .cl-deck .pcar-headline {
  display: flex; align-items: center; gap: 12px; min-width: 0; width: 100%;
}
html[data-layout="clean"] .cl-deck .pcar-headline.has-details { cursor: pointer; }
html[data-layout="clean"] .cl-deck .pcar-headline .pcar-title { flex: 1 1 auto; min-width: 0; margin: 0; }
html[data-layout="clean"] .cl-step-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--paper-2); color: var(--ink);
}
html[data-layout="clean"] .cl-step-icon svg { width: 19px; height: 19px; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .cl-step-icon { width: 42px; height: 42px; border-radius: 12px; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .cl-step-icon svg { width: 23px; height: 23px; }
html[data-layout="clean"] .cl-step-more {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -6px -10px -6px 0; padding: 0;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 999px;
}
html[data-layout="clean"] .cl-step-more svg { width: 20px; height: 20px; transition: transform 0.18s ease; }
html[data-layout="clean"] .cl-step-more[aria-expanded="true"] svg { transform: rotate(180deg); }
html[data-layout="clean"] .cl-step-more:hover { color: var(--ink); }
html[data-layout="clean"] .cl-step-details { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 4px 0 2px 46px; }
html[data-layout="clean"] .cl-step-details[hidden] { display: none; }
html[data-layout="clean"] .cl-deck .pcar-card:first-child .cl-step-details { padding-left: 54px; }
html[data-layout="clean"] .cl-step-instead {
  border: 0; background: none; padding: 0; min-height: 44px;
  font: inherit; font-size: 15px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left;
}
html[data-layout="clean"] .cl-step-instead:hover { color: var(--ink); }
html[data-layout="clean"] .cl-step-instead:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  html[data-layout="clean"] .cl-step-more svg { transition: none; }
}

/* WAITING ON YOU, with what they said (Basecamp 10529533668): the
   message icon, who and how long ago, two lines of their words, and
   the whole row opens the conversation. */
html[data-layout="clean"] a.cl-wait-msg { align-items: flex-start; color: inherit; text-decoration: none; }
html[data-layout="clean"] a.cl-wait-msg:hover .cl-wait-name { text-decoration: underline; }
html[data-layout="clean"] .cl-wait-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; background: var(--paper-2); color: var(--ink);
}
html[data-layout="clean"] .cl-wait-icon svg { width: 18px; height: 18px; }
html[data-layout="clean"] .cl-wait-msg .cl-wait-who { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
html[data-layout="clean"] .cl-wait-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
html[data-layout="clean"] .cl-wait-line .cl-wait-name { min-width: 0; }
html[data-layout="clean"] .cl-wait-when { flex: none; font-size: 14px; color: var(--muted); white-space: nowrap; }
html[data-layout="clean"] .cl-wait-preview {
  font-size: 15px; line-height: 1.4; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
html[data-layout="clean"] .cl-wait-msg .cl-btn2 { flex: none; align-self: center; }
