/* The CRM page: the core style sheet. It loads after ws.css (the workspace: the tokens, the sidebar, the palette, a copy
   of tools/shared/ws.css) and before the style sheets of the views, in this order:
     app.css             the CRM tokens, base, type, controls, marks, menus, the toast, fields, the frame, a page,
                         sheets and dialogs, the shared states, the phone frame (this file)
     css/board.css       the board and Next steps, the first day of the board
     css/lists.css       tables, Spam, Clients and parked, Research, Reports
     css/file.css        the file of one organization, Claude, a lost file
     css/marketing.css   Marketing
     css/settings.css    the sign-in pages, Settings, the keyboard shortcuts, the email sequences
     css/last.css        the state colors that must win over the color of a part
   The look is the workspace of the tools: a light sidebar, a calm page, crisp hairlines, one accent, app-scale type.
   Every color comes from a token of ws.css or of this file, so the light and the dark theme both work; ws.js sets the
   theme (<html data-theme>, Light by default). Hue only where it carries meaning: state and status. One solid button on each screen.
   Each section states its rules once, then its media blocks in this order: from 760px up, the rail of icons (760px to
   1199px), the tablet (up to 1099px), the phone (up to 759px), reduced motion. */

/* ===== Tokens ===== */
/* The palette is in ws.css. These tokens are the CRM's own: the status colors, the avatars, the mark of Claude, the
   Next step card, and the old names of the CRM, which now point at the shared tokens. */
:root {
  /* One color for each status: the dot of a column, a chip, a bar of a report. */
  --s-new: #0E0D0B;
  --s-contacted: #7E776B;
  --s-call-booked: #8A5A00;
  --s-proposal: #5B3FC4;
  --s-won: #0E7A4B;
  --s-lost: #B3261E;
  --s-parked: #6B655B;
  --s-client: #0E7A4B;
  --s-rfp: #5B3FC4;
  /* The founders' avatars: white initials on a fill of 5:1 or better. */
  --av-0: #4A453E;
  --av-1: #0E0D0B;
  --av-2: #5B3FC4;
  --av-3: #0E7A4B;
  --on-av: #FFFFFF;
  --on-av-1: #FFFFFF;
  /* The square mark of Claude. */
  --cl: #0E0D0B;
  --on-cl: #FFFFFF;
  /* The Next step card of a file: the one strong card of the page. */
  --strong: #0E0D0B;
  --strong-edge: #0E0D0B;
  --on-strong: #FFFFFF;
  --on-strong-2: #B5AE9F;
  --late-on-strong: #FF8A80;
  --strong-focus: #FFFFFF;
  /* Text or a tick on a solid color (the accent, good, late). */
  --on-color: #FFFFFF;
  --dot-inferred: #C98A00;
  --toast-act: #FFFFFF;
  --qr-ground: #FFFFFF;   /* the QR code of the sign-in stays dark on white in both themes, so each app can scan it */
  --qr-ink: #000000;

  /* The old names of the CRM. New CSS uses the names of ws.css. */
  --canvas: var(--ground);
  --side: var(--side-w);
  --pad: 32px;               /* the side margin of a page: 32px, 24px from 760px to 1199px, 16px on a phone */
  --amber-dot: var(--dot-inferred);
  --shadow: var(--shadow-xs);
  --shadow-2: var(--shadow-sm);
  --shadow-hair: var(--shadow-xs), 0 0 0 1px var(--line);
  --shadow-menu: var(--shadow-md);
  --shadow-sheet: var(--shadow-lg);
  /* The old type scale, mapped to the scale of the workspace (ws.css --t-*). */
  --type-micro: var(--t-xs);
  --type-label: var(--t-xs);
  --type-small: var(--t-sm);
  --type-note: var(--t-sm);
  --type-ui: var(--t-md);
  --type-text: var(--t-body);
  --type-body: var(--t-md);
  --type-lead: var(--t-h3);
  --type-h3: var(--t-h3);
  --type-h2: var(--t-h2);
  --type-h1: var(--t-h1);    /* 28/34; 24/30 on a phone */
}
:root[data-theme="dark"] {
  --s-new: #F4EFE6;
  --s-contacted: #B5AE9F;
  --s-call-booked: #F5B83D;
  --s-proposal: #B58CFF;
  --s-won: #3DD68C;
  --s-lost: #FF8A80;
  --s-parked: #7E776B;
  --s-client: #3DD68C;
  --s-rfp: #B58CFF;
  --av-0: #4A453E;
  --av-1: #F4EFE6;
  --av-2: #6E52D6;
  --av-3: #10804F;
  --on-av: #FFFFFF;
  --on-av-1: #0E0D0B;
  --cl: #F4EFE6;
  --on-cl: #0E0D0B;
  --strong: #24211C;
  --strong-edge: #3A362E;
  --on-strong: #F4EFE6;
  --on-strong-2: #B5AE9F;
  --late-on-strong: #FF8A80;
  --strong-focus: #FFFFFF;
  --on-color: #0E0D0B;
  --dot-inferred: #F5B83D;
  --toast-act: #000000;
}
@media (min-width: 760px) and (max-width: 1199px) {
  :root { --pad: 24px; }
}
@media (max-width: 759px) {
  :root { --pad: 16px; --type-h1: 24px/30px; }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--t-body) var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, p, dl, dd, ol, blockquote { margin: 0; }
ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* The palette field of ws.css shows its caret, not a ring (the ring rule above would win on order). */
.cmdk-input:focus-visible { outline: 0; border-radius: 0; }
/* A phone has no keyboard: the palette rows show their place (CRM, Tools), not the G keys. */
@media (max-width: 759px), (hover: none) and (pointer: coarse) { .cmdk-meta .ws-kbd { display: none; } }
::selection { background: var(--accent-ring); }
.boot, .none { padding: 24px 0; color: var(--muted); font: 400 var(--t-md) var(--sans); }
.boot { padding: 24px 16px; }

