:root {
  --bg: #f3f1eb;
  --surface: #faf9f5;
  --surface-2: #f0eee7;
  --surface-3: #e9e6dd;
  --text: #232721;
  --muted: #70766c;
  --soft: #92978f;
  --line: #dcd8cd;
  --line-strong: #c9c4b7;
  --green: #5f7968;
  --green-soft: #e2e9e2;
  --amber: #a77527;
  --amber-soft: #f2e7d2;
  --red: #a84c44;
  --red-soft: #f3dfdc;
  --rail: #eae7de;
  --shadow: 0 16px 40px rgba(44, 48, 41, .10);
  --focus-width: 318px;
  --sidebar-width: 272px;
  --rail-width: 68px;
}

:root[data-theme="dark"] {
  --bg: #191a18;
  --surface: #20221f;
  --surface-2: #262824;
  --surface-3: #2d302b;
  --text: #ecece5;
  --muted: #adb2a8;
  --soft: #8d9389;
  --line: #373a34;
  --line-strong: #474b43;
  --green: #9ab09f;
  --green-soft: #27342b;
  --amber: #d0a45d;
  --amber-soft: #3a3021;
  --red: #d27a70;
  --red-soft: #3b2825;
  --rail: #1d1f1c;
  --shadow: 0 16px 40px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  overflow: hidden;
}
button, textarea, input { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
button { cursor: pointer; }
.hidden { display: none !important; }

.prototype-strip {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
}
.prototype-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--amber); }

.app-shell {
  position: fixed;
  inset: 28px 0 0 0;
  display: grid;
  grid-template-columns: var(--rail-width) var(--sidebar-width) minmax(0, 1fr);
  min-width: 0;
}
.app-shell:has(.focus-panel.open) { grid-template-columns: var(--rail-width) var(--sidebar-width) minmax(0, 1fr) var(--focus-width); }

.global-rail {
  grid-column: 1;
  min-width: 0;
  background: var(--rail);
  border-right: 1px solid var(--line);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.rail-brand, .rail-avatar, .rail-action, .rail-item {
  border: 0;
  background: transparent;
}
.rail-brand {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--text);
  color: var(--surface);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 6px;
}
.rail-nav { width: 100%; display: grid; gap: 4px; }
.rail-more { display: none; }
.rail-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.rail-item:hover { background: var(--surface-3); color: var(--text); }
.rail-item.active { background: var(--surface); color: var(--text); }
.rail-icon { font-size: 20px; line-height: 1; }
.rail-label { display: none; }
.rail-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--amber);
  color: #fff8ec;
  font-size: 9px;
  line-height: 16px;
}
.rail-spacer { flex: 1; }
.rail-action, .rail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.rail-action:hover { background: var(--surface-3); }
.rail-avatar { background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; }

