/* "Studio Manual" styling for the file-based content pages (docs, learn, legal),
     pushed into <head> by layouts/article. These are the only light pages on the public
     site: the dark --st-* tokens from layouts/public are remapped here, which flips the
     shared header, Browse flyout, footer and search dialog without touching their CSS.
     Palette tokens are --doc-* because "studio" already names the dark tokens.
   (content/partials/styles.blade.php links this file.) */
:root {
    color-scheme: light;
    --doc-ink: #212124; --doc-muted: #6b6b72; --doc-line: #e9e9eb;
    --doc-accent: #e96349; --doc-accent-ink: #b93e29; --doc-accent-pale: #fff1eb;
    --doc-secondary: #f7f7f8; --doc-tag: #f1f1f2;
    --doc-radius: 12px; --doc-radius-lg: 18px;

    --st-bg: #fff; --st-surface: #fff; --st-surface-2: var(--doc-secondary);
    --st-border: var(--doc-line); --st-muted: var(--doc-muted); --st-fg: var(--doc-ink);
    --st-brand: var(--doc-accent-ink);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--doc-accent-ink); outline-offset: 2px; }

/* ============ Shared chrome: the values layouts/public hard-codes for dark ============ */
.site-header { background: rgba(255, 255, 255, .88); border-bottom-color: var(--doc-line); }
.browse-flyout-panel { box-shadow: 0 24px 64px -24px rgba(20, 20, 24, .22); }
.site-backdrop { background: rgba(20, 20, 24, .18); }
.site-footer { margin-top: 0; }
.nav-links a.nav-cta { color: #fff; background: var(--doc-ink); border-color: var(--doc-ink); font-weight: 600; }
.nav-links a.nav-cta:hover { color: #fff; background: #000; }
.nav-primary .nav-link--secondary[aria-current] { color: var(--doc-ink); font-weight: 600; position: relative; }
.nav-primary .nav-link--secondary[aria-current]::after { content: ""; position: absolute; left: 12px; right: 12px;
    bottom: -13px; height: 2px; background: var(--doc-accent); }
.brand-section { padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--doc-line); color: var(--doc-muted);
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 767px) { .brand-section { display: none; } }
/* The search dialog's <style> sits later in the page, hence `html` for specificity. */
html .ss::backdrop { background: rgba(20, 20, 24, .36); }
html .ss-panel { box-shadow: 0 32px 80px -24px rgba(20, 20, 24, .3); }
html .ss-tpl mark, html .ss-opt mark { background: var(--doc-accent-pale); }

/* ============ Shell: nav / content / rail, with full-height column rules ============ */
.docs-shell { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1510px; margin-inline: auto; }
.docs-main { min-width: 0; }
.docs-sidebar { display: none; min-width: 0; }
.article-shell { max-width: 1040px; margin-inline: auto; }
.doc-article { display: grid; grid-template-columns: minmax(0, 1fr); }
.doc-body { min-width: 0; padding: 24px 0 56px; }
.doc-aside { display: none; min-width: 0; }

@media (min-width: 1024px) {
    .docs-shell { grid-template-columns: 259px minmax(0, 1fr); min-height: calc(100vh - 56px); }
    .docs-sidebar { display: block; padding: 28px 16px 40px 0; border-right: 1px solid var(--doc-line); }
    /* top offset clears the 56px sticky header (+ breathing room). */
    .docs-sidebar-inner { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto;
        scrollbar-width: thin; scrollbar-color: var(--doc-line) transparent; }
    .docs-main, .doc-article { min-height: 100%; }
    .doc-body { padding: 32px clamp(28px, 4vw, 64px) 88px; }
}
@media (min-width: 1200px) {
    .doc-article { grid-template-columns: minmax(0, 1fr) 225px; }
    .doc-aside { display: block; padding: 40px 0 40px 18px; border-left: 1px solid var(--doc-line); }
    .doc-aside-inner { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto;
        scrollbar-width: thin; scrollbar-color: var(--doc-line) transparent; }
}

/* Phones/tablets: the sidebar is replaced by a collapsed section switcher at the top
   of the page (shows the current section; expands to the full tree). */
.doc-nav-mobile { display: block; margin: 16px 0 0; border: 1px solid var(--doc-line);
    border-radius: var(--doc-radius); background: var(--doc-secondary); }
@media (min-width: 1024px) { .doc-nav-mobile { display: none; } }
.doc-nav-mobile-summary { display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.doc-nav-mobile-summary::-webkit-details-marker { display: none; }
.doc-nav-mobile[open] .cat-tree-chevron { transform: rotate(180deg); }
.doc-nav-mobile-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-nav-mobile-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
    color: var(--doc-muted); font-weight: 600; }
.doc-nav-mobile-current { font-size: 14px; font-weight: 600; color: var(--doc-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-nav-mobile-panel { overflow: hidden; min-height: 0; padding: 4px 8px 14px; }

.doc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ============ Left nav ============ */
.doc-nav-caption { margin: 3px 12px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .13em; color: var(--doc-muted); }
.doc-nav-heading { margin: 22px 12px 6px; font-size: 12px; font-weight: 700; color: var(--doc-muted); }
.doc-nav a { display: block; font-size: 13px; line-height: 1.35; color: var(--doc-muted); padding: 8px 12px;
    border-left: 2px solid transparent; border-radius: 0 6px 6px 0; transition: color .15s, background .15s; }
.doc-nav a:hover { color: var(--doc-ink); background: var(--doc-secondary); }
.doc-nav a.is-active { color: var(--doc-accent-ink); background: var(--doc-accent-pale);
    border-left-color: var(--doc-accent); font-weight: 600; }
.doc-nav-rule { height: 1px; margin: 14px 12px; background: var(--doc-line); }

/* A section is a link plus a separate expand toggle, so the two never nest: the
   <summary> floats over the end of the link's row and the list flows below it. */
.doc-nav-row { position: relative; }
.doc-nav-row > a { padding-right: 36px; color: var(--doc-ink); }
.doc-nav-row > a.is-current { font-weight: 600; }
.doc-nav-toggle { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; display: grid;
    place-items: center; color: var(--doc-muted); border-radius: 6px; cursor: pointer; list-style: none; }
.doc-nav-toggle::-webkit-details-marker { display: none; }
.doc-nav-toggle:hover { color: var(--doc-ink); background: var(--doc-secondary); }
.doc-nav-toggle svg { transition: transform .2s; }
details[open] > .doc-nav-toggle svg { transform: rotate(180deg); }
.doc-nav-list { list-style: none; margin: 2px 0 8px 12px; padding: 0; border-left: 1px solid var(--doc-line); }
.doc-nav-list a { font-size: 12.5px; padding: 6px 10px 6px 12px; margin-left: -1px; }

.doc-nav-foot { margin: 22px 2px 4px; padding: 16px 12px; border-radius: var(--doc-radius); background: var(--doc-secondary); }
.doc-nav-foot b { display: block; font-size: 13px; margin-bottom: 6px; color: var(--doc-ink); }
.doc-nav-foot p { margin: 0 0 10px; font-size: 12px; line-height: 1.55; color: var(--doc-muted); }
.doc-nav .doc-nav-foot a { display: inline; padding: 0; border: 0; background: none; font-size: 12px;
    font-weight: 700; color: var(--doc-accent-ink); }
.doc-nav .doc-nav-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ Page type ============ */
.crumbs { margin: 0 0 28px; }
.crumbs a:hover { color: var(--doc-accent-ink); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--doc-accent-ink);
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; }
.eyebrow::before { content: ""; width: 17px; height: 2px; flex-shrink: 0; background: var(--doc-accent); }
.doc-title { max-width: 800px; margin: 0 0 18px; color: var(--doc-ink); font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 700; line-height: 1.09; letter-spacing: -.045em; text-wrap: balance; }
.lead { max-width: 680px; margin: 0 0 22px; color: var(--doc-muted); font-size: 16px; line-height: 1.65; }
.doc-header { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--doc-line); }
.doc-header .lead { margin-bottom: 0; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px;
    font-size: 12px; color: var(--doc-muted); }
.doc-badge { padding: 4px 9px; border-radius: 999px; background: var(--doc-tag); color: var(--doc-muted); font-size: 12px; }

.doc-search { display: flex; align-items: center; gap: 10px; width: min(100%, 510px); padding: 14px 16px;
    border: 1px solid var(--doc-line); border-radius: var(--doc-radius); background: var(--doc-secondary);
    color: var(--doc-muted); font-size: 14px; transition: border-color .15s, color .15s; }
.doc-search:hover { border-color: var(--doc-muted); color: var(--doc-ink); }
.doc-search kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--doc-line); border-radius: 5px;
    background: #fff; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; }