/* ===== Type that repeats ===== */
.mono { font: 400 var(--t-xs) var(--mono); letter-spacing: .02em; color: var(--muted); }
.num { color: var(--muted); font: 500 var(--t-xs) var(--sans); font-variant-numeric: tabular-nums; }
.label { font: 500 var(--t-sm) var(--sans); color: var(--muted); }
.label-accent { color: var(--accent); }
.is-late { color: var(--late); }
.quiet { color: var(--muted); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.sub { display: block; margin-top: 2px; color: var(--muted); font: 400 var(--t-sm) var(--sans); }
.sub:empty { display: none; }
.eyebrow { font: 500 var(--t-sm) var(--sans); color: var(--muted); }
.link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }
/* A link inside a sentence (a lede, a notice, a line of help) is underlined, so it never reads by color alone. A link
   that stands alone as an action stays bare until hover. */
.lede .link, .st-lede .link, .notice .link, .sheet-info .link, .empty-text .link { text-decoration: underline; text-underline-offset: 2px; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.accent { color: var(--accent); }
.gap { margin-top: 24px; }
.gap-l { margin-top: 40px; }
hr.rule { height: 1px; margin: 24px 0 0; border: 0; background: var(--line); }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--raised); color: var(--muted); font: 500 11px/1 var(--mono); box-shadow: 0 1px 0 var(--line); }
/* The lockup on its own (the sign-in pages): dark ink on light, light ink in the dark theme. */
.sign-brand .on-dark { display: none; }
:root[data-theme="dark"] .sign-brand .on-light { display: none; }
:root[data-theme="dark"] .sign-brand .on-dark { display: block; }

/* ===== Controls ===== */
/* Buttons: 36px, 8px corners, 14px text, a 16px icon 8px from the text. The solid one (--brand) is the one primary of a
   screen; btn-line is the secondary; btn-ghost a quiet one; btn-danger red text and edge. Sizes: btn-s 32px, btn-l 40px.
   The old size names stay: btn-32 is small, btn-36 and btn-40 are the default 36px, btn-48 and btn-block are large. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--brand); color: var(--on-brand); font: 500 var(--t-md) var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--brand-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn .icon, .btn .ws-ic { margin: 0 0 0 -2px; }
.btn-line { border-color: var(--edge); background: var(--raised); color: var(--ink); }
.btn-line:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--ink) 4%, var(--raised)); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-danger, .btn-red { border-color: var(--late); background: var(--raised); color: var(--late); }
.btn-danger:hover, .btn-red:hover { background: color-mix(in srgb, var(--late) 7%, var(--raised)); }
.btn-s, .btn-32 { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-36, .btn-40 { height: 36px; }
.btn-l, .btn-48 { height: 40px; padding: 0 16px; }
.btn-block { width: 100%; height: 40px; }
/* A text button: a word that acts. In the foot of a sheet or a dialog it is a ghost button. */
.text-btn { padding: 0; border: 0; background: none; color: var(--ink-2); font: 500 var(--t-md) var(--sans); cursor: pointer; }
.text-btn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.text-btn:disabled { opacity: .5; cursor: not-allowed; }
.text-btn-s { display: inline-flex; gap: 10px; color: var(--ink); font-weight: 400; text-align: left; }
.text-btn-ic { display: inline-flex; align-items: center; gap: 8px; }
.link-red { color: var(--late); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-md); background: none; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
/* Fields: 36px (40px in a form with labels, and on a phone), 8px corners, the field edge at 3:1, the accent ring on focus. */
.input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--field-edge); border-radius: var(--r-md); background: var(--field); color: var(--ink); font: 400 var(--t-md) var(--sans); }
.input:hover { border-color: color-mix(in srgb, var(--field-edge), var(--ink) 30%); }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.input::placeholder { color: var(--faint); }
.input[aria-invalid="true"] { border-color: var(--late); }
textarea.input { height: auto; min-height: 96px; padding: 9px 12px; line-height: 21px; resize: vertical; }
.input-s { width: 132px; height: 32px; padding: 0 10px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.notice { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--late); border-radius: var(--r-md); background: var(--late-soft); color: var(--late); font-weight: 500; }
/* A segmented control: the track, the chosen one a raised pill with a hairline. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--track); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font: 500 var(--t-sm) var(--sans); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.seg button:focus-visible { outline-offset: 0; }
/* A card: the raised fill, a hairline, 12px corners. A hover lift only on a card that is a link. */
.card { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); }
.tag { align-self: flex-start; padding: 2px 8px; border-radius: var(--r-sm); background: var(--tint); color: var(--muted); font: 500 var(--t-xs) var(--sans); white-space: nowrap; }
.tag-white { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.tag-amber { background: var(--caution-soft); color: var(--caution); }
.tag-green { background: var(--good-soft); color: var(--good); }
.pillnote { display: inline-block; padding: 3px 8px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); font: 500 var(--t-xs) var(--sans); }
/* A status: a pill 22px high, a tint of its color and a 6px dot. */
.chip { --c: var(--s-parked); display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 0; border-radius: 11px;
  background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--c); font: 500 var(--t-xs) var(--sans); white-space: nowrap; }
.chip::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-new { --c: var(--s-new); }
.chip-contacted { --c: var(--s-contacted); }
.chip-call-booked { --c: var(--s-call-booked); }
.chip-proposal { --c: var(--s-proposal); }
.chip-won { --c: var(--s-won); }
.chip-lost { --c: var(--s-lost); }
.chip-client { --c: var(--s-client); }
.chip-rfp { --c: var(--s-rfp); }
.chip-do-not-contact { --c: var(--late); }
.chip-researched { box-shadow: inset 0 0 0 1px var(--line); background: var(--raised); color: var(--muted); }
.chip-researched::before { display: none; }
.chip-btn { text-decoration: none; }
@media (max-width: 759px) {
  .input { height: 40px; font-size: 16px; }
  .seg button { height: 32px; }
}

