/* ===================================================================
   Ulearn Docs — light cream, mostly-professional, owls in dividers
   Tokens come from colors_and_type.css
   =================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand-yellow); color: var(--brand-navy); }

a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.dx-link {
  color: var(--brand-blue);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--brand-blue) 35%, transparent);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.dx-link:hover { border-bottom-color: var(--brand-blue); text-decoration: none; }

/* === TOP NAV === */
.dx-topnav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.dx-topnav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 12px 32px;
}
.dx-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--brand-navy);
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
}
.dx-brand:hover { text-decoration: none; }
.dx-brand-divider { color: var(--ink-4); font-weight: 400; margin: 0 -2px; }
.dx-brand-section { color: var(--ink-3); font-weight: 600; font-size: 17px; }

.dx-topnav-links {
  display: flex; gap: 4px; flex: 1;
  margin-left: 16px;
}
.dx-topnav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-topnav-links a:hover { background: var(--cream-deep); color: var(--ink); }
.dx-topnav-links a.active {
  color: var(--brand-navy);
  background: color-mix(in oklch, var(--brand-yellow) 30%, transparent);
}

.dx-topnav-search {
  position: relative;
  display: flex; align-items: center;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0 12px 0 36px;
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-topnav-search:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand-blue) 15%, transparent);
}
.dx-topnav-search .dx-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-3);
}
.dx-topnav-search input {
  flex: 1; border: 0; background: transparent; outline: 0;
  padding: 9px 0;
  font-family: inherit; font-size: 14px;
  color: var(--ink);
}
.dx-topnav-search input::placeholder { color: var(--ink-4); }
.dx-kbd-hint {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  background: var(--cream-deep); padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.dx-cta {
  background: var(--brand-yellow);
  color: var(--brand-navy);
  font-weight: 700; font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  text-decoration: none;
  border: 1.5px solid var(--brand-navy);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  filter: brightness(1.05);
}

/* === HERO === */
.dx-hero {
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in oklch, var(--brand-yellow) 18%, transparent), transparent 60%),
    radial-gradient(80% 60% at 0% 50%, color-mix(in oklch, var(--brand-orange) 8%, transparent), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 72px 32px 64px;
}
.dx-hero-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 60px;
  align-items: center;
}
.dx-hero-text { min-width: 0; }
.dx-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-blue);
  margin-bottom: 18px;
}
.dx-hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--brand-navy);
  margin: 0 0 22px;
  text-wrap: balance;
}
.dx-hero-accent {
  display: inline;
  background: linear-gradient(110deg, var(--brand-orange-deep), var(--brand-yellow-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.dx-hero-sub {
  font-size: 19px; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 540px;
  text-wrap: pretty;
}

.dx-hero-search {
  position: relative;
  display: flex; align-items: center;
  max-width: 580px;
  background: var(--paper);
  border: 2px solid var(--brand-navy);
  border-radius: 18px;
  padding: 0 18px 0 50px;
  box-shadow: var(--shadow-sticker);
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-hero-search:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 0 var(--brand-navy);
}
.dx-hero-search .dx-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; color: var(--brand-navy);
}
.dx-hero-search input {
  flex: 1; border: 0; background: transparent; outline: 0;
  padding: 18px 0; font-family: inherit; font-size: 16px;
  color: var(--ink); font-weight: 500;
}
.dx-hero-search input::placeholder { color: var(--ink-3); font-weight: 400; }
.dx-hero-search-clear {
  border: 0; background: var(--cream-deep);
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 20px; color: var(--ink-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; line-height: 1;
}
.dx-hero-search-clear:hover { background: var(--rule); color: var(--ink); }

.dx-hero-chips {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
}
.dx-hero-chips::before {
  content: "Popular →";
  font-size: 12px; color: var(--ink-3); font-weight: 600;
  margin-right: 4px;
}
.dx-hero-chip {
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-hero-chip:hover {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
  transform: translateY(-1px);
  text-decoration: none;
}

/* hero owl card art */
.dx-hero-art {
  position: relative;
  height: 380px;
  min-width: 0;
}
.dx-hero-owl-card {
  position: absolute;
  top: 30px; right: 20px;
  width: 280px; height: 280px;
  background: var(--paper);
  border: 2px solid var(--brand-navy);
  border-radius: 28px;
  box-shadow: var(--shadow-sticker);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(2deg);
  overflow: hidden;
}
.dx-hero-owl-card .dx-hero-owl-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 60%, color-mix(in oklch, var(--brand-yellow) 35%, transparent), transparent 65%),
    linear-gradient(180deg, var(--paper) 0%, var(--cream-deep) 100%);
}
.dx-hero-owl-card img {
  position: relative;
  width: 200px; height: 200px;
  filter: drop-shadow(0 8px 16px color-mix(in oklch, var(--brand-navy) 25%, transparent));
}
.dx-hero-mini {
  position: absolute;
  background: var(--paper);
  border: 2px solid var(--brand-navy);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sticker);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.dx-hero-mini img { width: 36px; height: 36px; }
.dx-hero-mini .lbl {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); line-height: 1;
  margin-bottom: 3px;
}
.dx-hero-mini .nm { font-weight: 700; color: var(--brand-navy); line-height: 1; }
.dx-hero-mini--1 {
  top: 10px; left: -10px;
  transform: rotate(-6deg);
}
.dx-hero-mini--2 {
  bottom: 20px; right: -10px;
  transform: rotate(4deg);
}

/* === LAYOUT === */
.dx-layout {
  max-width: 1400px; margin: 0 auto;
  display: grid; gap: 56px;
  padding: 56px 32px 80px;
}
.dx-layout--three-col { grid-template-columns: 240px minmax(0, 1fr) 220px; }
.dx-layout--sidebar   { grid-template-columns: 240px minmax(0, 1fr); }
.dx-layout--linear    { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

/* === SIDEBAR === */
.dx-sidebar {
  align-self: start;
  position: sticky; top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.dx-sidebar-inner { padding: 4px; }
.dx-sidebar-group { margin-bottom: 22px; }
.dx-sidebar-group-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 12px;
  margin-bottom: 6px;
}
.dx-sidebar ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.dx-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--dur-fast) var(--ease-out);
  font-weight: 500;
}
.dx-sidebar a:hover {
  color: var(--brand-navy);
  background: var(--cream-deep);
  text-decoration: none;
}
.dx-sidebar a.is-active {
  color: var(--brand-navy);
  background: color-mix(in oklch, var(--brand-yellow) 22%, transparent);
  font-weight: 600;
}
.dx-sidebar-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--rule-strong);
  flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-sidebar a.is-active .dx-sidebar-dot {
  background: var(--brand-orange);
  width: 7px; height: 7px;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand-orange) 25%, transparent);
}

