:root {
  --bg: #212121;
  --bg-soft: #1a1a1a;
  --sidebar: #171717;
  --surface: #2f2f2f;
  --surface-soft: #262626;
  --surface-strong: #343541;
  --surface-border: #3f3f46;
  --surface-border-soft: #2d2d2d;
  --text: #ececec;
  --text-muted: #a9a9b2;
  --text-faint: #7b7b85;
  --accent: #10a37f;
  --accent-strong: #0f766e;
  --accent-hover: #0d8c6e;
  --user-bubble: #303030;
  --assistant-row: #2a2b32;
  --danger: #b04242;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-main: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell-sidebar-width: clamp(196px, 18vw, 252px);
  --page-max-width: 1280px;
  --page-gutter: clamp(0.9rem, 2vw, 1.5rem);
  --page-stage-radius: clamp(26px, 3vw, 34px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-topbar-height: 72px;
  --mobile-bottom-nav-height: 0px;
  --mobile-topbar-overlay-offset: calc(var(--mobile-topbar-height) + var(--safe-top) + 0.35rem);
  --desktop-shell-launcher-reserve: clamp(20rem, 28vw, 26rem);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  overflow-y: visible;
  overflow-x: hidden;
  overflow-x: clip;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(180deg, #202123 0%, #1f1f1f 100%);
  color: var(--text);
  font-family: var(--font-main);
}

body.theme-ocean {
  --accent: #2b8bdc;
  --accent-strong: #1667b8;
  --accent-hover: #227bc3;
  background:
    radial-gradient(circle at top, rgba(122, 204, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #171d2a 0%, #171c23 100%);
}

body.theme-ember {
  --accent: #d9772a;
  --accent-strong: #b85a1f;
  --accent-hover: #c76724;
  background:
    radial-gradient(circle at top, rgba(255, 192, 120, 0.08), transparent 30%),
    linear-gradient(180deg, #241c18 0%, #1f1916 100%);
}

body.chat-processing,
body.chat-processing * {
  cursor: progress;
}

details:not([open]) > :not(summary) {
  display: none;
}

a {
  color: inherit;
}

.shell-layout {
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  overflow: visible;
}

.shell-sidebar-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sidebar-mobile-header,
.mobile-utility-bar,
.mobile-topbar,
.mobile-menu-shell {
  display: none;
}

.shell-sidebar-backdrop {
  display: block;
}

.mobile-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: calc(var(--safe-top) + 0.55rem) 0.85rem 0.6rem;
  min-height: calc(var(--mobile-topbar-height) + var(--safe-top));
  overflow: visible;
  isolation: isolate;
  background: none;
  border-bottom: 0;
  box-shadow: none;
}

.mobile-topbar > * {
  position: relative;
  z-index: 1;
}

.mobile-topbar--fade::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 16, 18, 0.92) 0%, rgba(16, 16, 18, 0.82) 34%, rgba(16, 16, 18, 0.42) 66%, rgba(16, 16, 18, 0.12) 84%, rgba(16, 16, 18, 0) 100%),
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 14%, transparent), transparent 48%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.94) 30%, rgba(0, 0, 0, 0.48) 68%, rgba(0, 0, 0, 0.12) 84%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.94) 30%, rgba(0, 0, 0, 0.48) 68%, rgba(0, 0, 0, 0.12) 84%, rgba(0, 0, 0, 0) 100%);
}

.mobile-topbar-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: none;
}

.mobile-topbar-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.mobile-topbar-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.mobile-topbar-kicker {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mobile-topbar-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  line-height: 1.15;
}

.mobile-topbar--think-branch .mobile-topbar-title {
  color: #f3f7ff;
  letter-spacing: 0.01em;
}

.mobile-topbar--think-branch .mobile-topbar-home {
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.mobile-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.mobile-menu-trigger-icon {
  display: grid;
  gap: 4px;
}

.mobile-menu-trigger-icon span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-trigger-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.mobile-menu-shell {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%),
    linear-gradient(180deg, #16181d 0%, #131418 100%);
}

.mobile-menu-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  padding: 0.95rem 1rem 1.1rem;
  overflow-y: auto;
}

.mobile-menu-scroll > * + * {
  margin-top: 0.95rem;
}

.mobile-menu-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
  padding: 0.88rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 28%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.mobile-menu-hero-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.mobile-menu-hero-copy {
  display: grid;
  gap: 0.24rem;
}

.mobile-menu-kicker,
.mobile-menu-section-kicker {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mobile-menu-hero-copy h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.mobile-menu-hero-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.38;
}

.mobile-menu-hero-copy .mobile-menu-lane-row {
  margin-top: 0.28rem;
}

.mobile-menu-section {
  display: grid;
  gap: 0.7rem;
}

.mobile-menu-section-heading {
  display: grid;
  gap: 0.18rem;
}

.mobile-menu-lane-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.mobile-menu-lane-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.mobile-menu-lane-pill.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.08));
}