/* ===== Marks: an owner, Claude, the initials of a person, a dot ===== */
/* An owner: a circle with the first letter, white on a strong fill (5:1 or better in both themes). */
.av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--av-0); color: var(--on-av); font: 600 13px/1 var(--sans); }
.av-0 { background: var(--av-0); }
.av-1 { background: var(--av-1); color: var(--on-av-1); }
.av-2 { background: var(--av-2); }
.av-3 { background: var(--av-3); }
.av-none { border: 1px dashed var(--field-edge); background: none; }
.av-20 { width: 20px; height: 20px; font-size: 10px; }
.av-22 { width: 22px; height: 22px; font-size: 11px; }
.av-24 { width: 24px; height: 24px; font-size: 11px; }
.av-32 { width: 32px; height: 32px; font-size: 14px; }
.av-44 { width: 44px; height: 44px; font-size: 18px; }
.cl { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--cl); color: var(--on-cl); font: 500 13px/1 var(--mono); }
.cl-24 { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.cl-22 { width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.cl-20 { width: 20px; height: 20px; border-radius: 5px; font-size: 10px; }
.ini { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 500 10px/1 var(--mono); }
.ini-36 { width: 36px; height: 36px; font-size: 11px; }
.ini-28 { width: 28px; height: 28px; }
.ini-20 { width: 20px; height: 20px; font-size: 10px; }
.table .ini { box-shadow: inset 0 0 0 1px var(--line); background: var(--raised); }
.pill .ini { background: var(--accent-soft); }
.dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.dot-inferred { background: var(--dot-inferred); }
.dot-open { border: 1px solid var(--muted); background: none; }
.dot-bad { background: var(--late); }
.legend { display: inline-flex; gap: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
/* A number or a text that the founders have not ruled on: a quiet tag with its reason in the tooltip, not an error. */
.sample { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-sm); background: var(--tint); color: var(--muted); font: 500 var(--t-xs) var(--sans); white-space: nowrap; vertical-align: middle; cursor: help; }

/* ===== A menu, or a small panel, by its button ===== */
/* core.js places a menu in a layer of its own (.floats, or the layer of a sheet), fixed by its button, above the lanes
   of the board, the cards and the tab bar of a phone. */
.menu-wrap { position: relative; display: inline-flex; }
.floats { position: relative; z-index: 50; }
.menu { position: fixed; z-index: 50; display: grid; align-content: start; min-width: 200px; max-width: calc(100vw - 16px); padding: 6px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px;
  background: var(--raised); color: var(--ink); box-shadow: var(--shadow-md); font: 400 var(--t-md) var(--sans); text-align: left; }
.menu-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: 400 var(--t-md) var(--sans);
  text-align: left; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.menu-item > span:not(.av) { flex: 1; }
.menu-item:hover { background: var(--hover); }
.menu-item:focus-visible { outline-offset: -2px; background: var(--hover); }
.menu-item[aria-current="true"] { font-weight: 500; }
.menu-item .icon { color: var(--accent); }
.menu-note { padding: 6px 8px 4px; color: var(--muted); font: 500 var(--t-xs) var(--sans); white-space: nowrap; }
.menu-line { height: 1px; margin: 6px -6px; border: 0; background: var(--line); }
.menu-item.is-red { color: var(--late); }
.menu-item kbd { margin-left: 16px; }
a.menu-item { text-decoration: none; }
/* The founder's menu: the founder, the theme, Settings, the keyboard shortcuts, Sign out. */
.menu-account { min-width: 248px; }
.menu-me { display: grid; gap: 2px; padding: 8px 8px 6px; }
.menu-me b { font: 500 var(--t-md) var(--sans); }
.menu-me span { color: var(--muted); font: 400 var(--t-xs) var(--sans); }
.menu-theme { display: grid; gap: 6px; padding: 2px 2px 4px; }
.menu-theme .menu-note { padding: 4px 6px 0; }
/* In the menu the choices are menu items with a check (settings.js): the chosen one looks as in the sidebar. */
.menu-theme .ws-theme button[aria-checked="true"] { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
/* A small panel by a button: Move the date */
.pop { width: 320px; padding: 16px; gap: 0; cursor: default; }
.pop > .label { margin-bottom: 6px; color: var(--ink); font: 600 var(--t-h3) var(--sans); }
.pop-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; height: 36px; margin: 0 -8px; padding: 0 8px; border-radius: var(--r-sm); cursor: pointer; }
.pop-row:hover { background: var(--hover); }
.pop-row:has(input:checked) { background: var(--selected); }
.pop-row b { font: 400 var(--t-md) var(--sans); }
.pop-row:has(input:checked) b { font-weight: 500; }
.pop-row .mono { font: 400 var(--t-sm) var(--sans); font-variant-numeric: tabular-nums; }
.pop-row .date { width: auto; height: 28px; padding: 0; border: 0; background: none; box-shadow: none; }
.pop-row .date span { display: none; }
.pop .input { margin-top: 10px; }
.pop .btn-block { margin-top: 12px; }
.pop-note { margin-top: 10px; color: var(--muted); font: 400 var(--t-xs) var(--sans); }

/* ===== The toast ===== */
/* Bottom center; over an open sheet, above its foot (core.js lifts it). The action is a button and Cmd+Z or Ctrl+Z. */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 55; display: flex; align-items: center; gap: 4px; width: max-content; max-width: calc(100vw - 32px); min-height: 44px; margin: 0; padding: 0 6px 0 16px;
  border-radius: 10px; background: var(--toast); color: var(--on-toast); font: 500 var(--t-md) var(--sans); box-shadow: var(--shadow-md);
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast:not(:has(button)) { padding-right: 16px; }
.toast-text { padding: 11px 0; }
.toast.is-bad { background: var(--late); color: var(--on-color); }
.toast-x { display: grid; place-items: center; width: 32px; height: 32px; margin-left: 4px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: inherit; }
.toast-act { display: inline-flex; align-items: center; gap: 8px; height: 32px; margin-left: 10px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--toast-act); font: 500 var(--t-md) var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.toast-act:hover, .toast-x:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.toast.is-bad .toast-act { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.toast-key { min-width: 0; height: 18px; border-color: color-mix(in srgb, currentColor 35%, transparent); background: none; color: inherit; box-shadow: none; opacity: .8; font-size: 10px; }
.toast :focus-visible { outline-color: currentColor; outline-offset: 0; }
.toast-act { white-space: nowrap; }
@media (pointer: coarse) {
  .toast-key { display: none; }
}
/* Two actions (Open the file, then Undo): on a phone the text has the first lines and the actions sit under it, at the right. */
@media (max-width: 759px) {
  .toast.has-two { flex-wrap: wrap; justify-content: flex-end; padding-bottom: 6px; }
  .toast.has-two .toast-text { flex: 1 0 100%; padding-bottom: 0; }
}
@media (max-width: 759px) {
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  body[data-view="org"] .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .toast { transition: opacity .16s var(--ease), transform .16s var(--ease); }
}

/* ===== Radio, check, toggle, pills, choices ===== */
.check-native { position: absolute; opacity: 0; pointer-events: none; }
.check-native + i { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border: 1px solid var(--field-edge); border-radius: 50%; background: var(--field); }
.check-native:checked + i { border: 5px solid var(--accent); background: var(--on-color); }
.check-native:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 10px; font: 400 var(--t-md) var(--sans); cursor: pointer; }
.check .check-native + i { width: 16px; height: 16px; border-radius: var(--r-xs); color: transparent; }
.check .check-native:checked + i { border: 0; background: var(--accent); color: var(--on-color); }
.check .icon { stroke-width: 2.2; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.toggle { flex: none; width: 32px; height: 18px; padding: 2px; border: 0; border-radius: 9px; background: var(--field-edge); }
.toggle i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--raised); box-shadow: var(--shadow-xs); }
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"] i { transform: translateX(14px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.switch-row b { display: block; font: 500 var(--t-md) var(--sans); }
.switch-row span { color: var(--muted); font: 400 var(--t-sm) var(--sans); }
.switch-row + p { margin-top: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--raised); color: var(--ink); font: 400 var(--t-md) var(--sans); white-space: nowrap; }
.pill:hover { background: color-mix(in srgb, var(--ink) 4%, var(--raised)); }
.pill[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 500; }
.pill > .icon { display: none; color: var(--accent); stroke-width: 2; }
.pill[aria-checked="true"] > .icon { display: block; }
.pills-wide .pill { flex: 1 1 auto; justify-content: center; }
.pills-people .pill { height: auto; min-height: 32px; padding: 4px 12px 4px 6px; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.pills-with { display: flex; flex-wrap: wrap; gap: 8px; }
.pills-with .date-pill { width: auto; height: 32px; padding: 0 12px; border-color: var(--edge); }
.pills-with .date-pill .icon { display: none; }
/* The owner: a box for each founder, with the mark and the name. */
.own { display: flex; flex-wrap: wrap; gap: 8px; }
.own-box { display: grid; grid-auto-flow: column; place-items: center; gap: 8px; height: 40px; padding: 0 12px 0 8px; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--raised); }
.own-box[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.own-name { display: inline; color: var(--ink); font: 500 var(--t-md) var(--sans); }
.choices { margin: 12px -12px 0; }
.choice { border-radius: var(--r-md); }
.choice.is-on { background: var(--selected); }
.choice-head { display: grid; grid-template-columns: 30px 128px minmax(0, 1fr); align-items: center; min-height: 44px; padding: 0 12px; cursor: pointer; }
.choice-head b { font: 500 var(--t-md) var(--sans); }
.choice-head span { color: var(--muted); font: 400 var(--t-sm) var(--sans); }
.choice-more { padding: 6px 12px 16px 42px; }
.choice-more .label { margin-bottom: 8px; }
.choice-more .label.gap { margin-top: 18px; }
.choices-sheet .choice-head { grid-template-columns: 30px minmax(0, 1fr); row-gap: 2px; padding: 12px; align-items: start; }
.choices-sheet .choice-head i { margin-top: 2px; }
.choices-sheet .choice-head b { font-size: 15px; }
.choices-sheet .choice-head span { grid-column: 2; }
.choices-sheet .choice-more .check { margin-top: 12px; }
@media (max-width: 759px) {
  .own-box { height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .toggle, .toggle i { transition: background-color .12s var(--ease), transform .16s var(--ease); }
}

/* ===== Fields ===== */
/* A field: the label above (500 13/18), 6px, the control, a hint below (12/16). In a form the controls are 40px. */
.field { display: grid; gap: 6px; margin-top: 16px; }
.field > .label, .label-row { display: flex; align-items: center; justify-content: space-between; }
.field > .label, .label-row > .label { color: var(--ink-2); }
.field .input { height: 40px; }
.field textarea.input { height: auto; }
.label-row .link { font: 500 var(--t-sm) var(--sans); }
.field-pair.first .field, .sheet-block + .field { margin-top: 20px; }
.hint { color: var(--muted); font: 400 var(--t-xs) var(--sans); }
.hint-side { align-self: center; margin-top: 30px; }
.step-row + .check { margin-top: 14px; }
.select-wrap { position: relative; display: block; }
.select { appearance: none; padding-right: 36px; cursor: pointer; }
.select-wrap .icon { position: absolute; top: calc(50% - 8px); right: 12px; color: var(--muted); pointer-events: none; }
.date { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.date .icon { color: var(--muted); }
.date:focus-within { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.date-native { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; cursor: pointer; }
.input.mono { font: 400 var(--t-sm) var(--mono); }
/* "What is the next step?": the step on its own line, then the date and the owner. */
.step-3 { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
.step-3 > :first-child { grid-column: 1 / -1; }
/* A field with a list of names (the datalist of Organization) shows no arrow of the browser. */
.input[list]::-webkit-calendar-picker-indicator { display: none !important; }
.stepblock .check { margin-top: 18px; }
.stepblock .check b { font-weight: 500; }
.sheet-hint { margin-top: 6px; color: var(--muted); font: 400 var(--t-sm) var(--sans); }
.sheet-info { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font: 400 var(--t-xs) var(--sans); }
.docrow { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: var(--r-md); background: var(--sunken); color: var(--muted); }
.docrow-name { flex: 1; min-width: 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.docrow .link { font: 500 var(--t-sm) var(--sans); }

/* ===== The frame: the sidebar (ws.css), the phone bar and tabs, the banner ===== */
/* The sidebar is .ws-side of ws.css, drawn by core.js (showMain, renderTop) with the places of the tools' sidebar. Below
   are only the parts the tools do not have: the founder at the foot, the counts on the rail, and the phone. */
.skip { position: absolute; top: 8px; left: 8px; z-index: 70; padding: 8px 12px; border-radius: var(--r-md); background: var(--brand); color: var(--on-brand); font: 500 var(--t-md) var(--sans); text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }
.main { min-height: 100dvh; }
.main:focus { outline: none; }
.ws-side .ws-item { cursor: pointer; }
/* The founder: the mark and the name, a row of the sidebar. Its menu opens above it. */
.side-crm .ws-side-foot > .menu-wrap { display: flex; }
.founder { width: 100%; border: 0; background: none; text-align: left; }
.founder .founder-name { color: var(--ink); font-weight: 500; }
.founder > .ws-ic { color: var(--muted); }
.founder[aria-expanded="true"] { background: var(--selected); }
.ws-item .av { position: static; flex: none; width: 22px; height: 22px; overflow: visible; clip-path: none; margin-left: -3px; font-size: 11px; }
.phonebar, .phone-tabs { display: none; }
/* The strip below the top of the page: offline, a note that waits, do not contact. A 3px bar in the color of the state. */
.banner { position: sticky; top: 0; z-index: 9; border-bottom: 1px solid var(--line); background: var(--raised); box-shadow: inset 3px 0 0 var(--caution); }
.banner-in { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px var(--pad); font: 400 var(--t-md) var(--sans); }
.banner-in .icon { color: var(--caution); }
.banner-in .text-btn { margin-left: auto; }
.banner-in .link { margin-left: 4px; font-weight: 500; }
.banner-in b { font-weight: 500; }
.banner-bad { box-shadow: inset 3px 0 0 var(--late); }
.banner-bad .icon { color: var(--late); }
.banner-info { box-shadow: inset 3px 0 0 var(--accent); }
.banner-info .icon { color: var(--accent); }
.banner-caution { box-shadow: inset 3px 0 0 var(--caution); }
@media (min-width: 760px) {
  .main, .banner { margin-left: var(--side-w); }
}
/* The rail of icons (760px to 1199px): the founder is the mark alone; Next steps shows a dot when a step is late. */
@media (min-width: 760px) and (max-width: 1199px) {
  .side-crm .ws-side-foot > * { justify-self: stretch; }
  .founder > .ws-ic { display: none; }
  .ws-item .av { margin: 0; }
  .ws-item .ws-num.is-accent { position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; overflow: hidden; clip-path: none; border-radius: 50%; background: var(--accent); color: transparent; font-size: 0; box-shadow: 0 0 0 2px var(--side-bg); }
}
/* The phone: a light bar at the top (the lockup and the founder) and four tabs at the bottom (design 8.3). */
@media (max-width: 759px) {
  .side-crm { display: none; }
  .phonebar { display: flex; padding: 0 6px 0 16px; padding-top: env(safe-area-inset-top); height: calc(52px + env(safe-area-inset-top)); }
  .phonebar-gap { flex: 1; }
  .phonebar .menu-wrap { display: flex; }
  .founder-phone { display: inline-grid; }
  .banner { top: calc(52px + env(safe-area-inset-top)); }
  body[data-view="org"] .phonebar { display: none; }
  body[data-view="org"] .banner { top: 0; }
  .main { min-height: calc(100dvh - 52px); overflow-x: clip; }
  .phone-tabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 16; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: color-mix(in srgb, var(--ground) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
  .phone-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; padding: 6px 0 4px; border: 0; border-radius: var(--r-md); background: none;
    color: var(--muted); font: 500 11px/14px var(--sans); text-decoration: none; }
  .phone-tab[aria-current] { color: var(--ink); }
  .phone-tab[aria-current] .ws-ic { color: var(--accent); }
  .phone-tab:focus-visible { outline-offset: -2px; }
  .phone-num { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; padding: 1px 4px; border-radius: 8px; background: var(--ink-2); color: var(--raised); font: 600 10px/14px var(--sans); font-style: normal; text-align: center; }
  .phone-num.is-late { background: var(--accent); color: var(--on-color); }
  body[data-view="org"] .phone-tabs { display: none; }
}
@media print {
  .side-crm, .phonebar, .phone-tabs, .banner, .toast, .floats, .skip { display: none !important; }
  .main { margin: 0; }
}

/* ===== A page: the title, one line under it, then the content ===== */
.page { display: flex; flex-direction: column; min-height: 100dvh; padding: 28px var(--pad) 56px; }
.page-board { padding-bottom: 0; }
/* The head: the title (28/34) and its one line (15/22), and at the right the controls, then the one primary action,
   on the line of the title. */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.page-head-text { min-width: 0; }
.title { font: 700 var(--type-h1) var(--sans); letter-spacing: -.02em; overflow-wrap: anywhere; }
.lede { margin-top: 4px; color: var(--muted); font: 400 15px/22px var(--sans); }
.head-right { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; min-height: 34px; }
.head-actions { display: flex; align-items: center; gap: 8px 16px; }
.seg-row { margin-top: 24px; }
.seg .num { margin-left: 2px; }
/* Page tabs: 14px words on a hairline, the current one with a 2px accent line. */
.ptabs { display: flex; gap: 24px; margin-top: 24px; border-bottom: 1px solid var(--line); }
.ptab:focus-visible { border-radius: 4px 4px 0 0; outline-offset: -2px; }
.ptab { display: inline-flex; align-items: center; gap: 6px; padding: 0 0 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font: 400 var(--t-md) var(--sans); text-decoration: none; white-space: nowrap; }
.ptab:hover { color: var(--ink); }
.ptab[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 500; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; margin-top: 28px; }
.cols-top { margin-top: 28px; }
.cols-side, .stack { display: grid; gap: 16px; align-content: start; }
.card.pad { padding: 20px; }
/* The title of a card: 600 16/22. */
.card > .label:first-child, .card > .card-top:first-child > .label:first-child, .card > .label-row:first-child > .label:first-child { color: var(--ink); font: 600 var(--t-h3) var(--sans); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-top .link { font: 500 var(--t-sm) var(--sans); }
.card-note { margin-top: 16px; padding-top: 0; color: var(--muted); font: 400 var(--t-sm) var(--sans); }
.lines { margin-top: 10px; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font: 400 var(--t-md) var(--sans); }
.lines .line:last-child { border-bottom: 0; padding-bottom: 0; }
.lines + .card-note { margin-top: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.lines:has(+ .card-note) .line:last-child { padding-bottom: 12px; }
.line b { display: block; font: 500 var(--t-md) var(--sans); }
.line .sub { margin-top: 2px; }
.line-c > div, .line-renew > div:first-child { flex: 1; min-width: 0; }
.line .link { font-weight: 500; }
.line-date .label { flex: 0 0 74px; font: 400 var(--t-xs) var(--sans); font-variant-numeric: tabular-nums; }
.line-date > span:nth-child(2) { flex: 1; }
.line-plain { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 10px; font: 400 var(--t-md) var(--sans); }
.line-plain .link { font-weight: 500; white-space: nowrap; }
.line-count { justify-content: space-between; }
.line-check { display: flex; align-items: baseline; gap: 10px; }
.line-check .icon { flex: none; align-self: center; color: var(--good); }
.line-check.is-warn { color: var(--caution); }
.line-check.is-warn .icon { color: var(--caution); }
.line-q { display: grid; gap: 6px; }
.line-q .line-check { font-size: 13px; line-height: 18px; color: var(--muted); }
.line-q .line-check.is-warn { color: var(--caution); }
.line-version { gap: 28px; }
.line-version .chip { margin-left: auto; }
.line-renew .cell-end { display: grid; gap: 4px; }
.cell-end { text-align: right; justify-self: end; }
.figure-l { margin-top: 10px; font: 600 28px/34px var(--sans); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.figure-l span { color: var(--muted); font: 400 var(--t-md) var(--sans); }
.figure-m { margin-top: 6px; font: 600 var(--t-h2) var(--sans); font-variant-numeric: tabular-nums; }
.meter { height: 4px; margin-top: 12px; border-radius: 2px; background: var(--line); }
.meter i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
/* One empty state (core.js emptyState): a 40px tint circle with a 20px icon, a title, one sentence, one action. */
.empty { display: grid; justify-items: center; gap: 0; max-width: 420px; margin: 48px auto; padding: 0 16px; text-align: center; }
.empty-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--ink-2); }
.empty-title { margin-top: 14px; font: 600 var(--t-h3) var(--sans); }
.empty-text { margin-top: 4px; color: var(--muted); font: 400 var(--t-body) var(--sans); }
.empty-action { margin-top: 16px; }
.card .empty { margin: 28px auto; }
/* An empty tab of a file is a card with the empty state; a link may sit by its one button (Price it in Pricing). */
.empty-card .empty-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; }
/* Two parts share this name: the row of links in a card, and a row of the phone page More. */
.more-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin-top: 16px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 400 var(--t-sm) var(--sans); text-align: left; text-decoration: none; }
.more-row .link { font-weight: 500; }
.state { max-width: 560px; padding-top: 72px; }
.state .actions { margin-top: 24px; }
/* The rows of the main column change their layout by its width, not by the window: see .srow and .rp-row. */
.cols-main { container-type: inline-size; }
@media (min-width: 1100px) and (max-width: 1439px) {
  .cols, .spam-cols { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
}
@media (max-width: 1099px) {
  .cols { display: block; }
  .cols-side { margin-top: 24px; }
}
@media (max-width: 759px) {
  .page { min-height: calc(100dvh - 52px); padding-top: 20px; padding-bottom: 104px; }
  .page-head { display: block; }
  .head-right { justify-content: flex-start; margin-top: 14px; min-height: 0; }
  .card.pad { padding: 16px; }
  .lede { font-size: 14px; line-height: 20px; }
  .seg-row { margin-top: 16px; }
  .filter-row { flex-wrap: wrap; }
  .filter-row > .seg { flex: 1 1 100%; }
  /* A row of tabs that is wider than the phone scrolls in place, to the edges of the screen. It must not widen the page. */
  .ptabs { gap: 20px; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); overflow-x: auto; scrollbar-width: none; }
  .ptabs::-webkit-scrollbar { display: none; }
  .ptab { flex: none; }
  /* A strip that scrolls (tabs, filters, the stage chips, the parts of Settings) fades at each edge with more past it:
     core.js sets more-left and more-right. The mask only fades; its color is not shown. */
  .more-right { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - 32px), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - 32px), transparent); }
  .more-left { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) 32px); mask-image: linear-gradient(to right, transparent, var(--ink) 32px); }
  .more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) 32px, var(--ink) calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) 32px, var(--ink) calc(100% - 32px), transparent); }
}

