/* Home v2 (prototype/home-v2.html, the approved spec) in Liquid Glass (decision 71): a calm, centred hero
   (greeting, the slim glass composer, small source pills, whatever answers the composer, quiet
   suggestions) filling the first screen, with today's sections below the fold on panels. One material per
   surface: the composer is glass, its menus are dialogs, the search inside a menu is a field, and lists
   and figures sit on panels (never blurred). Values are tokens or color-mix() of tokens. Motion stops
   under prefers-reduced-motion. */

.page.hm-page { padding-top: 16px; gap: 24px; }
.hm-hero {
  width: 100%; max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  /* The composer sits a little above the middle of the first screen; the sections start below the fold. */
  padding-top: clamp(24px, 21vh, 220px);
  min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px);
}
.hm-greet { margin: 0 0 16px; font-size: 30px; line-height: 38px; font-weight: 450; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }

/* The composer: one slim glass bar that grows with multi-line text.
   z-index: the blur makes the bar its own stacking context, so its menus (sources, @mentions) only sit
   above the cards and pills below it when the bar itself does. */
.cx-wrap { position: relative; }
.cx {
  position: relative; z-index: 5; display: flex; align-items: flex-end; gap: 4px; margin: 0; padding: 8px; min-height: 60px; border-radius: 30px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-float);
  transition: box-shadow 0.2s ease-out, border-radius 0.2s ease-out;
}
.cx.multi { border-radius: 24px; }
.cx:focus-within { box-shadow: var(--shadow-float), 0 0 0 4px color-mix(in srgb, var(--action) 18%, transparent); }
.cx.is-over { box-shadow: var(--shadow-float), 0 0 0 2px var(--action); }
.cx-plus, .cx-send {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.cx-plus { background: var(--field-bg); box-shadow: var(--shadow-field); color: var(--ink); transition: background-color 0.15s, box-shadow 0.15s; }
.cx-plus:hover, .cx-plus[aria-expanded="true"] { background: var(--select-tint); box-shadow: var(--shadow-panel); }
.cx-plus:focus-visible, .cx-send:focus-visible, .cx-for:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.cx-input {
  flex: 1; min-width: 0; height: 42px; min-height: 42px; max-height: 184px; resize: none; border: 0; background: transparent;
  font: 400 16px/24px var(--font-sans); color: var(--ink); padding: 9px 4px; margin: 0; overflow-y: auto;
}
.cx-input:focus, .cx-input:focus-visible { outline: none; }
.cx-input::placeholder { color: var(--muted); opacity: 1; }
.cx-for {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; margin-bottom: 4px; padding: 0 10px; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 13px; color: var(--ink-2); white-space: nowrap; flex-shrink: 0; max-width: 220px;
}
.cx-for b { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
/* The client icon stands in for "For: Auto-detect" on narrow screens (the aria-label says it all). */
.cx-for .ic { display: none; }
.cx-for:hover, .cx-for[aria-expanded="true"] { background: var(--row-hover); }
.cx-send { background: var(--action); color: var(--on-action); box-shadow: var(--shadow-primary); transition: background-color 0.15s; }
.cx-send:hover { background: var(--action-hover); }
.cx-send[disabled] { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); box-shadow: none; cursor: default; }

.chip-logo { width: 14px; height: 14px; object-fit: contain; display: block; flex-shrink: 0; }
.chip-logo.wide { width: 22px; }
.cx-menu .chip-logo { width: 16px; height: 16px; }
.cx-grow { flex: 1; }

/* Menus: the "+" menu and the "For:" client picker. Fully opaque (decision 76): nothing behind shows
   through, with the dialog's shadow and a hairline edge so they lift off the page. */
.cx-menu { position: absolute; z-index: 35; min-width: 280px; max-width: calc(100vw - 48px); padding: 6px; }
.cx-menu.is-solid { background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); box-shadow: var(--shadow-dialog); }
.cx-menu.attach { width: 340px; }
/* Wide screens: two columns (Add documents and Start something | From your sources), so the whole menu
   fits under the composer without scrolling. */
