/* Dragon Flycore article (robotanimator.org) - every rule is scoped to #dfc so the theme cannot restyle the post and the post cannot restyle the theme.
   Fonts: Space Grotesk (headings), Inter (text), JetBrains Mono (labels, code). */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@500;600;700&display=swap");

#dfc { --bg: #070a11; --bg2: #0c111c; --card: #0f1522; --line: rgba(150, 190, 255, .14); --line2: rgba(150, 190, 255, .26);
  --text: #dfe6f2; --dim: #96a3ba; --white: #fff; --cyan: #4fd8ff; --amber: #ffad42; --fire: #ff6a2b; --ok: #6be3a4;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  position: relative; box-sizing: border-box; width: min(1200px, 100vw - 24px) !important; max-width: none !important;
  margin: 0 0 0 50% !important; transform: translateX(-50%); padding: clamp(18px, 3vw, 40px); border-radius: 22px;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(79, 216, 255, .10), transparent 60%), radial-gradient(900px 500px at -10% 20%, rgba(255, 106, 43, .08), transparent 60%), var(--bg);
  color: var(--text); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: anywhere; }
#dfc *, #dfc *::before, #dfc *::after { box-sizing: border-box; }
/* article typography; :not(.dfcv *) keeps it out of the 3D viewer, which has its own stylesheet */
#dfc p:not(.dfcv *), #dfc ul:not(.dfcv *), #dfc ol:not(.dfcv *), #dfc table:not(.dfcv *), #dfc figure:not(.dfcv *), #dfc details:not(.dfcv *) { margin-top: 0; }
#dfc p:not(.dfcv *) { margin: 0 0 1.05em; }
#dfc a:not(.dfcv *) { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(79, 216, 255, .4); text-underline-offset: 3px; }
#dfc a:not(.dfcv *):hover { color: #fff; text-decoration-color: var(--cyan); }
#dfc b:not(.dfcv *), #dfc strong:not(.dfcv *) { color: var(--white); font-weight: 650; }
#dfc code:not(.dfcv *) { font: 500 .88em/1.4 var(--mono); padding: .1em .38em; border-radius: 6px; background: rgba(79, 216, 255, .09); color: #bfeeff; }
#dfc h2:not(.dfcv *), #dfc h3:not(.dfcv *), #dfc h4:not(.dfcv *) { font-family: var(--head); color: var(--white); letter-spacing: -.015em; text-transform: none; border: 0; padding: 0; background: none; }
#dfc h2 { font-size: clamp(27px, 3.3vw, 38px); line-height: 1.12; font-weight: 700; margin: 0 0 .7em; }
#dfc h3:not(.dfcv *) { font-size: clamp(20px, 2.2vw, 25px); line-height: 1.25; font-weight: 650; margin: 1.9em 0 .6em; }
#dfc section { padding: clamp(28px, 4vw, 52px) 0 8px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
#dfc sub { font-size: .72em; }

