/* The clean layout, bookings screens (Basecamp 10492667707). Every selector here starts
   with html[data-layout="clean"]; see docs/clean-layout.md.

   public/clean-bookings.js draws these pages: the people the ads brought
   in as a table with the person picked beside it, booking setup as a short
   list of parts, each part's plain page, and the page editor. The frame,
   the cards, the tabs, the drawer and the three dots are clean.css's. */

/* ============================================================
   THE PAGE. views/bookings.js mounts .cl-bookings > .cl-bookings-body.
   ============================================================ */
html[data-layout="clean"] .cl-bookings-body { display: flex; flex-direction: column; gap: 14px; }
/* The moment before the bookings arrive, and the lines that hold a page
   while a sign-in or Billing hand-off happens: one white card. */
html[data-layout="clean"] .cl-bookings-body > .panel-head,
html[data-layout="clean"] .cl-bookings-body > .panel-steps { display: none; }
html[data-layout="clean"] .cl-bookings-body > .panel-line,
html[data-layout="clean"] .cl-bk-pane-in > .panel-line,
html[data-layout="clean"] .cl-bk-setup-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-bookings-body > .panel-line .pl-label,
html[data-layout="clean"] .cl-bk-pane-in > .panel-line .pl-label,
html[data-layout="clean"] .cl-bk-setup-body > .panel-line .pl-label { color: var(--ink-2); }
html[data-layout="clean"] .cl-bookings-body > .panel-line .lamp,
html[data-layout="clean"] .cl-bk-pane-in > .panel-line .lamp,
html[data-layout="clean"] .cl-bk-setup-body > .panel-line .lamp { width: 9px; height: 9px; border: 0; border-radius: 2px; background: var(--amber); }
/* A refresh that could not reach the server, over a page that is still good. */
html[data-layout="clean"] .cl-bookings-body > .spot-note { font-family: var(--font-text); font-size: 15px; color: var(--muted); }
html[data-layout="clean"] .cl-bk-wait { flex-direction: row; align-items: center; gap: 10px; }
/* A line and the one thing to do about it: the words, then the button. */
html[data-layout="clean"] .cl-bk-rowcard { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
html[data-layout="clean"] .cl-bk-rowcard > span { flex: 1 1 260px; min-width: 0; text-wrap: pretty; }

html[data-layout="clean"] .cl-bk-setup-btn { gap: 9px; }

html[data-layout="clean"] .cl-bk-split { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .cl-bk-list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html[data-layout="clean"] .cl-bk-pane { display: none; flex-direction: column; gap: 8px; min-width: 0; }
html[data-layout="clean"] .cl-bk-pane-in { display: flex; flex-direction: column; gap: 14px; }

/* On a phone the page is the list, or one person when their address is open. */
html[data-layout="clean"] .cl-bookings-body.has-detail .cl-bk-list,
html[data-layout="clean"] .cl-bookings-body.has-detail .cl-tabs,
html[data-layout="clean"] .cl-bookings-body.has-detail .cl-page-head { display: none; }
html[data-layout="clean"] .cl-bookings-body.has-detail .cl-bk-pane { display: flex; }
html[data-layout="clean"] .cl-bookings-body.has-detail .cl-back { display: inline-flex; align-self: flex-start; }

/* ---------- the calendar alert ---------- */
html[data-layout="clean"] .cl-bk-alert { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 16px 22px; }
html[data-layout="clean"] .cl-bk-alert-say { flex: 1 1 260px; min-width: 0; font-size: 16px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }

/* ---------- the table ---------- */
html[data-layout="clean"] .cl-bk-tablecard { padding: 0; overflow: hidden; }
html[data-layout="clean"] .cl-bk-table { min-width: 0; }
html[data-layout="clean"] .cl-bk-table th { padding: 14px 8px 10px; vertical-align: bottom; }
html[data-layout="clean"] .cl-bk-table th:first-child,
html[data-layout="clean"] .cl-bk-table td:first-child { padding-left: 22px; }
html[data-layout="clean"] .cl-bk-table th:last-child,
html[data-layout="clean"] .cl-bk-table td:last-child { padding-right: 22px; }
html[data-layout="clean"] .cl-bk-row { cursor: pointer; transition: background-color .15s; -webkit-touch-callout: none; }
html[data-layout="clean"] .cl-bk-row:hover { background: var(--paper-4); }
html[data-layout="clean"] .cl-bk-row td { padding: 14px 8px; vertical-align: top; }
/* A name stays on one line; a long one (an email standing in for a name)
   is cut with an ellipsis so what they asked for keeps its room. */
html[data-layout="clean"] .cl-bk-row .cl-t-name { white-space: nowrap; max-width: 150px; }
html[data-layout="clean"] .cl-bk-row .cl-t-name a {
  display: inline-block; max-width: 100%; vertical-align: bottom; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink); text-decoration: none;
}html[data-layout="clean"] .cl-bk-row .cl-t-name a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Unread: a filled dot before the name, the name in bold, and the words
   under it, so the mark is never colour alone. The same count Messages marks. */
html[data-layout="clean"] .cl-bk-dot {
  display: inline-block; width: 9px; height: 9px; margin: 0 8px 1px -17px; vertical-align: middle;
  border-radius: 50%; background: var(--accent);
}
html[data-layout="clean"] .cl-bk-row.unread .cl-t-name a { font-weight: 700; }
html[data-layout="clean"] .cl-bk-new {
  display: block; margin-top: 3px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
html[data-layout="clean"] .cl-bk-asked { font-size: 15.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
html[data-layout="clean"] .cl-bk-asked span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
html[data-layout="clean"] .cl-bk-when { white-space: nowrap; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; line-height: 1.5; }
html[data-layout="clean"] .cl-bk-when span { display: block; }
html[data-layout="clean"] .cl-bk-when span + span { color: var(--muted); }
html[data-layout="clean"] .cl-bk-when .cl-bk-none { font-family: var(--font-text); font-size: 15px; color: var(--muted); }
html[data-layout="clean"] .cl-bk-row .cl-t-status { font-size: 15.5px; font-weight: 600; }
html[data-layout="clean"] .cl-bk-foot { border-top: 1px solid var(--rule-soft); padding: 4px 22px 6px; }

/* ---------- the peek: a person, without opening them ---------- */
html[data-layout="clean"] .cl-bk-peek.follow { pointer-events: none; width: 320px; max-width: calc(100vw - 16px); padding: 16px 18px 16px; }
html[data-layout="clean"] .cl-bk-peek .cl-peek-title { margin: 6px 0 12px; }
html[data-layout="clean"] .cl-bk-facts { display: flex; flex-direction: column; gap: 10px; margin: 0; }
html[data-layout="clean"] .cl-bk-fact dt {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
html[data-layout="clean"] .cl-bk-fact dd { margin: 2px 0 0; font-size: 15.5px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
html[data-layout="clean"] .cl-bk-peek .btn { margin-top: 16px; }

/* ============================================================
   ONE PERSON, and every setup card: where it stands at the top
   left, three dots at the top right, the name, then its body.
   ============================================================ */
html[data-layout="clean"] .cl-bk-person,
html[data-layout="clean"] .cl-bk-card { gap: 10px; padding: 18px 22px 20px; }
html[data-layout="clean"] .cl-bk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
html[data-layout="clean"] .cl-bk-state { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
html[data-layout="clean"] .cl-bk-corner { position: relative; flex: none; display: flex; align-items: center; }
/* A heading inside a card is the card's name: the global h2 is a mono
   section break with a dashed rule over it, which has no business here. */
html[data-layout="clean"] .cl-bk-name {
  font-family: var(--font-text); text-transform: none; color: var(--ink);
  font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  margin: 0; padding: 0; border-top: 0; text-wrap: balance;
}
html[data-layout="clean"] .cl-bk-date { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink); }
html[data-layout="clean"] .cl-bk-sub { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
html[data-layout="clean"] .cl-bk-contact { font-size: 16px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
html[data-layout="clean"] .cl-bk-contact a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--cl-line); text-underline-offset: 4px; }
html[data-layout="clean"] .cl-bk-contact a:hover { text-decoration-color: var(--ink); }
html[data-layout="clean"] .cl-bk-say { margin: 0; max-width: 40em; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
html[data-layout="clean"] .cl-bk-say[hidden] { display: none; }
html[data-layout="clean"] .cl-bk-lead { margin: 0; max-width: 40em; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
html[data-layout="clean"] .cl-bk-quiet { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
html[data-layout="clean"] .cl-bk-note {
  display: flex; align-items: baseline; gap: 10px;
  background: var(--paper-4); border-radius: 6px; padding: 12px 14px;
  font-size: 15.5px; line-height: 1.45; color: var(--ink-2);
}
html[data-layout="clean"] .cl-bk-note .cl-lamp { transform: translateY(-1px); }
html[data-layout="clean"] .cl-bk-note-act { flex-wrap: wrap; align-items: center; }
html[data-layout="clean"] .cl-bk-note-act > span:not(.cl-lamp) { flex: 1 1 220px; min-width: 0; }
html[data-layout="clean"] .cl-bk-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 4px; }
html[data-layout="clean"] .cl-bk-acts[hidden] { display: none; }
html[data-layout="clean"] .cl-bk-quote {
  margin: 0; padding: 12px 16px;
  background: var(--paper-4); border-left: 3px solid var(--cl-line); border-radius: 0 6px 6px 0;
  font-size: 17px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
}
/* The appointment came and went: always there, so it does not grow in. */
html[data-layout="clean"] .cl-bk-decide { animation: none; }

/* ---------- the conversation ----------
   views/bookings.js builds the log (the same one the classic card shows);
   it was drawn for the dark panel and is restated for paper here. */
html[data-layout="clean"] .cl-bk-talk { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--rule-soft); margin-top: 6px; padding-top: 16px; }
html[data-layout="clean"] .cl-bk-talk .call-thread { max-height: min(44vh, 380px); padding: 0 2px 0 0; }
html[data-layout="clean"] .cl-bk-talk .call-msg { max-width: 86%; border-radius: 10px; padding: 10px 14px; }
html[data-layout="clean"] .cl-bk-talk .call-msg.in { background: var(--paper-4); border: 1px solid var(--rule-soft); border-bottom-left-radius: 3px; }
html[data-layout="clean"] .cl-bk-talk .call-msg.out { background: var(--surface); border: 1px solid var(--cl-line); border-bottom-right-radius: 3px; }
html[data-layout="clean"] .cl-bk-talk .call-msg-body,
html[data-layout="clean"] .cl-bk-talk .call-msg.out .call-msg-body { font-size: 16px; line-height: 1.45; color: var(--ink); }
html[data-layout="clean"] .cl-bk-talk .call-msg-meta { font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); }
html[data-layout="clean"] .cl-bk-talk .call-msg-err { font-size: 14px; color: var(--accent-deep); }
html[data-layout="clean"] .cl-bk-talk .call-quiet { font-size: 15.5px; color: var(--muted); }
html[data-layout="clean"] .cl-bk-talk .call-transcript summary {
  font-family: var(--font-text); font-size: 14.5px; font-weight: 600; letter-spacing: normal; text-transform: none;
  color: var(--ink-2);
}
html[data-layout="clean"] .cl-bk-talk .call-transcript summary:hover { color: var(--ink); }
html[data-layout="clean"] .cl-bk-talk .call-transcript-body { font-size: 15px; color: var(--ink-2); }

html[data-layout="clean"] .cl-bk-compose { display: flex; flex-direction: column; gap: 10px; }
html[data-layout="clean"] .cl-bk-compose textarea { min-height: 64px; background: var(--surface); border-color: var(--cl-line); }
html[data-layout="clean"] .cl-bk-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
html[data-layout="clean"] .cl-bk-via { flex: 1 1 200px; min-width: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
html[data-layout="clean"] .cl-bk-send .btn { flex: none; margin-left: auto; }

/* A choice between two or three things that are all on the page at once. */
html[data-layout="clean"] .cl-bk-seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; border: 1px solid var(--cl-line); border-radius: var(--radius-btn); overflow: hidden; }
html[data-layout="clean"] .cl-bk-seg button {
  min-height: 42px; padding: 0 16px; cursor: pointer;
  background: var(--surface); color: var(--ink-2);
  border: 0; border-right: 1px solid var(--cl-line);
  font-family: var(--font-text); font-size: 15.5px; font-weight: 600;
  transition: background-color .15s, color .15s;
}
html[data-layout="clean"] .cl-bk-seg button:last-child { border-right: 0; }
html[data-layout="clean"] .cl-bk-card > .cl-bk-seg { margin: 4px 0 8px; }
html[data-layout="clean"] .cl-bk-seg button:hover { background: var(--paper-4); color: var(--ink); }
html[data-layout="clean"] .cl-bk-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-3); }

/* ---------- what they told you: one quiet line until it is opened ---------- */
html[data-layout="clean"] .cl-bk-told { border-top: 1px solid var(--rule-soft); margin-top: 6px; }
html[data-layout="clean"] .cl-bk-told > summary,
html[data-layout="clean"] .cl-bk-fold > summary,
html[data-layout="clean"] .cl-bk-founder > summary {
  position: relative; box-sizing: border-box; cursor: pointer; list-style: none;
  font-family: var(--font-text); letter-spacing: normal; text-transform: none; color: var(--ink);
}
html[data-layout="clean"] .cl-bk-told > summary::before,
html[data-layout="clean"] .cl-bk-fold > summary::before,
html[data-layout="clean"] .cl-bk-founder > summary::before { content: none; display: none; }
html[data-layout="clean"] .cl-bk-told > summary::-webkit-details-marker,
html[data-layout="clean"] .cl-bk-fold > summary::-webkit-details-marker,
html[data-layout="clean"] .cl-bk-founder > summary::-webkit-details-marker { display: none; }
html[data-layout="clean"] .cl-bk-told > summary::after,
html[data-layout="clean"] .cl-bk-fold > summary::after,
html[data-layout="clean"] .cl-bk-founder > summary::after {
  content: ""; position: absolute; right: 3px; top: 50%; width: 8px; height: 8px; margin-top: -7px;
  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-bk-told[open] > summary::after,
html[data-layout="clean"] .cl-bk-fold[open] > summary::after,
html[data-layout="clean"] .cl-bk-founder[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
html[data-layout="clean"] .cl-bk-told > summary { min-height: 46px; padding: 12px 24px 4px 0; font-size: 15.5px; font-weight: 600; }
html[data-layout="clean"] .cl-bk-told > summary::after { top: 30px; }
html[data-layout="clean"] .cl-bk-told > summary:hover { text-decoration: underline; text-underline-offset: 4px; }
html[data-layout="clean"] .cl-bk-told-body { padding-top: 8px; }
html[data-layout="clean"] .cl-bk-told-body p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
html[data-layout="clean"] .cl-bk-told-body p.cl-bk-answers { font-size: 16.5px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- moving a booking: the open times ---------- */
html[data-layout="clean"] .cl-bk-slots { display: flex; flex-direction: column; gap: 8px; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 2px 0; }
html[data-layout="clean"] .cl-bk-slots .cl-label { font-size: 11px; padding-top: 6px; }
html[data-layout="clean"] .cl-bk-slotrow { display: flex; flex-wrap: wrap; gap: 8px; }
html[data-layout="clean"] .cl-bk-slot {
  min-height: 40px; padding: 0 12px; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px;
  transition: background-color .15s, border-color .15s;
}
html[data-layout="clean"] .cl-bk-slot:hover { border-color: var(--ink); }
html[data-layout="clean"] .cl-bk-slot[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper-3); }

/* ---------- the customer submission ---------- */
html[data-layout="clean"] .cl-bk-sub-facts { margin: 0 0 16px; gap: 12px; }
/* A question is read, not scanned: the text face, not the mono label. */
html[data-layout="clean"] .cl-bk-sub-facts .cl-bk-fact dt {
  font-family: var(--font-text); font-size: 15px; font-weight: 600; letter-spacing: normal; text-transform: none;
  line-height: 1.35; color: var(--ink-2);
}
html[data-layout="clean"] .cl-bk-sub-facts .cl-bk-fact dd { font-size: 16.5px; }
html[data-layout="clean"] .cl-bk-sub-facts .cl-bk-fact dd a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--cl-line); text-underline-offset: 4px; }
html[data-layout="clean"] .cl-bk-sub-facts .cl-bk-fact dd a:hover { text-decoration-color: var(--ink); }
html[data-layout="clean"] .cl-bk-sub-label { margin: 2px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }

/* ============================================================
   THE WEEK CALENDAR, under Coming up. The month opens as a layer
   from the card's foot, over the list, so the page never moves.
   ============================================================ */
html[data-layout="clean"] .cl-bk-cal { position: relative; gap: 12px; padding: 16px 22px 18px; }
html[data-layout="clean"] .cl-bk-cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
html[data-layout="clean"] .cl-bk-cal-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
html[data-layout="clean"] .cl-bk-cal-name { font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink); }
html[data-layout="clean"] .cl-bk-cal-range { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); }
html[data-layout="clean"] .cl-bk-cal-nav { display: flex; align-items: center; gap: 6px; }
html[data-layout="clean"] .cl-bk-cal-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  transition: background-color .15s, border-color .15s;
}
html[data-layout="clean"] .cl-bk-cal-step:hover { background: var(--paper-4); border-color: var(--ink); }
html[data-layout="clean"] .cl-bk-cal-step svg { width: 18px; height: 18px; }
html[data-layout="clean"] .cl-bk-cal-more { margin-left: 4px; }
html[data-layout="clean"] .cl-bk-cal-none { margin: 0; font-size: 15.5px; color: var(--muted); }

