/* =====================================================================
   Ferrith Docs — the site's components (the design bundle's .dx-* classes,
   docs-system.css minus the tokens) PLUS the port adaptations the bundle
   lacks (design-system.md §Adaptations): Markdig prose patterns (CSS
   counters for steps, the alert/callout mapping, wrapped tables/code),
   responsive breakpoints, :focus-visible + skip link, the classes that
   replace the prototype's inline styles, and print styles. Zero-JS site:
   every pattern here works as plain server-rendered HTML.
   ===================================================================== */

.dx-site { width: 100%; min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
.dx-site * { box-sizing: border-box; }
.dx-site a { color: var(--accent-text); }
.dx-site a:hover { color: var(--accent-strong); }
.dx-main { display: flex; flex-direction: column; flex: 1; }
.dx-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.dx-wrap--narrow { max-width: 824px; }
.dx-wrap--trust { max-width: 900px; }
.dx-wrap--grow { flex: 1; padding-bottom: 56px; }
.dx-eyebrow { font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); }
.dx-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- Accessibility: focus + skip link (the bundle has hover states only) ---- */
.dx-site a:focus-visible, .dx-site button:focus-visible, .dx-site input:focus-visible, .dx-site summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.dx-skip { position: absolute; left: -999px; top: 12px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; }
.dx-skip:focus { left: 12px; }

/* ---- Header ---------------------------------------------------------- */
.dx-header { background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.dx-header-in { max-width: 1240px; margin: 0 auto; padding: 0 32px; height: 60px; display: flex; align-items: center; gap: 18px; }
.dx-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.dx-logo img { height: 22px; display: block; }
.dx-tag { font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent-text); border: 1px solid var(--accent-line); background: var(--accent-weak); padding: 2px 7px; border-radius: 3px; }
.dx-topnav { display: flex; gap: 2px; margin-left: 8px; }
.dx-topnav a { padding: 7px 11px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-radius: 7px; }
.dx-topnav a:hover { background: var(--surface-hover); color: var(--ink); }
.dx-topnav a.active { color: var(--accent-text); background: var(--accent-weak); }
.dx-hspace { flex: 1; }
.dx-hsearch { display: flex; align-items: center; gap: 8px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; padding: 7px 11px; width: 230px; color: var(--ink-3); font-size: 13px; }
.dx-hsearch svg { width: 14px; height: 14px; flex-shrink: 0; }
.dx-hlink { font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dx-hlink svg { width: 12px; height: 12px; }

/* The search fields are real GET forms — the input fills the styled shell */
.dx-hsearch input, .dx-herosearch input, .dx-pagesearch input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); padding: 0; }
.dx-hsearch input::placeholder, .dx-herosearch input::placeholder, .dx-pagesearch input::placeholder { color: var(--ink-3); }
.dx-hsearch button, .dx-herosearch button, .dx-pagesearch button { display: none; }