/* Sidebar style — STICKER */
.dx-sidebar--sticker .dx-sidebar-group {
  background: var(--paper);
  border: 2px solid var(--brand-navy);
  border-radius: var(--r-lg);
  padding: 14px 6px 10px;
  box-shadow: var(--shadow-sticker);
  margin-bottom: 28px;
}
.dx-sidebar--sticker .dx-sidebar-group:nth-child(even) {
  transform: rotate(-0.4deg);
}
.dx-sidebar--sticker .dx-sidebar-group:nth-child(odd) {
  transform: rotate(0.3deg);
}
.dx-sidebar--sticker .dx-sidebar-group-title {
  color: var(--brand-navy);
  padding: 0 8px 6px;
  border-bottom: 1.5px dashed var(--border);
  margin: -4px 4px 8px;
}
.dx-sidebar--sticker a { padding: 6px 8px; font-size: 13.5px; }
.dx-sidebar--sticker a.is-active {
  background: var(--brand-yellow);
  color: var(--brand-navy);
}

/* Sidebar style — MINIMAL */
.dx-sidebar--minimal .dx-sidebar-group-title {
  font-size: 10px; color: var(--ink-4);
  padding: 0 0 4px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.dx-sidebar--minimal .dx-sidebar-group { margin-bottom: 18px; padding: 0 4px; }
.dx-sidebar--minimal a {
  padding: 4px 0 4px 14px;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: 0;
  border-left: 2px solid transparent;
  margin-left: 0;
}
.dx-sidebar--minimal a:hover { background: transparent; color: var(--ink); }
.dx-sidebar--minimal a.is-active {
  background: transparent;
  color: var(--brand-navy);
  border-left-color: var(--brand-orange);
  font-weight: 600;
}
.dx-sidebar--minimal .dx-sidebar-dot { display: none; }

/* === ON THIS PAGE === */
.dx-otp {
  align-self: start;
  position: sticky; top: 80px;
}
.dx-otp-inner { padding: 4px; }
.dx-otp-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
  padding-left: 14px;
}
.dx-otp ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dx-otp a {
  display: block;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  border-left: 2px solid var(--border);
  transition: all var(--dur-fast) var(--ease-out);
  line-height: 1.45;
}
.dx-otp a:hover { color: var(--ink); text-decoration: none; border-left-color: var(--rule-strong); }
.dx-otp a.is-active {
  color: var(--brand-navy); font-weight: 600;
  border-left-color: var(--brand-orange);
}

