/* ============================================
   STFM — Design tokens
   ============================================ */
:root {
  /* Revised palette — more vibrant, closer to the weblakes reference blue */
  --primary:      #1A56DB; /* vivid royal/azure blue */
  --secondary:    #4C7EF3; /* lighter blue accent */
  --accent:       #0B3B8C; /* deep saturated blue accent */
  --text:         #1F2937;
  --bg:           #F4F6F8;

  /* Derived tones */
  --primary-dark: #0B1F4D; /* deep indigo-navy for dark sections */
  --primary-tint: #E8EEFC;
  --white:        #FFFFFF;
  --border:       #E1E7EB;
  --muted:        #5B6B76;

  /* Type */
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --sp-1: .5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 7rem;

  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1180px;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--primary-dark);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
.wrap--wide { max-width: 1340px; }

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--white);
  padding: var(--sp-1) var(--sp-2);
  z-index: 100;
}
.skip-link:focus { left: var(--sp-2); top: var(--sp-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Scroll reveal — only active if JS runs;
   without JS, everything stays visible by default
   ============================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.card-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.card-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost { border-color: var(--primary); color: var(--primary); }
.btn-ghost:hover { background: var(--primary-tint); }

.btn-outline-light { border-color: var(--primary); color: var(--primary); background: var(--white); }
.btn-outline-light:hover { background: var(--primary-tint); }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-dark);
}
.brand-mark { display: block; width: auto; height: 24px; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
}
.site-nav a { color: var(--text); opacity: 0.85; transition: opacity 0.15s ease; }
.site-nav a:hover { opacity: 1; }
.site-nav a.is-active { color: var(--primary); opacity: 1; font-weight: 700; }
.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--primary-dark); }

.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--white);
  padding-block: var(--sp-7) var(--sp-6);
  color: var(--text);
}
.hero-caustics {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 480px at 82% 20%, rgba(76,126,243,0.12), transparent 60%),
    radial-gradient(ellipse 600px 420px at 8% 90%, rgba(26,86,219,0.08), transparent 60%);
  background-repeat: no-repeat;
  animation: causticsDrift 26s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes causticsDrift {
  0%   { background-position: 0% 0%,   100% 100%; }
  100% { background-position: 8% 6%,   92% 94%; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--sp-5);
  align-items: center;
}
.hero-copy { max-width: 560px; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-2);
}
.eyebrow--on-dark { color: var(--secondary); }

.hero h1 {
  color: var(--primary-dark);
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-3);
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: var(--sp-4);
}
.hero-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.hero-credit {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ============================================
   Laptop mockup
   ============================================ */
.laptop-wrap {
  perspective: 1600px;
  display: flex;
  justify-content: center;
}
.device-group {
  position: relative;
  width: 100%;
  max-width: 660px;
}
.laptop {
  width: 100%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 35px 45px rgba(3, 12, 34, 0.45));
  animation: floatSwayLaptop 9s ease-in-out infinite;
}
@keyframes floatSwayLaptop {
  0%, 100% { transform: rotateY(-10deg) rotateX(3deg) rotateZ(0.5deg) translateY(0); }
  50%      { transform: rotateY(-6deg)  rotateX(1.5deg) rotateZ(-0.5deg) translateY(-8px); }
}
.laptop-screen {
  position: relative;
  background: #0b0f14;
  border-radius: 10px 10px 3px 3px;
  padding: 9px 9px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.laptop-screen::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a3340;
}
.laptop-screen img {
  display: block;
  width: 100%;
  border-radius: 3px;
}
.laptop-base {
  height: 14px;
  margin: 0 -14px;
  background: linear-gradient(180deg, #d7dbe0 0%, #aeb4bd 100%);
  border-radius: 0 0 8px 8px;
  position: relative;
}
.laptop-base::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 5px;
  background: #9aa1ab;
  border-radius: 0 0 6px 6px;
}

/* ============================================
   Sections
   ============================================ */
.section { padding-block: var(--sp-7); }
.section--tint { background: var(--bg); }

.section h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  margin-bottom: var(--sp-2);
  max-width: 40ch;
}
.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: var(--sp-5);
}

.diagram { margin-bottom: var(--sp-2); border-radius: var(--radius); overflow: hidden; }
.diagram svg { width: 100%; height: auto; display: block; }

.card-grid {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.card:hover {
  background: #EDF2F7;
  border-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -12px rgba(3, 12, 34, 0.18);
}

.card-index {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-tint);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: var(--sp-2);
  transition: background 0.2s ease;
}
.card:hover .card-index { background: var(--white); }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

.card--compact { padding: var(--sp-3); }
.card--compact h3 { font-size: 1.02rem; }
.card--compact p { font-size: 0.92rem; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
}
.card-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s ease;
}
.card:hover .card-link svg { transform: translateX(5px); }
.card--compact .card-link { padding-top: var(--sp-2); font-size: 0.84rem; }

.viewer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.viewer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -12px rgba(3, 12, 34, 0.18);
}
.viewer-card img {
  width: 100%;
  display: block;
  aspect-ratio: 1000 / 544;
  object-fit: cover;
  background: #0b0f14;
}
.viewer-card-body { padding: var(--sp-3); }
.viewer-card-body h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.viewer-card-body p { font-size: 0.9rem; color: var(--muted); }

/* ============================================
   CTA section
   ============================================ */