@media (hover: none) { .doc-search kbd { display: none; } }

.doc-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 52px 0 18px; }
.doc-section-head h2 { color: var(--doc-ink); font-size: 19px; font-weight: 700; letter-spacing: -.028em; }
.doc-section-head span { color: var(--doc-muted); font-size: 12px; }
.doc-group-title { margin: 28px 0 12px; color: var(--doc-muted); font-size: 12px; font-weight: 700; }

.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--doc-accent-ink); font-size: 13px; font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.mini-label { margin: 0 0 16px; color: var(--doc-accent-ink); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .13em; }

/* ============ Overview pages ============ */
.featured-doc { display: grid; grid-template-columns: 1.06fr .94fr; margin-top: 36px; overflow: hidden;
    border: 1px solid var(--doc-line); border-radius: var(--doc-radius-lg); background: var(--doc-secondary); }
.featured-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 34px; }
.featured-copy h2 { margin: 0 0 12px; color: var(--doc-ink); font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
.featured-copy p:not(.mini-label) { margin: 0 0 20px; color: var(--doc-muted); font-size: 13.5px; line-height: 1.65; }
.featured-shot { position: relative; min-height: 278px; overflow: hidden; background: #09090b; }
.featured-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }

.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 13px; }
.collection-card { display: flex; flex-direction: column; min-width: 0; min-height: 164px; padding: 20px;
    border: 1px solid var(--doc-line); border-radius: var(--doc-radius);
    transition: border-color .15s, transform .15s, background .15s; }
