/* The Business Translator Hub design system (v2). One stylesheet, tokens first.
   Brand: deep navy + steel blue (AI Strengths Advantage arch and bridge
   imagery), gold accent from the original Lovable Hub. Sora display,
   Manrope text, both self-hosted. */

@font-face { font-family: "Sora"; font-weight: 400; font-display: swap; src: url("../fonts/sora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 500; font-display: swap; src: url("../fonts/sora-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("../fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("../fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy-950: #08121f; --navy-900: #0d1b2e; --navy-850: #112339; --navy-800: #152a45; --navy-700: #1d3858;
  --blue-600: #1f4f8a; --blue-500: #2b62a8; --blue-400: #4a83c9; --blue-100: #e6eef8; --blue-50: #f2f6fc;
  --sky: #a9cfee;
  --gold-600: #9a7430; --gold-500: #b8893a; --gold-100: #f6ecd9;
  --green-600: #1c7c52; --green-100: #e2f3ea;
  --amber-600: #b26b12; --amber-100: #fbefdc;
  --red-600: #c03a32; --red-100: #fbe6e4;
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc;
  --border: #e2e7ee; --border-strong: #cfd7e2;
  --text: #142033; --text-2: #3a475a; --muted: #637083;
  --primary: var(--blue-600); --primary-hover: #1a4479; --accent: var(--gold-500); --focus: #3b82f6;
  --src-tbt: #1f4f8a; --src-maharishi: #b07d2a;
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem; --fs-sm: 0.8125rem; --fs-md: 0.9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.25rem;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 56, .06);
  --shadow-md: 0 1px 2px rgba(16, 32, 56, .05), 0 6px 18px -6px rgba(16, 32, 56, .12);
  --shadow-lg: 0 18px 48px -16px rgba(10, 24, 44, .35);
  --sidebar-w: 256px; --topbar-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.v2 { margin: 0; font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
.v2 h1, .v2 h2, .v2 h3, .v2 h4 { font-family: var(--font-display); color: inherit; margin: 0; letter-spacing: -0.01em; line-height: 1.25; font-weight: 600; }
.v2 p { margin: 0; }
.v2 a { color: var(--primary); text-decoration: none; }
.v2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.v2 img { max-width: 100%; display: block; }
.v2 code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.v2 code { background: var(--blue-50); padding: 1px 5px; border-radius: 5px; color: var(--navy-700); }
.v2 ul, .v2 ol { margin: 0; padding: 0; }
.v2 :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-md); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.right { display: flex; justify-content: flex-end; }
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }
.pre { white-space: pre-wrap; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent; font: 600 var(--fs-md)/1 var(--font-body); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s var(--ease), border-color .15s, color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff !important; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text) !important; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); border-color: #b9c4d3; }
.btn-ghost { background: transparent; color: var(--text-2) !important; }
.btn-ghost:hover { background: var(--blue-50); color: var(--primary) !important; }
.btn-highlight { background: var(--sky); color: var(--navy-900) !important; }
.btn-highlight:hover { background: #c3def4; }
.btn-outline-light { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-google { background: #fff; color: #1f2937 !important; border-color: var(--border-strong); }
.btn-google:hover { background: #f8fafc; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); gap: 6px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: var(--fs-xs); gap: 5px; border-radius: 7px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row form { margin: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--blue-50); color: var(--primary); }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.speak-btn > span { display: inline-flex; align-items: center; gap: 6px; }
.speak-btn.is-playing { color: var(--primary) !important; background: var(--blue-100); border-color: var(--blue-100); }

/* badges, tags, chips */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 8px; border-radius: var(--r-full); background: var(--blue-50); color: var(--primary); font: 700 var(--fs-xs)/1 var(--font-body); }
.badge-sm { min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
.badge-warn { background: var(--amber-100); color: var(--amber-600); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
.tag .ico { width: 13px; height: 13px; }
.tag-green { background: var(--green-100); border-color: transparent; color: var(--green-600); }
.tag-gold { background: var(--gold-100); border-color: transparent; color: var(--gold-600); }
.tag-blue { background: var(--blue-100); border-color: transparent; color: var(--blue-600); }
.type-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--blue-50); color: var(--navy-700); font: 700 11px/1 var(--font-body); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.type-chip-sm { height: 18px; font-size: 10px; }
.src-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; border-radius: 5px; font: 700 11px/1 var(--font-body); color: #fff; background: var(--src-tbt); }
.src-badge.src-maharishi { background: var(--src-maharishi); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--muted); }
.dot-amber { background: var(--amber-600); } .dot-blue { background: var(--blue-500); }
.pill { display: inline-flex; padding: 6px 12px; border-radius: var(--r-full); background: var(--blue-50); color: var(--navy-700); font-size: var(--fs-sm); font-weight: 600; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

/* avatars */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--navy-700), var(--blue-600)); color: #fff; font: 600 13px/1 var(--font-display); box-shadow: 0 0 0 2px var(--surface); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.av-ian { background: linear-gradient(140deg, var(--navy-900) 10%, var(--blue-600) 75%, var(--gold-500) 140%); }
.avatar-initials { letter-spacing: .02em; }
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-md { width: 42px; height: 42px; font-size: 14px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-xl { width: 104px; height: 104px; font-size: 30px; }
.avatar.has-ring { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--blue-100); }

/* app shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); color: #c9d5e5; padding: 16px 12px; z-index: 40; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 10px; }
.brand-link { display: flex; align-items: center; gap: 12px; min-width: 0; color: #fff !important; text-decoration: none !important; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font: 600 15px/1.15 var(--font-display); color: #fff; overflow-wrap: anywhere; }
.brand-text small { font-size: 11.5px; color: #8fa3bd; }
.sidebar-close { display: none; color: #c9d5e5; }
.sidebar-nav { flex: 1; }
.nav-group { margin: 16px 10px 6px !important; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f84a1; }
.sidebar-nav ul { list-style: none; display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 9px; color: #c9d5e5 !important; font-weight: 600; font-size: 14px; text-decoration: none !important; transition: background .15s, color .15s; }
.nav-link .ico { color: #8fa3bd; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff !important; }
.nav-link.is-active { background: linear-gradient(90deg, rgba(74,131,201,.28), rgba(74,131,201,.12)); color: #fff !important; box-shadow: inset 3px 0 0 var(--sky); }
.nav-link.is-active .ico { color: var(--sky); }
.sidebar-foot { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.preview-pill { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(184,137,58,.14); color: #f0d9ad; font-size: 12px; font-weight: 600; }
.preview-pill .dot { background: var(--gold-500); box-shadow: 0 0 0 3px rgba(184,137,58,.25); }
.preview-pill a { margin-left: auto; color: #f0d9ad !important; text-decoration: underline; font-weight: 600; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; }
.me .avatar { box-shadow: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.me-text strong { color: #fff; font-size: 13px; }
.me-text small { color: #8fa3bd; font-size: 11.5px; }
.me form { margin: 0; }
.me .icon-btn { color: #8fa3bd; }
.me .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.scrim { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: var(--topbar-h); padding: 10px 28px; background: rgba(244,246,249,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.nav-toggle { display: none; }
.topbar-title { min-width: 0; }
.crumb { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.crumb a { color: var(--muted); }
.page-title { font-size: 20px !important; font-weight: 600 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { position: relative; margin-left: auto; width: min(360px, 34vw); }
.topbar-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.v2 .topbar-search input { height: 40px; min-height: 40px; padding: 0 40px 0 38px; border: 1px solid var(--border); font-size: var(--fs-sm); }
.topbar-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px var(--font-body); color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--surface-2); }
.topbar-meta { display: flex; align-items: center; gap: 12px; }
.topbar-meta form { margin: 0; }
.clock { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.content { padding: 26px 28px 48px; width: 100%; max-width: 1360px; margin: 0 auto; display: grid; gap: 22px; align-content: start; }
.content-wide { max-width: none; }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; display: grid; gap: 14px; align-content: start; }
.card-flush { padding: 0; gap: 0; overflow: hidden; }
.card-warn { border-color: #f1d6ab; background: linear-gradient(180deg, #fffaf1, #fff); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-head h3 { font-size: 16px; }
.card-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-actions form { margin: 0; }
.head-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-50); color: var(--primary); flex: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.section-block { display: grid; gap: 12px; }
.block-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.block-head h3 { font-size: 17px; }
.page-intro { max-width: 760px; }
.sub-list { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 8px; }
.sub-head, .side-head { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-head { margin-bottom: 8px !important; }
.empty-state { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 16px; }
.empty-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--blue-50); color: var(--blue-500); margin-bottom: 4px; }
.empty-ico .ico { width: 22px; height: 22px; }
.empty-title { font-weight: 700; color: var(--text); }
.empty-text { color: var(--muted); font-size: var(--fs-sm); max-width: 420px; }
.empty-state .btn { margin-top: 8px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--navy-700); font-size: var(--fs-sm); flex-wrap: wrap; }
.alert > span { flex: 1; min-width: 200px; }
.alert-warn { background: var(--amber-100); border-color: #f2d7a8; color: #7a4a0c; }
.alert-error { background: var(--red-100); border-color: #f3c6c2; color: #8a231d; }
.alert-ok { background: var(--green-100); border-color: #bfe3cf; color: #145c3c; }
.row-list { list-style: none; }
.row-list > li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); }
.row-list > li:first-child { border-top: 0; }
.row-list > li:hover { background: var(--surface-2); }
.row-list form { margin: 0; }
.card:not(.card-flush) .row-list > li { padding-left: 0; padding-right: 0; }
.card:not(.card-flush) .row-list > li:hover { background: transparent; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-meta { text-align: right; white-space: nowrap; }
.mini-rows { list-style: none; display: grid; gap: 8px; }
.mini-rows li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); flex-wrap: wrap; }
.mini-rows li > span:nth-child(2) { flex: 1; min-width: 0; }
.bullets { padding-left: 18px !important; display: grid; gap: 6px; }
.link-out { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; }
.link-out .ico { width: 14px; height: 14px; }
.link-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: var(--fs-sm); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.owner-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.rag { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; margin: 0; }
.rag-btn { border: 0; background: var(--surface); padding: 6px 10px; font: 600 12px var(--font-body); color: var(--muted); cursor: pointer; border-left: 1px solid var(--border); }
.rag-btn:first-child { border-left: 0; }
.rag-btn:hover { background: var(--surface-2); }
.rag-green.is-on { background: var(--green-100); color: var(--green-600); }
.rag-amber.is-on { background: var(--amber-100); color: var(--amber-600); }
.rag-red.is-on { background: var(--red-100); color: var(--red-600); }
.form-stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .btn { grid-column: 1 / -1; justify-self: start; }
.narrow-form { max-width: 420px; }
.field { display: grid; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.v2 input[type=text], .v2 input[type=email], .v2 input[type=password], .v2 input[type=search], .v2 input:not([type]), .v2 textarea, .v2 select, .v2 input[type=file] { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); font: 500 var(--fs-md) var(--font-body); color: var(--text); }
.v2 textarea { resize: vertical; line-height: 1.5; }
.v2 input:focus, .v2 textarea:focus, .v2 select:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(74,131,201,.18); }
.check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 160px; }
.add-form { border-top: 1px solid var(--border); padding-top: 12px; }
.add-form summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); color: var(--primary); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.add-form summary::-webkit-details-marker { display: none; }
.add-form[open] summary { margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 10px 14px; font-weight: 600; font-size: var(--fs-sm); color: var(--muted) !important; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text) !important; }
.tab.is-on { color: var(--primary) !important; border-bottom-color: var(--primary); }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font: 600 var(--fs-sm) var(--font-body); color: var(--text-2); cursor: pointer; }
.segmented button:hover { color: var(--text); }
.segmented button.is-on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--navy-900); color: #e8eef6; box-shadow: var(--shadow-lg); font-size: var(--fs-sm); animation: toast-in .2s var(--ease); }
.toast .ico { color: var(--sky); margin-top: 1px; }
.toast-error .ico { color: #ff9d95; }
.toast p { flex: 1; }
.toast button { background: var(--sky); color: var(--navy-900); border: 0; border-radius: 6px; padding: 5px 10px; font-weight: 700; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Today */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 26px; border-radius: var(--r-xl); color: #fff; background: radial-gradient(120% 140% at 100% 0%, rgba(74,131,201,.55), transparent 55%), linear-gradient(120deg, var(--navy-900), var(--navy-700)); position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; inset: 0; background: url("../img/brand/circuit-wave.jpg") right center / 620px auto no-repeat; opacity: .22; mix-blend-mode: screen; pointer-events: none; }
.welcome > * { position: relative; z-index: 1; }
.welcome-date { font-size: var(--fs-sm); font-weight: 600; color: var(--sky); }
.welcome-title { font-size: 26px !important; margin: 4px 0 2px !important; color: #fff; }
.welcome .muted { color: #aebdd1; }
.welcome-team { display: flex; align-items: center; }
.stack-avatar { margin-left: -10px; transition: transform .15s; }
.stack-avatar:first-child { margin-left: 0; }
.stack-avatar:hover { transform: translateY(-2px); }
.stack-avatar .avatar { box-shadow: 0 0 0 3px var(--navy-800); }
.welcome-team .btn { margin-left: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text) !important; text-decoration: none !important; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi:hover { border-color: var(--blue-100); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-ico { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.kpi-ico .ico { width: 20px; height: 20px; }
.kpi-amber { background: var(--amber-100); color: var(--amber-600); } .kpi-blue { background: var(--blue-100); color: var(--blue-600); } .kpi-green { background: var(--green-100); color: var(--green-600); } .kpi-red { background: var(--red-100); color: var(--red-600); }
.kpi-val { font: 600 26px/1.1 var(--font-display); }
.kpi-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 22px; min-width: 0; }
.briefing { display: grid; }
.briefing-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.briefing-item:first-child { border-top: 0; padding-top: 0; }
.briefing-item h4 { font-size: 14px; margin-bottom: 2px !important; }
.briefing-item p { color: var(--text-2); }
.agenda { list-style: none; display: grid; }
.agenda-item { display: grid; grid-template-columns: 64px 4px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.agenda-item:first-child { border-top: 0; }
.agenda-list .agenda-item { padding: 12px 20px; }
.agenda-time { font: 600 var(--fs-sm) var(--font-display); color: var(--text-2); }
.agenda-bar { align-self: stretch; border-radius: 4px; background: var(--src-tbt); min-height: 32px; }
.agenda-item.src-maharishi .agenda-bar { background: var(--src-maharishi); }
.agenda-body { display: grid; gap: 2px; min-width: 0; }
.agenda-day { padding: 10px 20px; background: var(--surface-2); font-weight: 700; font-size: 12px; letter-spacing: .04em; color: var(--muted); border-top: 1px solid var(--border); }
.agenda-day:first-child { border-top: 0; }
.ask-form { display: flex; gap: 10px; }
.ask-form input { flex: 1; }
.v2 .ask-form-lg input { min-height: 50px; font-size: var(--fs-lg); }
.answer { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; display: grid; gap: 10px; }
.answer-text { white-space: pre-wrap; color: var(--text); }
.citations { padding-left: 20px !important; display: grid; gap: 4px; font-size: var(--fs-sm); }
.todo { list-style: none; display: grid; gap: 12px; }
.todo li { display: flex; gap: 12px; align-items: flex-start; }
.todo li > div { display: grid; gap: 2px; min-width: 0; }
.todo-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--navy-900); color: #fff; font: 700 12px var(--font-display); flex: none; }
.approve-list { list-style: none; display: grid; gap: 12px; }
.approve-list li { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.approve-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.approve-list li > div:first-child { display: grid; gap: 2px; }
.ops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ops-group { padding: 10px 0; border-top: 1px solid var(--border); }
.ops-group:first-of-type { border-top: 0; }
.ops-group h4 { font-size: 13.5px; margin-bottom: 4px !important; }
.ops-group ul { padding-left: 18px; font-size: var(--fs-sm); color: var(--text-2); display: grid; gap: 3px; }

/* feed, watch, recap, library, dossier */
.feed-list { list-style: none; display: grid; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.feed-item:first-child { border-top: 0; padding-top: 0; }
.feed-item > div { display: grid; gap: 3px; min-width: 0; }
.feed-meta { font-size: var(--fs-xs); color: var(--muted); }
.feed-meta strong { color: var(--text); }
.feed-title { font-weight: 700; }
.feed-body { font-size: var(--fs-sm); color: var(--text-2); }
.alert-cards, .watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); }
.change .old { color: var(--muted); text-decoration: line-through; }
.change .new { font-weight: 700; }
.watch-head { display: flex; justify-content: space-between; align-items: center; }
.mentions { font-size: var(--fs-xs); color: var(--muted); }
.mentions b { font: 600 18px var(--font-display); color: var(--gold-600); margin-right: 2px; }
.watch-card h4 { font-size: 15px; }
.watch-headline { font-weight: 600; color: var(--text-2); }
.watch-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.slide-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; aspect-ratio: 16 / 10; overflow: auto; box-shadow: var(--shadow-sm); display: grid; gap: 8px; align-content: start; border-top: 4px solid var(--blue-600); }
.slide-num { position: absolute; right: 14px; top: 12px; font: 600 12px var(--font-display); color: var(--muted); }
.slide-card h4 { font-size: 15px; padding-right: 24px; }
.slide-card ul { padding-left: 18px; font-size: var(--fs-sm); display: grid; gap: 4px; }
.slide-card p { font-size: var(--fs-sm); color: var(--text-2); }
.search-hero { padding: 28px; background: linear-gradient(135deg, #fff, var(--blue-50)); }
.search-hero h2 { font-size: 22px; }
.dossier-head { border-left: 4px solid var(--src-tbt); }
.dossier-head.src-maharishi { border-left-color: var(--src-maharishi); }
.ev-facts { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: var(--fs-sm); color: var(--text-2); }
.ev-facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts { display: grid; margin: 0; }
.facts > div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.settings-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 20px); display: grid; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.settings-nav a:hover { background: var(--surface); text-decoration: none; }
.settings-body { display: grid; gap: 22px; min-width: 0; }
.key-list { list-style: none; display: grid; }
.key-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.key-row:first-child { border-top: 0; }
.private-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); background: var(--navy-900); color: #d7e2ef; font-size: var(--fs-sm); }
.private-banner .ico { color: var(--gold-500); }
.item-title { font-size: 20px; }

/* team */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; scroll-margin-top: 90px; }
.profile-card:target { box-shadow: 0 0 0 3px var(--blue-400), var(--shadow-md); }
.profile-banner { height: 84px; background: linear-gradient(120deg, rgba(13,27,46,.85), rgba(31,79,138,.75)), url("../img/brand/circuit-wave.jpg") center / cover; }
.profile-body { padding: 0 22px 22px; display: grid; gap: 8px; justify-items: start; flex: 1; align-content: start; }
.profile-body .avatar { margin-top: -52px; }
.profile-body h3 { font-size: 18px; margin-top: 6px !important; }
.profile-role { color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-scope { list-style: none; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); margin-top: 4px !important; }
.profile-scope li { display: flex; gap: 8px; align-items: flex-start; }
.profile-scope .ico { color: var(--green-600); width: 16px; height: 16px; margin-top: 2px; }
.profile-key { display: inline-flex; align-items: center; gap: 6px; }
.profile-key .ico { width: 14px; height: 14px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

/* chat */
.content-chat { max-width: 1240px; }
.chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; height: calc(100dvh - var(--topbar-h) - 74px); min-height: 520px; }
.chat-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 10px; overflow-y: auto; }
.chat-list .side-head { padding: 0 10px; }
.chat-list ul { list-style: none; display: grid; gap: 2px; }
.chat-contact { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--text) !important; text-decoration: none !important; }
.chat-contact:hover { background: var(--surface-2); }
.chat-contact.is-active { background: var(--blue-50); box-shadow: inset 3px 0 0 var(--primary); }
.chat-contact-text { display: grid; min-width: 0; line-height: 1.3; }
.chat-contact-text strong { font-size: 14px; }
.chat-contact-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-head-text { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.voice-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--green-600); font-weight: 600; }
.voice-ok .ico { width: 14px; height: 14px; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; }
.msg-me { margin-left: auto; flex-direction: row-reverse; }
.msg-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 14px; box-shadow: var(--shadow-sm); display: grid; gap: 4px; min-width: 0; }
.msg-me .msg-bubble { background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 16px 16px 4px 16px; }
.msg-meta { display: flex; gap: 10px; align-items: baseline; font-size: 11.5px; color: var(--muted); }
.msg-meta strong { color: var(--text); }
.msg-me .msg-meta, .msg-me .msg-meta strong { color: rgba(255,255,255,.85); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-speak { justify-self: start; margin-left: -8px; }
.chat-composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.v2 .chat-composer textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; }