/* === LINEAR TOC === */
.dx-linear-toc {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  margin-bottom: 56px;
  box-shadow: var(--shadow-xs);
}
.dx-linear-toc-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-blue); margin-bottom: 18px;
}
.dx-linear-toc-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px;
}
.dx-linear-toc-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 10px 4px;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-linear-toc-list a:hover { background: var(--cream-deep); padding-left: 8px; }
.dx-linear-toc-list a.is-active { background: color-mix(in oklch, var(--brand-yellow) 22%, transparent); padding-left: 8px; }
.dx-linear-toc-list .num {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-4); font-weight: 600;
}
.dx-linear-toc-list .ti {
  font-size: 15px; font-weight: 600; color: var(--brand-navy);
}
.dx-linear-toc-list .gp {
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* === MAIN / SECTIONS === */
.dx-main { min-width: 0; }

.dx-section {
  padding-bottom: 64px;
  margin-bottom: 16px;
  scroll-margin-top: 90px;
}
.dx-section:not(:first-child) { padding-top: 32px; }

.dx-section-divider {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 18px;
}
.dx-section-divider img {
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px color-mix(in oklch, var(--brand-navy) 20%, transparent));
}
.dx-section-divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, var(--border) 60%, transparent 100%);
}
.dx-section:first-child .dx-section-divider { display: none; }

.dx-section-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 10px;
}
.dx-section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--brand-navy);
  margin: 0 0 14px;
  text-wrap: balance;
}
.dx-section-subtitle {
  font-size: 18px; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 62ch;
  text-wrap: pretty;
}

.dx-section-body { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.dx-section-body strong { color: var(--ink); font-weight: 700; }
.dx-section-body em { font-style: italic; color: var(--ink); }

/* === SRS owl stage grid (sticker treatment per design system) === */
.dx-srs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 28px 0 32px;
  max-width: 720px;
}
.dx-srs-card {
  background: var(--paper);
  border: 2px solid var(--brand-navy);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--shadow-sticker);
  transition: all var(--dur-base) var(--ease-spring);
  cursor: default;
}
.dx-srs-card:nth-child(1) { transform: rotate(-2deg); }
.dx-srs-card:nth-child(2) { transform: rotate(1deg); }
.dx-srs-card:nth-child(3) { transform: rotate(-1deg); }
.dx-srs-card:nth-child(4) { transform: rotate(1.5deg); }
.dx-srs-card:nth-child(5) { transform: rotate(-1.5deg); }
.dx-srs-card:hover {
  transform: translateY(-3px) rotate(0deg);
  box-shadow: 0 8px 0 0 var(--brand-navy);
}
.dx-srs-card-inner {
  padding: 14px 8px 12px;
  text-align: center;
}
.dx-srs-card img {
  width: 64px; height: 64px;
  display: block; margin: 0 auto 6px;
}
.dx-srs-stage-label {
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 3px;
}
.dx-srs-name {
  font-size: 14px; font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 2px;
}
.dx-srs-interval {
  font-size: 11px; color: var(--ink-3);
  font-family: var(--font-mono);
}

/* === Concept feedback pills (Feynman section) === */
.dx-concept-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 16px 0 20px;
  max-width: 640px;
}
.dx-concept-pill {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 4px solid var(--c);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.dx-concept-pill .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--c);
  margin-top: 6px;
  flex-shrink: 0;
}
.dx-concept-pill .nm {
  font-size: 14px; font-weight: 700; color: var(--ink);
  margin-bottom: 3px;
}
.dx-concept-pill .dc {
  font-size: 13px; color: var(--ink-2); line-height: 1.45;
}