.cta-section {
  background: var(--primary-tint);
  color: var(--text);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.cta-copy h2 { color: var(--primary-dark); margin-bottom: var(--sp-1); }
.cta-copy p { color: var(--muted); max-width: 42ch; }
.cta-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding-block: var(--sp-5) var(--sp-4);
}
.footer-brand .brand-word { color: var(--white); }
.footer-brand p { font-size: 0.88rem; margin-top: var(--sp-1); line-height: 1.5; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); }
.footer-legal {
  width: 100%;
  font-size: 0.8rem;
  opacity: 0.55;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: 100%; }
  .laptop-wrap { margin-top: var(--sp-4); }
  .device-group { max-width: 380px; }
  .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav a { padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: var(--sp-2); text-align: center; }
  .nav-toggle-input:checked ~ .site-nav { display: flex; }

  .hero { padding-block: var(--sp-6) var(--sp-5); }
  .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

/* ============================================
   Documentation / Tutorial page
   ============================================ */
/* ============================================
   Downloads page
   ============================================ */
.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: 0 20px 40px -24px rgba(3, 12, 34, 0.18);
}
.download-card h2 { margin-bottom: var(--sp-2); }
.download-meta { list-style: none; margin: 0; }
.download-meta li { color: var(--muted); margin-bottom: 0.35rem; }
.download-meta strong { color: var(--primary-dark); }
.download-card-action { text-align: center; }
.btn-large { padding: 1rem 2rem; font-size: 1.02rem; }
.download-note { font-size: 0.8rem; color: var(--muted); margin-top: var(--sp-2); max-width: 22ch; }
.download-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: var(--sp-2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.status-dot--pending { background: var(--muted); box-shadow: 0 0 0 3px var(--bg); }
.download-status--pending { color: var(--muted); }

.placeholder-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.placeholder-block .doc-p { color: var(--muted); }

.app-block {
  max-width: 720px;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--border);
}
.app-block:first-child { border-top: none; padding-top: 0; }
.app-block h2 {
  font-size: 1.5rem;
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.app-block .doc-p { font-size: 1.02rem; }

/* ============================================
   Forms
   ============================================ */
.register-form { background: var(--white); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form-group { margin-bottom: var(--sp-3); }
.form-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.form-input--error { border-color: #C0392B; }
.form-error { color: #C0392B; font-size: 0.8rem; margin-top: 0.35rem; }

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%235B6B76' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.form-phone-row { display: grid; grid-template-columns: 130px 1fr; gap: 0.6rem; }
.form-phone-ddi { padding-right: 1.8rem; font-size: 0.88rem; }
@media (max-width: 480px) {
  .form-phone-row { grid-template-columns: 1fr; }
}

.form-group--checkbox { margin-bottom: var(--sp-4); }
.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}
.form-checkbox-label input { margin-top: 0.2rem; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}
.download-placeholder {
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.doc-hero {
  background: var(--primary-tint);
  padding-block: var(--sp-6) var(--sp-5);
}
.doc-hero h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-2);
}
.doc-hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 60ch;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
  padding-block: var(--sp-6);
}
.doc-toc {
  position: sticky;
  top: 90px;
  font-size: 0.88rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.doc-toc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.doc-toc ol { list-style: none; counter-reset: toc; }
.doc-toc li { margin-bottom: 0.55rem; line-height: 1.35; }
.doc-toc a { color: var(--muted); }
.doc-toc a:hover { color: var(--primary); }

.toc-details summary {
  cursor: pointer;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.toc-details summary:hover { color: var(--primary); }
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.toc-details[open] summary::after { transform: rotate(45deg); }
.toc-sublist {
  list-style: none;
  margin: 0.5rem 0 0 0.7rem;
  padding-left: 0.7rem;
  border-left: 1.5px solid var(--border);
}
.toc-sublist li { margin-bottom: 0.5rem; }
.toc-sublist a { color: var(--muted); font-size: 0.85rem; }
.toc-sublist a:hover { color: var(--primary); }

.doc-content { max-width: 780px; }
.doc-h2 {
  font-size: 1.5rem;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.doc-content > .doc-h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.doc-h3 { font-size: 1.15rem; margin-top: var(--sp-4); margin-bottom: var(--sp-2); }
.doc-p { color: var(--text); margin-bottom: var(--sp-2); line-height: 1.65; }
.doc-content ol, .doc-content ul { margin: 0 0 var(--sp-3) var(--sp-3); line-height: 1.65; }
.doc-content ul { list-style: disc; }
.doc-content ol { list-style: decimal; }
.doc-content li { margin-bottom: 0.4rem; }
.doc-content strong { color: var(--primary-dark); }

.doc-code {
  background: var(--primary-dark);
  color: #E8EEFC;
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  font-family: "Source Code Pro", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin-bottom: var(--sp-3);
}

.doc-callout {
  border-left: 3px solid var(--secondary);
  background: var(--primary-tint);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--sp-3);
  color: var(--primary-dark);
}
.doc-callout p { margin-bottom: 0; }
.doc-callout--pending {
  border-left-color: var(--muted);
  background: var(--bg);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-3);
  font-size: 0.92rem;
}
.doc-table th, .doc-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.doc-table th {
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-figure {
  margin-bottom: var(--sp-3);
}
.doc-figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px -14px rgba(3, 12, 34, 0.25);
  display: block;
  margin-inline: auto;
}
.doc-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.doc-figure-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-3);
  margin-bottom: var(--sp-3);
  color: var(--muted);
  text-align: center;
}
.doc-figure-placeholder svg { width: 32px; height: 32px; opacity: 0.5; }
.doc-figure-caption { font-size: 0.88rem; max-width: 42ch; }
.doc-figure-pending {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; max-height: none; margin-bottom: var(--sp-4); }
}
