/* MailBox Ultra — docs site stylesheet. Vanilla CSS, no preprocessor. */

:root {
  --accent: #2dd4bf;
  --accent-2: #10b981;
  --accent-soft: rgba(45, 212, 191, 0.12);

  --bg: #0a0d11;
  --bg-elev: #11161c;
  --bg-elev-2: #161c24;
  --bg-soft: #1a212a;
  --border: #1f2832;
  --border-strong: #2a3441;
  --text: #e6edf3;
  --text-dim: #98a3b1;
  --text-mute: #6b7682;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
}

[data-theme="light"] {
  --accent: #0d9488;
  --accent-2: #059669;
  --accent-soft: rgba(13, 148, 136, 0.12);

  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --bg-elev-2: #f1f3f6;
  --bg-soft: #e9ecf1;
  --border: #e1e6ec;
  --border-strong: #cdd5de;
  --text: #0e151c;
  --text-dim: #475665;
  --text-mute: #6f7c8c;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: var(--mono); font-size: 0.93em; }
:not(pre) > code {
  background: var(--bg-elev-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
}

/* topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.brand-name { letter-spacing: 0.005em; }
.brand-mark {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.brand-logo { color: var(--accent); }
.primary-nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-link {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--accent); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-mute);
  border: 1px solid transparent;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 6px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    margin-left: auto;
  }
  .nav-toggle-bar { display: block; height: 2px; background: var(--text); border-radius: 1px; }
  .nav-list { display: none; }
  .nav-list.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    position: absolute;
    right: 16px;
    top: 60px;
    background: var(--bg-elev);
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .primary-nav { margin-left: 0; }
}

/* page */

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}
.home-page { max-width: 1080px; padding-top: 8px; }

.prose h1 {
  font-size: 2rem;
  margin: 32px 0 8px;
  letter-spacing: -0.005em;
}
.prose h2 {
  font-size: 1.35rem;
  margin: 36px 0 8px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 24px 0 4px; }
.prose p { margin: 8px 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 8px 0 16px; }
.prose li { margin: 4px 0; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 14px;
  margin: 12px 0;
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
}
.anchor {
  margin-right: 6px;
  color: var(--text-mute);
  text-decoration: none;
  font-weight: 400;
  visibility: hidden;
}
.prose h2:hover .anchor, .prose h3:hover .anchor { visibility: visible; }

/* code blocks */

.code-block {
  position: relative;
  margin: 12px 0 20px;
}
.code-block pre {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0;
  overflow-x: auto;
  line-height: 1.55;
}
.code-lang {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-family: var(--mono);
  background: var(--bg-elev-2);
  padding: 0 6px;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-mute);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.1s ease, border-color 0.1s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

/* tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0 20px;
  background: var(--bg-elev);
}
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.table-wrap thead th {
  background: var(--bg-elev-2);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.table-wrap tr:last-child td { border-bottom: 0; }

/* hero */

.hero {
  text-align: center;
  padding: 48px 16px 32px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--accent);
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 16px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto 24px;
}
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-oneliner {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  overflow-x: auto;
}
.hero-oneliner code {
  font-family: var(--mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  background: none;
  padding: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: filter 0.12s ease, transform 0.12s ease;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #00342e;
}
.btn.ghost {
  background: var(--bg-elev-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn.ghost:hover { background: var(--bg-soft); }

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-mute);
  margin-bottom: 32px;
}
.hero-meta strong { color: var(--text); font-weight: 600; }

.hero-figure {
  margin: 32px auto 0;
  max-width: 1080px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.hero-figure img { display: block; width: 100%; height: auto; }

/* sections */

.section {
  padding: 56px 16px;
  max-width: 1080px;
  margin: 0 auto;
}
.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section h2 {
  font-size: 1.8rem;
  margin: 0 0 12px;
  border: 0;
  padding: 0;
  letter-spacing: -0.005em;
}
.section-lede {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 0 24px;
}

.feature-grid, .use-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 16px;
}
.feature, .use {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.feature h3, .use h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 1rem;
}
.feature p, .use p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.93rem;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
}
.method-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  margin: 0 1px;
  background: var(--bg-elev-2);
}

.tour { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 16px; }
.tour-step {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.tour-step pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.84rem;
  margin: 12px 0 0;
  overflow-x: auto;
}
.step-num {
  display: inline-block;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.t-mute { color: var(--text-mute); }
.t-method-post { color: var(--accent); }

.cta-card {
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.cta-card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* changelog */

.changelog-entry {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.changelog-entry:last-child { border-bottom: 0; }
.changelog-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}
.changelog-header h2 {
  margin: 0;
  border: 0;
  padding: 0;
  font-size: 1.3rem;
}
.changelog-header time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-mute);
}

/* footer */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  margin-top: 48px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .brand { margin-bottom: 8px; }
.footer-tag { color: var(--text-dim); font-size: 0.92rem; margin: 4px 0; }
.footer-meta { color: var(--text-mute); font-size: 0.85rem; margin: 0; }
.footer-nav h4 {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 8px;
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li { margin: 4px 0; }
.footer-nav a { color: var(--text-dim); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-mute);
}
.footer-bottom a { color: var(--text-dim); }
.dot { color: var(--text-mute); }

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* utilities */
.muted { color: var(--text-mute); }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elev-2);
  font-family: var(--mono);
  font-size: 0.78em;
  line-height: 1.2;
  color: var(--text-dim);
}
