/* The API documentation chrome (2026-10-03) - api.8merch.com/docs, the hub and
   every API reference page. Served at /docs/assets/api-docs.css.

   THE ENGINES' DESIGN, NOT A LOOKALIKE. The tokens below are copied from
   shared/theme.css (which is itself pressing's), and
   tests/apiDocsChrome.test.ts fails if any of them drifts from that file: the
   same surfaces, text ladder, fonts, 14px base, top bar, theme toggle and
   footer as the four portals. It cannot simply import shared/theme.css - that
   file is bundled into the Vite apps and is not served by the api.

   LIGHT ON :root, DARK UNDER [data-theme="dark"], the same switch and the same
   localStorage key (`8merch-theme`) as the portals - see api-docs.js.

   THE ACCENT IS PER PAGE (html[data-api]): fulfillment purple, ecommerce blue
   - the platforms' own - and pressing amber on the hub, which spans them all. */
@import url("https://embed.8merch.com/fonts/fonts.css?v=5");

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface2: #f1f3f6;
  --card: #ffffff;
  --border: #e2e5ea;
  --border2: rgba(16, 24, 40, 0.14);
  --text: #15181d;
  --text-secondary: #586070;
  --text-muted: #6b7280;
  --danger: #c62828;
  --success: #0f8a5f;
  --warn: #b45309;
  --radius: 10px;
  --wa-03: rgba(16, 24, 40, 0.042);
  --wa-05: rgba(16, 24, 40, 0.07);
  --wa-13: rgba(16, 24, 40, 0.182);
  --app-max: 1440px;
  --app-gutter: 24px;
  --topbar-control-h: 38px;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mono-strong: "JetBrains Mono", "IBM Plex Mono", monospace;

  /* Hub: pressing amber (8merch-pages/account/index.html). */
  --accent: #f4a261;
  --accent-dim: #c98b4a;
  --accent-ink: #9c5416;
  color-scheme: light;
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-api="fulfillment"] { --accent: #b266f4; --accent-dim: #601d9a; --accent-ink: #5b1599; }
:root[data-api="ecommerce"] { --accent: #6ba8f5; --accent-dim: #1f5fa0; --accent-ink: #15559c; }

:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface2: #242424;
  --card: #161616;
  --border: #2e2e2e;
  --border2: rgba(255, 255, 255, 0.13);
  --text: #f0f0f0;
  --text-secondary: #9ca3af;
  --text-muted: #888888;
  --danger: #e05252;
  --success: #22c55e;
  --warn: #f2b84b;
  --wa-03: rgba(255, 255, 255, 0.03);
  --wa-05: rgba(255, 255, 255, 0.05);
  --wa-13: rgba(255, 255, 255, 0.13);
  /* In dark the accent itself is legible as text. */
  --accent-ink: var(--accent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  transition: background 0.15s ease, color 0.15s ease;
}

/* ── The top bar: shared/theme.css's .app-topbar, declaration for declaration ── */
.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.app-topbar-inner {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 0 var(--app-gutter);
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.app-topbar-lead { display: flex; align-items: center; gap: 20px; min-width: 0; }
.app-topbar-brand { text-decoration: none; display: inline-flex; align-items: center; flex-shrink: 0; }
.app-topbar-logo {
  display: block;
  height: var(--topbar-control-h);
  width: auto;
  aspect-ratio: 169.56 / 30.48;
  background-color: var(--accent);
  -webkit-mask-image: url("/docs/assets/8merch-logo.svg");
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: url("/docs/assets/8merch-logo.svg");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}
.app-topbar-title {
  font-family: var(--font-mono-strong);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
  justify-self: center;
  text-decoration: none;
}
.app-topbar-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; justify-self: end; }
/* The other APIs, as quiet tabs - the one you are on is marked. */
.docs-nav { display: flex; gap: 4px; }
.docs-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.docs-nav a:hover { color: var(--text); background: var(--wa-05); }
.docs-nav a[aria-current="page"] { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Pressing's .theme-toggle, exactly as the portals carry it. */
.theme-toggle {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.theme-toggle:hover { color: var(--accent-ink); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 860px) {
  .app-topbar-inner { grid-template-columns: auto 1fr auto; }
  .app-topbar-title { font-size: 14px; justify-self: start; }
  .docs-nav { display: none; }
}
@media (max-width: 520px) {
  .app-topbar-logo { height: 26px; }
  .app-topbar-title { display: none; }
}

/* ── The footer: shared/siteFooter.css ─────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 32px; padding: 18px 0 28px; background: var(--bg); }
.site-footer-inner { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; font-size: 12px; color: var(--text-muted); padding: 0 var(--app-gutter); }
.site-footer-logo { height: 14px; width: auto; opacity: 0.75; }
:root[data-theme="dark"] .site-footer-logo { filter: brightness(0) invert(1); }
.site-footer-regions { display: flex; gap: 10px; letter-spacing: 0.08em; font-weight: 500; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.site-footer-links a, .site-footer-api a { color: var(--text-muted); text-decoration: none; }
.site-footer-links a:hover, .site-footer-api a:hover { color: var(--text); text-decoration: underline; }
.site-footer-api { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.site-footer-api a[aria-current="page"] { color: var(--text); }

/* ── The hub ───────────────────────────────────────────────────────────── */
.docs-hub { max-width: var(--app-max); margin: 0 auto; padding: 40px var(--app-gutter) 24px; }
.docs-hub-intro { max-width: 760px; margin-bottom: 36px; }
.docs-hub-intro h1 { font-size: 28px; font-weight: 700; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
.docs-hub-intro p { color: var(--text-secondary); margin: 0; font-size: 15px; }
.docs-hub a { color: var(--accent-ink); }

/* Pressing's .slabel - the 3px accent bar is what makes the three platforms
   one system in three colours. */
.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.section-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 16px; }
.docs-section { margin-bottom: 36px; }

.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
/* A card wears ITS platform's accent, whatever page it sits on. */
.docs-card {
  --accent: #b266f4; --accent-ink: #5b1599;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border-top: 3px solid var(--accent);
}
.docs-card[data-api="ecommerce"] { --accent: #6ba8f5; --accent-ink: #15559c; }
.docs-card[data-api="pressing"] { --accent: #f4a261; --accent-ink: #9c5416; }
:root[data-theme="dark"] .docs-card { --accent-ink: var(--accent); }
.docs-card a.docs-card-main, .docs-card a.docs-card-sub, .docs-card .docs-card-main { display: block; padding: 20px 22px; color: inherit; text-decoration: none; }
.docs-card a.docs-card-main:hover, .docs-card a.docs-card-sub:hover { background: var(--wa-03); }
.docs-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.docs-card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.docs-card h4 { margin: 0; font-size: 14px; font-weight: 600; }
.docs-card p { color: var(--text-secondary); margin: 8px 0 14px; font-size: 13px; line-height: 1.55; }
.docs-card-go { color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.docs-card-sub { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.docs-card.soon { border-top-color: var(--border); }
.docs-card.soon .docs-card-main { opacity: 0.7; }

/* The status pills' recipe (shared/theme.css .status-pill). */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono-strong);
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: color-mix(in srgb, var(--pill, #6b7280) 14%, #ffffff);
  color: color-mix(in srgb, var(--pill, #6b7280) 45%, #14110c);
  border: 1px solid color-mix(in srgb, var(--pill, #6b7280) 40%, transparent);
}
:root[data-theme="dark"] .status-pill {
  background: var(--wa-05);
  color: var(--pill, var(--text-muted));
  border-color: color-mix(in srgb, currentColor 45%, transparent);
}

/* ── Redoc reference pages ───────────────────────────────────────────────
   Fonts, sizes and the accent come from the build (docs/api/<slug>/
   redocly.yaml). Dark mode is a generated stylesheet the build appends to
   each page (scripts/injectDocsChrome.mjs); these are the few hand rules. */
:root[data-api] #redoc { background: var(--bg); }
:root[data-theme="dark"][data-api] .menu-content { border-right: 1px solid var(--border); }
:root[data-api] .menu-content { border-right: 1px solid var(--border); }
:root[data-theme="dark"][data-api] .redoc-wrap input { color: var(--text); }
/* Code blocks keep their own light-on-black ink in dark mode; the generated
   rule lifts inline-code ink, which would otherwise reach into <pre>. */
:root[data-theme="dark"][data-api] .redoc-wrap pre { color: #f0f0f0 !important; background-color: #0d0d0d !important; border: 1px solid var(--border); }
:root[data-theme="dark"][data-api] .redoc-wrap pre code { color: #f0f0f0 !important; background: transparent !important; border: 0 !important; padding: 0 !important; }
:root[data-theme="dark"][data-api] .redoc-wrap p code,
:root[data-theme="dark"][data-api] .redoc-wrap li code,
:root[data-theme="dark"][data-api] .redoc-wrap td code { background-color: var(--surface2) !important; border-color: var(--border) !important; }