.cx-cols > .cx-col { min-width: 0; }
@media (min-width: 900px) {
  .cx-menu.attach { width: 640px; }
  .cx-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 6px; }
  .cx-cols > .cx-col + .cx-col { border-left: 1px solid var(--line); padding-left: 6px; }
  .cx-cols > .cx-col + .cx-col > .cx-mg:first-child > .sep { display: none; }
}
.cx-mg-h { margin: 0; padding: 8px 10px 4px; font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--muted); }
.cx-menu.attach { left: 0; top: calc(100% + 8px); max-height: min(70vh, 560px); overflow-y: auto; }
.cx-menu.for { right: 40px; top: calc(100% + 8px); width: 320px; }
.cx-menu .mi {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border-radius: var(--radius-md); border: 0;
  background: transparent; text-align: left; cursor: pointer; font-size: 14px; color: var(--ink); text-decoration: none;
}
.cx-menu .mi > svg, .cx-menu .mi > img { flex-shrink: 0; color: var(--ink-2); }
.cx-menu .mi:hover, .cx-menu .mi:focus-visible, .cx-menu .mi[data-active="true"] { background: var(--select-tint); box-shadow: var(--shadow-panel); }
.cx-menu.is-solid .mi:hover, .cx-menu.is-solid .mi:focus-visible, .cx-menu.is-solid .mi[data-active="true"] { background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: none; }
.cx-menu .mi:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.cx-menu .mi[aria-selected="true"] { font-weight: 500; }
.cx-menu .mi[aria-selected="true"] > svg { color: var(--action); }
.cx-menu .mi .d { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.cx-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.cx-menu .fine { padding: 6px 10px 4px; font-size: 12px; line-height: 17px; color: var(--muted); max-width: 300px; margin: 0; }
.cx-menu .for-search { display: flex; align-items: center; gap: 8px; height: 36px; margin: 2px 2px 6px; padding: 0 10px; color: var(--muted); }
.cx-menu .for-search:focus-within { box-shadow: var(--shadow-field), 0 0 0 3px color-mix(in srgb, var(--action) 22%, transparent); }
.cx-menu .for-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 13.5px/20px var(--font-sans); color: var(--ink); height: 100%; }
.cx-menu .for-search input:focus, .cx-menu .for-search input:focus-visible { outline: none; }
.cx-menu .for-list { max-height: 280px; overflow-y: auto; }

/* The quiet suggestions: one wrapping line of plain links under the bar. */
.cx-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; margin: 0; padding: 0; list-style: none; }
/* display:flex would beat the hidden attribute (first run hides the list). */
.cx-suggest[hidden] { display: none; }
.sg-row {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-pill);
  background: transparent; font: 400 13.5px/20px var(--font-sans); color: var(--ink-2); cursor: pointer; text-align: left;
}
.sg-row:hover { background: var(--row-hover); color: var(--ink); }
.sg-row:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.sg-row svg { color: var(--muted); flex-shrink: 0; }
.sg-row:hover svg { color: var(--ink); }

/* The trial, when the firm can't prepare its own work yet (TrialPrompt variant="card"): one calm glass card. */
.trial-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; text-align: left; }
.trial-card-text { flex: 1; min-width: 0; }
.trial-card-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.trial-card-body { margin: 2px 0 0; font-size: 13px; line-height: 19px; color: var(--muted); }
.trial-card .wp-btn { flex-shrink: 0; }

