:root {
  --background: #080b0c;
  --surface: #111617;
  --surface-deep: #0d1213;
  --surface-soft: #151b1c;
  --border: #2b3434;
  --border-bright: #56615f;
  --platinum: #e9ece8;
  --muted: #9ba5a2;
  --quiet: #737e7b;
  --teal: #0f4c4a;
  --teal-deep: #0a3534;
  --emerald: #32c48d;
  --danger: #ef766f;
  --warning: #e3b55e;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--platinum);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }

.entry-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 48px 24px;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 37%, rgba(61, 76, 75, .2), transparent 35%),
    radial-gradient(circle at 50% 75%, rgba(15, 76, 74, .1), transparent 40%),
    linear-gradient(180deg, #090d0f 0%, #070a0b 100%);
}
.entry-shell::before {
  position: absolute;
  z-index: -2;
  width: min(92vw, 1240px);
  aspect-ratio: 1;
  border: 1px solid rgba(135, 151, 147, .035);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 155px rgba(135,151,147,.018), 0 0 0 310px rgba(135,151,147,.012);
}
.network-grid {
  position: absolute;
  z-index: -3;
  inset: -15%;
  opacity: .23;
  background-image:
    linear-gradient(30deg, transparent 49.6%, rgba(113,135,130,.14) 50%, transparent 50.4%),
    linear-gradient(150deg, transparent 49.6%, rgba(113,135,130,.1) 50%, transparent 50.4%),
    radial-gradient(circle, rgba(113,135,130,.35) 0 2px, transparent 2.5px);
  background-size: 260px 150px;
  mask-image: radial-gradient(circle at center, black 12%, transparent 72%);
}
.auth-card {
  width: min(100%, 660px);
  padding: 40px 36px 28px;
  border: 1px solid rgba(201,209,205,.72);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 32%), rgba(15,21,22,.95);
  box-shadow: 0 38px 110px rgba(0,0,0,.54), inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
}
.brand-block { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.wordmark {
  color: var(--platinum);
  font-size: clamp(1.9rem, 4vw, 2.3rem);
  font-weight: 430;
  letter-spacing: -.055em;
  line-height: 1;
  text-decoration: none;
}
.wordmark span { color: #aeb5b2; font-weight: 300; }
.beta-badge, .secure-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 7px 14px;
  border: 1px solid rgba(50,196,141,.38);
  border-radius: 7px;
  background: rgba(8,38,37,.5);
  color: var(--emerald);
  font-size: .85rem;
  font-weight: 520;
}
.lock-mark {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.lock-mark::before {
  position: absolute;
  bottom: 8px;
  left: 2px;
  width: 6px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  content: "";
}
.intro-copy { max-width: 570px; margin: 26px auto 28px; text-align: center; }
.intro-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: 1.08;
  text-wrap: balance;
}
.intro-copy p { max-width: 510px; margin: 16px auto 0; color: var(--muted); line-height: 1.55; text-wrap: balance; }
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6,10,11,.42);
}
.mode-switch button {
  position: relative;
  min-height: 53px;
  border: 0;
  background: transparent;
  color: #b7bfbc;
  cursor: pointer;
  transition: color 180ms ease-out, background 180ms ease-out;
}
.mode-switch button + button { border-left: 1px solid var(--border); }
.mode-switch button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: transparent;
  content: "";
}
.mode-switch button.active { background: rgba(15,76,74,.42); color: #4bdda8; }
.mode-switch button.active::after { background: var(--emerald); box-shadow: 0 0 15px rgba(50,196,141,.28); }
.auth-form { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; color: #b9c1bf; font-size: .82rem; }
.field input {
  width: 100%;
  height: 57px;
  border: 1px solid #3a4443;
  border-radius: 7px;
  outline: none;
  background: rgba(8,13,14,.76);
  color: var(--platinum);
  padding: 0 20px;
  font-size: .96rem;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, background 180ms ease-out;
}
.field input::placeholder { color: #828c89; }
.field input:hover { border-color: #53605e; }
.field input:focus { border-color: rgba(50,196,141,.72); background: rgba(9,16,16,.94); box-shadow: 0 0 0 3px rgba(50,196,141,.09); }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 58px; }
.visibility-button {
  position: absolute;
  top: 50%;
  right: 11px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aeb6b3;
  cursor: pointer;
}
.visibility-button:hover { background: rgba(255,255,255,.04); color: var(--platinum); }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 28px; color: var(--muted); font-size: .8rem; }
.remember-option { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.remember-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--emerald); }
.text-button { padding: 4px; border: 0; background: transparent; color: #a8b4b0; cursor: pointer; font-size: inherit; }
.text-button:hover { color: var(--emerald); }
.primary-action, .secondary-action {
  display: inline-flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 570;
  text-decoration: none;
  transition: transform 180ms ease-out, border-color 180ms ease-out, filter 180ms ease-out;
}
.primary-action {
  width: 100%;
  border: 1px solid rgba(50,196,141,.4);
  background: linear-gradient(180deg, rgba(17,94,90,.92), rgba(10,63,61,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px rgba(0,0,0,.18);
  color: #9af0ce;
}
.primary-action:hover, .secondary-action:hover { transform: translateY(-1px); filter: brightness(1.08); }
.secondary-action { min-height: 44px; padding: 0 18px; border: 1px solid #44504e; background: #131a1b; color: #d3d9d6; }
.private-note { margin: -2px 2px 0; color: var(--quiet); font-size: .78rem; line-height: 1.5; }
.alert { margin-bottom: 14px; padding: 11px 13px; border-radius: 7px; font-size: .82rem; }
.alert-error { border: 1px solid rgba(239,118,111,.32); background: rgba(99,34,31,.22); color: #f4aaa6; }
.alert-success { border: 1px solid rgba(50,196,141,.28); background: rgba(10,63,61,.25); color: #8be0bf; }
.trust-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 18px; padding-top: 21px; border-top: 1px solid rgba(120,137,132,.16); }
.trust-row > div { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; color: #aab3b0; font-size: .76rem; white-space: nowrap; }
.trust-row > div + div { border-left: 1px solid rgba(120,137,132,.18); }
.trust-icon { position: relative; display: inline-block; flex: 0 0 auto; width: 23px; height: 23px; border: 1px solid #aeb7b4; }
.shield-icon { border-radius: 8px 8px 12px 12px; transform: scaleX(.8); }
.server-icon { height: 17px; border-radius: 4px; box-shadow: 0 7px 0 -1px var(--surface), 0 7px 0 0 #aeb7b4; }
.sync-icon { border-radius: 50%; border-right-color: transparent; }
.compact-entry .error-card { display: grid; max-width: 520px; justify-items: center; text-align: center; }
.error-card h1 { margin: 35px 0 0; }
.error-card p { color: var(--muted); }
.link-action { margin-top: 20px; }

/* Workspace */
.dashboard-page { overflow: hidden; }
.workspace-shell { display: grid; grid-template-columns: 274px minmax(0,1fr); min-height: 100svh; background: #090d0e; }
.workspace-sidebar { display: flex; min-height: 100svh; flex-direction: column; padding: 22px 16px 16px; border-right: 1px solid #202829; background: #0d1213; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 7px 24px; }
.workspace-wordmark { font-size: 1.45rem; }
.secure-status { min-height: 24px; padding: 4px 8px; border-radius: 5px; font-size: .65rem; }
.connect-button { display: flex; min-height: 45px; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(50,196,141,.35); border-radius: 7px; background: linear-gradient(180deg,#124e4b,#0b3534); color: #8fe2c2; cursor: pointer; font-size: .84rem; font-weight: 600; }
.connect-button span { font-size: 1.2rem; font-weight: 300; }
.mail-nav { display: grid; gap: 4px; margin-top: 20px; }
.mail-nav a { display: grid; grid-template-columns: 24px 1fr auto; min-height: 40px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid transparent; border-radius: 6px; color: #8f9a97; font-size: .82rem; text-decoration: none; }
.mail-nav a:hover { background: #13191a; color: #d5dad8; }
.mail-nav a.active { border-color: #253231; background: #151d1e; color: #e0e5e2; }
.mail-nav a.active span:first-child { color: var(--emerald); }
.mail-nav strong { min-width: 20px; padding: 2px 6px; border-radius: 9px; background: #183b35; color: #6bd0aa; font-size: .65rem; text-align: center; }
.account-section { min-height: 0; margin-top: 27px; }
.section-label-row { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 9px; }
.section-label-row h2 { margin: 0; color: #697572; font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.section-label-row span { color: #596461; font-size: .65rem; }
.account-list { display: grid; gap: 4px; }
.account-item { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 9px; min-width: 0; padding: 9px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.account-item:hover { background: #13191a; }
.account-avatar, .user-avatar { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #31514c; border-radius: 50%; background: #14302d; color: #76d2af; font-size: .78rem; font-weight: 650; }
.account-copy, .sidebar-user > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.account-copy strong, .sidebar-user strong { overflow: hidden; color: #c7cfcc; font-size: .7rem; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small, .sidebar-user small { color: #687370; font-size: .63rem; }
.status-connected { color: #56c798 !important; }
.status-error { color: #e48a84 !important; }
.account-count { color: #7ad4b1; font-size: .66rem; }
.account-retry { min-height: 26px; padding: 0 8px; border: 1px solid rgba(239,118,111,.32); border-radius: 5px; background: rgba(99,34,31,.18); color: #efa09b; cursor: pointer; font-size: .62rem; }
.account-retry:hover { border-color: rgba(239,118,111,.62); background: rgba(99,34,31,.3); }
.account-empty { display: grid; gap: 5px; padding: 14px 9px; border: 1px dashed #26302f; border-radius: 7px; color: #87918e; font-size: .75rem; }
.account-empty small { color: #596461; font-size: .64rem; }
.sidebar-user { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; margin-top: auto; padding: 13px 8px 2px; border-top: 1px solid #202829; }
.sidebar-user form button { width: 30px; height: 30px; border: 0; border-radius: 5px; background: transparent; color: #77827f; cursor: pointer; }
.sidebar-user form button:hover { background: #182021; color: var(--platinum); }
.mail-workspace { display: grid; min-width: 0; grid-template-rows: auto minmax(0,1fr); }
.workspace-header { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 25px; padding: 15px 28px; border-bottom: 1px solid #202829; background: rgba(13,18,19,.92); }
.eyebrow { margin: 0 0 5px; color: #55706a; font-size: .62rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.workspace-header h1 { margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -.03em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.mail-search { display: flex; width: min(32vw,340px); height: 42px; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid #2d3736; border-radius: 7px; background: #0a0f10; color: #697572; }
.mail-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #adb6b3; }
.mail-search input::placeholder { color: #586360; }
.icon-button { width: 42px; height: 42px; border: 1px solid #2d3736; border-radius: 7px; background: #101617; color: #89938f; cursor: pointer; font-size: 1.1rem; }
.workspace-body { display: grid; min-height: 0; grid-template-columns: minmax(360px, .9fr) minmax(400px, 1.1fr); }
.message-column { display: grid; min-width: 0; grid-template-rows: auto 1fr; border-right: 1px solid #202829; }
.message-toolbar { display: flex; min-height: 57px; align-items: center; justify-content: space-between; gap: 14px; padding: 0 20px; border-bottom: 1px solid #1c2425; }
.filter-tabs { display: flex; gap: 4px; }
.filter-tabs button { min-height: 30px; padding: 0 11px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #6f7a77; cursor: pointer; font-size: .72rem; }
.filter-tabs button.active { border-color: #2c3937; background: #141c1d; color: #bfc7c4; }
.sync-copy { color: #53605d; font-size: .65rem; }
.message-list { min-height: 0; overflow-y: auto; }
.message-item { display: grid; width: 100%; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 15px 18px; border: 0; border-bottom: 1px solid #1b2324; background: transparent; color: #89938f; cursor: pointer; text-align: left; }
.message-item:hover, .message-item.selected { background: #11191a; }
.message-item.selected { box-shadow: inset 2px 0 var(--emerald); }
.message-item.unread { background: rgba(17,36,34,.42); }
.message-item.unread .message-sender, .message-item.unread strong { color: #e0e6e2; font-weight: 650; }
.message-item .message-sender { overflow: hidden; color: #bec6c3; font-size: .76rem; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.message-item .message-date { color: #5f6b67; font-size: .64rem; }
.message-item strong { grid-column: 1 / -1; overflow: hidden; color: #b7bfbc; font-size: .78rem; font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.message-item small { grid-column: 1 / -1; overflow: hidden; color: #697572; font-size: .7rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.message-account { grid-column: 1 / -1; overflow: hidden; color: #46665f; font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.message-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 18px; color: #66716e; font-size: .7rem; }
.message-pagination a { min-width: 70px; padding: 7px 11px; border: 1px solid #2c3937; border-radius: 5px; color: #9aa5a1; text-align: center; text-decoration: none; }
.message-pagination a:hover { border-color: #43615a; color: #7fdbb9; }
.empty-message-list, .reader-empty { display: grid; align-content: center; justify-items: center; padding: 45px; text-align: center; }
.empty-message-list h2, .reader-empty h2 { margin: 20px 0 7px; font-size: 1rem; font-weight: 570; }
.empty-message-list p, .reader-empty p { max-width: 350px; margin: 0 0 22px; color: #6f7a77; font-size: .78rem; line-height: 1.6; }
.empty-orbit { position: relative; display: grid; width: 72px; height: 72px; place-items: center; border: 1px solid #293331; border-radius: 50%; }
.empty-orbit::before { width: 42px; height: 29px; border: 1px solid #56625f; border-radius: 5px; content: ""; }
.empty-orbit::after { position: absolute; width: 31px; height: 31px; transform: rotate(45deg); border-right: 1px solid #56625f; border-bottom: 1px solid #56625f; content: ""; }
.reader-pane { display: grid; min-width: 0; background: #0b1011; }
.reader-mark { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid #273130; border-radius: 50%; color: #53605d; font-size: 1.7rem; }
.message-reader { min-width: 0; overflow-y: auto; padding: 32px clamp(24px,4vw,58px); }
.message-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid #202829; }
.message-actions button { min-height: 32px; padding: 0 11px; border: 1px solid #2b3735; border-radius: 5px; background: #111819; color: #8e9995; cursor: pointer; font-size: .68rem; }
.message-actions button:hover { border-color: #476059; color: #b6d8cb; }
.message-actions button:disabled { cursor: wait; opacity: .48; }
.message-actions .danger-action { border-color: rgba(239,118,111,.28); color: #d98b86; }
.message-reader header { padding-bottom: 23px; border-bottom: 1px solid #202829; }
.message-reader h2 { margin: 8px 0 15px; color: #e3e8e5; font-size: clamp(1.35rem,2.4vw,2rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
.reader-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #78837f; font-size: .72rem; }
.reader-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-meta time { flex: 0 0 auto; }
.reader-viewbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #202829; color: #63706c; font-size: .65rem; }
.reader-view-tabs { display: flex; gap: 5px; }
.reader-view-tabs button { min-height: 29px; padding: 0 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #707c78; cursor: pointer; font-size: .67rem; }
.reader-view-tabs button.active { border-color: #31514c; background: #12201f; color: #8bd8bb; }
.reader-view-tabs button:disabled { cursor: not-allowed; opacity: .35; }
.reader-html { display: block; width: 100%; min-height: 62vh; margin: 18px 0 42px; border: 1px solid #34423f; border-radius: 7px; background: #fff; color-scheme: light; }
.reader-html[hidden] { display: none; }
.reader-body { padding: 28px 0 60px; color: #b8c0bd; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .79rem; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.icon-button:disabled, .secondary-action:disabled { cursor: wait; opacity: .55; }

/* Connect dialog */
.connect-dialog { width: min(calc(100% - 28px),540px); padding: 0; overflow: hidden; border: 1px solid #56625f; border-radius: 10px; background: #101617; color: var(--platinum); box-shadow: 0 35px 100px rgba(0,0,0,.72); }
.connect-dialog::backdrop { background: rgba(2,5,6,.78); backdrop-filter: blur(7px); }
.connect-form { padding: 27px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-kicker { color: var(--emerald); font-size: .65rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.dialog-heading h2 { margin: 7px 0 5px; font-size: 1.45rem; letter-spacing: -.035em; }
.dialog-heading p { margin: 0; color: #75817d; font-size: .77rem; }
.dialog-close { width: 33px; height: 33px; border: 1px solid #2e3937; border-radius: 6px; background: #141b1c; color: #89938f; cursor: pointer; font-size: 1.25rem; }
.connect-form [data-connect-fields] { display: grid; gap: 16px; }
.privacy-callout { display: grid; grid-template-columns: 18px 1fr; gap: 11px; padding: 13px; border: 1px solid rgba(50,196,141,.2); border-radius: 7px; background: rgba(8,38,37,.27); color: #83aaa0; }
.privacy-callout .lock-mark { margin: 4px 0 0 2px; color: #48c493; }
.privacy-callout p { margin: 0; font-size: .72rem; line-height: 1.55; }
.dialog-error { margin: 14px 0 0; padding: 10px 12px; border: 1px solid rgba(239,118,111,.3); border-radius: 6px; background: rgba(99,34,31,.2); color: #f1a39f; font-size: .76rem; }
.connection-progress { --progress: 0deg; display: grid; justify-items: center; padding: 10px 0 3px; text-align: center; }
.progress-ring { display: grid; width: 94px; height: 94px; place-items: center; border-radius: 50%; background: conic-gradient(var(--emerald) var(--progress), #202a28 0); box-shadow: 0 0 35px rgba(50,196,141,.09); }
.progress-ring::before { position: absolute; width: 78px; height: 78px; border-radius: 50%; background: #101617; content: ""; }
.progress-ring span { position: relative; z-index: 1; color: #bfe8d8; font-size: .82rem; font-weight: 650; }
.connection-progress h3 { margin: 19px 0 6px; font-size: 1.05rem; }
.connection-progress > p { margin: 0; color: #74807c; font-size: .76rem; }
.progress-steps { display: grid; width: 100%; gap: 0; margin: 24px 0; padding: 0; list-style: none; text-align: left; }
.progress-steps li { position: relative; min-height: 39px; padding: 3px 0 0 37px; color: #596461; font-size: .76rem; }
.progress-steps li::before { position: absolute; top: 0; left: 7px; display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #384340; border-radius: 50%; background: #111718; content: ""; }
.progress-steps li:not(:last-child)::after { position: absolute; top: 21px; bottom: -1px; left: 17px; width: 1px; background: #28312f; content: ""; }
.progress-steps li.active { color: #b8c1be; }
.progress-steps li.active::before { border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(50,196,141,.08); }
.progress-steps li.complete { color: #73cbaa; }
.progress-steps li.complete::before { border-color: var(--emerald); background: #125b48; content: "✓"; color: #b6efd9; font-size: .66rem; }
.connection-terminal { width: 100%; margin: -4px 0 22px; overflow: hidden; border: 1px solid #293532; border-radius: 7px; background: #090e0f; text-align: left; }
.terminal-heading { display: flex; min-height: 34px; align-items: center; justify-content: space-between; padding: 0 11px; border-bottom: 1px solid #222c2a; color: #6c7a76; font-size: .61rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.terminal-heading span:last-child { color: #3d7565; }
.connection-terminal ol { display: grid; max-height: 132px; gap: 7px; margin: 0; padding: 11px; overflow-y: auto; list-style: none; }
.connection-terminal li { display: grid; grid-template-columns: 13px 1fr; gap: 7px; color: #87938f; font: .65rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.connection-terminal li > span:first-child { color: #4e8072; }
.connection-terminal .terminal-success, .connection-terminal .terminal-success > span:first-child { color: #69c6a1; }
.connection-terminal .terminal-error, .connection-terminal .terminal-error > span:first-child { color: #e19089; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(50,196,141,.3); outline-offset: 3px; }

@media (max-width: 980px) {
  .workspace-shell { grid-template-columns: 78px minmax(0,1fr); }
  .workspace-sidebar { padding-inline: 10px; }
  .sidebar-brand-row { justify-content: center; padding-inline: 0; }
  .workspace-wordmark { font-size: 0; }
  .workspace-wordmark::before { content: "IQ"; font-size: 1rem; }
  .secure-status, .connect-button:not(:focus) { font-size: 0; }
  .connect-button span { font-size: 1.35rem; }
  .mail-nav a { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .mail-nav a span:nth-child(2), .mail-nav strong, .account-section, .sidebar-user > span:nth-child(2) { display: none; }
  .sidebar-user { grid-template-columns: 1fr; justify-items: center; }
  .workspace-body { grid-template-columns: 1fr; }
  .reader-pane { display: none; }
}

@media (max-width: 680px) {
  .entry-shell { align-items: start; overflow: auto; padding: 16px 10px; }
  .auth-card { padding: 28px 17px 21px; border-radius: 10px; }
  .intro-copy { margin: 23px auto 24px; }
  .intro-copy h1 { font-size: clamp(2rem,11vw,2.7rem); }
  .trust-row { grid-template-columns: 1fr; gap: 11px; }
  .trust-row > div { justify-content: flex-start; padding: 0 6px; }
  .trust-row > div + div { border-left: 0; }
  .workspace-shell { grid-template-columns: 1fr; }
  .workspace-sidebar { min-height: auto; padding: 11px 12px; border-right: 0; border-bottom: 1px solid #202829; }
  .sidebar-brand-row { justify-content: space-between; padding: 5px 3px 12px; }
  .workspace-wordmark { font-size: 1.25rem; }
  .workspace-wordmark::before { content: none; }
  .secure-status { display: inline-flex; font-size: .6rem; }
  .connect-button { min-height: 40px; font-size: .78rem !important; }
  .connect-button span { font-size: 1rem; }
  .mail-nav, .account-section, .sidebar-user { display: none; }
  .mail-workspace { min-height: calc(100svh - 116px); }
  .workspace-header { min-height: 75px; padding: 12px 14px; }
  .mail-search { display: none; }
  .workspace-body { min-height: 0; }
  .message-toolbar { padding-inline: 12px; }
  .empty-message-list { padding: 30px 20px; }
  .connect-form { padding: 21px 16px; }
}

@media (max-width: 420px) { .form-options { align-items: flex-start; flex-direction: column; gap: 9px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