.mobile-menu-lane-note {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.mobile-menu-branch {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.mobile-menu-branch-summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.mobile-menu-branch-summary::-webkit-details-marker {
  display: none;
}

.mobile-menu-branch-summary::after {
  content: "+";
  color: var(--text-faint);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 180ms ease, color 180ms ease;
}

.mobile-menu-branch[open] > .mobile-menu-branch-summary::after {
  transform: rotate(45deg);
  color: var(--text);
}

.mobile-menu-branch--static > .mobile-menu-branch-summary::after {
  content: none;
}

.mobile-menu-branch-copy {
  display: grid;
  gap: 0.18rem;
}

.mobile-menu-branch-copy strong {
  font-size: 0.98rem;
  line-height: 1.24;
}

.mobile-menu-branch-copy span {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.mobile-menu-branch-body {
  display: grid;
  gap: 0.8rem;
  padding: 0 1rem 1rem;
}

.mobile-menu-action-list {
  display: grid;
  gap: 0.72rem;
}

.mobile-menu-action,
.mobile-menu-action--button {
  width: 100%;
  display: grid;
  gap: 0.28rem;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.mobile-menu-action strong,
.mobile-menu-action--button strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.mobile-menu-action span,
.mobile-menu-action--button span {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.mobile-menu-action small,
.mobile-menu-action--button small {
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-menu-action.is-current,
.mobile-menu-action--button.is-current {
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 18%, transparent), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.mobile-menu-action--locked {
  border-style: dashed;
  color: var(--text-muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.mobile-menu-action--locked small {
  color: #f3c987;
}

.mobile-menu-action-form {
  margin: 0;
}

.mobile-menu-action--button {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.mobile-menu-auth-form {
  gap: 0.72rem;
}

.mobile-menu-user-card {
  margin-bottom: 0.15rem;
}

.mobile-menu-feedback {
  width: 100%;
}

.mobile-menu-language .mobile-menu-branch-body {
  padding-top: 0;
}

.language-preference-heading {
  min-width: 0;
}

.language-preference-control {
  display: grid;
  gap: 0.28rem;
}

.language-preference-select {
  min-height: 44px;
  padding: 0.62rem 0.78rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.25;
}

.language-preference-select option {
  color: #111418;
  background: #f8faf9;
}

.language-preference-note {
  margin: -0.08rem 0 0;
  color: var(--text-faint);
  font-size: 0.76rem;
  line-height: 1.35;
}

.sidebar-language {
  gap: 0.55rem;
}

.mobile-chat-branch-hint {
  display: none;
}

.mobile-bottom-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: stretch;
  padding: 0.45rem 0.65rem calc(var(--safe-bottom) + 0.45rem);
  min-height: calc(var(--mobile-bottom-nav-height) + var(--safe-bottom));
  background: rgba(20, 20, 21, 0.92);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-topbar .mobile-sidebar-open,
.mobile-bottom-nav {
  transition: opacity 180ms ease, transform 180ms ease;
}

.mobile-bottom-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.55rem;
  border-radius: 18px;
  text-decoration: none;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mobile-bottom-link.active {
  color: var(--text);
  background: rgba(16, 163, 127, 0.16);
  border-color: rgba(16, 163, 127, 0.24);
}

.shell-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%),
    var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
  border-radius: 0 28px 28px 0;
  min-width: 0;
  width: clamp(280px, 26vw, 360px);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  transform: translateX(calc(-100% - 1rem));
  transition: transform 220ms ease;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.sidebar-scroll {
  display: block;
  padding: 0.72rem clamp(0.58rem, 0.85vw, 0.8rem) 0.84rem;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.sidebar-scroll > * + * {
  margin-top: 0.72rem;
}

.shell-sidebar-toggle:checked ~ .shell-layout .shell-sidebar {
  transform: translateX(0);
}

.shell-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(10, 10, 11, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(8px);
}

.shell-sidebar-toggle:checked ~ .shell-sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.shell-sidebar-toggle:checked ~ .shell-layout .shell-main {
  pointer-events: none;
  user-select: none;
}

.shell-sidebar-toggle:checked ~ .shell-layout .desktop-shell-open {
  background: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.05));
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.08));
}

body.shell-overlay-open {
  overflow: hidden;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem 0.85rem;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-brand-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.sidebar-brand-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.sidebar-desktop-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
}

.sidebar-desktop-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.sidebar-desktop-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-primary {
  display: grid;
  gap: 0.6rem;
}

.sidebar-focus-stack {
  display: grid;
  gap: 0.85rem;
}

.sidebar-primary form {
  margin: 0;
}

.sidebar-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.92rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-action--secondary {
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
}

.sidebar-action:hover,
.sidebar-nav a:hover,
.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.72rem 0.9rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.sidebar-shell-guide {
  display: grid;
  gap: 0.3rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.024);
}

.sidebar-shell-eyebrow {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-shell-headline {
  font-size: 0.94rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.sidebar-shell-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.34;
}

.sidebar-shell-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding-top: 0.38rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-shell-meta .mobile-menu-lane-pill {
  min-height: 28px;
  padding: 0.28rem 0.62rem;
  font-size: 0.78rem;
}

.sidebar-shell-meta-note {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.sidebar-panel--task-flow {
  gap: 0.48rem;
}

.sidebar-workflow-heading {
  display: grid;
  gap: 0.1rem;
}

.sidebar-workflow-list {
  display: grid;
  gap: 0.34rem;
}

.sidebar-workflow-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.56rem;
  padding: 0.58rem 0.68rem;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.sidebar-workflow-link-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}

.sidebar-workflow-link-copy strong {
  font-size: 0.86rem;
  line-height: 1.18;
}

.sidebar-workflow-link-copy span {
  display: none;
}

.sidebar-workflow-link-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sidebar-workflow-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-workflow-link.is-current {
  border-color: rgba(16, 163, 127, 0.24);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 15%, transparent), transparent 52%),
    rgba(255, 255, 255, 0.045);
}

.sidebar-workflow-link.is-current .sidebar-workflow-link-meta {
  color: #c7f5e7;
  background: rgba(16, 163, 127, 0.14);
  border-color: rgba(16, 163, 127, 0.24);
}

.sidebar-workflow-link--locked {
  border-style: dashed;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.018);
}

.sidebar-workflow-link--locked .sidebar-workflow-link-meta {
  color: #f3c987;
  border-color: rgba(243, 201, 135, 0.24);
  background: rgba(243, 201, 135, 0.08);
}

.sidebar-workflow-panel {
  gap: 0;
}

.sidebar-library-panel {
  padding: 0;
}

.sidebar-library-body {
  gap: 0.78rem;
}

.sidebar-primary--library {
  gap: 0.72rem;
}

.sidebar-primary--library:empty {
  display: none;
}

.sidebar-panel {
  display: grid;
  gap: 0.68rem;
  padding: 0.84rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-panel-title {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.sidebar-panel--compact {
  gap: 0.6rem;
}

.sidebar-compact-heading {
  display: grid;
  gap: 0.14rem;
}

.sidebar-shortcut-list {
  display: grid;
  gap: 0.42rem;
}

.sidebar-shortcut-form {
  margin: 0;
}

.sidebar-shortcut,
.sidebar-shortcut--button {
  width: 100%;
  display: grid;
  gap: 0.12rem;
  padding: 0.72rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.sidebar-shortcut--button {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.sidebar-shortcut strong,
.sidebar-shortcut--button strong {
  font-size: 0.89rem;
  line-height: 1.22;
}

.sidebar-shortcut-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-shortcut span,
.sidebar-shortcut--button span {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.34;
}

.sidebar-shortcut:hover,
.sidebar-shortcut--button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-shortcut--current {
  background:
    linear-gradient(180deg, rgba(16, 163, 127, 0.12), rgba(16, 163, 127, 0.06)),
    rgba(255, 255, 255, 0.025);
  border-color: rgba(16, 163, 127, 0.22);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.08);
}

.sidebar-shortcut--current:hover {
  background:
    linear-gradient(180deg, rgba(16, 163, 127, 0.16), rgba(16, 163, 127, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.sidebar-shortcut-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  align-items: center;
  margin-top: 0.2rem;
}

.sidebar-panel--disclosure {
  display: block;
  padding: 0;
  overflow: hidden;
}

.sidebar-panel-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem;
  cursor: pointer;
}

.sidebar-panel-summary::-webkit-details-marker {
  display: none;
}

.sidebar-panel-summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  color: var(--text-faint);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.sidebar-panel--disclosure[open] > .sidebar-panel-summary::after {
  content: "−";
}

.sidebar-panel-summary-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.sidebar-panel-summary-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.sidebar-panel-summary-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.sidebar-panel-body {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.95rem 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feedback-guidance {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-guidance strong {
  font-size: 0.88rem;
}

.feedback-guidance-list {
  margin: 0;
  padding-inline-start: 1.1rem;
  display: grid;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.feedback-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.feedback-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 10, 11, 0.66);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.feedback-modal {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 88dvh);
  overflow: auto;
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 14%),
    var(--sidebar);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

html[data-ui-direction="rtl"] .feedback-modal,
html[data-ui-direction="rtl"] .conversation-bubble,
html[data-ui-direction="rtl"] .sidebar,
html[data-ui-direction="rtl"] .desktop-shell-bar {
  text-align: start;
}

html[data-ui-direction="rtl"] input,
html[data-ui-direction="rtl"] textarea,
html[data-ui-direction="rtl"] select {
  text-align: start;
}

.feedback-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.feedback-modal-copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.feedback-modal-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
}

.feedback-modal-kicker {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feedback-form {
  gap: 0.9rem;
}

.feedback-modal-close {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

body.feedback-modal-open {
  overflow: hidden;
}

body.ui-language-onboarding-open {
  overflow: hidden;
}

.ui-language-onboarding {
  z-index: 70;
}

.ui-language-dialog {
  width: min(560px, 100%);
}

.ui-language-dialog-control {
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.conversation-list {
  display: grid;
  gap: 0.6rem;
}

.conversation-list--sidebar {
  max-height: clamp(12rem, 34vh, 18rem);
  overflow-y: auto;
  padding-right: 0.18rem;
}

.conversation-list-item {
  display: grid;
  gap: 0.28rem;
  padding: 0.82rem 0.9rem;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.conversation-list-item.active,
.conversation-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.conversation-list-item.active {
  border-color: rgba(16, 163, 127, 0.26);
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.18);
}

.conversation-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
  align-items: flex-start;
}

.conversation-list-title-row strong {
  min-width: 0;
  font-size: 0.9rem;
}

.conversation-list-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.pin-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(16, 163, 127, 0.14);
  color: #c7f5e7;
  border: 1px solid rgba(16, 163, 127, 0.24);
}

.stream-state-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.stream-state-chip.interrupted {
  background: rgba(196, 132, 16, 0.18);
  color: #ffe7b3;
  border-color: rgba(196, 132, 16, 0.3);
}

.stream-state-chip.streaming {
  background: rgba(88, 154, 255, 0.18);
  color: #dce9ff;
  border-color: rgba(88, 154, 255, 0.3);
}

.stream-state-chip.cancelled {
  background: rgba(191, 90, 36, 0.18);
  color: #ffd5bf;
  border-color: rgba(191, 90, 36, 0.3);
}

.conversation-list-meta,
.conversation-list-snippet {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.memory-list {
  display: grid;
  gap: 0.7rem;
}

.memory-tier-list {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.memory-tier-card {
  display: grid;
  gap: 0.22rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.memory-section-title {
  margin-bottom: 0.55rem;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.memory-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dismissed-memory-item {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

.memory-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.memory-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.memory-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.memory-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.memory-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.76rem;
}

.sidebar-user-card,
.sidebar-ticket-status {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.sidebar-metric:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-metric span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.sidebar-metric strong {
  font-size: 0.92rem;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-footer {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  min-width: 0;
}

.shell-sidebar code,
.sidebar-panel code,
.sidebar-footer code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar-user-name {
  font-weight: 700;
}

.sidebar-user-meta,
.sidebar-guest {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.sidebar-logout {
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.shell-main {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  max-height: none;
  overflow: visible;
}

.shell-main,
.mobile-menu-scroll,
.sidebar-scroll,
.chat-home-shell--anchored .chat-thread {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.shell-main::-webkit-scrollbar,
.mobile-menu-scroll::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar,
.chat-home-shell--anchored .chat-thread::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.shell-main::-webkit-scrollbar-track,
.mobile-menu-scroll::-webkit-scrollbar-track,
.sidebar-scroll::-webkit-scrollbar-track,
.chat-home-shell--anchored .chat-thread::-webkit-scrollbar-track {
  background: transparent;
}

.shell-main::-webkit-scrollbar-thumb,
.mobile-menu-scroll::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb,
.chat-home-shell--anchored .chat-thread::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.16);
  background-clip: padding-box;
}

.shell-main::-webkit-scrollbar-thumb:hover,
.mobile-menu-scroll::-webkit-scrollbar-thumb:hover,
.sidebar-scroll::-webkit-scrollbar-thumb:hover,
.chat-home-shell--anchored .chat-thread::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
  background-clip: padding-box;
}

.page {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 1.3rem var(--page-gutter) 2rem;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: clamp(0.8rem, 1.2vw, 1rem);
  min-height: 0;
  --page-block-padding: 3.5rem;
  --page-shell-top-offset: 4.8rem;
  padding-top: var(--page-shell-top-offset);
}

.desktop-shell-bar {
  position: fixed;
  top: 1rem;
  left: max(1rem, calc((100vw - var(--page-max-width)) / 2 + var(--page-gutter)));
  right: max(1rem, calc((100vw - var(--page-max-width)) / 2 + var(--page-gutter)));
  z-index: 22;
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  min-width: 0;
  pointer-events: none;
}

.desktop-shell-summary {
  display: none;
}

.desktop-shell-open {
  flex: none;
  pointer-events: auto;
}

.desktop-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  pointer-events: auto;
}

.desktop-shell-action {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  flex: 1 1 9.7rem;
  min-width: 7.8rem;
  min-height: 44px;
  max-width: 10.8rem;
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.desktop-shell-action:hover,
.desktop-shell-action:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.035));
}

.desktop-shell-action.is-current {
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.055);
}

.desktop-shell-action--locked {
  border-style: dashed;
  color: var(--text-muted);
}

.desktop-shell-action-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.05rem;
}

.desktop-shell-action-icon::before,
.desktop-shell-action-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.desktop-shell-action--chat .desktop-shell-action-icon::before {
  inset: 0.08rem 0.04rem 0.22rem;
  border: 2px solid #8fd3ff;
  border-radius: 999px;
  background: rgba(143, 211, 255, 0.14);
}

.desktop-shell-action--chat .desktop-shell-action-icon::after {
  left: 0.27rem;
  bottom: 0.08rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 0.03rem;
  background: #8fd3ff;
  transform: rotate(45deg);
}

.desktop-shell-action--drive .desktop-shell-action-icon::before {
  left: 0.08rem;
  right: 0.08rem;
  bottom: 0.08rem;
  height: 0.72rem;
  border-radius: 0.22rem;
  background: linear-gradient(180deg, #5bd0aa, #249178);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.desktop-shell-action--drive .desktop-shell-action-icon::after {
  top: 0.08rem;
  left: 0.16rem;
  width: 0.58rem;
  height: 0.32rem;
  border-radius: 0.18rem 0.18rem 0.05rem 0.05rem;
  background: #8fe6c5;
}

.desktop-shell-action--merchant .desktop-shell-action-icon::before {
  inset: 0.02rem 0.1rem;
  border-radius: 999px;
  border: 2px solid #ffd166;
  background: rgba(255, 209, 102, 0.13);
}

.desktop-shell-action--merchant .desktop-shell-action-icon::after {
  left: 0.43rem;
  top: 0.22rem;
  width: 0.28rem;
  height: 0.55rem;
  border-right: 0.14rem solid #ffd166;
  border-bottom: 0.14rem solid #ffd166;
  transform: rotate(42deg);
}

.desktop-shell-action--tech .desktop-shell-action-icon::before {
  left: 0.16rem;
  top: 0.44rem;
  width: 1rem;
  height: 0.2rem;
  border-radius: 999px;
  background: #b8c5ff;
  transform: rotate(-38deg);
}

.desktop-shell-action--tech .desktop-shell-action-icon::after {
  right: 0.06rem;
  top: 0.05rem;
  width: 0.46rem;
  height: 0.46rem;
  border: 0.16rem solid #b8c5ff;
  border-left-color: transparent;
  border-radius: 999px;
  transform: rotate(-38deg);
}

.desktop-shell-action--admin .desktop-shell-action-icon::before {
  inset: 0.02rem 0.12rem 0;
  clip-path: polygon(50% 0, 88% 18%, 78% 76%, 50% 100%, 22% 76%, 12% 18%);
  background: linear-gradient(180deg, #f0a6ff, #a978ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.desktop-shell-action--admin .desktop-shell-action-icon::after {
  left: 0.58rem;
  top: 0.22rem;
  width: 0.15rem;
  height: 0.56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.desktop-shell-action-copy {
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.desktop-shell-action-copy strong,
.desktop-shell-action-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-shell-action-copy strong {
  font-size: 0.86rem;
  line-height: 1.08;
}

.desktop-shell-action-copy small {
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

@media (min-width: 921px) {
  .page > .chat-home-header,
  .page > .hero,
  .page > .chat-home-shell > .chat-home-header,
  .page [data-authoritative-surface] > .chat-home-shell > .chat-home-header {
    padding-inline-start: var(--desktop-shell-launcher-reserve);
  }
}

@media (min-width: 921px) and (max-width: 1120px) {
  .page {
    --page-shell-top-offset: 5.8rem;
  }

  .desktop-shell-actions {
    flex-wrap: wrap;
  }

  .desktop-shell-action {
    flex-basis: 8.9rem;
    max-width: 9.6rem;
  }
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--page-stage-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018) 18%, rgba(255, 255, 255, 0.008) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 28px 70px rgba(0, 0, 0, 0.16);
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 14%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35) 52%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35) 52%, rgba(0, 0, 0, 0) 100%);
  opacity: 0.85;
}

.page--live-chat-shell,
.page:has(.chat-home-shell--live-session),
.page:has(#tech-chat:not(.chat-home-shell--landing)),
.page:has(#admin-chat:not(.chat-home-shell--landing)) {
  padding-bottom: 0;
}

.page > *:not(.desktop-shell-bar) {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero {
  margin-bottom: 1rem;
  padding: 0.5rem 0 0.25rem;
}

.hero h1,
.chat-home-header h1 {
  margin: 0.4rem 0 0.5rem;
  font-size: clamp(2rem, 3vw, 2.9rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede,
.summary,
.subtle,
.composer-note {
  color: var(--text-muted);
}

.summary,
.subtle,
.panel p,
.panel li,
.callout,
.case-evidence-note,
.case-evidence-excerpt {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.memory-edit-panel {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.memory-edit-field {
  display: grid;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.memory-edit-field select {
  appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.mode-banner {
  margin: 0.85rem 0 0;
  color: #d6f5ec;
  background: rgba(16, 163, 127, 0.12);
  border: 1px solid rgba(16, 163, 127, 0.2);
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 700;
}

.panel-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.panel-grid > *,
.workspace-grid > * {
  min-width: 0;
}

.panel > *,
.callout > *,
.clean-list > *,
.compact-list > *,
.button-row > *,
.callout-actions > * {
  min-width: 0;
}

.mobile-section-nav {
  display: none;
}

.tech-inspection-cta {
  width: min(860px, 100%);
  margin: 0 auto;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide {
  grid-column: span 3;
}

.panel {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.form-panel,
.info-panel,
.signal-panel,
.step-panel {
  min-height: 100%;
}

form,
.stack-form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.42rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.88rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(16, 163, 127, 0.5);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.16);
}

.button-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-row form,
.callout-actions form {
  min-width: 0;
  width: auto;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  max-width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.72;
  cursor: progress;
  transform: none;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-hover);
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.danger {
  background: var(--danger);
  color: white;
}

.nav-button {
  width: 100%;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.85rem;
}

.metric-label {
  color: var(--text-faint);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.label-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(16, 163, 127, 0.12);
  color: #b9f1df;
  border: 1px solid rgba(16, 163, 127, 0.18);
  font-size: 0.82rem;
  font-weight: 600;
}

.clean-list,
.ordered-list {
  margin: 0;
  padding-left: 1.15rem;
}

.clean-list li,
.ordered-list li {
  margin-bottom: 0.75rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.timeline li {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.timeline-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.case-evidence-list {
  width: 100%;
  display: grid;
  gap: 0.8rem;
}

.case-evidence-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.case-evidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.case-evidence-row--timeline {
  margin-top: 0.45rem;
}

.case-evidence-note {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.case-evidence-excerpt {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.attachment-preview-block {
  display: grid;
  gap: 0.32rem;
}

.case-evidence-excerpt--empty {
  color: var(--text-muted);
  font-style: italic;
}

.case-evidence-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
}

.admin-inline-actions--inline {
  display: inline-flex;
  margin: 0.28rem 0 0;
  vertical-align: middle;
}

.admin-inline-action,
.admin-context-link,
.admin-trace-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.62rem 0.86rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
}

.admin-inline-action:hover,
.admin-context-link:hover,
.admin-trace-summary:hover,
.admin-inline-action:focus-visible,
.admin-context-link:focus-visible,
.admin-trace-summary:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.admin-context-link {
  min-height: 44px;
  padding: 0.48rem 0.68rem;
}

.admin-trace-details {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.admin-trace-details .admin-trace-summary {
  width: max-content;
  max-width: 100%;
  list-style: none;
}

.admin-trace-details .admin-trace-summary::-webkit-details-marker {
  display: none;
}

.review-signal-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.1rem;
}

.admin-review-groups {
  display: grid;
  gap: 1rem;
}

.admin-review-stack {
  display: grid;
  gap: 0.85rem;
}

.admin-review-group {
  display: grid;
  gap: 0.8rem;
}

.admin-review-group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.admin-review-group-header h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-review-group-header .subtle {
  margin: 0.18rem 0 0;
}

.callout {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.merchant-ticket-followthrough {
  display: grid;
  gap: 0.48rem;
}

.ticket-packet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.callout--warning {
  display: grid;
  gap: 0.7rem;
  background: rgba(196, 132, 16, 0.12);
  border-color: rgba(196, 132, 16, 0.22);
  color: #ffe7b3;
}

.callout--cancelled {
  display: grid;
  gap: 0.7rem;
  background: rgba(16, 163, 127, 0.12);
  border-color: rgba(16, 163, 127, 0.22);
  color: #c7f5e7;
}

.callout-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.chat-home-shell {
  min-height: calc(100vh - 3rem);
  min-height: calc(100dvh - 3rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
}

.chat-home-shell--anchored {
  min-height: 0;
  height: calc(100vh - var(--page-shell-top-offset));
  height: calc(100dvh - var(--page-shell-top-offset));
}

.chat-home-shell--anchored.chat-home-shell--landing {
  height: auto;
}

.chat-home-shell--landing .chat-canvas {
  display: flex;
  flex-direction: column;
}

.chat-home-shell--landing .chat-canvas > .composer-dock {
  order: 1;
}

.chat-home-shell--landing .chat-canvas > .chat-thread.empty {
  order: 2;
}

.chat-home-shell--landing .chat-canvas > .landing-guidance {
  order: 3;
}

.chat-home-shell--landing .chat-canvas > .admin-section-nav {
  order: 4;
}

.chat-home-shell--landing .chat-canvas > .chat-workspace-panel,
.chat-home-shell--landing .chat-canvas > .task-board-disclosure,
.chat-home-shell--landing .chat-canvas > .chat-signal-rail {
  order: 4;
}

.chat-home-shell--landing .chat-canvas > .chat-surface-footnote {
  order: 5;
}

.chat-home-shell--anchored.chat-home-shell--landing.chat-home-shell--live-session {
  height: calc(100vh - var(--page-shell-top-offset));
  height: calc(100dvh - var(--page-shell-top-offset));
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  align-content: stretch;
}

.chat-home-shell--landing.chat-home-shell--live-session > .chat-home-header {
  display: none;
}

.chat-home-shell--landing.chat-home-shell--live-session > .chat-canvas {
  flex: 1 1 auto;
  min-height: 0;
}

.chat-home-shell--landing.chat-home-shell--live-session > .chat-canvas > :not(.chat-transcript-lane) {
  display: none !important;
}

.chat-home-shell--landing.chat-home-shell--live-session .chat-transcript-lane {
  flex: 1 1 auto;
  min-height: 0;
}

.chat-home-header {
  width: min(1180px, 100%);
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 0.55rem;
}

.chat-home-header.compact {
  width: min(1180px, 100%);
}

.chat-home-header.intro {
  width: min(1180px, 100%);
}

.chat-home-header.compact h1 {
  margin: 0.15rem 0 0.2rem;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
}

.chat-home-header.intro h1 {
  margin: 0.15rem 0 0.18rem;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
}

.chat-home-header-note {
  max-width: 700px;
  margin: 0;
  line-height: 1.4;
}

.chat-home-header-mobile-note {
  display: none;
  max-width: 32ch;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.chat-home-header-subnote {
  max-width: 760px;
  margin: 0.18rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.chat-home-header.compact-minimal,
.chat-home-header.intro-minimal {
  gap: 0.45rem;
}

.chat-header-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.85rem;
}

.chat-header-actions form {
  margin: 0;
}

.chat-context-strip {
  width: min(860px, 100%);
  margin: 1rem auto 0;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-context-strip--resume {
  background: rgba(16, 163, 127, 0.08);
  border-color: rgba(16, 163, 127, 0.18);
}

.chat-context-strip--evidence {
  align-items: stretch;
}

.chat-resume-stack {
  width: min(860px, 100%);
  margin: 0.1rem auto 0;
  display: grid;
  gap: 0.5rem;
}

.chat-resume-card {
  width: 100%;
  padding: 0.68rem 0.82rem;
  border-radius: 18px;
  background: rgba(16, 163, 127, 0.08);
  border: 1px solid rgba(16, 163, 127, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}

.chat-resume-card--linked {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
}

.chat-resume-card .chat-context-copy {
  gap: 0.28rem;
}

.chat-resume-card .chat-context-title {
  font-size: 0.94rem;
}

.chat-resume-card .nav-button {
  min-width: 176px;
  justify-content: center;
}

.chat-workspace-panel {
  width: min(860px, 100%);
  margin: 0 auto;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-workspace-panel--compact-snapshot {
  background: rgba(255, 255, 255, 0.022);
}

.chat-workspace-panel[hidden] {
  display: none;
}

.chat-workspace-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.chat-workspace-panel--compact-snapshot .chat-workspace-summary {
  gap: 0.85rem;
  padding: 0.78rem 0.92rem;
}

.chat-workspace-summary::-webkit-details-marker {
  display: none;
}

.chat-workspace-summary-copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 320px;
}

.chat-workspace-panel--compact-snapshot .chat-workspace-summary-copy {
  gap: 0.22rem;
  flex-basis: 280px;
}

.chat-workspace-summary-title {
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-workspace-panel--compact-snapshot .chat-workspace-summary-title {
  font-size: 0.92rem;
  line-height: 1.32;
}

.chat-workspace-summary-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 260px;
}

.chat-workspace-panel--compact-snapshot .chat-workspace-summary-meta {
  flex: 0 1 auto;
}

.chat-workspace-panel[open] .chat-workspace-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-workspace-body {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem 1rem 1rem;
}

.chat-workspace-panel--compact-snapshot .chat-workspace-body {
  padding: 0.78rem 0.92rem 0.92rem;
}

.chat-workspace-panel .chat-context-strip,
.chat-workspace-panel .chat-signal-rail {
  width: 100%;
  margin: 0;
}

.chat-workspace-panel .chat-header-actions {
  margin-top: 0;
}

.chat-context-strip .tech-inspection-cta {
  width: auto;
  margin: 0;
}

.chat-context-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.chat-context-title {
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.case-link-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.presentation-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--accent) 65%, white);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

.presentation-chip--theme {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.presentation-chip--session {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.chat-canvas {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
}

.chat-home-shell--landing:not(.auth-gate-shell) .chat-home-header-note,
.chat-home-shell--landing:not(.auth-gate-shell) .chat-home-header-mobile-note,
.chat-home-shell--landing:not(.auth-gate-shell) > .chat-home-header .lede {
  display: none;
}

.chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas > .landing-guidance,
.chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas > .chat-surface-footnote {
  display: none;
}

.chat-home-shell--landing:not(.auth-gate-shell) .composer-note {
  display: none;
}

.chat-guidance-popover {
  position: relative;
  display: grid;
  gap: 0.55rem;
  width: min(17.5rem, 100%);
  padding: 0.86rem 0.92rem 0.92rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(18, 27, 25, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  color: var(--text);
  z-index: 14;
}

.chat-guidance-popover[hidden] {
  display: none;
}

.chat-guidance-popover::before {
  content: "";
  position: absolute;
  top: 2.1rem;
  left: -0.48rem;
  width: 0.86rem;
  height: 0.86rem;
  border-left: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
  background: rgba(18, 27, 25, 0.94);
  transform: rotate(45deg);
}

.chat-guidance-copy {
  display: grid;
  gap: 0.3rem;
  padding-right: 3.1rem;
}

.chat-guidance-copy strong {
  font-size: 0.96rem;
  line-height: 1.24;
}

.chat-guidance-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.chat-guidance-dismiss {
  position: absolute;
  top: 0.48rem;
  right: 0.48rem;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.chat-guidance-dismiss:hover,
.chat-guidance-dismiss:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.1));
  outline: none;
}

.files-header-note,
.files-toolbar-note {
  display: none;
}

.files-guidance-layout,
.files-guidance-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 981px) {
  [data-authoritative-surface="admin"] .chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas > .task-board.landing-guidance {
    display: block;
  }

  .chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 860px) minmax(15rem, 17.5rem);
    align-items: start;
    gap: 1rem;
  }

  .chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas:not(:has(> .chat-guidance-popover:not([hidden]))) {
    grid-template-columns: minmax(0, 860px);
    justify-content: center;
  }

  .chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas > :not(.chat-guidance-popover):not(.landing-guidance) {
    grid-column: 1;
    min-width: 0;
  }

  .chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas > .chat-transcript-lane {
    width: 100%;
  }

  .chat-home-shell--landing:not(.auth-gate-shell) .chat-canvas > .chat-guidance-popover {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: stretch;
    margin-top: 4.2rem;
    position: sticky;
    top: 1rem;
  }

  .files-guidance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 17.5rem);
    align-items: start;
    gap: 1rem;
  }

  .files-guidance-layout:not(:has(> .chat-guidance-popover:not([hidden]))) {
    grid-template-columns: minmax(0, 1fr);
  }

  .files-guidance-layout > .chat-guidance-popover {
    justify-self: stretch;
    margin-top: 0.12rem;
    position: sticky;
    top: 1rem;
  }
}

.chat-transcript-lane {
  width: min(860px, 100%);
  margin: 0 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-transcript-lane {
  flex: 1 1 auto;
  min-height: 0;
}

.chat-transcript-lane > .chat-thread,
.chat-transcript-lane > .composer-dock {
  width: 100%;
  margin: 0;
}

.chat-transcript-lane > .chat-thread {
  min-height: 0;
}

.chat-transcript-lane > .composer-dock {
  align-self: end;
  margin-top: 0;
}

.chat-home-shell--anchored .chat-canvas {
  overflow: hidden;
}

.chat-canvas--active {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 1rem;
  row-gap: 0.75rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.chat-canvas--active > .chat-workspace-panel {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  margin: 0;
  align-self: stretch;
  min-height: 0;
}

.chat-canvas--active > .chat-transcript-lane {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  margin: 0;
  align-self: stretch;
  min-height: 0;
}

.chat-canvas--active > .chat-surface-footnote {
  display: none;
}

.chat-thread {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 0 0 0.5rem;
  min-height: 0;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.chat-home-shell--anchored .chat-thread {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
  scrollbar-gutter: stable;
}

.chat-thread.empty {
  min-height: 52vh;
  align-content: center;
}

.chat-home-shell--anchored .chat-thread.empty {
  min-height: 0;
  align-content: start;
  padding-top: 0.15rem;
}

.chat-thread.is-processing .empty-state {
  display: none;
}

.empty-state {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
  text-align: left;
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 0.2rem 0 0.8rem;
}

.empty-state-note {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.empty-state h2 {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.suggestion-grid {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.suggestion-card {
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
  line-height: 1.35;
}

.conversation-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.conversation-row.user {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.conversation-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.conversation-row.assistant .conversation-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
}

.conversation-row.user .conversation-avatar {
  order: 2;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.conversation-bubble {
  position: relative;
  padding: 0.95rem 1.02rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.55;
}

.conversation-row.assistant .conversation-bubble {
  display: grid;
  justify-self: start;
  gap: 0.55rem;
  max-width: min(84%, 760px);
  background: var(--assistant-row);
}

.conversation-row.user .conversation-bubble {
  justify-self: end;
  max-width: min(80%, 680px);
  background: var(--user-bubble);
}

.conversation-bubble--solo-copy {
  padding-inline-end: calc(1.02rem + 2.7rem);
}

.conversation-row.assistant .conversation-bubble > * {
  min-width: 0;
}

.conversation-role {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-faint);
  font-weight: 700;
}

.conversation-role-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.24rem;
  flex-wrap: wrap;
}

.conversation-row.assistant .conversation-role-row {
  margin-bottom: 0;
}

.message-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.message-mode-badge.support {
  background: rgba(16, 163, 127, 0.14);
  color: #c7f5e7;
  border-color: rgba(16, 163, 127, 0.24);
}

.message-mode-badge.general {
  background: rgba(255, 255, 255, 0.08);
  color: #f2dfbb;
  border-color: rgba(255, 255, 255, 0.1);
}

.message-mode-badge.think {
  background: rgba(91, 136, 255, 0.18);
  color: #dce7ff;
  border-color: rgba(91, 136, 255, 0.28);
}

.chat-thread--think-branch {
  gap: 1.05rem;
}

.chat-thread--think-branch .conversation-row.assistant[data-whisp-think-branch="true"] {
  grid-template-columns: 36px minmax(0, 1fr);
}

.chat-thread--think-branch .conversation-row.assistant[data-whisp-think-branch="true"] .conversation-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 28%),
    conic-gradient(from 215deg, #83f7d6, #88a7ff, #f2d37a, #83f7d6);
  color: #09111f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 12px 30px rgba(91, 136, 255, 0.24);
}

.chat-thread--think-branch .conversation-row.assistant[data-whisp-think-branch="true"] .conversation-bubble {
  max-width: min(100%, 860px);
  padding: 1.02rem 1.12rem;
  border-color: rgba(124, 160, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(124, 160, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(16, 22, 34, 0.76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.chat-thread--think-branch .conversation-row.assistant[data-whisp-think-branch="true"] .conversation-bubble::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, #83f7d6, #88a7ff, #f2d37a);
  opacity: 0.82;
}

.chat-thread--think-branch .conversation-row.assistant[data-whisp-think-branch="true"] .conversation-role {
  color: #b9caff;
  letter-spacing: 0.1em;
}

.chat-thread--think-branch .conversation-row.assistant[data-whisp-think-branch="true"] .conversation-content {
  font-size: 1.02rem;
  line-height: 1.68;
}

.conversation-row--branch-transition .conversation-bubble {
  padding: 0.62rem 0.78rem;
  border-color: rgba(131, 247, 214, 0.16);
  background:
    linear-gradient(135deg, rgba(131, 247, 214, 0.11), rgba(136, 167, 255, 0.08)),
    rgba(14, 23, 36, 0.76);
}

.conversation-row--branch-transition .conversation-content {
  color: rgba(232, 238, 255, 0.86);
  font-size: 0.9rem;
  line-height: 1.45;
}

.conversation-content--think-md {
  white-space: normal;
}

.conversation-think-markdown {
  display: grid;
  gap: 0.72rem;
}

.conversation-think-markdown p,
.conversation-think-markdown ul,
.conversation-think-markdown ol,
.conversation-think-markdown pre {
  margin: 0;
}

.conversation-think-markdown h3,
.conversation-think-markdown h4,
.conversation-think-markdown h5 {
  margin: 0.2rem 0 0;
  color: #eef4ff;
  font-size: 1rem;
  line-height: 1.3;
}

.conversation-think-markdown ul,
.conversation-think-markdown ol {
  display: grid;
  gap: 0.36rem;
  padding-left: 1.24rem;
}

.conversation-think-markdown li {
  padding-left: 0.12rem;
}

.conversation-think-markdown code {
  padding: 0.08rem 0.28rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef4ff;
  font-size: 0.92em;
}

.conversation-think-markdown pre {
  overflow-x: auto;
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  border: 1px solid rgba(124, 160, 255, 0.14);
  background: rgba(6, 10, 18, 0.52);
}

.conversation-think-markdown pre code {
  display: block;
  padding: 0;
  background: transparent;
  white-space: pre;
}

.conversation-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.conversation-content--sop {
  white-space: normal;
}

.conversation-sop {
  display: grid;
  gap: 0.72rem;
}

.conversation-sop--summary-only {
  gap: 0.22rem;
}

.conversation-sop-lead,
.conversation-sop-copy {
  margin: 0;
  color: var(--text);
}

.conversation-sop-lead {
  font-weight: 600;
  line-height: 1.6;
}

.conversation-sop-section {
  display: grid;
  gap: 0.34rem;
  padding: 0.72rem 0.78rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.conversation-sop--summary-only .conversation-sop-section {
  gap: 0.18rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.conversation-sop-section--action {
  background: rgba(16, 163, 127, 0.08);
  border-color: rgba(16, 163, 127, 0.18);
}

.conversation-sop-section--reply {
  background: rgba(85, 152, 236, 0.08);
  border-color: rgba(85, 152, 236, 0.18);
}

.conversation-sop-section--warning {
  background: rgba(225, 176, 58, 0.1);
  border-color: rgba(225, 176, 58, 0.2);
}

.conversation-sop-section--fallback {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.conversation-sop-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
}

.conversation-sop-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.28rem;
}

.conversation-sop-list--ordered {
  padding-left: 1.2rem;
}

.conversation-sop-list li {
  margin: 0;
  line-height: 1.45;
}

.message-attachments {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.message-attachment {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.82rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.message-attachment-name {
  color: #d6f5ec;
  text-decoration: none;
  font-weight: 600;
}

.message-attachment-name:hover {
  text-decoration: underline;
}

.message-file-link {
  border-color: rgba(16, 163, 127, 0.18);
  background: rgba(16, 163, 127, 0.07);
}

.message-attachment-kind,
.message-attachment-note,
.message-attachment-preview {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.message-attachment-note {
  line-height: 1.4;
}

.message-attachment-preview {
  white-space: pre-wrap;
}

.attachment-preview-toggle {
  justify-self: start;
}

.message-action--inline {
  padding: 0.3rem 0.58rem;
  font-size: 0.78rem;
}

.conversation-actions {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.conversation-actions--solo-copy {
  position: absolute;
  inset-block-start: 0.62rem;
  inset-inline-end: 0.58rem;
  margin-top: 0;
  gap: 0;
  z-index: 1;
}

.conversation-actions-primary {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.conversation-actions--solo-copy .conversation-actions-primary {
  gap: 0;
  flex-wrap: nowrap;
}

.conversation-actions-primary:empty {
  display: none;
}

.conversation-actions-overflow {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.conversation-actions-overflow--static {
  width: auto;
  max-width: 100%;
}

.conversation-actions-overflow-list {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
  width: auto;
  max-width: 100%;
}

.conversation-reply-options {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.35rem;
}

.conversation-reply-options--choices {
  gap: 0.32rem;
}

.conversation-reply-options--template {
  gap: 0.32rem;
}

.conversation-reply-options--choices .conversation-reply-options-list {
  gap: 0.38rem;
  align-items: flex-start;
}

.conversation-reply-options--template .conversation-reply-options-list {
  gap: 0.38rem;
  align-items: flex-start;
}

.conversation-reply-options-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.conversation-reply-options-list {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.conversation-response-cta {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.64rem 0.76rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.conversation-response-cta--compact {
  width: auto;
  max-width: 100%;
  justify-self: start;
}

.conversation-response-cta-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.conversation-response-cta-label {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.conversation-response-cta-note {
  color: var(--text-faint);
  font-size: 0.75rem;
  line-height: 1.22;
}

.conversation-response-cta--correction {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
}

.conversation-response-cta--correction .conversation-response-cta-copy {
  display: none;
}

.conversation-response-cta--correction .reply-option-button--cta {
  white-space: nowrap;
  padding-inline: 0.72rem;
}

.conversation-bubble--guided {
  gap: 0.44rem;
}

.conversation-row.assistant .conversation-bubble .conversation-reply-options,
.conversation-row.assistant .conversation-bubble .conversation-response-cta,
.conversation-row.assistant .conversation-bubble .conversation-actions,
.conversation-row.assistant .conversation-bubble .message-memory-note,
.conversation-row.assistant .conversation-bubble .message-reasoning,
.conversation-row.assistant .conversation-bubble .message-attachments {
  margin-top: 0;
}

.conversation-bubble--summary-prompt {
  max-width: min(72%, 620px);
}

.conversation-bubble--summary-prompt .conversation-response-cta--correction,
.conversation-bubble--summary-prompt .conversation-actions {
  justify-self: start;
}

.reply-option-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 163, 127, 0.24);
  background: rgba(16, 163, 127, 0.1);
  color: #d6f5ec;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.5rem 0.82rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.conversation-reply-options--choices .reply-option-button {
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
  justify-content: center;
  padding: 0.48rem 0.76rem;
  text-align: center;
  line-height: 1.2;
}

.conversation-reply-options--template .reply-option-button {
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
  justify-content: center;
  padding: 0.48rem 0.76rem;
  text-align: center;
  line-height: 1.2;
}

.reply-option-button--template {
  background: rgba(16, 163, 127, 0.14);
}

.reply-option-button--secondary {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.reply-option-button--secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.reply-option-button--cta {
  white-space: nowrap;
  padding-inline: 0.76rem;
}

.reply-option-button:hover {
  background: rgba(16, 163, 127, 0.16);
  border-color: rgba(16, 163, 127, 0.32);
}

.message-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.46rem 0.76rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.message-action--icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 12px;
  border-width: 0;
  background: transparent;
}

.message-action--icon:hover {
  border-color: transparent;
}

.message-action--icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.26);
  border-color: transparent;
}

.message-action-glyph {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
  color: currentColor;
}

.message-action--copy .message-action-glyph::before,
.message-action--copy .message-action-glyph::after {
  content: "";
  position: absolute;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  width: 9px;
  height: 11px;
  background: transparent;
}

.message-action--copy .message-action-glyph::before {
  top: 3px;
  left: 5px;
}

.message-action--copy .message-action-glyph::after {
  top: 0;
  left: 1px;
  opacity: 0.62;
}

.message-action--copy[data-copy-state="success"] {
  background: rgba(16, 163, 127, 0.14);
  color: #d6f5ec;
}

.message-action--copy[data-copy-state="error"] {
  background: rgba(201, 91, 91, 0.14);
  color: #ffd4d4;
}

.message-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.message-action.active {
  background: rgba(16, 163, 127, 0.16);
  color: #d6f5ec;
  border-color: rgba(16, 163, 127, 0.26);
}

.message-action.reviewed {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.message-action[disabled] {
  cursor: default;
  opacity: 0.75;
}

.message-memory-note {
  margin-top: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: rgba(16, 163, 127, 0.08);
  border: 1px solid rgba(16, 163, 127, 0.16);
  color: #d6f5ec;
  font-size: 0.82rem;
}

.message-reasoning {
  margin-top: 0.7rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pending-message .conversation-bubble {
  opacity: 0.96;
}

.processing-indicator[hidden] {
  display: none;
}

.processing-bubble {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
}

.processing-content {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
}

.conversation-bubble--streaming {
  border-color: rgba(216, 176, 83, 0.16);
}

.conversation-stream-status {
  width: min(100%, 34rem);
  display: grid;
  gap: 0.34rem;
  padding: 0.66rem 0.78rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.032);
}

.conversation-stream-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.conversation-stream-status-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.conversation-stream-status-elapsed {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-faint);
}

.conversation-stream-status-message {
  font-size: 0.9rem;
  line-height: 1.48;
  color: var(--text);
}

.conversation-stream-status-note {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.conversation-content--placeholder {
  color: var(--text-muted);
}

.thinking-dots {
  display: inline-flex;
  gap: 0.28rem;
}

.thinking-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--text-muted);
  animation: thinkingPulse 1.1s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.chat-signal-rail {
  width: min(860px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.signal-chip {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.signal-chip span {
  color: var(--text-faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signal-chip strong {
  font-size: 0.96rem;
}

.signal-chip small {
  color: var(--text-muted);
}

.wide-signal {
  grid-column: span 2;
}

.composer-dock {
  position: sticky;
  bottom: 0;
  width: min(860px, 100%);
  margin: 0 auto;
  margin-top: auto;
  padding: 0;
  background: none;
}

.chat-home-shell--anchored .composer-dock {
  position: static;
}

.chat-thread-reset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 0.52rem;
  padding: 0.7rem 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(20, 20, 20, 0.82);
}

.chat-thread-reset--recovery {
  border-color: rgba(228, 179, 72, 0.2);
  background:
    linear-gradient(180deg, rgba(228, 179, 72, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(33, 28, 20, 0.9);
}

.chat-thread-reset--recovery[data-stream-state="cancelled"] {
  border-color: rgba(223, 112, 72, 0.22);
  background:
    linear-gradient(180deg, rgba(223, 112, 72, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(38, 23, 18, 0.9);
}

.chat-thread-reset--recovery[data-stream-state="streaming"],
.chat-thread-reset--recovery[data-stream-state="cancel_requested"],
.chat-thread-reset--recovery[data-stream-state="pending"] {
  border-color: rgba(88, 154, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(88, 154, 255, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(19, 28, 42, 0.9);
}

.chat-thread-reset--think {
  min-height: 0;
  padding: 0.56rem 0.68rem;
  gap: 0.55rem;
  border-color: rgba(91, 136, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(91, 136, 255, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(18, 27, 44, 0.9);
  color: #dce7ff;
}

.chat-thread-reset--think[data-think-memory-state="unavailable"] {
  border-color: rgba(228, 179, 72, 0.24);
  background:
    linear-gradient(180deg, rgba(228, 179, 72, 0.12), rgba(91, 136, 255, 0.04)),
    rgba(28, 24, 16, 0.9);
}

.chat-thread-reset--think[data-think-memory-state="recovered"] {
  border-color: rgba(131, 247, 214, 0.22);
}

.chat-thread-reset--think .chat-thread-reset-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.whisp-think-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chat-thread-reset--think .chat-thread-reset-copy strong {
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8eeff;
}

.whisp-think-status {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.whisp-think-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  max-width: min(17rem, 100%);
  padding: 0.18rem 0.46rem;
  border-radius: 999px;
  border: 1px solid rgba(131, 247, 214, 0.15);
  background: rgba(131, 247, 214, 0.08);
  color: #dce7ff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whisp-think-status-pill + .whisp-think-status-pill {
  border-color: rgba(136, 167, 255, 0.18);
  background: rgba(136, 167, 255, 0.1);
}

.chat-thread-reset--think .chat-thread-reset-copy > .whisp-think-copy {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.82rem;
  line-height: 1.3;
  color: rgba(220, 231, 255, 0.82);
}

.chat-thread-reset-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-thread-reset-actions[hidden] {
  display: none;
}

.chat-thread-reset-actions .message-action {
  min-height: 44px;
}

.chat-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 0.52rem;
  padding: 0.72rem 0.85rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.05)), rgba(255, 255, 255, 0.02)),
    rgba(18, 30, 27, 0.9);
}

.chat-next-step-copy {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.chat-next-step-copy strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.chat-next-step-copy span {
  color: color-mix(in srgb, var(--text-muted) 84%, white 16%);
  font-size: 0.82rem;
  line-height: 1.35;
}

.chat-next-step-form {
  margin: 0;
}

.chat-thread-reset-copy {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.chat-thread-reset-copy strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.chat-thread-reset-copy span {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.chat-thread-reset-form {
  margin: 0;
}

.chat-thread-reset-button {
  min-width: 0;
  white-space: nowrap;
  padding: 0.7rem 0.98rem;
}

.composer {
  width: 100%;
  margin: 0;
  padding: 0.55rem;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.merchant-secondary-stack {
  width: min(860px, 100%);
  margin: 0.85rem auto 0;
  display: grid;
  gap: 0.85rem;
}

.tech-secondary-stack {
  width: min(860px, 100%);
  margin: 0.85rem auto 0;
  display: grid;
  gap: 0.85rem;
}

.page--live-chat-shell > .merchant-secondary-stack,
.page:has(#merchant-chat:not(.chat-home-shell--landing)) > .merchant-secondary-stack,
.page:has(#merchant-chat.chat-home-shell--live-session) > .merchant-secondary-stack {
  display: none;
}

.page:has(#tech-chat .chat-next-step--transcript) [data-authoritative-surface="tech"] > :is(
  .task-board,
  .mobile-section-nav,
  #tech-session-work,
  #tech-cases,
  #tech-tools
) {
  display: none;
}

.chat-home-shell--anchored:has(.chat-next-step--transcript) :is(
  .chat-context-strip--resume,
  .chat-workspace-panel--compact-snapshot
) {
  display: none;
}

.merchant-secondary-panel {
  width: 100%;
  margin: 0;
}

.tech-secondary-panel {
  width: 100%;
  margin: 0;
}

.merchant-secondary-grid {
  margin-top: 0;
}

.tech-secondary-grid {
  margin-top: 0;
}

.merchant-secondary-panel .panel {
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--surface-soft);
}

.tech-secondary-panel .panel {
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    var(--surface-soft);
}

.tech-secondary-panel .chat-workspace-body {
  padding-bottom: 1.15rem;
}

[data-tech-structured-case-submit] {
  scroll-margin-bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-bottom) + 1rem);
}

.composer-utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.composer-utility {
  margin: 0;
  min-width: 0;
}

.composer-utility summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--text-muted);
  min-height: 44px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.composer-utility summary::-webkit-details-marker {
  display: none;
}

.composer-utility summary::after {
  content: "+";
  font-size: 0.95em;
  color: var(--text-faint);
}

.composer-utility[open] {
  flex: 1 1 100%;
}

.composer-utility[open] summary {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.04));
}

.composer-utility[open] summary::after {
  content: "−";
  color: color-mix(in srgb, var(--accent) 72%, white);
}

.composer-utility[open] > :not(summary) {
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.14);
}

.composer-optional-fields-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 0.75rem;
}

.composer-optional-fields-grid input,
.composer-optional-fields-grid select,
.composer-optional-fields-grid textarea {
  min-width: 0;
}

.composer.is-processing {
  border-color: rgba(16, 163, 127, 0.24);
}

.composer.is-processing textarea {
  opacity: 0.72;
}

.composer-shell {
  --composer-action-count: 1;
  --composer-visible-action-count: var(--composer-action-count);
  --composer-action-size: 2.75rem;
  --composer-action-gap: 0.42rem;
  --composer-action-inline-end: 0.52rem;
  --composer-action-block-end: 0.44rem;
  --composer-text-inline-end-padding: calc(var(--composer-action-rail-width) + var(--composer-action-inline-end) + 0.9rem);
  --composer-text-block-end-padding: calc(var(--composer-action-block-end) + 0.56rem);
  --composer-action-rail-width: calc(
    (var(--composer-visible-action-count) * var(--composer-action-size))
    + ((var(--composer-visible-action-count) - 1) * var(--composer-action-gap))
  );
  position: relative;
  width: 100%;
}

.composer-shell--single {
  --composer-action-count: 1;
}

.composer-shell--double {
  --composer-action-count: 2;
}

.composer-shell--triple {
  --composer-action-count: 3;
}

.composer-shell--quad {
  --composer-action-count: 4;
}

.composer textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.58rem var(--composer-text-inline-end-padding) var(--composer-text-block-end-padding) 0.6rem;
  border: none;
  background: transparent;
  resize: none;
  box-shadow: none;
  overflow-y: hidden;
}

.composer textarea:focus {
  box-shadow: none;
}

.composer-inline-actions {
  position: absolute;
  right: var(--composer-action-inline-end);
  bottom: var(--composer-action-block-end);
  display: inline-flex;
  align-items: center;
  gap: var(--composer-action-gap);
}

.composer-action {
  --composer-action-focus: rgba(255, 255, 255, 0.18);
  position: relative;
  width: var(--composer-action-size);
  height: var(--composer-action-size);
  padding: 0;
  border: none;
  border-radius: 0.52rem;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.composer-action:hover:not(:disabled) {
  color: var(--text);
  background: transparent;
  box-shadow: none;
  outline: none;
}

.composer-action:focus-visible {
  color: var(--text);
  background: transparent;
  box-shadow: none;
  outline: 2px solid var(--composer-action-focus);
  outline-offset: 0.12rem;
}

.composer-action:active:not(:disabled) {
  transform: scale(0.96);
}

.composer-action:disabled {
  opacity: 0.48;
  cursor: default;
}

.composer-action--submit {
  --composer-action-focus: rgba(16, 163, 127, 0.24);
  color: color-mix(in srgb, var(--accent) 88%, white);
}

.composer-action--submit:hover:not(:disabled),
.composer-action--submit:focus-visible {
  color: color-mix(in srgb, var(--accent-hover) 92%, white);
}

.composer-action.composer-action--think {
  --composer-action-focus: rgba(16, 163, 127, 0.2);
  width: var(--composer-action-size);
  min-width: var(--composer-action-size);
  height: var(--composer-action-size);
  padding: 0;
  border: none;
  border-radius: 0;
  color: color-mix(in srgb, var(--accent) 72%, white);
  background: transparent;
  box-shadow: none;
}

.composer-action.composer-action--think:hover:not(:disabled) {
  color: color-mix(in srgb, var(--accent) 88%, white);
  background: transparent;
  box-shadow: none;
}

.composer-action.composer-action--think:focus-visible {
  color: color-mix(in srgb, var(--accent) 88%, white);
  background: transparent;
  box-shadow: none;
}

.composer-action--attach.has-files {
  color: color-mix(in srgb, var(--accent) 78%, white);
}

.composer-action--stop {
  --composer-action-focus: rgba(255, 210, 139, 0.22);
  color: #ffd28b;
}

.composer-action.composer-action--think:active:not(:disabled) {
  transform: scale(0.92);
}

.composer-action.composer-action--think .composer-action-icon {
  width: 0.92rem;
  height: 0.92rem;
  opacity: 0.92;
}

.composer-action-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  display: inline-block;
  flex: none;
}

.composer-action-icon::before,
.composer-action-icon::after {
  content: "";
  position: absolute;
  inset: 0;
}

.composer-action--submit .composer-action-icon::before {
  inset: 0.08rem 0.02rem 0.1rem 0.18rem;
  background: currentColor;
  clip-path: polygon(0 50%, 100% 0, 72% 50%, 100% 100%);
}

.composer-action--submit .composer-action-icon::after {
  inset: 0.43rem 0.16rem 0.42rem 0.18rem;
  background: rgba(255, 255, 255, 0.82);
  clip-path: polygon(0 40%, 76% 40%, 76% 0, 100% 50%, 76% 100%, 76% 60%, 0 60%);
}

.composer-action--think .composer-action-icon::before {
  inset: 0.08rem;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.composer-action--think .composer-action-icon::after {
  inset: auto 0.02rem 0.02rem auto;
  width: 0.24rem;
  height: 0.24rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
}

.composer-action-icon--attach {
  width: 1.06rem;
  height: 1.06rem;
}

.composer-action-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.composer-action--attach .composer-action-icon::before,
.composer-action--attach .composer-action-icon::after {
  display: none;
}

.composer-action--stop .composer-action-icon::before {
  inset: 0.17rem;
  border-radius: 0.18rem;
  background: currentColor;
}

.composer-action.is-busy .composer-action-icon {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: composerSpin 0.72s linear infinite;
}

.composer-action.is-busy .composer-action-icon::before,
.composer-action.is-busy .composer-action-icon::after {
  display: none;
}

.composer-footer {
  display: grid;
  gap: 0.28rem;
  padding: 0.12rem 0.18rem 0;
}

.composer-footer:not(:has(> :not([hidden]))) {
  display: none;
}

.composer-attachment-status {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-note {
  font-size: 0.88rem;
}

.composer-note-stack {
  display: grid;
  gap: 0.3rem;
}

.composer-stop-status {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.composer-stop-status[data-tone="warning"] {
  color: #ffe7b3;
}

.composer-stop-status[data-tone="error"] {
  color: #ffb7ae;
}

.composer-stop-status[data-tone="success"] {
  color: #c7f5e7;
}

.chat-surface-footnote {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0.35rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.chat-canvas--active .chat-workspace-summary {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.82rem;
}

.chat-canvas--active .chat-workspace-summary-copy,
.chat-canvas--active .chat-workspace-summary-meta {
  width: 100%;
  flex: none;
}

.chat-canvas--active .chat-workspace-summary-meta {
  gap: 0.4rem;
}

.chat-canvas--active .chat-workspace-body {
  padding: 0.72rem 0.82rem 0.82rem;
  gap: 0.7rem;
}

.chat-canvas--active .chat-workspace-panel .chat-context-strip {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 0.55rem;
}

.chat-canvas--active .chat-workspace-panel .chat-context-title {
  font-size: 0.92rem;
}

.chat-canvas--active .chat-workspace-panel .chat-context-meta {
  gap: 0.38rem;
}

.chat-canvas--active .chat-workspace-panel .nav-button,
.chat-canvas--active .chat-workspace-panel .chat-header-actions .message-action {
  width: 100%;
  justify-content: center;
}

.chat-canvas--active .chat-workspace-panel .chat-header-actions {
  margin-top: 0;
}

.chat-canvas--active .chat-workspace-panel .chat-signal-rail {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.chat-detail-actions {
  display: grid;
  gap: 0.55rem;
}

.chat-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.chat-canvas--active .chat-workspace-panel .wide-signal {
  grid-column: span 1;
}

.chat-canvas--active .chat-workspace-panel .signal-chip {
  padding: 0.7rem 0.78rem;
  border-radius: 16px;
}

.chat-ticket-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem 0.82rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-ticket-card[hidden] {
  display: none;
}

.chat-ticket-card-title {
  font-size: 0.92rem;
  line-height: 1.35;
}

.chat-ticket-card-form {
  gap: 0.55rem;
}

.chat-ticket-note-panel {
  display: grid;
  gap: 0.45rem;
}

.chat-ticket-note-panel summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-muted);
  min-height: 44px;
  font-size: 0.86rem;
  padding: 0.48rem 0;
}

.chat-ticket-card-label {
  display: grid;
  gap: 0.35rem;
}

.chat-ticket-card textarea {
  min-height: 5.2rem;
  resize: vertical;
}

.task-board {
  width: min(860px, 100%);
  margin: 0.58rem auto 0;
}

.task-board.landing-guidance {
  margin-top: 0;
}

.task-board-shell {
  display: grid;
  gap: 0.68rem;
  padding: 0.78rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(31, 196, 155, 0.1), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.task-board-header {
  display: grid;
  gap: 0.26rem;
}

.task-board-header p {
  margin: 0;
}

.task-board-grid {
  display: grid;
  gap: 0.56rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-board-grid--admin {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-section-nav {
  width: min(860px, 100%);
  margin: 0.72rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

[data-authoritative-surface="admin"] :is(
  #admin-users,
  #admin-health,
  #admin-cases,
  #admin-upload-kb,
  #admin-outbox,
  #admin-sources,
  #admin-workspace,
  #admin-audit
) {
  scroll-margin-top: calc(var(--page-shell-top-offset) + 1rem);
}

.admin-section-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.04));
}

.admin-section-nav a.is-priority {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.04));
}

.task-card,
.task-card-link {
  display: grid;
  gap: 0.38rem;
  align-content: start;
  min-height: 100%;
  padding: 0.76rem 0.82rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.task-card-link {
  color: inherit;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.task-card-link:hover,
.task-card-link:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.03));
}

.task-card-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.task-card-title {
  font-size: 0.95rem;
  line-height: 1.26;
}

.task-card-copy {
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.42;
}

.task-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.task-card-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.task-card-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1rem;
  color: var(--text-muted);
}

.task-card-list li {
  line-height: 1.45;
}

.chat-workspace-panel.task-board-disclosure {
  width: min(860px, 100%);
  margin-top: 0.85rem;
}

.task-card-section {
  display: grid;
  gap: 0.55rem;
}

.user-access-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.user-access-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(10, 14, 25, 0.58);
}

.user-access-card[open] {
  border-color: rgba(101, 163, 255, 0.28);
}

.user-access-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
}

.user-access-summary::-webkit-details-marker {
  display: none;
}

.user-access-summary-copy {
  display: grid;
  gap: 0.2rem;
}

.user-access-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.user-access-body {
  display: grid;
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.user-access-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.user-access-section {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.user-access-meta {
  display: grid;
  gap: 0.65rem;
}

.user-access-meta > div {
  display: grid;
  gap: 0.18rem;
}

.user-access-meta span,
.user-access-checkbox {
  color: var(--text-muted);
}

.user-access-inline-form,
.user-access-role-form,
.user-drive-form {
  max-width: 100%;
}

.user-access-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.user-access-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.user-access-checkbox input {
  margin-top: 0.15rem;
}

.user-drive-rule-list {
  display: grid;
  gap: 0.65rem;
}

.user-drive-rule {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.user-drive-rule-copy {
  display: grid;
  gap: 0.2rem;
}

.user-drive-rule-action {
  flex-shrink: 0;
}

.starter-prompt-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.starter-prompt-button {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.82rem 0.9rem;
  border-radius: 18px;
  text-align: left;
  line-height: 1.45;
  white-space: normal;
}

.chat-panel,
.chat-header,
.chat-transcript,
.chat-message,
.chat-role,
.chat-meta-grid,
.home-signal,
.topbar,
.brand,
.brand-mark,
.brand-title,
.nav,
.session-chip,
.ambient,
.ambient-one,
.ambient-two {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes composerSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes thinkingPulse {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.45;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

code {
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d2d2da;
}

strong {
  color: #f7f7f8;
}

.auth-gate-shell,
.files-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.auth-gate-canvas {
  display: block;
}

.auth-gate-panel {
  display: grid;
  gap: 0.72rem;
}

.auth-gate-intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
  gap: 0.72rem;
  align-items: stretch;
}

.auth-gate-copy {
  display: grid;
  align-content: center;
  gap: 0.32rem;
  padding: 0.78rem 0.82rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.026);
}

.auth-gate-language {
  display: grid;
  gap: 0.48rem;
  align-content: center;
  padding: 0.78rem 0.82rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.auth-gate-language-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.auth-gate-language-copy span {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.auth-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.72rem;
}

.auth-card {
  gap: 0.44rem;
  padding: 0.72rem 0.78rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.auth-card label {
  gap: 0.24rem;
  font-size: 0.86rem;
}

.auth-card input {
  min-height: 40px;
  padding: 0.5rem 0.68rem;
  border-radius: 12px;
}

.auth-card .button {
  min-height: 44px;
  padding-block: 0.6rem;
}

.auth-card .subtle {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.32;
}

.auth-card h2 {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
}

.files-shell {
  display: grid;
  gap: 1rem;
}

.files-status,
.files-header,
.files-toolbar,
.files-list-head,
.files-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.files-header {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.files-status {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.files-status strong {
  display: block;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.files-header h1 {
  margin: 0.1rem 0 0.35rem;
}

.files-header-actions,
.files-actions,
.files-row-actions,
.files-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.files-header-actions {
  justify-content: flex-end;
}

.files-header-actions .nav-button {
  width: auto;
  min-width: 10.5rem;
}

.files-status-copy {
  display: grid;
  gap: 0.28rem;
}

.files-toolbar {
  padding: 0.7rem 0;
}

.files-toolbar-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.files-breadcrumbs a,
.files-breadcrumb-current {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: #d6f5ec;
  text-decoration: none;
  font-weight: 700;
}

.files-breadcrumbs a:hover {
  text-decoration: underline;
}

.files-list {
  display: grid;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.files-capability-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.files-capability {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.files-capability.is-enabled {
  color: #d6f5ec;
  border-color: rgba(75, 193, 154, 0.42);
  background: rgba(75, 193, 154, 0.14);
}

.files-list-head,
.files-row {
  grid-template-columns: minmax(220px, 1fr) minmax(84px, auto) minmax(180px, auto);
}

.files-list-head {
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 800;
}

.files-row {
  padding: 0.78rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 13, 22, 0.42);
}

.files-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.files-name {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  text-decoration: none;
}

.files-name strong,
.files-name small {
  display: block;
  overflow-wrap: anywhere;
}

.files-name small,
.files-size {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.files-icon {
  width: 42px;
  height: 34px;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.files-icon::before,
.files-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.files-icon--folder::before {
  inset: 9px 3px 4px;
  border-radius: 5px;
  background: linear-gradient(180deg, #4bc19a, #238a72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 18px rgba(3, 8, 14, 0.24);
}

.files-icon--folder::after {
  top: 5px;
  left: 5px;
  width: 17px;
  height: 8px;
  border-radius: 5px 5px 2px 2px;
  background: #77d9b8;
}

.files-icon--file::before {
  inset: 3px 8px 3px 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f2f6ff, #bfd4f6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 8px 18px rgba(3, 8, 14, 0.22);
}

.files-icon--file::after {
  top: 4px;
  right: 8px;
  width: 11px;
  height: 11px;
  border-radius: 0 5px 0 4px;
  background: linear-gradient(135deg, #9ebce9 50%, #0e1725 51%);
}

.files-upload-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: auto;
}

.files-upload-form [data-folder-upload-relative-paths] {
  display: none;
}

.files-upload-trigger {
  min-height: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.files-upload-trigger input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.files-empty-state {
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.025);
}

@media (max-width: 1100px) {
  .auth-gate-grid,
  .auth-gate-intro-row,
  .files-status,
  .files-header,
  .files-toolbar,
  .files-list-head,
  .files-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .files-capability-list {
    justify-content: flex-start;
  }

  .files-header-actions {
    justify-content: flex-start;
  }

  .files-header-actions .nav-button {
    width: 100%;
    min-width: 0;
  }

  .files-list-head {
    display: none;
  }

  .files-row-actions {
    align-items: stretch;
  }

  .files-row-actions .message-action {
    width: 100%;
  }

  .wide-signal {
    grid-column: span 1;
  }

  .chat-canvas--active {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .panel a:not(.button):not(.message-action):not(.nav-button),
  .chat-workspace-body a:not(.button):not(.message-action):not(.nav-button),
  .clean-list a:not(.button):not(.message-action):not(.nav-button),
  .case-evidence-note a:not(.button):not(.message-action):not(.nav-button) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    padding-block: 0.16rem;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  .composer-shell {
    --composer-action-size: 2.75rem;
    --composer-action-gap: 0.3rem;
  }

  .composer.composer-has-draft .composer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 0.24rem;
    padding: 0.52rem 0.56rem 0.46rem 0.78rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
  }

  .composer.composer-has-draft textarea {
    min-height: 1.45em;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .composer.composer-has-draft .composer-inline-actions {
    position: static;
    justify-self: end;
    align-self: end;
  }

  .composer.is-processing.composer-has-draft .composer-shell {
    border-color: rgba(16, 163, 127, 0.24);
  }

  .composer-utility summary,
  .chat-ticket-note-panel summary {
    min-height: 44px;
    padding: 0.46rem 0.78rem;
  }
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: calc(var(--mobile-topbar-height) + var(--safe-top) + 0.9rem);
  }

  body {
    overflow: auto;
  }

  body.mobile-overlay-open {
    overflow: hidden;
  }

  .mobile-topbar {
    display: grid;
    gap: 0.55rem;
    padding: calc(var(--safe-top) + 0.45rem) 0.72rem 0.5rem;
  }

  .desktop-shell-bar {
    display: none;
  }

  .shell-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .shell-sidebar {
    position: fixed;
    inset: var(--mobile-topbar-overlay-offset) auto 0 0;
    width: min(88vw, 420px);
    z-index: 28;
    min-height: calc(100vh - var(--mobile-topbar-overlay-offset));
    min-height: calc(100dvh - var(--mobile-topbar-overlay-offset));
    max-height: calc(100vh - var(--mobile-topbar-overlay-offset));
    max-height: calc(100dvh - var(--mobile-topbar-overlay-offset));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
    border-radius: 0 28px 28px 0;
    overflow: hidden;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 220ms ease;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  }

  .shell-sidebar-toggle:checked ~ .shell-layout .shell-sidebar {
    transform: translateX(0);
  }

  .shell-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 24;
    background: rgba(10, 10, 11, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    backdrop-filter: blur(8px);
  }

  .shell-sidebar-toggle:checked ~ .shell-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .shell-sidebar-toggle:checked ~ .mobile-topbar .mobile-sidebar-open {
    background: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.05));
    border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.08));
  }

  .shell-sidebar-toggle:checked ~ .shell-layout .shell-main {
    pointer-events: none;
    user-select: none;
  }

  .mobile-menu-shell {
    display: flex;
    flex-direction: column;
  }

  .sidebar-scroll,
  .sidebar-footer {
    display: none;
  }

  .sidebar-mobile-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem 0.85rem;
    background: rgba(14, 16, 20, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .sidebar-mobile-copy {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
  }

  .sidebar-mobile-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
  }

  .sidebar-mobile-note {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .sidebar-mobile-close,
  .mobile-sidebar-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }

  .mobile-menu-scroll {
    padding: 0.8rem 0.8rem calc(var(--safe-bottom) + 0.95rem);
  }

  .mobile-menu-scroll > * + * {
    margin-top: 0.78rem;
  }

  .shell-main {
    max-height: none;
    overflow: visible;
  }

  .page {
    width: 100%;
    max-width: 100%;
    gap: 0;
    padding-inline: 0;
    padding-top: calc(var(--mobile-topbar-height) + var(--safe-top) + 0.95rem);
    padding-bottom: calc(var(--safe-bottom) + 0.5rem);
    --page-block-padding: calc(var(--mobile-topbar-height) + var(--safe-top) + var(--safe-bottom) + 2.5rem);
    --page-shell-top-offset: calc(var(--mobile-topbar-height) + var(--safe-top) + 0.95rem);
  }

  .page::before,
  .page::after {
    content: none;
  }

  .files-shell {
    padding-inline: 0.75rem;
  }

  .chat-home-shell {
    min-height: 0;
    gap: 0;
  }

  .feedback-modal-shell {
    align-items: end;
    padding: 0;
  }

  .feedback-modal {
    width: 100%;
    max-height: 100dvh;
    min-height: min(86dvh, 760px);
    border-radius: 28px 28px 0 0;
    padding: 1rem 1rem calc(var(--safe-bottom) + 1rem);
  }

  .ui-language-dialog {
    min-height: 0;
  }

  .feedback-modal-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-modal-close {
    width: 100%;
  }

  .chat-home-shell--anchored {
    height: calc(100vh - var(--page-shell-top-offset));
    height: calc(100dvh - var(--page-shell-top-offset));
    min-height: 0;
  }

  .chat-home-shell--anchored.chat-home-shell--landing {
    height: calc(100vh - var(--page-shell-top-offset));
    height: calc(100dvh - var(--page-shell-top-offset));
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }

  .chat-home-shell--anchored:not(.chat-home-shell--landing) {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  .chat-home-shell--anchored .chat-canvas {
    overflow: visible;
  }

  .chat-home-shell--anchored.chat-home-shell--landing > .chat-canvas,
  .chat-home-shell--anchored.chat-home-shell--landing > .chat-canvas > .chat-transcript-lane {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  .chat-canvas--active > .chat-transcript-lane > .chat-thread {
    margin-top: calc(-1 * var(--mobile-topbar-overlay-offset));
    padding-top: calc(var(--mobile-topbar-overlay-offset) + 0.2rem);
    scroll-padding-top: calc(var(--mobile-topbar-overlay-offset) + 0.4rem);
  }

  .chat-home-shell--landing > .chat-home-header {
    display: none;
  }

  .chat-home-shell--anchored:not(.chat-home-shell--landing) > .chat-home-header {
    display: none;
  }

  .chat-home-header h1,
  .empty-state h2 {
    font-size: clamp(1.68rem, 6.6vw, 2rem);
    line-height: 1.06;
  }

  .chat-home-header-note,
  .chat-home-header-subnote,
  .chat-home-header .lede {
    display: none;
  }

  .chat-home-header-mobile-note {
    display: block;
    font-size: 1rem;
  }

  .chat-home-header.intro,
  .chat-home-header.compact {
    width: 100%;
  }

  .chat-transcript-lane {
    width: 100%;
    margin: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
  }

  .chat-home-header-subnote {
    display: none;
  }

	  .mobile-topbar-kicker {
	    display: none;
	  }

	  .mobile-topbar--think-branch .mobile-topbar-copy {
	    gap: 0.06rem;
	  }

	  .mobile-topbar--think-branch .mobile-topbar-kicker {
	    display: block;
	    color: color-mix(in srgb, var(--accent) 68%, #dce7ff);
	    font-size: 0.75rem;
	    line-height: 1;
	    letter-spacing: 0.14em;
	  }

	  .mobile-topbar-title {
	    font-size: 1.14rem;
	    line-height: 1.1;
	    font-weight: 700;
	  }

	  .mobile-topbar--think-branch .mobile-topbar-title {
	    font-size: 1.04rem;
	  }

  .mobile-menu-trigger {
    gap: 0.58rem;
    padding: 0.68rem 0.84rem;
  }

  .mobile-menu-trigger-label {
    font-size: 0.95rem;
  }

  .mobile-menu-hero {
    gap: 0.65rem;
    padding: 0.8rem;
  }

  .mobile-menu-hero-copy h2 {
    font-size: 1.32rem;
    line-height: 1.08;
  }

  .mobile-menu-hero-copy p,
  .mobile-menu-branch-copy span,
  .mobile-menu-action span {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .mobile-menu-branch-summary {
    padding: 0.85rem 0.9rem;
  }

  .mobile-menu-branch-body {
    padding: 0 0.9rem 0.9rem;
  }

  .mobile-menu-action,
  .mobile-menu-action--button {
    gap: 0.32rem;
    padding: 0.92rem 0.95rem;
  }

  .mobile-menu-action strong,
  .mobile-menu-action--button strong {
    font-size: 1rem;
    line-height: 1.25;
  }

  .mobile-menu-action small,
  .mobile-menu-action--button small {
    letter-spacing: 0.05em;
  }

  .two-up,
  .workspace-grid,
  .wide {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .chat-canvas--active {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
  }

  .chat-canvas > .chat-thread.empty {
    order: 2;
    min-height: 0;
  }

  .chat-canvas > .composer-dock {
    order: 1;
  }

  .chat-canvas > .chat-workspace-panel {
    order: 3;
  }

  .chat-canvas > .chat-surface-footnote {
    order: 3;
  }

  [data-authoritative-surface="tech"] .chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-canvas > .chat-context-strip--resume,
  [data-authoritative-surface="admin"] .chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-canvas > .chat-context-strip--resume {
    order: 0;
    width: 100%;
    margin: 0.45rem 0 0;
  }

  [data-authoritative-surface="tech"] .chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-canvas > .chat-workspace-panel--compact-snapshot,
  [data-authoritative-surface="admin"] .chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-canvas > .chat-workspace-panel--compact-snapshot {
    order: 1;
    width: 100%;
    margin: 0;
  }

  [data-authoritative-surface="tech"] .chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-canvas > .chat-transcript-lane,
  [data-authoritative-surface="admin"] .chat-home-shell--anchored:not(.chat-home-shell--landing) .chat-canvas > .chat-transcript-lane {
    order: 2;
  }

  .page:has(#admin-chat:not(.chat-home-shell--landing)) [data-authoritative-surface="admin"] > :is(
    .admin-review-stack,
    .task-board,
    .mobile-section-nav,
    #admin-health,
    #admin-cases,
    #admin-upload-kb,
    #admin-outbox,
    #admin-sources,
    #admin-audit
  ) {
    display: none;
  }

  [data-authoritative-surface="tech"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary,
  [data-authoritative-surface="admin"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.62rem 0.72rem;
  }

  [data-authoritative-surface="tech"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-copy,
  [data-authoritative-surface="admin"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-copy {
    gap: 0.12rem;
    min-width: 0;
  }

  [data-authoritative-surface="tech"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-title,
  [data-authoritative-surface="admin"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.88rem;
    line-height: 1.22;
  }

  [data-authoritative-surface="tech"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-meta,
  [data-authoritative-surface="admin"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-meta {
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.32rem;
    padding-bottom: 0.05rem;
    scrollbar-width: none;
  }

  [data-authoritative-surface="tech"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-meta::-webkit-scrollbar,
  [data-authoritative-surface="admin"] .chat-workspace-panel--compact-snapshot .chat-workspace-summary-meta::-webkit-scrollbar {
    display: none;
  }

  [data-authoritative-surface="tech"] .chat-workspace-panel--compact-snapshot .case-link-chip,
  [data-authoritative-surface="admin"] .chat-workspace-panel--compact-snapshot .case-link-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .chat-canvas--active > .chat-workspace-panel {
    display: none;
  }

  .chat-canvas--active > .chat-transcript-lane {
    order: 0;
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }

  .chat-canvas--active > .chat-surface-footnote {
    display: none;
  }

  .conversation-row,
  .conversation-row.assistant {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 0.6rem;
  }

  .conversation-row.user {
    grid-template-columns: minmax(0, 1fr);
    justify-items: end;
  }

  .conversation-row.user .conversation-avatar {
    display: none;
  }

  .conversation-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.75rem;
    align-self: end;
  }

  .conversation-bubble {
    padding: 1rem 1.02rem;
    border-radius: 22px;
    font-size: 1rem;
    line-height: 1.58;
  }

  .conversation-bubble--solo-copy {
    padding-inline-end: calc(1.02rem + 2.7rem);
  }

  .conversation-row.assistant .conversation-bubble {
    max-width: 100%;
    border-radius: 22px 22px 22px 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
      var(--assistant-row);
  }

  .conversation-row.user .conversation-bubble {
    justify-self: end;
    max-width: min(86%, 520px);
    border-radius: 22px 22px 8px 22px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  }

  .conversation-content {
    font-size: 0.99rem;
    line-height: 1.62;
  }

  .conversation-sop {
    gap: 0.66rem;
  }

  .conversation-sop-section {
    padding: 0.66rem 0.72rem;
  }

  .conversation-reply-options--choices .conversation-reply-options-note,
  .conversation-response-cta-note {
    display: none;
  }

  .conversation-response-cta {
    padding: 0.56rem 0.68rem;
    gap: 0.45rem;
  }

  .conversation-response-cta--correction {
    padding: 0;
  }

  .conversation-row.user .conversation-role-row,
  .conversation-row.user .conversation-role {
    display: none;
  }

  .chat-workspace-panel {
    border-radius: 18px;
    box-shadow: none;
  }

  .chat-workspace-summary,
  .chat-workspace-body {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
  }

  .composer-dock,
  .chat-thread,
  .chat-surface-footnote,
  .chat-workspace-panel,
  .empty-state,
  .suggestion-grid {
    width: 100%;
  }

  .chat-thread {
    gap: 0.72rem;
    padding: 0.75rem 0.72rem 0.35rem;
    padding-right: 0.72rem;
  }

  .chat-home-shell--landing .chat-thread.empty {
    min-height: 0;
    display: grid;
    align-content: start;
    padding-bottom: 0.7rem;
  }

  .empty-state {
    gap: 0.45rem;
    padding: 0.1rem 0 0.2rem;
  }

  .empty-state--messenger {
    width: 100%;
    display: grid;
    gap: 0.8rem;
    padding: 0;
  }

  .empty-state--messenger .conversation-row.assistant .conversation-bubble {
    max-width: 100%;
  }

  .empty-state--messenger .conversation-reply-options {
    margin-top: 0;
    padding-left: 2.15rem;
  }

  .empty-state--messenger .conversation-reply-options-note {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .empty-state--messenger .conversation-reply-options-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .empty-state h2 {
    font-size: clamp(1.06rem, 4.4vw, 1.28rem);
  }

  .empty-state .subtle,
  .empty-state p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .composer {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .composer-dock > .composer {
    margin-bottom: 0;
  }

  .composer textarea {
    min-height: 54px;
    padding: 0.68rem var(--composer-text-inline-end-padding) var(--composer-text-block-end-padding) 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    font-size: 16px;
    line-height: 1.45;
  }

  .composer-shell {
    --composer-action-size: 2.75rem;
    --composer-action-gap: 0.3rem;
    --composer-action-inline-end: 0.5rem;
    --composer-action-block-end: 0.18rem;
    --composer-text-inline-end-padding: calc(var(--composer-action-rail-width) + var(--composer-action-inline-end) + 0.62rem);
    --composer-text-block-end-padding: calc(var(--composer-action-block-end) + 0.74rem);
  }

  .composer-dock {
    position: sticky;
    bottom: 0;
    margin: 0;
    padding: 0.58rem 0.72rem max(var(--safe-bottom), 0.16rem);
    background:
      linear-gradient(180deg, rgba(31, 31, 31, 0), rgba(31, 31, 31, 0.9) 32%, rgba(31, 31, 31, 1)),
      rgba(31, 31, 31, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    z-index: 18;
  }

  .chat-thread-reset {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.44rem;
    padding: 0.68rem 0.72rem;
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
      rgba(22, 22, 22, 0.86);
  }

  .chat-next-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.44rem;
    padding: 0.68rem 0.72rem;
    border-radius: 18px;
  }

  .chat-thread-reset-copy strong {
    font-size: 0.88rem;
  }

  .chat-next-step-copy strong {
    font-size: 0.88rem;
  }

  .chat-thread-reset-copy span {
    font-size: 0.78rem;
  }

  .chat-next-step-copy span {
    font-size: 0.78rem;
  }

  .chat-thread-reset-button {
    width: 100%;
    justify-content: center;
    padding: 0.72rem 0.9rem;
  }

  .chat-thread-reset-actions {
    width: 100%;
  }

  .chat-thread-reset-actions .message-action {
    width: 100%;
    justify-content: center;
  }

  .chat-thread-reset:not(.chat-thread-reset--recovery):not(.chat-thread-reset--think) {
    grid-template-columns: minmax(0, 1fr) minmax(8.4rem, 40%);
    align-items: center;
    gap: 0.55rem;
    padding-block: 0.58rem;
  }

	  .chat-thread-reset--think {
	    grid-template-columns: minmax(0, 1fr) auto;
	    align-items: center;
	    gap: 0.5rem;
	    margin-bottom: 0.34rem;
	    padding: 0.4rem 0.5rem;
	    border-radius: 16px;
	  }

	  .chat-thread-reset--think .chat-thread-reset-copy {
	    display: grid;
	    gap: 0;
	  }

	  .chat-thread-reset--think .whisp-think-heading {
	    display: none;
	  }

	  .chat-thread-reset--think .chat-thread-reset-copy > .whisp-think-copy {
	    -webkit-line-clamp: 1;
	    font-size: 0.76rem;
	    line-height: 1.18;
	  }

  .chat-thread-reset--think .chat-thread-reset-actions {
    width: auto;
    flex: 0 0 auto;
  }

	  .chat-thread-reset--think .chat-thread-reset-actions .message-action {
	    width: auto;
	    min-width: 7.4rem;
	    min-height: 44px;
	    justify-content: center;
	    padding: 0.5rem 0.68rem;
	    white-space: nowrap;
	  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.42rem;
    margin-bottom: 0.3rem;
    padding: 0.4rem 0.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.35rem;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy strong {
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy span {
    display: none;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-form {
    width: auto;
    min-width: 0;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-button {
    width: auto;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .chat-next-step-form .button {
    width: 100%;
    justify-content: center;
    padding: 0.72rem 0.9rem;
  }

  .mobile-chat-branch-hint {
    display: none;
    align-items: center;
    justify-content: flex-start;
    min-height: 34px;
    margin-top: 0.08rem;
    padding: 0.12rem 0.12rem 0;
    border-radius: 0;
    border: 0;
    background: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
  }

  .chat-surface-footnote {
    padding-top: 0.45rem;
    font-size: 0.75rem;
  }

  .composer-optional-fields-grid {
    grid-template-columns: 1fr;
  }

  .reply-option-button,
  .message-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.58rem 0.9rem;
    font-size: 0.86rem;
  }

  .message-action--icon {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .composer-utility summary,
  .chat-ticket-note-panel summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    width: auto;
    padding: 0.46rem 0.78rem;
    font-size: 0.84rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
  }

  .composer-utility-row {
    display: none;
  }

  .composer-utility[open] > :not(summary) {
    margin-top: 0.55rem;
    padding: 0.78rem;
    border-radius: 16px;
  }

  .composer-inline-actions {
    right: var(--composer-action-inline-end);
    bottom: var(--composer-action-block-end);
  }

  .composer.composer-has-draft .composer-shell {
    padding: 0.5rem 0.54rem 0.42rem 0.82rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
  }

  .composer-action {
    width: var(--composer-action-size);
    height: var(--composer-action-size);
  }

  .composer-note {
    display: none;
  }

  .composer-footer {
    gap: 0.32rem;
    padding: 0;
  }

  .case-link-chip,
  .presentation-chip,
  .message-mode-badge,
  .stream-state-chip {
    padding: 0.28rem 0.62rem;
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .button-row,
  .callout-actions {
    flex-direction: column;
    width: 100%;
  }

  .button-row > *,
  .button-row form,
  .callout-actions > *,
  .callout-actions form,
  .stack-form,
  .panel form,
  .panel label,
  .panel input,
  .panel select,
  .panel textarea,
  .chat-workspace-panel form,
  .chat-workspace-panel label,
  .chat-workspace-panel input,
  .chat-workspace-panel select,
  .chat-workspace-panel textarea {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .button-row .button,
  .button-row .message-action,
  .callout-actions .button,
  .callout-actions .message-action {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    white-space: normal;
  }

  .chat-signal-rail,
  .review-signal-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    overflow: visible;
    padding-bottom: 0;
    margin-inline: 0;
  }

  .chat-signal-rail .signal-chip,
  .review-signal-rail .signal-chip {
    min-width: 0;
  }

  .clean-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
  }

  .clean-list li {
    margin: 0;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
  }

  .user-access-summary {
    flex-direction: column;
  }

  .user-access-summary-meta {
    justify-content: flex-start;
  }

  .user-access-columns,
  .user-access-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .user-drive-rule {
    flex-direction: column;
  }

  .timeline li {
    padding: 1rem;
  }

  .panel {
    gap: 0.8rem;
    padding: 1rem;
    box-shadow: none;
  }

  .mobile-section-nav {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.1rem 0 0.2rem;
    margin-top: 0.15rem;
    scrollbar-width: none;
  }

  .mobile-section-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-section-nav a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .admin-section-nav {
    flex-wrap: wrap;
    overflow: visible;
    padding: 0.1rem 0 0.2rem;
  }

  .admin-section-nav a {
    flex: 1 1 auto;
  }

  .chat-canvas--active .chat-workspace-panel .chat-signal-rail {
    grid-template-columns: 1fr;
  }

  .chat-canvas--active > .chat-workspace-panel .eyebrow,
  .chat-canvas--active > .chat-workspace-panel [data-chat-details-case],
  .chat-canvas--active > .chat-workspace-panel [data-chat-details-confidence],
  .chat-canvas--active > .chat-workspace-panel [data-chat-details-evidence] {
    display: none;
  }

  .chat-canvas--active > .chat-workspace-panel .chat-workspace-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.7rem 0.88rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
  }

  .chat-canvas--active > .chat-workspace-panel .chat-workspace-summary-copy {
    gap: 0.12rem;
  }

  .chat-canvas--active > .chat-workspace-panel .chat-workspace-summary-title {
    font-size: 0.92rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-canvas--active > .chat-workspace-panel .chat-workspace-summary-meta {
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .chat-context-strip,
  .chat-resume-card {
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
  }

  .conversation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.58rem;
  }

  .conversation-actions-primary {
    width: 100%;
  }

  .conversation-actions--solo-copy {
    inset-block-start: 0.54rem;
    inset-inline-end: 0.5rem;
    width: auto;
  }

  .conversation-actions--solo-copy .conversation-actions-primary {
    width: auto;
  }

  .conversation-actions-overflow {
    width: 100%;
    display: block;
    max-width: 100%;
  }

  .conversation-actions-overflow > .conversation-actions-overflow-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.42rem;
    max-width: 100%;
  }

  .conversation-actions-overflow-list .message-action {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    white-space: nowrap;
    padding: 0.52rem 0.76rem;
    font-size: 0.82rem;
  }

	  .conversation-actions-overflow-list .message-action--icon {
	    width: 44px;
	    min-width: 44px;
	    max-width: none;
	    flex: 0 0 44px;
	    padding: 0;
	  }

	  .conversation-actions-overflow-list .message-action--feedback {
	    position: relative;
	    width: 44px;
	    min-width: 44px;
	    max-width: none;
	    flex: 0 0 44px;
	    padding: 0;
	    font-size: 0;
	    color: var(--text-muted);
	  }

	  .conversation-actions-overflow-list .message-action--feedback::before,
	  .conversation-actions-overflow-list .message-action--feedback::after {
	    content: "";
	    position: absolute;
	    display: block;
	    pointer-events: none;
	  }

	  .conversation-actions-overflow-list .message-action--feedback-positive::before {
	    width: 15px;
	    height: 8px;
	    border-left: 2px solid currentColor;
	    border-bottom: 2px solid currentColor;
	    transform: translateY(-1px) rotate(-45deg);
	  }

	  .conversation-actions-overflow-list .message-action--feedback-negative::before {
	    width: 2px;
	    height: 14px;
	    border-radius: 999px;
	    background: currentColor;
	    transform: translateY(-3px);
	  }

	  .conversation-actions-overflow-list .message-action--feedback-negative::after {
	    width: 3px;
	    height: 3px;
	    border-radius: 999px;
	    background: currentColor;
	    transform: translateY(8px);
	  }

	  .conversation-response-cta {
	    grid-template-columns: minmax(0, 1fr) auto;
	  }

  .conversation-response-cta--correction {
    width: auto;
  }

  .chat-ticket-card {
    padding: 0.85rem 0.9rem;
  }

  .chat-thread.empty .suggestion-grid {
    gap: 0.55rem;
  }

  .chat-thread.empty .suggestion-card:nth-child(n + 3) {
    display: none;
  }

  .chat-guidance-popover {
    position: fixed;
    left: 0.72rem;
    right: 0.72rem;
    bottom: calc(var(--safe-bottom) + 5.15rem);
    width: auto;
    max-width: none;
    padding: 0.72rem 0.76rem 0.76rem;
    border-radius: 18px;
    z-index: 24;
  }

  .chat-guidance-popover--files {
    bottom: calc(var(--safe-bottom) + 1rem);
  }

  .chat-guidance-popover::before {
    top: auto;
    left: 2.2rem;
    bottom: -0.42rem;
    width: 0.76rem;
    height: 0.76rem;
    border-left: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
    border-right: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08));
    transform: rotate(45deg);
  }

  .chat-guidance-copy {
    gap: 0.2rem;
    padding-right: 2rem;
  }

  .chat-guidance-copy strong {
    font-size: 0.88rem;
  }

  .chat-guidance-copy p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.78rem;
    line-height: 1.32;
  }

  .chat-home-shell--landing .chat-canvas > .landing-guidance,
  .chat-home-shell--landing .chat-canvas > .chat-workspace-panel,
  .chat-home-shell--landing .chat-canvas > .admin-section-nav,
  .chat-home-shell--landing .chat-canvas > .task-board-disclosure,
  .chat-home-shell--landing .chat-canvas > .chat-signal-rail,
  .chat-home-shell--landing .chat-canvas > .chat-surface-footnote {
    display: none;
  }
}

@media (max-width: 680px) {
  .shell-sidebar {
    width: 100vw;
    border-radius: 0;
  }

  .page {
    width: 100%;
    padding-inline: 0;
  }

  .panel,
  .sidebar-panel {
    border-radius: 20px;
  }

  .mobile-menu-scroll,
  .sidebar-scroll {
    padding-inline: 0.72rem;
  }

  .mobile-menu-hero,
  .mobile-menu-branch,
  .mobile-menu-action,
  .mobile-menu-action--button {
    border-radius: 20px;
  }

  .sidebar-panel {
    padding: 0.82rem;
    gap: 0.68rem;
  }

  .conversation-stream-status {
    width: 100%;
    padding: 0.6rem 0.7rem;
    gap: 0.28rem;
  }

  .conversation-stream-status-message {
    font-size: 0.86rem;
  }

  .conversation-stream-status-note {
    font-size: 0.75rem;
  }

  .sidebar-action,
  .sidebar-nav a,
  .sidebar-logout {
    min-height: 44px;
    padding: 0.72rem 0.85rem;
  }

  .chat-home-header {
    margin-top: 0;
  }

  .chat-home-shell {
    gap: 0;
  }

  .composer-dock {
    padding-top: 0.44rem;
  }

  .task-board-shell {
    padding: 0.9rem;
    border-radius: 22px;
  }

  .task-board-grid {
    grid-template-columns: 1fr;
  }

  .starter-prompt-grid {
    grid-template-columns: 1fr;
  }

  .chat-context-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-resume-card {
    grid-template-columns: 1fr;
  }

  .chat-resume-card .nav-button {
    width: 100%;
    min-width: 0;
  }

  .chat-thread-reset:not(.chat-thread-reset--recovery):not(.chat-thread-reset--think) {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-thread-reset-button {
    width: 100%;
    white-space: normal;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.38rem;
    padding: 0.36rem 0.48rem;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy {
    display: flex;
    min-width: 0;
    align-items: center;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-button {
    width: auto;
    min-width: 6.9rem;
    max-width: 46vw;
    padding: 0.48rem 0.62rem;
    white-space: nowrap;
  }

  [data-authoritative-surface="tech"] #tech-chat .composer {
    gap: 0.46rem;
  }

  [data-authoritative-surface="tech"] #tech-chat .composer label:not(.sr-only) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: var(--text-muted);
  }

  [data-authoritative-surface="tech"] #tech-chat .composer select {
    min-height: 44px;
    padding: 0.58rem 0.72rem;
    border-radius: 14px;
  }

  .chat-workspace-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-workspace-summary-copy,
  .chat-workspace-summary-meta {
    flex: 0 1 auto;
    width: 100%;
  }

  .chat-workspace-summary-meta {
    justify-content: flex-start;
  }

  .metric-row,
  .chat-signal-rail,
  .review-signal-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .page {
    padding-inline: 0;
  }

  .mobile-topbar {
    padding-inline: 0.75rem;
  }

  .mobile-menu-scroll {
    padding-inline: 0.6rem;
  }

  .mobile-menu-hero,
  .mobile-menu-branch-summary,
  .mobile-menu-branch-body,
  .mobile-menu-action,
  .mobile-menu-action--button {
    padding-inline: 0.88rem;
  }

  .composer {
    padding: 0;
  }

  .chat-home-header {
    gap: 0.28rem;
  }

  .chat-home-header-mobile-note,
  .composer-note {
    font-size: 0.84rem;
    line-height: 1.38;
  }

  .composer-footer {
    gap: 0.45rem;
  }

  .chat-thread-reset {
    padding: 0.62rem 0.68rem;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.38rem;
    padding: 0.36rem 0.48rem;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy {
    display: flex;
    min-width: 0;
    align-items: center;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-home-shell--think-branch .chat-thread-reset[data-chat-thread-reset] .chat-thread-reset-button {
    width: auto;
    min-width: 6.9rem;
    max-width: 46vw;
    padding: 0.48rem 0.62rem;
    white-space: nowrap;
  }

  .chat-workspace-summary {
    gap: 0.55rem;
    padding-block: 0.72rem;
  }

  .chat-workspace-summary-meta {
    gap: 0.38rem;
  }

  .task-board-disclosure .chat-workspace-summary-meta .case-link-chip:nth-child(n + 3) {
    display: none;
  }

  .chat-next-step {
    padding: 0.62rem 0.68rem;
  }

  .chat-thread-reset-copy span {
    font-size: 0.75rem;
  }

  .chat-next-step-copy span {
    font-size: 0.75rem;
  }

  .conversation-bubble {
    padding: 0.94rem 0.9rem;
  }

  .conversation-stream-status {
    padding: 0.54rem 0.62rem;
  }

  .conversation-stream-status-head {
    gap: 0.45rem;
  }

  .conversation-stream-status-label {
    font-size: 0.75rem;
  }

  .conversation-stream-status-elapsed,
  .conversation-stream-status-note {
    font-size: 0.75rem;
  }

  .conversation-stream-status-message {
    font-size: 0.84rem;
    line-height: 1.42;
  }

  .conversation-bubble--solo-copy {
    padding-inline-end: calc(0.9rem + 2.7rem);
  }

  .conversation-content {
    font-size: 0.97rem;
  }

  .conversation-sop {
    gap: 0.58rem;
  }

  .conversation-sop-section {
    padding: 0.58rem 0.64rem;
    border-radius: 14px;
  }

  .conversation-sop-label {
    font-size: 0.75rem;
  }

  .conversation-sop-list {
    gap: 0.22rem;
  }

  .composer textarea {
    padding: 0.74rem var(--composer-text-inline-end-padding) var(--composer-text-block-end-padding) 0.82rem;
  }

  .composer.composer-has-draft textarea {
    padding: 0;
  }

  .empty-state--messenger .conversation-reply-options-list {
    grid-template-columns: 1fr;
  }

  .conversation-actions-primary .message-action {
    width: 100%;
  }

  .conversation-actions--solo-copy .conversation-actions-primary .message-action {
    width: 44px;
  }

  .conversation-actions-primary .message-action--icon {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .task-board-shell {
    padding: 0.82rem;
  }

  .conversation-reply-options-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reply-option-button {
    width: 100%;
    justify-content: flex-start;
  }

  .conversation-reply-options--choices .conversation-reply-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
  }

  .conversation-reply-options--choices .reply-option-button {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    justify-content: center;
    padding: 0.52rem 0.74rem;
    font-size: 0.82rem;
  }

  .conversation-reply-options--template .reply-option-button {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    justify-content: center;
    padding: 0.52rem 0.74rem;
    font-size: 0.82rem;
  }

  .conversation-response-cta .reply-option-button {
    width: auto;
    justify-content: center;
  }
}