/* Cards that answer the composer, under the bar at the same width. */
.cx-out { display: flex; flex-direction: column; gap: 12px; }
.cx-out:empty { display: none; }
.out-card {
  position: relative; background: var(--section-fill); border: 1px solid var(--section-edge); border-radius: 18px; box-shadow: var(--section-shadow);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; text-align: left;
}
.out-card.hint { padding: 12px 16px; flex-direction: row; align-items: center; gap: 10px; }
.out-head { display: flex; align-items: flex-start; gap: 12px; }
.out-head .grow { flex: 1; min-width: 0; }
.out-title { font-size: 16px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.out-sub { font-size: 13px; line-height: 19px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.out-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-sunk); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink-2); }
.out-ic.ink { background: var(--ink); border-color: var(--ink); color: var(--on-primary); }
.out-close { margin-left: auto; padding: 0 8px; }
.out-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hx-help { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.hx-err { font-size: 13px; color: var(--danger); }
.hx-fine { font-size: 12px; line-height: 17px; color: var(--muted); }
.hx-box { border-radius: 12px; padding: 12px 14px; background: var(--surface-solid); border: 1px solid var(--section-edge); display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.hx-box.ok { background: var(--ok-soft); border-color: transparent; color: var(--ink); }
.hx-box.ok > svg { color: var(--ok); margin-top: 2px; flex-shrink: 0; }
.hx-box.info { background: var(--info-soft); border-color: transparent; }
.hx-box.flag { background: var(--review-soft); border-color: transparent; }
.hx-box .grow { flex: 1; min-width: 200px; }
.hx-linkbtn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.hx-in { width: 100%; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-solid); padding: 0 12px; color: var(--ink); font: 400 14px/20px var(--font-sans); }
.hx-lbl { font-size: 13px; font-weight: 500; display: block; margin-bottom: 6px; }
.hx-spinner { width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--line-strong); border-top-color: var(--ink-2); display: inline-block; vertical-align: -2px; }
.wp-chip.sm { height: 20px; font-size: 11.5px; padding: 0 7px; }
.wp-chip svg { margin-right: 4px; }