/* === Leaderboard metric cards === */
.dx-metric-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 20px 0 24px;
  max-width: 600px;
}
.dx-metric-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  position: relative;
}
.dx-metric-card::before {
  content: ""; position: absolute;
  top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-yellow);
}
.dx-metric-name { font-size: 14px; font-weight: 700; color: var(--brand-navy); margin-bottom: 4px; }
.dx-metric-desc { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* === FAQ === */
.dx-faq {
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.dx-faq-item {
  border-bottom: 1px solid var(--border);
}
.dx-faq-q {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  background: transparent; border: 0;
  padding: 20px 4px;
  font-family: inherit; font-size: 17px; font-weight: 600;
  color: var(--brand-navy);
  text-align: left;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-faq-q:hover { color: var(--brand-orange-deep); }
.dx-faq-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-deep);
  border-radius: 50%;
  color: var(--brand-navy);
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-spring);
}
.dx-faq-icon svg { width: 16px; height: 16px; }
.dx-faq-item.is-open .dx-faq-icon {
  transform: rotate(180deg);
  background: var(--brand-yellow);
}
.dx-faq-q-text { flex: 1; text-wrap: balance; }
.dx-faq-a {
  padding: 0 4px 24px 50px;
  font-size: 16px; line-height: 1.6; color: var(--ink-2);
  max-width: 68ch;
  animation: dx-faq-in var(--dur-base) var(--ease-out);
}
@keyframes dx-faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dx-faq-a p:first-child { margin-top: 0; }
.dx-faq-a p:last-child  { margin-bottom: 0; }

/* === NEXT/PREV === */
.dx-nextprev {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 32px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.dx-nextprev-btn {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.dx-nextprev-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-navy);
}
.dx-nextprev-next { text-align: right; }
.dx-nextprev-btn .lbl {
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.dx-nextprev-btn .ti {
  font-size: 16px; font-weight: 700;
  color: var(--brand-navy);
}

/* === EMPTY RESULTS === */
.dx-empty {
  text-align: center; padding: 64px 32px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 480px; margin: 0 auto;
}
.dx-empty img { width: 80px; height: 80px; opacity: 0.7; }
.dx-empty h3 { font-size: 20px; font-weight: 700; color: var(--brand-navy); margin: 16px 0 8px; }
.dx-empty p { font-size: 15px; color: var(--ink-3); margin: 0 0 20px; }
.dx-empty button {
  background: var(--brand-yellow); color: var(--brand-navy);
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border: 1.5px solid var(--brand-navy);
  border-radius: var(--r-pill); cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* === FOOTER === */
.dx-footer {
  background: var(--bg-sunk);
  border-top: 1px solid var(--border);
  padding: 60px 32px 28px;
  margin-top: 40px;
}
.dx-footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 3fr; gap: 60px;
}
.dx-footer-brand { display: flex; align-items: center; gap: 14px; }
.dx-footer-name { font-size: 20px; font-weight: 800; color: var(--brand-navy); letter-spacing: -0.02em; }
.dx-footer-tag { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.dx-footer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.dx-footer-h {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.dx-footer-cols a {
  display: block; padding: 4px 0;
  font-size: 14px; color: var(--ink-2);
  text-decoration: none;
}
.dx-footer-cols a:hover { color: var(--brand-navy); text-decoration: none; }
.dx-footer-bot {
  max-width: 1400px; margin: 40px auto 0;
  padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .dx-layout--three-col { grid-template-columns: 220px minmax(0, 1fr); }
  .dx-otp { display: none; }
}
@media (max-width: 900px) {
  .dx-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .dx-hero-art { height: 280px; }
  .dx-layout--three-col, .dx-layout--sidebar { grid-template-columns: minmax(0, 1fr); }
  .dx-sidebar { display: none; }
  .dx-topnav-links { display: none; }
  .dx-topnav-search { width: 200px; }
  .dx-linear-toc-list { grid-template-columns: 1fr; }
  .dx-srs-grid { grid-template-columns: repeat(2, 1fr); }
  .dx-concept-grid, .dx-metric-grid { grid-template-columns: 1fr; }
  .dx-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .dx-footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .dx-hero { padding: 48px 22px 40px; }
  .dx-layout { padding: 36px 22px 60px; }
  .dx-topnav-inner { padding: 12px 22px; gap: 16px; }
  .dx-kbd-hint { display: none; }
  .dx-nextprev { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
