/* LC-1637 functional app layer. Same design tokens as the LC-1610 screens (ui.js C / fonts),
   but fluid: full width on desktop, sidebar collapses to a top bar + drawer under 900px,
   single column under 640px. No fixed design-width frames. */
:root {
  --navy: #1D2951; --ink2: #3A4263; --mute: #555B72; --line: #D3D1CD; --line3: #C4C2BD;
  --bg: #E5E4E2; --paper: #F2F1EF; --terra: #B56F5B; --terraDark: #8E5140; --plum: #684F5B;
  --plumBg: #EFE9EC; --amberBg: #F8ECD9; --amber: #8A4F0E; --blueBg: #E4E7F1; --roseBg: #F3E6E1;
  --serif: 'Newsreader', Georgia, serif; --sans: 'Hanken Grotesk', system-ui, sans-serif;
  /* LC-1815: the rest of the designer palette as variables (same values), so the active
     company brand can retheme every screen (live/brand.js themeVars). */
  --mute2: #4A5068; --line2: #DEDCD8; --chip: #ECEBE8; --terraDeep: #74402F;
  --terraLt: #D9A392; --terraLt2: #E2C3B8;
  --sbHi: #28366A; --sbLine: #3A4880; --sbRule: #2D3A6B; --sbDeep: #26335F;
  --sbMute: #9DA3BF; --sbMute2: #A9AEC7; --sbText: #D4D6E0; --sbBg: #1D2951;
  /* the screen's single primary call to action (brand token accent-cta, else the accent) */
  --cta: var(--terra); --ctaText: #FFFFFF;
  /* LC-3120 hotfix: the raised surface (cards, panels, inputs) and a navy FILL under white text
     (--navy is also the text colour, which turns light in dark mode). */
  --card: #FFFFFF; --navyFill: #1D2951; --plumText: #684F5B; --dash: #A9A6A0; --amberInk: #6E3F0B; --scrim: rgba(29,41,81,0.43);
}
/* LC-3120 hotfix (Brian 2026-10-23: in dark mode only the framed chat went dark): the whole site
   follows the theme, the app's own rule (web/src/styles.css): the system preference unless the
   page is pinned light ([data-theme="light"]), and [data-theme="dark"] wins both ways. A brand's
   light surfaces are not layered over these (live/brand.js themeVars, dark). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #14171A; --paper: #1A1D21; --card: #1F2328; --navy: #E6E9EC; --ink2: #C5CCD4;
  --mute: #9AA4AF; --mute2: #AAB3BE; --line: #2F353D; --line2: #262B31; --line3: #3A424C;
  --chip: #262B31; --navyFill: #2C3B72; --terra: #C9826D; --terraDark: #E0A08C; --terraDeep: #A8604C;
  --terraLt: #6E4436; --terraLt2: #4A2F27; --plum: #8C6B7B; --plumText: #D7BCC8; --plumBg: #2E2529;
  --amberBg: #33280F; --amber: #E0A458; --amberInk: #E8B46C; --scrim: rgba(0,0,0,0.6); --blueBg: #1E2A3A; --roseBg: #33241F; --dash: #5A6068;
  --sbBg: #101317; --sbHi: #1E2430; --sbLine: #2B3240; --sbRule: #20262F; --sbDeep: #0C0E11;
  --sbMute: #8E96A3; --sbMute2: #9AA2AE; --sbText: #D4D6E0; --sv-navy: #101317;
  --cta: #A8604C; --ctaText: #FFFFFF;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171A; --paper: #1A1D21; --card: #1F2328; --navy: #E6E9EC; --ink2: #C5CCD4;
  --mute: #9AA4AF; --mute2: #AAB3BE; --line: #2F353D; --line2: #262B31; --line3: #3A424C;
  --chip: #262B31; --navyFill: #2C3B72; --terra: #C9826D; --terraDark: #E0A08C; --terraDeep: #A8604C;
  --terraLt: #6E4436; --terraLt2: #4A2F27; --plum: #8C6B7B; --plumText: #D7BCC8; --plumBg: #2E2529;
  --amberBg: #33280F; --amber: #E0A458; --amberInk: #E8B46C; --scrim: rgba(0,0,0,0.6); --blueBg: #1E2A3A; --roseBg: #33241F; --dash: #5A6068;
  --sbBg: #101317; --sbHi: #1E2430; --sbLine: #2B3240; --sbRule: #20262F; --sbDeep: #0C0E11;
  --sbMute: #8E96A3; --sbMute2: #9AA2AE; --sbText: #D4D6E0; --sv-navy: #101317;
  --cta: #A8604C; --ctaText: #FFFFFF;
  color-scheme: dark;
}
body.lv { margin: 0; background: var(--paper); color: var(--navy); font-family: var(--sans); }
.lv * { box-sizing: border-box; }
.lv a { color: var(--terraDark); }
.lv :focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
.lv-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; width: 100%;
  /* LC-2606: the nav column is navy for the full page height, not only the sticky viewport-high rail */
  background: linear-gradient(90deg, var(--navyFill) 248px, transparent 248px); }