/* The reading receipt. */
.rc-rows { display: flex; flex-direction: column; }
.rc-rows[hidden] { display: none; }
/* Once every file is read: the files folded into one line, with "Show files" (decision 76). */
.rc-fold { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; padding: 2px 0 12px; border-bottom: 1px solid var(--line); }
.rc-fold .grow { flex: 1; min-width: 0; }
.rc-fold b { font-weight: 500; }
/* "Show files": compact rows, one per file, with its type and where it went. */
.rc-files { list-style: none; margin: 0; padding: 4px 12px; display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--panel-bg); box-shadow: var(--shadow-panel); }
.rc-files[hidden] { display: none; }
.rc-file { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; font-size: 13px; }
.rc-file + .rc-file { border-top: 1px solid var(--line); }
.rc-file > svg { color: var(--muted); }
.rc-file-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rc-file-main .n { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.rc-file-main .t { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
@media (max-width: 560px) {
  .rc-file-main { flex-direction: column; gap: 0; }
  .rc-file-main .t { flex: none; max-width: 100%; }
}
.rc-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rc-ic { color: var(--muted); padding-top: 2px; display: inline-flex; }
.rc-row[data-state="done"] .rc-ic { color: var(--ok); }
.rc-name { font-weight: 500; overflow-wrap: anywhere; }
.rc-path { font-weight: 400; color: var(--muted); }
.rc-what { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-top: 1px; overflow-wrap: anywhere; flex-wrap: wrap; }
.rc-what b { font-weight: 500; color: var(--ink); }
.rc-what.found { color: var(--ink-2); }
.rc-what.bad { color: var(--danger); }
.rc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding-top: 1px; }
.rc-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 2px; }
.rc-foot .lead { display: flex; align-items: center; gap: 8px; font-weight: 500; flex: 1; min-width: 220px; }
.rc-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; width: 100%; }
.rc-bar > span { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width 0.35s ease-out; }
.rc-progress { flex: 1; min-width: 200px; }
.rc-progress .spread { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.rc-extra:empty { display: none; }
.rc-extra { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.toggle-row { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.switch { position: relative; width: 36px; height: 22px; border-radius: 11px; border: 1px solid var(--control-edge); background: var(--line-strong); cursor: pointer; flex-shrink: 0; padding: 0; transition: background-color 0.15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-solid); box-shadow: var(--control-shadow); transition: transform 0.15s ease-out; }
.switch[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(14px); }

/* Which client? */
/* Several clients in one drop (decision 76): a card per group of documents that look alike. Each card is a
   panel (a repeated item: never blurred); the selection bar sticks to the bottom while documents are chosen. */
.as-wrap { display: flex; flex-direction: column; gap: 14px; }
.as-done { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.as-done li { display: flex; align-items: center; gap: 8px; }
.as-done-line { display: block; }
.as-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--panel-bg); box-shadow: var(--shadow-panel); }
.as-card.unsure { background: color-mix(in srgb, var(--review-soft) 35%, var(--panel-bg)); }
.as-head { display: flex; align-items: flex-start; gap: 12px; }
.as-head .grow { flex: 1; min-width: 0; }
.as-title { margin: 0; font-size: 15px; line-height: 21px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.as-title b { font-weight: 600; }
.as-why { margin: 2px 0 0; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.as-check, .as-file input[type="checkbox"] { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ink); flex-shrink: 0; cursor: pointer; }
.as-files { list-style: none; margin: 0 0 0 4px; padding: 0; display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.as-file label { display: grid; grid-template-columns: 16px minmax(0, auto) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.as-file label:hover { background: var(--row-hover); }
.as-file.on label { background: color-mix(in srgb, var(--action) 9%, var(--panel-bg)); }
.as-file input[type="checkbox"] { margin: 0; align-self: center; }
.as-file .n { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-file .t { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 2px; }
.as-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-sunk); }
.as-panel .q-pick { margin-top: 0; }
.as-panel .q-form { padding: 0; background: transparent; }
.as-panel > .hx-linkbtn { align-self: flex-start; font-size: 13px; }
.as-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: var(--radius-card); background: var(--surface-solid); box-shadow: var(--shadow-dialog); }
.as-bar > .as-panel { flex-basis: 100%; }
.as-bar-n { font-size: 13.5px; font-weight: 500; margin-right: 4px; }
.as-move select { height: 30px; border-radius: 10px; border: 0; padding: 0 8px; background: var(--field-bg); box-shadow: var(--shadow-field); color: var(--ink); font: 400 13px/20px var(--font-sans); max-width: 220px; }
.as-foot { flex-wrap: wrap; }
@media (max-width: 560px) {
  .as-files { max-height: none; overflow: visible; }
  .as-card { padding: 12px; }
  .as-file label { grid-template-columns: 16px minmax(0, 1fr); }
  .as-file .t { grid-column: 2; }
}
.q-opts { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.q-opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-solid); cursor: pointer; }
.q-opt:hover { border-color: var(--control-hover-edge); }
.q-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.q-opt input[type="radio"] { margin: 3px 0 0; accent-color: var(--ink); width: 16px; height: 16px; }
.q-opt .t { font-weight: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-opt .why { display: block; font-size: 13px; line-height: 19px; color: var(--muted); margin-top: 3px; }
.q-pick { margin-top: 8px; max-width: 360px; position: relative; }
.q-pick .picked { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; }
.q-form { border-radius: 12px; background: var(--surface-sunk); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.q-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.q-grid .full { grid-column: 1 / -1; }
.src-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 4px 6px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-solid); }
.people input { border: 0; flex: 1; min-width: 100px; height: 30px; padding: 0 6px; background: transparent; font: inherit; color: var(--ink); }
.people input:focus-visible { outline: none; }
.people:focus-within { border-color: var(--faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 22%, transparent); }
.pick-list { margin: 6px 0 0; padding: 4px; list-style: none; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-solid); max-height: 220px; overflow-y: auto; }
.pick-list [role="option"] { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.pick-list [role="option"][aria-selected="true"], .pick-list [role="option"]:hover { background: var(--surface-sunk); }
.pick-list .d { display: block; font-size: 12px; color: var(--muted); }

/* Editable chips (the checklist in a Do preview). */
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ed-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 4px 0 11px; border-radius: var(--radius-pill); background: var(--surface-solid); border: 1px solid var(--line-strong); font-size: 13px; }
.ed-chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ed-chip button:hover { background: var(--surface-sunk); color: var(--ink); }
.ed-add { height: 30px; padding: 0 11px; border-radius: var(--radius-pill); border: 1px dashed var(--control-edge); background: transparent; font-size: 13px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.ed-add:hover { background: var(--surface-solid); color: var(--ink); }
.ed-add-in { height: 30px; border-radius: var(--radius-pill); border: 1px solid var(--control-edge-strong); padding: 0 12px; font-size: 13px; min-width: 200px; background: var(--surface-solid); color: var(--ink); }
.do-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.do-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.do-list > li:last-child { border-bottom: 0; }
.do-list .t { font-weight: 500; flex: 1; min-width: 160px; overflow-wrap: anywhere; }

/* Folder matching. */
.fd-table { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid); overflow: hidden; }
.fd-row { display: grid; grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.5fr) 56px; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.fd-row:last-child { border-bottom: 0; }
.fd-row.head { font-size: 12.5px; color: var(--muted); font-weight: 500; background: var(--surface-sunk); }
.fd-row.off { color: var(--muted); }
.fd-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.fd-row .f { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; min-width: 0; }
.fd-row .f svg { flex-shrink: 0; color: var(--muted); }
.fd-row .n { text-align: right; font-variant-numeric: tabular-nums; }
.fd-row select { height: 32px; font-size: 13px; }
.why-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; line-height: 17px; padding: 3px 8px; border-radius: 7px; overflow-wrap: anywhere; }
.why-chip.exact { background: var(--ok-soft); color: var(--ok); }
.why-chip.close { background: var(--info-soft); color: var(--info); }
.why-chip.none { background: var(--neutral-soft); color: var(--neutral); }
.why-chip.you { background: var(--surface-sunk); color: var(--ink-2); }