/* calendar */
.cal-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 22px; align-items: start; }
.cal-side { display: grid; gap: 22px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.mini-cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-head strong { font: 600 14px var(--font-display); }
.mc-head .icon-btn { width: 30px; height: 30px; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mc-dow { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.mc-day { border: 0; background: transparent; height: 32px; border-radius: 50%; font: 600 12.5px var(--font-body); color: var(--text-2); cursor: pointer; position: relative; }
.mc-day:hover { background: var(--blue-50); }
.mc-day.is-out { color: #b3bccb; }
.mc-day.is-today { background: var(--primary); color: #fff; }
.mc-day.is-sel:not(.is-today) { background: var(--blue-100); color: var(--primary); }
.mc-day.has-ev::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold-500); }
.mc-day.is-today.has-ev::after { background: #fff; }
.cal-sources, .cal-sync { display: grid; gap: 4px; }
.src-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); }
.src-toggle:hover { background: var(--surface); }
.src-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.src-swatch { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--sw); background: var(--sw); display: grid; place-items: center; flex: none; }
.src-swatch::after { content: ""; width: 8px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.src-toggle input:not(:checked) + .src-swatch { background: transparent; }
.src-toggle input:not(:checked) + .src-swatch::after { display: none; }
.src-toggle input:focus-visible + .src-swatch { outline: 2px solid var(--focus); outline-offset: 2px; }
.src-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; }
.src-logo { border-radius: 3px; }
.src-count { font-size: 12px; color: var(--muted); }
.cal-main { min-height: 640px; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 19px !important; margin-left: 8px !important; white-space: nowrap; }
.cal-body { padding: 0 6px 6px; }
#calendar { --fc-border-color: var(--border); --fc-today-bg-color: rgba(169,207,238,.16); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2); --fc-list-event-hover-bg-color: var(--blue-50); --fc-now-indicator-color: #d93025; --fc-event-border-color: transparent; font-size: 13px; }
#calendar .fc-scrollgrid { border: 0; }
#calendar .fc-col-header-cell { padding: 8px 0; background: var(--surface); }
#calendar .fc-col-header-cell-cushion { font: 700 11.5px var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
#calendar .fc-daygrid-day-number { font: 600 12.5px var(--font-body); color: var(--text-2); text-decoration: none; padding: 6px 8px; }
#calendar .fc-day-today .fc-daygrid-day-number { background: var(--primary); color: #fff; border-radius: 50%; min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0; margin: 4px; }
#calendar .fc-day-other .fc-daygrid-day-number { color: #b3bccb; }
#calendar .fc-daygrid-event { border-radius: 6px; padding: 1px 4px; font-weight: 600; font-size: 12px; }
#calendar .fc-daygrid-dot-event:hover { background: var(--blue-50); }
#calendar .fc-timegrid-event { border-radius: 7px; box-shadow: var(--shadow-sm); padding: 2px 4px; font-weight: 600; }
#calendar .fc-timegrid-slot { height: 2.4em; }
#calendar .fc-timegrid-slot-label-cushion, #calendar .fc-timegrid-axis-cushion { font-size: 11px; color: var(--muted); }
#calendar .fc-event { cursor: pointer; }
#calendar .fc-event.is-private { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
#calendar .fc-list { border: 0; }
#calendar .fc-list-day-cushion { background: var(--surface-2); font-weight: 700; }
#calendar .fc-list-day, #calendar .fc-day-today, .cal-toolbar { scroll-margin-top: 84px; }
#calendar .fc-list-day.fc-day-today .fc-list-day-cushion { background: var(--blue-100); box-shadow: inset 4px 0 0 var(--primary); }
#calendar .fc-list-day.fc-day-today .fc-list-day-text::after { content: " · Today"; color: var(--primary); }
#calendar .fc-col-header-cell.fc-day-today .fc-col-header-cell-cushion { color: var(--primary); }
#calendar .is-today-flash { animation: today-flash 1.3s var(--ease); }
@keyframes today-flash { 0%, 35% { box-shadow: inset 0 0 0 3px var(--primary); } 100% { box-shadow: inset 0 0 0 0 transparent; } }
#calendar .fc-list-event-title a { color: var(--text); text-decoration: none; font-weight: 600; }
#calendar .fc-more-link { font-weight: 700; color: var(--primary); }
#calendar .fc-popover { border-radius: var(--r-md); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.popover { position: fixed; z-index: 120; width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px 18px 18px; display: grid; gap: 8px; animation: toast-in .15s var(--ease); }
.popover-head { display: flex; justify-content: space-between; align-items: center; }
.popover-swatch { width: 16px; height: 16px; border-radius: 5px; background: var(--src-tbt); }
.popover h3 { font-size: 17px; line-height: 1.3; }
.ev-row { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); }
.ev-row .ico { color: var(--muted); width: 16px; height: 16px; margin-top: 2px; }
.ev-note { display: flex; gap: 6px; align-items: center; }
.popover-actions { margin-top: 6px; }