/* hero */
#dfc .dfc-hero { padding: 6px 0 18px; }
#dfc .dfc-kicker { font: 600 12px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); margin: 0 0 14px; }
#dfc .dfc-hero h2.dfc-hero__t { font-size: clamp(32px, 5vw, 58px); line-height: 1.04; margin: 0 0 .45em; max-width: 18ch;
  background: linear-gradient(90deg, #fff 30%, #bfeeff 70%, #ffd29a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#dfc .dfc-dek { font-size: clamp(17px, 1.6vw, 20px); color: #c7d1e2; max-width: 66ch; }
#dfc .dfc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 18px 0 0; }
#dfc .dfc-stat { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
#dfc .dfc-stat b { display: block; font: 700 clamp(19px, 2vw, 25px)/1.1 var(--head); color: var(--amber); }
#dfc .dfc-stat span { display: block; margin-top: 4px; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }

/* layout + table of contents */
#dfc .dfc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
#dfc .dfc-toc { position: sticky; top: 90px; padding: 14px 0; font-size: 14px; }
#dfc .dfc-toc__title { font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; }
#dfc .dfc-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line2); }
#dfc .dfc-toc li { margin: 0; padding: 0; }
#dfc .dfc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--dim); text-decoration: none; line-height: 1.35; }
#dfc .dfc-toc a:hover { color: #fff; }
#dfc .dfc-toc a.is-active { color: #fff; border-left-color: var(--amber); }
#dfc .dfc-toc__toggle { display: none; }
#dfc .dfc-body { min-width: 0; }
#dfc .dfc-body > section:first-child { border-top: 0; padding-top: 6px; }

/* lists, steps, small print */
#dfc .dfc-list { margin: 0 0 1.2em; padding: 0; list-style: none; }
#dfc .dfc-list li { position: relative; margin: 0 0 .7em; padding-left: 22px; }
#dfc .dfc-list li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); transform: rotate(45deg); }
#dfc .dfc-steps { counter-reset: s; list-style: none; margin: 0 0 1.3em; padding: 0; }
#dfc .dfc-steps li { counter-increment: s; position: relative; margin: 0 0 .7em; padding: 0 0 0 42px; }
#dfc .dfc-steps li::before { content: counter(s); position: absolute; left: 0; top: .05em; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font: 700 13px/1 var(--mono); color: #071019; background: var(--cyan); }
#dfc .dfc-small { font-size: 14px; color: var(--dim); }

/* figures */
#dfc .dfc-fig { margin: 0 0 1.4em; }
#dfc .dfc-fig img, #dfc .dfc-fig video { display: block; width: 100%; height: auto; max-width: 100%; border-radius: 14px; background: #0b0f18; border: 1px solid var(--line); }
#dfc .dfc-fig a[data-lb] { display: block; cursor: zoom-in; text-decoration: none; }
#dfc .dfc-fig figcaption { margin-top: 9px; font-size: 14px; line-height: 1.5; color: #b9c4d6; }
#dfc .dfc-credit { display: block; margin-top: 3px; font: 500 11.5px/1.45 var(--mono); color: #7d8aa2; }
#dfc .dfc-credit a { color: #9db3cf; }
#dfc .dfc-vid { position: relative; }
#dfc .dfc-vid video { aspect-ratio: auto; cursor: pointer; }
#dfc .dfc-vid__badge { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 99px; font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(7, 10, 17, .72); border: 1px solid var(--line2); pointer-events: none; }
#dfc .dfc-vid.is-paused::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(7, 10, 17, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M5 3v10l8-5z'/%3E%3C/svg%3E") 56% 50% / 26px no-repeat;
  border: 1px solid var(--line2); pointer-events: none; }
#dfc .dfc-fig--wide { margin-bottom: 1.6em; }
#dfc .dfc-grid { display: grid; gap: 18px; margin: 0 0 .4em; }
#dfc .dfc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#dfc .dfc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#dfc .dfc-grid > .dfc-fig { margin-bottom: 1em; }

/* tables */
#dfc .dfc-table { margin: 0 0 1.5em; overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
#dfc .dfc-table table { width: 100%; border-collapse: collapse; margin: 0; font-size: 14.5px; line-height: 1.45; border: 0; }
#dfc .dfc-table caption { caption-side: bottom; text-align: left; padding: 9px 14px 11px; font-size: 13px; color: var(--dim); border-top: 1px solid var(--line); }
#dfc .dfc-table th, #dfc .dfc-table td { padding: 10px 14px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); }
#dfc .dfc-table thead th { font: 600 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); background: rgba(79, 216, 255, .05); white-space: nowrap; }
#dfc .dfc-table tbody th { color: var(--white); font-weight: 600; }
#dfc .dfc-table tbody tr:last-child th, #dfc .dfc-table tbody tr:last-child td { border-bottom: 0; }
#dfc .dfc-table tbody tr:hover td, #dfc .dfc-table tbody tr:hover th { background: rgba(79, 216, 255, .035); }
#dfc .dfc-table--wide table { min-width: 680px; }
#dfc .dfc-table--budget td:last-child { font-family: var(--mono); color: var(--amber); text-align: right; white-space: nowrap; }

/* callouts */
#dfc .dfc-callout { margin: 0 0 1.5em; padding: 16px 18px 6px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(79, 216, 255, .05); }
#dfc .dfc-callout--tip { border-color: rgba(107, 227, 164, .35); background: rgba(107, 227, 164, .05); }
#dfc .dfc-callout--warn { border-color: rgba(255, 106, 43, .45); background: rgba(255, 106, 43, .06); }
#dfc .dfc-callout__t { margin: 0 0 6px; font: 600 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
#dfc .dfc-callout--tip .dfc-callout__t { color: var(--ok); }
#dfc .dfc-callout--warn .dfc-callout__t { color: var(--fire); }