/* ===== A sheet from the right, and a dialog ===== */
/* The layer: a scrim, then the sheet (min(560px, 100vw), a head that stays with the title and Close, a body that
   scrolls, a foot that stays with the actions, primary last at the right) or the dialog (14px corners). */
.layer { position: fixed; inset: 0; z-index: 40; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(560px, 100vw); border-left: 1px solid var(--line); background: var(--raised); box-shadow: var(--shadow-lg); transform: translateX(100%); }
.layer.is-open .scrim { opacity: 1; }
.layer.is-open .sheet { transform: none; }
.sheet > * { min-width: 0; }
.sheet-head { display: flex; flex: none; align-items: flex-start; gap: 12px; padding: 18px 16px 16px 24px; border-bottom: 1px solid var(--line); }
.sheet-heading { flex: 1; min-width: 0; padding-top: 2px; }
.sheet-kick { margin-bottom: 4px; color: var(--muted); font: 500 var(--t-xs) var(--sans); }
.sheet-title { font: 600 18px/24px var(--sans); letter-spacing: -.01em; overflow-wrap: anywhere; }
.sheet-who { margin-top: 4px; color: var(--muted); font: 400 var(--t-sm) var(--sans); overflow-wrap: anywhere; }
.sheet-who:empty { display: none; }
.sheet-close { flex: none; margin-top: -2px; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 28px; }
.sheet-mail { margin-top: 12px; font: 400 var(--t-md) var(--sans); }
.sheet-gap { margin-top: 24px; }
.sheet-gap + * { margin-top: 10px; }
.sheet-gap-s { margin-top: 24px; }
.sheet-block { margin-top: 20px; }
.pair { display: grid; grid-template-columns: 200px minmax(0, 1fr); margin-top: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pair dd { margin-top: 4px; font: 400 var(--t-md) var(--sans); overflow-wrap: anywhere; }
.sheet-h { margin-top: 28px; font: 600 var(--t-h3) var(--sans); }
.sheet-why { margin-top: 20px; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.option { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--raised); color: var(--ink); font: 500 var(--t-md) var(--sans); text-align: left; }
.option:hover { background: color-mix(in srgb, var(--ink) 3%, var(--raised)); }
.option > span:not(.av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option .icon { color: var(--accent); stroke-width: 2; visibility: hidden; }
.option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option[aria-checked="true"] .icon { visibility: visible; }
.step-row { display: grid; grid-template-columns: minmax(0, 1fr) 172px; gap: 12px; align-items: start; margin-top: 0; }
.sheet .options + .step-row { margin-top: 4px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.sheet-form .sheet-h { margin-top: 28px; }
.form-error { min-height: 18px; margin-top: 12px; color: var(--late); font: 500 var(--t-sm) var(--sans); }
.form-error:empty { min-height: 0; margin-top: 0; }
.match { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font: 400 var(--t-sm) var(--sans); }
.match .link { font-weight: 500; }
.field + .match { margin-top: 8px; }
.cbox { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunken); }
.cbox > div { flex: 1; display: grid; gap: 2px; }
.cbox b { font: 500 var(--t-md) var(--sans); }
.cbox > div span { color: var(--muted); font: 400 var(--t-sm) var(--sans); }
.cbox .link { font: 500 var(--t-sm) var(--sans); }
.sheet-foot { display: flex; flex: none; align-items: center; gap: 12px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--raised); }
.foot-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.foot-actions .actions { flex-wrap: nowrap; gap: 8px; }
.foot-note { color: var(--muted); font: 400 var(--t-xs) var(--sans); }
.sheet-foot .text-btn, .dialog-foot .text-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: var(--r-md); color: var(--ink-2); }
.sheet-foot .text-btn:hover, .dialog-foot .text-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.layer-dialog { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px; overflow-y: auto; }
.dialog { position: relative; width: 560px; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(6px) scale(.99); }
.layer.is-open .dialog { opacity: 1; transform: none; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.dialog-body { padding: 22px 24px 20px; }
.dialog-kick { margin: 0 40px 4px 0; color: var(--muted); font: 500 var(--t-xs) var(--sans); }
.dialog-title { margin-right: 40px; font: 600 18px/24px var(--sans); letter-spacing: -.01em; }
.dialog-sub { margin-top: 6px; color: var(--muted); font: 400 var(--t-body) var(--sans); }
.dialog-sub b { color: var(--ink); font-weight: 500; }
.dialog-line { margin-top: 10px; font: 400 var(--t-body) var(--sans); }
.dialog-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 24px 16px; border-top: 1px solid var(--line); }
.dialog-foot .foot-note { max-width: 260px; }
/* "Discard what you typed?": over the sheet, before a sheet with typed text closes. */
.discard { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--scrim) 60%, transparent); }
.layer-sheet .discard { left: auto; width: min(560px, 100vw); }
.discard-in { width: min(380px, 100%); padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); box-shadow: var(--shadow-lg); }
.discard-title { font: 600 var(--t-h3) var(--sans); }
.discard-sub { margin-top: 4px; color: var(--muted); font: 400 var(--t-body) var(--sans); }
.discard-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
/* Join: the two records side by side */
.twins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.twin { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 16px; border-radius: var(--r-lg); background: var(--sunken); font: 400 var(--t-md) var(--sans); color: var(--muted); overflow-wrap: anywhere; }
.twin b { margin: 6px 0 2px; color: var(--ink); font: 600 var(--t-h3) var(--sans); }
.twin .tag { margin-top: 6px; }
.twins-why { margin-top: 16px; text-align: center; }
/* A save that failed: a strip in the foot of the body, with the words kept (design 9.8). */
.form-error.is-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px -24px -28px; padding: 12px 24px; border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--late); color: var(--ink); font-weight: 400; }
.form-error.is-strip span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-error.is-strip .icon { color: var(--late); }
.form-error.is-strip b { font-weight: 500; }
.form-error.is-strip .text-btn { color: var(--ink); font-weight: 500; white-space: nowrap; }
/* The other founder changed it (design 9.3): yours and theirs side by side. */
.clash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.clash-box { position: relative; display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--edge); border-radius: var(--r-lg); background: var(--raised); color: var(--ink); text-align: left; cursor: pointer; }
.clash-box[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.clash-box i { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border: 1px solid var(--field-edge); border-radius: 50%; }
.clash-box[aria-checked="true"] i { border: 5px solid var(--accent); background: var(--on-color); }
.clash-box b { margin-top: 6px; font: 600 var(--t-h3) var(--sans); }
.clash-who { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
/* The phone: a sheet comes up from the bottom; the step and its date one below the other; the foot one short row. */
@media (max-width: 759px) {
  .sheet { top: auto; max-height: 94dvh; width: 100%; border-left: 0; border-radius: 16px 16px 0 0; transform: translateY(100%); }
  .sheet-head { padding: 14px 8px 12px 16px; }
  .sheet-close { width: 44px; height: 44px; margin: -8px 0 -8px; }
  .sheet-body { overflow-x: hidden; padding: 4px 16px 24px; }
  .sheet-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .step-row, .field-pair { grid-template-columns: minmax(0, 1fr); }
  .sheet .step-3 { grid-template-columns: minmax(0, 1fr); }
  .sheet .pills { flex-wrap: wrap; }
  .foot-actions { flex: 1; flex-wrap: nowrap; }
  .foot-actions > .btn { flex: 1 1 auto; height: 44px; }
  .sheet-foot .foot-note { display: none; }
  .foot-note { flex: 1 1 100%; }
  /* A text button in a foot: a 44px tap target. */
  .sheet-foot .text-btn, .dialog-foot .text-btn { height: 44px; }
  .layer-dialog { padding: 12px; align-items: end; }
  .dialog-close { top: 8px; right: 8px; width: 44px; height: 44px; }
  .dialog-body { padding: 18px 16px 16px; }
  .dialog-foot { padding: 12px 16px 14px; }
  .dialog-foot .foot-note { max-width: none; }
  .twins { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .form-error.is-strip { margin: 20px -16px -24px; padding: 12px 16px; }
  .clash { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .scrim { transition: opacity .2s var(--ease); }
  .sheet { transition: transform .22s var(--ease); }
  .dialog { transition: opacity .16s var(--ease), transform .16s var(--ease); }
}

/* ===== The phone page More ===== */
.ph-only { display: none; }
.page-more { gap: 0; }
.more-me { display: flex; align-items: center; gap: 14px; }
.more-me b { display: block; font: 600 var(--t-h2) var(--sans); }
.more-rows { margin-top: 8px; border-top: 1px solid var(--line); }
.more-first { margin-top: 20px; }
.more-rows .more-row { margin-top: 0; }
.more-row > b { flex: 1; font: 500 var(--t-lg) var(--sans); }
.more-row > .icon { color: var(--faint); }
.more-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--tint); color: var(--ink-2); }
.more-row .num { font-size: 13px; }
/* "On hold" by Marketing: the same pill as in the sidebar (ws.css, .ws-item .ws-tag). */
.more-row .more-tag { flex: none; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font: 500 11px/14px var(--sans); }
.more-label { margin-top: 24px; color: var(--muted); font: 500 var(--t-xs) var(--sans); }
.more-label + .more-rows { margin-top: 6px; }
/* A group with no name follows the one before it after a gap, with one hairline, not two. */
.more-rows + .more-rows { margin-top: 20px; border-top: 0; }
.more-theme { display: grid; gap: 8px; margin-top: 24px; }
.more-theme .ws-theme button { height: 36px; }
.more-out { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; min-height: 44px; margin-top: 20px; padding: 0; border: 0; background: none; color: var(--late); font: 500 var(--t-lg) var(--sans); }
@media (max-width: 759px) {
  .ph-only { display: inline; }
  .ph-hide { display: none; }
  .kbd-only { display: none !important; }
}
@media (pointer: coarse) {
  .kbd-only { display: none !important; }
}

/* ===== Touch: the controls of every page head and tab row are 44px to a finger ===== */
@media (pointer: coarse) {
  .head-right .btn, .head-actions .btn { min-height: 44px; }
  /* A segment is 38px in its 44px track; its tap area reaches 44px without moving the layout. So does the logo link
     of the phone bar. */
  .seg button { position: relative; min-height: 38px; }
  .seg button::after { content: ""; position: absolute; inset: -3px 0; }
  .phonebar .ws-brand { position: relative; }
  .phonebar .ws-brand::after { content: ""; position: absolute; top: 50%; right: -4px; left: -4px; height: 44px; transform: translateY(-50%); }
  .ptab { padding-top: 12px; padding-bottom: 12px; }
  .ptabs { margin-top: 12px; }
}