/* stand-up (Meet-style) */
.page-room .content-room { max-width: none; padding: 0; gap: 0; }
.meet { background: #0f1724; color: #e6ebf2; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: calc(100dvh - var(--topbar-h)); min-height: 560px; }
.meet .muted { color: #93a1b5; }
.meet-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; flex-wrap: wrap; }
.meet-title { display: flex; align-items: center; gap: 12px; }
.meet-title > div { display: grid; line-height: 1.3; }
.meet-title strong { color: #fff; font-size: 15px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #5b6778; }
.live-dot.is-live { background: #34c759; box-shadow: 0 0 0 4px rgba(52,199,89,.2); }
.day-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.day-chip { padding: 6px 10px; border-radius: 9px; color: #c3cdda !important; font-size: 12.5px; text-decoration: none !important; background: rgba(255,255,255,.04); }
.day-chip b { color: #fff; margin-left: 2px; }
.day-chip:hover { background: rgba(255,255,255,.1); }
.day-chip.is-on { background: var(--sky); color: var(--navy-900) !important; }
.day-chip.is-on b { color: var(--navy-900); }
.meet-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 0 16px; min-height: 0; }
.meet.panel-closed .meet-body { grid-template-columns: minmax(0, 1fr); }
.meet.panel-closed .meet-panel { display: none; }
.stage { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; }
.stage-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(184,137,58,.16); color: #f2dcb4; font-size: var(--fs-sm); }
.stage-banner a { color: #fff; text-decoration: underline; }
.stage > .tiles:first-child { grid-row: 1 / 3; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; min-height: 0; }
.tile { position: relative; border-radius: 16px; background: radial-gradient(120% 90% at 50% 20%, #24344d, #172234 70%); display: grid; place-items: center; min-height: 150px; overflow: hidden; transition: box-shadow .2s, transform .2s, opacity .2s; }
.tile.tile-you { background: radial-gradient(120% 90% at 50% 20%, #2b3a2f00, #172234 70%), linear-gradient(135deg, #1b2a42, #24344d); }
.tile.is-idle { opacity: .72; }
.tile.is-speaking { box-shadow: 0 0 0 3px #8ab4f8, 0 10px 30px -10px rgba(138,180,248,.5); opacity: 1; }
.tile.is-next .tile-status { background: rgba(169,207,238,.22); color: #dcecfa; }
.tile-status { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.35); color: #c3cdda; }
.tile.is-speaking .tile-status { background: #8ab4f8; color: #0f1724; }
.tile-face { position: relative; display: grid; place-items: center; }
.avatar-tile { width: clamp(72px, 9vw, 112px); height: clamp(72px, 9vw, 112px); font-size: clamp(22px, 2.6vw, 34px); box-shadow: none; }
.tile-ring { position: absolute; inset: -8px; border-radius: 50%; border: 3px solid transparent; }
.tile.is-speaking .tile-ring { border-color: #8ab4f8; animation: ring 1.4s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(138,180,248,.55); } 100% { box-shadow: 0 0 0 18px rgba(138,180,248,0); } }
.eq { position: absolute; bottom: -4px; right: -6px; display: none; gap: 2px; align-items: flex-end; height: 18px; padding: 4px 5px; background: #8ab4f8; border-radius: 999px; }
.eq i { width: 3px; background: #0f1724; border-radius: 2px; height: 30%; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; } .eq i:nth-child(4) { animation-delay: .45s; }
.tile.is-speaking .eq { display: flex; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.tile-name { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.tile-name strong { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-role { color: #93a1b5; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.35); flex: none; }
.mic .ico { width: 14px; height: 14px; }
.mic.is-off { background: #c5221f; color: #fff; }
.meet-panel { background: var(--surface); color: var(--text); border-radius: 16px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.meet-panel .muted { color: var(--muted); }
.panel-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--border); }
.panel-tabs button[data-panel-tab] { border: 0; background: transparent; padding: 10px 12px; font: 600 var(--fs-sm) var(--font-body); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.panel-tabs button.is-on { color: var(--primary); border-bottom-color: var(--primary); }
.panel-close { margin-left: auto; }
.panel-body { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 12px; align-content: start; }
.seg { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; transition: border-color .2s, box-shadow .2s; }
.seg.is-current { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(74,131,201,.15); }
.seg-head { display: flex; align-items: center; gap: 10px; }
.seg-title { display: grid; flex: 1; line-height: 1.3; min-width: 0; }
.seg-play { background: var(--blue-50); color: var(--primary); width: 34px; height: 34px; border-radius: 50%; }
.seg-play.is-playing { background: var(--primary); color: #fff; }
.seg-script { margin: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.seg-script > div { display: grid; grid-template-columns: 46px 1fr; gap: 8px; }
.seg-script dt { font-weight: 700; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.seg-script dd { margin: 0; color: var(--text-2); }
.seg-reply summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--primary); }
.reply-form { display: grid; gap: 8px; margin-top: 8px; }
.reply-form .btn { justify-self: end; }
.panel-composer { border-top: 1px solid var(--border); padding-top: 12px; }
.chat-mini { list-style: none; display: grid; gap: 12px; }
.chat-mini li { display: flex; gap: 10px; font-size: var(--fs-sm); }
.chat-mini-meta { font-size: 12px; color: var(--muted); }
.decision-list { list-style: none; display: grid; gap: 10px; }
.decision-list li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: var(--fs-sm); }
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 20px; }
.controls-left { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #fff; min-width: 0; white-space: nowrap; overflow: hidden; }
.ctl-sep { color: #4a5668; }
.controls-center { display: flex; gap: 10px; align-items: center; }
.controls-right { display: flex; gap: 6px; justify-content: flex-end; }
.ctl { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #2c3646; color: #e6ebf2 !important; cursor: pointer; transition: background .15s; }
.ctl:hover { background: #3a4659; }
.ctl[disabled] { opacity: .45; cursor: not-allowed; }
.ctl .ico { width: 20px; height: 20px; }
.ctl.is-on { background: #8ab4f8; color: #0f1724 !important; }
.ctl-primary { width: 56px; height: 56px; background: var(--sky); color: var(--navy-900) !important; }
.ctl-primary:hover { background: #c3def4; }
.ctl-primary.is-playing { background: #fff; }
.ctl-leave { width: 64px; border-radius: 999px; background: #d93025; color: #fff !important; }
.ctl-leave:hover { background: #b3261e; }
.ctl-sm { width: 42px; height: 42px; background: transparent; }
.ctl-sm.is-on { background: rgba(138,180,248,.22); color: #8ab4f8 !important; }

/* public site */
body.public { background: #fff; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.dot-accent { color: var(--gold-500); }
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .25s, box-shadow .25s, backdrop-filter .25s; }
.site-header.is-solid { background: rgba(13,27,46,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.site-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none !important; }
.site-brand img { border-radius: 10px; }
.site-brand > span { display: grid; line-height: 1.15; }
.site-brand strong { font: 700 20px var(--font-display); letter-spacing: .02em; }
.site-brand small { font-size: 12px; color: #b9c7d8; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > a:not(.btn) { color: #dbe5f0 !important; font-weight: 600; font-size: 14.5px; }
.site-nav > a:not(.btn):hover { color: #fff !important; }
.hero { position: relative; min-height: min(100vh, 900px); min-height: min(100svh, 900px); display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--navy-950); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,18,31,.92) 0%, rgba(8,18,31,.72) 42%, rgba(8,18,31,.25) 100%), linear-gradient(0deg, rgba(8,18,31,.7), transparent 40%); }
.hero-inner { position: relative; padding: 140px 0 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 700 12.5px var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--sky); margin-bottom: 18px !important; }
.eyebrow-dark { color: var(--gold-600); }
.rule { width: 40px; height: 2px; background: var(--gold-500); display: inline-block; }
.hero-title { font: 600 clamp(44px, 7vw, 92px)/1.02 var(--font-display) !important; letter-spacing: -0.03em !important; color: #fff; }
.hero-lede { margin-top: 22px !important; max-width: 560px; font-size: clamp(17px, 1.6vw, 20px); color: #d3deea; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero-proof { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 28px; margin-top: 64px !important; padding-top: 24px !important; border-top: 1px solid rgba(255,255,255,.16); }
.hero-proof li { display: grid; gap: 4px; }
.hero-proof strong { font: 600 18px var(--font-display); color: #fff; }
.hero-proof span { font-size: 13.5px; color: #b9c7d8; }
.hero-tag { position: absolute; right: 28px; bottom: 26px; font: 600 11px var(--font-body); letter-spacing: .3em; color: rgba(255,255,255,.45); writing-mode: vertical-rl; }
.section { position: relative; padding: clamp(72px, 9vw, 120px) 0; }
.section-tint { background: linear-gradient(180deg, #f3f6fa, #fff); }
.section-dark { background: var(--navy-950); color: #e6ebf2; overflow: hidden; }
.section-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.section-dark .wrap { position: relative; }
.display-2 { font: 600 clamp(30px, 3.6vw, 46px)/1.12 var(--font-display) !important; letter-spacing: -0.02em !important; max-width: 760px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split-media { align-items: center; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.prose-lg { display: grid; gap: 18px; font-size: 17.5px; line-height: 1.7; color: var(--text-2); }
.founder { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.founder > div { display: grid; line-height: 1.35; }
.founder span:not(.avatar):not(.avatar-initials) { color: var(--muted); font-size: 14px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.service-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-xl); padding: 28px; display: grid; gap: 12px; align-content: start; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.service-card:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.service-card h3 { font-size: 19px; color: #fff; }
.service-card p { color: #b9c7d8; font-size: 15px; line-height: 1.65; }
.service-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(169,207,238,.14); color: var(--sky); }
.media-card { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(8,18,31,.5); background: var(--navy-950); }
.media-card img { width: 100%; height: auto; }
.lede-dark { font-size: 19px; color: var(--text-2); margin-top: 16px !important; line-height: 1.6; }
.narrow-text { max-width: 700px; }
.check-list { list-style: none; display: grid; gap: 14px; margin-top: 26px !important; }
.check-list li { display: flex; gap: 12px; color: var(--text-2); line-height: 1.55; }
.check-list .ico { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--green-100); color: var(--green-600); flex: none; margin-top: 1px; }
.team-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px 16px; display: grid; justify-items: center; text-align: center; gap: 6px; align-content: start; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.team-card .avatar { margin-bottom: 10px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--blue-100); }
.team-card h3 { font-size: 16px; }
.team-role { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.team-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); margin-top: 4px !important; }
.cta { padding-top: 0; background: linear-gradient(180deg, #fff 0 50%, var(--navy-950) 50%); }
.cta-card { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; padding: clamp(32px, 5vw, 56px); border-radius: 28px; color: #fff; background: radial-gradient(90% 120% at 100% 0%, rgba(74,131,201,.5), transparent 60%), linear-gradient(120deg, var(--navy-900), var(--navy-700)); box-shadow: var(--shadow-lg); }
.cta-card > div:first-child { max-width: 620px; display: grid; gap: 10px; }
.cta-card p { color: #c9d5e5; font-size: 16.5px; }
.cta-actions { display: grid; gap: 12px; }
.site-footer { background: var(--navy-950); color: #8fa3bd; padding: 36px 0 40px; font-size: 13.5px; }
.site-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { color: #c9d5e5; }

/* auth */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-art { position: relative; overflow: hidden; background: var(--navy-950); }
.auth-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-art-shade { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(8,18,31,.85), rgba(8,18,31,.35) 60%, rgba(8,18,31,.8)); }
.auth-art-copy { position: absolute; inset: 0; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-quote { font: 600 clamp(28px, 3.4vw, 44px)/1.15 var(--font-display); color: #fff; max-width: 440px; letter-spacing: -0.02em; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-box { width: min(400px, 100%); display: grid; gap: 18px; }
.auth-box h1 { font-size: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.magic summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--primary); }
.magic[open] summary { margin-bottom: 12px; }

/* responsive */
@media (max-width: 1180px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meet-body { grid-template-columns: minmax(0, 1fr) 320px; }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-search { width: min(280px, 30vw); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar-close { display: inline-grid; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,18,31,.5); z-index: 35; }
  body.nav-open { overflow: hidden; }
  .nav-toggle { display: inline-grid; margin-left: -8px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar-search { display: none; }
  .topbar-meta { margin-left: auto; }
  .content { padding: 18px 16px 40px; gap: 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid, .grid-2, .split, .split-media { grid-template-columns: minmax(0, 1fr); }
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-side .mini-cal { grid-row: span 2; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .chat-list { display: none; }
  .chat-pane { height: calc(100dvh - var(--topbar-h) - 40px); min-height: 480px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .meet { height: auto; min-height: calc(100dvh - var(--topbar-h)); }
  .meet-body { grid-template-columns: minmax(0, 1fr); }
  .meet-panel { max-height: 70vh; max-height: 70dvh; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; }
  .controls { position: sticky; bottom: 0; background: #0f1724; grid-template-columns: 1fr auto; }
  .controls-left { display: none; }
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav > a:not(.btn) { display: none; }
  .hero-proof { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-tag { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 220px; }
}
@media (max-width: 640px) {
  .welcome { padding: 20px; }
  .welcome-title { font-size: 22px !important; }
  .welcome-team { flex-wrap: wrap; gap: 12px; }
  .welcome-team .btn { margin-left: 0; width: 100%; }
  .kpi { padding: 12px; column-gap: 10px; }
  .kpi-ico { width: 36px; height: 36px; }
  .kpi-val { font-size: 21px; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .row-list > li { padding: 12px 16px; }
  .agenda-item { grid-template-columns: 52px 4px minmax(0, 1fr); }
  .agenda-item > :last-child:not(.agenda-body) { grid-column: 3; justify-self: start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .clock { display: none; }
  .cal-side { grid-template-columns: minmax(0, 1fr); }
  .cal-toolbar { padding: 12px; }
  .cal-title { font-size: 16px !important; width: 100%; margin: 6px 0 0 !important; order: 5; }
  .cal-nav { flex-wrap: wrap; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 7px 6px; }
  .msg { max-width: 92%; }
  .tiles { grid-auto-rows: 150px; gap: 8px; }
  .meet-body { padding: 0 8px; }
  .meet-top { padding: 10px 12px; }
  .ctl { width: 44px; height: 44px; }
  .ctl-primary { width: 52px; height: 52px; }
  .ctl-sm { width: 38px; height: 38px; }
  .controls { padding: 10px 8px; gap: 6px; }
  .controls-center { gap: 6px; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .team-card { padding: 20px 10px; }
  .team-card .avatar-xl { width: 80px; height: 80px; }
  .site-header-row { height: 64px; }
  .site-brand small { display: none; }
  .hero-inner { padding: 110px 0 64px; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; white-space: normal; }
  .wrap { width: calc(100% - 32px); }
  .table th, .table td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* iteration 1 fixes */
.v2 .topbar-search input[type=search] { padding-left: 38px; padding-right: 40px; }
@media (min-width: 961px) { .app { background: linear-gradient(90deg, var(--navy-950) var(--sidebar-w), var(--bg) var(--sidebar-w)); } .sidebar { align-self: start; } }
.clamp-more { border: 0; background: none; padding: 0; margin-top: 2px; color: var(--primary); font: 700 12.5px var(--font-body); cursor: pointer; }
[data-clamp].is-open { -webkit-line-clamp: unset; display: block; }
.ops-more summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.ops-more[open] summary { margin-bottom: 4px; }
.ops-group li > span { display: -webkit-box; }
.alert-rows { list-style: none; display: grid; gap: 10px; }
.alert-rows li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid #f1e3c8; }
.alert-rows li:last-child { border-bottom: 0; padding-bottom: 0; }

/* iteration 2: mobile polish */
.mc-day { width: 32px; height: 32px; justify-self: center; padding: 0; }
.mc-day.has-ev::after { bottom: 1px; }
@media (max-width: 960px) {
  .sidebar { box-shadow: none; }
  body.nav-open .sidebar { box-shadow: var(--shadow-lg); }
  .cal-main { order: -1; }
  .cal-layout { display: flex; flex-direction: column; }
  .chat-layout { gap: 12px; }
  .chat-list { display: block; padding: 10px; overflow-x: auto; overflow-y: hidden; }
  .chat-list .side-head { display: none; }
  .chat-list ul { display: flex; gap: 6px; }
  .chat-contact { flex-direction: column; gap: 4px; padding: 6px 10px; min-width: 72px; }
  .chat-contact.is-active { box-shadow: inset 0 -3px 0 var(--primary); }
  .chat-contact-text small { display: none; }
  .chat-contact-text strong { font-size: 12px; }
  .chat-contact-text strong { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-room { overflow-x: hidden; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .cal-side .mini-cal { display: none; }
  .chat-head-text .muted { display: none; }
  .chat-head-text .voice-ok { display: inline-flex; font-size: 12px; }
  .tile-role { display: none; }
  .tile-name { left: 8px; right: 8px; bottom: 8px; }
  .ctl { width: 40px; height: 40px; }
  .ctl-primary { width: 48px; height: 48px; }
  .ctl-leave { width: 48px; }
  .ctl-sm { width: 34px; height: 34px; }
  .controls-right { gap: 2px; }
  .controls-center { gap: 6px; }
}

/* iteration 3: phone + iPad (10 Nov 2026) */
html, body.v2 { overflow-x: clip; }
.content, .card, .dash-main, .dash-side, .feed-item > div, .row-main, .msg-bubble, .seg, .panel-body { min-width: 0; }
.feed-title, .feed-body, .msg-text, .card p, .card li, .seg-script dd, .decision-list p, .facts dd, .agenda-body { overflow-wrap: anywhere; }
.table-wrap, .card-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
img, svg, video { max-width: 100%; }
.bottom-nav { display: none; }

/* safe areas (notch / home indicator / landscape side insets) */
.topbar { padding-top: max(10px, env(safe-area-inset-top)); }
.sidebar { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.toast-stack { bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); }
.controls { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.chat-composer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
@supports (padding: max(0px)) {
  .content { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (min-width: 961px) { .content { padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); } }

/* touch screens: 44px minimum targets, 16px inputs (no iOS focus zoom) */
@media (pointer: coarse), (max-width: 1024px) {
  .v2 input[type=text], .v2 input[type=email], .v2 input[type=password], .v2 input[type=search], .v2 input:not([type]), .v2 textarea, .v2 select, .v2 input[type=file] { font-size: 16px; min-height: 44px; }
}
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .btn, .btn-sm { min-height: 44px; }
  .btn-xs { min-height: 36px; padding: 0 12px; position: relative; }
  .btn-xs::after { content: ""; position: absolute; inset: -5px -2px; }
  .nav-link { min-height: 46px; }
  .segmented button { min-height: 40px; }
  .segmented { padding: 2px; }
  .panel-tabs button[data-panel-tab] { min-height: 44px; }
  .day-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; }
  .ctl-sm { width: 44px; height: 44px; }
  .seg-reply summary, .ops-more summary, .magic summary { min-height: 44px; display: flex; align-items: center; }
  .clamp-more { min-height: 36px; }
  .src-toggle { min-height: 44px; }
  .mc-day { width: 40px; height: 40px; }
  .chat-contact { min-height: 52px; }
  .topbar-search kbd { display: none; }
  #calendar .fc-daygrid-day-number { padding: 8px 10px; }
}

/* calendar view buttons: 3-day on phones, week elsewhere */
.segmented .seg-narrow { display: none; }
@media (max-width: 640px) {
  .segmented .seg-wide { display: none; }
  .segmented .seg-narrow { display: inline-block; }
}

/* iPad portrait + small landscape: collapsible icon rail */
@media (min-width: 641px) and (max-width: 1024px) {
  .app { --sidebar-w: 76px; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); background: linear-gradient(90deg, var(--navy-950) var(--sidebar-w), var(--bg) var(--sidebar-w)); }
  .sidebar { position: sticky; top: 0; inset: auto; width: var(--sidebar-w); transform: none; padding-left: 10px; padding-right: 10px; transition: width .2s var(--ease); align-self: start; }
  .sidebar-brand { justify-content: center; padding: 6px 0 14px; }
  .sidebar .brand-text, .sidebar .nav-group, .sidebar .nav-link > span, .sidebar .preview-pill, .sidebar .me-text, .sidebar .me form, .sidebar-close { display: none; }
  .sidebar .nav-link { justify-content: center; padding: 0; min-height: 48px; }
  .sidebar .nav-link.is-active { box-shadow: inset 3px 0 0 var(--sky); }
  .sidebar-nav ul { margin-bottom: 10px; }
  .sidebar .me { justify-content: center; padding: 6px 0; }
  .nav-toggle { display: inline-grid; margin-left: -6px; }
  .topbar-search { display: block; width: min(260px, 32vw); }
  body.nav-open .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 45; box-shadow: var(--shadow-lg); padding-left: 12px; padding-right: 12px; overflow-y: auto; }
  body.nav-open .sidebar .brand-text, body.nav-open .sidebar .nav-link > span, body.nav-open .sidebar .me-text { display: flex; }
  body.nav-open .sidebar .brand-text { flex-direction: column; }
  body.nav-open .sidebar .nav-group, body.nav-open .sidebar .me form { display: block; }
  body.nav-open .sidebar .preview-pill { display: flex; }
  body.nav-open .sidebar .sidebar-close { display: inline-grid; }
  body.nav-open .sidebar .sidebar-brand { justify-content: space-between; padding: 6px 8px 18px; }
  body.nav-open .sidebar .nav-link { justify-content: flex-start; padding: 0 12px; }
  body.nav-open .sidebar .me { justify-content: flex-start; padding: 6px; }
  body.nav-open .main-col { margin-left: 0; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,18,31,.5); z-index: 44; }
  body.nav-open .app { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .content { padding-top: 20px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .meet-body { grid-template-columns: minmax(0, 1fr); }
  .meet-panel { max-height: 46vh; max-height: 46dvh; }
  .chat-list { display: block; }
  .controls-left { display: none; }
  .controls { grid-template-columns: 1fr auto; }
}
/* iPad portrait (tall): stage gets more height; panel below */
@media (min-width: 641px) and (max-width: 1024px) and (orientation: portrait) {
  .meet { height: auto; min-height: calc(100dvh - var(--topbar-h)); }
  .tiles { grid-auto-rows: 230px; }
  .avatar-tile { width: 104px; height: 104px; font-size: 32px; }
  .meet-panel { max-height: none; min-height: 360px; margin-bottom: 12px; }
  .cal-side { grid-template-columns: minmax(350px, 1fr) minmax(0, 1fr); align-items: start; align-content: start; }
  .cal-sources, .cal-sync { align-self: start; }
  .cal-side .mini-cal { grid-row: span 2; display: block; }
}
/* iPad landscape: keep 3-col tiles with side panel */
@media (min-width: 1025px) and (max-width: 1366px) {
  .meet-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr) 320px; }
  .topbar-search { width: min(300px, 28vw); }
}
@media (min-width: 1025px) and (max-width: 1199px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* phones: bottom tab bar + drawer for the rest */
@media (max-width: 640px) {
  :root { --bn-h: 62px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 34; padding: 4px max(6px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(15,33,56,.06); }
  .bn-item { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 54px; border: 0; background: none; color: var(--muted) !important; font: 600 11px/1.1 var(--font-body); text-decoration: none !important; border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bn-item .ico { width: 22px; height: 22px; }
  .bn-item.is-active { color: var(--primary) !important; }
  .bn-item.is-active .ico { background: var(--blue-50); border-radius: 999px; box-shadow: 0 0 0 5px var(--blue-50); }
  body.v2:not(.page-room):not(.page-chat):not(.auth-page) .content { padding-bottom: calc(var(--bn-h) + 28px + env(safe-area-inset-bottom)); }
  body.v2:not(.page-room):not(.page-chat) .toast-stack { bottom: calc(var(--bn-h) + 12px + env(safe-area-inset-bottom)); }
  body.page-room .bottom-nav, body.page-chat .bottom-nav, body.nav-open .bottom-nav { display: none; }
  .toast-stack { left: 12px; right: 12px; max-width: none; }
  .topbar { min-height: 58px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .page-title { font-size: 18px !important; }
  .crumb { font-size: 11px; }
  .content { padding-top: 14px; gap: 14px; }
  .sidebar { width: min(310px, 86vw); }
  .kpis { gap: 10px; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .card-head > .btn-row, .card-head > .btn { flex: none; }
  .table { font-size: 13.5px; }
  .welcome-team .stack-avatar + .stack-avatar { margin-left: -8px; }
  /* calendar */
  .cal-toolbar { gap: 10px; }
  .cal-nav { width: 100%; }
  .cal-nav .btn { margin-right: auto; }
  #calendar .fc-timegrid-slot { height: 2.8em; }
  #calendar .fc-col-header-cell-cushion { font-size: 11px; letter-spacing: .02em; }
  #calendar .fc-timegrid-event .fc-event-main { font-size: 12px; line-height: 1.25; }
  #calendar .fc-list-event td { padding: 12px 10px; }
  #calendar .fc-daygrid-day-frame { min-height: 64px; }
  #calendar .fc-daygrid-event { font-size: 10.5px; padding: 0 2px; }
  #calendar .fc-daygrid-dot-event .fc-event-time { display: none; }
  .popover.is-sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; border-radius: 20px 20px 0 0; padding: 12px 20px max(20px, env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(8,18,31,.25); }
  .popover.is-sheet .popover-actions .btn { width: 100%; }
  /* stand-up room */
  .meet { min-height: calc(100dvh - 58px); }
  .meet-top { gap: 10px; }
  .day-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .day-chips::-webkit-scrollbar { display: none; }
  .day-chip { flex: none; }
  .tiles { grid-auto-rows: 150px; }
  .avatar-tile { width: 76px; height: 76px; font-size: 24px; }
  .meet-panel { max-height: none; margin-bottom: 8px; }
  .controls { position: sticky; bottom: 0; z-index: 5; grid-template-columns: 1fr; justify-items: center; padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
  .controls-center { gap: 8px; }
  .controls-right { position: static; gap: 4px; }
  .controls { grid-template-areas: "c" "r"; row-gap: 6px; }
  .controls-center { grid-area: c; }
  .controls-right { grid-area: r; }
  .ctl { width: 46px; height: 46px; }
  .ctl-primary { width: 54px; height: 54px; }
  .ctl-leave { width: 56px; }
  .ctl-sm { width: 44px; height: 44px; }
  /* chat */
  .content-chat { padding-left: 0; padding-right: 0; padding-top: 0; }
  .chat-layout { gap: 0; }
  .chat-list { border-radius: 0; border-left: 0; border-right: 0; }
  .chat-pane { border-radius: 0; border-left: 0; border-right: 0; height: calc(100dvh - 58px - 92px); min-height: 380px; }
  .chat-head { padding: 10px 14px; }
  .chat-log { padding: 14px 12px; }
  .msg { max-width: 94%; }
  .chat-composer { padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .chat-composer .btn { min-width: 48px; padding: 0 14px; }
  /* team */
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* settings tabs scroll */
  .settings-nav { scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 360px) {
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr); }
}
/* iPhone landscape (short) */
@media (max-height: 500px) and (orientation: landscape) {
  .meet { height: auto; }
  .tiles { grid-auto-rows: 140px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (pointer: coarse) {
  .btn-xs { min-height: 44px; }
  .btn-xs::after { content: none; }
  .clamp-more { min-height: 44px; }
  .rag-btn { min-height: 44px; min-width: 44px; }
  .segmented button { min-height: 44px; }
  .mc-day { width: 100%; max-width: 44px; height: 44px; }
  .mc-head .icon-btn { width: 44px; height: 44px; }
  .nav-toggle { flex: none; }
}
@media (max-width: 960px) { .chat-contact-text .ln { display: none; } }
@media (max-width: 1024px) { .tile-role { display: none; } }
@media (pointer: coarse) and (min-width: 1025px) { .cal-layout { grid-template-columns: 356px minmax(0, 1fr); } }

/* ===== go-live (10 Nov 2026): landing, watchlist, library, wrap-up, travel ===== */
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* landing */
.page-landing .site-brand strong { font-size: 18px; letter-spacing: -0.01em; }
.page-landing .site-brand small, .site-brand small { letter-spacing: .04em; }
.hero-title-lg { font-size: clamp(38px, 5.6vw, 76px) !important; max-width: 920px; }
.section-head { display: grid; gap: 6px; max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-intro { padding: clamp(48px, 6vw, 80px) 0; border-bottom: 1px solid var(--border); }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.intro-statement { font: 500 clamp(22px, 2.4vw, 32px)/1.35 var(--font-display); letter-spacing: -0.015em; color: var(--navy-900); max-width: 900px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary) !important; min-height: 44px; }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.svc-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px 28px; display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.svc-card .service-ico { background: var(--blue-50); color: var(--primary); }
.svc-card h3 { font-size: 20px; }
.svc-card p { color: var(--text-2); line-height: 1.65; }
.svc-num { position: absolute; top: 24px; right: 26px; font: 600 13px var(--font-display); color: var(--gold-600); letter-spacing: .1em; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.steps li { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-xl); padding: 26px; display: grid; gap: 10px; align-content: start; backdrop-filter: blur(6px); }
.steps h3 { color: #fff; font-size: 18px; }
.steps p { color: #b9c7d8; font-size: 15px; line-height: 1.6; }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(169,207,238,.5); color: var(--sky); font: 600 15px var(--font-display); }
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.portrait { margin: 0; position: relative; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(8,18,31,.5); background: var(--navy-950); }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 545 / 681; object-fit: cover; }
.portrait figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 22px 18px; display: grid; color: #fff; background: linear-gradient(0deg, rgba(8,18,31,.85), transparent); }
.portrait figcaption span { color: #c9d5e5; font-size: 13.5px; }
.about-grid .prose-lg { margin-top: 18px; }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.cta-mail { color: #c9d5e5 !important; font-size: 14px; text-align: center; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 36px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand p { margin-top: 14px; max-width: 380px; line-height: 1.6; }
.footer-h { font: 700 12px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-links { list-style: none; display: grid; gap: 4px; }
.footer-links a, .footer-links span { display: inline-flex; align-items: center; gap: 8px; color: #c9d5e5; min-height: 36px; }
.footer-links .ico { width: 16px; height: 16px; color: var(--sky); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; }
.footer-base a { color: #c9d5e5; }
.site-footer { padding-top: 56px; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 420px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .site-nav { gap: 12px; }
}
@media (max-width: 640px) {
  .page-landing .site-brand strong, .site-brand strong { font-size: 15px; }
  .site-brand small { font-size: 10.5px; }
  .site-brand img { width: 36px; height: 36px; }
  .site-hub-btn { padding: 0 12px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero-title-lg { font-size: 36px !important; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .intro-statement { font-size: 21px; }
}

/* watchlist: compact, one line per field; tap to expand */
.watch-grid, .alert-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.wl-card { padding: 14px 16px; gap: 6px; cursor: pointer; min-width: 0; }
.wl-card .feed-meta { font-size: 12px; }
.wl-card h4 { font-size: 14px; line-height: 1.35; }
.wl-card .watch-headline { font-size: 13px; line-height: 1.4; }
.wl-card .muted.small { font-size: 12.5px; }
.wl-line { font-size: 13px; line-height: 1.4; }
.wl-old { color: var(--muted); text-decoration: line-through; }
.wl-new { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.wl-new .ico { width: 14px; height: 14px; flex: none; color: var(--gold-600); }
.wl-new span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wl-card.is-expanded .one-line, .wl-card.is-expanded .wl-new span { white-space: normal; overflow: visible; }
.wl-card .inline-form { gap: 8px; }
.wl-card .watch-foot { padding-top: 8px; font-size: 12.5px; }
.wl-card .type-chip { font-size: 10.5px; }
.wl-card .mentions { font-size: 12px; }
.wl-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* library (files app) */
.lib { display: grid; gap: 18px; }
.lib-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; font-weight: 600; min-width: 0; }
.crumbs a, .crumbs > span[aria-current] { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--text-2) !important; }
.crumbs > span[aria-current], .crumbs a[aria-current] { color: var(--text) !important; }
.crumbs .ico { width: 18px; height: 18px; color: var(--primary); }
.crumb-sep .ico { width: 14px; height: 14px; color: var(--muted); }
.lib-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-search { position: relative; display: block; }
.lib-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.v2 .lib-search input { padding-left: 36px; width: min(280px, 60vw); }
.v2 .lib-tools select { width: auto; min-width: 120px; }
.lib-view button { display: inline-grid; place-items: center; padding: 6px 10px; }
.lib-view .ico { width: 18px; height: 18px; }
.lib-h { font: 700 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.lib-folders, .lib-files { list-style: none; display: grid; gap: 12px; }
.lib.is-grid .lib-folders { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.lib.is-grid .lib-files { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.lib-folder-link, .lib-file-btn { width: 100%; display: grid; gap: 8px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; color: var(--text) !important; text-decoration: none !important; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; min-width: 0; }
.lib-folder-link:hover, .lib-file-btn:hover { border-color: var(--blue-400); box-shadow: var(--shadow-sm); }
.lib-folder-link:active, .lib-file-btn:active { transform: scale(.99); }
.lib-folder-ico { display: grid; place-items: center; width: 52px; height: 42px; border-radius: 8px 12px 12px 12px; background: linear-gradient(180deg, #7fb0e6, #4a83c9); color: #fff; position: relative; }
.lib-folder-ico::before { content: ""; position: absolute; top: -6px; left: 0; width: 22px; height: 10px; border-radius: 6px 6px 0 0; background: #7fb0e6; }
.lib-folder-ico .ico { width: 20px; height: 20px; }
.lib-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.lib-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.lib-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-date { flex: none; }
.lib-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--primary); flex: none; }
.lib-ico .ico { width: 20px; height: 20px; }
.kind-sheet .lib-ico, .lib-ico.kind-sheet { background: #e3f4ea; color: #1e8e3e; }
.kind-slides .lib-ico, .lib-ico.kind-slides { background: #fdf0d9; color: #b06000; }
.kind-doc .lib-ico, .lib-ico.kind-doc { background: #e5eefc; color: #1a5fd0; }
.kind-watch .lib-ico, .lib-ico.kind-watch { background: #f1e8fb; color: #7b3fc4; }
.kind-person .lib-ico, .lib-ico.kind-person, .kind-org .lib-ico, .lib-ico.kind-org { background: #e6f3f7; color: #0f7490; }
.kind-task .lib-ico, .lib-ico.kind-task { background: #fdecea; color: #c5221f; }
.kind-travel .lib-ico, .lib-ico.kind-travel { background: #fff4e0; color: #a35a00; }
.kind-folder .lib-ico, .lib-ico.kind-folder { background: #e8f0fb; color: #4a83c9; }
/* list view */
.lib.is-list .lib-folders, .lib.is-list .lib-files { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.lib.is-list .lib-folder-link, .lib.is-list .lib-file-btn { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; row-gap: 2px; border: 0; border-radius: 0; border-bottom: 1px solid var(--border); padding: 10px 16px; min-height: 60px; box-shadow: none; }
.lib.is-list li:last-child > .lib-folder-link, .lib.is-list li:last-child > .lib-file-btn { border-bottom: 0; }
.lib.is-list .lib-folder-ico { width: 40px; height: 32px; }
.lib.is-list .lib-folder-ico::before { width: 16px; height: 8px; top: -5px; }
.lib.is-list .lib-name { -webkit-line-clamp: 1; display: block; white-space: nowrap; text-overflow: ellipsis; }
.lib.is-list .lib-meta { flex-direction: column; align-items: flex-end; gap: 0; text-align: right; max-width: 140px; }
.lib-file[hidden], .lib-folder[hidden] { display: none; }
.ask-card summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; min-height: 44px; }
.ask-card summary::-webkit-details-marker { display: none; }
.ask-card summary > span:last-child { display: grid; }
.ask-card[open] summary { margin-bottom: 12px; }
.ask-card .ask-form { display: flex; gap: 8px; }
.ask-card .right { margin-top: 8px; }
.sheet-scrim { position: fixed; inset: 0; background: rgba(8,18,31,.45); z-index: 119; }
.file-sheet { position: fixed; z-index: 120; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 640px); overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 20px 22px 22px; display: grid; gap: 14px; }
.fs-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.fs-head h3 { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.fs-summary { color: var(--text-2); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.fs-actions { display: flex; gap: 10px; flex-wrap: wrap; }
body.sheet-open { overflow: hidden; }
@media (max-width: 640px) {
  .lib-bar { align-items: stretch; }
  .lib-tools { width: 100%; }
  .lib-search { flex: 1; }
  .v2 .lib-search input { width: 100%; }
  .lib.is-grid .lib-folders, .lib.is-grid .lib-files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lib.is-list .lib-meta { max-width: 92px; }
  .lib.is-list .lib-type { max-width: 92px; }
  .file-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 85vh; border-radius: 20px 20px 0 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .fs-actions .btn { flex: 1; }
}

/* weekly wrap-up */
.wrap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.wrap-title { font-size: 22px; }
.week-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip-light { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2) !important; text-decoration: none !important; }
.day-chip-light.is-on { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.kpi-delta { font-size: 12px; font-weight: 700; margin-top: 2px !important; }
.kpi-delta.up { color: var(--green-600); } .kpi-delta.down { color: #c5221f; } .kpi-delta.flat { color: var(--muted); }
.kpi-delta .muted { font-weight: 500; }
.wrap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg-cur { background: var(--primary); } .lg-prev { background: #d5deea; margin-left: 6px; }
.hbars { list-style: none; display: grid; gap: 14px; margin-top: 14px; }
.hbars li { display: grid; grid-template-columns: auto minmax(0, 1fr) 32px; gap: 12px; align-items: center; }
.hbar-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 4px !important; }
.hbar { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hbar-prev, .hbar-cur { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.hbar-prev { background: #d5deea; }
.hbar-cur { background: linear-gradient(90deg, var(--blue-600), var(--blue-400)); height: 8px; top: 2px; min-width: 0; }
.hbar-val { text-align: right; font: 600 16px var(--font-display); }
.vbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 190px; align-items: end; margin: 16px 0 10px; }
.vbar-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; gap: 6px; }
.vbar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.vbar { width: min(18px, 40%); border-radius: 6px 6px 2px 2px; position: relative; min-height: 2px; }
.vbar-prev { background: #d5deea; }
.vbar-cur { background: linear-gradient(180deg, var(--blue-400), var(--blue-600)); }
.vbar-cur b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--text-2); }
.vbar-label { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.cat-bars { list-style: none; display: grid; gap: 12px; margin-top: 14px; }
.cat-bars li { display: grid; grid-template-columns: auto minmax(90px, 160px) minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: 13.5px; }
.cat-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--blue-50); color: var(--primary); }
.cat-ico .ico { width: 16px; height: 16px; }
.cat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cat-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-500), #e0b867); }
.cat-bars b { text-align: right; }
.timeline { list-style: none; display: grid; gap: 0; margin-top: 10px; position: relative; }
.timeline li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.tl-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); }
.slide-head { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 960px) { .wrap-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .cat-bars li { grid-template-columns: auto minmax(70px, 110px) minmax(0, 1fr) 24px; } .vbars { height: 160px; gap: 4px; } }

/* travel */
.travel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.travel-main { display: grid; gap: 16px; min-width: 0; }
.travel-form { display: grid; gap: 14px; }
.travel-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.input-with-btn { display: flex; gap: 6px; }
.input-with-btn input { flex: 1; min-width: 0; }
.input-with-btn .icon-btn { border: 1px solid var(--border-strong); background: var(--surface); flex: none; }
.travel-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg-radio { position: relative; display: inline-flex; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 7px; font: 600 var(--fs-sm) var(--font-body); color: var(--text-2); cursor: pointer; }
.seg-radio input:checked + span { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--focus); }
.map-card { overflow: hidden; }
.map-frame { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); }
.map-dest { display: flex; gap: 10px; align-items: center; min-width: 0; }
.map-dest > div { display: grid; min-width: 0; }
.map-dest strong { overflow-wrap: anywhere; }
.map-note { padding: 0 18px 14px; }
.moovit-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #ff7300; color: #fff; font: 800 11px var(--font-body); }
.travel-side { display: grid; gap: 12px; min-width: 0; }
.trip-list { list-style: none; display: grid; gap: 10px; }
.trip { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px; border-left: 4px solid var(--src-tbt); }
.trip.src-maharishi { border-left-color: var(--src-maharishi, #b8893a); }
.trip-when { display: grid; justify-items: center; align-content: start; background: var(--surface-2); border-radius: 10px; padding: 6px 0; }
.trip-when b { font: 600 20px/1 var(--font-display); }
.trip-when span { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.trip-body { display: grid; gap: 4px; min-width: 0; }
.trip-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-loc { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); }
.trip-loc .ico { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--primary); }
.trip-loc span { overflow-wrap: anywhere; }
.trip-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 1180px) { .travel-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .travel-fields { grid-template-columns: minmax(0, 1fr); }
  .travel-actions .segmented { width: 100%; }
  .travel-actions .seg-radio { flex: 1; }
  .travel-actions .seg-radio span { width: 100%; justify-content: center; }
  .travel-actions .btn { width: 100%; }
  .map-frame { aspect-ratio: 4 / 5; }
  .map-foot .btn-row { width: 100%; }
  .map-foot .btn-row .btn { flex: 1; }
}
@media (pointer: coarse) { .seg-radio span { min-height: 44px; } .day-chip-light { min-height: 44px; } .lib-view button { min-width: 44px; min-height: 44px; } .footer-links a { min-height: 44px; } }
.earlier-wrap summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; cursor: pointer; min-height: 44px; align-items: center; }
.earlier-wrap[open] summary { margin-bottom: 14px; }
.wrap-any { overflow-wrap: anywhere; word-break: break-all; }
@media (pointer: coarse) {
  [data-lib-view] { min-height: 44px; min-width: 44px; }
  .top-actions .btn-sm, .btn-sm:has(.hide-sm) { min-width: 44px; min-height: 44px; }
}
.hbar-label strong { flex: none; }
.hbar-label .muted { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tag-red { background: #fee4e2; border-color: transparent; color: #b42318; }

/* 11 Nov 2026: no caption overlay on the stage. Optional live text sits in the side panel. */
.meet-top { position: relative; }
.transcript-menu { position: relative; margin-left: auto; }
.transcript-menu > summary { list-style: none; cursor: pointer; color: #c3cdda !important; background: rgba(255,255,255,.06); border-radius: 9px; display: inline-flex; align-items: center; }
.transcript-menu > summary::-webkit-details-marker { display: none; }
.transcript-menu > summary:hover, .transcript-menu[open] > summary { background: rgba(255,255,255,.12); color: #fff !important; }
.transcript-menu > summary .ico { width: 16px; height: 16px; }
.transcript-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; background: var(--surface); color: var(--text); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px; display: grid; gap: 2px; }
.transcript-pop p { padding: 2px 6px 6px; margin: 0; }
.transcript-pop .muted { color: var(--muted) !important; }
.transcript-pop a { padding: 9px 10px; border-radius: 8px; color: var(--text) !important; text-decoration: none !important; font-size: var(--fs-sm); font-weight: 600; }
.transcript-pop a:hover, .transcript-pop a:focus-visible { background: var(--blue-50); color: var(--primary) !important; }
.live-line { border-left: 3px solid var(--blue-400); background: var(--blue-50); border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.45; position: sticky; top: -14px; z-index: 1; }
.live-line-who { font-weight: 700; color: var(--primary); font-size: 12px; }
.live-line-text { margin: 2px 0 0 !important; color: var(--text-2); max-height: 4.4em; overflow: hidden; }
.ctl-cc { opacity: .7; }
.ctl-cc.is-on { opacity: 1; }
@media (max-width: 640px) {
  .transcript-menu { margin-left: 0; order: 3; }
  .transcript-menu > summary span { display: inline; }
  .transcript-pop { left: 0; right: auto; width: min(260px, calc(100vw - 24px)); }
}

/* On-screen keyboard (set by hub.js from window.visualViewport): --kb-inset is the
   keyboard height, --vvh the visible height. Keep composers above the keyboard and
   hide fixed/sticky bars that would otherwise sit behind it. */
:root { --kb-inset: 0px; }
html.kb-open .bottom-nav, html.kb-open .controls { display: none !important; }
html.kb-open .toast-stack { bottom: calc(var(--kb-inset) + 12px) !important; }
/* while typing, give the visible height to the conversation: no contacts strip, no min-heights */
html.kb-open body.page-chat .chat-layout { min-height: 0; height: auto; }
html.kb-open body.page-chat .chat-list { display: none; }
html.kb-open body.page-chat .chat-pane { height: calc(var(--vvh, 100dvh) - var(--kb-fit-top, 58px)); min-height: 0; }
html.kb-open .chat-composer { padding-bottom: 10px; }
/* room to scroll a lower composer (stand-up chat, archive search) clear of the keyboard */
html.kb-open body:not(.page-chat) .content { padding-bottom: calc(var(--kb-inset) + 16px) !important; }
html.kb-open .panel-composer, html.kb-open .ask-form { scroll-margin-bottom: 12px; }
@media (max-width: 640px) {
  html.kb-open body.page-chat .chat-pane { height: calc(var(--vvh, 100dvh) - var(--kb-fit-top, 58px)); min-height: 0; }
  html.kb-open body.page-chat .chat-head { padding-top: 6px; padding-bottom: 6px; }
  .v2 .chat-composer textarea, .v2 .panel-composer textarea, .v2 .ask-form input { font-size: 16px; }
}

/* chat: delivery note under the composer */
.chat-status { padding: 0 18px 10px; margin: -4px 0 0; background: var(--surface); }
html.kb-open .chat-status { display: none; }
@media (max-width: 640px) { .chat-status { padding: 0 14px max(8px, env(safe-area-inset-bottom)); font-size: 12px; } }