/* ---- Landing --------------------------------------------------------- */
.dx-hero { border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fafcfe 0%, var(--surface) 100%); }
.dx-hero-in { max-width: 1240px; margin: 0 auto; padding: 62px 32px 54px; }
.dx-hero h1 { font-family: var(--font-display); font-size: 42px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 14px; }
.dx-hero .lede { font-size: 16px; color: var(--ink-2); line-height: 1.65; max-width: 620px; margin: 0 0 30px; text-wrap: pretty; }
.dx-herosearch { display: flex; align-items: center; gap: 11px; width: 540px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 13px 16px; box-shadow: var(--shadow-sm); color: var(--ink-3); font-size: 14px; }
.dx-herosearch svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.dx-pagesearch { width: 100%; color: var(--ink); }
.dx-entrygrid { max-width: 1240px; margin: 0 auto; padding: 40px 32px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.dx-entrycard { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.dx-entrytile { width: 38px; height: 38px; background: var(--accent-weak); color: var(--accent-text); display: flex; align-items: center; justify-content: center; --chamfer: 6px; }
.dx-entrytile svg { width: 18px; height: 18px; }
.dx-entrycard h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 2px 0 0; }
.dx-entrycard > p { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 0; flex: 1; }
.dx-entrylinks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dx-entrylinks a { font-size: 12.5px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.dx-entrylinks svg { width: 11px; height: 11px; }
.dx-relstrip { max-width: 1240px; margin: 0 auto; padding: 26px 32px 58px; width: 100%; }
.dx-relcard { display: flex; gap: 22px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; background: var(--surface-muted); }
.dx-relid { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border-strong); padding: 5px 10px; border-radius: 6px; white-space: nowrap; }
.dx-relcard h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; margin: 2px 0 8px; }
.dx-relcard ul { margin: 0; padding-left: 18px; }
.dx-relcard li { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.dx-relcard .dx-relmore { margin-left: auto; flex-shrink: 0; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; padding-top: 4px; }

/* ---- Guide shell ------------------------------------------------------ */
.dx-shell { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 228px minmax(0, 1fr) 196px; gap: 44px; flex: 1; align-items: stretch; }
.dx-shell--noside { grid-template-columns: minmax(0, 1fr) 196px; max-width: 1080px; }
.dx-side { padding: 28px 20px 40px 0; border-right: 1px solid var(--border); }
.dx-sidegroup { margin: 0 0 22px; }
.dx-sidegroup > b { display: block; font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 7px; padding-left: 10px; }
.dx-side a { display: block; padding: 5px 10px; font-size: 13px; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.dx-side a:hover { color: var(--ink); background: var(--surface-hover); }
.dx-side a.on { color: var(--accent-text); background: var(--accent-weak); border-left-color: var(--accent); font-weight: 500; }
.dx-side a.open { font-weight: 600; color: var(--ink); }
.dx-side a.sub { padding-left: 22px; }
.dx-article { padding: 32px 0 52px; min-width: 0; }
.dx-crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); margin: 0 0 16px; flex-wrap: wrap; }
.dx-crumbs a { color: var(--ink-3); text-decoration: none; }
.dx-crumbs a:hover { color: var(--accent-text); }
.dx-crumbs svg { width: 11px; height: 11px; }
.dx-article h1 { font-family: var(--font-display); font-size: 29px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 12px; }
.dx-metarow { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 26px; }
.dx-metarow--tight { margin-top: 12px; margin-bottom: 0; }
.dx-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--neutral-line); background: var(--neutral-weak); color: var(--neutral-fg); white-space: nowrap; }
.dx-chip svg { width: 11px; height: 11px; }
.dx-chip[data-tone="blue"] { background: var(--accent-weak); color: var(--accent-text); border-color: var(--info-line); }
.dx-chip[data-tone="green"] { background: var(--ok-weak); color: var(--ok); border-color: var(--ok-line); }
.dx-chip[data-tone="orange"] { background: var(--warn-weak); color: var(--warn); border-color: var(--warn-line); }
.dx-chip[data-tone="dark"] { background: var(--anthracite); color: #fff; border-color: var(--anthracite); }
.dx-toc { padding: 36px 0 40px; }
.dx-toc > b { display: block; font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 9px; }
.dx-toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--border); font-size: 12.5px; color: var(--ink-3); text-decoration: none; line-height: 1.45; }
.dx-toc a.sub { padding-left: 22px; }
.dx-toc a:hover { color: var(--ink); }
.dx-toc a.on { color: var(--accent-text); border-left-color: var(--accent); font-weight: 500; }