/* The email picker panel: the "Where from" tabs are a segmented track (the selected tab is lifted), and
   each list sits on a panel. */
.pull-tabs { display: flex; gap: 2px; width: max-content; max-width: 100%; padding: 3px; margin-top: -4px; border-radius: var(--radius-pill); background: var(--field-bg); box-shadow: var(--shadow-field); overflow-x: auto; scrollbar-width: none; }
.pull-tabs::-webkit-scrollbar { display: none; }
.pull-tab { font-size: 13px; color: var(--ink-2); height: 30px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: background-color 0.15s, box-shadow 0.15s; }
.pull-tab:hover { color: var(--ink); background: var(--row-hover); }
.pull-tab[aria-selected="true"] { color: var(--ink); background: var(--panel-bg); box-shadow: var(--shadow-panel); font-weight: 500; }
.pull-tab:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.pull-tab .n { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.pl-list { display: flex; flex-direction: column; margin: 0; padding: 0 12px; list-style: none; border-radius: var(--radius-lg); background: var(--panel-bg); box-shadow: var(--shadow-panel); }
.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.pl-row:last-child { border-bottom: 0; }
.pl-from { font-weight: 500; overflow-wrap: anywhere; }
.pl-subj { display: block; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.pl-when { font-size: 12.5px; color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.pl-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.pl-act .hx-in { width: auto; min-width: 200px; max-width: 100%; height: 32px; font-size: 13px; }
.att { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--surface-sunk); font-size: 12px; color: var(--ink-2); max-width: 100%; }

/* The whole-page drop overlay: a scrim and one dialog-weight target. */
.drop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 28px; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.drop-box { width: min(760px, 100%); min-height: min(440px, 70vh); border-radius: 28px; border: 2px dashed var(--action); background: var(--glass-bg-dialog); box-shadow: var(--shadow-dialog); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; pointer-events: none; }
.drop-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--action); color: var(--on-action); box-shadow: var(--shadow-primary); display: inline-flex; align-items: center; justify-content: center; }
.drop-t { font-size: 26px; line-height: 32px; letter-spacing: -0.02em; font-weight: 450; }
.drop-s { font-size: 14px; color: var(--muted); max-width: 46ch; }

