/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* Layout: a research assistant first (chat-style, like Claude or ChatGPT), with a left sidebar: Paper search, Dashboard (gated), then search history.
   Brand: Lime Sky (for now, not final). Ink #151515, paper #f8f9f6, sky #a4d7fd for bars and progress (--data), lime #c8f26b only on actions.
   The whole site wears the brand. A project's own colour (--pid) is only a small marker that says which project you are looking at:
   its dot or tile in pickers, switchers, tags and the chat picker. Nothing else is tinted by a project. */
:root {
  --ghost: #f8f9f6; --card: #ffffff; --side: #edefe8; --ink: #151515; --ink-2: #3b3d39; --muted: #686b64; --faint: #92958e;
  --line: #e4e7e0; --line-2: #eef0ea; --hover: #eef0ea; --focus: #151515;
  /* every box to write in: one soft line round it while you write, the same everywhere (asked 2026-11-13) */
  --box-on: color-mix(in srgb, var(--ink) 30%, var(--line));
  --brand: #151515; --brand-deep: #000000; --brand-soft: #eef6dc; --brand-on: #c8f26b;
  --green: #18794e; --green-bg: #e7f4ec; --blue: #2b6cb0; --blue-bg: #e3f2fe; --red: #b3373a; --red-bg: #fbecec;
  --amber: #94682c; --amber-bg: #fbf2e5; --violet: #2b6cb0; --violet-bg: #e3f2fe; --teal: #0b7f8f; --teal-bg: #e2f5f7;
  --grey-bg: #eef0ea; --btn: #c8f26b; --btn-fg: #151515; --on-accent: #ffffff; --overlay: rgba(21, 21, 21, 0.4);
  --dots: #e4e7e0; --bubble: #f1f3ee; --glass: rgba(248, 249, 246, 0.86); --toast-bg: #151515; --toast-fg: #f8f9f6;
  --peak: #eef6dc; --peak-fg: #151515; --peak-btn: #151515; --peak-btn-fg: #f8f9f6; --data: #a4d7fd;
  --pc: #151515; --pc-on: #ffffff; --pid: #151515; --pid-on: #ffffff;
  /* the leader's crown in a research's colour mark (picked 2026-11-09, Demo/leader-badge-options.html C): white on the
     light-theme colours, ink on the dark-theme ones. --crown follows the theme; a mark that keeps the light colour sets it */
  --crown-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0.45 24 24'%3E%3Cpath fill='%23ffffff' d='M11.56 3.27a.5.5 0 0 1 .88 0l2.95 5.6a1 1 0 0 0 1.52.3l4.27-3.67a.5.5 0 0 1 .8.52l-2.83 10.25a1 1 0 0 1-.96.73H5.81a1 1 0 0 1-.96-.73L2.02 6.02a.5.5 0 0 1 .8-.52l4.27 3.67a1 1 0 0 0 1.52-.3z'/%3E%3Crect x='5' y='19.5' width='14' height='2.4' rx='1.2' fill='%23ffffff'/%3E%3C/svg%3E");
  --crown-k: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0.45 24 24'%3E%3Cpath fill='%23151515' d='M11.56 3.27a.5.5 0 0 1 .88 0l2.95 5.6a1 1 0 0 0 1.52.3l4.27-3.67a.5.5 0 0 1 .8.52l-2.83 10.25a1 1 0 0 1-.96.73H5.81a1 1 0 0 1-.96-.73L2.02 6.02a.5.5 0 0 1 .8-.52l4.27 3.67a1 1 0 0 0 1.52-.3z'/%3E%3Crect x='5' y='19.5' width='14' height='2.4' rx='1.2' fill='%23151515'/%3E%3C/svg%3E");
  --crown: var(--crown-w);
  --pc-soft: #f3f8e6; --pc-soft2: #eaf4d2; --pc-line: #d7decd;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 18, 0.05);
  --shadow: 0 1px 2px rgba(20, 22, 18, 0.04), 0 8px 24px -10px rgba(20, 22, 18, 0.14);
  --shadow-lg: 0 30px 70px -24px rgba(20, 22, 18, 0.32);
  --font: 'Lexend', 'Lexend Fallback', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Lexend', 'Lexend Fallback', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ghost: #151515; --card: #1f201e; --side: #0d0d0d; --ink: #f8f9f6; --ink-2: #cfd2ca; --muted: #8f938a; --faint: #6f736b;
    --line: #2e302c; --line-2: #262825; --hover: #262825; --focus: #c8f26b;
    --brand: #c8f26b; --brand-deep: #d9f78f; --brand-soft: #263016; --brand-on: #151515;
    --green: #5fbf8c; --green-bg: #173326; --blue: #a4d7fd; --blue-bg: #15283a; --red: #ff8f8a; --red-bg: #3a1a22;
    --amber: #e3b35c; --amber-bg: #392d14; --violet: #a4d7fd; --violet-bg: #15283a; --teal: #5fd0de; --teal-bg: #12333a;
    --grey-bg: #262825; --btn: #c8f26b; --btn-fg: #151515; --on-accent: #151515; --overlay: rgba(0, 0, 0, 0.62);
    --dots: #2e302c; --bubble: #262825; --glass: rgba(21, 21, 21, 0.84); --toast-bg: #f8f9f6; --toast-fg: #151515;
    --peak: #222a15; --peak-fg: #f8f9f6; --peak-btn: #c8f26b; --peak-btn-fg: #151515; --data: #a4d7fd;
    --pc: #c8f26b; --pc-on: #151515; --pid: #c8f26b; --pid-on: #151515; --crown: var(--crown-k);
    --pc-soft: #23281a; --pc-soft2: #2b331c; --pc-line: #3a4030;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ghost: #151515; --card: #1f201e; --side: #0d0d0d; --ink: #f8f9f6; --ink-2: #cfd2ca; --muted: #8f938a; --faint: #6f736b;
  --line: #2e302c; --line-2: #262825; --hover: #262825; --focus: #c8f26b;
  --brand: #c8f26b; --brand-deep: #d9f78f; --brand-soft: #263016; --brand-on: #151515;
  --green: #5fbf8c; --green-bg: #173326; --blue: #a4d7fd; --blue-bg: #15283a; --red: #ff8f8a; --red-bg: #3a1a22;
  --amber: #e3b35c; --amber-bg: #392d14; --violet: #a4d7fd; --violet-bg: #15283a; --teal: #5fd0de; --teal-bg: #12333a;
  --grey-bg: #262825; --btn: #c8f26b; --btn-fg: #151515; --on-accent: #151515; --overlay: rgba(0, 0, 0, 0.62);
  --dots: #2e302c; --bubble: #262825; --glass: rgba(21, 21, 21, 0.84); --toast-bg: #f8f9f6; --toast-fg: #151515;
  --peak: #222a15; --peak-fg: #f8f9f6; --peak-btn: #c8f26b; --peak-btn-fg: #151515; --data: #a4d7fd;
  --pc: #c8f26b; --pc-on: #151515; --pid: #c8f26b; --pid-on: #151515; --crown: var(--crown-k);
  --pc-soft: #23281a; --pc-soft2: #2b331c; --pc-line: #3a4030;
  color-scheme: dark;
}

/* changing theme: nothing fades on its own clock (ui/theme.ts flip); the screen crossfades as one picture */
html.theme-flip, html.theme-flip *, html.theme-flip *::before, html.theme-flip *::after { transition: none !important; }
html[data-theme-flip]::view-transition-old(root), html[data-theme-flip]::view-transition-new(root) { animation-duration: 280ms; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
/* keep the scrollbar's space on every page, so a page that does not scroll (Chats) has the same width as one that does */
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--ghost); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 0.3s var(--ease); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.2; text-wrap: balance; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: 0.42; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--focus) 30%, transparent); }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico .df { fill: currentColor; stroke: none; opacity: 0.16; }
.num { font-variant-numeric: tabular-nums; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- small parts ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.stack-v { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); }
.h1 { font-size: 28px; font-weight: 700; }
.h3 { font-size: 16px; font-weight: 650; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.pad { padding: 20px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background 0.18s var(--ease), transform 0.12s var(--ease), box-shadow 0.18s var(--ease), color 0.18s; }
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn-dark { background: var(--btn); color: var(--btn-fg); }
.btn-dark:hover:not(:disabled) { background: color-mix(in srgb, var(--btn) 86%, var(--ghost)); }
.btn-pc { background: var(--pc); color: var(--pc-on); }
.btn-pc:hover:not(:disabled) { background: color-mix(in srgb, var(--pc) 88%, var(--ink)); }
.btn-line { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover:not(:disabled) { background: var(--hover); border-color: color-mix(in srgb, var(--line) 50%, var(--faint)); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); }
.btn-green { background: var(--btn); color: var(--btn-fg); }
.btn-green:hover:not(:disabled) { background: color-mix(in srgb, var(--btn) 88%, var(--ink)); }
.btn-red { background: var(--red-bg); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 22%, transparent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn .ico { transition: transform 0.2s var(--ease); }
.btn:hover .go-ico { transform: translateX(3px); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); position: relative; transition: background 0.15s, transform 0.12s; }
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(0.92); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--ink); border-radius: 6px; }
.link-btn:hover { color: var(--pc); }
.link-btn:hover .ico { transform: translateX(2px); }
.link-btn .ico { transition: transform 0.2s var(--ease); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; letter-spacing: 0.005em; }
.p-grey { background: var(--grey-bg); color: var(--ink-2); }
.p-blue { background: var(--blue-bg); color: var(--blue); }
.p-green { background: var(--green-bg); color: var(--green); }
.p-red { background: var(--red-bg); color: var(--red); }
.p-amber { background: var(--amber-bg); color: var(--amber); }
.p-violet { background: var(--violet-bg); color: var(--violet); }
.p-dark { background: var(--btn); color: var(--btn-fg); }
.p-pc { background: var(--pc-soft2); color: var(--pc); }
.ptag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ptag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pid); flex: 0 0 auto; }
button.ptag:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: var(--on-accent); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.badge.pc { background: var(--pc); color: var(--pc-on); }
.dot-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: var(--on-accent); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--ghost); }
.enter .dot-badge { animation: pop 0.4s var(--spring); }

.av { --c: #888; width: 32px; height: 32px; border-radius: 50%; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; letter-spacing: 0.01em; }
.av.me { background: var(--btn); color: var(--btn-fg); box-shadow: none; }
.av-sm { width: 26px; height: 26px; font-size: 9.5px; }
.av-lg { width: 44px; height: 44px; font-size: 14px; }
.av-xl { width: 56px; height: 56px; font-size: 17px; }
.avs { display: flex; padding-left: 6px; }
.avs .av { margin-left: -6px; outline: 2px solid var(--card); }
.avs .av-sm { margin-left: -3px; }
.pbox { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--pid-on); background: var(--pid); flex: 0 0 auto; letter-spacing: 0.01em; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }
.phead .pbox { background: var(--grey-bg); color: var(--ink); box-shadow: none; }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; font-weight: 500; color: var(--ink); transition: background 0.15s, border-color 0.15s, transform 0.12s; }
.chip:hover { background: var(--hover); }
.chip:active { transform: scale(0.96); }
.chip.on { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.chip .x { display: inline-flex; color: var(--muted); margin-right: -4px; border-radius: 50%; }
.chip .x:hover { color: var(--red); }
.chip .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--pid); }
.chip.pcs.on { background: var(--pc); border-color: var(--pc); color: var(--pc-on); }
.chip.pcs.on .cdot { background: var(--pc-on); }
.seg { display: inline-flex; background: var(--grey-bg); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s, color 0.15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; }
.seg button.on.yes { color: var(--green); } .seg button.on.no { color: var(--red); } .seg button.on.unc { color: var(--amber); }
.bar { height: 6px; border-radius: 999px; background: var(--grey-bg); overflow: hidden; display: block; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--data); transition: width 0.7s var(--ease); }
.empty-box { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ring-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--grey-bg); display: flex; align-items: center; justify-content: center; color: var(--ink-2); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 14px; font-weight: 550; }
.input { height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); padding: 0 12px; font-size: 15px; width: 100%; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: color-mix(in srgb, var(--line) 60%, var(--faint)); }
.input:focus { outline: none; border-color: var(--box-on); box-shadow: none; }
.input.bad { border-color: var(--red); animation: shake 0.35s; }
.err { color: var(--red); font-size: 13px; animation: rise 0.2s var(--ease); }
.hint { color: var(--muted); font-size: 13px; }
.pw { position: relative; }
.pw .icon-btn { position: absolute; right: 2px; top: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: 0 0 auto; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.linkbox { display: flex; gap: 8px; }
.linkbox .url { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; background: var(--grey-bg); font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- public pages ---------- */
.pub { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.015em; color: var(--ink); border-radius: 10px; }
/* the official logo: the lime Scholar drop on its own near-black tile, the same in every theme and palette */
.logo { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; position: relative; }
/* a drop host is the drop's own box; its canvas hangs over the edges so hops are never cut off */
.drop { position: relative; display: block; flex: 0 0 auto; aspect-ratio: 58 / 64; pointer-events: none; overflow: clip; }
.drop > .drop-cv { position: absolute; max-width: none; pointer-events: none; }
.drop > svg { display: block; }
/* the drop in flight from the empty screen to its seat; moved by transform only */
.drop-fly { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
/* a window over the page (Settings, opened from the top bar's plug while the drop was still flying in) is never under it */
html:has(.ov) .drop-fly { visibility: hidden; }
/* older answers keep the drop's column empty, so their text still lines up; the one drop sits only on the newest line */
.logo-gap { flex: 0 0 30px; }
.drop-fly > .drop-cv { position: absolute; max-width: none; }
/* while the drop bows toward the search box, a band of lime light (the colour of every action) passes once across
   the box's rim from left to right, like light sliding over glass, and is gone. The box never moves. Only the 2px
   rim lights up (::before), with a soft bloom that follows the band and nowhere else (::after, blurred). */
.ask-box::before, .ask-box::after {
  content: ''; position: absolute; inset: -1px; z-index: 3; border-radius: inherit; padding: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--btn) 55%, transparent) 30%,
    color-mix(in srgb, var(--btn) 72%, #3f6b00) 50%, color-mix(in srgb, var(--btn) 55%, transparent) 70%, transparent 100%) no-repeat;
  background-size: 34% 100%; background-position: -60% 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.ask-box::after { filter: blur(6px); }
/* an even, gentle glide (ease-in-out sine), so the band spends its whole life crossing the box, not rushing */
.ask-box.hint::before { animation: rimLight 1.7s cubic-bezier(0.37, 0, 0.63, 1); }
.ask-box.hint::after { animation: rimBloom 1.7s cubic-bezier(0.37, 0, 0.63, 1); }
@keyframes rimLight { 0% { opacity: 0; background-position: -45% 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; background-position: 145% 0; } }
@keyframes rimBloom { 0% { opacity: 0; background-position: -45% 0; } 12% { opacity: 0.55; } 85% { opacity: 0.55; } 100% { opacity: 0; background-position: 145% 0; } }
@media (prefers-reduced-motion: reduce) {
  .ask-box.hint::before { animation: rimStill 1.2s ease; background: color-mix(in srgb, var(--btn) 72%, #3f6b00); }
  .ask-box.hint::after { animation: none; }
  @keyframes rimStill { 30%, 70% { opacity: 1; } }
}
/* the tab the drop tried to pull glows once, so the visitor sees what it was showing them */
.nav-item.tab-hint { animation: tabHint 1.6s var(--ease); }
@keyframes tabHint { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 30%, 60% { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent); } }
/* the opening splash (MPSplash): a full-screen WebGL stage on the page's own ground */
.mps { position: fixed; inset: 0; z-index: 200; background: var(--ghost); cursor: pointer; }
.mps canvas { display: block; width: 100%; height: 100%; }
.mps.out { opacity: 0; transform: scale(1.04); pointer-events: none; transition: opacity 0.42s cubic-bezier(0.23, 1, 0.32, 1), transform 0.42s cubic-bezier(0.23, 1, 0.32, 1); }
.hero-drop { margin: 0 auto 18px; }
.auth-drop { margin: 0 auto -4px; }
.empty-drop { margin-bottom: 4px; }
/* Explore, coming soon: the drop at work in the middle of the page, a few words under it */
.soon { min-height: calc(100dvh - 60px - 92px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px 0 48px; }
.soon-drop { margin-bottom: 18px; }
.soon-tag { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; }
.soon h1 { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.soon p { font-size: 16px; color: var(--muted); max-width: 40ch; }
.soon-work { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.soon-work i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); animation: soonDot 1.4s var(--ease) infinite; }
.soon-work i:first-of-type { margin-left: 4px; }
.soon-work i:nth-of-type(2) { animation-delay: 0.18s; }
.soon-work i:nth-of-type(3) { animation-delay: 0.36s; }
@keyframes soonDot { 0%, 70%, 100% { opacity: 0.25; transform: none; } 35% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .soon-work i { animation: none; opacity: 0.6; } }
.sdot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--grey-bg); color: var(--muted); flex: 0 0 auto; transition: background 0.3s, color 0.3s; }
.sdot.done { background: var(--ink); color: var(--card); }
.sdot.cur { background: var(--pc); color: var(--pc-on); }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-block: 28px 40px; padding-left: max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); background-color: var(--ghost); background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 22px 22px; }
.auth-top { width: 100%; max-width: 1120px; display: flex; justify-content: space-between; align-items: center; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; margin-top: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; font-weight: 700; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-top: -8px; }
.auth-foot { margin-top: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.g-btn { height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; transition: background 0.15s, transform 0.12s; }
.g-btn:hover { background: var(--hover); }
.g-btn:active { transform: scale(0.98); }
.choice { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; width: 100%; transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.choice:hover { border-color: var(--faint); transform: translateY(-2px); box-shadow: var(--shadow); }
.choice .ci { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.choice b { display: block; font-size: 15px; }
.choice span { color: var(--muted); font-size: 13px; }
.choice .go-ico { margin-left: auto; color: var(--faint); transition: transform 0.2s var(--ease); }
.choice:hover .go-ico { transform: translateX(3px); color: var(--ink); }
.banner-preview { background: var(--amber-bg); color: var(--amber); padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; width: 100%; max-width: 440px; margin-top: 20px; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- app shell ---------- */
/* each page's box (shell/KeepAlive): no box of its own, so the page lays out as a child of main.content; a kept, hidden page
   gets display: none from React (Activity). Page-wide rules look inside .ka.on only. */
.ka { display: contents; }
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
/* the sidebar is one panel set apart by its darker tone, with no dividing lines (top bar and account row included) */
.side { position: sticky; top: 0; height: 100vh; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; background: var(--side); z-index: 30; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); font-size: 15px; width: 100%; border: 1px solid transparent; text-align: left; transition: background 0.15s, color 0.15s; position: relative; flex: 0 0 auto; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.on .ico { color: var(--brand); }
.side { --hover: color-mix(in srgb, var(--ink) 6%, var(--side)); }
.side .nav-item.on { background: var(--card); box-shadow: var(--shadow-sm); }
.nav-item .lock { color: var(--faint); }
.nav-sub { min-height: 36px; padding-left: 40px; font-size: 14px; }
.nav-sub.on { background: var(--hover); color: var(--ink); }
.nav-sub.on .ico { color: var(--ink); }
/* no dividing line: the history is set apart from the tabs by space only */
.side-rule { height: 0; margin: 10px 0 0; flex: 0 0 auto; }
.hist { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; margin: 0 -8px 0 -6px; padding: 0 0 8px 6px; scrollbar-gutter: stable; }
/* a slim rounded bar with no arrows, out of sight until the list is hovered or scrolled */
.hist::-webkit-scrollbar { width: 10px; }
.hist::-webkit-scrollbar-track, .hist::-webkit-scrollbar-corner { background: transparent; }
.hist::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.hist::-webkit-scrollbar-thumb { min-height: 40px; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; background-color: transparent; }
.hist:hover::-webkit-scrollbar-thumb, .hist.scrolling::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--ink) 16%, transparent); }
.hist::-webkit-scrollbar-thumb:hover, .hist::-webkit-scrollbar-thumb:active { background-color: color-mix(in srgb, var(--ink) 30%, transparent); }
@supports not selector(::-webkit-scrollbar) {
  .hist { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color 0.2s; }
  .hist:hover, .hist.scrolling { scrollbar-color: color-mix(in srgb, var(--ink) 18%, transparent) transparent; }
}
/* Recents: one quiet heading with a caret; folded, the list is gone and the caret points right */
.rec-tog { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; flex: 0 0 auto; margin: 14px 0 4px 4px; padding: 3px 6px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--faint); transition: color 0.15s; }
.rec-tog:hover { color: var(--ink-2); }
.rec-car { transition: transform 0.18s var(--ease); }
.rec-tog[aria-expanded="true"] .rec-car { transform: rotate(90deg); }
.hist.shut { display: none; }
.hist-all { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 36px; padding: 0 10px; margin-top: 2px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.hist-all:hover { background: var(--hover); color: var(--ink); }
/* on the History page, See all reads as the open page, the same way an open chat's row does */
.hist-all.on { background: var(--hover); color: var(--ink); }
/* rows fade out at the top and bottom edges when there is more to scroll */
.hist::before, .hist::after { content: ''; display: block; position: sticky; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.2s var(--ease); }
.hist::before { top: 0; height: 22px; margin-bottom: -22px; background: linear-gradient(var(--side), transparent); }
.hist::after { bottom: -8px; height: 40px; margin-top: -40px; background: linear-gradient(transparent, var(--side) 85%); }
.hist.fade-top::before, .hist.fade-end::after { opacity: 1; }
.hist-row { position: relative; }
.hist-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: 9px; font-size: 14px; color: var(--ink-2); text-align: left; transition: background 0.15s; }
.hist-item:hover { background: var(--hover); color: var(--ink); }
.hist-item.on { background: var(--hover); color: var(--ink); font-weight: 600; }
.hist-item .ht { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; flex: 0 0 auto; font-weight: 400; }
/* ••• on a row: hidden until the row is hovered, focused or its menu is open; it takes the time's place */
.hist-more { position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; border-radius: 7px; display: none; align-items: center; justify-content: center; color: var(--muted); }
.hist-more:hover, .hist-more[aria-expanded="true"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.hist-row:hover .hist-more, .hist-more:focus-visible, .hist-row.menu-on .hist-more { display: flex; }
.hist-row.menu-on .hist-item { background: var(--hover); color: var(--ink); }
.hist-row.menu-on time, .hist-row.menu-on .ht-draft, .hist-row:hover .ht-draft { visibility: hidden; }
.ht-pin { color: var(--faint); margin-right: -3px; transform: rotate(35deg); }
.ht-draft { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--brand-soft); padding: 1px 7px; border-radius: 6px; }
/* a popup is open: the page holds still and ignores the pointer, except for the popup itself */
/* no overflow: hidden on <html>: that hands body's overflow-x to body itself, which then scrolls on its own and
   throws the sticky sidebar and top bar out of place. Scrolling is stopped in script instead (wheel, touch, keys) */
html.pop-lock .app { pointer-events: none; }
html.pop-lock .app :is(.fmenu, .bell-pop, .um, .pdrop.open, .pop) { pointer-events: auto; }
/* the chat menu (Pin, Rename, Delete), fixed beside the button that opened it */
.cm-pop { position: fixed; z-index: 90; min-width: 176px; padding: 5px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; transform: scale(0.97); transition: opacity 0.14s var(--ease-out), transform 0.14s var(--ease-out); }
.cm-pop.in { opacity: 1; transform: none; }
.cm-it { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 14px; color: var(--ink-2); text-align: left; transition: background 0.12s, color 0.12s; }
.cm-it .ico { color: var(--muted); }
.cm-it:hover, .cm-it:focus-visible { background: var(--hover); color: var(--ink); outline: none; }
.cm-it.bad, .cm-it.bad .ico { color: var(--red); }
.cm-it.bad:hover, .cm-it.bad:focus-visible { background: var(--red-bg); }
/* Delete asks in place: the menu becomes the question, with the same buttons as Tasks and Team */
.cm-sure { width: 264px; max-width: calc(100vw - 16px); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.cm-sure b { font-size: 15px; }
.cm-sure .tk-when { overflow-wrap: anywhere; }
.cm-sure .tk-acts { margin-top: 10px; }
/* Rename in the same place: the name box, its error line (always there, so nothing moves), Cancel and Save */
.cm-name { width: 248px; } /* fits beside a Recents row's ••• in the sidebar, so it keeps the menu's own edge */
.cm-name form { display: flex; flex-direction: column; gap: 8px; }
.cm-name .tk-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.cm-in { width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 0; outline: 0; background: var(--side); color: var(--ink); font-size: 16px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 140ms ease-out, background-color 140ms ease-out; } /* 16px: no zoom on iPhone */
.cm-in:focus { background: var(--card); box-shadow: inset 0 0 0 1px var(--box-on); }
.cm-in.bad { box-shadow: inset 0 0 0 1.5px var(--red); }
.cm-err { min-height: 16px; margin-top: -4px; font-size: 12.5px; color: var(--red); }
@media (prefers-reduced-motion: reduce) { .cm-pop { transition: none; } }
/* the open chat's name in the top bar, with a caret for its menu */
.chat-name { display: inline-flex; align-items: center; gap: 6px; max-width: min(520px, 100%); min-width: 0; height: 34px; padding: 0 8px 0 10px; margin-left: -10px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink); transition: background 0.15s; }
.chat-name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-name:hover, .chat-name[aria-expanded="true"] { background: var(--hover); }
.chat-name .cn-car { color: var(--muted); flex: 0 0 auto; transition: transform 0.2s var(--ease-out); }
.chat-name[aria-expanded="true"] .cn-car { transform: rotate(180deg); }
.chat-name .cn-pin { color: var(--faint); transform: rotate(35deg); flex: 0 0 auto; }
/* the split header's name is the same button as the top bar's, same size and place, so nothing changes when papers open */
.ask-title { font: inherit; letter-spacing: normal; margin: 0; }
/* small confirm windows (Delete, Rename) and the Settings window */
.modal.small-m { max-width: 420px; }
.modal.small-m .modal-h { border-bottom: 0; padding-bottom: 4px; }
.modal.small-m .modal-b { padding-top: 6px; padding-bottom: 8px; }
.modal.small-m .modal-f { border-top: 0; padding-top: 8px; padding-bottom: 18px; }
.modal.set-m { max-width: 880px; height: min(620px, calc(100vh - 48px)); overflow: hidden; }
.stg { display: flex; flex-direction: column; height: 100%; }
.st-in { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.st-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; background: var(--side); }
.st-tab { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); text-align: left; transition: background 0.15s, color 0.15s; }
.st-tab .ico { color: var(--muted); }
.st-tab:hover { background: color-mix(in srgb, var(--ink) 6%, var(--side)); color: var(--ink); }
.st-tab.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.st-tab.on .ico { color: var(--ink); }
.st-body { overflow-y: auto; padding: 8px 28px 28px; scrollbar-width: thin; }
.st-h { font-size: 15px; font-weight: 650; margin: 22px 0 4px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--line-2); text-align: left; }
.st-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-l b { font-size: 14.5px; font-weight: 550; }
.st-l small { font-size: 13px; color: var(--muted); }
.st-r { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.st-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--grey-bg); }
.st-seg button { width: 34px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: background 0.15s, color 0.15s; }
.st-seg button:hover { color: var(--ink); }
.st-seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.st-sw { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--line); transition: background 0.2s var(--ease); }
.st-sw i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease-out); }
.st-sw.on { background: var(--ink); }
.st-sw.on i { transform: translateX(16px); }
.st-prof { display: flex; flex-direction: column; gap: 14px; padding: 10px 0 18px; border-bottom: 1px solid var(--line-2); }
.st-me { display: flex; align-items: center; gap: 14px; }
.st-me span { display: flex; flex-direction: column; line-height: 1.35; }
.st-me b { font-size: 16px; font-weight: 600; }
.st-me small { font-size: 13px; color: var(--muted); }
.st-proj { cursor: pointer; border-radius: 0; }
.st-proj:hover .st-pl b { text-decoration: underline; text-underline-offset: 3px; }
.st-pl { flex-direction: row; align-items: center; gap: 12px; }
.st-role { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .modal.set-m { height: calc(100dvh - 32px); }
  .st-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .st-nav { flex-direction: row; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .st-tab { flex: 0 0 auto; height: 36px; }
  .st-body { padding: 4px 18px 22px; }
}
.hist-row:hover time { visibility: hidden; }
.hist-guest { margin: 12px 4px 0; padding: 14px; border-radius: 12px; background: var(--ghost); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.hist-guest b { color: var(--ink); font-size: 14px; }
/* History page: a find box and New search on one row, then every search as a two-line row with its date and time */
.hp { max-width: 860px; margin: 0 auto; }
.hp-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.hp-find { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--faint); transition: border-color 0.15s, box-shadow 0.15s; }
.hp-find:focus-within { border-color: var(--box-on); color: var(--ink-2); }
.hp-find input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--ink); }
.hp-find input::placeholder { color: var(--faint); }
.hp-tools .btn { height: 44px; border-radius: 12px; }
.hp-list { display: flex; flex-direction: column; gap: 2px; }
.hp-row { position: relative; }
.hp-item { display: flex; align-items: center; gap: 20px; width: 100%; min-height: 66px; padding: 10px 16px; border-radius: 14px; text-align: left; transition: background 0.15s; }
.hp-item:hover { background: var(--card); }
.hp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hp-t b { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-t small { font-size: 13px; color: var(--muted); }
.hp-item time { flex: 0 0 auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hp-t b { display: flex; align-items: center; gap: 7px; }
.hp-t b > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-more { position: absolute; right: 10px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 9px; display: none; align-items: center; justify-content: center; color: var(--muted); }
.hp-more:hover, .hp-more[aria-expanded="true"] { color: var(--ink); background: var(--hover); }
.hp-row:hover .hp-more, .hp-more:focus-visible, .hp-row.menu-on .hp-more { display: flex; }
.hp-row.menu-on .hp-item { background: var(--card); }
.hp-row:hover time, .hp-row.menu-on time { visibility: hidden; }
@media (max-width: 900px) {
  .hp-tools .btn { width: 44px; padding: 0; font-size: 0; gap: 0; }
  .hp-item { gap: 4px; padding: 10px 12px; align-items: flex-start; flex-direction: column; }
  .hp-item time { font-size: 12.5px; color: var(--faint); }
  .hp-row:hover time { visibility: visible; }
  .hp-more { display: flex; top: 14px; translate: none; }
  .hp-t b { white-space: normal; padding-right: 36px; }
}
.side-guest { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.menu-btn { display: none; }
.scrim { display: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 0 12px; flex: 0 0 auto; }
.side .side-head .brand { padding: 4px 8px; min-width: 0; }
.side-toggle { width: 36px; height: 36px; border-radius: 9px; color: var(--muted); flex: 0 0 auto; }
.side-toggle:hover { color: var(--ink); }
.guest-mini { display: none; }
#tip { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--card); font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); opacity: 0; transform: translateX(-4px); transition: opacity 0.18s var(--ease), transform 0.18s var(--ease); }
#tip.show { opacity: 1; transform: none; }
.app { transition: grid-template-columns 0.28s var(--ease); }
/* closed sidebar: icons only, like Claude and ChatGPT on desktop */
@media (min-width: 901px) {
  /* the sidebar slides: its column shrinks to the icon strip and the labels fade, nothing jumps */
  .side { transition: padding 0.3s var(--ease); }
  .side .nav-item { padding-left: 12px; overflow: hidden; transition: background 0.15s, color 0.15s, padding 0.3s var(--ease); }
  .side .nav-item .grow, .side .nav-item .lock, .side .new-hint, .side .hist, .side .side-rule { transition: opacity 0.22s var(--ease); }
  .side .nav-sub { padding-left: 40px; }
  .side-head { gap: 0; }
  .side-head .brand { max-width: 220px; overflow: hidden; white-space: nowrap; transition: max-width 0.3s var(--ease), opacity 0.22s var(--ease), padding 0.3s var(--ease); }
  .side-toggle { margin-left: auto; }
  .app.mini { grid-template-columns: 68px minmax(0, 1fr); }
  .app.mini .side { padding-right: 16px; }
  .app.mini .side-head .brand { max-width: 0; opacity: 0; padding-left: 0; padding-right: 0; visibility: hidden; transition: max-width 0.3s var(--ease), opacity 0.22s var(--ease), padding 0.3s var(--ease), visibility 0s 0.3s; }
  .app.mini .nav-item .grow, .app.mini .nav-item .lock, .app.mini .new-hint, .app.mini .hist, .app.mini .side-rule, .app.mini .rec-tog { opacity: 0; pointer-events: none; }
  .side .rec-tog { transition: color 0.15s, opacity 0.22s var(--ease); }
  .side .side-extra { transition: opacity 0.22s var(--ease); }
  .app.mini .side-extra { opacity: 0; }
  .app.mini .hist { visibility: hidden; transition: opacity 0.22s var(--ease), visibility 0s 0.22s; }
  .app.mini .nav-sub { padding-left: 12px; }
  .app.mini .nav-item .badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--side); }
  .app.mini .side-user .nav-item { padding-left: 4px; }
  .side .um-car { transition: transform 0.2s var(--ease-out), color 0.15s, opacity 0.22s var(--ease); }
  .app.mini .um-car { opacity: 0; }
  .app.mini .side-guest .btn { display: none; }
  .app.mini .guest-mini { display: flex; }
}
.nav-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .pdot { width: 10px; height: 10px; border-radius: 4px; flex: 0 0 auto; background: var(--pid); transition: transform 0.2s var(--spring); }
.nav-item:hover .pdot { transform: scale(1.25); }
.nav-label { font-size: 13px; font-weight: 600; color: var(--faint); padding: 18px 10px 6px; }
.side-user { position: relative; margin-top: auto; padding-top: 10px; }
.side-user .um-btn { min-height: 44px; gap: 10px; padding-left: 8px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.side .side-user .um-btn.on { background: transparent; box-shadow: none; }
.side-user .um-btn:hover, .side-user.open .um-btn { background: var(--hover); }
.um-car { color: var(--faint); transition: transform 0.2s var(--ease-out), color 0.15s; }
.side-user.open .um-car { transform: rotate(180deg); color: var(--ink); }
/* the account menu rises from the row it belongs to */
.um { position: absolute; left: 0; right: 0; bottom: calc(100% - 4px); z-index: 40; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform-origin: 30% 100%; opacity: 0; visibility: hidden; transform: translateY(6px) scale(0.97); transition: opacity 0.16s var(--ease-out), transform 0.16s var(--ease-out), visibility 0s 0.16s; }
.side-user.open .um { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out); }
.um-mail { padding: 8px 10px 6px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-sep { height: 1px; margin: 5px 8px; background: var(--line-2); }
.um-who { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.um-who span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.um-who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-who small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-align: left; text-decoration: none; transition: background 0.12s, color 0.12s; }
.um-row:hover, .um-row:focus-visible { background: var(--hover); color: var(--ink); }
.um-row .ico { color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
/* margin-top: the bar stands under the app's status bar in the page's flow too; sticky alone only drew it lower, so it
   covered the first ~30px of the page (the first question in Paper search, 2026-11-21). 0 on the website. */
.top { position: sticky; top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); margin-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); z-index: 20; height: 60px; display: flex; align-items: center; gap: 6px; padding-left: max(32px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(24px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); z-index: 25; background: var(--ghost); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); flex: 1; min-width: 0; }
.crumbs button:hover { color: var(--ink); }
.crumbs .here { color: var(--ink); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 8px; }
.crumbs .here .pdot { width: 9px; height: 9px; border-radius: 3px; background: var(--pid); }
.top .phone-brand { display: none; }
.content { width: 100%; max-width: 1200px; margin: 0 auto; padding-block: 28px 64px; padding-left: max(32px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(32px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
.tabbar { display: none; }
.bell-pop { position: absolute; top: 56px; right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); width: min(400px, calc(100vw - 32px)); max-height: 72vh; overflow: auto; z-index: 40; padding: 8px; box-shadow: var(--shadow-lg); transform-origin: top right; animation: popIn 0.22s var(--ease); }
/* Notifications */
.bell-pop.nt-pop { width: min(420px, calc(100vw - 32px)); max-height: min(560px, 76vh); padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; animation: none; }
.bell-pop.nt-pop.in { animation: popIn 0.2s var(--ease-out); }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 14px 16px 2px 18px; }
.nt-head b { font-size: 16px; font-weight: 650; }
.nt-all { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.nt-all:hover { background: var(--hover); color: var(--ink); }
.nt-tabs { display: flex; gap: 2px; padding: 8px 14px 10px; border-bottom: 1px solid var(--line-2); }
.nt-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--muted); transition: background 0.15s, color 0.15s; }
.nt-tabs button:hover { color: var(--ink); }
.nt-tabs button.on { background: var(--grey-bg); color: var(--ink); font-weight: 600; }
.nt-tabs .num { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--on-accent); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nt-list { overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; scrollbar-width: thin; }
.nt-g { font-size: 12px; font-weight: 600; color: var(--faint); padding: 12px 10px 4px; }
.nt-row { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 28px 10px 10px; border-radius: 12px; text-align: left; transition: background 0.15s; }
.nt-row:hover { background: var(--hover); }
.nt-row.new { background: color-mix(in srgb, var(--brand-soft) 38%, transparent); }
.nt-row.new:hover { background: var(--brand-soft); }
.nt-av { position: relative; flex: 0 0 auto; }
.nt-av .av { width: 36px; height: 36px; font-size: 12px; }
.nt-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grey-bg); color: var(--muted); }
.nt-k { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--card); box-shadow: 0 0 0 2px var(--card); }
.nt-k.ok { background: var(--green); color: #fff; }
.nt-k.stuck { background: var(--red); color: #fff; }
.nt-k.inv { background: var(--blue); color: #fff; }
.nt-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nt-t { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.nt-t b { color: var(--ink); font-weight: 650; }
.nt-t em { font-style: normal; color: var(--ink); font-weight: 500; }
.nt-m { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.nt-m i { font-style: normal; color: var(--faint); }
.nt-p { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-p::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--pid); flex: 0 0 auto; }
.nt-dot { position: absolute; right: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--ink); }
.nt-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 24px 40px; text-align: center; font-size: 13.5px; color: var(--muted); }
.nt-empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.nt-empty-i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--ink); margin-bottom: 6px; }
.note { display: flex; gap: 12px; padding: 11px 10px; border-radius: 12px; width: 100%; text-align: left; font-size: 14px; transition: background 0.15s; }
.note:hover { background: var(--hover); }
.note .nd { width: 8px; height: 8px; border-radius: 50%; background: var(--focus); margin-top: 8px; flex: 0 0 auto; }
.note.read .nd { background: transparent; }
.note .nt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; font-weight: 750; margin-top: 6px; }
.page-head p { color: var(--muted); margin-top: 6px; }

/* home */
.invite-banner { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--pc-soft); border: 1px solid var(--pc-line); margin-bottom: 20px; flex-wrap: wrap; }
.invite-banner .grow { flex: 1 1 260px; min-width: 0; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
/* dashboard (the Projector/ClickUp look of the research plan): one dark Start here card is the peak, two tinted
   number cards beside it, projects as big-% cards or a grouped list, then three short lists of equal weight */
.dh { --dh-ease: cubic-bezier(0.23, 1, 0.32, 1); }
.dh .btn-dark, .dh .btn-pc, .dh .seg button.on { box-shadow: none; }
.dh .dact-m, .dh .dc-sub, .dh .wl-sub { color: var(--muted); }
.dh .seg button, .dh .invite-banner .muted, .hot .dh-pc-t small { color: var(--ink-2); }
.dh-week-sum { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-top: 12px; }
.dh-week-sum b { color: var(--ink); font-weight: 650; }
.dh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dh-head h1 { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.dh-find { margin-top: 10px; font-size: 16px; color: var(--ink-2); max-width: 64ch; }
.dh-find b { color: var(--ink); font-weight: 650; }
.dh .invite-banner { margin-bottom: 14px; }
.dh-band { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.dh-card { border-radius: 26px; padding: 22px 22px 18px; display: flex; flex-direction: column; min-width: 0; }
.dh-ct { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.dh-next { background: var(--peak); color: var(--peak-fg); border: 1px solid color-mix(in srgb, var(--btn) 45%, var(--line)); border-radius: 22px; }
.dh-next .dh-ct { color: color-mix(in srgb, var(--peak-fg) 72%, var(--peak)); }
.dh-next-t { font-family: var(--display); font-size: 32px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.12; margin-top: 18px; text-wrap: balance; }
.dh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; font-size: 13.5px; color: color-mix(in srgb, var(--peak-fg) 72%, var(--peak)); }
.dh-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--peak-fg); }
.dh-tag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pid); flex: none; }
.dh-go { align-self: flex-start; margin-top: 20px; height: 44px; padding: 0 18px 0 20px; border-radius: 999px; background: var(--peak-btn); color: var(--peak-btn-fg); font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: transform 160ms var(--dh-ease); }
.dh-go:active { transform: scale(0.97); }
.dh-go .go-ico { transition: transform 200ms var(--dh-ease); }
.dh-then { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; }
.dh-then-h { font-size: 12.5px; color: color-mix(in srgb, var(--peak-fg) 66%, var(--peak)); padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--peak-fg) 16%, var(--peak)); margin-top: 6px; }
.dh-then-r { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; text-align: left; color: var(--peak-fg); font-size: 14px; font-weight: 500; }
.dh-then-r small { font-size: 12.5px; color: color-mix(in srgb, var(--peak-fg) 66%, var(--peak)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.dh-big { font-family: var(--display); font-size: 52px; font-weight: 600; letter-spacing: -0.055em; line-height: 0.95; margin-top: 16px; }
.dh-lbl { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.dh-lbl b { color: var(--ink); font-weight: 650; }
.dh-need { background: var(--card); }
.dh-need .dh-big { color: var(--ink); }
.dh-need.calm { background: var(--card); border: 1px solid var(--line); }
.dh-need.calm .dh-big { color: var(--ink); }
.dh-rows { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; }
.dh-rows button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink); text-align: left; }
.dh-rows button:disabled { opacity: 1; cursor: default; color: var(--ink-2); }
.dh-rows button b { font-weight: 700; }
.dh-week { background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.dh-week .dh-big { color: var(--ink); }
.dh-wk { height: 74px; margin-top: auto; padding-top: 14px; gap: 6px; }
.dh-wk .wk-b { max-width: none; border-radius: 6px; }
.dh-wk .wk-b.zero { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.dh-wk .wk-d small { color: var(--muted); }
.dh-sec { margin-top: 44px; display: flex; flex-direction: column; gap: 16px; }
.dh-sec-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dh-sec-h h2 { font-family: var(--display); font-size: 28px; font-weight: 650; letter-spacing: -0.025em; }
.dh-sec-h sup { font-size: 13px; color: var(--muted); font-weight: 600; align-self: flex-start; margin-top: 2px; }
.dh-sec-h .r { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard.dh-pc { padding: 24px; gap: 0; border-radius: 22px; box-shadow: none; overflow: visible; background: var(--card); border: 1px solid var(--line); }
.pcard.dh-pc:hover { border-color: color-mix(in srgb, var(--line) 40%, var(--faint)); }
.dh-pc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; min-width: 0; }
.dh-pc-n { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.dh-pc-n::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pid); flex: none; transform: translateY(-1px); }
.dh-pct { font-size: 17px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.dh-bar { display: block; height: 6px; margin-top: 20px; border-radius: 6px; background: var(--grey-bg); overflow: hidden; }
.dh-bar i { display: block; height: 100%; border-radius: 4px; background: var(--data); transition: width 0.6s var(--ease); }
.dh-pc-step { margin-top: 12px; font-size: 14px; color: var(--muted); }
.dh-pc-ft { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 24px; font-size: 14px; }
.dh-due { font-weight: 600; color: var(--ink); white-space: nowrap; }
.dh-due.late { color: var(--red); }
/* greeting centred on top, then one slim tool row, then the cards */
.dh .dh-head { display: block; text-align: center; margin: 4px 0 28px; }
.dh .dh-head h1 { font-size: 34px; font-weight: 800; }
.dh-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
/* invites: a top-bar button with a count, opening a small list like the bell */
.inv-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 8px 0 12px; margin-right: 4px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-size: 13.5px; font-weight: 600; transition: background 0.15s; }
.inv-btn:hover, .inv-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--btn) 55%, var(--card)); }
/* New search: the one lime-soft button in the bar, so starting over is easy to find */
.new-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; margin-left: 2px; border-radius: 999px; background: var(--btn); color: var(--btn-fg); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background 0.15s; }
.new-btn:hover { background: color-mix(in srgb, var(--btn) 86%, var(--ink)); }
.new-btn .ico { stroke-width: 2.2; }
@media (max-width: 900px) { .new-btn span { display: none; } .new-btn { width: 36px; padding: 0; justify-content: center; } }
/* papers closed: one plain button in the top bar brings them back, with how many there are */
.papers-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 8px 0 12px; margin-right: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; font-weight: 600; transition: background 0.15s, border-color 0.15s; }
.papers-btn:hover { background: var(--hover); border-color: color-mix(in srgb, var(--line) 55%, var(--faint)); }
.papers-btn:not(:has(.papers-n)) { padding-right: 12px; }
.papers-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .papers-btn span:not(.papers-n) { display: none; } .papers-btn { padding: 0 8px 0 10px; } }
.inv-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--ghost); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.inv-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.inv-row:hover { background: var(--hover); }
.inv-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.inv-row .grow b { font-size: 14.5px; font-weight: 600; }
.inv-row .grow small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .inv-btn span:not(.inv-n) { display: none; } .inv-btn { padding: 0 8px 0 10px; } .dh .dh-head h1 { font-size: 28px; } .dh-tools { flex-wrap: nowrap; } .dh-tools .btn { height: 36px; padding: 0 12px; font-size: 13.5px; gap: 4px; flex: none; } }
.dh-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.dh-pill.late { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.hot .dh-pill { border-color: transparent; }
.dh-first { margin-top: 0; }
.dh-inv { margin-top: 28px; }
.dh-inv .invite-banner { margin-bottom: 0; }
.dh-inv + .dh-band, .dh-first + .dh-band { margin-top: 28px; }
.dh-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 44px; align-items: stretch; }
.dh-box { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 12px; display: flex; flex-direction: column; min-width: 0; }
.dh-box-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dh-bh { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.dl-row { display: flex; align-items: center; gap: 12px; width: calc(100% + 16px); margin: 0 -8px; padding: 10px 8px; border-radius: 10px; text-align: left; transition: background 0.15s; }
button.dl-row:hover { background: var(--hover); }
.dl-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-row .grow > b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-t { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.dl-t b { color: var(--ink); font-weight: 600; }
.dl-sub { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row.pcs .dl-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pid); flex: none; }
.dl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pid); flex: none; }
.dl-one { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-one b { font-weight: 600; }
.dl-r { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dl-r.bad { color: var(--red); font-weight: 600; }
.dl-help:hover { text-decoration: underline; text-underline-offset: 3px; }
.dh-box-h h2 { font-family: var(--display); font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.dh-box .dsec-h + .wl, .dh-box-h + .wl { border-top: 0; }
@media (hover: hover) and (pointer: fine) {
  .dh-go:hover .go-ico { transform: translateX(3px); }
  .dh-then-r:hover span, .dh-rows button:hover span { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 1180px) { .dh-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dh-next { grid-column: 1 / -1; } .dh-row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dh-row3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .dh-head h1 { font-size: 26px; }
  .dh-band, .dh-row3 { grid-template-columns: minmax(0, 1fr); }
  .dh-row3 > :last-child { grid-column: auto; }
  .dh-next-t { font-size: 26px; }
  .dh-big { font-size: 56px; }
  .dh-sec-h .r { margin-left: 0; width: 100%; justify-content: space-between; }
  .dh-sec-h h2 { font-size: 24px; }
}
.choice b { color: var(--ink); }
.pcard-new { gap: 8px; }
.pcard-new b { font-size: 15px; font-weight: 650; }
.pcard-new .small { font-weight: 400; color: var(--faint); }
.pcard-new .ring-ico { margin-bottom: 4px; }
/* project sidebar */
.side-back { color: var(--muted); margin-bottom: 12px; }
.pd-in { display: flex; flex-direction: column; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.pd-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 10px; text-align: left; transition: background 0.15s; }
.pd-row:hover { background: var(--hover); }
.pd-row.on { background: var(--pc-soft); }
.pd-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pd-row .grow b, .pd-row .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-row .grow b { font-size: 13.5px; font-weight: 600; }
.pd-row .grow small { font-size: 12px; color: var(--muted); }
.pd-row > .ico { color: var(--pc); }
.pd-new { border-top: 1px solid var(--line-2); border-radius: 0 0 10px 10px; margin-top: 2px; padding-top: 9px; }
.pd-plus { width: 28px; height: 28px; border-radius: 8px; background: var(--grey-bg); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ptabs { display: flex; flex-direction: column; gap: 2px; }
.side .ptab.on { background: var(--pc-soft); color: var(--pc); }
.side .ptab.on .ico { color: var(--pc); }
.side-extra { font-size: 12px; color: var(--faint); }
.pick-row.pj .grow { display: flex; flex-direction: column; line-height: 1.3; }
.pick-row.pj .grow b { font-size: 15px; font-weight: 600; }
.pick-row.pj .grow small { font-size: 12.5px; color: var(--muted); font-weight: 400; }
/* on desktop the project's parts live in the sidebar, so the row of tabs is not repeated on the page */
@media (min-width: 901px) { .main .content .tabs { display: none; } .main .content .pbanner { margin-bottom: 24px; } }
.dsec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dsec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dsec-h h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.dsec-n { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--grey-bg); border-radius: 6px; padding: 1px 7px; }
.dsec-h .link-btn { font-size: 13px; font-weight: 500; color: var(--muted); }
.dsec-h .link-btn:hover { color: var(--brand); }
.dbox { padding: 18px 18px 10px; display: flex; flex-direction: column; }
.dbox .dsec-h { margin-bottom: 8px; }
.dbox .dsec-h h2 { font-size: 15px; }
.wl { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-2); }
.dsec-h + .wl { border-top: 0; }
.wl .av { margin-top: 2px; }
.wl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wl-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.wl-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-top .num { font-weight: 650; }
.wl-bar { height: 4px; border-radius: 4px; background: var(--grey-bg); overflow: hidden; }
.wl-bar span { display: block; height: 100%; border-radius: 4px; background: var(--data); transition: width 0.6s var(--ease); }
.wl-sub { font-size: 12px; color: var(--muted); }
.wl-stuck { color: var(--red); font-weight: 600; }
.dact, .dsearch { display: flex; gap: 11px; width: 100%; text-align: left; padding: 9px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 10px; transition: background 0.15s; }
.dact:hover, .dsearch:hover { background: var(--hover); }
.dact + .dact, .dsearch + .dsearch { border-top: 1px solid var(--line-2); border-radius: 0; }
.dact + .dact:hover, .dsearch + .dsearch:hover { border-radius: 10px; }
.dact .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dact-t { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.dact-t b { color: var(--ink); font-weight: 600; }
.dact-m { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); min-width: 0; }
.dact-m .ptag { font-size: 12px; min-width: 0; }
.dsearch { align-items: center; font-size: 14px; color: var(--ink-2); }
.dsearch .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsearch time { font-size: 12px; color: var(--faint); flex: 0 0 auto; }
.dsearch-i { width: 28px; height: 28px; border-radius: 8px; background: var(--grey-bg); color: var(--muted); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dash-welcome { max-width: 620px; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.dash-welcome h2 { font-size: 20px; font-weight: 700; }
.pcard { padding: 0; display: flex; flex-direction: column; text-align: left; width: 100%; overflow: hidden; transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--pc-line); }
.pc-head { display: flex; gap: 12px; align-items: center; padding: 18px 20px 0; }
.pc-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pc-head b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-head small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-role { font-size: 12px; font-weight: 600; color: var(--pc); align-self: flex-start; margin-top: 2px; }
/* the six steps as a small path: done nodes filled, the current one a ring */
.ppath { display: flex; align-items: center; padding: 20px 20px 0; }
.ppath .pn { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; background: var(--grey-bg); box-shadow: inset 0 0 0 1.5px var(--line); }
.ppath .pn.done { background: var(--pc); box-shadow: none; }
.ppath .pn.cur { width: 15px; height: 15px; background: var(--card); box-shadow: inset 0 0 0 2.5px var(--pc), 0 0 0 4px var(--pc-soft); }
.ppath .pl { flex: 1; height: 2px; margin: 0 3px; border-radius: 2px; background: var(--line); }
.ppath .pl.done { background: var(--pc); }
.pc-step { display: flex; justify-content: space-between; gap: 8px; padding: 9px 20px 0; font-size: 13px; }
.pc-step b { font-weight: 600; }
.pc-info { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 14px 20px 16px; font-size: 13.5px; color: var(--ink-2); }
.pc-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-line > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-line .ico { color: var(--faint); }
.pc-line.win { color: var(--pc); font-weight: 600; }
.pc-line.win .ico { color: var(--pc); }
.pc-line.quiet, .pc-line.quiet .ico { color: var(--amber); }
.pc-line.late, .pc-line.late .ico { color: var(--red); }
.enter .pc-line.win { animation: rise 0.5s 0.25s var(--ease) backwards; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.pc-counts { display: flex; gap: 12px; font-size: 13px; font-weight: 600; color: var(--pc); }
.pc-counts span { display: inline-flex; align-items: center; gap: 4px; }
.dsort { padding: 2px; }
.dsort button { height: 28px; font-size: 12.5px; padding: 0 10px; }
.dn-row, .dc-row { display: flex; align-items: center; gap: 10px; width: calc(100% + 16px); margin: 0 -8px; padding: 9px 8px; border-radius: 10px; text-align: left; transition: background 0.15s; }
.dn-row:hover, .dc-row:hover { background: var(--hover); }
.dn-row .grow, .dc-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
.dn-row b, .dc-row b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-row > .ico { color: var(--faint); transition: transform 0.2s var(--ease); }
.dn-row:hover > .ico { transform: translateX(2px); color: var(--ink-2); }
/* your week: seven small bars */
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 96px; }
.wk-d { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.wk-col { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.wk-b { width: 100%; max-width: 30px; min-height: 4px; border-radius: 6px; background: var(--data); transform-origin: bottom; }
.wk-b.zero { background: var(--grey-bg); }
.wk-d.today .wk-b.zero { background: none; height: 22px !important; border: 1.5px dashed var(--line); }
.wk-d small { font-size: 11.5px; color: var(--faint); }
.wk-d.today small { color: var(--ink); font-weight: 650; }
.enter .wk-b { animation: growY 0.6s var(--ease) backwards; }
@keyframes growY { from { transform: scaleY(0); } }
/* coming up and activity: rows grouped by day */
.dday { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 0 2px; }
.dsec-h + .dday { padding-top: 0; }
.dday.late { color: var(--red); }
.dc-sq { width: 10px; height: 10px; border-radius: 3px; background: var(--pid); flex: 0 0 auto; }
.dc-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-note { font-size: 12px; font-weight: 600; color: var(--muted); flex: 0 0 auto; }
.dc-note.bad { color: var(--red); }
.dbox-empty { font-size: 13.5px; color: var(--muted); padding: 4px 0 10px; }
.dact-i { width: 26px; height: 26px; border-radius: 8px; background: var(--pc-soft2); color: var(--pc); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dact.big .dact-t { color: var(--ink); }
.wl-free { color: var(--green); font-weight: 600; }
.wl-help { font-size: 12px; font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 2px; margin-left: 6px; }
.wl-help:hover { color: var(--ink); }
.pcard-new { border: 1.5px dashed var(--line); border-radius: var(--r-lg); min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 550; width: 100%; background: transparent; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.pcard-new:hover { border-color: var(--ink); color: var(--ink); background: var(--card); }
.pcard-new:hover .ring-ico { transform: rotate(90deg); }
.pcard-new .ring-ico { transition: transform 0.35s var(--spring); }
.list { display: flex; flex-direction: column; overflow: hidden; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line-2); width: 100%; text-align: left; transition: background 0.15s; }
.list-row:first-child { border-top: 0; }
button.list-row:hover { background: var(--hover); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; font-size: 15px; }
.list-row .s { color: var(--muted); font-size: 13px; }

/* project */
.pbanner { background: var(--pc-soft); border: 1px solid var(--pc-line); border-radius: 22px; padding: 22px; display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pbanner .pinfo { flex: 1 1 320px; min-width: 0; }
.pbanner h1 { font-size: 28px; font-weight: 750; margin-top: 2px; }
.phead-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border: 1px solid var(--pc-line); border-radius: 999px; background: var(--card); font-size: 13px; color: var(--ink-2); font-weight: 500; transition: transform 0.12s, background 0.15s; }
button.pchip:hover { background: var(--hover); }
button.pchip:active { transform: scale(0.97); }
.pchip.plain { padding-left: 12px; }
.pchip .ico { color: var(--pc); }
.tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 46px; padding: 0 13px; font-size: 15px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; position: relative; transition: color 0.2s; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); font-weight: 600; }
.tab.on .ico { color: var(--pc); }
.tab .badge { height: 18px; min-width: 18px; font-size: 10.5px; }
.tab-ind { position: absolute; left: 0; bottom: 0; height: 2.5px; border-radius: 2px; background: var(--pc); width: 0; transition: transform 0.35s var(--ease), width 0.35s var(--ease); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.path { display: flex; margin: 22px 0 6px; }
.node { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; font-size: 12px; color: var(--muted); text-align: center; min-width: 0; padding: 0 2px; }
.node:not(:first-child)::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.node.done:not(:first-child)::before, .node.cur:not(:first-child)::before { background: var(--pc); }
.ndot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--card); border: 2px solid var(--line); color: var(--muted); position: relative; z-index: 1; }
.node.done .ndot { background: var(--pc); border-color: var(--pc); color: var(--pc-on); }
.node.cur .ndot { background: var(--card); border-color: var(--pc); color: var(--pc); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pc) 35%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--pc) 0%, transparent); } }
.node.cur { color: var(--ink); font-weight: 600; }
.path-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--pc-soft); }
.path-now h3 { font-size: 18px; font-weight: 700; margin-top: 2px; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--pc) calc(var(--p) * 1%), var(--grey-bg) 0); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ring > div { width: 62px; height: 62px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ring strong { font-size: 20px; }
.ring span { font-size: 11px; color: var(--muted); }
.pipe-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--grey-bg); margin: 14px 0; gap: 2px; }
.pipe-bar span { display: block; height: 100%; transition: width 0.7s var(--ease); }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stats4 button { text-align: left; padding: 8px 10px; border-radius: 12px; transition: background 0.15s; }
.stats4 button:hover { background: var(--hover); }
.stats4 strong { display: block; font-size: 24px; font-weight: 700; }
.stats4 span { font-size: 13px; color: var(--muted); }
.act { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.act:first-child { border-top: 0; }

/* research */
.rs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.stepper { padding: 8px; position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.st { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; width: 100%; text-align: left; transition: background 0.15s; }
.st:hover { background: var(--hover); }
.st.on { background: var(--pc-soft2); }
.st .sname { font-size: 15px; font-weight: 500; display: block; }
.st.on .sname { color: var(--pc); font-weight: 650; }
.st .ssub { font-size: 12px; color: var(--muted); display: block; }
.st .sdot.done { background: var(--pc); color: var(--pc-on); }
.st .sdot.cur { background: var(--card); color: var(--pc); box-shadow: inset 0 0 0 2px var(--pc); }
.step-panel { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.guide { display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: var(--pc-soft); border: 1px solid var(--pc-line); }
.guide .gi { width: 38px; height: 38px; border-radius: 11px; background: var(--card); color: var(--pc); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.guide .gb { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 62em; }
.guide .gex { background: var(--card); border-radius: 12px; padding: 12px 14px; animation: rise 0.25s var(--ease); }
.step-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.step-foot.ok { border-color: var(--pc-line); background: var(--pc-soft); }
.locked { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rule-box { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-chips .chip { animation: popIn 0.25s var(--spring); }
.res { padding: 16px 18px; display: flex; gap: 14px; border-top: 1px solid var(--line-2); }
.res:first-child { border-top: 0; }
.res .grow { flex: 1; min-width: 0; }
.res h4 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.res .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.res .ab { font-size: 14px; color: var(--ink-2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.screen-card { padding: 28px; display: flex; flex-direction: column; gap: 12px; animation: cardIn 0.32s var(--ease); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.screen-card h3 { font-size: 21px; font-weight: 700; line-height: 1.3; }
.screen-card .ab { font-size: 16px; color: var(--ink-2); line-height: 1.65; max-width: 60em; }
.decide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.decide .btn { height: 56px; font-size: 15px; border-radius: 15px; }
.btn-keep { background: var(--green-bg); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 22%, transparent); }
.btn-out { background: var(--red-bg); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 22%, transparent); }
.btn-maybe { background: var(--amber-bg); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 22%, transparent); }
.btn-keep:hover, .btn-out:hover, .btn-maybe:hover { filter: saturate(1.2); box-shadow: var(--shadow); }
kbd { font-family: inherit; font-size: 11px; font-weight: 600; padding: 1px 6px; border: 1px solid currentColor; border-radius: 5px; opacity: 0.6; }
.reasons { padding: 14px; border-radius: 14px; background: var(--red-bg); display: flex; flex-direction: column; gap: 10px; animation: rise 0.2s var(--ease); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
td { padding: 6px; border-top: 1px solid var(--line-2); vertical-align: middle; }
tr:hover td { background: color-mix(in srgb, var(--hover) 60%, transparent); }
td.pname { padding-left: 14px; font-weight: 600; white-space: nowrap; }
td.pname span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.cell { width: 100%; min-width: 110px; height: 36px; border: 1px solid transparent; background: transparent; padding: 0 8px; border-radius: 8px; font-size: 14px; transition: border-color 0.15s, background 0.15s; }
.cell:hover { border-color: var(--line); }
.cell:focus { outline: none; border-color: var(--focus); background: var(--card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 15%, transparent); }
.cell.empty { background: var(--amber-bg); }
.cell:disabled { opacity: 1; cursor: default; }
.qcard { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.qrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 14px; }
.prisma { display: grid; grid-template-columns: minmax(0, 1.2fr) 44px minmax(0, 1fr); align-items: center; }
.pbx { padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); }
.pbx strong { font-size: 24px; font-weight: 750; display: block; }
.pbx span { font-size: 13px; color: var(--muted); }
.pbx.main { border-color: var(--pc-line); }
.pbx.keep { border-color: var(--pc); background: var(--pc-soft); }
.pbx.keep strong { color: var(--pc); }
.parrow-r { display: flex; justify-content: center; color: var(--faint); }
.parrow-d { display: flex; justify-content: center; color: var(--faint); padding: 6px 0; grid-column: 1; }
.todo-item { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.todo-item:first-child { border-top: 0; }
.todo-item input { width: 18px; height: 18px; accent-color: var(--pc); }

/* tasks */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search-in { position: relative; flex: 1 1 220px; max-width: 360px; }
.search-in svg { position: absolute; left: 12px; top: 13px; color: var(--faint); }
.search-in .input { padding-left: 38px; }
.kan { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--grey-bg); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kcol-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; font-size: 14px; font-weight: 600; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px; text-align: left; width: 100%; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s; }
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--pc-line); }
.tcard .tt { font-weight: 550; font-size: 15px; line-height: 1.35; }
.tcard .tm { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tcard .tnote { font-size: 13px; padding: 8px 10px; border-radius: 9px; background: var(--amber-bg); color: var(--amber); }
.comment { display: flex; gap: 10px; font-size: 14px; }
.comment .cb { background: var(--grey-bg); border-radius: 4px 14px 14px 14px; padding: 8px 12px; flex: 1; min-width: 0; }
.comment.k-approved .cb { background: var(--green-bg); }
.comment.k-rejected .cb { background: var(--amber-bg); }
.comment.k-submitted .cb { background: var(--pc-soft2); }

/* approvals: an inbox list on the left, the item being checked on the right */
.ap-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -8px 0 20px; }
.ap-bar .seg button span:not(.badge) { color: var(--faint); font-weight: 500; }
.ap-bar .seg button.on span:not(.badge) { color: var(--muted); }
.ap-bar .pdrop-wrap { flex: 0 1 320px; }
.ap-bar .picker { min-height: 40px; padding: 4px 10px 4px 6px; border-radius: 12px; }
.ap-bar .picker .sw { width: 28px; height: 28px; border-radius: 8px; }
.ap-bar .picker .pl small { display: none; }
.ap-bar .picker .pl b { font-size: 14px; }
.ap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.ap-list { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 100px); overflow-y: auto; margin: -4px; padding: 4px; }
.ap-row { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; text-align: left; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.ap-row:hover { background: var(--hover); }
.ap-row.on { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.ap-row .av { margin-top: 1px; }
.ap-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ap-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.ap-top b { font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-top time { font-size: 12px; color: var(--faint); flex: 0 0 auto; }
.ap-t { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-row .ptag { font-size: 12px; margin-top: 2px; }
.ap-d { padding: 26px 28px 0; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.enter .ap-d { animation: rise 0.3s var(--ease) both; }
.ap-back { display: none; align-self: flex-start; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.ap-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: -10px; }
.ap-meta i { font-style: normal; color: var(--faint); }
.ap-d h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.25; }
.ap-who { display: flex; align-items: center; gap: 12px; }
.ap-who .grow { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ap-who b { font-size: 15px; font-weight: 600; }
.ap-who small { font-size: 13px; color: var(--muted); }
.ap-note { margin-top: -6px; padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: var(--pc-soft); font-size: 15.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-sec h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.ap-sec p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }
.ap-c { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.ap-c + .ap-c { border-top: 1px solid var(--line-2); }
.ap-c b { color: var(--ink); font-weight: 600; }
.ap-c small { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
.ap-act { position: sticky; bottom: 0; margin: 4px -28px 0; padding: 16px 28px 20px; border-top: 1px solid var(--line-2); background: var(--card); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; flex-direction: column; gap: 8px; }
.ap-act textarea.input { min-height: 68px; resize: vertical; }
.ap-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.ap-btns .btn { height: 44px; padding: 0 18px; }
.ap-no { color: var(--red); }
.ap-no:hover:not(:disabled) { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 25%, var(--line)); }
.ap-empty { padding: 56px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.ap-empty b { font-size: 17px; font-weight: 650; }
.ap-empty p { color: var(--muted); font-size: 14.5px; max-width: 42ch; }
.ring-ico.ok { background: var(--green-bg); color: var(--green); }
.ap-done { padding: 6px 18px; }
.ap-hrow { display: flex; align-items: center; gap: 12px; width: calc(100% + 16px); margin: 0 -8px; padding: 12px 8px; border-radius: 10px; text-align: left; transition: background 0.15s; }
.ap-hrow + .ap-hrow { border-top: 1px solid var(--line-2); border-radius: 0; }
.ap-hrow:hover { background: var(--hover); border-radius: 10px; }
.ap-hrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ap-hrow b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-out { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-weight: 600; color: var(--amber); flex: 0 0 auto; }
.ap-out.ok { color: var(--green); }
.ap-out small { font-size: 12px; font-weight: 400; color: var(--faint); }
@media (max-width: 900px) {
  .ap { grid-template-columns: minmax(0, 1fr); }
  .ap-list { position: static; max-height: none; overflow: visible; }
  .ap.show-d .ap-list, .ap:not(.show-d) .ap-d { display: none; }
  .ap-row { background: var(--card); border-color: var(--line); }
  .ap-row.on { box-shadow: none; }
  .ap-back { display: inline-flex; }
  .ap-d { padding: 18px 18px 0; gap: 18px; }
  .ap-d h2 { font-size: 21px; }
  .ap-act { margin: 4px -18px 0; padding: 14px 18px 18px; bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)); }
  .ap-btns .btn { flex: 1; }
}
/* headings get a face with more character than the body text; body stays Inter */
.page-head h1, .phead h1, .ph-name, .tnext h2, .dnext h2, .ap-d h2, .ask-empty h1, .auth-card h1, .celebrate h2, .blk-pick-h b { font-family: var(--display); letter-spacing: -0.02em; }
.tseg.cur .tseg-bar::after { inset: 0 calc(100% - var(--fp, 50%)) 0 0; }

/* ---- PC My research: Pin, Delete from me, Delete for everyone on each card; Deleted (ProjectsDesktop.tsx, Demo/pc-pin-delete.html A) ---- */
/* PC My research's row: New research, Active/Done, then search, sort and the bin at the end (phone's pa- controls) */
.dh-tools-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dh-find { display: block; flex: none; width: 240px; margin: 0; }
.dh-find span.pa-sbtn { pointer-events: none; color: var(--muted); }
@media (max-width: 1100px) { .dh-find { width: 180px; } }
.dh-bin { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); transition: background 0.12s; }
.dh-bin:hover { background: var(--hover); }
.dh-bin b { font-weight: 600; color: var(--ink); }
.dh-bin .ico { color: var(--muted); }
.dh-grp { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 2px 0 -4px; font-size: 14px; font-weight: 600; }
.dh-grp:not(:first-child) { margin-top: 14px; }
.dh-grp .num { color: var(--muted); font-weight: 400; }
/* the card and its ••• lift together; asking, nothing moves */
.dh-pcw { position: relative; display: flex; min-width: 0; transition: transform 0.25s var(--ease); }
.dh-pcw > .pcard { flex: 1; min-width: 0; }
.dh-pcw > .pcard.dh-pc:hover { transform: none; }
@media (hover: hover) and (pointer: fine) { .dh-pcw:not(.asking):hover { transform: translateY(-3px); } }
.dh-pcw .dh-pc-ft { padding-right: 72px; }
.dh-pc-acts { position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 2px; }
.dh-more { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--muted); transition: background 0.12s, color 0.12s; }
.dh-more:hover, .dh-more.on { background: var(--hover); color: var(--ink); }
.dh-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dh-pinned { display: grid; place-items: center; width: 26px; height: 34px; color: var(--muted); }
.dh-pcw.asking > .pcard { visibility: hidden; }
.dh-ask { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 22px 24px 18px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 2px var(--red-bg); }
.dh-ask.pin { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--btn) 70%, transparent); }
.dh-ask b { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.dh-ask p { margin-top: 6px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.dh-ask .tk-acts a.tk-act { text-decoration: none; }
.dh-who { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 38px; margin-top: 10px; padding: 0 14px 0 10px; border-radius: 19px; background: var(--side); color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-who.set { color: var(--ink); font-weight: 600; }
.dh-who .ico { flex: none; color: var(--muted); }
.dh-who[aria-expanded='true'] { box-shadow: 0 0 0 2px var(--ink); }
.dh-who:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* a menu row with a second line under its name */
.cm-it.two { height: auto; min-height: 36px; padding: 8px 10px; align-items: flex-start; }
.cm-it.two .ico { margin-top: 2px; }
.cm-t { display: flex; flex-direction: column; }
.cm-t small { margin-top: 1px; font-size: 12px; color: var(--muted); }
.cm-it.bad .cm-t small { color: color-mix(in srgb, var(--red) 65%, var(--muted)); }
/* Deleted on a big screen */
.dh-del-h { display: flex; align-items: center; gap: 14px; }
.dh-del-h h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.dh-del-note { max-width: 64ch; margin: 12px 0 22px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.dh-gone { display: flex; flex-direction: column; min-width: 0; padding: 22px 24px 18px; border-radius: 22px; background: var(--card); border: 1px dashed var(--line); }
.dh-gone .dh-pc-step { margin-top: 8px; }
.dh-gone-ft { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }
.dh-gone-d { font-size: 14px; font-weight: 600; color: var(--red); }
.dh-gone .tk-act { gap: 6px; }
.dh-del-none { font-size: 15px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .dh-pcw { transition: none; } }

/* My research on a big screen: one top row (greeting · ‹ month › · Cards | Timeline · New research), Done · Deleted at the foot */
.dh-top { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.dh-top h1 { margin-right: auto; font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-top .btn { flex: none; }
.dh-vico { width: 16px; height: 16px; flex: none; }
.mrt-month { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.mrt-arw { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); display: grid; place-items: center; transition: color 0.12s, border-color 0.12s; }
.mrt-arw:hover { color: var(--ink); border-color: var(--faint); }
.mrt-mname { min-width: 84px; height: 32px; padding: 0 6px; border-radius: 8px; color: var(--ink); font-weight: 600; text-align: center; }
.mrt-mname:not(:disabled):hover { background: var(--hover); }
.mrt-mname:disabled { cursor: default; }
.dh-foot { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--muted); }
.dh-foot a, .dh-foot button { color: var(--ink); font-weight: 600; }
.dh-foot a:hover, .dh-foot button:hover { text-decoration: underline; }
.dh-foot-r { white-space: nowrap; }
.dh-foot b { font-weight: 600; }
@media (max-width: 900px) { .dh-top h1 { font-size: 24px; } .dh-top .btn { height: 36px; padding: 0 12px; font-size: 13.5px; } }

/* Timeline: names | six week lanes | room for the last date label */
.mrt { --nw: 270px; --tail: 104px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 18px 36px; }
.mrt-wk, .mrt-row { display: grid; grid-template-columns: var(--nw) minmax(0, 1fr) var(--tail); }
.mrt-wk { font-size: 12.5px; color: var(--muted); }
.mrt-wk > div { display: grid; grid-template-columns: repeat(6, 1fr); }
.mrt-wk > div span { padding: 0 0 8px 6px; border-left: 1px solid var(--line); white-space: nowrap; }
.mrt-rows { position: relative; }
.mrt-lane { position: relative; height: 100%; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 6 - 1px), var(--hover) calc(100% / 6 - 1px) calc(100% / 6)); }
.mrt-today { position: absolute; top: 0; bottom: 0; left: calc(var(--nw) + (100% - var(--nw) - var(--tail)) * var(--t)); width: 2px; margin-left: -1px; background: var(--ink); z-index: 2; pointer-events: none; }
.mrt-today b { position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; background: var(--ink); color: var(--ghost); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
/* opening one row steps the others back, and shutting it brings them forward the same soft way */
.mrt-item { border-top: 1px solid var(--hover); transition: opacity 0.26s var(--ease); }
.mrt.focus .mrt-item.dim { opacity: 0.32; }
.mrt-item.dim:hover, .mrt-item.dim:focus-within { opacity: 0.7; }
.mrt-row { height: 52px; }
.mrt-n { display: flex; align-items: center; gap: 2px; min-width: 0; padding-right: 8px; }
.mrt-tog { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 40px; padding: 0 6px 0 0; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink); text-align: left; }
.mrt-tog b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrt-tog:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mrt-chev { flex: none; color: var(--faint); transition: transform 0.26s var(--ease); }
.mrt-item.open .mrt-chev { transform: rotate(90deg); color: var(--ink); }
.mrt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pid); flex: none; }
.mrt-n .dh-more { width: 30px; height: 30px; flex: none; }
.mrt-n .dh-pinned { width: 22px; height: 30px; flex: none; }
.mrt-bar { position: absolute; top: 16px; height: 20px; border-radius: 10px; left: var(--s); width: calc(var(--e) - var(--s)); background: var(--hover); overflow: hidden; }
.mrt-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--data); }
.mrt-bar.late { background: var(--red-bg); }
.mrt-bar.late::before { background: color-mix(in srgb, var(--red) 35%, var(--red-bg)); }
.mrt-due, .mrt-sl { position: absolute; left: calc(var(--e) + 10px); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mrt-due { top: 16px; line-height: 20px; }
.mrt-due.late { color: var(--red); font-weight: 600; }
.mrt-open { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s var(--ease); }
.mrt-item.open .mrt-open { grid-template-rows: 1fr; }
.mrt-open > div { min-height: 0; overflow: hidden; }
.mrt-open-in { background: var(--ghost); border-radius: 14px; margin: 0 0 8px; padding: 6px 0; }
.mrt-sub { height: 40px; color: var(--ink-2); border-radius: 10px; text-decoration: none; }
.mrt-sub:hover .mrt-sn { color: var(--ink); }
.mrt-sub:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mrt-sn { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 14px 0 28px; font-size: 13px; font-weight: 500; }
.mrt-st { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.mrt-st.ok { background: var(--ink); color: var(--ghost); }
.mrt-st.now { border: 2px solid var(--ink); }
.mrt-st.no { border: 1.5px dashed var(--faint); }
.mrt-face { margin-left: auto; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--ink); font-style: normal; font-size: 10px; font-weight: 600; display: grid; place-items: center; }
/* every phase bar the same thin height; the one being worked on is told by its fill and its bold date, not a bigger box */
.mrt-sb { position: absolute; top: 14px; height: 12px; border-radius: 6px; left: var(--s); width: calc(var(--e) - var(--s)); background: var(--hover); }
.mrt-sb.ok { background: var(--data); }
.mrt-sb.now { background: linear-gradient(90deg, var(--data) 40%, var(--blue-bg) 40%); }
.mrt-sl { top: 12px; line-height: 16px; font-size: 12px; }
.mrt-sl.go { color: var(--ink); font-weight: 600; }
/* words sit above the Today line, on their own background, so the line never cuts through them */
.mrt-due, .mrt-none { z-index: 3; padding: 0 4px; margin-left: -4px; background: var(--card); border-radius: 4px; }
.mrt-sl { z-index: 3; padding: 0 4px; margin-left: -4px; background: var(--ghost); border-radius: 4px; }
.mrt-due.edge-l, .mrt-sl.edge-l { left: 8px; }
.mrt-due.edge-r, .mrt-sl.edge-r { left: auto; right: 8px; }
.mrt-none { position: absolute; top: 16px; left: 8px; line-height: 20px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mrt-none a, .mrt-nophase a { color: var(--ink); font-weight: 600; }
.mrt-none a:hover, .mrt-nophase a:hover { text-decoration: underline; }
.mrt-nophase { padding: 10px 28px; font-size: 13px; color: var(--muted); }
.mrt-askrow { position: relative; z-index: 3; padding: 8px 0; }
.mrt-item .dh-ask { position: relative; inset: auto; flex-direction: row; align-items: center; padding: 14px 18px; border-radius: 16px; }
.mrt-item .dh-ask > div:first-child { flex: 1; min-width: 0; }
.mrt-item .dh-ask .tk-acts { flex: none; }
@media (max-width: 1100px) { .mrt { --nw: 210px; --tail: 96px; } }
@media (prefers-reduced-motion: reduce) { .mrt-item, .mrt-chev, .mrt-open { transition: none; } }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- research plan: a roadmap of phases, then the open phase as a column of blocks ---------- */
.pl { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pl-back { align-self: flex-start; color: var(--muted); font-weight: 500; }
.pl-back:hover { color: var(--ink); }
.pl-back + .ph .ph-h { padding-top: 4px; }
/* the plan's one top row: "Phases" with how many are done, then the view switch, Add phase and the ••• menu */
.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.pl-ttl { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.pl-ttl h2 { font-family: var(--display); font-size: 28px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; }
.pl-ttl .num { font-size: 14px; color: var(--muted); white-space: nowrap; }
.pl-tools { display: flex; align-items: center; gap: 10px; }
.pl-seg { padding: 4px; border-radius: 999px; }
.pl-seg .pl-vt { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; }
.pl-seg .pl-vt .ico { color: currentColor; }
.pl-add { height: 42px; border-radius: 999px; padding: 0 18px 0 14px; }
.pl-more { width: 42px; height: 42px; border-radius: 50%; color: var(--ink-2); }
.pl-more[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.pl-top + * { margin-top: 4px; }
.pl-ov { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pc-card { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 16px 16px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-align: left; min-width: 0; min-height: 148px; transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.2s; }
.pc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pc-card.is-now { background: var(--pc-soft2); border-color: var(--pc-line); }
.pc-card.is-flag { background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.pc-t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.pc-t small { font-size: 12px; color: var(--muted); }
.pc-t b { font-size: 15px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.pc-t em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--amber); }
.pc-pct { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.pc-pct small { font-size: 17px; font-weight: 600; }
.is-now .pc-pct { color: var(--pc); }
.pc-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.is-now .pc-ft { border-top-color: var(--pc-line); }
.is-flag .pc-ft { border-top-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.pc-ft > .muted { white-space: nowrap; }
.pc-due { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.is-now .pc-due, .is-flag .pc-due { border-color: transparent; }
.pc-card.st-done .pc-pct { color: var(--muted); }
.pc-card.just .sti { animation: pop 0.5s var(--spring); }
.plb-card.dragging { opacity: 0.45; }
/* status marks */
.sti { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1.8px dashed var(--faint); }
.sti-doing { border: 2px solid var(--pc); background: conic-gradient(var(--pc) 0 50%, transparent 0); background-clip: content-box; padding: 2px; }
.sti-done { border: 0; background: var(--green); color: var(--on-accent); }
.sti-done .ico { stroke-width: 3; }
/* open work: one white panel, rows set apart by space and a hover tone, no boxes */
.pw { display: flex; flex-direction: column; background: var(--card); border-radius: 24px; padding: 22px 14px 12px; }
.pw-h { display: flex; align-items: baseline; gap: 10px; padding: 0 10px; margin-bottom: 8px; }
.pw-h h2 { font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.pw-h .num { font-size: 13px; font-weight: 600; color: var(--muted); }
.pw-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 32px 92px; align-items: center; gap: 20px; padding: 12px 10px; border-radius: 14px; text-align: left; transition: background 0.15s; }
.pw-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pw-t b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-t small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-n { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.pw-n i { flex: 1; height: 5px; border-radius: 3px; background: var(--grey-bg); overflow: hidden; display: block; }
.pw-n i b { display: block; height: 100%; border-radius: 3px; background: var(--data); }
.pw-n span { min-width: 50px; text-align: right; }
.pw-who { display: flex; justify-content: center; }
.pw-d { font-size: 13px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.pw-d.late { color: var(--red); font-weight: 600; }
.pw-none { padding: 6px 10px 12px; color: var(--ink-2); font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .pw-row:hover { background: var(--hover); } }
/* list: phases grouped by status, each opens to its blocks */
.pll { padding: 4px 8px 10px; overflow: hidden; }
.pll-h, .pll-r { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px 80px; gap: 12px; align-items: center; }
.pll-h { padding: 12px 10px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pll-g { padding-top: 8px; }
.pll-gh { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.pll-car { width: 26px; height: 26px; border-radius: 7px; color: var(--muted); }
.pll-car .ico { transition: transform 0.22s var(--ease); }
.pll-gh.shut .pll-car .ico { transform: rotate(-90deg); }
.pll-car.open .ico { transform: rotate(90deg); }
.pll-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 650; }
.pll-badge.st-doing { background: var(--pc); color: var(--pc-on); }
.pll-badge.st-todo { background: var(--grey-bg); color: var(--ink-2); }
.pll-badge.st-done { background: var(--green); color: var(--on-accent); }
.pll-r { padding: 8px 10px; min-height: 46px; border-bottom: 1px solid var(--line-2); transition: background 0.15s; }
.pll-r:hover { background: var(--hover); }
.pll-n { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pll-name { font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; border-radius: 6px; }
.pll-name:hover { color: var(--pc); }
.pll-r.sub { padding-left: 54px; }
.pll-bn { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pll-own { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.pll-own span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pll-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pll-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.pll-bar i b { display: block; height: 100%; border-radius: 3px; background: var(--data); transition: width 0.6s var(--ease); }
.pll-r .c-due { font-size: 13px; color: var(--ink-2); }
/* board: drag a phase to another column to change its status */
.plb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.plb-col { display: flex; flex-direction: column; gap: 10px; min-height: 180px; padding: 4px; border-radius: 20px; transition: background 0.15s, outline-color 0.15s; outline: 1.5px dashed transparent; }
.plb-col.over { background: var(--pc-soft); outline-color: var(--pc-line); }
.plb-col h3 { font-family: var(--display); font-size: 20px; font-weight: 600; padding: 2px 6px; }
.plb-col h3 span { color: var(--muted); font-weight: 500; }
.plb-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: box-shadow 0.2s var(--ease), border-color 0.2s, transform 0.2s var(--ease); }
.plb-card[draggable="true"] { cursor: grab; }
.plb-card:hover { box-shadow: var(--shadow); border-color: var(--pc-line); }
.plb-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.plb-card > b { font-size: 15.5px; font-weight: 650; }
.plb-card p { font-size: 13px; color: var(--muted); }
.plb-fl { font-size: 12.5px; font-weight: 600; color: var(--amber); }
.plb-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line-2); }
.plb-m { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); }
.plb-m span { display: inline-flex; align-items: center; gap: 4px; }
.plb-empty { border: 1.5px dashed var(--line); border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .pll-h, .pll-r { grid-template-columns: minmax(0, 1fr) 130px 70px; }
  .pll .c-own { display: none; }
  .plb { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .pl-ttl h2 { font-size: 24px; }
  .pl-tools { width: 100%; }
  .pl-seg { flex: 1; }
  .pl-seg .pl-vt { flex: 1; justify-content: center; padding: 0 8px; }
  .pl-add span { display: none; }
  .pl-add { width: 42px; padding: 0; justify-content: center; }
  .pc-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pc-card { padding: 14px 12px 12px; border-radius: 18px; min-height: 0; }
  .pc-top { flex-direction: column; gap: 8px; }
  .pc-pct { font-size: 28px; }
  .pc-ft .av { display: none; }
  .pc-ft { justify-content: flex-start; }
  .pw { padding: 18px 12px 10px; border-radius: 20px; }
  .pw-h { padding: 0 8px; }
  .pw-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 8px; }
  .pw-who, .pw-d, .pw-n i { display: none; }
  .pll-h, .pll-r { grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; }
  .pll .c-due { display: none; }
  .pll-bar i { display: none; }
  .pll-r.sub { padding-left: 36px; }
  .pll-n .pill { display: none; }
}
.rg { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.rg > svg { transform: rotate(-90deg); }
.rg-bg { fill: none; stroke: var(--line); stroke-width: 3; }
.rg-fg { fill: none; stroke: var(--pc); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.7s var(--ease); }
.rg-n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rg.done .rg-bg { fill: var(--pc); stroke: var(--pc); }
.rg.done .rg-n { color: var(--pc-on); }
.enter .rg.done .rg-n .ico, .rm.just .rg-n .ico { animation: pop 0.5s var(--spring); }
.ph { min-width: 0; }
.ph-h { display: flex; flex-direction: column; gap: 6px; }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.ph-back { padding: 0 18px 0 12px; }
.ph-nav { display: flex; align-items: center; gap: 4px; }
.ph-step { width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); }
.ph-step:disabled { opacity: 0.35; }
.ph-k { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 0 4px; white-space: nowrap; }
.ph-nav .ph-menu-w { margin-left: 6px; }
.ph-menu-w, .blk-menu-w { position: relative; }
.ph-name { font-family: var(--display); font-size: 38px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); width: 100%; border: 0; background: transparent; padding: 2px 8px; margin: 0 -8px; border-radius: 12px; }
input.ph-name:hover { background: var(--hover); }
input.ph-name:focus { outline: none; background: var(--card); box-shadow: 0 0 0 1px var(--box-on); }
.ph-desc { font: inherit; font-size: 15px; line-height: 1.5; color: var(--muted); width: 100%; max-width: 72ch; border: 0; background: transparent; padding: 4px 8px; margin: 0 -8px; border-radius: 8px; resize: none; min-height: 32px; }
textarea.ph-desc:hover { background: var(--hover); }
textarea.ph-desc:focus { outline: none; background: var(--card); box-shadow: 0 0 0 1px var(--box-on); color: var(--ink-2); }
.ph-desc { color: var(--ink-2); }
/* status, who and when: three pills on one line, no boxes */
.ph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.ph-st button.on.st-done { color: var(--green); }
.ph-field { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--card); color: var(--muted); cursor: pointer; transition: background 0.15s; }
.ph-field select, .ph-field input { border: 0; background: transparent; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); height: 40px; min-width: 0; cursor: pointer; }
.ph-field select { field-sizing: content; padding-right: 4px; }
.ph-field select:focus, .ph-field input:focus { outline: none; }
.ph-field:focus-within { box-shadow: 0 0 0 1px var(--box-on); }
@media (hover: hover) and (pointer: fine) { .ph-field:hover { background: var(--hover); } .ph-step:hover:not(:disabled) { background: var(--hover); color: var(--ink); } }
.pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; display: flex; flex-direction: column; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: popIn 0.16s var(--ease); }
.pop > button, .pop-sel { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--ink); text-align: left; }
.pop > button:hover:not(:disabled) { background: var(--hover); }
.pop .danger { color: var(--red); }
.pop-sel select { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; color: var(--ink); }
.pop-confirm { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; font-size: 13.5px; font-weight: 600; }
.blks { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
/* a block is one white panel: its name row, then its work, told apart by space rather than lines */
.blk { background: var(--card); border-radius: 24px; min-width: 0; }
.blk-h { display: flex; align-items: center; gap: 10px; padding: 18px 16px 4px 22px; min-width: 0; }
.blk-i { color: var(--ink-2); display: flex; align-items: center; flex: 0 0 auto; }
.blk-title { flex: 1; min-width: 0; font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); border: 0; background: transparent; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input.blk-title:hover { background: var(--hover); }
input.blk-title:focus { outline: none; background: var(--card); box-shadow: 0 0 0 1px var(--box-on); }
.blk-prog { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--grey-bg); padding: 4px 10px; border-radius: 999px; flex: 0 0 auto; }
.blk-prog.full { color: var(--green); background: var(--green-bg); }
.blk-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.blk-acts .icon-btn { width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.blk-acts .icon-btn.on, .blk-acts .icon-btn[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.blk-tip { margin: 10px 22px 0; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); background: var(--ghost); max-width: none; }
.blk-set { margin: 10px 22px 0; padding: 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--ghost); }
.blk-set .ex-sw { padding: 0; }
.set-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 550; }
.set-row > span { min-width: 120px; }
.set-row .input { flex: 1 1 200px; max-width: 320px; height: 40px; }
.set-sec { display: flex; flex-direction: column; gap: 6px; }
.set-sec > b { font-size: 14px; }
.set-li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 4px 2px; border-top: 1px solid var(--line-2); font-size: 14px; }
.set-li .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.set-li .icon-btn:hover { color: var(--red); }
.set-sec form, .ck-add, .lk-add { margin-top: 6px; }
.set-sec form .input, .ck-add .input { height: 40px; }
.blk-b { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.blk-none { padding: 28px 20px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 16px; }
.blk-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; margin-top: 16px; border: 1.5px dashed var(--line); border-radius: 24px; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.blk-add:hover { border-color: var(--pc); color: var(--pc); background: var(--pc-soft); }
.blk-pick { margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--pc-line); box-shadow: var(--shadow); animation: rise 0.25s var(--ease); }
.blk-pick-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.blk-pick-h b { font-size: 18px; font-weight: 700; }
.blk-pick-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bp { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; border: 1px solid var(--line-2); text-align: left; transition: border-color 0.15s, background 0.15s; }
.bp:hover:not(:disabled) { border-color: var(--pc-line); background: var(--pc-soft); }
.bp .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.bp b { font-size: 14px; font-weight: 600; }
.bp small { font-size: 12.5px; color: var(--muted); }
/* blocks: question, papers, screening */
.q-text { font-size: 17px; font-weight: 500; line-height: 1.5; }
.rule-box { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ghost); display: flex; flex-direction: column; gap: 6px; }
.rule-box > b { font-size: 14.5px; }
.rule-list { display: flex; flex-direction: column; margin-top: 4px; }
.rule-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rule-list li:first-child { border-top: 0; }
.rule-list .icon-btn { width: 28px; height: 28px; color: var(--faint); }
.rule-box form .input { height: 40px; }
.sub-h { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.list.bordered { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list.bordered .list-row { padding: 12px 14px; }
.res .oa, .saved-t { color: var(--green); font-weight: 600; }
.saved-t { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.dup { color: var(--amber); font-weight: 600; }
.blk .screen-card { padding: 22px 24px; border-radius: 16px; background: var(--ghost); border: 1px solid var(--line-2); box-shadow: none; display: flex; flex-direction: column; gap: 10px; }
.scr-blind { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--pc-soft); color: var(--ink-2); font-size: 13.5px; }
.scr-blind .ico { color: var(--pc); }
.rp-o { color: var(--muted); font-weight: 500; }
.bad-t { color: var(--red); font-weight: 600; }
.ok-t { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.scr-done { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--pc-soft); color: var(--pc); }
.scr-done span { display: flex; flex-direction: column; }
.scr-done b { color: var(--ink); }
.vs { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.vs i { font-style: normal; color: var(--faint); }
.dec { font-size: 13px; font-weight: 600; }
.dec.k { color: var(--green); } .dec.o { color: var(--red); }
.see-all { align-self: flex-start; font-weight: 500; color: var(--muted); }
.reason-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.reason-g .btn { height: auto; min-height: 38px; padding: 8px 12px; white-space: normal; justify-content: flex-start; text-align: left; font-weight: 500; }
.reasons { background: var(--card); border: 1px solid color-mix(in srgb, var(--red) 25%, var(--line)); }
.reasons > b { color: var(--red); }
/* blocks: tables */
.tb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tb-sp { flex: 1; }
.tb { min-width: 100%; }
.tb th { padding: 6px 6px 8px; vertical-align: bottom; }
.th-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-width: 96px; padding: 6px 8px; border-radius: 8px; text-align: left; font-size: 13px; font-weight: 650; color: var(--ink); transition: background 0.15s; }
.th-btn small { font-size: 11px; font-weight: 500; color: var(--faint); }
.th-btn:hover:not(:disabled), .th-btn.on { background: var(--pc-soft); }
.th-btn:disabled { opacity: 1; cursor: default; }
.tb-first { min-width: 132px; padding-left: 14px !important; white-space: nowrap; }
td.tb-first b { display: block; font-size: 14px; }
td.tb-first span { display: block; font-size: 12px; color: var(--muted); }
.cell.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell.bad { border-color: var(--red); background: var(--red-bg); }
.cell.lbl { font-weight: 600; min-width: 120px; }
select.cell { padding-right: 4px; min-width: 140px; }
.tb-x { width: 44px; text-align: right; }
.tb-x .icon-btn { width: 32px; height: 32px; color: var(--faint); }
.tb-x .icon-btn:hover { color: var(--red); }
.tb-none { padding: 22px !important; text-align: center; color: var(--muted); }
.tb-chk label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tb-chk input { width: 17px; height: 17px; accent-color: var(--pc); }
.tb-stat { white-space: nowrap; font-size: 13px; }
.cmp-ok { font-size: 14px; padding: 0 8px; }
.cmp-pick { display: flex; gap: 6px; }
.cmp-pick button { display: flex; flex-direction: column; align-items: flex-start; padding: 4px 9px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line)); background: var(--amber-bg); font-size: 14px; font-weight: 600; line-height: 1.25; transition: border-color 0.15s, background 0.15s; }
.cmp-pick button:hover:not(:disabled) { border-color: var(--pc); background: var(--pc-soft); }
.cmp-pick small { font-size: 11px; font-weight: 500; color: var(--muted); }
.cmp-wait { font-size: 13px; color: var(--faint); padding: 0 8px; white-space: nowrap; }
.tb-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 16px; }
.tb-empty p { color: var(--muted); max-width: 56ch; }
.col-f { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--pc-line); background: var(--pc-soft); animation: rise 0.2s var(--ease); }
.col-f > b { font-size: 14.5px; }
.col-f-r { display: flex; flex-wrap: wrap; gap: 8px; }
.col-f-r .input:first-child { flex: 1 1 240px; }
.col-f-r select { flex: 0 1 170px; }
.col-f .input { background: var(--card); height: 42px; }
.col-f-b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.col-f-b .danger { color: var(--red); }
.col-del-q { font-size: 13.5px; font-weight: 600; color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* blocks: quality, checklists, notes, links */
.blk .qcard { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.qcard-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.qcard-h .muted { flex: 1 1 240px; min-width: 0; }
.ck { display: flex; flex-direction: column; }
.ck-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.ck-row:first-child { border-top: 0; }
.ck-l { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.ck-l input { width: 18px; height: 18px; accent-color: var(--pc); flex: 0 0 auto; }
.ck-row.done .ck-l span { text-decoration: line-through; color: var(--muted); }
.ck-who { height: 30px; border: 0; border-radius: 8px; background: var(--grey-bg); color: var(--ink-2); font-size: 12.5px; font-weight: 500; padding: 0 6px; max-width: 120px; }
.ck-row .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.ck-row .icon-btn:hover { color: var(--red); }
.input.notes { min-height: 96px; }
.lk { display: flex; flex-direction: column; }
.lk-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; min-width: 0; }
.lk-row:first-child { border-top: 0; }
.lk-row > .ico { color: var(--pc); }
.lk-row a { font-weight: 600; color: var(--ink); text-decoration: none; }
.lk-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lk-u { flex: 1; min-width: 0; font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-row .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.lk-add { display: flex; flex-wrap: wrap; gap: 8px; }
.lk-add .input { flex: 1 1 200px; height: 40px; }
@media (max-width: 900px) {
  .rm { min-width: 168px; }
  .ph-name { font-size: 26px; }
  .blk-pick-g { grid-template-columns: minmax(0, 1fr); }
  .blk-b { padding: 14px 16px 18px; }
  .blk-h { padding: 14px 8px 2px 16px; gap: 8px; }
  .blk { border-radius: 20px; }
  .blk-tip, .blk-set { margin-inline: 16px; }
  .ph-nav .ph-k { display: none; }
  .pl-add.ph-back { width: auto; padding: 0 18px 0 12px; }
  .pl-add.ph-back span { display: inline; }
  .ph-top { margin-bottom: 14px; }
  .blk .screen-card { padding: 18px; }
  .ph-meta .seg { width: 100%; }
  .ph-meta .seg button { flex: 1; justify-content: center; }
  .ph-field { flex: 1 1 150px; }
  .ph-field select, .ph-field input { flex: 1; }
  .tb-bar .btn { flex: 1 1 auto; }
  .pop { right: -6px; }
}
/* overview: one line pointing to approvals and tasks, instead of copying them */
.tline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 14px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.tline > .ico { color: var(--pc); }
.tline i { font-style: normal; color: var(--faint); }
.tline .link-btn { font-weight: 600; font-size: 14px; }
.tline .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.tcard .row.between { align-items: flex-start; gap: 10px; }
.tcard .tt { flex: 1; min-width: 0; }
.tcard > .pill { align-self: flex-start; }
/* research plan: your own steps and the plan editor */
.cs .todo-item .grow { flex: 1; }
.cs-x { width: 30px; height: 30px; color: var(--faint); }
.cs-x:hover { color: var(--red); }
.cs-list { display: flex; flex-direction: column; }
.cs-list .lbl { margin-bottom: 4px; }
.pe { padding: 6px 18px; }
.pe-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.pe-row + .pe-row { border-top: 1px solid var(--line-2); }
.pe-n { width: 28px; height: 28px; border-radius: 50%; background: var(--pc-soft2); color: var(--pc); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pe-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pe-name { height: 38px; font-weight: 600; border-color: transparent; background: transparent; padding: 0 8px; margin-left: -8px; }
.pe-name:hover { border-color: var(--line); }
.pe-main small { font-size: 12.5px; color: var(--muted); }
.pe-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.pe-acts .icon-btn { width: 34px; height: 34px; border-radius: 9px; color: var(--muted); }
.pe-acts .icon-btn:disabled { opacity: 0.3; }
.pe-del:hover:not(:disabled) { color: var(--red); background: var(--red-bg); }
.pe-more { gap: 12px; }
.pe-tools { display: flex; flex-direction: column; gap: 2px; }
.pe-tools .hint { margin: 4px 0 4px; }
.pe-add { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 8px; border-radius: 10px; text-align: left; transition: background 0.15s; }
.pe-add:hover { background: var(--hover); }
.pe-add .grow { display: flex; flex-direction: column; line-height: 1.35; }
.pe-add b { font-size: 14px; font-weight: 600; }
.pe-add small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 620px) { .pe { padding: 4px 12px; } .pe-row { gap: 8px; } .pe-n { display: none; } .pe-acts .icon-btn { width: 30px; } }
/* explore (Taste Skill "accent ladder"): the brand green only on small marks (the primary action, the
   tab line, the review-stage strip), its pale tints on areas. Research is a list grouped by field, People
   are peer cards, Requests is an inbox with its detail. Everything here is prefixed x- */
.seg .badge, .ap-bar .seg button .badge { height: 18px; min-width: 18px; font-size: 10.5px; margin-left: 2px; color: var(--on-accent); font-weight: 700; }
.x { --x-track: color-mix(in srgb, var(--brand) 20%, var(--card)); --x-ink: color-mix(in srgb, var(--brand) 78%, var(--ink)); --x-ease: cubic-bezier(0.23, 1, 0.32, 1); --x-raise: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.x-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.x-head h1 { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.025em; }
.x-find { margin-top: 6px; font-size: 15px; color: var(--ink-2); max-width: 72ch; }
.x-find b { color: var(--ink); font-weight: 600; }
.x-head-a { display: flex; gap: 8px; flex: none; }
.x-link { color: var(--brand); font-weight: 600; }
.x-tabs { position: relative; display: flex; gap: 22px; margin-top: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.x-tabs::-webkit-scrollbar { display: none; }
.x-tab { height: 42px; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color 150ms ease; }
.x-tab.on { color: var(--ink); font-weight: 600; }
.x-tab .c { font-size: 12.5px; color: var(--faint); font-weight: 500; }
.x-tab .q { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: var(--brand-on); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.x-line { position: absolute; left: 0; bottom: -1px; width: 100px; height: 2px; border-radius: 2px; background: var(--brand); transform-origin: left; transition: transform 260ms var(--x-ease); pointer-events: none; }
.x-tools { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.x-tools .search-in { flex: 0 1 320px; }
.x-tools .search-in .input { height: 38px; }
.x-tools .search-in svg { top: 11px; }
.x-total { margin-left: auto; font-size: 13px; color: var(--muted); }
.x-pick { position: relative; }
.x-pick-b { height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.x-pick-b .ico { color: var(--muted); transition: transform 200ms var(--x-ease); }
.x-pick.open .x-pick-b .ico { transform: rotate(180deg); }
.x-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 210px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform-origin: top right; animation: xPop 180ms var(--x-ease); }
@keyframes xPop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.x-menu button { width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.x-menu button[aria-selected="true"] { font-weight: 600; }
.x-menu .ck { margin-left: auto; color: var(--brand); }
.x-sq { width: 10px; height: 10px; border-radius: 3px; background: var(--fc, var(--faint)); flex: none; display: inline-block; }
.x-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.x-lh, .x-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 156px; gap: 20px; align-items: center; padding: 0 20px; }
.x-lh { height: 40px; font-size: 12px; color: var(--muted); }
.x-grp { border-top: 1px solid var(--line); }
.x-grp-h { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 20px; font-size: 13.5px; font-weight: 600; }
.x-grp-h .ico { color: var(--muted); transition: transform 200ms var(--x-ease); }
.x-grp.shut .x-grp-h .ico { transform: rotate(-90deg); }
.x-grp-h .c { color: var(--faint); font-weight: 500; }
.x-grp.shut .x-grp-b { display: none; }
.x-row { min-height: 64px; border-top: 1px solid var(--line-2); cursor: pointer; transition: background-color 120ms ease, transform 160ms var(--x-ease); }
.x-row-t { min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.x-who > span:not(.av) { min-width: 0; }
.x-who b { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-who small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-act { display: flex; justify-content: flex-end; }
.x-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.x-st.ok { color: var(--x-ink); font-weight: 600; }
.x-st.in { color: var(--green); font-weight: 600; }
.x-btn { height: 34px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.x-pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.x-pcard { padding: 18px; display: flex; flex-direction: column; gap: 16px; cursor: pointer; transition: border-color 150ms ease, transform 160ms var(--x-ease); }
.x-pcard .x-who b { font-size: 15px; font-weight: 600; }
.x-pcard-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.x-pcard-f small { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.x-pcard-f small span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-more { display: flex; justify-content: center; margin-top: 16px; }
/* the review-stage strip: six stages of a systematic review, the ones a person covers filled */
.x-stages { display: flex; flex-direction: column; gap: 7px; }
.x-stages-bar, .x-stages-k { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.x-stages-bar i { height: 6px; border-radius: 3px; background: var(--x-track); }
.x-stages-bar i.on { background: var(--data); }
.x-stages-k { font-size: 11px; color: var(--faint); }
.x-stages-k span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-stages-k span.on { color: var(--x-ink); font-weight: 600; }
.x-stages p { font-size: 13px; color: var(--ink-2); }
.x-inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); align-items: start; overflow: hidden; margin-top: 18px; }
.x-inbox-l { border-right: 1px solid var(--line); padding: 8px; align-self: stretch; }
.x-inbox-l h2 { font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 10px 6px; }
.x-rq { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 10px; border-radius: 12px; text-align: left; transition: background-color 120ms ease, transform 160ms var(--x-ease); }
.x-rq.on { background: var(--brand-soft); }
.x-rq b { display: block; font-size: 13.5px; font-weight: 600; }
.x-rq small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-rq time { font-size: 12px; color: var(--faint); padding-top: 1px; }
.x-d { padding: 28px 32px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.x-d-h { display: flex; align-items: center; gap: 14px; }
.x-d-h h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.x-d-h p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.x-ask { font-size: 15px; color: var(--ink-2); }
.x-ask b { color: var(--ink); font-weight: 600; }
.x-bubble { background: var(--x-raise); border-radius: 4px 16px 16px 16px; padding: 12px 16px; font-size: 14.5px; line-height: 1.55; max-width: 62ch; overflow-wrap: anywhere; }
.x-reply { display: flex; gap: 10px; font-size: 14px; }
.x-reply small { display: block; color: var(--faint); font-size: 12px; }
.x-facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); row-gap: 10px; column-gap: 16px; margin: 0; font-size: 14px; }
.x-facts dt { color: var(--muted); }
.x-facts dd { margin: 0; overflow-wrap: anywhere; }
.x-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line-2); }
.x-foot .r { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.x-links { display: flex; gap: 16px; font-size: 13px; }
.x-links button { color: var(--muted); font-weight: 500; }
.x-back { display: none; align-self: flex-start; }
.x-empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; color: var(--muted); }
.x-empty b { color: var(--ink); font-size: 15px; }
.x-empty p { max-width: 44ch; font-size: 14px; }
.x-state { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--x-raise); font-size: 14px; color: var(--ink-2); }
.x-state.ok { background: var(--brand-soft); color: var(--x-ink); }
.x-state .ico { margin-top: 2px; flex: none; }
.x-form { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.x-form h3 { font-size: 16px; font-weight: 650; }
.x-form-f { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.x-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.x-checks label { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.x-checks input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.x-preview { padding: 16px; border-radius: 14px; border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 12px; }
.x-preview > small { font-size: 12px; color: var(--muted); }
.x-lead { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--x-raise); }
.x-lead > span:not(.av) { flex: 1; min-width: 0; }
.x-lead b { display: block; font-size: 14.5px; font-weight: 600; }
.x-lead small { display: block; font-size: 12.5px; color: var(--muted); }
.x-note { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.x-ftag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.x-row:active, .x-rq:active { transform: scale(0.995); }
.x-pcard:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
  .x-row:hover, .x-rq:hover:not(.on), .x-menu button:hover, .x-pick-b:hover { background: var(--hover); }
  .x-pcard:hover { border-color: color-mix(in srgb, var(--line) 40%, var(--faint)); }
  .x-tab:not(.on):hover { color: var(--ink-2); }
  .x-link:hover, .x-links button:hover { text-decoration: underline; text-underline-offset: 3px; }
  .x-links button:nth-child(n+2):hover { color: var(--red); }
}
/* the Explore sheet slides in from the right on the iOS drawer curve (bottom sheet on phones) */
.ov.x-ov { justify-content: flex-end; align-items: stretch; padding: 8px; }
.ov.x-ov .modal.x-sheet { max-width: 480px; max-height: none; border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; }
.ov.x-ov.anim .modal.x-sheet { animation: xIn 420ms cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes xIn { from { transform: translateX(calc(100% + 16px)); } }
.x-sh-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 24px; min-height: 52px; font-size: 13px; color: var(--muted); font-weight: 500; }
.x-sh-b { flex: 1; overflow-y: auto; padding: 4px 24px 28px; display: flex; flex-direction: column; gap: 22px; overscroll-behavior: contain; }
.x-sh-b h2.x-t { font-family: var(--display); font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.ex-set { gap: 0; padding-top: 6px; padding-bottom: 6px; }
.ex-sw { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.ex-sw + .ex-sw { border-top: 1px solid var(--line-2); }
.ex-sw b { display: block; font-size: 15px; font-weight: 600; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: color-mix(in srgb, var(--faint) 45%, var(--line)); flex: 0 0 auto; transition: background 0.2s var(--ease); }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.22s var(--ease); }
.switch.on { background: var(--brand); }
.switch.on i { transform: translateX(18px); }
@media (max-width: 1180px) { .x-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .x-inbox { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 720px) {
  .x-head { flex-direction: column; gap: 14px; }
  .x-head h1 { font-size: 26px; }
  .x-tools { flex-wrap: wrap; }
  .x-tools .search-in { flex: 1 1 0; min-width: 0; max-width: none; }
  .x-total, .x-lh { display: none; }
  .x-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "w a"; row-gap: 6px; padding: 12px 16px; }
  .x-row-t { grid-area: t; white-space: normal; } .x-row .x-who { grid-area: w; } .x-row .x-act { grid-area: a; }
  .x-grp-h { padding: 0 16px; }
  .x-pgrid { grid-template-columns: minmax(0, 1fr); }
  .x-inbox { grid-template-columns: minmax(0, 1fr); }
  .x-inbox-l { border-right: 0; }
  .x-inbox.show-d .x-inbox-l, .x-inbox:not(.show-d) .x-d { display: none; }
  .x-d { padding: 18px 16px 20px; }
  .x-back { display: inline-flex; }
  .x-facts { grid-template-columns: 1fr; row-gap: 2px; }
  .x-facts dd { margin-bottom: 8px; }
  .x-checks { grid-template-columns: 1fr; }
  .ov.x-ov { padding: 0; align-items: flex-end; }
  .ov.x-ov .modal.x-sheet { max-width: none; max-height: 90vh; border-radius: 20px 20px 0 0; }
  .ov.x-ov.anim .modal.x-sheet { animation: xUp 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
  @keyframes xUp { from { transform: translateY(100%); } }
  .x-sh-b { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) { .ov.x-ov.anim .modal.x-sheet, .x-menu { animation: fade 0.2s ease; } .x-line { transition: none; } .x-row:active, .x-rq:active, .x-pcard:active { transform: none; } }
/* review */
.rv-group { display: flex; flex-direction: column; gap: 12px; }
.rv-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px; flex-wrap: wrap; }
.rv-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow 0.2s; }
.rv-card:hover { box-shadow: var(--shadow); }
.quote { padding: 2px 0 2px 14px; border-left: 2px solid var(--line); font-size: 15px; color: var(--ink-2); }
.rv-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.rv-sum .card { padding: 16px; }
.rv-sum strong { display: block; font-size: 26px; font-weight: 750; }
.rv-sum span { font-size: 13px; color: var(--muted); }

/* chat */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: min(680px, calc(100vh - 300px)); min-height: 460px; overflow: hidden; }
.clist { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.citem { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; width: 100%; text-align: left; transition: background 0.15s; }
.citem:hover { background: var(--hover); }
.citem.on { background: var(--pc-soft2); }
.citem .ci { width: 34px; height: 34px; border-radius: 11px; background: var(--grey-bg); display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex: 0 0 auto; }
.citem.on .ci { background: var(--card); color: var(--pc); }
.citem .grow { flex: 1; min-width: 0; }
.citem .n { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.citem .n time { font-size: 11px; font-weight: 500; color: var(--faint); }
.citem .l { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem.unread .l { color: var(--ink); font-weight: 550; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.thread-h b { display: block; font-size: 15px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: smooth; }
.day { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--grey-bg); padding: 3px 10px; border-radius: 999px; margin: 12px 0 8px; }
.m { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; position: relative; }
.m.mine { align-self: flex-end; flex-direction: row-reverse; }
.m .avslot { width: 28px; flex: 0 0 28px; }
.m .bub { padding: 8px 12px; border-radius: 18px; background: var(--bubble); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; }
.m.mine .bub { background: var(--pc); color: var(--pc-on); }
.m.first .bub { border-top-left-radius: 18px; }
.m:not(.mine).grouped .bub { border-top-left-radius: 6px; }
.m:not(.mine).cont .bub { border-bottom-left-radius: 6px; }
.m.mine.grouped .bub { border-top-right-radius: 6px; }
.m.mine.cont .bub { border-bottom-right-radius: 6px; }
.m .who { font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 3px 36px; }
.m .meta { font-size: 11px; color: var(--faint); margin: 3px 6px 6px; }
.m.mine .meta { text-align: right; }
.mwrap { display: flex; flex-direction: column; }
.mwrap.mine { align-items: flex-end; }
.m .tools { position: absolute; top: -16px; right: 6px; display: none; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); z-index: 2; }
.m.mine .tools { right: auto; left: 6px; }
.m:hover .tools, .m:focus-within .tools { display: flex; animation: popIn 0.15s var(--ease); }
.tools button { width: 28px; height: 28px; border-radius: 50%; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: transform 0.15s var(--spring), background 0.15s; }
.tools button:hover { background: var(--hover); transform: scale(1.2); }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 2px 36px; }
.mwrap.mine .reacts { margin: 4px 0 2px; justify-content: flex-end; }
.react { height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; transition: transform 0.15s var(--spring); }
.react:hover { transform: scale(1.06); }
.react.me { border-color: var(--pc); background: var(--pc-soft2); color: var(--pc); font-weight: 600; }
.m.pop .bub { animation: bubIn 0.35s var(--spring); }
@keyframes bubIn { from { opacity: 0; transform: translateY(10px) scale(0.9); } }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 18px; background: var(--bubble); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea.input { flex: 1 1 auto; width: auto; resize: none; height: 44px; min-height: 44px; max-height: 140px; padding: 11px 16px; border-radius: 22px; line-height: 1.4; }
.composer .send { width: 44px; height: 44px; border-radius: 50%; padding: 0; flex: 0 0 auto; }
.composer .send:not(:disabled) { animation: popIn 0.2s var(--spring); }
.chat-empty { margin: auto; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- chat, redesigned: fills the window, quiet list, roomy thread ---------- */
.content.fit { display: flex; flex-direction: column; height: calc(100dvh - 60px - var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) - var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); min-height: 540px; max-width: 1440px; padding-block: 24px; }
.content.fit > .phead, .content.fit > .page-head, .content.fit > .tabs, .content.fit > div:not(.chat) { flex: 0 0 auto; }
.content.fit > .chat { flex: 1 1 auto; min-height: 0; height: auto; }
.chat { grid-template-columns: 320px minmax(0, 1fr); border-radius: 20px; box-shadow: 0 1px 2px rgba(16, 32, 25, 0.04), 0 12px 32px -18px rgba(16, 32, 25, 0.18); }
.clist { padding: 0; gap: 0; background: color-mix(in srgb, var(--ghost) 55%, var(--card)); overflow: hidden; display: flex; flex-direction: column; }
.clist-h { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 18px 10px; }
.clist-h b { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.csearch { display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--faint); transition: border-color 0.15s, box-shadow 0.15s; }
.csearch:focus-within { border-color: color-mix(in srgb, var(--pc) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 12%, transparent); }
.csearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); }
.cscroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 1px; }
.clabel { font-size: 12px; font-weight: 600; color: var(--faint); padding: 14px 10px 6px; }
.citem { padding: 9px 10px; border-radius: 12px; gap: 11px; }
.citem.on { background: var(--card); box-shadow: 0 1px 2px rgba(16, 32, 25, 0.06), 0 0 0 1px var(--line); }
.citem .ci { width: 36px; height: 36px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.citem.on .ci { background: var(--pc-soft); border-color: var(--pc-line); color: var(--pc); }
.citem .n { font-weight: 600; align-items: baseline; }
.citem .nn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem .nl { display: flex; align-items: center; gap: 8px; margin-top: 1px; }
.citem .l { flex: 1; min-width: 0; }
.citem.unread .nn { color: var(--ink); }
.cswitch-wrap { max-width: none; padding: 12px 10px 6px; }
.cswitch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border-radius: 14px; text-align: left; transition: background 0.15s; }
.cswitch:hover, .cswitch[aria-expanded="true"] { background: var(--hover); }
.cswitch b { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cswitch > .ico { color: var(--muted); }
.cswitch-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cswitch-wrap .pdrop { left: 10px; right: 10px; top: calc(100% - 2px); }
.cswitch.cs-fixed, .cswitch.cs-fixed:hover { background: none; cursor: default; }
/* phone: the project tabs sit above a project's chat, so they keep the page's side gutter */
.chats-page > .tabs { margin: 0; padding: 0 16px; }
@media (max-width: 900px) {
  .chats-page .clist, .chats-page .thread { min-width: 0; overflow: hidden; }
  /* the phone top bar already names the project */
  .chats-page .cswitch-wrap:has(.cs-fixed) { display: none; }
  .chats-page .clist .csearch { margin-top: 14px; }
}
/* the Chats page fills everything right of the sidebar and under the top bar: no gutters, no outer frame.
   Three tones tell the parts apart: sidebar, conversation list on the page colour, the open chat on white */
.content.fit.chats-page { max-width: none; padding: 0; height: calc(100dvh - 60px - var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) - var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
.chats-page > .chat { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.chats-page .clist { background: var(--ghost); overflow: visible; border-right: 0; }
.chats-page .thread { background: var(--card); overflow: visible; }
.th-top { display: none; }
@media (min-width: 901px) {
  .app.chats-top .main > .top { display: none; }
  .app.chats-top .content.fit.chats-page { height: 100dvh; }
  .chats-page .thread-h { min-height: 72px; padding-right: max(24px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
  .th-top { margin-left: auto; position: relative; display: flex; align-items: center; gap: 6px; }
  .th-top .bell-pop { top: 52px; right: 0; }
  .chats-page .cswitch-wrap { padding-top: 14px; }
}
.cmenu { width: auto; padding: 8px; gap: 0; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(20, 22, 18, 0.35), 0 2px 6px rgba(20, 22, 18, 0.06); }
.cm-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cm-h .num { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--grey-bg); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; }
.cm-search { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--grey-bg); color: var(--muted); }
.cm-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; color: var(--ink); outline: none; }
.cm-search:focus-within { box-shadow: inset 0 0 0 1px var(--box-on); }
.cm-list { display: flex; flex-direction: column; gap: 2px; max-height: min(420px, 55vh); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.cm-list::-webkit-scrollbar { width: 6px; }
.cm-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.cm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px 8px 8px; border-radius: 12px; text-align: left; }
.cm-row:hover { background: var(--hover); }
.cm-row.on { background: var(--brand-soft); }
.cm-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cm-row .grow b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-row .grow small { font-size: 12.5px; color: var(--muted); }
.cm-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cm-on { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--ghost); display: inline-flex; align-items: center; justify-content: center; }
.cm-empty { padding: 14px 10px; font-size: 13.5px; color: var(--muted); }
.cm-new { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 12px 12px; border-radius: 12px; border-top: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--ink); }
.cm-new:hover { background: var(--hover); }
@media (max-width: 900px) { .chats-page .thread { border-radius: 0; } }
.cs-all { width: 32px; height: 32px; border-radius: 10px; background: var(--grey-bg); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cs-all.big { width: 36px; height: 36px; }
/* approvals in the Chats frame */
.chat.ap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; align-items: stretch; }
.ap-col { display: flex; flex-direction: column; }
.ap-seg { margin: 4px 14px 10px; display: flex; }
.ap-seg button { flex: 1; justify-content: center; }
.chats-page .ap-list { position: static; max-height: none; margin: 0; padding: 0 10px 12px; gap: 2px; }
.chats-page .ap-row { border: 0; padding: 12px; border-radius: 12px; }
.chats-page .ap-row:hover { background: var(--hover); }
.chats-page .ap-row.on { background: var(--card); box-shadow: none; }
.ap-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sub em { font-style: normal; font-weight: 600; }
.ap-sub em.ok { color: var(--green); } .ap-sub em.no { color: var(--amber); }
.ap-none { padding: 18px 14px; font-size: 14px; color: var(--muted); }
.ap-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ap-h { gap: 10px; }
.ap-h .ap-meta { margin: 0; }
.ap-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.ap-body { max-width: 760px; margin: 0 auto; padding: 32px 32px 24px; display: flex; flex-direction: column; gap: 22px; }
.ap-body h2 { font-family: var(--display); font-size: 28px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.ap-body { gap: 26px; }
.ap-msg { display: flex; gap: 14px; align-items: flex-start; }
.ap-msg .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ap-msg-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ap-msg-h b { font-size: 15px; font-weight: 600; }
.ap-msg-h small { font-size: 13px; color: var(--muted); }
.ap-msg .ap-note { margin: 0; border-radius: 4px 18px 18px 18px; }
.ap-note.quiet { background: var(--grey-bg); color: var(--muted); font-size: 14.5px; }
.chats-page .ap-act.ap-reply { display: flex; flex-direction: column; gap: 0; margin: 0 0 0 58px; width: auto; max-width: none; padding: 6px 8px 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); transition: border-color 0.15s; }
.chats-page .ap-act.ap-reply:focus-within { border-color: var(--box-on); }
.ap-reply textarea { width: 100%; min-height: 52px; max-height: 200px; border: 0; background: none; resize: none; padding: 10px 10px 6px; font-size: 15px; line-height: 1.5; color: var(--ink); outline: none; }
.ap-reply textarea::placeholder { color: var(--faint); }
.ap-reply .ap-btns { margin: 0; gap: 8px; }
.ap-reply .ap-btns .btn { height: 40px; padding: 0 16px; border-radius: 12px; }
.chats-page .ap-act { position: static; margin: 0 auto; width: 100%; max-width: 760px; padding: 14px 32px 22px; border: 0; border-radius: 0; background: none; }
.chats-page .ap-act textarea.input { min-height: 56px; border-radius: 16px; resize: none; }
.ap-out-row { gap: 6px; }
.ap-out-row .ap-out { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; }
.ap-out-row p { font-size: 14px; color: var(--ink-2); }
.ap-pane .ap-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px; }
.ap-pane .ap-empty b { font-size: 18px; }
.clist-foot { display: flex; align-items: center; gap: 7px; padding: 12px 18px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--faint); }
.thread-h { padding: 12px 20px; gap: 12px; min-height: 66px; }
.thread-h .back-conv { display: none; margin-left: -8px; }
.ci.big { width: 40px; height: 40px; border-radius: 12px; background: var(--pc-soft); color: var(--pc); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.th-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.th-t b { font-size: 16px; font-weight: 650; }
.th-t span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-avs .avs { padding-left: 4px; }
.msgs { padding: 0; display: block; background: var(--card); }
.msgs-in { max-width: 860px; margin: 0 auto; min-height: 100%; padding: 20px 28px 12px; display: flex; flex-direction: column; gap: 2px; }
.day { align-self: stretch; display: flex; align-items: center; gap: 12px; background: none; padding: 0; margin: 18px 0 10px; font-size: 12px; font-weight: 600; color: var(--faint); border-radius: 0; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.m .bub { padding: 9px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; max-width: 100%; }
.m { max-width: 72%; width: fit-content; }
.m .tools { top: 50%; right: auto; left: calc(100% + 6px); transform: translateY(-50%); white-space: nowrap; box-shadow: 0 4px 14px -6px rgba(16, 32, 25, 0.25); }
.m:hover .tools, .m:focus-within .tools { animation: none; }
.m .tools::before { content: ""; position: absolute; top: -10px; bottom: -10px; left: -12px; width: 12px; }
.m.pop .bub { animation: bubIn 0.3s var(--ease); }
.composer { border-top: 0; padding: 4px 20px 14px; display: block; }
.cbox { max-width: 860px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 6px 18px -12px rgba(16, 32, 25, 0.2); transition: border-color 0.15s, box-shadow 0.15s; }
.cbox:focus-within { border-color: color-mix(in srgb, var(--pc) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 10%, transparent); }
.cbox textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.5; padding: 7px 0; max-height: 160px; color: var(--ink); }
.cbox .send-btn { margin-left: 0; }
.cbox .send-btn.ready { background: var(--pc); color: var(--pc-on); }
.cbox-hint { max-width: 860px; margin: 6px auto 0; padding-left: 16px; font-size: 11.5px; color: var(--faint); }
.locked-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 16px; border-top: 1px solid var(--line-2); }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- research, redesigned: timeline on the left, one calm column on the right ---------- */
.rs { grid-template-columns: 232px minmax(0, 1fr); gap: 36px; }
.rsteps { position: sticky; top: calc(76px + var(--phead-h, 0px)); display: flex; flex-direction: column; gap: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.rsteps-h { font-size: 12px; font-weight: 600; color: var(--faint); padding: 0 10px 10px; }
.rstep { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; transition: background 0.15s; }
.rstep:hover { background: var(--hover); }
.rstep.on { background: var(--card); box-shadow: 0 1px 2px rgba(16, 32, 25, 0.06), 0 0 0 1px var(--line); }
.rstep:not(:last-child)::after { content: ""; position: absolute; left: 23px; top: 38px; height: 26px; width: 2px; border-radius: 2px; background: var(--line); }
.rstep.done:not(:last-child)::after { background: var(--pc); }
.rnum { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.rstep.done .rnum { background: var(--pc); color: var(--pc-on); box-shadow: none; }
.rstep.cur .rnum { color: var(--pc); box-shadow: inset 0 0 0 2px var(--pc); }
.rstep.later .rnum { color: var(--faint); background: var(--grey-bg); box-shadow: none; }
.rtxt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.rtxt b { font-size: 14.5px; font-weight: 600; }
.rtxt small { font-size: 12px; color: var(--muted); }
.rstep.later .rtxt b { color: var(--muted); font-weight: 500; }
.rstep.on .rtxt b { color: var(--pc); }
.step-panel { gap: 20px; }
.rhead { display: flex; flex-direction: column; gap: 4px; }
.rkick { font-size: 13px; font-weight: 500; color: var(--muted); }
.rhead h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.rguide { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.rguide-h { display: flex; align-items: center; gap: 10px; }
.rguide-h b { flex: 1; font-size: 14.5px; font-weight: 650; }
.rguide-h .icon-btn { width: 30px; height: 30px; color: var(--faint); margin: -4px -6px -4px 0; }
.rg-i { width: 28px; height: 28px; border-radius: 8px; background: var(--pc-soft); color: var(--pc); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.rg-learn { font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 70ch; }
.rg-why { font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.rg-why b { color: var(--ink-2); font-weight: 600; }
.rg-ex { padding: 12px 14px; border-radius: 12px; background: var(--ghost); font-size: 14px; line-height: 1.55; animation: rise 0.25s var(--ease); }
.rg-ex b { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.rg-exbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--pc); border-radius: 6px; }
.rg-exbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.rguide-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.rguide-open:hover { background: var(--hover); }
.rguide-open .ico:first-child { color: var(--pc); }
.rprog { display: flex; flex-direction: column; gap: 10px; }
.rprog-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.rprog-top b { color: var(--ink); font-weight: 650; }
.rules-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13.5px; color: var(--ink-2); }
.rules-line span { font-weight: 600; color: var(--muted); margin-right: 2px; }
.rules-line i { font-style: normal; color: var(--faint); }
.screen-card { padding: 28px 30px; gap: 10px; border-radius: 20px; box-shadow: 0 1px 2px rgba(16, 32, 25, 0.04), 0 14px 34px -20px rgba(16, 32, 25, 0.2); }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.sc-oa { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 600; }
.screen-card h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.3; max-width: 34em; margin-top: 4px; }
.sc-meta { font-size: 13.5px; color: var(--muted); }
.screen-card .ab { font-size: 15.5px; line-height: 1.7; max-width: 68ch; margin-top: 4px; }
.decide { gap: 10px; margin-top: 14px; }
.decide .btn { height: 50px; border-radius: 14px; font-size: 15px; background: var(--card); border: 1px solid var(--line); box-shadow: none; }
.decide .btn:hover { background: var(--hover); filter: none; box-shadow: none; }
.decide .btn-out { color: var(--red); }
.decide .btn-maybe { color: var(--amber); }
.decide .btn-keep { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.decide .btn-keep:hover { background: color-mix(in srgb, var(--green) 88%, var(--ink)); }
.decide kbd { border-color: currentColor; opacity: 0.55; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- Today ---------- */
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.tmain { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.tnext { padding: 24px 26px 22px; display: flex; flex-direction: column; gap: 6px; border-radius: 20px; box-shadow: 0 1px 2px rgba(16, 32, 25, 0.04), 0 14px 34px -22px rgba(16, 32, 25, 0.22); }
.tnext-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tnext h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.tnext p { font-size: 15px; color: var(--muted); margin-top: 4px; max-width: 56ch; }
.tsegs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.tseg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tseg-bar { height: 6px; border-radius: 6px; background: var(--grey-bg); position: relative; overflow: hidden; }
.tseg.done .tseg-bar { background: var(--data); }
.tseg.cur .tseg-bar { background: color-mix(in srgb, var(--data) 30%, var(--grey-bg)); }
.tseg.cur .tseg-bar::after { content: ""; position: absolute; inset: 0 50% 0 0; border-radius: 6px; background: var(--data); }
.tseg-n { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tseg.done .tseg-n { color: var(--muted); }
.tseg.cur .tseg-n { color: var(--ink); font-weight: 600; }
.tsec-main { display: flex; flex-direction: column; gap: 12px; }
.tpapers { padding: 20px 22px 18px; }
.tflow { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 10px; }
.tflow li { display: flex; align-items: center; }
.tflow li + li::before { content: ""; width: 18px; height: 1px; background: var(--line); margin: 0 4px; }
.tflow button { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border-radius: 12px; text-align: left; transition: background 0.15s; }
.tflow button:hover { background: var(--hover); }
.tflow b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.tflow span { font-size: 12.5px; color: var(--muted); }
.tflow li:nth-child(4) b { color: var(--green); }
.tflow li:last-child b { color: var(--pc); }
.tside { padding: 6px 20px; display: flex; flex-direction: column; }
.tside > section { padding: 16px 0 12px; }
.tside > section + section { border-top: 1px solid var(--line-2); }
.tside .dsec-h h2 { font-size: 15px; }
.tside-sub { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.tmem { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.tmem .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.tmem b { font-size: 14px; font-weight: 600; }
.tmem small { font-size: 12.5px; color: var(--muted); }
.tmem-n { font-size: 12.5px; color: var(--muted); }
.tact { display: flex; gap: 10px; padding: 9px 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.tact + .tact { border-top: 1px solid var(--line-2); }
.tact .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tact b { color: var(--ink); font-weight: 600; }
.tact small { font-size: 12px; color: var(--faint); }
@media (max-width: 1100px) { .tgrid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .tseg-n { display: none; } .tnext h2 { font-size: 22px; } .tnext .btn { width: 100%; } .tflow li + li::before { display: none; } .tflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* project header: quiet and the same on every project screen */
/* the header stays pinned under the top bar while the page scrolls, so you always see which project you are in */
.phead { position: sticky; top: calc(60px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0 16px; margin: -16px 0 24px; border-bottom: 1px solid var(--line); background: var(--ghost); }
.phead::before { content: ""; position: absolute; top: 0; bottom: -1px; left: calc(-1 * max(32px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))); right: calc(-1 * max(32px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))); background: var(--ghost); z-index: -1; }
.phead.stuck::after { content: ""; position: absolute; left: calc(-1 * max(32px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))); right: calc(-1 * max(32px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))); bottom: -1px; height: 12px; transform: translateY(100%); background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 6%, transparent), transparent); pointer-events: none; }
.phead-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 360px; }
.phead-txt { min-width: 0; }
.phead h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phead-meta { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.phead-meta span + span::before { content: "·"; margin-right: 8px; color: var(--faint); }
.phead-acts { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.phead-team { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 2px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); transition: background 0.15s; }
.phead-team:hover { background: var(--hover); }
.phead-prog { position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--data); transition: width 0.6s var(--ease); }
.content.fit .phead { margin-bottom: 18px; padding-bottom: 14px; }
/* team */
.person { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.person:first-child { border-top: 0; }
.person .grow { flex: 1 1 200px; min-width: 0; }
.person select.input { width: auto; height: 36px; font-size: 13px; }

/* project tabs in the Dashboard's language: display-type headings, 24px cards, tinted number cards, flat buttons */
.phead h1 { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.tab { font-weight: 500; }
.phead-meta, .seg button { color: var(--ink-2); }
.m .meta { color: var(--muted); }
.tm .ex-set .link-btn { margin-top: auto; padding: 14px 0 8px; align-self: flex-start; }
.tab.on { font-weight: 650; }
/* Overview */
/* two columns: the research itself on the left (where it stands, the question, the papers), the people on the right (what needs you, what happened) */
.ovw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 16px; align-items: start; }
.ov-main, .ov-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-box { background: var(--card); border-radius: 24px; padding: 24px; min-width: 0; }
.ov-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ov-h h2 { font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.ov-h .num { font-size: 13px; font-weight: 600; color: var(--muted); }
.ov-link { font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ov-link:hover { color: var(--ink); }
/* where the research stands: the phase you are in, one action, and every phase on one line */
.ov-now { background: var(--peak); color: var(--peak-fg); border-radius: 24px; padding: 28px 28px 24px; }
.ov-now-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ov-now-t { font-family: var(--display); font-size: 40px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.ov-now-m { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 10px; font-size: 14.5px; color: color-mix(in srgb, var(--peak-fg) 74%, var(--peak)); }
.ov-now-m span:not(:last-child)::after { content: "·"; margin-left: 8px; }
.ov-now-m .late { color: var(--red); font-weight: 650; }
.ov-now .dh-go { margin-top: 0; flex: none; }
.ov-segs { margin-top: 28px; }
.ov-segs .tseg-bar { background: color-mix(in srgb, var(--peak-fg) 12%, var(--peak)); }
.ov-segs .tseg.done .tseg-bar { background: var(--peak-fg); }
.ov-segs .tseg.cur .tseg-bar { background: color-mix(in srgb, var(--peak-fg) 12%, var(--peak)); }
.ov-segs .tseg.cur .tseg-bar::after { background: var(--peak-fg); }
.ov-segs .tseg-n { font-size: 12.5px; color: color-mix(in srgb, var(--peak-fg) 52%, var(--peak)); }
.ov-segs .tseg.done .tseg-n { color: color-mix(in srgb, var(--peak-fg) 74%, var(--peak)); }
.ov-segs .tseg.cur .tseg-n { color: var(--peak-fg); font-weight: 650; }
/* the research question, with the rules every paper is judged by */
.ov-q { font-size: 18px; line-height: 1.5; color: var(--ink); text-wrap: pretty; max-width: 68ch; }
.ov-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin-top: 20px; }
.ov-rules h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.ov-rules li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); padding: 3px 0; }
.ov-rules .ico { flex: none; margin-top: 2px; }
.ov-keep .ico { color: var(--green); }
.ov-out .ico { color: var(--red); }
.ov-empty { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); }
/* papers read left to right like a PRISMA flow: found, copies removed, still to screen, kept, in the table */
.ov-flow { display: flex; align-items: stretch; }
.ov-flow li { flex: 1 1 0; min-width: 0; display: flex; align-items: stretch; }
.ov-flow li + li::before { content: ""; flex: none; width: 1px; align-self: stretch; margin: 8px 0; background: var(--line-2); }
.ov-flow button { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 10px 16px; border-radius: 16px; text-align: left; transition: background 0.15s; }
.ov-flow li:first-child button { padding-left: 0; }
.ov-flow b { font-family: var(--display); font-size: 36px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.ov-flow span { font-size: 13.5px; line-height: 1.3; color: var(--ink-2); }
.ov-flow .kept b { color: var(--green); }
.ov-flow .todo b { color: var(--ink); }
/* what needs you: the real items, each with the one thing to do */
.ov-you { display: flex; flex-direction: column; margin: 0 -10px; }
.ov-you button { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-align: left; min-width: 0; transition: background 0.15s; }
.ov-you .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ov-you small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-you small.bad { color: var(--red); font-weight: 600; }
.ov-you b { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ov-you em { flex: none; font-style: normal; font-size: 13px; font-weight: 650; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--grey-bg); display: inline-flex; align-items: center; }
.ov-calm { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
/* recent activity: one line each */
.ov-acts { display: flex; flex-direction: column; gap: 2px; }
.ov-acts li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; min-width: 0; }
.ov-acts .t { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-acts .t b { color: var(--ink); font-weight: 600; }
.ov-acts time { flex: none; font-size: 12.5px; color: var(--muted); }
/* Research plan */
.pc-grid { gap: 14px; }
.pc-card { border-radius: 24px; padding: 18px 18px 16px; }
.pc-card:hover, .pw-row:hover, .plb-card:hover { box-shadow: none; border-color: var(--pc-line); }
.pc-pct { font-size: 40px; letter-spacing: -0.05em; line-height: 0.9; }
.pc-t small, .pw-t small, .plb-card p, .plb-m { color: var(--ink-2); }
.pc-t em, .plb-fl { color: color-mix(in srgb, var(--amber) 82%, var(--ink)); }
.plb-col h3 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.plb-card { border-radius: 20px; padding: 18px; border-color: transparent; gap: 6px; }
.plb-col h3 span { font-family: var(--font); font-size: 14px; font-weight: 600; margin-left: 4px; }
.plb-ft { border-top: 0; padding-top: 10px; }
/* List: one white panel, groups named in plain words, rows set apart by space and a hover tone */
.pll { background: var(--card); border: 0; border-radius: 24px; padding: 10px 14px 14px; }
.pll-h { border-bottom: 0; padding: 12px 10px 4px; }
.pll-g { padding-top: 14px; }
.pll-badge, .pll-badge.st-doing, .pll-badge.st-todo, .pll-badge.st-done { background: none; color: var(--ink); padding: 0; height: auto; font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.pll-gh .num { font-size: 13px; font-weight: 600; }
.pll-r { border-bottom: 0; border-radius: 12px; }
.pll-r .c-due { color: var(--ink-2); }
/* Tasks */
.kan { gap: 14px; }
.kcol { border-radius: 24px; padding: 12px; gap: 10px; }
.kcol-h { padding: 6px 8px 4px; font-family: var(--display); font-size: 18px; font-weight: 650; letter-spacing: -0.015em; }
.kcol-h .num { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tcard { border-radius: 18px; padding: 14px; box-shadow: none; transition: transform 160ms var(--ease), border-color 0.2s; }
.tcard:hover { transform: none; box-shadow: none; border-color: var(--pc-line); }
.tcard:active { transform: scale(0.98); }
.tcard .tm { color: var(--ink-2); }
.kempty { font-size: 13.5px; color: var(--ink-2); padding: 8px; }
/* Tasks: the plan's top row, quiet columns named in plain words, borderless cards that say who and when */
.tk-top { margin-bottom: 20px; }
.tk-q { flex: 0 1 260px; max-width: 260px; }
.tk-q .input { height: 42px; border-radius: 999px; border-color: transparent; background: var(--card); }
.tk-q svg { top: 13px; left: 14px; }
.tk-q .input { padding-left: 40px; }
.kcol { padding: 10px; gap: 8px; }
.kcol-h { padding: 8px 10px 6px; font-size: 17px; justify-content: flex-start; gap: 10px; align-items: baseline; }
.kcol-h .num { color: var(--muted); }
.tcard { border-color: transparent; gap: 10px; padding: 16px; }
.tcard:hover { border-color: transparent; }
.tcard .tt { font-size: 15px; font-weight: 600; line-height: 1.35; }
.tcard .tm { gap: 10px; font-size: 13px; }
.tdue { color: var(--ink-2); }
.tdue.late { color: var(--red); font-weight: 600; }
.tcm { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); }
.tflag { align-self: flex-start; font-size: 12.5px; font-weight: 650; }
.tflag.stuck { color: var(--red); }
.tflag.changes { color: color-mix(in srgb, var(--amber) 82%, var(--ink)); }
.tcard .tnote { border-radius: 12px; color: color-mix(in srgb, var(--amber) 82%, var(--ink)); }
.kempty { padding: 4px 10px 10px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .tcard:hover { background: color-mix(in srgb, var(--card) 70%, var(--hover)); } }
@media (max-width: 760px) { .tk-q { flex: 1 1 100%; max-width: none; order: -1; } .pl-tools { flex-wrap: wrap; } }
/* Chat */
.chat { border-radius: 24px; box-shadow: none; border: 1px solid var(--line); }
.clist { background: var(--grey-bg); }
.clist-h b { font-family: var(--display); font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.citem.on { box-shadow: none; background: var(--card); }
.citem .ci, .citem.on .ci { background: none; border: 0; width: 36px; color: var(--ink-2); }
.citem.on .ci { color: var(--pc); }
.citem .n time, .clabel, .clist-foot, .day, .cbox-hint { color: var(--muted); }
.citem .l { color: var(--ink-2); }
.cbox { box-shadow: none; }
.ci.big { background: var(--pc-soft2); }
/* Team */
/* person cards: who and their role on top, what they are on right now in the middle, how much is open at the foot */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tm-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 24px; background: var(--card); min-width: 0; }
.tm-card.lead { background: var(--pc-soft2); }
.tm-card.pend { background: transparent; outline: 1.5px dashed var(--line); outline-offset: -1.5px; }
.tm-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tm-name { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-rl { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
/* the role reads as text with a caret; the select is the real control */
.tm-rsel { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-left: -6px; padding: 2px 6px; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: background 0.15s; }
.tm-rsel select { appearance: none; field-sizing: content; border: 0; background: none; font: inherit; color: inherit; padding-right: 2px; cursor: pointer; outline: 0; }
.tm-rsel:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.tm-rsel .ico { color: var(--muted); pointer-events: none; }
.tm-x { flex: none; align-self: flex-start; color: var(--muted); margin: -6px -8px 0 0; opacity: 0; transition: opacity 0.15s; }
.tm-card:hover .tm-x, .tm-x:focus-visible { opacity: 1; }
@media (hover: none) { .tm-x { opacity: 1; } }
.tm-mailico { width: 44px; height: 44px; border-radius: 50%; background: var(--grey-bg); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.tm-now { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--grey-bg); text-align: left; min-width: 0; transition: background 0.15s; }
.lead .tm-now { background: color-mix(in srgb, var(--card) 70%, transparent); }
.tm-now small { font-size: 12.5px; color: var(--ink-2); }
.tm-now b { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-now.bad small { color: var(--red); font-weight: 600; }
.tm-now.warn small { color: color-mix(in srgb, var(--amber) 82%, var(--ink)); font-weight: 600; }
.tm-now.free b { color: var(--ink-2); font-weight: 500; }
.pend .tm-now { background: none; padding: 0; }
.tm-load { display: flex; align-items: baseline; gap: 14px; margin-top: auto; font-size: 13px; color: var(--ink-2); min-width: 0; }
.tm-load b { font-size: 15px; font-weight: 700; color: var(--ink); }
.tm-load .tm-mail { margin-left: auto; min-width: 0; color: var(--muted); }
.tm-mail { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-cancel { align-self: flex-start; margin-top: auto; font-size: 13px; color: var(--ink-2); }
.tm-confirm { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--red-bg); }
/* invite and Explore: two white panels under the people */
.tm-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-top: 28px; align-items: stretch; }
.tm-box { background: var(--card); border-radius: 24px; padding: 24px; min-width: 0; display: flex; flex-direction: column; }
.tm-h { font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.tm-sub { font-size: 14px; color: var(--ink-2); margin: 4px 0 18px; }
.tm-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.tm-line .lbl { width: 48px; flex: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.tm-line .url { flex: 1 1 200px; min-width: 0; height: 42px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--grey-bg); font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-line .input { height: 42px; }
.tm-line #iemail { flex: 1 1 200px; min-width: 0; }
.tm-line select.input { flex: 0 1 170px; }
.tm-line .btn-sm { height: 42px; padding: 0 16px; }
.tm-line .err { flex: 1 1 100%; padding-left: 58px; }
.tm-prev { align-self: flex-start; margin-top: 12px; font-size: 13px; gap: 6px; color: var(--ink-2); }
.tm .ex-set { padding: 24px 24px 12px; }
.tm .ex-set .tm-h { margin-bottom: 4px; }
.tm .ex-sw .hint { color: var(--ink-2); }
.tm-leave { margin-top: 28px; padding: 20px 24px; flex-direction: row; }
@media (hover: hover) and (pointer: fine) {
  .ov-flow button:hover, .ov-you button:hover { background: var(--hover); }
  button.tm-now:hover { background: var(--hover); }
  .tm-rsel:hover { background: var(--hover); }
}
@media (max-width: 1100px) {
  .ovw { grid-template-columns: minmax(0, 1fr); }
  /* one column: what needs you comes right after where the research stands */
  .ov-main, .ov-side { display: contents; }
  .ov-now { order: 1; } .ov-side > :first-child { order: 2; } .ov-qbox { order: 3; } .ov-papers { order: 4; } .ov-side > :last-child { order: 5; }
}
@media (max-width: 900px) { .tm-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .phead h1 { font-size: 22px; }
  .ov-box { padding: 20px; border-radius: 20px; }
  .ov-now { padding: 22px 20px 20px; border-radius: 20px; }
  .ov-now-t { font-size: 30px; }
  .ov-now .dh-go { width: 100%; justify-content: center; }
  .ov-segs .tseg-n { display: none; }
  .ov-q { font-size: 16px; }
  .ov-rules { grid-template-columns: minmax(0, 1fr); }
  .ov-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .ov-flow li + li::before { display: none; }
  .ov-flow button, .ov-flow li:first-child button { padding: 10px 0; }
  .ov-flow b { font-size: 30px; }
  .tm-grid { grid-template-columns: minmax(0, 1fr); }
}

/* overlays */
.ov { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.ov.anim { animation: fade 0.2s ease-out; }
.modal { background: var(--card); border-radius: 22px; width: 100%; max-width: 540px; max-height: calc(100vh - 48px); overflow: auto; box-shadow: var(--shadow-lg); }
.ov.anim .modal { animation: popIn 0.28s var(--ease); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-h h2 { font-size: 18px; font-weight: 700; }
.modal-b { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
/* new project: one quiet screen, no dividers, the name as the headline */
.np-h { display: flex; align-items: center; justify-content: space-between; padding: 22px 18px 4px 28px; }
.np-h h2 { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.np-b { padding: 6px 28px 8px; display: flex; flex-direction: column; gap: 26px; }
.np-name { width: 100%; border: 0; border-bottom: 1.5px solid var(--line); background: none; padding: 6px 0 12px; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); border-radius: 0; transition: border-color 0.2s; }
.np-name::placeholder { color: var(--faint); }
.np-name:focus { outline: none; border-bottom-color: var(--ink); }
.np-name.bad { border-bottom-color: var(--red); }
.np-name + .err { margin-top: -18px; }
.np-sec { display: flex; flex-direction: column; gap: 10px; }
.np-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.np-grid { display: grid; gap: 8px; }
.np-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.np-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np-title { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; margin-bottom: 6px; }
.np-title::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--pid); flex: none; }
.np-link { display: flex; gap: 8px; align-items: center; }
.np-link .url { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--grey-bg); font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-link .input { flex: 1; min-width: 0; height: 44px; }
.np-link .btn { height: 44px; flex: none; }
.np-sent { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.np-sent li { display: flex; align-items: center; gap: 8px; }
.np-sent .ico { color: var(--green); }
/* step 1 to step 2: the content slides in once, the window stays where it is */
.np.np-in .np-b, .np.np-in .np-h h2, .np.np-in .np-f { animation: npIn 0.32s var(--ease) both; }
@keyframes npIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .np.np-in .np-b, .np.np-in .np-h h2, .np.np-in .np-f { animation: none; } }
.np-opt { min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; color: var(--ink-2); text-align: center; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-opt:hover { border-color: color-mix(in srgb, var(--line) 40%, var(--faint)); color: var(--ink); }
.np-opt.on { background: var(--brand-soft); border-color: var(--ink); color: var(--ink); font-weight: 600; }
.np-other { height: 44px; }
.np-plan { font-size: 13px; color: var(--muted); line-height: 1.5; }
.np-sw { display: flex; gap: 10px; flex-wrap: wrap; }
.np-sw .swatch { width: 28px; height: 28px; transition: none; }
.np-sw .swatch:hover { transform: none; }
.np-f { padding: 18px 28px 26px; display: flex; }
.np-go { width: 100%; height: 50px; justify-content: center; border-radius: 14px; font-size: 15px; }
@media (max-width: 560px) { .np-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .np-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .np-b, .np-f { padding-left: 20px; padding-right: 20px; } .np-h { padding-left: 20px; } }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--card); }
.wiz-steps { display: flex; gap: 8px; }
.wiz-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.wiz-steps span.on { background: var(--ink); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--pid); display: flex; align-items: center; justify-content: center; color: var(--pid-on); transition: transform 0.2s var(--spring), box-shadow 0.2s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--pid); }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-fg); padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; z-index: 60; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast.in { animation: toastIn 0.35s var(--spring); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(0.95); } }
.toast .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.toast .logo { margin-block: -6px; }
.cel-drop { margin: 6px 0 2px; }
.toast button { font-weight: 700; padding: 4px 10px; border-radius: 8px; background: color-mix(in srgb, var(--toast-fg) 14%, transparent); }
.celebrate { text-align: center; padding: 36px 26px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; overflow: hidden; }
.trophy { width: 88px; height: 88px; border-radius: 50%; background: var(--pc); color: var(--pc-on); display: flex; align-items: center; justify-content: center; animation: pop 0.55s var(--spring); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(620deg); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.95) translateY(6px); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* page entrance: only when you move to a new page */
.enter .content > .ka > *, .enter .auth > *, .enter .pub > * { animation: rise 0.42s var(--ease) both; }
.enter .content > .ka > *:nth-child(2), .enter .auth > *:nth-child(2), .enter .pub > *:nth-child(2) { animation-delay: 0.05s; }
.enter .content > .ka > *:nth-child(3), .enter .auth > *:nth-child(3), .enter .pub > *:nth-child(3) { animation-delay: 0.1s; }
.enter .content > .ka > *:nth-child(n+4), .enter .pub > *:nth-child(n+4) { animation-delay: 0.15s; }
.enter .proj-grid > *, .enter .stack-v > *, .enter .col > * { animation: rise 0.45s var(--ease) both; }
.enter .proj-grid > *:nth-child(2), .enter .stack-v > *:nth-child(2), .enter .col > *:nth-child(2) { animation-delay: 0.06s; }
.enter .proj-grid > *:nth-child(3), .enter .stack-v > *:nth-child(3), .enter .col > *:nth-child(3) { animation-delay: 0.12s; }
.enter .proj-grid > *:nth-child(n+4), .enter .stack-v > *:nth-child(n+4), .enter .col > *:nth-child(n+4) { animation-delay: 0.18s; }
.enter .ask-empty > * { animation: rise 0.45s var(--ease) both; }
.enter .ask-empty > *:nth-child(2) { animation-delay: 0.06s; } .enter .ask-empty > *:nth-child(3) { animation-delay: 0.12s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* find papers */
.fp { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.fp-search { position: relative; }
.fp-search > svg { position: absolute; left: 16px; top: 17px; color: var(--faint); pointer-events: none; }
.fp-search .input { height: 56px; padding: 0 52px 0 48px; font-size: 17px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.fp-search .clear { position: absolute; right: 8px; top: 8px; }
.fp-card { padding: 18px 20px; display: flex; gap: 16px; border-top: 1px solid var(--line-2); animation: rise 0.35s var(--ease) both; }
.fp-card:first-child { border-top: 0; }
.fp-card:nth-child(2) { animation-delay: 0.04s; } .fp-card:nth-child(3) { animation-delay: 0.08s; } .fp-card:nth-child(n+4) { animation-delay: 0.12s; }
.fp-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fp-card .jr { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fp-card h3 { font-size: 16.5px; font-weight: 650; line-height: 1.38; }
.fp-card .au { font-size: 13.5px; color: var(--muted); }
.fp-card .ab { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.fp-card .ab.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-acts { display: flex; flex-direction: column; gap: 8px; }
.fp-acts .icon-btn { border: 1px solid var(--line); background: var(--card); }
.fp-acts .icon-btn.saved { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.fp-dots { display: inline-flex; gap: 3px; }
.fp-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); display: inline-block; }
mark { background: color-mix(in srgb, #facc15 42%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.save-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); transition: border-color 0.2s, background 0.2s; }
.save-row.done { border-color: var(--pc-line); background: var(--pc-soft); }
.proj-switch { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 14px; }
.proj-switch::-webkit-scrollbar { display: none; }
.proj-switch .chip { flex: 0 0 auto; height: 40px; padding: 0 14px 0 10px; }
.proj-switch .badge { height: 18px; min-width: 18px; font-size: 10.5px; }
.chip.pcs.on .badge.pc { background: var(--pc-on); color: var(--pc); }
.private-note { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--pc-soft); margin-bottom: 6px; }
.private-note .ico { color: var(--pc); }
.kchips { display: none; }
/* one control for choosing a project, instead of a wall of pills */
.picker { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 480px; min-height: 52px; padding: 8px 12px 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: left; box-shadow: var(--shadow-sm); transition: border-color 0.2s, box-shadow 0.2s; }
.picker:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--faint)); box-shadow: var(--shadow); }
.picker .sw { width: 32px; height: 32px; border-radius: 9px; background: var(--pid); color: var(--pid-on); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.picker .sw.all { background: var(--grey-bg); color: var(--ink-2); }
.picker .pl { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.picker .pl small { font-size: 12px; color: var(--muted); }
.picker .pl b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker > .ico { color: var(--faint); transition: transform 0.28s var(--ease); }
.picker[aria-expanded="true"] > .ico { transform: rotate(180deg); }
.pdrop-wrap { position: relative; width: 100%; max-width: 480px; }
/* page sections animate in and become their own layers, so the one holding the picker sits above the chat below it */
.content > .ka > *:has(.pdrop-wrap) { position: relative; z-index: 6; }
.pdrop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); clip-path: inset(0 0 100% 0 round 16px); opacity: 0; visibility: hidden; transition: clip-path 0.3s var(--ease), opacity 0.2s var(--ease), visibility 0s 0.3s; }
.pdrop.open { clip-path: inset(0 0 0 0 round 16px); opacity: 1; visibility: visible; transition: clip-path 0.3s var(--ease), opacity 0.15s var(--ease), visibility 0s; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 12px; text-align: left; transition: background 0.15s; }
.pick-row:hover { background: var(--hover); }
.pick-row.on { background: var(--grey-bg); }
.pick-row .sw { width: 12px; height: 12px; border-radius: 4px; background: var(--pid); flex: 0 0 auto; }
.pick-row .sw.all { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.pick-row .grow { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; }
.pick-row .cnt { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pick-row .tick { width: 20px; color: var(--ink); }
.rv-line { font-size: 15px; color: var(--muted); margin: -12px 0 18px; }
.rv-line b { color: var(--ink); font-weight: 600; }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; justify-content: center; padding: 0 6px; }
.seg.full button span { color: var(--faint); font-variant-numeric: tabular-nums; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- paper search: the research assistant ---------- */
.ask { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.ask-empty { flex: 1; width: 100%; max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 13vh; padding-block: 2vh 12vh; padding-left: max(24px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(24px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
.ask-head { text-align: center; }
.ask-empty h1 { font-size: clamp(30px, 3.3vw, 42px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; }
/* not signed in: the reason under the big line (asked 2026-11-13) */
.ask-why { font-size: 16px; color: var(--muted); margin-top: 10px; text-wrap: balance; }
.ask-thread { flex: 1; width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; padding-block: 32px 24px; padding-left: max(24px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(24px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
.ask-dock { position: sticky; bottom: 0; z-index: 10; padding-block: 0 calc(14px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); padding-left: max(24px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(24px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); background: linear-gradient(to bottom, transparent, var(--ghost) 26px); }
.ask-dock .ask-box { max-width: 780px; margin: 0 auto; }
/* the search box: one soft card, + for filters on the left, send on the right, like the native chat apps.
   No glow ring anywhere. At rest a hairline and a low shadow; on hover the edge firms up; while typing the edge
   darkens and the shadow deepens, so the box reads as lifted toward you. Only border and shadow move. */
.ask-box {
  --ask-sh: 0 1px 2px rgba(20, 22, 18, 0.05), 0 10px 28px -18px rgba(20, 22, 18, 0.22);
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 12px 12px 20px;
  box-shadow: var(--ask-sh);
  transition: border-color 0.18s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.24s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) { .ask-box:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--faint)); } }
.ask-box:focus-within {
  --ask-sh: 0 1px 2px rgba(20, 22, 18, 0.06), 0 16px 36px -16px rgba(20, 22, 18, 0.28);
  border-color: color-mix(in srgb, var(--ink) 34%, var(--line));
}
:root[data-theme="dark"] .ask-box { --ask-sh: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 30px -16px rgba(0, 0, 0, 0.6); }
:root[data-theme="dark"] .ask-box:focus-within { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
/* bigger / smaller: a small corner button above send, shown once the question is long */
/* the text column stops short of the corner button, so a long question's scrollbar runs beside it, never under it */
.ask-box textarea { width: calc(100% - 36px) !important; padding-right: 6px !important; }
/* the box's own scrollbar: the native one is hidden, and a slim bar runs in the right-hand column, between the
   corner button and send with a gap at each end, so it never touches either; it shows the normal arrow pointer */
.ask-box textarea { scrollbar-width: none; }
.ask-box textarea::-webkit-scrollbar { display: none; }
.ask-sb { position: absolute; right: 26px; top: 52px; bottom: 58px; width: 6px; z-index: 2; cursor: default; opacity: 0; visibility: hidden; transition: opacity 0.18s var(--ease), visibility 0s 0.18s; }
.ask-sb::before { content: ''; position: absolute; inset: 0 -8px; } /* a wider grab area than the bar itself */
.ask-sb.on { opacity: 1; visibility: visible; transition: opacity 0.18s var(--ease); }
.ask-sb i { position: absolute; left: 0; right: 0; top: 0; min-height: 24px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 18%, transparent); transition: background 0.15s; }
.ask-sb:hover i, .ask-sb.drag i { background: color-mix(in srgb, var(--ink) 34%, transparent); }
.grow-btn { position: absolute; top: 10px; right: 12px; z-index: 2; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); opacity: 0; visibility: hidden; transition: opacity 0.18s var(--ease), visibility 0s 0.18s, background 0.15s, color 0.15s; }
.ask-box.can-grow .grow-btn { opacity: 1; visibility: visible; transition: opacity 0.18s var(--ease), background 0.15s, color 0.15s; }
.grow-btn:hover { background: var(--hover); color: var(--ink); }
.ask-box.tall textarea { max-height: none; }
.ask-box.big { padding-top: 18px; }
.ask-box textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 16.5px; line-height: 1.55; min-height: 28px; max-height: 220px; padding: 2px 8px 6px 0; color: var(--ink); }
.ask-box.big textarea { min-height: 52px; }
.ask-box textarea::placeholder { color: var(--faint); }
.ask-box textarea:focus-visible { outline: none; }
.ask-tools { display: flex; align-items: center; gap: 8px; margin: 6px 0 0 -10px; }
.fwrap { position: relative; flex: 0 0 auto; }
.plus-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s, transform 0.2s var(--ease), border-color 0.15s; }
.plus-btn:hover { background: var(--hover); color: var(--ink); }
.plus-btn.on { background: var(--ink); border-color: var(--ink); color: var(--card); transform: rotate(45deg); }
.fchips { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; white-space: nowrap; }
.fx { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--brand); opacity: 0.75; transition: background 0.15s, opacity 0.15s; }
.fx:hover { opacity: 1; background: color-mix(in srgb, var(--brand) 16%, transparent); }
.send-btn { margin-left: auto; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--grey-bg); color: var(--faint); display: inline-flex; align-items: center; justify-content: center; transition: transform 0.12s, background 0.2s, color 0.2s; }
.send-btn.ready { background: var(--brand); color: var(--ghost); } /* the white of the pause square (asked 2026-11-06) */
.send-btn.ready:hover:not(:disabled) { background: var(--brand-deep); }
/* Pause while a search runs: its square in the tab pill's colour (white on ink), not lime (asked 2026-11-05) */
.send-btn.pause { color: var(--ghost); }
.send-btn:active:not(:disabled) { transform: scale(0.9); }
.send-btn:disabled { opacity: 0.6; }
/* Opens out of the + button and closes back into it: shut, the list is clipped to exactly the button's 36px circle, 10px
   below the list, and it stands behind the button. Only the clip moves, on the sort list's curve, so the words never do.
   The shadow is on the window, so it follows the clip's shape. The list is never scrolled: it fits on every screen. */
.plus-btn { position: relative; z-index: 31; }
.fmenu-win { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 30; pointer-events: none; visibility: hidden; filter: drop-shadow(0 18px 24px rgb(21 21 21 / 0)); transition: visibility 0s linear 0.38s, filter 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.fmenu-win.open { visibility: visible; filter: drop-shadow(0 18px 24px rgb(21 21 21 / 0.16)); transition-delay: 0s; }
.fmenu { width: 340px; border-radius: 18px; background: var(--card); pointer-events: auto; clip-path: inset(calc(100% + 10px) calc(100% - 36px) -46px 0 round 18px); transition: clip-path 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.fmenu-win.open .fmenu { clip-path: inset(0 0 0 0 round 18px); }
@media (prefers-reduced-motion: reduce) {
  .fmenu-win, .fmenu { transition: none; }
  .fmenu { clip-path: none; }
}
.fsec + .fsec { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.fsec-h { display: block; font-size: 12px; font-weight: 600; color: var(--faint); padding: 8px 10px 4px; }
.frow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 12px; text-align: left; transition: background 0.12s; }
.frow:hover, .frow:focus-visible { background: var(--hover); }
.frow .fi { width: 32px; height: 32px; border-radius: 10px; background: var(--grey-bg); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: background 0.15s, color 0.15s; }
.frow.on .fi { background: var(--brand-soft); color: var(--brand); }
.frow .ft { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.frow .ft b { font-size: 14px; font-weight: 600; color: var(--ink); }
.frow .ft small { font-size: 12.5px; color: var(--muted); }
.frow .fck { width: 20px; color: var(--brand); flex: 0 0 auto; display: flex; justify-content: center; }
.fclear { display: block; width: calc(100% - 8px); margin: 6px 4px 2px; padding: 9px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-align: center; border-top: 1px solid var(--line-2); }
.fclear:hover { background: var(--hover); color: var(--ink); }
/* top bar on Paper search: no line, no title, pill buttons */
.top.bare { border-bottom-color: transparent; background: var(--ghost); backdrop-filter: none; -webkit-backdrop-filter: none; }
.top-auth { gap: 8px; margin-left: 6px; }
.connect-btn { border: 1px solid var(--line); }
.pill-btn { height: 38px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; transition: background 0.15s, border-color 0.15s, transform 0.12s; }
.pill-btn:active { transform: scale(0.96); }
.pill-light { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.pill-light:hover { background: var(--hover); }
.pill-brand { background: var(--brand); color: var(--card); }
.pill-brand:hover { background: var(--brand-deep); }
.ask-note { text-align: center; font-size: 12px; color: var(--faint); margin-top: 8px; }
.ask-note button { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.side-intro { padding: 14px 10px 4px; font-size: 13.5px; color: var(--muted); }
.side-intro b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.side-intro ul { display: flex; flex-direction: column; gap: 7px; }
.side-intro li { display: flex; gap: 9px; align-items: baseline; line-height: 1.4; }
.side-intro li::before { content: ""; width: 5px; height: 5px; border-radius: 2px; background: var(--brand); flex: 0 0 auto; transform: translateY(-2px); }
.qa-user { align-self: flex-end; max-width: 82%; background: var(--brand-soft); color: var(--ink); padding: 10px 16px; border-radius: 20px 20px 6px 20px; font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.qa-ai { display: flex; gap: 14px; align-items: flex-start; }
.qa-ai > .logo { margin-top: 2px; }
.qa-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.68; color: var(--ink); }
.qa-body p { max-width: 68ch; }
.qa-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; min-height: 30px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin 0.8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
/* a citation is the paper's name; hover shows what it is and what it found */
.cite { position: relative; display: inline-flex; align-items: center; height: 22px; padding: 0 7px; margin-left: 5px; border-radius: 6px; font-size: 12px; font-weight: 650; line-height: 1; white-space: nowrap; color: var(--ink-2); background: var(--grey-bg); vertical-align: 1px; transition: background 0.15s, color 0.15s, transform 0.12s; }
.cite:hover { background: var(--brand-soft); color: var(--brand); }
.cite:active { transform: scale(0.96); }
.cpop { position: absolute; left: -4px; bottom: calc(100% + 8px); z-index: 30; width: 320px; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 34px -14px rgba(16, 32, 25, 0.3); text-align: left; white-space: normal; line-height: 1.45; font-weight: 400; color: var(--ink); opacity: 0; pointer-events: none; transform: translateY(4px) scale(0.98); transform-origin: 0 100%; transition: opacity 0.16s var(--ease-out), transform 0.16s var(--ease-out); }
.cpop b { font-size: 13.5px; font-weight: 650; }
.cpop span { font-size: 12.5px; color: var(--muted); }
.cpop .cpop-k { font-size: 13px; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .cite:hover .cpop { opacity: 1; transform: none; transition-delay: 0.2s; } }
.cite:focus-visible .cpop { opacity: 1; transform: none; }
.tbl-wrap .cpop { display: none; }
.qa-h { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: -6px; }
.src-list { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.src { display: flex; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line-2); transition: background 0.4s; }
.src:first-child { border-top: 0; }
.src.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 40% { background: var(--brand-soft); } }
.src .no { width: 24px; height: 24px; border-radius: 7px; background: var(--grey-bg); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--muted); flex: 0 0 auto; margin-top: 1px; font-variant-numeric: tabular-nums; }
.src .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.src h4 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.src .meta { font-size: 13px; color: var(--muted); line-height: 1.45; }
.src .find { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.src .meta .oa { color: var(--green); font-weight: 600; }
.src-acts { display: flex; gap: 2px; align-items: flex-start; flex: 0 0 auto; }
.src-acts .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
.src-acts .icon-btn.saved { color: var(--brand); }
.qa-acts { display: flex; gap: 4px; flex-wrap: wrap; margin-left: -8px; }
.qa-acts .btn { height: 32px; padding: 0 10px; font-size: 13px; color: var(--muted); font-weight: 500; }
.qa-acts .btn:hover { color: var(--ink); background: var(--hover); }
/* related questions: quiet rows with no lines; hover lifts one onto a soft tile */
.sum-grid { display: grid; gap: 12px; }
.sum-grid div { padding-left: 14px; }
.sum-grid b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); }
.qa-title { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; max-width: 30ch; text-wrap: balance; }

/* what the search is doing: one line that changes in place, an arrow that opens every step */
.sb { align-self: stretch; }
.sb-line { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14.5px; color: var(--ink-2); }
.sb-ic { position: relative; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.sb-ic .spin { width: 16px; height: 16px; }
.sb-ic.done { background: var(--green-bg); color: var(--green); }
.sb-step { flex: 0 0 auto; font-size: 13px; font-weight: 650; color: var(--brand); font-variant-numeric: tabular-nums; }
/* the live words swap in one grid cell, so the chevron right after them never jumps out of place */
.sb-txt { display: inline-grid; min-width: 0; height: 22px; overflow: hidden; }
.sb-tog { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; margin: 0 -8px 0 -6px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; transition: background 0.15s, color 0.15s; }
.sb-tog:hover { background: var(--hover); color: var(--ink); }
.sb.live .sb-tog { margin-right: 2px; }
.sb-sum { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sum b { font-weight: 650; color: var(--ink); }
.sb-car { color: var(--muted); transition: transform 0.24s var(--ease-out); }
.sb-tog:hover .sb-car { color: var(--ink); }
.sb.open .sb-car { transform: rotate(180deg); }
.sb-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.32s var(--ease-out), opacity 0.2s ease; }
.sb.open .sb-more { grid-template-rows: 1fr; opacity: 1; }
.sb-more > div { overflow: hidden; min-height: 0; }
/* the opened steps: a few rows on a thin thread, a small ✓ (or the spinner) on each, one muted line of detail */
.tl { list-style: none; margin: 6px 0 4px 0; padding: 0; display: flex; flex-direction: column; }
.tl-s { position: relative; display: flex; gap: 12px; padding-bottom: 12px; }
.tl-s:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 1.5px; border-radius: 1px; background: var(--line); }
.tl-dot { position: relative; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grey-bg); color: var(--muted); }
.tl-dot .spin { width: 14px; height: 14px; }
.tl-s.now .tl-dot { background: transparent; }
.tl-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.tl-h { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 20px; }
.tl-d { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tl-ps { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tl-ps li { display: flex; gap: 8px; min-width: 0; font-size: 13px; line-height: 1.5; }
.tl-ps b { flex: 0 0 auto; font-weight: 600; color: var(--ink-2); }
.tl-ps span { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* split Paper search: the chat and its papers share the full height, each with its own 60px header */
.ask.split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 38vw, 560px); align-items: start; }
.ask-col { display: flex; flex-direction: column; min-width: 0; min-height: calc(100vh - 60px); }
.ask-top { display: none; }
@media (min-width: 901px) {
  .app.split-top .main > .top { display: none; }
  .app.split-top .ask-col { min-height: 100vh; }
  .ask-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 60px; padding: 0 16px 0 32px; background: var(--ghost); }
  .ask-title { flex: 1; min-width: 0; font: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ask-top-r { position: relative; display: flex; align-items: center; gap: 6px; }
  .ask-top-r .bell-pop { top: 52px; right: 0; }
  /* split: the browser's own scrollbar moves the papers; the chat column is its own window-high box with its own slim bar */
  .app.split-top .ask-col { position: sticky; top: 0; height: 100vh; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .app.split-top .ask-col > * { flex-shrink: 0; } /* in the fixed-height column nothing may squeeze, or the 60px header shrinks and the name jumps */
  .app.split-top .ask-col::-webkit-scrollbar { width: 10px; }
  .app.split-top .ask-col::-webkit-scrollbar-button { display: none; height: 0; }
  .app.split-top .ask-col::-webkit-scrollbar-thumb { border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; background-color: var(--line); }
  .app.split-top .ask-col::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--ink) 25%, transparent); }
  .app.split-top .ask > .refs { position: relative; top: auto; height: auto; min-height: 100vh; }
  .app.split-top .ask > .refs .refs-h { position: sticky; top: 0; z-index: 5; background: var(--card); }
  .app.split-top .ask > .refs .refs-list { flex: none; overflow: visible; }
  .app.split-top .ask > .refs .refs-sel { position: sticky; bottom: 0; z-index: 5; }
}
.refs { position: sticky; top: 60px; height: calc(100vh - 60px); min-width: 0; display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--line); }
.refs.in { animation: refsIn 0.42s var(--ease-out) both; }
@keyframes refsIn { from { opacity: 0; transform: translateX(28px); } }
.refs-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 8px 12px 8px 22px; border-bottom: 1px solid var(--line); }
.refs-hl { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.refs-hl h2 { font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.refs-n { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refs-n b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.refs-hr { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.refs-sort { position: relative; display: flex; align-items: center; }
.refs-sort select { appearance: none; -webkit-appearance: none; height: 32px; padding: 0 28px 0 10px; border: 0; border-radius: 8px; background: var(--grey-bg); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.refs-sort .ico { position: absolute; right: 9px; pointer-events: none; color: var(--muted); }
.refs-views { display: flex; padding: 3px; border-radius: 10px; background: var(--grey-bg); }
.refs-views button { width: 32px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); transition: background 0.15s, color 0.15s, transform 0.12s; }
.refs-views button:hover { color: var(--ink); }
.refs-views button:active { transform: scale(0.94); }
.refs-views button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 32, 25, 0.1); }
.refs-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 28px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.refs-more { display: flex; gap: 6px; height: 40px; margin: 20px auto 0; border-radius: 999px; }
.refs-sel { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 22px; border-top: 1px solid var(--line); background: var(--card); animation: rise 0.24s var(--ease-out) both; }
.refs-sel b { flex: 1; font-size: 14px; font-variant-numeric: tabular-nums; }
.refs-sel .btn { height: 34px; }

/* a paper card: what it found, its numbers, how to read it, Save */
.rc { position: relative; padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); transition: background 0.2s; }
.rc.in { animation: rcIn 0.45s var(--ease-out) both; }
@keyframes rcIn { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } }
.rc.flash, .rt tr.flash { animation: flash 1.6s var(--ease); }
.rc.sel { background: var(--brand-soft); }
.rc-top { display: flex; gap: 12px; align-items: flex-start; }
.rc-no { flex: 0 0 auto; min-width: 24px; height: 24px; padding: 0 6px; margin-top: 1px; border-radius: 7px; background: var(--grey-bg); color: var(--ink-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.rc h3 { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; line-height: 1.38; letter-spacing: -0.01em; }
.rc-ck { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; border: 1.5px solid color-mix(in srgb, var(--muted) 45%, var(--line)); display: grid; place-items: center; color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s; }
.rc-ck:hover { border-color: var(--muted); }
.rc-ck:active { transform: scale(0.9); }
.rc-ck.on { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.rc-key { margin: 10px 0 0 36px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.rc-key b { margin-right: 6px; font-weight: 650; color: var(--ink); }
.rc-num { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0 36px; padding: 8px 10px; border-radius: 10px; background: var(--green-bg); color: var(--green); font-size: 13px; font-weight: 600; line-height: 1.45; }
.rc-num .ico { margin-top: 2px; flex: 0 0 auto; }
.rc-foot { display: flex; align-items: flex-end; gap: 12px; margin: 12px 0 0 36px; }
.rc-meta { flex: 1; min-width: 0; font-size: 13px; line-height: 1.75; color: var(--muted); }
.rc-meta b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.rc-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-right: 8px; border-radius: 6px; background: var(--violet-bg); color: var(--violet); font-size: 12px; font-weight: 600; vertical-align: 1px; }
.rc-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.rc-pdf, .rc-pw { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; text-decoration: none; transition: background 0.15s, transform 0.12s; }
.rc-pdf { background: var(--green-bg); color: var(--green); }
.rc-pw { color: var(--muted); font-weight: 600; }
.rc-pw:hover { background: var(--hover); color: var(--ink); }
.rc-save { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 650; color: var(--ink); transition: background 0.15s, border-color 0.15s, transform 0.12s; }
.rc-save:hover { background: var(--hover); }
.rc-save.on { border-color: transparent; background: var(--brand-soft); color: var(--brand); }
.rc-pdf:active, .rc-pw:active, .rc-save:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .rc:hover { background: var(--hover); } .rc.sel:hover { background: var(--brand-soft); } }

.rt { width: 100%; border-collapse: collapse; font-size: 13px; }
.rt th { position: sticky; top: 0; z-index: 1; padding: 10px 8px; background: var(--card); text-align: left; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
.rt td { padding: 11px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; line-height: 1.45; }
.rt th:first-child, .rt td:first-child { padding-left: 22px; width: 30px; }
.rt th:last-child, .rt td:last-child { padding-right: 22px; }
.rt td b { display: block; font-weight: 650; white-space: nowrap; }
.rt td span { font-size: 12.5px; color: var(--muted); }
.rt .rc-pdf, .rt .rc-pw { height: 26px; }
.refs-wait { display: flex; gap: 12px; align-items: flex-start; padding: 22px; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 46ch; animation: rise 0.3s var(--ease-out) both; }
.refs-wait .spin { margin-top: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.refs-ov { display: none; }
.fresh > * { animation: rise 0.45s var(--ease) both; }
.fresh > *:nth-child(2) { animation-delay: 0.08s; } .fresh > *:nth-child(3) { animation-delay: 0.16s; } .fresh > *:nth-child(4) { animation-delay: 0.24s; } .fresh > *:nth-child(n+5) { animation-delay: 0.32s; }
.cmp td { padding: 10px 12px; vertical-align: top; font-size: 14px; }
.cmp th { padding: 10px 12px; }
.auth-gate { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink-2); font-size: 14px; }
.auth-gate .ico { color: var(--brand); margin-top: 2px; }
/* Moved verbatim from Demo/makepublish-demo.html (the approved design). Keep class names: React components use them. */
/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  /* the sidebar becomes a drawer, like the ChatGPT and Claude phone apps */
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; z-index: 56; transform: translateX(-104%); transition: transform 0.28s var(--ease); padding-top: calc(16px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); padding-bottom: calc(12px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); padding-left: max(12px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--overlay); animation: fade 0.2s ease-out; }
  /* the Research home's round white button (.pp-round): same size and look, each 16px from its edge, so moving between
     the tabs shows no change. The bar's own padding is 14px left and 10px right */
  .menu-btn { display: inline-flex; margin-left: 2px; }
  .connect-btn { margin-right: 6px; }
  .menu-btn, .connect-btn { width: 44px; height: 44px; border: 0; background: var(--card); color: var(--ink); transition: transform 140ms ease-out; }
  .menu-btn:active, .connect-btn:active { transform: scale(0.96); }
  /* the empty search screen, signed in: 8px lower too, the height of the Research home's bell. Not a guest's bar, whose
     buttons stand in its middle. An offset, so the bar and the words measured from it stay where they are */
  .app.tabbed .top.search-home :is(.menu-btn, .connect-btn) { position: relative; top: 8px; }
  /* the search once it has a chat: its buttons at that same height (asked 2026-11-07); the bar grows, so nothing hangs over the chat */
  .app.tabbed .top.bare:has(.chat-name) { height: auto; min-height: 68px; padding-top: 8px; }
  .top { padding-left: max(14px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(10px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
  .crumbs .crumb-trail { display: none; }
  .top .top-auth .pill-brand { display: none; }
  .ask-box .fmenu { width: min(320px, calc(100vw - 32px)); }
  .crumbs .here { display: block; }
  .content { padding-block: 18px 48px; padding-left: max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
  .ask-empty { padding-block: 4vh 10vh; padding-left: max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); gap: 28px; }
  .ask-empty h1 { font-size: 27px; }
  .ask-thread { padding-block: 20px 16px; padding-left: max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); gap: 22px; }
  .ask-dock { padding-left: max(12px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(12px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
  .qa-ai { gap: 10px; }
  /* on a phone the references open as a sheet from the bottom */
  .ask.split { display: block; }
  .ask.split > .refs { display: none; }
  .refs-ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: var(--overlay); animation: ovIn 0.2s ease both; }
  @keyframes ovIn { from { opacity: 0; } }
  .refs.sheet { position: relative; top: auto; width: 100%; height: 88vh; height: 88dvh; border-left: 0; border-radius: 22px 22px 0 0; animation: sheetUp 0.36s var(--ease-drawer) both; padding-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)); }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  .refs-h { padding: 8px 8px 8px 16px; flex-wrap: wrap; }
  .refs-hl { flex-direction: column; gap: 2px; }
  .rc { padding: 16px; }
  .rc-key, .rc-num, .rc-foot { margin-left: 0; }
  .rc-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .rc-acts { justify-content: flex-end; }
  .refs-hr { width: 100%; }
  .refs-hr > .icon-btn { margin-left: auto; }
  .rt th:first-child, .rt td:first-child { padding-left: 16px; }
  .qa-title { font-size: 22px; }
  .cpop { display: none; }
  .rs { grid-template-columns: 1fr; gap: 16px; }
  .stepper { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .stepper::-webkit-scrollbar { display: none; }
  .st { flex: 0 0 auto; width: auto; padding: 8px 12px 8px 8px; }
  .st .ssub { display: none; }
  .rsteps-h, .rtxt small, .rstep::after { display: none; }
  .rstep { flex: 0 0 auto; width: auto; padding: 7px 12px 7px 7px; gap: 8px; }
  .rhead h2 { font-size: 23px; }
  .screen-card { padding: 20px; }
  .screen-card h3 { font-size: 19px; }
  .m .tools { top: auto; bottom: calc(100% + 4px); left: 30px; transform: none; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 300px); min-height: 440px; }
  .chat.show-thread .clist { display: none; }
  .chat:not(.show-thread) .thread { display: none; }
  .clist { border-right: 0; }
  .m { max-width: 88%; }
  .kan { grid-template-columns: repeat(4, 84%); scroll-snap-type: x mandatory; }
  .kcol { scroll-snap-align: start; }
  .ov { align-items: flex-end; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; max-width: none; max-height: 92vh; padding-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)); }
  .ov.anim .modal { animation: sheetUp 0.32s var(--ease); }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  /* compact project header on phones */
  .pbanner { padding: 14px; gap: 12px; border-radius: 20px; align-items: center; flex-wrap: nowrap; }
  .pbanner .pbox { width: 46px !important; height: 46px !important; font-size: 16px !important; border-radius: 14px !important; }
  .pbanner .pinfo { flex: 1 1 auto; }
  .pbanner .eyebrow { font-size: 10.5px; }
  .pbanner h1 { font-size: 19px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pbanner > .btn { display: none; }
  .phead-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 8px -14px 0 0; padding-right: 14px; }
  .phead-chips::-webkit-scrollbar { display: none; }
  .pchip { height: 30px; font-size: 12px; flex: 0 0 auto; }
  /* project tabs become an even, sticky bar */
  .tabs { position: sticky; top: calc(60px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--phead-h, 0px)); z-index: 15; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 10px calc(-1 * max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))) 16px; padding: 0 6px; background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); overflow: visible; }
  .tab { flex-direction: column; justify-content: center; height: 58px; gap: 3px; padding: 0; font-size: 11.5px; }
  .tab .ico { width: 21px; height: 21px; }
  .tab .badge { position: absolute; top: 5px; right: calc(50% - 24px); }
  /* tasks: one list at a time */
  .kchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
  .kchips .chip { flex: 0 0 auto; }
  .kan { display: block; }
  .kcol { display: none; background: transparent; padding: 0; }
  .kcol.sel { display: flex; }
  .kcol-h { display: none; }
  /* chat thread opens full screen, like a messaging app */
  .chat:not(.show-thread) { height: auto; min-height: 0; }
  .chat.show-thread { position: fixed; inset: 0; z-index: 45; height: auto; min-height: 0; border-radius: 0; border: 0; box-shadow: none; padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); padding-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)); }
  .chat.show-thread.slide .thread { animation: slideIn 0.3s var(--ease); }
  @keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
  .thread-h { padding: 8px 12px; min-height: 58px; }
  .thread-h .back-conv { display: inline-flex; }
  .th-avs { display: none; }
  .msgs { padding: 0; }
  .msgs-in { padding: 12px 12px 8px; }
  .m { max-width: 86%; }
  .composer { padding: 4px 10px calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
  .cbox-hint { display: none; }
  .content.fit { padding-block: 14px 12px; min-height: 0; }
  .chat { border-radius: 18px; }
  .phead { padding-bottom: 14px; margin-bottom: 14px; }
  /* the header's background reaches only as far as the phone gutter, or the page scrolls sideways */
  .phead::before, .phead.stuck::after { left: calc(-1 * max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))); right: calc(-1 * max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))); }
  .phead h1 { font-size: 19px; }
  .phead-main { flex-basis: 100%; gap: 12px; }
  .phead-main .pbox { width: 38px !important; height: 38px !important; font-size: 13px !important; border-radius: 11px !important; }
  .phead-meta { font-size: 12.5px; }
  .phead-meta span:nth-child(2), .phead-meta span:nth-child(4) { display: none; }
  .phead-team { display: none; }
  .phead-acts:empty { display: none; }
  .phead-acts .btn { height: 36px; font-size: 13px; }
  .fp-card { padding: 16px; gap: 12px; }
  .fp-search .input { height: 52px; font-size: 16px; }
  .guide { padding: 14px; gap: 12px; }
  .guide p { font-size: 14px; }
  .path-now .btn { width: 100%; }
  kbd { display: none; }
  .picker { max-width: none; }
  .thread-h .ptag { max-width: 38%; }
}
@media (max-width: 620px) {
  .page-head h1 { font-size: 25px; }
  .pbanner h1 { font-size: 23px; }
  .h1 { font-size: 23px; }
  .node .nlabel { display: none; }
  .rules { grid-template-columns: 1fr; }
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-sum { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .rv-sum strong { font-size: 22px; }
  .decide { grid-template-columns: 1fr 1fr; }
  .decide .btn-maybe { grid-column: 1 / -1; order: 3; }
  .screen-card { padding: 20px; }
  .prisma { grid-template-columns: 1fr; }
  .parrow-r { transform: rotate(90deg); padding: 4px 0; }
  .auth-card { padding: 24px 20px; }
  .hide-phone { display: none !important; }
  .src-acts { flex-direction: column; }
}
/* Fixes for the React port only. The demo drew these as <button>; here they are real links, which browsers underline. */
a.btn, a.nav-item, a.pill-btn, a.link-btn, a.brand, a.hist-item, a.hist-all, a.hp-item { text-decoration: none; }

/* Closing and opening the sidebar. The column changes width over 0.28s; the words must never be seen squeezed
   into it. Closing: the words leave at once (80ms), before the column narrows. Opening: they come back only once
   the column has room again (after 160ms). And nothing in the sidebar ever wraps while the width moves. */
@media (min-width: 901px) {
  .side .side-intro, .side .side-intro li, .side .side-guest .btn, .side .nav-item .grow, .side .hist-item, .side .rec-tog { white-space: nowrap; overflow: hidden; }

  .app.mini .side .nav-item .grow, .app.mini .side .new-hint, .app.mini .side .hist, .app.mini .side .side-rule,
  .app.mini .side .rec-tog, .app.mini .side .side-extra, .app.mini .side .um-car { transition-duration: 0.08s; transition-delay: 0s; }
  .app.mini .side-head .brand { transition: max-width 0.3s var(--ease), opacity 0.08s, padding 0.3s var(--ease), visibility 0s 0.3s; }

  .app:not(.mini) .side .nav-item .grow, .app:not(.mini) .side .new-hint, .app:not(.mini) .side .hist,
  .app:not(.mini) .side .side-rule, .app:not(.mini) .side .side-extra { transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0.16s; }
  .app:not(.mini) .side .rec-tog { transition: color 0.15s, opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0.16s; }
  .app:not(.mini) .side .um-car { transition: transform 0.2s var(--ease-out), color 0.15s, opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0.16s; }
  .app:not(.mini) .side-head .brand { transition: max-width 0.3s var(--ease), opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0.14s, padding 0.3s var(--ease); }
  /* the guest buttons come back from display:none, so they fade in on the same beat instead of popping in narrow */
  .app.reopened:not(.mini) .side-guest .btn { animation: sideWords 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0.16s both; }
}
@keyframes sideWords { from { opacity: 0; } }

/* Small laptops and tablets held sideways (901-1180px): sidebar, chat and papers share less room, so the papers
   column gives up some width and the chat keeps a readable line. */
@media (min-width: 901px) and (max-width: 1180px) {
  .ask.split { grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 380px); }
  /* the narrow papers column takes the phone sheet's layout: title over its tools, card details over its buttons */
  .ask.split > .refs .refs-h { flex-wrap: wrap; padding: 8px 8px 8px 16px; }
  .ask.split > .refs .refs-hl { width: 100%; }
  .ask.split > .refs .refs-hr { width: 100%; }
  .ask.split > .refs .refs-hr > .icon-btn { margin-left: auto; }
  .ask.split > .refs .rc { padding: 16px; }
  .ask.split > .refs .rc-key, .ask.split > .refs .rc-foot { margin-left: 0; }
  .ask.split > .refs .rc-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .ask.split > .refs .rc-acts { justify-content: flex-end; }
}

/* The Papers button: on wide screens it only brings back a closed panel; on phones and tablets the panel is a sheet,
   so the button is always there to open it. */
@media (min-width: 901px) { .papers-btn.narrow-only { display: none; } }

/* A new answer flows in from below, one part after another: each paragraph rises 14px out of a soft blur while it
   fades in, 80ms after the one before, so the answer reads as being written down in front of you. The search line
   on top was already on screen while it worked, so it stays exactly where it is. Plays once, from the first frame. */
.qa-body.fresh > * { animation: answerIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) both; }
.qa-body.fresh > .sb { animation: none; }
.qa-body.fresh > :nth-child(2) { animation-delay: 0.04s; }
.qa-body.fresh > :nth-child(3) { animation-delay: 0.12s; }
.qa-body.fresh > :nth-child(4) { animation-delay: 0.2s; }
.qa-body.fresh > :nth-child(5) { animation-delay: 0.28s; }
.qa-body.fresh > :nth-child(6) { animation-delay: 0.36s; }
.qa-body.fresh > :nth-child(7) { animation-delay: 0.44s; }
.qa-body.fresh > :nth-child(8) { animation-delay: 0.52s; }
.qa-body.fresh > :nth-child(n + 9) { animation-delay: 0.58s; }
@keyframes answerIn { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) {
  .qa-body.fresh > * { animation-name: answerFade; }
}
@keyframes answerFade { from { opacity: 0; } }

/* The search steps open and close on an even ease-in-out, so the answer below slides down and back up at a steady
   pace. (The old ease-out jumped 30-60px in its first frames, which read as the text snapping.) */
.sb-more { transition: grid-template-rows 0.42s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s cubic-bezier(0.65, 0, 0.35, 1); }
.sb-car { transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1); }

/* The filter button: the round button never moves or turns; only the + inside it turns into an x. Turning the whole
   button made its edge and shadow wobble, which read as the button jumping out of place. */
.plus-btn.on { transform: none; }
.plus-btn .ico { transition: transform 0.24s cubic-bezier(0.65, 0, 0.35, 1); }
.plus-btn.on .ico { transform: rotate(45deg); }

/* The papers sheet leaves the way it came: it slides back down while the dim fades, on the same curve and time. */
@media (max-width: 900px) {
  .refs-ov.closing { animation: ovOut 0.3s cubic-bezier(0.32, 0.72, 0, 1) both; }
  .refs-ov.closing .refs.sheet { animation: sheetDown 0.3s cubic-bezier(0.32, 0.72, 0, 1) both; }
}
@keyframes ovOut { to { opacity: 0; } }
@keyframes sheetDown { from { transform: none; } to { transform: translateY(100%); } }

/* Popups never move their words once they are open. Scaling a popup in made its text redraw a pixel or two off when
   the animation ended, so popups come in with a fade and a small rise only, and stay on their own layer throughout,
   so the text is drawn the same way during the entrance and after it. Use this for every new popup. */
.fmenu, .cm-pop { will-change: transform, opacity; }
@keyframes popRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
/* the filter list never scrolls (asked 2026-11-06): where the screen is short the rows give up their second line and
   shrink, and a phone on its side shows the two groups side by side */
.fmenu-in { padding: 6px; }
@media (max-height: 760px) {
  .frow .ft small { display: none; }
  .frow { padding-block: 4px; }
  .frow .fi { width: 28px; height: 28px; border-radius: 9px; }
  .fsec-h { padding-block: 6px 2px; }
}
@media (max-height: 460px) {
  .ask-box .fmenu { width: min(480px, calc(100vw - 32px)); }
  .fmenu-in { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; }
  .fsec + .fsec { border-top: 0; margin-top: 0; padding-top: 0; }
  .fclear { grid-column: 1 / -1; margin-top: 2px; padding-block: 5px; border-top: 0; }
  .frow { padding-block: 2px; }
}

/* Guests on the empty search screen: both account buttons, aligned with the menu button, on every screen size. */
/* Phones: a quiet text "Sign in" beside one small brand pill, sized like the menu button, not like page buttons. */
@media (max-width: 900px) {
  .top .top-auth .pill-brand { display: inline-flex; }
  .top .top-auth { margin-left: auto; gap: 2px; }
  .top-auth .pill-btn { height: 32px; padding: 0 13px; font-size: 13px; }
  .top-auth .pill-light { background: none; border-color: transparent; color: var(--muted); padding: 0 10px; }
  .top-auth .pill-light:hover { background: var(--hover); color: var(--ink); }
}

/* Phones, like the Claude app: the text gets the whole width on top, starting as one line, with + and send on a
   row below it. More lines push the text area taller; past three lines the same grow button as on big screens
   appears, and it opens and folds the box exactly as there. Nothing is added or taken away, only the sizes. */
@media (max-width: 640px) {
  .ask-box, .ask-box.big { padding: 12px 10px 8px 16px; border-radius: 22px; }
  .ask-box textarea, .ask-box.big textarea { min-height: 26px; font-size: 16px; line-height: 1.55; padding-top: 1px; }
  .ask-tools { margin: 6px 0 0 -6px; }
  .ask-box .grow-btn { top: 6px; right: 6px; }
  .ask-box .ask-sb { right: 19px; top: 44px; bottom: 54px; }
}
@media (prefers-reduced-motion: reduce) { .app.reopened:not(.mini) .side-guest .btn { animation: none; } }

/* The note under the box: one wording on one line at every width (short enough for a 320px phone), so the box sits
   as low as it can. On the empty search screen it shows on phones only, where the box sits at the bottom too.
   --muted, not --faint: it has to be readable (4.5:1). */
.ask-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; line-height: 16px; color: var(--muted); }
.ask-empty .ask-note { display: none; }
@media (max-width: 640px) { .ask-empty .ask-note { display: block; } }

/* The greeting and the line under the drop come in together, once the session is known (see EmptyAsk) */
.ask-words { opacity: 0; }
.ask-words.on { opacity: 1; transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1); }
@media (prefers-reduced-motion: reduce) { .ask-words.on { transition: none; } }
@media (max-width: 640px) { .ask-dock { padding-bottom: calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); } }
/* Sheets and panels that slide in keep their own compositor layer for good. Without it the browser moves the text
   as a picture during the slide, then redraws it on the pixel grid the moment the slide ends, and every line
   twitches by a fraction of a pixel just as the sheet settles. */
.refs.sheet, .refs.in, .ov .modal { will-change: transform; backface-visibility: hidden; }


/* ---------- Sign in, create account, forgot, welcome ----------
   One screen, always: the page is exactly the window's height and never scrolls, at every size. The card is centred
   in the room under the top bar, and on shorter windows its spacing tightens step by step (max-height tiers) so the
   longest form (create account) still fits with the drop on top. Only a window too short for anything, like a phone
   with its keyboard up, may scroll. .pwf, not .pw: .pw is the research plan widget. */
/* --auth-h is the window's height measured when the page opens (see useSteadyViewport): the phone keyboard opening
   or closing never changes it, so nothing jumps; the keyboard simply slides over the page */
.auth { height: 100vh; height: var(--auth-h, 100dvh); min-height: 0; overflow: hidden; padding-block: 14px 10px; }
/* centred by two flexible spacers rather than justify-content, so if the card ever grows taller than the room (all four
   errors at once on a small phone) it can still be scrolled to its top, inside this area only */
.auth-main { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; overflow-y: auto; scrollbar-width: none; }
.auth-main::-webkit-scrollbar { display: none; }
.auth-main::before, .auth-main::after { content: ""; flex: 1 0 0; }
.auth-back { padding: 0 12px 0 8px; gap: 4px; color: var(--ink-2); }
.auth-made { margin-top: 6px; text-align: center; font-size: 12px; }

/* the drop sits on the card's top edge, feet on the line, like on a shelf; out of the flow, so it never moves the card */
.auth-card { position: relative; margin-top: 62px; padding: 26px 30px 24px; gap: 13px; box-shadow: none; }
.auth-card > .auth-perch { position: absolute; left: 50%; top: -65px; margin-left: -32px; z-index: 1; }
.auth-card h1 { font-size: 25px; }
.auth-card .sub { margin-top: -7px; }
.auth-card .field { gap: 5px; }
.auth-card .input { height: 42px; }
.auth-card .btn-lg, .auth-card .g-btn { height: 46px; }
/* Errors live inside their box, so the card never changes size. An empty box shows its error where the placeholder
   would be; a filled one shows what you typed a little higher and the error in small type under it. Going back
   into a box makes it look normal while you type; leaving it checks it again. */
.auth-card .inbox { position: relative; }
.auth-card .err.in { position: absolute; left: 13px; right: 13px; bottom: 5px; font-size: 11.5px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; animation: none; }
.auth-card .inbox:has(.pwf) .err.in { right: 46px; }
.auth-card .lrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.auth-card .lrow > label { font-size: 14px; font-weight: 550; flex: none; }
.auth-card .err.err-lab { min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: none; }
.auth-card .has-err:has(input:placeholder-shown) .err.err-lab, .auth-card .has-err:not(:has(input:placeholder-shown)) .err.in, .auth-card .has-err:focus-within .err.err-lab { display: none; }
.auth-card .has-err .input::placeholder { color: transparent; }
.auth-card .has-err:has(input:placeholder-shown) .err.in { bottom: auto; top: 50%; transform: translateY(-50%); font-size: 14px; line-height: 18px; }
.auth-card .has-err:focus-within .err.in { display: none; }
.auth-card .has-err:focus-within .input { border-color: var(--box-on); animation: none; }
.auth-card .has-err:focus-within .input::placeholder { color: var(--faint); }
/* back from the email form: a small arrow in the card's top-left corner */
.auth-ways-back { position: absolute; top: 12px; left: 12px; color: var(--muted); }
.auth-ways-back:hover { color: var(--ink); }
/* the eye: a line across it while the password is hidden; showing wipes it off, hiding draws it back */
.eye-t .eye-slash, .eye-t .eye-gap { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.22s cubic-bezier(0.23, 1, 0.32, 1); }
.eye-t .eye-gap { stroke: var(--card); stroke-width: 5; }
.eye-t.shown .eye-slash, .eye-t.shown .eye-gap { stroke-dashoffset: 1; }
@media (prefers-reduced-motion: reduce) { .eye-t .eye-slash, .eye-t .eye-gap { transition: none; } }

.flip { transform: scaleX(-1); }
.auth-ways { display: flex; flex-direction: column; gap: 10px; }
.auth-ways .g-btn:disabled { opacity: 0.6; }
.auth-card .btn-dark .spin { border-color: color-mix(in srgb, var(--btn-fg) 25%, transparent); border-top-color: var(--btn-fg); }
.pwf { position: relative; }
.pwf .input { padding-right: 42px; }
.pwf .icon-btn { position: absolute; right: 1px; top: 1px; }
.auth-forgot { align-self: flex-start; font-weight: 500; margin-top: -3px; }
.auth-other { align-self: center; font-weight: 500; color: var(--muted); }
.auth-other:hover .ico { transform: scaleX(-1); }
.auth-center { text-align: center; }
.auth-terms { font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-terms a, .auth-err a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.auth-err { padding: 10px 14px; border-radius: 12px; background: var(--red-bg); color: var(--red); font-size: 14px; }
.auth-gate { font-size: 13.5px; padding: 10px 12px; }
.auth-foot { margin-top: 14px; }
/* test accounts (local emulators only) stay out of the layout, in the corner */
.auth-testers { position: fixed; left: 12px; bottom: 10px; z-index: 5; font-size: 12px; color: var(--muted); }
.auth-testers summary { cursor: pointer; list-style: none; padding: 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.auth-testers summary::-webkit-details-marker { display: none; }
.auth-testers[open] summary { margin-bottom: 6px; }

/* shorter windows (most laptops): tighter */
@media (max-height: 760px) {
  .auth-card { margin-top: 58px; padding: 20px 28px 18px; gap: 10px; }
  .auth-card h1 { font-size: 23px; }
  .auth-card .input { height: 40px; }
  .auth-card .btn-lg, .auth-card .g-btn { height: 44px; }
  .auth-foot { margin-top: 10px; }
}
@media (max-height: 640px) {
  .auth { padding-block: 10px 6px; }
  .auth-card { gap: 8px; padding: 16px 24px 14px; }
  .auth-card .sub { display: none; }
  .auth-card .field { gap: 3px; }
  .auth-card .lrow > label { font-size: 13px; }
  .auth-made { display: none; }
}
@media (max-height: 600px) {
  .auth-card { gap: 7px; }
  .auth-card h1 { font-size: 21px; }
  .auth-card .input { height: 38px; }
  .auth-card .btn-lg, .auth-card .g-btn { height: 42px; }
  .auth-gate { font-size: 12.5px; padding: 8px 10px; line-height: 1.4; }
  .auth-terms { font-size: 12px; }
  .auth-foot { margin-top: 6px; }
  .auth-card { gap: 6px; }
  .auth-card > .auth-perch { margin-bottom: -14px; }
}
/* too short for the form at all (a phone with its keyboard up): let it scroll rather than cut it off */
@media (max-height: 520px) {
  .auth { height: auto; min-height: 100dvh; overflow: visible; }
}

/* phones: no card edge to sit on, so the drop stands above the heading */
@media (max-width: 640px) {
  /* phones get the same white card as big screens, with the drop on its edge; just a little less padding */
  .auth-card { padding: 20px 18px 18px; margin-top: 60px; }
  .auth-card h1 { font-size: 22px; }
  .auth-ways-back { top: 10px; left: 8px; }
  /* one back arrow at a time: on the email form the card's own arrow is the way back */
  .auth:has(.auth-ways-back) .auth-back { visibility: hidden; }
  .auth-back span { display: none; }
  .auth-back { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .auth-made { display: none; }
}

/* Text boxes: no glow ring when active, just a darker edge (decided 2026-11-02, everywhere on the site). */
.input:focus { box-shadow: none; border-color: var(--box-on); }
/* Sign in / Create account in the top bar: phones and tablets only (sidebar is a drawer there). On big screens the
   sidebar already offers both, so the top bar stays clear. */
@media (min-width: 901px) { .top .top-auth { display: none; } }

/* The email code: six equal boxes across the card, then one line that is either the resend timer or what went
   wrong (same line, so a wrong code never moves anything). */
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.auth-card .code-box { height: 54px; padding: 0; text-align: center; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; caret-color: var(--ink); }
.code-boxes.bad .code-box { border-color: var(--red); }
.code-boxes.bad .code-box:focus { border-color: var(--box-on); }
.code-line { min-height: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.code-line.bad { color: var(--red); }
.code-line .link-btn { font-size: 13px; }
.auth-testcode { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: -4px; }
@media (max-width: 380px) { .code-boxes { gap: 6px; } .auth-card .code-box { height: 48px; font-size: 20px; } }

/* The code screen has little on it, so it gets more air than the form: clear steps from top to bottom,
   the address on its own line, the boxes standing apart from the words above and the button below. */
.auth-card.is-airy { gap: 16px; padding-top: 32px; padding-bottom: 28px; }
.auth-card.is-airy .sub { margin-top: -6px; line-height: 1.55; }
.code-to { display: block; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.auth-card.is-airy .auth-testcode { margin-top: 0; }
.auth-card.is-airy .code-boxes { margin-top: 4px; gap: 10px; }
.auth-card.is-airy .btn-lg { margin-top: 2px; }
@media (max-width: 380px) { .auth-card.is-airy .code-boxes { gap: 7px; } }

/* Terms of use and Privacy policy (/terms, /privacy): the sign-in page's dotted ground and top bar, but a page that
   scrolls, with one readable column of text in a card. */
.legal { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding-block: 14px 24px; padding-left: max(16px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); background-color: var(--ghost); background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 22px 22px; }
.legal-main { width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 36px; flex: 1; }
.legal-switch a { text-decoration: none; height: 34px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; transition: background 0.15s, color 0.15s; }
.legal-switch a:hover { color: var(--ink); }
.legal-switch a.on { background: var(--card); color: var(--ink); font-weight: 600; }
.legal-card { width: 100%; padding: 40px 48px 36px; box-shadow: none; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.legal-card h1 { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: var(--ink); }
.legal-date { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.legal-lead { margin-top: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); font-size: 16.5px; color: var(--ink); text-wrap: pretty; }
.legal-card h2 { font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); margin: 30px 0 8px; }
.legal-card p + p { margin-top: 10px; }
.legal-card ul { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; list-style: disc; }
.legal-card li::marker { color: var(--faint); }
.legal-card ul + p, .legal-card p + ul { margin-top: 12px; }
.legal-card a, .auth-made a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: text-decoration-color 0.15s; }
.legal-card a:hover, .auth-made a:hover { text-decoration-color: currentColor; }
.auth-made a { color: inherit; font-weight: 500; }
.legal-ask { margin-top: 32px !important; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.legal .auth-made { margin-top: 20px; }
@media (max-width: 640px) {
  .legal-main { margin-top: 20px; gap: 12px; }
  .legal-card { padding: 26px 20px 24px; font-size: 15px; }
  .legal-card h1 { font-size: 26px; }
  .legal-lead { font-size: 15.5px; margin-top: 16px; padding-bottom: 20px; }
  .legal-card h2 { font-size: 17.5px; margin-top: 26px; }
  .legal .auth-back span { display: none; }
  .legal .auth-back { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .legal .auth-made { display: block; }
}
/* Toasts (decided 2026-11-03): at the top, just under the top bar, so they never sit on the search box at the bottom;
   centred over the page's content (not the sidebar); always one line, at every width; they leave as smoothly as they came. */
.toast { top: calc(68px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); bottom: auto; left: calc(50% + var(--toast-x, 0px)); width: max-content; max-width: calc(100vw - 32px); white-space: nowrap; padding: 10px 16px 10px 12px; gap: 10px; }
.toast > span:not(.logo) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.toast .logo { flex: none; }
/* it sits over the top row of a page for a few seconds: taps go through it to the page, all but its own Undo (2026-11-08) */
.toast { pointer-events: none; }
.toast button, .toast a { pointer-events: auto; }
.toast.in { animation: toastDown 0.32s cubic-bezier(0.23, 1, 0.32, 1) both; }
.toast.out { animation: toastUp 0.22s cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes toastDown { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastUp { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -10px); } }
@media (min-width: 901px) {
  html:has(.app) { --toast-x: 136px; }
  html:has(.app.mini) { --toast-x: 34px; }
}
@media (max-width: 380px) { .toast { font-size: 13.5px; padding-inline: 10px 14px; } }
/* ---------- Paper search on phones (decided 2026-11-03) ----------
   The empty screen: the drop, the greeting and the line under it stand at one fixed place near the top, measured
   from the page's opening height (--app-h), so a longer or shorter line never moves the drop and the keyboard never
   moves any of them. The box sits at the bottom of the screen and rides up with the keyboard (--kb, see
   ui/keyboard.ts) on a curve close to the keyboard's own. */
@media (max-width: 640px) {
  /* never taller than what can be seen (min with 100dvh), so there is nothing for the browser to scroll up */
  .ask-empty { flex: none; display: block; height: calc(min(var(--app-h, 100dvh), 100dvh) - 60px - var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); padding-block: 0; overflow: hidden; }
  /* The words sit at the foot of the room that stays free with the keyboard up: the page's height less the top bar,
     the keyboard (--kbg, remembered per phone, see ui/keyboard.ts) and the box with its note (142px). That room
     is the same with the keyboard up or down, so nothing moves, and nothing hides under the box. */
  .ask-empty .ask-head { box-sizing: border-box; height: max(110px, calc(var(--app-h, 100dvh) - 60px - var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) - var(--kbg, 47dvh) - 142px)); /* --app-h only: 100dvh shrinks with the keyboard and would move the words */ padding-top: 8px; display: flex; flex-direction: column; justify-content: safe flex-end; }
  .ask-empty .hero-drop { margin-bottom: 10px; }
  .ask-empty h1 { font-size: 27px; text-wrap: balance; } /* the greeting alone: 1–2 lines where the old line took 3 */
  .ask-empty-box { position: fixed; z-index: 10; left: max(12px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); right: max(12px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); bottom: calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
  /* up by the keyboard, less the home-bar gap it already keeps (the keyboard covers that gap) */
  .ask-empty-box, .ask-dock { transform: translateY(calc(-1 * max(0px, var(--kb, 0px) - var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))))); transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1); will-change: transform; }
  /* the chat: room under the last answer for the keyboard, so it can still be scrolled into view */
  /* room under the conversation for the keyboard, so it can rise by scrolling; on the thread, not the column, or the
     sticky box would be lifted by it a second time */
  .ask-thread { padding-bottom: calc(16px + var(--kb, 0px)); }
}
@media (max-width: 360px) { .ask-empty h1 { font-size: 25px; } }
/* a short phone leaves less room above the keyboard: the drop and the line get smaller to fit it (the room's own
   height decides, not the window's, so the keyboard opening never changes it) */
@media (max-width: 640px) {
  .ask-empty .ask-head { container-type: size; }
}
/* The drop's place in the words stays what the room allows (--hero-z of its 72px: 64, 51 or 38px), so nothing else moves. With the
   keyboard down there is room to spare, so it is drawn at its full 72px, growing up from that place; the keyboard coming takes
   it back on the box's curve (asked 2026-11-08: "tora barha"). */
.hero-seat { display: block; }
@media (max-width: 640px) {
  .ask-empty .hero-drop { --hero-z: 0.889; zoom: var(--hero-z); transform: scale(calc(1 / var(--hero-z))); transform-origin: 50% 100%; transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1); }
  html.kb-up .ask-empty .hero-drop, html.kb-wait .ask-empty .hero-drop { transform: none; }
}
@container (max-height: 168px) {
  .ask-empty .hero-drop { --hero-z: 0.711; margin-bottom: 6px; }
  .ask-head h1 { font-size: 23px; }
}
/* not signed in, on phones: the reason fits the same room above the keyboard as the words. The room's height decides
   (never the keyboard), so nothing moves when it opens: a short room leaves the reason out. */
@media (max-width: 640px) { .ask-why { font-size: 14px; margin-top: 6px; } }
@container (max-height: 168px) { .ask-why { display: none; } }
/* only a really short room: at 140 a usual phone (room 139, Galaxy S23) got the 38px drop, too small (2026-11-05) */
@container (max-height: 120px) {
  .ask-empty .hero-drop { --hero-z: 0.533; }
  .ask-head h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ask-empty .hero-drop { transition: none; } }
/* the box takes its new place at once while the glide in ui/keyboard.ts draws the way there */
html.kb-snap :is(.ask-empty-box, .ask-dock) { transition: none; }
/* no max-height rules on the empty screen: the keyboard makes the window shorter, and any such rule would move the words */
@media (prefers-reduced-motion: reduce) { .ask-empty-box, .ask-dock, .ask-empty .ask-head { transition: none; } }

/* The end of an answer on phones: the three actions on one line (Copy and Save as icons), and the related
   questions as a tight list of single lines, so the box below never has to fight them for room. */
@media (max-width: 640px) {
  .qa-acts { flex-wrap: nowrap; gap: 2px; }
  .qa-acts .btn { height: 34px; padding: 0 9px; }
  .qa-h { font-size: 12.5px; margin-bottom: -10px; }
}
/* the hero drop's seat stays empty until it is parked for its first-visit drop-in (see heroDrop.ts playWelcome) */
html.hero-wait .hero-drop { visibility: hidden; }
/* Phones whose browser slides the whole screen up for the keyboard (see ui/keyboard.ts): the top bar and the words
   on the empty search screen are moved back down by the same amount, at once (no transition), so they stay put. */
/* only while it is slid (html.vv-shift): a transform on .top at other times would move its pop-up menus */
@media (max-width: 640px) {
  /* the chat's conversation too: whether it rises is decided by its own scroll (ui/keyboard.ts), not the slide */
  html.vv-shift .top { transform: translateY(var(--vvy, 0px)); }
  /* the conversation: the slide undone, then raised by the part of its lift that could not be scrolled */
  html.thread-shift .ask-thread { transform: translateY(calc(var(--vvy, 0px) - var(--lift, 0px))); }
  /* the drop, greeting and line: put back by exactly how far they were measured to have moved */
  html.hero-pin .ask-empty .ask-head { transform: translateY(var(--hy, 0px)); }
  /* keyboard down: the words in the middle of the room between the top bar and the box (--hd, ui/keyboard.ts
     useCentredWords); keyboard up: back to the foot of the room above it, gliding with the box on its curve */
  .ask-empty .ask-head { translate: 0 var(--hd, 0px); transition: translate 0.26s cubic-bezier(0.32, 0.72, 0, 1); }
  html.kb-up .ask-empty .ask-head { translate: none; }
  /* the empty search screen has nothing to scroll: no scrolling and no stretch at the edges */
  html:has(.ask-empty), html:has(.ask-empty) body { overflow: hidden; overscroll-behavior: none; }
}
/* project cards are links in React (demo: buttons), so they keep the card's own text colour and no underline */
a.pcard { color: inherit; text-decoration: none; }
/* Phones (decided 2026-11-04): the opened search steps use the width under the drop too, so long paper lines are not
   squeezed against the right edge; the drop and the steps' own line stay where they are (30px drop + 10px gap). */
@media (max-width: 640px) {
  .qa-ai .sb-more { margin-left: -40px; }
}

/* New Terms to accept (shell/TermsAsk.tsx): the whole app waits on this one calm page */
.terms-ask { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 16px; text-align: center; background: var(--ghost); }
.terms-ask h1 { margin-top: 6px; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.terms-ask p { max-width: 42ch; color: var(--muted); }
.terms-ask p a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.terms-ask-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* Connect an app (features/auth/ConnectPage.tsx): what the assistant may do, in the sign-in card */
.cn-list { display: grid; gap: 9px; margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.cn-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.cn-list .ico { flex: none; margin-top: 2px; color: var(--green); }
.cn-list .cn-not { color: var(--muted); }
.cn-list .cn-not .ico { color: var(--muted); }
.cn-note { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.45; }
.cn-wait { align-self: center; margin: 8px 0; }
/* ---------- The phone tab bar (decided 2026-11-03), see shell/TabBar.tsx ----------
   Five icons; the chosen one opens into a lime pill with its name. Only .tb-name's column animates (0fr to 1fr), the
   rest of the row follows in layout, on one curve, so the pill that opens and the one that closes move as one. */
.tabbar { display: none; }
/* A screen opened on a phone slides in from the right and back out, the one under it drawing a little aside (asked 2026-11-07;
   shell/AppRouter.tsx starts it). Same time and curve both ways, the app's drawer curve. Reduced motion: no slide. */
@media (max-width: 900px) {
  ::view-transition { pointer-events: none; } /* a quick tap reaches the screen that has arrived */
  /* During a transition Chrome on a phone counts the address bar in the page's room (72px on a Galaxy S23), so a page scrolled
     to its very end was cut back by that much, with Assign opening over it. Room to spare for that moment, out of sight. */
  html[data-slide] .app { padding-bottom: 120px; }
  html[data-slide]::view-transition-old(root), html[data-slide]::view-transition-new(root) { mix-blend-mode: normal; animation-duration: 300ms; animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1); animation-fill-mode: both; }
  html[data-slide="open"]::view-transition-old(root) { animation-name: slide-aside; }
  html[data-slide="open"]::view-transition-new(root) { animation-name: slide-in; box-shadow: -10px 0 30px rgba(21, 21, 21, 0.12); }
  html[data-slide="close"]::view-transition-old(root) { z-index: 1; animation-name: slide-out; box-shadow: -10px 0 30px rgba(21, 21, 21, 0.12); }
  html[data-slide="close"]::view-transition-new(root) { animation-name: slide-back; }
  /* the tab bar, when both screens have it: it doesn't move at all */
  html[data-slide-tabs] .tabbar { view-transition-name: tabbar; }
  html[data-slide-tabs]::view-transition-group(tabbar) { z-index: 2; animation: none; }
  html[data-slide-tabs]::view-transition-old(tabbar) { display: none; }
  html[data-slide-tabs]::view-transition-new(tabbar) { animation: none; opacity: 1; }
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slide-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes slide-aside { from { transform: none; } to { transform: translateX(-28%); } }
@keyframes slide-back { from { transform: translateX(-28%); } to { transform: none; } }
@media (max-width: 900px) {
  .app.tabbed { --tabbar-h: 66px; --tabbar: calc(var(--tabbar-h) + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center;
    height: var(--tabbar); padding: 0 max(8px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))) var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) max(8px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px)));
    background: var(--card); border-top: 1px solid var(--line); contain: layout style;
    transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s; /* comes back with a short fade */
  }
  /* gone the moment the keyboard is asked for, back only once it has gone (html.kb-wait, ui/keyboard.ts): browsers that
     slide the screen for the keyboard would otherwise draw it above the keyboard for a moment (seen 2026-11-04) */
  html.kb-up .tabbar, html.kb-wait .tabbar, .tabbar.off { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }

  /* Every tab the same share of the row; the chosen one a fixed 68px more (room for a 62px name and its
     6px gap). So the row's total never changes: the old tab gives back on the same curve what the new one takes, and
     the tabs outside the two never move, not even a pixel (asked 2026-11-05; they moved 1-7px when each tab's width
     followed its own name). Tabs between the two slide over by the 68px, as they must to make room. */
  .tb { flex: 1 1 0px; transition: flex-basis 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
  .tb.on { flex-basis: 68px; }
  .tb { min-width: 0; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tb-pill {
    display: inline-flex; align-items: center; height: 46px; padding: 0 12px; border-radius: 23px;
    background: color-mix(in srgb, var(--brand) 0%, transparent);
    transition: background-color 0.3s cubic-bezier(0.32, 0.72, 0, 1), color 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .tb-name { display: grid; grid-template-columns: 0fr; transition: grid-template-columns 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
  .tb-name > span {
    overflow: hidden; white-space: nowrap; font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; padding-left: 0;
    opacity: 0; transform: translateX(-4px);
    /* closing: the name goes first, quickly, so it is never seen squeezed */
    transition: opacity 0.12s linear, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), padding-left 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  }
  /* the chosen tab: an ink pill, icon and name both white (asked 2026-11-04); in dark, a lime pill with ink */
  .tb.on { color: var(--ghost); }
  .tb.on .tb-pill { background: var(--brand); }
  .tb.on .tb-name { grid-template-columns: 1fr; }
  /* opening: the name comes in once the pill has made some room for it */
  .tb.on .tb-name > span { opacity: 1; transform: none; padding-left: 6px; transition: opacity 0.22s linear 0.1s, transform 0.34s cubic-bezier(0.32, 0.72, 0, 1) 0.06s, padding-left 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
  .tb-n { position: absolute; top: 7px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; pointer-events: none; }
  /* on the chosen tab the number sits on the pill's corner instead of over its name */
  .tb.on .tb-n { left: auto; right: 2px; top: 6px; }
  .tb:focus-visible { outline: none; }
  .tb:focus-visible .tb-pill { outline: 2px solid var(--focus); outline-offset: 2px; }

  /* the pages above it keep their last lines clear of it */
  .app.tabbed main.content { padding-bottom: calc(var(--tabbar) + 24px); }
}

/* ---------- Search on signed-in phones (decided 2026-11-03, Demo/phone-search-panel.html) ----------
   The box and the tabs are one white panel at the foot of the screen, like Safari's address bar over its toolbar.
   On the empty screen the box is one line (+, the question, send); a tap opens it to the full box as the keyboard
   comes and the tabs step behind the keyboard. In a chat the panel holds the full box. The drawer (the menu button,
   or a sideways swipe) holds only search: New search and Recents, since the tabs already go everywhere else. */
@media (max-width: 900px) {
  .app.tabbed .side-nav, .app.tabbed .side-user { display: none; }
  .app.tabbed:not(.on-search) .menu-btn { display: none; }
  /* every page under the tabs stands on one colour, the Research home's, so moving between them shows no change (asked 2026-11-06) */
  body:has(.app.tabbed), body:has(.app.tabbed)::before, .app.tabbed, .app.tabbed .main, .app.tabbed .top.bare, .app.tabbed .ask-top { background: var(--side); }
  .app.tabbed.on-search .tabbar { border-top-color: transparent; }
  /* the dim fades both ways (and follows a swipe, see shell/swipeDrawer.ts) */
  .scrim { animation: none; opacity: 0; pointer-events: none; transition: opacity 0.28s var(--ease); }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .scrim.drag { pointer-events: auto; }
  /* a row held for its menu is never selected and never gets the phone's own link menu */
  .hist-row, .hp-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

  /* the chat: the same panel as the empty screen, running on under the tabs, so the two read as one */
  .app.tabbed .ask-dock { padding-top: 10px; padding-bottom: calc(10px + var(--tabbar)); background: var(--card); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1); }
  /* keyboard up: the tabs are behind it, and the panel gives their room back (ui/keyboard.ts reads where the box ends up) */
  html.kb-up .app.tabbed .ask-dock { padding-bottom: calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); background: var(--side); border-top-color: transparent; }
}
@media (max-width: 640px) {
  /* no note under the box on a signed-in phone (decided 2026-11-03): the box sits right on the tabs, more page shows */
  .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-note { display: none; }
  .app.tabbed .ask-empty-box {
    left: 0; right: 0; bottom: var(--tabbar); padding: 10px max(12px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))) 10px max(12px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px)));
    background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
    /* only its place glides; its colour changes at once, so the moving box is never repainted frame by frame */
    transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  }
  html.kb-up .app.tabbed .ask-empty-box { bottom: calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); padding-bottom: 0; background: transparent; border-color: transparent; }

  /* the one-line box, on the empty screen and in a chat alike. Every change below is a size or a place the browser
     can glide (paddings, the tools row's margin), on the keyboard's curve, so opening and closing the box is one
     movement, never a jump */
  .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-box { transition: padding 0.26s cubic-bezier(0.32, 0.72, 0, 1); }
  .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-box textarea { transition: padding 0.26s cubic-bezier(0.32, 0.72, 0, 1); }
  .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-tools { transition: margin 0.26s cubic-bezier(0.32, 0.72, 0, 1); }
  .app.tabbed :is(.ask-empty-box, .ask-dock) :is(.fchips, .grow-btn) { transition: opacity 0.2s linear; }
  html:not(.kb-up) .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-box { padding-top: 13px; padding-bottom: 8px; background: var(--bubble); border-color: transparent; box-shadow: none; }
  /* the question sits between + and send, on one line */
  html:not(.kb-up) .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-box textarea { max-height: 26px; padding-left: 38px; overflow: hidden; }
  html:not(.kb-up) .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-tools { margin-top: -31px; pointer-events: none; }
  html:not(.kb-up) .app.tabbed :is(.ask-empty-box, .ask-dock) .ask-tools button { pointer-events: auto; }
  html:not(.kb-up) .app.tabbed :is(.ask-empty-box, .ask-dock) :is(.fchips, .grow-btn, .ask-sb) { opacity: 0; visibility: hidden; }
}/* the smallest phones (320px): the longest name still fits whole, icons and tap areas keep their size */
@media (max-width: 350px) {
  .tabbar { padding-left: max(4px, var(--safe-area-inset-left, env(safe-area-inset-left, 0px))); padding-right: max(4px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); }
  .tb.on .tb-pill { padding: 0 10px; }
  .tb-name > span { font-size: 12px; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .tabbar, .tb-pill, .tb-name, .tb-name > span, .tb.on .tb-name > span { transition-property: opacity, background-color, color; transition-delay: 0s; }
}
/* the keyboard's FLIP puts the boxes in place at once and draws the way there itself (ui/keyboard.ts): no transition
   on their place in that moment, here too, or the two would fight */
html.kb-snap .app.tabbed :is(.ask-empty-box, .ask-dock) { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .app.tabbed :is(.ask-empty-box, .ask-dock), .app.tabbed :is(.ask-empty-box, .ask-dock) :is(.ask-box, textarea, .ask-tools) { transition: none; }
}/* the room the chat's panel gives back with the keyboard goes under the conversation, so the page never gets shorter
   and the browser never pulls the scroll in (ui/keyboard.ts --dockfix) */
@media (max-width: 640px) { .app.tabbed .ask-thread { padding-bottom: calc(16px + var(--kb, 0px) + var(--dockfix, 0px)); } }
/* ---------- My projects on phones (features/projects/ProjectsPhone.tsx) and All projects (AllProjectsPage.tsx) ----------
   Demo/phone-projects-redesign-v2.html, agreed 2026-11-04. The three card colours are the brand's: lime, sky, white.
   Text on lime and sky stays ink in both themes; white cards follow the theme. Late is red text, never a card colour. */
@media (max-width: 900px) {
  /* these pages draw their own top, so the shell's bar steps aside */
  .app.own-top .main > .top { display: none; }
  .app.own-top main.content { padding-top: max(14px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); }
}

/* the blue card: a pale tint of the brand's sky, asked lighter twice on 2026-11-04 (#7cc3fb, then #a4d7fd) */
:root { --pp-sky: #d3ebfe; --pp-late-on: #8f1a10; }

/* the Projects home never scrolls on a phone (asked 2026-11-04): it is one screen between the top and the tab bar.
   Everything on it is sized to fit the shortest phone (320 x 568), long names included; All projects still scrolls. */
@media (max-width: 900px) {
  html:has(.ka.on .pp), html:has(.ka.on .pp) body { overflow: hidden; overscroll-behavior: none; }
  .app.own-top:has(.ka.on .pp) main.content { height: 100dvh; padding-bottom: var(--tabbar, 0px); display: flex; flex-direction: column; overflow: hidden; }
  .pp { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .pp-bento .pp-sky .pp-name, .pp-bento .pp-white .pp-name { -webkit-line-clamp: 2; }
}
@media (max-width: 900px) and (max-height: 640px) {
  .pp-top { margin-bottom: 12px; }
  .pp-big { min-height: 236px; }
  .pp-c { padding: 14px; }
  .pp-bento { grid-auto-rows: minmax(113px, auto); }
  .pp-pct { font-size: 44px; }
  .pp-pct.sm { font-size: 26px; padding-top: 6px; }
  .pp-big .pp-name { font-size: 16.5px; -webkit-line-clamp: 2; }
  .pp-bar { margin: 10px 0 12px; }
  .pp-more { padding-block: 10px; }
  /* here the row reaches the fixed + button's height, so it stops short of it and the two sit side by side */
  .pp-more { margin-right: 96px; }
  .pp-pair { margin-right: 96px; }
  .pp-pair .pp-half { min-height: 78px; padding: 10px 10px 10px 13px; }
  .pp-pair .pp-half small { display: none; }
  .pp-pair .pp-half .pp-more-n { font-size: 24px; }
  .pp-pair .pp-spines { height: 24px; transform: scale(0.85); transform-origin: bottom left; }
  .pp-more-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pp-more-n { font-size: 26px; }
}
/* the smallest phones (320x568): the pair goes slim, a line each, so the home still never scrolls */
@media (max-width: 900px) and (max-height: 600px) {
  .pp-pair .pp-half { min-height: 56px; padding: 8px 8px 8px 12px; flex-direction: row; align-items: center; gap: 8px; }
  .pp-pair .pp-half-1 { display: contents; }
  .pp-pair .pp-half .pp-more-n { order: 0; font-size: 20px; }
  .pp-pair .pp-spines { order: 0; height: 22px; transform: scale(0.75); transform-origin: left center; }
  .pp-pair .pp-half b { order: 1; flex: 1; min-width: 0; margin-top: 0; font-size: 13px; }
  .pp-pair .pp-half-go { order: 2; width: 30px; height: 30px; }
}
/* the cards are white, so the page under them is one step darker than the usual paper */
.app.own-top:has(.ka.on :is(.pp, .pa)) { background: var(--side); }
.app.own-top:has(.ka.on :is(.pp, .pa)) .main { background: var(--side); }

/* shared: a round white button (bell, back, search) */
.pp-round { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--ink); display: grid; place-items: center; flex: none; transition: transform 140ms ease-out; }
.pp-round:active { transform: scale(0.96); }
.pp-round:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- top: drop, greeting, bell ---- */
.pp-top { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 18px; }
.pp-logo { width: 30px; margin: 0 7px; }
.pp-top:not(:has(.pp-logo)) { padding-left: 4px; }
.pp-hi { flex: 1; min-width: 0; display: grid; }
.pp-hi small { font-size: 12px; color: var(--muted); }
.pp-hi b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the bell: goes to the Notifications page; the red dot shows while something is unread */
.pp-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #f04438; border: 2px solid var(--card); }
@media (prefers-reduced-motion: reduce) { .pp-c, .pp-more, .pa-row, .pp-round, .pp-fab { transition: none; } }
.pp-c, .pp-more, .pa-row, .pp-round, .pa-seg button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---- the three places ---- */
.pp-bento { display: grid; grid-template-columns: 1.12fr 1fr; grid-auto-rows: minmax(126px, auto); gap: 10px; }
.pp-c { min-width: 0; border-radius: 26px; padding: 16px; display: flex; flex-direction: column; text-decoration: none; color: #151515; transition: transform 140ms ease-out; }
.pp-c:active, .pp-more:active, .pp-fab:active, .pp-cta:active, .pp-join:active, .pa-row:active { transform: scale(0.98); }
.pp-c:focus-visible, .pp-more:focus-visible, .pa-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-big { grid-row: span 2; min-height: 262px; background: var(--btn); }
.pp-sky { background: var(--pp-sky); }
.pp-white { background: var(--card); color: var(--ink); }
.pp-c small { font-size: 12px; font-weight: 500; color: color-mix(in srgb, currentColor 62%, transparent); }
.pp-c small.late, .pp-meta.late { color: var(--pp-late-on); }
.pp-white .pp-meta.late { color: var(--red); }
.pp-name { font-size: 14px; font-weight: 600; line-height: 1.25; margin-top: 4px; text-wrap: balance; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* the research's own colour: the small round mark before its name, as on the big-screen cards (.dh-pc-n) */
.pp-mark::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--pid); vertical-align: 0.06em; }
.pp-big .pp-name { font-size: 18px; letter-spacing: -0.015em; margin-top: 6px; }
.pp-pct { font-size: 52px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; margin-top: auto; padding-top: 12px; }
.pp-pct sup { font-size: 20px; letter-spacing: 0; vertical-align: top; margin-left: 2px; position: relative; top: 6px; }
.pp-pct.sm { font-size: 32px; padding-top: 10px; }
.pp-pct.sm sup { font-size: 14px; top: 3px; }
.pp-bar { display: flex; gap: 3px; margin: 12px 0 14px; }
.pp-bar i { flex: 1; height: 5px; border-radius: 3px; background: rgba(21, 21, 21, 0.15); }
.pp-bar i.d { background: #151515; }
.pp-go { height: 44px; border-radius: 22px; background: #151515; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pp-meta { font-size: 12px; font-weight: 500; margin-top: 6px; color: color-mix(in srgb, currentColor 62%, transparent); }
/* a free place: a real way on */
.pp-act .pp-name { font-size: 15px; margin-top: 0; }
.pp-act small { margin-top: 4px; line-height: 1.4; }
.pp-act-go { margin-top: auto; align-self: flex-end; width: 34px; height: 34px; border-radius: 50%; background: #151515; color: #fff; display: grid; place-items: center; }
.pp-white .pp-act-go { background: var(--side); color: var(--ink); }

/* more than 3: one quiet row, a step below the page, so the cards keep the eye */
.pp-more { display: flex; align-items: center; gap: 14px; margin-top: 10px; background: color-mix(in srgb, var(--ink) 5%, var(--side)); color: var(--ink); border-radius: 26px; padding: 12px 12px 12px 18px; text-decoration: none; transition: transform 140ms ease-out; }
.pp-more-n { font-size: 32px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.pp-more-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pp-more-t b { font-size: 15px; font-weight: 600; }
.pp-more-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-more-go { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center; flex: none; }
/* under the cards: All research and the Library side by side, the same quiet step below the page (Demo/library-options.html A) */
/* the same columns as the bento above, so the gap between the two cards runs straight down */
.pp-pair { display: grid; grid-template-columns: 1.12fr 1fr; gap: 10px; margin-top: 10px; }
.pp-pair.one { grid-template-columns: 1fr; }
.pp-half { min-width: 0; min-height: 92px; border-radius: 24px; padding: 13px 13px 12px 16px; display: flex; flex-direction: column; gap: 1px; background: color-mix(in srgb, var(--ink) 5%, var(--side)); color: var(--ink); text-decoration: none; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pp-half:active { transform: scale(0.98); }
.pp-half:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-half-1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: auto; }
.pp-half .pp-more-n { font-size: 30px; }
.pp-half-go { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; }
.pp-half b { margin-top: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-half small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the Library's mark: a little stack of spines, one lime, one leaning */
.pp-spines { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.pp-spines i { width: 6px; border-radius: 2px; background: var(--ink); }
.pp-spines i:nth-child(1) { height: 22px; }
.pp-spines i:nth-child(2) { height: 30px; background: var(--btn); box-shadow: inset 0 0 0 1.5px #151515; }
.pp-spines i:nth-child(3) { height: 26px; }
.pp-spines i:nth-child(4) { height: 18px; margin-left: 2px; background: var(--faint); transform: rotate(14deg); transform-origin: bottom left; }

/* New project: fixed, right under the thumb, above the tab bar */
.pp-fab { position: fixed; z-index: 30; right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); bottom: calc(var(--tabbar, 0px) + 16px); display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 16px 0 12px; border-radius: 16px; background: var(--btn); color: #151515; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(60, 80, 10, 0.45); transition: transform 140ms ease-out, opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s; }
/* like the tab bar: gone the moment the keyboard is asked for, back with a short fade once it has gone (ui/keyboard.ts) */
html.kb-up .pp-fab, html.kb-wait .pp-fab { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
@media (min-width: 901px) { .pa .pp-fab { display: none; } }

/* no projects yet: the road */
.pp-empty { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 16px; }
.pp-road { flex: 1; min-height: 0; }
.pp-empty h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: clamp(12px, 3dvh, 22px) 4px clamp(10px, 2dvh, 16px); max-width: 260px; text-wrap: balance; }
.pp-cta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 18px; background: var(--btn); color: #151515; font-size: 16px; font-weight: 600; text-decoration: none; transition: transform 140ms ease-out; }
.pp-join { display: flex; align-items: center; justify-content: center; height: 52px; margin-top: 8px; border-radius: 18px; background: var(--card); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; transition: transform 140ms ease-out; }

/* ---- All projects ---- */
.pa { max-width: 640px; margin: 0 auto; }
.pa-top { display: flex; align-items: center; gap: 10px; min-height: 48px; }
/* search: one white pill, clipped down to the 44px round button on the right when shut. Opening uncovers it to the
   left, closing covers it back to the right; only clip-path moves (no layout), with the tab bar pill's curve. */
.pa-sbox { position: relative; flex: 1; min-width: 0; height: 44px; border-radius: 22px; background: var(--card);
  clip-path: inset(0 0 0 calc(100% - 44px) round 22px); transition: clip-path 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.pa-sbox.open { clip-path: inset(0 0 0 0 round 22px); }
.pa-find { display: block; width: 100%; height: 44px; border-radius: 22px; border: 0; background: transparent; color: var(--ink); padding: 0 52px 0 16px; font: inherit; font-size: 16px; }
.pa-find:focus-visible { outline: 0; }
.pa-sbox.open:focus-within { box-shadow: inset 0 0 0 1px var(--box-on); }
.pa-find::-webkit-search-cancel-button { display: none; }
.pa-sbtn { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pa-sbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .pa-sbox { transition: none; } }
.pa-h { font-size: 30px; font-weight: 600; letter-spacing: -0.04em; margin: 14px 2px; }
.pa-h span { color: var(--muted); }
.pa-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
/* Active / Done: the ink pill (.pa-seg-ink, a white copy of the labels over them) is clipped to the chosen one and
   slides between them. Both copies have one weight, so their letters line up exactly. */
.pa-seg { position: relative; display: flex; background: color-mix(in srgb, var(--ink) 6%, var(--side)); border-radius: 22px; padding: 4px; }
.pa-seg button, .pa-seg-ink > span { height: 36px; padding: 0 14px; border-radius: 18px; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pa-seg i { font-style: normal; }
.pa-seg-ink { position: absolute; inset: 0; display: flex; padding: 4px; border-radius: 22px; background: var(--brand); pointer-events: none; }
.pa-seg-ink > span { color: var(--ghost); }
.pa-seg.ready .pa-seg-ink { transition: clip-path 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
@media (prefers-reduced-motion: reduce) { .pa-seg.ready .pa-seg-ink { transition: none; } }
.pa-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* sort: the pill is the top of one white panel, clipped down to the pill when shut; opening uncovers the list below
   it, closing covers it back up into the pill (clip-path only, the search box's curve). The shadow fades with it, so
   the list stands off the cards it covers. */
.pa-sort { position: relative; z-index: 5; height: 44px; color: var(--ink);
  filter: drop-shadow(0 8px 18px rgb(21 21 21 / 0)); transition: filter 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.pa-sort.open { filter: drop-shadow(0 8px 18px rgb(21 21 21 / 0.14)); }
.pa-sb { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 22px; background: var(--card); color: inherit; font-size: 13.5px; font-weight: 500; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pa-sb:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pa-sb svg { transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.pa-sort.open .pa-sb svg { transform: rotate(180deg); }
/* every name in one cell: the pill is as wide as the longest, whichever is chosen */
.pa-sl { display: grid; }
.pa-sl > span { grid-area: 1 / 1; visibility: hidden; white-space: nowrap; }
.pa-sl > span.on { visibility: visible; }
.pa-sm { position: absolute; top: 0; left: 0; right: 0; padding: 44px 0 6px; border-radius: 22px; background: var(--card);
  clip-path: inset(0 0 calc(100% - 44px) 0 round 22px); transition: clip-path 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.pa-sort.open .pa-sm { clip-path: inset(0 0 0 0 round 22px); }
.pa-sm button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 44px; padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pa-sm button[aria-checked='true'] { color: var(--ink); font-weight: 600; }
.pa-sm button:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
@media (hover: hover) and (pointer: fine) { .pa-sm button:hover { color: var(--ink); } }
.pa-sm button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .pa-sort, .pa-sb svg, .pa-sm { transition: none; } }
.pa-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pa-row { display: block; background: var(--card); color: var(--ink); border-radius: 24px; padding: 14px 16px; text-decoration: none; transition: transform 140ms ease-out; }
.pa-row.lime { background: var(--btn); color: #151515; }
.pa-hd { display: flex; align-items: flex-start; gap: 12px; }
.pa-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pa-t b { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pa-t small { font-size: 12px; color: color-mix(in srgb, currentColor 62%, transparent); }
.pa-t small .late { color: var(--red); }
.pa-row.lime .pa-t small .late { color: var(--pp-late-on); }
.pa-pct { font-size: 30px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; flex: none; }
.pa-pct sup { font-size: 13px; vertical-align: top; position: relative; top: 3px; margin-left: 1px; }
/* one line that fills as the work is done; the drop rides its end */
.pa-trk { display: block; position: relative; height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 12%, transparent); margin: 40px 10px 4px; }
.pa-trk > i { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 3px; background: currentColor; }
.pa-rider { position: absolute; left: var(--p); bottom: -2px; transform: translateX(-50%); display: block; }
.pa-none { font-size: 14px; color: var(--muted); padding: 24px 4px; }

/* ---- deleting a research you lead (AllProjectsPage Row, Demo/delete-research-final.html) ---- */
.pa-top { position: relative; }
.pa-sbox { z-index: 1; } /* opening, the search box covers the bin */
.pa-bin { position: absolute; top: 2px; right: 54px; }
.pa-bin-n { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pa-li { position: relative; }
/* the card moves with the finger; vertical moves stay the page's scroll */
.pa-card { position: relative; border-radius: 24px; }
.pa-card { touch-action: pan-y; }
/* behind the card's right end: shown only while the card is off its place */
/* its own pill beside the card, a small gap clear of the card's end, slid in from the right only as far as the room the card
   has left (set as it moves, AllProjectsPage put): never under the card, so no red shows round its edges. The word rides its
   left end. */
/* clip, not hidden: a hidden box can still be scrolled, and focusing the question's Cancel while the card was still out to
   the right scrolled the row 322px, so after a full swipe right the card came in from the left (2026-11-10) */
.pa-li { overflow: hidden; overflow: clip; border-radius: 24px; }
.pa-del { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; border-radius: 24px; background: var(--red); color: #fff;
  display: flex; align-items: center; font-size: 12.5px; font-weight: 600; visibility: hidden; transform: translateX(100%); }
.pa-del > span { flex: none; width: 90px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Pin, the same from the left: lime, its word riding its right end, just past the card */
.pa-pin { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; border-radius: 24px; background: var(--btn); color: #151515;
  display: flex; align-items: center; justify-content: flex-end; font-size: 12.5px; font-weight: 600; visibility: hidden; transform: translateX(-100%); }
.pa-pin > span { flex: none; width: 90px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pa-pin:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
/* only the side being pulled shows */
.pa-li.swiping[data-side='del'] .pa-del, .pa-li.swiping[data-side='pin'] .pa-pin { visibility: visible; }
/* let go now and it acts at once */
.pa-li.full .pa-del { background: color-mix(in srgb, var(--red) 82%, #000); }
.pa-li.full .pa-pin { background: color-mix(in srgb, var(--btn) 78%, #151515); }
/* with pins, two parts under small headings: Pinned, then The rest (in the chosen order) */
.pa-grp { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 4px -2px; }
.pa-grp:first-child { margin-top: 0; }
.pa-grp h2 { margin: 0; font-size: 13.5px; font-weight: 600; }
.pa-grp span { font-size: 12px; color: var(--muted); }
.pa-more.on { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.pa-menu { min-width: 190px; }
.pa-del:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
/* the ••• under the %, above the line's end */
.pa-more { position: absolute; top: 48px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: color-mix(in srgb, var(--ink) 55%, transparent); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pa-more:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .pa-more:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); } }
/* turned over: the card keeps its size (its face hidden, not removed) and the question takes its place */
.pa-card.sure .pa-row { visibility: hidden; }
.pa-sure { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 2px var(--red-bg); }
.pa-sure b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sure .tk-when { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sure .tk-acts { margin-top: auto; }
/* Delete from me (ProjectsDesktop Leave, phone): title and new leader on one line each, the card keeps its size */
.pa-sure > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pa-sure .dh-who { align-self: flex-start; height: 30px; margin-top: 2px; padding: 0 12px 0 9px; border-radius: 15px; font-size: 13px; }
.pa-sure.pin { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--btn) 70%, transparent); }
/* after a full swipe the question rides home with the card; its words come up as it does (once, not on a tap) */
.pa-card.in .pa-sure > * { animation: pa-sure-in 0.34s cubic-bezier(0.23, 1, 0.32, 1) 0.06s both; }
.pa-card.in .pa-sure > .tk-acts { animation-delay: 0.12s; }
@keyframes pa-sure-in { from { opacity: 0; transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) { .pa-card.in .pa-sure > * { animation: none; } }
/* the Deleted page */
.pa-top-c { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; }
.pa-ht { margin: 0; text-align: center; font-size: 16px; font-weight: 600; }
.pp-round-sp { width: 44px; }
.pa-note { margin: 14px 4px 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.pa-row.pa-gone { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.pa-gone .pa-t b { color: var(--muted); }
.pa-gone .pp-mark { --pid: var(--faint); }
.pa-gone .tk-acts { justify-content: flex-start; margin-top: 12px; }
.pa-gone .tk-act { gap: 6px; background: var(--card); }

/* Phones: a page's own top (greeting + bell, Back + title) stays put while the page scrolls under it (asked 2026-11-11).
   Once the page has moved, a soft wash of the page colour, darkest at the top, sits behind the buttons so they stay easy
   to see; it fades in over the first 24px of scroll (scroll-driven, no script) and is not there at rest. */
@media (max-width: 900px) {
  .app.own-top main.content > .ka > * > :is(.pp-top, .tk-top, .as-top, .ac-top, .lb-top, .nf-top, .rp-head):first-child,
  .app.own-top main.content > .ka > :is(.pp-top, .tk-top, .as-top, .ac-top, .lb-top, .nf-top, .rp-head):first-child {
    position: sticky; top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); z-index: 20; isolation: isolate;
  }
  .app.own-top main.content :is(.pp-top, .tk-top, .as-top, .ac-top, .lb-top, .nf-top, .rp-head):first-child::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none; left: 50%; width: 100vw; translate: -50% 0; /* edge to edge */ top: calc(-1 * var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) - 14px); bottom: -14px; /* from the very top of the screen to just under the buttons */
    background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 7%, var(--ghost)) 0%, var(--ghost) 35%, color-mix(in srgb, var(--ghost) 90%, transparent) 75%, transparent 100%);
    opacity: 0; animation: top-wash linear both; animation-timeline: scroll(root); animation-range: 0 24px;
  }
}
@keyframes top-wash { to { opacity: 1; } }
/* ---------- New project and Join (features/projects/NewProjectPage.tsx, JoinPage.tsx, RoleSelect.tsx, Road.tsx) ----------
   Demo/phone-new-project-flow.html. Phone first: the page is one column that fills the screen, the actions sit at
   its foot (in the flow, not fixed, so the keyboard never covers a field). The desktop block at the end only
   centres the same column. Lime is for the drop and the main action; no black buttons. */

/* :not(.dh): a big screen's New research is a popup over My research, and the list behind it must not change */
/* not under Assign: Tasks stays under it as it was, or the page gets shorter and the browser scrolls it */
.app.in-flow:not(:has(.ka.on .dh)):not(:has(.ka.on .nfp.as)) main.content { padding-top: max(10px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); padding-bottom: max(20px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
.app.in-flow:has(.ka.on .nf), .app.in-flow:has(.ka.on .nf) .main { background: var(--side); }

.nf { --np-g: var(--side); overflow-x: clip; display: flex; flex-direction: column; min-height: calc(100dvh - 40px); max-width: 520px; margin: 0 auto; }
.nf .grow { flex: 1; min-width: 0; }

/* top: back on the left, title in the middle */
.nf-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 48px; }
.nf-bk { width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--ink); display: grid; place-items: center; border: 0; text-decoration: none; }
.nf-ttl { text-align: center; font-size: 15px; font-weight: 600; }

.nf-h { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; margin: 0 4px 18px; }
.nf-h-gap { margin-top: 22px; }
.nf-lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.nf-mini { font-size: 13px; font-weight: 500; color: var(--muted); margin: 18px 4px 8px; }
.nf-note { margin: 14px 4px 0; font-size: 13px; color: var(--muted); }


/* text boxes: one pill shape everywhere in these flows (asked 2026-11-05). The label is for screen readers (the
   placeholder and the screen's line say what goes in); a count or a short problem sits at the pill's end, so the
   pill never changes size around the field */
.nf-box { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px; background: var(--card); border-radius: 28px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 160ms ease; }
.nf-box:focus-within { box-shadow: inset 0 0 0 1px var(--box-on); }
.nf-box.bad { box-shadow: inset 0 0 0 2px var(--red); }
/* the problem stands where the example was (asked 2026-11-05) */
.nf-box.bad input::placeholder { color: var(--red); font-weight: 500; }
.nf-box .nf-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.nf-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 0; }
.nf-big-in { font-size: 17px !important; font-weight: 600; letter-spacing: -0.01em; }
.nf-box input::placeholder { color: var(--faint); font-weight: 400; }
.nf-box-g { background: var(--np-g); }
.nf-err { display: block; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--red); }
.nf-box .nf-err, .nf-count { flex: none; margin: 0; font-size: 13px; white-space: nowrap; }
.nf-count { color: var(--faint); font-variant-numeric: tabular-nums; }

.nf-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); border-radius: 20px; padding: 6px; margin-top: 10px; }
/* Field and Type: the choices, the box for your own words (Other) and the phases the type brings, in one card */
.nf-card { background: var(--card); border-radius: 20px; padding: 6px; }
.nf-card .nf-kinds { background: none; padding: 0; margin: 0; border-radius: 0; }
.nf-own { grid-column: 1 / -1; height: 52px; padding: 0 20px; border-radius: 26px; }
.nf-phases { margin: 4px 0 0; padding: 10px 10px 6px; font-size: 13px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.nf-phases b { color: var(--ink); font-weight: 600; margin-right: 4px; }
/* colour: the project's own marker colour, one of eight; the chosen one carries a tick */
.nf-sw { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; background: var(--card); border-radius: 20px; padding: 12px; }
.nf-sw button { aspect-ratio: 1; max-width: 36px; width: 100%; justify-self: center; border: 0; border-radius: 50%; background: var(--sw); color: var(--card); display: grid; place-items: center; padding: 0; transition: transform 140ms ease-out, box-shadow 160ms ease; -webkit-tap-highlight-color: transparent; }
.nf-sw button.on { box-shadow: 0 0 0 2.5px var(--card), 0 0 0 4.5px var(--sw); }
.nf-sw button:active { transform: scale(0.94); }
.nf-sw button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
/* worn by one of your research already: faded, and can't be picked (no two of yours share a colour) */
.nf-sw button.used, .nfp .nf-sw button.used:hover { opacity: 0.22; box-shadow: none; cursor: not-allowed; }
.nf-sw button.used:active { transform: none; }
.nf-h-tight { margin-bottom: 4px; }

/* ---- the phone flow (NewProjectPhone.tsx): one question per screen. The top (title, the line the drop rides) never
   moves; the screen below slides, Back and Next sit at the foot. The whole flow fills the phone's screen. ---- */
.app.in-flow:has(.ka.on .nfp):not(:has(.ka.on .dh)), .app.in-flow:has(.ka.on .nfp):not(:has(.ka.on .dh)) .main { background: var(--side); }
.nfp-ov { display: contents; } /* only the big screen's popup has a backdrop */
.nfp-back { display: none; } /* the popup's Back; a phone's is at the foot */
.nf-big-only { display: none; } /* content that fills the popup; a phone's screens stay as they are */
/* the flow keeps the height it had before the keyboard (--nfp-h) and undoes a browser's slide (--vvy), so the
   keyboard moves nothing but Back / Next and, when it must, the box being typed in (NewProjectPhone useKeyboardLift) */
.nfp { position: fixed; left: 0; right: 0; top: 0; height: var(--nfp-h, 100dvh); transform: translateY(var(--vvy, 0px)); z-index: 30; display: flex; flex-direction: column; background: var(--side); max-width: 560px; margin: 0 auto;
  padding: max(10px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px max(16px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
.nfp .grow { flex: 1; min-width: 0; }
/* the step's title, in the middle of the top bar (asked 2026-11-05); it fades in when the step changes */
.nfp-ttl { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: nfpTtl 0.32s cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes nfpTtl { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* each screen's one line: plain words, one size everywhere, always one line */
.nfp-line { margin: 0 4px 16px; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the name card: the name set large as it is typed, its count and any problem on the card's own foot */
.nfp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Done: the new research's name, large, under its line */

/* the line: it fills to this step, and the live drop rides its front, saying a word on each arrival */
.nfp-bar { position: relative; flex: none; height: 6px; margin: 56px 18px 6px 4px; border-radius: 3px; background: var(--card); }
.nfp-bar .fill { position: absolute; inset: 0; border-radius: 3px; background: var(--btn); transform-origin: left; transform: scaleX(var(--p)); transition: transform 0.7s cubic-bezier(0.32, 0.72, 0, 1); }
.nfp-bar .head { position: absolute; inset: 0; pointer-events: none; transform: translateX(calc(var(--p) * 100%)); transition: transform 0.7s cubic-bezier(0.32, 0.72, 0, 1); }
.nfp-drop { position: absolute; left: -15px; bottom: 1px; }
/* the word sits right over the drop's head (asked 2026-11-05), centred on it; the bar stands 50px down so it clears the
   title (56px). On the last step the drop is at the line's end: the word's right edge lines up with the drop instead, so it
   stays on the screen */
.nfp-say { position: absolute; bottom: 36px; left: 0; transform: translateX(-50%); white-space: nowrap; padding: 4px 10px; border-radius: 12px; background: var(--ink); color: var(--ghost); font-size: 12.5px; font-weight: 600;
  opacity: 0; animation: nfpSay 1.9s cubic-bezier(0.23, 1, 0.32, 1) 0.55s both; }
.nfp-say.edge { left: 8px; transform: translateX(-100%); } /* .head spans the whole line: measured from the drop */
@keyframes nfpSay { 0% { opacity: 0; translate: 0 6px; } 12% { opacity: 1; translate: 0 0; } 80% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 -4px; } }

/* the screens: the new one slides in from the side it comes from while the old one slides out the other way */
.nfp-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; margin: 0 -16px; }
/* 16px of the screen's top is padding taken from under the line (.nfp-bar's margin): a box docked on the keyboard
   rides up into it, and a scroller clips at its padding edge, not its content. Without it the docked box lost its top
   once the line moved down for the drop's word (phone, 2026-11-05: "adha ghayab") */
.nfp-pane { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 16px; }
.nfp-pane.come { animation: nfpIn 340ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.nfp-pane.come.from-l { animation-name: nfpInL; }
.nfp-pane.leave { pointer-events: none; animation: nfpOut 340ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.nfp-pane.leave.to-r { animation-name: nfpOutR; }
@keyframes nfpIn { from { transform: translateX(var(--nfp-slide, 32%)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nfpInL { from { transform: translateX(calc(-1 * var(--nfp-slide, 32%))); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nfpOut { from { transform: none; opacity: 1; } to { transform: translateX(calc(-1 * var(--nfp-slide, 32%))); opacity: 0; } }
@keyframes nfpOutR { from { transform: none; opacity: 1; } to { transform: translateX(var(--nfp-slide, 32%)); opacity: 0; } }

.nfp-foot { flex: none; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding-top: 12px; position: relative; z-index: 2;
  transform: translateY(calc(-1 * var(--foot-up, var(--kb, 0px)))); transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
/* the box being typed in slides to its dock on the keyboard, right above the buttons, on the same curve
   (keyboardDock.ts); a solid strip behind them hides what is under, so nothing shows through */
.nfp .nf-box, .nfp .nf-row, .nfp-ph li, .nfp .nf-ppl li { transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 160ms ease; }
/* white like the card it left: a see-through box (Other) showed the grey page behind it once docked */
.nfp [data-docked] { position: relative; z-index: 3; background: var(--card); }
.nfp .nfp-ph li[data-docked] { background: var(--card); border-radius: 20px; box-shadow: inset 0 0 0 2px var(--ink); }
/* its top edge fades over 16px, so whatever it covers goes softly under it instead of being cut off by a hard line */
.nfp-dockbg { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: calc(var(--kb, 0px) + var(--dock-h, 0px) + 16px + max(16px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))); background: var(--side);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16px); mask-image: linear-gradient(to bottom, transparent, #000 16px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
.nfp.kb-on .nfp-dockbg { opacity: 1; }.nfp-foot .nf-sec { width: auto; padding: 0 24px; }
.nfp-foot > :only-child { grid-column: 1 / -1; }
.nfp-foot .nf-sec:disabled { opacity: 0.5; }

/* a month open in place (ui/Calendar.tsx) */
.nf-cal { padding: 6px 10px 8px; border-radius: 16px; background: var(--side); }
.nf-cal header { display: flex; align-items: center; justify-content: space-between; height: 28px; font-size: 13.5px; }
.nf-cal b { font-weight: 600; }
.nf-cal header button { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.nf-cal header button:disabled { opacity: 0.3; }
.nf-days { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 26px; justify-items: center; align-items: center; row-gap: 1px; min-height: 182px; align-content: start; }
.nf-days i { font-size: 11.5px; font-style: normal; font-weight: 500; color: var(--muted); }
.nf-days button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 12.5px; color: var(--ink); }
.nf-days button:disabled { color: var(--faint); }
.nf-days button.now { box-shadow: inset 0 0 0 1.5px var(--faint); }
.nf-days button.on { background: var(--ink); box-shadow: none; color: var(--ghost); font-weight: 600; }

/* phases: each one a row you can rename, move or remove */
/* no overflow clip: a row typed in must be free to slide up to the keyboard */
.nfp-ph { list-style: none; margin: 10px 0 0; padding: 0; background: var(--card); border-radius: 20px; }
.nfp-ph li:first-child { border-radius: 20px 20px 0 0; }
.nfp-ph li:last-child { border-radius: 0 0 20px 20px; }
.nfp-ph li:only-child { border-radius: 20px; }
.nfp-ph li { display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 16px; min-height: 54px; }
.nfp-ph li + li { box-shadow: inset 0 1px 0 var(--line-2); }
.nfp-ph input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15.5px; font-weight: 500; color: var(--ink); padding: 8px 0; }
.nfp-ph input::placeholder { color: var(--faint); font-weight: 400; }
.nfp-ph li:focus-within { background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.nfp-ph li.bad { box-shadow: inset 0 0 0 2px var(--red); border-radius: 20px; }
.nfp-ph li.bad input::placeholder { color: var(--red); font-weight: 500; }
.nfp-ph button { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.nfp-ph button:disabled { opacity: 0.3; }
.nfp-ph button:active:not(:disabled) { background: var(--side); }
.nfp-err { margin: 8px 4px 0; }
.nf-newp:disabled { opacity: 0.5; }

/* colour on its own screen: bigger swatches, four to a row */
.nfp-sw { grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 18px; }
.nfp-sw button { max-width: 60px; }
.nfp-date { height: 56px; }
.nfp-date input[type='date'] { font-size: 16px; max-width: 170px; }

@media (prefers-reduced-motion: reduce) {
  .nfp-bar .fill, .nfp-bar .head { transition: none; }
  .nfp-pane.come, .nfp-pane.leave { animation-duration: 1ms; }
  .nfp-ttl { animation: none; }
  .nfp-say { animation: nfpSayRM 1.9s linear 0.2s both; }
  @keyframes nfpSayRM { 0%, 100% { opacity: 0; } 10%, 85% { opacity: 1; } }
}
.nf-sub { margin: 0 4px 18px; font-size: 14px; color: var(--muted); }
.nf-kinds button { height: 48px; border-radius: 14px; border: 0; background: transparent; display: flex; align-items: center; gap: 8px; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.nf-kinds i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); flex: none; }
.nf-kinds button.on { background: var(--np-g); }
.nf-kinds button.on i { border: 5.5px solid var(--ink); }
.nf-row { position: relative; display: flex; align-items: center; gap: 12px; height: 56px; margin-top: 10px; padding: 0 22px; background: var(--card); border-radius: 28px; font-size: 15px; font-weight: 500; }
.nf-row small { color: var(--muted); font-size: 13px; font-weight: 400; }
.nf-row input[type='date'] { border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); max-width: 150px; }

/* actions at the foot of the page */
.nf-foot { margin-top: auto; padding-top: 24px; display: grid; gap: 8px; }
.nf-cta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; width: 100%; border: 0; border-radius: 18px; background: var(--btn); color: #151515; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; transition: transform 140ms ease-out; }
.nf-cta:disabled { background: var(--line); color: var(--faint); }
.nf-sec { display: flex; align-items: center; justify-content: center; height: 52px; width: 100%; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; transition: transform 140ms ease-out; }
.nf-cta:not(:disabled):active, .nf-sec:active, .nf-bk:active, .nf-newp:active { transform: scale(0.98); }
.nf-chip { flex: none; height: 38px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--np-g); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; display: grid; place-items: center; text-decoration: none; }
.nf-chip-w { background: #fff; color: #151515; }

/* team */
.nf-ppl { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 20px; overflow: hidden; }
.nf-ppl li { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; min-height: 62px; }
.nf-ppl li + li { border-top: 1px solid var(--line-2); }
.nf-ppl b { display: block; font-size: 15px; font-weight: 600; }
.nf-ppl small { font-size: 12.5px; color: var(--muted); }
.nf-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Phone: invites are rows like the phases (asked 2026-11-05): the email box in the row, its role at the end. The list
   must not clip, or a row docked on the keyboard (keyboardDock.ts) would be cut off as it slides out of it. */
.nfp .nf-ppl { overflow: visible; }
.nfp .nf-ppl li:first-child { border-radius: 20px 20px 0 0; }
.nfp .nf-ppl li:last-child { border-radius: 0 0 20px 20px; }
.nfp .nf-ppl li:only-child { border-radius: 20px; }
/* every row on one plan, [avatar] [name or email] [role ▾] [×], one gap, so the roles and crosses stand in columns */
.nfp .nf-ppl li { gap: 10px; }
.nf-ppl .nf-name { min-width: 0; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* someone you work with: their name, and under it that they are invited, not put in */
.nf-ppl .nf-name2 { display: flex; flex-direction: column; line-height: 1.25; }
.nf-name2 b { font: inherit; overflow: hidden; text-overflow: ellipsis; }
.nf-name2 small { font-size: 12px; font-weight: 400; color: var(--muted); }
.nf-xspace { flex: none; width: 40px; }
.nf-rt-fixed { display: inline-flex; align-items: center; } /* Leader: shown in the role's place, never changed */
.nfp .nf-ppl li.bad { box-shadow: inset 0 0 0 2px var(--red); border-radius: 20px; border-top-color: transparent; }
.nfp .nf-ppl li.bad + li { border-top-color: transparent; }
/* the ring inside the row, like every text box's: drawn outside, its top fell past the screen's edge when the row docked
   right under the line (2026-11-05, "upar ki line ghayab") */
.nfp .nf-ppl li[data-docked] { border-radius: 20px; border-top-color: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
/* taking someone out: a round button you can see and hit easily (asked 2026-11-05), not a bare 34px cross */
.nfp .nf-ppl .nf-x { width: 40px; height: 40px; background: var(--side); color: var(--ink); -webkit-tap-highlight-color: transparent; transition: transform 140ms ease-out; }
.nfp .nf-ppl .nf-x:active { transform: scale(0.92); }
.nf-mail-in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15.5px; font-weight: 500; color: var(--ink); padding: 8px 0; caret-color: var(--ink); }
.nf-mail-in::placeholder { color: var(--faint); font-weight: 400; }
.nfp .nf-ppl li.bad .nf-mail-in::placeholder { color: var(--red); font-weight: 500; }
.nf-rt-chip { flex: none; max-width: 40%; height: 36px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent; }
/* a misspelt provider (gmial.com): the right one, one tap away */
.nf-fix { flex: none; height: 36px; padding: 0 6px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; }
.nf-ppl .nf-err { flex: none; margin: 0; font-size: 13px; font-weight: 500; color: var(--red); white-space: nowrap; }
/* the two ways to invite, side by side, two buttons of one kind */
.nf-acts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.nf-acts2 .nf-newp { margin-top: 0; padding: 0 8px; font-size: 14.5px; white-space: nowrap; }
/* A row's roles, opening under it inside the same card (asked 2026-11-05): grid rows 0fr ↔ 1fr, so opening and
   closing are the same glide; the space inside is margin, which folds away with it (padding would not) */
/* stretch, not the rows' centre: centred in a 0px room the roles stood 120px up over the row above and slid 137px
   down through it while opening ("ajeeb", 2026-11-05); stretched, they stay pinned under the chip and are clipped */
.nfp .nf-ppl li.nf-roles { display: grid; grid-template-rows: 0fr; align-items: stretch; min-height: 0; padding: 0; border-top: 0; transition: grid-template-rows 0.32s cubic-bezier(0.32, 0.72, 0, 1); }
.nfp .nf-ppl li.nf-roles[data-open] { grid-template-rows: 1fr; }
/* the roles themselves come out of the chip (--ox: its place across the row) and go back into it: from just under
   it, a little small and see-through, to their place; transform and opacity only, on the same curve as the room */
.nf-roles > div { min-height: 0; overflow: hidden; opacity: 0; transform: translateY(-14px) scale(0.92); transform-origin: var(--ox, 80%) 0;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.18s ease-out; }
.nf-roles[data-open] > div { opacity: 1; transform: none; transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease-out 0.03s; }
.nf-rg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 14px 0; }
.nf-rg button { height: 44px; padding: 0 10px; border: 0; border-radius: 14px; background: var(--side); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent; transition: transform 140ms ease-out; }
.nf-rg button:active { transform: scale(0.97); }
.nf-av-btn { border: 0; padding: 0; font: inherit; -webkit-tap-highlight-color: transparent; }
/* the chosen role in the tab pill's colours */
.nf-rg button.on { background: var(--brand); color: var(--ghost); }
.nf-rg-what { margin: 10px 18px 14px; font-size: 13px; color: var(--muted); }
.nf-rt svg { transition: rotate 0.25s cubic-bezier(0.32, 0.72, 0, 1); }
.nf-rt[aria-expanded='true'] svg { rotate: 180deg; }
@media (prefers-reduced-motion: reduce) { .nfp .nf-ppl li.nf-roles, .nf-roles > div, .nf-rt svg { transition: none; } }
.nf-av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--grey-bg); color: var(--ink); font-size: 13px; font-weight: 600; }
.nf-av-mail { color: var(--muted); }
.nf-rt { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); }
.nf-x, .nf-plus { width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; color: var(--muted); background: transparent; }
.nf-plus { background: var(--np-g); color: var(--ink); }
.nf-newp { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 52px; margin-top: 14px; border: 0; border-radius: 18px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); transition: transform 140ms ease-out; }


/* check */
.nf-sum { background: var(--card); border-radius: 20px; overflow: hidden; }
.nf-sr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 16px; font-size: 15px; }
.nf-sr + .nf-sr { border-top: 1px solid var(--line-2); }
.nf-sr > span:first-child { color: var(--muted); font-size: 13px; }
.nf-sr .v { display: flex; align-items: center; font-weight: 600; text-align: right; }
.nf-sr button { margin-left: 10px; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }

/* ready / joined */
/* A research just made, welcomed over My research (features/projects/MadeCard.tsx): a card in the middle on every
   screen, coming up from slightly small with ease-out, leaving faster than it came */
.made-ov { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 16px; background: var(--overlay); animation: madeFade 0.22s ease-out both; }
.made { width: min(100%, 380px); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 26px 20px 20px; border-radius: 28px; background: var(--card); text-align: center; animation: madeIn 0.34s cubic-bezier(0.23, 1, 0.32, 1) both; }
.made .drop { display: block; margin: 0 auto 12px; }
.made h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.made-sub { margin: 0 0 20px; font-size: 14.5px; color: var(--muted); }
.made-mini { margin: 0 4px 8px; font-size: 13px; font-weight: 500; color: var(--muted); text-align: left; }
.made .nf-send { margin: 0 0 16px; background: var(--side); text-align: left; }
.made .nf-send .grow { flex: 1; min-width: 0; } /* the address takes the room, Send stands at the row's end */
.made .nf-chip { background: var(--brand); color: var(--ghost); }
.made-ov.out { animation: madeFadeOut 0.18s ease-in both; }
.made-ov.out .made { animation: madeOut 0.18s ease-in both; }
@keyframes madeFade { from { opacity: 0; } }
@keyframes madeFadeOut { to { opacity: 0; } }
@keyframes madeIn { from { opacity: 0; transform: translateY(10px) scale(0.95); } }
@keyframes madeOut { to { opacity: 0; transform: scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .made, .made-ov.out .made { animation-name: madeFade; } .made-ov.out .made { animation-name: madeFadeOut; } }
.nf-send { list-style: none; padding: 0; margin: 12px 0 0; background: var(--card); border-radius: 20px; overflow: hidden; }
.nf-send li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; }
.nf-send li + li { border-top: 1px solid var(--line-2); }
.nf-send b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-send small { font-size: 12.5px; color: var(--muted); }

/* join: one card for the link, with the clipboard's link inside it when there is one */
.nf-one { display: flex; flex-direction: column; flex: 1; }
.nf-in { display: flex; align-items: center; gap: 12px; min-height: 56px; background: var(--card); border-radius: 28px; padding: 6px 8px 6px 22px; box-shadow: inset 0 0 0 2px transparent; }
.nf-in:focus-within { box-shadow: inset 0 0 0 1px var(--box-on); }
.nf-in.bad { box-shadow: inset 0 0 0 2px var(--red); }
.nf-in input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 0; }
.nf-err-in { margin: 8px 6px 0; }
.nf-err-box { margin: 10px 0 0; padding: 14px 16px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 2px var(--red); }
.nf-sug { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 6px 10px 12px; border-radius: 18px; background: var(--btn); color: #151515; }
.nf-sug small { display: block; font-size: 12px; color: #3d4a16; }
.nf-sug b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the invite card and its endings (JoinPage.tsx, Demo/join-card.html): in the middle of the screen, like the welcome */
.jn { width: min(100%, 460px); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 26px 24px 22px; border-radius: 26px; background: var(--card); box-shadow: var(--shadow-lg); animation: madeIn 0.34s cubic-bezier(0.23, 1, 0.32, 1) both; }
.jn h1 { margin: 18px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.jn-done { text-align: center; }
.jn-done .drop { display: block; margin: 0 auto 12px; }
.jn-done h1 { margin-top: 0; }
.jn .nf-av { background: var(--side); }
.jn .nf-err-box { font-weight: 400; color: var(--ink); }
.jn-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.jn-foot .nf-cta, .jn-foot .nf-sec { height: 42px; padding: 0 20px; border-radius: 13px; font-size: 14px; }
.jn-foot .nf-sec { width: auto; background: var(--side); }
.jn-foot .nf-cta { width: auto; min-width: 116px; }
.jn-foot > :only-child { flex: 1; }
@media (max-width: 900px) { .jn-foot > * { flex: 1; } }
.nf-who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.nf-who b { color: var(--ink); font-weight: 600; }
.nf-meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.nf-role { margin-top: 18px; background: var(--side); border-radius: 16px; padding: 14px 16px; font-size: 14px; color: var(--muted); }
.nf-role b { color: var(--ink); font-weight: 600; }
.nf-role small { display: block; font-size: 13px; margin-top: 2px; }

/* No research yet on a big screen (ProjectsDesktop.tsx, D in Demo/pc-empty-research-options.html, white as asked
   2026-11-06): one card filling the screen under the top bar, the words on it, the road drawn on the whole card so the
   drop falls in from its top edge */
@media (min-width: 901px) { .app:has(.ka.on .dh-empty) main.content { max-width: 1560px; padding-block: 8px 24px; } } /* big screens only: on phones it pulled the top under the status bar */
.dh-empty { position: relative; overflow: hidden; height: max(440px, calc(100dvh - 92px)); border-radius: 28px; background: var(--card); color: var(--ink); }
.road.story.dh-e-road { position: absolute; inset: 0; border-radius: 0; background: none; }
/* the empty Research home takes the empty Tasks and Chats screens' wash (15-stories.css), its own way: a wide lime hill under
   the road and a small light round top right (asked 2026-11-11). Hard-edged rounds, no fades */
.dh-empty, .road.story.pp-road {
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--card) 55%, transparent) 0 16%, transparent calc(16% + 1px)),
    radial-gradient(ellipse 78% 34% at 50% 104%, color-mix(in srgb, var(--btn) 45%, transparent) 0 99%, transparent calc(99% + 1px)),
    var(--brand-soft);
}
.dh-empty .road.story .bed, .road.story.pp-road .bed { stroke: color-mix(in srgb, var(--card) 80%, transparent); }
.dh-empty .dh-e-join { background: var(--card); }
.dh-e-say { position: relative; padding: clamp(22px, 4.5vh, 44px) clamp(24px, 3.4vw, 52px) 0; pointer-events: none; }
.dh-e-say h1 { margin: 0 0 clamp(14px, 2.4vh, 24px); max-width: 12.5em; font-size: clamp(28px, 3.4vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
.dh-e-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.dh-e-new, .dh-e-join { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 14px; font-size: 14.5px; text-decoration: none; white-space: nowrap; pointer-events: auto; transition: transform 140ms ease-out, background 160ms ease; }
.dh-e-new { background: var(--btn); color: #151515; font-weight: 600; }
.dh-e-join { background: var(--side); color: var(--ink); font-weight: 500; }
.dh-e-new:active, .dh-e-join:active { transform: scale(0.98); }
.dh-e-new:focus-visible, .dh-e-join:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .dh-e-new:hover { background: color-mix(in srgb, var(--btn) 88%, #151515); }
  .dh-e-join:hover { background: color-mix(in srgb, var(--ink) 8%, var(--side)); }
}

/* the road (Road.tsx): white card, lime drop, grey road; the lit stop is lime */
.road { background: var(--card); border-radius: 32px; display: grid; place-items: center; overflow: hidden; }
.road svg { display: block; width: 100%; height: 100%; max-height: 380px; }
.road .bed { fill: none; stroke: var(--side); stroke-width: 26; stroke-linecap: round; }
.road .way { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 0.1 10; opacity: 0.35; }
.road .drop { fill: var(--btn); stroke: #151515; stroke-width: 2; stroke-linejoin: round; }
.road .shine { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3.2; stroke-linecap: round; }
.road .shade { fill: rgba(21, 21, 21, 0.08); }
.road .stop { fill: var(--card); stroke: var(--faint); stroke-width: 2.6; }
.road .end, .road .lit { fill: var(--btn); stroke: #151515; stroke-width: 2.2; }
.road .dot { fill: #151515; }
.road .tick { fill: none; stroke: #151515; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.road text { font: 600 18px var(--font); fill: var(--ink); letter-spacing: -0.015em; }
.road .hint { font: 500 13px var(--font); fill: var(--muted); }
/* the story road (Road.tsx StoryRoad, roadStory.ts): the live drop rides on top, clipped by the card; each stop turns
   lime once its step is done, and Publish's tick shows only then */
.road.story { position: relative; }
/* drawn at the card's own size in px (Road.tsx storyLayout), so it fills any card */
.road.story svg { position: absolute; inset: 0; max-height: none; }
.road-rider { position: absolute; left: 0; top: 0; transform: translateY(-200%); pointer-events: none; will-change: transform; }
.road.story .stop { transition: fill 0.3s cubic-bezier(0.23, 1, 0.32, 1), stroke 0.3s cubic-bezier(0.23, 1, 0.32, 1); }
.road.story .stop.on { fill: var(--btn); stroke: #151515; }
.road.story .tick { opacity: 0; transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1); }
.road.story .end-stop.on + .tick { opacity: 1; }

/* the New tag (NewTag.tsx): 3 days on a research just made. Lime everywhere; dark where the card itself is lime */
.new-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--btn); color: #151515; font-size: 11.5px; font-weight: 600; letter-spacing: 0; line-height: 1; white-space: nowrap; vertical-align: 1px; }
.pp-big .new-tag, .pa-row.lime .new-tag { background: #151515; color: #fff; }
.dh-pc-end { flex: none; display: inline-flex; align-items: baseline; gap: 8px; }
/* the phone's cards: in the corner, with the line beside it kept clear */
.pp-c:has(.new-tag) { position: relative; }
.pp-c .new-tag { position: absolute; top: 14px; right: 14px; }
.pp-c:has(.new-tag) small { padding-right: 40px; }

/* ---------- Desktop and tablet (above 900px): Join's column, centred, a little room above ---------- */
@media (min-width: 901px) {
  .nf { min-height: calc(100vh - 160px); }
  .nf-foot { max-width: 520px; }
}

/* ---------- New research with a mouse on a big screen: a small white popup over My research, one size on every step, so
   Back and Next never move (confirmed in Demo/pc-new-research-popup.html, 2026-11-06). The same parts as the phone; inside
   the white popup its white cards turn grey. A touch tablet keeps the phone's layout, which its keyboard needs (keyboardDock.ts). ---------- */
@media (min-width: 901px) and (pointer: fine) {
  /* the page stays put; the room reserved for its scrollbar is dimmed with it */
  html:has(.nfp-ov), html:has(.made-ov) { overflow: hidden; background: linear-gradient(var(--overlay), var(--overlay)), var(--ghost); }
  .nfp-ov { display: grid; place-items: center; position: fixed; inset: 0; z-index: 60; padding: 16px; background: var(--overlay); animation: madeFade 0.22s ease-out both; }
  .nfp-ov.out { animation: madeFadeOut 0.18s ease-in both; }
  .made-ov { animation: none; } /* the welcome takes over the popup's dim */
  .nfp { --nfp-slide: 12%; --np-g: var(--card); --hover: color-mix(in srgb, var(--ink) 7%, transparent);
    position: relative; inset: auto; width: min(100%, 460px); height: min(480px, 100%); max-width: none; margin: 0; padding: 20px 24px 22px; background: var(--card); border-radius: 26px; box-shadow: var(--shadow-lg);
    display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; grid-template-rows: 70px auto minmax(0, 1fr) auto; column-gap: 14px;
    animation: madeIn 0.34s cubic-bezier(0.23, 1, 0.32, 1) both; }
  .nfp-ov.out .nfp { animation: madeOut 0.18s ease-in both; }
  .nfp > .nf-top { display: contents; }
  /* the top row: Back on the left (its room stays empty on the first step, so the line never moves), the line, close on the right */
  .nfp .nf-bk { align-self: end; width: 34px; height: 34px; background: var(--side); }
  .nfp .nfp-back { display: grid; grid-area: 1 / 1; }
  .nfp .nfp-x { grid-area: 1 / 3; }
  .nfp-bar { grid-area: 1 / 2; align-self: end; margin: 0 8px 14px 0; background: var(--side); }
  /* clipped, not stretched: a scaled fill squashes its round end flat */
  .nfp-bar .fill { transform: none; clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0 round 3px); transition-property: clip-path; }
  .nfp-drop { left: -18px; }
  .nfp-say { bottom: 44px; font-size: 11.5px; padding: 3px 9px; }
  .nfp .nfp-ttl { grid-area: 2 / 1 / 2 / -1; margin: 8px 0 0; text-align: left; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 26.4px; }
  .nfp-stage { grid-area: 3 / 1 / 3 / -1; margin: 0 -24px; }
  .nfp-pane { display: flex; flex-direction: column; padding: 3px 24px 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .nfp-pane > * { flex: none; }
  .nfp-line { font-size: 13.5px; font-weight: 400; margin: 0; }
  /* the question stands in the middle of the room under the line; lists start right under it (below) */
  .nfp-line + * { margin-block: auto; }
  .nfp-dockbg { display: none; }
  /* only the main action at the foot, the full width: Back and close are in the top row (asked 2026-11-06) */
  .nfp-foot { grid-area: 4 / 1 / 4 / -1; display: block; padding-top: 0; transform: none; }
  .nfp-foot .nf-cta { width: 100%; height: 42px; padding: 0 20px; border-radius: 13px; font-size: 14px; }
  .nfp-foot .nf-sec { display: none; }

  /* Name: the title comes down and joins the line and the box, the three together in the middle (option A). The moves
     are the room's own numbers, so the title's row and the screen keep their size and nothing else shifts */
  .nfp[data-step='0'] .nfp-ttl { text-align: center; font-size: 26px; translate: 0 89px; }
  .nfp-pane:has(.nf-big-in) { padding-top: 92px; }
  .nfp-pane:has(.nf-big-in) .nfp-line { font-size: 14px; text-align: center; }
  .nfp-pane:has(.nf-big-in) .nfp-line + * { margin-block: 20px 0; }
  .nfp .nf-box:not(.bad):not(.nf-box-g) { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
  .nfp .nf-big-in { font-size: 16px !important; font-weight: 500; }

  /* Field and Type: grey tiles, the chosen one white with an ink ring */
  .nfp .nf-card { padding: 0; background: none; }
  .nfp .nf-kinds { position: relative; gap: 8px; }
  .nfp .nf-kinds { --pad: 18px; }
  /* Field's four: one slim pill to a row (option B, Demo/pc-field-step-options.html); tall ones looked childish */
  .nfp .nf-kinds:not(:has(> button:nth-of-type(5))) { --pad: 20px; grid-template-columns: 1fr; }
  .nfp .nf-kinds button { height: 46px; padding: 0 var(--pad); gap: 10px; border-radius: 999px; background: var(--side); font-size: 13.5px; font-weight: 500; }
  .nfp .nf-kinds:not(:has(> button:nth-of-type(5))) button { height: 50px; font-size: 14.5px; }
  .nfp .nf-kinds i { width: 16px; height: 16px; }
  .nfp .nf-kinds button.on { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
  .nfp .nf-kinds button.on i { border-width: 5px; }
  /* your own words are written in the Other tile itself, in place of its name, so no tile moves when it opens */
  .nfp .nf-own { position: absolute; grid-area: var(--row) / 2; inset: 2px 2px 2px calc(var(--pad) + 26px); height: auto; padding: 0 10px 0 0; border-radius: 0 999px 999px 0; background: none; box-shadow: none; gap: 6px; }
  .nfp .nf-kinds:not(:has(> button:nth-of-type(5))) .nf-own { grid-area: var(--last) / 1; padding-right: var(--pad); }
  .nfp .nf-own input { font-size: 13.5px; }
  .nfp .nf-kinds button.on:has(~ .nf-own) { color: transparent; }
  .nfp .nf-kinds:has(.nf-own.bad) button.on { box-shadow: inset 0 0 0 2px var(--red); }
  .nfp .nf-phases { margin: 10px 2px 0; padding: 0; font-size: 12.5px; }

  /* Phases: start from these or empty, then the list, which scrolls by itself above Add a phase */
  .nfp-pane:has(.nfp-ph) { overflow: hidden; }
  .nfp-pane > .nf-card:has(+ .nfp-ph) { margin-block: 12px 0; padding: 3px; border-radius: 12px; background: var(--side); }
  .nfp .nf-card:has(+ .nfp-ph) .nf-kinds { grid-template-columns: 1fr 1fr; gap: 3px; }
  .nfp .nf-card:has(+ .nfp-ph) .nf-kinds button { height: 30px; justify-content: center; border-radius: 9px; background: none; box-shadow: none; font-size: 13px; font-weight: 500; color: var(--muted); }
  .nfp .nf-card:has(+ .nfp-ph) .nf-kinds button.on { background: var(--card); font-weight: 600; color: var(--ink); }
  .nfp .nf-card:has(+ .nfp-ph) .nf-kinds i { display: none; }
  .nfp-pane > .nfp-ph { flex: 0 1 auto; min-height: 0; margin-top: 8px; overflow-y: auto; border-radius: 16px; background: var(--side); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .nfp-ph li { min-height: 34px; padding: 3px 6px 3px 14px; }
  .nfp-ph li + li { box-shadow: inset 0 1px 0 var(--card); }
  .nfp-ph input { padding-block: 2px; font-size: 13.5px; }
  .nfp-ph button { width: 26px; height: 26px; }
  .nfp .nf-newp { height: 38px; margin-top: 8px; border-radius: 12px; font-size: 13px; font-weight: 500; }
  .nfp .nf-newp svg { width: 16px; height: 16px; }

  /* Colour: four to a row, large */
  .nfp-pane > .nfp-sw { grid-template-columns: repeat(4, 58px); justify-content: center; gap: 18px 30px; padding: 0; background: none; }
  .nfp-sw button { width: 58px; max-width: none; }

  /* Target date: a month open in place of the phone's box; six weeks' room, so no month moves the rest */
  .nfp-date { display: none; }
  .nf-big-only { display: block; }
  .nf-cal { margin-block: auto; }

  /* Team: compact rows on grey, the two ways to invite side by side */
  .nfp-pane:has(.nf-ppl) .nfp-line + * { margin-block: 12px 0; }
  .nfp .nf-ppl { border-radius: 16px; background: var(--side); }
  .nfp .nf-ppl li { gap: 8px; min-height: 40px; padding: 5px 8px 5px 14px; }
  .nfp .nf-ppl li + li { border-top-color: var(--card); }
  .nfp .nf-ppl li:first-child { border-radius: 16px 16px 0 0; }
  .nfp .nf-ppl li:last-child { border-radius: 0 0 16px 16px; }
  .nfp .nf-ppl li:only-child { border-radius: 16px; }
  .nfp .nf-ppl b, .nfp .nf-ppl .nf-name { font-size: 13.5px; font-weight: 500; }
  .nfp .nf-mail-in { font-size: 13.5px; padding: 4px 0; }
  .nfp .nf-rt { font-size: 12.5px; font-weight: 400; }
  .nfp .nf-rt-chip { height: 28px; }
  .nfp .nf-av { width: 28px; height: 28px; font-size: 12px; background: var(--card); }
  .nfp .nf-ppl .nf-x, .nfp .nf-plus { width: 26px; height: 26px; background: var(--card); color: var(--ink); }
  .nfp .nf-xspace { width: 26px; }
  .nfp .nf-acts2 { gap: 8px; margin-top: 8px; }
  .nfp .nf-acts2 .nf-newp { font-size: 13px; }
  .nfp .nf-mini { margin: 12px 2px 6px; font-size: 12.5px; }
  .nfp .nf-rg button { height: 34px; background: var(--card); font-size: 13px; }
  .nfp .nf-rg button.on { background: var(--brand); }
  .nfp .nf-rg-what { margin: 8px 16px 10px; font-size: 12.5px; }

  /* no keyboard docks a row here, so a row being typed in carries the same ink ring as every text box */
  .nfp-ph li:focus-within, .nfp .nf-ppl li:has(> input:focus) { border-radius: 16px; background: none; box-shadow: inset 0 0 0 1px var(--box-on); }
  .nfp .nf-ppl li:has(> input:focus) { border-top-color: transparent; }
  .nfp .nf-ppl li:has(> input:focus) + li { border-top-color: transparent; }

  .nfp button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .nfp-sw button:focus-visible { outline-offset: 4px; }
}
/* a mouse can point before it presses: the same tints the rest of the site uses on hover */
@media (hover: hover) and (pointer: fine) {
  .nfp .nf-bk:hover, .nfp .nf-sec:not(:disabled):hover { background: var(--hover); }
  .nfp .nf-kinds button:not(.on):hover, .nfp-ph button:not(:disabled):hover, .nfp .nf-rg button:not(.on):hover, .nfp .nf-ppl .nf-x:hover, .nfp .nf-plus:hover, .nfp .nf-chip:hover { background: var(--hover); }
  .nfp .nf-newp:not(:disabled):hover, .nf-cal header button:not(:disabled):hover, .nf-days button:not(:disabled):not(.on):hover { background: var(--hover); }
  .nfp .nf-rt-chip:hover { color: var(--ink); }
  .nfp .nf-cta:not(:disabled):hover { background: color-mix(in srgb, var(--btn) 88%, #151515); }
  .nfp .nf-sw button:not(.on):hover { box-shadow: 0 0 0 2.5px var(--card), 0 0 0 4.5px color-mix(in srgb, var(--sw) 40%, transparent); }
}
/* ---------- The Chats and Tasks screens with nothing to show (features/stories/StoryPages.tsx) ----------
   Demo/empty-stories-v2.html, C1 and T1 picked 2026-11-11: the stage stands on a soft wash of the brand (sky for Chats, lime
   for Tasks) with two quiet round shapes; the drops are big and the cards look like the app's own. The words sit beside it on
   a big screen, under it on a phone. The stage is drawn at one size and scaled to the room. */
@media (min-width: 901px) { .app:has(.ka.on .st-page) main.content { max-width: 1560px; padding-block: 8px 24px; } } /* big screens only: on phones it pulled the top under the status bar */
.st-page { display: grid; grid-template-columns: minmax(280px, 30%) minmax(0, 1fr); gap: 24px; align-items: center; height: max(480px, calc(100dvh - 92px)); padding: 24px clamp(16px, 2vw, 32px) 24px clamp(24px, 3vw, 48px); overflow: hidden; border-radius: 28px; background: var(--card); color: var(--ink); }
.st-say h1 { margin: 0; font-size: clamp(28px, 2.5vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
.st-sub { margin: 8px 0 22px; font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.st-acts-page { display: grid; justify-items: start; gap: 10px; }
.st-cta, .st-join { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 14px; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: transform 140ms ease-out, background 160ms ease; }
.st-cta { background: var(--btn); color: #151515; font-weight: 600; }
/* the same two buttons as the empty Research home: big screens .dh-e-new/.dh-e-join, phones .pp-cta/.pp-join (asked 2026-11-11) */
.st-join { background: var(--side); color: var(--ink); font-weight: 500; }
.st-cta:active, .st-join:active { transform: scale(0.98); }
.st-cta:focus-visible, .st-join:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .st-cta:hover { background: color-mix(in srgb, var(--btn) 88%, #151515); }
  .st-join:hover { background: color-mix(in srgb, var(--ink) 8%, var(--side)); }
}

/* the room: the wash and its two shapes, then the stage */
.st-room { position: relative; height: 100%; min-width: 0; overflow: hidden; border-radius: 26px; }
/* one wash for the empty screens (Tasks, Chats, and the Research home's road, 14-new-project.css), each its own way round */
.st-room.lime, .st-room.lime2 { background: var(--brand-soft); }
.st-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.lime .st-blob.a { width: 62%; aspect-ratio: 1; right: -18%; top: -26%; background: color-mix(in srgb, var(--btn) 45%, transparent); }
.lime .st-blob.b { width: 40%; aspect-ratio: 1; left: -14%; bottom: -14%; background: color-mix(in srgb, var(--card) 55%, transparent); }
.lime2 .st-blob.a { width: 64%; aspect-ratio: 1; left: -22%; top: -28%; background: color-mix(in srgb, var(--card) 55%, transparent); }
.lime2 .st-blob.b { width: 46%; aspect-ratio: 1; right: -16%; bottom: -18%; background: color-mix(in srgb, var(--btn) 45%, transparent); }
.st-stage { position: absolute; left: 50%; top: 50%; width: 360px; height: 340px; transform: translate(-50%, -50%); pointer-events: none; }
.st-rider { position: absolute; left: 0; top: 0; transform: translateY(-900px); z-index: 5; will-change: transform; }
.st-rider.mate .drop { filter: hue-rotate(155deg) saturate(0.8) brightness(1.05); }
.st-rider.mate2 .drop { filter: hue-rotate(250deg) saturate(0.7) brightness(1.05); }
.st-floor { position: absolute; left: 20px; right: 20px; top: 316px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* soft cards, as the app's own */
.st-task, .st-bu, .st-chan, .st-dots { box-shadow: 0 1px 2px rgba(21, 21, 21, 0.05), 0 14px 30px -18px rgba(21, 21, 21, 0.3); }

/* ---- Tasks (T1): the task card, its chip, the stamp; a sheet passes between the two drops ---- */
.st-task { position: absolute; left: 50%; top: 22px; width: 262px; z-index: 4; padding: 13px 14px 14px; border-radius: 20px; background: var(--card); translate: -50% 0; rotate: -2deg;
  opacity: 0; transform: translateY(10px) scale(0.97); transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.23, 1, 0.32, 1); }
.st-task.on { opacity: 1; transform: none; }
.st-task h4 { margin: 0 0 7px; font-size: 15px; font-weight: 600; }
.st-who { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.st-who b { font-weight: 600; }
.st-who small { color: var(--muted); }
.st-av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-bg); color: var(--blue); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 35%, transparent); font-size: 10px; font-weight: 700; }
.st-chip { margin-left: auto; height: 22px; padding: 0 9px; border-radius: 11px; display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; white-space: nowrap; }
.st-chip.todo { background: var(--side); color: var(--muted); }
.st-chip.doing { background: var(--blue-bg); color: var(--blue); }
.st-chip.sent { background: var(--amber-bg); color: var(--amber); }
.st-chip.back { background: var(--red-bg); color: var(--red); }
.st-chip.ok { background: var(--green-bg); color: var(--green); }
.st-said { min-height: 34px; margin-top: 9px; padding: 8px 10px; border-radius: 12px; background: var(--side); font-size: 12.5px; line-height: 1.35; transition: opacity 0.18s ease; }
.st-reply { min-height: 34px; margin: 6px 0 9px; padding: 8px 10px; border-radius: 12px; background: var(--side); font-size: 12.5px; }
.st-reply:empty::before { content: attr(data-ph); color: var(--faint); }
.st-acts { display: flex; gap: 6px; }
.st-a { flex: 1; height: 34px; display: grid; place-items: center; border-radius: 17px; background: var(--side); font-size: 12.5px; font-weight: 600; transition: transform 0.12s ease; }
.st-a.yes { background: var(--btn); color: #151515; }
.st-a.press { transform: scale(0.94); }
.st-stamp { position: absolute; right: 22px; top: 6px; z-index: 6; padding: 6px 12px; border-radius: 12px; border: 2.5px solid var(--green); color: var(--green); background: color-mix(in srgb, var(--green-bg) 88%, transparent); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; transform: rotate(10deg); opacity: 0; }
.st-stamp.on { opacity: 1; }
.st-trail { position: absolute; left: 100px; right: 100px; top: 274px; border-top: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent); }
.st-tag { position: absolute; top: 324px; width: 90px; text-align: center; font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--ink) 55%, transparent); }
.st-tag.left { left: 21px; }
.st-tag.right { right: 21px; }
.st-sheet { position: absolute; left: 0; top: 0; z-index: 7; width: 40px; height: 50px; padding: 9px 7px; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); opacity: 0; will-change: transform; }
.st-sheet i { display: block; height: 3px; margin-bottom: 6px; border-radius: 2px; background: var(--line); }
.st-sheet i:last-child { width: 60%; }

/* ---- Chats (C1): the talk stands on the wash, the words rise from the drops; a sheet of paper flies over ---- */
.st-chan { position: absolute; left: 14px; top: 12px; z-index: 4; display: inline-flex; align-items: baseline; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--card); font-size: 12.5px; line-height: 32px; }
.st-chan b { font-weight: 600; }
.st-chan small { font-size: 11.5px; color: var(--muted); }
.st-chan.dm b::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--blue-bg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 35%, transparent); vertical-align: -3px; }
.st-msgs { position: absolute; left: 12px; right: 12px; top: 54px; height: 186px; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; overflow: hidden; }
.st-said-row { display: flex; max-width: 78%; }
.st-said-row.mine { align-self: flex-end; }
.st-said-row:has(.st-react) { margin-bottom: 10px; }
.st-bu { position: relative; padding: 8px 12px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--card); font-size: 13px; line-height: 1.32; }
.st-bu u { display: block; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--blue); }
.mine .st-bu { background: var(--btn); color: #151515; border-radius: 18px; border-bottom-right-radius: 6px; }
.st-note { align-self: center; padding: 3px 10px; border-radius: 10px; background: color-mix(in srgb, var(--card) 70%, transparent); font-size: 11.5px; color: var(--muted); }
.st-react { position: absolute; right: -6px; bottom: -12px; height: 20px; padding: 0 7px; display: flex; align-items: center; gap: 3px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 2px var(--blue-bg); font-size: 11px; font-weight: 600; animation: stPop 0.3s cubic-bezier(0.23, 1, 0.32, 1); }
.st-dots { display: flex; gap: 4px; padding: 11px 12px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--card); }
.st-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: stDot 1s ease-in-out infinite; }
.st-dots i:nth-child(2) { animation-delay: 0.15s; }
.st-dots i:nth-child(3) { animation-delay: 0.3s; }
/* the file, as the chat shows one: a small sheet with its kind at its foot */
.st-fb { display: flex; align-items: center; gap: 9px; padding: 7px 12px 7px 7px; }
.st-fb b { display: block; font-size: 12px; font-weight: 600; }
.st-fb small { display: block; font-size: 10.5px; color: rgba(21, 21, 21, 0.6); }
.st-pp, .st-paper { position: relative; flex: none; display: block; width: 28px; height: 35px; border-radius: 4px 9px 4px 4px; background: var(--card); overflow: hidden; }
.st-pp::before, .st-paper::before { content: ''; position: absolute; top: 0; right: 0; width: 9px; height: 9px; border-bottom-left-radius: 4px; background: color-mix(in srgb, var(--btn) 70%, var(--card)); }
.st-pp em, .st-paper em { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; display: grid; place-items: center; font-style: normal; font-size: 6.5px; font-weight: 700; background: var(--red-bg); color: var(--red); }
.st-paper { position: absolute; left: 0; top: 0; z-index: 7; width: 40px; height: 50px; border-radius: 5px 12px 5px 5px; box-shadow: 0 8px 16px -8px rgba(21, 21, 21, 0.4); opacity: 0; will-change: transform; }
.st-paper::before { width: 12px; height: 12px; background: var(--blue-bg); }
.st-paper i { position: absolute; left: 6px; right: 10px; height: 2.5px; border-radius: 2px; background: var(--line); }
.st-paper i:nth-child(1) { top: 9px; right: 16px; } .st-paper i:nth-child(2) { top: 16px; } .st-paper i:nth-child(3) { top: 23px; right: 18px; }
.st-paper em { height: 13px; font-size: 8px; }
/* a word on its way from a drop into the talk */
.st-word { position: absolute; left: 0; top: 0; z-index: 6; width: 30px; height: 20px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1.6px var(--ink); }
.st-word.me { background: var(--btn); }

@keyframes stPop { from { opacity: 0; transform: scale(0.7); } }
@keyframes stDot { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-4px); } }

/* small laptops: the words take less, so the stage is not left tiny */
@media (min-width: 901px) and (max-width: 1180px) {
  .st-page { grid-template-columns: 240px minmax(0, 1fr); gap: 16px; padding: 18px 12px 18px 22px; }
  .st-say h1 { font-size: 26px; }
}

/* phones (T1 and C1 as drawn): the page's own colour, the washed stage on top, the words and the two ways in under it */
@media (max-width: 900px) {
  .app.own-top:has(.ka.on .st-page), .app.own-top:has(.ka.on .st-page) .main { background: var(--side); }
  .app:has(.ka.on .st-page) main.content { padding-bottom: calc(var(--tabbar, 0px) + 12px); }
  .pp-hi b:empty::before { content: '\00a0'; } /* these screens show before the session is known: the name's line is kept */
  .st-page { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; height: calc(100dvh - var(--tabbar, 0px) - 76px - max(14px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))); min-height: 460px; padding: 0; /* its buttons on the Research home's very line */ border-radius: 0; background: transparent; }
  .st-room { order: -1; }
  .st-say h1 { font-size: 26px; }
  .st-sub { margin: 6px 0 14px; font-size: 14px; }
  .st-acts-page { justify-items: stretch; gap: 8px; }
  /* exactly the Research home's (13-projects-phone .pp-cta, .pp-join) */
  .st-cta, .st-join { display: flex; border-radius: 18px; }
  .st-cta { height: 56px; font-size: 16px; }
  .st-cta .ico { width: 20px; height: 20px; }
  .st-join { height: 52px; font-size: 15px; background: var(--card); }
}
/* ---------- Notifications, the bell's page (features/notifications/NotificationsPage.tsx) ----------
   Plain on purpose (asked 2026-11-06: it must not look AI-made): no icon tiles, no number chips, no pill buttons. Two soft
   cards of rows with a thin line between, words doing the work. Read rows step back. */
.nn { max-width: 620px; margin: 0 auto; }
.nn-h { font-size: 30px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.15; margin: 14px 2px 0; }
.nn-sum { font-size: 14px; color: var(--muted); margin: 4px 2px 0; }

/* the two actions are words on a line */
.nn-acts { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 2px 0; }
.nn-acts button { min-height: 44px; font-size: 14px; font-weight: 500; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.nn-acts button:disabled { color: var(--faint); }
.nn-acts .del { color: var(--red); }

.nn-sec { margin-top: 14px; }
.nn-sec h2 { font-size: 14px; font-weight: 600; margin: 0 2px 8px; }
.nn-sec.read h2 { color: var(--muted); }
.nn-sec ul { list-style: none; margin: 0; padding: 0 4px 0 16px; border-radius: 20px; background: var(--card); }
.nn-sec.read ul { background: color-mix(in srgb, var(--card) 55%, var(--side)); }
.nn-sec li { display: flex; align-items: center; gap: 4px; }
.nn-sec li + li { border-top: 1px solid var(--line-2); }

.nn-go { flex: 1; min-width: 0; display: grid; gap: 3px; padding-block: 13px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.nn-go b { font-size: 14.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.nn-go small { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
/* the research it came from: its colour, the same round mark as on its card */
.nn-go small::before, .nn-slip small::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--pid); vertical-align: 0.04em; }
.nn-sec.read .nn-go b { font-weight: 400; color: var(--muted); }
.nn-go:focus-visible, .nn-bin:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 10px; }

/* an invite: its answer under the words, in the row itself (never a sheet). The two buttons and the line after the answer
   are one height, so answering moves nothing */
.nn-sec li.nn-inv { flex-wrap: wrap; padding-bottom: 13px; }
.nn-inv .nn-go { padding-bottom: 0; flex-basis: calc(100% - 48px); }
.nn-ans, .nn-said { flex-basis: 100%; height: 38px; margin: 10px 12px 0 0; }
.nn-ans { display: flex; gap: 8px; }
.nn-ans button { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--side); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 140ms ease-out; }
.nn-ans .yes { flex: 1; background: var(--btn); color: #151515; font-weight: 600; }
.nn-ans button:disabled { opacity: 0.6; }
.nn-ans button:not(:disabled):active { transform: scale(0.98); }
.nn-ans button:focus-visible, .nn-said a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nn-said { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.nn-said a { color: var(--ink); font-weight: 600; text-decoration: none; }
.nn-bin { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--muted); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: color 0.12s; }
@media (hover: hover) and (pointer: fine) { .nn-bin:hover { color: var(--red); } }

/* nothing left: one white card, only as tall as it needs. The words, then the drop at work under them */
.nn-empty { margin-top: 14px; padding: 22px 20px 0; border-radius: 26px; background: var(--card); overflow: hidden; }
.nn-empty h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.nn-empty p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.nn-stage { position: relative; height: 290px; margin-inline: -20px; overflow: hidden; }
.nn-rider { position: absolute; left: 0; top: 0; z-index: 1; will-change: transform; }
.nn-slip { --pid: var(--ink); position: absolute; left: 0; top: 0; z-index: 2; width: min(286px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--side); opacity: 0; will-change: transform, opacity; }
.nn-slip-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nn-slip b { font-size: 13.5px; font-weight: 500; line-height: 1.25; text-wrap: balance; }
.nn-slip small { font-size: 12px; color: var(--muted); }
.nn-tick { width: 26px; height: 26px; border-radius: 50%; background: var(--btn); color: #151515; display: grid; place-items: center; flex: none; opacity: 0; }

/* the bell in the top bar on big screens; phones have theirs on each first screen */
.top-bell { border: 1px solid var(--line); text-decoration: none; }
.top-bell.on { background: var(--hover); }
@media (max-width: 900px) { .top-bell { display: none; } }

/* ---------- The bell's popup on big screens (features/notifications/BellPop.tsx, demo: vBell) ----------
   It grows from the bell and goes back into it, a touch quicker; nothing outside it moves or changes. Soft: one hairline
   edge, the floating shadow, new rows on a faint lime wash. */
.bell-pop.nt-pop { border: 1px solid var(--line); opacity: 0; transform: scale(0.96) translateY(-4px); transform-origin: calc(100% - 22px) -8px; transition: opacity 130ms cubic-bezier(0.23, 1, 0.32, 1), transform 130ms cubic-bezier(0.23, 1, 0.32, 1); animation: none; }
.bell-pop.nt-pop.in { opacity: 1; transform: none; transition-duration: 180ms; }
.bell-pop.nt-pop:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .bell-pop.nt-pop { transform: none; } }
.nt-acts { display: flex; align-items: center; gap: 2px; }
.nt-it { position: relative; border-radius: 12px; transition: background 0.15s; }
.nt-it + .nt-it { margin-top: 2px; }
.nt-it.new { background: color-mix(in srgb, var(--brand-soft) 30%, transparent); }
.nt-pop .nt-row, .nt-pop .nt-row:hover { background: none; color: inherit; text-decoration: none; padding-right: 40px; }
.nt-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.nt-t { overflow-wrap: anywhere; }
.nt-it.read .nt-t { color: var(--muted); }
/* the research it came from: its colour, the same round mark as on the phone; the crown on yours */
.nt-pop .nt-p::before { width: 9px; height: 9px; border-radius: 50%; }
.nt-pop .nt-p.lead::before { width: 17px; height: 17px; background: var(--crown) center / 10px no-repeat, var(--pid); }
.nt-bin { position: absolute; right: 6px; top: 8px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity 0.12s, background 0.12s, color 0.12s; }
.nt-bin:focus-visible { opacity: 1; outline: 2px solid var(--focus); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .nt-it:hover { background: var(--hover); }
  .nt-it.new:hover { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
  .nt-it:hover .nt-bin { opacity: 1; }
  .nt-it:hover .nt-dot { opacity: 0; }
  .nt-bin:hover { background: var(--red-bg); color: var(--red); }
}
/* an invite: Reject and Accept under its words, in the row itself */
.nt-ans { padding: 0 12px 12px 58px; }
.nt-ans .nn-ans, .nt-ans .nn-said { margin: 0; height: 34px; }
.nt-ans .nn-ans button { height: 34px; border-radius: 10px; font-size: 13px; }
.nt-ans .nn-ans .yes { flex: 0 0 auto; padding-inline: 20px; }

/* a message from makepublish (admin › Send to users): its lines under the title, no research mark */
.nt-more, .nn-more { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.nt-from::before, .nn-go small.nn-from::before { display: none; }
/* ---------- Inside a research (features/research/ResearchPage.tsx), Demo/research-inside.html ----------
   The Research home's language: white cards on the page's colour, the lime card for where things stand. */
.rp { max-width: 620px; margin: 0 auto; }

/* back and the bell, then the research: its colour, its name large enough to know from a distance, and what kind it is */
.rp-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
@media (min-width: 901px) { .rp-head .pp-bell { display: none; } } /* big screens have theirs in the top bar */
.rp-title { margin: 8px 2px 0; }
.rp-name { font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -0.03em; overflow-wrap: anywhere; text-wrap: wrap; } /* fills the line to the page's edge before it turns */
.rp-name::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; border-radius: 50%; background: var(--pid); vertical-align: -0.02em; }
.rp-title p { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; overflow-wrap: anywhere; }

.rp-tabs { display: flex; margin: 4px -10px 0; padding-inline: 6px; border-bottom: 1px solid var(--line); }
.rp-tab { flex: 1; position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 9px; color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rp-tab.on { color: var(--ink); font-weight: 600; }
.rp-tab.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.rp-tab b { position: absolute; top: 3px; left: 54%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d92d20; color: #fff; font-size: 10.5px; font-weight: 600; line-height: 16px; text-align: center; }
.rp-tab:focus-visible, .rp-phases a:focus-visible, .rp-rows a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 12px; }

.rp-body { display: grid; gap: 10px; padding-top: 14px; }

.rp-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border-radius: 22px; background: var(--ink); color: var(--card); font-size: 14px; font-weight: 600; text-decoration: none; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rp-go:active, .rp-add:active { transform: scale(0.98); }

/* the road: what is done, the phase open now with its way in, and what comes after */
.rp-road { list-style: none; margin: 0; padding: 6px 16px 8px; border-radius: 22px; background: var(--card); }
.rp-road li { position: relative; padding: 9px 0 9px 32px; font-size: 14.5px; overflow-wrap: anywhere; }
.rp-road li::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.rp-road li:first-child::before { top: 20px; }
.rp-road li:last-child::before { bottom: calc(100% - 20px); }
.rp-road li:only-child::before { display: none; }
.rp-road i { position: absolute; left: 3px; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.rp-road .dn, .rp-road .next { color: var(--muted); }
.rp-road .dn i { background: var(--ink); box-shadow: none; }
.rp-road .now i { background: var(--btn); box-shadow: inset 0 0 0 2px #151515; }
.rp-road .now h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.rp-road .now p { font-size: 13.5px; color: var(--muted); margin: 3px 0 10px; }
.rp-road .now .late { color: var(--red); }
.rp-road .rp-go { display: inline-flex; width: auto; padding: 0 20px; }

.rp-box { border-radius: 22px; background: var(--card); padding: 15px 16px; min-width: 0; }
.rp-box h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.rp-box p { font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; margin: 0; }
.rp-box-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rp-box-r { display: flex; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--muted); flex: none; }
.rp-link { font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.rp-calm { color: var(--muted); }
.rp-box p.rp-calm { font-size: 14px; }
.rp-box p.rp-rules { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.rp-rules b { color: var(--ink); font-weight: 500; }
.rp-note { white-space: pre-wrap; }

.rp-rows { list-style: none; margin: 0 -4px -6px 0; padding: 0; }
.rp-rows li + li { border-top: 1px solid var(--line-2); }
.rp-rows a { display: flex; align-items: center; gap: 10px; padding-block: 11px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.rp-rows .t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.rp-rows small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.rp-rows small.bad { color: var(--red); }
.rp-rows em { flex: none; padding-right: 4px; font-style: normal; font-size: 13.5px; font-weight: 600; }

/* Plan */
.rp-plan-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 2px; }
.rp-plan-h h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.rp-plan-h h2 span { display: block; font-size: 13.5px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 2px; }
.rp-phases { list-style: none; margin: 0; padding: 0; border-radius: 22px; background: var(--card); }
.rp-phases li + li { box-shadow: inset 0 1px 0 var(--line-2); }
.rp-phases a { display: flex; align-items: center; gap: 12px; padding: 13px 10px 13px 14px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.rp-phases .t { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.rp-phases small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.rp-phases li.done .t { font-weight: 400; color: var(--muted); }
.rp-chev { color: var(--faint); flex: none; }
.rp-st { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.rp-st.done { background: var(--ink); color: var(--card); box-shadow: none; }
.rp-st.doing { background: var(--btn); box-shadow: none; }
.rp-st.doing::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #151515; }

.rp-edit { margin: 0; }
.rp-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 24px; background: var(--card); color: var(--ink); font-size: 14.5px; font-weight: 500; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rp-add:disabled { opacity: 0.5; }
.rp-body > .rp-go { height: 48px; border-radius: 24px; }

/* a phase */
.rp-ph-top { margin: 0 2px; }
.rp-ph-top small { font-size: 13.5px; color: var(--muted); }
.rp-ph-top h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; margin-top: 2px; overflow-wrap: anywhere; }
.rp-ph-top p { font-size: 14px; color: var(--muted); margin: 4px 0 2px; }
.rp-seg { display: flex; padding: 4px; border-radius: 22px; background: color-mix(in srgb, var(--ink) 6%, var(--side)); }
.rp-seg button { flex: 1; height: 36px; border-radius: 18px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rp-seg button.on { background: var(--ink); color: var(--card); }
.rp-facts { list-style: none; margin: 0; padding: 0 16px; border-radius: 22px; background: var(--card); }
.rp-facts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 14px; }
.rp-facts li + li { border-top: 1px solid var(--line-2); }
.rp-facts span { color: var(--muted); flex: none; }
.rp-facts b { font-weight: 500; text-align: right; }
.rp-facts .late { color: var(--red); }
.rp-facts select, .rp-facts input { min-width: 0; max-width: 62%; height: 40px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 500; text-align: right; text-align-last: right; }
.rp-facts input.late { color: var(--red); }

.rp-field { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--side); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; resize: vertical; }
.rp-field:focus { outline: 1px solid var(--box-on); outline-offset: -1px; }
.rp-lab { display: block; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.rp-form-acts { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 12px; }
.rp-form-acts button:not(.rp-go) { min-height: 44px; font-size: 14px; font-weight: 500; color: var(--muted); }
.rp-form-acts .rp-go { width: 110px; }

.rp-check { list-style: none; margin: 2px 0 0; padding: 0; }
.rp-check button[role='checkbox'] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding-block: 6px; font-size: 14.5px; line-height: 1.3; color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rp-check button[role='checkbox']:disabled { cursor: default; }
.rp-check span { min-width: 0; overflow-wrap: anywhere; }
.rp-check i { width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line); flex: none; display: grid; place-items: center; }
.rp-check .d button[role='checkbox'] { color: var(--muted); }
.rp-check .d i { background: var(--ink); color: var(--card); box-shadow: none; }

.rp-pick { display: grid; gap: 2px; padding: 8px; border-radius: 22px; background: var(--card); }
.rp-pick > button:not(.rp-link) { display: grid; gap: 1px; padding: 10px; border-radius: 14px; text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.rp-pick > button:not(.rp-link):active { background: var(--side); }
.rp-pick b { font-size: 14.5px; font-weight: 500; }
.rp-pick small { font-size: 12.5px; color: var(--muted); }
.rp-pick .rp-link { min-height: 40px; }

.rp-plan-empty, .rp-none { border-radius: 26px; background: var(--card); padding: 22px 20px; }
.rp-plan-empty h2, .rp-none h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.rp-plan-empty p, .rp-none p { font-size: 14px; color: var(--muted); margin: 6px 0 16px; }
.rp-empty-drop { margin: 0 auto 14px; }
.rp-none { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) { .rp-go, .rp-add { transition: none; } }

/* Paper search's Save to your research: each research by its colour and name */
.rp-save-list { list-style: none; margin: 0; padding: 0; }
.rp-save-list li + li { border-top: 1px solid var(--line-2); }
.rp-save-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding-block: 8px; font-size: 14.5px; font-weight: 500; text-align: left; color: var(--ink); }
.rp-save-list button::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--pid); flex: none; }
/* the person's own Library: a little lime spine instead of a research's colour, set apart from the researches under it */
.rp-save-list button.lib::before { width: 7px; height: 14px; border-radius: 2px; background: var(--btn); box-shadow: inset 0 0 0 1.5px var(--ink); margin-inline: 2px 3px; }
.rp-save-list + .rp-save-list { border-top: 1px solid var(--line-2); }

/* ---- a phase's own name and purpose, written in place ---- */
.rp-body > * { min-width: 0; }
.rp-ph-name, .rp-ph-desc { display: block; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 2px 0; border-radius: 8px; }
.rp-ph-name { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin-top: 2px; }
.rp-ph-desc { font-size: 14px; line-height: 1.4; color: var(--muted); resize: none; margin-top: 2px; field-sizing: content; min-height: 24px; }
.rp-ph-name:focus, .rp-ph-desc:focus { outline: 1px solid var(--box-on); outline-offset: 2px; }
.rp-strong { font-weight: 600; }
.rp-step { display: flex; justify-content: space-between; gap: 12px; margin: 4px 2px 0; }
.rp-step a { display: flex; align-items: center; gap: 4px; min-height: 44px; min-width: 0; font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; }

/* ---- blocks: plain words and rows, one soft card each ---- */
.rb-h { display: flex; align-items: center; gap: 2px; margin: -6px -8px 4px 0; }
.rb-h h3, .rb-title { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; }
.rb-title { border: 0; background: transparent; color: var(--ink); font-family: inherit; padding: 4px 0; border-radius: 6px; }
.rb-title:focus { outline: 1px solid var(--box-on); outline-offset: 2px; }
.rb-x { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rb-x:disabled { opacity: 0.3; }
.rb-help { font-size: 13.5px !important; line-height: 1.45; color: var(--muted); margin-bottom: 8px !important; }
.rb-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 2px 0 10px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.rb-menu button, .rb-menu select { min-height: 36px; background: transparent; border: 0; color: inherit; font: inherit; }
.rb-menu button:disabled { color: var(--faint); }
.rb-menu .danger { color: var(--red); }
.rb .rp-field + .rp-field { margin-top: 8px; }
.rb-text { white-space: pre-wrap; }
.rp-field.bad { box-shadow: inset 0 0 0 2px var(--red); }
.rp-field.bad::placeholder { color: var(--red); }
.rb-bad { display: block; margin-top: 4px; font-size: 12.5px; color: var(--red); }
.rb-err { color: var(--red); font-size: 13.5px !important; margin-top: 8px !important; }

.rb-sec { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--side); color: var(--ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rb-sec.ink { background: var(--ink); color: var(--card); }
.rb-add, .rb-search { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.rb-add .rp-field, .rb-search .rp-field { flex: 1; min-width: 0; margin-top: 0; }
.rb-search .rp-go { width: auto; padding: 0 16px; }
.rb-search .rp-go:disabled { opacity: 0.6; }
.rb-opts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13.5px; color: var(--ink); }
.rb-opts label, .rb-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13.5px; }
.rb-opts input, .rb-opt input, .rb-switch input { accent-color: var(--ink); width: 18px; height: 18px; flex: none; }
.rb-file { display: block; width: 100%; min-height: 44px; margin-top: 4px; font-size: 13.5px; font-weight: 500; color: var(--muted); text-align: left; text-decoration: underline; text-underline-offset: 3px; }

.rb-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 2px; font-size: 13.5px; color: var(--muted); }
.rb-sub b { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.rb-papers { list-style: none; margin: 0 0 -6px; padding: 0; }
.rb-papers li { display: flex; align-items: center; gap: 8px; padding-block: 10px; }
.rb-papers li + li { border-top: 1px solid var(--line-2); }
.rb-papers li.col { flex-direction: column; align-items: stretch; }
.rb-papers .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.rb-papers small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.rb-papers em { flex: none; font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted); padding-right: 6px; }
.rb-papers .copy .t { color: var(--muted); font-weight: 400; }

/* screening: one paper at a time, the three choices under the thumb */
.rb-count { font-size: 13.5px !important; color: var(--muted); }
.rb-count .bad { color: var(--red); font-weight: 500; }
.rb-bar { display: block; height: 5px; margin: 8px 0 2px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.rb-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
.rb-note { margin-top: 6px !important; font-size: 13px !important; }
.rb-paper { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--side); }
.rb-paper small { display: block; font-size: 12.5px; color: var(--muted); }
.rb-paper h4 { margin: 4px 0; font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.rb-paper p { margin-top: 8px !important; font-size: 13.5px !important; line-height: 1.5 !important; color: var(--ink-2); }
.rb-paper p.shut { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rb-paper .rp-link { display: block; min-height: 36px; }
.rb-decide, .rb-pair { display: grid; gap: 6px; }
.rb-decide { grid-template-columns: 1fr 1fr 1.2fr; margin-top: 10px; }
.rb-pair { grid-template-columns: 1fr 1fr; }
.rb-decide button, .rb-pair button { display: grid; place-items: center; min-height: 46px; border-radius: 23px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rb-pair button { min-height: 40px; background: var(--side); font-size: 13.5px; }
.rb-decide .y, .rb-pair .y { background: var(--ink); color: var(--card); }
.rb-why { display: grid; gap: 6px; margin-top: 10px; }
.rb-why b { font-size: 14px; font-weight: 600; }
.rb-why button:not(.rp-link) { min-height: 44px; padding: 8px 14px; border-radius: 14px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; }
.rb-undo, .rb-toggle { display: block; min-height: 40px; }
.rb-undo { margin-top: 2px; }
.rb-done { margin-top: 10px !important; font-size: 14px !important; color: var(--muted); }
.rb-group { margin-top: 12px; }
.rb-group h4 { font-size: 14px; font-weight: 600; margin: 0 0 2px; }

.rb-set { margin-top: 2px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--side) 55%, var(--card)); display: grid; gap: 10px; }
.rb-set .rp-field { background: var(--card); }
.rb-set-sec > b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.rb-switch { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.rb-switch b { display: block; font-weight: 500; }
.rb-switch small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.rb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.rb-row > span { color: var(--muted); flex: none; }
.rb-row select { min-height: 40px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 500; }
.rb-row .rp-field { margin-top: 0; max-width: 60%; }
.rb-list { list-style: none; margin: 0; padding: 0; }
.rb-list li { display: flex; align-items: center; gap: 2px; min-height: 40px; font-size: 14px; }
.rb-list li + li { border-top: 1px solid var(--line-2); }
.rb-list li > span, .rb-list li > a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rb-list a { color: var(--ink); text-underline-offset: 3px; }
.rb-list small { flex: none; font-size: 12.5px; color: var(--muted); padding-inline: 6px; }
.rb-inline { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 500; padding: 8px 0; }
.rb-col { display: grid; gap: 8px; margin-top: 10px; }
.rb-col .rp-field { margin-top: 0; }

/* a table on a phone: one row at a time, as a form */
.rb-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.rb-rows > li + li { border-top: 1px solid var(--line-2); }
.rb-rowh { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding-block: 8px; text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.rb-rowh .t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.rb-rowh small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rb-rowh svg { color: var(--faint); flex: none; }
.rb-rowb { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; padding: 2px 0 14px; }
.rb-cell label { font-size: 13px; font-weight: 500; color: var(--muted); }
.rb-cell .rp-field { margin-top: 3px; }
.rb-rowf, .rb-q { grid-column: 1 / -1; }
.rb-rowf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.rb-q { display: grid; gap: 6px; }
.rb-q > span { font-size: 14px; line-height: 1.35; }
.rb-q .rp-seg button { font-size: 13px; }
.rb-q .rp-seg button:disabled { opacity: 0.6; }
.rb-risk { flex: none; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rb-risk.low { color: #0f766e; }
.rb-risk.some { color: #a16207; }
.rb-risk.high { color: var(--red); }
.rb-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* the flow diagram: the same counts, top to bottom, so it reads like the report it goes into */
.rb-flow { display: grid; gap: 6px; margin-top: 4px; }
.rb-fbox { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--side); font-size: 14px; }
.rb-fbox b { flex: none; min-width: 42px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.rb-fbox small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.rb-fbox.kept { background: var(--btn); color: #151515; }

.rp-check li { display: flex; align-items: center; gap: 2px; }
.rp-check li > button[role='checkbox'] { flex: 1; min-width: 0; }
.rp-pick > button:disabled { opacity: 0.5; }

/* ---------- Big screens inside a research (ResearchPage OverviewWide, PlanWide): the demo's look, links in place of its buttons ---------- */
.rpw { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rpw-narrow { width: 100%; max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.ov-flow a { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 10px 16px; border-radius: 16px; text-align: left; text-decoration: none; color: inherit; transition: background 0.15s; }
.ov-flow li:first-child a { padding-left: 0; }
.ov-you a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-align: left; min-width: 0; text-decoration: none; color: inherit; transition: background 0.15s; }
.ov-you a.ov-link { margin-top: 6px; }
.ov-calm .drop-host, .ov-calm canvas { flex: none; }
.ov-qbox .rp-lab { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ov-qbox .rp-field { margin-top: 0; }
.ov-qbox .rp-form-acts { margin-top: 16px; }
.pc-card, .pw-row { text-decoration: none; color: inherit; }
.crumbs a.crumb-trail { text-decoration: none; color: var(--muted); }
.crumbs a.crumb-trail:hover { color: var(--ink); }
.crumbs .ico.crumb-trail { color: var(--faint); flex: none; }
@media (hover: hover) and (pointer: fine) {
  .ov-flow a:hover, .ov-you a:hover { background: var(--hover); }
}
@media (max-width: 1100px) { .ovw { grid-template-columns: minmax(0, 1fr); } }
.rpw .dh-go { text-decoration: none; }
.ptabs .badge { background: var(--pc); color: var(--pc-on); }
/* a phase on a big screen (PhasePage): the demo's head, then its blocks at full width */
.ph-blocks { display: grid; gap: 14px; margin-top: 26px; }
.ph-back { text-decoration: none; }
.ph-st button:disabled { cursor: default; }
.ph-field.late .ph-due, .ph-field.late input { color: var(--red); }
.ph-due { font-size: 13.5px; font-weight: 600; color: var(--ink); }
/* the board's cards (TasksPage TaskBoard): the face is a button that opens the card where it is */
.tcard { padding: 0; gap: 0; }
.tcard-h { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 16px; text-align: left; border-radius: inherit; }
.tcard-h:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tcard.open { border-color: var(--pc-line); }
.tcard-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 16px 16px; } /* kept to the card, as .tk-more */
.tcard-more .tk-acts { flex-wrap: wrap; justify-content: flex-end; }
.tcard-more .tk-send { display: grid; gap: 8px; }
/* Team on a big screen (TeamPage TeamWide) */
.tm-wide { display: flex; flex-direction: column; gap: 16px; }
.tm-wide .tm-row { margin-top: 12px; }
.tm-wide .tm-row > .tk-card { margin: 0; border-radius: 24px; padding: 24px; }
.tm-mng { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--grey-bg); font-size: 13px; font-weight: 600; color: var(--ink); }
.tm-more { padding: 0; border-top: 1px solid var(--line-2); padding-top: 12px; }
.tm-now.bad b { color: var(--red); }
.tcard-more .tk-act { height: 34px; padding: 0 12px; font-size: 13px; }
.tm-wide .tm-grid { align-items: start; }

/* ---- a phase, 2026-11-12 (Demo/pc-phase-v1.html, Demo/pc-assign-flow.html): a small head, the phone's pill, chips with menus
   that drop from them, the bar where a phase given to someone is finished and approved, the blocks, and adding one ---- */
.ph-top { margin-bottom: 14px; }
.ph-all { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; margin-left: -6px; border-radius: 18px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.ph-nav .ph-step { width: 32px; height: 32px; background: var(--card); }
.ph-k { font-weight: 500; color: var(--muted); }
.ph-name { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.ph-desc { font-size: 14.5px; min-height: 0; padding-block: 2px; }
.ph-meta { margin-top: 12px; gap: 8px; }
.ph-meta .pa-seg { background: color-mix(in srgb, var(--ink) 7%, var(--ghost)); }
.ph-read { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.ph-read .ok, .ph-bar .ok { color: var(--green); flex: none; }
.ph-pop-w { position: relative; }
.ph-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 10px; border-radius: 22px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform 140ms ease-out; }
.ph-chip:active { transform: scale(0.98); }
.ph-chip[aria-expanded='true'] { box-shadow: 0 0 0 2px var(--ink); }
.ph-chip.late { color: var(--red); }
.ph-chip > .ico:first-child { margin-left: 4px; color: var(--muted); }
.av.none { --c: var(--faint); }
/* the menu drops from its chip and goes back the same way; nothing around it moves */
.ph-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; display: grid; gap: 2px; padding: 6px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg); transform-origin: 24px 0; opacity: 0; transform: translateY(-4px) scale(0.97); visibility: hidden; transition: opacity 160ms ease-out, transform 200ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 200ms; }
.ph-pop.open { opacity: 1; transform: none; visibility: visible; transition: opacity 160ms ease-out, transform 200ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s; }
.ph-pop > button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; text-align: left; color: var(--ink); font-size: 14px; }
.ph-pop > button.on { background: var(--line-2); font-weight: 600; }
.ph-pop > button .t { flex: 1; min-width: 0; }
.ph-pop > button small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
.ph-pop-foot { margin: 4px 4px 2px; padding: 8px 6px 2px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12px; line-height: 1.4; }
.ph-pop.cal { width: 300px; padding: 4px; }
.ph-pop.cal .nf-cal { background: none; }
@media (hover: hover) and (pointer: fine) {
  .ph-pop > button:hover:not(.on), .ph-all:hover { background: var(--hover); }
  .ph-chip:hover { background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
}
@media (prefers-reduced-motion: reduce) { .ph-pop, .ph-pop.open { transform: none; transition: opacity 120ms ease-out, visibility 0s; } }

/* whose phase it is and what is next: blue for the person doing it, grey while it waits, green once approved */
.ph-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 16px; padding: 14px 18px; border-radius: 18px; background: var(--card); }
.ph-bar.mine { background: var(--pp-sky, #d3ebfe); color: #151515; }
.ph-bar.wait { background: color-mix(in srgb, var(--ink) 6%, var(--card)); }
.ph-bar.ok { background: var(--brand-soft); }
.ph-bar .t { flex: 1 1 260px; min-width: 0; }
.ph-bar b { display: block; font-size: 15.5px; font-weight: 600; }
.ph-bar small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.ph-bar.mine small { color: #3b3d39; }
.ph-bar .tk-acts { margin-left: auto; }
.ph-bar .tk-act { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; background: var(--card); }
.ph-bar .tk-act.y { background: var(--ink); color: var(--ghost); }
.ph-bar.wait .tk-act.y { background: var(--btn); color: #151515; }
.ph-bar .tk-send { flex: 1 1 100%; display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 8px; }
.ph-bar .tk-send .tk-act { height: 40px; }

.ph-blocks { margin-top: 16px; }
.rb.bare .rb-h { margin-bottom: -30px; position: relative; z-index: 1; pointer-events: none; }
.rb.bare .rb-h .rb-x { pointer-events: auto; }
.rb.bare > .rb-count { padding-right: 70px; }
.rb-sp { flex: 1; }
.ph-addb { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 14px; border-radius: 21px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; transition: transform 140ms ease-out; }
.ph-addb:active { transform: scale(0.98); }
.ph-need { display: grid; gap: 10px; padding: 20px; }
.ph-need-h { display: flex; align-items: center; justify-content: space-between; }
.ph-need h3 { margin: 0; font-size: 17px; }
.ph-need > .muted { margin-top: -6px !important; font-size: 13.5px; }
.ph-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ph-kind { display: grid; align-content: start; gap: 3px; padding: 14px; border-radius: 14px; background: var(--ghost); border: 1px solid var(--line-2); text-align: left; color: var(--ink); transition: transform 140ms ease-out; }
.ph-kind b { font-size: 14.5px; font-weight: 600; }
.ph-kind small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
button.ph-kind:active { transform: scale(0.98); }
.ph-kind.in { background: transparent; border-style: dashed; }
.ph-kind.in a { color: var(--ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { button.ph-kind:hover { border-color: var(--line); background: var(--card); } .ph-addb:hover { background: color-mix(in srgb, var(--ink) 4%, var(--card)); } }
/* screening: the rules say where they come from; the three choices with their keys, Keep in lime */
.rb-from { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--grey-bg); }
.rb-from .rp-rules { flex: 1; margin: 0 !important; color: var(--ink-2) !important; }
.rb-from a { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.rb-decide button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.rb-decide .y { background: var(--btn); color: #151515; box-shadow: none; }
.rb-decide kbd { font: inherit; font-size: 11px; font-weight: 500; color: var(--faint); padding: 0 5px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line); }
.rb-decide .y kbd { color: #3b3d39; box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.2); }
@media (hover: none) { .rb-decide kbd { display: none; } }

/* a table: two ways to start, then a grid like a spreadsheet */
.rb-start { display: grid; gap: 12px; }
.rb-start-h { font-size: 15px !important; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rb-start-h span { font-size: 13px; font-weight: 400; color: var(--muted); }
.rb-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.rb-way { display: grid; align-content: start; gap: 8px; padding: 16px; border-radius: 16px; background: var(--ghost); box-shadow: inset 0 0 0 1px var(--line-2); }
.rb-way.rec { background: var(--brand-soft); box-shadow: none; }
.rb-way b { font-size: 15.5px; font-weight: 600; }
.rb-way p { color: var(--ink-2); font-size: 13.5px !important; line-height: 1.5; }
.rb-way small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.rb-way .rb-sec { justify-self: start; margin-top: 4px; }
.rb-way .rb-sec.y { background: var(--btn); color: #151515; }
.rb-tbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.rb-tbar .rb-count { margin: 0; }
.rb-tbar .rb-tools { margin: 0; }
.rb-sheet { margin-top: 10px; overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.rb-sheet table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13.5px; }
.rb-sheet th, .rb-sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: left; vertical-align: middle; }
.rb-sheet tr > :last-child { border-right: 0; }
.rb-sheet tbody tr:last-child > * { border-bottom: 0; }
.rb-sheet thead th { position: sticky; top: 0; background: var(--grey-bg); font-weight: 600; padding: 9px 10px; white-space: nowrap; }
.rb-sheet thead th small { display: block; font-size: 11px; font-weight: 400; color: var(--faint); }
.rb-sheet tbody th { font-weight: 600; padding: 0 10px; white-space: nowrap; background: var(--card); position: sticky; left: 0; z-index: 1; }
.rb-sheet tbody th .rp-field { padding-left: 0; }
.rb-sheet td.auto { background: color-mix(in srgb, var(--ink) 2.5%, var(--card)); }
.rb-sheet td.mid { text-align: center; padding: 0 8px; width: 1px; }
.rb-sheet .rp-field { width: 100%; min-width: 120px; height: 40px; border: 0; border-radius: 0; background: transparent; padding: 0 10px; font-size: 13.5px; box-shadow: none; }
.rb-sheet select.rp-field { min-width: 110px; }
.rb-sheet .rp-field:focus { outline: 1px solid var(--box-on); outline-offset: -1px; background: var(--card); }
.rb-sheet .rp-field::placeholder { color: var(--faint); }
.rb-sheet .rb-bad { display: block; padding: 0 10px 6px; }
.rb-sheet th.add { padding: 0; }
.rb-sheet th.add button { display: inline-flex; align-items: center; gap: 4px; height: 100%; min-height: 40px; padding: 0 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.rb-key { display: flex; align-items: center; gap: 8px; margin-top: 8px !important; font-size: 12.5px !important; color: var(--muted); }
.rb-key i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 4%, var(--card)); box-shadow: inset 0 0 0 1px var(--line); }
.rb-sheet tbody th { color: var(--ink); font-size: 13.5px; }
a.tk-act { gap: 6px; text-decoration: none; }
/* ---------- A research on a phone (features/research/TrackPage.tsx) and Tasks (features/tasks/TasksPage.tsx) ----------
   Demo/phone-track-only.html, confirmed 2026-11-06. Only the site's own tokens. Lime and sky keep ink text in both themes;
   white cards follow the theme; late is red text. */
.app.own-top:has(.ka.on :is(.tk, .tr)) { background: var(--side); }
.app.own-top:has(.ka.on :is(.tk, .tr)) .main { background: var(--side); }

.tr-body { display: grid; grid-auto-rows: max-content; gap: 10px; padding: 12px 0 28px; }
.tr .rp-title { margin: 4px 2px 0; }
.tr .rp-name { font-size: 19px; letter-spacing: -0.02em; }
.tr .rp-name::before { width: 11px; height: 11px; vertical-align: 0.06em; }

/* the phase under way */
.tr-hero { position: relative; min-width: 0; padding: 16px 18px; border-radius: 26px; background: var(--card); color: var(--ink); }
.tr-hero h2 { padding-right: 62px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.tr-step { margin: 2px 0 0; padding-right: 62px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.tr-step .late { color: var(--red); font-weight: 500; }
.tr-pct { display: block; margin-top: 10px; font-size: 44px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.tr-pct sup { position: relative; top: 4px; margin-left: 2px; font-size: 18px; letter-spacing: 0; vertical-align: top; }
.tr-drop { position: absolute; right: 16px; top: 14px; }
.tr-line { display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: var(--side); }
.tr-line i { display: block; height: 100%; border-radius: 3px; background: var(--btn); }
.tr-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tr-foot .where { display: flex; align-items: center; gap: 6px; flex: none; }

/* two tiles */
.tr-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tr-tile { position: relative; display: flex; flex-direction: column; min-height: 104px; padding: 14px 16px; border-radius: 22px; background: var(--card); color: var(--ink); text-decoration: none; }
a.tr-tile { transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a.tr-tile:active { transform: scale(0.98); }
a.tr-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tr-tile.sky { background: var(--pp-sky); color: #151515; }
.tr-tile .big { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.tr-tile b { margin-top: 4px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.tr-tile small { margin-top: auto; padding-top: 4px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tr-tile.sky small { color: rgba(21, 21, 21, 0.62); }
.tr-tile.sky small.bad { color: var(--pp-late-on); }
.tr-tile .arr { position: absolute; top: 14px; right: 14px; color: var(--muted); }
.tr-tile.sky .arr { color: rgba(21, 21, 21, 0.62); }

/* the road */
.tr-sum { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.tr-map { position: relative; margin-top: 8px; }
.tr-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tr-map .bed, .tr-map .went { fill: none; stroke-width: 12; stroke-linecap: round; }
.tr-map .bed { stroke: var(--side); }
.tr-map .went { stroke: var(--btn); }
/* a finished stop: the same as on the empty Research home's road (14-new-project.css, .road .end-stop.on and .tick) */
.tr-map .dn { fill: var(--btn); stroke: #151515; stroke-width: 2.2; }
.tr-map .tick { fill: none; stroke: #151515; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.tr-map .stop { fill: var(--card); stroke: var(--line); stroke-width: 2.4; }
.tr-map .lab { position: absolute; max-width: 66%; transform: translateY(-50%); font-size: 12.5px; font-weight: 500; line-height: 1.2; color: var(--muted); overflow-wrap: anywhere; }
.tr-map .lab.d { color: var(--ink); }
.tr-map .lab.n { font-size: 14.5px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.tr-map .seat { position: absolute; transform: translate(-50%, -62%); }

/* ---- Tasks ---- */
.tk { max-width: 620px; margin: 0 auto; display: grid; grid-auto-rows: max-content; gap: 10px; padding-bottom: 88px; }
.tk-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.tk-top h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.tk > .pp-top { margin-bottom: 8px; } /* with the page's 10px gap: the same 18px under the greeting as the Research home */
.tk-mark { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--pid); }

/* which research: the card itself opens downward over the page and closes back up, on one curve both ways. It takes its closed
   height in the layout and opens out of the flow, so nothing behind it moves or changes. */
.tk-picker { position: relative; min-height: 52px; }
.tk-sheet { position: absolute; z-index: 46; left: 0; right: 0; top: 0; border-radius: 18px; background: var(--card); overflow: hidden; box-shadow: 0 0 0 rgba(21, 21, 21, 0); transition: box-shadow 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.open > .tk-sheet { box-shadow: 0 18px 44px -14px rgba(21, 21, 21, 0.28); }
.tk-sheet .tk-pick { background: none; border-radius: 0; }
.tk-pick { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 52px; padding: 6px 14px 6px 16px; border-radius: 18px; background: var(--card); color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; } /* no press: the card only opens */
.tk-pick:focus-visible, .tk-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-pick .t, .tk-menu .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tk-pick small, .tk-menu small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
/* shut, the card holds only its own place (52px) and opens over the page: a long name stays on one line with "…", or the
   card grew taller than its place and lay over the card under it (seen 2026-11-09) */
.tk-sheet > .tk-pick .t, .tk-sheet > .tk-pick .t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-menu .bad { color: var(--red); }
.tk-chev { flex: none; color: var(--muted); transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.open .tk-chev { transform: rotate(180deg); }
.tk-grow { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.open .tk-grow { grid-template-rows: 1fr; }
/* the outer part opens; the list keeps its full height inside it, so a scrollbar only ever shows when the list really is too long */
.tk-grow-in { min-height: 0; overflow: hidden; }
.tk-menu { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 8px; visibility: hidden; transition: visibility 0s 0.38s; }
/* its space at the bottom is part of what opens, so the closed card has exactly its own height */
.tk-menu::after { content: ""; display: block; height: 8px; }
.open .tk-menu { visibility: visible; transition-delay: 0s; }
.tk-menu button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 62px; padding: 8px 12px; border-radius: 16px; color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tk-menu button.on { background: var(--side); }
/* the card wears its research's colour down the left, where the dot was; the text stays where it was */
.tk-pick.own { padding-left: 36px; background: linear-gradient(90deg, var(--pid) 22px, var(--card) 22px); }
/* open: one card, each research a row in it with its own colour edge; the one you're in is the top row only */
.stack .tk-menu { padding: 0; }
.stack .tk-menu::after { height: 0; }
.tk-cards .tk-pick { position: relative; min-height: 52px; padding: 6px 14px 6px 36px; border-radius: 0; }
/* a grey line between the rows, from the words to the edge, like the chat list's */
.tk-cards .tk-pick::before { content: ""; position: absolute; top: 0; left: 36px; right: 14px; height: 1px; background: var(--line); }
/* shut: your other researches with something new, by their colours, and how much */
.tk-news { flex: none; display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 12px; background: var(--side); font-size: 11.5px; font-weight: 600; transition: opacity 0.2s ease; }
.tk-news .tk-mark { box-shadow: 0 0 0 2px var(--side); }
.open .tk-news { opacity: 0; }
/* open: each one's new messages and the tasks that need you */
.tk-counts { flex: none; display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; }
.tk-counts > span { display: flex; align-items: center; gap: 4px; color: var(--red); }
.tk-counts svg { color: var(--red); }
.tk-counts .bad, .tk-counts .bad svg { color: var(--red); }

/* how many, for a member */
.tk-count { position: relative; min-height: 92px; padding: 14px 76px 14px 18px; border-radius: 22px; background: var(--pp-sky); color: #151515; }
.tk-count > b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.tk-count p { margin: 3px 0 0; font-size: 13px; font-weight: 600; }
.tk-count p.calm { margin: 14px 0 0; font-size: 15px; letter-spacing: -0.01em; line-height: 1.25; }
.tk-count small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--pp-late-on); }
.tk-seat { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }

/* a member's next task, whole */
.tk-next { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 18px; border-radius: 22px; background: var(--pp-sky); color: #151515; }
.tk-next h2 { padding-right: 64px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; overflow-wrap: anywhere; }
.tk-next-line { margin: -5px 0 0; padding-right: 64px; font-size: 12.5px; color: rgba(21, 21, 21, 0.62); }
.tk-next-line .bad { color: var(--pp-late-on); font-weight: 500; }
.tk-next .tk-seat { top: 14px; right: 14px; margin: 0; transform: none; }
.tk-detail { margin: 0; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-next-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: rgba(21, 21, 21, 0.62); }
.tk-next-foot .where, .tk-pc { display: flex; align-items: center; gap: 6px; }
.tk-next .tk-act { background: #fff; color: #151515; }
.tk-next .tk-act.y { background: var(--btn); }

/* rows in a white card, each kind of work with its own and how many */
.tk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tk-h span { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; line-height: 22px; text-align: center; }
.tk-card { min-width: 0; padding: 14px 16px; border-radius: 22px; background: var(--card); color: var(--ink); }
.tk-card h2 { font-size: 14px; font-weight: 600; }
.tk-rows { list-style: none; margin: 4px 0 -4px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.tk-rows > li { min-width: 0; }
.tk-rowh, .tk-person { display: flex; align-items: center; gap: 12px; width: 100%; padding-block: 8px; color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tk-rowh:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.tk-rows .t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.tk-rows small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--muted); }
.tk-rows small.bad { color: var(--red); }
/* a row that opens: a glimpse of what's inside, and an arrow that turns */
.tk-peek { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* the line between rows is painted, not a shadow: a shadow under a row with no fill was clipped a hair off at browser zoom
   levels, leaving a thin line down the row's right edge (seen 2026-11-09) */
.tk-rows > li + li { background: linear-gradient(var(--line-2), var(--line-2)) top / 100% 1px no-repeat; }
.tk-rowh .tk-chev { align-self: center; }
.tk-rows li.on > .tk-rowh .tk-chev { transform: rotate(180deg); }
.tk-rowh { cursor: pointer; }
.tk-face { --c: var(--blue); width: 34px; height: 34px; font-size: 11px; }
.tk-day { flex: none; width: 38px; height: 42px; border-radius: 12px; background: var(--side); display: grid; place-content: center; text-align: center; font-size: 10px; line-height: 1.2; color: var(--muted); }
.tk-day b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.tk-day.none { font-size: 9.5px; }
.tk-day.late, .tk-day.late b { color: var(--red); }
.tk-day.late { background: var(--red-bg); }

/* a task, opened */
/* minmax(0, 1fr): a grid column grows to its widest one-line child (a long file name), which pushed the files, notes and
   buttons past the card's right edge (seen on a phone 2026-11-23); now everything inside keeps to the card */
.tk-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 2px 0 12px; }
.tk-more > * { min-width: 0; }
.tk-when { margin: 0; font-size: 13px; color: var(--muted); }
.tk-acts, .tk-send { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tk-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
/* as in Chats: theirs on the left on grey, yours on the right in lime under "You" (asked 2026-11-23: who wrote which) */
.tk-words li { justify-self: start; max-width: 86%; padding: 8px 12px; border-radius: 14px 14px 14px 6px; background: var(--side); font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: break-word; }
.tk-words li.me { justify-self: end; border-radius: 14px 14px 6px 14px; background: var(--btn); color: #151515; }
.tk-words b { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tk-words li.me b { color: rgba(21, 21, 21, 0.62); }
.tk-next .tk-words li { background: rgba(255, 255, 255, 0.65); color: #151515; }
.tk-next .tk-words li.me { background: var(--btn); }
.tk-next .tk-words b { color: rgba(21, 21, 21, 0.62); }
.tk-none { display: grid; gap: 6px; }
.tk-none h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.tk-none p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.tk-act { display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--side); color: var(--ink); font-size: 13px; font-weight: 600; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tk-act:active { transform: scale(0.97); }
.tk-act:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tk-act:disabled { opacity: 0.5; }
.tk-act.y { background: var(--btn); color: #151515; }
.tk-act.danger { background: var(--red-bg); color: var(--red); }

.tk-quiet { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 8px; font-size: 13.5px; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.tk-quiet:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }

/* a box to write in: it holds its words and its message; the message has its place from the start, so nothing moves */
.tbx { min-width: 0; border-radius: 14px; background: var(--side); box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 140ms ease-out, background-color 140ms ease-out; }
.tbx:focus-within { background: var(--card); box-shadow: inset 0 0 0 1px var(--box-on); }
.tbx.bad, .tbx.bad:focus-within { box-shadow: inset 0 0 0 1px var(--red); }
.tbx input, .tbx textarea { display: block; width: 100%; padding: 10px 12px 4px; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; resize: none; scrollbar-width: thin; }
/* it grows with the words where the browser can, up to a size, and then scrolls inside */
.tbx textarea { min-height: 54px; max-height: 148px; field-sizing: content; }
.tbx input::placeholder, .tbx textarea::placeholder { color: var(--muted); opacity: 1; }
.tbx-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 37px; padding: 0 12px 7px; font-size: 11.5px; line-height: 1.3; }
.tbx-msg { min-width: 0; color: var(--red); font-weight: 500; }
.tbx-count { flex: none; margin-left: auto; color: var(--muted); }
.tbx-count.full { color: var(--red); font-weight: 500; }
.tk-next .tbx { background: rgba(255, 255, 255, 0.7); }
.tk-next .tbx:focus-within { background: #fff; box-shadow: inset 0 0 0 1px var(--box-on); }
.tk-next .tbx.bad, .tk-next .tbx.bad:focus-within { box-shadow: inset 0 0 0 1px var(--pp-late-on); }
.tk-next .tbx input, .tk-next .tbx textarea { color: #151515; }
.tk-next .tbx input::placeholder, .tk-next .tbx textarea::placeholder { color: rgba(21, 21, 21, 0.62); }
.tk-next .tbx-msg, .tk-next .tbx-count.full { color: var(--pp-late-on); }
.tk-next .tbx-count { color: rgba(21, 21, 21, 0.62); }
.tk-send .tbx { flex: 1 0 100%; }
.tk-send .tk-act { height: 40px; border-radius: 20px; }
.tk-form .tbx { margin-top: 1px; }

/* Assign: only in a research you lead */
.tk-fab { position: fixed; z-index: 30; right: max(16px, var(--safe-area-inset-right, env(safe-area-inset-right, 0px))); bottom: calc(var(--tabbar, 0px) + 16px); display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 16px 0 12px; border-radius: 16px; background: var(--btn); color: #151515; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(60, 80, 10, 0.45); transition: transform 140ms ease-out, opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tk-fab:active { transform: scale(0.98); }
.tk-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
html.kb-up .tk-fab, html.kb-wait .tk-fab { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
.rp-body:has(.tk-fab) { padding-bottom: 88px; }

/* Assign: one page on one screen. The middle takes what room there is and Details takes what's left of that; it scrolls only
   if a very small screen can't hold it all. The foot and the keyboard are New research's (.nfp, keyboardDock.ts). */
/* over everything on the Tasks page behind it, its open research card too */
.nfp.as { z-index: 60; }
.as-top { flex: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; min-height: 48px; }
.as-head { min-width: 0; text-align: center; }
.as-head h1 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.as-head p { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.as-body { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; color: var(--ink); }
/* one card; with many files on a short phone their list gives way before anything else does */
.as-body > .as-who { flex: none; }
.as-card { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--card); }
.as-card > .as-part, .as-card > .as-due { flex: none; }
.as-part, .as-due { min-width: 0; display: grid; gap: 7px; }
/* files: the grey box, and each file a line in it */
.as-files { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 3px 12px; border-radius: 14px; background: var(--side); }
.as-fh { flex: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.as-fh:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.as-fh .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; }
.as-fh small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.as-fh .c { flex: none; font-size: 12px; color: var(--muted); }
.as-fh .c.bad { color: var(--red); font-weight: 500; }
.as-flist { flex: 0 1 auto; min-height: 46px; margin: 0; padding: 0 0 3px; list-style: none; overflow-y: auto; scrollbar-width: none; }
.as-flist::-webkit-scrollbar { display: none; }
.as-flist li { display: flex; align-items: center; gap: 8px; height: 30px; font-size: 12.5px; font-weight: 500; }
.as-flist b { flex: none; width: 28px; font-size: 10.5px; font-weight: 600; }
.as-flist .n { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.as-flist .bad { flex: none; font-size: 11.5px; font-weight: 400; color: var(--red); }
.as-fx, .as-fstop { position: relative; flex: none; display: flex; align-items: center; gap: 8px; color: var(--muted); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.as-fx::after, .as-fstop::after { content: ""; position: absolute; inset: -7px -8px; } /* a thumb's room, on a thin line */
.as-fstop .p { font-size: 11.5px; font-weight: 400; }
.as-fagain { flex: none; font-size: 12px; font-weight: 600; color: var(--ink); }
.as-fx:focus-visible, .as-fstop:focus-visible, .as-fagain:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* room for the fourth and fifth file on a normal phone: everything draws in, and Details is one line */
.as-full { padding-block: 12px; gap: 8px; }
.as-full .as-part { gap: 5px; }
.as .as-full .tbx textarea { height: 36px; min-height: 36px; }
.as-full .as-fh { min-height: 36px; }
.as-full .as-flist li { height: 28px; }
.as-files:has(.as-flist) { flex-shrink: 1; min-height: 88px; } /* never less than its top and a line and a bit: it can't run over When is it due */
@media (max-height: 560px) {
  /* the smallest phones: the place kept under each box for its count goes too */
  .as-full { padding-block: 8px; gap: 6px; }
  .as-full .as-fh { min-height: 30px; }
  .as-files:has(.as-flist) { min-height: 76px; }
  .as-flist { min-height: 40px; }
  .as-full .tbx-foot { min-height: 6px; padding-bottom: 0; }
  .as-full .tbx-count { display: none; }
  .as-full .tbx input { padding-top: 7px; }
  .as .as-full .tbx textarea { height: 32px; min-height: 32px; padding-top: 7px; }
}
.nf-cta.as-hold { background: color-mix(in srgb, var(--ink) 6%, var(--side)); color: var(--muted); cursor: default; }
/* the circle while a file travels: lime only, asked 2026-11-07 */
.tf-ring { flex: none; display: block; width: 22px; height: 22px; }
.tf-ring circle { stroke: var(--btn); stroke-width: 4; stroke-linecap: round; }
/* files on a task: download, then open */
.tf { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; } /* a long name ends in … instead of widening the list */
.tf li { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 8px; border-radius: 14px; background: var(--side); font-size: 13px; font-weight: 500; line-height: 1.25; }
.tk-next .tf li { background: rgba(255, 255, 255, 0.65); color: #151515; }
.tf .k { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card); font-size: 10.5px; font-weight: 600; }
.tf .n { flex: 1; min-width: 0; }
.tf .n > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tf small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.tk-next .tf small { color: rgba(21, 21, 21, 0.62); }
.tf small.bad, .tk-next .tf small.bad { color: var(--red); font-weight: 500; }
.tf-get { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 34px; border-radius: 17px; background: var(--card); color: #151515; font-size: 12.5px; font-weight: 600; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tf-get.word { padding: 0 13px; }
.tf-word { display: none; }
@media (min-width: 901px) {
  .tf-get { padding: 0 13px; }
  .tf-word { display: inline; }
}
.tf-open { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--btn); color: #151515; font-size: 12.5px; font-weight: 600; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tf-get:focus-visible, .tf-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tf-coming { flex: none; display: flex; align-items: center; gap: 8px; padding-right: 6px; font-size: 11.5px; font-weight: 400; }
small.tk-clip { display: flex; align-items: center; gap: 4px; }
small.tk-clip svg { flex: none; }
/* typing, the question rides with its box on the keyboard, in a white card of its own: the shadow is the card, so nothing moves */
.as-part { border-radius: 10px; transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
.as-part[data-docked] { box-shadow: 0 0 0 12px var(--card), 0 14px 36px 6px rgba(21, 21, 21, 0.16); } /* nothing hides the page: this lifts it off what's behind */
.nfp.kb-on .as-who .tk-sheet { z-index: 0; }.as-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.as-lab small { min-width: 0; font-size: 12px; font-weight: 400; color: var(--muted); text-align: right; }
.as-lab small.bad { color: var(--red); font-weight: 500; }
/* Part of <phase>: quiet like the label's Optional, a small menu under it (TasksPage PartPicker) */
.as-lab:has(.as-part-btn) > label { flex: none; white-space: nowrap; } /* one line on the smallest phone: the phase's name gives way instead */
.as-part-btn { display: inline-flex; align-items: center; gap: 3px; min-width: 0; margin: -6px -6px -6px 0; padding: 6px; border-radius: 8px; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.as-part-btn b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink-2); }
.as-part-btn .ico { flex: none; }
@media (hover: hover) { .as-part-btn:hover { background: var(--hover); color: var(--ink); } }
.as-part-btn[aria-expanded='true'] { background: var(--hover); color: var(--ink); }
/* a task's phase, in its lines (Tasks, the open task) */
.tk-part { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
.as-who.tk-pick, .as-who .tk-pick { padding-left: 12px; }
.as-who .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as .tbx-count { visibility: hidden; } /* the count is for while writing */
.as .tbx:focus-within .tbx-count, .as .tbx-count.full { visibility: visible; }
.as .tbx-foot { min-height: 20px; padding-bottom: 4px; }
.as .tbx textarea { min-height: 34px; max-height: 66px; field-sizing: fixed; scrollbar-width: none; }
.as .tbx textarea::-webkit-scrollbar { display: none; }
/* one black thumb slides under the four words, asked 2026-11-07; the buttons are equal, so it goes by its own width */
.as-seg { position: relative; }
.as-seg button { position: relative; min-width: 0; font-size: 12px; transition: color 0.2s ease; }
.as-seg button.on { background: none; }
.as-thumb { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc((100% - 8px) / 4); border-radius: 18px; background: var(--ink); transform: translateX(calc(var(--i) * 100%)); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1); }

/* Task sent: the drop stands on the card, the task is a page it has just put down */
.as-stand { position: relative; flex: none; margin-top: 18px; padding-top: 34px; }
.as-stand > .drop { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; }
.as-sent { padding: 44px 18px 18px; border-radius: 26px; background: var(--card); color: var(--ink); text-align: center; }
.as-sent h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.as-sent > p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.as-note { position: relative; margin: 18px 2px 0; padding: 16px 16px 14px; border-radius: 14px; background: var(--pp-sky); color: #151515; text-align: left; transform: rotate(-1.4deg); clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%); }
.as-note::after { content: ""; position: absolute; right: 0; top: 0; width: 26px; height: 26px; border-bottom-left-radius: 8px; background: #a4d7fd; }
.as-note .tt { margin: 0; padding-right: 18px; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.as-note .who { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13px; font-weight: 600; line-height: 1.2; }
.as-note .tk-face { width: 30px; height: 30px; font-size: 10px; }
.as-note .n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-note .when { flex: none; margin-left: auto; font-size: 12.5px; font-weight: 500; }
.as-two { grid-template-columns: 1fr 1fr; }
/* Pick's month: a white card rising from its button over the page, with room for a thumb on every day */
.as-due { position: relative; }
.as-cal { position: absolute; z-index: 46; left: -8px; right: -8px; bottom: calc(100% + 10px); padding: 6px; border-radius: 22px; background: var(--card); box-shadow: 0 18px 44px -14px rgba(21, 21, 21, 0.28), 0 0 0 1px var(--line-2); transform-origin: 84% 100%; opacity: 0; transform: translateY(8px) scale(0.97); visibility: hidden; transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s 0.2s; }
.as-cal.open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.as-cal .nf-cal { padding: 2px 8px 6px; background: none; }
.as-cal .nf-cal header { height: 40px; font-size: 14px; }
.as-cal .nf-cal header button { width: 40px; height: 40px; }
.as-cal .nf-days { grid-auto-rows: 36px; row-gap: 0; min-height: 252px; }
.as-cal .nf-days i { font-size: 12px; }
.as-cal .nf-days button { width: 34px; height: 34px; font-size: 14px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.as-cal .nf-days button:focus-visible, .as-cal .nf-cal header button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.as-cal .nf-days button:disabled { opacity: 0.45; }
.nfp.as .nf-cta, .nfp.as .nf-sec { min-width: 0; height: 48px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-inline: 12px; border-radius: 24px; font-size: 14.5px; font-weight: 600; }
.nfp.as .nfp-foot { padding-top: 10px; z-index: 4; } /* over the docked card, so its shadow falls behind the button */
.nfp .tbx { transition: box-shadow 140ms ease-out, background-color 140ms ease-out; }
.tbx.one .tbx-foot { min-height: 22px; }
.as-none-in { margin-top: 10px; padding: 14px 16px; border-radius: 22px; background: var(--card); color: var(--ink); }
.as-none h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.as-none p { margin: 6px 0 12px; font-size: 13px; color: var(--muted); }
/* fixed on every phone: a short one takes the room from the gaps, down to 480px high */
@media (max-height: 600px) {
  .nfp.as { padding-top: 6px; padding-bottom: 8px; }
  .as-top { min-height: 44px; }
  .as-body { gap: 6px; margin-top: 4px; }
  .as-card { gap: 6px; padding: 8px 14px 6px; border-radius: 20px; }
  .as-part, .as-due { gap: 3px; }
  .as-lab { font-size: 13px; }
  .as .tbx input, .as .tbx textarea { padding-top: 6px; }
  .as .tbx-foot { min-height: 15px; padding-bottom: 2px; }
  .as .tbx textarea { min-height: 28px; max-height: 28px; }
  .as-seg button { height: 32px; }
  .as-cal { bottom: -4px; transform: scale(0.97); } /* no room above: over its own card */  .as-cal .nf-days { grid-auto-rows: 34px; min-height: 238px; }
  .as-cal .nf-days button { width: 32px; height: 32px; }
  .as-who, .as-who .tk-pick { min-height: 46px; }
  .nfp.as .nf-cta, .nfp.as .nf-sec { height: 44px; border-radius: 22px; }
  .nfp.as .nfp-foot { padding-top: 6px; }
  .as-stand { margin-top: 2px; padding-top: 26px; }
  .as-sent { padding: 34px 14px 12px; border-radius: 22px; }
  .as-sent h2 { font-size: 18px; }
  .as-note { margin-top: 10px; padding: 11px 14px 10px; }
  .as-note .tt { font-size: 14.5px; -webkit-line-clamp: 2; }
  .as-note .who { margin-top: 8px; }
}
/* shorter than any phone upright (one on its side): everything must still be reachable, so here alone the form scrolls */
@media (max-height: 479px) {
  .as-body { overflow-y: auto; }
}
/* with a mouse on a big screen: the same page as a small popup over Tasks */
@media (min-width: 901px) and (pointer: fine) {
  .nfp.as { display: flex; flex-direction: column; height: auto; max-height: 100%; }
  .nfp.as > .as-top { display: grid; }
  .nfp.as .nfp-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
  .nfp.as .nfp-foot.as-two { grid-template-columns: 1fr 1fr; }
  .nfp.as .nfp-foot > :only-child { grid-column: 1 / -1; }
  .nfp.as .nfp-foot .nf-sec { display: flex; align-items: center; justify-content: center; background: var(--side); }
  .as-card, .as-who.tk-pick, .as-who .tk-sheet, .as-who .tk-pick { background: var(--side); }
  .as .tbx { background: var(--card); }
  .as-sent { background: var(--side); }
  .as-who .tk-menu button.on { background: var(--card); }
  .nfp.as.as-none { height: auto; }
}

/* Team */
.tm-h { margin: 2px 2px 0; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.tm .rp-lab, .rp-body .tk-card .rp-lab { display: block; margin-top: 8px; }
.tm-what { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
/* a role: shut, a soft grey field like the others in the card; open, the same card turns white and slides down over the page
   with its soft shadow (the research picker's card and curve). Nothing behind it moves. */
.tm-role { margin-top: 6px; min-height: 48px; }
.tm-role .tk-sheet { z-index: 47; border-radius: 14px; background: var(--side); transition: box-shadow 0.38s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.tm-role.open .tk-sheet { background: var(--card); box-shadow: 0 0 0 1px var(--line-2), 0 18px 44px -14px rgba(21, 21, 21, 0.28); }
.tm-role .tk-pick { min-height: 48px; padding: 6px 12px 6px 14px; }
.tm-role .tk-pick .t { font-size: 15px; font-weight: 500; }
.tm-role .tk-menu { max-height: min(440px, var(--room, 440px)); padding: 0 6px; }
/* too near the screen's end: the card grows upward from where it stands, its list above the field */
.tm-role.up .tk-sheet { top: auto; bottom: 0; display: flex; flex-direction: column-reverse; }
.tm-role.up .tk-menu { padding-top: 6px; }
.tm-role.up .tk-menu::after { height: 0; }
.tm-role .tk-menu button { min-height: 52px; padding: 7px 10px; border-radius: 12px; }
.tm-role .tk-menu .t { font-size: 14px; font-weight: 500; }
.tm-role .tk-menu .ico { flex: none; color: var(--ink); }
.tm-send { height: 44px; margin-top: 10px; }
.tk-rowh .tk-chev { color: var(--muted); }
.tm-wait { display: flex; align-items: center; gap: 8px; padding-block: 8px; }
.tm-wait .tk-act { flex: none; padding: 0 12px; }
.tk-face.me { --c: var(--ink); }
.tm-link { --c: var(--muted); }
/* asked by name, not in yet: only the outline of their face, dotted, until they say yes */
.tm-dotted { --c: var(--muted); background: none; box-shadow: none; border: 1.5px dashed var(--faint); }
/* people you've worked with, under the role: each asked in by name with one tap */
.tm-known { margin: 2px 0 0; }
.tm-known > li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-block: 8px; }
.tm-ask { flex: none; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--btn); color: #151515; font-size: 13px; font-weight: 600; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tm-ask:disabled { background: var(--line); color: var(--faint); }
.tm-ask:not(:disabled):active { transform: scale(0.98); }
.tm-ask:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Join: paste the link */
.jp-hero { position: relative; min-height: 64px; padding: 2px 72px 6px 4px; color: var(--ink); }
.jp-hero h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.jp-hero p { margin: 5px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.jp-drop { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.jp-card { display: grid; gap: 10px; margin-top: 8px; padding: 16px; border-radius: 26px; background: var(--card); }
.jp-card .nf-in { background: var(--side); }
.jp-card .nf-chip { background: var(--card); }
.jp-card .nf-cta { width: 100%; height: 46px; border-radius: 23px; font-size: 14px; }
.jp-next { min-height: 34px; margin: 0 4px 2px; font-size: 12px; line-height: 1.4; text-align: center; color: var(--muted); }
.jp-next.bad { color: var(--red); font-weight: 500; }
.jp-own { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px 16px; border-radius: 22px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.jp-own:active { transform: scale(0.98); }
.jp-own:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.jp-own small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--muted); }
.jp-own svg { flex: none; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .as-cal { transform: none; transition: opacity 0.2s ease, visibility 0s 0.2s; }
  .as-thumb, .as-seg button { transition: none; }
  .tbx, .jp-own, .tk-chev, .tk-sheet, .tk-grow, .tk-menu, .tk-act, .tk-fab, a.tr-tile { transition: none; }
}

/* ---- Tasks on a big screen (Demo/makepublish-demo.html vReview): as Chats, the list on white, the open task on grey ---- */
.tw { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100dvh - 60px - 28px - 24px); min-height: 520px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--card); }
.tw-foot { flex: none; padding: 12px; border-top: 1px solid var(--line-2); }
.tw-new { height: 46px; border-radius: 14px; font-size: 14.5px; }
/* the same height as Chats' search box, in the same place, so the two lists match */
.tw-seg { margin: 0 12px 4px; }
.tw-seg button, .tw-seg .pa-seg-ink > span { height: 30px; font-size: 13.5px; border-radius: 15px; }
.tw-seg button { flex: 1; justify-content: center; }
.tw-seg .pa-seg-ink > span { flex: 1; justify-content: center; }
.tw-scroll .cw-lab .num { margin-left: 4px; font-weight: 500; color: var(--faint); }
.tw-row { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; color: var(--ink); transition: background 0.12s; }
.tw-row:hover { background: var(--hover); }
.tw-row.on { background: var(--card); }
.tw-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tw-row .av { flex: none; width: 36px; height: 36px; font-size: 11px; }
.tw-row .tk-day { background: var(--side); }
.tw-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tw-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.tw-top b { font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-top time { flex: none; color: var(--muted); }
.tw-top time.bad { color: var(--red); font-weight: 600; }
.tw-t { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tw-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-sub.bad { color: var(--red); }
.tw-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card); }
.tw-ph { display: flex; align-items: center; min-height: 66px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.tw-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.tw-meta i { font-style: normal; color: var(--faint); }
.tw-meta .bad { color: var(--red); font-weight: 600; }
.tw-pscroll { flex: 1; min-height: 0; overflow-y: auto; }
.tw-body { max-width: 760px; margin: 0 auto; padding: 32px 32px 24px; display: flex; flex-direction: column; gap: 24px; }
.tw-body h2 { font-family: var(--display); font-size: 28px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; overflow-wrap: anywhere; }
.tw-line { margin-top: 6px; font-size: 14px; color: var(--muted); }
.tw-line.bad { color: var(--red); }
.tw-msg { display: flex; gap: 14px; align-items: flex-start; }
.tw-msg .av { flex: none; width: 40px; height: 40px; font-size: 12px; }
.tw-msg .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tw-msg-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); }
.tw-msg-h b { font-weight: 600; color: var(--ink); }
.tw-msg-h small { margin-left: 4px; font-size: 12.5px; color: var(--muted); }
.tw-note { padding: 14px 16px; border-radius: 4px 18px 18px 18px; background: var(--bubble); font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.tw-sec h3 { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tw-sec p { max-width: 68ch; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
/* the buttons under the work, from its left edge, the main one first (asked 2026-11-13). A box they open takes their place:
   the box, then its buttons under it, so as it grows they go down with it */
.tw-act { padding-top: 4px; }
.tw-act:empty { display: none; }
.tw-act .tk-act:not(.y):not(.danger) { background: var(--side); }
.tw-act .tk-act { height: 42px; padding: 0 18px; border-radius: 12px; font-size: 14px; }
.tw-act .tk-acts { flex-direction: row-reverse; justify-content: flex-end; }
.tw-act .tk-send { justify-content: flex-start; }
.tw-act .tk-send > :first-child { flex: 1 1 100%; order: -2; }
.tw-act .tk-send .tk-act.y { order: -1; }
.tw-empty { align-items: center; justify-content: center; gap: 10px; padding: 40px; text-align: center; }
.tw-empty b { margin-top: 6px; font-size: 18px; font-weight: 650; }
.tw-empty p { max-width: 42ch; font-size: 14.5px; color: var(--muted); }
.tw-empty .btn { margin-top: 8px; }
@media (max-width: 1000px) { .tw { grid-template-columns: 280px minmax(0, 1fr); } .tw-body { padding: 24px 22px; } .tw-ph { padding-inline: 22px; } }
/* ---------- Chats on a phone (features/chats, Demo/chats-phone.html direction A, built 2026-11-07) ---------- */

/* the list */
.cl { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.cl > .pp-top { margin-bottom: 8px; } /* with the 10px gap: the research card stands exactly where it does on Tasks */
.cl-card { padding: 6px 16px; border-radius: 22px; background: var(--card); }
.cl-card h2 { padding: 8px 0 2px; font-size: 14px; font-weight: 600; }
.cl-row { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 8px 0; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cl-row + .cl-row { box-shadow: 0 -1px 0 var(--line-2); }
.cl-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.cl-row > .m { flex: 1; min-width: 0; max-width: none; width: auto; display: block; } /* .m is also an old chat message's class */
.cl-row b { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.25; }
.cl-row b span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cl-row time { flex: none; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.cl-row small { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cl-row small span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cl-row.new small > span:first-child { color: var(--ink); font-weight: 500; }
.cl-row .n.at { width: 18px; padding: 0; background: var(--btn); color: #151515; }
.cl-row .n { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; overflow: visible; }
.cl-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--side); color: var(--ink); }
.cl-ic.on { background: var(--btn); color: #151515; }
.cl-face { width: 38px; height: 38px; font-size: 11.5px; }
.cl-alone { display: grid; justify-items: center; padding: 22px 18px 18px; text-align: center; }
.cl-alone h2 { padding: 10px 0 0; font-size: 17px; letter-spacing: -0.02em; }
.cl-alone p { margin: 3px 0 14px; font-size: 13px; color: var(--muted); }
.cl-alone .nf-cta { display: grid; place-items: center; width: 100%; height: 46px; border-radius: 23px; font-size: 14px; text-decoration: none; }

/* one talk: the whole screen. It keeps its height with the keyboard up; everything under the top rides up on one curve
   (useRideKeyboard), and the top stays over it, so the oldest words reach past it with --ct-kb of room. */
.ct { position: fixed; left: 0; right: 0; top: 0; z-index: 45; height: var(--ct-h, 100dvh); overflow: clip; /* clip, not hidden: a focused box could scroll a hidden one, and everything would jump */ display: flex; flex-direction: column; background: var(--side); color: var(--ink); padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); overscroll-behavior: none; }
.ct-top { position: relative; z-index: 3; flex: none; display: flex; align-items: center; min-height: 60px; padding: 10px 16px 6px; background: var(--side); transform: translateY(var(--vvy, 0px)); }
.ct-top .as-head { position: absolute; left: 68px; right: 68px; top: 10px; height: 44px; display: flex; flex-direction: column; justify-content: center; }
/* All research's search (pa-sbox), lying over the name when it opens */
.ct-sbox { position: absolute; left: 70px; right: 16px; top: 10px; flex: none; }
.ct-move { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; transform: translateY(calc(-1 * var(--ct-kb, 0px) + var(--vvy, 0px))); transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); will-change: transform; }
.ct-feed { flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 0 16px 8px; }
.ct-feed::-webkit-scrollbar { display: none; }
.ct-in { flex: 1 0 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: var(--ct-kb, 0px); }
.ct-day { align-self: center; margin: 10px 0 6px; font-size: 11.5px; color: var(--muted); }
.ct-new { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 11.5px; font-weight: 600; color: var(--red); }
.ct-new::before, .ct-new::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.35; }
.ct-more { align-self: center; margin: 6px 0; font-size: 11.5px; color: var(--muted); }
/* nothing said yet: in the middle of the screen, and the drop says hello, once */
.ct-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.ct-tale { position: relative; width: 72px; }
.ct-hi { position: absolute; left: 62px; bottom: 56px; display: grid; }
.ct-hi > * { grid-area: 1 / 1; display: grid; place-items: center; min-width: 46px; height: 32px; padding: 0 10px; border-radius: 16px 16px 16px 5px; font-style: normal; }
.ct-hi > i { display: flex; gap: 4px; background: var(--card); opacity: 0; animation: ct-hi-a 1.1s cubic-bezier(0.23, 1, 0.32, 1) 0.45s both; transform-origin: 0 100%; }
.ct-hi > i i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.ct-hi > b { background: var(--btn); color: #151515; font-size: 14px; font-weight: 600; opacity: 0; animation: ct-hi-b 0.3s cubic-bezier(0.23, 1, 0.32, 1) 1.45s both; transform-origin: 0 100%; }
@keyframes ct-hi-a { 0% { opacity: 0; transform: scale(0.8); } 18%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes ct-hi-b { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
.ct-empty h2 { margin-top: 14px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.ct-empty p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.ct-wrap { position: relative; display: flex; flex-direction: column; border-radius: 18px; }
.ct-wrap.first { margin-top: 7px; }
.ct-wrap.flash { animation: ct-flash 1.2s ease-out; }
@keyframes ct-flash { 0%, 45% { background: color-mix(in srgb, var(--btn) 45%, transparent); } 100% { background: transparent; } }
/* the reply arrow waits behind the message, on the left, and shows as the finger pulls */
.ct-swipe { position: absolute; left: 2px; top: 50%; margin-top: -15px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); opacity: 0; transform: scale(0.7); pointer-events: none; }
.ct-swipe.me { left: auto; right: 2px; } /* your own are pulled to the left: the arrow waits on the right */
.ct-row { position: relative; display: flex; align-items: flex-end; gap: 8px; min-width: 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; will-change: transform; }
.ct-row.me { justify-content: flex-end; }
.ct-face { width: 30px; height: 30px; font-size: 10px; flex: none; }
.ct-face-sp { flex: none; width: 30px; }
.ct-bub { min-width: 0; max-width: 78%; padding: 8px 12px; border-radius: 18px; background: var(--card); font-size: 14px; line-height: 1.38; overflow-wrap: anywhere; }
.me > .ct-bub { max-width: 82%; }
.ct-row.me .ct-bub { background: var(--btn); color: #151515; }
.ct-row.them .ct-bub.tail { border-bottom-left-radius: 6px; }
.ct-row.me .ct-bub.tail { border-bottom-right-radius: 6px; }
.ct-bub.gone { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 13px; }
.ct-row.me .ct-bub.gone { background: transparent; color: var(--muted); }
/* a reply: the message it answers stands just behind and above it, a small copy in its own colour, tucked under the reply */
.ct-stack { min-width: 0; max-width: 78%; display: flex; flex-direction: column; align-items: flex-start; }
.ct-row.me .ct-stack { max-width: 82%; align-items: flex-end; }
.ct-stack > .ct-bub { position: relative; max-width: 100%; }
.ct-quote { display: flex; align-items: center; gap: 6px; max-width: calc(100% - 14px); margin: 0 7px -14px; padding: 6px 11px 19px; border-radius: 15px 15px 6px 6px; background: color-mix(in srgb, var(--card) 62%, var(--side)); color: var(--muted); text-align: left; font-size: 12.5px; line-height: 1.3; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ct-quote.mine { background: color-mix(in srgb, var(--btn) 48%, var(--side)); color: rgba(21, 21, 21, 0.68); }
.ct-quote > svg { flex: none; opacity: 0.75; }
.ct-quote .q { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ct-quote .q b { font-weight: 600; color: var(--ink); }
.ct-quote.mine .q b { color: #151515; }
.ct-quote:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ct-text { white-space: pre-wrap; }
.ct-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ct-name { display: block; margin-bottom: 1px; font-size: 12px; font-weight: 600; color: var(--c); }
.ct-time { display: block; margin-top: 2px; font-size: 10.5px; text-align: right; color: var(--muted); }
.me .ct-time { color: rgba(21, 21, 21, 0.6); }
.ct-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: -3px 0 2px; position: relative; z-index: 1; }
.ct-chips.them { margin-left: 44px; }
.ct-chips.me { justify-content: flex-end; margin-right: 8px; }
.ct-chips button { height: 24px; padding: 0 7px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 2px var(--side); color: var(--muted); font-size: 12px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ct-chips button.on { background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.ct-seen { align-self: flex-end; margin: 1px 4px 0; font-size: 11px; color: var(--muted); }
.ct-typing { margin-top: 7px; }
.ct-dots { display: flex; align-items: center; gap: 4px; height: 20px; }
.ct-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ct-dot 1.2s ease-in-out infinite; }
.ct-dots i:nth-child(2) { animation-delay: 0.16s; }
.ct-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes ct-dot { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

.ct-down { position: absolute; right: 16px; bottom: calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + 78px); z-index: 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); box-shadow: 0 6px 18px -6px rgba(21, 21, 21, 0.3); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ct-down .n { position: absolute; top: -5px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; }

.ct-say { flex: none; margin: 0 12px calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + 12px); border-radius: 26px; background: var(--card); overflow: clip; }
/* writing a reply: the message it answers peeks out from behind the box, sky for someone else's, lime for yours, with the
   writer's face; it slides up from behind the box as it comes, and the box stays where it is */
.ct-to { position: relative; z-index: 0; flex: none; display: flex; align-items: center; gap: 10px; margin: 0 24px -22px; padding: 9px 8px 30px 10px; border-radius: 20px 20px 0 0; background: var(--card); color: #151515;
  transition: transform 0.24s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.24s cubic-bezier(0.23, 1, 0.32, 1); }
@starting-style { .ct-to { transform: translateY(24px); opacity: 0; } }
/* white on white (asked 2026-11-08): a short, soft shadow on the box's top edge keeps the two apart */
.ct-to + .ct-say { box-shadow: 0 -3px 8px -2px rgba(21, 21, 21, 0.12); }
.ct-to .av { flex: none; width: 30px; height: 30px; font-size: 10px; }
.ct-to-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); }
.ct-to .w { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ct-to .lab { font-size: 11.5px; font-weight: 500; color: rgba(21, 21, 21, 0.62); }
.ct-to .lab b { font-weight: 600; color: #151515; }
.ct-to .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; line-height: 1.3; }
.ct-to button { color: rgba(21, 21, 21, 0.6); }
.ct-say { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .ct-to { transition: none; } }
.ct-to button { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); touch-action: manipulation; }
.ct-line { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; }
.ct-line textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 116px; padding: 9px 0; border: 0; outline: 0; resize: none; background: none; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.38; field-sizing: content; scrollbar-width: none; }
.ct-line textarea::placeholder { color: var(--muted); opacity: 1; }
/* who to name: a list in the box, above the words */
.ct-names { display: grid; max-height: 172px; overflow-y: auto; overscroll-behavior: contain; margin: 6px 6px 0; padding: 2px; border-radius: 20px; background: var(--side); scrollbar-width: none; }
.ct-names button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 10px; border-radius: 16px; color: var(--ink); text-align: left; font-size: 13.5px; font-weight: 500; line-height: 1.2; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ct-names .av { flex: none; width: 30px; height: 30px; font-size: 10px; }
.ct-names .cl-ic { width: 30px; height: 30px; border-radius: 10px; }
.ct-names small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.ct-at { font-weight: 600; color: #2b6cb0; }
.ct-at.me { padding: 0 3px; border-radius: 5px; background: color-mix(in srgb, var(--btn) 55%, transparent); color: var(--ink); }
.me .ct-at { color: #151515; }
.me .ct-at.me { background: rgba(21, 21, 21, 0.1); }
/* the one pinned message, under the top; it stays when the rest rides up with the keyboard */
.ct-pin { position: relative; z-index: 3; flex: none; display: flex; align-items: center; gap: 4px; min-height: 42px; margin: -2px 12px 6px; padding: 0 6px 0 12px; border-radius: 16px; background: var(--card); transform: translateY(var(--vvy, 0px)); }
.ct-pin .w { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 42px; color: var(--ink); text-align: left; font-size: 13px; -webkit-tap-highlight-color: transparent; }
.ct-pin .w svg { flex: none; color: var(--muted); }
.ct-pin .w span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ct-pin .x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); touch-action: manipulation; }
.ct-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--side); color: var(--muted); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 140ms ease-out; }
.ct-go.on { background: var(--btn); color: #151515; }
.ct-go.on:active { transform: scale(0.94); }
.ct-go:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* words, not a button: small, and only as much room as they need */
.ct-note { flex: none; margin: 0; padding: 8px 24px calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + 14px); font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: center; }

.ct-found { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.ct-found button { display: grid; gap: 2px; padding: 10px 14px; border-radius: 16px; background: var(--card); color: var(--ink); text-align: left; font-size: 13.5px; line-height: 1.35; }
.ct-found b { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; }
.ct-found time { font-weight: 400; color: var(--muted); }
.ct-found span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ct-none { margin: 30px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* press and hold: the message lifts out, with what can be done with it */
/* press and hold: the screen dims, the message stays where it was, its reactions rise above it and what can be done drops
   below it; a tap anywhere beside the three closes it, the way it came. They float, so they cast a shadow */
.ct-ov { position: fixed; inset: 0; z-index: 60; background: rgba(21, 21, 21, 0.42); transition: opacity 0.18s cubic-bezier(0.23, 1, 0.32, 1); -webkit-tap-highlight-color: transparent; }
@starting-style { .ct-ov { opacity: 0; } }
.ct-ov.out { opacity: 0; transition-duration: 0.15s; }
.ct-pop { position: absolute; display: flex; flex-direction: column; gap: 8px; pointer-events: none; visibility: hidden; }
.ct-pop.set { visibility: visible; }
.ct-pop.me { align-items: flex-end; }
.ct-pop.them { align-items: flex-start; }
.ct-pop > * { pointer-events: auto; transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.22s cubic-bezier(0.23, 1, 0.32, 1); }
.ct-pop.them > * { transform-origin: 0 50%; }
.ct-pop.me > * { transform-origin: 100% 50%; }
@starting-style {
  .ct-pop .ct-pick { transform: translateY(10px) scale(0.92); opacity: 0; }
  .ct-pop .ct-acts { transform: translateY(-8px) scale(0.95); opacity: 0; }
}
.ct-ov.out .ct-pick { transform: translateY(8px) scale(0.95); opacity: 0; }
.ct-ov.out .ct-acts { transform: translateY(-6px) scale(0.97); opacity: 0; }
.ct-pick { display: flex; gap: 2px; padding: 5px 6px; border-radius: 28px; background: var(--card); box-shadow: 0 14px 34px -14px rgba(21, 21, 21, 0.45); }
.ct-pick button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 23px; line-height: 1; transition: transform 140ms ease-out; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ct-pick button:active { transform: scale(1.18); }
.ct-pick button.on { background: color-mix(in srgb, var(--btn) 55%, var(--card)); }
/* the message as it is in the talk, lifted: same colour and tail; a very long one is cut with a fade */
.ct-bub.ct-show { max-width: calc(100vw - 24px); overflow: hidden; box-shadow: 0 10px 30px -14px rgba(21, 21, 21, 0.4); }
.ct-pop.them .ct-bub.ct-show { border-bottom-left-radius: 6px; }
.ct-bub.ct-show.mine { background: var(--btn); color: #151515; border-bottom-right-radius: 6px; }
.ct-bub.ct-show.mine .ct-time { color: rgba(21, 21, 21, 0.6); }
.ct-bub.ct-show .ct-text { display: block; }
.ct-bub.ct-show.cut { -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), transparent); mask-image: linear-gradient(#000 calc(100% - 34px), transparent); }
.ct-acts { width: 236px; max-width: calc(100vw - 24px); max-height: min(330px, 62dvh); overflow-y: auto; padding: 5px; border-radius: 20px; background: var(--card); box-shadow: 0 16px 40px -16px rgba(21, 21, 21, 0.45); }
.ct-acts button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border-radius: 14px; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ct-acts button:active { background: var(--side); }
.ct-acts button svg { color: var(--muted); }
/* what can't be taken back stands apart, at the foot */
.ct-acts button.bad { color: var(--red); }
.ct-acts button.bad svg { color: var(--red); }
.ct-acts button:not(.bad) + button.bad { margin-top: 5px; position: relative; }
.ct-acts button:not(.bad) + button.bad::before { content: ""; position: absolute; left: 12px; right: 12px; top: -3px; height: 1px; background: var(--line-2); }
.ct-acts p { margin: 0; padding: 8px 12px 4px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ct-pop > *, .ct-ov { transition: none; } }
@media (prefers-reduced-motion: reduce) {
  .ct-dots i, .ct-wrap.flash { animation: none; }
  .ct-ov, .ct-pop, .ct-move { transition: none; }
  .ct-hi > i { display: none; }
  .ct-hi > b { animation: none; opacity: 1; }
}

/* ---- files in a talk (Demo/chat-files-options.html B, picked 2026-11-11): each a small sheet of paper, its kind at its foot ---- */
.ct-line:has(.ct-clip) { padding-left: 6px; }
.ct-clip { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 140ms ease-out; }
.ct-clip:active { transform: scale(0.94); }
.ct-clip:disabled { opacity: 0.35; }
.ct-clip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ct-paper { position: relative; flex: none; width: 46px; height: 58px; border-radius: 6px 14px 6px 6px; background: var(--card); overflow: hidden;
  box-shadow: 0 1px 2px rgba(21, 21, 21, 0.06), 0 6px 14px -8px rgba(21, 21, 21, 0.28); --t: var(--blue-bg); --f: var(--blue); }
.ct-paper::before { content: ""; position: absolute; top: 0; right: 0; width: 14px; height: 14px; border-bottom-left-radius: 6px; background: var(--side); }
.ct-paper i { position: absolute; left: 7px; right: 9px; height: 3px; border-radius: 2px; background: var(--line); }
.ct-paper i:nth-child(1) { top: 9px; right: 16px; } .ct-paper i:nth-child(2) { top: 17px; } .ct-paper i:nth-child(3) { top: 25px; right: 18px; }
.ct-paper em { position: absolute; left: 0; right: 0; bottom: 0; height: 15px; display: grid; place-items: center; font-style: normal; font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; background: var(--t); color: var(--f); }
.ct-paper.pdf { --t: var(--red-bg); --f: var(--red); } .ct-paper.xls { --t: var(--green-bg); --f: var(--green); } .ct-paper.ppt, .ct-paper.ref { --t: var(--amber-bg); --f: var(--amber); } .ct-paper.img { --t: var(--teal-bg); --f: var(--teal); }
.ct-paper.sm { width: 34px; height: 42px; border-radius: 5px 10px 5px 5px; }
.ct-paper.sm::before { width: 10px; height: 10px; }
.ct-paper.sm i { left: 5px; right: 7px; height: 2px; } .ct-paper.sm i:nth-child(1) { top: 7px; right: 12px; } .ct-paper.sm i:nth-child(2) { top: 12px; } .ct-paper.sm i:nth-child(3) { top: 17px; right: 13px; }
.ct-paper.sm em { height: 11px; font-size: 7px; }
/* the box: what is going up, above the words */
.ct-up { list-style: none; display: grid; gap: 2px; margin: 0; padding: 6px 6px 0; }
.ct-up li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 6px; border-radius: 18px; }
.ct-up li.bad { background: var(--red-bg); }
.ct-up .n { flex: 1; min-width: 0; }
.ct-up .n b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-up .n small { display: block; font-size: 11.5px; color: var(--muted); }
.ct-up li.bad .n small { color: var(--red); }
.ct-up-x { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.ct-up-x .tf-ring { width: 24px; height: 24px; }
.ct-up-x .tf-ring circle { stroke: var(--ink); }
.ct-up-again { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--card); color: var(--red); font-size: 12px; font-weight: 600; }
.ct-up-left { padding: 4px 8px 2px !important; font-size: 12px; color: var(--red); }
/* in the talk: files above the words, each its own soft card */
.ct-fstack { gap: 4px; }
.ct-fname { margin: 0 0 1px 6px; }
.ct-file { display: flex; align-items: center; gap: 12px; width: 252px; max-width: 100%; padding: 10px 12px 10px 10px; border-radius: 20px; background: var(--card); color: var(--ink); }
.ct-file.mine { background: color-mix(in srgb, var(--btn) 55%, var(--card)); color: #151515; }
.ct-file .n { flex: 1; min-width: 0; }
.ct-file .n b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-file .n small { display: block; font-size: 11.5px; color: var(--muted); }
.ct-file.mine .n small { color: rgba(21, 21, 21, 0.6); }
.ct-file .n small.bad { color: var(--red); }
.ct-fget { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--side); color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 140ms ease-out; }
.ct-file.mine .ct-fget { background: rgba(255, 255, 255, 0.65); color: #151515; }
.ct-fget:active { transform: scale(0.94); }
.ct-fget.coming .tf-ring circle { stroke: var(--ink); }
.ct-fopen { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--ink); color: var(--ghost); font-size: 12.5px; font-weight: 600; }
.ct-ftime { margin: 0 4px; }
@media (prefers-reduced-motion: reduce) { .ct-clip, .ct-fget { transition: none; } }

/* ---- Chats on a big screen (Demo/makepublish-demo.html vChat): grey sidebar | the talks on white | the open talk on grey, as on
   the phone, so the three never run together (asked 2026-11-13) ---- */
.content:has(> .ka.on > .cw), .content:has(> .ka.on > .tw), .content:has(> .ka.on > .rpw > .cw) { max-width: 1440px; padding-bottom: 24px; }
/* Chats and Tasks themselves are the whole screen beside the sidebar: no top bar (its name and bell said it twice, asked
   2026-11-13), no margins. Inside a research the bar stays: it is the way back. */
@media (min-width: 901px) {
  .main:has(> main > .ka.on > .cw, > main > .ka.on > .tw) > .top { display: none; }
  .content:has(> .ka.on > .cw), .content:has(> .ka.on > .tw) { max-width: none; padding: 0; }
  .content > .ka > .cw, .content > .ka > .tw { height: 100dvh; min-height: 480px; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
  /* nothing here scrolls the page, so the room kept for its scrollbar (01-tokens-base) would only be an empty strip */
  html:has(.content > .ka.on > .cw, .content > .ka.on > .tw) { scrollbar-gutter: auto; overflow: hidden; }
}
.cw { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100dvh - 60px - 28px - 24px); min-height: 520px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--card); }
/* colours from Demo/makepublish-demo.html chats-page (asked 2026-11-13): list on the page colour, picked row and the open talk on white */
.cw-list { display: flex; flex-direction: column; min-height: 0; background: var(--ghost); }
.cw-h { padding: 18px 18px 10px; font-family: var(--display); font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.cw-pick { padding: 0 12px 10px; position: relative; z-index: 4; }
.cw-pick .tk-pick, .cw-pick .tk-sheet { box-shadow: 0 0 0 1px var(--line); }
.cw-find { display: flex; align-items: center; gap: 8px; margin: 0 12px 4px; height: 38px; padding: 0 14px; border-radius: 19px; background: var(--card); border: 1px solid var(--line); color: var(--faint); transition: border-color 0.15s; }
.cw-find:focus-within { border-color: var(--box-on); }
.cw-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.cw-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 10px; }
/* one thin bar, no arrows, the same in every pane */
.cw-scroll, .tw-pscroll, .ct.wide .ct-feed { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 16%, transparent) transparent; }
.cw-lab { padding: 14px 10px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cw-none { padding: 14px 10px; font-size: 13.5px; color: var(--muted); }
.cw .cl-row { min-height: 56px; padding: 8px 10px; border-radius: 12px; transition: background 0.12s; }
.cw .cl-row + .cl-row { box-shadow: none; }
.cw .cl-row:hover { background: var(--hover); }
.cw .cl-row.on { background: var(--card); }
.cw .cl-ic { background: none; color: var(--ink-2); }
.cw .cl-row .n:not(.at) { background: var(--ink); color: var(--ghost); }
/* alone in the research: the pane where the talk or the task would be says so, with the way to the team */
.cw-alone-pane { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 40px 24px; background: var(--side); text-align: center; }
.cw-alone-pane h2 { margin-top: 16px; font-family: var(--display); font-size: 24px; font-weight: 650; letter-spacing: -0.025em; }
.cw-alone-pane p { margin: 6px 0 20px; max-width: 40ch; font-size: 15px; color: var(--muted); }
.cw-alone-pane .nf-cta { width: auto; min-width: 240px; height: 48px; padding: 0 28px; border-radius: 24px; font-size: 15px; }
.cw-talk { position: relative; min-width: 0; min-height: 0; display: flex; }
/* the phone's talk, laid in the pane: no fixed screen, no keyboard ride; its own colours (grey behind, white words) */
.ct.wide { position: relative; inset: auto; z-index: auto; flex: 1; height: auto; padding-top: 0; }
.ct.wide .ct-top { min-height: 66px; padding: 12px 20px; border-bottom: 1px solid var(--line); transform: none; }
/* demo colours: white behind, their words on the soft bubble grey, the box drawn with a line */
.ct.wide, .ct.wide .ct-top { background: var(--card); }
.ct.wide .ct-row:not(.me) .ct-bub:not(.gone), .ct.wide .ct-file:not(.mine), .ct.wide .ct-pin, .ct.wide .ct-to, .ct.wide .ct-found button, .ct.wide .ct-hi > i, .ct.wide .ct-hov button:hover { background: var(--bubble); }
.ct.wide .ct-say { box-shadow: inset 0 0 0 1px var(--line); }
.ct.wide .ct-chips button { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
.ct.wide .ct-top .as-head { left: 20px; right: 72px; top: 11px; align-items: flex-start; text-align: left; }
.ct.wide .ct-top .as-head h1 { font-size: 16px; }
.ct.wide .ct-sbox { left: 20px; right: 16px; top: 11px; }
.ct.wide .ct-sbox.open { box-shadow: 0 0 0 1px var(--line); }
/* the title steps aside while the box is open, so nothing of it shows round the box's corners */
.ct.wide .ct-top .as-head { transition: opacity 0.15s; }
.ct.wide .ct-top:has(.ct-sbox.open) .as-head { opacity: 0; }
.ct.wide .ct-sbox.open:focus-within { box-shadow: 0 0 0 1px var(--box-on); }
.ct.wide .ct-sbox .pa-find { font-size: 14.5px; }

.ct.wide .ct-pin { margin: 8px 20px 0; transform: none; }
.ct.wide .ct-move { transform: none; transition: none; }
.ct.wide .ct-feed { padding: 0 max(20px, calc((100% - 860px) / 2)) 8px; }


.ct.wide .ct-bub { max-width: min(78%, 560px); }

.ct.wide .ct-say { width: min(860px, calc(100% - 40px)); margin: 0 auto 16px; }
.ct.wide .ct-to { width: min(860px, calc(100% - 40px)); margin-inline: auto; }
.ct.wide .ct-note { padding-bottom: 18px; }
.ct.wide .ct-down { bottom: 84px; right: 24px; }
/* Reply and •••: beside the message, seen on hover or keyboard focus */
.ct-hov { display: flex; align-self: center; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.ct-row.me .ct-hov { order: -1; }
.ct-wrap:hover .ct-hov, .ct-hov:focus-within { opacity: 1; }
.ct-hov button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.ct-hov button:hover { background: var(--card); color: var(--ink); }
.ct-hov button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ct.wide .ct-row { -webkit-user-select: text; user-select: text; }
@media (max-width: 1000px) { .cw { grid-template-columns: 280px minmax(0, 1fr); } }
/* ---------- You: the account (features/account) ----------
   Demo/account-phone.html, direction A, picked 2026-11-08: one calm list of white cards on the side tone, each row opening its
   own screen. Only the site's tokens. Every row holds long words (names, emails, research) on one line with an ellipsis, so
   nothing grows sideways on a 320px phone; boxes keep the room for their error line, so nothing moves when one appears. */
/* the phone's You (a big screen's window keeps the page as it is: nothing behind it changes between its screens) */
.app.own-top:has(.ka.on .ac):not(:has(.sw-win)), .app.own-top:has(.ka.on .ac):not(:has(.sw-win)) .main { background: var(--side); }

.ac { width: 100%; max-width: 560px; margin: 0 auto; display: grid; grid-auto-rows: max-content; gap: 10px; min-width: 0; }
.ac-title { margin: 6px 4px 6px; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }

/* you, on top */
.ac-me { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px; border-radius: 22px; background: var(--card); color: var(--ink); text-decoration: none; transition: transform 140ms ease-out; -webkit-tap-highlight-color: transparent; }
.ac-me:active { transform: scale(0.985); }
.ac-face { width: 54px; height: 54px; font-size: 17px; }
.ac-me-t { flex: 1; min-width: 0; display: grid; }
.ac-me-t b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-me-t small { font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* groups of rows */
.ac-group { display: grid; gap: 6px; min-width: 0; margin-top: 6px; }
.ac-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; padding: 0 6px; }
.ac-group h2 { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
/* See all: a quiet link at the heading's end, the way phone apps do it */
.ac-more { display: inline-flex; align-items: center; gap: 3px; margin: -8px -6px -8px 0; padding: 8px 6px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: opacity 120ms ease-out; }
.ac-more .num { color: var(--muted); font-weight: 500; }
.ac-more:active { opacity: 0.6; }
.ac-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.ac-card { min-width: 0; padding: 0 16px; border-radius: 22px; background: var(--card); color: var(--ink); }
.ac-pad { padding: 14px 16px 6px; }
.ac-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 56px; padding: 8px 0; color: var(--ink); text-decoration: none; text-align: left; font-size: 15px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
/* between rows: one flat 1px strip across the top, nothing else. A box-shadow here drew a grey edge down the side of every
   card on some screen scalings (seen by the user 2026-11-08) */
.ac-row { position: relative; }
.ac-row + .ac-row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-2); pointer-events: none; }
a.ac-row, button.ac-row { transition: opacity 120ms ease-out; }
a.ac-row:active, button.ac-row:not(:disabled):active { opacity: 0.6; }
.ac-row:focus-visible, .ac-me:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
button.ac-row:disabled { opacity: 1; cursor: default; }
.ac-ic { flex: none; color: var(--ink-2); }
.ac-m { flex: 1; min-width: 0; display: grid; }
.ac-m b { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* a switch's words are a sentence, not a name: they wrap on a narrow phone instead of losing their end */
.ac-row[role="switch"] .ac-m b { white-space: normal; line-height: 1.3; transition: color 180ms ease-out; }
/* a switch that is off: its words go grey with it */
.ac-row[role="switch"][aria-checked="false"] .ac-m b, .ac-row[role="switch"][aria-checked="false"] .ac-ic { color: var(--muted); }
.ac-all .ac-m b { font-weight: 600; }
/* a note under a row's name may take two lines on a narrow phone rather than lose its end */
.ac-m small { margin-top: 1px; font-size: 12.5px; line-height: 1.35; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ac-v { flex: 0 1 auto; min-width: 0; max-width: 48%; font-size: 14px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-v.strong { color: var(--ink); font-weight: 500; }
.ac-chev { flex: none; color: var(--faint); }
.ac-row.red, .ac-row.red .ac-ic { color: var(--red); }

/* research as cards, the same as the research picker in Tasks (18-track.css .tk-pick.own): each row wears its research's
   colour as a strip down its left side, the card's corners clip the strips */
.ac-rcards { padding: 0; overflow: hidden; }
.ac-rcards > .ac-row { padding: 8px 14px 8px 36px; }
.ac-rcards > .ac-row + .ac-row::before { left: 36px; right: 14px; }
.ac-rrow { background: linear-gradient(90deg, var(--pid) 22px, var(--card) 22px); }.ac-wait { min-height: 56px; }
.ac-wait-card { min-height: 168px; }
.ac-end { margin-top: 14px; }

/* a small action at a row's end: Clear */
.ac-act { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--side); color: var(--ink); font-size: 13.5px; font-weight: 600; transition: transform 140ms ease-out; touch-action: manipulation; }
.ac-act:active:not(:disabled) { transform: scale(0.96); }
/* Download: the same pill, round, with only its icon */
.ac-act-ic { width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; }

/* a screen behind a row */
.ac-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 48px; margin-bottom: 6px; }
.ac-top h1 { text-align: center; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; }
.ac-sub form { display: grid; gap: 10px; min-width: 0; }
.ac-note { padding: 2px 8px; font-size: 13px; line-height: 1.45; color: var(--muted); text-align: center; text-wrap: pretty; overflow-wrap: anywhere; }
.ac-note a { color: var(--ink); font-weight: 600; }
.ac-text { display: grid; gap: 8px; padding-bottom: 14px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ac-text h2 { font-size: 15px; font-weight: 600; }

/* text boxes */
.ac-field { display: grid; min-width: 0; padding-bottom: 6px; }
.ac-field > label, .ac-seg legend { padding: 0 2px 6px; font-size: 13.5px; font-weight: 500; }
.ac-in { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 48px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--side); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 140ms ease-out, background-color 140ms ease-out; }
.ac-in:focus-within { background: var(--card); box-shadow: inset 0 0 0 1px var(--box-on); }
.ac-in.bad { box-shadow: inset 0 0 0 1.5px var(--red); }
.ac-in input, .ac-in textarea { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; color: var(--ink); font-size: 16px; } /* 16px: no zoom on iPhone */
.ac-in input::placeholder, .ac-in textarea::placeholder { color: var(--faint); }
.ac-area { align-items: stretch; padding-right: 14px; }
.ac-area textarea { height: auto; min-height: 128px; padding: 12px 0; resize: none; line-height: 1.45; }
.ac-eye { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.ac-eye[aria-pressed="true"] { color: var(--ink); }
.ac-say { display: flex; justify-content: space-between; gap: 10px; min-height: 20px; padding: 5px 2px 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.ac-say.bad { color: var(--red); font-weight: 500; }
.ac-say .ok { color: var(--green); }
.ac-say .num { flex: none; }

/* What is it about: three choices in one row, each a share of it */
.ac-seg { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
/* a pill track with one ink pill sliding under the choice; only the pill moves (transform), on the app's drawer curve */
.ac-seg-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: var(--side); isolation: isolate; }
.ac-thumb { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 999px; background: var(--ink); transition: transform 340ms cubic-bezier(0.32, 0.72, 0, 1); will-change: transform; }
.ac-seg label { position: relative; display: grid; place-items: center; min-height: 40px; padding: 0 8px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: color 240ms ease-out; }
.ac-seg label.on { color: var(--ghost); }
.ac-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ac-seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ac-thumb { transition: none; } }

/* the legal words, set for reading: one size of text, plain headings, room between parts */
.ac-prose { padding: 18px 18px 20px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.ac-prose-date { font-size: 12.5px; color: var(--muted); }
.ac-prose .legal-lead { margin-top: 10px; font-size: 16px; line-height: 1.55; }
.ac-prose h2 { margin: 22px 0 6px; font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; }
.ac-prose p + p, .ac-prose ul + p { margin-top: 10px; }
.ac-prose ul { display: grid; gap: 8px; margin-top: 6px; padding-left: 20px; list-style: disc; }
.ac-prose li::marker { color: var(--faint); }
.ac-prose a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ac-prose-ask { margin-top: 22px !important; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); }

/* Forgot password?, at the right under the current password, as on the sign-in page */
.ac-forgot-at { display: flex; justify-content: flex-end; margin: -4px 2px 8px; }
.ac-forgot { display: block; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; }
.ac-forgot:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* Search history on phones and from You (features/ask/History.tsx HistoryScreen): the account's screens, with a find box */
.ac-new { background: var(--btn); color: #151515; }
.ac-find { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 16px; border-radius: 24px; background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 140ms ease-out; }
.ac-find:focus-within { box-shadow: inset 0 0 0 1px var(--box-on); }
.ac-find input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; color: var(--ink); font-size: 16px; }
.ac-find input::placeholder { color: var(--faint); }
.ac-find button { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.ac-hrow { padding: 0; gap: 4px; }
.ac-hlink { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 60px; padding: 9px 0; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: opacity 120ms ease-out; }
.ac-hlink:active { opacity: 0.6; }
.ac-hlink:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.ac-hrow .ac-m b { display: flex; align-items: center; gap: 5px; }
.ac-hrow .ht-pin { flex: none; color: var(--muted); }
.ac-ht { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-dots { flex: none; width: 40px; height: 40px; margin-right: -10px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.ac-dots:active { background: var(--side); }
.ac-hist { padding-bottom: 8px; }

/* Forgot password, before anything is sent: what will happen, and to which email */
.ac-forgot-ask { display: grid; justify-items: center; gap: 4px; padding: 24px 20px 22px; text-align: center; }
.ac-forgot-ic { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; background: var(--btn); color: #151515; }
.ac-forgot-ask h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.ac-forgot-ask p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.ac-forgot-ask p:last-child { margin-top: 8px; max-width: 30ch; }
.ac-forgot-ic.red { background: var(--red-bg); color: var(--red); }
.ac-forgot-ic.ink { background: var(--side); color: var(--ink); }
.ac-goes { display: grid; gap: 4px; margin-top: 6px; padding-left: 18px; list-style: disc; font-size: 13.5px; color: var(--muted); }
/* Delete account: today, the days to come back, the day it goes; a dot per step on one line down the side */
.ac-steps { display: grid; gap: 14px; padding: 18px 18px 18px 20px; list-style: none; }
.ac-steps > li { position: relative; display: grid; gap: 2px; padding-left: 22px; font-size: 14px; line-height: 1.45; }
.ac-steps > li::before { content: ''; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--btn); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px #151515; }
.ac-steps > li:not(:last-child)::after { content: ''; position: absolute; left: 4px; top: 19px; bottom: -14px; width: 2px; background: var(--line); }
.ac-steps > li.end::before { background: var(--red); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--red); }
.ac-steps b { font-size: 14.5px; font-weight: 600; }
.ac-steps span { color: var(--muted); }
.ac-goes li::marker { color: var(--faint); }
.ac-forgot-em { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ac-step { padding: 2px 2px 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }

/* something that went wrong with the whole form (no connection, too many tries), above it */
.ac-alert { padding: 12px 14px; border-radius: 16px; background: var(--red-bg); color: var(--red); font-size: 13.5px; font-weight: 500; line-height: 1.4; }

/* the email code, the same six boxes as creating an account (11-react.css .code-boxes), in the account's card */
.ac-code { display: grid; gap: 10px; padding-bottom: 14px; text-align: center; }
.ac-code h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.ac-code-to { margin-top: -6px; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.ac-code-to b { display: block; color: var(--ink); font-weight: 600; }
.ac-code .code-box { height: 52px; padding: 0; border-radius: 14px; text-align: center; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; caret-color: var(--ink); }
.ac-code .auth-testcode { margin: 0; }
@media (max-width: 380px) { .ac-code .code-box { height: 46px; font-size: 19px; } }

/* the five drops of Send feedback: tap one (again to take it back); the chosen one stands on lime, the others fade */
.ac-rate { padding-bottom: 14px; }
.ac-rate-q { padding: 0 2px 12px; font-size: 14px; font-weight: 600; }
.ac-rate-q span { margin-left: 6px; font-weight: 400; font-size: 13px; color: var(--muted); }
.ac-faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; gap: 2px; }
/* height: auto, rows by content: an app-wide button rule held these at 54px, so the words fell out of the card */
.ac-rface { display: grid; grid-template-rows: auto auto; height: auto; min-height: 0; justify-items: center; align-content: start; gap: 6px; padding: 8px 0 6px; border-radius: 18px; color: var(--muted); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
/* no motion on the faces (asked 2026-11-09): the chosen one is simply a little bigger */
.ac-rface.on .drop { transform: scale(1.1) translateY(-2px); }
.ac-rface small { font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
/* the chosen one: on the page's tone, a little bigger, its word in ink; the others step back to grey */
.ac-rface.on { background: var(--side); color: var(--ink); }
.ac-rface.dim { opacity: 0.5; filter: grayscale(1); }
.ac-rface:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 360px) { .ac-rface small { font-size: 11px; } }

/* the page's button: straight under its card */
.ac-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: 25px; background: var(--btn); color: var(--btn-fg); font-size: 15px; font-weight: 600; text-align: center; text-decoration: none; transition: transform 140ms ease-out, opacity 140ms ease-out; touch-action: manipulation; }
.ac-go:active:not(:disabled) { transform: scale(0.98); }
.ac-go:disabled { opacity: 0.42; }
.ac-go.light { background: var(--card); color: var(--ink); }
.ac-go.red { background: var(--red); color: #fff; }
.ac-go.plain { background: none; color: var(--ink); min-height: 44px; }
.ac-go.red-text { color: var(--red); }
.ac-go:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* a radio row's tick, and a switch */
.ac-tick { flex: none; width: 22px; display: grid; place-items: center; color: var(--ink); }
.ac-sw { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); transition: background-color 180ms ease-out; }
.ac-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(21, 21, 21, 0.2); transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1); }
.ac-sw.on { background: var(--ink); }
.ac-sw.on::after { transform: translateX(18px); }
:root[data-theme="dark"] .ac-sw.on::after { background: #151515; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ac-sw.on::after { background: #151515; } }

/* leaving, and what stands in the way of deleting */
.ac-sure { display: grid; gap: 8px; padding-bottom: 12px; }
.ac-sure b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.ac-sure p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.ac-warn { padding: 16px; border-radius: 22px; background: var(--red-bg); color: var(--ink); font-size: 14px; line-height: 1.45; }
.ac-warn b { display: block; margin-bottom: 4px; font-size: 15.5px; color: var(--red); }

/* a finished step */
.ac-done { display: grid; justify-items: center; gap: 6px; padding: 26px 20px 22px; text-align: center; }
.ac-done h2 { margin-top: 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ac-done p { font-size: 14px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.ac-done p b { color: var(--ink); font-weight: 600; }

/* the feedback inbox (admins) */
.ac-inbox { max-width: 720px; }
.ac-segbar { display: flex; gap: 3px; padding: 3px; border-radius: 14px; background: var(--card); justify-self: start; }
.ac-segbar button { height: 36px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.ac-segbar button[aria-pressed="true"] { background: var(--ink); color: var(--ghost); }
.ac-fb { display: grid; gap: 6px; padding-bottom: 14px; }
.ac-fb header { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ac-fb-rate { font-weight: 500; color: var(--muted); }
.ac-fb time { flex: none; font-size: 12.5px; color: var(--muted); }
.ac-fb-text { font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-fb-who, .ac-fb-dev { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ac-fb-who a { color: var(--ink); }
.ac-fb .ac-act { justify-self: start; margin-top: 4px; }
.ac-fb.done { opacity: 0.6; }

@media (max-width: 360px) {
  .ac-title { font-size: 25px; }
  .ac-card { padding: 0 14px; }
  .ac-pad { padding: 12px 14px 4px; }
  .ac-seg label { font-size: 12.5px; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-me, .ac-go, .ac-act, .ac-sw, .ac-sw::after, .ac-in { transition: none; }
}

/* ---- Profile & settings on a big screen (account/YouWide.tsx; demo mSettings, asked 2026-11-13) ----
   A window over the page you were on, which stays drawn under it: its sections down the grey side, the open one on white.
   It rises from just below, the way the demo's modal does, and goes the same way a touch quicker. The phone's screens open
   inside it, their cards turned into the window's plain rows. */
/* the page under the window stays still (html keeps its scrollbar's room: scrollbar-gutter, so nothing moves sideways) */
html.sw-open { overflow: hidden; }
.ov.sw-ov { z-index: 60; animation: fade 0.2s ease-out; transition: opacity 160ms ease-out; }
.ov.sw-ov.out { opacity: 0; }
.sw-win { width: 100%; max-width: 920px; height: min(680px, calc(100dvh - 48px)); min-height: 420px; display: flex; flex-direction: column; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); animation: swIn 200ms cubic-bezier(0.23, 1, 0.32, 1); transition: transform 160ms ease-out, opacity 160ms ease-out; }
.sw-ov.out .sw-win { transform: scale(0.97) translateY(4px); opacity: 0; }
.sw-win:focus { outline: none; }
@keyframes swIn { from { opacity: 0; transform: scale(0.97) translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .ov.sw-ov, .sw-win { animation: none; transition: none; } }
.sw-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 14px 0 24px; border-bottom: 1px solid var(--line-2); }
.sw-top h1 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.sw-win .st-nav { overflow-y: auto; scrollbar-width: none; }
.sw-win .st-tab { text-decoration: none; }
.st-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sw-win .st-body { padding: 6px 36px 36px; scrollbar-color: color-mix(in srgb, var(--ink) 16%, transparent) transparent; }
.sw-sub { max-width: 640px; }
.sw-h { font-size: 21px; font-weight: 650; letter-spacing: -0.025em; margin: 22px 0 2px; }
.sw-back { display: inline-flex; align-items: center; gap: 4px; margin: 18px 0 0 -4px; padding: 4px 8px 4px 4px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.12s, background 0.12s; }
.sw-back:hover { color: var(--ink); background: var(--hover); }
.sw-back:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.sw-back + .sw-h { margin-top: 6px; }
.sw-me { padding: 16px 0 2px; }
.sw-win .st-row.red .st-l b, .sw-red { color: var(--red); }
.sw-win .st-r .btn { text-decoration: none; }
.st-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.st-seg button:disabled { opacity: 0.5; }
.st-seg.sw-words button { width: auto; padding: 0 12px; font-size: 13px; font-weight: 550; white-space: nowrap; }
/* the phone's screens inside the window: no cards, rows on hairlines, the action under them at its own width */
.sw-sub .ac { max-width: none; padding: 0; margin-top: 10px; display: grid; gap: 12px; }
.sw-sub .ac-card { padding: 0; border-radius: 0; background: none; }
.sw-sub .ac-pad { padding: 2px 0 0; }
.sw-sub .ac-row { min-height: 56px; border-bottom: 1px solid var(--line-2); }
.sw-sub .ac-row + .ac-row::before { display: none; }
.sw-sub .ac-group { margin-top: 10px; gap: 2px; }
.sw-sub .ac-group h2 { font-size: 15px; font-weight: 650; color: var(--ink); }
.sw-sub .ac-head { padding: 0; }
.sw-sub .ac-note { text-align: left; padding: 0; }
.sw-sub .ac-go { display: inline-flex; width: auto; min-width: 180px; min-height: 44px; justify-self: start; }
.sw-sub .ac-hist > .ac-top { display: none; }
/* a research row: its colour as the small round mark used everywhere, the crown on yours (never a full-height band) */
.sw-sub .ac-rrow { padding-left: 30px; background: radial-gradient(circle, var(--pid) 6px, transparent 6.5px) 0 50% / 14px 14px no-repeat; }
.sw-sub .ac-rrow.lead { background: var(--crown) 4px 50% / 10px no-repeat, radial-gradient(circle, var(--pid) 9px, transparent 9.5px) 0 50% / 18px 18px no-repeat; }
/* Report (features/report/ReportPage.tsx): what is reported in one line, the reasons as rows with a tick, a line to add */
.rp-what { padding: 2px 4px 4px; font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.rp-reasons { border: 0; margin: 0; padding: 4px 16px; }
.rp-reasons legend { float: left; width: 100%; padding: 10px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rp-reasons legend + .ac-row::before { display: none; }
.rp-reasons .ac-row { cursor: pointer; }
.rp-reasons input { position: absolute; opacity: 0; pointer-events: none; }
.rp-reasons .ac-row:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.rp-tick { flex: none; color: var(--ink); opacity: 0; transition: opacity 140ms ease-out; }
.rp-reasons .ac-row.on .rp-tick { opacity: 1; }
.rp-reasons .ac-row.on .ac-m b { font-weight: 600; }
.rp-opt { font-weight: 400; color: var(--muted); }

/* the usage switch (YouWide TrackSwitch): only the switch is the button, so the row's words stay plain text */
.ac-swb { flex: none; display: inline-flex; padding: 4px; margin: -4px; border: 0; background: none; cursor: pointer; border-radius: 16px; }
.ac-swb:disabled { cursor: default; opacity: 0.6; }
/* The Library (features/library, Demo/library-options.html A + L3). The page is the research home's grey; shelves and papers
   are white cards with painted lines between rows (never a shadow: it left a hairline at browser zoom). */

.app.own-top:has(.ka.on .lb) { background: var(--side); }
.app.own-top:has(.ka.on .lb) .main { background: var(--side); }
.lb { max-width: 620px; margin: 0 auto; display: grid; grid-auto-rows: max-content; gap: 10px; padding-bottom: 96px; }
.lb-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.lb-h { margin: 6px 2px 0; font-size: 28px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; overflow-wrap: anywhere; }
.lb-sub { margin: -6px 2px 4px; font-size: 13px; color: var(--muted); }
/* a research's shelf wears its colour as the small mark before its name, as everywhere */
.lb-mark::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 10px; border-radius: 50%; background: var(--pid); vertical-align: 0.12em; }

/* the search box is the History page's pill (20-account.css .ac-find) */
.lb .ac-find input::-webkit-search-cancel-button { display: none; }

.lb-card { min-width: 0; border-radius: 22px; background: var(--card); padding: 2px 16px; }
.lb-label { margin: 8px 2px 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lb-none { padding: 20px 4px; font-size: 14px; color: var(--muted); }
.lb-card .lb-none { padding: 14px 0; }

/* a shelf */
.lb-shelf { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.lb-shelf:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* research shelves: one white card, each row with its research's colour strip down the left (the card's corners clip them),
   the same as the picker in Chats and Tasks; a grey line between rows from the words to the edge */
.lb-rcards { padding: 0; overflow: hidden; }
.lb-own { position: relative; min-height: 60px; padding: 8px 14px 8px 36px; background: linear-gradient(90deg, var(--pid) 22px, var(--card) 22px); }
.lb-own + .lb-own::before { content: ""; position: absolute; top: 0; left: 36px; right: 14px; height: 1px; background: var(--line); }

/* Saved from search: a soft lime tile holding a small pile of papers, the front one bookmarked */
.lb-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); display: grid; place-items: center; }
.lb-pile .s3 { fill: var(--btn); }
.lb-pile .s2 { fill: color-mix(in srgb, var(--btn) 45%, var(--card)); }
.lb-pile .s1 { fill: var(--card); stroke: var(--ink); stroke-width: 2.6; }
.lb-pile .ln { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; opacity: 0.3; }
.lb-pile .bm { fill: var(--ink); }
.lb-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.lb-t b { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.lb-t small { font-size: 12px; color: var(--muted); }
.lb-n { flex: none; min-width: 1ch; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; text-align: right; }
.lb-go { flex: none; color: var(--muted); }

/* a paper: tapped, it opens in place */
.lb-p + .lb-p, .lb-p + .lb-gone, .lb-gone + .lb-p, .lb-gone + .lb-gone { background: linear-gradient(var(--line-2), var(--line-2)) top / 100% 1px no-repeat; }
.lb-ph { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.lb-ph:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.lb-ph .tk-chev { align-self: center; }
.lb-p.open .lb-ph .tk-chev { transform: rotate(180deg); }
.lb-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lb-ti { font-size: 13.5px; font-weight: 500; line-height: 1.32; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-p.open .lb-ti { -webkit-line-clamp: unset; display: block; }
.lb-by { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.lb-from, .lb-in { margin-top: 2px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.lb-from { color: var(--muted); }
.lb-in { font-weight: 500; }
.lb-in::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--pid); flex: none; }
.lb-more { display: grid; gap: 8px; padding: 0 0 12px; }
.lb-ask { font-size: 13px; color: var(--muted); }
.lb-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.lb-acts .tk-act { gap: 6px; text-decoration: none; }
.lb-open { background: var(--ink); color: var(--card); }
.lb-gone { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 0; font-size: 13px; color: var(--muted); }
.lb-gone span { flex: 1; min-width: 0; }
.lb-gone button { flex: none; height: 32px; padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---- the Library on a big screen: as Chats and Tasks (styles/19-chats.css .cw), the shelves on white | the open shelf on grey ---- */
.lw-sub { margin: -6px 18px 10px; font-size: 13px; color: var(--muted); }
/* a shelf's mark: its research's own colour, big enough to read, the leader's crown in it; no box round it */
.lw-slot { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; }
.lw-mark { width: 24px; height: 24px; border-radius: 50%; background: var(--pid); }
.lw-mark.lead { background: var(--crown) center / 14px no-repeat, var(--pid); }
.lw-pile { background: var(--brand-soft); }
.lw .cl-row.on .lw-pile { background: color-mix(in srgb, var(--btn) 40%, var(--card)); }
.lw-pile .lb-pile { width: 26px; height: 23px; }
.lw-shelf .m { flex: 1; min-width: 0; }
.lw-n { flex: none; min-width: 24px; font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; }
.lw-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--side); }
.lw-ph { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 12px 32px; border-bottom: 1px solid var(--line); }
.lw-ph > div { min-width: 0; }
.lw-ph h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-ph h2.lb-mark::before { width: 20px; height: 20px; margin-right: 10px; vertical-align: -0.2em; }
.lw-ph h2.lb-mark.lead::before { background-size: 12px, auto; }
.lw-ph p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.lw-goto { flex: none; gap: 6px; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--card); }
.lw-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 16%, transparent) transparent; }
.lw-body { flex: 1 0 auto; width: 100%; max-width: 880px; margin: 0 auto; padding: 24px 32px 40px; display: grid; gap: 14px; align-content: start; }
.lw-body:has(> .lb-empty) { align-content: center; }
.lw-body .lb-find { background: var(--card); }
/* each paper its own soft card, a small sheet beside its title; it lifts a little under the pointer */
.lw-body .lb-list { display: grid; gap: 8px; padding: 0; background: none; border-radius: 0; }
.lw-body .lb-list > .lb-p, .lw-body .lb-list > .lb-gone { background: var(--card); border-radius: 18px; padding: 0 18px; box-shadow: 0 1px 2px rgb(21 21 21 / 0.04); transition: box-shadow 0.16s ease; }
.lw-body .lb-list > .lb-gone { padding: 4px 18px; }
@media (hover: hover) and (pointer: fine) { .lw-body .lb-list > .lb-p:hover { box-shadow: 0 0 0 1px var(--line), 0 10px 24px -16px rgb(21 21 21 / 0.28); } }
.lw-body .lb-list > .lb-p.open { box-shadow: 0 0 0 1px var(--line), 0 10px 24px -16px rgb(21 21 21 / 0.28); }
.lw-body .lb-ph { gap: 14px; padding: 14px 0; }
.lw-body .lb-ph::before { content: ""; flex: none; width: 40px; height: 46px; border-radius: 10px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 15.5h6M9 9h2.5' opacity='.55'/%3E%3C/svg%3E") center / 20px no-repeat; }
.lw-body .lb-ti { font-size: 15px; }
.lw-body .lb-more { padding: 0 0 16px 54px; }
/* an empty shelf: the drop at work, what goes here, and the way to fill it (phone and big screen) */
.lb-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; }
.lb-empty b { margin-top: 12px; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.lb-empty p { max-width: 40ch; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.lb-empty-go { margin-top: 12px; gap: 6px; height: 42px; padding: 0 18px; border-radius: 21px; text-decoration: none; }
/* Paper search chat, picked 2026-11-09 (Demo/search-chat-final.html): quotes as quotes (C), the steps with room (S1),
   Like / Dislike / Copy / Save with Ask next as bubbles (E3), and on phones the Papers card that grows out of the top
   bar's book button (3). Colours and type are the site's own tokens. */

/* ---- the live line: an iPhone alarm-clock wheel (Answer.tsx RollLine) ---- */
.sb-txt { perspective: 360px; }
.roll { display: grid; height: 22px; overflow: hidden; }
.roll-l { grid-area: 1 / 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 22px; transform-origin: 50% 50% -11px; backface-visibility: hidden; }
.sb.live .roll-l { color: var(--ink); font-weight: 500; }
/* words: the new line comes up from below as the old one turns away above, like a drum */
.roll-l.in { animation: rollIn 0.3s var(--ease-out) both; }
.roll-l.out { animation: rollOut 0.3s var(--ease-out) both; }
@keyframes rollIn { from { transform: translateY(70%) rotateX(-70deg); opacity: 0; } }
@keyframes rollOut { to { transform: translateY(-70%) rotateX(70deg); opacity: 0; } }
/* numbers: each place its own wheel (0-9 twice), turned by a spring in Answer.tsx Wheel */
.odo { display: inline-flex; font-variant-numeric: tabular-nums; }
.odo-w { display: inline-block; height: 22px; overflow: hidden; }
.odo-c { display: block; line-height: 22px; text-align: center; will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .roll-l.in { animation: rollFade 0.2s ease both; }
  .roll-l.out { animation: rollFade 0.2s ease reverse both; }
}
@keyframes rollFade { from { opacity: 0; } }

/* ---- the steps ---- */
.tl-s { padding-bottom: 16px; }
.tl-dot { background: var(--btn); color: var(--btn-fg); }
.tl-s.now .tl-dot { background: transparent; }
.tl-dbs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tl-dbs li { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.tl-dbs li > span:first-child { flex: none; width: 92px; }
.tl-dbs li.off > span:first-child { width: auto; color: var(--muted); } /* "OpenAlex did not answer": words, no bar */
.tl-bar { flex: 0 1 110px; min-width: 24px; height: 6px; }
.tl-bar i { display: block; height: 100%; min-width: 6px; border-radius: 3px; background: var(--data); }
.tl-dbs b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.tl-ps { margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.tl-ps li { display: block; font-size: 13px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.tl-ps li.more { color: var(--muted); }
.tl-dbs li > span:first-child { width: 86px; }
.tl-dbs b { min-width: 0; white-space: nowrap; }
/* phones: the steps open under the drop (11-react.css pulls them 40px left); each tick stands centred under the drop and
   the steps' words start where the summary line's words do, one straight edge down (measured 2026-11-09) */
@media (max-width: 640px) {
  .qa-ai .tl-s { gap: 16px; }
  .qa-ai .tl-dot { margin-left: 4px; }
  .qa-ai .tl-s:not(:last-child)::before { left: 14.25px; }
}

/* a line before the answer: "Hi!", "Showing results for …", or that papers can't replace a doctor */
.qa-lead { font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* ---- the answer: each finding a quote, its paper under it ---- */
.qa-q { margin: 0; }
.qa-q p { font-size: 16px; line-height: 1.55; font-weight: 500; letter-spacing: -0.005em; }
.qa-q p::before { content: "\201C"; color: var(--muted); font-weight: 600; }
.qa-q p::after { content: "\201D"; color: var(--muted); font-weight: 600; }
.qa-q footer { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.qa-src { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; max-width: 100%; text-align: left; font-size: 12.5px; line-height: 1.35; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.qa-src i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); font-style: normal; font-size: 11px; font-weight: 600; }
.qa-src span { min-width: 0; }
@media (hover: hover) and (pointer: fine) { .qa-src:hover span { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.qa-src:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* ---- Like, Dislike, Copy, Save ---- */
.qa-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.qa-act { height: 40px; padding: 0 14px; border-radius: 20px; background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background 0.18s ease, color 0.18s ease; }
.qa-act.qa-r { width: 40px; padding: 0; justify-content: center; }
.qa-act.on { background: var(--ink); color: var(--card); }
.qa-act.on .ico .df { fill: var(--btn); opacity: 1; }
.qa-act:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .qa-act:not(.on):hover { background: var(--hover); } }
/* its card is open (Dislike asking, or Save): a ring, not the dark "done" fill; paused for too many taps: faded */
.qa-act.asking { box-shadow: inset 0 0 0 1.5px var(--ink); }
.qa-act[aria-disabled="true"] { opacity: 0.45; }

/* Save: opens in place (ChatMenu SaveTo). Only my Library, then each research with its colour strip down the left, as
   in the research picker on Tasks and Chats */
.qa-save .rp-save-list { margin: 0; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.qa-save .rp-save-list li { position: relative; }
.qa-save .rp-save-list li + li { border-top: 0; }
.qa-save .rp-save-list li + li::before { content: ""; position: absolute; top: 0; left: 36px; right: 14px; height: 1px; background: var(--line); }
.qa-save .rp-save-list button { min-height: 50px; padding: 8px 14px 8px 36px; font-size: 14px; background: linear-gradient(90deg, var(--pid) 22px, transparent 22px); }
.qa-save .rp-save-list button.lib { --pid: var(--btn); font-weight: 600; }
.qa-save .rp-save-list button::before, .qa-save .rp-save-list button.lib::before { display: none; }
.qa-save .rp-save-list button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.qa-save-note { font-size: 13px; line-height: 1.45; color: var(--muted); }
.qa-save-btn { height: 38px; padding: 0 16px; border-radius: 19px; background: var(--side); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; }
.qa-save-btn.go { background: var(--btn); color: var(--btn-fg); }
/* under a paper in Papers, and above the bar for the ticked ones */
.rc .qa-why-win { margin-top: 0; }
.rc .qa-why { padding: 12px 0 0; background: none; }
.refs-selw .qa-why-win { margin-top: 0; }
.refs-selw .qa-why { margin: 0 12px 10px; box-shadow: 0 0 0 1px var(--line); }

.qa-thanks { font-size: 12.5px; color: var(--muted); opacity: 0; transition: opacity 0.2s ease; }
.qa-thanks.on { opacity: 1; }

/* Dislike's card opens right under the buttons: fast and smooth both ways, the same curve the site's drawers use;
   the page under it moves down with it, nothing jumps */
.qa-why-win { display: grid; grid-template-rows: 0fr; margin-top: -16px; transition: grid-template-rows 0.26s var(--ease-drawer); }
.qa-why-win.open { grid-template-rows: 1fr; }
.qa-why-in { min-height: 0; overflow: hidden; }
.qa-why { margin-top: 10px; padding: 14px; border-radius: 20px; background: var(--card); display: grid; gap: 10px; opacity: 0; transform: translateY(-6px); transition: opacity 0.16s ease, transform 0.26s var(--ease-drawer); }
.qa-why-win.open .qa-why { opacity: 1; transform: none; transition-delay: 0.04s, 0s; }
.qa-why > b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.qa-why-ch { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-why-ch button { height: 34px; padding: 0 12px; border-radius: 17px; background: var(--side); color: var(--ink); font-size: 12.5px; font-weight: 500; transition: background 0.15s ease, color 0.15s ease; -webkit-tap-highlight-color: transparent; }
.qa-why-ch button.on { background: var(--ink); color: var(--card); }
.qa-why-tx { height: 42px; width: 100%; padding: 0 12px; border: 0; border-radius: 14px; background: var(--side); color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.qa-why-tx::placeholder { color: var(--faint); }
.qa-why-tx:focus { box-shadow: inset 0 0 0 1px var(--box-on); }
.qa-why-bt { display: flex; justify-content: flex-end; gap: 8px; }
.qa-why-bt button { height: 38px; padding: 0 16px; border-radius: 19px; background: var(--side); color: var(--ink); font-size: 13px; font-weight: 600; }
.qa-why-bt button.go { background: var(--btn); color: var(--btn-fg); }
.qa-why button:focus-visible, .qa-why-bt button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- Ask next: ready to send, on the right like your own messages ---- */
.qa-h { font-size: 13px; color: var(--ink-2); margin-bottom: -8px; }
.qa-next { display: grid; justify-items: end; gap: 8px; }
.qa-next button { max-width: 92%; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 18px; background: var(--card); color: var(--ink); font-size: 14px; line-height: 1.4; text-align: left; -webkit-tap-highlight-color: transparent; }
.qa-next button .ico { flex: none; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .qa-next button:hover { background: var(--hover); } }
.qa-next button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- a paper ---- */
.rc h3 { font-size: 15.5px; font-weight: 600; line-height: 1.32; }
.rc-by { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.rc-by b { font-weight: 500; color: var(--ink-2); }
.rc-key { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rc .rc-foot { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 10px 0 0; }
.rc .rc-tag { height: 24px; margin: 0; padding: 0 9px; border-radius: 12px; background: var(--side); color: var(--ink-2); font-size: 11.5px; }
.rc .rc-tag.free { background: var(--green-bg); color: var(--green); }
.rc-sp { flex: 1; }
.rc .rc-save { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; justify-content: center; background: var(--side); }
.rc .rc-save.on, .rc .rc-save.saved { background: var(--btn); color: var(--btn-fg); }
/* the Save list: each place that holds the paper says Saved on its right, with a Remove for one you may take out */
.qa-save .rp-save-list li { display: flex; align-items: center; }
.qa-save .rp-save-list li > button:first-child { flex: 1; min-width: 0; }
.qa-save .rp-save-list .sv-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-state { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; pointer-events: none; }
.sv-on { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 13px; background: var(--brand-soft); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.qa-save .rp-save-list .sv-rm { pointer-events: auto; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--muted); transition: background 0.12s, color 0.12s; }
.qa-save .rp-save-list .sv-rm:hover { background: var(--red-bg); color: var(--red); }
.qa-save .rp-save-list .sv-rm:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
/* the name gives way to what stands on the right, never runs under it */
.qa-save .rp-save-list li:has(.sv-state) > button:first-child { padding-right: 130px; }
.rc-open { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--ink); color: var(--card); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.rc-open:focus-visible, .rc .rc-save:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rc-ck { border-radius: 50%; width: 24px; height: 24px; }

/* ---- phones: Papers is its own full page over the chat (/c/:id/papers); it slides like every page (shell/AppRouter) ---- */
.refs-ov.refs-page { animation: none; align-items: stretch; background: var(--card); }
.refs-page .refs.sheet { animation: none; height: auto; flex: 1; border-radius: 0; padding: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) 0 var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)); overflow: hidden; will-change: auto; }
.refs-gh { flex: none; }
.refs-gt { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 12px 12px 6px; text-align: center; }
.refs-gn { display: grid; min-width: 0; }
.refs-gn h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.refs-gt .nf-bk { background: var(--side); }
.refs-tools { display: flex; align-items: center; gap: 8px; padding: 6px 16px 10px; }
.refs-chip { position: relative; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--side); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; -webkit-tap-highlight-color: transparent; transition: background 0.15s ease, color 0.15s ease; }
.refs-chip.on { background: var(--ink); color: var(--card); }
/* Papers' sort: All research's popup (ui/SortMenu), at the chips' size; shut it is a grey chip, open a white card */
.refs-tools .pa-sort { height: 36px; }
.refs-tools .pa-sb { height: 36px; padding: 0 12px; border-radius: 18px; background: var(--side); font-size: 13px; font-weight: 600; transition: background 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.refs-tools .pa-sort.open .pa-sb { background: var(--card); }
.refs-tools .pa-sm { padding-top: 36px; border-radius: 18px; clip-path: inset(0 0 calc(100% - 36px) 0 round 18px); }
.refs-tools .pa-sort.open .pa-sm { clip-path: inset(0 0 0 0 round 18px); }
.refs-tools .pa-sm button { height: 40px; padding: 0 12px; font-size: 13.5px; }
.refs-sortc select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; }
.refs-sortc select:focus-visible { outline: none; }
.refs-sortc:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.refs-page .refs-list { padding: 0 16px 20px; }
.refs-page .rc { padding: 14px 0; border-bottom: 0; }
.refs-page .rc + .rc { border-top: 1px solid var(--line-2); }
.refs-page .rc.sel { background: none; }
.refs-page .refs-sel { padding: 10px 12px 10px 18px; }
/* The leader's crown (picked 2026-11-09, Demo/leader-badge-options.html C): wherever a research shows, the ones you lead
   carry a small crown inside their own colour mark. The dot grows just enough to hold it; a strip gets it in its middle.
   Research you are a member of keep the plain mark. Nothing else changes. Crown images: --crown in 01-tokens-base.css. */

/* dots: one size up, the crown in the middle */
.pp-mark.lead::before, .lb-mark.lead::before, .dh-pc-n.lead::before, .rp-save-list button.lead::before {
  width: 17px; height: 17px; background: var(--crown) center / 10px no-repeat, var(--pid);
}
.pp-mark.lead::before { margin-right: 6px; vertical-align: -0.2em; }
.lb-mark.lead::before { width: 21px; height: 21px; margin-right: 10px; vertical-align: -0.12em; background-size: 12px, auto; }
.dh-pc-n.lead::before { transform: none; }
.nn-go small.lead::before { width: 17px; height: 17px; vertical-align: -0.3em; background: var(--crown) center / 10px no-repeat, var(--pid); }
.tk-mark.lead { width: 17px; height: 17px; background: var(--crown) center / 10px no-repeat, var(--pid); }
.lb-in.lead::before { width: 16px; height: 16px; background: var(--crown) center / 10px no-repeat, var(--pid); }
.rp-name.lead::before { width: 22px; height: 22px; vertical-align: -0.1em; background: var(--crown) center / 13px no-repeat, var(--pid); }
.tr .rp-name.lead::before { width: 17px; height: 17px; vertical-align: -0.12em; background-size: 10px, auto; }

/* strips (the 22px colour band at a row's left): the crown sits in the band's middle */
.tk-pick.own.lead { background: var(--crown) 6px 50% / 10px no-repeat, linear-gradient(90deg, var(--pid) 22px, var(--card) 22px); }
.ac-rrow.lead { background: var(--crown) 6px 50% / 10px no-repeat, linear-gradient(90deg, var(--pid) 22px, var(--card) 22px); }
.lb-own.lead { background: var(--crown) 6px 50% / 10px no-repeat, linear-gradient(90deg, var(--pid) 22px, var(--card) 22px); }
.qa-save .rp-save-list button.lead { background: var(--crown) 6px 50% / 10px no-repeat, linear-gradient(90deg, var(--pid) 22px, transparent 22px); }
/* ---------- Loading skeletons (ui/Skeleton.tsx) ----------
   Quiet blocks in the ink at a low mix, so they sit right on every ground (side, ghost, card) in both themes. They fade in
   after 180ms (a fast answer never flashes them) and one soft sheen sweeps all of them together, on the compositor. */
.sk { display: flex; flex-direction: column; gap: 18px; animation: sk-in 0.32s cubic-bezier(0.23, 1, 0.32, 1) 0.18s both; }
.sk-b { position: relative; overflow: hidden; isolation: isolate; }
i.sk-b { display: block; background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 14px; }
.sk-b::after {
  content: ""; position: absolute; inset: 0; translate: -100% 0;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--card) 55%, transparent) 50%, transparent 80%);
  animation: sk-sheen 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.sk-top { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.sk-top .sk-dot:last-child { margin-left: auto; }
.sk-dot { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.sk-lines { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.sk-top .sk-lines { flex: 0 1 140px; }
.sk-l1 { height: 13px; width: 72%; border-radius: 7px; }
.sk-l2 { height: 11px; width: 46%; border-radius: 6px; }
.sk-hero { height: min(46vh, 340px); border-radius: 24px; }
.sk-rows { display: flex; flex-direction: column; gap: 10px; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.sk-av { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-card { height: 132px; border-radius: 20px; }
.sk-card:first-child { grid-column: 1 / -1; height: 200px; }
@media (min-width: 901px) { .sk { max-width: 880px; } .sk-hero { height: 300px; } }

/* a Bone (ui/Bone.tsx): a bar inside the real element, in its line, so the element keeps its height when the words come */
i.sk-t { display: inline-block; vertical-align: -0.1em; height: 0.82em; max-width: 100%; border-radius: 6px; animation: sk-in 0.32s cubic-bezier(0.23, 1, 0.32, 1) 0.18s both; }
.sk-in-place { pointer-events: none; }

@keyframes sk-in { from { opacity: 0; } }
@keyframes sk-sheen { 60%, 100% { translate: 100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .sk { animation: sk-in 0.2s ease 0.18s both; }
  .sk-b::after { animation: none; display: none; }
}
/* ---------- The admin panel (features/admin; Demo/admin-pc-v2.html) ----------
   Big screens only. Its own sidebar on the side tone, pages on the page tone, white cards and tables with hairline rows.
   Only the site's tokens, so dark mode follows. Class names start with ops- (never ad-: ad blockers hide those). */
.ops { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: var(--ghost); }
.ops-wait { min-height: 100vh; background: var(--ghost); }
.ops-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 12px; background: var(--side); }
.ops-brand { display: flex; align-items: center; gap: 9px; padding: 2px 10px 14px; }
.ops-brand b { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.ops-brand small { margin-left: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.ops-places { display: flex; flex-direction: column; gap: 2px; }
.ops-nav { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); font-size: 14px; text-decoration: none; transition: background 0.15s, color 0.15s; }
.ops-nav .ico { color: var(--muted); flex: none; }
.ops-nav:hover { background: color-mix(in srgb, var(--ink) 6%, var(--side)); color: var(--ink); }
.ops-nav.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.ops-nav.on .ico { color: var(--ink); }
.ops-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ops-nav .n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--ghost); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ops-sp { flex: 1; }
.ops-back { color: var(--muted); }
.ops-me { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px; border-top: 1px solid var(--line); font-size: 13px; min-width: 0; }
.ops-me span:last-child { min-width: 0; }
.ops-me b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-me small { display: block; font-size: 11.5px; color: var(--muted); }
.ops-main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.ops-top { position: sticky; top: 0; z-index: 5; flex: none; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--card); }
.ops-top h1 { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.ops-note { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ops-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ops-body { flex: 1; padding: 24px 28px 40px; display: grid; gap: 18px; align-content: start; min-width: 0; }
/* the parts every admin page is made of */
.ops-seg button, .ops-seg .pa-seg-ink > span { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 15px; }
.ops-seg .ops-count { margin-left: 2px; font-size: 11.5px; font-weight: 700; }
.ops-find { display: flex; align-items: center; gap: 8px; width: 260px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--side); color: var(--muted); box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 140ms ease-out, background-color 140ms ease-out; }
.ops-find:focus-within { background: var(--card); box-shadow: inset 0 0 0 1px var(--box-on); }
.ops-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; }
.ops-find input::placeholder { color: var(--faint); }
.ops-card { background: var(--card); border-radius: 18px; padding: 18px 20px; min-width: 0; }
.ops-card h2, .ops-pane h2 { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 650; }
.ops-card h2 small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.ops-pane h3 { margin: 6px 0 -4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ops-empty { padding: 14px 0; font-size: 13.5px; color: var(--muted); }
.ops-tablebox .ops-empty { padding: 18px 16px; }
.ops-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.ops-tablebox { background: var(--card); border-radius: 18px; overflow: hidden; min-width: 0; }
.ops-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ops-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ops-table td { height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-table tbody tr:last-child td { border-bottom: 0; }
.ops-table tbody tr { cursor: pointer; transition: background 0.12s; }
.ops-table tbody tr:hover { background: var(--hover); }
.ops-table tbody tr.ops-on { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.ops-table tbody tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ops-table td.ops-m { color: var(--muted); }
.ops-table td.ops-num { font-variant-numeric: tabular-nums; }
.ops-table .ops-bad, .ops-kv .ops-bad { color: var(--red); font-weight: 600; }
.ops-skel td span { display: block; height: 14px; border-radius: 7px; }
.ops-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ops-who .av { flex: none; }
.ops-who-t { min-width: 0; display: grid; }
.ops-who-t b, .ops-who-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-who-t b { font-weight: 550; }
.ops-who-t small { font-size: 12px; color: var(--muted); }
.ops-more { display: block; width: 100%; height: 44px; border-top: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink); transition: background 0.12s; }
.ops-more:hover { background: var(--hover); }
.ops-pane { position: sticky; top: 88px; background: var(--card); border-radius: 18px; padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.ops-pane-hd { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ops-pane-hd .av { flex: none; }
.ops-pane-hd span:last-child { min-width: 0; display: grid; }
.ops-pane-hd b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-pane-hd small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 16px; font-size: 13px; }
.ops-kv dt { color: var(--muted); }
.ops-kv dd { overflow-wrap: anywhere; }
.ops-rows { display: grid; }
.ops-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; min-width: 0; }
.ops-rows > .ops-row:first-child, .ops-card h2 + .ops-row { border-top: 0; }
.ops-row.sk-b { min-height: 54px; border-radius: 10px; }
.ops-row-t { flex: 1; min-width: 0; display: grid; }
.ops-row-t b, .ops-row-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-row-t b { font-weight: 550; }
.ops-row-t small { font-size: 12.5px; color: var(--muted); }
.ops-row .btn { flex: none; text-decoration: none; }
.ops-mk { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--pid); }
.ops-leaving, .ops-deleted, .ops-invites { max-width: 820px; }
/* Users' columns as shares of the table; on a smaller computer the pane narrows and "On" steps out (the pane says it) */
.ops-users .ops-c-joined { width: 17%; }
.ops-users .ops-c-seen { width: 15%; }
.ops-users .ops-c-n { width: 11%; }
.ops-users .ops-c-on { width: 15%; }
.ops-research .ops-c-lead { width: 14%; }
.ops-research .ops-c-n { width: 7%; }
.ops-research .ops-c-where { width: 22%; }
.ops-research .ops-c-msg { width: 9%; }
.ops-research .ops-c-last { width: 11%; }
@media (max-width: 1200px) {
  .ops-research .ops-c-msg { width: 0; }
  .ops-research .ops-msg-col { display: none; }
  .ops-research .ops-c-where { width: 24%; }
  .ops-split { grid-template-columns: minmax(0, 1fr) 300px; }
  .ops-users .ops-c-joined { width: 21%; }
  .ops-users .ops-c-seen { width: 19%; }
  .ops-users .ops-c-n { width: 14%; }
  .ops-users .ops-c-on { width: 0; }
  .ops-users .ops-on-col { display: none; }
}
/* rows that open nothing yet: no pointer, no hover */
.ops-table tbody tr.ops-still { cursor: default; }
.ops-table tbody tr.ops-still:hover { background: none; }
.ops-table tbody tr.ops-still.ops-on, .ops-table tbody tr.ops-still.ops-on:hover { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.ops-say { margin: 8px 0 4px; font-size: 16px; color: var(--ink-2); }
.ops-say b { color: var(--ink); font-weight: 650; }
.ops-state { flex: none; font-size: 12.5px; font-weight: 600; color: var(--muted); }
/* Overview */
.ops-lead { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.4; max-width: 64ch; min-height: 1.4em; }
.ops-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ops-chart { height: 160px; margin-top: 24px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line); }
.ops-chart i { flex: 1; position: relative; background: var(--data); border-radius: 6px 6px 0 0; }
.ops-chart i.now { background: var(--ink); }
.ops-chart i em { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ops-days { display: flex; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--faint); }
.ops-days span { flex: 1; text-align: center; }
.ops-link { color: var(--ink); text-decoration: none; border-radius: 10px; transition: background 0.12s; }
.ops-link:hover { background: var(--hover); }
.ops-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ops-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--side); display: grid; place-items: center; color: var(--ink-2); }
.ops-chev { flex: none; color: var(--faint); }
/* Feedback */
.ops-fb { max-width: 920px; }
.ops-fb > .ops-row:first-child, .ops-fb > .ops-say + .ops-row { border-top: 0; }
.ops-fb a { color: var(--ink); }
.ops-fbrow .av { flex: none; }
/* not for this person, or not on this screen */
.ops-away { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--ghost); }
.ops-away h1 { margin-top: 6px; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.ops-away p { max-width: 40ch; color: var(--muted); }
.ops-away .btn { margin-top: 8px; text-decoration: none; }
/* Safety (SafetyPage.tsx) and Block, asked in place */
.ops-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-acts .btn { text-decoration: none; }
.btn.ops-red { color: var(--red); }
.ops-pane-ttl { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.ops-reports { padding: 6px 12px; }
.ops-rep { width: 100%; padding: 6px 8px; text-align: left; font: inherit; color: inherit; }
.ops-rep.on { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.ops-rows > .ops-rep + .ops-rep { border-top: 1px solid var(--line-2); }
.ops-state.ops-new { color: var(--red); }
.ops-ask { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--side); }
.ops-ask p { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ops-field { display: grid; gap: 6px; font-size: 13px; min-width: 0; }
.ops-field > span { font-weight: 600; color: var(--ink-2); }
.ops-field small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ops-field select, .ops-field textarea { width: 100%; min-width: 0; padding: 9px 12px; border: 0; border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 140ms ease-out; }
.ops-lock .ops-field select, .ops-lock .ops-field textarea { background: var(--side); box-shadow: inset 0 0 0 1px transparent; }
.ops-field select:focus, .ops-field textarea:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--box-on); }
.ops-field select { height: 40px; padding: 0 12px; }
.ops-field textarea { resize: vertical; line-height: 1.45; }
.ops-lock { max-width: 620px; display: grid; gap: 14px; }
.ops-lock.sk-b { min-height: 320px; }
.ops-lock > .ops-m { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ops-tick { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.ops-tick input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); }
.ops-open { max-width: 820px; display: grid; gap: 14px; }
.ops-warn { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--red) 9%, var(--card)); color: var(--ink); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ops-msgs { display: grid; gap: 2px; max-height: 56vh; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.ops-msg { display: flex; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; text-align: left; font: inherit; color: var(--ink); transition: background 0.12s; }
.ops-msg:not(:disabled):hover { background: var(--hover); }
.ops-msg.on { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.ops-msg.flag .ops-msg-t > span { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent); }
.ops-msg:disabled { cursor: default; }
.ops-msg:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ops-msg .av { flex: none; }
.ops-msg-t { min-width: 0; display: grid; gap: 3px; justify-items: start; }
.ops-msg-t small { font-size: 12px; color: var(--muted); }
.ops-msg-t > span { padding: 7px 11px; border-radius: 14px; background: var(--side); font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 64ch; }
.ops-msg-t > span.ops-m { color: var(--muted); font-style: italic; background: none; padding-left: 0; }
.ops-file { display: inline-flex; align-items: center; gap: 5px; }
.ops-record .ops-c-when { width: 13%; }
.ops-record .ops-c-admin { width: 15%; }
.ops-record .ops-c-did { width: 22%; }

/* ---- Send to users (SendPage) and Feedback Reply ---- */
.ops-send > .ops-card { display: grid; gap: 14px; }
.ops-field input:not([type=checkbox]) { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--side); color: var(--ink); font: inherit; font-size: 13.5px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 140ms ease-out; }
.ops-field input:not([type=checkbox]):focus { outline: 0; box-shadow: inset 0 0 0 1px var(--box-on); }
.ops-send .ops-field select, .ops-send .ops-field textarea { background: var(--side); box-shadow: inset 0 0 0 1px transparent; }
.ops-send .ops-field select:focus, .ops-send .ops-field textarea:focus { box-shadow: inset 0 0 0 1px var(--box-on); }
.ops-send .ops-seg { justify-self: start; }
.ops-where { display: grid; gap: 10px; }
.ops-opt { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; }
.ops-opt b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ops-opt small { display: block; }
.ops-opt.off b { color: var(--muted); }
.ops-opt .ac-sw { flex: none; margin-top: 2px; }
.ops-pick .ops-find { justify-self: stretch; }
.ops-pick-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding: 4px 2px; }
.ops-pick-list small { color: var(--muted); }
.ops-see { display: grid; gap: 10px; }
.ops-see h2 { font-size: 15px; font-weight: 650; }
.ops-see h3 { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.ops-bellrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--side); }
.ops-bellrow > span:last-child { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.ops-bellrow b { font-size: 14px; font-weight: 600; }
.ops-bellrow small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ops-push { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--side); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ops-push b { font-weight: 600; }
.ops-push span { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ops-see > .ops-m { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ops-sent td b { font-weight: 600; overflow-wrap: anywhere; }
.ops-sent td .btn { margin-left: 6px; }
.ops-fbwrap { flex-wrap: wrap; }
.ops-fbans, .ops-fbreply { flex: 1 0 100%; }
.ops-fbans { font-size: 12.5px; line-height: 1.45; color: var(--muted); padding-left: 44px; }
.ops-fbreply .ops-field textarea { background: var(--card); }
.ops-sent th:first-child { width: 34%; }

/* ---- Usage and Paper search (UsagePage, SearchPage; demo screens 12–14) ---- */
.ops-bars { display: grid; gap: 2px; margin-top: 12px; }
.ops-hb { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 34px; font-size: 13px; }
.ops-hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-hb-bar { height: 10px; border-radius: 5px; background: var(--side); overflow: hidden; }
.ops-hb-bar i { display: block; height: 100%; border-radius: 5px; background: var(--data); }
.ops-hb-n { min-width: 48px; text-align: right; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ops-road { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ops-road li { padding: 14px; border-radius: 14px; background: var(--ghost); min-width: 0; display: grid; align-content: start; gap: 2px; }
.ops-road b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.ops-road small { font-size: 12.5px; color: var(--muted); }
.ops-road em { margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ops-road em.bad { color: var(--red); }
.ops-connect { display: grid; gap: 12px; max-width: 72ch; font-size: 14px; color: var(--ink-2); }
.ops-connect dt { color: var(--ink); font-weight: 600; }
.ops-again { margin-left: auto; }
.ops-state.bad { color: var(--red); }
.ops-body > .ops-card + .ops-card { margin-top: 18px; }

/* ---- System (SystemPage; demo screens 15–16) ---- */
.ops-sayrow { display: flex; align-items: center; gap: 12px; max-width: none; margin-bottom: 14px; }
.ops-note-line { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.ops-hb-bar i.bad { background: var(--red); }
.ops-errors th:first-child { width: 36%; }
.ops-errors th:nth-child(2) { width: 22%; }
.ops-errors th:nth-child(3), .ops-errors th:nth-child(4) { width: 9%; }
.ops-errors th:last-child { width: 136px; }
.ops-errors td:last-child { overflow: visible; text-align: right; }
/* Settings (SettingsPage.tsx) and Users › Data requests (DataRequests.tsx) */
.ops-set { max-width: 760px; }
.ops-set-who { flex: 0 0 150px; }
.ops-form { display: grid; gap: 14px; align-content: start; }
.ops-form h2 { margin-bottom: 0; }
.ops-terms-new .ops-acts { flex: 0 0 auto; }
/* Connectors (features/connectors/ConnectorsScreen.tsx, Demo/connectors.html). Built on the account rows (.ac-card, .ac-row)
   so it reads as part of Settings on every screen. Lime only on the actions: Copy and Open <app>. */
.cx { display: grid; gap: 10px; min-width: 0; }
.cx-lead { margin: 0 2px 4px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cx-lab { margin: 10px 2px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* the link and its Copy: the one thing most people came for */
.cx-link { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 6px 6px 16px; border-radius: 22px; background: var(--card); }
.sw-sub .cx-link { background: var(--side); } /* the Settings window is white: the box keeps its edge */
.cx-link code { flex: 1; min-width: 0; font: 500 14px var(--font); color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; user-select: all; }
.cx-copy, .cx-go, .cx-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 20px; font: 600 14px var(--font); text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 140ms ease-out, background-color 160ms ease-out, color 160ms ease-out; }
.cx-copy, .cx-go { background: var(--btn); color: #151515; }
.cx-copy.done { background: var(--ink); color: var(--ghost); }
.cx-btn { background: var(--side); color: var(--ink); }
.cx-btn.danger { background: var(--red-bg); color: var(--red); }
.cx-block { width: 100%; height: 48px; border-radius: 24px; font-size: 15px; margin-top: 6px; }
:is(.cx-copy, .cx-go, .cx-btn):active { transform: scale(0.97); }
:is(.cx-copy, .cx-go, .cx-btn):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cx-btn:disabled { opacity: 0.55; }

/* an AI app's mark (ui/AppLogo.tsx): its own logo on the soft tile, or its first letter */
.app-logo { flex: none; display: inline-grid; place-items: center; background: var(--side); color: var(--ink); overflow: hidden; }
.app-logo b { font-weight: 600; line-height: 1; }
.app-logo img { display: block; object-fit: contain; }
.cx-new .app-logo { background: var(--card); } /* on the lime-soft card */
/* the app and makepublish, joined: the Allow page, the steps, a new connection */
.app-join { display: flex; align-items: center; justify-content: center; gap: 12px; }
.app-dots { display: flex; gap: 5px; }
.app-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.app-dots i:nth-child(2) { background: var(--muted); }
.cx > .app-join { justify-content: flex-start; margin: 2px 0 4px; }
.cx > .app-join .app-logo { background: var(--card); } /* on the phone's grey page */
.sw-sub .cx > .app-join .app-logo { background: var(--side); } /* on the Settings window's white */
.ops-app { display: inline-flex; align-items: center; gap: 10px; }

/* the Allow page (features/auth/ConnectPage.tsx), design C: everything centred, two short lines */
.cn-c { text-align: center; }
.cn-c .app-join { margin: 4px 0 2px; }
.cn-line { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.cn-safe { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -2px 0 4px; font-size: 13px; color: var(--muted); }
.ac-m small.cx-on { color: var(--green); }
.ac-m small.cx-bad { color: var(--red); }
.cx .ac-m small { font-size: 12.5px; color: var(--muted); }
.cx .ac-row .ac-m b { white-space: normal; line-height: 1.35; }

/* the three steps; a done one turns its number into a lime tick */
.cx-steps { list-style: none; margin: 0; padding: 2px 16px; counter-reset: cx; }
.cx-steps li { position: relative; display: grid; gap: 3px; padding: 14px 0 14px 40px; counter-increment: cx; }
.cx-steps li + li { border-top: 1px solid var(--line-2); }
.cx-steps li::before { content: counter(cx); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--side); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--ink); transition: background-color 200ms ease-out; }
.cx-steps li.ok::before { content: ''; background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.cx-steps b { font-size: 15px; font-weight: 500; }
.cx-steps small { font-size: 13px; line-height: 1.4; color: var(--muted); }
/* what the app's own form asks for: label, the words, Copy; one soft box like the command's */
.cx-fill { display: grid; margin-top: 8px; padding: 4px 12px; border-radius: 14px; background: var(--side); }
.cx-fill > span { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; }
.cx-fill > span + span { border-top: 1px solid var(--line-2); }
.cx-fill code { min-width: 0; font: 500 13px/1.4 var(--font); color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.cx-fill .cx-copy { height: 34px; padding: 0 12px; font-size: 13px; }
@media (max-width: 420px) { .cx-fill > span { grid-template-columns: minmax(0, 1fr) auto; } .cx-fill > span > small { grid-column: 1 / -1; } }
.cx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cx-cmd { display: block; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--side); font: 500 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.cx-wait { display: flex; align-items: center; gap: 10px; margin: 2px 4px; font-size: 13.5px; color: var(--muted); }
.cx-wait .spin { width: 16px; height: 16px; flex: none; }
.cx-wait-card { min-height: 112px; }

/* an app's page */
.cx-new { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 22px; background: var(--brand-soft); color: var(--ink); }
.cx-new > span:last-child { display: grid; gap: 2px; min-width: 0; }
.cx-new b { font-size: 16px; font-weight: 600; }
.cx-new small { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.cx-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 16px; }
.cx-facts span { display: grid; min-width: 0; }
.cx-facts small { font-size: 12px; color: var(--muted); }
.cx-facts b { font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cx-sure { display: grid; gap: 10px; padding: 14px 16px; margin-top: 6px; }
.cx-sure p { margin: 0; font-size: 14px; line-height: 1.45; }
.cx-sure .cx-acts { justify-content: flex-end; margin: 0; }

/* Admin › Usage › Connectors: a table to read, not rows to open */
.ops-plain tbody tr { cursor: default; }
.ops-plain tbody tr:hover { background: none; }
.ops-plain .num { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { :is(.cx-copy, .cx-go, .cx-btn) { transition: none; } }