/* ---- Prose (Markdig output) ------------------------------------------ */
.dx-prose { font-size: 14.5px; line-height: 1.7; }
.dx-prose p { margin: 0 0 16px; text-wrap: pretty; }
.dx-prose h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.005em; margin: 34px 0 12px; scroll-margin-top: 16px; }
.dx-prose h2:first-child { margin-top: 0; }
.dx-prose h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; margin: 26px 0 10px; scroll-margin-top: 16px; }
.dx-prose h4 { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; margin: 20px 0 8px; }
.dx-prose ul { margin: 0 0 16px; padding-left: 20px; }
.dx-prose li { margin: 0 0 7px; }
.dx-prose li > p { margin: 0 0 6px; }
.dx-prose code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-sunken); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; color: var(--ink-2); }
.dx-prose img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.dx-prose hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.dx-prose blockquote { margin: 0 0 16px; padding: 2px 0 2px 16px; border-left: 3px solid var(--border-strong); color: var(--ink-2); }
.dx-prose blockquote p:last-child { margin-bottom: 0; }
.dx-lede { font-size: 15.5px; color: var(--ink-2); }
/* Numbered steps: Markdig emits a plain <ol>; the chamfered number tile is a CSS counter */
.dx-prose ol { list-style: none; counter-reset: dx-step; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.dx-prose ol > li { counter-increment: dx-step; position: relative; padding-left: 36px; margin: 0; min-height: 24px; }
.dx-prose ol > li::before { content: counter(dx-step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; background: var(--accent-weak); color: var(--accent-text); font-family: var(--font-display); font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; clip-path: polygon(5px 0%, calc(100% - 5px) 0%, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0% calc(100% - 5px), 0% 5px); }
.dx-prose ol ol { margin-top: 10px; }
/* Callouts: the renderer maps > [!NOTE] alerts to .dx-callout */
.dx-callout { display: flex; gap: 10px; padding: 13px 15px; border-radius: 9px; background: var(--info-weak); border: 1px solid var(--info-line); color: var(--accent-text); font-size: 13.5px; line-height: 1.6; margin: 0 0 18px; }
.dx-callout svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.dx-callout b { display: block; font-family: var(--font-display); font-size: 12px; margin-bottom: 2px; }
.dx-callout p { margin: 0 0 6px; }
.dx-callout p:last-child { margin-bottom: 0; }
.dx-callout code { background: transparent; border: 0; padding: 0; color: inherit; }
.dx-callout--warn { background: var(--warn-weak); border-color: var(--warn-line); color: var(--warn); }
.dx-pagenav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.dx-pagenav a, .dx-pagenav span { border: 1px solid var(--border); border-radius: 10px; padding: 13px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 3px; }
.dx-pagenav span { border-color: transparent; }
.dx-pagenav a:hover { border-color: var(--accent-line); background: var(--accent-weak); }
.dx-pagenav small { font-family: var(--font-display); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.dx-pagenav b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dx-pagenav a.next { align-items: flex-end; text-align: right; }

/* ---- Code blocks (the renderer wraps fenced code) --------------------- */
.dx-codewrap { margin: 0 0 18px; border-radius: 10px; overflow: hidden; border: 1px solid #232830; }
.dx-codehd { display: flex; align-items: center; justify-content: space-between; background: #22262c; color: #8a8f97; padding: 7px 14px; font-family: var(--font-mono); font-size: 11px; }
.dx-codewrap pre { margin: 0; background: var(--anthracite); color: #e8eaed; padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; overflow-x: auto; }
.dx-codewrap pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: inherit; }
.dx-codewrap .k { color: #9CC6EF; }
.dx-codewrap .s { color: #ffd1b1; }
.dx-codewrap .c { color: #8a8f97; }

/* ---- Buttons ----------------------------------------------------------- */
.dx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; padding: 9px 17px; border: 1px solid transparent; white-space: nowrap; text-decoration: none; }
.dx-btn svg { width: 14px; height: 14px; }
.dx-btn--block { width: 100%; }
.dx-btn-primary, .dx-site a.dx-btn-primary { background: var(--accent); color: #fff; }
.dx-btn-primary:hover, .dx-site a.dx-btn-primary:hover { background: var(--accent-strong); color: #fff; }
.dx-btn-onaccent, .dx-site a.dx-btn-onaccent { background: #fff; color: var(--accent-text); }
.dx-btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--border-strong); border-radius: 8px; }
.dx-btn-ghost:hover { background: var(--surface-hover); color: var(--ink); }

/* ---- Swagger / accent card -------------------------------------------- */
.dx-swagger { background: var(--accent); color: #fff; padding: 22px 24px; display: flex; gap: 20px; align-items: center; margin: 0 0 18px; --chamfer: 12px; }
.dx-swagger h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; margin: 0 0 5px; color: #fff; }
.dx-swagger p { font-size: 13px; line-height: 1.55; margin: 0; color: rgba(255,255,255,0.85); }
.dx-swagger .grow { flex: 1; }
.dx-swagger code { background: rgba(255,255,255,.15); border: 0; color: #fff; }

/* ---- Tables (the renderer wraps Markdig tables) ------------------------ */
.dx-tablewrap { border: 1px solid var(--border); border-radius: 10px; overflow: auto; margin: 0 0 18px; }
.dx-table, .dx-tablewrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--ink); }
.dx-tablewrap thead th { text-align: left; padding: 10px 14px; background: var(--surface-muted); font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.dx-tablewrap tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.55; }
.dx-tablewrap tbody tr:last-child td { border-bottom: 0; }

/* ---- Page head (index pages) ------------------------------------------- */
.dx-pagehead { padding: 42px 0 6px; }
.dx-pagehead h1 { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; }
.dx-pagehead .sub { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; max-width: 640px; margin: 0; text-wrap: pretty; }
.dx-headrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.dx-feedlink { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.dx-feedlink svg { width: 13px; height: 13px; }
.dx-spacer { height: 22px; }
.dx-resultcount { font-size: 13px; color: var(--ink-3); margin: 14px 0 6px; }
.dx-empty { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 22px; color: var(--ink-2); font-size: 14px; line-height: 1.6; background: var(--surface-subtle); margin: 22px 0; }
.dx-empty b { display: block; font-family: var(--font-display); font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.dx-sectionlist { list-style: none; margin: 22px 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dx-sectionlist li { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; background: var(--surface); }
.dx-sectionlist h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.dx-sectionlist h2 a { text-decoration: none; color: var(--ink); }
.dx-sectionlist h2 a:hover { color: var(--accent-text); }
.dx-sectionlist p { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.dx-sectionlist .pages { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dx-sectionlist .pages a { font-size: 12.5px; text-decoration: none; }
.dx-note { font-size: 13px; color: var(--ink-3); margin: 0 0 8px; }

/* ---- Template packs ----------------------------------------------------- */
.dx-filterrow { display: flex; gap: 8px; margin: 22px 0 22px; flex-wrap: wrap; }
.dx-filterrow a { padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.dx-filterrow a:hover { background: var(--surface-hover); color: var(--ink); }
.dx-filterrow a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dx-packgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0 0 22px; }
.dx-pack { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.dx-pack h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0; }
.dx-pack h3 a { text-decoration: none; color: var(--ink); }
.dx-pack h3 a:hover { color: var(--accent-text); }
.dx-pack > p { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 0; flex: 1; }
.dx-packmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.dx-packfoot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; font-size: 12px; color: var(--ink-3); gap: 10px; }
.dx-detailgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; padding: 6px 0 52px; }
.dx-facts { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-muted); padding: 20px; }
.dx-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0 0 16px; }
.dx-facts dt { font-size: 12px; color: var(--ink-3); }
.dx-facts dd { margin: 0; font-size: 13px; color: var(--ink); font-weight: 500; }
.dx-facts .sha { font-family: var(--font-mono); font-size: 11px; word-break: break-all; font-weight: 400; color: var(--ink-2); }
.dx-verify { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.dx-verify code { font-size: 11px; }

/* ---- Releases ------------------------------------------------------------ */
.dx-release { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 28px 0; border-top: 1px solid var(--border); }
.dx-release--single { border-top: 0; padding-top: 10px; }
.dx-relhead { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.dx-release h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.dx-release h2 a { text-decoration: none; color: var(--ink); }
.dx-release h2 a:hover { color: var(--accent-text); }
.dx-release .dx-prose h2 { font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin: 18px 0 8px; }
.dx-release .dx-prose h2:first-child { margin-top: 10px; }
.dx-release .dx-prose ul { margin: 0; padding-left: 18px; }
.dx-release .dx-prose li { font-size: 13.5px; line-height: 1.65; margin-bottom: 6px; }

/* ---- Learn ---------------------------------------------------------------- */
.dx-vidgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 24px 0 18px; }
.dx-vidcard { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; display: block; }
.dx-vidcard:hover { box-shadow: var(--shadow-md); }
.dx-poster { aspect-ratio: 16 / 7; background: var(--anthracite); display: flex; align-items: center; justify-content: center; position: relative; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 26px 26px; overflow: hidden; }
.dx-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.dx-play { width: 52px; height: 52px; background: var(--accent); display: flex; align-items: center; justify-content: center; --chamfer: 8px; position: relative; }
.dx-play svg { width: 18px; height: 18px; color: #fff; margin-left: 2px; }
.dx-dur { position: absolute; right: 12px; bottom: 10px; font-family: var(--font-mono); font-size: 11px; background: rgba(0,0,0,0.55); color: #fff; padding: 2px 7px; border-radius: 5px; }
.dx-vidbody { padding: 14px 17px 15px; }
.dx-vidbody h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0 0 5px; color: var(--ink); }
.dx-vidbody p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin: 0 0 8px; }
.dx-vidbody .ext { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); }
.dx-vidbody .ext svg { width: 11px; height: 11px; }

/* ---- Trust / legal ---------------------------------------------------------- */
.dx-changelog { list-style: none; margin: 0 0 18px; padding: 0; }
.dx-changelog li { display: flex; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13.5px; line-height: 1.55; }
.dx-changelog li:last-child { border-bottom: 1px solid var(--border); }
.dx-changelog .d { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); width: 108px; flex-shrink: 0; padding-top: 1px; }
.dx-changelog .v { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); width: 42px; flex-shrink: 0; padding-top: 1px; }
.dx-verbanner { display: flex; align-items: center; gap: 10px; background: var(--ok-weak); border: 1px solid var(--ok-line); color: var(--ok); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin: 0 0 24px; flex-wrap: wrap; }
.dx-verbanner svg { width: 15px; height: 15px; flex-shrink: 0; }
.dx-verbanner .links { margin-left: auto; display: flex; gap: 16px; font-size: 12.5px; white-space: nowrap; }
.dx-verbanner--old { background: var(--warn-weak); border-color: var(--warn-line); color: var(--warn); }
.dx-verbanner--old a { color: var(--warn); }
.dx-placeholder { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 15px 18px; color: var(--ink-3); font-size: 13.5px; line-height: 1.6; background: var(--surface-subtle); margin: 0 0 18px; }

/* ---- Search ------------------------------------------------------------------ */
.dx-result { padding: 19px 0; border-top: 1px solid var(--border); }
.dx-result .sec { font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); display: block; margin-bottom: 4px; }
.dx-result h3 { margin: 0 0 5px; font-size: 16px; }
.dx-result h3 a { font-family: var(--font-display); font-weight: 600; text-decoration: none; }
.dx-result p { margin: 0 0 5px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.dx-result .path { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.dx-result mark { background: var(--accent-weak-2); color: var(--accent-text); padding: 0 2px; border-radius: 3px; }

/* ---- Footer -------------------------------------------------------------------- */
.dx-footer { background: var(--anthracite); color: #c7cbd1; margin-top: auto; flex-shrink: 0; }
.dx-footer-in { max-width: 1240px; margin: 0 auto; padding: 42px 32px 30px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.dx-footer img { height: 20px; display: block; margin-bottom: 14px; }
.dx-footnote { font-size: 12.5px; color: #8a8f97; line-height: 1.6; max-width: 280px; margin: 0; }
.dx-footcol b { display: block; font-family: var(--font-display); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: #8a8f97; margin-bottom: 10px; }
.dx-footcol a { display: block; font-size: 13px; color: #c7cbd1; padding: 3.5px 0; text-decoration: none; }
.dx-footcol a:hover { color: #fff; }
.dx-footbar { border-top: 1px solid rgba(255,255,255,0.09); }
.dx-footbar-in { max-width: 1240px; margin: 0 auto; padding: 14px 32px; display: flex; justify-content: space-between; font-size: 12px; color: #8a8f97; gap: 12px; flex-wrap: wrap; }

/* ---- Dev-only: content problems banner ---------------------------------------- */
.dx-devbanner { background: var(--danger-weak); border-bottom: 1px solid var(--danger-line); color: var(--danger); font-size: 13px; padding: 10px 32px; }
.dx-devbanner ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- Responsive (the bundle is a 1,240 px canvas; these breakpoints are the port's) ---- */
@media (max-width: 1100px) {
  .dx-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .dx-shell--noside { grid-template-columns: minmax(0, 1fr); }
  .dx-toc { display: none; }
  .dx-entrygrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .dx-header-in { flex-wrap: wrap; height: auto; padding: 10px 20px; gap: 8px 14px; }
  .dx-topnav { flex-wrap: wrap; margin-left: 0; order: 3; width: 100%; }
  .dx-hspace { display: none; }
  .dx-hsearch { order: 4; width: 100%; }
  .dx-hlink { margin-left: auto; }
  .dx-wrap, .dx-hero-in, .dx-entrygrid, .dx-relstrip, .dx-footer-in, .dx-footbar-in, .dx-devbanner { padding-left: 20px; padding-right: 20px; }
  .dx-hero-in { padding-top: 40px; padding-bottom: 36px; }
  .dx-hero h1 { font-size: 32px; }
  .dx-herosearch { width: 100%; }
  .dx-shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 20px; }
  .dx-side { border-right: 0; border-bottom: 1px solid var(--border); padding: 20px 0 10px; }
  .dx-article { padding-top: 24px; }
  .dx-entrygrid, .dx-packgrid, .dx-vidgrid, .dx-sectionlist { grid-template-columns: 1fr; }
  .dx-detailgrid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dx-release { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dx-relcard { flex-wrap: wrap; }
  .dx-relcard .dx-relmore { margin-left: 0; }
  .dx-pagenav { grid-template-columns: 1fr; }
  .dx-pagenav a.next { align-items: flex-start; text-align: left; }
  .dx-headrow { flex-direction: column; align-items: flex-start; }
  .dx-footer-in { grid-template-columns: 1fr 1fr; }
  .dx-verbanner .links { margin-left: 0; }
}
@media (max-width: 560px) {
  .dx-footer-in { grid-template-columns: 1fr; }
  .dx-pagehead h1, .dx-article h1 { font-size: 24px; }
  .dx-changelog li { flex-wrap: wrap; }
}

/* ---- Print (legal pages and the sub-processor list get printed) --------------- */
@media print {
  .dx-header, .dx-footer, .dx-side, .dx-toc, .dx-pagenav, .dx-skip, .dx-hsearch, .dx-feedlink, .dx-devbanner { display: none !important; }
  .dx-shell { display: block; padding: 0; }
  .dx-site, body { color: #000; background: #fff; }
  .dx-prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
  .dx-tablewrap, .dx-codewrap { break-inside: avoid; }
}