html[data-layout="clean"] .cl-bk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
html[data-layout="clean"] .cl-bk-wday { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html[data-layout="clean"] .cl-bk-wtop {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; min-height: 64px; padding: 8px 2px 6px; box-sizing: border-box; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule-soft); border-radius: 8px;
  font-family: var(--font-text);
  transition: background-color .15s, border-color .15s;
}
html[data-layout="clean"] .cl-bk-wtop:disabled { cursor: default; color: var(--ink-2); }
html[data-layout="clean"] .cl-bk-wday.cl-bk-has .cl-bk-wtop:hover { background: var(--paper-4); border-color: var(--cl-line); }
html[data-layout="clean"] .cl-bk-wday.cl-bk-today .cl-bk-wtop { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
html[data-layout="clean"] .cl-bk-wday.cl-bk-gone .cl-bk-wtop { background: var(--paper-4); }
html[data-layout="clean"] .cl-bk-wd { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
html[data-layout="clean"] .cl-bk-wn { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; line-height: 1.2; }
html[data-layout="clean"] .cl-bk-wdots { display: flex; align-items: center; gap: 3px; min-height: 8px; }
html[data-layout="clean"] .cl-bk-wdots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--cl-lamp-ok); }
html[data-layout="clean"] .cl-bk-wdots b { font-family: var(--font-mono); font-size: 10px; line-height: 1; color: var(--ink-2); }
html[data-layout="clean"] .cl-bk-wlist { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
html[data-layout="clean"] .cl-bk-wlist a {
  display: flex; flex-direction: column; gap: 1px;
  padding: 5px 7px; border-radius: 6px; min-width: 0;
  background: var(--paper-4); color: var(--ink); text-decoration: none;
  transition: background-color .15s;
}
html[data-layout="clean"] .cl-bk-wlist a:hover { background: var(--rule-soft); }
html[data-layout="clean"] .cl-bk-wtime { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
html[data-layout="clean"] .cl-bk-wwho { font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html[data-layout="clean"] .cl-bk-month {
  position: absolute; left: -1px; right: -1px; top: calc(100% - 6px); z-index: 30;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 22px 16px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--cl-line); border-radius: var(--radius);
  box-shadow: 0 14px 34px -14px rgba(23, 20, 15, 0.35);
  animation: cl-bk-month-in .18s ease-out;
}
@keyframes cl-bk-month-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
html[data-layout="clean"] .cl-bk-mgrid { display: flex; flex-direction: column; gap: 4px; }
html[data-layout="clean"] .cl-bk-mrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
html[data-layout="clean"] .cl-bk-mhead span { text-align: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; }
html[data-layout="clean"] .cl-bk-mday {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; padding: 4px 0; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid transparent; border-radius: 8px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  transition: background-color .15s, border-color .15s;
}
html[data-layout="clean"] .cl-bk-mday.blank { cursor: default; }
html[data-layout="clean"] .cl-bk-mday:hover { background: var(--paper-4); border-color: var(--cl-line); }
html[data-layout="clean"] .cl-bk-mday.cl-bk-gone { color: var(--muted); }
html[data-layout="clean"] .cl-bk-mday.cl-bk-today { border-color: var(--ink); }
html[data-layout="clean"] .cl-bk-mn { font-size: 15px; font-weight: 600; line-height: 1.1; }
html[data-layout="clean"] .cl-bk-mcount {
  min-width: 18px; padding: 1px 5px; box-sizing: border-box; border-radius: 999px;
  background: var(--cl-lamp-ok); color: var(--surface);
  font-size: 10.5px; font-weight: 600; line-height: 1.4; text-align: center;
}

/* A day's people on a phone, in the sheet a held row opens. */
html[data-layout="clean"] .cl-bk-daylist { display: flex; flex-direction: column; margin: 10px 0 0; padding: 0; list-style: none; }
html[data-layout="clean"] .cl-bk-daylist a {
  display: flex; align-items: center; gap: 12px; min-height: 52px;
  border-top: 1px solid var(--rule-soft); color: var(--ink); text-decoration: none;
  font-size: 16.5px; font-weight: 600;
}
html[data-layout="clean"] .cl-bk-daylist li:first-child a { border-top: 0; }
html[data-layout="clean"] .cl-bk-daylist a > span:nth-child(2) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-layout="clean"] .cl-bk-daylist .cl-bk-wtime { min-width: 64px; font-size: 13px; }

/* ============================================================
   BOOKING SETUP: a short list of parts, then each part's page.
   ============================================================ */
html[data-layout="clean"] .cl-bk-setup,
html[data-layout="clean"] .cl-bk-setup-body,
html[data-layout="clean"] .cl-bk-fu,
html[data-layout="clean"] .cl-bk-fu-list,
html[data-layout="clean"] .cl-bk-form { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .cl-bk-parts { padding: 0; overflow: hidden; }
html[data-layout="clean"] .cl-bk-part {
  display: flex; align-items: center; gap: 14px;
  box-sizing: border-box; min-height: 76px; padding: 14px 22px;
  border-top: 1px solid var(--rule-soft);
  text-decoration: none; color: var(--ink);
  transition: background-color .15s;
}
html[data-layout="clean"] .cl-bk-part:first-child { border-top: 0; }
html[data-layout="clean"] .cl-bk-part:hover { background: var(--paper-4); color: var(--ink); }
html[data-layout="clean"] .cl-bk-part-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html[data-layout="clean"] .cl-bk-part-name { font-size: 17.5px; font-weight: 700; line-height: 1.3; }
html[data-layout="clean"] .cl-bk-part-say { font-size: 15.5px; line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }
html[data-layout="clean"] .cl-bk-chev { flex: none; width: 18px; height: 18px; color: var(--muted); }

html[data-layout="clean"] .cl-bk-pagebody { display: flex; flex-direction: column; gap: 12px; }
html[data-layout="clean"] .cl-bk-url {
  align-self: flex-start; max-width: 100%;
  font-family: var(--font-mono); font-size: 15px; color: var(--ink); overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-color: var(--cl-line); text-underline-offset: 4px;
}
html[data-layout="clean"] .cl-bk-url:hover { text-decoration-color: var(--ink); }

/* The instruments only the founder is shown, folded under the owner's card. */
html[data-layout="clean"] .cl-bk-founder { padding: 0 22px; }
html[data-layout="clean"] .cl-bk-founder > summary { min-height: 52px; padding: 14px 24px 14px 0; font-size: 15.5px; font-weight: 600; color: var(--ink-2); }
html[data-layout="clean"] .cl-bk-founder > .card { margin: 0 0 18px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--rule-soft); border-radius: 0; box-shadow: none; }

/* ---------- fields ---------- */
html[data-layout="clean"] .cl-bk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html[data-layout="clean"] .cl-bk-flabel { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
html[data-layout="clean"] .cl-bk-setup input[type="text"],
html[data-layout="clean"] .cl-bk-setup input[type="time"],
html[data-layout="clean"] .cl-bk-setup textarea,
html[data-layout="clean"] .cl-bk-setup select { background-color: var(--surface); border-color: var(--cl-line); }
html[data-layout="clean"] .cl-bk-setup input[type="text"]:focus,
html[data-layout="clean"] .cl-bk-setup input[type="time"]:focus,
html[data-layout="clean"] .cl-bk-setup textarea:focus,
html[data-layout="clean"] .cl-bk-setup select:focus { border-color: var(--accent); }
html[data-layout="clean"] .cl-bk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* A checkbox that is really on or off, drawn as the same switch the ads
   wear. It stays a checkbox so the editors read it back the way they do. */
html[data-layout="clean"] input.cl-bk-check {
  -webkit-appearance: none; appearance: none;
  flex: none; position: relative; width: 44px; height: 26px; margin: 0; padding: 0;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink-4);
  transition: background-color .18s;
}
html[data-layout="clean"] input.cl-bk-check::after {
  content: ""; 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"] input.cl-bk-check:checked { background: var(--cl-lamp-ok); }
html[data-layout="clean"] input.cl-bk-check:checked::after { transform: translateX(18px); }
html[data-layout="clean"] input.cl-bk-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html[data-layout="clean"] .cl-bk-toggle { display: flex; align-items: center; gap: 12px; font-size: 15.5px; line-height: 1.4; color: var(--ink); cursor: pointer; }

/* ---------- availability ---------- */
html[data-layout="clean"] .cl-bk-avail { gap: 16px; }
html[data-layout="clean"] .cl-bk-days { display: flex; flex-direction: column; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
html[data-layout="clean"] .cl-bk-day {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  min-height: 58px; padding: 8px 0; box-sizing: border-box;
  border-top: 1px solid var(--rule-soft);
}
html[data-layout="clean"] .cl-bk-day:first-child { border-top: 0; }
html[data-layout="clean"] .cl-bk-dayname { display: flex; align-items: center; gap: 12px; min-width: 164px; font-size: 16.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
html[data-layout="clean"] .cl-bk-times { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
html[data-layout="clean"] .cl-bk-times[hidden],
html[data-layout="clean"] .cl-bk-closed[hidden] { display: none; }
html[data-layout="clean"] .cl-bk-times input[type="time"] { width: auto; padding: 8px 10px; font-family: var(--font-mono); font-size: 16px; }
html[data-layout="clean"] .cl-bk-closed { font-size: 15.5px; color: var(--muted); }

/* ---------- how you meet ---------- */
html[data-layout="clean"] .cl-bk-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html[data-layout="clean"] .cl-bk-chips-say { font-size: 15px; color: var(--muted); }
html[data-layout="clean"] .cl-bk-chip {
  min-height: 36px; padding: 0 12px; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--cl-line); border-radius: 999px;
  font-family: var(--font-text); font-size: 14.5px; font-weight: 600;
  transition: background-color .15s, border-color .15s;
}
html[data-layout="clean"] .cl-bk-chip:hover { border-color: var(--ink); background: var(--paper-4); }

/* ---------- follow-up messages ---------- */
html[data-layout="clean"] .cl-bk-seq-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
html[data-layout="clean"] .cl-bk-seq .cl-bk-name { font-size: 20px; }
html[data-layout="clean"] .cl-bk-seq .cl-switch { margin: 1px 0 0; }
html[data-layout="clean"] .cl-bk-seq .cl-switch:disabled { opacity: 0.6; cursor: default; }
html[data-layout="clean"] .cl-bk-seq .cl-bk-acts { padding-top: 0; }
html[data-layout="clean"] .cl-bk-fu-more { display: flex; flex-wrap: wrap; gap: 2px 22px; }
/* The message editor is views/followups.js's own, with its measurements
   written on the elements; the few that were sized for the dark panel's
   small type are restated here. */
html[data-layout="clean"] .cl-bk-fu-edit .fu-step:first-child { margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important; }
html[data-layout="clean"] .cl-bk-fu-edit .field-label,
html[data-layout="clean"] .cl-bk-edit .field-label {
  font-family: var(--font-text); font-size: 15px; font-weight: 600; letter-spacing: normal; text-transform: none;
  color: var(--ink); margin-bottom: 6px;
}
html[data-layout="clean"] .cl-bk-fu-edit .fu-step .btn.small { font-size: 14px !important; padding: 6px 12px; }
html[data-layout="clean"] .cl-bk-fu-edit .fu-step .meta { font-size: 14.5px !important; }
html[data-layout="clean"] .cl-bk-fu-edit textarea { min-height: 110px; }
html[data-layout="clean"] .cl-bk-fu-edit .fu-wait { grid-template-columns: 4.2em minmax(0, 1.25fr) minmax(0, 1fr) !important; }
html[data-layout="clean"] .cl-bk-fu-edit .fu-wait select { padding-left: 10px; padding-right: 28px; background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; }

/* ============================================================
   THE PAGE EDITOR (#/bookings/edit): one folded card per part of
   the page, the opening open, and Save riding at the foot.
   ============================================================ */
html[data-layout="clean"] .cl-bk-fold { padding: 0 22px; }
html[data-layout="clean"] .cl-bk-fold > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px;
  min-height: 62px; padding: 16px 28px 16px 0;
}
html[data-layout="clean"] .cl-bk-fold-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
html[data-layout="clean"] .cl-bk-fold-say { flex: 1 1 200px; min-width: 0; font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-layout="clean"] .cl-bk-fold[open] .cl-bk-fold-say { display: none; }
html[data-layout="clean"] .cl-bk-edit .cl-page-head { flex-wrap: wrap; }
html[data-layout="clean"] .cl-bk-fold > summary:hover .cl-bk-fold-name { text-decoration: underline; text-underline-offset: 4px; }
html[data-layout="clean"] .cl-bk-fold-body { display: flex; flex-direction: column; border-top: 1px solid var(--rule-soft); padding: 6px 0 22px; }
html[data-layout="clean"] .cl-bk-fold-body > .cl-bk-say,
html[data-layout="clean"] .cl-bk-fold-body > .cl-bk-toggle-lead,
html[data-layout="clean"] .cl-bk-fold-body > .cl-bk-acts { margin-top: 12px; }
html[data-layout="clean"] .cl-bk-fold-body .meta { font-size: 14.5px; }
html[data-layout="clean"] .cl-bk-q {
  display: flex; flex-direction: column; gap: 12px; margin-top: 14px;
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px;
}
html[data-layout="clean"] .cl-bk-q.off > :not(.cl-bk-q-top) { opacity: 0.5; }
html[data-layout="clean"] .cl-bk-q-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
html[data-layout="clean"] .cl-bk-answers-list { display: flex; flex-direction: column; gap: 10px; }
html[data-layout="clean"] .cl-bk-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
html[data-layout="clean"] .cl-bk-answer input[type="text"] { flex: 1 1 220px; width: auto; min-width: 0; }
html[data-layout="clean"] .cl-bk-opening { margin-top: 12px; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
html[data-layout="clean"] .cl-bk-opening-line { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ink); margin-bottom: 4px; }
html[data-layout="clean"] .cl-bk-savebar {
  position: sticky; bottom: calc(78px + var(--safe-b)); z-index: 5;
  flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  padding: 14px 22px; border-color: var(--cl-line);
  font-size: 15.5px; color: var(--ink-2);
}

/* ============================================================
   A PHONE: the table reads as a list. A row is the person and
   where they stand, then what they asked for, then when.
   ============================================================ */
@media (max-width: 599.98px) {
  html[data-layout="clean"] .cl-bk-table,
  html[data-layout="clean"] .cl-bk-table tbody,
  html[data-layout="clean"] .cl-bk-table td { display: block; }
  html[data-layout="clean"] .cl-bk-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  html[data-layout="clean"] .cl-bk-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px;
    padding: 14px 18px; border-top: 1px solid var(--rule-soft);
  }
  html[data-layout="clean"] .cl-bk-row:first-child { border-top: 0; }
  html[data-layout="clean"] .cl-bk-row td,
  html[data-layout="clean"] .cl-bk-table td:first-child,
  html[data-layout="clean"] .cl-bk-table td:last-child { padding: 0; border: 0; }
  html[data-layout="clean"] .cl-bk-row .cl-t-name { grid-column: 1; grid-row: 1; font-size: 17px; max-width: none; min-width: 0; }
  html[data-layout="clean"] .cl-bk-row .cl-t-status { grid-column: 2; grid-row: 1; text-align: right; font-size: 15px; }
  html[data-layout="clean"] .cl-bk-row .cl-bk-asked { grid-column: 1 / -1; grid-row: 2; }
  html[data-layout="clean"] .cl-bk-row .cl-bk-when { grid-column: 1 / -1; grid-row: 3; }
  html[data-layout="clean"] .cl-bk-when span { display: inline; }
  html[data-layout="clean"] .cl-bk-when span + span::before { content: " · "; }
  html[data-layout="clean"] .cl-bk-foot { padding: 4px 18px 6px; }
  /* Four tabs do not fit a phone: one row that slides, never two. */
  html[data-layout="clean"] .cl-bookings-body > .cl-tabs { flex-wrap: nowrap; gap: 0 20px; overflow-x: auto; scrollbar-width: none; }
  html[data-layout="clean"] .cl-bookings-body > .cl-tabs::-webkit-scrollbar { display: none; }
  html[data-layout="clean"] .cl-bookings-body > .cl-tabs .cl-tab { flex: none; white-space: nowrap; }
  html[data-layout="clean"] .cl-bk-person,
  html[data-layout="clean"] .cl-bk-card { padding: 16px 18px 18px; }
  html[data-layout="clean"] .cl-bk-name { font-size: 22px; }
  html[data-layout="clean"] .cl-bk-part { padding: 14px 18px; gap: 12px; }
  html[data-layout="clean"] .cl-bk-fold { padding: 0 18px; }
  /* A row is its words, then its control under them. */
  html[data-layout="clean"] .cl-bk-dayname { min-width: 0; flex: 1 1 auto; }
  html[data-layout="clean"] .cl-bk-times { flex: 1 1 100%; }
  html[data-layout="clean"] .cl-bk-times input[type="time"] { flex: 1 1 0; min-width: 0; }
  html[data-layout="clean"] .cl-bk-send .btn { margin-left: 0; }
  html[data-layout="clean"] .cl-bk-savebar { padding: 12px 18px; }
  /* The week on a phone: a mark per booking, and the day lists them. */
  html[data-layout="clean"] .cl-bk-cal { padding: 14px 14px 16px; }
  html[data-layout="clean"] .cl-bk-week { gap: 4px; }
  html[data-layout="clean"] .cl-bk-wlist { display: none; }
  html[data-layout="clean"] .cl-bk-wtop { min-height: 66px; padding: 7px 0 6px; }
  html[data-layout="clean"] .cl-bk-month { padding: 12px 12px 14px; }
  html[data-layout="clean"] .cl-bk-mrow { gap: 2px; }
  html[data-layout="clean"] .cl-bk-mday { min-height: 42px; }
  html[data-layout="clean"] .cl-bk-month .cl-bk-cal-nav { width: 100%; }
  html[data-layout="clean"] .cl-bk-month .cl-quiet { margin-left: auto; }
}

@media (min-width: 600px) {
  html[data-layout="clean"] .cl-bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
  /* On a desk the names are in the day, so the marks are not needed. */
  html[data-layout="clean"] .cl-bk-wdots { display: none; }
  html[data-layout="clean"] .cl-bk-wtop { min-height: 0; }
}

@media (min-width: 900px) {
  html[data-layout="clean"] .view:has(.cl-bookings) { max-width: 1240px; padding: 32px 40px 48px; }
  html[data-layout="clean"] .view:has(.cl-bk-setup) { max-width: 760px; padding: 32px 40px 48px; }
  html[data-layout="clean"] .cl-bookings-body,
  html[data-layout="clean"] .cl-bk-setup { gap: 20px; }
  html[data-layout="clean"] .cl-bk-person,
  html[data-layout="clean"] .cl-bk-card { padding: 20px 26px 22px; }
  html[data-layout="clean"] .cl-bk-savebar { bottom: 12px; }
}

/* Side by side: there is always a person open, so nothing is hidden. */
@media (min-width: 1000px) {
  html[data-layout="clean"] .cl-bk-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  html[data-layout="clean"] .cl-bk-split.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  html[data-layout="clean"] .cl-bk-split.solo .cl-bk-pane { display: none; }
  html[data-layout="clean"] .cl-bk-pane,
  html[data-layout="clean"] .cl-bookings-body.has-detail .cl-bk-pane { display: flex; position: sticky; top: 24px; }
  /* The card stays beside the list however long the list is, so it has to
     fit the window itself: a long conversation scrolls inside it and the
     reply box is never below the fold. */
  html[data-layout="clean"] .cl-bk-pane { max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  html[data-layout="clean"] .cl-bookings-body.has-detail .cl-bk-list { display: flex; }
  html[data-layout="clean"] .cl-bookings-body.has-detail .cl-tabs { display: flex; }
  html[data-layout="clean"] .cl-bookings-body.has-detail .cl-page-head { display: flex; }
  html[data-layout="clean"] .cl-bookings-body.has-detail .cl-back { display: none; }
  html[data-layout="clean"] .cl-bk-row.on,
  html[data-layout="clean"] .cl-bk-row.on:hover { background: var(--paper-4); box-shadow: inset 3px 0 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-layout="clean"] input.cl-bk-check,
  html[data-layout="clean"] input.cl-bk-check::after { transition: none; }
  html[data-layout="clean"] .cl-bk-month { animation: none; }
}