.collection-card:hover { border-color: var(--doc-accent); background: var(--doc-secondary); transform: translateY(-2px); }
.collection-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 9px;
    color: var(--doc-accent-ink); background: var(--doc-accent-pale); }
.collection-card strong { margin-bottom: 6px; color: var(--doc-ink); font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.collection-card p { margin: 0 0 12px; color: var(--doc-muted); font-size: 12.5px; line-height: 1.5; }
.collection-card small { margin-top: auto; color: var(--doc-muted); font-size: 12px; }

.doc-note { position: relative; margin: 26px 0; padding: 18px 20px 18px 46px; border-left: 3px solid var(--doc-accent);
    border-radius: 0 var(--doc-radius) var(--doc-radius) 0; background: var(--doc-accent-pale);
    color: var(--doc-ink); font-size: 14px; line-height: 1.7; }
.doc-note a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Section page: a compact, scannable list of its articles. */
.topic-list { margin-top: 28px; border-top: 1px solid var(--doc-line); }
.topic-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 15px 3px;
    border-bottom: 1px solid var(--doc-line); transition: background .15s; }
.topic-list a:hover strong { color: var(--doc-accent-ink); }
.topic-list strong { display: block; color: var(--doc-ink); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.topic-list span { display: block; margin-top: 3px; color: var(--doc-muted); font-size: 13px; line-height: 1.5; }
.topic-list small { flex-shrink: 0; color: var(--doc-muted); font-size: 12px; }
@media (max-width: 559px) { .topic-list small { display: none; } }

/* Learn */
.learn-feature { display: grid; grid-template-columns: 1fr 1fr; margin-top: 34px; overflow: hidden;
    border-top: 1px solid var(--doc-line); border-bottom: 1px solid var(--doc-line); }
.feature-copy { display: flex; flex-direction: column; align-items: flex-start; padding: 32px 30px 32px 0; }
.feature-title { margin: 0 0 16px; color: var(--doc-ink); font-size: clamp(27px, 2.5vw, 38px); font-weight: 700;
    line-height: 1.12; letter-spacing: -.045em; }
.feature-desc { margin: 0 0 20px; color: var(--doc-muted); font-size: 13.5px; line-height: 1.65; }
.feature-meta { margin-top: auto; padding-top: 20px; color: var(--doc-muted); font-size: 12px; }
.feature-art { display: grid; place-items: center; min-width: 0; padding: 12px; background: #f0ede7; }
.feature-art img { width: 100%; height: auto; }

/* Hidden without JS: every guide is simply visible, so the filters would do nothing. */
.topic-filters { display: none; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.js .topic-filters { display: flex; }
.topic-filters button { padding: 8px 14px; border: 1px solid var(--doc-line); border-radius: 999px; background: transparent;
    color: var(--doc-muted); font: inherit; font-size: 12px; cursor: pointer; transition: color .15s, border-color .15s; }
.topic-filters button:hover { color: var(--doc-ink); border-color: var(--doc-muted); }
.topic-filters button[aria-pressed="true"] { color: #fff; background: var(--doc-ink); border-color: var(--doc-ink); }

.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; margin-top: 22px; }
.story-card { display: flex; flex-direction: column; min-width: 0; padding-bottom: 18px; border-bottom: 1px solid var(--doc-line); }
.story-card[hidden] { display: none; }
.story-category { margin-bottom: 10px; color: var(--doc-accent-ink); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .11em; }
.story-title { margin: 0 0 8px; color: var(--doc-ink); font-size: 20px; font-weight: 700; line-height: 1.24; letter-spacing: -.035em; }
.story-card:hover .story-title { color: var(--doc-accent-ink); }
.story-card p { margin: 0 0 10px; color: var(--doc-muted); font-size: 13px; line-height: 1.55; }
.story-card small { margin-top: auto; color: var(--doc-muted); font-size: 12px; }
.story-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.65; margin-bottom: 16px;
    overflow: hidden; border-radius: var(--doc-radius); background: #eee6db; }
.story-art .mini-page { display: grid; place-items: center; width: 80px; height: 112px; background: #faf8ef;
    box-shadow: 13px 11px #252722, 0 15px 20px rgba(0, 0, 0, .13); transform: rotate(-14deg); }
.story-art .mini-page i { width: 43px; height: 60px; border-radius: 50% 50% 0 50%; background: #f09b76; }
.story-art[data-art="type"] { background: #d8ded8; }
.story-art[data-art="type"] .mini-page { width: 138px; height: 86px; box-shadow: 11px 10px #2f3531; transform: rotate(9deg); }
.story-art[data-art="type"] .mini-page i { width: 95px; height: 10px; border-radius: 0; background: #373d3c; box-shadow: 0 18px #373d3c, 0 36px #a3b2a6;
    transform: translateY(-18px); }
.story-art[data-art="agent"] { background: #e1ddf5; }
.story-art[data-art="agent"] .mini-page { background: #4d4bd7; box-shadow: 14px 13px #c7c1e6; transform: none; }
.story-art[data-art="agent"] .mini-page i { border-radius: 50%; background: #f1eae2; }
.story-art[data-art="export"] { background: #f2dbca; }
.story-art[data-art="export"] .mini-page { transform: rotate(13deg); }

/* ============ Right rail ============ */
.doc-rail-title { margin: 0 0 14px; color: var(--doc-ink); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .13em; }
.doc-toc ul, .rail-links { list-style: none; margin: 0; padding: 0; }
.doc-toc a, .rail-links a { display: block; padding: 8px 0 8px 12px; border-left: 2px solid var(--doc-line);
    color: var(--doc-muted); font-size: 12.5px; line-height: 1.4; transition: color .15s, border-color .15s; }
.doc-toc a:hover, .rail-links a:hover { color: var(--doc-ink); }
.doc-toc a.is-active, .rail-links a.is-active { color: var(--doc-accent-ink); border-left-color: var(--doc-accent); font-weight: 600; }
.doc-toc .toc-l3 a { padding-left: 24px; }

/* Progress and the copy button need JS; without it they aren't offered at all. */
.doc-progress, .rail-card--js { display: none; }
.js .doc-progress { display: block; margin-top: 22px; }
.js .rail-card--js { display: block; }
.doc-progress-track { height: 3px; overflow: hidden; border-radius: 10px; background: var(--doc-line); }
.doc-progress-fill { width: 0; height: 100%; background: var(--doc-accent); transition: width .15s; }
.doc-progress p { margin-top: 8px; color: var(--doc-muted); font-size: 12px; }

.rail-card { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--doc-line); }
.doc-aside-inner > .rail-card:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rail-card strong { color: var(--doc-ink); font-size: 13px; }
.rail-card p { margin: 8px 0 10px; color: var(--doc-muted); font-size: 12px; line-height: 1.6; }
.rail-card a, .rail-card button { padding: 0; border: 0; background: none; color: var(--doc-accent-ink); font: inherit;
    font-size: 12px; font-weight: 700; cursor: pointer; }
.rail-card a:hover, .rail-card button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ Next / previous ============ */
.doc-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 56px;
    padding-top: 26px; border-top: 1px solid var(--doc-line); }
.doc-pager > div:only-child { grid-column: 1 / -1; }
.doc-pager a { display: flex; align-items: center; justify-content: space-between; gap: 15px; height: 100%; padding: 18px 22px;
    border: 1px solid var(--doc-line); border-radius: var(--doc-radius); transition: border-color .15s; }
.doc-pager a:hover { border-color: var(--doc-accent); }
.doc-pager small { display: block; margin-bottom: 5px; color: var(--doc-muted); font-size: 12px; }
.doc-pager strong { color: var(--doc-ink); font-size: 14px; font-weight: 600; }
.doc-pager .prev { justify-content: flex-start; }
@media (max-width: 559px) { .doc-pager { grid-template-columns: minmax(0, 1fr); } }

/* ============ Rendered markdown ============ */
.docs-prose { max-width: 780px; color: var(--doc-ink); font-size: 15.5px; line-height: 1.8; }
.docs-prose > *:first-child { margin-top: 0; }
.docs-prose p { max-width: 70ch; margin: 0 0 18px; }
.docs-prose a { color: var(--doc-accent-ink); text-decoration: underline; text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--doc-accent-ink) 40%, transparent); }
.docs-prose a:hover { text-decoration-color: var(--doc-accent-ink); }
.docs-prose strong { font-weight: 700; }

.docs-prose h2 { margin: 52px 0 16px; font-size: clamp(23px, 2vw, 30px); font-weight: 700; line-height: 1.18;
    letter-spacing: -.038em; scroll-margin-top: 84px; }
.docs-prose h3 { margin: 30px 0 10px; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; scroll-margin-top: 84px; }
.docs-prose h4 { margin: 24px 0 8px; font-size: 15px; font-weight: 700; }
.docs-prose a.heading-anchor { margin-left: 8px; color: var(--doc-muted); font-weight: 400; text-decoration: none; opacity: 0; }
.docs-prose h2:hover a.heading-anchor, .docs-prose h3:hover a.heading-anchor,
.docs-prose a.heading-anchor:focus-visible { opacity: 1; }

.docs-prose ul, .docs-prose ol { margin: 0 0 22px; padding-left: 25px; }
.docs-prose li { margin-bottom: 6px; padding-left: 4px; }
.docs-prose li::marker { color: var(--doc-muted); }
.docs-prose li > p { margin-bottom: 8px; }

/* Every markdown blockquote in the content is a tip or aside, so it reads as a callout. */
.docs-prose blockquote, .doc-note { --doc-note-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v14M1 8h14M3 3l10 10M13 3 3 13' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.docs-prose blockquote { position: relative; margin: 26px 0; padding: 18px 20px 18px 46px; border-left: 3px solid var(--doc-accent);
    border-radius: 0 var(--doc-radius) var(--doc-radius) 0; background: var(--doc-accent-pale); font-size: 14px; line-height: 1.7; }
.docs-prose blockquote::before, .doc-note::before { content: ""; position: absolute; left: 18px; top: 22px; width: 15px; height: 15px;
    background: var(--doc-accent-ink); -webkit-mask: var(--doc-note-mark) center / contain no-repeat; mask: var(--doc-note-mark) center / contain no-repeat; }
.docs-prose blockquote p { margin: 0 0 8px; }
.docs-prose blockquote > :last-child { margin-bottom: 0; }

.docs-prose code { padding: 2px 5px; border: 1px solid var(--doc-line); border-radius: 4px; background: var(--doc-secondary);
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .85em; }
.docs-prose pre { margin: 24px 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--doc-line); border-radius: var(--doc-radius);
    background: var(--doc-secondary); font-size: 13px; line-height: 1.6; }
.docs-prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }

.docs-prose img { border: 1px solid var(--doc-line); border-radius: var(--doc-radius-lg); }
.docs-prose figure { margin: 34px 0 28px; }
.docs-prose figure img { display: block; width: 100%; height: auto; }
.docs-prose figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-top: 12px;
    color: var(--doc-muted); font-size: 12px; line-height: 1.6; }
.docs-prose figcaption b { color: var(--doc-ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 559px) { .docs-prose figcaption { display: block; } .docs-prose figcaption b { display: block; margin-bottom: 3px; } }

/* Real product screenshots (2x WebP) and walkthrough videos. The editor is dark, so
   the border only needs to separate it from the white page. */
.docs-prose .doc-shot--medium img { max-width: 560px; }
.docs-prose .doc-shot--narrow img { max-width: 360px; }
.js .docs-prose .doc-shot img { cursor: zoom-in; }
.docs-prose .doc-shot img:focus-visible { outline: 2px solid var(--doc-accent); outline-offset: 2px; }
.docs-prose .doc-video video { display: block; width: 100%; height: auto; border: 1px solid var(--doc-line); border-radius: var(--doc-radius-lg); background: #09090b; }
.doc-lightbox { width: min(96vw, 1600px); max-width: none; max-height: 94vh; padding: 0; overflow: auto; border: 0; border-radius: var(--doc-radius-lg); background: transparent; cursor: zoom-out; }
.doc-lightbox::backdrop { background: rgba(9, 9, 11, .82); }
.doc-lightbox img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--doc-radius-lg); }

/* Source beside its result: a code block and the figure it produces, stacked on narrow screens. */
.doc-pair { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; margin: 26px 0 30px; }
.docs-prose .doc-pair pre, .docs-prose .doc-pair figure { margin: 0; }
.docs-prose .doc-pair pre { padding: 14px 15px; font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 699px) { .doc-pair { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

.docs-prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--doc-line); }

.table-scroll { width: 100%; margin: 26px 0; overflow-x: auto; }
.docs-prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; text-align: left; }
.docs-prose th, .docs-prose td { padding: 12px 14px; border-bottom: 1px solid var(--doc-line); vertical-align: top; }
.docs-prose th { background: var(--doc-secondary); color: var(--doc-muted); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }

.doc-chart { margin: 32px 0; padding: 24px 26px; border: 1px solid var(--doc-line); border-radius: var(--doc-radius); background: var(--doc-secondary); }
.docs-prose .doc-chart-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.docs-prose .doc-chart-sub { margin: 0 0 16px; color: var(--doc-muted); font-size: 13px; line-height: 1.55; }
.doc-chart-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 62px; align-items: center; gap: 14px; padding: 9px 0; font-size: 12.5px; }
.doc-chart-track { height: 14px; overflow: hidden; border-radius: 2px; background: var(--doc-line); }
.doc-chart-fill { height: 100%; background: var(--doc-accent); }
.doc-chart-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.docs-prose .doc-chart-note { max-width: none; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--doc-line); color: var(--doc-muted); font-size: 12px; line-height: 1.6; }

/* ============ Narrow screens ============ */
@media (max-width: 699px) {
    .featured-doc, .learn-feature, .story-grid { grid-template-columns: minmax(0, 1fr); }
    .featured-shot { min-height: 210px; }
    .featured-copy { padding: 24px; }
    .feature-copy { padding: 24px 0; }
    .docs-prose { font-size: 15px; }
    .docs-prose pre { padding: 14px; font-size: 12.5px; }
    .doc-chart { padding: 18px 14px; }
    .doc-chart-row { grid-template-columns: 58px minmax(0, 1fr) 56px; gap: 8px; }
    .doc-section-head span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .doc-nav a, .doc-nav-toggle svg, .collection-card, .topic-list a, .doc-progress-fill, .doc-pager a { transition: none; }
    .collection-card:hover { transform: none; }
}
