/* d/Python MkDocs Material theme
   Overrides the built-in "slate" scheme for the d/Python developer site:
   - Background: #0a0a0f
   - Accent: #f59e0b (amber)
   - Fonts: Inter + JetBrains Mono
   ================================================ */

/* ── Override slate scheme variables ── */

[data-md-color-scheme="slate"] {
  /* Core backgrounds */
  --md-default-bg-color: #0a0a0f;
  --md-default-fg-color: #e4e4ed;
  --md-default-fg-color--light: #8888a0;
  --md-default-fg-color--lighter: #55556a;
  --md-default-fg-color--lightest: rgba(255, 255, 255, 0.06);

  /* Primary (header, tabs) */
  --md-primary-fg-color: #0e0e16;
  --md-primary-bg-color: #e4e4ed;
  --md-primary-fg-color--light: #12121a;
  --md-primary-fg-color--dark: #0a0a0f;

  /* Accent (links, highlights) */
  --md-accent-fg-color: #f59e0b;
  --md-accent-fg-color--transparent: rgba(245, 158, 11, 0.15);
  --md-accent-bg-color: #0a0a0f;
  --md-accent-bg-color--light: rgba(245, 158, 11, 0.15);

  /* Code — Material Palenight colors */
  --md-code-bg-color: #12121a;
  --md-code-fg-color: #e4e4ed;
  --md-code-hl-color: rgba(245, 158, 11, 0.15);
  --md-code-hl-number-color: #f78c6c;
  --md-code-hl-special-color: #89ddff;
  --md-code-hl-function-color: #82aaff;
  --md-code-hl-constant-color: #f78c6c;
  --md-code-hl-keyword-color: #c792ea;
  --md-code-hl-string-color: #c3e88d;
  --md-code-hl-name-color: #f07178;
  --md-code-hl-operator-color: #89ddff;
  --md-code-hl-punctuation-color: #89ddff;
  --md-code-hl-comment-color: #55556a;
  --md-code-hl-generic-color: #fbbf24;
  --md-code-hl-variable-color: #f07178;

  /* Typeset */
  --md-typeset-color: #e4e4ed;
  --md-typeset-a-color: #f59e0b;

  /* Admonitions */
  --md-admonition-bg-color: #16161f;

  /* Footer */
  --md-footer-bg-color: #0a0a0f;
  --md-footer-bg-color--dark: #0a0a0f;
  --md-footer-fg-color: #8888a0;
  --md-footer-fg-color--light: #55556a;
  --md-footer-fg-color--lighter: rgba(255, 255, 255, 0.06);

  /* Shadow — subtle for dark theme */
  --md-shadow-z1: 0 2px 8px rgba(0, 0, 0, 0.4);
  --md-shadow-z2: 0 8px 24px rgba(0, 0, 0, 0.5);
  --md-shadow-z3: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* ── Header bar — frosted glass effect ── */

[data-md-color-scheme="slate"] .md-header {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

/* ── Tabs bar ── */

[data-md-color-scheme="slate"] .md-tabs {
  background: rgba(14, 14, 22, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-tabs__link {
  color: #8888a0;
  opacity: 1;
}

[data-md-color-scheme="slate"] .md-tabs__link--active,
[data-md-color-scheme="slate"] .md-tabs__link:hover {
  color: #f59e0b;
}

/* ── Sidebar navigation ── */

[data-md-color-scheme="slate"] .md-sidebar {
  background: #0e0e16;
}

[data-md-color-scheme="slate"] .md-sidebar--primary {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-sidebar--secondary {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-nav__link {
  color: #8888a0;
}

[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: #fbbf24;
}

[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__item--active > .md-nav__link {
  color: #f59e0b;
  font-weight: 600;
}

/* ── Search ── */

[data-md-color-scheme="slate"] .md-search__input {
  background: #16161f;
  color: #e4e4ed;
}

[data-md-color-scheme="slate"] .md-search__input::placeholder {
  color: #55556a;
}

[data-md-color-scheme="slate"] .md-search-result__meta {
  background: #12121a;
  color: #8888a0;
}

[data-md-color-scheme="slate"] .md-search-result__item {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-search-result mark {
  background: rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

/* ── Typography ── */

[data-md-color-scheme="slate"] .md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e4e4ed, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-md-color-scheme="slate"] .md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.4em;
}

[data-md-color-scheme="slate"] .md-typeset h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fbbf24;
}

[data-md-color-scheme="slate"] .md-typeset a {
  color: #f59e0b;
}

[data-md-color-scheme="slate"] .md-typeset a:hover {
  color: #fbbf24;
}

/* ── Tables ── */

[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  background: #16161f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: #12121a;
  color: #f59e0b;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background: #1c1c28;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

/* ── Inline code ── */

[data-md-color-scheme="slate"] .md-typeset code {
  background: #16161f;
  color: #fbbf24;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

/* ── Code blocks ── */

[data-md-color-scheme="slate"] .md-typeset pre {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

[data-md-color-scheme="slate"] .md-typeset pre > code {
  border: none;
  background: #12121a;
  color: #e4e4ed;
  padding: 1em 1.2em;
}

/* Copy button */
[data-md-color-scheme="slate"] .md-clipboard {
  color: #55556a;
}

[data-md-color-scheme="slate"] .md-clipboard:hover {
  color: #f59e0b;
}

/* ── Blockquotes ── */

[data-md-color-scheme="slate"] .md-typeset blockquote {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 0 8px 8px 0;
  padding: 0.8em 1.2em;
}

/* ── Admonitions — match brand accent colors ── */

[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background: #16161f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: none;
}

[data-md-color-scheme="slate"] .md-typeset .admonition-title,
[data-md-color-scheme="slate"] .md-typeset summary {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.info,
[data-md-color-scheme="slate"] .md-typeset .admonition.note {
  border-left: 3px solid #60a5fa;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip,
[data-md-color-scheme="slate"] .md-typeset .admonition.success {
  border-left: 3px solid #4ade80;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.warning {
  border-left: 3px solid #fbbf24;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.danger,
[data-md-color-scheme="slate"] .md-typeset .admonition.failure {
  border-left: 3px solid #f87171;
}

/* ── Footer ── */

[data-md-color-scheme="slate"] .md-footer {
  background: #0a0a0f;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Back-to-top button ── */

[data-md-color-scheme="slate"] .md-top {
  background: #16161f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #8888a0;
}

[data-md-color-scheme="slate"] .md-top:hover {
  background: #f59e0b;
  color: #0a0a0f;
  border-color: #f59e0b;
}

/* ── Selection ── */

[data-md-color-scheme="slate"] ::selection {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* ── Scrollbar ── */

[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-track {
  background: transparent;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: #1c1c28;
  border-radius: 3px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

/* ── HR ── */

[data-md-color-scheme="slate"] .md-typeset hr {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── Definition lists ── */

[data-md-color-scheme="slate"] .md-typeset dt {
  font-weight: 600;
  color: #fbbf24;
}

[data-md-color-scheme="slate"] .md-typeset dd {
  color: #8888a0;
}

/* ── Logo in header ── */

.md-header__button.md-logo img {
  height: 1.6rem;
  width: auto;
}

/* ── Reference navigation ── */

/* The original site was one page per tab. d/Python is a real book now, so its
   chapter navigation stays visible in Material's normal primary rail. */
.md-sidebar--primary {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── d/Python reference components ── */

.dpython-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 2rem;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(145deg, #16161f 0%, #0e0e16 72%);
}

.dpython-hero::after {
  content: ">_";
  position: absolute;
  right: 1.4rem;
  bottom: -0.45rem;
  color: rgba(245, 158, 11, 0.09);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(4.5rem, 13vw, 9rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.dpython-kicker {
  margin: 0 0 0.55rem;
  color: #f59e0b;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dpython-entry-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: -0.8rem 0 2.2rem;
}

.dpython-entry-points a {
  display: flex;
  flex-direction: column;
  min-height: 6.4rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), rgba(22, 22, 31, 0.8));
  color: var(--md-default-fg-color) !important;
  text-decoration: none;
}

.dpython-entry-points a:hover,
.dpython-entry-points a:focus-visible {
  border-color: #f59e0b;
}

.dpython-entry-points strong {
  color: #fbbf24;
}

.dpython-entry-points span {
  margin-top: 0.35rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 44rem) {
  .dpython-entry-points {
    grid-template-columns: 1fr;
  }
}

.dpython-hero h1 {
  max-width: 15ch;
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 5vw, 3.65rem);
  line-height: 1.02;
}

.dpython-hero p:not(.dpython-kicker) {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin-bottom: 0;
  color: var(--md-default-fg-color--light);
  font-size: 1.05rem;
}

.dpython-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 2rem;
}

.dpython-card {
  display: block;
  min-height: 8.4rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 13px;
  background: var(--md-admonition-bg-color);
  color: var(--md-default-fg-color) !important;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.dpython-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.55);
  background: color-mix(in srgb, var(--md-admonition-bg-color) 90%, #f59e0b 10%);
}

.dpython-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fbbf24;
  font-size: 1rem;
}

.dpython-card span {
  color: var(--md-default-fg-color--light);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dpython-pipeline {
  margin: 1.1rem 0 1.7rem;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  background: #12121a;
  color: #e4e4ed;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

.dpython-new {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.13);
  color: #4ade80;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: 0.12rem;
}

/* Every d/Python sample travels to the WebAssembly playground as a URL-fragment
   payload. The source never enters the HTTP request, and the copy control keeps
   its usual rightmost position. */
.md-typeset .language-python.highlight {
  position: relative;
}

/* The pill and the copy button live in a band ABOVE the first code line, so
   they can never cover the end of a one-line sample, however long it is. */
.md-typeset .language-python.highlight pre > code {
  padding-top: 2.5rem;
}

.md-typeset .dpython-playground-link {
  position: absolute;
  z-index: 2;
  top: 0.42rem;
  right: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.7rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: color-mix(in srgb, var(--md-code-bg-color) 88%, #f59e0b 12%);
  color: #fbbf24 !important;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1;
  text-transform: uppercase;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.md-typeset .dpython-playground-link:hover,
.md-typeset .dpython-playground-link:focus-visible {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #0a0a0f !important;
}

.md-typeset .dpython-playground-link__mark {
  font-size: 0.68rem;
}

@media screen and (max-width: 35em) {
  .md-typeset .dpython-playground-link {
    right: 3.1rem;
    min-height: 2.2rem;
    padding-inline: 0.55rem;
  }

  .md-typeset .dpython-playground-link__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media screen and (max-width: 76.234375em) {
  .dpython-hero::after {
    opacity: 0.7;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Landing page (template: home.html)
   The hero is rendered by overrides/home.html directly under the tabs;
   the page's markdown follows in one wide column. Colors below are
   written for both schemes: slate first, then the light overrides.
   ══════════════════════════════════════════════════════════════════════ */

.dpython-hero-band {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(245, 158, 11, 0.22), transparent 60%),
    radial-gradient(40rem 24rem at 0% 110%, rgba(139, 92, 246, 0.14), transparent 60%),
    linear-gradient(180deg, #12121a 0%, #0a0a0f 100%);
}

[data-md-color-scheme="default"] .dpython-hero-band {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(245, 158, 11, 0.28), transparent 60%),
    radial-gradient(40rem 24rem at 0% 110%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(180deg, #fffaf0 0%, #fdf6e3 100%);
}

.dpython-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2.2rem, 6vw, 4.5rem) 1.2rem clamp(2rem, 5vw, 3.5rem);
}

.dpython-hero-copy .dpython-kicker {
  margin-bottom: 0.9rem;
}

.dpython-hero-band h1 {
  margin: 0 0 1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #e4e4ed;
}

[data-md-color-scheme="default"] .dpython-hero-band h1 {
  color: #1a1a24;
}

.dpython-hero-lede {
  max-width: 34rem;
  margin: 0 0 1.4rem;
  color: #a7a7bb;
  font-size: 1.05rem;
  line-height: 1.55;
}

[data-md-color-scheme="default"] .dpython-hero-lede {
  color: #4a4a5c;
}

.dpython-hero-lede code {
  padding: 0.05em 0.35em;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
}

[data-md-color-scheme="default"] .dpython-hero-lede code {
  color: #9a5b00;
}

.dpython-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
}

.dpython-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24 !important;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  text-decoration: none !important;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.dpython-btn:hover,
.dpython-btn:focus-visible {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
  transform: translateY(-1px);
}

.dpython-btn--primary {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0a0a0f !important;
}

.dpython-btn--primary:hover,
.dpython-btn--primary:focus-visible {
  background: #fbbf24;
  border-color: #fbbf24;
}

.dpython-btn--ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #e4e4ed !important;
}

[data-md-color-scheme="default"] .dpython-btn {
  color: #9a5b00 !important;
}

[data-md-color-scheme="default"] .dpython-btn--primary {
  color: #0a0a0f !important;
}

[data-md-color-scheme="default"] .dpython-btn--ghost {
  border-color: rgba(0, 0, 0, 0.16);
  color: #1a1a24 !important;
}

.dpython-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #8888a0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dpython-hero-facts li::before {
  content: "■ " / "";
  color: #f59e0b;
}

/* The terminal card: a 1978 listing and its output, both real. */

.dpython-terminal {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 16px;
  background: #0b0b12;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  font-family: "JetBrains Mono", monospace;
}

[data-md-color-scheme="default"] .dpython-terminal {
  box-shadow: 0 24px 60px rgba(60, 40, 0, 0.18);
}

.dpython-terminal figcaption {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #12121a;
  color: #8888a0;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dpython-terminal-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0.6rem rgba(74, 222, 128, 0.7);
}

.dpython-terminal pre {
  margin: 0;
  padding: 0.8rem 0.95rem;
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 1.4;
}

.dpython-terminal pre code {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  white-space: pre;
}

.dpython-terminal-src {
  color: #c3e88d;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25);
}

.dpython-terminal-src code {
  color: #c3e88d;
}

.dpython-terminal-out {
  min-height: 9.5rem;
  padding-bottom: 2.6rem;
  color: #fbbf24;
  font-size: 0.7rem;
  line-height: 1.35;
}

.dpython-terminal-out code {
  color: #fbbf24;
  animation: dpython-reveal 2.4s steps(12, end) both;
}

@keyframes dpython-reveal {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .dpython-terminal-out code { animation: none; }
}

.dpython-terminal-run {
  position: absolute;
  right: 0.8rem;
  bottom: 0.75rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.85);
  color: #fbbf24 !important;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  backdrop-filter: blur(6px);
}

.dpython-terminal-run:hover,
.dpython-terminal-run:focus-visible {
  background: #f59e0b;
  color: #0a0a0f !important;
}

.dpython-hero-copy,
.dpython-terminal {
  min-width: 0;
}

.dpython-terminal pre {
  overflow-x: auto;
}

@media (max-width: 60rem) {
  .dpython-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .dpython-terminal-out {
    min-height: 0;
    max-height: 7.5rem;
    padding-bottom: 0.8rem;
  }

  .dpython-terminal-run {
    position: static;
    display: inline-block;
    margin: 0 0.9rem 0.8rem;
  }
}

/* The landing column */

.dpython-landing .md-content__inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.6rem 1.2rem 2.5rem;
}

.dpython-landing .md-content__inner::before {
  display: none;
}

.dpython-landing h2 {
  margin-top: 2.6rem;
  font-size: 1.7rem;
}

.dpython-band {
  margin: 1.6rem 0 1.4rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-left: 4px solid #f59e0b;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(22, 22, 31, 0.6));
}

[data-md-color-scheme="default"] .dpython-band {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(255, 250, 240, 0.9));
}

.dpython-band > p:last-child {
  margin-bottom: 0;
}

.dpython-band .dpython-kicker {
  margin-bottom: 0.35rem;
}

.dpython-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0 1rem;
}

.dpython-stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 13px;
  background: var(--md-admonition-bg-color);
}

.dpython-stats strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fbbf24;
}

[data-md-color-scheme="default"] .dpython-stats strong {
  color: #b45309;
}

.dpython-stats .dpython-stats-of {
  font-size: 1rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}

.dpython-stats span {
  color: var(--md-default-fg-color--light);
  font-size: 0.8rem;
  line-height: 1.4;
}

.dpython-stats span code {
  font-size: 0.75rem;
}

@media (max-width: 60rem) {
  .dpython-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dpython-doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  gap: 0.9rem;
  margin: 1rem 0 1.6rem;
}

.dpython-door {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.15rem 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-admonition-bg-color);
  color: var(--md-default-fg-color) !important;
  text-decoration: none !important;
  transition: border-color 150ms ease, transform 150ms ease;
}

.dpython-door:hover,
.dpython-door:focus-visible {
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
}

.dpython-door strong {
  font-size: 1.02rem;
  line-height: 1.3;
  color: #fbbf24;
}

[data-md-color-scheme="default"] .dpython-door strong {
  color: #b45309;
}

.dpython-door span {
  flex: 1;
  color: var(--md-default-fg-color--light);
  font-size: 0.84rem;
  line-height: 1.5;
}

.dpython-door em {
  font-style: normal;
  font-weight: 600;
  font-size: 0.82rem;
  color: #f59e0b;
}

@media (max-width: 60rem) {
  .dpython-doors {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dpython-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.4rem;
  margin: 0.8rem 0 1rem;
}

.dpython-principles > div {
  min-width: 0;
  padding: 0.2rem 0 0.4rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.dpython-principles h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.05rem;
}

.dpython-principles p {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
}

.dpython-principles pre {
  margin: 0.5rem 0 0;
}

.dpython-principles pre > code {
  font-size: 0.72rem;
  padding-top: 0.7em;
  padding-bottom: 0.7em;
}

@media (max-width: 50rem) {
  .dpython-principles {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dpython-timeline ul {
  margin: 0.8rem 0 0.6rem;
  padding: 0;
  list-style: none;
}

.dpython-timeline li {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0 0 0 1.6rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
}

.dpython-timeline li::before {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.dpython-timeline li::after {
  content: "";
  position: absolute;
  left: 0.56rem;
  top: 1.2rem;
  bottom: -0.8rem;
  width: 1px;
  background: rgba(245, 158, 11, 0.25);
}

.dpython-timeline li:last-child::after {
  display: none;
}

.dpython-timeline strong {
  color: var(--md-default-fg-color);
}

.dpython-status .md-typeset__scrollwrap,
.dpython-status .md-typeset__table,
.dpython-status table:not([class]) {
  width: 100%;
  margin-top: 0.8rem;
  margin-bottom: 1rem;
}

.dpython-status .md-typeset__table {
  display: block;
}

.dpython-status table:not([class]) td:first-child {
  width: 58%;
}

.dpython-chapters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 1.6rem;
  margin: 0.8rem 0 1rem;
}

.dpython-landing .dpython-chapters h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--md-default-fg-color);
}

.dpython-chapters ol {
  margin: 0.3rem 0 0;
  padding-left: 1.6rem;
  font-size: 0.86rem;
  line-height: 1.7;
}

.dpython-chapters p {
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
}

.dpython-chapters ol li::marker {
  color: #f59e0b;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
}

@media (max-width: 50rem) {
  .dpython-chapters {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dpython-final {
  margin: 2.4rem 0 0;
  padding: 1.6rem 1.4rem 0.6rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(145deg, var(--md-admonition-bg-color) 0%, var(--md-default-bg-color) 72%);
}

.dpython-final h3 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.dpython-final .dpython-entry-points {
  margin-top: 0;
}

/* Light scheme parity for the components that predate this pass. */

[data-md-color-scheme="default"] .dpython-pipeline {
  background: #fdf6e3;
  color: #1a1a24;
}

[data-md-color-scheme="default"] .dpython-kicker {
  color: #b45309;
}

[data-md-color-scheme="default"] .dpython-entry-points strong,
[data-md-color-scheme="default"] .dpython-card strong {
  color: #b45309;
}

[data-md-color-scheme="default"] .dpython-entry-points a {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.9));
  border-color: rgba(245, 158, 11, 0.45);
}

[data-md-color-scheme="default"] .dpython-door em {
  color: #b45309;
}

[data-md-color-scheme="default"] .dpython-hero-facts {
  color: #5f5f74;
}

/* One visible focus ring for every custom control; hover keeps its own look. */
.dpython-btn:focus-visible,
.dpython-door:focus-visible,
.dpython-card:focus-visible,
.dpython-terminal-run:focus-visible,
.dpython-terminal-src:focus-visible,
.dpython-entry-points a:focus-visible,
.md-typeset .dpython-playground-link:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}

[data-md-color-scheme="default"] .dpython-btn:focus-visible,
[data-md-color-scheme="default"] .dpython-door:focus-visible,
[data-md-color-scheme="default"] .dpython-card:focus-visible,
[data-md-color-scheme="default"] .dpython-entry-points a:focus-visible {
  outline-color: #b45309;
}

.dpython-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
