@font-face {
  font-display: swap;
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Inter-400.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/Inter-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/Inter-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/Inter-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --font-sans: "Inter", "Inter Fallback: BlinkMacSystemFont", "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #fb2c36;
  --success: #00bb7f;
  --bg: #171717;
  --bg-elevated: #262626;
  --bg-muted: #1f1f1f;
  --bg-accented: #404040;
  --border: #404040;
  --border-muted: #262626;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --text-dimmed: #737373;
  --radius: 4px;
  --radius-control: 8px;
  --shadow: 0 10px 24px rgb(0 0 0 / 20%);
}

html.dark,
.dark body {
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: #93c5fd;
  text-decoration: none;
}

a:hover {
  color: #bfdbfe;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

.topbar {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgb(23 23 23 / 88%);
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  height: 64px;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: #fafafa;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #404147, #0f111a);
  border: 1px solid #404040;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.brand-mark::before {
  background: linear-gradient(135deg, #61cefc, #378fe3 55%, #1257cd);
  clip-path: polygon(12% 26%, 88% 16%, 68% 82%, 47% 56%, 26% 76%, 37% 49%);
  content: "";
  display: block;
  height: 20px;
  width: 22px;
}

.nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.nav form {
  margin: 0;
}

.nav-link {
  border-radius: var(--radius-control);
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 10px;
}

.nav-link:hover {
  background: var(--bg-muted);
  color: var(--text);
}

main {
  margin: 0 auto;
  max-width: 1280px;
  padding: 32px 24px 56px;
  flex: 1 0 auto;
  width: 100%;
}

.hero {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  min-height: calc(100vh - 160px);
  padding: 48px 0 64px;
}

.hero-copy {
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: 0;
  line-height: .98;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--primary);
  display: block;
}

.hero-subcopy {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button-link {
  min-height: 38px;
  padding: 8px 15px;
}

.hero-terminal,
.feature-card,
.local-first {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
}

.hero-terminal {
  overflow: hidden;
}

.terminal-bar {
  align-items: center;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
}

.terminal-bar span {
  background: var(--bg-accented);
  border-radius: 9999px;
  display: block;
  height: 10px;
  width: 10px;
}

.hero-terminal pre,
.code-block {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
}

.section-block {
  padding: 54px 0;
}

.section-head {
  margin-bottom: 22px;
  max-width: 760px;
}

.section-head h2 {
  font-size: 28px;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  padding: 20px;
}

.feature-card h3 {
  color: #fafafa;
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.code-tabs input {
  display: none;
}

.tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tab-buttons label {
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  font-weight: 600;
  min-height: 34px;
  padding: 7px 12px;
}

#tab-curl:checked ~ .tab-buttons label[for="tab-curl"],
#tab-python:checked ~ .tab-buttons label[for="tab-python"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tab-panel {
  display: none;
}

#tab-curl:checked ~ .tab-curl,
#tab-python:checked ~ .tab-python {
  display: block;
}

.two-column {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, .7fr) minmax(360px, 1fr);
}

.local-first {
  padding: 28px;
}

.local-first p:not(.eyebrow) {
  color: var(--text-muted);
  max-width: 760px;
}

.site-footer {
  border-top: 1px solid var(--border-muted);
  display: flex;
  flex-wrap: wrap;
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  gap: 18px;
  max-width: 1280px;
  padding: 24px 24px 32px;
}

.footer-muted {
  color: var(--text-dimmed);
}

.legal-page {
  margin: 0 auto;
  max-width: 880px;
}

.mail-preview {
  color: var(--text-muted);
  max-width: 340px;
}

.quota-cell {
  display: grid;
  gap: 7px;
  min-width: 170px;
}

.progress-bar {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar span {
  background: linear-gradient(90deg, #61cefc, #378fe3 55%, #1257cd);
  display: block;
  height: 100%;
}

.docs-layout {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: 250px minmax(0, 1fr);
}

.docs-sidebar {
  position: sticky;
  top: 88px;
}

.docs-sidebar-inner {
  border-right: 1px solid var(--border-muted);
  padding-right: 18px;
}

.docs-nav {
  display: grid;
  gap: 4px;
}

.docs-nav a {
  border-radius: var(--radius-control);
  color: var(--text-muted);
  font-weight: 600;
  padding: 9px 10px;
}

.docs-nav a.active,
.docs-nav a:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.docs-note {
  background: var(--bg-muted);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-control);
  color: var(--text-muted);
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 12px;
}

.docs-content {
  max-width: 920px;
}

.docs-lead {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}

.docs-section {
  border-top: 1px solid var(--border-muted);
  padding: 28px 0;
}

.docs-section h2 {
  font-size: 22px;
}

.docs-section p {
  color: var(--text-muted);
}

.docs-section .code-block + .code-block {
  margin-top: 12px;
}

.endpoint-list {
  display: grid;
  gap: 14px;
}

.endpoint-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 16px;
}

.endpoint-card h3 {
  align-items: center;
  color: #fafafa;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.endpoint-card h3 span {
  background: rgb(59 130 246 / 14%);
  border: 1px solid rgb(59 130 246 / 35%);
  border-radius: 9999px;
  color: #93c5fd;
  font-size: 12px;
  padding: 3px 8px;
}