/* charts */
#dfc .dfc-chart { margin: 0 0 1.5em; padding: 14px 14px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
#dfc .dfc-chart svg { display: block; width: 100%; height: auto; }
#dfc .dfc-chart figcaption { margin-top: 8px; font-size: 13.5px; color: #b9c4d6; }

/* code */
#dfc .dfc-code { margin: 0 0 1.5em; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #060910; }
#dfc .dfc-code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: #0b1120; border-bottom: 1px solid var(--line);
  font: 600 12px/1.3 var(--mono); color: var(--dim); }
#dfc .dfc-copy { cursor: pointer; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; color: var(--cyan); font: 600 11.5px/1 var(--mono); margin: 0; }
#dfc .dfc-copy:hover { border-color: var(--cyan); }
#dfc .dfc-code pre { margin: 0; padding: 14px 16px; max-height: 520px; overflow: auto; background: none; border: 0; white-space: pre; tab-size: 4; }
#dfc .dfc-code pre code { padding: 0; background: none; color: #d6e2f5; font: 400 12.8px/1.6 var(--mono); }
#dfc .dfc-code .k { color: #ff9e64; } #dfc .dfc-code .c { color: #6c7a93; font-style: italic; } #dfc .dfc-code .s { color: #9ece6a; } #dfc .dfc-code .n { color: #7dcfff; }

/* references, faq */
#dfc .dfc-ref { font: 600 .72em/1 var(--mono); vertical-align: super; text-decoration: none; color: var(--amber); margin-left: 1px; }
#dfc .dfc-refs { margin: 0 0 1.2em; padding-left: 1.4em; font-size: 14px; line-height: 1.55; color: #c3cddd; }
#dfc .dfc-refs li { margin: 0 0 .55em; }
#dfc .dfc-faq { margin: 0 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
#dfc .dfc-faq summary { cursor: pointer; padding: 14px 16px; font: 600 16.5px/1.35 var(--head); color: #fff; list-style: none; }
#dfc .dfc-faq summary::-webkit-details-marker { display: none; }
#dfc .dfc-faq summary::after { content: "+"; float: right; color: var(--amber); font-family: var(--mono); }
#dfc .dfc-faq[open] summary::after { content: "\2212"; }
#dfc .dfc-faq p { padding: 0 16px 14px; margin: 0; color: #c8d2e2; }
#dfc .dfc-note { margin: 0 0 1.2em; }
#dfc .dfc-note summary { cursor: pointer; color: var(--cyan); font-weight: 600; margin-bottom: 10px; }

/* the viewer inside the article */
#dfc .dfcv { margin: 0 0 14px; }

/* lightbox */
.dfc-lb { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 3vmin; background: rgba(4, 6, 10, .94); cursor: zoom-out; }
.dfc-lb img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 80px rgba(0, 0, 0, .8); }

/* responsive */
@media (max-width: 1020px) {
  #dfc .dfc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #dfc .dfc-toc { position: sticky; top: 0; z-index: 5; margin: 0 -8px 8px; padding: 8px; background: rgba(7, 10, 17, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
  #dfc .dfc-toc__title { display: none; }
  #dfc .dfc-toc__toggle { display: block; width: 100%; text-align: left; cursor: pointer; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: #fff; font: 600 14px/1.2 var(--sans); margin: 0; }
  #dfc .dfc-toc ol { display: none; margin-top: 8px; border-left: 0; }
  #dfc .dfc-toc.is-open ol { display: block; }
  #dfc .dfc-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  #dfc { width: calc(100vw - 16px) !important; padding: 16px 14px; border-radius: 16px; font-size: 16px; }
  #dfc .dfc-grid--2, #dfc .dfc-grid--3 { grid-template-columns: minmax(0, 1fr); }
  #dfc .dfc-stats { grid-template-columns: repeat(2, 1fr); }
  #dfc .dfc-table th, #dfc .dfc-table td { padding: 8px 10px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { #dfc * { scroll-behavior: auto !important; transition: none !important; } }
