/* MailingKit site. Warm cream palette, matched to jishanahmed.in. */

:root {
  --bg: #fffaeb;
  --bg-soft: #f5f0e0;
  --surface: #fffdf6;
  --fg: #0a0a0a;
  --fg-2: #2b2a26;
  --muted: #66655f;
  --border: #eae5d7;
  --border-strong: #d9d1bc;
  --accent: #1d3026;
  --accent-fg: #fffaeb;
  --accent-soft: #e7ede3;
  --link: #1d3026;
  --code-bg: #1d3026;
  --code-fg: #f3ecd8;
  --code-border: #1d3026;
  --code-caption: #b7c5ba;
  --tok-c: #8fa496;
  --tok-s: #e9cf8b;
  --tok-k: #f2b47e;
  --tok-n: #f0a9a0;
  --tok-f: #f8e7b7;
  --tok-b: #b8d6c2;
  --shadow: 0 1px 2px rgb(29 48 38 / 0.06), 0 8px 24px rgb(29 48 38 / 0.06);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Courier Prime", "Courier New", monospace;
  --font-code: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 12px;
  --header-height: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101412;
    --bg-soft: #161b18;
    --surface: #151917;
    --fg: #f5f4ef;
    --fg-2: #d9d8d0;
    --muted: #a3a29b;
    --border: #282d2a;
    --border-strong: #3a403c;
    --accent: #f2e8cf;
    --accent-fg: #101412;
    --accent-soft: #1d2722;
    --link: #ecdfbb;
    --code-bg: #0b0f0d;
    --code-border: #262c28;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101412;
  --bg-soft: #161b18;
  --surface: #151917;
  --fg: #f5f4ef;
  --fg-2: #d9d8d0;
  --muted: #a3a29b;
  --border: #282d2a;
  --border-strong: #3a403c;
  --accent: #f2e8cf;
  --accent-fg: #101412;
  --accent-soft: #1d2722;
  --link: #ecdfbb;
  --code-bg: #0b0f0d;
  --code-border: #262c28;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .container {
    padding: 0 28px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 8px 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.brand,
.theme-toggle {
  flex: none;
}

.brand-mark rect {
  fill: var(--accent);
}

.brand-mark path {
  fill: none;
  stroke: var(--accent-fg);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.site-nav a {
  color: var(--fg-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
  background: var(--bg-soft);
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-github svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.icon-moon {
  display: none !important;
}

:root[data-theme="dark"] .icon-sun {
  display: none !important;
}

:root[data-theme="dark"] .icon-moon {
  display: block !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: none !important;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: block !important;
  }
}

@media (max-width: 560px) {
  .nav-github span {
    display: none;
  }

  .site-nav a {
    padding: 6px 8px;
  }

  .brand span {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .nav-api {
    display: none;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    padding: 6px 7px;
  }

  .header-inner {
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .nav-github {
    display: none !important;
  }
}

@media (max-width: 359px) {
  .brand span {
    display: none;
  }
}

/* Shared type */

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-label);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg);
}

code,
kbd {
  font-family: var(--font-code);
  font-size: 0.86em;
}

:not(pre) > code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.38em;
  overflow-wrap: anywhere;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--bg-soft);
}

.install {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-code);
  font-size: 0.9rem;
  cursor: pointer;
}

.install .prompt {
  color: var(--muted);
}

.install-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
}

/* Code blocks */

figure.code {
  margin: 1.4rem 0;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
}

figure.code figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--code-caption);
}

button.copy {
  border: 1px solid rgb(255 255 255 / 0.14);
  background: transparent;
  color: var(--code-caption);
  font: 600 0.74rem var(--font-body);
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
}

button.copy:hover {
  color: var(--code-fg);
  border-color: rgb(255 255 255 / 0.3);
}

figure.code pre,
pre.api-signature {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--code-fg);
  font-family: var(--font-code);
  font-size: 0.86rem;
  line-height: 1.7;
  tab-size: 4;
}

figure.code pre code {
  font-size: inherit;
}

.tok-c {
  color: var(--tok-c);
  font-style: italic;
}

.tok-s {
  color: var(--tok-s);
}

.tok-k,
.tok-d {
  color: var(--tok-k);
}

.tok-n {
  color: var(--tok-n);
}

.tok-f,
.tok-fn {
  color: var(--tok-f);
}

.tok-b {
  color: var(--tok-b);
}

