/* Shared stylesheet for the static /learn/ documentation section.
   Brand: deep red #500000, Soft Black #202124, white, cool grey ramp.
   Sharp corners everywhere, radius 0. */

@font-face {
  font-family: "ABC Marist";
  src: url("/fonts/ABCMarist-Book.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --red: #500000;
  --ink: #202124;
  --grey-100: #f0f0f0;
  --grey-200: #dadada;
  --grey-400: #a7a8a8;
  --grey-600: #787878;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Inter Tight", Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

img {
  max-width: 100%;
  height: auto;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- site chrome (mirrors SiteNav.tsx / Footer.tsx) ---------- */

.site-nav {
  width: 100%;
  padding: 24px;
  color: #000;
  border-bottom: 1px solid var(--grey-200);
}

.site-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 24px;
  width: auto;
  display: block;
}

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

.site-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.site-links li {
  margin: 0;
}

.site-links a {
  color: #000;
  text-decoration: none;
}

.site-links a:hover {
  opacity: 0.7;
}

.site-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #000;
  border-radius: 0;
  font-size: 14px;
  color: #000;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-cta:hover {
  background: #000;
  color: #fff;
}

.site-foot {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  padding: 40px 16px 0;
  font-family: "Inter Tight", Inter, system-ui, sans-serif;
}

.site-foot-pattern {
  position: absolute;
  inset: 0;
  background-image: url("/footer-pattern.svg");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.site-foot-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 64px;
}

.site-foot a,
.site-foot p {
  color: #fff;
}

.site-foot-col a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 4px;
}

.site-foot-social {
  text-align: center;
}

.site-foot-social p {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
}

.site-foot-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.site-foot-icons a {
  display: flex;
  color: #fff;
}

.site-foot-copy {
  font-size: 14px;
  margin: 0;
}

.site-foot-mark {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
}

.site-foot-mark img {
  width: 100%;
  display: block;
  margin-bottom: -4px;
}

@media (min-width: 768px) {
  .site-nav {
    padding: 32px 48px;
  }
  .site-foot {
    padding: 40px 48px 0;
  }
  .site-foot-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
  }
}

@media (max-width: 767px) {
  .site-links {
    display: none;
  }
}

/* ---------- shared shell ---------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

nav.crumb {
  font-size: 13px;
  color: var(--grey-400);
  margin-bottom: 32px;
}

nav.crumb a {
  color: var(--grey-600);
  text-decoration: none;
}

nav.crumb a:hover {
  color: var(--ink);
}

nav.crumb .sep {
  color: var(--grey-400);
  padding: 0 6px;
}

nav.crumb .here {
  color: var(--grey-400);
}

/* ---------- article ---------- */

.article-head {
  max-width: 720px;
  margin-bottom: 40px;
}

h1 {
  font-family: "ABC Marist", Georgia, serif;
  font-weight: 400;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.subtitle {
  font-size: 20px;
  line-height: 1.55;
  color: var(--grey-600);
  margin: 0 0 14px;
}

.cols {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.body {
  flex: 1 1 auto;
  max-width: 720px;
  min-width: 0;
}

h2 {
  font-family: "ABC Marist", Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin: 56px 0 16px;
  scroll-margin-top: 32px;
}

h3 {
  font-family: "ABC Marist", Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  margin: 36px 0 12px;
  scroll-margin-top: 32px;
}

p {
  margin: 0 0 24px;
}

ul,
ol {
  margin: 0 0 24px;
  padding-left: 22px;
}

li {
  margin: 0 0 10px;
}

blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--red);
  color: var(--grey-600);
}

.callout {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--grey-100);
  border-left: 3px solid var(--red);
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--grey-100);
  padding: 1px 5px;
}

pre {
  background: var(--grey-100);
  padding: 16px;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--grey-200);
  margin: 48px 0;
}

.tw {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

th {
  background: var(--red);
  color: #fff;
  text-align: left;
  padding: 12px;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: top;
}

.disclaimer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--grey-200);
  font-size: 13px;
  line-height: 1.6;
  color: var(--grey-600);
}

/* ---------- table of contents ---------- */

.toc {
  flex: 0 0 240px;
  width: 240px;
  position: sticky;
  top: 32px;
  font-size: 14px;
}

.toc-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: var(--grey-600);
  margin-bottom: 12px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--grey-200);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--grey-600);
  text-decoration: none;
  line-height: 1.4;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.is-active {
  color: var(--red);
  border-left-color: var(--red);
}

@media (max-width: 999px) {
  .cols {
    display: block;
  }
  .toc {
    position: static;
    width: auto;
    margin: 0 0 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--grey-200);
  }
}

/* ---------- hub ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("/learn/hero-pattern.svg");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

/* Fade the pattern out from left to right so the headline sits on flat grey
   and the modules read as texture at the trailing edge. */
.hero-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    var(--grey-100) 0%,
    rgba(240, 240, 240, 0.92) 38%,
    rgba(240, 240, 240, 0.35) 68%,
    rgba(240, 240, 240, 0) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 72px;
}

.hero h1 {
  max-width: 720px;
}

.hero .subtitle {
  max-width: 640px;
  margin-bottom: 14px;
}

.hero .lead {
  max-width: 640px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-600);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0 56px;
}


.card {
  display: block;
  border: 1px solid var(--grey-200);
  border-radius: 0;
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}

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

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--grey-100);
  border-radius: 0;
  margin-bottom: 18px;
}

.card-title {
  display: block;
  font-family: "ABC Marist", Georgia, serif;
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.card-meta {
  display: block;
  font-size: 14px;
  color: var(--grey-600);
}

.hub-body {
  max-width: 720px;
}

.hub-body h2 {
  margin-top: 40px;
}

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

@media (max-width: 640px) {
  .wrap {
    padding: 48px 18px 72px;
  }
  .hero-inner {
    padding: 56px 18px 48px;
  }
  h1 {
    font-size: 34px;
  }
  h2 {
    font-size: 25px;
  }
  .subtitle {
    font-size: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
