:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6c768a;
  --subtle: #9098a8;
  --line: #e1e6ef;
  --line-strong: #d2d9e6;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f5f7fb;
  --surface-blue: #edf4ff;
  --sidebar: #f0f3f9;
  --blue: #1769e0;
  --blue-strong: #0f55bd;
  --blue-soft: #dbeaff;
  --orange: #f5a623;
  --danger: #c63737;
  --success: #16865b;
  --shadow-sm: 0 1px 2px rgba(26, 38, 61, .06), 0 5px 16px rgba(26, 38, 61, .05);
  --shadow-lg: 0 24px 70px rgba(28, 42, 68, .2), 0 5px 18px rgba(28, 42, 68, .08);
  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 18px;
  --topbar-height: 64px;
  --mobile-nav-height: 64px;
  --font-size-preference-adjust: calc(2pt + 1px);
  --font-size-adjust: var(--font-size-preference-adjust);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

html[data-font-size="small"] {
  --font-size-preference-adjust: 2pt;
}

html[data-font-size="normal"] {
  --font-size-preference-adjust: calc(2pt + 1px);
}

html[data-font-size="large"] {
  --font-size-preference-adjust: calc(2pt + 3px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface-soft);
  color: var(--ink);
}

body {
  font-size: calc(14px + var(--font-size-adjust));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .58;
}

input,
select {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(23, 105, 224, .3);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.ui-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  overflow: visible;
  color: inherit;
  vertical-align: -.18em;
  pointer-events: none;
}

.ui-icon.is-spinning {
  animation: spin .75s linear infinite;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app {
  height: 100dvh;
  background: var(--surface);
}

.app-startup-loading {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: none;
  min-width: 320px;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(23, 105, 224, .12), transparent 34%),
    var(--surface-soft);
}

html[data-app-booting="true"] .app-startup-loading {
  display: grid;
}

html[data-app-booting="true"] .app,
html[data-app-booting="true"] .auth-screen {
  visibility: hidden;
  pointer-events: none;
}

.app-startup-loading-panel {
  display: grid;
  width: min(360px, calc(100vw - 40px));
  justify-items: center;
  gap: 10px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.app-startup-loading-spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border: 4px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.app-startup-loading-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.app-startup-loading-copy strong {
  font-size: calc(15px + var(--font-size-adjust));
  line-height: 1.25;
}

.app-startup-loading-copy span {
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.4;
}

.app-startup-loading-continue {
  min-height: 38px;
  margin-top: 4px;
  padding: 8px 14px;
  border: 1px solid var(--blue);
  border-radius: 9px;
  background: transparent;
  color: var(--blue-strong);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 700;
}

.app-startup-loading-continue:hover {
  background: var(--surface-blue);
}

/* Keep authenticated UI and any open top-layer overlays out of a public share view. */
html[data-public-message="true"] body > :not(#public-message-screen) {
  display: none !important;
}

.public-message-skip-link {
  border: 0;
  font: inherit;
}

.public-message-screen {
  display: flex;
  width: 100%;
  min-width: 320px;
  height: 100dvh;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 8% 3%, rgba(43, 128, 242, .13), transparent 28rem),
    radial-gradient(circle at 94% 92%, rgba(69, 145, 244, .1), transparent 30rem),
    var(--surface-soft);
}

.public-message-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px max(22px, env(safe-area-inset-right)) 9px max(22px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  box-shadow: 0 1px 8px rgba(29, 45, 73, .05);
  backdrop-filter: blur(14px);
}

.public-message-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.public-message-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #2b80f2, #115bc8);
  box-shadow: 0 7px 18px rgba(23, 105, 224, .24);
}

.public-message-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-message-brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.public-message-brand-copy strong {
  font-size: calc(14px + var(--font-size-adjust));
  line-height: 1.1;
}

.public-message-brand-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-message-open-app {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(23, 105, 224, .18);
  color: #fff;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 750;
}

.public-message-open-app:hover {
  background: var(--blue-strong);
}

.public-message-main {
  display: grid;
  width: min(980px, calc(100% - 40px));
  min-height: 0;
  flex: 1 0 auto;
  align-content: start;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px) 0;
}

.public-message-state,
.public-message-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.public-message-state {
  display: grid;
  min-height: min(56dvh, 480px);
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 44px 28px;
  text-align: center;
}

.public-message-loading > div {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.public-message-loading strong,
.public-message-error h1 {
  margin: 0;
  font-size: calc(20px + var(--font-size-adjust));
  letter-spacing: -.025em;
}

.public-message-loading span:not(.public-message-spinner),
.public-message-error p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.55;
}

.public-message-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.public-message-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--danger) 11%, var(--surface-raised));
  color: var(--danger);
}

.public-message-state-icon .ui-icon {
  width: 27px;
  height: 27px;
}

.public-message-card {
  overflow: hidden;
}

.public-message-header {
  display: grid;
  gap: 20px;
  padding: clamp(23px, 4vw, 38px);
  border-bottom: 1px solid var(--line);
}

.public-message-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--blue-strong);
}

.public-message-heading .eyebrow .ui-icon {
  width: 16px;
  height: 16px;
}

.public-message-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(calc(22px + var(--font-size-adjust)), 3vw, calc(32px + var(--font-size-adjust)));
  line-height: 1.2;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.public-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.public-message-sender-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.public-message-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.public-message-avatar .ui-icon {
  width: 19px;
  height: 19px;
}

.public-message-sender-line > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.public-message-meta-label {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

#public-message-sender {
  overflow: hidden;
  font-size: calc(12px + var(--font-size-adjust));
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#public-message-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.4;
  text-align: right;
}

.public-message-recipients {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.public-message-attachments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 11px clamp(18px, 4vw, 38px);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.public-message-attachments .attachment-card {
  max-width: min(100%, 340px);
}

.public-message-attachment {
  display: grid;
  width: min(100%, 420px);
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.public-message-attachment > .ui-icon {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: var(--blue);
}

.public-message-attachment-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.public-message-attachment-copy strong,
.public-message-attachment-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-message-attachment-copy strong {
  font-size: calc(10px + var(--font-size-adjust));
}

.public-message-attachment-copy small {
  color: var(--muted);
  font-size: calc(8px + var(--font-size-adjust));
}

.public-message-attachment .secondary-button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: calc(9px + var(--font-size-adjust));
}

.public-message-attachment .secondary-button[aria-busy="true"] {
  cursor: progress;
}

.public-message-body {
  min-height: 260px;
  padding: clamp(22px, 4vw, 38px);
  color: var(--ink);
  font-size: calc(16px + var(--font-size-adjust));
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.public-message-body.is-plain-text {
  white-space: pre-wrap;
}

.public-message-body.has-html {
  padding: 12px;
  background: #fff;
  color-scheme: light;
}

.public-message-body .message-html-frame {
  min-height: 260px;
}

.public-message-body a {
  color: var(--blue);
}

.public-message-footer {
  display: flex;
  min-height: 54px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px max(20px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.4;
  text-align: center;
}

.public-message-footer .ui-icon {
  color: var(--success);
}

@media (max-width: 640px) {
  .public-message-topbar {
    min-height: 62px;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }

  .public-message-brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
  }

  .public-message-brand-copy small {
    display: none;
  }

  .public-message-open-app {
    min-height: 42px;
    padding: 8px 11px;
  }

  .public-message-open-app .ui-icon {
    display: none;
  }

  .public-message-main {
    width: 100%;
    padding: 12px 9px 20px;
  }

  .public-message-state,
  .public-message-card {
    border-radius: 14px;
  }

  .public-message-state {
    min-height: calc(100dvh - 154px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .public-message-header {
    gap: 17px;
    padding: 22px 18px;
  }

  .public-message-heading h1 {
    font-size: calc(21px + var(--font-size-adjust));
  }

  .public-message-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  #public-message-date {
    padding-left: 51px;
    text-align: left;
  }

  .public-message-attachments {
    align-items: stretch;
    padding: 10px 12px;
  }

  .public-message-attachments .attachment-card {
    width: 100%;
    max-width: none;
  }

  .public-message-attachment {
    width: 100%;
  }

  .public-message-body {
    min-height: 220px;
    padding: 22px 18px 30px;
  }

  .public-message-body.has-html {
    padding: 8px;
  }

  .public-message-footer {
    align-items: flex-start;
  }
}

.topbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(280px, 600px) minmax(250px, 1fr);
  align-items: center;
  gap: 24px;
  height: var(--topbar-height);
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 4px rgba(29, 45, 73, .04);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px 10px 12px 7px;
  background: linear-gradient(145deg, #2b80f2, #115bc8);
  box-shadow: 0 7px 16px rgba(23, 105, 224, .24);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark > span::before,
.brand-mark > span::after {
  position: absolute;
  content: "";
}

.brand-mark::before {
  width: 20px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 3px;
}

.brand-mark::after {
  top: 10px;
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.brand-mark > span::before {
  right: -8px;
  bottom: -12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}

.brand-mark.large {
  width: 51px;
  height: 51px;
  border-radius: 15px 15px 17px 10px;
}

.brand-mark.large::before {
  width: 29px;
  height: 20px;
}

.brand-mark.large::after {
  top: 15px;
  width: 18px;
  height: 18px;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand-copy strong {
  overflow: hidden;
  color: #15213a;
  font-size: calc(14px + var(--font-size-adjust));
  font-weight: 750;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 1px;
  color: var(--subtle);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.global-search {
  display: flex;
  width: 100%;
  height: 39px;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f0f3f8;
  color: #68758a;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.global-search:focus-within {
  border-color: #9cc2f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}

.search-query-control {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex: 1;
  align-items: center;
}

.global-search-field {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
}

.global-search-field > .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.global-search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
}

.global-search-field input::placeholder {
  color: #8791a2;
}

.search-history-toggle {
  display: inline-flex;
  width: 38px;
  height: 100%;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}

.search-history-toggle:hover:not(:disabled),
.search-history-toggle[aria-expanded="true"] {
  background: var(--surface-blue);
  color: var(--blue);
}

.search-history-toggle > .ui-icon {
  width: 18px;
  height: 18px;
}

.search-history-popover {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(380px, calc(100vw - 28px));
  max-height: min(390px, 62vh);
  grid-template-rows: auto minmax(0, 1fr);
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.search-history-popover[hidden] {
  display: none !important;
}

.search-history-header {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 5px 10px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .035em;
}

.search-history-header > button {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 7px;
  background: transparent;
  color: var(--blue);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
}

.search-history-header > button:hover:not(:disabled),
.search-history-header > button:focus-visible {
  background: var(--surface-blue);
}

.search-history-list {
  display: grid;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-history-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 2px;
}

.search-history-option {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.search-history-option:hover,
.search-history-option:focus-visible,
.search-history-option.is-active {
  background: var(--surface-blue);
  color: var(--blue-strong);
}

.search-history-option > .ui-icon {
  width: 17px;
  height: 17px;
  color: var(--subtle);
}

.search-history-option > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-history-remove {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
  transition: color .15s ease, background .15s ease;
}

.search-history-remove:hover,
.search-history-remove:focus-visible {
  background: rgba(198, 55, 55, .1);
  color: var(--danger);
}

.search-history-remove > .ui-icon {
  width: 17px;
  height: 17px;
}

.search-all-accounts,
.search-morphology {
  display: inline-flex;
  min-width: max-content;
  height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid var(--line);
  color: #526078;
  cursor: pointer;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 700;
  white-space: nowrap;
}

.search-all-accounts input,
.search-morphology input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

kbd {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9dfe8;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(27, 41, 63, .05);
  color: #8d96a6;
  font: calc(11px + var(--font-size-adjust)) / 1 inherit;
}

.top-actions {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.mini-button,
.select-button,
.star-button,
.password-toggle {
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #66738a;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: calc(20px + var(--font-size-adjust));
}

.icon-button:hover,
.mini-button:hover,
.password-toggle:hover {
  background: #edf1f7;
  color: var(--blue);
}

.language-button {
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #526079;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .04em;
}

.layout-button,
.theme-button,
.auth-theme,
.auth-font-size-toggle {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: calc(17px + var(--font-size-adjust));
  line-height: 1;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}

.layout-button:hover,
.theme-button:hover,
.auth-theme:hover,
.auth-font-size-toggle:hover {
  border-color: #9bbbe5;
  background: var(--surface-blue);
  color: var(--blue);
  transform: rotate(8deg);
}

.layout-button:hover {
  transform: none;
}

.auth-font-size-toggle {
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 800;
}

.layout-icon {
  display: grid;
  width: 17px;
  height: 15px;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.layout-icon i {
  min-width: 0;
  min-height: 0;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.layout-icon.target-horizontal {
  grid-template-columns: 5px minmax(0, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.layout-icon.target-horizontal i:first-child {
  grid-row: 1 / -1;
}

.language-button:hover {
  border-color: #b9c8dd;
  background: var(--surface-soft);
}

.user-button {
  display: flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 9px 0 5px;
  border-radius: 10px;
  background: transparent;
  color: #56647a;
}

.user-button:hover,
.user-button[aria-expanded="true"] {
  background: #f0f3f8;
}

.user-button .user-chevron {
  width: 15px;
  height: 15px;
  transition: transform .15s ease;
}

.user-button[aria-expanded="true"] .user-chevron {
  transform: rotate(180deg);
}

.avatar,
.sender-avatar,
.account-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dceafe, #c5dcfc);
  color: #175abb;
  font-weight: 800;
  text-transform: uppercase;
}

.avatar {
  width: 30px;
  height: 30px;
  font-size: calc(12px + var(--font-size-adjust));
}

.avatar.administrator-avatar {
  background: transparent;
}

.avatar.administrator-avatar .ui-icon {
  width: 24px;
  height: 24px;
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  font-size: calc(13px + var(--font-size-adjust));
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 9px);
  right: 0;
  width: min(320px, calc(100vw - 20px));
  min-width: 0;
  box-sizing: border-box;
  max-height: calc(100dvh - var(--topbar-height) - 18px);
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.user-menu button {
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.user-menu button:hover {
  background: var(--surface-soft);
}

.user-menu > button[role="menuitem"],
.user-menu > button[role="menuitemcheckbox"] {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.user-menu > button[role="menuitem"] > .ui-icon,
.user-menu > button[role="menuitemcheckbox"] > .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: #5f718b;
}

.mail-notification-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.mail-notification-copy > span,
.mail-notification-copy > small {
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.app.user-menu-open .topbar {
  z-index: 90;
}

@media (max-width: 920px) {
  .user-menu {
    position: fixed;
    top: calc(var(--topbar-height) + 8px);
    right: max(10px, env(safe-area-inset-right));
    max-width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - var(--topbar-height) - 24px - env(safe-area-inset-bottom));
  }
}

.mail-notification-copy > small {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.mail-notification-switch {
  position: relative;
  width: 30px;
  height: 18px;
  flex: 0 0 30px;
  border: 1px solid #aab7c7;
  border-radius: 999px;
  background: #e8edf3;
  transition: border-color .16s ease, background-color .16s ease;
}

.mail-notification-switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 47, 70, .25);
  transition: transform .16s ease;
}

#mail-notifications-button.is-active > .ui-icon {
  color: #14805e;
}

#mail-notifications-button.is-active .mail-notification-switch {
  border-color: #158765;
  background: #1a9a73;
}

#mail-notifications-button.is-active .mail-notification-switch i {
  transform: translateX(12px);
}

#mail-notifications-button.is-blocked > .ui-icon,
#mail-notifications-button.is-unavailable > .ui-icon {
  color: #9a6471;
}

#google-contacts-button > .ui-icon {
  color: #2b7de9;
}

#logout-button > .ui-icon {
  color: #8a6670;
}

.font-size-setting {
  margin-bottom: 5px;
  padding: 6px 5px 10px;
  border-bottom: 1px solid var(--line);
}

.message-density-setting {
  margin-bottom: 5px;
  padding: 6px 5px 10px;
  border-bottom: 1px solid var(--line);
}

.user-menu-label {
  display: block;
  margin: 0 3px 7px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.font-size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.message-density-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.user-menu .font-size-options button {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 5px 3px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  text-align: center;
}

.user-menu .message-density-options button {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 5px 4px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  text-align: center;
}

.user-menu .font-size-options button:hover,
.user-menu .font-size-options button.active,
.user-menu .message-density-options button:hover,
.user-menu .message-density-options button.active {
  border-color: #8db7ef;
  background: var(--surface-blue);
  color: var(--blue);
}

.user-menu .font-size-options button.active {
  box-shadow: inset 0 0 0 1px rgba(23, 105, 224, .18);
}

.user-menu .message-density-options button.active {
  box-shadow: inset 0 0 0 1px rgba(23, 105, 224, .18);
}

.font-size-sample {
  font-weight: 800;
  line-height: 1;
}

.font-size-sample.small {
  font-size: calc(12px + var(--font-size-adjust));
}

.font-size-sample.normal {
  font-size: calc(15px + var(--font-size-adjust));
}

.font-size-sample.large {
  font-size: calc(19px + var(--font-size-adjust));
}

.message-density-sample {
  display: inline-flex;
  width: 34px;
  height: 18px;
  justify-content: center;
  flex-direction: column;
}

.message-density-sample i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.message-density-sample.comfortable {
  gap: 4px;
}

.message-density-sample.compact {
  gap: 2px;
}

.status-badge {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
}

.status-badge.warning {
  background: #fff3d6;
  color: #926514;
}

.mail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 252px) minmax(310px, 390px) 12px minmax(360px, var(--preview-pane-width, 1fr));
  height: calc(100dvh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
}

.mail-layout.preview-width-custom {
  grid-template-columns: minmax(220px, 252px) minmax(310px, 1fr) 12px minmax(360px, var(--preview-pane-width));
}

.folders-pane,
.messages-pane,
.preview-pane {
  min-width: 0;
  min-height: 0;
}

.folders-pane {
  position: relative;
  z-index: 20;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 13px;
  overflow: hidden auto;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-primary-actions {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 20px;
}

.compose-primary {
  display: flex;
  width: 100%;
  height: 43px;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(23, 105, 224, .2);
  color: #fff;
  font-weight: 750;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.compose-primary > .ui-icon {
  width: 20px;
  height: 20px;
}

.compose-primary > span:nth-child(2) {
  flex: 1;
  text-align: left;
}

.compose-primary kbd {
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .9);
}

.compose-primary:hover {
  transform: translateY(-1px);
  background: var(--blue-strong);
  box-shadow: 0 8px 18px rgba(23, 105, 224, .25);
}

.refresh-primary {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}

.refresh-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #9bbbe5;
  background: var(--surface-blue);
  color: var(--blue);
}

.refresh-primary .refresh-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.refresh-primary.syncing .refresh-icon {
  animation: spin .8s linear infinite;
}

.pane-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px 7px;
  color: #788398;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.mini-button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.mini-button .ui-icon {
  width: 17px;
  height: 17px;
}

.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.account-row {
  position: relative;
  display: flex;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: border-color .15s ease, opacity .15s ease, transform .15s ease;
}

.account-row.dragging {
  opacity: .45;
}

.account-row.drag-target {
  border-color: var(--blue);
  background: var(--surface-blue);
  transform: translateY(1px);
}

.account-button {
  display: flex;
  width: calc(100% - 31px);
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.account-menu-button {
  display: inline-grid;
  width: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s ease, color .15s ease, background .15s ease;
}

.account-row:hover .account-menu-button,
.account-row:focus-within .account-menu-button,
.account-menu-button[aria-expanded="true"] {
  opacity: 1;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  background: var(--surface-raised);
  color: var(--blue);
}

.account-context-menu {
  position: fixed;
  z-index: 220;
  width: max-content;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.account-context-menu button {
  display: grid;
  width: 100%;
  min-height: 35px;
  grid-template-columns: 23px 1fr;
  align-items: center;
  padding: 5px 9px;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: calc(11px + var(--font-size-adjust));
  text-align: left;
}

.account-context-menu button:hover,
.account-context-menu button:focus-visible {
  background: var(--surface-blue);
}

.account-context-menu button.danger-text {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
  color: var(--danger);
}

.account-context-menu button.loading [data-account-read-all-icon],
.folder-context-menu button.loading [data-folder-action-icon] {
  animation: spin .7s linear infinite;
}

.account-menu-button .ui-icon {
  width: 18px;
  height: 18px;
}

.account-context-menu[aria-busy="true"],
.folder-context-menu[aria-busy="true"],
.message-context-menu[aria-busy="true"] {
  cursor: progress;
}

.message-context-menu {
  min-width: 220px;
  max-height: calc(100dvh - 16px);
  overflow: hidden auto;
}

.message-context-menu .context-menu-separator {
  height: 1px;
  margin: 5px 7px;
  background: var(--line);
}

.message-context-menu button.danger-text {
  margin-top: 0;
  border-top: 0;
  border-radius: 7px;
}

.message-context-menu.loading [data-message-delete-icon] {
  animation: spin .7s linear infinite;
}

.editor-context-menu {
  z-index: 260;
  min-width: 250px;
}

.editor-context-menu button {
  grid-template-columns: 23px minmax(0, 1fr) auto;
  column-gap: 8px;
}

.editor-context-menu button:disabled {
  cursor: default;
  opacity: .42;
}

.editor-context-menu button:disabled:hover,
.editor-context-menu button:disabled:focus-visible {
  background: transparent;
}

.editor-menu-shortcut {
  justify-self: end;
  padding: 1px 4px;
  color: var(--muted);
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 650;
  letter-spacing: 0;
}

#message-more-button[aria-expanded="true"] {
  background: var(--surface-blue);
  color: var(--blue);
}

.account-button:hover {
  background: rgba(255, 255, 255, .68);
}

.account-button.active {
  background: #c7dfff;
  color: #123f78;
  box-shadow: inset 3px 0 0 #1769e0, inset 0 0 0 1px #8ab8f5;
}

.account-button.active .account-copy small,
.account-button.active .account-refresh-spinner {
  color: #315b86;
}

.account-avatar {
  width: 29px;
  height: 29px;
  font-size: calc(11px + var(--font-size-adjust));
}

.account-avatar.variant-1 {
  background: #dff0eb;
  color: #18785d;
}

.account-avatar.variant-2 {
  background: #f0e4fa;
  color: #7743a8;
}

.account-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.account-name-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.account-name-line strong {
  min-width: 0;
  flex: 0 1 auto;
}

.account-refresh-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--muted);
}

.account-refresh-spinner[hidden] {
  display: none;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 700;
}

.account-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.account-unread {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 800;
}

.folder-tree {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.folder-alias-group {
  margin-top: 4px;
}

.folder-alias-summary {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #68758a;
  cursor: pointer;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
  list-style: none;
  user-select: none;
}

.folder-alias-summary::-webkit-details-marker {
  display: none;
}

.folder-alias-summary:hover {
  background: rgba(255, 255, 255, .6);
}

.folder-alias-summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.folder-alias-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #7d899a;
  transition: transform .16s ease;
}

.folder-alias-group[open] > .folder-alias-summary .folder-alias-chevron {
  transform: rotate(90deg);
}

.folder-system-alias {
  padding-left: 24px;
}

.folder-button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  color: #4a566c;
  text-align: left;
}

.folder-button:hover {
  background: rgba(255, 255, 255, .6);
}

.folder-button.active {
  background: #dbe8fb;
  color: #1559b8;
  font-weight: 720;
}

.folder-icon {
  width: 20px;
  height: 20px;
  color: #66758b;
}

.folder-button.active .folder-icon {
  color: var(--blue);
}

.folder-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  min-width: 18px;
  color: #7d8797;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
  text-align: right;
}

.folder-button.active .folder-count {
  color: var(--blue);
}

.folder-tree.message-drag-active .folder-button.message-drop-available {
  cursor: move;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 38%, transparent);
  transition: background-color .12s ease, box-shadow .12s ease, color .12s ease;
}

.folder-tree.message-drag-active .folder-button.message-drop-available:hover,
.folder-button.message-drop-target {
  background: var(--surface-blue);
  color: var(--blue-strong);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.folder-button.message-drop-target .folder-icon,
.folder-button.message-drop-target .folder-count {
  color: var(--blue);
}

.storage-card {
  margin: 14px 8px 0;
  padding-top: 13px;
  border-top: 1px solid #dce2eb;
}

.storage-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.storage-track {
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #dce3ed;
}

.storage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .25s ease;
}

.sidebar-footer {
  flex: 0 0 auto;
  margin: 14px 8px 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.sidebar-site-link {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
  text-decoration: none;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

.sidebar-site-link > .ui-icon {
  font-size: calc(15px + var(--font-size-adjust));
  line-height: 1;
}

.sidebar-site-link:hover {
  transform: translateY(-1px);
  background: var(--surface-raised);
  color: var(--blue);
}

.sidebar-site-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.messages-pane {
  --message-thread-column-width: 20px;
  --message-attachment-column-width: 16px;
  --message-star-column-width: 23px;
  --message-read-column-width: 18px;
  --message-table-columns: 28px var(--message-thread-column-width) var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width) minmax(0, 1fr) var(--message-table-date-width, 88px);
  --message-table-gap: 4px;
  --message-table-summary-gap: 10px;
  --message-table-summary-columns: var(--message-table-subject-width, minmax(0, 1.45fr)) minmax(0, .72fr);
  display: flex;
  grid-column: 2;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px 11px;
}

.eyebrow {
  margin: 0 0 3px;
  color: #8a94a5;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.eyebrow.accent {
  color: var(--blue);
}

.pane-toolbar h1 {
  margin: 0;
  font-size: calc(20px + var(--font-size-adjust));
  font-weight: 780;
  letter-spacing: -.025em;
}

.list-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-view-switch {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.message-view-button {
  display: inline-grid;
  width: 28px;
  height: 26px;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: #8994a6;
}

.message-view-button:hover {
  color: var(--blue);
}

.message-view-button.active {
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  color: var(--blue);
}

.message-view-button .ui-icon {
  width: 15px;
  height: 15px;
}

.message-view-icon {
  display: grid;
  width: 13px;
  height: 12px;
}

.message-view-icon.cards {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.message-view-icon.cards i {
  border: 1px solid currentColor;
  border-radius: 1px;
}

.message-view-icon.table {
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}

.message-view-icon.table i {
  position: relative;
  height: 2px;
  margin-left: 4px;
  align-self: center;
  border-radius: 2px;
  background: currentColor;
}

.message-view-icon.table i::before {
  position: absolute;
  left: -4px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.select-button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.select-button .ui-icon {
  width: 18px;
  height: 18px;
}

.select-button:hover,
.select-button.active {
  background: #edf1f7;
  color: var(--blue);
}

.sort-button {
  display: flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.sort-button:hover {
  background: #edf1f7;
}

.message-list-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 0 17px 12px;
  border-bottom: 1px solid var(--line);
}

.filter-row {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.list-read-all-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #9bbce7;
  border-radius: 10px;
  background: #edf5ff;
  color: #1559b8;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 750;
  white-space: nowrap;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, opacity .16s ease;
}

.list-read-all-button .ui-icon {
  width: 17px;
  height: 17px;
}

.list-read-all-button:hover:not(:disabled),
.list-read-all-button:focus-visible {
  border-color: #4f93df;
  background: #dceeff;
  color: #0f4d9f;
}

.list-read-all-button:disabled {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  cursor: default;
  opacity: .58;
}

.list-read-all-button[aria-busy="true"] .ui-icon {
  animation: spin .8s linear infinite;
}

.list-read-all-button[hidden] {
  display: none;
}

.filter-chip {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #69758a;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 700;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease;
  white-space: nowrap;
}

.filter-chip-star {
  width: 21px;
  height: 21px;
  color: #9a5d00;
  filter: drop-shadow(0 1px 1px rgba(151, 91, 0, .22));
}

.filter-chip-attachments {
  justify-content: center;
}

.filter-reset {
  margin-right: 2px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.filter-icon-toggle {
  width: 36px;
  min-height: 32px;
  justify-content: center;
  padding: 0;
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.filter-chip-paperclip {
  width: 21px;
  height: 21px;
}

.filter-chip:hover {
  background: #edf1f7;
}

.filter-chip.active {
  background: var(--blue-soft);
  color: #1559b8;
}

.filter-toggle[aria-pressed="true"] {
  border-color: #4f93df;
  background: #dceeff;
  box-shadow: inset 0 0 0 1px rgba(25, 103, 194, .18);
}

.selection-toolbar {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-bottom: 1px solid #c8dcfa;
  background: #edf5ff;
}

.selection-toolbar > span {
  min-width: 0;
  flex: 1;
  color: #315a8f;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
}

.selection-toolbar button {
  padding: 6px 7px;
  border-radius: 6px;
  background: transparent;
  color: #365b8a;
  font-size: calc(10px + var(--font-size-adjust));
}

.selection-toolbar button:hover {
  background: #dcecff;
}

.danger-text {
  color: var(--danger) !important;
}

.message-table-region {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.pull-refresh-indicator {
  position: absolute;
  z-index: 12;
  top: 0;
  left: 50%;
  display: none;
  min-height: 38px;
  max-width: calc(100% - 24px);
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 8px;
  transform: translate(-50%, calc(-100% - 8px + var(--pull-refresh-distance, 0px))) scale(.96);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-raised);
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  box-shadow: 0 8px 24px rgba(22, 47, 85, .2);
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 750;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, border-color .16s ease, color .16s ease, background .16s ease;
  white-space: nowrap;
  will-change: transform, opacity;
}

.pull-refresh-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  transform: rotate(var(--pull-refresh-angle, 0deg));
  border-radius: 50%;
  background: var(--surface-blue);
  color: var(--blue);
}

.pull-refresh-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.pull-refresh-indicator[data-state="armed"] {
  border-color: color-mix(in srgb, var(--blue) 50%, var(--line-strong));
  background: var(--surface-blue);
  background: color-mix(in srgb, var(--surface-blue) 82%, var(--surface-raised));
  color: var(--blue-strong);
}

.pull-refresh-indicator[data-state="refreshing"] .pull-refresh-icon {
  animation: spin .8s linear infinite;
}

.message-table-region.pull-refresh-active .pull-refresh-indicator {
  opacity: 1;
}

.message-table-region.pull-refresh-immediate .pull-refresh-indicator {
  transition: none;
}

.message-table-head {
  display: grid;
  min-height: 30px;
  grid-template-columns: var(--message-table-columns);
  align-items: center;
  gap: var(--message-table-gap);
  overflow-y: scroll;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
  color: #667085;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
  letter-spacing: .035em;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  text-transform: uppercase;
}

.message-table-head[hidden] {
  display: none;
}

.message-table-head.search-all-head {
  grid-template-columns: minmax(112px, .52fr) 28px var(--message-thread-column-width) var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width) minmax(0, 1fr) var(--message-table-date-width, 88px);
}

.message-table-account-column > span {
  overflow: hidden;
  padding-left: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-table-summary-head {
  display: grid;
  min-width: 0;
  grid-template-columns: var(--message-table-summary-columns);
  gap: var(--message-table-summary-gap);
}

.message-table-column {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
}

.message-table-sort {
  display: flex;
  min-width: 0;
  width: 100%;
  height: 26px;
  align-items: center;
  gap: 4px;
  padding: 0 3px;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.message-table-sort:hover,
.message-table-sort:focus-visible,
.message-table-sort[aria-pressed="true"] {
  background: rgba(31, 111, 235, .08);
  color: var(--blue);
}

.message-table-sort > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-table-sort-indicator {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.message-column-resizer {
  position: absolute;
  z-index: 3;
  top: 0;
  right: -6px;
  bottom: 0;
  width: 12px;
  cursor: col-resize;
  touch-action: none;
}

.message-table-date-column > .message-column-resizer {
  right: auto;
  left: -6px;
}

.message-column-resizer::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  content: "";
  transition: background .12s ease;
}

.message-column-resizer:hover::before,
.message-column-resizer:focus-visible::before,
body.is-resizing-columns .message-column-resizer::before {
  background: var(--blue);
}

.message-column-resizer:focus-visible {
  outline: none;
}

.message-list {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden auto;
  scroll-behavior: smooth;
  scrollbar-color: #cdd4df transparent;
  scrollbar-width: thin;
}

.message-item {
  cursor: default;
  position: relative;
  display: grid;
  grid-template-columns: 34px var(--message-thread-column-width) minmax(0, 1fr) auto var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width);
  gap: 4px;
  min-height: 93px;
  padding: 12px 13px 11px;
  border-bottom: 1px solid #e8ebf1;
  background: #fff;
  color: inherit;
  text-align: left;
  transition: background .12s ease, box-shadow .12s ease, transform var(--message-swipe-duration, .18s) ease;
}

.message-item[draggable="true"] {
  cursor: default;
}

.message-item.message-drag-ready {
  cursor: grab;
  user-select: none;
  box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 1px color-mix(in srgb, var(--blue) 32%, transparent);
}

.message-item[draggable="true"] :is(button, a, input, select, textarea, [contenteditable="true"]) {
  cursor: pointer;
}

.message-item.message-dragging {
  z-index: 3;
  opacity: .52;
  cursor: grabbing;
  box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 1px color-mix(in srgb, var(--blue) 32%, transparent);
}

.message-item.message-move-pending {
  opacity: .58;
  cursor: progress;
  pointer-events: none;
}

.message-item.swipe-reply-active {
  transform: translateX(var(--message-swipe-x, 0px));
  transition: background .12s ease, box-shadow .12s ease;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.message-item.swipe-reply-pending {
  transition: transform var(--message-swipe-duration, .18s) ease;
}

.message-swipe-reply-cue {
  position: absolute;
  inset: 0 auto 0 100%;
  display: flex;
  width: 160px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 12px;
  white-space: nowrap;
  background: var(--surface-blue);
  color: var(--blue-strong);
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
}

.swipe-reply-armed > .message-swipe-reply-cue {
  background: var(--blue-strong);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .message-item { --message-swipe-duration: 0s; }
}

.message-item:hover {
  z-index: 1;
  background: #f7faff;
}

.message-item.selected {
  z-index: 2;
  background: #d9eaff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.message-item.unread {
  background: #d7e9ff;
}

.message-item.unread:hover {
  background: #cde3ff;
}

.message-item.selected:hover {
  background: #d9eaff;
}

.message-item.selected.unread,
.message-item.selected.unread:hover {
  background: #c4ddff;
}

.message-checkbox {
  display: none;
  width: 15px;
  height: 15px;
  align-self: center;
  margin: 0 0 0 7px;
  accent-color: var(--blue);
}

.selecting .message-checkbox {
  display: block;
}

.selecting .message-avatar-cell {
  display: none;
}

.message-avatar-cell {
  position: relative;
  z-index: 3;
  display: grid;
  width: 100%;
  place-items: center;
  align-self: start;
}

.message-icon-column {
  display: grid;
  min-width: 0;
  width: 100%;
  place-items: center;
  align-self: start;
}

.message-list:not(.table-view) .message-thread-column {
  min-height: 34px;
}

.message-list:not(.table-view) .message-attachment-column,
.message-list:not(.table-view) .message-star-column,
.message-list:not(.table-view) .message-read-column {
  min-height: 23px;
}

.message-avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  align-self: start;
  border-radius: 50%;
  background: #e3ebf8;
  color: #46678e;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 800;
  text-transform: uppercase;
}

.message-avatar.hue-1 { background: #efe6fa; color: #725099; }
.message-avatar.hue-2 { background: #dcf0e7; color: #2f765f; }
.message-avatar.hue-3 { background: #fae9df; color: #925b3b; }
.message-avatar.hue-4 { background: #e0eff5; color: #3c7187; }

.message-summary {
  min-width: 0;
}

.message-subject-cell {
  min-width: 0;
}

.message-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.message-read-toggle {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8491a5;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, opacity .15s ease;
}

.message-read-dot {
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
  transition: width .15s ease, height .15s ease, border-color .15s ease, background .15s ease;
}

.message-read-toggle:hover {
  background: rgba(7, 95, 199, .1);
  color: var(--blue);
}

.message-read-toggle.is-unread {
  color: var(--blue);
}

.message-read-toggle.is-unread .message-read-dot {
  width: 9px;
  height: 9px;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .62);
}

.message-read-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  background: rgba(7, 95, 199, .1);
}

.message-read-toggle:disabled {
  cursor: default;
  opacity: .45;
}

.selecting .message-read-toggle {
  display: none;
}

.message-thread-toggle,
.message-replied-indicator {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.message-thread-toggle {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid #79a8dc;
  border-radius: 6px;
  background: #edf5ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .62);
  color: #075fc7;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease;
}

.message-replied-indicator {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid #084b9c;
  border-radius: 50%;
  background: #075fc7;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .72);
  color: #fff;
  pointer-events: none;
}

.message-replied-indicator .message-thread-reply-icon {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.message-thread-toggle-icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.message-thread-toggle-loader {
  width: 11px;
  height: 11px;
}

.message-thread-toggle:hover {
  border-color: #2879cf;
  background: #dcecff;
  box-shadow: 0 2px 6px rgba(7, 95, 199, .18);
  transform: translateY(-1px);
}

.message-thread-toggle[aria-expanded="true"] {
  border-color: #075fc7;
  background: #075fc7;
  box-shadow: 0 2px 7px rgba(7, 95, 199, .24);
  color: #fff;
}

.message-thread-toggle[aria-expanded="true"]:hover {
  border-color: #064b9e;
  background: #064faa;
}

.message-thread-toggle:active {
  transform: translateY(0) scale(.94);
}

.message-thread-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.message-thread-entry {
  position: relative;
}

.message-thread-entry.expanded > .message-item {
  border-bottom-color: #c5d8ee;
}

.message-thread-children {
  position: relative;
  padding: 4px 8px 6px 24px;
  border-bottom: 1px solid #d8e2ef;
  background: #f2f7fd;
  box-shadow: inset 3px 0 0 #91b8e5;
}

.message-thread-node-entry {
  position: relative;
}

.message-thread-node-entry + .message-thread-node-entry {
  margin-top: 2px;
}

.message-thread-node-children {
  position: relative;
}

.message-thread-node {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 34px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px calc(8px + var(--thread-indent, 15px));
  border: 1px solid #d5e1ef;
  border-radius: 7px;
  background: #fff;
  color: #24364f;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.message-thread-node::before {
  position: absolute;
  top: -5px;
  bottom: 50%;
  left: calc(7px + var(--thread-indent, 15px) - 8px);
  width: 10px;
  border-bottom: 1px solid #8da9c8;
  border-left: 1px solid #8da9c8;
  border-radius: 0 0 0 6px;
  content: "";
  pointer-events: none;
}

.message-thread-node:hover {
  border-color: #9ebfe4;
  background: #edf5ff;
}

.message-thread-node:focus-visible {
  z-index: 2;
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(7, 95, 199, .14);
}

.message-thread-node.unread {
  border-color: #8fb7e4;
  background: #dcecff;
  color: #0d2e58;
}

.message-thread-direction {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e5effb;
  color: #32699f;
}

.message-thread-direction.sent {
  background: #dff3e8;
  color: #267052;
}

.message-thread-direction .ui-icon {
  width: 12px;
  height: 12px;
}

.message-thread-node-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(90px, .55fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.message-thread-node-sender,
.message-thread-node-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-node-sender {
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 650;
}

.message-thread-node-subject {
  color: #4a5b73;
  font-size: calc(10px + var(--font-size-adjust));
}

.message-thread-node.unread .message-thread-node-sender,
.message-thread-node.unread .message-thread-node-subject {
  color: #0d2444;
  font-weight: 850;
}

.message-thread-node-time {
  color: #71829a;
  font-size: calc(9px + var(--font-size-adjust));
  white-space: nowrap;
}

.message-thread-state,
.message-thread-partial {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 20px;
  color: #5c708b;
  font-size: calc(10px + var(--font-size-adjust));
}

.message-thread-state .ui-icon,
.message-thread-partial .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.message-thread-state.error {
  color: #a33b35;
}

.message-thread-retry {
  min-height: 26px;
  margin-left: auto;
  padding: 3px 9px;
  border: 1px solid #a9c4e2;
  border-radius: 6px;
  background: #fff;
  color: #075fc7;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.message-thread-retry:hover,
.message-thread-retry:focus-visible {
  border-color: var(--blue);
  outline: none;
  background: #eaf4ff;
}

.message-thread-partial {
  min-height: 26px;
  color: #6d7890;
}

.selecting .message-thread-toggle {
  display: none;
}

@media (max-width: 760px) {
  .message-thread-children {
    padding-left: 12px;
  }

  .message-thread-node {
    padding-left: calc(6px + var(--thread-indent-mobile, 11px));
  }

  .message-thread-node::before {
    left: calc(5px + var(--thread-indent-mobile, 11px) - 7px);
  }

  .message-thread-node-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .message-thread-node-time {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.message-sender,
.message-subject,
.message-snippet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-sender {
  flex: 1;
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 650;
}

.message-item.unread .message-sender,
.message-item.unread .message-subject {
  color: #0d1b33;
  font-weight: 850;
}

.message-subject {
  margin-top: 5px;
  color: #354156;
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 630;
}

.message-snippet {
  margin-top: 4px;
  color: #858e9e;
  font-size: calc(10px + var(--font-size-adjust));
}

.message-item.unread .message-snippet {
  color: #3f5874;
  font-weight: 700;
}

.message-meta {
  display: flex;
  min-width: 46px;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.message-time {
  color: #8791a2;
  font-size: calc(9px + var(--font-size-adjust));
  white-space: nowrap;
}

.message-item:not(.unread) .message-mailbox-cell,
.message-item:not(.unread) .message-mailbox-mobile,
.message-item:not(.unread) .message-sender,
.message-item:not(.unread) .message-subject,
.message-item:not(.unread) .message-snippet,
.message-item:not(.unread) .message-time {
  font-weight: 400;
}

.message-item.unread .message-time {
  color: #0f55bd;
  font-weight: 850;
}

.star-button {
  width: 23px;
  height: 23px;
  border-radius: 5px;
  color: #a5adba;
}

.search-mailbox-group {
  border-bottom: 1px solid var(--line);
}

.search-mailbox-group-toggle {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 7px 13px;
  border-bottom: 1px solid #e3e9f2;
  background: #f5f8fc;
  color: var(--ink);
  text-align: left;
}

.search-mailbox-group-toggle:hover,
.search-mailbox-group-toggle:focus-visible {
  background: #eaf3ff;
}

.search-mailbox-account {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.search-mailbox-chevron {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #69758a;
}

.search-mailbox-avatar {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 800;
}

.search-mailbox-account > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.search-mailbox-account strong,
.search-mailbox-account small,
.search-mailbox-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-mailbox-account strong {
  font-size: calc(11px + var(--font-size-adjust));
}

.search-mailbox-account small,
.search-mailbox-summary {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.search-mailbox-count {
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e3edfb;
  color: #315f9c;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 800;
  text-align: center;
}

.search-mailbox-group.has-error .search-mailbox-count {
  background: #fff0f0;
  color: var(--danger);
}

.search-mailbox-children[hidden] {
  display: none;
}

.search-mailbox-state {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.search-mailbox-state.error {
  color: var(--danger);
}

.search-mailbox-state.error .secondary-button {
  margin-left: 6px;
}

.search-mailbox-more {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--blue);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 750;
}

.message-mailbox-cell {
  display: none;
}

.message-mailbox-mobile {
  display: none;
}

.star-button .ui-icon {
  width: 18px;
  height: 18px;
}

.star-button:hover {
  background: rgba(245, 166, 35, .1);
  color: #d38b15;
}

.star-button.starred {
  color: var(--orange);
}

.message-read-toggle[data-background-pending="true"],
.star-button[data-background-pending="true"],
#preview-star[data-background-pending="true"],
#preview-read-toggle[data-background-pending="true"],
[data-message-action][data-background-pending="true"] {
  opacity: .72;
}

.star-button[data-background-pending="true"] .ui-icon,
#preview-star[data-background-pending="true"] .ui-icon,
#preview-read-toggle[data-background-pending="true"] .ui-icon {
  transition: opacity .16s ease;
}

.attachment-indicator {
  color: #8791a2;
}

.attachment-indicator .ui-icon {
  width: 14px;
  height: 14px;
}

.message-list.table-view {
  scrollbar-gutter: stable;
}

.message-list.table-view .message-item {
  min-height: 40px;
  grid-template-columns: var(--message-table-columns);
  align-items: center;
  gap: var(--message-table-gap);
  padding: 4px 13px;
}

.message-list.table-view .message-icon-column {
  align-self: center;
}

.message-list.table-view .message-avatar {
  width: 24px;
  height: 24px;
  align-self: center;
  overflow: hidden;
  font-size: 8px;
  letter-spacing: -.03em;
  line-height: 1;
}

.message-list.table-view .message-summary {
  display: grid;
  grid-template-columns: var(--message-table-summary-columns);
  align-items: center;
  gap: var(--message-table-summary-gap);
}

.message-list.table-view .message-sender,
.message-list.table-view .message-subject {
  margin-top: 0;
  font-size: calc(11px + var(--font-size-adjust));
}

.message-list.table-view .message-sender {
  font-weight: 400;
}

.message-list.table-view .message-item.unread .message-sender,
.message-list.table-view .message-item.unread .message-subject {
  font-weight: 900;
}

.message-list.table-view .message-snippet {
  display: none;
}

.message-list.table-view .message-meta {
  min-width: 0;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.message-list.table-view .message-time {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
}

.message-list.table-view .star-button {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  font-size: calc(16px + var(--font-size-adjust));
}

.message-list.table-view .attachment-indicator {
  flex: 0 0 auto;
  font-size: calc(10px + var(--font-size-adjust));
}

.message-list.table-view .message-skeleton {
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.message-list.table-view .message-skeleton > i {
  width: 24px;
  height: 24px;
}

.message-skeleton {
  display: flex;
  gap: 10px;
  min-height: 93px;
  padding: 14px 15px;
  border-bottom: 1px solid #e8ebf1;
  background: #fff;
}

.message-skeleton > i,
.message-skeleton b,
.message-skeleton em,
.message-skeleton small {
  display: block;
  border-radius: 5px;
  background: linear-gradient(90deg, #edf0f5 25%, #f8f9fb 37%, #edf0f5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

.message-skeleton > i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.message-skeleton > span {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.message-skeleton b { width: 45%; height: 9px; }
.message-skeleton em { width: 72%; height: 10px; }
.message-skeleton small { width: 88%; height: 8px; }

.list-footer {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 13px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
  color: #9098a7;
  font-size: calc(9px + var(--font-size-adjust));
  text-align: center;
}

.message-list.search-all-view.table-view .search-mailbox-group-toggle {
  min-height: 43px;
  grid-template-columns: minmax(112px, .52fr) 28px var(--message-thread-column-width) var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width) minmax(0, 1fr) var(--message-table-date-width, 88px);
  gap: var(--message-table-gap);
  padding: 4px 13px;
}

.message-list.search-all-view.table-view .search-mailbox-account {
  grid-column: 1 / 7;
}

.message-list.search-all-view.table-view .search-mailbox-summary {
  grid-column: 7;
}

.message-list.search-all-view.table-view .search-mailbox-count {
  grid-column: 8;
  justify-self: end;
}

.message-list.search-all-view.table-view .message-item {
  grid-template-columns: minmax(112px, .52fr) 28px var(--message-thread-column-width) var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width) minmax(0, 1fr) var(--message-table-date-width, 88px);
}

.message-list.search-all-view.table-view .message-mailbox-cell {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  padding-left: 22px;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list.search-all-view.table-view .message-mailbox-cell::before {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 8px;
  height: 12px;
  transform: translateY(-70%);
  border-bottom: 1px solid #b9c8db;
  border-left: 1px solid #b9c8db;
  border-radius: 0 0 0 4px;
  content: "";
}

.load-more-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--blue);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
}

.load-more-button:hover:not(:disabled) {
  border-color: #8db7ef;
  background: var(--surface-blue);
}

.load-more-button:disabled {
  color: var(--muted);
  cursor: wait;
}

.load-more-button[hidden] {
  display: none;
}

.empty-list,
.error-state {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-list .empty-icon,
.error-state .empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 15px;
  background: #edf2f8;
  color: #718096;
}

.empty-list .empty-icon .ui-icon,
.error-state .empty-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.empty-list h3,
.error-state h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: calc(14px + var(--font-size-adjust));
}

.empty-list p,
.error-state p {
  max-width: 240px;
  margin: 0;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.5;
}

.error-state button {
  margin-top: 13px;
}

.connection-diagnostic-host {
  width: min(100%, 470px);
  padding: 14px 16px;
  border: 1px solid #f1c6c6;
  border-radius: 10px;
  background: #fff7f7;
  color: #7f2b2b;
  text-align: left;
}

.connection-diagnostic {
  width: 100%;
  text-align: left;
}

.connection-diagnostic-title,
.connection-diagnostic-label {
  display: block;
}

.connection-diagnostic-title {
  margin-bottom: 9px;
  color: inherit;
  font-size: calc(12px + var(--font-size-adjust));
  line-height: 1.4;
}

.connection-diagnostic-label {
  margin-top: 8px;
  color: inherit;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.connection-diagnostic-reason,
.connection-diagnostic-notice {
  max-width: none !important;
  margin: 3px 0 0 !important;
  color: inherit;
  font-size: calc(11px + var(--font-size-adjust)) !important;
  line-height: 1.5 !important;
}

.connection-diagnostic-notice {
  margin-top: 9px !important;
  padding-top: 8px;
  border-top: 1px solid rgba(167, 50, 50, .2);
  font-weight: 650;
}

.connection-diagnostic-actions {
  margin: 5px 0 0;
  padding-left: 18px;
}

.connection-diagnostic-actions li {
  margin: 4px 0;
  padding-left: 1px;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.45;
}

.connection-diagnostic-actions a {
  color: #0759bd;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.connection-diagnostic-actions a:hover {
  color: #003d8b;
}

.connection-diagnostic-actions a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.preview-resizer {
  position: relative;
  z-index: 6;
  display: block;
  grid-column: 3;
  min-width: 12px;
  cursor: col-resize;
  touch-action: none;
  background: #f1f4f8;
}

.preview-resizer::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: var(--line);
  content: "";
  transition: background .12s ease, box-shadow .12s ease;
}

.preview-resizer:hover::before,
.preview-resizer:focus-visible::before,
body.is-resizing-preview .preview-resizer::before,
body.is-resizing-message-list .preview-resizer::before {
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, .14);
}

.preview-resizer:focus-visible {
  outline: none;
}

.preview-resizer[hidden] {
  display: none;
}

body.is-resizing-columns,
body.is-resizing-preview {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-message-list {
  cursor: row-resize;
  user-select: none;
}

body.is-resizing-compose-window {
  cursor: nwse-resize;
  user-select: none;
}

@media (pointer: coarse) {
  .messages-pane {
    --message-thread-column-width: 22px;
    --message-attachment-column-width: 18px;
    --message-star-column-width: 28px;
  }

  .refresh-primary {
    height: 44px;
  }

  .message-list.table-view .message-item {
    min-height: 44px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .message-list.table-view .star-button {
    width: 28px;
    height: 28px;
  }

  .message-column-resizer {
    right: -10px;
    width: 20px;
  }

  .message-table-date-column > .message-column-resizer {
    left: -10px;
  }
}

.preview-pane {
  position: relative;
  grid-column: 4;
  container-type: inline-size;
  overflow: hidden;
  background: #fff;
}

.preview-empty {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.preview-empty h2 {
  margin: 18px 0 4px;
  color: #3d485c;
  font-size: calc(16px + var(--font-size-adjust));
}

.preview-empty p {
  margin: 0;
  font-size: calc(12px + var(--font-size-adjust));
}

.empty-illustration {
  position: relative;
  width: 100px;
  height: 76px;
  border: 1px solid #d6dfec;
  border-radius: 9px;
  background: linear-gradient(145deg, #f7faff, #edf3fb);
  box-shadow: 0 12px 25px rgba(40, 65, 99, .08);
}

.empty-illustration::before,
.empty-illustration::after {
  position: absolute;
  top: 15px;
  width: 55px;
  height: 1px;
  background: #c4d4e8;
  content: "";
}

.empty-illustration::before {
  left: 4px;
  transform: rotate(33deg);
}

.empty-illustration::after {
  right: 4px;
  transform: rotate(-33deg);
}

.empty-illustration span {
  position: absolute;
  bottom: 18px;
  left: 25px;
  width: 50px;
  height: 5px;
  border-radius: 5px;
  background: #d6e2f1;
  box-shadow: 0 12px 0 #e0e8f3;
}

.message-view {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.preview-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
}

.preview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.preview-actions > button:not(.icon-button) {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #556176;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 650;
}

.preview-actions > button:hover {
  border-color: #bfcde1;
  background: #f7f9fc;
}

.message-font-size-button {
  width: 38px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--blue);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 850;
}

.message-font-size-glyph {
  display: block;
  letter-spacing: -.06em;
  line-height: 1;
  white-space: nowrap;
}

.message-font-size-button[data-message-font-size="large"] {
  color: var(--orange);
}

.mobile-back {
  display: none;
}

.message-content-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.message-content-scroll > :not(.message-body) {
  flex: 0 0 auto;
}

.message-heading {
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e8ebf1;
}

.message-subject-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.message-subject-row h2 {
  min-width: 0;
  flex: 1;
  margin: 0 0 19px;
  color: #1b2639;
  font-size: calc(16px + var(--font-size-adjust));
  font-weight: 740;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.star-button.large {
  width: 32px;
  height: 32px;
}

@container (max-width: 720px) {
  .preview-toolbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .preview-actions > button:not(.icon-button) {
    position: relative;
    width: 36px;
    min-width: 36px;
    justify-content: center;
    padding: 0;
  }

  .preview-actions > button:not(.icon-button) > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .preview-toolbar .message-encoding-control > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .preview-toolbar .message-encoding-control select {
    max-width: 96px;
  }
}

.star-button.large .ui-icon {
  width: 23px;
  height: 23px;
}

.sender-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-encoding-control {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 650;
}

.message-encoding-control select {
  height: 30px;
  min-width: 0;
  padding: 0 26px 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
}

.message-encoding-control select:focus-visible {
  border-color: var(--blue);
  outline: 2px solid color-mix(in srgb, var(--blue) 22%, transparent);
  outline-offset: 1px;
}

.sender-avatar {
  width: 37px;
  height: 37px;
  font-size: calc(12px + var(--font-size-adjust));
}

.sender-details {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}

.sender-details strong {
  max-width: 50%;
  overflow: hidden;
  font-size: calc(12px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-email {
  display: inline-flex;
  max-width: 45%;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-details {
  position: absolute;
  z-index: 5;
  top: calc(100% + 7px);
  left: 0;
  width: min(360px, calc(100vw - 36px));
  max-height: min(50dvh, 320px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.recipient-details:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.recipient-details-modal {
  width: min(92vw, 540px);
}

.recipient-details-modal-shell {
  min-height: 0;
}

.recipient-details-modal-body {
  min-height: 130px;
  max-height: min(62dvh, 520px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 21px 22px;
  color: var(--muted);
  font-size: calc(13px + var(--font-size-adjust));
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.recipient-details-modal-body .recipient-details-line + .recipient-details-line {
  margin-top: 12px;
}

.recipient-details-modal-body:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -4px;
}

.message-move-modal {
  width: min(92vw, 520px);
  max-height: min(88dvh, 680px);
}

.message-move-shell {
  min-height: 0;
  max-height: min(88dvh, 680px);
}

.message-link-modal {
  width: min(92vw, 580px);
  max-height: min(88dvh, 680px);
}

.message-link-modal-shell {
  min-height: 0;
  max-height: min(88dvh, 680px);
}

.message-link-modal .modal-header > div {
  min-width: 0;
}

.message-link-modal .modal-header .eyebrow {
  margin-bottom: 5px;
}

.message-link-modal-body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding: 18px 20px 16px;
  background: var(--surface-raised);
}

#message-link-modal-hint {
  margin: 0;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.5;
}

.message-link-options {
  display: grid;
  gap: 9px;
}

.message-link-option {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.message-link-option:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  background: var(--surface-blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.message-link-option:focus-visible {
  border-color: var(--blue);
  outline: 3px solid color-mix(in srgb, var(--blue) 24%, transparent);
  outline-offset: 1px;
}

.message-link-option-public {
  border-color: color-mix(in srgb, var(--orange) 34%, var(--line));
  background: color-mix(in srgb, var(--orange) 5%, var(--surface-raised));
}

.message-link-option-public:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--orange) 58%, var(--line));
  background: color-mix(in srgb, var(--orange) 9%, var(--surface-raised));
}

.message-link-option-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.message-link-option-public .message-link-option-icon {
  background: color-mix(in srgb, var(--orange) 18%, var(--surface-raised));
  color: color-mix(in srgb, var(--orange) 72%, #704000);
}

.message-link-option-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.message-link-option-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.message-link-option-title {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.message-link-option-copy strong {
  font-size: calc(13px + var(--font-size-adjust));
  line-height: 1.25;
}

.message-link-option-copy small {
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.message-link-duration {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 16%, var(--surface-raised));
  color: color-mix(in srgb, var(--orange) 66%, #704000);
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.message-link-option-arrow {
  width: 18px;
  height: 18px;
  justify-self: end;
  color: var(--muted);
  transition: transform .15s ease, color .15s ease;
}

.message-link-option:hover:not(:disabled) .message-link-option-arrow,
.message-link-option:focus-visible .message-link-option-arrow {
  color: var(--blue);
  transform: translateX(2px);
}

.message-link-option[aria-busy="true"],
.message-link-modal[aria-busy] .message-link-option {
  cursor: progress;
}

.message-link-option[aria-busy="true"] .message-link-option-arrow,
.message-link-modal[aria-busy] .message-link-option-arrow {
  width: 17px;
  height: 17px;
  border: 2px solid color-mix(in srgb, var(--blue) 25%, transparent);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.message-link-option[aria-busy="true"] .message-link-option-arrow use,
.message-link-modal[aria-busy] .message-link-option-arrow use {
  display: none;
}

.message-link-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.45;
}

.message-link-status.error {
  color: var(--danger);
}

@media (max-width: 620px) {
  .message-link-modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .message-link-modal-shell {
    max-height: calc(100dvh - 18px);
  }

  .message-link-modal .modal-header {
    padding-top: max(15px, env(safe-area-inset-top));
  }

  .message-link-modal-body {
    padding: 15px 14px max(14px, env(safe-area-inset-bottom));
  }

  .message-link-option {
    min-height: 88px;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 13px 12px;
  }
}

.message-headers-modal {
  width: min(94vw, 900px);
  height: min(88dvh, 760px);
  max-height: none;
}

.message-headers-shell {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
}

.message-headers-header {
  flex: 0 0 auto;
  align-items: center;
}

.message-headers-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.message-headers-heading h2 {
  margin: 0;
}

#message-headers-subject {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-headers-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.message-headers-actions .secondary-button {
  gap: 7px;
}

.message-headers-body {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 11px;
  padding: 16px 18px 18px;
  background: var(--surface-raised);
}

.message-headers-tabs {
  display: inline-grid;
  width: fit-content;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.message-headers-tabs button {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
}

.message-headers-tabs button:hover,
.message-headers-tabs button:focus-visible {
  color: var(--blue-strong);
}

.message-headers-tabs button[aria-selected="true"] {
  background: var(--surface-blue);
  box-shadow: 0 1px 3px rgba(16, 38, 70, .12);
  color: var(--blue-strong);
}

.message-headers-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.4;
}

.message-headers-status.error {
  color: var(--danger);
}

#message-headers-content {
  min-width: 0;
  min-height: 280px;
  flex: 1 1 auto;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: calc(12px + var(--font-size-adjust));
  line-height: 1.5;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  direction: ltr;
  unicode-bidi: plaintext;
}

#message-headers-content:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -3px;
}

.message-move-modal .modal-header > div {
  min-width: 0;
}

.message-move-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 13px;
  padding: 17px 20px 20px;
  background: var(--surface-raised);
}

#message-move-hint {
  margin: 0;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.45;
}

.message-move-folders {
  display: grid;
  min-height: 0;
  max-height: min(55dvh, 440px);
  gap: 6px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding: 2px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.message-move-folder {
  display: grid;
  width: 100%;
  min-height: 46px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  text-align: left;
  transition: background-color .12s ease, box-shadow .12s ease, color .12s ease;
}

.message-move-folder:hover:not(:disabled),
.message-move-folder:focus-visible,
.message-move-folder.active,
.message-move-folder[aria-current="true"] {
  background: var(--surface-blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 78%, transparent);
  color: var(--blue-strong);
}

.message-move-folder:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 28%, transparent);
  outline-offset: 1px;
}

.message-move-folder:disabled {
  cursor: not-allowed;
  opacity: .56;
}

.message-move-folder-icon,
.message-move-folder > .ui-icon,
.message-move-folder > .folder-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.message-move-folder:hover:not(:disabled) :is(.message-move-folder-icon, .ui-icon, .folder-icon),
.message-move-folder:focus-visible :is(.message-move-folder-icon, .ui-icon, .folder-icon),
.message-move-folder.active :is(.message-move-folder-icon, .ui-icon, .folder-icon),
.message-move-folder[aria-current="true"] :is(.message-move-folder-icon, .ui-icon, .folder-icon) {
  color: var(--blue);
}

.message-move-folder-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.message-move-folder-name,
.message-move-folder > .folder-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-move-folder-count {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
  text-align: center;
}

.message-move-status,
.message-move-loading,
.message-move-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 11px;
  padding: 22px 16px;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.45;
  text-align: center;
}

.message-move-loading::before {
  width: 24px;
  height: 24px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  content: "";
  animation: spin .75s linear infinite;
}

.message-move-empty > .ui-icon,
.message-move-status > .ui-icon {
  width: 28px;
  height: 28px;
  color: var(--subtle);
}

.copyable-email {
  border-radius: 3px;
  cursor: context-menu;
  text-decoration-color: transparent;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  transition: background-color .14s ease, color .14s ease, text-decoration-color .14s ease;
}

.copyable-email:hover {
  background: rgba(43, 124, 230, .11);
  color: var(--blue);
  text-decoration-color: currentColor;
}

.copyable-email:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  text-decoration-color: currentColor;
}

html[data-theme="dark"] .copyable-email:hover {
  background: rgba(104, 170, 255, .16);
}

.email-context-menu {
  inset: auto;
  margin: 0;
  max-width: calc(100vw - 16px);
  color: var(--ink);
}

.email-context-menu::backdrop { background: transparent; pointer-events: none; }

.email-context-menu button { min-height: 44px; }

.sender-card time {
  align-self: flex-start;
  color: #8993a3;
  font-size: calc(10px + var(--font-size-adjust));
  white-space: nowrap;
}

.remote-content-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 28px;
  border-bottom: 1px solid #f0dca7;
  background: #fff8e7;
  color: #7c641f;
  font-size: calc(10px + var(--font-size-adjust));
}

.remote-content-notice button {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 5px;
  background: #f0dfb2;
  color: #69520f;
  font-size: calc(10px + var(--font-size-adjust));
}

.message-body {
  flex: 1 0 auto;
  max-width: 850px;
  padding: 26px 28px 40px;
  color: #2f394c;
  font-family: ui-serif, Georgia, Cambria, serif;
  font-size: calc(16px + var(--font-size-adjust));
  line-height: 1.72;
  overflow-wrap: anywhere;
}

html[data-message-font-size="small"] .message-body {
  font-size: calc(14px + var(--font-size-adjust));
}

html[data-message-font-size="normal"] .message-body {
  font-size: calc(16px + var(--font-size-adjust));
}

html[data-message-font-size="large"] .message-body {
  font-size: calc(19px + var(--font-size-adjust));
}

.message-body p {
  margin: 0 0 1em;
}

.message-body.is-plain-text {
  white-space: pre-wrap;
}

.message-body a {
  color: var(--blue);
}

.message-body.is-plain-text a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

.message-body.is-plain-text a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.message-body blockquote {
  margin: 18px 0;
  padding-left: 16px;
  border-left: 3px solid #cbd8ea;
  color: #677388;
}

.message-body img {
  max-width: 100%;
  height: auto;
}

.message-body.has-html {
  width: 100%;
  max-width: none;
  padding: 12px;
  background: #fff;
  color: #182235;
  color-scheme: light;
  font-family: inherit;
  line-height: normal;
  overflow-wrap: normal;
}

.message-html-frame {
  display: block;
  width: 100%;
  min-height: 180px;
  border: 0;
  background: #fff;
  color-scheme: light;
  overflow-anchor: none;
}

.attachments {
  position: relative;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.attachment-download-all {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 28px;
  display: inline-flex;
  max-width: 138px;
  min-height: 28px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--blue);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
}

.attachment-download-all[hidden] {
  display: none;
}

.attachment-download-all > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-download-all .ui-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.attachment-download-all:hover {
  border-color: #b8cce8;
  background: var(--surface-blue);
}

.attachment-download-all:focus-visible {
  outline: 3px solid rgba(23, 105, 224, .34);
  outline-offset: 2px;
}

.attachments.has-download-all .attachment-summary {
  padding-right: 176px;
}

.attachment-disclosure {
  margin: 0;
}

.attachment-summary {
  display: flex;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  align-items: center;
  gap: 7px;
  padding: 5px 28px;
  color: var(--muted);
  cursor: pointer;
  font-size: calc(11px + var(--font-size-adjust));
  list-style: none;
  touch-action: manipulation;
  user-select: none;
}

.attachment-summary::-webkit-details-marker {
  display: none;
}

.attachment-summary::marker {
  content: '';
}

.attachment-summary:hover {
  background: var(--surface-blue);
  color: var(--blue);
}

.attachment-summary:focus-visible {
  outline: 3px solid rgba(23, 105, 224, .34);
  outline-offset: -3px;
}

.attachment-summary-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  transition: transform .16s ease;
}

.attachment-disclosure[open] > .attachment-summary .attachment-summary-chevron {
  transform: rotate(90deg);
}

.attachment-summary-paperclip {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.attachment-summary strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0 6px;
  white-space: nowrap;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1;
}

@media (max-width: 480px) {
  #attachments.has-download-all .attachment-summary {
    padding-right: 76px;
  }

  #attachment-download-all {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  #attachment-download-all > span {
    display: none;
  }
}

.attachment-summary > span {
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  white-space: nowrap;
}

#attachment-list {
  display: flex;
  max-height: 62px;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 28px 9px;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  touch-action: pan-y;
}

#attachment-list::-webkit-scrollbar {
  width: 6px;
}

#attachment-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: var(--line-strong);
}

.attachment-card {
  display: flex;
  flex: 0 1 240px;
  width: min(100%, 240px);
  min-width: 0;
  max-width: 240px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfd;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.attachment-card:hover {
  border-color: #a9c7ed;
  background: #f3f8ff;
}

.attachment-card[draggable="true"] {
  cursor: grab;
}

.attachment-card[draggable="true"]:active,
.attachment-card.is-dragging {
  cursor: grabbing;
}

.attachment-card.is-dragging {
  border-color: var(--blue);
  box-shadow: 0 5px 14px rgba(23, 105, 224, .2);
  opacity: .72;
}

.attachment-card strong,
.attachment-card small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card strong { font-size: calc(11px + var(--font-size-adjust)); }
.attachment-card small { margin-top: 2px; color: var(--muted); font-size: calc(9px + var(--font-size-adjust)); }

.attachment-card-copy {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.attachment-card-file {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 6px;
  padding: 2px 1px;
  border-radius: 5px;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

a.attachment-card-file:hover .attachment-card-copy strong {
  color: var(--blue);
}

a.attachment-card-file:focus-visible {
  outline: 3px solid rgba(23, 105, 224, .3);
  outline-offset: 2px;
}

.attachment-card-icon.file-icon {
  --file-color: #64748b;
  position: relative;
  display: flex;
  width: 27px;
  height: 32px;
  flex: 0 0 27px;
  align-items: flex-end;
  padding: 0 0 4px;
  border: 1px solid #c7d0dd;
  border-radius: 4px 8px 4px 4px;
  background: linear-gradient(145deg, #fff 0 72%, #eef2f7 100%);
  box-shadow: 0 2px 4px rgba(38, 55, 77, .12);
}

.attachment-card-icon.file-icon::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-left: 1px solid #c7d0dd;
  border-bottom: 1px solid #c7d0dd;
  border-radius: 0 7px 0 3px;
  background: #edf2f8;
  content: '';
}

.file-icon-badge {
  position: relative;
  z-index: 1;
  display: block;
  min-width: calc(100% + 4px);
  margin-left: -3px;
  padding: 3px 2px;
  border-radius: 3px;
  background: var(--file-color);
  box-shadow: 0 1px 2px rgba(20, 32, 50, .22);
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  text-align: center;
}

.file-icon-word { --file-color: #2563b9 !important; }
.file-icon-pdf { --file-color: #d23b36 !important; }
.file-icon-spreadsheet { --file-color: #21844a !important; }
.file-icon-presentation { --file-color: #d4632b !important; }
.file-icon-image { --file-color: #14889a !important; }
.file-icon-archive { --file-color: #a56b12 !important; }
.file-icon-text { --file-color: #596779 !important; }
.file-icon-audio { --file-color: #7c4bc0 !important; }
.file-icon-video { --file-color: #ad3d84 !important; }

.attachment-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}

.attachment-preview-button,
.attachment-card-download {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-blue);
  color: var(--blue);
  text-decoration: none;
  touch-action: manipulation;
}

.attachment-preview-button .ui-icon,
.attachment-card-download .ui-icon {
  width: 14px;
  height: 14px;
}

.attachment-preview-button:hover,
.attachment-card-download:hover {
  background: #dcecff;
}

@media (min-width: 921px) {
  .attachment-download-all {
    top: 3px;
    min-height: 26px;
  }

  .attachment-summary {
    min-height: 32px;
    padding: 3px 28px;
  }

  #attachment-list {
    margin: 4px 28px;
  }

  #attachment-list .attachment-card {
    gap: 4px;
    padding: 1px 6px;
  }

  #attachment-list .attachment-card-file {
    gap: 4px;
    padding: 0 1px;
  }

  #attachment-list .attachment-card-icon.file-icon {
    width: 20px;
    height: 24px;
    flex: 0 0 20px;
    padding-bottom: 2px;
  }

  #attachment-list .attachment-card-icon.file-icon::before {
    width: 7px;
    height: 7px;
  }

  #attachment-list .file-icon-badge {
    min-width: calc(100% + 3px);
    margin-left: -2px;
    padding: 2px 1px;
    font-size: 6px;
  }

  #attachment-list .attachment-card-copy {
    display: flex;
    align-items: baseline;
    gap: 4px;
  }

  #attachment-list .attachment-card strong {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1;
  }

  #attachment-list .attachment-card small {
    flex: 0 0 auto;
    margin-top: 0;
    line-height: 1;
  }

  #attachment-list .attachment-preview-button,
  #attachment-list .attachment-card-download {
    width: 24px;
    height: 24px;
  }
}

.mobile-nav,
.mobile-only,
.mobile-overlay {
  display: none;
}

.auth-screen {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(400px, 1.04fr) minmax(430px, .96fr);
  overflow: auto;
  background: #fff;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 620px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 19%, rgba(78, 148, 242, .32), transparent 26%),
    radial-gradient(circle at 80% 76%, rgba(58, 124, 224, .24), transparent 27%),
    linear-gradient(145deg, #0c3673 0%, #0b438f 48%, #1262c6 100%);
}

.auth-visual::before {
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image: linear-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .15) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom right, #000, transparent 75%);
  content: "";
}

.visual-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.orb-one {
  top: -130px;
  right: -100px;
  width: 370px;
  height: 370px;
  border: 1px solid rgba(255, 255, 255, .17);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, .05);
}

.orb-two {
  bottom: -170px;
  left: -150px;
  width: 450px;
  height: 450px;
  border: 1px solid rgba(255, 255, 255, .1);
}

.mail-window {
  position: relative;
  z-index: 2;
  width: min(76%, 540px);
  aspect-ratio: 1.38;
  margin: -30px 0 110px;
  transform: perspective(900px) rotateY(5deg) rotateX(2deg);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 38px 80px rgba(0, 20, 62, .35);
}

.mail-window-bar {
  display: flex;
  height: 31px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-bottom: 1px solid #dfe5ee;
}

.mail-window-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b6c2d2;
}

.mail-window-bar i:first-child { background: #ff8b80; }
.mail-window-bar i:nth-child(2) { background: #ffc75a; }
.mail-window-bar i:nth-child(3) { background: #62d38b; }

.mail-window-body {
  display: grid;
  height: calc(100% - 31px);
  grid-template-columns: 22% 34% 44%;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}

.mini-sidebar {
  border-right: 1px solid #dce3ed;
  background: #e9eef6;
}

.mini-sidebar::before {
  display: block;
  width: 70%;
  height: 9px;
  margin: 24px auto;
  border-radius: 3px;
  background: #2979df;
  box-shadow: 0 26px 0 #d1dbe8, 0 47px 0 #d1dbe8, 0 68px 0 #d1dbe8, 0 89px 0 #d1dbe8;
  content: "";
}

.mini-list {
  border-right: 1px solid #e1e6ee;
  background: #f9fbfd;
}

.mini-list i {
  display: block;
  height: 25%;
  border-bottom: 1px solid #e5e9ef;
  background: linear-gradient(90deg, transparent 10%, #dce5ef 10%, #dce5ef 25%, transparent 25%);
}

.mini-list i:nth-child(2) {
  background: linear-gradient(90deg, #e4efff, #edf5ff);
  box-shadow: inset 2px 0 #2675d8;
}

.mini-letter {
  padding: 26px 20px;
  background: #fff;
}

.mini-letter i {
  display: block;
  height: 6px;
  margin-bottom: 13px;
  border-radius: 4px;
  background: #d8e0eb;
}

.mini-letter i:first-child { width: 65%; height: 10px; background: #b9c8db; }
.mini-letter i:nth-child(2) { width: 86%; margin-top: 30px; }
.mini-letter i:nth-child(3) { width: 76%; }

.auth-slogan {
  position: absolute;
  z-index: 3;
  right: 11%;
  bottom: 8%;
  left: 11%;
  color: #fff;
}

.auth-slogan strong {
  display: block;
  margin-top: 15px;
  font-size: clamp(calc(22px + var(--font-size-adjust)), calc(2.5vw + var(--font-size-adjust)), calc(33px + var(--font-size-adjust)));
  font-weight: 760;
  letter-spacing: -.035em;
}

.auth-slogan p {
  max-width: 520px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: calc(13px + var(--font-size-adjust));
  line-height: 1.55;
}

.auth-panel {
  display: grid;
  min-height: 620px;
  place-items: center;
  padding: 45px clamp(32px, 7vw, 110px);
}

.auth-card {
  width: min(100%, 390px);
}

.auth-mobile-brand {
  display: none;
}

.language-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 58px;
}

.language-row > span {
  width: 1px;
  height: 11px;
  background: var(--line);
}

.auth-language {
  padding: 2px;
  background: transparent;
  color: #a0a7b3;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 800;
}

.auth-language.active {
  color: var(--blue);
}

.auth-card h1 {
  margin: 0;
  color: #142038;
  font-size: clamp(calc(28px + var(--font-size-adjust)), calc(3vw + var(--font-size-adjust)), calc(38px + var(--font-size-adjust)));
  font-weight: 780;
  letter-spacing: -.045em;
}

.auth-intro {
  margin: 10px 0 31px;
  color: var(--muted);
  font-size: calc(13px + var(--font-size-adjust));
  line-height: 1.55;
}

.field-label {
  display: block;
  margin: 14px 0 7px;
  color: #465267;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 720;
}

.input-wrap {
  display: flex;
  height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: #8b94a3;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input-wrap:focus-within,
.account-fields > input:focus,
.plain-password-wrap:focus-within {
  border-color: #7fafea;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}

.input-wrap > .ui-icon {
  width: 20px;
  height: 20px;
  color: #8490a2;
}

.input-wrap input {
  min-width: 0;
  height: 100%;
  flex: 1;
  border: 0;
  background: transparent;
}

.password-toggle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.password-toggle .ui-icon {
  width: 17px;
  height: 17px;
}

.form-error,
.compose-error {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #f1c6c6;
  border-radius: 7px;
  background: #fff2f2;
  color: #a73232;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.45;
}

.submit-button,
.send-button {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-radius: 9px;
  background: var(--blue);
  box-shadow: 0 7px 16px rgba(23, 105, 224, .2);
  color: #fff;
  font-weight: 750;
  transition: background .15s ease, transform .15s ease;
}

.auth-card .submit-button {
  width: 100%;
  margin-top: 23px;
}

.submit-button:hover,
.send-button:hover {
  transform: translateY(-1px);
  background: var(--blue-strong);
}

.submit-button.loading > span:first-child::after,
.send-button.loading > span:first-child::after {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  vertical-align: -1px;
  animation: spin .7s linear infinite;
}

.auth-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0 0;
  color: #929aa8;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.auth-security > .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--success);
}

.modal {
  width: min(92vw, 680px);
  max-height: min(90dvh, 760px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(13, 25, 46, .48);
  backdrop-filter: blur(3px);
}

.modal[open] {
  animation: modal-in .18s ease-out;
}

.modal-shell {
  display: flex;
  max-height: min(90dvh, 760px);
  flex-direction: column;
  margin: 0;
}

.compose-modal .modal-shell {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.compose-modal .modal-header {
  position: sticky;
  z-index: 110;
  top: 0;
  background: var(--surface-raised);
}

.compose-modal .compose-footer {
  position: sticky;
  z-index: 110;
  bottom: 0;
}

.compose-window-resizer {
  position: absolute;
  z-index: 210;
  right: 2px;
  bottom: 2px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0 0 var(--radius-lg) 0;
  outline-offset: -5px;
  background: transparent;
  color: var(--muted);
  cursor: nwse-resize;
  touch-action: none;
}

.compose-window-resizer::before,
.compose-window-resizer::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
}

.compose-window-resizer::before {
  width: 15px;
  height: 15px;
}

.compose-window-resizer::after {
  width: 8px;
  height: 8px;
}

.compose-window-resizer:hover,
.compose-window-resizer:focus-visible,
body.is-resizing-compose-window .compose-window-resizer {
  background: rgba(31, 111, 235, .08);
  color: var(--blue);
}

.compose-window-resizer[hidden] {
  display: none;
}

.mobile-search-modal {
  width: min(92vw, 460px);
}

.mobile-search-shell {
  min-height: 0;
}

.mobile-search-body {
  display: grid;
  gap: 14px;
  padding: 18px 21px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-search-control {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
}

.mobile-search-field {
  display: flex;
  min-width: 0;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.mobile-search-field:focus-within {
  border-color: #82b5ef;
  background: var(--surface-raised);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .11);
}

.mobile-search-field > .ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.mobile-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.mobile-search-control > .search-history-toggle {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.mobile-search-control > .search-history-toggle > .ui-icon {
  width: 21px;
  height: 21px;
}

.mobile-search-history-popover {
  position: static;
  width: 100%;
  max-height: min(310px, 38dvh);
  grid-column: 1 / -1;
  box-shadow: var(--shadow-sm);
}

.mobile-search-history-popover .search-history-option {
  min-height: 46px;
}

.mobile-search-history-popover .search-history-row {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.mobile-search-history-popover .search-history-remove {
  width: 44px;
  height: 44px;
}

.mobile-search-options {
  display: grid;
  gap: 8px;
}

.mobile-search-options label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 650;
}

.mobile-search-options input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.mobile-search-footer {
  justify-content: flex-end;
  gap: 9px;
}

.mobile-search-footer .submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.compose-modal .modal-shell {
  position: relative;
}

.compose-drop-overlay {
  position: absolute;
  z-index: 30;
  inset: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  visibility: hidden;
  border: 2px dashed #4b91e2;
  border-radius: calc(var(--radius-lg) - 4px);
  background: rgba(239, 247, 255, .97);
  color: #175ba7;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: scale(.985);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.compose-drop-overlay .ui-icon {
  width: 42px;
  height: 42px;
}

.compose-drop-overlay strong {
  font-size: calc(18px + var(--font-size-adjust));
}

.compose-drop-overlay span {
  color: #57779d;
  font-size: calc(12px + var(--font-size-adjust));
}

#compose-form.is-file-dragging .compose-drop-overlay {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  padding: 19px 21px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: calc(19px + var(--font-size-adjust));
  letter-spacing: -.02em;
}

.modal-close {
  color: #69788d;
}

.modal-close .ui-icon {
  width: 20px;
  height: 20px;
}

.compose-fields {
  flex: 0 0 auto;
  padding: 8px 21px 0;
}

.compose-fields > label,
.copy-fields > label,
.compose-recipient-row {
  position: relative;
  display: grid;
  min-height: 39px;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.compose-recipient-row {
  align-items: start;
}

.compose-recipient-row.has-copy-toggle {
  grid-template-columns: 62px minmax(0, 1fr) auto;
}

.compose-fields label > span,
.copy-fields label > span,
.compose-recipient-label {
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
}

.compose-recipient-label {
  min-width: 0;
  padding-top: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.compose-fields input,
.compose-fields select,
.copy-fields input {
  width: 100%;
  height: 38px;
  border: 0;
  background: transparent;
}

.compose-notification-options {
  display: grid;
  min-height: 58px;
  grid-template-columns: minmax(104px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
}

.compose-notification-label {
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.35;
}

.compose-notification-options .compose-notification-short {
  display: none;
}

.compose-notification-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.compose-notification-toggle {
  display: grid;
  min-width: 0;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  color: var(--ink);
  cursor: pointer;
}

.compose-notification-options .compose-notification-toggle > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.compose-notification-toggle strong,
.compose-notification-toggle small {
  display: block;
  overflow-wrap: anywhere;
}

.compose-notification-toggle > span {
  min-width: 0;
}

.compose-notification-toggle strong {
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.25;
}

.compose-notification-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.3;
}

#preview-read-toggle [data-read-toggle-icon] {
  width: 16px;
  height: 16px;
  margin-right: 5px;
  color: var(--blue);
}

.recipient-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.recipient-token-editor {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  max-height: 104px;
  align-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  overflow: hidden auto;
  padding: 4px 3px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: text;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.recipient-token-editor:focus-within {
  border-color: color-mix(in srgb, var(--blue) 58%, var(--line-strong));
  background: color-mix(in srgb, var(--surface-blue) 54%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
}

.recipient-token-editor > input[data-recipient-input] {
  width: auto;
  min-width: 92px;
  height: 28px;
  flex: 1 1 132px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  caret-color: var(--blue);
}

.recipient-token-editor > input[data-recipient-input]::placeholder {
  color: var(--subtle);
}

.recipient-token-editor > input[data-recipient-input]:focus-visible {
  outline: none;
}

.recipient-token {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  flex: 0 1 auto;
  align-items: center;
  gap: 2px;
  padding-left: 9px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line-strong));
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--ink);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 650;
  line-height: 1.2;
}

.recipient-token:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 18%, transparent);
}

.recipient-token-email,
.recipient-token-address {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-token-remove {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  touch-action: manipulation;
  transition: color .15s ease, background .15s ease;
}

.recipient-token-remove .ui-icon {
  width: 14px;
  height: 14px;
}

.recipient-token-remove:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.recipient-token-remove:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: var(--ink);
}

.recipient-token-editor.is-invalid,
.recipient-input-wrap.has-invalid-recipient .recipient-token-editor {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
}

.recipient-token-editor.is-invalid:focus-within,
.recipient-input-wrap.has-invalid-recipient .recipient-token-editor:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}

.recipient-token-editor:has(> input[aria-invalid="true"]) {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
}

.recipient-token-editor:has(> input[aria-invalid="true"]):focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}

.recipient-token-editor > input[aria-invalid="true"] {
  color: var(--danger);
  caret-color: var(--danger);
}

.contact-suggestions {
  position: absolute;
  z-index: 130;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  max-height: 230px;
  overflow: hidden auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.contact-suggestion {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.account-context-menu button > .ui-icon {
  width: 17px;
  height: 17px;
  justify-self: center;
}

.folder-button.folder-category {
  position: relative;
  min-height: 32px;
  padding-block: 5px;
  padding-left: calc(13px + var(--folder-depth, 1) * 13px);
}

.folder-button.folder-category::before {
  position: absolute;
  left: calc(13px + (var(--folder-depth, 1) - 1) * 13px);
  width: 8px;
  height: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 0 0 0 4px;
  content: '';
  transform: translateY(-4px);
}

.folder-button.folder-category .folder-icon {
  width: 16px;
  font-size: calc(13px + var(--font-size-adjust));
}

.contact-suggestion:hover,
.contact-suggestion.active,
.contact-suggestion[aria-selected="true"] {
  background: var(--surface-blue);
}

.contact-suggestion-avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dceafe, #d8f0e0);
  color: #2468bb;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 850;
}

.contact-suggestion-copy {
  min-width: 0;
}

.contact-suggestion-copy strong,
.contact-suggestion-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender-email .sender-email-chevron {
  width: 13px;
  height: 13px;
}

.contact-suggestion-copy strong {
  font-size: calc(11px + var(--font-size-adjust));
}

.contact-suggestion-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.contact-suggestion-source {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--subtle);
  font-size: calc(8px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-link {
  position: static;
  min-height: 28px;
  align-self: start;
  margin: 5px 0 0 6px;
  padding: 4px 5px;
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--blue);
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.25;
  white-space: nowrap;
}

.compose-link:hover,
.compose-link:focus-visible {
  background: var(--surface-blue);
}

@media (pointer: coarse) {
  .recipient-token-editor {
    min-height: 44px;
    gap: 5px;
    padding-block: 3px;
  }

  .recipient-token-editor > input[data-recipient-input] {
    min-height: 36px;
  }

  .recipient-token {
    min-height: 38px;
    padding-left: 10px;
  }

  .recipient-token-remove {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .compose-link {
    min-height: 36px;
    margin-top: 4px;
    padding: 7px 6px;
  }
}

.copy-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.editor-toolbar {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 9px 21px 6px;
}

.editor-toolbar button {
  width: 29px;
  height: 27px;
  border-radius: 5px;
  background: transparent;
  color: #68758a;
  font-family: Georgia, serif;
}

.editor-toolbar button .ui-icon {
  width: 17px;
  height: 17px;
}

.editor-toolbar button:hover {
  background: #eff3f8;
}

.compose-link-popover {
  position: absolute;
  z-index: 280;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 20px;
  overflow: hidden auto;
  background: rgba(13, 25, 46, .46);
  backdrop-filter: blur(3px);
}

.compose-link-popover[hidden] {
  display: none;
}

.compose-link-card {
  width: min(100%, 440px);
  margin-block: auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.compose-link-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.compose-link-header h3 {
  margin: 0;
  font-size: calc(17px + var(--font-size-adjust));
  letter-spacing: -.02em;
}

.compose-link-header .icon-button .ui-icon {
  width: 18px;
  height: 18px;
}

.compose-link-fields {
  display: grid;
  gap: 13px;
  padding: 17px 18px 8px;
}

.compose-link-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 700;
}

.compose-link-fields input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 500;
  outline: none;
}

.compose-link-fields input:focus {
  border-color: #7fafea;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}

.compose-link-hint {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.4;
}

.compose-link-card .compose-error {
  margin: 5px 18px 0;
}

.compose-link-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px 17px;
}

.secondary-button.compose-link-remove {
  margin-right: auto;
  color: var(--danger);
}

.compose-link-save {
  height: 36px;
  justify-content: center;
  gap: 7px;
  box-shadow: none;
  font-size: calc(11px + var(--font-size-adjust));
}

.compose-link-save .ui-icon {
  width: 16px;
  height: 16px;
}

.compose-close-dialog {
  position: absolute;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden auto;
  background: rgba(13, 25, 46, .52);
  backdrop-filter: blur(3px);
}

.compose-close-dialog[hidden] {
  display: none;
}

.compose-close-card {
  width: min(100%, 500px);
  margin-block: auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.compose-close-content {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 21px 21px 15px;
}

.compose-close-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: #fff4dd;
  color: #bc7713;
}

.compose-close-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.compose-close-copy h3 {
  margin: 1px 0 7px;
  color: var(--ink);
  font-size: calc(18px + var(--font-size-adjust));
  letter-spacing: -.025em;
}

.compose-close-copy p {
  margin: 0;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.5;
}

.compose-close-card .compose-close-error {
  margin: 0 21px 4px 79px;
}

.compose-close-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 21px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.compose-close-actions .secondary-button,
.compose-close-actions .submit-button {
  height: 38px;
  justify-content: center;
  gap: 7px;
  box-shadow: none;
  font-size: calc(11px + var(--font-size-adjust));
}

.compose-close-actions .ui-icon {
  width: 16px;
  height: 16px;
}

.compose-close-actions .compose-close-discard {
  border-color: #e6c1c1;
  color: var(--danger);
}

.compose-close-actions .compose-close-discard:hover,
.compose-close-actions .compose-close-discard:focus-visible {
  border-color: #d99d9d;
  background: #fff3f3;
}

#compose-subject,
.compose-editor {
  font-family: inherit;
  font-size: calc(14px + var(--font-size-adjust));
}

.compose-editor {
  min-height: 235px;
  flex: 1;
  margin: 0 21px;
  padding: 10px 0 20px;
  overflow: auto;
  outline: none;
  color: #2f394c;
  line-height: 1.65;
}

.compose-editor a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.compose-editor:empty::before {
  color: #a2a9b5;
  content: attr(data-placeholder);
}

.compose-attachment-panel {
  display: flex;
  max-height: 54px;
  flex: 0 0 auto;
  margin: 0 21px 6px;
  padding: 4px 6px;
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #f7faff;
}

.compose-attachment-panel[hidden] {
  display: none;
}

.compose-attachment-items {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  gap: 5px;
  padding: 2px;
  overflow: auto hidden;
  scrollbar-width: thin;
}

.compose-attachment-items::-webkit-scrollbar {
  height: 4px;
}

.compose-attachment-items::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #bfccdc;
}

.compose-attachment-card.attachment-card {
  position: relative;
  box-sizing: border-box;
  width: 148px;
  height: 34px;
  min-width: 148px;
  max-width: 148px;
  flex: 0 0 148px;
  justify-content: flex-start;
  gap: 6px;
  padding: 3px 27px 3px 3px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.compose-attachment-card.attachment-card:hover {
  background: #eaf3ff;
}

.compose-attachment-preview {
  width: 100%;
  align-self: stretch;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.compose-attachment-preview:hover .compose-attachment-name,
.compose-attachment-preview:focus-visible .compose-attachment-name {
  color: var(--blue);
}

.compose-attachment-file-icon.attachment-card-icon.file-icon {
  width: 20px;
  height: 25px;
  flex-basis: 20px;
  padding-bottom: 3px;
}

.compose-attachment-file-icon .file-icon-badge {
  padding: 2px 1px;
  font-size: 5px;
}

.compose-attachment-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-self: stretch;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

.compose-attachment-name {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  color: #33435a;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-attachment-size {
  display: block;
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: calc(6px + var(--font-size-adjust));
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-attachment-remove {
  position: absolute;
  top: 5px;
  right: 0;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d7e0eb;
  border-radius: 50%;
  background: var(--surface-raised);
  color: #76849a;
}

.compose-attachment-remove:hover,
.compose-attachment-remove:focus-visible {
  background: #feecec;
  color: var(--danger);
}

.compose-attachment-remove .ui-icon {
  width: 10px;
  height: 10px;
}

.compose-editor .reply-attribution {
  margin: 4px 0 0;
  color: #445168;
}

.compose-editor blockquote[type="cite"] {
  margin: 10px 0 0;
  padding: 2px 0 2px 14px;
  border: 0;
  border-inline-start: 2px solid #4b91e2;
  color: #445168;
}

.compose-editor blockquote[type="cite"]:not(.has-html) {
  white-space: pre-wrap;
}

.compose-editor blockquote[type="cite"] blockquote {
  border-inline-start-color: #9cbde5;
}

.reply-html-preview {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 10px;
  background: #fff;
  color-scheme: light;
  cursor: default;
}

.reply-html-frame {
  display: block;
  width: 100%;
  min-height: 180px;
  border: 0;
  background: #fff;
  color-scheme: light;
}

.compose-error {
  margin: 0 21px 8px;
}

.modal-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 66px;
  padding: 10px 21px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}

.compose-footer {
  justify-content: flex-start;
}

.compose-send-undo {
  position: fixed;
  z-index: 300;
  inset: auto 18px calc(18px + env(safe-area-inset-bottom, 0px)) auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  min-width: 0;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  gap: 14px 8px;
}

.compose-send-undo[hidden] {
  display: none;
}

.compose-send-undo::backdrop {
  background: transparent;
  pointer-events: none;
}

.compose-send-undo-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.compose-send-undo-text {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.compose-send-success-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.compose-send-undo-copy strong {
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.3;
}

#compose-send-countdown {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  font-variant-numeric: tabular-nums;
}

.compose-send-close {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  align-self: start;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.compose-send-close:hover,
.compose-send-close:focus-visible {
  background: var(--surface-blue);
  color: var(--blue);
}

.compose-send-close:focus-visible,
.compose-send-undo-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.compose-send-undo-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
}

.compose-send-undo-actions small {
  min-width: 0;
  color: var(--muted);
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.4;
}

.compose-send-progress {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--blue-soft);
}

.compose-send-progress::before {
  display: block;
  width: var(--send-progress, 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  content: "";
  transition: width .2s linear;
}

@media (max-width: 760px) {
  .compose-send-undo {
    right: 12px;
    bottom: calc(var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom, 0px));
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .compose-send-progress::before { transition: none; }
}

.secondary-button.compose-send-undo-button {
  height: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  color: var(--danger);
}

.secondary-button.compose-send-undo-button .ui-icon {
  width: 16px;
  height: 16px;
}

#compose-form[data-send-state="sending"] .modal-close[aria-disabled="true"] {
  cursor: wait;
  opacity: .62;
}

#compose-form.is-send-locked .compose-fields,
#compose-form.is-send-locked .editor-toolbar,
#compose-form.is-send-locked .compose-editor,
#compose-form.is-send-locked .compose-attachment-panel {
  opacity: .68;
}

.send-button {
  min-width: 126px;
  height: 38px;
}

.send-button .ui-icon,
.attachment-button .ui-icon {
  width: 17px;
  height: 17px;
}

.attachment-button,
.secondary-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #596579;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 650;
  cursor: pointer;
}

.attachment-button:hover,
.secondary-button:hover {
  border-color: #abc3e1;
  background: #f5f9ff;
}

.attachment-button.is-disabled {
  cursor: not-allowed;
  opacity: .58;
}

.draft-state {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #9099a8;
  font-size: calc(9px + var(--font-size-adjust));
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discard-button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: transparent;
  color: #8a94a5;
}

.discard-button .ui-icon {
  width: 18px;
  height: 18px;
}

.discard-button:hover {
  background: #fff0f0;
  color: var(--danger);
}

.account-modal {
  width: min(92vw, 560px);
}

.account-modal .modal-shell {
  overflow: hidden auto;
}

.contacts-modal {
  width: min(92vw, 640px);
  max-height: min(88dvh, 760px);
}

.contacts-modal .modal-shell {
  min-height: min(72dvh, 590px);
}

.contacts-body {
  min-height: 0;
  flex: 1;
  overflow: hidden auto;
  padding: 18px 21px;
}

.contacts-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid #dbe7f6;
  border-radius: 11px;
  background: var(--surface-blue);
}

.contacts-intro p,
.google-contacts-configuration p {
  margin: 0;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.5;
}

.google-contact-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #4285f4, #34a853);
  color: #fff;
  font-size: calc(16px + var(--font-size-adjust));
  font-weight: 850;
}

.google-contact-mark .ui-icon {
  width: 18px;
  height: 18px;
}

.google-contacts-configuration {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.google-contacts-configuration.has-error {
  border-color: #ecd39a;
  background: #fff8e6;
}

.google-contacts-configuration.is-configured {
  border-color: #b8ddc5;
  background: #f2fbf5;
}

.google-contacts-configuration strong,
.google-contacts-configuration code,
.google-contacts-configuration a {
  display: block;
}

.google-contacts-configuration p {
  margin-top: 5px;
}

.google-contacts-configuration code {
  margin: 10px 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font: calc(10px + var(--font-size-adjust)) / 1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.google-contacts-configuration a {
  color: var(--blue);
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
}

.google-oauth-settings-form {
  display: grid;
  gap: 11px;
  margin-top: 13px;
}

.google-oauth-settings-form > label,
.google-oauth-redirect {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.google-oauth-settings-form label > span,
.google-oauth-redirect > span {
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 750;
}

.google-oauth-settings-form input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font: calc(11px + var(--font-size-adjust)) / 1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.google-oauth-settings-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
  outline: none;
}

.google-oauth-settings-form small {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.45;
}

.google-oauth-redirect {
  padding-top: 2px;
}

.google-oauth-redirect code {
  margin: 0;
  padding: 7px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--surface-raised);
}

.google-oauth-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.google-oauth-settings-actions .secondary-button {
  min-height: 36px;
  flex: 0 0 auto;
}

.google-oauth-settings-actions .secondary-button.loading [data-google-save-icon] {
  animation: spin .75s linear infinite;
}

.google-connection-test-result {
  margin: 12px 0 0 !important;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  line-height: 1.45;
}

.google-connection-test-result.success {
  border-color: #b8ddc5;
  background: #f2fbf5;
  color: #17613d;
}

.google-oauth-guidance {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #b7d2f5;
  border-radius: 10px;
  background: var(--surface-blue);
  color: var(--ink);
}

.google-oauth-guidance-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.google-oauth-guidance-heading > div {
  min-width: 0;
}

.google-oauth-guidance-heading strong {
  display: block;
  color: var(--blue-strong);
  font-size: calc(12px + var(--font-size-adjust));
}

.google-oauth-guidance-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.5;
}

.google-oauth-guidance-heading .google-oauth-access-denied-copy {
  color: var(--danger);
  font-weight: 700;
}

.google-oauth-guidance-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.google-oauth-guidance-actions a,
.google-oauth-guidance-actions button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 700;
}

.google-oauth-guidance-actions a {
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--blue);
  text-decoration: none;
}

.google-oauth-guidance-actions a:hover {
  border-color: var(--blue);
  color: var(--blue-strong);
}

.google-contacts-browser {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.google-contacts-browser-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.google-contacts-browser-header > div {
  min-width: 0;
}

.google-contacts-browser-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: calc(15px + var(--font-size-adjust));
}

.google-contacts-browser-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.45;
}

#google-contacts-browser-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--blue-strong);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
  white-space: nowrap;
}

.google-contacts-search {
  display: grid;
  gap: 5px;
  margin-top: 13px;
}

.google-contacts-search-label {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
}

.google-contacts-search-control {
  display: flex;
  height: 40px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--subtle);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.google-contacts-search-control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.google-contacts-search-control > .ui-icon {
  width: 18px;
  height: 18px;
}

.google-contacts-search-control input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.google-contacts-directory {
  display: grid;
  max-height: 340px;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  overflow: hidden auto;
  list-style: none;
}

.google-contact-directory-item {
  min-width: 0;
}

.google-contact-directory-button {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}

.google-contact-directory-button:hover,
.google-contact-directory-button:focus-visible {
  border-color: #9fc2ee;
  background: var(--surface-blue);
}

.google-contact-directory-avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dceafe, #d8f0e0);
  color: #2468bb;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 850;
}

.google-contact-directory-copy {
  display: block;
  min-width: 0;
}

.google-contact-directory-copy strong,
.google-contact-directory-email,
.google-contact-directory-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-contact-directory-copy strong {
  font-size: calc(11px + var(--font-size-adjust));
}

.google-contact-directory-email {
  margin-top: 2px;
  color: var(--blue-strong);
  font-size: calc(10px + var(--font-size-adjust));
}

.google-contact-directory-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: calc(8px + var(--font-size-adjust));
}

.google-contact-directory-compose {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-blue);
  color: var(--blue);
}

.google-contact-directory-compose .ui-icon {
  width: 16px;
  height: 16px;
}

.google-contacts-directory-empty,
.google-contacts-browser-error {
  margin-top: 12px;
  padding: 18px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.45;
  text-align: center;
}

.google-contacts-browser-error {
  border-style: solid;
  border-color: #f1c6c6;
  background: #fff2f2;
  color: var(--danger);
}

.google-people-api-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid #ecd39a;
  border-radius: 8px;
  background: #fff8e6;
  color: #72520d;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.45;
}

.google-people-api-hint a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.google-people-api-hint a:hover {
  text-decoration: underline;
}

.google-contacts-browser-footer {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.google-contacts-browser-footer .secondary-button {
  min-width: 150px;
  justify-content: center;
}

.google-address-books-list {
  display: grid;
  gap: 8px;
}

.google-address-book,
.google-address-books-empty {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.google-address-book.requires-reauthorization {
  border-color: #d6a33a;
  background: #fff9eb;
}

.google-address-books-empty {
  justify-content: center;
  min-height: 92px;
  color: var(--muted);
  text-align: center;
}

.google-address-book-copy {
  min-width: 0;
  flex: 1;
}

.google-address-book-copy strong,
.google-address-book-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-address-book-copy strong {
  font-size: calc(12px + var(--font-size-adjust));
}

.google-address-book-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.google-reauthorization-note {
  display: block;
  margin-top: 5px;
  color: #8b5d08;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.google-contact-access-note {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.google-address-book-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.google-address-book-actions button {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.google-address-book-actions button:hover {
  background: var(--surface-blue);
  color: var(--blue);
}

.google-address-book-actions button.danger-text:hover {
  background: #fff0f0;
  color: var(--danger);
}

.contacts-footer {
  flex-wrap: wrap;
}

.attachment-preview-modal {
  width: min(94vw, 1120px);
  height: min(90dvh, 820px);
  max-height: none;
  background: var(--surface);
}

.attachment-preview-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.attachment-preview-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.attachment-preview-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.attachment-archive-back {
  min-height: 44px;
  flex: 0 0 auto;
  gap: 7px;
}

.attachment-archive-back .ui-icon {
  width: 17px;
  height: 17px;
}

.attachment-preview-heading h2 {
  margin: 0;
  overflow: hidden;
  font-size: calc(16px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-heading > p:last-child {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.attachment-preview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.attachment-download {
  text-decoration: none;
}

.attachment-preview-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background:
    linear-gradient(45deg, rgba(103, 119, 143, .045) 25%, transparent 25%, transparent 75%, rgba(103, 119, 143, .045) 75%),
    linear-gradient(45deg, rgba(103, 119, 143, .045) 25%, transparent 25%, transparent 75%, rgba(103, 119, 143, .045) 75%),
    var(--surface-soft);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
}

.attachment-image-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.attachment-image-viewport.is-panning {
  cursor: grabbing;
}

.attachment-image-viewport:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.attachment-preview-image {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  max-width: none;
  max-height: none;
  padding: 0;
  visibility: hidden;
  transform-origin: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.attachment-preview-image.is-ready {
  visibility: visible;
}

.attachment-image-controls {
  position: absolute;
  z-index: 1;
  bottom: 12px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 3px 16px rgba(0, 0, 0, .16);
  transform: translateX(-50%);
  cursor: default;
}

.attachment-image-controls .icon-button {
  width: 40px;
  height: 40px;
  color: var(--ink);
}

.attachment-image-controls .attachment-image-scale {
  width: auto;
  min-width: 64px;
  padding: 0 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.attachment-image-hint {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (hover: none) and (pointer: coarse) {
  .attachment-image-hint { display: none; }
}

.attachment-preview-pdf {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.attachment-html-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.attachment-html-notice {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.4;
}

.attachment-preview-html {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #fff;
}

.attachment-preview-text {
  width: min(100%, 960px);
  min-height: 100%;
  margin: 0;
  padding: 24px 28px;
  overflow: visible;
  background: var(--surface-raised);
  color: var(--ink);
  font: calc(13px + var(--font-size-adjust)) / 1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachment-preview-actions .ui-icon,
.attachment-preview-navigation .ui-icon {
  width: 16px;
  height: 16px;
}

.attachment-preview-document,
.attachment-preview-spreadsheet,
.attachment-preview-presentation,
.attachment-preview-archive {
  width: min(100%, 920px);
  min-height: 100%;
  margin: auto;
  padding: 24px;
  color: var(--ink);
}

.attachment-preview-office-header,
.attachment-preview-archive-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 18px;
}

.attachment-preview-office-header > div,
.attachment-preview-archive-header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.attachment-preview-office-header strong,
.attachment-preview-archive-header strong {
  font-size: calc(15px + var(--font-size-adjust));
}

.attachment-preview-office-header span,
.attachment-preview-archive-header span {
  overflow: hidden;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-document-page {
  width: min(100%, 760px);
  min-height: 720px;
  margin: 0 auto;
  padding: 62px 72px;
  border: 1px solid #d8dee8;
  background: #fff;
  box-shadow: 0 16px 42px rgba(28, 43, 63, .14);
  color: #1f2937;
  font: calc(13px + var(--font-size-adjust)) / 1.65 Georgia, 'Times New Roman', serif;
}

.attachment-preview-document-page p {
  margin: 0 0 .9em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachment-preview-note {
  margin: 14px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.5;
  text-align: center;
}

.attachment-preview-spreadsheet {
  width: min(100%, 1040px);
}

.attachment-preview-spreadsheet-sheets {
  display: grid;
  gap: 18px;
}

.attachment-preview-spreadsheet-sheet {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: 0 10px 28px rgba(34, 51, 72, .08);
}

.attachment-preview-spreadsheet-sheet > header {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 90%, #21844a 10%);
}

.attachment-preview-spreadsheet-sheet h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: calc(12px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-spreadsheet-sheet > header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.attachment-preview-spreadsheet-scroll {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
}

.attachment-preview-spreadsheet-grid {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  color: var(--ink);
  font-size: calc(10px + var(--font-size-adjust));
}

.attachment-preview-spreadsheet-grid th,
.attachment-preview-spreadsheet-grid td {
  min-width: 88px;
  max-width: 360px;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
  line-height: 1.45;
  text-align: start;
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachment-preview-spreadsheet-grid th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 46px;
  width: 46px;
  max-width: 46px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.attachment-preview-spreadsheet-grid tr:last-child > * {
  border-bottom: 0;
}

.attachment-preview-spreadsheet-grid tr > *:last-child {
  border-right: 0;
}

.attachment-preview-office-empty {
  margin: 0;
  padding: 36px 22px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.55;
  text-align: center;
}

.attachment-preview-presentation {
  width: min(100%, 1040px);
}

.attachment-preview-presentation-slides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  align-items: start;
  gap: 18px;
}

.attachment-preview-presentation-slide {
  min-width: 0;
}

.attachment-preview-presentation-slide > h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.attachment-preview-presentation-canvas {
  min-height: 220px;
  aspect-ratio: 16 / 9;
  padding: 32px 36px;
  overflow: auto;
  border: 1px solid #d8dee8;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28, 43, 63, .14);
  color: #1f2937;
}

.attachment-preview-presentation-canvas h4 {
  margin: 0 0 20px;
  font-size: calc(19px + var(--font-size-adjust));
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.attachment-preview-presentation-canvas p {
  margin: 0 0 .65em;
  font-size: calc(12px + var(--font-size-adjust));
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachment-preview-presentation-canvas .attachment-preview-office-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 0;
}

.attachment-preview-archive {
  max-width: 860px;
}

.attachment-preview-archive > h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  letter-spacing: .08em;
  text-transform: uppercase;
}

.attachment-preview-archive-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  box-shadow: 0 10px 28px rgba(34, 51, 72, .08);
}

.attachment-preview-archive-row {
  display: grid;
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 9px 4px 4px;
  border-bottom: 1px solid var(--line);
}

.attachment-preview-archive-row:last-child {
  border-bottom: 0;
}

.attachment-preview-archive-row .file-icon {
  width: 26px;
  height: 32px;
  flex-basis: 26px;
  padding-bottom: 4px;
}

.attachment-preview-archive-row .file-icon-badge {
  font-size: 6px;
}

.attachment-preview-archive-file {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 3px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
}

button.attachment-preview-archive-file {
  cursor: pointer;
}

button.attachment-preview-archive-file:hover {
  background: var(--surface-blue);
}

button.attachment-preview-archive-file:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.attachment-preview-folder-icon {
  position: relative;
  display: block;
  width: 31px;
  height: 23px;
  border: 1px solid #d49b2c;
  border-radius: 3px;
  background: linear-gradient(#ffd467, #efad34);
  box-shadow: 0 2px 4px rgba(87, 59, 14, .18);
}

.attachment-preview-folder-icon::before {
  position: absolute;
  top: -6px;
  left: 2px;
  width: 14px;
  height: 7px;
  border: 1px solid #d49b2c;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #f7c454;
  content: '';
}

.attachment-preview-archive-name {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.attachment-preview-archive-name strong {
  overflow: hidden;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-archive-name small {
  color: #a15d17;
  font-size: calc(9px + var(--font-size-adjust));
}

.attachment-preview-archive-size {
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  white-space: nowrap;
}

.attachment-preview-archive-empty {
  padding: 42px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

.attachment-preview-status {
  display: flex;
  max-width: 420px;
  align-items: center;
  flex-direction: column;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.attachment-preview-status strong {
  margin-top: 14px;
  color: var(--ink);
  font-size: calc(15px + var(--font-size-adjust));
}

.attachment-preview-status p {
  margin: 6px 0 0;
  line-height: 1.55;
}

.attachment-preview-pdf-open {
  min-height: 44px;
  margin-top: 18px;
  text-decoration: none;
}

.attachment-preview-file {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface-raised);
  color: var(--blue);
}

.attachment-preview-file .ui-icon {
  width: 28px;
  height: 28px;
}

.attachment-preview-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.attachment-downloads {
  position: fixed;
  inset: auto 16px max(16px, env(safe-area-inset-bottom)) auto;
  z-index: 1100;
  width: min(410px, calc(100vw - 32px));
  max-height: min(50vh, 400px);
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 8px 32px rgb(0 0 0 / .22);
}

.attachment-download-task {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.attachment-download-task + .attachment-download-task {
  border-top: 1px solid var(--line);
}

.attachment-download-task > .attachment-preview-spinner {
  width: 20px;
  height: 20px;
  border-top-color: var(--muted);
}

.attachment-download-task > .attachment-preview-spinner[hidden] { display: none; }
.attachment-download-task > .attachment-preview-spinner[hidden] + div { grid-column: 2; }

.attachment-download-task strong,
.attachment-download-task [role="status"] {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
}

.attachment-download-task [role="status"] {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-download-task progress { width: 100%; height: 6px; accent-color: var(--blue); }
.attachment-download-task .icon-button { width: 44px; height: 44px; }
.attachment-card a.is-downloading { cursor: progress; opacity: .7; }

.attachment-preview-pdf-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: var(--surface-raised);
  pointer-events: none;
}

.attachment-preview-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
}

.attachment-preview-navigation button:disabled {
  opacity: .42;
  cursor: default;
}

.account-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 21px 4px;
  padding: 12px;
  border-radius: 9px;
  background: var(--surface-blue);
  color: #49617e;
}

.account-connect-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.account-connect-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.account-intro p {
  margin: 0;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.5;
}

.account-fields {
  padding: 2px 21px 5px;
}

.account-fields > input,
.plain-password-wrap {
  width: 100%;
  height: 41px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.account-fields > input {
  padding: 0 11px;
}

.plain-password-wrap {
  display: flex;
  align-items: center;
  padding: 0 5px 0 11px;
}

.plain-password-wrap input {
  min-width: 0;
  height: 100%;
  flex: 1;
  border: 0;
  background: transparent;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: #68758a;
  font-size: calc(10px + var(--font-size-adjust));
}

.remember-row input {
  accent-color: var(--blue);
}

.discovery-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 8px 21px;
  padding: 11px;
  border: 1px solid #cde0f8;
  border-radius: 8px;
  background: #f3f8ff;
}

.discovery-status.success {
  border-color: #bfe3d4;
  background: #f0faf6;
}

.status-spinner {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border: 3px solid #d7e6f8;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.discovery-status.success .status-spinner {
  display: grid;
  place-items: center;
  border: 0;
  background: #d6f0e5;
  color: var(--success);
  animation: none;
}

.discovery-status.success .status-spinner::before {
  content: none;
}

.discovery-status.success .status-spinner .ui-icon {
  width: 15px;
  height: 15px;
}

.discovery-status strong {
  font-size: calc(11px + var(--font-size-adjust));
}

.discovery-status p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.advanced-settings {
  margin: 8px 21px 14px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.advanced-settings summary {
  color: var(--blue);
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 700;
  cursor: pointer;
}

.advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(75px, .6fr) minmax(100px, .9fr);
  gap: 10px;
  margin-top: 12px;
}

.advanced-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.advanced-grid .advanced-username {
  grid-column: 1 / -1;
}

.provider-password-hint {
  margin: -2px 0 4px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.45;
}

.advanced-grid input,
.advanced-grid select {
  width: 100%;
  height: 35px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  font-size: calc(11px + var(--font-size-adjust));
}

.submit-button.compact {
  height: 38px;
  gap: 16px;
}

.toast-region {
  position: fixed;
  z-index: 250;
  right: 18px;
  bottom: 18px;
  display: flex;
  width: min(360px, calc(100vw - 36px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.link-destination-preview {
  position: fixed;
  z-index: 280;
  top: auto;
  right: auto;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 7px;
  background: rgba(20, 29, 44, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .24);
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  direction: ltr;
  unicode-bidi: plaintext;
  animation: link-destination-preview-in .12s ease-out;
}

@media (max-width: 760px) {
  .link-destination-preview {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 920px) {
  .recipient-details-modal {
    width: min(calc(100vw - 18px), 560px);
    max-height: calc(100dvh - 18px);
  }

  .message-move-modal {
    width: min(calc(100vw - 18px), 560px);
    max-height: calc(100dvh - 18px);
  }

  .message-headers-modal {
    width: calc(100vw - 18px);
    height: calc(100dvh - 18px);
  }

  .recipient-details-modal-shell {
    max-height: calc(100dvh - 18px);
  }

  .message-move-shell {
    max-height: calc(100dvh - 18px);
  }

  .message-headers-shell {
    max-height: calc(100dvh - 18px);
  }

  .recipient-details-modal .modal-header {
    align-items: center;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .message-move-modal .modal-header {
    align-items: center;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .message-headers-header {
    align-items: flex-start;
    gap: 9px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .message-headers-actions {
    gap: 5px;
  }

  .message-headers-actions .secondary-button {
    min-height: 44px;
    padding-inline: 11px;
  }

  .recipient-details-modal .modal-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .message-move-modal .modal-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .message-headers-modal .modal-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .recipient-details-modal-body {
    min-height: min(44dvh, 300px);
    max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 18px 16px max(22px, env(safe-area-inset-bottom));
    font-size: calc(14px + var(--font-size-adjust));
  }

  .message-move-body {
    max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 16px 14px max(16px, env(safe-area-inset-bottom));
  }

  .message-headers-body {
    padding: 13px 12px max(14px, env(safe-area-inset-bottom));
  }

  .message-headers-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .message-headers-tabs button {
    min-height: 42px;
  }

  #message-headers-content {
    min-height: 0;
    padding: 13px;
    font-size: calc(12px + var(--font-size-adjust));
  }

  .message-move-folders {
    max-height: none;
    flex: 1;
  }

  .message-move-folder {
    min-height: 52px;
    padding: 10px 12px;
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid #dbe2ec;
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: #4a566a;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.45;
  pointer-events: auto;
  animation: toast-in .2s ease-out;
}

.toast-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #daf1e8;
  color: var(--success);
}

.toast-icon .ui-icon {
  width: 13px;
  height: 13px;
}

.toast.error .toast-icon {
  background: #fde1e1;
  color: var(--danger);
}

.toast.warning .toast-icon {
  background: #fff0c2;
  color: #8a5a00;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7edf7;
  --muted: #9ca9bc;
  --subtle: #7f8ca0;
  --line: #29364a;
  --line-strong: #3a4960;
  --surface: #111827;
  --surface-raised: #182235;
  --surface-soft: #0d1421;
  --surface-blue: #172b49;
  --sidebar: #121c2c;
  --blue: #5b9df3;
  --blue-strong: #78b1fb;
  --blue-soft: #1d3c66;
  --orange: #f6b84a;
  --danger: #ff8585;
  --success: #53cf9f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .24), 0 5px 16px rgba(0, 0, 0, .18);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .5), 0 5px 18px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .pull-refresh-indicator {
  border-color: #41516a;
  background: rgba(24, 34, 53, .96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .42);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .mobile-nav {
  background: rgba(17, 24, 39, .96);
}

html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] .auth-mobile-brand,
html[data-theme="dark"] .message-subject-row h2,
html[data-theme="dark"] .preview-empty h2,
html[data-theme="dark"] .message-item.unread .message-sender,
html[data-theme="dark"] .message-item.unread .message-subject {
  color: var(--ink);
}

html[data-theme="dark"] .global-search,
html[data-theme="dark"] .user-button:hover,
html[data-theme="dark"] .user-button[aria-expanded="true"],
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .mini-button:hover,
html[data-theme="dark"] .password-toggle:hover,
html[data-theme="dark"] .select-button:hover,
html[data-theme="dark"] .select-button.active,
html[data-theme="dark"] .message-view-button:hover,
html[data-theme="dark"] .sort-button:hover,
html[data-theme="dark"] .filter-chip:hover,
html[data-theme="dark"] .editor-toolbar button:hover {
  background: #202c40;
}

html[data-theme="dark"] .global-search:focus-within,
html[data-theme="dark"] .user-menu,
html[data-theme="dark"] .language-button,
html[data-theme="dark"] kbd,
html[data-theme="dark"] .preview-pane,
html[data-theme="dark"] .recipient-details,
html[data-theme="dark"] .recipient-details-modal-body,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .input-wrap,
html[data-theme="dark"] .plain-password-wrap,
html[data-theme="dark"] .account-fields > input,
html[data-theme="dark"] .advanced-grid input,
html[data-theme="dark"] .advanced-grid select,
html[data-theme="dark"] .attachment-button,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .preview-actions > button:not(.icon-button),
html[data-theme="dark"] .account-connect-icon {
  background: var(--surface-raised);
}

html[data-theme="dark"] .message-font-size-button {
  border-color: var(--line);
  background: var(--surface-raised);
}

html[data-theme="dark"] .toast {
  border-color: #61728a;
  background: #182235;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04);
  color: #f4f7fb;
  font-weight: 650;
}

html[data-theme="dark"] .toast.success {
  border-color: #3f8a70;
}

html[data-theme="dark"] .toast.error {
  border-color: #b95a68;
}

html[data-theme="dark"] .toast.warning {
  border-color: #a67a21;
}

html[data-theme="dark"] .toast.success .toast-icon {
  background: #1c4c3d;
  color: #9af2ca;
}

html[data-theme="dark"] .toast.error .toast-icon {
  background: #55242c;
  color: #ffc0c4;
}

html[data-theme="dark"] .toast.warning .toast-icon {
  background: #594316;
  color: #ffe08a;
}

html[data-theme="dark"] .messages-pane,
html[data-theme="dark"] .list-footer,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .attachment-card {
  background: #121b2a;
}

html[data-theme="dark"] .secondary-button.compose-send-undo-button {
  color: #ff9b9b;
}

html[data-theme="dark"] .mail-notification-switch {
  border-color: #52637a;
  background: #29374a;
}

html[data-theme="dark"] .mail-notification-switch i {
  background: #dce7f5;
}

html[data-theme="dark"] #mail-notifications-button.is-active .mail-notification-switch {
  border-color: #35ae88;
  background: #188060;
}

html[data-theme="dark"] .contacts-intro {
  border-color: #28415f;
  background: #162a46;
}

html[data-theme="dark"] .google-contacts-configuration.has-error {
  border-color: #675225;
  background: #2c2517;
}

html[data-theme="dark"] .google-contacts-configuration.is-configured {
  border-color: #28553c;
  background: #17281f;
}

html[data-theme="dark"] .google-connection-test-result.success {
  border-color: #28553c;
  background: #17281f;
  color: #85ddb0;
}

html[data-theme="dark"] .google-oauth-guidance {
  border-color: #315c8f;
  background: #162a46;
}

html[data-theme="dark"] .google-oauth-guidance-heading strong {
  color: #8fc1ff;
}

html[data-theme="dark"] .google-contacts-browser-error {
  border-color: #673737;
  background: #2d1a1d;
}

html[data-theme="dark"] .google-people-api-hint {
  border-color: #675225;
  background: #2c2517;
  color: #f0c66f;
}

html[data-theme="dark"] .google-contact-directory-button:hover,
html[data-theme="dark"] .google-contact-directory-button:focus-visible {
  border-color: #315c8f;
  background: #172b49;
}

html[data-theme="dark"] .google-address-book.requires-reauthorization {
  border-color: #7a602c;
  background: #2d281a;
}

html[data-theme="dark"] .google-reauthorization-note {
  color: #f0c66f;
}

html[data-theme="dark"] .contact-suggestion:hover,
html[data-theme="dark"] .contact-suggestion.active,
html[data-theme="dark"] .contact-suggestion[aria-selected="true"] {
  background: #203a5f;
}

html[data-theme="dark"] .recipient-token-editor:focus-within {
  border-color: #6aa8ee;
  background: rgba(32, 58, 95, .42);
}

html[data-theme="dark"] .recipient-token {
  border-color: #5488c6;
  background: #172b49;
  color: #edf4ff;
}

html[data-theme="dark"] .recipient-token-remove {
  color: #aab7c9;
}

html[data-theme="dark"] .recipient-token-remove:hover {
  background: #45232c;
  color: #ffb1b1;
}

html[data-theme="dark"] .recipient-token-remove:focus-visible {
  outline-color: #8fc1ff;
  background: #203a5f;
  color: #edf4ff;
}

html[data-theme="dark"] .recipient-token-editor.is-invalid,
html[data-theme="dark"] .recipient-input-wrap.has-invalid-recipient .recipient-token-editor {
  border-color: #733e47;
  background: #351d25;
}

html[data-theme="dark"] .recipient-token-editor:has(> input[aria-invalid="true"]) {
  border-color: #733e47;
  background: #351d25;
}

html[data-theme="dark"] .message-view-switch {
  border-color: var(--line);
  background: #0f1724;
}

html[data-theme="dark"] .message-view-button.active {
  background: #26364e;
  color: #8fc1ff;
}

html[data-theme="dark"] .message-table-head {
  border-bottom-color: var(--line);
  background: #111a29;
  color: #8492a8;
}

html[data-theme="dark"] .preview-resizer {
  background: #0f1724;
}

html[data-theme="dark"] .account-button:hover,
html[data-theme="dark"] .folder-button:hover,
html[data-theme="dark"] .folder-alias-summary:hover {
  background: rgba(91, 157, 243, .1);
}

html[data-theme="dark"] .account-button.active {
  background: #174b80;
  color: #f5f9ff;
  box-shadow: inset 3px 0 0 #79baff, inset 0 0 0 1px #4b8bca;
}

html[data-theme="dark"] .account-button.active .account-copy small,
html[data-theme="dark"] .account-button.active .account-refresh-spinner {
  color: #d5e8ff;
}

html[data-theme="dark"] .folder-button,
html[data-theme="dark"] .folder-alias-summary,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .message-subject,
html[data-theme="dark"] .message-body,
html[data-theme="dark"] .compose-editor,
html[data-theme="dark"] .field-label {
  color: #c8d2e1;
}

html[data-theme="dark"] .message-body.has-html,
html[data-theme="dark"] .message-html-frame {
  background: #fff;
  color: #182235;
  color-scheme: light;
}

html[data-theme="dark"] .message-body.is-plain-text {
  background: var(--surface-raised);
  color: var(--ink);
  color-scheme: dark;
}

html[data-theme="dark"] .message-body.has-html.follows-app-theme,
html[data-theme="dark"] .message-html-frame.follows-app-theme {
  background: var(--surface-raised);
  color: var(--ink);
  color-scheme: dark;
}

html[data-theme="dark"] .compose-link-card,
html[data-theme="dark"] .compose-link-fields input {
  border-color: #31445d;
  background: #152235;
  color: #edf4ff;
}

html[data-theme="dark"] .compose-link-popover {
  background: rgba(2, 8, 17, .66);
}

html[data-theme="dark"] .compose-link-header {
  border-bottom-color: #31445d;
}

html[data-theme="dark"] .compose-close-dialog {
  background: rgba(2, 8, 17, .72);
}

html[data-theme="dark"] .compose-close-card {
  border-color: #31445d;
  background: #152235;
}

html[data-theme="dark"] .compose-close-icon {
  background: #3a2c18;
  color: #ffc56f;
}

html[data-theme="dark"] .compose-close-actions {
  border-top-color: #31445d;
  background: #111d2d;
}

html[data-theme="dark"] .compose-close-actions .secondary-button {
  border-color: #3b4e67;
  background: #19283b;
  color: #c7d3e4;
}

html[data-theme="dark"] .compose-close-actions .secondary-button:hover,
html[data-theme="dark"] .compose-close-actions .secondary-button:focus-visible {
  border-color: #5b7596;
  background: #20344d;
}

html[data-theme="dark"] .compose-close-actions .compose-close-discard {
  border-color: #6a3a45;
  color: #ffb1b1;
}

html[data-theme="dark"] .compose-close-actions .compose-close-discard:hover,
html[data-theme="dark"] .compose-close-actions .compose-close-discard:focus-visible {
  border-color: #9b5361;
  background: #45232c;
}

html[data-theme="dark"] .compose-editor .reply-attribution,
html[data-theme="dark"] .compose-editor blockquote[type="cite"] {
  color: #c8d2e1;
}

html[data-theme="dark"] .compose-editor blockquote[type="cite"] {
  border-inline-start-color: #6aa8ee;
}

html[data-theme="dark"] .compose-attachment-panel {
  border-color: #31445d;
  background: #111d2d;
}

html[data-theme="dark"] .compose-attachment-card.attachment-card {
  background: transparent;
}

html[data-theme="dark"] .compose-attachment-card.attachment-card:hover {
  background: #182b43;
}

html[data-theme="dark"] .compose-attachment-name {
  color: #d9e5f5;
}

html[data-theme="dark"] .compose-attachment-size {
  color: #aab7c9;
}

html[data-theme="dark"] .compose-attachment-remove {
  border-color: #40536c;
  background: #162438;
  color: #8fa0b8;
}

html[data-theme="dark"] .compose-attachment-remove:hover,
html[data-theme="dark"] .compose-attachment-remove:focus-visible {
  background: #45232c;
  color: #ffb1b1;
}

html[data-theme="dark"] .compose-drop-overlay {
  border-color: #6aa8ee;
  background: rgba(19, 40, 67, .97);
  color: #b9d9ff;
}

html[data-theme="dark"] .compose-drop-overlay span {
  color: #91afd2;
}

html[data-theme="dark"] .reply-html-preview {
  border-color: #31445d;
  box-shadow: 0 0 0 1px rgba(106, 168, 238, .08);
}

html[data-theme="dark"] .folder-button.active,
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .selection-toolbar {
  background: #1a3558;
  color: #a9cef9;
}

html[data-theme="dark"] .message-move-body {
  background: var(--surface-raised);
}

html[data-theme="dark"] .message-link-modal-body {
  background: var(--surface-raised);
}

html[data-theme="dark"] .message-link-option {
  border-color: #34445a;
  background: #111b2b;
  color: #e4edf8;
}

html[data-theme="dark"] .message-link-option:hover:not(:disabled),
html[data-theme="dark"] .message-link-option:focus-visible {
  border-color: #5f9ee8;
  background: #172b49;
}

html[data-theme="dark"] .message-link-option-public {
  border-color: #665431;
  background: #282317;
}

html[data-theme="dark"] .message-link-option-public:hover:not(:disabled),
html[data-theme="dark"] .message-link-option-public:focus-visible {
  border-color: #a77c2e;
  background: #332a18;
}

html[data-theme="dark"] .message-link-option-icon {
  background: #203a5f;
  color: #a9cef9;
}

html[data-theme="dark"] .message-link-option-public .message-link-option-icon,
html[data-theme="dark"] .message-link-duration {
  background: #493816;
  color: #f3c66c;
}

html[data-theme="dark"] .message-link-status.error {
  color: #ffb1b1;
}

html[data-theme="dark"] .message-headers-body {
  background: var(--surface-raised);
}

html[data-theme="dark"] .message-headers-tabs {
  border-color: #34445a;
  background: #111b2b;
}

html[data-theme="dark"] .message-headers-tabs button[aria-selected="true"] {
  background: #234d7d;
  box-shadow: none;
  color: #eef6ff;
}

html[data-theme="dark"] #message-headers-content {
  border-color: #34445a;
  background: #0d1726;
  color: #e4edf8;
}

html[data-theme="dark"] .message-headers-status.error {
  color: #ffb1b1;
}

html[data-theme="dark"] .message-move-folder {
  background: #111b2b;
  box-shadow: inset 0 0 0 1px #34445a;
  color: #dce6f4;
}

html[data-theme="dark"] .message-move-folder:hover:not(:disabled),
html[data-theme="dark"] .message-move-folder:focus-visible,
html[data-theme="dark"] .message-move-folder.active,
html[data-theme="dark"] .message-move-folder[aria-current="true"] {
  background: #234d7d;
  box-shadow: inset 0 0 0 2px #6aa8ee;
  color: #eef6ff;
}

html[data-theme="dark"] .message-move-folder-count {
  background: rgba(143, 193, 255, .14);
  color: #bfdcff;
}

html[data-theme="dark"] .message-move-status,
html[data-theme="dark"] .message-move-loading,
html[data-theme="dark"] .message-move-empty {
  color: #aab8cb;
}

html[data-theme="dark"] .folder-tree.message-drag-active .folder-button.message-drop-available {
  box-shadow: inset 0 0 0 1px rgba(106, 168, 238, .52);
}

html[data-theme="dark"] .folder-tree.message-drag-active .folder-button.message-drop-available:hover,
html[data-theme="dark"] .folder-button.message-drop-target,
html[data-theme="dark"] .folder-button.message-drop-target:hover {
  background: #234d7d;
  color: #eef6ff;
  box-shadow: inset 0 0 0 2px #6aa8ee;
}

html[data-theme="dark"] .filter-icon-toggle {
  border-color: #4b5c73;
  background: #172235;
}

html[data-theme="dark"] .list-read-all-button {
  border-color: #4b5c73;
  background: #172235;
  color: #a9cef9;
}

html[data-theme="dark"] .list-read-all-button:hover:not(:disabled),
html[data-theme="dark"] .list-read-all-button:focus-visible {
  border-color: #6aa8ee;
  background: #234d7d;
  color: #d7e8ff;
}

html[data-theme="dark"] .filter-chip-star {
  color: var(--orange);
}

html[data-theme="dark"] .filter-toggle[aria-pressed="true"] {
  border-color: #6aa8ee;
  background: #234d7d;
  box-shadow: inset 0 0 0 1px rgba(143, 193, 255, .24);
}

html[data-theme="dark"] .message-item,
html[data-theme="dark"] .message-skeleton {
  border-bottom-color: var(--line);
  background: #151f30;
}

html[data-theme="dark"] .message-item:hover {
  background: #1b2a3e;
}

html[data-theme="dark"] .message-item.unread {
  background: #264766;
}

html[data-theme="dark"] .message-item.unread:hover {
  background: #2e5478;
}

html[data-theme="dark"] .message-item.selected,
html[data-theme="dark"] .message-item.selected:hover {
  background: #264d7b;
}

html[data-theme="dark"] .message-item.selected.unread,
html[data-theme="dark"] .message-item.selected.unread:hover {
  background: #326797;
}

html[data-theme="dark"] .message-item.unread .message-time {
  color: #d7e8ff;
}

html[data-theme="dark"] .message-item.unread .message-snippet {
  color: #d7e8ff;
}

html[data-theme="dark"] .message-read-toggle {
  color: #9aaac0;
}

html[data-theme="dark"] .message-read-dot {
  border-color: #9aaac0;
}

html[data-theme="dark"] .message-read-toggle:hover,
html[data-theme="dark"] .message-read-toggle:focus-visible {
  background: rgba(155, 202, 255, .14);
  color: #cce5ff;
}

html[data-theme="dark"] .message-read-toggle.is-unread {
  color: #9bcaff;
}

html[data-theme="dark"] .message-read-toggle.is-unread .message-read-dot {
  border-color: #d6eaff;
  background: #9bcaff;
  box-shadow: 0 0 0 1px rgba(5, 18, 35, .72);
}

html[data-theme="dark"] .message-thread-toggle {
  border-color: #7eaddf;
  background: #172b43;
  box-shadow: inset 0 0 0 1px rgba(185, 217, 255, .08);
  color: #b9d9ff;
}

html[data-theme="dark"] .message-thread-toggle:hover {
  background: #254565;
}

html[data-theme="dark"] .message-thread-toggle[aria-expanded="true"] {
  border-color: #b9d9ff;
  background: #2d7dcc;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .32);
  color: #fff;
}

html[data-theme="dark"] .message-thread-toggle[aria-expanded="true"]:hover {
  background: #3b8ddd;
}

html[data-theme="dark"] .message-replied-indicator {
  border-color: #d6eaff;
  background: #9bcaff;
  box-shadow: 0 0 0 1px rgba(5, 18, 35, .82);
  color: #06213e;
}

html[data-theme="dark"] .message-thread-entry.expanded > .message-item {
  border-bottom-color: #45617e;
}

html[data-theme="dark"] .message-thread-children {
  border-bottom-color: #2d4059;
  background: #101a29;
  box-shadow: inset 3px 0 0 #4d719b;
}

html[data-theme="dark"] .message-thread-node {
  border-color: #314761;
  background: #172438;
  color: #d8e7f8;
}

html[data-theme="dark"] .message-thread-node::before {
  border-color: #536d8d;
}

html[data-theme="dark"] .message-thread-node:hover {
  border-color: #5e85b1;
  background: #1e314a;
}

html[data-theme="dark"] .message-thread-node:focus-visible {
  outline-color: #9bcaff;
  box-shadow: 0 0 0 3px rgba(155, 202, 255, .16);
}

html[data-theme="dark"] .message-thread-node.unread {
  border-color: #6492c3;
  background: #264766;
  color: #f2f7ff;
}

html[data-theme="dark"] .message-thread-direction {
  background: #273b56;
  color: #a9cef9;
}

html[data-theme="dark"] .message-thread-direction.sent {
  background: #244a3e;
  color: #a5e2c7;
}

html[data-theme="dark"] .message-thread-node-subject,
html[data-theme="dark"] .message-thread-node-time,
html[data-theme="dark"] .message-thread-state,
html[data-theme="dark"] .message-thread-partial {
  color: #aebed1;
}

html[data-theme="dark"] .message-thread-node.unread .message-thread-node-sender,
html[data-theme="dark"] .message-thread-node.unread .message-thread-node-subject {
  color: #fff;
}

html[data-theme="dark"] .message-thread-state.error {
  color: #ffb3ac;
}

html[data-theme="dark"] .message-thread-retry {
  border-color: #55769c;
  background: #172438;
  color: #b9d9ff;
}

html[data-theme="dark"] .message-thread-retry:hover,
html[data-theme="dark"] .message-thread-retry:focus-visible {
  border-color: #9bcaff;
  background: #233a56;
}

html[data-theme="dark"] .message-skeleton > i,
html[data-theme="dark"] .message-skeleton b,
html[data-theme="dark"] .message-skeleton em,
html[data-theme="dark"] .message-skeleton small {
  background: linear-gradient(90deg, #243147 25%, #314059 37%, #243147 63%);
  background-size: 400% 100%;
}

html[data-theme="dark"] .empty-illustration {
  border-color: #40506a;
  background: linear-gradient(145deg, #202d42, #182338);
}

html[data-theme="dark"] .empty-illustration::before,
html[data-theme="dark"] .empty-illustration::after,
html[data-theme="dark"] .empty-illustration span {
  background: #455a77;
}

html[data-theme="dark"] .empty-illustration span {
  box-shadow: 0 12px 0 #34465f;
}

html[data-theme="dark"] .message-heading {
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .remote-content-notice {
  border-bottom-color: #67552e;
  background: #312a19;
  color: #e0c979;
}

html[data-theme="dark"] .remote-content-notice button {
  background: #4a3e22;
  color: #f0dc99;
}

html[data-theme="dark"] .attachment-card:hover,
html[data-theme="dark"] .attachment-summary:hover,
html[data-theme="dark"] .attachment-download-all:hover,
html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .attachment-button:hover,
html[data-theme="dark"] .preview-actions > button:hover {
  border-color: #5579a8;
  background: #172b49;
}

html[data-theme="dark"] .attachment-preview-button,
html[data-theme="dark"] .attachment-card-download,
html[data-theme="dark"] .attachment-download-all {
  background: #1c3557;
  color: #a9cef9;
}

html[data-theme="dark"] .attachment-preview-stage {
  background-color: #0f1724;
}

html[data-theme="dark"] .attachment-preview-spreadsheet-sheet,
html[data-theme="dark"] .attachment-preview-spreadsheet-grid th,
html[data-theme="dark"] .attachment-preview-spreadsheet-grid td {
  border-color: #31445d;
}

html[data-theme="dark"] .attachment-preview-presentation-canvas {
  color-scheme: light;
}

html[data-theme="dark"] button.attachment-preview-archive-file:hover {
  background: #172b49;
}

html[data-theme="dark"] .auth-screen {
  background: #0d1421;
}

html[data-theme="dark"] .public-message-screen {
  background:
    radial-gradient(circle at 8% 3%, rgba(57, 132, 231, .15), transparent 28rem),
    radial-gradient(circle at 94% 92%, rgba(42, 102, 180, .12), transparent 30rem),
    #0d1421;
}

html[data-theme="dark"] .public-message-topbar {
  border-color: #26364b;
  background: rgba(17, 27, 43, .94);
  box-shadow: 0 1px 9px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .public-message-state,
html[data-theme="dark"] .public-message-card {
  border-color: #31445d;
  background: #121b2a;
}

html[data-theme="dark"] .public-message-state-icon {
  background: #351d25;
  color: #ffb1b1;
}

html[data-theme="dark"] .public-message-header,
html[data-theme="dark"] .public-message-attachments {
  border-color: #31445d;
}

html[data-theme="dark"] .public-message-avatar {
  background: #203a5f;
  color: #a9cef9;
}

html[data-theme="dark"] .public-message-recipients,
html[data-theme="dark"] .public-message-attachments {
  border-color: #31445d;
  background: #0f1724;
}

html[data-theme="dark"] .public-message-attachment {
  border-color: #31445d;
  background: #172234;
}

html[data-theme="dark"] .public-message-body {
  color: #e4edf8;
}

html[data-theme="dark"] .public-message-body.has-html {
  background: #182235;
  color-scheme: dark;
}

html[data-theme="dark"] .account-intro,
html[data-theme="dark"] .discovery-status {
  border-color: #31527c;
  background: #172b49;
  color: #b6cbea;
}

html[data-theme="dark"] .discovery-status.success {
  border-color: #275c4b;
  background: #153329;
}

html[data-theme="dark"] .form-error,
html[data-theme="dark"] .compose-error {
  border-color: #733e47;
  background: #351d25;
  color: #ffb1b1;
}

html[data-theme="dark"] .connection-diagnostic-host {
  border-color: #733e47;
  background: #351d25;
  color: #ffb1b1;
}

html[data-theme="dark"] .connection-diagnostic-actions a {
  color: #8fc5ff;
}

html[data-theme="dark"] .connection-diagnostic-actions a:hover {
  color: #c2ddff;
}

html[data-theme="dark"] .compose-link {
  background: transparent;
}

html[data-theme="dark"] .compose-link:hover,
html[data-theme="dark"] .compose-link:focus-visible {
  background: var(--surface-blue);
}

html[data-theme="dark"] .search-mailbox-group-toggle,
html[data-theme="dark"] .search-mailbox-more {
  border-color: var(--line);
  background: #162235;
}

html[data-theme="dark"] .search-mailbox-group-toggle:hover,
html[data-theme="dark"] .search-mailbox-group-toggle:focus-visible {
  background: #203754;
}

html[data-theme="dark"] .search-mailbox-count {
  background: #203d64;
  color: #9bc7ff;
}

html[data-theme="dark"] .search-mailbox-group.has-error .search-mailbox-count {
  background: #3c2529;
  color: #ff9c9c;
}

html[data-theme="dark"] #compose-from,
html[data-theme="dark"] #compose-from option {
  background-color: var(--surface-raised);
  color: var(--ink);
}

html[data-theme="dark"] #compose-from {
  color-scheme: dark;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] .compose-editor:empty::before {
  color: #708097;
}

@media (hover: none) {
  .account-menu-button {
    opacity: 1;
  }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes link-destination-preview-in { from { opacity: 0; transform: translateY(4px); } }

@media (min-width: 921px) {
  .compose-modal.compose-size-custom {
    width: var(--compose-window-width);
    height: var(--compose-window-height);
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .compose-modal.compose-size-custom .modal-shell {
    height: 100%;
    max-height: none;
  }

  .compose-modal.compose-position-pinned {
    inset: auto;
    top: var(--compose-window-top);
    left: var(--compose-window-left);
    margin: 0;
  }

  .compose-modal .compose-footer {
    padding-right: 48px;
  }

  .app.layout-horizontal .mail-layout {
    grid-template-columns: minmax(220px, 252px) minmax(0, 1fr);
    grid-template-rows: var(--message-list-pane-height, minmax(220px, 42%)) 12px minmax(0, 1fr);
  }

  .app.layout-horizontal .mail-layout.message-list-height-custom {
    grid-template-rows: var(--message-list-pane-height) 12px minmax(0, 1fr);
  }

  .app.layout-horizontal .folders-pane {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .app.layout-horizontal .messages-pane {
    grid-column: 2;
    grid-row: 1;
    border-right: 0;
    border-bottom: 0;
  }

  .app.layout-horizontal .preview-resizer:not([hidden]) {
    display: block;
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 12px;
    cursor: row-resize;
  }

  .app.layout-horizontal .preview-resizer::before {
    top: 5px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 2px;
  }

  .app.layout-horizontal .preview-pane {
    grid-column: 2;
    grid-row: 3;
  }
}

@media (pointer: coarse) and (min-width: 921px) {
  .app.layout-horizontal .mail-layout {
    grid-template-rows: var(--message-list-pane-height, minmax(220px, 42%)) 24px minmax(0, 1fr);
  }

  .app.layout-horizontal .mail-layout.message-list-height-custom {
    grid-template-rows: var(--message-list-pane-height) 24px minmax(0, 1fr);
  }

  .app.layout-horizontal .preview-resizer:not([hidden]) {
    min-height: 24px;
  }

  .app.layout-horizontal .preview-resizer::before {
    top: 11px;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 230px minmax(240px, 1fr) auto;
    gap: 15px;
  }

  .mail-layout {
    grid-template-columns: 228px minmax(300px, 360px) 12px minmax(360px, var(--preview-pane-width, 1fr));
  }

  .mail-layout.preview-width-custom {
    grid-template-columns: 228px minmax(300px, 1fr) 12px minmax(360px, var(--preview-pane-width));
  }

  .user-name {
    display: none;
  }

  .search-all-accounts,
  .search-morphology {
    padding-right: 8px;
    padding-left: 8px;
  }
}

@media (max-width: 920px) {
  .compose-notification-options {
    min-height: 44px;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding-block: 4px;
    white-space: nowrap;
  }

  .compose-notification-options .compose-notification-short {
    display: inline;
  }

  .compose-notification-options .compose-notification-full,
  .compose-notification-toggle small {
    display: none;
  }

  .compose-notification-toggles {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .compose-notification-toggle {
    min-height: 36px;
    flex: 0 0 auto;
    grid-template-columns: 16px max-content;
    align-items: center;
    gap: 5px;
  }

  .compose-notification-options .compose-notification-toggle > input[type="checkbox"] {
    margin: 0;
  }

  .compose-notification-toggle strong {
    overflow-wrap: normal;
  }

  .compose-notification-conjunction {
    color: var(--muted);
    font-size: calc(10px + var(--font-size-adjust));
  }

  .compose-modal .modal-shell {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .compose-modal .modal-header,
  .compose-modal .compose-footer {
    position: static;
  }

  .compose-modal .recipient-token-editor {
    max-height: none;
  }

  .compose-modal .compose-editor {
    min-height: 190px;
    max-height: none;
    flex: 0 0 auto;
    overflow: visible;
    overflow-wrap: anywhere;
  }

  .compose-window-resizer {
    display: none;
  }

  .layout-button {
    display: none;
  }

  .mail-layout {
    grid-template-columns: 220px minmax(300px, 1fr);
  }

  .mail-layout.preview-width-custom {
    grid-template-columns: 220px minmax(300px, 1fr);
  }

  .preview-resizer {
    display: none;
  }

  .preview-pane {
    grid-column: 2;
    position: fixed;
    z-index: 25;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    left: 220px;
    transform: translateX(102%);
    border-left: 1px solid var(--line);
    box-shadow: -12px 0 28px rgba(32, 48, 73, .1);
    transition: transform .2s ease;
  }

  .app.preview-open .preview-pane {
    transform: translateX(0);
  }

  .mobile-back {
    display: inline-grid;
  }

  .modal.attachment-preview-modal {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .attachment-preview-header {
    align-items: flex-start;
    padding: 11px 12px;
  }

  .attachment-preview-heading {
    flex: 1 1 auto;
    overflow: hidden;
  }

  .attachment-preview-heading h2 {
    max-width: 100%;
    font-size: calc(14px + var(--font-size-adjust));
  }

  .attachment-preview-actions .attachment-download,
  .attachment-preview-actions .attachment-open-new,
  .attachment-preview-actions .modal-close {
    width: 48px;
    min-width: 48px;
    height: 48px;
    justify-content: center;
    padding: 0;
  }

  .attachment-preview-actions .attachment-download > span,
  .attachment-preview-actions .attachment-open-new > span {
    display: none;
  }

  .attachment-preview-actions .ui-icon {
    width: 21px;
    height: 21px;
  }

  .attachment-archive-back {
    width: 48px;
    min-width: 48px;
    height: 48px;
    justify-content: center;
    padding: 0;
  }

  .attachment-archive-back > span {
    display: none;
  }

  .attachment-archive-back .ui-icon {
    width: 21px;
    height: 21px;
  }

  .attachment-preview-navigation {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .attachment-preview-navigation .secondary-button {
    min-width: 44px;
    height: 44px;
  }

  .attachment-preview-navigation .secondary-button span:not([aria-hidden]) {
    display: none;
  }

  .attachment-preview-document,
  .attachment-preview-spreadsheet,
  .attachment-preview-presentation,
  .attachment-preview-archive {
    padding: 14px;
  }

  .attachment-preview-document-page {
    min-height: 100%;
    padding: 34px 24px;
  }

  .attachment-preview-spreadsheet-sheets,
  .attachment-preview-presentation-slides {
    gap: 14px;
  }

  .attachment-preview-spreadsheet-sheet > header {
    min-height: 48px;
    padding: 9px 11px;
  }

  .attachment-preview-spreadsheet-grid th,
  .attachment-preview-spreadsheet-grid td {
    min-width: 76px;
    max-width: 260px;
    padding: 8px;
  }

  .attachment-preview-spreadsheet-grid th {
    min-width: 42px;
    width: 42px;
    max-width: 42px;
  }

  .attachment-preview-presentation-slides {
    grid-template-columns: minmax(0, 1fr);
  }

  .attachment-preview-presentation-canvas {
    min-height: 180px;
    padding: 25px 24px;
  }

  .attachment-preview-presentation-canvas h4 {
    margin-bottom: 15px;
    font-size: calc(17px + var(--font-size-adjust));
  }

  .attachment-preview-archive-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 4px;
  }

  .attachment-preview-archive-file {
    min-height: 52px;
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .attachment-preview-archive-size {
    display: none;
  }

  #attachment-list {
    gap: 8px;
    max-height: 128px;
    margin: 7px 18px 8px;
  }

  .attachment-summary {
    min-height: 48px;
    padding: 6px 18px;
  }

  .attachments.has-download-all .attachment-summary {
    padding-right: 162px;
  }

  .attachment-download-all {
    top: 2px;
    right: 18px;
    min-height: 44px;
    padding: 0 11px;
    border-radius: 10px;
  }

  #attachment-list .attachment-card {
    min-height: 60px;
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 10px;
  }

  #attachment-list .attachment-card-file {
    min-height: 48px;
    gap: 9px;
    padding: 6px;
  }

  #attachment-list .attachment-card-actions {
    gap: 5px;
  }

  #attachment-list .attachment-preview-button,
  #attachment-list .attachment-card-download {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
  }

  #attachment-list .attachment-preview-button .ui-icon,
  #attachment-list .attachment-card-download .ui-icon {
    width: 20px;
    height: 20px;
  }

  .attachment-preview-pdf-open {
    min-height: 48px;
    padding: 0 16px;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 58px;
  }

  .app {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  }

  .pull-refresh-indicator {
    display: flex;
  }

  .message-list {
    overscroll-behavior-y: contain;
  }

  .message-list.search-all-view:not(.table-view) .message-mailbox-mobile {
    display: block;
    min-width: 0;
    margin-bottom: 4px;
    overflow: hidden;
    color: var(--blue);
    font-size: calc(9px + var(--font-size-adjust));
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    height: var(--topbar-height);
    padding: 0 10px;
  }

  .mobile-only {
    display: inline-grid;
  }

  .brand {
    min-width: 0;
    gap: 7px;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }

  .brand-mark::before {
    width: 17px;
    height: 12px;
  }

  .brand-mark::after {
    top: 9px;
    width: 11px;
    height: 11px;
  }

  .brand-copy strong {
    max-width: 150px;
    font-size: calc(12px + var(--font-size-adjust));
  }

  .brand-workspace,
  .global-search,
  .top-actions > .language-button,
  .top-actions > .status-badge {
    display: none;
  }

  .top-actions {
    gap: 5px;
  }

  .user-button {
    padding-right: 4px;
  }

  .mail-layout {
    display: block;
    height: calc(100dvh - var(--topbar-height) - var(--mobile-nav-height) - env(safe-area-inset-bottom));
  }

  .folders-pane {
    position: fixed;
    z-index: 80;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(84vw, 290px);
    padding-top: 18px;
    transform: translateX(-102%);
    box-shadow: 14px 0 35px rgba(20, 35, 60, .18);
    transition: transform .2s ease;
  }

  .app.sidebar-open .folders-pane {
    transform: translateX(0);
  }

  .app.sidebar-open .mobile-overlay {
    display: block;
    position: fixed;
    z-index: 75;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 26, 47, .4);
  }

  .messages-pane {
    width: 100%;
    height: 100%;
    border-right: 0;
  }

  .preview-pane {
    top: var(--topbar-height);
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    left: 0;
  }

  .message-heading {
    padding: 20px 18px 15px;
  }

  .message-body {
    padding: 21px 18px 34px;
  }

  .attachments {
    padding: 0;
  }

  .remote-content-notice {
    padding: 9px 18px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, 1fr);
    padding: 6px 10px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
  }

  .mobile-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    border-radius: 8px;
    background: transparent;
    color: #748095;
    font-size: calc(9px + var(--font-size-adjust));
    font-weight: 650;
  }

  .mobile-nav button > .ui-icon {
    width: 20px;
    height: 20px;
  }

  .mobile-nav button.active {
    color: var(--blue);
  }

  .compose-primary kbd {
    display: none;
  }

  .refresh-primary {
    height: 44px;
  }

  .auth-screen {
    display: block;
    background:
      radial-gradient(circle at 10% 0%, rgba(43, 128, 242, .14), transparent 30%),
      #fff;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100dvh;
    padding: max(30px, env(safe-area-inset-top)) 24px max(30px, env(safe-area-inset-bottom));
  }

  .auth-card {
    width: min(100%, 420px);
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 70px;
    color: #1c2a42;
    font-size: calc(13px + var(--font-size-adjust));
  }

  .language-row {
    position: absolute;
    top: max(32px, env(safe-area-inset-top));
    right: 24px;
    margin: 0;
  }

  .modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 15px;
  }

  .mobile-search-modal {
    width: min(calc(100vw - 20px), 460px);
  }

  .modal-shell {
    max-height: calc(100dvh - 18px);
  }

  .contacts-modal .modal-shell {
    min-height: calc(100dvh - 18px);
  }

  .contacts-body {
    padding: 14px;
  }

  .google-contacts-browser {
    padding: 12px;
  }

  .google-contacts-browser-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .google-contacts-directory {
    max-height: min(42dvh, 330px);
  }

  .google-people-api-hint {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .google-address-book {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .google-address-book-actions {
    width: 100%;
    padding-left: 45px;
  }

  .google-address-book-actions button {
    min-height: 38px;
    flex: 1;
  }

  .google-oauth-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .google-oauth-settings-actions .secondary-button {
    width: 100%;
    min-height: 42px;
  }

  .google-oauth-guidance-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .google-oauth-guidance-actions a,
  .google-oauth-guidance-actions button {
    width: 100%;
    min-height: 42px;
  }

  .copy-fields,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .recipient-token-editor {
    max-height: min(108px, 24dvh);
  }

  .recipient-token-editor > input[data-recipient-input] {
    min-width: 76px;
    flex-basis: 112px;
  }

  .contact-suggestions {
    max-height: min(230px, 36dvh);
  }

  .advanced-grid {
    gap: 8px;
  }

  .compose-link-popover {
    padding: 12px;
  }

  .compose-close-dialog {
    padding: 12px;
  }

  .compose-close-content {
    padding: 18px 16px 13px;
  }

  .compose-close-card .compose-close-error {
    margin-right: 16px;
    margin-left: 74px;
  }

  .compose-close-actions {
    flex-wrap: wrap;
    padding: 13px 16px 16px;
  }

  .compose-link-actions {
    flex-wrap: wrap;
  }

  .secondary-button.compose-link-remove {
    width: 100%;
    margin-right: 0;
    justify-content: center;
  }

  .compose-attachment-panel {
    max-height: 54px;
    margin-right: 15px;
    margin-left: 15px;
  }

  .compose-attachment-card.attachment-card {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    flex-basis: 132px;
  }

  .draft-state {
    display: none;
  }

  #preview-read-toggle {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  #preview-read-toggle [data-read-toggle-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #preview-read-toggle [data-read-toggle-icon] {
    margin: 0;
  }

  .selection-toolbar {
    overflow-x: auto;
  }

  .selection-toolbar > span,
  .selection-toolbar button {
    flex: 0 0 auto;
  }
}

@media (max-width: 360px) {
  .compose-notification-options,
  .compose-notification-toggles,
  .compose-notification-toggle {
    gap: 2px;
  }
}

@media (max-width: 420px) {
  .compose-close-content {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
  }

  .compose-close-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .compose-close-card .compose-close-error {
    margin-left: 16px;
  }

  .compose-close-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compose-close-actions .secondary-button,
  .compose-close-actions .submit-button {
    width: 100%;
  }

  .user-button .user-chevron {
    display: none;
  }

  .user-button {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .messages-pane {
    --message-table-columns: 24px var(--message-thread-column-width) var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width) minmax(0, 1fr) var(--message-table-date-width, 76px);
    --message-table-gap: 3px;
    --message-table-summary-columns: var(--message-table-subject-width, minmax(0, 1.35fr)) minmax(0, .72fr);
  }

  .pane-toolbar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .message-list-controls {
    padding-right: 12px;
    padding-left: 12px;
  }

  .filter-row {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .message-item {
    padding-right: 10px;
    padding-left: 10px;
  }

  .message-table-head {
    padding-right: 10px;
    padding-left: 10px;
  }

  .message-table-summary-head,
  .message-list.table-view .message-summary {
    gap: 8px;
  }

  .compose-recipient-row.has-copy-toggle {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  .compose-recipient-row:not(.has-copy-toggle) {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .compose-link {
    max-width: 62px;
    margin-left: 4px;
    padding-right: 3px;
    padding-left: 3px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .recipient-token-editor {
    max-height: min(104px, 25dvh);
  }

  .message-list.table-view .message-item {
    padding-right: 10px;
    padding-left: 10px;
  }

  .message-list.table-view .message-avatar {
    width: 24px;
    height: 24px;
  }

  .message-table-head.search-all-head,
  .message-list.search-all-view.table-view .search-mailbox-group-toggle,
  .message-list.search-all-view.table-view .message-item {
    grid-template-columns: minmax(88px, .45fr) 24px var(--message-thread-column-width) var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width) minmax(0, 1fr) var(--message-table-date-width, 76px);
  }

  .search-mailbox-summary {
    display: none;
  }

  .sort-button > span:first-child {
    display: none;
  }

  .modal-header,
  .modal-footer {
    padding-right: 15px;
    padding-left: 15px;
  }

  .compose-fields,
  .account-fields {
    padding-right: 15px;
    padding-left: 15px;
  }

  .compose-editor {
    margin-right: 15px;
    margin-left: 15px;
  }

  .editor-toolbar {
    padding-right: 15px;
    padding-left: 15px;
  }

  .account-intro,
  .advanced-settings,
  .discovery-status {
    margin-right: 15px;
    margin-left: 15px;
  }

  .send-button {
    min-width: 108px;
  }

  .attachment-button > span:last-of-type {
    display: none;
  }
}

html[data-message-density="compact"] .pane-section-heading {
  margin-bottom: 3px;
}

html[data-message-density="compact"] .accounts-list {
  gap: 1px;
  margin-bottom: 7px;
}

html[data-message-density="compact"] .account-row {
  border-radius: 7px;
}

html[data-message-density="compact"] .account-button {
  gap: 7px;
  padding: 4px 6px;
  border-radius: 6px;
}

html[data-message-density="compact"] .account-avatar {
  width: 26px;
  height: 26px;
}

html[data-message-density="compact"] .account-name-line {
  gap: 4px;
}

html[data-message-density="compact"] .account-copy strong,
html[data-message-density="compact"] .account-copy small {
  line-height: 1.05;
}

html[data-message-density="compact"] .account-copy small {
  margin-top: 0;
}

html[data-message-density="compact"] .account-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  line-height: 1;
}

html[data-message-density="compact"] .folder-tree {
  gap: 1px;
}

html[data-message-density="compact"] .folder-button,
html[data-message-density="compact"] .folder-alias-summary {
  min-height: 30px;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.1;
}

html[data-message-density="compact"] .folder-icon {
  width: 18px;
  height: 18px;
}

html[data-message-density="compact"] .folder-alias-group {
  margin-top: 3px;
}

html[data-message-density="compact"] .folder-alias-chevron {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

html[data-message-density="compact"] .folder-system-alias {
  padding-left: 22px;
}

html[data-message-density="compact"] .folder-button.folder-category {
  min-height: 28px;
  padding-block: 3px;
  padding-left: calc(13px + var(--folder-depth, 1) * 13px);
}

html[data-message-density="compact"] .message-move-body {
  gap: 9px;
  padding: 13px 16px 16px;
}

html[data-message-density="compact"] .message-headers-body {
  gap: 8px;
  padding: 12px 14px 14px;
}

html[data-message-density="compact"] #message-headers-content {
  padding: 12px 14px;
  line-height: 1.38;
}

html[data-message-density="compact"] .message-move-folders {
  gap: 4px;
}

html[data-message-density="compact"] .message-move-folder {
  min-height: 40px;
  gap: 8px;
  padding: 7px 9px;
}

html[data-message-density="compact"] .message-move-status,
html[data-message-density="compact"] .message-move-loading,
html[data-message-density="compact"] .message-move-empty {
  min-height: 116px;
  padding: 16px 12px;
}

html[data-message-density="compact"] .message-item {
  min-height: 52px;
  grid-template-columns: 26px var(--message-thread-column-width) minmax(0, 1fr) auto var(--message-attachment-column-width) var(--message-star-column-width) var(--message-read-column-width);
  gap: 4px;
  padding: 2px 8px;
}

html[data-message-density="compact"] .message-avatar {
  width: 26px;
  height: 26px;
  font-size: calc(9px + var(--font-size-adjust));
}

html[data-message-density="compact"] .message-sender,
html[data-message-density="compact"] .message-subject,
html[data-message-density="compact"] .message-snippet,
html[data-message-density="compact"] .message-time {
  line-height: 1.02;
}

html[data-message-density="compact"] .message-subject,
html[data-message-density="compact"] .message-snippet {
  margin-top: 0;
}

html[data-message-density="compact"] .message-meta {
  gap: 0;
}

html[data-message-density="compact"] .messages-pane {
  --message-thread-column-width: 17px;
  --message-attachment-column-width: 14px;
  --message-star-column-width: 20px;
  --message-read-column-width: 16px;
}

html[data-message-density="compact"] .message-thread-toggle {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
  border-radius: 5px;
}

html[data-message-density="compact"] .message-list:not(.table-view) .message-thread-column {
  min-height: 26px;
}

html[data-message-density="compact"] .message-list:not(.table-view) .message-attachment-column,
html[data-message-density="compact"] .message-list:not(.table-view) .message-star-column,
html[data-message-density="compact"] .message-list:not(.table-view) .message-read-column {
  min-height: 20px;
}

html[data-message-density="compact"] .message-replied-indicator {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

html[data-message-density="compact"] .message-replied-indicator .message-thread-reply-icon {
  width: 9px;
  height: 9px;
}

html[data-message-density="compact"] .message-thread-toggle-icon {
  width: 10px;
  height: 10px;
}

html[data-message-density="compact"] .message-thread-toggle-loader {
  width: 9px;
  height: 9px;
}

html[data-message-density="compact"] .message-thread-children {
  padding: 2px 5px 3px 17px;
}

html[data-message-density="compact"] .message-thread-node-entry + .message-thread-node-entry {
  margin-top: 1px;
}

html[data-message-density="compact"] .message-thread-node {
  min-height: 25px;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  gap: 4px;
  padding: 0 6px 0 calc(5px + var(--thread-indent-compact, 11px));
  border-radius: 5px;
}

html[data-message-density="compact"] .message-thread-node::before {
  left: calc(4px + var(--thread-indent-compact, 11px) - 7px);
}

html[data-message-density="compact"] .message-thread-direction {
  width: 16px;
  height: 16px;
}

html[data-message-density="compact"] .message-thread-direction .ui-icon {
  width: 10px;
  height: 10px;
}

html[data-message-density="compact"] .message-thread-node-copy {
  grid-template-columns: minmax(72px, .5fr) minmax(0, 1fr);
  gap: 7px;
}

html[data-message-density="compact"] .message-thread-node-sender,
html[data-message-density="compact"] .message-thread-node-subject,
html[data-message-density="compact"] .message-thread-node-time {
  line-height: 1;
}

.message-list.table-view .message-avatar-cell {
  align-self: center;
}

html[data-message-density="compact"] .message-thread-state,
html[data-message-density="compact"] .message-thread-partial {
  min-height: 25px;
  padding-block: 2px;
}

html[data-message-density="compact"] .message-read-toggle {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

html[data-message-density="compact"] .star-button {
  width: 20px;
  height: 20px;
}

html[data-message-density="compact"] .message-table-head {
  min-height: 26px;
  padding-right: 8px;
  padding-left: 8px;
}

html[data-message-density="compact"] .message-list.table-view .message-item {
  min-height: 27px;
  gap: var(--message-table-gap);
  padding: 0 8px;
}

html[data-message-density="compact"] .message-list.table-view .message-avatar {
  width: 18px;
  height: 18px;
  overflow: hidden;
  font-size: 6.5px;
  letter-spacing: -.04em;
  line-height: 1;
}

html[data-message-density="compact"] .message-list.table-view .star-button {
  width: 20px;
  height: 20px;
}

html[data-message-density="compact"] .message-skeleton {
  min-height: 52px;
  gap: 4px;
  padding: 3px 9px;
}

html[data-message-density="compact"] .message-skeleton > i {
  width: 26px;
  height: 26px;
}

html[data-message-density="compact"] .message-skeleton > span {
  gap: 2px;
}

html[data-message-density="compact"] .message-list.table-view .message-skeleton {
  min-height: 27px;
  padding-top: 1px;
  padding-bottom: 1px;
}

html[data-message-density="compact"] .message-list.table-view .message-skeleton > i {
  width: 18px;
  height: 18px;
}

@media (min-width: 921px) and (pointer: fine) {
  html[data-message-density="compact"] .app.layout-horizontal .pane-toolbar {
    gap: 8px;
    padding: 3px 10px 2px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .pane-toolbar > div:first-child {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    overflow: hidden;
  }

  html[data-message-density="compact"] .app.layout-horizontal .pane-toolbar .eyebrow {
    max-width: 45%;
    margin: 0;
    overflow: hidden;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-message-density="compact"] .app.layout-horizontal .pane-toolbar h1 {
    min-width: 0;
    overflow: hidden;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-message-density="compact"] .app.layout-horizontal .list-actions {
    flex: 0 0 auto;
    gap: 3px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .select-button,
  html[data-message-density="compact"] .app.layout-horizontal .sort-button {
    height: 24px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .select-button {
    width: 24px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .message-view-switch {
    height: 24px;
    padding: 1px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .message-view-button {
    width: 24px;
    height: 20px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .sort-button {
    gap: 4px;
    padding: 0 5px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .message-list-controls {
    gap: 4px;
    padding: 0 10px 3px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .filter-row {
    gap: 4px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .filter-chip {
    min-height: 24px;
    padding: 0 8px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .filter-icon-toggle {
    width: 36px;
    min-height: 28px;
    padding: 0;
  }

  html[data-message-density="compact"] .app.layout-horizontal .preview-toolbar {
    min-height: 34px;
    gap: 6px;
    padding: 3px 10px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .message-encoding-control {
    gap: 6px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .message-encoding-control select {
    height: 26px;
    padding-right: 23px;
    padding-left: 8px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .preview-actions {
    gap: 4px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .preview-actions > button:not(.icon-button) {
    height: 26px;
    gap: 4px;
    padding: 0 8px;
  }

  html[data-message-density="compact"] .app.layout-horizontal .preview-toolbar .icon-button {
    width: 26px;
    height: 26px;
  }

  @container (min-width: 721px) {
    html[data-message-density="compact"] .app.layout-horizontal .message-heading {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
      align-items: center;
      gap: 12px;
      padding: 6px 12px;
    }

    html[data-message-density="compact"] .app.layout-horizontal .message-subject-row {
      min-width: 0;
      align-items: center;
      gap: 6px;
    }

    html[data-message-density="compact"] .app.layout-horizontal .message-subject-row h2 {
      overflow: hidden;
      margin: 0;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    html[data-message-density="compact"] .app.layout-horizontal .star-button.large {
      width: 28px;
      height: 28px;
      flex: 0 0 auto;
    }

    html[data-message-density="compact"] .app.layout-horizontal .sender-card {
      min-width: 0;
      gap: 7px;
    }

    html[data-message-density="compact"] .app.layout-horizontal .sender-details {
      flex-wrap: nowrap;
    }

    html[data-message-density="compact"] .app.layout-horizontal .sender-avatar {
      width: 32px;
      height: 32px;
    }

    html[data-message-density="compact"] .app.layout-horizontal .sender-card time {
      flex: 0 0 auto;
      align-self: center;
    }
  }
}

@media (pointer: coarse) {
  .list-read-all-button {
    min-height: 44px;
  }

  .message-move-folder,
  html[data-message-density="compact"] .message-move-folder {
    min-height: 52px;
  }

  .messages-pane,
  html[data-message-density="compact"] .messages-pane {
    --message-read-column-width: 28px;
  }

  .filter-row .filter-chip {
    min-height: 44px;
  }

  .filter-row .filter-icon-toggle {
    width: 44px;
    min-width: 44px;
  }

  .message-read-toggle,
  html[data-message-density="compact"] .message-read-toggle {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
}

/* Feedback and private idea center */
.feedback-modal { width: min(580px, calc(100vw - 24px)); }
.feedback-shell { max-height: min(760px, calc(100dvh - 24px)); }
.feedback-body { display: grid; gap: 10px; padding: 20px 24px 24px; overflow-y: auto; }
.feedback-intro { margin: 0 0 4px; color: #64748b; line-height: 1.55; }
.feedback-body .field-label,
.idea-form label,
.idea-filter-bar label { color: #45556d; font-size: calc(10px + var(--font-size-adjust)); font-weight: 750; }
.feedback-body input,
.feedback-body select,
.feedback-body textarea,
.idea-form input,
.idea-form select,
.idea-form textarea,
.idea-filter-bar input,
.idea-filter-bar select {
  width: 100%; min-height: 44px; border: 1px solid #d8e1ed; border-radius: 11px; background: #fff;
  color: #15233a; font: inherit; outline: none; transition: border-color .16s ease, box-shadow .16s ease;
}
.feedback-body input,
.feedback-body select,
.idea-form input,
.idea-form select,
.idea-filter-bar input,
.idea-filter-bar select { padding: 9px 12px; }
.feedback-body textarea,
.idea-form textarea { min-height: 132px; padding: 12px; resize: vertical; line-height: 1.5; }
.feedback-body input:focus,
.feedback-body select:focus,
.feedback-body textarea:focus,
.idea-form input:focus,
.idea-form select:focus,
.idea-form textarea:focus,
.idea-filter-bar input:focus,
.idea-filter-bar select:focus { border-color: #4b9df4; box-shadow: 0 0 0 3px rgba(28, 140, 244, .15); }
.feedback-privacy-note { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: #66768c; font-size: calc(9px + var(--font-size-adjust)); line-height: 1.45; }
.feedback-privacy-note .ui-icon { flex: 0 0 auto; color: #199868; }

.idea-center-modal { width: min(1080px, calc(100vw - 24px)); }
.idea-center-shell {
  --font-size-adjust: calc(var(--font-size-preference-adjust) + 1px);
  max-height: min(880px, calc(100dvh - 24px));
  overflow: hidden;
}
.idea-center-header { align-items: flex-start; background: radial-gradient(circle at 78% -30%, rgba(67, 164, 255, .18), transparent 42%), #fff; }
.idea-center-header > div:first-child { min-width: 0; }
.idea-center-header h2 { margin-bottom: 4px; }
.idea-center-header p:last-child { margin: 0; color: #66758a; }
.idea-center-header-actions { display: flex; align-items: center; gap: 8px; }
.idea-center-body { padding: 20px 24px 28px; overflow-y: auto; }
.idea-center-view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.idea-center-view-heading h3 { margin: 3px 0 0; color: #17243a; font-size: calc(20px + var(--font-size-adjust)); }
.idea-center-view-heading p { margin: 6px 0 0; color: #728097; }
.idea-filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(145px, auto) minmax(145px, auto); gap: 10px; margin-bottom: 16px; padding: 12px; border: 1px solid #e0e8f2; border-radius: 15px; background: #f7faff; }
.idea-filter-bar label { display: grid; gap: 5px; }
.idea-search-field { position: relative; align-content: end; }
.idea-search-field .ui-icon { position: absolute; left: 12px; bottom: 13px; z-index: 1; color: #7a8aa0; pointer-events: none; }
.idea-search-field input { padding-left: 38px; }
.idea-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.idea-card { display: grid; gap: 9px; width: 100%; padding: 16px 18px; border: 1px solid #dfe7f1; border-radius: 16px; background: linear-gradient(135deg, #fff, #fbfdff); color: #1b2940; text-align: left; box-shadow: 0 6px 20px rgba(38, 75, 117, .055); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.idea-card:hover,
.idea-card:focus-visible { transform: translateY(-2px); border-color: #8ec7fb; box-shadow: 0 10px 26px rgba(31, 111, 189, .12); }
.idea-card-header,
.idea-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.idea-card > strong { overflow: hidden; font-size: calc(13px + var(--font-size-adjust)); text-overflow: ellipsis; white-space: nowrap; }
.idea-card-description { display: -webkit-box; overflow: hidden; color: #64748b; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.idea-card-footer { color: #8592a5; font-size: calc(8px + var(--font-size-adjust)); }
.idea-card-footer .ui-icon { width: 17px; height: 17px; color: #2589e6; }
.idea-category-badge,
.idea-status-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border: 1px solid #dce5ef; border-radius: 999px; background: #f7f9fc; color: #52637b; font-size: calc(8px + var(--font-size-adjust)); font-weight: 760; line-height: 1.2; }
.idea-status-badge.new { border-color: #c9dcf5; background: #eef6ff; color: #2771b9; }
.idea-status-badge.reviewing,
.idea-status-badge.planned { border-color: #ead9ad; background: #fff8e5; color: #916611; }
.idea-status-badge.in_progress { border-color: #cfcdf8; background: #f0efff; color: #5a50c2; }
.idea-status-badge.completed { border-color: #bfe4d3; background: #ecfbf4; color: #18845a; }
.idea-status-badge.declined { border-color: #e4ccd2; background: #fff1f3; color: #a44657; }
.idea-empty { display: grid; justify-items: center; gap: 8px; padding: 52px 20px; border: 1px dashed #ccd9e8; border-radius: 17px; color: #77879c; text-align: center; }
.idea-empty[hidden] { display: none; }
.idea-empty .ui-icon { width: 36px; height: 36px; color: #2a94ed; }
.idea-empty strong { color: #34445c; font-size: calc(13px + var(--font-size-adjust)); }
.idea-list-footer { display: flex; justify-content: center; margin-top: 16px; }
.idea-form { display: grid; gap: 15px; max-width: 760px; }
.idea-form label { display: grid; gap: 6px; }
.idea-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.idea-detail-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #738096; }
.idea-detail-description { margin: 18px 0; padding: 18px; border: 1px solid #e1e8f1; border-radius: 15px; background: #fbfcfe; color: #314158; line-height: 1.65; white-space: pre-wrap; }
.idea-team-response { margin: 18px 0; padding: 16px 18px; border: 1px solid #bfe1ff; border-radius: 15px; background: linear-gradient(135deg, #eff8ff, #f7fbff); }
.idea-team-response > div,
.idea-history-heading { display: flex; align-items: center; gap: 9px; }
.idea-team-response h4,
.idea-history h4 { margin: 0; color: #1b4f7e; }
.idea-team-response p { margin: 9px 0 0 27px; color: #315777; line-height: 1.55; white-space: pre-wrap; }
.idea-history { margin-top: 20px; }
.idea-history ol,
.admin-idea-history { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.idea-history-event { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding-bottom: 18px; }
.idea-history-event:not(:last-child)::before { position: absolute; top: 27px; bottom: 0; left: 14px; width: 1px; background: #dbe5f0; content: ''; }
.idea-history-event > span { display: grid; z-index: 1; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #eaf4ff; color: #277eca; }
.idea-history-event strong,
.idea-history-event time { display: block; }
.idea-history-event time { margin-top: 3px; color: #8491a3; font-size: calc(8px + var(--font-size-adjust)); }
.idea-history-event p { margin: 7px 0 0; color: #53647b; line-height: 1.5; white-space: pre-wrap; }

.admin-dashboard-tabs { overflow-x: auto; scrollbar-width: none; }
.admin-dashboard-tabs::-webkit-scrollbar { display: none; }
.admin-idea-title-cell { min-width: 240px; max-width: 440px; }
.admin-idea-title-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-idea-detail { margin-top: 20px; }
.admin-idea-description { margin: 14px 0; padding: 16px 18px; border: 1px solid #e1e8f1; border-radius: 14px; background: #f9fbfe; }
.admin-idea-description h4 { margin: 0 0 8px; color: #23344d; }
.admin-idea-description p { margin: 0; color: #506178; line-height: 1.6; white-space: pre-wrap; }
.admin-idea-history-card { padding: 18px; border: 1px solid #e0e7f0; border-radius: 14px; background: #fff; }
.admin-idea-history li { padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.admin-idea-history li:last-child { border-bottom: 0; }
.admin-idea-history strong,
.admin-idea-history small { display: block; }
.admin-idea-history small { margin-top: 3px; color: #8390a2; }
.admin-idea-history p { margin: 7px 0 0; color: #53647b; white-space: pre-wrap; }
.admin-status-pill.content-new { border-color: #c9dcf5; background: #eef6ff; color: #2771b9; }
.admin-status-pill.content-reviewing,
.admin-status-pill.content-planned,
.admin-status-pill.content-read { border-color: #ead9ad; background: #fff8e5; color: #916611; }
.admin-status-pill.content-in_progress { border-color: #cfcdf8; background: #f0efff; color: #5a50c2; }
.admin-status-pill.content-completed,
.admin-status-pill.content-closed { border-color: #bfe4d3; background: #ecfbf4; color: #18845a; }
.admin-status-pill.content-declined { border-color: #e4ccd2; background: #fff1f3; color: #a44657; }

html[data-theme="dark"] .feedback-shell,
html[data-theme="dark"] .idea-center-shell,
html[data-theme="dark"] .idea-center-header { border-color: #2b384d; background: #111b2a; color: #dce5f2; }
html[data-theme="dark"] .feedback-intro,
html[data-theme="dark"] .idea-center-header p:last-child,
html[data-theme="dark"] .feedback-privacy-note { color: #9facbf; }
html[data-theme="dark"] .feedback-body .field-label,
html[data-theme="dark"] .idea-form label,
html[data-theme="dark"] .idea-filter-bar label { color: #b7c3d4; }
html[data-theme="dark"] .feedback-body input,
html[data-theme="dark"] .feedback-body select,
html[data-theme="dark"] .feedback-body textarea,
html[data-theme="dark"] .idea-form input,
html[data-theme="dark"] .idea-form select,
html[data-theme="dark"] .idea-form textarea,
html[data-theme="dark"] .idea-filter-bar input,
html[data-theme="dark"] .idea-filter-bar select { border-color: #35445b; background: #101a2a; color: #dce5f2; }
html[data-theme="dark"] .idea-filter-bar,
html[data-theme="dark"] .idea-card,
html[data-theme="dark"] .idea-detail-description,
html[data-theme="dark"] .admin-idea-description,
html[data-theme="dark"] .admin-idea-history-card { border-color: #2d3a4f; background: #131f31; }
html[data-theme="dark"] .idea-center-view-heading h3,
html[data-theme="dark"] .idea-card > strong,
html[data-theme="dark"] .idea-empty strong,
html[data-theme="dark"] .admin-idea-description h4 { color: #e4ebf6; }
html[data-theme="dark"] .idea-card-description,
html[data-theme="dark"] .idea-detail-description,
html[data-theme="dark"] .admin-idea-description p,
html[data-theme="dark"] .admin-idea-history p { color: #a8b5c7; }
html[data-theme="dark"] .idea-team-response { border-color: #28527b; background: #132943; }
html[data-theme="dark"] .idea-team-response h4,
html[data-theme="dark"] .idea-team-response p { color: #9dccf5; }
html[data-theme="dark"] .idea-history-event:not(:last-child)::before { background: #334157; }

@media (max-width: 820px) {
  .idea-center-header { align-items: stretch; }
  .idea-center-header-actions { justify-content: flex-end; }
  .idea-filter-bar { grid-template-columns: 1fr 1fr; }
  .idea-search-field { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .feedback-modal,
  .idea-center-modal { width: calc(100vw - 10px); border-radius: 14px; }
  .feedback-shell,
  .idea-center-shell { max-height: calc(100dvh - 10px); }
  .feedback-body,
  .idea-center-body { padding: 16px; }
  .idea-center-header { flex-direction: column; }
  .idea-center-header-actions { position: absolute; top: 12px; right: 12px; }
  #idea-create-button { position: fixed; right: 20px; bottom: 20px; z-index: 3; min-height: 48px; box-shadow: 0 8px 24px rgba(25, 117, 202, .28); }
  .idea-filter-bar { grid-template-columns: 1fr; }
  .idea-search-field { grid-column: auto; }
  .idea-center-view-heading { align-items: stretch; flex-direction: column; }
  .idea-form-actions { align-items: stretch; flex-direction: column-reverse; }
  .idea-form-actions button { width: 100%; }
  .admin-dashboard-tabs button { min-width: 48px; flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }


  .pull-refresh-indicator[data-state="refreshing"] .pull-refresh-icon {
    animation: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #b6becc;
    --line-strong: #8e99aa;
  }

  .recipient-token {
    border-color: var(--blue);
  }

  .recipient-token-remove:focus-visible {
    outline-width: 3px;
  }
}

/* Pochtovik service account switcher */
.pochtovik-accounts-modal {
  width: min(94vw, 600px);
  max-height: min(88dvh, 720px);
}

.pochtovik-accounts-shell {
  max-height: min(88dvh, 720px);
}

.pochtovik-accounts-modal .modal-header {
  align-items: center;
  padding: 16px 18px 13px;
}

.pochtovik-accounts-modal .modal-header > div {
  min-width: 0;
}

.pochtovik-accounts-modal .modal-header h2,
.pochtovik-accounts-modal .modal-header .eyebrow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pochtovik-accounts-modal .modal-header h2 {
  font-size: calc(17px + var(--font-size-adjust));
}

.pochtovik-accounts-modal .modal-header .eyebrow {
  margin-bottom: 3px;
}

.pochtovik-accounts-modal .modal-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.pochtovik-accounts-body {
  min-height: 0;
  flex: 1;
  overflow: hidden auto;
  padding: 15px 18px 16px;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.pochtovik-accounts-intro {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.5;
}

.pochtovik-profiles-section,
.pochtovik-profile-add {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.pochtovik-profile-add {
  margin-top: 12px;
}

.pochtovik-section-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pochtovik-section-heading > div {
  min-width: 0;
}

.pochtovik-section-heading strong,
.pochtovik-section-heading small {
  display: block;
}

.pochtovik-section-heading strong {
  color: var(--ink);
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 780;
}

.pochtovik-section-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.4;
}

.pochtovik-profile-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 720;
}

.pochtovik-profiles-list {
  display: grid;
  max-height: min(240px, 31dvh);
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow: hidden auto;
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.pochtovik-profile-card {
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.pochtovik-profile-card.is-current {
  border-color: #9cc5f4;
  background: var(--surface-blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.pochtovik-profile-avatar,
.pochtovik-profile-add-icon {
  display: grid;
  place-items: center;
  color: #fff;
}

.pochtovik-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #1574d6, #5d9ce7);
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 820;
  text-transform: uppercase;
}

.pochtovik-profile-identity {
  display: block;
  min-width: 0;
}

.pochtovik-profile-identity > strong,
.pochtovik-profile-identity > span,
.pochtovik-profile-identity > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pochtovik-profile-identity > strong {
  color: var(--ink);
  font-size: calc(11px + var(--font-size-adjust));
}

.pochtovik-profile-identity > span {
  margin-top: 1px;
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
}

.pochtovik-current-profile {
  margin-top: 3px;
  color: var(--success);
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 750;
}

.pochtovik-profile-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.pochtovik-profile-actions .pochtovik-profile-switch,
.pochtovik-profile-actions .pochtovik-profile-unlink {
  min-height: 44px;
}

.pochtovik-profile-switch {
  height: 44px;
  padding-inline: 11px;
}

.pochtovik-profile-unlink {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--danger);
}

.pochtovik-profile-unlink:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.pochtovik-profile-card.is-current .pochtovik-profile-switch {
  display: none;
}

.pochtovik-profiles-empty {
  margin: 0;
  padding: 17px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
  text-align: center;
}

.pochtovik-profile-add-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--blue), #51a0ee);
}

.pochtovik-profile-add-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.pochtovik-profile-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
}

.pochtovik-profile-field {
  display: block;
  min-width: 0;
  color: #465267;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 720;
}

.pochtovik-profile-field > label {
  display: block;
  margin: 0 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pochtovik-profile-field .input-wrap {
  width: 100%;
  height: 46px;
  min-width: 0;
}

.pochtovik-profile-field .password-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.pochtovik-profile-error {
  grid-column: 1 / -1;
  margin-top: 0;
}

.pochtovik-profile-submit {
  width: 100%;
  grid-column: 1 / -1;
  gap: 14px;
}

.pochtovik-profile-security {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 9px 1px 0;
  color: var(--muted);
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.45;
}

.pochtovik-profile-security .ui-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--success);
}

.pochtovik-profiles-status {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.4;
}

.pochtovik-accounts-footer {
  justify-content: flex-end;
  padding: 10px 18px;
}

.pochtovik-accounts-footer .secondary-button {
  min-width: 105px;
  min-height: 44px;
  justify-content: center;
}

html[data-theme="dark"] .pochtovik-profile-field {
  color: #c1cede;
}

html[data-theme="dark"] .pochtovik-profile-card.is-current {
  border-color: #3f76b2;
}

@media (max-width: 620px) {
  .pochtovik-accounts-modal,
  .pochtovik-accounts-shell {
    max-height: calc(100dvh - 14px);
  }

  .pochtovik-accounts-modal .modal-header {
    padding: 12px 12px 10px;
  }

  .pochtovik-accounts-body {
    padding: 12px;
  }

  .pochtovik-profile-add-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .pochtovik-profile-field .password-toggle {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .pochtovik-profile-error,
  .pochtovik-profile-submit {
    grid-column: 1;
  }

  .pochtovik-profile-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .pochtovik-profile-actions {
    grid-column: 1 / -1;
    padding-left: 48px;
  }

  .pochtovik-profile-switch {
    min-width: 0;
    flex: 1;
    justify-content: center;
  }

  .pochtovik-accounts-footer {
    padding: 9px 12px max(9px, env(safe-area-inset-bottom));
  }

  .pochtovik-accounts-footer .secondary-button {
    width: 100%;
  }
}

@media (forced-colors: active) {
  .recipient-token-editor {
    border-color: CanvasText;
    background: Canvas;
    forced-color-adjust: auto;
  }

  .recipient-token-editor:focus-within {
    border-color: Highlight;
    outline: 2px solid Highlight;
    outline-offset: -2px;
    background: Canvas;
    box-shadow: none;
  }

  .recipient-token,
  .recipient-token:focus-within {
    border-color: ButtonText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  .recipient-token-remove {
    color: ButtonText;
  }

  .recipient-token-remove:hover,
  .recipient-token-remove:focus-visible {
    outline-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }

  .recipient-token-editor.is-invalid,
  .recipient-input-wrap.has-invalid-recipient .recipient-token-editor {
    border-color: Highlight;
    background: Canvas;
  }

  .recipient-token-editor:has(> input[aria-invalid="true"]) {
    border-color: Highlight;
    background: Canvas;
  }

  .compose-link,
  .compose-link:hover,
  .compose-link:focus-visible {
    background: Canvas;
    color: LinkText;
  }
}

/* Public product landing and authentication */
.auth-screen {
  --landing-bg: #07101f;
  --landing-panel: rgba(14, 28, 49, .76);
  --landing-line: rgba(148, 176, 211, .16);
  --landing-text: #f7fbff;
  --landing-muted: #9eb0c8;
  --landing-cyan: #65e4d5;
  --landing-blue: #75baff;
  --landing-yellow: #ffd876;
  --landing-header: rgba(7, 16, 31, .86);
  --landing-flow-line: rgba(111, 217, 221, .24);
  --landing-flow-node: #ffd876;
  --landing-flow-glow: rgba(63, 195, 205, .2);
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scroll-padding-top: calc(86px + env(safe-area-inset-top));
  scrollbar-color: rgba(101, 228, 213, .5) rgba(7, 16, 31, .5);
  scrollbar-width: thin;
  background: var(--landing-bg);
}

.landing-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(circle at 82% 9%, rgba(37, 184, 211, .18), transparent 31%),
    radial-gradient(circle at 8% 40%, rgba(53, 111, 211, .14), transparent 29%),
    radial-gradient(circle at 76% 72%, rgba(116, 73, 210, .09), transparent 28%),
    linear-gradient(158deg, rgba(9, 22, 41, .96), rgba(5, 13, 27, .98) 56%, rgba(8, 20, 37, .98)),
    var(--landing-bg);
  color: var(--landing-text);
  transition: color .25s ease, background-color .25s ease;
}

.landing-page::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(132, 171, 211, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 171, 211, .18) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, .38) 44%, transparent 82%);
  pointer-events: none;
  content: "";
}

.landing-page::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to bottom, rgba(4, 12, 24, .04), rgba(4, 12, 24, .2) 48%, rgba(4, 12, 24, .42)),
    repeating-linear-gradient(132deg, transparent 0 178px, rgba(130, 185, 220, .025) 179px 180px, transparent 181px 356px);
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .7) 76%, transparent 100%);
  pointer-events: none;
  content: "";
}

.landing-mail-atmosphere {
  position: fixed;
  z-index: 0;
  inset: calc(86px + env(safe-area-inset-top)) 0 0;
  overflow: hidden;
  contain: layout paint;
  pointer-events: none;
}

.landing-mail-atmosphere::before,
.landing-mail-atmosphere::after {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  content: "";
}

.landing-mail-atmosphere::before {
  top: -32%;
  right: -14%;
  width: min(78vw, 1040px);
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--landing-flow-glow), rgba(80, 104, 220, .07) 37%, transparent 68%);
}

.landing-mail-atmosphere::after {
  bottom: -38%;
  left: -20%;
  width: min(70vw, 900px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(75, 111, 223, .13), rgba(80, 213, 200, .045) 42%, transparent 70%);
}

.landing-mail-route {
  position: absolute;
  top: 9%;
  left: 9%;
  width: 76%;
  height: 58%;
  transform: translate3d(var(--landing-route-x, 0), var(--landing-route-y, 0), 0) rotate(-7deg);
  border: 1px dashed var(--landing-flow-line);
  border-radius: 50%;
  opacity: .62;
  will-change: transform;
}

.landing-mail-route::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 23px;
  height: 15px;
  offset-path: ellipse(50% 50% at 50% 50%);
  offset-distance: 0%;
  offset-rotate: 0deg;
  border: 1px solid var(--landing-flow-node);
  border-radius: 4px;
  background:
    linear-gradient(35deg, transparent 47%, var(--landing-flow-node) 49% 51%, transparent 53%) left top / 50% 72% no-repeat,
    linear-gradient(-35deg, transparent 47%, var(--landing-flow-node) 49% 51%, transparent 53%) right top / 50% 72% no-repeat,
    rgba(255, 216, 118, .04);
  box-shadow: 0 0 22px rgba(255, 216, 118, .25);
  opacity: .78;
  content: "";
}

.landing-mail-route::after {
  position: absolute;
  top: 18%;
  right: 3%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--landing-flow-node);
  box-shadow: 0 0 0 7px rgba(255, 216, 118, .08), 0 0 26px rgba(255, 216, 118, .52);
  content: "";
}

.landing-mail-envelope {
  position: absolute;
  aspect-ratio: 1.46;
  overflow: hidden;
  border: 1px solid var(--landing-flow-line);
  border-radius: clamp(14px, 1.5vw, 24px);
  background:
    linear-gradient(34deg, transparent 48.5%, var(--landing-flow-line) 49.3% 50.7%, transparent 51.5%) left top / 50% 74% no-repeat,
    linear-gradient(-34deg, transparent 48.5%, var(--landing-flow-line) 49.3% 50.7%, transparent 51.5%) right top / 50% 74% no-repeat,
    linear-gradient(145deg, rgba(101, 228, 213, .035), rgba(117, 186, 255, .015));
  color: var(--landing-flow-line);
  box-shadow: inset 0 0 45px rgba(101, 228, 213, .035), 0 24px 70px rgba(0, 0, 0, .12);
  opacity: .34;
  will-change: transform;
}

.landing-mail-envelope::before {
  position: absolute;
  top: 14%;
  right: 10%;
  width: 17%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 5px;
  box-shadow: inset 0 0 14px rgba(255, 216, 118, .1);
  content: "";
}

.landing-mail-envelope::after {
  position: absolute;
  bottom: 17%;
  left: 12%;
  width: 34%;
  height: 1px;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor;
  opacity: .65;
  content: "";
}

.landing-mail-envelope--left {
  top: 12%;
  left: -5%;
  width: clamp(150px, 16vw, 250px);
  transform: translate3d(var(--landing-envelope-middle-x, 0), var(--landing-envelope-middle-y, 0), 0) rotate(-14deg);
}

.landing-mail-envelope--right {
  right: -7%;
  bottom: 7%;
  width: clamp(220px, 23vw, 360px);
  transform: translate3d(var(--landing-envelope-near-x, 0), var(--landing-envelope-near-y, 0), 0) rotate(11deg);
  opacity: .25;
}

.landing-header,
.landing-hero,
.landing-section,
.landing-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.landing-header {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.landing-header-shell {
  position: sticky;
  z-index: 30;
  top: 0;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  border-bottom: 1px solid var(--landing-line);
  background: var(--landing-header);
  box-shadow: 0 12px 32px rgba(1, 8, 18, .08);
  backdrop-filter: blur(18px) saturate(145%);
}

.landing-scroll-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  overflow: hidden;
}

.landing-scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--landing-cyan), var(--landing-blue), var(--landing-yellow));
  box-shadow: 0 0 14px rgba(101, 228, 213, .55);
  will-change: transform;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--landing-text);
  text-decoration: none;
}

.landing-brand-mark {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  transform: rotate(-8deg);
  border: 1px solid rgba(115, 229, 216, .55);
  border-radius: 13px 8px 13px 8px;
  background: linear-gradient(145deg, rgba(90, 228, 215, .26), rgba(75, 119, 223, .18));
  box-shadow: inset 0 0 20px rgba(101, 228, 213, .12), 0 8px 24px rgba(0, 0, 0, .22);
}

.landing-brand-mark::before,
.landing-brand-mark::after,
.landing-brand-mark i {
  position: absolute;
  width: 16px;
  height: 2px;
  border-radius: 3px;
  background: var(--landing-cyan);
  content: "";
}

.landing-brand-mark::before { transform: translateY(-6px); }
.landing-brand-mark::after { transform: translateY(6px); }
.landing-brand-mark i { box-shadow: 7px 0 0 var(--landing-yellow); }

.landing-brand strong,
.landing-brand small {
  display: block;
}

.landing-brand strong {
  font-size: calc(15px + var(--font-size-adjust));
  font-weight: 820;
  letter-spacing: -.02em;
}

.landing-brand small {
  margin-top: 2px;
  color: var(--landing-muted);
  font-size: calc(8px + var(--font-size-adjust));
  letter-spacing: .06em;
  text-transform: uppercase;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.landing-nav a {
  color: #bac9dc;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 670;
  text-decoration: none;
  transition: color .18s ease;
}

.landing-nav a:hover,
.landing-nav a.active { color: var(--landing-cyan); }

.landing-nav a.active { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 9px; }

.landing-header-actions,
.landing-language {
  display: flex;
  align-items: center;
  gap: 9px;
}

.landing-language {
  gap: 4px;
  margin-right: 2px;
  padding: 4px;
  border: 1px solid var(--landing-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}

.landing-page .auth-language {
  min-width: 27px;
  min-height: 27px;
  border-radius: 7px;
  color: #7890ad;
}

.landing-page .auth-language.active {
  background: rgba(101, 228, 213, .12);
  color: var(--landing-cyan);
}

.landing-login,
.landing-register,
.landing-font-size,
.landing-theme-toggle {
  min-height: 38px;
  border: 1px solid var(--landing-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  color: #e6eef8;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 760;
}

.landing-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 7px;
}

.landing-theme-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: rgba(101, 228, 213, .1);
  color: var(--landing-cyan);
}

.landing-theme-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.landing-font-size {
  width: 38px;
  padding: 0;
  color: #9fb2ca;
}

.landing-login { padding: 0 17px; }

.landing-register {
  padding: 0 18px;
  border-color: rgba(101, 228, 213, .55);
  background: var(--landing-cyan);
  color: #06201e;
  box-shadow: 0 9px 30px rgba(55, 214, 200, .17);
}

.landing-scroll-nav {
  position: fixed;
  z-index: 24;
  top: 50%;
  right: clamp(18px, 2vw, 40px);
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.landing-scroll-nav a {
  position: relative;
  display: grid;
  min-width: 112px;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--landing-muted);
  font-size: calc(8px + var(--font-size-adjust));
  text-decoration: none;
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease, background .18s ease;
}

.landing-scroll-nav a::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.landing-scroll-nav a span {
  color: var(--landing-cyan);
  font-variant-numeric: tabular-nums;
}

.landing-scroll-nav a b { font-weight: 730; }

.landing-scroll-nav a:hover,
.landing-scroll-nav a:focus-visible,
.landing-scroll-nav a.active {
  transform: translateX(-5px);
  border-color: var(--landing-line);
  background: var(--landing-header);
  color: var(--landing-text);
  opacity: 1;
}

.landing-hero {
  display: grid;
  min-height: max(650px, calc(100dvh - 86px));
  grid-template-columns: minmax(0, .93fr) minmax(440px, 1.07fr);
  align-items: center;
  gap: clamp(38px, 7vw, 88px);
  padding-top: 60px;
  padding-bottom: 72px;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--landing-cyan);
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.landing-kicker b,
.landing-trust b,
.landing-scroll-cue b,
.demo-badge b,
.billing-period-switch b {
  font: inherit;
}

.landing-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--landing-yellow);
  box-shadow: 0 0 0 5px rgba(255, 216, 118, .11);
}

.landing-hero h1 {
  max-width: 680px;
  margin: 23px 0 24px;
  color: #f8fbff;
  font-size: clamp(calc(43px + var(--font-size-adjust)), calc(5vw + var(--font-size-adjust)), calc(72px + var(--font-size-adjust)));
  font-weight: 850;
  letter-spacing: -.066em;
  line-height: .98;
}

.landing-hero h1 em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(90deg, var(--landing-cyan), var(--landing-blue) 62%, #a7b4ff);
  background-clip: text;
  -webkit-background-clip: text;
}

.landing-hero-copy > p {
  max-width: 610px;
  margin: 0;
  color: var(--landing-muted);
  font-size: calc(15px + var(--font-size-adjust));
  line-height: 1.72;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
}

.landing-cta {
  position: relative;
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 22px;
  border: 1px solid var(--landing-line);
  border-radius: 13px;
  color: #eaf2fb;
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 780;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.landing-cta::before {
  position: absolute;
  top: -70%;
  left: -35%;
  width: 20%;
  height: 240%;
  transform: rotate(18deg) translate3d(-180%, 0, 0);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  pointer-events: none;
  content: "";
  transition: transform .62s cubic-bezier(.2, .75, .2, 1);
}

.landing-cta > * {
  position: relative;
  z-index: 1;
}

.landing-cta .ui-icon {
  width: 18px;
  height: 18px;
}

.landing-cta:hover::before { transform: rotate(18deg) translate3d(760%, 0, 0); }
.landing-cta.secondary::before { display: none; }

.landing-cta.primary {
  border-color: var(--landing-cyan);
  background: var(--landing-cyan);
  color: #07231f;
  box-shadow: 0 15px 42px rgba(47, 206, 192, .19);
}

.landing-cta.secondary { background: rgba(255, 255, 255, .035); }

.landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 0;
  color: #8ea4bd;
  font-size: calc(9px + var(--font-size-adjust));
  list-style: none;
}

.landing-trust .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--landing-cyan);
}

.landing-trust li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.landing-scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--landing-muted);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 740;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.landing-scroll-cue .ui-icon {
  width: 25px;
  height: 25px;
  padding: 5px;
  border: 1px solid var(--landing-line);
  border-radius: 50%;
  color: var(--landing-cyan);
  animation: landing-cue 1.8s ease-in-out infinite;
}

@keyframes landing-cue {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

.landing-mail-demo {
  position: relative;
  min-height: 470px;
  perspective: 1200px;
}

.demo-glow {
  position: absolute;
  top: 8%;
  right: 3%;
  width: 82%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 198, 208, .22), transparent 66%);
  filter: blur(20px);
  transform-origin: 55% 45%;
}

.demo-window {
  position: absolute;
  z-index: 1;
  top: 42px;
  right: 0;
  width: min(100%, 595px);
  transform: perspective(1100px) translate3d(var(--landing-demo-x, 0), var(--landing-demo-y, 0), 0) rotateY(calc(-4deg + var(--landing-demo-rotate-y, 0deg))) rotateX(calc(1deg + var(--landing-demo-rotate-x, 0deg)));
  overflow: hidden;
  border: 1px solid rgba(141, 188, 227, .27);
  border-radius: 18px;
  background: #0f1c2e;
  box-shadow: 0 35px 80px rgba(0, 0, 0, .38);
  transition: transform .3s cubic-bezier(.2, .72, .2, 1), box-shadow .3s ease;
  will-change: transform;
}

.demo-window::after {
  position: absolute;
  z-index: 4;
  top: -35%;
  left: -22%;
  width: 13%;
  height: 175%;
  transform: rotate(14deg) translate3d(-240%, 0, 0);
  background: linear-gradient(90deg, transparent, rgba(151, 239, 229, .18), transparent);
  opacity: 0;
  pointer-events: none;
  content: "";
}

.demo-window-top {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--landing-line);
  background: rgba(255, 255, 255, .025);
}

.demo-window-top span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #40546d;
}

.demo-window-top span:first-child { background: #ff7f78; }
.demo-window-top span:nth-child(2) { background: var(--landing-yellow); }
.demo-window-top span:nth-child(3) { background: var(--landing-cyan); }

.demo-window-top b {
  margin-left: auto;
  color: #7690ab;
  font-size: calc(8px + var(--font-size-adjust));
  letter-spacing: .08em;
  text-transform: uppercase;
}

.demo-window-body {
  display: grid;
  height: 330px;
  grid-template-columns: 22% 37% 41%;
}

.demo-window-body aside {
  padding: 17px 11px;
  border-right: 1px solid var(--landing-line);
  background: #0b1727;
}

.demo-compose {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 25px;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--landing-cyan);
  color: #06201e;
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 800;
}

.demo-compose .ui-icon {
  width: 14px;
  height: 14px;
}

.demo-window-body aside i {
  display: block;
  width: 72%;
  height: 7px;
  margin: 15px 5px;
  border-radius: 8px;
  background: #24364d;
}

.demo-window-body aside i.active {
  width: 88%;
  background: #4c7398;
  box-shadow: -5px 0 var(--landing-cyan);
}

.demo-window-body aside strong {
  display: block;
  margin: 45px 5px 0;
  color: #5f7691;
  font-size: calc(7px + var(--font-size-adjust));
  text-transform: uppercase;
}

.demo-inbox {
  border-right: 1px solid var(--landing-line);
  background: #102036;
}

.demo-search {
  height: 24px;
  margin: 12px;
  border: 1px solid #273a52;
  border-radius: 8px;
  background: #0c192a;
}

.demo-inbox article {
  display: grid;
  min-height: 76px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 14px 10px;
  border-top: 1px solid rgba(139, 170, 204, .1);
}

.demo-inbox article.unread {
  background: rgba(101, 228, 213, .065);
  box-shadow: inset 2px 0 var(--landing-cyan);
}

.demo-inbox article > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: #29415c;
  color: var(--landing-cyan);
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 800;
}

.demo-inbox b,
.demo-inbox i,
.demo-letter i {
  display: block;
}

.demo-inbox b {
  overflow: hidden;
  color: #c5d3e3;
  font-size: calc(8px + var(--font-size-adjust));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-inbox i {
  width: 95%;
  height: 4px;
  margin-top: 7px;
  border-radius: 5px;
  background: #2f4359;
}

.demo-inbox i:last-child { width: 70%; }

.demo-inbox time {
  color: #617b96;
  font-size: calc(6px + var(--font-size-adjust));
}

.demo-letter { padding: 27px 20px; }

.demo-letter small {
  color: var(--landing-cyan);
  font-size: calc(7px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .1em;
}

.demo-letter h3 {
  margin: 14px 0 27px;
  color: #e4eef8;
  font-size: calc(17px + var(--font-size-adjust));
  letter-spacing: -.035em;
}

.demo-letter i {
  width: 100%;
  height: 6px;
  margin: 11px 0;
  border-radius: 5px;
  background: #293c52;
}

.demo-letter i:nth-of-type(2) { width: 88%; }
.demo-letter i:nth-of-type(3) { width: 72%; }

.demo-letter .demo-reply {
  display: inline-block;
  margin-top: 33px;
  padding: 9px 16px;
  border: 1px solid rgba(101, 228, 213, .45);
  border-radius: 8px;
  background: rgba(101, 228, 213, .08);
  color: var(--landing-cyan);
  font-size: calc(8px + var(--font-size-adjust));
}

.demo-badge {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(143, 188, 224, .23);
  border-radius: 12px;
  background: rgba(12, 25, 43, .88);
  color: #b8cadd;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 730;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
  backdrop-filter: blur(12px);
}

.demo-badge .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--landing-yellow);
}
.badge-security { right: 6%; bottom: 12px; }
.badge-fast { bottom: 70px; left: -12px; }

.landing-feature-grid {
  position: relative;
}

.landing-feature-grid::before {
  position: absolute;
  z-index: 0;
  top: 49px;
  right: 13%;
  left: 13%;
  height: 1px;
  transform: scaleX(.18);
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, var(--landing-flow-line) 13%, rgba(255, 216, 118, .42) 50%, var(--landing-flow-line) 87%, transparent);
  opacity: .8;
  content: "";
  transition: transform 1.05s cubic-bezier(.2, .75, .2, 1);
}

.landing-section.is-active .landing-feature-grid::before { transform: scaleX(1); }

.landing-section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--landing-line);
}

#benefits { display: flex; min-height: calc(100dvh - 86px); flex-direction: column; justify-content: center; }
#storage { min-height: min(760px, calc(100dvh - 86px)); }

.landing-section-heading {
  max-width: 700px;
  margin-bottom: 38px;
}

.landing-section-heading > span,
.landing-section-heading > div > span,
.storage-kicker {
  color: var(--landing-cyan);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 820;
  letter-spacing: .12em;
}

.landing-section h2 {
  margin: 13px 0;
  color: #f4f8fc;
  font-size: clamp(calc(30px + var(--font-size-adjust)), calc(3.7vw + var(--font-size-adjust)), calc(48px + var(--font-size-adjust)));
  font-weight: 820;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.landing-section-heading p,
.storage-section > div > p {
  margin: 0;
  color: var(--landing-muted);
  font-size: calc(13px + var(--font-size-adjust));
  line-height: 1.7;
}

.landing-feature-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.landing-feature-grid article,
.price-card {
  position: relative;
  z-index: 1;
  border: 1px solid var(--landing-line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(19, 37, 61, .84), rgba(11, 24, 42, .72));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.landing-feature-grid article {
  overflow: hidden;
  padding: 29px;
  transition: transform .28s cubic-bezier(.2, .75, .2, 1), border-color .28s ease, box-shadow .28s ease;
}

.landing-feature-grid article::before,
.price-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 18% 12%, rgba(101, 228, 213, .11), transparent 42%);
  opacity: 0;
  pointer-events: none;
  content: "";
  transition: opacity .28s ease;
}

.landing-feature-grid article > *,
.price-card > * {
  position: relative;
  z-index: 1;
}

.landing-feature-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(101, 228, 213, .36);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 22px 55px rgba(0, 0, 0, .16);
}

.landing-feature-grid article:hover::before,
.price-card:hover::before { opacity: 1; }

.feature-icon,
.price-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(101, 228, 213, .22);
  border-radius: 13px;
  background: rgba(101, 228, 213, .075);
  color: var(--landing-cyan);
}

.feature-icon .ui-icon,
.price-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.landing-feature-grid h3 {
  margin: 24px 0 10px;
  color: #edf4fb;
  font-size: calc(17px + var(--font-size-adjust));
}

.landing-feature-grid p {
  margin: 0;
  color: #8fa3ba;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.65;
}

.pricing-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.pricing-heading > div:first-child { max-width: 720px; }

.billing-period-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--landing-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.billing-period-switch button {
  min-height: 37px;
  padding: 0 14px;
  border-radius: 9px;
  background: transparent;
  color: #8fa5bd;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
}

.billing-period-switch button.active {
  background: rgba(101, 228, 213, .13);
  color: var(--landing-cyan);
}

.billing-period-switch span {
  margin-left: 3px;
  color: var(--landing-yellow);
}

.pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.price-card {
  position: relative;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  padding: 22px;
  transition: border-color .28s ease, box-shadow .28s ease, background-color .28s ease;
}

.price-card:hover {
  border-color: rgba(117, 186, 255, .36);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 22px 58px rgba(0, 0, 0, .15);
}

.price-card.featured {
  border-color: rgba(101, 228, 213, .55);
  background:
    linear-gradient(150deg, rgba(31, 73, 85, .74), rgba(12, 28, 48, .88));
  box-shadow: 0 18px 55px rgba(24, 162, 155, .1);
}

.popular-label {
  position: absolute;
  top: -11px;
  right: 18px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--landing-yellow);
  color: #342b11;
  font-size: calc(7px + var(--font-size-adjust));
  font-weight: 900;
  letter-spacing: .08em;
}

.price-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-card-top > div { min-width: 0; }

.price-card-top h3 {
  margin: 0;
  color: #f0f6fc;
  font-size: calc(15px + var(--font-size-adjust));
}

.price-card-top p {
  margin: 4px 0 0;
  color: #7690aa;
  font-size: calc(9px + var(--font-size-adjust));
}

.price-value {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 72px;
  margin-top: 24px;
}

.price-value strong {
  color: #fff;
  font-size: calc(31px + var(--font-size-adjust));
  letter-spacing: -.055em;
}

.price-value span {
  padding-bottom: 7px;
  color: #7890aa;
  font-size: calc(9px + var(--font-size-adjust));
}

.annual-equivalent {
  min-height: 18px;
  color: var(--landing-yellow);
  font-size: calc(8px + var(--font-size-adjust));
}

.price-card ul {
  display: grid;
  gap: 12px;
  margin: 17px 0 22px;
  padding: 0;
  color: #a5b6c9;
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.4;
  list-style: none;
}

.price-card li::before {
  display: inline-block;
  width: 6px;
  height: 10px;
  margin-right: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--landing-cyan);
  content: "";
  transform: rotate(45deg) translateY(-1px);
}

.price-card > button {
  min-height: 43px;
  margin-top: auto;
  border: 1px solid rgba(111, 168, 213, .3);
  border-radius: 11px;
  background: rgba(111, 168, 213, .075);
  color: #cfe0ef;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 770;
}

.price-card.featured > button {
  border-color: var(--landing-cyan);
  background: var(--landing-cyan);
  color: #06231f;
}

.pricing-note {
  margin: 22px 0 0;
  color: #718ba7;
  font-size: calc(9px + var(--font-size-adjust));
  text-align: center;
}

.storage-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 70px;
}

.storage-section::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 260px;
  left: calc(100% - 330px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--landing-flow-line) 20%, rgba(255, 216, 118, .48), var(--landing-flow-line) 82%, transparent);
  content: "";
}

.storage-section > * {
  position: relative;
  z-index: 1;
}

.storage-metric {
  position: relative;
  padding: 29px;
  border: 1px solid rgba(101, 228, 213, .27);
  border-radius: 18px;
  background: rgba(101, 228, 213, .055);
}

.storage-metric::before {
  position: absolute;
  top: 50%;
  left: -62px;
  width: 30px;
  height: 20px;
  transform: translate3d(-14px, -50%, 0);
  border: 1px solid var(--landing-flow-node);
  border-radius: 5px;
  background:
    linear-gradient(35deg, transparent 47%, var(--landing-flow-node) 49% 51%, transparent 53%) left top / 50% 72% no-repeat,
    linear-gradient(-35deg, transparent 47%, var(--landing-flow-node) 49% 51%, transparent 53%) right top / 50% 72% no-repeat,
    rgba(255, 216, 118, .04);
  box-shadow: 0 0 20px rgba(255, 216, 118, .18);
  opacity: .72;
  content: "";
}

.storage-metric small,
.storage-metric span {
  display: block;
  color: #8299b3;
  font-size: calc(9px + var(--font-size-adjust));
}

.storage-metric strong {
  display: block;
  margin: 8px 0;
  color: var(--landing-cyan);
  font-size: calc(34px + var(--font-size-adjust));
  letter-spacing: -.05em;
}

.landing-final-cta {
  position: relative;
  display: grid;
  min-height: 520px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(34px, 7vw, 90px);
  overflow: hidden;
}

.landing-final-cta::before {
  position: absolute;
  inset: 52px 0;
  z-index: -1;
  border: 1px solid rgba(101, 228, 213, .22);
  border-radius: 28px;
  background: linear-gradient(130deg, rgba(101, 228, 213, .09), rgba(117, 186, 255, .05));
  content: "";
}

.landing-final-cta > div:first-of-type { max-width: 720px; padding-left: clamp(24px, 5vw, 66px); }

.landing-final-cta > div:first-of-type > span {
  color: var(--landing-cyan);
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 820;
  letter-spacing: .12em;
}

.landing-final-cta p {
  max-width: 640px;
  margin: 0;
  color: var(--landing-muted);
  font-size: calc(13px + var(--font-size-adjust));
  line-height: 1.7;
}

.landing-final-actions {
  display: grid;
  gap: 10px;
  min-width: 235px;
  padding-right: clamp(24px, 5vw, 66px);
}

.landing-final-actions .landing-cta { width: 100%; }

.landing-final-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 8%;
  width: 330px;
  height: 330px;
  transform: translateY(-50%);
  border: 1px solid rgba(101, 228, 213, .16);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(69, 192, 200, .09), inset 0 0 70px rgba(117, 186, 255, .07);
}

.landing-final-orbit::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 17px;
  margin: -9px 0 0 -13px;
  transform: rotate(0deg) translateX(154px) rotate(0deg);
  border: 1px solid var(--landing-flow-node);
  border-radius: 5px;
  background:
    linear-gradient(35deg, transparent 47%, var(--landing-flow-node) 49% 51%, transparent 53%) left top / 50% 72% no-repeat,
    linear-gradient(-35deg, transparent 47%, var(--landing-flow-node) 49% 51%, transparent 53%) right top / 50% 72% no-repeat,
    rgba(255, 216, 118, .035);
  box-shadow: 0 0 22px rgba(255, 216, 118, .25);
  content: "";
}

.landing-final-orbit::after {
  position: absolute;
  inset: 44px;
  border: 1px dashed rgba(117, 186, 255, .12);
  border-radius: 50%;
  content: "";
}

.landing-footer {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--landing-line);
  color: #66809b;
  font-size: calc(9px + var(--font-size-adjust));
}

.landing-footer a { color: #93a9c0; }

.landing-contact {
  position: fixed;
  z-index: 40;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
}

#landing-contact-button {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-left: auto;
  border: 1px solid rgba(202, 150, 255, .72);
  border-radius: 18px;
  background: linear-gradient(145deg, #a45cff, #7142cf);
  color: white;
  box-shadow: 0 16px 38px rgba(118, 61, 207, .32);
}

#landing-contact-button .ui-icon {
  width: 23px;
  height: 23px;
}

.landing-contact-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 270px;
  max-width: calc(100vw - 30px);
  max-height: calc(100dvh - 96px);
  margin: 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid rgba(172, 138, 222, .35);
  border-radius: 17px;
  background: rgba(16, 22, 39, .96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
  backdrop-filter: blur(16px);
}

.landing-contact-panel > strong {
  display: block;
  padding: 7px 7px 12px;
  color: #f2ecff;
  font-size: calc(11px + var(--font-size-adjust));
}

.landing-contact-panel a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0 9px;
  padding: 9px 8px;
  border-radius: 10px;
  color: #e8def8;
  text-decoration: none;
}

.landing-contact-panel a:hover { background: rgba(156, 91, 234, .11); }

.landing-contact-panel a > span {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 10px;
  background: rgba(156, 91, 234, .15);
  color: #c69aff;
  font-weight: 850;
}

.landing-contact-panel a > span .ui-icon {
  width: 18px;
  height: 18px;
}

.landing-contact-panel a > span .landing-contact-brand-icon {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.landing-contact-panel b { font-size: calc(10px + var(--font-size-adjust)); }
.landing-contact-panel small { color: #aa9abb; font-size: calc(8px + var(--font-size-adjust)); }

.auth-entry-modal {
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(116, 159, 197, .28);
  border-radius: 20px;
  background: #0c192b;
  color: #eaf2fb;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.auth-entry-modal::backdrop {
  background: rgba(2, 8, 17, .78);
  backdrop-filter: blur(8px);
}

.auth-entry-shell {
  position: relative;
  padding: 36px;
}

.auth-entry-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
  color: #9cafc5;
}

.auth-entry-close .ui-icon {
  width: 19px;
  height: 19px;
}

.auth-entry-logo { margin-bottom: 25px; }

.auth-entry-modal h2 {
  margin: 8px 0;
  color: #f7fbff;
  font-size: calc(27px + var(--font-size-adjust));
  letter-spacing: -.045em;
}

.auth-entry-modal .auth-intro { color: #8197b0; }
.auth-entry-modal .field-label { color: #aebdd0; }

.auth-entry-modal .input-wrap {
  border-color: #263b55;
  background: #081524;
}

.auth-entry-modal .input-wrap:focus-within {
  border-color: var(--landing-cyan);
  box-shadow: 0 0 0 3px rgba(101, 228, 213, .1);
}

.auth-entry-modal .input-wrap input { color: #edf5fd; }
.auth-entry-modal .input-wrap > .ui-icon { color: #617b98; }

.auth-entry-modal .submit-button {
  background: var(--landing-cyan);
  color: #06231f;
}

#login-submit {
  margin-top: 12px;
}

.auth-entry-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: #6f859d;
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 700;
  text-transform: uppercase;
}

.auth-entry-divider::before,
.auth-entry-divider::after {
  height: 1px;
  flex: 1;
  background: #263b55;
  content: '';
}

.passkey-login-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgba(101, 228, 213, .48);
  border-radius: 11px;
  background: rgba(101, 228, 213, .08);
  color: #a9f5eb;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 780;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.passkey-login-button:hover:not(:disabled) {
  border-color: var(--landing-cyan);
  background: rgba(101, 228, 213, .14);
  transform: translateY(-1px);
}

.passkey-login-button .ui-icon {
  width: 21px;
  height: 21px;
}

.passkey-login-button.loading .ui-icon {
  animation: spin .75s linear infinite;
}

.passkey-login-note {
  margin: 9px 4px 0;
  color: #748ba4;
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.45;
  text-align: center;
}

.auth-entry-switch,
.auth-security {
  color: #748ba4;
  font-size: calc(9px + var(--font-size-adjust));
  text-align: center;
}

.auth-entry-switch { margin: 22px 0 0; }

.auth-entry-switch button {
  padding: 0;
  background: transparent;
  color: var(--landing-cyan);
  font: inherit;
  font-weight: 760;
}

.auth-entry-modal .auth-security { margin-top: 20px; }

.register-consent {
  display: flex;
  align-items: start;
  gap: 9px;
  margin: 18px 0;
  color: #879bb1;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.45;
}

.register-consent input { margin-top: 2px; accent-color: var(--landing-cyan); }
.register-consent a { color: var(--landing-cyan); }

.registration-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.landing-page :is(a, button):focus-visible,
.auth-entry-modal :is(a, button, input):focus-visible {
  outline: 3px solid var(--landing-yellow);
  outline-offset: 3px;
}

@keyframes landing-route-signal {
  to { offset-distance: 100%; }
}

@keyframes landing-route-node {
  0%, 100% { transform: scale(.82); opacity: .58; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes landing-demo-glow {
  0%, 100% { transform: scale(.94) translate3d(-1%, 1%, 0); opacity: .7; }
  50% { transform: scale(1.04) translate3d(1%, -1%, 0); opacity: 1; }
}

@keyframes landing-demo-sweep {
  0%, 62% { transform: rotate(14deg) translate3d(-240%, 0, 0); opacity: 0; }
  70% { opacity: .7; }
  83%, 100% { transform: rotate(14deg) translate3d(920%, 0, 0); opacity: 0; }
}

@keyframes landing-badge-security {
  0%, 100% { transform: translate3d(0, -2px, 0); }
  50% { transform: translate3d(0, 3px, 0); }
}

@keyframes landing-badge-fast {
  0%, 100% { transform: translate3d(0, 2px, 0); }
  50% { transform: translate3d(0, -3px, 0); }
}

@keyframes landing-sync-symbol {
  to { transform: rotate(360deg); }
}

@keyframes landing-cache-packet {
  0%, 100% { transform: translate3d(-14px, -50%, 0); opacity: .42; }
  48% { opacity: .9; }
  65% { transform: translate3d(20px, -50%, 0); opacity: .78; }
}

@keyframes landing-final-mail-orbit {
  from { transform: rotate(0deg) translateX(154px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(154px) rotate(-360deg); }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1051px) and (hover: hover) and (pointer: fine) {
  .landing-mail-route::before { animation: landing-route-signal 22s linear infinite; }
  .landing-mail-route::after { animation: landing-route-node 3.2s ease-in-out infinite; }
  .landing-hero.is-active .demo-glow { animation: landing-demo-glow 8s ease-in-out infinite; }
  .landing-hero.is-active .demo-window::after { animation: landing-demo-sweep 9s ease-in-out infinite; }
  .landing-hero.is-active .badge-security { animation: landing-badge-security 5.6s ease-in-out infinite; }
  .landing-hero.is-active .badge-fast { animation: landing-badge-fast 4.8s ease-in-out infinite; }
  .landing-hero.is-active .badge-fast > .ui-icon { animation: landing-sync-symbol 9s linear infinite; }
  .storage-section.is-active .storage-metric::before { animation: landing-cache-packet 5.2s ease-in-out infinite; }
  .landing-final-cta.is-active .landing-final-orbit::before { animation: landing-final-mail-orbit 18s linear infinite; }
}

.landing-page.landing-motion-paused .landing-mail-route::before,
.landing-page.landing-motion-paused .landing-mail-route::after,
.landing-page.landing-motion-paused .demo-glow,
.landing-page.landing-motion-paused .demo-window::after,
.landing-page.landing-motion-paused .demo-badge,
.landing-page.landing-motion-paused .badge-fast > .ui-icon,
.landing-page.landing-motion-paused .storage-metric::before,
.landing-page.landing-motion-paused .landing-final-orbit::before {
  animation-play-state: paused !important;
}

html[data-theme="dark"] .auth-screen {
  background: var(--landing-bg);
}

html[data-theme="light"] .auth-screen {
  --landing-bg: #f4f8fc;
  --landing-panel: rgba(255, 255, 255, .84);
  --landing-line: rgba(29, 65, 103, .15);
  --landing-text: #10243d;
  --landing-muted: #566c85;
  --landing-cyan: #066b63;
  --landing-blue: #2466bd;
  --landing-yellow: #965f00;
  --landing-header: rgba(244, 248, 252, .88);
  --landing-flow-line: rgba(28, 103, 139, .24);
  --landing-flow-node: #a56a00;
  --landing-flow-glow: rgba(39, 148, 159, .14);
  scrollbar-color: rgba(8, 127, 118, .55) rgba(218, 228, 238, .7);
  background: var(--landing-bg);
}

html[data-theme="light"] .landing-page {
  background:
    radial-gradient(circle at 82% 9%, rgba(62, 190, 183, .2), transparent 32%),
    radial-gradient(circle at 8% 40%, rgba(63, 124, 211, .13), transparent 30%),
    radial-gradient(circle at 76% 72%, rgba(111, 82, 188, .07), transparent 29%),
    linear-gradient(158deg, rgba(249, 252, 255, .98), rgba(240, 247, 252, .98) 56%, rgba(247, 251, 254, .98)),
    var(--landing-bg);
}

html[data-theme="light"] .landing-page::after {
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .02), rgba(218, 232, 242, .12) 48%, rgba(204, 220, 233, .24)),
    repeating-linear-gradient(132deg, transparent 0 178px, rgba(49, 99, 132, .03) 179px 180px, transparent 181px 356px);
}

html[data-theme="light"] .landing-mail-atmosphere { opacity: .68; }

html[data-theme="light"] .landing-cta.primary::before {
  background: linear-gradient(90deg, transparent, rgba(1, 39, 36, .18), transparent);
}

html[data-theme="light"] .landing-mail-envelope {
  background:
    linear-gradient(34deg, transparent 48.5%, var(--landing-flow-line) 49.3% 50.7%, transparent 51.5%) left top / 50% 74% no-repeat,
    linear-gradient(-34deg, transparent 48.5%, var(--landing-flow-line) 49.3% 50.7%, transparent 51.5%) right top / 50% 74% no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, .38), rgba(224, 239, 247, .16));
  box-shadow: inset 0 0 45px rgba(31, 123, 137, .035), 0 24px 70px rgba(40, 74, 105, .08);
}

html[data-theme="light"] .landing-page::before {
  opacity: .26;
  background-image:
    linear-gradient(rgba(63, 98, 134, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 98, 134, .16) 1px, transparent 1px);
}

html[data-theme="light"] .landing-header-shell { box-shadow: 0 12px 30px rgba(40, 67, 97, .08); }
html[data-theme="light"] .landing-nav a { color: #405c78; }
html[data-theme="light"] .landing-nav a:hover,
html[data-theme="light"] .landing-nav a.active { color: var(--landing-cyan); }

html[data-theme="light"] .landing-language,
html[data-theme="light"] .landing-login,
html[data-theme="light"] .landing-font-size,
html[data-theme="light"] .landing-theme-toggle,
html[data-theme="light"] .landing-cta.secondary,
html[data-theme="light"] .billing-period-switch {
  background: rgba(255, 255, 255, .7);
}

html[data-theme="light"] .landing-page .auth-language { color: #536c87; }
html[data-theme="light"] .landing-page .auth-language.active {
  background: rgba(8, 127, 118, .11);
  color: #056159;
}

html[data-theme="light"] .landing-login,
html[data-theme="light"] .landing-font-size,
html[data-theme="light"] .landing-theme-toggle,
html[data-theme="light"] .landing-cta,
html[data-theme="light"] .landing-scroll-cue { color: #1d3a57; }

html[data-theme="light"] .landing-register,
html[data-theme="light"] .landing-cta.primary,
html[data-theme="light"] .demo-compose,
html[data-theme="light"] .price-card.featured > button,
html[data-theme="light"] .auth-entry-modal .submit-button {
  background: var(--landing-cyan);
  color: #fff;
}

html[data-theme="light"] .landing-hero h1,
html[data-theme="light"] .landing-section h2,
html[data-theme="light"] .landing-feature-grid h3,
html[data-theme="light"] .price-card-top h3,
html[data-theme="light"] .price-value strong { color: #10243d; }

html[data-theme="light"] .landing-hero h1 em {
  background: linear-gradient(90deg, var(--landing-cyan), var(--landing-blue) 62%, #6753b8);
  background-clip: text;
  -webkit-background-clip: text;
}

html[data-theme="light"] .landing-trust { color: #4d6681; }

html[data-theme="light"] .demo-window {
  border-color: rgba(46, 85, 122, .22);
  background: #fff;
  box-shadow: 0 35px 80px rgba(47, 73, 105, .2);
}

html[data-theme="light"] .demo-window-top { background: #f7fafc; }
html[data-theme="light"] .demo-window-top span { background: #91a4b7; }
html[data-theme="light"] .demo-window-top span:first-child { background: #e96862; }
html[data-theme="light"] .demo-window-top span:nth-child(2) { background: #d39720; }
html[data-theme="light"] .demo-window-top span:nth-child(3) { background: #279d92; }
html[data-theme="light"] .demo-window-top b { color: #536d86; }
html[data-theme="light"] .demo-window-body aside { background: #edf4f7; }
html[data-theme="light"] .demo-window-body aside i { background: #c8d8e4; }
html[data-theme="light"] .demo-window-body aside i.active {
  background: #7398b1;
  box-shadow: -5px 0 var(--landing-cyan);
}
html[data-theme="light"] .demo-window-body aside strong { color: #526b84; }
html[data-theme="light"] .demo-inbox { background: #f7fafc; }
html[data-theme="light"] .demo-search { border-color: #c9d8e4; background: #fff; }
html[data-theme="light"] .demo-inbox article { border-top-color: rgba(53, 89, 124, .12); }
html[data-theme="light"] .demo-inbox article.unread { background: rgba(8, 127, 118, .08); }
html[data-theme="light"] .demo-inbox article > span { background: #dceaf0; }
html[data-theme="light"] .demo-inbox b { color: #233e59; }
html[data-theme="light"] .demo-inbox i,
html[data-theme="light"] .demo-letter i { background: #d5e1e9; }
html[data-theme="light"] .demo-inbox time { color: #58718a; }
html[data-theme="light"] .demo-letter h3 { color: #173550; }
html[data-theme="light"] .demo-letter .demo-reply { background: rgba(8, 127, 118, .08); }

html[data-theme="light"] .demo-badge {
  border-color: rgba(44, 81, 117, .2);
  background: rgba(255, 255, 255, .92);
  color: #314d68;
  box-shadow: 0 15px 35px rgba(46, 73, 104, .16);
}

html[data-theme="light"] .landing-feature-grid article,
html[data-theme="light"] .price-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(241, 247, 251, .88));
  box-shadow: inset 0 1px rgba(255, 255, 255, .8), 0 16px 38px rgba(42, 70, 101, .07);
}

html[data-theme="light"] .landing-feature-grid p,
html[data-theme="light"] .price-card ul { color: #506981; }
html[data-theme="light"] .price-card-top p,
html[data-theme="light"] .price-value span,
html[data-theme="light"] .pricing-note,
html[data-theme="light"] .storage-metric small,
html[data-theme="light"] .storage-metric span,
html[data-theme="light"] .landing-footer { color: #526d86; }

html[data-theme="light"] .billing-period-switch button { color: #48627c; }
html[data-theme="light"] .billing-period-switch button.active {
  background: rgba(8, 127, 118, .11);
  color: #056159;
}

html[data-theme="light"] .price-card.featured {
  border-color: rgba(8, 127, 118, .45);
  background: linear-gradient(150deg, rgba(222, 247, 242, .96), rgba(247, 251, 253, .94));
  box-shadow: 0 18px 55px rgba(19, 122, 115, .12);
}

html[data-theme="light"] .popular-label { background: #9a6500; color: #fff; }
html[data-theme="light"] .price-card > button {
  border-color: rgba(42, 100, 151, .25);
  background: rgba(54, 118, 177, .08);
  color: #254f73;
}

html[data-theme="light"] .storage-metric,
html[data-theme="light"] .landing-final-cta::before {
  border-color: rgba(8, 127, 118, .25);
  background: linear-gradient(130deg, rgba(8, 127, 118, .08), rgba(36, 102, 189, .04));
}

html[data-theme="light"] .landing-footer a { color: #365d80; }
html[data-theme="light"] .landing-contact-panel {
  border-color: rgba(102, 64, 157, .24);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 22px 60px rgba(50, 39, 70, .2);
}
html[data-theme="light"] .landing-contact-panel > strong { color: #2a2040; }
html[data-theme="light"] .landing-contact-panel a { color: #3d3152; }
html[data-theme="light"] .landing-contact-panel small { color: #675a79; }

html[data-theme="light"] .auth-entry-modal {
  border-color: rgba(40, 76, 111, .22);
  background: #fff;
  color: #17314b;
  box-shadow: 0 30px 90px rgba(37, 61, 89, .3);
}

html[data-theme="light"] .auth-entry-modal h2 { color: #10243d; }
html[data-theme="light"] .auth-entry-modal .auth-intro,
html[data-theme="light"] .auth-entry-switch,
html[data-theme="light"] .auth-entry-modal .auth-security { color: #586f87; }
html[data-theme="light"] .auth-entry-modal .field-label { color: #3d5872; }
html[data-theme="light"] .auth-entry-modal .input-wrap {
  border-color: #cbd8e5;
  background: #f7fafc;
}
html[data-theme="light"] .auth-entry-modal .input-wrap input { color: #142e48; }
html[data-theme="light"] .auth-entry-modal .input-wrap > .ui-icon { color: #567089; }
html[data-theme="light"] .auth-entry-close { background: #eff4f8; color: #405a74; }
html[data-theme="light"] .auth-entry-divider { color: #596b80; }
html[data-theme="light"] .auth-entry-divider::before,
html[data-theme="light"] .auth-entry-divider::after { background: #dce5ed; }
html[data-theme="light"] .passkey-login-button {
  border-color: #7ad5ca;
  background: #effbf9;
  color: #14786d;
}
html[data-theme="light"] .passkey-login-note { color: #536b83; }
html[data-theme="light"] .register-consent { color: #506981; }

@media (max-width: 1540px) {
  .landing-scroll-nav { display: none; }
}

@media (max-width: 1050px) {
  .landing-nav { display: none; }
  .landing-mail-route { opacity: .42; }
  .landing-mail-envelope--left { opacity: .22; }
  .landing-mail-envelope--right { opacity: .15; }
  .landing-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 80px;
  }
  .landing-hero-copy { max-width: 760px; }
  .landing-mail-demo { min-height: 440px; }
  .demo-window { right: 5%; width: min(90%, 650px); }
  .badge-fast { left: 2%; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-final-cta { grid-template-columns: 1fr; gap: 25px; }
  .landing-final-actions { display: flex; min-width: 0; padding: 0 42px 78px; }
  .landing-final-cta > div:first-of-type { padding: 78px 42px 0; }
}

@media (max-width: 720px) {
  .auth-screen { scroll-padding-top: calc(72px + env(safe-area-inset-top)); }
  .landing-mail-atmosphere { inset: calc(72px + env(safe-area-inset-top)) 0 0; }
  .landing-mail-route { top: 14%; left: -20%; width: 124%; height: 42%; opacity: .28; }
  .landing-mail-envelope--left { top: 18%; left: -70px; width: 155px; opacity: .16; }
  .landing-mail-envelope--right,
  .landing-feature-grid::before,
  .storage-section::before,
  .storage-metric::before { display: none; }
  .landing-header,
  .landing-hero,
  .landing-section,
  .landing-footer {
    width: min(100% - 30px, 1180px);
  }
  .landing-header {
    min-height: 72px;
    gap: 10px;
  }
  .landing-brand small,
  .landing-language,
  .landing-font-size,
  .landing-register { display: none; }
  .landing-header-actions {
    min-width: 0;
    gap: 7px;
  }
  .landing-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-size: calc(9px + var(--font-size-adjust));
    white-space: nowrap;
  }
  .landing-theme-toggle {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .landing-theme-toggle > span:last-child { display: none; }
  .landing-register { padding: 0 12px; font-size: calc(9px + var(--font-size-adjust)); }
  .landing-hero { gap: 30px; padding-top: 62px; padding-bottom: 55px; }
  .landing-hero h1 { font-size: calc(43px + var(--font-size-adjust)); }
  .landing-hero-actions { align-items: stretch; flex-direction: column; }
  .landing-cta { width: 100%; }
  .landing-trust { align-items: flex-start; flex-direction: column; }
  .landing-scroll-cue { display: none; }
  .landing-mail-demo { min-height: 330px; }
  .demo-window { top: 10px; right: 0; width: 100%; transform: none; }
  .demo-window-body { height: 250px; grid-template-columns: 26% 74%; }
  .demo-letter { display: none; }
  .demo-badge { display: none; }
  .landing-section { padding-top: 68px; padding-bottom: 68px; }
  .landing-feature-grid,
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-heading { align-items: flex-start; flex-direction: column; }
  .billing-period-switch { width: 100%; }
  .billing-period-switch button { flex: 1; }
  .price-card { min-height: 380px; }
  .storage-section { grid-template-columns: 1fr; gap: 28px; }
  #benefits,
  #storage { min-height: auto; }
  .landing-final-cta { min-height: 0; }
  .landing-final-cta::before { inset: 22px 0; }
  .landing-final-cta > div:first-of-type { padding: 64px 22px 0; }
  .landing-final-actions { align-items: stretch; flex-direction: column; padding: 0 22px 64px; }
  .landing-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
  .landing-contact { right: 15px; bottom: 15px; }
  #landing-contact-button { width: 50px; height: 50px; }
  .auth-entry-shell { padding: 30px 22px; }
}

@media (max-width: 380px) {
  .landing-header { gap: 8px; }
  .landing-brand > span:last-child { display: none; }
  .landing-header-actions { gap: 6px; }
  .landing-login {
    padding-right: 10px;
    padding-left: 10px;
    font-size: calc(9px + var(--font-size-adjust));
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-screen { scroll-behavior: auto; }
  .landing-scroll-cue .ui-icon { animation: none; }
  .landing-mail-route::before,
  .landing-mail-route::after,
  .demo-glow,
  .demo-window::after,
  .demo-badge,
  .badge-fast > .ui-icon,
  .storage-metric::before,
  .landing-final-orbit::before { animation: none !important; }
  .landing-feature-grid::before { transform: scaleX(1); transition: none; }
}

/* Product-first landing direction inspired by modern focused-email experiences. */
.landing-header,
.landing-hero,
.landing-section,
.landing-footer {
  width: min(1280px, calc(100% - 64px));
}

.landing-header-shell {
  border-bottom-color: rgba(153, 187, 224, .12);
  background: rgba(5, 14, 31, .8);
  box-shadow: none;
}

.landing-hero {
  display: grid;
  min-height: 1080px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  padding-top: clamp(82px, 9vw, 138px);
  padding-bottom: 54px;
  text-align: center;
  isolation: isolate;
}

.landing-hero::before {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: min(1360px, calc(100% + 24px));
  height: 890px;
  transform: translateX(-50%);
  border: 1px solid rgba(133, 185, 255, .14);
  border-radius: 0 0 54px 54px;
  background:
    radial-gradient(circle at 18% 18%, rgba(41, 207, 232, .24), transparent 31%),
    radial-gradient(circle at 82% 24%, rgba(92, 91, 255, .3), transparent 34%),
    radial-gradient(circle at 54% 95%, rgba(53, 142, 255, .27), transparent 38%),
    linear-gradient(145deg, #07172e 4%, #0a2f68 53%, #17154d 100%);
  box-shadow: 0 42px 110px rgba(0, 12, 35, .34);
  content: "";
}

.landing-hero::after {
  position: absolute;
  z-index: 0;
  bottom: -74px;
  left: 50%;
  width: min(1420px, calc(100% + 120px));
  height: 345px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(111, 213, 255, .18);
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at 50% 0, rgba(56, 128, 237, .2), transparent 54%),
    linear-gradient(to bottom, rgba(7, 20, 39, .08), #081424 72%);
  content: "";
}

.landing-hero > * {
  position: relative;
  z-index: 1;
}

.landing-hero-copy {
  width: min(100%, 1050px);
  margin: 0 auto;
}

.landing-kicker {
  padding: 9px 14px;
  border: 1px solid rgba(186, 219, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #d6efff;
  backdrop-filter: blur(12px);
}

.landing-kicker span {
  background: #73e7ff;
  box-shadow: 0 0 0 5px rgba(115, 231, 255, .12);
}

.landing-hero h1 {
  max-width: 1040px;
  margin: 29px auto 25px;
  color: #fff;
  font-size: clamp(calc(58px + var(--font-size-adjust)), calc(7.4vw + var(--font-size-adjust)), calc(104px + var(--font-size-adjust)));
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.02;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.landing-hero h1 em,
html[data-theme="light"] .landing-hero h1 em {
  color: #fff;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.landing-hero-copy > p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(225, 238, 255, .76);
  font-size: calc(18px + var(--font-size-adjust));
  line-height: 1.62;
}

.landing-hero-actions,
.landing-trust {
  justify-content: center;
}

.landing-hero-actions { margin-top: 34px; }

.landing-hero .landing-cta {
  min-height: 54px;
  padding-right: 25px;
  padding-left: 25px;
  border-radius: 10px;
}

.landing-hero .landing-cta.primary {
  border-color: #fff;
  background: #fff;
  color: #0b2347;
  box-shadow: 0 18px 44px rgba(2, 12, 36, .24);
}

.landing-hero .landing-cta.secondary {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  backdrop-filter: blur(12px);
}

.landing-trust {
  width: fit-content;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(4, 16, 40, .23);
  color: rgba(224, 238, 255, .72);
  backdrop-filter: blur(12px);
}

.landing-mail-demo {
  width: min(100%, 1040px);
  min-height: 535px;
  margin: 4px auto 0;
}

.demo-glow {
  top: 2%;
  right: 7%;
  width: 86%;
  height: 92%;
  background: radial-gradient(circle, rgba(71, 181, 255, .3), rgba(87, 92, 255, .12) 42%, transparent 70%);
}

.demo-window {
  top: 36px;
  right: 50%;
  width: min(92%, 900px);
  transform: perspective(1300px) translate3d(calc(50% + var(--landing-demo-x, 0)), var(--landing-demo-y, 0), 0) rotateY(var(--landing-demo-rotate-y, 0deg)) rotateX(calc(2deg + var(--landing-demo-rotate-x, 0deg)));
  border-color: rgba(192, 222, 255, .3);
  border-radius: 20px;
  box-shadow: 0 44px 100px rgba(0, 9, 32, .52), 0 0 0 8px rgba(255, 255, 255, .025);
}

.demo-window-body { height: 430px; }
.badge-fast { bottom: 38px; left: 2%; }
.badge-security { right: 2%; bottom: 10px; }

.landing-scroll-cue {
  bottom: 23px;
  left: 50%;
  transform: translateX(-50%);
}

.landing-page {
  background:
    radial-gradient(circle at 9% 34%, rgba(25, 123, 224, .09), transparent 25%),
    radial-gradient(circle at 91% 61%, rgba(100, 70, 232, .08), transparent 27%),
    linear-gradient(#081222, #091525 41%, #07111f);
}

.landing-page::before {
  opacity: .11;
  background-image: radial-gradient(circle, rgba(171, 207, 243, .5) 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, .58) 28%, transparent 72%);
}

.landing-page::after {
  background:
    linear-gradient(to bottom, transparent 0 38%, rgba(33, 84, 145, .055) 49%, transparent 61%),
    linear-gradient(118deg, transparent 0 49.8%, rgba(117, 186, 255, .025) 50%, transparent 50.2%);
  mask-image: none;
}

.landing-mail-atmosphere {
  opacity: .34;
}

.landing-mail-atmosphere::before {
  background: radial-gradient(circle, rgba(40, 176, 228, .17), rgba(61, 91, 220, .06) 39%, transparent 68%);
}

.landing-mail-atmosphere::after {
  background: radial-gradient(circle, rgba(89, 77, 224, .1), rgba(40, 177, 220, .035) 42%, transparent 70%);
}

.landing-mail-route {
  border-color: rgba(123, 207, 255, .25);
  opacity: .44;
}

.landing-mail-envelope {
  border-color: rgba(126, 204, 255, .22);
  color: rgba(126, 204, 255, .25);
  opacity: .2;
}

.landing-mail-envelope--right { opacity: .14; }

.landing-brand-mark {
  transform: none;
  border-color: rgba(152, 222, 255, .5);
  border-radius: 12px;
  background: linear-gradient(145deg, #36c8f4, #3768e8 58%, #6f4ee8);
  box-shadow: 0 9px 24px rgba(31, 96, 211, .25);
}

.landing-brand-mark::before,
.landing-brand-mark::after,
.landing-brand-mark i {
  background: #fff;
}

.landing-brand-mark i { box-shadow: 7px 0 0 rgba(255, 255, 255, .62); }

.landing-nav { gap: 34px; }

.landing-nav a {
  color: rgba(220, 234, 249, .72);
  font-size: calc(12px + var(--font-size-adjust));
  font-weight: 620;
}

.landing-nav a:hover,
.landing-nav a.active { color: #fff; }

.landing-nav a.active {
  text-decoration-color: #65dfff;
  text-underline-offset: 10px;
}

.landing-register {
  border-color: #2868dc;
  background: #2868dc;
  color: #fff;
  box-shadow: 0 10px 28px rgba(38, 104, 231, .24);
}

.landing-theme-icon,
.landing-page .auth-language.active {
  background: rgba(92, 198, 255, .12);
  color: #76ddff;
}

.landing-scroll-progress span {
  background: linear-gradient(90deg, #43d6f7, #477cf4 55%, #8b5cf6);
  box-shadow: 0 0 14px rgba(71, 124, 244, .48);
}

.landing-scroll-nav a span { color: #6ddfff; }

.landing-section {
  border-top: 0;
  padding-top: 126px;
  padding-bottom: 126px;
}

.landing-section-heading {
  max-width: 830px;
  margin-right: auto;
  margin-bottom: 58px;
  margin-left: auto;
  text-align: center;
}

.landing-section-heading > span,
.landing-section-heading > div > span,
.storage-kicker,
.landing-final-cta > div:first-of-type > span {
  color: #68dbff;
}

.landing-section h2 {
  margin: 16px 0;
  color: #f7fbff;
  font-size: clamp(calc(38px + var(--font-size-adjust)), calc(4.5vw + var(--font-size-adjust)), calc(64px + var(--font-size-adjust)));
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.12;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.landing-section-heading p,
.storage-section > div > p {
  color: #9fb2ca;
  font-size: calc(15px + var(--font-size-adjust));
  line-height: 1.68;
}

#benefits {
  min-height: 930px;
  margin-top: 34px;
  padding-right: clamp(28px, 5vw, 72px);
  padding-left: clamp(28px, 5vw, 72px);
  border: 1px solid rgba(136, 175, 216, .12);
  border-radius: 46px;
  background:
    radial-gradient(circle at 5% 10%, rgba(52, 143, 223, .1), transparent 28%),
    linear-gradient(145deg, rgba(16, 34, 57, .94), rgba(11, 25, 45, .88));
  box-shadow: 0 38px 90px rgba(0, 6, 18, .2);
}

.landing-feature-grid {
  gap: 20px;
}

.landing-feature-grid::before { display: none; }

.landing-feature-grid article {
  min-height: 465px;
  padding: 34px 34px 236px;
  overflow: hidden;
  border-color: rgba(170, 207, 242, .15);
  border-radius: 30px;
  box-shadow: none;
}

.landing-feature-grid article:nth-child(1) {
  background: linear-gradient(150deg, rgba(27, 73, 125, .88), rgba(16, 44, 80, .9));
}

.landing-feature-grid article:nth-child(2) {
  background: linear-gradient(150deg, rgba(54, 48, 112, .88), rgba(29, 31, 73, .92));
}

.landing-feature-grid article:nth-child(3) {
  background: linear-gradient(150deg, rgba(20, 77, 85, .86), rgba(17, 45, 59, .92));
}

.landing-feature-grid article::before {
  inset: auto 24px -25px;
  height: 205px;
  border: 1px solid rgba(216, 235, 255, .17);
  border-radius: 22px 22px 0 0;
  background:
    linear-gradient(90deg, rgba(112, 198, 255, .75) 0 32%, transparent 32%) 18px 24px / 58% 8px no-repeat,
    linear-gradient(90deg, rgba(206, 226, 246, .2) 0 76%, transparent 76%) 18px 45px / 82% 5px no-repeat,
    linear-gradient(90deg, rgba(206, 226, 246, .16) 0 58%, transparent 58%) 18px 59px / 72% 5px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 36px, rgba(190, 218, 247, .09) 37px 38px),
    rgba(7, 20, 40, .58);
  box-shadow: 0 24px 50px rgba(1, 8, 24, .25);
  opacity: 1;
  transform: perspective(700px) rotateX(4deg);
  transform-origin: bottom center;
}

.landing-feature-grid article:nth-child(2)::before {
  background:
    radial-gradient(circle, #f2bd77 0 8px, transparent 9px) 20px 23px / 22px 22px no-repeat,
    linear-gradient(90deg, rgba(209, 220, 255, .28) 0 74%, transparent 74%) 56px 26px / 63% 6px no-repeat,
    linear-gradient(90deg, rgba(143, 123, 255, .55) 0 42%, transparent 42%) 56px 42px / 65% 5px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 42px, rgba(205, 213, 255, .09) 43px 44px),
    rgba(13, 17, 48, .62);
}

.landing-feature-grid article:nth-child(3)::before {
  background:
    linear-gradient(90deg, rgba(103, 231, 210, .7) 0 48%, transparent 48%) 20px 25px / 62% 8px no-repeat,
    linear-gradient(90deg, rgba(207, 241, 237, .22) 0 85%, transparent 85%) 20px 48px / 84% 5px no-repeat,
    linear-gradient(90deg, rgba(207, 241, 237, .17) 0 67%, transparent 67%) 20px 63px / 72% 5px no-repeat,
    radial-gradient(circle at 80% 70%, rgba(82, 225, 205, .22), transparent 28%),
    rgba(6, 30, 36, .56);
}

.landing-feature-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(147, 211, 255, .3);
  box-shadow: 0 22px 50px rgba(0, 8, 24, .16);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, .15);
  border-radius: 15px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.landing-feature-grid h3 {
  margin-top: 26px;
  color: #fff;
  font-size: calc(22px + var(--font-size-adjust));
  letter-spacing: .006em;
  line-height: 1.28;
}

.landing-feature-grid p {
  color: rgba(224, 237, 250, .72);
  font-size: calc(12px + var(--font-size-adjust));
}

.pricing-section {
  padding-top: 150px;
  padding-bottom: 150px;
}

.pricing-heading {
  max-width: none;
  align-items: end;
  margin-bottom: 54px;
  text-align: left;
}

.pricing-heading > div:first-child { max-width: 790px; }

.billing-period-switch {
  padding: 5px;
  border-color: rgba(145, 181, 219, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}

.billing-period-switch button {
  min-height: 42px;
  border-radius: 10px;
}

.billing-period-switch button.active {
  background: #2868dc;
  color: #fff;
}

.billing-period-switch span { color: #8de5ff; }

.pricing-grid { gap: 18px; }

.price-card {
  min-height: 448px;
  padding: 25px;
  border-color: rgba(142, 177, 215, .15);
  border-radius: 24px;
  background: rgba(15, 30, 51, .84);
  box-shadow: 0 16px 42px rgba(0, 7, 20, .12);
}

.price-card::before {
  background: radial-gradient(circle at 15% 4%, rgba(84, 164, 255, .11), transparent 44%);
}

.price-card:hover {
  border-color: rgba(104, 179, 255, .34);
  box-shadow: 0 24px 55px rgba(0, 7, 22, .18);
}

.price-card.featured {
  border-color: rgba(100, 205, 255, .48);
  background:
    radial-gradient(circle at 90% 4%, rgba(102, 93, 255, .25), transparent 34%),
    linear-gradient(148deg, #103969, #17245b 70%, #221b5a);
  box-shadow: 0 24px 65px rgba(26, 75, 178, .22);
}

.popular-label {
  border-radius: 999px;
  background: #fff;
  color: #173c72;
}

.price-icon {
  border-color: rgba(101, 202, 255, .2);
  background: rgba(76, 159, 255, .1);
  color: #75dfff;
}

.price-card-top h3 {
  font-size: calc(17px + var(--font-size-adjust));
  letter-spacing: .005em;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.price-value strong { font-size: calc(35px + var(--font-size-adjust)); }

.price-card > button {
  min-height: 47px;
  border-color: rgba(92, 161, 243, .25);
  border-radius: 10px;
  background: rgba(67, 131, 234, .1);
  color: #dcecff;
}

.price-card.featured > button {
  border-color: #fff;
  background: #fff;
  color: #123a72;
}

.storage-section {
  min-height: 570px;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 90px;
  padding-right: clamp(34px, 7vw, 94px);
  padding-left: clamp(34px, 7vw, 94px);
  overflow: hidden;
  border: 1px solid rgba(155, 199, 242, .16);
  border-radius: 46px;
  background:
    radial-gradient(circle at 92% 15%, rgba(77, 97, 255, .4), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(38, 196, 223, .22), transparent 35%),
    linear-gradient(135deg, #0c2c5d, #142760 60%, #201a57);
  box-shadow: 0 38px 95px rgba(0, 8, 30, .28);
}

.storage-section::before {
  z-index: 0;
  top: auto;
  right: -130px;
  bottom: -210px;
  left: auto;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(177, 217, 255, .17);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(87, 103, 255, .16), transparent 66%);
}

.storage-section h2 { color: #fff; }

.storage-section > div > p {
  max-width: 760px;
  color: rgba(222, 237, 255, .72);
}

.storage-kicker { color: #80e6ff; }

.storage-metric {
  padding: 34px;
  border-color: rgba(255, 255, 255, .2);
  border-radius: 24px;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 24px 60px rgba(0, 8, 30, .19);
  backdrop-filter: blur(16px);
}

.storage-metric::before { display: none; }

.storage-metric small,
.storage-metric span { color: rgba(230, 241, 255, .7); }

.storage-metric strong {
  color: #fff;
  font-size: calc(43px + var(--font-size-adjust));
}

.landing-final-cta {
  min-height: 590px;
  margin-top: 80px;
  margin-bottom: 40px;
  gap: clamp(38px, 8vw, 110px);
}

.landing-final-cta::before {
  inset: 40px 0;
  border-color: rgba(149, 200, 255, .17);
  border-radius: 46px;
  background:
    radial-gradient(circle at 12% 20%, rgba(48, 197, 235, .25), transparent 32%),
    radial-gradient(circle at 87% 22%, rgba(119, 81, 246, .32), transparent 36%),
    linear-gradient(135deg, #091f42, #15235a 58%, #27175c);
  box-shadow: 0 36px 90px rgba(0, 8, 28, .24);
}

.landing-final-cta > div:first-of-type {
  max-width: 760px;
  padding-left: clamp(36px, 7vw, 88px);
}

.landing-final-cta h2 { color: #fff; }

.landing-final-cta p { color: rgba(222, 236, 253, .72); }

.landing-final-actions { padding-right: clamp(36px, 7vw, 88px); }

.landing-final-cta .landing-cta.primary {
  border-color: #fff;
  background: #fff;
  color: #15396a;
  box-shadow: 0 17px 42px rgba(0, 8, 30, .24);
}

.landing-final-cta .landing-cta.secondary {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.landing-final-orbit {
  transform: translate3d(var(--landing-scene-x, 0), calc(-50% + var(--landing-scene-y, 0px)), 0) rotate(var(--landing-scene-rotate, 0deg));
  border-color: rgba(149, 212, 255, .16);
  box-shadow: 0 0 100px rgba(76, 106, 255, .13), inset 0 0 80px rgba(74, 197, 255, .07);
}

.landing-footer {
  border-top-color: rgba(143, 178, 214, .12);
}

#landing-contact-button {
  border-color: rgba(124, 211, 255, .7);
  background: linear-gradient(145deg, #1674ad, #285fcf 58%, #6542cf);
  box-shadow: 0 16px 40px rgba(40, 98, 220, .34);
}

.landing-motion-scene {
  isolation: isolate;
}

.landing-motion-scene > :not(.landing-parallax-scene) {
  position: relative;
  z-index: 1;
}

.landing-parallax-scene {
  --landing-scene-accent: rgba(103, 220, 255, .66);
  --landing-scene-line: rgba(109, 184, 255, .2);
  position: absolute;
  z-index: 0;
  width: 310px;
  aspect-ratio: 1;
  transform: translate3d(var(--landing-scene-x, 0), var(--landing-scene-y, 0), 0) rotate(var(--landing-scene-rotate, 0deg));
  contain: layout paint;
  border-radius: 50%;
  opacity: .58;
  pointer-events: none;
}

.landing-parallax-scene::before,
.landing-parallax-scene::after,
.landing-parallax-scene i {
  position: absolute;
  pointer-events: none;
  content: "";
}

.landing-parallax-scene::before {
  inset: 8%;
  border: 1px dashed var(--landing-scene-line);
  border-radius: 50%;
  background:
    conic-gradient(from 55deg, transparent 0 31%, rgba(99, 211, 255, .14) 33%, transparent 36% 71%, rgba(128, 104, 255, .15) 73%, transparent 77%);
}

.landing-parallax-scene::after {
  inset: 25%;
  border: 1px solid rgba(118, 205, 255, .13);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(91, 209, 244, .16), rgba(86, 88, 238, .05) 48%, transparent 72%);
}

.landing-parallax-scene i:first-of-type {
  top: 0;
  left: 0;
  width: 27px;
  height: 18px;
  offset-path: circle(43% at 50% 50%);
  offset-distance: 12%;
  offset-rotate: 0deg;
  border: 1px solid var(--landing-scene-accent);
  border-radius: 5px;
  background:
    linear-gradient(35deg, transparent 47%, var(--landing-scene-accent) 49% 51%, transparent 53%) left top / 50% 72% no-repeat,
    linear-gradient(-35deg, transparent 47%, var(--landing-scene-accent) 49% 51%, transparent 53%) right top / 50% 72% no-repeat,
    rgba(68, 165, 236, .04);
  box-shadow: 0 0 22px rgba(71, 180, 244, .17);
}

.landing-parallax-scene i:last-of-type {
  top: 19%;
  right: 17%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--landing-scene-accent);
  box-shadow: 0 0 0 7px rgba(89, 196, 246, .07), 0 0 25px rgba(89, 196, 246, .28);
}

.landing-parallax-scene--benefits {
  top: 14%;
  right: -74px;
}

.landing-parallax-scene--pricing {
  top: 8%;
  left: -112px;
  width: 285px;
  opacity: .46;
}

.landing-parallax-scene--storage {
  --landing-scene-accent: rgba(166, 236, 255, .76);
  --landing-scene-line: rgba(176, 220, 255, .25);
  top: 2%;
  right: 1%;
  width: 360px;
  opacity: .68;
}

@keyframes landing-scene-ring {
  to { transform: rotate(360deg); }
}

@keyframes landing-scene-packet {
  to { offset-distance: 112%; }
}

@keyframes landing-scene-pulse {
  0%, 100% { transform: scale(.78); opacity: .48; }
  50% { transform: scale(1.16); opacity: 1; }
}

@keyframes landing-feature-preview-float {
  0%, 100% { transform: perspective(700px) translate3d(0, 0, 0) rotateX(4deg); }
  50% { transform: perspective(700px) translate3d(0, -6px, 0) rotateX(3deg); }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1051px) and (hover: hover) and (pointer: fine) {
  .landing-parallax-scene,
  .landing-final-orbit { will-change: transform; }
  .landing-section.is-active .landing-parallax-scene::before { animation: landing-scene-ring 28s linear infinite; }
  .landing-section.is-active .landing-parallax-scene i:first-of-type { animation: landing-scene-packet 15s linear infinite; }
  .landing-section.is-active .landing-parallax-scene i:last-of-type { animation: landing-scene-pulse 3.8s ease-in-out infinite; }
  #benefits.is-active .landing-feature-grid article::before { animation: landing-feature-preview-float 7.5s ease-in-out infinite; }
  #benefits.is-active .landing-feature-grid article:nth-child(2)::before { animation-delay: -2.4s; }
  #benefits.is-active .landing-feature-grid article:nth-child(3)::before { animation-delay: -4.8s; }
}

.landing-page.landing-motion-paused .landing-parallax-scene::before,
.landing-page.landing-motion-paused .landing-parallax-scene i,
.landing-page.landing-motion-paused .landing-feature-grid article::before {
  animation-play-state: paused !important;
}

html[data-theme="light"] .landing-header-shell {
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 1px 0 rgba(26, 63, 105, .08);
}

html[data-theme="light"] .landing-hero h1 { color: #fff; }

html[data-theme="light"] .landing-page {
  background:
    radial-gradient(circle at 8% 37%, rgba(53, 142, 224, .065), transparent 27%),
    radial-gradient(circle at 92% 65%, rgba(112, 86, 224, .055), transparent 28%),
    linear-gradient(#f7f9fc, #fff 42%, #f6f8fb);
}

html[data-theme="light"] .landing-page::before {
  opacity: .13;
  background-image: radial-gradient(circle, rgba(48, 91, 139, .34) 1px, transparent 1.5px);
}

html[data-theme="light"] .landing-page::after {
  background:
    linear-gradient(to bottom, transparent 0 38%, rgba(58, 113, 178, .035) 49%, transparent 61%),
    linear-gradient(118deg, transparent 0 49.8%, rgba(50, 98, 158, .02) 50%, transparent 50.2%);
}

html[data-theme="light"] .landing-mail-atmosphere { opacity: .2; }

html[data-theme="light"] .landing-brand { color: #132943; }
html[data-theme="light"] .landing-brand small { color: #60758c; }
html[data-theme="light"] .landing-nav a { color: #536a84; }
html[data-theme="light"] .landing-nav a:hover,
html[data-theme="light"] .landing-nav a.active { color: #1d57a4; }

html[data-theme="light"] .landing-register {
  border-color: #2868dc;
  background: #2868dc;
  color: #fff;
}

html[data-theme="light"] .landing-theme-icon,
html[data-theme="light"] .landing-page .auth-language.active {
  background: rgba(34, 111, 211, .1);
  color: #1c5cae;
}

html[data-theme="light"] .landing-section h2 { color: #13263e; }

html[data-theme="light"] .landing-section-heading p,
html[data-theme="light"] .storage-section > div > p { color: #5a7089; }

html[data-theme="light"] .landing-section-heading > span,
html[data-theme="light"] .landing-section-heading > div > span { color: #1d63b7; }

html[data-theme="light"] #benefits {
  border-color: rgba(41, 81, 128, .08);
  background: #fff;
  box-shadow: 0 34px 90px rgba(33, 64, 103, .09);
}

html[data-theme="light"] .landing-feature-grid article {
  border-color: rgba(53, 88, 128, .1);
  box-shadow: none;
}

html[data-theme="light"] .landing-feature-grid article:nth-child(1) {
  background: linear-gradient(150deg, #eaf5ff, #dcecff);
}

html[data-theme="light"] .landing-feature-grid article:nth-child(2) {
  background: linear-gradient(150deg, #f2efff, #e6e4ff);
}

html[data-theme="light"] .landing-feature-grid article:nth-child(3) {
  background: linear-gradient(150deg, #e9faf7, #dff4f0);
}

html[data-theme="light"] .landing-feature-grid article::before {
  border-color: rgba(36, 78, 123, .12);
  background:
    linear-gradient(90deg, #4b9be8 0 32%, transparent 32%) 18px 24px / 58% 8px no-repeat,
    linear-gradient(90deg, rgba(49, 83, 119, .2) 0 76%, transparent 76%) 18px 45px / 82% 5px no-repeat,
    linear-gradient(90deg, rgba(49, 83, 119, .15) 0 58%, transparent 58%) 18px 59px / 72% 5px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 36px, rgba(58, 91, 126, .08) 37px 38px),
    rgba(255, 255, 255, .78);
  box-shadow: 0 22px 45px rgba(35, 72, 111, .12);
}

html[data-theme="light"] .landing-feature-grid article:nth-child(2)::before {
  background:
    radial-gradient(circle, #e6a85e 0 8px, transparent 9px) 20px 23px / 22px 22px no-repeat,
    linear-gradient(90deg, rgba(61, 69, 121, .2) 0 74%, transparent 74%) 56px 26px / 63% 6px no-repeat,
    linear-gradient(90deg, rgba(105, 86, 221, .42) 0 42%, transparent 42%) 56px 42px / 65% 5px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 42px, rgba(70, 75, 134, .08) 43px 44px),
    rgba(255, 255, 255, .76);
}

html[data-theme="light"] .landing-feature-grid article:nth-child(3)::before {
  background:
    linear-gradient(90deg, #43a996 0 48%, transparent 48%) 20px 25px / 62% 8px no-repeat,
    linear-gradient(90deg, rgba(43, 96, 88, .18) 0 85%, transparent 85%) 20px 48px / 84% 5px no-repeat,
    linear-gradient(90deg, rgba(43, 96, 88, .13) 0 67%, transparent 67%) 20px 63px / 72% 5px no-repeat,
    radial-gradient(circle at 80% 70%, rgba(67, 169, 150, .13), transparent 28%),
    rgba(255, 255, 255, .76);
}

html[data-theme="light"] .feature-icon {
  border-color: rgba(31, 72, 117, .1);
  background: rgba(255, 255, 255, .78);
  color: #245ea5;
}

html[data-theme="light"] .landing-feature-grid h3 { color: #142b47; }
html[data-theme="light"] .landing-feature-grid p { color: #536b84; }

html[data-theme="light"] .billing-period-switch {
  border-color: rgba(45, 82, 124, .13);
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 72, 108, .07);
}

html[data-theme="light"] .billing-period-switch button.active {
  background: #2868dc;
  color: #fff;
}

html[data-theme="light"] .billing-period-switch span { color: #1f5b9f; }

html[data-theme="light"] .price-card {
  border-color: rgba(45, 80, 121, .11);
  background: #fff;
  box-shadow: 0 18px 45px rgba(32, 62, 98, .08);
}

html[data-theme="light"] .price-card:hover {
  border-color: rgba(42, 106, 187, .27);
  box-shadow: 0 25px 58px rgba(32, 67, 109, .12);
}

html[data-theme="light"] .price-card.featured {
  border-color: rgba(48, 108, 221, .38);
  background:
    radial-gradient(circle at 95% 4%, rgba(108, 85, 238, .12), transparent 36%),
    linear-gradient(148deg, #eef6ff, #f3f1ff);
  box-shadow: 0 23px 60px rgba(47, 91, 177, .14);
}

html[data-theme="light"] .popular-label {
  background: #2868dc;
  color: #fff;
}

html[data-theme="light"] .price-icon {
  border-color: rgba(39, 104, 183, .14);
  background: rgba(45, 119, 210, .08);
  color: #245fa7;
}

html[data-theme="light"] .price-card > button {
  border-color: rgba(37, 96, 168, .2);
  background: rgba(40, 105, 184, .07);
  color: #204f88;
}

html[data-theme="light"] .price-card.featured > button {
  border-color: #2868dc;
  background: #2868dc;
  color: #fff;
}

html[data-theme="light"] .storage-section h2,
html[data-theme="light"] .landing-final-cta h2 { color: #fff; }

html[data-theme="light"] .storage-section > div > p,
html[data-theme="light"] .landing-final-cta p { color: rgba(222, 237, 255, .75); }

html[data-theme="light"] .storage-metric {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
}

html[data-theme="light"] .storage-metric small,
html[data-theme="light"] .storage-metric span { color: rgba(232, 243, 255, .72); }
html[data-theme="light"] .storage-metric strong { color: #fff; }

html[data-theme="light"] .landing-final-cta .landing-cta.primary {
  border-color: #fff;
  background: #fff;
  color: #15396a;
}

html[data-theme="light"] .landing-final-cta .landing-cta.secondary {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

html[data-theme="light"] .landing-final-cta::before {
  border-color: rgba(149, 200, 255, .17);
  background:
    radial-gradient(circle at 12% 20%, rgba(48, 197, 235, .25), transparent 32%),
    radial-gradient(circle at 87% 22%, rgba(119, 81, 246, .32), transparent 36%),
    linear-gradient(135deg, #091f42, #15235a 58%, #27175c);
  box-shadow: 0 36px 90px rgba(0, 8, 28, .24);
}

html[data-theme="light"] .landing-final-cta > div:first-of-type > span {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(3, 20, 52, .78);
  color: #a9f3ff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

html[data-theme="light"] .landing-hero .landing-cta.primary {
  border-color: #fff;
  background: #fff;
  color: #0b2347;
}

html[data-theme="light"] .landing-hero .landing-cta.secondary {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

html[data-theme="light"] .landing-hero .landing-trust {
  color: rgba(224, 238, 255, .82);
}

html[data-theme="light"] .landing-hero .landing-trust .ui-icon {
  color: #a9f3ff;
}

html[data-theme="light"] .landing-hero .landing-scroll-cue {
  color: rgba(224, 238, 255, .82);
}

html[data-theme="light"] .landing-hero .landing-scroll-cue .ui-icon {
  border-color: rgba(255, 255, 255, .24);
  color: #bcefff;
}

@media (max-width: 1180px) {
  .landing-nav { display: none; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .landing-header,
  .landing-hero,
  .landing-section,
  .landing-footer {
    width: min(100% - 40px, 1280px);
  }

  .landing-hero {
    min-height: 1020px;
    gap: 18px;
    padding-top: 92px;
  }

  .landing-mail-demo { min-height: 500px; }
  .demo-window { right: 50%; width: min(94%, 820px); }
  .landing-mail-envelope { display: none; }
  .landing-parallax-scene { display: none; }
  #benefits { min-height: auto; }
  .landing-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-feature-grid article:last-child { grid-column: 1 / -1; }
  .storage-section {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 76px clamp(25px, 5vw, 48px);
  }
}

@media (max-width: 720px) {
  .landing-header,
  .landing-hero,
  .landing-section,
  .landing-footer {
    width: min(100% - 30px, 1280px);
  }

  .landing-hero {
    min-height: auto;
    gap: 20px;
    padding-top: 62px;
    padding-bottom: 64px;
  }

  .landing-hero::before {
    width: calc(100% + 18px);
    height: 720px;
    border-radius: 0 0 32px 32px;
  }

  .landing-hero::after {
    bottom: -28px;
    width: calc(100% + 46px);
    height: 190px;
  }

  .landing-kicker { padding: 8px 11px; font-size: calc(8px + var(--font-size-adjust)); }
  .landing-hero h1 { margin-top: 24px; font-size: calc(47px + var(--font-size-adjust)); line-height: 1.06; }
  .landing-hero-copy > p { font-size: calc(14px + var(--font-size-adjust)); }
  .landing-trust { width: 100%; align-items: flex-start; border-radius: 18px; }
  .landing-mail-demo { min-height: 330px; margin-top: 2px; }
  .demo-window { top: 8px; right: 50%; width: 100%; transform: translateX(50%); }
  .demo-window-body { height: 250px; }
  .landing-section { padding-top: 82px; padding-bottom: 82px; }
  .landing-section-heading { margin-bottom: 42px; }
  .landing-section h2 { font-size: calc(38px + var(--font-size-adjust)); }
  #benefits {
    margin-top: 18px;
    padding-right: 20px;
    padding-left: 20px;
    border-radius: 30px;
  }
  .landing-feature-grid article {
    min-height: 420px;
    padding: 28px 28px 210px;
    border-radius: 22px;
  }
  .landing-feature-grid { grid-template-columns: 1fr; }
  .landing-feature-grid article:last-child { grid-column: auto; }
  .pricing-grid { grid-template-columns: 1fr; }
  .landing-feature-grid article::before { right: 18px; bottom: -30px; left: 18px; }
  .pricing-section { padding-top: 104px; padding-bottom: 104px; }
  .pricing-heading { margin-bottom: 42px; }
  .storage-section {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 76px 25px;
    border-radius: 30px;
  }
  .storage-metric { padding: 28px; }
  .landing-final-cta {
    min-height: 0;
    margin-top: 48px;
    margin-bottom: 24px;
  }
  .landing-final-cta::before { border-radius: 30px; }
  .landing-final-cta > div:first-of-type { padding: 70px 24px 0; }
  .landing-final-actions { padding: 0 24px 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-parallax-scene,
  .landing-final-orbit {
    transform: none !important;
    will-change: auto;
  }
  .landing-final-orbit { transform: translateY(-50%) !important; }
  .landing-parallax-scene::before,
  .landing-parallax-scene i,
  .landing-feature-grid article::before { animation: none !important; }
}

/* Subscription cabinet */
.cabinet-modal {
  --cabinet-viewport-gap: 32px;
  width: calc(100vw - var(--cabinet-viewport-gap));
  max-width: calc(100vw - var(--cabinet-viewport-gap));
  max-height: calc(100dvh - var(--cabinet-viewport-gap));
}

.cabinet-shell {
  max-height: calc(100dvh - var(--cabinet-viewport-gap));
  overflow: auto;
  overscroll-behavior: contain;
  background: #f7f9fc;
}

.cabinet-header {
  position: sticky;
  z-index: 3;
  top: 0;
  padding: 13px 16px 11px;
  border-bottom: 1px solid #e2e8f1;
  background: rgba(247, 249, 252, .94);
  backdrop-filter: blur(14px);
}

.cabinet-header h2 {
  font-size: calc(17px + var(--font-size-adjust));
}

.cabinet-header .eyebrow {
  margin-bottom: 3px;
}

.cabinet-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #74839a;
}

.cabinet-content {
  display: grid;
  grid-template-columns: minmax(250px, .84fr) minmax(350px, 1.16fr);
  flex: 0 0 auto;
  gap: 10px;
  padding: 12px;
}

.cabinet-content > *,
.cabinet-summary-grid > section > div {
  min-width: 0;
}

.cabinet-profile-card,
.cabinet-passkeys-card,
.cabinet-storage-card,
.cabinet-billing-card,
.cabinet-invoices,
.cabinet-summary-grid > section {
  border: 1px solid #e0e6ef;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(31, 48, 75, .045);
}

.cabinet-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
}

.cabinet-profile-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.cabinet-profile-main > div {
  min-width: 0;
}

.cabinet-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #1574d6, #5d9ce7);
  color: #fff;
  font-size: calc(15px + var(--font-size-adjust));
  font-weight: 820;
}

.cabinet-profile-main strong,
.cabinet-profile-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-profile-main strong {
  color: #17233a;
  font-size: calc(14px + var(--font-size-adjust));
}

.cabinet-profile-main span {
  margin-top: 2px;
  color: #7c8a9e;
  font-size: calc(10px + var(--font-size-adjust));
}

.cabinet-status-badge,
.cabinet-current-plan {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #bcebd9;
  border-radius: 999px;
  background: #edfbf5;
  color: #16835f;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 780;
}

.cabinet-status-badge.trial {
  border-color: #bedafb;
  background: #edf6ff;
  color: #206fb8;
}

.cabinet-status-badge.expired {
  border-color: #ffd0cf;
  background: #fff1f0;
  color: #c7433f;
}

.cabinet-name-form {
  display: none;
  min-width: 0;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #edf0f5;
}

.cabinet-name-form.editing { display: grid; }

.cabinet-name-form label {
  color: #65748a;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 720;
}

.cabinet-name-form > div {
  display: flex;
  gap: 8px;
}

.cabinet-name-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid #d7dfea;
  border-radius: 9px;
}

.cabinet-name-form button {
  padding: 0 14px;
  border-radius: 9px;
  background: #166fc8;
  color: #fff;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 750;
}

.cabinet-profile-main { cursor: pointer; }

.cabinet-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cabinet-summary-grid > section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
}

.cabinet-summary-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #edf5ff;
  color: #277bd0;
}

.cabinet-summary-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.cabinet-summary-grid small,
.cabinet-summary-grid strong {
  display: block;
}

.cabinet-summary-grid small {
  color: #7b899e;
  font-size: calc(9px + var(--font-size-adjust));
}

.cabinet-summary-grid strong {
  margin-top: 2px;
  color: #26344b;
  font-size: calc(13px + var(--font-size-adjust));
  font-weight: 780;
}

.cabinet-storage-card,
.cabinet-billing-card,
.cabinet-invoices,
.cabinet-passkeys-card {
  padding: 14px;
}

.cabinet-storage-card { grid-column: 1; }
.cabinet-billing-card { grid-column: 2; }
.cabinet-invoices { grid-column: 1 / -1; }
.cabinet-passkeys-card { grid-column: 1 / -1; }

.cabinet-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cabinet-section-title .eyebrow {
  margin: 0 0 3px;
  color: #2979c9;
}

.cabinet-section-title h3 {
  margin: 0;
  color: #1d2b42;
  font-size: calc(13px + var(--font-size-adjust));
}

.cabinet-section-title > strong {
  color: #2e668f;
  font-size: calc(13px + var(--font-size-adjust));
}

.cabinet-storage-row {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.cabinet-storage-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #526278;
  font-size: calc(10px + var(--font-size-adjust));
}

.cabinet-storage-row small { color: #8390a2; }

.cabinet-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf0f6;
}

.cabinet-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3c87da, #68cbbd);
  transition: width .25s ease;
}

.cabinet-storage-card > p {
  margin: 12px 0 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f0faf7;
  color: #477067;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.35;
}

.cabinet-storage-card > p .ui-icon {
  margin-right: 5px;
  color: #20a479;
}

.cabinet-passkeys-title {
  align-items: flex-start;
}

.cabinet-passkeys-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #eaf7f4;
  color: #148a76;
}

.cabinet-passkeys-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.cabinet-passkeys-description,
.cabinet-passkeys-capability,
.cabinet-passkeys-empty {
  margin: 9px 0 0;
  color: #586b81;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.42;
}

.cabinet-passkeys-capability {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #206f65;
  font-weight: 700;
}

.cabinet-passkeys-capability::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #22a98d;
  box-shadow: 0 0 0 4px rgba(34, 169, 141, .1);
  content: '';
}

.cabinet-passkeys-capability[data-state="checking"]::before {
  animation: cabinet-passkey-pulse 1s ease-in-out infinite alternate;
}

.cabinet-passkeys-capability[data-state="install"]::before,
.cabinet-passkeys-capability[data-state="unsupported"]::before,
.cabinet-passkeys-capability[data-state="insecure"]::before {
  background: #d69228;
  box-shadow: 0 0 0 4px rgba(214, 146, 40, .1);
}

.cabinet-passkeys-list {
  display: grid;
  gap: 7px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.cabinet-passkeys-list:empty { display: none; }

.cabinet-passkey-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  background: #f8fafc;
}

.cabinet-passkey-item-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: #eaf7f4;
  color: #168b76;
}

.cabinet-passkey-item-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.cabinet-passkey-item-copy {
  min-width: 0;
}

.cabinet-passkey-item-copy strong,
.cabinet-passkey-item-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-passkey-item-copy strong {
  color: #26344b;
  font-size: calc(10px + var(--font-size-adjust));
}

.cabinet-passkey-item-copy small {
  margin-top: 2px;
  color: #596b80;
  font-size: calc(8px + var(--font-size-adjust));
}

.cabinet-passkey-remove {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: #8491a3;
}

.cabinet-passkey-remove:hover:not(:disabled) {
  background: #fff0ef;
  color: #bc433d;
}

.cabinet-passkeys-error {
  margin-top: 9px;
}

.cabinet-passkeys-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #e8edf3;
}

#cabinet-passkeys-count {
  color: #596b80;
  font-size: calc(9px + var(--font-size-adjust));
}

#cabinet-passkey-register {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 9px;
  background: #1676c8;
  color: #fff;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 760;
}

#cabinet-passkey-register .ui-icon {
  width: 18px;
  height: 18px;
}

#cabinet-passkey-register.loading .ui-icon {
  animation: spin .75s linear infinite;
}

.cabinet-passkey-password-form {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #cfe0ef;
  border-radius: 10px;
  background: #f4f9fd;
}

.cabinet-passkey-password-form > label {
  color: #41556d;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 720;
}

.cabinet-passkey-password-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 7px;
}

.cabinet-passkey-password-row .input-wrap {
  min-width: 0;
  min-height: 38px;
  border-color: #cad8e6;
  background: #fff;
}

.cabinet-passkey-password-row button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 740;
}

#cabinet-passkey-password-confirm {
  background: #1676c8;
  color: #fff;
}

@keyframes cabinet-passkey-pulse {
  from { opacity: .42; transform: scale(.82); }
  to { opacity: 1; transform: scale(1); }
}

.cabinet-plan-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 13px;
}

.cabinet-plan-picker button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  background: #fafbfd;
  color: #526177;
  text-align: left;
}

.cabinet-plan-picker button.active {
  border-color: #4d98db;
  background: #edf6ff;
  box-shadow: 0 0 0 2px rgba(46, 132, 211, .08);
}

.cabinet-plan-picker span {
  color: #64738a;
  font-size: calc(9px + var(--font-size-adjust));
  overflow-wrap: anywhere;
}

.cabinet-plan-picker strong {
  color: #1c2c44;
  font-size: calc(14px + var(--font-size-adjust));
}

.cabinet-plan-picker small {
  color: #8794a7;
  font-size: calc(8px + var(--font-size-adjust));
}

.cabinet-period-picker {
  display: flex;
  gap: 5px;
  margin-top: 9px;
  padding: 3px;
  border-radius: 9px;
  background: #edf1f6;
}

.cabinet-period-picker button {
  min-height: 34px;
  flex: 1;
  border-radius: 8px;
  background: transparent;
  color: #6d7d92;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 720;
}

.cabinet-period-picker button.active {
  background: #fff;
  color: #226fba;
  box-shadow: 0 3px 12px rgba(43, 67, 97, .08);
}

.cabinet-period-picker span { color: #df8b17; }

.cabinet-payment-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8edf3;
}

.cabinet-payment-line small,
.cabinet-payment-line strong {
  display: block;
}

.cabinet-payment-line small {
  color: #8090a4;
  font-size: calc(9px + var(--font-size-adjust));
}

.cabinet-payment-line strong {
  margin-top: 3px;
  color: #17283e;
  font-size: calc(20px + var(--font-size-adjust));
}

#cabinet-payment-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 9px;
  background: #8e44d7;
  color: #fff;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 780;
  box-shadow: 0 6px 18px rgba(117, 54, 177, .16);
}

#cabinet-payment-button .ui-icon {
  width: 16px;
  height: 16px;
}

#cabinet-payment-button:disabled {
  background: #b5becb;
  box-shadow: none;
  cursor: not-allowed;
}

.cabinet-payment-note {
  margin: 8px 0 0;
  color: #76869b;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.4;
}

.cabinet-payment-status {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-blue);
  color: var(--ink);
  font-size: calc(10px + var(--font-size-adjust));
  line-height: 1.4;
}
.cabinet-payment-status p { margin: 0; }
.cabinet-payment-status[data-state="success"] { border-color: var(--success); }
#cabinet-payment-check-again {
  min-height: 40px;
  justify-self: start;
  color: var(--ink);
  background: var(--surface-raised);
}

.cabinet-invoices-list,
#cabinet-invoices-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.cabinet-invoice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 7px 0;
  border-top: 1px solid #edf0f4;
}

.cabinet-invoice strong {
  color: #334157;
  font-size: calc(10px + var(--font-size-adjust));
}

.cabinet-invoice span,
.cabinet-invoice small {
  color: #8491a3;
  font-size: calc(8px + var(--font-size-adjust));
}

.cabinet-invoice .succeeded { color: #16835f; }
.cabinet-invoice .canceled { color: #c7433f; }

html[data-theme="dark"] .cabinet-shell,
html[data-theme="dark"] .cabinet-header {
  background: #111827;
}

html[data-theme="dark"] .cabinet-profile-card,
html[data-theme="dark"] .cabinet-passkeys-card,
html[data-theme="dark"] .cabinet-storage-card,
html[data-theme="dark"] .cabinet-billing-card,
html[data-theme="dark"] .cabinet-invoices,
html[data-theme="dark"] .cabinet-summary-grid > section {
  border-color: #2a3548;
  background: #172033;
}

html[data-theme="dark"] .cabinet-profile-main strong,
html[data-theme="dark"] .cabinet-summary-grid strong,
html[data-theme="dark"] .cabinet-section-title h3,
html[data-theme="dark"] .cabinet-passkey-item-copy strong,
html[data-theme="dark"] .cabinet-payment-line strong,
html[data-theme="dark"] .cabinet-plan-picker strong {
  color: #eef3fa;
}

html[data-theme="dark"] .cabinet-plan-picker button {
  border-color: #334057;
  background: #121b2c;
}

html[data-theme="dark"] .cabinet-plan-picker button.active {
  border-color: #438bd0;
  background: #162a42;
}

html[data-theme="dark"] .cabinet-passkey-item {
  border-color: #334057;
  background: #121b2c;
}

html[data-theme="dark"] .cabinet-passkeys-description,
html[data-theme="dark"] .cabinet-passkeys-empty,
html[data-theme="dark"] .cabinet-passkey-item-copy small,
html[data-theme="dark"] #cabinet-passkeys-count {
  color: #a9b6c8;
}

html[data-theme="dark"] .cabinet-passkeys-capability { color: #7dd9c7; }

html[data-theme="dark"] .cabinet-passkeys-actions {
  border-color: #2a3548;
}

html[data-theme="dark"] .cabinet-passkey-password-form {
  border-color: #334057;
  background: #121b2c;
}

html[data-theme="dark"] .cabinet-passkey-password-form > label { color: #b8c5d6; }
html[data-theme="dark"] .cabinet-passkey-password-row .input-wrap {
  border-color: #3b4960;
  background: #0f1726;
}

/* Use the available desktop width before adding vertical scrolling. */
@media (min-width: 1200px) {
  .cabinet-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.35fr);
    align-items: start;
  }
  .cabinet-profile-card { grid-column: 1; align-self: stretch; }
  .cabinet-summary-grid { grid-column: 2 / -1; align-self: stretch; }
  .cabinet-passkeys-card { grid-column: 1; }
  .cabinet-storage-card { grid-column: 2; }
  .cabinet-billing-card { grid-column: 3; }
  .cabinet-passkey-password-row { grid-template-columns: 1fr 1fr; }
  .cabinet-passkey-password-row .input-wrap { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .cabinet-content {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .cabinet-profile-card,
  .cabinet-summary-grid,
  .cabinet-passkeys-card,
  .cabinet-storage-card,
  .cabinet-billing-card,
  .cabinet-invoices { grid-column: 1; }
  .cabinet-passkey-password-row { grid-template-columns: 1fr 1fr; }
  .cabinet-passkey-password-row .input-wrap { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .cabinet-modal { --cabinet-viewport-gap: 16px; }
  .cabinet-profile-card { grid-template-columns: minmax(0, 1fr); }
  .cabinet-status-badge { justify-self: start; }
  .cabinet-plan-picker {
    grid-template-columns: repeat(3, minmax(82px, 1fr));
    overflow-x: auto;
  }
  .cabinet-period-picker button { min-height: 40px; }
  #cabinet-payment-button { min-height: 42px; }
}

@media (max-width: 420px) {
  .cabinet-summary-grid { grid-template-columns: 1fr; }
  .cabinet-payment-line { align-items: stretch; flex-direction: column; }
  #cabinet-payment-button { width: 100%; }
  .cabinet-passkeys-actions { align-items: stretch; flex-direction: column; }
  #cabinet-passkey-register { width: 100%; }
}

/* Administrator dashboard */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.admin-dashboard-modal {
  --admin-dashboard-edge-gap: 12px;
  width: min(1240px, calc(100vw - 30px));
  max-height: calc(100dvh - max(var(--admin-dashboard-edge-gap), env(safe-area-inset-top)) - max(var(--admin-dashboard-edge-gap), env(safe-area-inset-bottom)));
  inset-block-start: max(var(--admin-dashboard-edge-gap), env(safe-area-inset-top));
  inset-block-end: auto;
  margin-block: 0;
  margin-inline: auto;
  border-radius: 20px;
}

.admin-dashboard-shell {
  --font-size-adjust: calc(var(--font-size-preference-adjust) + 2px);
  max-height: calc(100dvh - max(var(--admin-dashboard-edge-gap), env(safe-area-inset-top)) - max(var(--admin-dashboard-edge-gap), env(safe-area-inset-bottom)));
  background:
    radial-gradient(circle at 92% -10%, rgba(53, 132, 245, .13), transparent 30%),
    #f5f7fb;
}

.admin-dashboard-header {
  position: relative;
  z-index: 4;
  align-items: center;
  padding: 14px 18px 12px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

.admin-dashboard-header > div:first-child {
  min-width: 0;
}

.admin-dashboard-header h2 {
  font-size: calc(20px + var(--font-size-adjust));
  letter-spacing: .015em;
}

.admin-dashboard-header p:last-child {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: calc(10px + var(--font-size-adjust));
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-header-actions .secondary-button {
  height: 34px;
}

.admin-dashboard-tabs {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 7px 16px;
  border-bottom: 1px solid #dde4ef;
  background: rgba(255, 255, 255, .88);
}

.admin-dashboard-tabs button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 9px;
  background: transparent;
  color: #667389;
  font-size: calc(11px + var(--font-size-adjust));
  font-weight: 720;
}

.admin-dashboard-tabs button:hover {
  background: #f0f4fa;
  color: #315a8e;
}

.admin-dashboard-tabs button.active {
  background: #e9f2ff;
  color: #1769e0;
  box-shadow: inset 0 0 0 1px #c9defc;
}

.admin-dashboard-tabs .ui-icon {
  width: 16px;
  height: 16px;
}

.admin-tab-count {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(88, 108, 140, .11);
  font-size: calc(8px + var(--font-size-adjust));
  text-align: center;
}

.admin-dashboard-tabs button.active .admin-tab-count {
  background: #fff;
}

.admin-dashboard-error {
  flex: 0 0 auto;
  margin: 10px 16px 0;
}

.admin-dashboard-loading {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #65748b;
}

.admin-dashboard-content {
  min-height: 0;
  flex: 1;
  padding: 12px 14px 18px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.admin-dashboard-panel {
  display: grid;
  gap: 12px;
}

.admin-dashboard-panel[hidden] {
  display: none;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 9px;
}

.admin-metric-grid article {
  display: flex;
  min-width: 0;
  min-height: 108px;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(31, 50, 82, .045);
}

.admin-metric-grid article > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.admin-metric-grid small,
.admin-user-metrics small {
  color: #778499;
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 720;
  letter-spacing: .025em;
}

.admin-metric-grid strong {
  margin: 5px 0 3px;
  color: #172a46;
  font-size: calc(21px + var(--font-size-adjust));
  line-height: 1.05;
}

.admin-metric-grid article > div > span {
  overflow: hidden;
  color: #8a96a7;
  font-size: calc(7px + var(--font-size-adjust));
  line-height: 1.3;
}

.admin-metric-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 10px;
  place-items: center;
}

.admin-metric-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.admin-metric-icon.blue { background: #e8f2ff; color: #2475e4; }
.admin-metric-icon.green { background: #e8f8f0; color: #188158; }
.admin-metric-icon.violet { background: #f0ecff; color: #7653ce; }
.admin-metric-icon.amber { background: #fff3df; color: #bd7411; }
.admin-metric-icon.cyan { background: #e5f7f8; color: #17818b; }
.admin-metric-icon.rose { background: #ffedf1; color: #c34c68; }

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr);
  gap: 10px;
}

.admin-card,
.admin-user-detail-grid > section,
.admin-user-controls,
.admin-user-detail-grid.secondary > section {
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 24px rgba(31, 50, 82, .04);
}

.admin-card-header,
.admin-section-heading,
.admin-user-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-card-header h3,
.admin-card-header h4,
.admin-section-heading h3 {
  margin: 1px 0 0;
  color: #20314c;
  font-size: calc(13px + var(--font-size-adjust));
  letter-spacing: .015em;
}

.admin-card-header select {
  min-height: 32px;
  padding: 0 27px 0 9px;
  border: 1px solid #d6dfeb;
  border-radius: 8px;
  background: #fff;
  font-size: calc(9px + var(--font-size-adjust));
}

.admin-chart-card,
.admin-distribution-card,
.admin-activity-card {
  padding: 14px;
}

.admin-registration-chart {
  min-height: 180px;
  margin-top: 12px;
  overflow-x: auto;
  border-bottom: 1px solid #e3e9f2;
}

.admin-chart-plot {
  display: grid;
  min-width: 100%;
  height: 180px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(9px, 1fr);
  align-items: end;
  gap: 3px;
}

.admin-chart-column {
  display: grid;
  height: 100%;
  grid-template-rows: 19px minmax(100px, 1fr) 25px;
  align-items: end;
  text-align: center;
}

.admin-chart-column i {
  display: block;
  width: min(100%, 16px);
  height: var(--admin-bar-height);
  min-height: 2px;
  margin: 0 auto;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #6da9fa, #1769e0);
  box-shadow: 0 4px 10px rgba(23, 105, 224, .16);
}

.admin-chart-value {
  align-self: end;
  color: #45617f;
  font-size: calc(7px + var(--font-size-adjust));
  font-weight: 750;
}

.admin-chart-column small {
  display: block;
  min-width: 34px;
  align-self: start;
  transform: translateX(calc(50% - 17px));
  color: #8c98aa;
  font-size: calc(6px + var(--font-size-adjust));
  white-space: nowrap;
}

.admin-chart-summary {
  margin: 9px 0 0;
  color: #728096;
  font-size: calc(9px + var(--font-size-adjust));
}

.admin-plan-distribution {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-plan-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: #5e6c82;
  font-size: calc(9px + var(--font-size-adjust));
}

.admin-plan-row > div:last-child {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.admin-plan-row i {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: #6d9ee8;
}

.admin-plan-row.plan-free i { background: #8190a6; }
.admin-plan-row.plan-basic i { background: #48a58a; }
.admin-plan-row.plan-professional i { background: #397fe2; }
.admin-plan-row.plan-extra i { background: #8b65d4; }

.admin-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e9edf3;
}

.admin-status-pill,
.admin-payment-status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #dce3ed;
  border-radius: 999px;
  background: #f2f5f9;
  color: #5e6a7d;
  font-size: calc(7px + var(--font-size-adjust));
  font-weight: 760;
  white-space: nowrap;
}

.admin-status-pill.active,
.admin-payment-status.succeeded { border-color: #bfe7d4; background: #ebf8f2; color: #14714d; }
.admin-status-pill.trialing,
.admin-payment-status.pending { border-color: #c9def8; background: #edf5ff; color: #2867ac; }
.admin-status-pill.expired,
.admin-payment-status.canceled { border-color: #ecd3c7; background: #fff3ed; color: #a85836; }
.admin-status-pill.suspended { border-color: #efc3ca; background: #fff0f2; color: #b34151; }

.admin-activity-list,
.admin-user-activity-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.admin-activity-list article,
.admin-user-activity-list article {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  background: #f6f8fb;
}

.admin-activity-list article > span,
.admin-user-activity-list article > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #e5effc;
  color: #3979cd;
  place-items: center;
}

.admin-activity-list .ui-icon,
.admin-user-activity-list .ui-icon { width: 14px; height: 14px; }
.admin-activity-list article > div,
.admin-user-activity-list article > div { min-width: 0; }
.admin-activity-list strong,
.admin-user-activity-list strong { display: block; font-size: calc(9px + var(--font-size-adjust)); }
.admin-activity-list p,
.admin-user-activity-list p { margin: 2px 0; color: #68768a; font-size: calc(8px + var(--font-size-adjust)); }
.admin-activity-list small,
.admin-user-activity-list small { color: #929baa; font-size: calc(7px + var(--font-size-adjust)); }

.admin-section-heading {
  padding: 2px 2px 0;
}

.admin-section-heading p {
  margin: 0;
  color: #758297;
  font-size: calc(9px + var(--font-size-adjust));
}

.admin-filter-bar {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
}

.admin-filter-bar label {
  display: grid;
  gap: 4px;
  color: #758196;
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 700;
}

.admin-filter-bar input,
.admin-filter-bar select,
.admin-user-controls select,
.admin-user-controls textarea {
  min-height: 36px;
  border: 1px solid #d6deea;
  border-radius: 9px;
  background: #fff;
  outline: none;
}

.admin-filter-bar input:focus,
.admin-filter-bar select:focus,
.admin-user-controls select:focus,
.admin-user-controls textarea:focus {
  border-color: #7eace8;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}

.admin-filter-bar select {
  min-width: 150px;
  padding: 0 30px 0 10px;
}

.admin-search-field {
  position: relative;
  min-width: 230px;
  flex: 1;
}

.admin-search-field input {
  width: 100%;
  padding: 0 10px 0 35px;
}

.admin-search-field .ui-icon {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  left: 11px;
  width: 16px;
  height: 16px;
  color: #8b97a9;
}

.admin-filter-bar.payments {
  align-items: center;
  justify-content: space-between;
}

.admin-filter-bar.payments p {
  max-width: 700px;
  margin: 0;
  color: #748197;
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.4;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid #dde4ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 50, 82, .035);
}

.admin-table {
  width: 100%;
  min-width: 890px;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-table th {
  padding: 9px 10px;
  border-bottom: 1px solid #dde4ee;
  background: #f7f9fc;
  color: #718096;
  font-size: calc(7px + var(--font-size-adjust));
  font-weight: 780;
  letter-spacing: .045em;
  text-align: left;
  text-transform: uppercase;
}

.admin-users-table th:nth-child(1) { width: 25%; }
.admin-users-table th:nth-child(2) { width: 17%; }
.admin-users-table th:nth-child(3) { width: 16%; }
.admin-users-table th:nth-child(4) { width: 13%; }
.admin-users-table th:nth-child(5) { width: 16%; }
.admin-users-table th:nth-child(6) { width: 52px; }
.admin-payments-table th:nth-child(1) { width: 22%; }
.admin-payments-table th:nth-child(2) { width: 22%; }
.admin-payments-table th:nth-child(3) { width: 15%; }
.admin-payments-table th:nth-child(4) { width: 12%; }
.admin-payments-table th:nth-child(5) { width: 20%; }
.admin-payments-table th:nth-child(6) { width: 52px; }

.admin-table td {
  padding: 9px 10px;
  overflow: hidden;
  border-bottom: 1px solid #edf0f5;
  color: #344056;
  font-size: calc(9px + var(--font-size-adjust));
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #f8faff; }
.admin-table td > strong,
.admin-table td > span,
.admin-table td > small,
.admin-payment-user button > strong,
.admin-payment-user button > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table td > small,
.admin-payment-user button > span { margin-top: 3px; color: #8893a4; font-size: calc(7px + var(--font-size-adjust)); }

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-cell > div { min-width: 0; }

.admin-table-avatar,
.admin-user-avatar {
  display: grid;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(145deg, #dceafe, #e5e0fa);
  color: #3267a9;
  font-weight: 820;
  place-items: center;
}

.admin-table-avatar { width: 32px; height: 32px; font-size: calc(8px + var(--font-size-adjust)); }
.admin-user-avatar { width: 44px; height: 44px; font-size: calc(12px + var(--font-size-adjust)); }
.admin-table code { display: block; overflow: hidden; color: #50627b; font: 600 calc(7px + var(--font-size-adjust))/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }

.admin-payment-user button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.admin-payment-user button:hover strong { color: var(--blue); }
.admin-row-actions { text-align: right; }
.admin-row-actions .secondary-button { width: 32px; height: 32px; justify-content: center; padding: 0; }
.admin-row-actions .ui-icon { width: 15px; height: 15px; }
.admin-empty-cell { height: 110px; color: #8490a2 !important; text-align: center; }

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-pagination > span {
  min-width: 120px;
  color: #728097;
  font-size: calc(8px + var(--font-size-adjust));
  text-align: center;
}

.admin-pagination .secondary-button { height: 32px; }

.admin-user-detail {
  margin-top: 3px;
  padding: 14px;
  scroll-margin-top: 10px;
}

.admin-user-detail-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #e7ebf2;
}

.admin-user-detail-header > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.admin-user-identity h3 { margin: 0; font-size: calc(15px + var(--font-size-adjust)); }
.admin-user-identity p { margin: 2px 0 0; color: #718096; font-size: calc(9px + var(--font-size-adjust)); }
.admin-user-detail > .form-error { margin: 10px 0 0; }

.admin-user-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.admin-user-facts > div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 9px;
  background: #f5f7fa;
}

.admin-user-facts dt { color: #8591a2; font-size: calc(7px + var(--font-size-adjust)); }
.admin-user-facts dd { overflow: hidden; margin: 3px 0 0; color: #344156; font-size: calc(8px + var(--font-size-adjust)); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }

.admin-user-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.admin-user-metrics article {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e7ebf1;
  border-radius: 10px;
}

.admin-user-metrics article > span { display: grid; width: 28px; height: 28px; border-radius: 8px; background: #eaf2fd; color: #3977ca; place-items: center; }
.admin-user-metrics .ui-icon { width: 14px; height: 14px; }
.admin-user-metrics strong { display: block; margin-top: 2px; font-size: calc(11px + var(--font-size-adjust)); }

.admin-user-detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(330px, 1.15fr);
  gap: 9px;
}

.admin-user-detail-grid.secondary {
  margin-top: 9px;
  grid-template-columns: 1fr 1fr;
}

.admin-user-detail-grid > section,
.admin-user-controls,
.admin-user-detail-grid.secondary > section {
  padding: 12px;
  box-shadow: none;
}

.admin-user-controls {
  display: grid;
  gap: 8px;
}

.admin-user-controls > label {
  display: grid;
  gap: 4px;
  color: #6f7c91;
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 700;
}

.admin-user-controls select { padding: 0 10px; }
.admin-user-controls textarea { min-height: 66px; padding: 8px 10px; resize: vertical; }

.admin-user-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-user-control-actions .submit-button,
.admin-user-control-actions .secondary-button { min-height: 36px; }
.admin-access-button { color: #a94752; }
.admin-access-button.restore { color: #14714d; }

.admin-mailboxes-list,
.admin-user-payments-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.admin-mailboxes-list article,
.admin-user-payments-list article {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
  background: #f6f8fb;
}

.admin-mailboxes-list article > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eaf2fd;
  color: #3e79c5;
  place-items: center;
}

.admin-mailboxes-list article > div,
.admin-user-payments-list article > div { min-width: 0; flex: 1; }
.admin-mailboxes-list strong,
.admin-mailboxes-list span,
.admin-mailboxes-list small,
.admin-user-payments-list strong,
.admin-user-payments-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-mailboxes-list strong,
.admin-user-payments-list strong { font-size: calc(9px + var(--font-size-adjust)); }
.admin-mailboxes-list span,
.admin-mailboxes-list small,
.admin-user-payments-list small { margin-top: 2px; color: #7e899b; font-size: calc(7px + var(--font-size-adjust)); }
.admin-user-payments-list .icon-button { flex: 0 0 auto; }
.admin-empty-state { margin: 8px 0; color: #8894a6; font-size: calc(8px + var(--font-size-adjust)); text-align: center; }

.admin-release-hero {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  overflow: hidden;
  border: 1px solid #cfe0f7;
  border-radius: 15px;
  background:
    radial-gradient(circle at 86% 10%, rgba(87, 150, 242, .2), transparent 34%),
    linear-gradient(135deg, #f7fbff, #edf5ff);
}

.admin-release-hero > div {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
}

.admin-release-hero span {
  color: #687b95;
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 720;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.admin-release-hero strong {
  margin-top: 3px;
  color: #1769df;
  font-size: calc(27px + var(--font-size-adjust));
  letter-spacing: -.025em;
  line-height: 1;
}

.admin-release-hero p {
  max-width: 680px;
  margin: 0;
  color: #5f718a;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.5;
  text-align: right;
}

.admin-filter-bar.releases {
  justify-content: flex-end;
}

.admin-release-list {
  position: relative;
  display: grid;
  gap: 9px;
  padding-left: 5px;
}

.admin-release-list::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 20px;
  width: 2px;
  border-radius: 999px;
  background: #dce5f2;
  content: "";
}

.admin-release-card {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 15px 13px 11px;
  border: 1px solid #e0e6ef;
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 22px rgba(31, 50, 82, .035);
}

.admin-release-card.current {
  border-color: #bcd5f8;
  background: linear-gradient(135deg, #fff, #f4f8ff);
  box-shadow: 0 9px 26px rgba(36, 104, 198, .09);
}

.admin-release-card > div { min-width: 0; }

.admin-release-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #e8eef7;
  color: #6f8199;
  box-shadow: 0 0 0 1px #d6dfec;
  place-items: center;
}

.admin-release-card.current .admin-release-marker {
  background: #2677e8;
  color: #fff;
  box-shadow: 0 0 0 1px #2677e8, 0 4px 12px rgba(38, 119, 232, .25);
}

.admin-release-marker .ui-icon { width: 14px; height: 14px; }

.admin-release-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-release-card header > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-release-version {
  color: #1d385b;
  font-size: calc(13px + var(--font-size-adjust));
  letter-spacing: -.015em;
}

.admin-release-current {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e3efff;
  color: #1769df;
  font-size: calc(6px + var(--font-size-adjust));
  font-weight: 760;
  text-transform: uppercase;
}

.admin-release-card time {
  color: #8390a3;
  font-size: calc(7px + var(--font-size-adjust));
}

.admin-release-card h4 {
  margin: 4px 0 9px;
  color: #263a56;
  font-size: calc(11px + var(--font-size-adjust));
  letter-spacing: .005em;
}

.admin-release-changes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-release-changes li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.admin-release-changes p {
  margin: 1px 0 0;
  color: #56667c;
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.45;
}

.admin-release-change-type {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: calc(6px + var(--font-size-adjust));
  font-weight: 750;
  white-space: nowrap;
}

.admin-release-change-type.feature { border-color: #c6daf8; background: #eaf3ff; color: #236fcf; }
.admin-release-change-type.improvement { border-color: #d9cff5; background: #f2eeff; color: #7151bd; }
.admin-release-change-type.fix { border-color: #c8e6d8; background: #eaf8f1; color: #1e7a56; }
.admin-release-change-type.security { border-color: #f2d0d6; background: #fff0f3; color: #b24b60; }

.admin-settings-card {
  display: grid;
  width: min(720px, 100%);
  gap: 16px;
  padding: 20px;
  border: 1px solid #dde5f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(31, 50, 82, .055);
}

.admin-settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.admin-settings-card-header > div { min-width: 0; }

.admin-settings-card-header h4 {
  margin: 1px 0 4px;
  color: #1a2d49;
  font-size: calc(15px + var(--font-size-adjust));
}

.admin-settings-card-header p,
.admin-settings-field small,
.admin-settings-toggle small,
.admin-settings-footer p {
  margin: 0;
  color: #78869a;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.5;
}

.admin-settings-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e9f3ff;
  color: #2474dc;
}

.admin-settings-icon .ui-icon { width: 21px; height: 21px; }

.admin-settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #e1e7f0;
  border-radius: 12px;
  background: #f8fafd;
  cursor: pointer;
}

.admin-settings-toggle input {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin: 1px 0 0;
  accent-color: #2678e5;
}

.admin-settings-toggle span { display: grid; gap: 2px; }
.admin-settings-toggle strong { color: #253a57; font-size: calc(11px + var(--font-size-adjust)); }

.admin-settings-field {
  display: grid;
  gap: 6px;
  color: #4b5e78;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 700;
}

.admin-settings-field input,
.admin-settings-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  background: #fff;
  color: #1d304b;
  font: inherit;
  font-weight: 560;
}

.admin-settings-field select { cursor: pointer; }

.admin-settings-field input:focus,
.admin-settings-field select:focus {
  border-color: #4a8fe9;
  outline: 3px solid rgba(53, 132, 245, .15);
}

.admin-yookassa-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 14px;
}

.admin-yookassa-return-field { grid-column: 1 / -1; }

.admin-integration-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #f7f9fc;
}

.admin-integration-summary p {
  min-width: 0;
  margin: 0;
  color: #5d6e84;
  font-size: calc(9px + var(--font-size-adjust));
  line-height: 1.45;
}

#admin-yookassa-status[data-state="configured"] { border-color: #bad5f6; background: #eaf3ff; color: #1e65bd; }
#admin-yookassa-status[data-state="verified"] { border-color: #b9dfce; background: #e9f8f1; color: #1f7c57; }
#admin-yookassa-status[data-state="dirty"] { border-color: #ead7a7; background: #fff8e5; color: #8a6415; }
#admin-yookassa-status[data-state="error"] { border-color: #efc8cf; background: #fff0f3; color: #ad4358; }

.admin-yookassa-notes { gap: 8px; }
.admin-yookassa-endpoint code {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .94em;
  overflow-wrap: anywhere;
}

.admin-yookassa-footer { align-items: flex-end; }
.admin-yookassa-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.admin-notification-contents {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid #cfe5db;
  border-radius: 12px;
  background: #f1faf6;
  color: #486658;
}

.admin-notification-contents > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.admin-notification-contents .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
  color: #21875c;
}

.admin-notification-contents strong { color: #245c43; font-size: calc(10px + var(--font-size-adjust)); }
.admin-notification-contents p { margin: 3px 0 0; font-size: calc(9px + var(--font-size-adjust)); line-height: 1.5; }
.admin-notification-contents > p { padding-top: 9px; border-top: 1px solid #d8ebe2; }

.admin-settings-footer {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-settings-footer p { flex: 1; }
.admin-settings-footer .submit-button { flex: 0 0 auto; }

html[data-theme="dark"] .admin-dashboard-shell {
  background:
    radial-gradient(circle at 92% -10%, rgba(58, 135, 230, .16), transparent 30%),
    #0e1624;
}

html[data-theme="dark"] .admin-dashboard-header,
html[data-theme="dark"] .admin-dashboard-tabs { border-color: #2a3548; background: rgba(18, 27, 42, .94); }
html[data-theme="dark"] .admin-dashboard-tabs button { color: #9aa8bc; }
html[data-theme="dark"] .admin-dashboard-tabs button:hover { background: #1b293d; color: #bad6f7; }
html[data-theme="dark"] .admin-dashboard-tabs button.active { background: #173154; color: #8fc1ff; box-shadow: inset 0 0 0 1px #285385; }
html[data-theme="dark"] .admin-dashboard-tabs button.active .admin-tab-count { background: #11233a; }
html[data-theme="dark"] .admin-metric-grid article,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-filter-bar,
html[data-theme="dark"] .admin-table-wrap,
html[data-theme="dark"] .admin-release-card,
html[data-theme="dark"] .admin-user-detail-grid > section,
html[data-theme="dark"] .admin-user-controls,
html[data-theme="dark"] .admin-user-detail-grid.secondary > section { border-color: #2d394d; background: rgba(18, 27, 42, .95); }
html[data-theme="dark"] .admin-metric-grid strong,
html[data-theme="dark"] .admin-card-header h3,
html[data-theme="dark"] .admin-card-header h4,
html[data-theme="dark"] .admin-section-heading h3,
html[data-theme="dark"] .admin-user-identity h3,
html[data-theme="dark"] .admin-user-metrics strong { color: #e7edf7; }
html[data-theme="dark"] .admin-card-header select,
html[data-theme="dark"] .admin-filter-bar input,
html[data-theme="dark"] .admin-filter-bar select,
html[data-theme="dark"] .admin-user-controls select,
html[data-theme="dark"] .admin-user-controls textarea { border-color: #35435a; background: #101a2a; color: #dce5f2; }
html[data-theme="dark"] .admin-plan-row > div:last-child { background: #263247; }
html[data-theme="dark"] .admin-status-summary,
html[data-theme="dark"] .admin-user-detail-header { border-color: #2c384c; }
html[data-theme="dark"] .admin-activity-list article,
html[data-theme="dark"] .admin-user-activity-list article,
html[data-theme="dark"] .admin-user-facts > div,
html[data-theme="dark"] .admin-mailboxes-list article,
html[data-theme="dark"] .admin-user-payments-list article { background: #111d2f; }
html[data-theme="dark"] .admin-table th { border-color: #2d394d; background: #152033; color: #93a1b5; }
html[data-theme="dark"] .admin-table td { border-color: #273246; color: #d8e1ef; }
html[data-theme="dark"] .admin-table tbody tr:hover { background: #152238; }
html[data-theme="dark"] .admin-user-facts dd { color: #d7e0ed; }
html[data-theme="dark"] .admin-release-hero { border-color: #2e4b70; background: radial-gradient(circle at 86% 10%, rgba(56, 125, 219, .18), transparent 34%), #121f32; }
html[data-theme="dark"] .admin-release-hero strong { color: #8fc1ff; }
html[data-theme="dark"] .admin-release-hero p { color: #a3b0c2; }
html[data-theme="dark"] .admin-release-list::before { background: #2c3a50; }
html[data-theme="dark"] .admin-release-card.current { border-color: #315781; background: linear-gradient(135deg, #121b2b, #14243a); }
html[data-theme="dark"] .admin-release-marker { border-color: #121b2b; background: #243248; color: #a4b3c7; box-shadow: 0 0 0 1px #39485e; }
html[data-theme="dark"] .admin-release-card.current .admin-release-marker { background: #2c7de9; color: #fff; box-shadow: 0 0 0 1px #2c7de9, 0 4px 12px rgba(44, 125, 233, .22); }
html[data-theme="dark"] .admin-release-version,
html[data-theme="dark"] .admin-release-card h4 { color: #e5edf8; }
html[data-theme="dark"] .admin-release-card time,
html[data-theme="dark"] .admin-release-changes p { color: #9eacbf; }
html[data-theme="dark"] .admin-release-current { background: #18385e; color: #8fc2ff; }
html[data-theme="dark"] .admin-settings-card { border-color: #2d394d; background: rgba(18, 27, 42, .95); }
html[data-theme="dark"] .admin-settings-card-header h4,
html[data-theme="dark"] .admin-settings-toggle strong { color: #e4ebf6; }
html[data-theme="dark"] .admin-settings-icon { background: #173154; color: #8fc1ff; }
html[data-theme="dark"] .admin-settings-toggle { border-color: #344157; background: #111d2f; }
html[data-theme="dark"] .admin-settings-field { color: #a8b5c7; }
html[data-theme="dark"] .admin-settings-field input,
html[data-theme="dark"] .admin-settings-field select { border-color: #35435a; background: #101a2a; color: #dce5f2; }
html[data-theme="dark"] .admin-integration-summary { border-color: #344157; background: #111d2f; }
html[data-theme="dark"] .admin-integration-summary p { color: #9fadc0; }
html[data-theme="dark"] #admin-yookassa-status[data-state="configured"] { border-color: #2d527d; background: #172d48; color: #82b8f2; }
html[data-theme="dark"] #admin-yookassa-status[data-state="verified"] { border-color: #2b614c; background: #173329; color: #73d4aa; }
html[data-theme="dark"] #admin-yookassa-status[data-state="dirty"] { border-color: #68572f; background: #342c18; color: #e5c46e; }
html[data-theme="dark"] #admin-yookassa-status[data-state="error"] { border-color: #70404a; background: #3c2229; color: #f19aa8; }
html[data-theme="dark"] .admin-notification-contents { border-color: #285441; background: #132b22; color: #a8cab9; }
html[data-theme="dark"] .admin-notification-contents strong { color: #8dd8b2; }
html[data-theme="dark"] .admin-notification-contents .ui-icon { color: #64c897; }
html[data-theme="dark"] .admin-notification-contents > p { border-color: #285441; }
html[data-theme="dark"] .admin-status-pill,
html[data-theme="dark"] .admin-payment-status { border-color: #39465a; background: #202b3d; color: #b7c2d3; }
html[data-theme="dark"] .admin-status-pill.active,
html[data-theme="dark"] .admin-payment-status.succeeded { border-color: #2b614c; background: #173329; color: #73d4aa; }
html[data-theme="dark"] .admin-status-pill.trialing,
html[data-theme="dark"] .admin-payment-status.pending { border-color: #2d527d; background: #172d48; color: #82b8f2; }
html[data-theme="dark"] .admin-status-pill.expired,
html[data-theme="dark"] .admin-payment-status.canceled { border-color: #68493c; background: #36251f; color: #e0a184; }
html[data-theme="dark"] .admin-status-pill.suspended { border-color: #70404a; background: #3c2229; color: #f19aa8; }

@media (max-width: 1120px) {
  .admin-metric-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .admin-user-facts { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 820px) {
  .admin-dashboard-modal { --admin-dashboard-edge-gap: 6px; }
  .admin-overview-grid,
  .admin-user-detail-grid,
  .admin-user-detail-grid.secondary { grid-template-columns: 1fr; }
  .admin-filter-bar { align-items: stretch; flex-wrap: wrap; }
  .admin-search-field { width: 100%; min-width: 100%; }
  .admin-filter-bar label:not(.admin-search-field) { flex: 1; }
  .admin-filter-bar select { width: 100%; min-width: 130px; }
  .admin-filter-bar.payments { align-items: stretch; flex-direction: column; }
  .admin-release-hero { align-items: flex-start; flex-direction: column; gap: 8px; }
  .admin-release-hero p { max-width: none; text-align: left; }
}

@media (max-width: 620px) {
  .admin-dashboard-modal { width: calc(100vw - 10px); border-radius: 14px; }
  .admin-dashboard-header { align-items: flex-start; padding: 11px 12px; }
  .admin-dashboard-header p:last-child { display: none; }
  .admin-header-actions .secondary-button span { display: none; }
  .admin-header-actions .secondary-button { width: 34px; justify-content: center; padding: 0; }
  .admin-dashboard-tabs { padding: 6px 8px; }
  .admin-dashboard-tabs button { min-width: 0; flex: 1; justify-content: center; padding: 0 7px; }
  .admin-dashboard-tabs button > span:not(.admin-tab-count) { display: none; }
  .admin-dashboard-content { padding: 9px 8px 14px; }
  .admin-metric-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .admin-metric-grid article { min-height: 96px; padding: 10px; }
  .admin-user-facts { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .admin-user-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .admin-pagination { justify-content: space-between; }
  .admin-pagination .secondary-button span { display: none; }
  .admin-pagination > span { min-width: 100px; }
  .admin-user-detail { padding: 10px; }
  .admin-user-detail-header { align-items: flex-start; }
  .admin-release-card { grid-template-columns: 28px minmax(0, 1fr); padding-right: 10px; padding-left: 8px; }
  .admin-release-marker { width: 28px; height: 28px; }
  .admin-release-list::before { left: 17px; }
  .admin-release-card header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .admin-release-changes li { grid-template-columns: 1fr; gap: 3px; }
  .admin-release-change-type { justify-self: start; }
  .admin-yookassa-fields { grid-template-columns: 1fr; }
  .admin-yookassa-return-field { grid-column: auto; }
  .admin-integration-summary { align-items: flex-start; flex-direction: column; }
  .admin-yookassa-footer { align-items: stretch; flex-direction: column; }
  .admin-yookassa-actions { width: 100%; flex-direction: column; }
  .admin-yookassa-actions button { width: 100%; justify-content: center; }
  .admin-settings-card { gap: 13px; padding: 14px 12px; }
  .admin-settings-footer { align-items: stretch; flex-direction: column; }
  .admin-settings-footer .submit-button { width: 100%; justify-content: center; }
}

/* Pochtovik brand system: winged mail, airy cards and azure flight paths. */
.brand-mark,
.landing-brand-mark {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark > span::before,
.brand-mark > span::after,
.landing-brand-mark::before,
.landing-brand-mark::after,
.landing-brand-mark i {
  display: none;
}

.brand-mark img,
.landing-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(17, 114, 221, .2));
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.landing-brand-mark {
  width: 52px;
  height: 52px;
  transform: rotate(-4deg);
}

.landing-demo-mascot {
  position: absolute;
  z-index: 5;
  top: -54px;
  right: -28px;
  width: clamp(142px, 17vw, 224px);
  height: auto;
  transform: rotate(7deg) translate3d(var(--landing-mascot-x, 0), var(--landing-mascot-y, 0), 0);
  filter: drop-shadow(0 26px 32px rgba(0, 35, 98, .34));
  pointer-events: none;
  will-change: transform;
}

html[data-theme="light"] .brand-mark img,
html[data-theme="light"] .landing-brand-mark img {
  filter: drop-shadow(0 8px 14px rgba(17, 114, 221, .16));
}

@media (max-width: 720px) {
  .brand-mark { width: 38px; height: 38px; }
  .landing-brand-mark { width: 45px; height: 45px; }
  .landing-demo-mascot { top: -42px; right: -18px; width: 126px; }
}

/* Reference-led Pochtovik visual language. */
.auth-screen {
  --pochtovik-navy: #0d3274;
  --pochtovik-navy-deep: #071d45;
  --pochtovik-blue: #0d91ed;
  --pochtovik-blue-strong: #0875da;
  --pochtovik-sky: #70d5ff;
  --pochtovik-cloud: #edf8ff;
  --pochtovik-coral: #ff5d6c;
  --landing-cyan: var(--pochtovik-sky);
  --landing-blue: var(--pochtovik-blue);
  --landing-yellow: var(--pochtovik-coral);
  --landing-flow-node: var(--pochtovik-sky);
  --landing-flow-line: rgba(102, 204, 255, .27);
}

.landing-header-shell {
  border-bottom-color: rgba(116, 194, 241, .17);
  background: rgba(5, 24, 57, .84);
}

.landing-brand { gap: 14px; }

.landing-brand strong {
  color: #fff;
  font-size: calc(17px + var(--font-size-adjust));
  font-weight: 790;
  letter-spacing: .055em;
}

.landing-brand small {
  color: rgba(199, 227, 250, .72);
  font-size: calc(8px + var(--font-size-adjust));
  font-weight: 650;
  letter-spacing: .075em;
  text-transform: none;
}

.brand-copy strong {
  color: var(--pochtovik-navy, #0d3274);
  font-weight: 780;
  letter-spacing: .045em;
}

.landing-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(35, 157, 238, .13), transparent 28%),
    radial-gradient(circle at 87% 42%, rgba(112, 213, 255, .09), transparent 31%),
    radial-gradient(circle at 38% 78%, rgba(34, 113, 220, .08), transparent 34%),
    linear-gradient(#061934, #08234a 42%, #07182f);
}

.landing-page::before {
  opacity: .15;
  background-image:
    radial-gradient(circle, rgba(130, 210, 255, .54) 1px, transparent 1.5px),
    linear-gradient(120deg, transparent 49.8%, rgba(115, 207, 255, .055) 50%, transparent 50.2%);
  background-size: 36px 36px, 240px 240px;
}

.landing-page::after {
  background:
    radial-gradient(ellipse at 50% 22%, transparent 0 22%, rgba(68, 170, 238, .04) 48%, transparent 70%),
    linear-gradient(to bottom, transparent 0 44%, rgba(8, 80, 155, .07) 55%, transparent 72%);
}

.landing-mail-atmosphere::before {
  background: radial-gradient(circle, rgba(38, 173, 240, .2), rgba(33, 103, 211, .07) 40%, transparent 70%);
}

.landing-mail-atmosphere::after {
  background: radial-gradient(circle, rgba(95, 203, 255, .13), rgba(26, 116, 208, .045) 44%, transparent 72%);
}

.landing-mail-route {
  border-color: rgba(105, 210, 255, .32);
  opacity: .55;
}

.landing-hero::before {
  border-color: rgba(143, 211, 255, .2);
  background:
    radial-gradient(circle at 14% 14%, rgba(82, 206, 255, .27), transparent 30%),
    radial-gradient(circle at 86% 20%, rgba(18, 132, 230, .3), transparent 34%),
    radial-gradient(circle at 52% 94%, rgba(64, 176, 247, .22), transparent 39%),
    linear-gradient(145deg, #061b3e 3%, #0a3975 54%, #082650 100%);
  box-shadow: 0 42px 110px rgba(0, 16, 50, .32);
}

.landing-hero::after {
  border-top-color: rgba(111, 211, 255, .22);
  background:
    radial-gradient(ellipse at 50% 0, rgba(76, 176, 242, .2), transparent 56%),
    linear-gradient(to bottom, rgba(7, 31, 65, .05), #07182f 74%);
}

.landing-kicker {
  border-color: rgba(151, 219, 255, .28);
  background: rgba(9, 56, 112, .42);
  color: #dff6ff;
}

.landing-kicker span {
  background: var(--pochtovik-coral);
  box-shadow: 0 0 0 5px rgba(255, 93, 108, .13);
}

.landing-hero h1,
.landing-section h2 {
  letter-spacing: .012em;
}

.landing-hero h1 em {
  color: #8ce0ff;
  background: linear-gradient(90deg, #d8f6ff, #75d7ff 52%, #39aaf6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero .landing-cta.primary,
.landing-register {
  border-color: var(--pochtovik-blue);
  background: linear-gradient(135deg, #13a3f5, #0879dc);
  color: #fff;
  box-shadow: 0 17px 42px rgba(8, 126, 222, .28);
}

.landing-hero .landing-cta.secondary {
  border-color: rgba(157, 218, 255, .28);
  background: rgba(9, 55, 108, .34);
}

.landing-trust {
  border-color: rgba(139, 210, 250, .18);
  background: rgba(4, 38, 82, .38);
}

.landing-trust .ui-icon { color: #7cdbff; }

.landing-mail-demo::before,
.landing-mail-demo::after {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: rgba(129, 215, 255, .12);
  filter: blur(1px);
  pointer-events: none;
  content: "";
}

.landing-mail-demo::before {
  top: 7%;
  left: 1%;
  width: 150px;
  height: 68px;
  box-shadow: 86px 10px 0 rgba(129, 215, 255, .08), 620px 80px 0 rgba(129, 215, 255, .07);
}

.landing-mail-demo::after {
  right: 6%;
  bottom: 4%;
  width: 190px;
  height: 82px;
  box-shadow: -130px 8px 0 rgba(129, 215, 255, .06);
}

.landing-demo-flight {
  position: absolute;
  z-index: 4;
  top: 30px;
  right: 82px;
  width: 210px;
  height: 96px;
  transform: rotate(-12deg);
  border-top: 3px dashed rgba(111, 213, 255, .48);
  border-radius: 50%;
  pointer-events: none;
}

.landing-demo-flight::before,
.landing-demo-flight::after {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pochtovik-sky);
  box-shadow: 0 0 0 7px rgba(112, 213, 255, .1), 0 0 24px rgba(53, 180, 246, .5);
  content: "";
}

.landing-demo-flight::before { top: -6px; left: 12px; }
.landing-demo-flight::after { top: 19px; right: 4px; }

.demo-glow {
  background: radial-gradient(circle, rgba(57, 180, 246, .3), rgba(22, 117, 222, .12) 44%, transparent 72%);
}

.demo-window {
  border-color: rgba(138, 204, 247, .35);
  background: #0c2850;
  box-shadow: 0 44px 100px rgba(0, 17, 56, .48), 0 0 0 8px rgba(110, 204, 255, .035);
}

.demo-compose,
.demo-reply {
  background: var(--pochtovik-blue);
  color: #fff;
}

#benefits {
  border-color: rgba(101, 185, 236, .18);
  background:
    radial-gradient(circle at 7% 8%, rgba(61, 170, 238, .14), transparent 29%),
    linear-gradient(145deg, rgba(10, 43, 82, .95), rgba(7, 29, 61, .94));
}

.landing-feature-grid article {
  border-color: rgba(139, 205, 245, .19);
}

.landing-feature-grid article:nth-child(1),
.landing-feature-grid article:nth-child(2),
.landing-feature-grid article:nth-child(3) {
  background: linear-gradient(150deg, rgba(16, 67, 120, .94), rgba(8, 38, 78, .96));
}

.landing-feature-grid article:nth-child(2) {
  background: linear-gradient(150deg, rgba(13, 82, 139, .94), rgba(7, 45, 89, .96));
}

.landing-feature-grid article:nth-child(3) {
  background: linear-gradient(150deg, rgba(9, 72, 124, .94), rgba(7, 37, 75, .96));
}

.landing-feature-grid article::before,
.landing-feature-grid article:nth-child(2)::before,
.landing-feature-grid article:nth-child(3)::before {
  border-color: rgba(143, 211, 252, .21);
  box-shadow: 0 24px 50px rgba(0, 17, 53, .28);
}

.feature-icon,
.price-icon {
  border-color: rgba(120, 211, 255, .25);
  background: rgba(50, 170, 241, .12);
  color: #82ddff;
}

.price-card.featured {
  border-color: rgba(91, 192, 251, .52);
  background:
    radial-gradient(circle at 92% 3%, rgba(65, 180, 246, .24), transparent 35%),
    linear-gradient(148deg, #0c3c76, #0a2857 72%, #08234d);
  box-shadow: 0 24px 65px rgba(6, 78, 164, .24);
}

.popular-label {
  background: #e9f8ff;
  color: #0b4f9b;
}

.billing-period-switch button.active,
.price-card.featured > button {
  border-color: var(--pochtovik-blue);
  background: var(--pochtovik-blue);
  color: #fff;
}

.storage-section {
  border-color: rgba(147, 214, 255, .22);
  background:
    radial-gradient(circle at 90% 13%, rgba(83, 207, 255, .32), transparent 35%),
    radial-gradient(circle at 7% 100%, rgba(27, 145, 231, .24), transparent 36%),
    linear-gradient(135deg, #0b3774, #0a55a2 62%, #07366f);
}

.storage-section::before {
  background: radial-gradient(circle, rgba(108, 216, 255, .2), transparent 68%);
}

.landing-final-cta::before {
  border-color: rgba(142, 210, 255, .2);
  background:
    radial-gradient(circle at 10% 18%, rgba(84, 210, 255, .25), transparent 33%),
    radial-gradient(circle at 88% 26%, rgba(20, 135, 227, .28), transparent 37%),
    linear-gradient(135deg, #082a5d, #0b4b92 58%, #082f69);
}

.landing-final-cta > div:first-of-type > span {
  color: #b8edff;
}

#landing-contact-button {
  border-color: rgba(133, 218, 255, .75);
  background: linear-gradient(145deg, #19a5f2, #0876d8);
  box-shadow: 0 16px 40px rgba(8, 118, 216, .34);
}

.landing-parallax-scene {
  --landing-scene-accent: rgba(105, 216, 255, .72);
  --landing-scene-line: rgba(100, 194, 248, .24);
}

.landing-parallax-scene::before {
  background: conic-gradient(from 55deg, transparent 0 31%, rgba(81, 204, 255, .17) 33%, transparent 36% 71%, rgba(32, 132, 228, .14) 73%, transparent 77%);
}

.landing-parallax-scene::after {
  background: radial-gradient(circle at 35% 32%, rgba(94, 215, 255, .18), rgba(26, 119, 219, .05) 48%, transparent 72%);
}

html[data-theme="light"] .landing-page {
  background:
    radial-gradient(circle at 8% 16%, rgba(95, 202, 255, .22), transparent 29%),
    radial-gradient(circle at 93% 37%, rgba(40, 139, 232, .14), transparent 31%),
    radial-gradient(circle at 52% 76%, rgba(122, 211, 255, .12), transparent 35%),
    linear-gradient(#f7fbff, #eef8ff 42%, #f9fcff);
}

html[data-theme="light"] .landing-page::before {
  opacity: .18;
  background-image:
    radial-gradient(circle, rgba(24, 111, 191, .34) 1px, transparent 1.5px),
    linear-gradient(120deg, transparent 49.8%, rgba(33, 124, 202, .035) 50%, transparent 50.2%);
}

html[data-theme="light"] .landing-header-shell {
  border-bottom-color: rgba(27, 92, 157, .1);
  background: rgba(249, 253, 255, .9);
  box-shadow: 0 10px 35px rgba(18, 70, 121, .06);
}

html[data-theme="light"] .landing-brand strong { color: var(--pochtovik-navy); }
html[data-theme="light"] .landing-brand small { color: #55728f; }

html[data-theme="light"] .landing-hero::before {
  border-color: rgba(50, 126, 195, .12);
  background:
    radial-gradient(circle at 13% 10%, rgba(116, 214, 255, .42), transparent 31%),
    radial-gradient(circle at 89% 22%, rgba(44, 149, 238, .2), transparent 35%),
    radial-gradient(circle at 52% 96%, rgba(139, 221, 255, .28), transparent 40%),
    linear-gradient(145deg, #fbfdff 4%, #eaf6ff 54%, #dcefff 100%);
  box-shadow: 0 38px 95px rgba(24, 79, 135, .13);
}

html[data-theme="light"] .landing-hero::after {
  border-top-color: rgba(35, 120, 194, .13);
  background:
    radial-gradient(ellipse at 50% 0, rgba(88, 186, 244, .2), transparent 58%),
    linear-gradient(to bottom, rgba(239, 249, 255, .04), #f3faff 75%);
}

html[data-theme="light"] .landing-kicker {
  border-color: rgba(26, 107, 184, .14);
  background: rgba(255, 255, 255, .72);
  color: #174d88;
  box-shadow: 0 10px 28px rgba(27, 86, 144, .07);
}

html[data-theme="light"] .landing-hero h1 { color: var(--pochtovik-navy-deep); }

html[data-theme="light"] .landing-hero h1 em {
  color: var(--pochtovik-blue-strong);
  background: linear-gradient(90deg, #0b4fa5, #0788e9 55%, #18a6ee);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .landing-hero-copy > p { color: #4d6c89; }

html[data-theme="light"] .landing-hero .landing-cta.primary {
  border-color: var(--pochtovik-blue);
  background: linear-gradient(135deg, #12a1f3, #0877da);
  color: #fff;
}

html[data-theme="light"] .landing-hero .landing-cta.secondary {
  border-color: rgba(25, 100, 174, .16);
  background: rgba(255, 255, 255, .78);
  color: #123f76;
  box-shadow: 0 12px 28px rgba(27, 82, 135, .07);
}

html[data-theme="light"] .landing-hero .landing-trust {
  border-color: rgba(32, 111, 181, .12);
  background: rgba(255, 255, 255, .8);
  color: #496a89;
  box-shadow: 0 12px 32px rgba(32, 86, 140, .06);
}

html[data-theme="light"] .landing-hero .landing-trust .ui-icon { color: #0787e5; }
html[data-theme="light"] .landing-hero .landing-scroll-cue { color: #3d6488; }
html[data-theme="light"] .landing-hero .landing-scroll-cue .ui-icon { border-color: rgba(28, 103, 174, .16); color: #087fdd; }

html[data-theme="light"] .demo-window {
  border-color: rgba(35, 108, 176, .18);
  background: #fff;
  box-shadow: 0 42px 90px rgba(25, 77, 128, .16), 0 0 0 8px rgba(255, 255, 255, .55);
}

html[data-theme="light"] #benefits {
  border-color: rgba(35, 102, 167, .1);
  background:
    radial-gradient(circle at 6% 8%, rgba(119, 215, 255, .2), transparent 29%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(237, 248, 255, .96));
  box-shadow: 0 32px 88px rgba(24, 79, 134, .1);
}

html[data-theme="light"] .landing-feature-grid article:nth-child(1),
html[data-theme="light"] .landing-feature-grid article:nth-child(2),
html[data-theme="light"] .landing-feature-grid article:nth-child(3) {
  border-color: rgba(27, 98, 166, .1);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 20px 48px rgba(33, 89, 143, .09);
}

html[data-theme="light"] .feature-icon,
html[data-theme="light"] .price-icon {
  border-color: rgba(25, 108, 184, .14);
  background: #eaf7ff;
  color: #087edc;
}

html[data-theme="light"] .landing-feature-grid h3 { color: var(--pochtovik-navy-deep); }
html[data-theme="light"] .landing-feature-grid p { color: #516f8c; }

html[data-theme="light"] .price-card {
  border-color: rgba(29, 95, 157, .1);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 46px rgba(25, 76, 127, .08);
}

html[data-theme="light"] .price-card.featured {
  border-color: rgba(20, 125, 217, .34);
  background:
    radial-gradient(circle at 96% 2%, rgba(105, 211, 255, .25), transparent 36%),
    linear-gradient(148deg, #edf8ff, #fafdff);
  box-shadow: 0 24px 60px rgba(18, 102, 183, .14);
}

html[data-theme="light"] .popular-label,
html[data-theme="light"] .billing-period-switch button.active,
html[data-theme="light"] .price-card.featured > button {
  background: var(--pochtovik-blue);
  color: #fff;
}

html[data-theme="light"] .storage-section {
  background:
    radial-gradient(circle at 90% 13%, rgba(113, 220, 255, .36), transparent 35%),
    radial-gradient(circle at 7% 100%, rgba(34, 160, 239, .22), transparent 36%),
    linear-gradient(135deg, #0a3978, #0877d4 62%, #07539d);
}

html[data-theme="light"] .landing-final-cta::before {
  border-color: rgba(142, 210, 255, .23);
  background:
    radial-gradient(circle at 10% 18%, rgba(103, 219, 255, .28), transparent 33%),
    radial-gradient(circle at 88% 26%, rgba(23, 153, 235, .3), transparent 37%),
    linear-gradient(135deg, #082c61, #0a58a5 58%, #0875cd);
}

html[data-theme="light"] .landing-final-cta > div:first-of-type > span {
  border-color: rgba(255, 255, 255, .42);
  background: #063d7b;
  color: #e8f9ff;
  text-shadow: none;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1051px) and (hover: hover) and (pointer: fine) {
  .landing-demo-mascot { animation: pochtovik-mascot-flight 5.8s ease-in-out infinite; }
  .landing-demo-flight { animation: pochtovik-flight-trail 5.8s ease-in-out infinite; }
}

@keyframes pochtovik-mascot-flight {
  0%, 100% { transform: rotate(7deg) translate3d(var(--landing-mascot-x, 0), var(--landing-mascot-y, 0), 0); }
  50% { transform: rotate(3deg) translate3d(var(--landing-mascot-x, 0), calc(var(--landing-mascot-y, 0px) - 9px), 0); }
}

@keyframes pochtovik-flight-trail {
  0%, 100% { opacity: .44; transform: rotate(-12deg) translateX(0); }
  50% { opacity: .72; transform: rotate(-12deg) translateX(-8px); }
}

.landing-page.landing-motion-paused .landing-demo-mascot,
.landing-page.landing-motion-paused .landing-demo-flight {
  animation-play-state: paused !important;
}

@media (max-width: 1050px) {
  .landing-demo-flight { top: 40px; right: 70px; width: 170px; }
}

@media (max-width: 720px) {
  .landing-brand { gap: 9px; }
  .landing-brand strong { font-size: calc(14px + var(--font-size-adjust)); letter-spacing: .045em; }
  .landing-demo-flight { top: -2px; right: 31px; width: 116px; height: 62px; border-top-width: 2px; }
  .landing-mail-demo::before,
  .landing-mail-demo::after { opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-demo-mascot,
  .landing-demo-flight { animation: none !important; }
}

.landing-scroll-progress span {
  background: linear-gradient(90deg, #79dcff, #0d91ed 58%, #075fc4);
  box-shadow: 0 0 14px rgba(13, 145, 237, .42);
}

.landing-feature-grid article:nth-child(2)::before {
  background:
    radial-gradient(circle, #7cdcff 0 8px, transparent 9px) 20px 23px / 22px 22px no-repeat,
    linear-gradient(90deg, rgba(193, 232, 255, .3) 0 74%, transparent 74%) 56px 26px / 63% 6px no-repeat,
    linear-gradient(90deg, rgba(60, 183, 249, .66) 0 42%, transparent 42%) 56px 42px / 65% 5px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 42px, rgba(154, 213, 250, .11) 43px 44px),
    rgba(4, 31, 68, .66);
}

.landing-feature-grid article:nth-child(3)::before {
  background:
    linear-gradient(90deg, rgba(75, 198, 255, .76) 0 48%, transparent 48%) 20px 25px / 62% 8px no-repeat,
    linear-gradient(90deg, rgba(205, 237, 255, .24) 0 85%, transparent 85%) 20px 48px / 84% 5px no-repeat,
    linear-gradient(90deg, rgba(205, 237, 255, .18) 0 67%, transparent 67%) 20px 63px / 72% 5px no-repeat,
    radial-gradient(circle at 80% 70%, rgba(60, 188, 250, .24), transparent 28%),
    rgba(4, 31, 68, .66);
}

.landing-contact-panel {
  border-color: rgba(103, 196, 248, .3);
  background: rgba(5, 31, 70, .97);
  box-shadow: 0 22px 60px rgba(0, 18, 52, .4);
}

.landing-contact-panel > strong { color: #effaff; }
.landing-contact-panel a { color: #e4f5ff; }
.landing-contact-panel a:hover { background: rgba(44, 164, 232, .13); }

.landing-contact-panel a > span {
  background: rgba(53, 178, 242, .16);
  color: #77d9ff;
}

.landing-contact-panel small { color: #91adc6; }

.auth-entry-modal h2 { letter-spacing: .012em; }

.auth-entry-modal .submit-button {
  background: linear-gradient(135deg, #13a3f5, #0879dc);
  color: #fff;
}

html[data-theme="light"] .landing-feature-grid article:nth-child(2)::before {
  background:
    radial-gradient(circle, #0d91ed 0 8px, transparent 9px) 20px 23px / 22px 22px no-repeat,
    linear-gradient(90deg, rgba(33, 87, 139, .2) 0 74%, transparent 74%) 56px 26px / 63% 6px no-repeat,
    linear-gradient(90deg, rgba(13, 145, 237, .5) 0 42%, transparent 42%) 56px 42px / 65% 5px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 42px, rgba(45, 105, 157, .08) 43px 44px),
    rgba(255, 255, 255, .82);
}

html[data-theme="light"] .landing-feature-grid article:nth-child(3)::before {
  background:
    linear-gradient(90deg, #169fe9 0 48%, transparent 48%) 20px 25px / 62% 8px no-repeat,
    linear-gradient(90deg, rgba(35, 99, 151, .18) 0 85%, transparent 85%) 20px 48px / 84% 5px no-repeat,
    linear-gradient(90deg, rgba(35, 99, 151, .13) 0 67%, transparent 67%) 20px 63px / 72% 5px no-repeat,
    radial-gradient(circle at 80% 70%, rgba(52, 181, 242, .15), transparent 28%),
    rgba(255, 255, 255, .82);
}

html[data-theme="light"] .landing-contact-panel {
  border-color: rgba(32, 107, 174, .16);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 55px rgba(24, 70, 114, .16);
}

html[data-theme="light"] .landing-contact-panel > strong { color: #123c70; }
html[data-theme="light"] .landing-contact-panel a { color: #244f7b; }
html[data-theme="light"] .landing-contact-panel a:hover { background: #edf8ff; }
html[data-theme="light"] .landing-contact-panel a > span { background: #e7f6ff; color: #087fdd; }
html[data-theme="light"] .landing-contact-panel small { color: #607d98; }

/* Registration anti-spam verification */
#registration-hcaptcha { margin: 12px auto; max-width: 100%; }
.cabinet-renewal-setup { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.cabinet-renewal-setup h4 { margin: 0 0 8px; }
.cabinet-renewal-setup p { font-size: 13px; line-height: 1.5; }
.cabinet-renewal-setup > label:not(.cabinet-renewal-consent) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.cabinet-renewal-setup select { min-width: 0; max-width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.cabinet-renewal-setup > button { max-width: 100%; white-space: normal; margin-top: 6px; }
/* The challenge must stay inside the native dialog's top layer. Fixed layout
   avoids clipping by the scrolled registration form on small screens. */
#register-modal.hcaptcha-challenge-open { animation: none; }
.registration-hcaptcha-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 8px;
  background: rgba(2, 8, 17, .72);
}
.registration-hcaptcha-overlay[hidden] { display: none; }
.registration-hcaptcha-panel {
  min-width: 0;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.registration-hcaptcha-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 4px 12px; }
#registration-hcaptcha-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; color: inherit; border-radius: 8px; }
#registration-hcaptcha-challenge > iframe { display: block; }
#admin-hcaptcha-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
#admin-hcaptcha-fields > label { margin-bottom: 12px; }

.registration-human-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 18px 0 8px;
  padding: 12px 13px;
  border: 1px solid rgba(112, 213, 255, .24);
  border-radius: 14px;
  background: rgba(13, 57, 104, .38);
}

.registration-human-check:disabled { opacity: .72; }

.registration-human-check legend {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px;
  color: #a9dbf8;
  font-size: calc(9px + var(--font-size-adjust));
  font-weight: 800;
  letter-spacing: .035em;
}

.registration-human-check legend .ui-icon {
  width: 17px;
  height: 17px;
  color: #70d5ff;
}

.registration-human-check label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #d7eafa;
  font-size: calc(10px + var(--font-size-adjust));
  font-weight: 680;
}

.registration-human-check label strong {
  flex: 0 0 auto;
  color: #8ce0ff;
  font-size: calc(14px + var(--font-size-adjust));
  letter-spacing: .08em;
}

.registration-human-check input {
  flex: 0 0 76px;
  width: 76px;
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(121, 210, 255, .32);
  border-radius: 11px;
  outline: none;
  background: rgba(3, 25, 55, .68);
  color: #f4fbff;
  font: inherit;
  font-size: calc(14px + var(--font-size-adjust));
  font-weight: 800;
  text-align: center;
}

.registration-human-check input:focus {
  border-color: #70d5ff;
  box-shadow: 0 0 0 3px rgba(64, 184, 247, .18);
}

.registration-security-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 21px;
  margin: 0 2px 4px;
  color: #88a6c1;
  font-size: calc(8px + var(--font-size-adjust));
  line-height: 1.35;
}

.registration-security-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #70d5ff;
  box-shadow: 0 0 0 4px rgba(112, 213, 255, .12);
}

.registration-security-status[data-state="preparing"] .registration-security-dot {
  animation: registration-security-pulse 1s ease-in-out infinite;
}

.registration-security-status[data-state="ready"] { color: #8eddbd; }
.registration-security-status[data-state="ready"] .registration-security-dot {
  background: #46d39a;
  box-shadow: 0 0 0 4px rgba(70, 211, 154, .12);
}

.registration-security-status[data-state="failed"] { color: #ffabb5; }
.registration-security-status[data-state="failed"] .registration-security-dot {
  background: #ff6d7c;
  box-shadow: 0 0 0 4px rgba(255, 109, 124, .12);
}

@keyframes registration-security-pulse {
  50% { opacity: .45; transform: scale(.72); }
}

html[data-theme="light"] .registration-human-check {
  border-color: rgba(15, 123, 205, .2);
  background: #edf8ff;
}

html[data-theme="light"] .registration-human-check legend { color: #1d5f94; }
html[data-theme="light"] .registration-human-check legend .ui-icon { color: #087fdd; }
html[data-theme="light"] .registration-human-check label { color: #254e72; }
html[data-theme="light"] .registration-human-check label strong { color: #076fca; }

html[data-theme="light"] .registration-human-check input {
  border-color: rgba(17, 107, 178, .28);
  background: #fff;
  color: #123d67;
}

html[data-theme="light"] .registration-security-status { color: #5f7b93; }
html[data-theme="light"] .registration-security-status[data-state="ready"] { color: #187c59; }
html[data-theme="light"] .registration-security-status[data-state="failed"] { color: #b63c4c; }

@media (max-width: 430px) {
  .registration-human-check {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .registration-human-check label { flex: 1 1 calc(100% - 90px); }
  .registration-human-check input { flex-basis: 72px; width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .registration-security-status[data-state="preparing"] .registration-security-dot { animation: none; }
}

/* Free-first Pochtovik landing — version 77 */
.landing-hero {
  grid-template-columns: minmax(0, .88fr) minmax(500px, 1.12fr);
  gap: clamp(34px, 5.5vw, 76px);
}

.landing-hero-copy { position: relative; z-index: 4; }

.landing-hero-copy::before {
  position: absolute;
  z-index: -1;
  top: 7%;
  left: -18%;
  width: 82%;
  height: 74%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 155, 240, .18), transparent 68%);
  filter: blur(24px);
  pointer-events: none;
  content: "";
}

.landing-kicker {
  padding: 8px 13px;
  border: 1px solid rgba(128, 214, 255, .26);
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(0, 88, 182, .12);
}

.landing-hero h1 {
  max-width: 720px;
  margin: 18px 0 19px;
  font-size: clamp(calc(34px + var(--font-size-adjust)), calc(4.2vw + var(--font-size-adjust)), calc(58px + var(--font-size-adjust)));
  letter-spacing: .012em;
  line-height: 1.03;
  text-wrap: wrap;
}

.landing-page :is(h1, h2, h3) {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.landing-hero-copy > p {
  max-width: 670px;
  text-wrap: pretty;
}

.landing-hero .landing-cta.primary {
  min-height: 57px;
  padding-inline: 27px;
  border-radius: 16px;
  border-color: #0a68b9;
  background: linear-gradient(135deg, #0871c8, #064b99);
  color: #fff;
  box-shadow: 0 18px 54px rgba(8, 137, 231, .34), 0 0 0 0 rgba(105, 216, 255, .28);
}

.landing-register {
  border-color: #0a68b9;
  background: linear-gradient(135deg, #0871c8, #064b99);
  color: #fff;
}

html[data-theme="light"] .landing-hero .landing-cta.primary,
html[data-theme="light"] .landing-register {
  border-color: #0a68b9;
  background: linear-gradient(135deg, #0871c8, #064b99);
  color: #fff;
}

.landing-hero .landing-trust {
  max-width: 680px;
  padding: 13px 15px;
  border: 1px solid rgba(132, 209, 252, .18);
  border-radius: 16px;
  backdrop-filter: blur(14px);
}

.landing-mail-demo {
  min-height: 570px;
  isolation: isolate;
}

.landing-brand-hero-image {
  --landing-art-x: 0px;
  --landing-art-y: 0px;
  --landing-art-rotate: 0deg;
  position: absolute;
  z-index: 1;
  top: 5px;
  right: -30px;
  width: min(112%, 720px);
  height: auto;
  transform: translate3d(var(--landing-art-x), var(--landing-art-y), 0) rotate(var(--landing-art-rotate));
  border: 1px solid rgba(133, 212, 255, .28);
  border-radius: 32px;
  object-fit: cover;
  box-shadow: 0 48px 110px rgba(0, 14, 52, .5), 0 0 0 9px rgba(90, 199, 255, .045);
  pointer-events: none;
  transition: transform .28s cubic-bezier(.2, .75, .2, 1), box-shadow .28s ease;
  will-change: transform;
}

.landing-mail-demo .demo-window {
  z-index: 3;
  top: auto;
  right: auto;
  bottom: -42px;
  left: -38px;
  width: min(100%, 595px);
  transform: perspective(1100px) translate3d(var(--landing-demo-x, 0), var(--landing-demo-y, 0), 0) rotateY(calc(-5deg + var(--landing-demo-rotate-y, 0deg))) rotateX(calc(2deg + var(--landing-demo-rotate-x, 0deg))) scale(.7);
  transform-origin: left bottom;
  box-shadow: 0 36px 85px rgba(0, 16, 55, .46), 0 0 0 7px rgba(100, 207, 255, .055);
}

.landing-mail-demo .landing-demo-mascot { display: none; }
.landing-mail-demo .demo-glow { top: -3%; right: -8%; width: 105%; height: 99%; opacity: .9; }
.landing-mail-demo .landing-demo-flight { z-index: 5; top: 45px; right: 8%; width: 46%; }
.landing-mail-demo .badge-security { z-index: 6; right: -2%; bottom: 22px; }
.landing-mail-demo .badge-fast { z-index: 6; bottom: 84px; left: 25%; }

.pricing-section { overflow: hidden; }

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.free-spotlight {
  grid-column: 1 / -1;
  display: grid;
  min-height: 430px;
  grid-template-columns: minmax(300px, .85fr) minmax(440px, 1.15fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: clamp(28px, 5vw, 76px);
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border-radius: 30px;
  isolation: isolate;
}

.free-spotlight::before {
  opacity: 1;
  background:
    radial-gradient(circle at 12% 18%, rgba(102, 218, 255, .2), transparent 34%),
    radial-gradient(circle at 82% 64%, rgba(21, 147, 235, .22), transparent 39%);
}

.free-spotlight::after {
  position: absolute;
  z-index: 0;
  top: -90%;
  left: -16%;
  width: 18%;
  height: 270%;
  transform: rotate(17deg) translate3d(-320%, 0, 0);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .17), transparent);
  pointer-events: none;
  content: "";
}

.free-spotlight .popular-label {
  top: 22px;
  right: 26px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: linear-gradient(135deg, #b6f0ff, #58ccf8);
  color: #062d5a;
  box-shadow: 0 12px 32px rgba(4, 109, 199, .24);
}

.free-spotlight .price-card-top,
.free-spotlight .price-value,
.free-spotlight > ul,
.free-spotlight > button {
  grid-column: 1;
}

.free-spotlight .price-card-top { grid-row: 1; padding-right: 120px; }
.free-spotlight .price-icon { width: 56px; height: 56px; border-radius: 18px; }
.free-spotlight .price-icon .ui-icon { width: 29px; height: 29px; }

.free-spotlight .price-card-top h3 {
  font-size: clamp(calc(23px + var(--font-size-adjust)), calc(2.3vw + var(--font-size-adjust)), calc(35px + var(--font-size-adjust)));
  letter-spacing: .015em;
}

.free-spotlight .price-card-top p {
  max-width: 390px;
  color: #b9d5e9;
  font-size: calc(11px + var(--font-size-adjust));
  line-height: 1.45;
}

.free-spotlight .price-value { grid-row: 2; min-height: 86px; margin-top: 18px; }
.free-spotlight .price-value strong { font-size: clamp(calc(45px + var(--font-size-adjust)), calc(5vw + var(--font-size-adjust)), calc(72px + var(--font-size-adjust))); }
.free-spotlight .price-value span { padding-bottom: 13px; color: #b4cce0; font-size: calc(11px + var(--font-size-adjust)); }

.free-spotlight > ul {
  grid-row: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 13px 20px;
  margin: 13px 0 25px;
  color: #d6e8f5;
}

.free-spotlight > button {
  grid-row: 4;
  width: min(100%, 390px);
  min-height: 52px;
  border-radius: 15px;
  border-color: #64d9ff;
  background: linear-gradient(135deg, #0868bd, #06458e);
  color: #fff;
  box-shadow: 0 18px 46px rgba(2, 107, 207, .32);
}

.free-spotlight-art {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 5;
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
  border: 1px solid rgba(135, 211, 255, .3);
  border-radius: 25px;
  background: #dcefff;
  box-shadow: 0 28px 75px rgba(0, 22, 65, .33), 0 0 0 8px rgba(104, 207, 255, .05);
}

.free-spotlight-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 42% 70%, rgba(22, 140, 224, .12));
  pointer-events: none;
  content: "";
}

.free-spotlight-art img {
  display: block;
  width: 100%;
  height: 100%;
  transform: scale(1.035);
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .75, .2, 1), filter .4s ease;
}

.free-spotlight:hover .free-spotlight-art img { transform: scale(1.075) translate3d(5px, -4px, 0); }

.free-mail-count {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: rgba(5, 65, 137, .9);
  color: #fff;
  box-shadow: 0 18px 40px rgba(2, 47, 105, .28);
  backdrop-filter: blur(12px);
}

.free-mail-count strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.07em;
}

.free-mail-count i {
  position: absolute;
  width: 18px;
  height: 13px;
  border: 1.5px solid #9be8ff;
  border-radius: 4px;
  background:
    linear-gradient(35deg, transparent 47%, #9be8ff 49% 51%, transparent 53%) left top / 50% 76% no-repeat,
    linear-gradient(-35deg, transparent 47%, #9be8ff 49% 51%, transparent 53%) right top / 50% 76% no-repeat,
    #0b79d5;
  box-shadow: 0 5px 12px rgba(0, 42, 96, .2);
}

.free-mail-count i:nth-of-type(1) { top: 9px; right: -9px; transform: rotate(8deg); }
.free-mail-count i:nth-of-type(2) { right: -14px; bottom: 15px; transform: rotate(-6deg); }
.free-mail-count i:nth-of-type(3) { bottom: -7px; left: 12px; transform: rotate(5deg); }

.pricing-grid > .price-card:not(.free-spotlight) {
  min-height: 390px;
  border-radius: 22px;
}

.pricing-grid > .price-card:not(.free-spotlight):hover {
  transform: translateY(-7px);
  border-color: rgba(111, 207, 255, .4);
}

#benefits:not(.is-revealed) .landing-feature-grid article,
.pricing-section:not(.is-revealed) .price-card {
  transform: translateY(36px) scale(.985);
  opacity: .45;
}

#benefits.is-revealed .landing-feature-grid article,
.pricing-section.is-revealed .price-card {
  transform: translateY(0) scale(1);
  opacity: 1;
  animation: pochtovik-card-reveal .75s cubic-bezier(.2, .78, .2, 1) backwards;
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}

#benefits.is-revealed .landing-feature-grid article:nth-child(2),
.pricing-section.is-revealed .price-card:nth-child(2) { animation-delay: .09s; }

#benefits.is-revealed .landing-feature-grid article:nth-child(3),
.pricing-section.is-revealed .price-card:nth-child(3) { animation-delay: .18s; }

.pricing-section.is-revealed .price-card:nth-child(4) { animation-delay: .27s; }

#benefits.is-revealed .landing-feature-grid article:hover { transform: translateY(-8px) scale(1.012); }

html[data-theme="light"] .free-spotlight {
  border-color: rgba(18, 132, 222, .4);
  background:
    radial-gradient(circle at 7% 9%, rgba(116, 218, 255, .33), transparent 35%),
    linear-gradient(145deg, #f8fcff, #e9f6ff 57%, #d9edff);
  box-shadow: 0 30px 80px rgba(17, 95, 171, .17);
}

html[data-theme="light"] .free-spotlight .price-card-top h3,
html[data-theme="light"] .free-spotlight .price-value strong { color: #082d62; }

html[data-theme="light"] .free-spotlight .price-card-top p,
html[data-theme="light"] .free-spotlight .price-value span,
html[data-theme="light"] .free-spotlight > ul { color: #3d668a; }

html[data-theme="light"] .free-spotlight .popular-label {
  border-color: rgba(14, 107, 194, .16);
  color: #062d5a;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1051px) and (hover: hover) and (pointer: fine) {
  .landing-hero.is-active .landing-brand-hero-image { animation: pochtovik-hero-art-float 6.8s ease-in-out infinite; }
  .landing-hero.is-active .landing-cta.primary { animation: pochtovik-free-cta-pulse 3.8s ease-in-out infinite; }
  .pricing-section.is-active .free-spotlight::after { animation: pochtovik-free-shine 7s cubic-bezier(.22, .72, .2, 1) infinite; }
  .pricing-section.is-active .free-spotlight-art { animation: pochtovik-free-art-float 7.6s ease-in-out infinite; }
  .pricing-section.is-active .free-mail-count { animation: pochtovik-free-count-float 4.8s ease-in-out infinite; }
  .pricing-section.is-active .free-mail-count i:nth-of-type(1) { animation: pochtovik-mini-mail-1 4.2s ease-in-out infinite; }
  .pricing-section.is-active .free-mail-count i:nth-of-type(2) { animation: pochtovik-mini-mail-2 4.6s ease-in-out .35s infinite; }
  .pricing-section.is-active .free-mail-count i:nth-of-type(3) { animation: pochtovik-mini-mail-3 4.4s ease-in-out .7s infinite; }
  .landing-hero.is-active .demo-inbox article { animation: pochtovik-demo-mail-wave 5.4s ease-in-out infinite; }
  .landing-hero.is-active .demo-inbox article:nth-child(3) { animation-delay: .35s; }
  .landing-hero.is-active .demo-inbox article:nth-child(4) { animation-delay: .7s; }
}

@keyframes pochtovik-hero-art-float {
  0%, 100% { transform: translate3d(var(--landing-art-x), var(--landing-art-y), 0) rotate(var(--landing-art-rotate)); }
  50% { transform: translate3d(var(--landing-art-x), calc(var(--landing-art-y) - 15px), 0) rotate(calc(var(--landing-art-rotate) + .7deg)) scale(1.012); }
}

@keyframes pochtovik-free-cta-pulse {
  0%, 100% { box-shadow: 0 18px 54px rgba(8, 137, 231, .34), 0 0 0 0 rgba(105, 216, 255, .22); }
  50% { box-shadow: 0 23px 68px rgba(8, 137, 231, .46), 0 0 0 9px rgba(105, 216, 255, 0); }
}

@keyframes pochtovik-free-shine {
  0%, 16% { transform: rotate(17deg) translate3d(-320%, 0, 0); }
  58%, 100% { transform: rotate(17deg) translate3d(780%, 0, 0); }
}

@keyframes pochtovik-free-art-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.2deg); }
  50% { transform: translate3d(7px, -7px, 0) rotate(.35deg); }
}

@keyframes pochtovik-card-reveal {
  from { transform: translateY(36px) scale(.985); opacity: .45; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes pochtovik-free-count-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -8px, 0) rotate(2deg); }
}

@keyframes pochtovik-mini-mail-1 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(8deg); }
  50% { transform: translate3d(5px, -4px, 0) rotate(14deg); }
}

@keyframes pochtovik-mini-mail-2 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50% { transform: translate3d(6px, 2px, 0) rotate(-12deg); }
}

@keyframes pochtovik-mini-mail-3 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(5deg); }
  50% { transform: translate3d(-3px, 5px, 0) rotate(10deg); }
}

@keyframes pochtovik-demo-mail-wave {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: .82; }
  16%, 34% { transform: translate3d(4px, -2px, 0); opacity: 1; }
  52% { transform: translate3d(0, 0, 0); opacity: .86; }
}

.landing-page.landing-motion-paused .landing-brand-hero-image,
.landing-page.landing-motion-paused .landing-hero .landing-cta.primary,
.landing-page.landing-motion-paused .free-spotlight::after,
.landing-page.landing-motion-paused .free-spotlight-art,
.landing-page.landing-motion-paused .free-mail-count,
.landing-page.landing-motion-paused .free-mail-count i,
.landing-page.landing-motion-paused .demo-inbox article {
  animation-play-state: paused !important;
}

@media (max-width: 1180px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .landing-hero-copy { max-width: 780px; }
  .landing-mail-demo { min-height: 610px; }
  .landing-brand-hero-image { top: 5px; right: 2%; width: min(96%, 760px); }
  .landing-mail-demo .demo-window { left: 1%; transform: perspective(1100px) translate3d(0, 0, 0) rotateY(-4deg) rotateX(1deg) scale(.68); }
  .landing-mail-demo .badge-fast { left: 34%; }
  .free-spotlight { grid-template-columns: minmax(280px, .9fr) minmax(380px, 1.1fr); column-gap: 30px; }
}

@media (min-width: 1181px) and (max-height: 820px) {
  .landing-hero {
    min-height: calc(100dvh - 78px);
    padding-top: 34px;
    padding-bottom: 50px;
  }

  .landing-hero h1 {
    margin-block: 15px 16px;
    font-size: clamp(calc(34px + var(--font-size-adjust)), calc(3.8vw + var(--font-size-adjust)), calc(54px + var(--font-size-adjust)));
  }

  .landing-hero-copy > p { line-height: 1.56; }
  .landing-hero-actions { margin-top: 22px; }
  .landing-hero .landing-trust { margin-top: 19px; padding-block: 10px; }
  .landing-mail-demo { min-height: 510px; }
}

@media (max-width: 1050px) {
  .free-spotlight { grid-template-columns: minmax(260px, .86fr) minmax(330px, 1.14fr); padding: 30px; }
}

@media (max-width: 820px) {
  .pricing-heading { align-items: stretch; flex-direction: column; }
  .billing-period-switch { align-self: flex-start; }
  .free-spotlight { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto; }
  .free-spotlight .price-card-top { grid-column: 1; grid-row: 1; }
  .free-spotlight .price-value { grid-column: 1; grid-row: 2; }
  .free-spotlight-art { grid-column: 1; grid-row: 3; min-height: 320px; margin: 5px 0 16px; }
  .free-spotlight > ul { grid-column: 1; grid-row: 4; }
  .free-spotlight > button { grid-column: 1; grid-row: 5; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid > .price-card:not(.free-spotlight) { min-height: 350px; }
}

@media (max-width: 720px) {
  .landing-hero { padding-top: 36px; }
  .landing-hero h1 {
    margin: 17px 0 18px;
    font-size: clamp(calc(28px + var(--font-size-adjust)), calc(7.6vw + var(--font-size-adjust)), calc(34px + var(--font-size-adjust)));
    line-height: 1.06;
  }
  .landing-hero-actions { align-items: stretch; flex-direction: column; }
  .landing-hero .landing-cta { width: 100%; min-height: 55px; padding-inline: 17px; }
  .landing-hero .landing-trust { align-items: stretch; flex-direction: column; }
  .landing-mail-demo { min-height: 390px; }
  .landing-brand-hero-image { top: 8px; right: 0; width: 100%; border-radius: 22px; }
  .landing-mail-demo .demo-window,
  .landing-mail-demo .badge-fast,
  .landing-mail-demo .badge-security,
  .landing-mail-demo .landing-demo-flight { display: none; }
  .free-spotlight { min-height: 0; padding: 25px 20px 22px; border-radius: 24px; }
  .free-spotlight .popular-label { position: static; grid-column: 1; grid-row: 1; width: max-content; max-width: 100%; margin: 0 0 17px; }
  .free-spotlight .price-card-top { grid-row: 2; padding-right: 0; }
  .free-spotlight .price-value { grid-row: 3; }
  .free-spotlight-art { grid-row: 4; min-height: 250px; }
  .free-spotlight > ul { grid-row: 5; grid-template-columns: 1fr; }
  .free-spotlight > button { grid-row: 6; width: 100%; }
  .free-mail-count { width: 70px; height: 70px; border-radius: 20px; }
  .free-mail-count strong { font-size: 34px; }
}

@media (max-width: 430px) {
  .landing-kicker { align-items: flex-start; padding: 8px 11px; line-height: 1.35; }
  .landing-hero-copy > p { font-size: calc(13px + var(--font-size-adjust)); line-height: 1.58; }
  .landing-mail-demo { min-height: 280px; }
  .landing-brand-hero-image { border-radius: 18px; }
  .free-spotlight-art { min-height: 190px; }
  .free-spotlight .price-card-top { align-items: flex-start; }
  .free-spotlight .price-icon { width: 48px; height: 48px; }
  .free-spotlight .price-value strong { font-size: calc(48px + var(--font-size-adjust)); }
  .free-mail-count { top: 12px; left: 12px; transform: scale(.84); transform-origin: top left; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-brand-hero-image,
  .landing-hero .landing-cta.primary,
  .free-spotlight::after,
  .free-spotlight-art,
  .free-mail-count,
  .free-mail-count i,
  .demo-inbox article,
  .landing-feature-grid article,
  .pricing-section .price-card { animation: none !important; }

  #benefits:not(.is-revealed) .landing-feature-grid article,
  .pricing-section:not(.is-revealed) .price-card {
    transform: none;
    opacity: 1;
  }
}

/* Public app installation: browser-native prompt with accessible platform guides. */
.landing-apps-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 12px;
  color: var(--landing-text);
  font-size: calc(14px + var(--font-size-adjust));
  text-decoration: none;
}
.landing-apps-shortcut:hover { text-decoration: underline; text-underline-offset: 4px; }
.landing-apps-shortcut .ui-icon { color: var(--landing-cyan); }
.landing-apps { color: var(--landing-text); }
.landing-apps .landing-section-heading { max-width: 980px; margin-bottom: 36px; }
.landing-apps h2 { font-size: clamp(28px, 3.8vw, 48px); line-height: 1.18; }
.landing-install-banner {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(230px, .8fr);
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--landing-line);
  border-radius: 28px;
  background: radial-gradient(ellipse at 0 0, rgba(30, 158, 255, .18), transparent 65%), var(--landing-panel);
  box-shadow: 0 16px 54px rgba(8, 32, 80, .09);
}
.landing-install-banner > img { width: 88px; height: 88px; border-radius: 22px; }
.landing-install-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--landing-line);
  border-radius: 20px;
  color: var(--landing-cyan);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
}
.landing-install-copy h3 { margin: 10px 0; font-size: calc(21px + var(--font-size-adjust)); line-height: 1.3; }
.landing-install-copy p,
.landing-install-action p,
.landing-install-note { margin: 0; color: var(--landing-muted); font-size: calc(13px + var(--font-size-adjust)); line-height: 1.65; }
.landing-install-action .landing-cta { width: 100%; min-height: 52px; padding: 14px 18px; white-space: normal; font-size: calc(14px + var(--font-size-adjust)); line-height: 1.4; }
.landing-install-action p { margin-top: 12px; text-align: center; }
.landing-install-action button:disabled { cursor: default; opacity: .7; animation: none; transform: none; }
.landing-install-platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; margin-top: 20px; }
.landing-install-platform { min-width: 0; border: 1px solid var(--landing-line); border-radius: 18px; background: var(--landing-panel); scroll-margin-top: 110px; }
.landing-install-platform[open] { border-color: var(--landing-blue); box-shadow: 0 8px 26px rgba(30, 120, 225, .1); }
.landing-install-platform summary { display: flex; align-items: center; gap: 12px; min-height: 104px; padding: 18px; cursor: pointer; list-style: none; }
.landing-install-platform summary::-webkit-details-marker { display: none; }
.landing-install-platform summary > span:nth-child(2) { flex: 1; min-width: 0; }
.landing-install-platform summary strong { display: block; font-size: calc(17px + var(--font-size-adjust)); line-height: 1.4; }
.landing-install-platform summary small { display: block; margin-top: 4px; color: var(--landing-muted); font-size: calc(11px + var(--font-size-adjust)); line-height: 1.5; }
.landing-install-platform summary > .ui-icon { flex: 0 0 16px; color: var(--landing-muted); transition: transform .18s ease; }
.landing-install-platform[open] summary > .ui-icon { transform: rotate(180deg); }
.landing-device-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 48px; border-radius: 12px; color: var(--landing-cyan); background: rgba(30, 156, 255, .1); }
.landing-device-icon svg { width: 28px; height: 28px; }
.landing-install-steps { padding: 0 20px 18px; font-size: calc(13px + var(--font-size-adjust)); line-height: 1.65; overflow-wrap: anywhere; }
.landing-install-steps ol { margin: 0 0 12px; padding-left: 22px; }
.landing-install-steps li + li { margin-top: 10px; }
.landing-install-steps a { display: inline-flex; align-items: center; min-height: 44px; color: var(--landing-cyan); text-underline-offset: 4px; }
.landing-install-note { max-width: 850px; margin: 24px auto 0; text-align: center; }
.landing-apps :is(button, a, summary):focus-visible,
.landing-apps-shortcut:focus-visible { outline: 3px solid var(--landing-blue); outline-offset: 4px; border-radius: 8px; }
@media (max-width: 1200px) {
  .landing-install-banner { grid-template-columns: 80px minmax(0, 1fr); }
  .landing-install-action { grid-column: 1 / -1; max-width: 520px; width: 100%; justify-self: center; }
  .landing-install-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .landing-install-banner { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 20px; border-radius: 20px; }
  .landing-install-banner > img { width: 52px; height: 52px; border-radius: 14px; }
  .landing-install-copy h3 { font-size: calc(18px + var(--font-size-adjust)); }
  .landing-install-copy p { margin-left: -66px; margin-top: 20px; }
  .landing-install-platforms { grid-template-columns: minmax(0, 1fr); }
  .landing-install-platform summary { min-height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-install-platform summary > .ui-icon { transition: none; }
}
.cabinet-renewal-consent { display:flex; align-items:flex-start; gap:10px; margin:12px 0; font-size:13px; line-height:1.5; }
.cabinet-renewal-consent[hidden], .cabinet-renewal-status[hidden] { display:none; }
.cabinet-renewal-consent input[type=checkbox] { flex:0 0 18px; width:18px; height:18px; margin:2px 0 0; }
.cabinet-renewal-consent span { min-width:0; }
.cabinet-renewal-status { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:12px; font-size:13px; line-height:1.5; }
.cabinet-renewal-status h4 { margin:0 0 8px; font-size:15px; }
.cabinet-renewal-status p { margin:0 0 10px; overflow-wrap:anywhere; }
.cabinet-renewal-status .cabinet-card-scope { margin:10px 0 0; }
.cabinet-renewal-actions { display:flex; flex-wrap:wrap; gap:8px; }
.cabinet-renewal-actions > button { min-height:40px; max-width:100%; white-space:normal; }
#cabinet-payment-method-unlink { min-height:44px; color:var(--danger); border-color:var(--danger); }
#cabinet-payment-method-unlink:hover { background:color-mix(in srgb, var(--danger) 10%, var(--surface)); }