/* Landing */

.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 980px) {
  .hero {
    padding: 96px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1.02fr 1fr;
    gap: 56px;
  }
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 6.2vw, 4.25rem);
  font-weight: 600;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
}

.lead {
  margin: 0 0 28px;
  max-width: 34rem;
  font-size: 1.13rem;
  line-height: 1.7;
  color: var(--fg-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-buttons {
  margin-top: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-label);
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-meta li::before {
  content: "+ ";
  color: var(--fg-2);
}

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

.hero-code figure.code {
  margin: 0;
  box-shadow: var(--shadow);
}

.terminal {
  margin: 14px 0 0 auto;
  width: min(100%, 420px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--font-code);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--fg-2);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-label);
  color: var(--muted);
}

.terminal-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.terminal-bar span {
  margin-left: 6px;
}

.terminal pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font: inherit;
}

.terminal .ok {
  color: var(--muted);
}

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

.section-soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 40px;
}

.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.section-head p {
  margin: 0;
  color: var(--fg-2);
  font-size: 1.05rem;
}

/* Flow diagram */

.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .flow {
    grid-template-columns: 1fr auto 1.25fr auto 1fr auto 0.8fr;
    align-items: center;
  }
}

.flow-node {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 18px 16px;
}

.flow-node h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.flow-node p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.flow-node ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-node li {
  font-family: var(--font-label);
  font-size: 0.8rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-2);
  background: var(--bg);
}

.flow-core {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.flow-core h3,
.flow-core p {
  color: var(--accent-fg);
}

.flow-core p {
  opacity: 0.8;
}

.flow-core li {
  background: transparent;
  border-color: color-mix(in srgb, var(--accent-fg) 30%, transparent);
  color: var(--accent-fg);
}

.flow-arrow {
  justify-self: center;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 1.3rem;
  line-height: 1;
  transform: rotate(90deg);
}

@media (min-width: 900px) {
  .flow-arrow {
    transform: none;
  }
}

/* Features */

.feature-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--bg);
  padding: 26px 24px;
}

.section-soft .feature {
  background: var(--surface);
}

.feature .num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-label);
  font-size: 0.82rem;
  color: var(--muted);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  color: var(--fg-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Use cases */

.usecases {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .usecases {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .usecases {
    grid-template-columns: repeat(4, 1fr);
  }
}

.usecase {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  min-width: 0;
}

.usecase .kind {
  margin: 0 0 12px;
  font-family: var(--font-label);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.usecase .event {
  display: inline-block;
  margin-bottom: 10px;
}

.usecase p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--fg-2);
}

.usecase .arrow {
  display: block;
  margin: 6px 0;
  color: var(--muted);
  font-family: var(--font-label);
}

/* Tabs */

.tabs {
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
}

.tablist {
  display: flex;
  gap: 2px;
  padding: 6px;
  overflow-x: auto;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.tablist button {
  flex: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--code-caption);
  font: 600 0.85rem var(--font-body);
  padding: 7px 14px;
  cursor: pointer;
}

.tablist button[aria-selected="true"] {
  background: rgb(255 255 255 / 0.1);
  color: var(--code-fg);
}

.tabs figure.code {
  margin: 0;
  border: 0;
  border-radius: 0;
}

/* Two columns: in the box / out of the box */

.split {
  display: grid;
  gap: 16px;
}

@media (min-width: 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
}

.panel h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.panel > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.checklist li {
  position: relative;
  padding: 9px 0 9px 28px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--fg-2);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.checklist.out li::before {
  width: 12px;
  height: 0;
  top: 19px;
  border-left: 0;
  transform: none;
  border-color: var(--muted);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

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

th {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--muted);
  background: var(--bg-soft);
}

/* CTA */

.cta {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta h2 {
  margin: 0 auto 16px;
  max-width: 40rem;
  font-size: clamp(2rem, 4.6vw, 3rem);
}

.cta p {
  margin: 0 auto 28px;
  max-width: 34rem;
  color: var(--fg-2);
}

.cta .hero-actions {
  justify-content: center;
}

/* Docs layout */

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

@media (min-width: 900px) {
  .docs-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    padding: 40px 28px 96px;
  }
}

@media (min-width: 1240px) {
  .docs-layout {
    grid-template-columns: 220px minmax(0, 1fr) 210px;
  }
}

.sidebar,
.toc-column {
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .sidebar,
  .toc-column {
    position: sticky;
    top: calc(var(--header-height) + 32px);
    align-self: start;
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
  }
}

.toc-column {
  display: none;
}

@media (min-width: 1240px) {
  .toc-column {
    display: block;
  }
}

.sidebar-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 600;
}

