/* Shared colors for the site, console and legal pages. */
:root {
  color-scheme: light;
  --ink: #172c47;
  --blue: #2f59db;
  --muted: #53657d;
  --page: #f7f8fc;
  --marketing-page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f2f4fa;
  --surface-hover: #edf1ff;
  --selected: #eaf0ff;
  --line: #dce3ed;
  --control-border: #b5c1d2;
  --notice-bg: #fff8dd;
  --notice-text: #655313;
  --notice-line: #dccb80;
  --success-bg: #eef8f3;
  --success-text: #22674c;
  --success-line: #d4ebdf;
  --attention-bg: #fff2ed;
  --attention-text: #a74529;
  --attention-line: #f3d8cc;
  --danger-text: #ad2938;
  --chart-outbound: #334bdb;
  --chart-received: #4eaa9d;
  --chart-grid: #e1e7f0;
  --paper: var(--surface-soft);
  --white: var(--surface);
  --action: #2f59db;
  --action-hover: #2448bc;
  --navy: #08172d;
  accent-color: var(--blue);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #e9f1ff;
  --blue: #94baff;
  --muted: #a9bad2;
  --page: #0a1120;
  --marketing-page: #0a1120;
  --surface: #111d30;
  --surface-soft: #18253b;
  --surface-hover: #243450;
  --selected: #223654;
  --line: #30415d;
  --control-border: #60718d;
  --notice-bg: #352d1a;
  --notice-text: #f4d88b;
  --notice-line: #776235;
  --success-bg: #15322d;
  --success-text: #8de4c4;
  --success-line: #326857;
  --attention-bg: #3a2627;
  --attention-text: #ffbdab;
  --attention-line: #805448;
  --danger-text: #ffb6c3;
  --chart-outbound: #7c9cff;
  --chart-received: #6bcebd;
  --chart-grid: #30415d;
}
/* Follow the device even before JavaScript, or when it is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #e9f1ff;
    --blue: #94baff;
    --muted: #a9bad2;
    --page: #0a1120;
    --marketing-page: #0a1120;
    --surface: #111d30;
    --surface-soft: #18253b;
    --surface-hover: #243450;
    --selected: #223654;
    --line: #30415d;
    --control-border: #60718d;
    --notice-bg: #352d1a;
    --notice-text: #f4d88b;
    --notice-line: #776235;
    --success-bg: #15322d;
    --success-text: #8de4c4;
    --success-line: #326857;
    --attention-bg: #3a2627;
    --attention-text: #ffbdab;
    --attention-line: #805448;
    --danger-text: #ffb6c3;
    --chart-outbound: #7c9cff;
    --chart-received: #6bcebd;
    --chart-grid: #30415d;
  }
}
html,
body {
  color: var(--ink);
  background: var(--page);
}
[data-theme-control] {
  display: inline-flex;
  flex: none;
}
[data-theme-control][hidden] {
  display: none !important;
}
.theme-menu {
  position: relative;
  font:
    14px/1.5 Manrope,
    system-ui,
    sans-serif;
  letter-spacing: normal;
}
.theme-menu > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  background: var(--surface);
}
.theme-menu > summary::-webkit-details-marker {
  display: none;
}
.theme-menu > summary:hover {
  background: var(--surface-hover);
}
.theme-menu > summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.theme-menu .theme-panel {
  display: grid;
  gap: 10px;
  position: absolute;
  top: 52px;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 16px;
  width: 212px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 36px #0005;
  font-size: 13px;
  font-weight: 650;
}
.theme-panel select {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}
.dark .theme-menu > summary {
  color: #dce8ff;
  background: #12233c;
  border-color: #617999;
}
.dark .theme-menu > summary:hover {
  background: #213858;
}
.theme-panel select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
dialog {
  background: var(--surface);
}
.primary {
  background: var(--action);
  border-color: var(--action);
  color: white;
}
.primary:hover {
  background: var(--action-hover);
}
.button.primary,
.closing {
  background: var(--action);
}
.button.primary:hover {
  background: var(--action-hover);
}
.button.light {
  background: #f5f8ff;
  color: #101e36;
}
.button.light:hover {
  background: #dae6ff;
}
.topbar {
  gap: 20px;
}
.topbar nav {
  gap: 16px;
}
@media (max-width: 760px) {
  .topbar {
    gap: 10px;
    padding-inline: 16px;
  }
  .topbar nav {
    gap: 8px;
  }
  .site-header {
    gap: 8px;
  }
  .header-actions {
    gap: 8px;
  }
}
@media (max-width: 380px) {
  .topbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-block: 10px;
    gap: 8px;
  }
  .topbar .brand {
    flex: 1;
  }
  .topbar nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-end;
  }
  .topbar > [data-theme-control] {
    margin-left: auto;
  }
  .site-header .brand {
    font-size: 17px;
    gap: 8px;
  }
}

body.marketing-page {
  background: var(--marketing-page);
}