@media (prefers-reduced-motion: no-preference) {
  .cx-menu { animation: hx-pop 0.12s ease-out; }
  .out-card { animation: hx-rise 0.28s ease-out both; }
  .rc-row.in { animation: hx-rise 0.3s ease-out both; }
  .rc-what.found, .rc-tags .wp-chip { animation: hx-fade 0.3s ease-out; }
  .q-form { animation: hx-rise 0.22s ease-out both; }
  .drop { animation: hx-fade 0.15s ease-out; }
  .drop-ic { animation: hx-bob 1.6s ease-in-out infinite; }
  .hx-spinner { animation: hx-spin 0.8s linear infinite; }
  .hx-pulse { animation: hx-pulse 1.6s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .cx, .cx-send, .rc-bar > span, .switch, .switch::after { transition: none; }
  .cx-plus, .pull-tab { transition: none; }
}
@keyframes hx-pop { from { opacity: 0; transform: translateY(4px); } }
@keyframes hx-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes hx-fade { from { opacity: 0; } }
@keyframes hx-bob { 50% { transform: translateY(-5px); } }
@keyframes hx-spin { to { transform: rotate(360deg); } }
@keyframes hx-pulse { 50% { opacity: 0.35; } }

@media (max-width: 700px) {
  .page.hm-page { padding: 12px 16px 56px; gap: 20px; }
  .hm-hero { padding-top: 6vh; min-height: 0; gap: 14px; }
  .hm-greet { font-size: 24px; line-height: 30px; margin-bottom: 8px; }
  .cx { padding: 6px; }
  /* The For chip shrinks to its icon so the instruction has room; it wraps rather than being cut. */
  .cx-for .lab, .cx-for b { display: none; }
  .cx-for .ic { display: inline-flex; }
  .cx-for { padding: 0 6px; gap: 2px; }
  .cx-menu.attach, .cx-menu.for { left: 0; right: 0; min-width: 0; width: auto; }
  .trial-card { flex-direction: column; align-items: stretch; }
  .trial-card .wp-btn { align-self: flex-start; }
  .cx-suggest { justify-content: flex-start; }
  .q-grid { grid-template-columns: minmax(0, 1fr); }
  .fd-row { grid-template-columns: 26px minmax(0, 1fr) 40px; grid-template-areas: "c f n" "c g g" "c w w"; row-gap: 4px; }
  .fd-row > :nth-child(1) { grid-area: c; } .fd-row > :nth-child(2) { grid-area: f; } .fd-row > :nth-child(3) { grid-area: g; } .fd-row > :nth-child(4) { grid-area: w; } .fd-row > :nth-child(5) { grid-area: n; }
  .fd-row.head { display: none; }
  .out-card { padding: 16px 14px; }
  .pl-row { grid-template-columns: minmax(0, 1fr); }
  .pl-when { text-align: left; }
  .drop-t { font-size: 21px; line-height: 27px; }
  .ed-add-in { min-width: 0; width: 100%; }
}

@media (max-width: 520px) {
  /* Two lines for the instruction while the bar is empty (grow() sizes it once there's text). */
  .cx-input:placeholder-shown { min-height: 66px; }
}
@media (max-width: 400px) {
  /* The narrowest phones need three lines for it. */
  .cx-input:placeholder-shown { min-height: 90px; }
}

/* Filter chips in the pull panel ("Needs a person" / "All"): the secondary button's fill and edge; the
   pressed one takes the action colour. */
.hx-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.hx-filters button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--radius-pill); font: 400 13px/1 var(--font-sans); background: var(--control-fill); color: var(--ink); border: 1px solid var(--control-edge); box-shadow: var(--control-shadow); cursor: pointer; }
.hx-filters button:hover { background: var(--control-hover-fill); border-color: var(--control-hover-edge); }
.hx-filters button[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.hx-filters .n { font-variant-numeric: tabular-nums; opacity: 0.75; }

/* Create a client group: every property with its own owners (decision 76). */
.cg-props { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cg-prop { display: flex; flex-direction: column; gap: 2px; }
.cg-prop-row { display: flex; gap: 6px; align-items: center; }
.cg-owners { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 0; margin: 6px 0 0; padding: 0; min-width: 0; }
.cg-owners-l { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.cg-owner { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface-solid); font-size: 13px; cursor: pointer; }
.cg-owner.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cg-owner input { width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
.cg-add { align-self: flex-start; margin-top: 8px; font-size: 13px; }