.guide-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  padding: 18px;
}

.metric-card span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.metric-card strong {
  color: #fafafa;
  font-size: 28px;
  line-height: 1.15;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.dashboard-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr);
}

.admin-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.panel-pad {
  padding: 18px;
}

.embedded-table {
  box-shadow: none;
}

.section-links {
  display: grid;
  gap: 8px;
}

.section-links a {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--text);
  font-weight: 600;
  padding: 10px 12px;
}

.section-links a:hover {
  background: var(--bg-accented);
}

.admin-kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.admin-kv div {
  border-bottom: 1px solid var(--border-muted);
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
}

.admin-kv div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-kv dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-kv dd {
  margin: 0;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.pricing-head {
  align-items: start;
}

.pricing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 22px;
}

.pricing-card h2 {
  font-size: 34px;
  margin: 0;
}

.feature-list {
  color: var(--text-muted);
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.page-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: #fafafa;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 8px;
}

h2 {
  color: #fafafa;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.muted {
  color: var(--text-muted);
}

.card,
.auth-panel,
.inline-form,
.message-meta,
.message-pane,
.token-once {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
}

.auth-panel {
  margin: 56px auto 0;
  max-width: 430px;
  padding: 28px;
}

.auth-panel form,
.stack {
  display: grid;
  gap: 14px;
}

label {
  color: var(--text);
  display: grid;
  font-size: 13px;
  font-weight: 500;
  gap: 7px;
  margin: 0;
}

input,
select,
button,
textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font: inherit;
}

input,
select,
textarea {
  background: #171717;
  color: var(--text);
  min-height: 40px;
  padding: 9px 11px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 25%);
  outline: none;
}

button,
.button {
  align-items: center;
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 9999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  min-height: 38px;
  padding: 8px 15px;
}

button:hover,
.button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.button-ghost,
.button-danger {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button-ghost:hover {
  background: var(--bg-accented);
  border-color: var(--bg-accented);
}

.button-danger {
  color: #fecaca;
}

.button-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.inline-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
}

.inline-form label {
  min-width: 180px;
}

.action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-row form {
  margin: 0;
}

.action-row button {
  min-height: 32px;
  padding: 6px 10px;
}

.click-row {
  cursor: pointer;
}

.click-row:hover {
  background: var(--bg-muted);
}

.sparkline {
  align-items: end;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(24, minmax(4px, 1fr));
  height: 96px;
  padding-top: 8px;
}

.spark-bar {
  background: linear-gradient(180deg, var(--primary), #1257cd);
  border-radius: 4px 4px 0 0;
  display: block;
  min-height: 6px;
}

.checkbox {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 40px;
}

.checkbox input {
  min-height: auto;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  overflow: hidden;
}

table {
  background: var(--bg-elevated);
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

td code,
.token-once code {
  color: #bfdbfe;
  font-size: 12px;
}

.badge {
  background: #1f2937;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
}

.badge-success {
  color: var(--success);
}

.badge-danger {
  color: #fca5a5;
}

.flash {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  margin-bottom: 16px;
  padding: 10px 12px;
}

.flash.error {
  border-color: rgb(251 44 54 / 45%);
  color: #fca5a5;
}

.token-once {
  border-color: rgb(0 187 127 / 45%);
  color: #ccfbf1;
  margin-bottom: 16px;
  padding: 13px 14px;
}

.message-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
}

.meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.meta-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.tabs {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
}

.tabs a {
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 7px 12px;
}

.tabs a.active,
.tabs a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.message-pane {
  margin-bottom: 20px;
  max-height: 720px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

pre.message-pane,
.code-block {
  background: #0a0a0a;
  color: #e5e5e5;
  font-size: 12px;
}

.html-preview {
  background: #fff;
  color: #171717;
  white-space: normal;
}

.mime-tree {
  margin: 4px 0 4px 18px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-control);
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    height: auto;
    padding: 14px 16px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  main {
    padding: 24px 16px 40px;
  }

  .hero,
  .two-column,
  .docs-layout,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-sidebar-inner {
    border-bottom: 1px solid var(--border-muted);
    border-right: 0;
    padding: 0 0 18px;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-terminal {
    min-width: 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-form {
    align-items: stretch;
    display: grid;
  }

  .inline-form label {
    min-width: 0;
  }
}

@media print {
  .topbar,
  .tabs,
  .inline-form,
  .button,
  button {
    display: none !important;
  }

  body,
  .message-pane,
  .message-meta {
    background: #fff;
    color: #000;
  }
}

/* smtp.dev-style pills + footer */
.pill-planned {
  display: inline-block;
  margin-left: .4rem;
  padding: .1rem .5rem;
  border: 1px solid var(--ui-border, #333);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ui-text-muted, #a3a3a3);
  vertical-align: middle;
}
.footer-muted {
  color: var(--ui-text-dimmed, #737373);
}

/* docs sidebar groups */
.docs-nav-group {
  display: block;
  margin: 1rem 0 0.25rem;
  padding: 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-text-dimmed, #737373);
}
.docs-nav-sub {
  padding-left: 1.4rem !important;
}
