/* ABOUTME: The one stylesheet for fabricatedemail.com — shared by the hand-written pages and by every page scripts/build-site.ts renders. */
/* ABOUTME: No framework and no build step: the site is static files, and this file is small enough to read end to end. */

:root {
  --ink: #16181d;
  --ink-soft: #4b515e;
  --paper: #ffffff;
  --paper-soft: #f6f7f9;
  --line: #dfe2e8;
  --accent: #1f4bd8;
  --accent-soft: #eef2fe;
  --warn-line: #d8a11f;
  --warn-soft: #fdf6e5;
  --measure: 42rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.3em;
}

pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* --- chrome ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.925rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

.site-footer p {
  margin: 0;
}

/* --- documentation layout ----------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 3.6rem;
  max-height: calc(100vh - 3.6rem);
  overflow-y: auto;
  padding: 1.75rem 1rem 2rem 1.5rem;
  border-right: 1px solid var(--line);
  font-size: 0.925rem;
}

.sidebar-heading {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin: 0.15rem 0;
}

.sidebar a {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.sidebar a:hover {
  background: var(--paper-soft);
}

.sidebar a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.docs main {
  max-width: var(--measure);
  padding: 1.75rem 1.5rem 4rem;
}

/* Redoc renders its own menu and sample panes and needs the width. Beside the
   site sidebar that would be three columns, all of them squeezed, so on a wide
   screen the reference page drops the sidebar; the header's Documentation link
   is the way back. On a narrow screen the layout is one column anyway and the
   sidebar stacks above, as it does on every other page. */
.reference .layout {
  grid-template-columns: minmax(0, 1fr);
}

.reference .sidebar {
  display: none;
}

.reference main {
  padding: 0;
}

.reference redoc {
  display: block;
}

/* --- prose --------------------------------------------------------------- */

main h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

main h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

main h3 {
  font-size: 1.075rem;
  margin: 1.75rem 0 0.5rem;
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

main th,
main td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

main th {
  background: var(--paper-soft);
}

/* A markdown table written without column headings still renders a `thead`.
   An empty one is a grey bar with nothing in it, which a reader has to stop
   and explain to themselves. */
main thead:not(:has(th:not(:empty))) {
  display: none;
}

main blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--warn-line);
  background: var(--warn-soft);
}

main blockquote p {
  margin: 0;
}

main hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* --- marketing pages ----------------------------------------------------- */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page.wide {
  max-width: 58rem;
}

.hero {
  max-width: 58rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 1rem;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.button.secondary {
  background: var(--paper);
  color: var(--accent);
}

.notice {
  max-width: 58rem;
  margin: 2rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--warn-line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--warn-soft);
}

.notice h2 {
  margin: 0 0 0.4rem;
  border: 0;
  padding: 0;
  font-size: 1.05rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  max-width: 58rem;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.tier {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
}

.tier.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.tier h2 {
  margin: 0;
  border: 0;
  padding: 0;
  font-size: 1.25rem;
}

.tier .price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0;
}

.tier .price small {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.tier ul {
  margin: 1.25rem 0 0;
  padding-left: 1.1rem;
}

.tier li {
  margin: 0.35rem 0;
}

/* --- legal --------------------------------------------------------------- */

.version {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: -0.5rem;
}

.operator-todo {
  border: 1px dashed var(--warn-line);
  border-radius: 8px;
  background: var(--warn-soft);
  padding: 0.75rem 1rem;
  font-size: 0.925rem;
}

.operator-todo p:last-child {
  margin-bottom: 0;
}

/* --- narrow screens ------------------------------------------------------ */

@media (max-width: 52rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar,
  .reference .sidebar {
    display: block;
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
}