.workspace-sidebar {
  grid-column: 2;
  min-width: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-head { padding: 16px 14px 9px; display: flex; align-items: center; gap: 6px; }
.workspace-switcher {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border-radius: 12px;
  text-align: left;
}
.workspace-switcher:hover { background: var(--surface-2); }
.workspace-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .03em;
  flex: none;
}
.workspace-icon.large { width: 42px; height: 42px; border-radius: 12px; font-size: 12px; }
.workspace-copy { min-width: 0; display: grid; }
.workspace-copy strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-copy small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron { color: var(--soft); }
.icon-button {
  border: 0;
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.sidebar-dismiss { display: none; }
.workspace-presence {
  margin: 0 20px 12px;
  padding: 8px 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.workspace-presence b { margin-left: auto; font-weight: 500; color: var(--soft); }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.module-nav { padding: 0 10px 16px; overflow: auto; overscroll-behavior: contain; }
.module-group + .module-group { margin-top: 14px; }
.module-group-label { padding: 0 10px 6px; color: var(--soft); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.module-item {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  text-align: left;
  color: var(--muted);
}
.module-item:hover { background: var(--surface-2); color: var(--text); }
.module-item.active { background: var(--green-soft); color: var(--text); }
.module-icon { width: 22px; display: grid; place-items: center; color: var(--soft); }
.module-item.active .module-icon { color: var(--green); }
.module-item em { font-size: 8px; font-style: normal; letter-spacing: .06em; color: var(--green); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px 4px; }
.conversation-mini-list { margin: 3px 0 4px 31px; display: grid; gap: 2px; }
.conversation-mini {
  border: 0;
  background: transparent;
  border-radius: 8px;
  min-width: 0;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  text-align: left;
  color: var(--muted);
}
.conversation-mini:hover, .conversation-mini.active { background: var(--surface-2); color: var(--text); }
.conversation-mini > span { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.conversation-mini.active > span { background: var(--green); }
.conversation-mini b { font-size: 11px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-mini em { font-size: 9px; font-style: normal; color: var(--soft); }
.workspace-sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
.related-devices-link {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}
.related-devices-link:hover { background: var(--surface-2); }
.related-devices-link div { display: grid; min-width: 0; }
.related-devices-link small { color: var(--soft); font-size: 10px; }
.related-devices-link strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-devices-link b { color: var(--soft); }
.sidebar-foot-note { padding: 8px 8px 0; color: var(--soft); font-size: 10px; line-height: 1.5; }

.main-stage {
  grid-column: 3;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
}
.app-shell:has(.focus-panel.open) .main-stage { grid-column: 3; }
.stage-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.stage-leading { min-width: 0; display: flex; align-items: center; gap: 8px; }
.mobile-nav-button { display: none; }
.context-path { min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.context-path span, .context-path strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-path i { color: var(--line-strong); font-style: normal; }
.context-path strong { color: var(--text); font-weight: 600; }
.stage-actions { display: flex; align-items: center; gap: 8px; }
.quiet-button, .focus-trigger, .attention-button, .secondary-button, .primary-button, .text-action, .composer-tool {
  border-radius: 9px;
}
.quiet-button {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.quiet-button kbd, .big-search kbd { color: var(--soft); font-size: 9px; border: 0; background: var(--surface-2); padding: 2px 5px; border-radius: 5px; }
.focus-trigger {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.focus-trigger b { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.focus-trigger b.attention { background: var(--amber); }
.attention-button {
  height: 34px;
  border: 0;
  background: var(--amber-soft);
  color: var(--amber);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.attention-button > span { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.attention-button b { font-size: 11px; }
.attention-button em { font-size: 10px; font-style: normal; }
.content-host { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 34px 34px 72px; }
.page-wrap.global-page { max-width: 1180px; }
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
}
.page-header > div:first-child { min-width: 0; }
.eyebrow { color: var(--soft); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-header h1, .conversation-header h1, .note-detail h1, .device-detail h1 { margin: 5px 0 7px; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -.03em; }
.page-header p, .conversation-header p, .device-detail > p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; }
.primary-button, .secondary-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 650;
}
.primary-button { border: 1px solid var(--text); background: var(--text); color: var(--surface); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.text-action { border: 0; background: transparent; padding: 0; color: var(--green); font-weight: 650; font-size: 12px; }
.text-action span { margin-left: 4px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.02em; }
.section-heading > small { color: var(--soft); }

.focus-panel {
  display: none;
  min-width: 0;
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow: hidden;
}
.focus-panel.open { grid-column: 4; display: grid; grid-template-rows: auto minmax(0,1fr); }
.focus-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 18px 13px; border-bottom: 1px solid var(--line); }
.focus-panel-head h2 { margin: 3px 0 0; font-size: 18px; }
.focus-content { min-height: 0; overflow: auto; padding: 16px 18px 30px; }
.focus-block { padding-bottom: 18px; border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.focus-label { color: var(--soft); font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.focus-block strong { font-size: 15px; line-height: 1.35; }
.focus-block p { margin: 0; color: var(--muted); font-size: 11px; }
.focus-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.focus-section h3 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); }
.focus-line, .runtime-lines > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 11px; }
.focus-line span, .runtime-lines span { color: var(--muted); }
.focus-line b, .runtime-lines b { text-align: right; font-weight: 600; }
.focus-timeline { list-style: none; margin: 0; padding: 0; }
.focus-timeline li { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 8px; padding-bottom: 15px; }
.focus-timeline li::before { content: ''; position: absolute; top: 11px; bottom: 0; left: 5px; width: 1px; background: var(--line); }
.focus-timeline li:last-child::before { display: none; }
.focus-timeline li > span { margin-top: 4px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); z-index: 1; }
.focus-timeline li.done > span { border-color: var(--green); background: var(--green); }
.focus-timeline li.active > span { border-color: var(--amber); }
.focus-timeline li div { display: grid; }
.focus-timeline strong { font-size: 11px; }
.focus-timeline small { color: var(--muted); font-size: 10px; }
.attention-panel { background: var(--amber-soft); padding: 10px; border-radius: 10px; display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.attention-panel > span { color: var(--amber); font-weight: 800; }
.attention-panel strong { color: var(--text); font-size: 11px; }
.attention-panel p { margin: 2px 0 7px; color: var(--muted); font-size: 10px; }
.attention-panel button { border: 0; background: transparent; padding: 0; color: var(--amber); font-size: 10px; font-weight: 700; }
.focus-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.focus-chips span, .capability-list span { padding: 5px 7px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.muted-copy { color: var(--muted); font-size: 11px; }

.overview-flow { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.8fr); gap: 44px; padding: 26px 0 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.overview-lead h2 { margin: 10px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.overview-lead p { max-width: 650px; margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.status-kicker { color: var(--green); font-size: 11px; display: flex; align-items: center; gap: 7px; }
.status-kicker i, .status-dot-green, .status-dot-muted { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.status-dot-muted { background: var(--soft); }
.overview-lines { display: grid; align-content: center; }
.overview-lines > div { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.overview-lines > div:last-child { border-bottom: 0; }
.overview-lines span { color: var(--muted); font-size: 11px; }
.overview-lines strong { font-size: 18px; }
.overview-lines small { grid-column: 1 / -1; color: var(--soft); font-size: 10px; }
.module-proof { padding-top: 28px; }
.module-proof-list { display: grid; }
.module-proof-list button {
  min-height: 56px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto 22px;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.module-proof-list button:hover { background: var(--surface-2); }
.module-proof-list button > span { color: var(--soft); }
.module-proof-list strong { font-size: 13px; }
.module-proof-list small { color: var(--muted); }
.module-proof-list b { color: var(--soft); }

.conversation-layout { min-height: 100%; display: grid; grid-template-rows: auto auto minmax(260px, 1fr) auto; max-width: 960px; margin: 0 auto; padding: 28px 32px 24px; }
.conversation-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 14px; }
.conversation-header h1 { font-size: 28px; margin-bottom: 3px; }
.conversation-title-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mode-badge { padding: 4px 7px; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 700; }
.context-entry { white-space: nowrap; }
.mode-switch { display: flex; gap: 3px; border-bottom: 1px solid var(--line); padding-bottom: 10px; overflow: auto; }
.mode-switch button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }
.mode-switch button:hover { background: var(--surface-2); }
.mode-switch button.active { background: var(--surface-2); color: var(--text); font-weight: 650; }
.conversation-stream { min-height: 0; overflow: auto; padding: 22px 0 24px; overscroll-behavior: contain; }
.thread-boundary { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; color: var(--soft); font-size: 9px; padding-bottom: 24px; }
.thread-boundary b { color: var(--line-strong); }
.chat-message { max-width: 720px; margin-bottom: 22px; }
.chat-message.user { margin-left: auto; max-width: 620px; }
.chat-author { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.chat-author > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 8px; font-weight: 750; }
.chat-message.assistant .chat-author > span { background: var(--green-soft); color: var(--green); }
.chat-author strong { font-size: 11px; }
.chat-body { font-size: 13px; line-height: 1.65; }
.user .chat-body { background: var(--surface); border: 1px solid var(--line); padding: 11px 13px; border-radius: 13px 13px 3px 13px; }
.activity-note { max-width: 720px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.activity-note > span { color: var(--green); }
.activity-note div { display: grid; }
.activity-note strong { font-size: 11px; }
.activity-note small { color: var(--muted); font-size: 10px; }
.composer-zone { padding-top: 8px; }
.composer-scope { padding: 0 5px 6px; color: var(--soft); font-size: 9px; display: flex; align-items: center; gap: 5px; }
.composer-scope > span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.composer-scope button { border: 0; background: transparent; padding: 0; color: var(--green); }
.composer-box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 10px 8px; }
.composer-box textarea { display: block; width: 100%; min-height: 42px; max-height: 132px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); line-height: 1.5; }
.composer-box textarea::placeholder { color: var(--soft); }
.composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.composer-bar > div { display: flex; align-items: center; gap: 8px; }
.composer-tool { border: 0; background: var(--surface-2); padding: 5px 8px; color: var(--muted); font-size: 10px; }
.proposal-only { color: var(--soft); font-size: 9px; }
.send-button { width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--text); color: var(--surface); font-size: 16px; }

.workbench { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 38px; border-top: 1px solid var(--line); padding-top: 28px; }
.workbench-primary h2 { margin: 20px 0 7px; font-size: 24px; }
.workbench-primary > p { margin: 0; color: var(--muted); max-width: 650px; font-size: 13px; }
.workbench-state { display: grid; grid-template-columns: 10px 1fr; gap: 2px 8px; align-items: center; }
.workbench-state strong { font-size: 11px; }
.workbench-state small { grid-column: 2; color: var(--soft); font-size: 10px; }
.step-list { margin-top: 24px; display: grid; }
.step-list > div { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.step-list b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--soft); font-size: 9px; }
.step-list .done b { background: var(--green); border-color: var(--green); color: #fff; }
.step-list .active b { border-color: var(--amber); color: var(--amber); }
.step-list span { display: grid; }
.step-list strong { font-size: 12px; }
.step-list small { color: var(--muted); font-size: 10px; }
.workbench-context { padding-left: 24px; border-left: 1px solid var(--line); }
.workbench-context p { color: var(--muted); font-size: 12px; line-height: 1.65; }

.work-table { border-top: 1px solid var(--line); }
.work-table-head, .work-row { display: grid; grid-template-columns: minmax(260px, 1.7fr) minmax(120px, .8fr) 100px 90px; gap: 14px; align-items: center; }
.work-table-head { min-height: 38px; color: var(--soft); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.work-row { width: 100%; min-height: 62px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font-size: 11px; }
.work-row:hover, .work-row.selected { background: var(--surface-2); }
.task-title-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.task-check { width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 5px; flex: none; }
.task-title-cell > span { min-width: 0; display: grid; }
.task-title-cell strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.task-title-cell small { color: var(--soft); font-size: 9px; }
.work-row > span:nth-child(2), .work-row > span:nth-child(4) { color: var(--muted); }
.work-row em { font-style: normal; color: var(--soft); }
.status-text { font-weight: 650; color: var(--green); }
.status-text.attention { color: var(--amber); }
.inline-note, .work-proof { margin-top: 18px; color: var(--muted); font-size: 11px; }
.work-proof { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.work-proof strong { color: var(--text); }
.view-tabs, .knowledge-filters { display: flex; gap: 4px; padding-bottom: 14px; }
.view-tabs { overflow: auto; }
.knowledge-filters { flex-wrap: wrap; }
.view-tabs button, .knowledge-filters button { border: 0; background: transparent; color: var(--muted); padding: 6px 9px; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.view-tabs button.active, .knowledge-filters button.active { background: var(--surface-2); color: var(--text); }

.knowledge-layout, .device-layout { min-height: 100%; display: grid; grid-template-columns: minmax(300px, 38%) minmax(0, 1fr); }
.knowledge-list-pane, .device-list-pane { padding: 30px 24px 60px; border-right: 1px solid var(--line); min-width: 0; }
.knowledge-list-pane .page-header, .device-list-pane .page-header { margin-bottom: 18px; }
.knowledge-list-pane .page-header h1, .device-list-pane .page-header h1 { font-size: 26px; }
.knowledge-list { border-top: 1px solid var(--line); }
.knowledge-row { width: 100%; min-height: 70px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 30px 1fr; gap: 9px; padding: 10px 4px; text-align: left; }
.knowledge-row:hover, .knowledge-row.active { background: var(--surface-2); }
.knowledge-type { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 8px; font-weight: 750; }
.knowledge-row div { display: grid; min-width: 0; }
.knowledge-row strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knowledge-row small { color: var(--muted); font-size: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-detail, .device-detail { min-width: 0; padding: 48px clamp(28px, 5vw, 70px) 70px; overflow: auto; }
.note-meta { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.note-meta span { color: var(--green); }
.note-lead { max-width: 700px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.note-body-copy { max-width: 700px; margin-top: 24px; color: var(--text); font-size: 13px; line-height: 1.75; }
.linked-items { max-width: 720px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.relation-list { display: grid; }
.relation-list button { min-height: 56px; border: 0; border-top: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-align: left; }
.relation-list button:hover { background: var(--surface-2); }
.relation-list button > span { color: var(--green); }
.relation-list button > div { display: grid; }
.relation-list strong { font-size: 11px; }
.relation-list small { color: var(--muted); font-size: 9px; }
.relation-list button > b { color: var(--soft); }
.relation-list.compact button { grid-template-columns: 38px 1fr auto; }
.empty-relation, .empty-state { color: var(--muted); font-size: 12px; padding: 24px 0; }

.extension-page .page-header { margin-bottom: 24px; }
.extension-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.extension-toolbar span { color: var(--muted); font-size: 10px; }
.simple-results { display: grid; }
.simple-results > div { min-height: 66px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 14px; align-content: center; border-bottom: 1px solid var(--line); }
.simple-results strong { font-size: 12px; }
.simple-results small { grid-column: 1; color: var(--muted); }
.simple-results b { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--soft); font-size: 10px; }
.prototype-callout { margin-top: 28px; max-width: 660px; padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 9px; }
.prototype-callout > span { color: var(--green); }
.prototype-callout strong { font-size: 11px; }
.prototype-callout p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.training-run { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.training-run > div { display: grid; grid-template-columns: 12px 1fr; gap: 2px 7px; align-items: center; }
.training-run small { grid-column: 2; color: var(--muted); font-size: 10px; }
.training-timeline { max-width: 680px; margin-top: 28px; }
.training-timeline > div { display: grid; grid-template-columns: 18px 1fr; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.training-timeline b { margin-top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.training-timeline .done b { background: var(--green); }
.training-timeline span { display: grid; }
.training-timeline strong { font-size: 11px; }
.training-timeline small { color: var(--muted); font-size: 10px; }
.dashboard-status-line { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 10px; padding: 10px 0 16px; border-bottom: 1px solid var(--line); }
.dashboard-status-line span { display: flex; align-items: center; gap: 6px; }
.dashboard-status-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.market-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr); gap: 48px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.market-primary h2 { margin: 9px 0 5px; font-size: 26px; }
.market-primary p { color: var(--muted); max-width: 520px; font-size: 12px; }
.market-list > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.market-list span { color: var(--muted); font-size: 10px; }
.market-list strong { font-size: 11px; }
.market-list strong.safe { color: var(--green); }
.market-list small { grid-column: 1 / -1; color: var(--soft); font-size: 9px; }
.extension-relations { padding-top: 24px; }
.extension-relations > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.extension-relations button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 9px; font-size: 10px; }

.autopilot-flow { max-width: 760px; border-top: 1px solid var(--line); }
.run-state { padding: 16px 0; display: grid; grid-template-columns: 12px 1fr; gap: 2px 8px; align-items: center; border-bottom: 1px solid var(--line); }
.run-state > div { display: grid; }
.run-state strong { font-size: 12px; }
.run-state small { color: var(--muted); font-size: 10px; }
.autopilot-flow ol { list-style: none; margin: 0; padding: 0; }
.autopilot-flow li { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); }
.autopilot-flow li b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 9px; color: var(--soft); }
.autopilot-flow li.done b { background: var(--green); border-color: var(--green); color: #fff; }
.autopilot-flow li.active b { border-color: var(--amber); color: var(--amber); }
.autopilot-flow li span { font-size: 11px; }
.today-intro { padding: 20px 0 26px; border-top: 1px solid var(--line); }
.today-intro div { display: grid; gap: 4px; }
.today-intro span { color: var(--soft); font-size: 10px; }
.today-intro strong { font-size: 20px; }
.today-intro p { margin: 0; color: var(--muted); font-size: 11px; }
.calendar-strip { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); }
.calendar-strip > div { min-height: 110px; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 4px; }
.calendar-strip > div:last-child { border-right: 0; }
.calendar-strip span { color: var(--soft); font-size: 9px; text-transform: uppercase; }
.calendar-strip strong { font-size: 20px; font-weight: 500; }
.calendar-strip small { color: var(--green); font-size: 9px; }
.calendar-strip .today { background: var(--green-soft); }

.home-now { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr); gap: 38px; padding: 28px 0 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-now-copy h2 { margin: 8px 0 5px; font-size: 25px; }
.home-now-copy p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.home-now-side { padding-left: 24px; border-left: 1px solid var(--line); display: grid; align-content: center; justify-items: start; }
.home-now-side > span { color: var(--soft); font-size: 10px; }
.home-now-side strong { margin: 5px 0 2px; font-size: 18px; color: var(--amber); }
.home-now-side small { color: var(--muted); font-size: 10px; margin-bottom: 10px; }
.recent-workspaces { padding-top: 28px; }
.recent-list { display: grid; }
.recent-list button, .workspace-directory button {
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  min-height: 64px;
  display: grid;
  align-items: center;
  text-align: left;
}
.recent-list button { grid-template-columns: 42px minmax(0,1fr) auto 20px; gap: 10px; }
.recent-list button:hover, .workspace-directory button:hover { background: var(--surface-2); }
.recent-list button > div { display: grid; }
.recent-list strong { font-size: 12px; }
.recent-list small { color: var(--muted); font-size: 10px; }
.recent-list b { color: var(--soft); font-size: 10px; font-weight: 500; }
.recent-list em { color: var(--soft); font-style: normal; }
.workspace-directory { display: grid; border-bottom: 1px solid var(--line); }
.workspace-directory button { grid-template-columns: 52px minmax(0,1fr) auto 24px; gap: 12px; padding: 12px 4px; }
.workspace-directory button > div { min-width: 0; display: grid; }
.workspace-directory strong { font-size: 12px; }
.workspace-directory small { color: var(--muted); font-size: 10px; }
.workspace-directory em { margin-top: 3px; color: var(--soft); font-size: 9px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-directory button > b { color: var(--soft); font-size: 9px; font-weight: 500; }
.workspace-directory button > i { color: var(--soft); font-style: normal; }

.device-layout { grid-template-columns: minmax(320px, 36%) minmax(0,1fr); }
.device-list { border-top: 1px solid var(--line); }
.device-row { width: 100%; min-height: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; text-align: left; }
.device-row:hover, .device-row.active { background: var(--surface-2); }
.device-symbol { color: var(--green); }
.device-row > div { display: grid; }
.device-row strong { font-size: 11px; }
.device-row small { color: var(--muted); font-size: 9px; }
.device-status { font-size: 9px; color: var(--green); }
.device-status.planned { color: var(--amber); }
.device-status.offline { color: var(--soft); }
.device-detail section { max-width: 720px; margin-top: 32px; }
.device-detail h3 { margin: 0 0 10px; color: var(--soft); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.capability-list { display: flex; flex-wrap: wrap; gap: 6px; }
.run-list { display: grid; border-top: 1px solid var(--line); }
.run-list button { min-height: 62px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; text-align: left; }
.run-list button:hover { background: var(--surface-2); }
.run-list button > div { display: grid; }
.run-list strong { font-size: 11px; }
.run-list small { color: var(--muted); font-size: 9px; }
.run-list b { color: var(--soft); font-size: 9px; }
.settings-list { max-width: 720px; border-top: 1px solid var(--line); }
.settings-list > div { min-height: 66px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.settings-list span { display: grid; }
.settings-list strong { font-size: 11px; }
.settings-list small { color: var(--muted); font-size: 9px; }
.settings-list b { color: var(--soft); font-size: 10px; }
.big-search { width: 100%; min-height: 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 0 14px; }
.big-search strong { font-size: 11px; color: var(--muted); font-weight: 500; }

.workspace-picker, .command-palette, .context-popover, .mobile-global-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 26, 23, .36);
  display: grid;
  place-items: center;
  padding: 18px;
}
.picker-dialog, .command-dialog, .context-dialog, .mobile-sheet-card {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.picker-dialog, .context-dialog, .mobile-sheet-card { padding: 18px; }
.picker-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.picker-head h2 { margin: 3px 0 0; font-size: 20px; }
.picker-intro { margin: 8px 0 16px; color: var(--muted); font-size: 11px; }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.workspace-card { min-width: 0; border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 12px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 10px; text-align: left; }
.workspace-card:hover, .workspace-card.active { background: var(--surface-2); }
.workspace-card > div { min-width: 0; display: grid; }
.workspace-card strong { font-size: 12px; }
.workspace-card small { color: var(--muted); font-size: 9px; }
.workspace-card p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.workspace-card em { color: var(--soft); font-style: normal; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-card > b { color: var(--green); font-size: 9px; }
.command-dialog { width: min(650px, 100%); padding: 0; align-self: start; margin-top: 8vh; }
.command-search { height: 56px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.command-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.command-search kbd { color: var(--soft); font-size: 9px; }
.command-results { padding: 10px; max-height: 480px; overflow: auto; }
.command-section-label { padding: 4px 8px 7px; color: var(--soft); font-size: 9px; letter-spacing: .08em; }
.command-results button { width: 100%; min-height: 48px; border: 0; border-radius: 9px; background: transparent; display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; text-align: left; padding: 6px 8px; }
.command-results button:hover { background: var(--surface-2); }
.command-kind { width: 28px; height: 28px; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; color: var(--muted); font-size: 8px; font-weight: 700; }
.command-results button > div { display: grid; }
.command-results strong { font-size: 11px; }
.command-results small { color: var(--muted); font-size: 9px; }
.command-results kbd { color: var(--soft); font-size: 9px; }
.command-empty { padding: 24px 8px; color: var(--muted); font-size: 11px; }
.context-dialog { width: min(560px, 100%); }
.context-stack { margin-top: 14px; border-top: 1px solid var(--line); }
.context-stack > div { display: grid; grid-template-columns: 90px 1fr; gap: 1px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.context-stack span { color: var(--soft); font-size: 9px; text-transform: uppercase; }
.context-stack strong { font-size: 11px; }
.context-stack small { grid-column: 2; color: var(--muted); font-size: 9px; }
.context-warning { margin-top: 14px; background: var(--surface-2); border-radius: 10px; padding: 10px; display: grid; grid-template-columns: 22px 1fr; gap: 7px; }
.context-warning span { color: var(--green); }
.context-warning p { margin: 0; color: var(--muted); font-size: 10px; }
.mobile-global-sheet { display: none; }
.mobile-global-links { display: grid; margin-top: 10px; }
.mobile-global-links button { min-height: 48px; border: 0; border-top: 1px solid var(--line); background: transparent; display: flex; align-items: center; gap: 10px; text-align: left; }
.mobile-global-links button span { width: 28px; color: var(--muted); }
.mobile-global-links button strong { font-size: 11px; }

.toast { position: fixed; z-index: 130; right: 18px; bottom: 18px; max-width: 360px; background: var(--text); color: var(--surface); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow); display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.toast-mark { color: #b6ceb9; }
.toast div { display: grid; }
.toast strong { font-size: 11px; }
.toast small { color: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 9px; }
.drawer-scrim { display: none; }

@media (max-width: 1199px) {
  .global-rail { position: relative; z-index: 75; }
  .app-shell, .app-shell:has(.focus-panel.open) { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
  .workspace-sidebar {
    position: fixed;
    z-index: 70;
    top: 28px;
    bottom: 0;
    left: var(--rail-width);
    width: min(var(--sidebar-width), calc(100vw - var(--rail-width) - 20px));
    transform: translateX(-110%);
    transition: transform .2s ease;
    box-shadow: var(--shadow);
  }
  .workspace-sidebar.mobile-open { transform: translateX(0); }
  .sidebar-dismiss { display: grid; }
  .main-stage { grid-column: 2; }
  .mobile-nav-button { display: grid; }
  .focus-panel, .focus-panel.open {
    position: fixed;
    z-index: 72;
    top: 28px;
    bottom: 0;
    right: 0;
    width: min(var(--focus-width), calc(100vw - var(--rail-width) - 16px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    transform: translateX(110%);
    transition: transform .2s ease;
    box-shadow: var(--shadow);
  }
  .focus-panel.open { transform: translateX(0); }
  .drawer-scrim.open { display: block; position: fixed; z-index: 68; inset: 28px 0 0 var(--rail-width); background: rgba(26, 28, 25, .28); }
  .page-wrap { padding-left: 28px; padding-right: 28px; }
  .workbench { grid-template-columns: 1fr; }
  .workbench-context { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .knowledge-layout, .device-layout { grid-template-columns: minmax(270px, 38%) minmax(0,1fr); }
}

@media (max-width: 860px) {
  .search-trigger span:nth-child(2), .search-trigger kbd { display: none; }
  .quiet-button { width: 34px; padding: 0; justify-content: center; }
  .attention-button em { display: none; }
  .page-wrap { padding: 28px 22px 70px; }
  .overview-flow, .home-now, .market-board { grid-template-columns: 1fr; gap: 22px; }
  .home-now-side, .workbench-context { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .work-table-head { display: none; }
  .work-row { grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; padding: 10px 4px; }
  .work-row > span:nth-child(2) { grid-column: 1; padding-left: 25px; font-size: 10px; }
  .work-row > span:nth-child(3) { grid-column: 2; grid-row: 1; }
  .work-row > span:nth-child(4) { grid-column: 2; grid-row: 2; font-size: 9px; }
  .knowledge-layout, .device-layout { grid-template-columns: 1fr; }
  .knowledge-list-pane, .device-list-pane { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
  .knowledge-list { display: flex; overflow-x: auto; border-top: 1px solid var(--line); }
  .knowledge-row { flex: 0 0 250px; border-right: 1px solid var(--line); }
  .note-detail, .device-detail { padding: 28px 24px 70px; }
  .calendar-strip { grid-template-columns: repeat(4, 1fr); }
  .calendar-strip > div { min-height: 86px; }
}

@media (max-width: 767px) {
  :root { --mobile-nav-height: 62px; }
  body { overflow: hidden; }
  .prototype-strip { height: 24px; padding: 0 10px; justify-content: flex-start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
  .app-shell, .app-shell:has(.focus-panel.open) { inset: 24px 0 0; grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) var(--mobile-nav-height); }
  .global-rail {
    position: fixed;
    z-index: 75;
    inset: auto 0 0 0;
    height: var(--mobile-nav-height);
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--surface);
  }
  .rail-brand, .rail-spacer, .rail-action, .rail-avatar { display: none; }
  .rail-nav { display: contents; }
  .rail-item { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; }
  .rail-icon { font-size: 18px; }
  .rail-label { display: block; max-width: 68px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 8px; }
  .rail-item:nth-child(2), .rail-item:nth-child(3), .rail-item:nth-child(7), .rail-item:nth-child(8) { display: none; }
  .rail-more { display: flex !important; }
  .rail-badge { top: 2px; right: calc(50% - 20px); }
  .workspace-sidebar { top: 24px; bottom: var(--mobile-nav-height); left: 0; width: min(310px, calc(100vw - 32px)); }
  .main-stage { grid-column: 1; grid-row: 1; grid-template-rows: 54px minmax(0,1fr); padding-bottom: var(--mobile-nav-height); }
  .stage-topbar { padding: 0 10px; gap: 8px; }
  .context-path { max-width: 48vw; }
  .context-path span, .context-path i { display: none; }
  .focus-trigger { width: 34px; padding: 0; justify-content: center; }
  .focus-trigger span { display: none; }
  .focus-panel, .focus-panel.open { top: 24px; bottom: var(--mobile-nav-height); width: min(330px, calc(100vw - 24px)); }
  .drawer-scrim.open { inset: 24px 0 var(--mobile-nav-height) 0; }
  .page-wrap { padding: 24px 16px 54px; }
  .page-header { display: grid; gap: 12px; margin-bottom: 22px; }
  .page-header h1, .conversation-header h1, .note-detail h1, .device-detail h1 { font-size: 26px; }
  .page-actions { justify-self: start; }
  .overview-flow { padding-top: 18px; }
  .module-proof-list button { grid-template-columns: 26px 1fr 18px; }
  .module-proof-list button small { display: none; }
  .conversation-layout { min-height: 100%; padding: 18px 14px 16px; grid-template-rows: auto auto minmax(180px,1fr) auto; }
  .conversation-header { display: grid; gap: 10px; }
  .conversation-title-line { align-items: flex-start; flex-wrap: wrap; }
  .context-entry { justify-self: start; }
  .conversation-stream { padding-top: 16px; }
  .chat-message { margin-bottom: 18px; }
  .chat-body { font-size: 12px; }
  .proposal-only { display: none; }
  .composer-scope { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .work-row { min-height: 66px; }
  .work-proof { align-items: flex-start; flex-direction: column; }
  .knowledge-list-pane, .device-list-pane { padding: 22px 14px 18px; }
  .knowledge-row { flex-basis: 220px; }
  .note-detail, .device-detail { padding: 24px 16px 54px; }
  .note-lead { font-size: 15px; }
  .market-board { padding: 24px 0; }
  .calendar-strip { grid-template-columns: repeat(2, 1fr); }
  .workspace-directory button { grid-template-columns: 44px minmax(0,1fr) 18px; }
  .workspace-directory button > b { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }
  .picker-dialog, .context-dialog { border-radius: 14px; padding: 14px; }
  .workspace-picker, .command-palette, .context-popover, .mobile-global-sheet { padding: 10px; align-items: end; }
  .command-dialog { margin: 0; align-self: center; }
  .mobile-global-sheet { display: grid; }
  .mobile-sheet-card { width: 100%; max-height: 70vh; border-radius: 16px 16px 8px 8px; }
  .toast { right: 10px; left: 10px; bottom: calc(var(--mobile-nav-height) + 10px); max-width: none; }
}

@media (max-width: 420px) {
  .attention-button { width: 32px; padding: 0; justify-content: center; }
  .attention-button > span { display: none; }
  .page-header p, .conversation-header p { font-size: 12px; }
  .workspace-directory button { padding-left: 0; padding-right: 0; }
  .home-now-copy h2 { font-size: 22px; }
  .mode-switch { margin-right: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
