:root {
  --ink: #0e2142;
  --muted: #5d6c84;
  --paper: #f3f6fa;
  --surface: #fff;
  --line: #e2e8f1;
  --green: #0a84ff;
  --pine: #0e2142;
  --lime: #7cc1ff;
  --soft: #eaf3ff;
  --warning: #8a6b2f;
  --warm: #fbf3e2;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Inter, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Inter, sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
}
body {
  font-family: var(--body);
  font-size: 14px;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  font-weight: 700;
  border-radius: 999px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
button.secondary {
  background: var(--soft);
  color: #0a6fdb;
}
button.quiet {
  color: var(--muted);
}
input,
select,
textarea {
  border-color: var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
h1,
h2 {
  letter-spacing: -0.035em;
}
h1 {
  font-family: var(--body);
  font-weight: 800;
  font-size: 28px;
}
h2 {
  font-weight: 700;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.17em;
}
.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.brand > span {
  letter-spacing: -0.5px;
  font-weight: 800;
}
#app {
  grid-template-columns: 228px minmax(0, 1fr);
}
aside {
  background: var(--pine);
  color: var(--surface);
  gap: 0;
  padding: 35px 19px 22px;
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--pine);
}
aside .brand {
  padding: 0 12px;
  margin-bottom: 11px;
}
.sidebar-caption {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #8fa3c6;
  margin: 4px 12px 36px;
}
nav {
  gap: 5px;
}
nav button {
  display: flex;
  gap: 13px;
  align-items: center;
  color: #b4c5e2;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 10px;
}
nav button span {
  font-size: 17px;
  width: 19px;
  text-align: center;
  color: #93abd4;
}
nav button.selected {
  background: #1c3461;
  color: var(--surface);
}
nav button.selected span {
  color: var(--lime);
}
nav button:hover {
  background: #182c52;
  filter: none;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #7e93ba;
  margin: 23px 14px 7px;
}
.sidebar-footnote {
  margin-top: auto;
  padding: 26px 12px 14px;
  font-size: 10px;
  color: #a9bcdd;
}
.sidebar-footnote p {
  font-size: 9px;
  color: #7e93ba;
  margin: 9px 0;
}
.connection-light {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #30d158;
  border-radius: 50%;
  margin-right: 5px;
}
.aside-bottom {
  padding: 12px;
  border-top: 1px solid #24395f;
  font-size: 10px;
}
.aside-bottom button {
  font-size: 10px;
  padding: 7px 0;
  color: #c2d2ec;
}
main {
  padding: 31px clamp(24px, 4vw, 65px) 50px;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
}
header {
  margin-bottom: 26px;
}
header .eyebrow {
  margin-bottom: 6px;
}
#refresh {
  font-size: 11px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.safety {
  background: var(--soft);
  border: 0;
  font-size: 10px;
  color: #2e68b0;
  padding: 9px 13px;
  margin-bottom: 12px;
}
.safety .dot {
  background: var(--green);
  width: 5px;
  height: 5px;
}
#live-status {
  font-size: 10px;
  margin: 0 0 23px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 25px;
  margin: 0 0 22px;
  box-shadow: none;
}
.panel h2 {
  font-size: 15px;
  letter-spacing: -0.025em;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading .quiet {
  font-size: 10px;
  padding: 4px;
}
.workspace-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 42px 43px;
  background: #e9f1fb;
  border: 1px solid #dbe8f8;
  border-radius: 24px;
  margin-bottom: 25px;
  min-height: 310px;
  position: relative;
  overflow: hidden;
}
.workspace-hero h2,
.page-intro h2 {
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 15px 0 20px;
}
.workspace-hero h2 em,
.page-intro h2 em {
  font-weight: 800;
  font-style: normal;
  color: var(--green);
}
.workspace-hero p:not(.eyebrow) {
  color: #4e617f;
  font-size: 12px;
  line-height: 1.8;
}
.workspace-hero button {
  font-size: 11px;
  margin-top: 12px;
  padding: 12px 17px;
}
.workspace-hero button span {
  margin-left: 14px;
}
.orbit {
  width: 230px;
  height: 230px;
  border: 1px solid #c3d8f1;
  border-radius: 50%;
  position: relative;
  margin-right: 25px;
  flex-shrink: 0;
}
.orbit:before {
  content: "";
  position: absolute;
  inset: 25px;
  border: 1px dashed #bcd3f0;
  border-radius: 50%;
  transform: rotate(25deg);
}
.orbit-center svg {
  width: 58px;
  height: 58px;
}
.orbit-center {
  position: absolute;
  inset: 66px;
  background: var(--pine);
  color: var(--lime);
  font-family: var(--display);
  font-weight: 800;
  font-size: 56px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  transform: rotate(-8deg);
  box-shadow: 8px 14px 0 #d4e4f7;
}
.orbit-node {
  position: absolute;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #cde0f6;
  background: #f6faff;
  border-radius: 14px;
  font-size: 18px;
}
.orbit-a {
  top: -13px;
  left: 89px;
  font-size: 13px;
  font-weight: 600;
}
.orbit-b {
  right: -14px;
  bottom: 51px;
}
.orbit-c {
  bottom: 9px;
  left: 3px;
  color: var(--green);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 23px;
  border-radius: 16px;
}
.stat .value {
  display: block;
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 700;
  margin: 7px 0 2px;
}
.stat .caption {
  font-size: 10px;
  color: var(--muted);
}
.stat .stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.workspace-columns {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
}
.remote-panel {
  background: #edf3fb;
}
.remote-panel h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 18px 0 10px;
}
.remote-panel p {
  font-size: 12px;
}
.remote-panel button {
  font-size: 11px;
  margin-top: 10px;
  background: var(--surface);
  color: #0a6fdb;
}
.page-intro {
  margin: 30px 0;
  max-width: 700px;
}
.page-intro h2 {
  font-size: 43px;
}
.page-intro p.muted {
  max-width: 550px;
  font-size: 12px;
}
.page-intro.compact {
  margin-top: 8px;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.provider-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px 19px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.provider-card h3 {
  margin: 14px 0 4px;
  font-size: 14px;
}
.provider-card p {
  font-size: 10px;
  margin: 0 0 20px;
  color: var(--muted);
  flex: 1;
}
.provider-card button {
  font-size: 10px;
  width: 100%;
  padding: 10px;
}
.provider-card > .pill {
  align-self: flex-start;
  margin-bottom: 12px;
}
.provider-open {
  display: inline-block;
  margin: 8px 0 12px;
  font-weight: 600;
}
.provider-hooks summary {
  cursor: pointer;
  font-size: 13px;
}
.provider-hooks form {
  margin-top: 20px;
}
#connect-content details {
  margin: 18px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
#connect-content details > summary {
  cursor: pointer;
  margin-bottom: 12px;
}
.provider-icon {
  height: 39px;
  width: 39px;
  background: var(--soft);
  color: #0a6fdb;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}
.provider-card:nth-child(2) .provider-icon {
  background: #f6ece0;
  color: #b97448;
}
.provider-card:nth-child(3) .provider-icon {
  background: #edeafa;
  color: #655879;
}
.provider-card:nth-child(4) .provider-icon {
  background: #f2e9ef;
  color: #956a83;
}
.connection-row,
.privacy-row,
.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.connection-row:last-child,
.privacy-row:last-child,
.activity-row:last-child {
  border-bottom: 0;
}
.connection-row p,
.privacy-row p {
  margin: 4px 0;
  font-size: 10px;
  color: var(--muted);
}
.connection-row button,
.privacy-row button {
  font-size: 10px;
  white-space: nowrap;
}
.connection-row .mini-icon {
  font-size: 16px;
  display: grid;
  place-items: center;
  background: var(--soft);
  width: 35px;
  height: 35px;
  border-radius: 10px;
  flex-shrink: 0;
}
.connection-row .connection-text {
  flex: 1;
}
.pill {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 20px;
  background: var(--soft);
  color: #0a6fdb;
  font-size: 9px;
  white-space: nowrap;
}
.pill.pending {
  background: var(--warm);
  color: var(--warning);
}
.empty-state {
  padding: 24px 8px;
  text-align: center;
}
.empty-state p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 16px;
}
.empty-state h3 {
  font-size: 13px;
  margin: 0;
}
.empty-state button {
  font-size: 11px;
}
.advanced-keys {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.advanced-keys > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.activity-row .activity-description {
  flex: 1;
}
.activity-row time {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.activity-row .activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--soft);
  color: #0a6fdb;
  display: grid;
  place-items: center;
}
.activity-row strong {
  font-size: 11px;
}
.activity-row p {
  font-size: 10px;
  color: var(--muted);
  margin: 3px 0;
}
.draft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.draft-card {
  padding: 25px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.draft-card h3 {
  font-size: 14px;
  margin: 12px 0 10px;
}
.draft-card blockquote {
  margin: 15px 0;
  padding: 15px;
  border-left: 2px solid #9cc3f5;
  background: #f4f8fd;
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.8;
}
.draft-card p {
  font-size: 11px;
  color: var(--muted);
}
.draft-card button {
  font-size: 11px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.dialog-actions button {
  font-size: 12px;
}
.thread-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.thread-toolbar button {
  font-size: 10px;
  padding: 6px 10px;
}
.thread-drafts {
  border: 1px solid #dce7f5;
  background: #f6faff;
  border-radius: 10px;
  padding: 12px;
  font-size: 11px;
  margin-top: 8px;
}
.thread-drafts button {
  font-size: 10px;
  padding: 6px 10px;
}
.thread-drafts p {
  margin: 6px 0;
}
.inbox-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.folder-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #e7edf6;
  border-radius: 999px;
}
.folder-tabs button {
  font-size: 10px;
  padding: 7px 14px;
  background: transparent;
  color: var(--muted);
}
.folder-tabs button.selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px #0e214220;
}
#message-search-form {
  display: flex;
  gap: 8px;
  margin: 0;
}
#message-search-form input {
  margin: 0;
  font-size: 11px;
  padding: 9px 12px;
  min-width: 200px;
}
#message-search-form button {
  font-size: 10px;
  padding: 8px 14px;
}
.inbox {
  grid-template-columns: 290px minmax(0, 1fr);
  border-radius: 18px;
  min-height: 65vh;
}
.conversation-list {
  padding: 14px 11px;
  background: #fbfcfe;
}
.conversation-list input {
  font-size: 11px;
  padding: 10px 12px;
  background: var(--surface);
}
.chat {
  padding: 16px 12px;
  border: 0;
  margin: 3px 0;
  border-radius: 12px;
}
.chat strong {
  font-size: 12px;
  font-weight: 600;
}
.chat small {
  font-size: 9px;
  color: var(--muted);
}
.chat.active {
  background: var(--soft);
}
.chat .preview {
  font-size: 11px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  margin: 7px 0 0;
}
.chat.unread strong::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
}
.thread {
  padding: 22px;
}
.thread h2 {
  font-size: 16px;
  margin-bottom: 5px;
}
.thread #thread-header > p {
  font-size: 10px;
  margin: 0;
  color: var(--muted);
}
.bubble {
  font-size: 12px;
  background: #e9e9eb;
  color: #111318;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 5px;
  max-width: 82%;
  line-height: 1.7;
}
.bubble.outbound {
  background: var(--green);
  color: #fff;
  border-radius: 18px 18px 5px 18px;
}
.bubble small {
  font-size: 9px;
  color: var(--muted);
}
.bubble.outbound small {
  color: #ffffffc2;
}
.bubble.outbound a {
  color: #fff;
}
#compose label {
  font-size: 10px;
  margin: 10px 0;
}
#compose textarea {
  font-size: 12px;
  background: #f8fafd;
  padding: 13px;
  border-radius: 16px;
}
#compose select {
  font-size: 10px;
  padding: 7px;
  max-width: 240px;
}
#compose .compose-actions button {
  font-size: 10px;
  padding: 9px 13px;
}
.file-label {
  font-size: 10px;
}
.compose-actions {
  gap: 8px;
  flex-wrap: wrap;
}
#messages {
  scrollbar-width: thin;
}
.safety + .small {
  font-size: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 35px;
  width: min(560px, calc(100% - 32px));
  max-height: 88dvh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 22px 100px #0e214235;
  background: var(--surface);
}
dialog::backdrop {
  background: #0e214255;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-family: var(--display);
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 14px 0 18px;
}
dialog p,
dialog li {
  font-size: 12px;
  line-height: 1.8;
}
dialog ol {
  padding-left: 22px;
}
dialog li {
  padding: 5px 0;
}
.dialog-close {
  position: absolute;
  right: 17px;
  top: 12px;
  font-size: 25px;
  padding: 2px 9px;
}
.code-line {
  font-family: ui-monospace, monospace;
  font-size: 10px !important;
  padding: 13px;
  background: var(--soft);
  border-radius: 8px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.step-track {
  display: flex;
  gap: 8px;
  margin: 25px 0;
}
.step-track span {
  height: 3px;
  background: var(--line);
  flex: 1;
  border-radius: 3px;
}
.step-track span.current {
  background: var(--green);
}
.scope-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.scope-grid label,
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 500;
  margin: 5px 0;
  line-height: 1.6;
}
.scope-grid input,
.check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.connection-options {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.connection-options button {
  font-size: 11px;
}
#notice {
  position: fixed;
  right: 25px;
  top: 20px;
  left: auto;
  max-width: min(420px, 90vw);
  border-radius: 14px;
  box-shadow: 0 8px 35px #0e214225;
  z-index: 20;
  padding: 14px 20px;
  background: var(--pine);
  color: var(--surface);
  font-size: 12px;
}
.auth {
  max-width: 480px;
  padding: 35px;
  margin: 7vh auto;
}
.auth h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.auth .brand {
  margin-bottom: 55px;
}
.auth > p.muted {
  font-size: 13px;
}
.auth form {
  margin-top: 35px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 14px 45px #0e214212;
}
.auth form label:first-child {
  margin-top: 0;
}
.auth label {
  font-size: 12px;
}
.auth button {
  padding: 14px;
}
.auth .eyebrow {
  margin-bottom: 17px;
  color: #0a6fdb;
}
.auth-demo {
  margin: 26px 0 0;
  display: grid;
  gap: 8px;
}
.auth-demo span {
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 15px;
  max-width: 78%;
  width: fit-content;
}
.auth-demo .demo-in {
  background: #e9e9eb;
  color: #111318;
  border-radius: 18px 18px 18px 5px;
}
.auth-demo .demo-out {
  background: var(--green);
  color: #fff;
  border-radius: 18px 18px 5px 18px;
  justify-self: end;
}
a {
  color: #0a6fdb;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.search-result {
  display: block;
  text-align: left;
  color: var(--ink);
  background: transparent;
  width: 100%;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.search-result p {
  font-weight: 400;
  color: var(--muted);
  margin: 7px 0 0;
  white-space: pre-wrap;
}
.search-result small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
@media (min-width: 1450px) {
  .workspace-hero {
    padding: 50px 55px;
  }
  .orbit {
    margin-right: 50px;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 28px 24px;
  }
  .provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .orbit {
    width: 170px;
    height: 170px;
    margin-right: 5px;
  }
  .orbit-center {
    inset: 45px;
    font-size: 42px;
  }
  .orbit-a {
    left: 62px;
  }
  .orbit-b {
    bottom: 25px;
  }
  .orbit-c {
    bottom: 0;
  }
  .workspace-hero {
    padding: 30px;
  }
  .workspace-hero h2 {
    font-size: 42px;
  }
  .inbox {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  .stat {
    padding: 18px;
  }
  .workspace-columns {
    grid-template-columns: 1fr;
  }
  .draft-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  #app {
    grid-template-columns: 1fr;
  }
  aside {
    position: static;
    height: auto;
    padding: 17px 19px;
    gap: 13px;
    border: 0;
  }
  .sidebar-caption,
  .sidebar-footnote,
  .nav-caption,
  .aside-bottom {
    display: none;
  }
  aside .brand {
    margin: 0;
    padding: 0;
  }
  .brand span {
    font-size: 16px;
  }
  nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 5px;
  }
  nav button {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 10px;
    padding: 9px 12px;
  }
  nav button span {
    font-size: 13px;
    width: auto;
  }
  main {
    padding: 24px 18px 40px;
  }
  header {
    gap: 12px;
    margin-bottom: 17px;
  }
  h1 {
    font-size: 24px;
  }
  header .eyebrow {
    font-size: 8px;
  }
  #refresh {
    font-size: 9px;
    padding: 8px;
  }
  .workspace-hero {
    padding: 28px;
    min-height: 270px;
  }
  .workspace-hero h2 {
    font-size: 37px;
  }
  .workspace-hero p:not(.eyebrow) {
    font-size: 11px;
  }
  .orbit {
    width: 100px;
    height: 100px;
    margin-left: 20px;
  }
  .orbit:before {
    inset: 12px;
  }
  .orbit-center {
    inset: 24px;
    font-size: 32px;
    border-radius: 14px;
    box-shadow: 4px 8px 0 #d4e4f7;
  }
  .orbit-node {
    width: 29px;
    height: 29px;
    font-size: 13px;
    border-radius: 9px;
  }
  .orbit-a {
    left: 35px;
    font-size: 10px;
  }
  .orbit-b {
    right: -5px;
    bottom: 13px;
  }
  .orbit-c {
    left: -4px;
    bottom: -5px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat .value {
    font-size: 24px;
  }
  .panel {
    padding: 20px;
  }
  .page-intro h2 {
    font-size: 37px;
  }
  .inbox {
    grid-template-columns: 1fr;
  }
  .conversation-list {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  #messages {
    max-height: 52vh;
  }
  .thread {
    padding: 18px;
  }
  .folder-tabs button {
    padding: 7px 12px;
  }
  #message-search-form {
    width: 100%;
  }
  #message-search-form input {
    min-width: 0;
    flex: 1;
  }
  .inbox-topbar {
    gap: 12px;
  }
  .provider-grid {
    gap: 10px;
  }
  .provider-card {
    padding: 18px;
  }
  .connection-row {
    gap: 10px;
    flex-wrap: wrap;
  }
  .connection-row .connection-text {
    min-width: 140px;
  }
  dialog {
    padding: 27px;
  }
  .workspace-columns {
    gap: 0;
  }
  .page-intro {
    margin: 20px 0;
  }
  .auth {
    padding: 28px;
  }
  .auth h1 {
    font-size: 40px;
  }
  .auth form {
    padding: 22px;
  }
}
.aside-bottom #owner-email {
  display: block;
}
.aside-bottom #logout {
  display: block;
}
.safety {
  line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* The thread owns its scrolling; the composer stays in the visible workspace. */
.inbox {
  height: calc(100dvh - 265px);
  min-height: 400px;
  grid-template-rows: minmax(0, 1fr);
}
.conversation-list {
  max-height: none;
}
.thread {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.thread #messages {
  min-height: 40px;
  max-height: none;
  flex: 1;
  overflow: auto;
}
.thread #thread-header,
.thread #compose {
  flex-shrink: 0;
}
.thread #thread-header {
  max-height: 38%;
  overflow: auto;
}
.thread-drafts p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compose-options {
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.compose-options summary {
  cursor: pointer;
  padding: 4px 0;
}
#compose textarea {
  max-height: 160px;
  min-height: 62px;
  padding: 10px 12px;
}
#compose label {
  margin: 6px 0;
}
#compose .file-label {
  position: relative;
  padding: 8px 0;
}
#compose .file-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
#compose .file-label:focus-within {
  outline: 2px solid var(--green);
}
#compose .compose-actions button {
  margin-left: 0;
}
#compose #save-compose-draft {
  margin-left: auto;
}
#compose > .small {
  margin: 8px 0 0;
  font-size: 9px;
}
.back-to-chats {
  display: none;
}
@media (min-width: 761px) and (max-height: 800px) {
  .thread {
    padding: 16px;
  }
  .thread-toolbar {
    margin: 7px 0;
  }
  .thread-drafts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
  }
  .thread-drafts p {
    display: none;
  }
}
@media (max-width: 760px) {
  nav {
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  .inbox {
    height: auto;
    min-height: 0;
  }
  .inbox:not(.conversation-open) .thread {
    display: none;
  }
  .inbox .conversation-list {
    max-height: 65dvh;
    min-height: 300px;
  }
  .inbox.conversation-open .conversation-list {
    display: none;
  }
  .inbox.conversation-open .thread {
    height: calc(100dvh - 92px);
    min-height: 400px;
  }
  #app:has(.conversation-open) aside nav,
  #app:has(.conversation-open) main > header,
  #app:has(.conversation-open) main > .safety,
  #app:has(.conversation-open) #live-status,
  #app:has(.conversation-open) .inbox-topbar {
    display: none;
  }
  #app:has(.conversation-open) main {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .back-to-chats {
    display: inline-block;
  }
  .thread #messages {
    min-height: 40px;
  }
}
.discovery-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}
.discovery-filters label {
  display: grid;
  gap: 6px;
}
.discovery-filters input,
.discovery-filters select {
  width: 100%;
  min-width: 0;
}