.lv-side { background: var(--navyFill); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.lv-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; font-size: 15px; }
/* LC-2294: the brand logo (navy rail: its dark-background variant), sized by height so a wordmark keeps its shape */
.lv-brand { flex-wrap: wrap; }
.lv-brand img { height: 30px; width: auto; max-width: 200px; border-radius: 4px; object-fit: contain; flex-shrink: 0; }
/* LC-1763 (5): the brand mark is shown whole (no rounded-corner crop, no cover crop). */
.lv-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 0; flex-shrink: 0; }
/* LC-1815: a company brand's full logo (wordmark) on the sign-in / welcome header. */
.lv-logo-wide { height: 40px; width: auto; max-width: 240px; object-fit: contain; flex-shrink: 0; }
.lv-brand small { display: block; font-weight: 500; opacity: .75; font-size: 12px; }
.lv-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.lv-nav a:hover { background: rgba(255,255,255,.08); }
.lv-nav a[aria-current="page"] { background: rgba(255,255,255,.16); }
.lv-nav .n { margin-left: auto; background: var(--terra); border-radius: 999px; font-size: 11px; padding: 2px 7px; }
.lv-side-foot { margin-top: auto; font-size: 12px; opacity: .85; display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.15); }
.lv-side-foot button, .lv-side-foot select { font: inherit; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.lv-side-foot select option { color: var(--navy); }
.lv-top { display: none; }
.lv-main { min-width: 0; display: flex; flex-direction: column; }
.lv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.lv-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.2; }
.lv-eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--terraDark); font-weight: 700; }
.lv-body { padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.lv-cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lv-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lv-card h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 22px; }
.lv-card h3 { margin: 0; font-size: 15px; }
.lv-hero { background: var(--navyFill); color: #fff; border: 0; }
.lv-hero h2 { color: #fff; font-size: 26px; }
.lv-muted { color: var(--mute); font-size: 14px; line-height: 1.5; margin: 0; }
.lv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; font: 700 14px var(--sans); cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
.lv-btn.navy { background: var(--navyFill); color: #fff; }
.lv-btn.terra { background: var(--terra); color: #fff; }
.lv-btn.cta { background: var(--cta); color: var(--ctaText); }
.lv-btn.plum { background: var(--plum); color: #fff; }
.lv-btn.ghost { background: var(--card); color: var(--navy); border-color: var(--line3); }
.lv-btn.text { background: transparent; color: var(--navy); font-weight: 600; }
.lv-btn[disabled] { opacity: .55; cursor: default; }
.lv-hero .lv-btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.lv-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lv-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--ink2); white-space: nowrap; }
.lv-chip.draft { background: var(--blueBg); color: var(--navy); }
.lv-chip.awaiting { background: var(--roseBg); color: var(--terraDark); }
.lv-chip.changes { background: var(--amberBg); color: var(--amber); }
.lv-chip.reviewed { background: var(--plum); color: #fff; }
.lv-chip.dismissed { background: var(--chip); color: var(--mute); }
.lv-chip.now { background: var(--terra); color: #fff; }
.lv-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.lv-field input:not([type="checkbox"]):not([type="radio"]), .lv-field textarea, .lv-field select, .lv-input { font: 400 16px var(--sans); min-height: 44px; color: var(--navy); border: 1px solid var(--line3); border-radius: 10px; padding: 10px 12px; background: var(--card); width: 100%; }
.lv-field textarea { min-height: 90px; resize: vertical; }
/* LC-2592: guest topic picker: even grid, normal-size checkboxes, label beside the box */
.lv-topic-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; }
.lv-topic-pick label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; line-height: 1.35; }
.lv-topic-pick input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 1px 0 0; }
.lv-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.lv-tabs button { font: 700 14px var(--sans); color: var(--mute); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; cursor: pointer; white-space: nowrap; }
.lv-tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--terra); }
.lv-thread { display: flex; flex-direction: column; gap: 14px; max-height: 58dvh; overflow-y: auto; padding: 4px 2px; }
.lv-msg { display: flex; gap: 10px; align-items: flex-start; }
.lv-av { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--navyFill); overflow: hidden; }
.lv-av img { width: 100%; height: 100%; object-fit: cover; }
.lv-av.me { border-radius: 50%; background: var(--terra); }
.lv-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 15px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; flex: 1; }
.lv-bubble .who { font-size: 12px; font-weight: 700; color: var(--mute); display: flex; gap: 8px; justify-content: space-between; white-space: normal; }
.lv-composer { display: flex; gap: 10px; align-items: flex-end; }
.lv-composer textarea { flex: 1; min-height: 48px; max-height: 180px; resize: vertical; font: 400 16px var(--sans); border: 1px solid var(--line3); border-radius: 12px; padding: 12px; }
.lv-list { display: flex; flex-direction: column; gap: 10px; }
.lv-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lv-item.sel { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy) inset; }
.lv-item p { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.lv-note { background: var(--amberBg); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--amberInk); }
.lv-note.info { background: var(--blueBg); color: var(--navy); }
.lv-note.bad { background: var(--roseBg); color: var(--terraDark); }
.lv-steps { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.lv-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--mute); padding: 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.lv-steps li.done { color: var(--plum); border-color: var(--plum); }
.lv-steps li.cur { color: #fff; background: var(--navyFill); border-color: var(--navy); }
.lv-weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lv-week { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.lv-week.now { border-color: var(--terra); box-shadow: 0 0 0 2px var(--terra) inset; }
.lv-dialog-scrim { position: fixed; inset: 0; background: rgba(29,41,81,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.lv-dialog { background: var(--card); border-radius: 16px; width: min(620px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.lv-dialog h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 24px; }
.lv-toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--navyFill); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: calc(100% - 32px); }
.lv-map { width: 100%; height: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.lv-center { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lv-auth { width: min(460px, 100%); }
.lv-empty { border: 1px dashed var(--line3); border-radius: 12px; padding: 22px; text-align: center; color: var(--mute); font-size: 14px; }
.lv-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.lv-dl dt { color: var(--mute); }
.lv-dl dd { margin: 0; overflow-wrap: anywhere; }
.lv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 1100px) {
  .lv-grid { grid-template-columns: minmax(0, 1fr); }
  .lv-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lv-shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .lv-top { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 8px; height: 56px; padding: 0 12px; background: var(--navyFill); color: #fff; font-weight: 700; }
  .lv-top button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #fff; font: inherit; cursor: pointer; border-radius: 10px; }
  .lv-side { position: fixed; inset: 56px auto 0 0; width: min(300px, 86vw); height: auto; z-index: 40; transform: translateX(-105%); transition: transform .2s ease; }
  body.lv-drawer .lv-side { transform: none; box-shadow: 0 0 0 100vmax rgba(29,41,81,.4); }
  .lv-cols3 { grid-template-columns: minmax(0, 1fr); }
  /* LC-2300 (mobile 1): the menu drawer's workspace switcher was 12px / 32px (iOS zooms the page
     on focus under 16px). Every text control and select on these screens is 16px and 44px tall
     on a phone or tablet, whatever class or inline size it carries. */
  .lv-side-foot button, .lv-side-foot select { font-size: 16px; min-height: 44px; }
  .lv select, .lv textarea, .lv input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]) { font-size: 16px !important; min-height: 44px !important; }
}
@media (max-width: 640px) {
  .lv-head { padding: 14px 16px; }
  .lv-head h1 { font-size: 24px; }
  .lv-body { padding: 16px 16px 40px; }
  .lv-card { padding: 16px; }
  .lv-weeks { grid-template-columns: minmax(0, 1fr); }
  .lv-thread { max-height: none; }
  .lv-dialog { padding: 18px; }
  .lv-btn { min-height: 44px; }
  /* LC-2300: a row of a name and its chip (All weeks) wraps the chip under a long name instead of
     pushing it out of the card */
  .lv-list > .lv-btn { flex-wrap: wrap; row-gap: 4px; padding-top: 8px; padding-bottom: 8px; text-align: left; white-space: normal; }
}
/* LC-2298: Setup "Founders and positions" roster (js/live/founders.js). */
.lv-roster-card { max-width: 760px; }
.lv-roster { border-collapse: collapse; width: 100%; }
.lv-roster th, .lv-roster td { text-align: left; padding: 6px 12px 6px 0; vertical-align: middle; overflow-wrap: anywhere; }
.lv-roster th:last-child, .lv-roster td:last-child { padding-right: 0; }
.lv-roster-name { font-weight: 600; }
.lv-roster-position { width: 50%; }
.lv-roster-switch { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 400; cursor: pointer; }
.lv-roster-switch input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; }
.lv-roster-pos { display: flex; gap: 6px; align-items: center; margin: 0; }
.lv-roster-pos .lv-input { flex: 1 1 auto; min-width: 0; width: 100%; }
.lv-roster-pos .lv-btn { flex: 0 0 auto; min-height: 44px; }
@media (max-width: 640px) {
  /* a phone: one block per person, the Position field the full width of the card */
  .lv-roster, .lv-roster tbody, .lv-roster tr, .lv-roster th, .lv-roster td { display: block; width: auto; }
  .lv-roster thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lv-roster tbody tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .lv-roster th, .lv-roster td { padding: 2px 0; }
  /* the field takes the whole card width (a 30-character title reads whole at 360); Save sits under it */
  .lv-roster-pos { flex-wrap: wrap; }
  .lv-roster-pos .lv-input { flex: 1 1 100%; }
}
.lv-cp-questions { margin: 4px 0; padding-left: 20px; display: grid; gap: 6px; }
/* LC-3120: form fields without their own inline background sit on the raised surface in both themes. */
.sv-root textarea, .sv-root input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), .lv textarea { background-color: var(--card); color: var(--navy); }
/* LC-3185: the ONE standard tri-state Select All/None header (js/live/bulkHeader.js) */
.lv-bulk-header { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--navy); min-height: 32px; margin: 0 0 6px; cursor: pointer; }
.lv-bulk-header input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--navy); cursor: pointer; }
.lv-bulk-header input[type="checkbox"]:disabled { cursor: default; }
.lv-bulk-header input[type="checkbox"]:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.lv-bulk-header [data-bulk-header-text] { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .lv-bulk-header { min-height: 44px; } }

/* LC-3173 / LC-3178: founder confirm, Brain by section, approvals (site tokens only). */
.lv-claims { list-style: none; padding: 0; margin: 0; }
.lv-claim { border-top: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.lv-claim textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
.lv-quote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--line); font-size: 13px; }
.lv-quote small { display: block; margin-top: 2px; }
.lv-quote.ok { border-left-color: var(--sbLine); }
.lv-quote.bad { border-left-color: var(--terra); }
.lv-section-nav .lv-chip { text-decoration: none; }
