/* Shared stylesheet for the documentation section pages
   (/le/, /lem/, /luns/, /workflows/, /changelog/).
   Mirrors the homepage (public/index.html) design language:
   sticky translucent top bar, centered hero, full-bleed alternating
   bands with centered headings, and rounded card grids. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/spacegrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --litmus-mountain: #002F2B;
  --litmus-cool-black: #032125;
  --litmus-viridian: #278A6B;
  --litmus-white: #F2F8F6;
  --litmus-border: rgba(39,138,107,0.18);
  --litmus-card-border: rgba(39,138,107,0.16);
  --litmus-text-muted: #5a7b73;
  --litmus-text-faint: #8c9d97;
  --display: 'Space Grotesk', sans-serif;
  --sans: 'Inter', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --maxw: 980px;
  --prose: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--litmus-white);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--litmus-mountain);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- breadcrumb top bar ---------- */
nav[aria-label="Breadcrumb"] {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242,248,246,0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 0.5px solid var(--litmus-border);
  padding: 14px 24px;
}

.crumb-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.crumb-logo {
  display: flex;
  align-items: center;
  padding-right: 16px;
  border-right: 1px solid var(--litmus-border);
}

.crumb-logo img { display: block; }

nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--litmus-mountain);
}

nav[aria-label="Breadcrumb"] li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--litmus-text-faint);
  font-weight: 400;
}

nav[aria-label="Breadcrumb"] a {
  color: var(--litmus-viridian);
  text-decoration: none;
}

nav[aria-label="Breadcrumb"] a:hover,
nav[aria-label="Breadcrumb"] a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ---------- hero header ---------- */
body > header {
  text-align: center;
  padding: 80px 24px 72px;
}

h1 {
  font-family: var(--display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--litmus-mountain);
  max-width: 820px;
  margin: 0 auto;
}

body > header p {
  max-width: 680px;
  margin: 20px auto 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--litmus-text-muted);
}

/* ---------- main: full-bleed alternating bands ---------- */
main { padding: 0; }

main section {
  padding: 64px 24px 72px;
  scroll-margin-top: 56px;
}

main section:nth-of-type(odd) { background: #ffffff; }

main section > * {
  max-width: var(--prose);
  margin-left: auto;
  margin-right: auto;
}

h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--litmus-mountain);
  text-align: center;
}

/* the paragraph straight after a band heading reads as its subtitle */
main section > h2 + p {
  text-align: center;
  font-size: 17px;
  color: var(--litmus-text-muted);
  max-width: 640px;
}

h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--litmus-mountain);
  margin-top: 26px;
}

main p {
  margin-top: 14px;
  color: var(--litmus-mountain);
}

main ul,
main ol {
  margin-top: 14px;
  padding-left: 22px;
}

main li {
  margin-top: 8px;
}

.doc-note {
  text-align: center;
  font-size: 14px;
  color: var(--litmus-text-muted);
  margin-top: 32px;
}

/* inline emphasis note, e.g. a "use this path, not that one" warning */
.doc-callout {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(58,219,144,0.08);
  border-left: 3px solid var(--litmus-viridian);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--litmus-viridian);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  outline: none;
}

strong { font-weight: 600; }

/* ---------- card grids ---------- */
.doc-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin-top: 40px;
  max-width: var(--maxw);
}

.doc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 280px;
  max-width: 312px;
  background: #ffffff;
  border: 1px solid var(--litmus-card-border);
  border-radius: 16px;
  padding: 22px 22px 24px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

main section:nth-of-type(odd) .doc-card { background: var(--litmus-white); }

.doc-card--wide {
  flex: 1 1 380px;
  max-width: 472px;
}

.doc-card:hover,
a.doc-card:focus-visible {
  border-color: rgba(58,219,144,0.55);
  box-shadow: 0 6px 22px rgba(0,47,43,0.08);
  transform: translateY(-2px);
}

a.doc-card:hover,
a.doc-card:focus-visible {
  text-decoration: none;
  outline: none;
}

.doc-card-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--litmus-mountain);
  margin: 0;
}

.doc-card-title a {
  color: inherit;
  transition: color 0.12s;
}

.doc-card-title a:hover,
.doc-card-title a:focus-visible {
  color: var(--litmus-viridian);
  text-decoration: none;
  outline: none;
}

.doc-card-code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--litmus-mountain);
  background: none;
  border-radius: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.doc-card-desc {
  margin-top: 8px;
  margin-bottom: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--litmus-text-muted);
}

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

.doc-card-pill {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
  color: var(--litmus-viridian);
  background: rgba(58,219,144,0.12);
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}

/* pill variants from the Litmus extended palette */
.doc-card-pill--rest {
  color: #0077A5;                      /* Information Blue */
  background: rgba(36,181,229,0.14);
}

.doc-card-pill--graphql {
  color: #514E79;                      /* Lavender Blue */
  background: rgba(157,153,243,0.18);
}

.doc-card-pill--warn {
  color: #76492E;                      /* Warning Orange */
  background: rgba(238,142,85,0.16);
}

.doc-card-pill--error {
  color: #C0043B;                      /* Error Red */
  background: rgba(255,72,118,0.12);
}

/* card footer row: bleeds to the card edges, highlights on hover
   like the homepage "View in API collection" rows */
.doc-card-collection {
  margin: auto -22px -24px;
  align-self: stretch;
  border-top: 1px solid rgba(39,138,107,0.28);
  padding: 12px 22px 16px;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--litmus-viridian);
  border-radius: 0 0 15px 15px;
  transition: background 0.12s;
}

.doc-card-collection:hover,
.doc-card-collection:focus-visible {
  background: rgba(58,219,144,0.1);
  text-decoration: none;
  outline: none;
}

/* when a pill is present it takes the auto margin, so only pad the link */
.doc-card-pill + .doc-card-collection { margin-top: 14px; }

.doc-card ul {
  margin-top: 10px;
  padding-left: 18px;
}

.doc-card ul:not(:last-child) { margin-bottom: 14px; }

.doc-card li {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------- tables (md-derived content): thin row separators ---------- */
table {
  display: block;
  overflow-x: auto;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 1px solid rgba(39,138,107,0.12);
}

th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }

thead th {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--litmus-text-muted);
  white-space: nowrap;
}

tbody td:first-child { white-space: nowrap; font-weight: 500; }

tbody tr:last-child td { border-bottom: none; }

tbody tr { transition: background 0.12s; }
tbody tr:hover { background: rgba(39,138,107,0.04); }

/* ---------- code ---------- */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(39,138,107,0.08);
  border-radius: 5px;
  padding: 2px 6px;
}

pre {
  margin-top: 18px;
  background: var(--litmus-cool-black);
  color: var(--litmus-white);
  border-radius: 14px;
  padding: 18px 22px;
  overflow-x: auto;
  line-height: 1.55;
}

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

/* ---------- footer ---------- */
body > footer {
  border-top: 0.5px solid var(--litmus-border);
  padding: 28px 24px 48px;
  text-align: center;
}

body > footer p {
  max-width: var(--maxw);
  margin: 0 auto;
  font-family: var(--display);
  font-size: 13px;
  color: var(--litmus-text-muted);
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  body > header { padding: 56px 20px 48px; }
  h1 { font-size: 34px; }
  body > header p { font-size: 17px; }
  main section { padding: 48px 20px 56px; }
  h2 { font-size: 26px; }
  .doc-card,
  .doc-card--wide { max-width: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  .doc-card { border-radius: 14px; }
  .doc-card-collection { border-radius: 0 0 13px 13px; }
}