.sidebar-menu summary::-webkit-details-marker {
  display: none;
}

.sidebar-menu summary::after {
  content: "+";
  float: right;
  font-family: var(--font-label);
  color: var(--muted);
}

.sidebar-menu[open] summary::after {
  content: "-";
}

@media (min-width: 900px) {
  .sidebar-menu summary {
    display: none;
  }
}

.nav-group {
  margin: 18px 0 0;
}

@media (min-width: 900px) {
  .nav-group:first-of-type {
    margin-top: 0;
  }
}

.nav-group p,
.toc p {
  margin: 0 0 8px;
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-group p {
  padding-left: 10px;
}

.nav-group ul,
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-group a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--fg-2);
  text-decoration: none;
}

.nav-group a:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

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

.toc li a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
}

.toc li a:hover,
.toc li a.active {
  color: var(--fg);
  border-left-color: var(--accent);
}

.toc-num {
  display: inline-block;
  min-width: 1.9em;
  font-family: var(--font-label);
  font-size: 0.85em;
  color: var(--muted);
}

.toc .toc-3 a {
  padding-left: 24px;
  font-size: 0.85rem;
}

.workshop-layout .sidebar .toc li a {
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Prose */

.prose {
  min-width: 0;
  max-width: 760px;
  overflow-wrap: break-word;
}

.prose h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5vw, 2.9rem);
}

.prose h2 {
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 1.65rem;
}

.prose h3 {
  margin: 2rem 0 0.6rem;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.prose h2,
.prose h3 {
  position: relative;
}

.anchor {
  position: absolute;
  left: -1.1em;
  padding-right: 0.3em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  font-family: var(--font-body);
  font-weight: 400;
}

h2:hover .anchor,
h3:hover .anchor {
  opacity: 1;
}

.prose p,
.prose li {
  color: var(--fg-2);
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose strong {
  color: var(--fg);
}

.prose .lead {
  font-size: 1.12rem;
}

.lead-small {
  color: var(--muted);
  margin-top: -0.4rem;
}

.callout {
  margin: 1.5rem 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.5rem;
}

.callout-title {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted) !important;
  margin-bottom: 4px !important;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4rem;
}

.pager a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}

.pager a:hover {
  border-color: var(--border-strong);
}

.pager span {
  display: block;
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.pager-next {
  text-align: right;
}

.cards {
  display: grid;
  gap: 12px;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card-link {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

.card-link:hover {
  border-color: var(--border-strong);
}

.card-link strong {
  display: block;
  margin-bottom: 2px;
}

.card-link span {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Workshop */

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  margin-right: 0.5em;
  padding: 0 0.4em;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--font-label);
  font-size: 0.8em;
  vertical-align: 0.15em;
}

.step-meta {
  margin: -0.4rem 0 1rem;
  font-family: var(--font-label);
  font-size: 0.86rem;
  color: var(--muted);
}

/* API */

.api-item {
  margin: 1.4rem 0;
  padding: 20px 20px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.api-item h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.api-item h3 code {
  font-size: 1rem;
}

.api-kind {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

pre.api-signature {
  border-radius: 10px;
  background: var(--code-bg);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.api-member {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.api-bases {
  font-size: 0.9rem;
}

.api-fields {
  margin: 0.6rem 0 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.api-item figure.code {
  margin: 0.8rem 0 1rem;
}

/* Footer */

.site-footer {
  background: #1d3026;
  color: #f3ecd8;
  padding: 56px 0 64px;
}

.site-footer a {
  color: #f3ecd8;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-inner {
  display: grid;
  gap: 32px;
}

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

.footer-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.footer-brand p:last-child {
  margin: 0;
  max-width: 22rem;
  color: #c7d1c8;
  font-size: 0.92rem;
}

.footer-heading {
  margin: 0 0 10px;
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9b8ad;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
}

.site-footer li + li {
  margin-top: 6px;
}

/* Back to top */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.15s ease;
}

.to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

main:focus {
  outline: none;
}

.to-top:hover {
  background: var(--bg-soft);
}

.to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
