.focus-switch { display: none; }
@media (max-width: 1079px) {
  .host { display: block; width: 100%; height: 100dvh; min-height: 0; --conversation-width: 100%; }
  .workspace-shell { display: flex; flex-direction: column; height: 100dvh; }
  .primary-nav { position: fixed; inset: 0 auto 0 -224px; z-index: 40; transition: transform .18s ease; box-shadow: var(--shadow); }
  .primary-nav.open { transform: translateX(224px); }
  .project-header { height: 72px; min-height: 72px; gap: 10px; padding: 7px 10px; }
  .menu-button { display: block; flex: 0 0 44px; padding: 0; font-size: 18px; }
  .project-identity { flex: 1; }
  .project-identity > div { gap: 4px; }
  .project-identity strong { font-size: 16px; }
  .project-identity code { max-width: 148px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
  .project-identity > span { font-size: 9px; }
  .freshness { min-width: 0; max-width: 108px; text-align: right; }
  .freshness strong { display: none; }
  .freshness span { font-size: 9px; }
  .truth-strip { display: none; }
  .focus-switch { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; height: 48px; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .focus-switch button { min-height: 40px; border-radius: 7px; background: #f4f6fa; }
  .focus-switch button[aria-pressed="true"] { border-color: #7588de; background: var(--brand-soft); color: #3048b2; font-weight: 750; }
  .mobile-context-controls { position: static; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 138px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--canvas); }
  .mobile-context-controls label { display: grid; grid-template-columns: 1fr; gap: 3px; }
  .mobile-context-controls .project-picker { margin-left: 0; }
  .mobile-context-controls select { min-height: 44px; }
  .workspace-body { display: block; flex: 1; min-height: 0; }
  .canvas, .conversation { width: 100%; height: 100%; }
  .rail-divider { display: none; }
  .conversation { display: none; grid-template-rows: auto auto minmax(0, 1fr) auto; border: 0; }
  .host.show-conversation .canvas { display: none; }
  .host.show-conversation .conversation { display: grid; }
  .conversation-header { min-height: 58px; padding: 7px 10px; }
  .conversation-header h2 { font-size: 18px; }
  .canvas-return { display: block; order: -1; }
  .conversation-scroll { padding: 12px; }
  .composer { padding: 10px 12px; }
  .rail-controls { display: none; }
  .surface-bar { grid-template-columns: minmax(0, 1fr) auto; min-height: 60px; padding: 7px 12px; gap: 8px; }
  .surface-bar > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .surface-bar button { grid-column: 2; grid-row: 1 / 3; padding: 6px 8px; }
  .canvas-content { padding: 14px 12px 24px; }
  .surface-heading { gap: 10px; }
  .surface-heading h1 { font-size: 21px; }
  .surface-heading p { font-size: 12px; }
  .hero-grid, .owner-grid, .metric-grid, .evidence-grid { grid-template-columns: minmax(0, 1fr); }
  .evidence-grid .surface-card:last-child { grid-column: auto; }
  .inspector { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .inspector-panel { width: 100vw; height: 100dvh; max-height: none; }
  .inspector-header { min-height: 64px; padding: 8px 16px; }
  .inspector-header h2 { max-width: 200px; font-size: 17px; }
  .inspector-header button { min-width: 112px; padding-inline: 10px; }
  .inspector-body { padding: 16px; }
}
@media (max-width: 420px) {
  .project-identity > span { max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .conversation-header button { padding-inline: 7px; }
  .conversation-header small { font-size: 8px; }
  .surface-heading { display: grid; }
  .technical div, dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
