/* DE10-Nano From Scratch - public site
   Tokens from the Claude Design file (dark first, light via [data-theme=light]). */

/* ---------------------------------------------------------------- tokens */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0E17;
  --surface: #111725;
  --surface-2: #161E2F;
  --surface-soon: #0D121D;
  --border: #222B3E;
  --border-strong: #344059;
  --text: #E7EBF3;
  --muted: #97A2B9;
  --nav-bg: rgba(10, 14, 23, 0.82);
  --dot: rgba(148, 163, 184, 0.16);
  --trace: rgba(34, 211, 238, 0.10);
  --on-ac: #071018;

  --cyan: #22D3EE;   --cyan-soft: #22D3EE1A;   --cyan-line: #22D3EE55;
  --violet: #A78BFA; --violet-soft: #A78BFA1A; --violet-line: #A78BFA55;
  --amber: #FBBF24;  --amber-soft: #FBBF241A;  --amber-line: #FBBF2455;
  --green: #4ADE80;  --green-soft: #4ADE801A;  --green-line: #4ADE8055;
  --pink: #F472B6;   --pink-soft: #F472B61A;   --pink-line: #F472B655;
  --blue: #60A5FA;   --blue-soft: #60A5FA1A;   --blue-line: #60A5FA55;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --surface-2: #F1F3F8;
  --surface-soon: #F2F4F8;
  --border: #E1E5ED;
  --border-strong: #C7CEDB;
  --text: #0E1422;
  --muted: #566176;
  --nav-bg: rgba(247, 248, 251, 0.85);
  --dot: rgba(71, 85, 105, 0.16);
  --trace: rgba(14, 116, 144, 0.12);
  --on-ac: #FFFFFF;

  --cyan: #0E7490;   --cyan-soft: #0E749014;   --cyan-line: #0E749040;
  --violet: #6D28D9; --violet-soft: #6D28D914; --violet-line: #6D28D940;
  --amber: #B45309;  --amber-soft: #B4530914;  --amber-line: #B4530940;
  --green: #15803D;  --green-soft: #15803D14;  --green-line: #15803D40;
  --pink: #BE185D;   --pink-soft: #BE185D14;   --pink-line: #BE185D40;
  --blue: #1D4ED8;   --blue-soft: #1D4ED814;   --blue-line: #1D4ED840;
}

:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pad-x: 40px;
  --header-h: 64px;
  --filter-h: 69px;
}

/* part accents: any element with .ac-<name> gets --ac / --ac-soft / --ac-line */
.ac-cyan   { --ac: var(--cyan);   --ac-soft: var(--cyan-soft);   --ac-line: var(--cyan-line); }
.ac-violet { --ac: var(--violet); --ac-soft: var(--violet-soft); --ac-line: var(--violet-line); }
.ac-amber  { --ac: var(--amber);  --ac-soft: var(--amber-soft);  --ac-line: var(--amber-line); }
.ac-green  { --ac: var(--green);  --ac-soft: var(--green-soft);  --ac-line: var(--green-line); }
.ac-pink   { --ac: var(--pink);   --ac-soft: var(--pink-soft);   --ac-line: var(--pink-line); }
.ac-blue   { --ac: var(--blue);   --ac-soft: var(--blue-soft);   --ac-line: var(--blue-line); }

/* ----------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--filter-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(var(--pad-x), env(safe-area-inset-left)); padding-right: max(var(--pad-x), env(safe-area-inset-right)); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--cyan); color: var(--on-ac); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); }
.brand-mark {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--cyan-soft); color: var(--cyan); border: 1px solid var(--cyan-line);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name span { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 14px; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .15s ease;
}
.icon-btn:hover { border-color: var(--border-strong); }
.theme-toggle { margin-left: 8px; }
.icon-moon, [data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
.menu-btn { display: none; }
.menu-btn .icon-close, .menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
.mobile-menu { border-top: 1px solid var(--border); }
.mobile-menu ul { list-style: none; margin: 0 auto; padding: 8px max(var(--pad-x), env(safe-area-inset-left)) 16px; max-width: 1200px; display: flex; flex-direction: column; }
.mobile-menu a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px; color: var(--text); text-decoration: none; font-size: 16px; border-bottom: 1px solid var(--border); }
.mobile-menu li:last-child a { border-bottom: 0; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}
.hero-traces { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--trace); }
.hero-grid {
  position: relative; display: grid; align-items: center; gap: 56px;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  padding-top: 96px; padding-bottom: 104px;
}
.hero-grid.no-diagram { grid-template-columns: minmax(0, 1fr); }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.pill {
  align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 3.6vw + 24px, 76px); line-height: 1.02; letter-spacing: -0.035em;
  overflow-wrap: break-word;
}
.lead { margin: 0; max-width: 560px; color: var(--muted); font-size: clamp(16px, 0.35vw + 14.6px, 19px); line-height: 1.55; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--muted); }
.stats strong { font-family: var(--font-mono); font-weight: 600; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none;
  transition: filter .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--cyan); color: var(--on-ac); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { padding: 0 20px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.btn-secondary:hover { border-color: var(--muted); }

/* block diagram */
.diagram {
  margin: 0; min-width: 0; padding: 22px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 12px;
}
.dg-box, .dg-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dg-box { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ac-line); background: var(--ac-soft); }
.dg-sq { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--ac); }
.dg-name { color: var(--text); font-weight: 600; white-space: nowrap; }
.dg-meta { margin-left: auto; color: var(--muted); text-align: right; min-width: 0; }
.dg-wire { display: flex; justify-content: center; }
.dg-wire span { width: 2px; height: 18px; background: var(--border-strong); }
.dg-soc { position: relative; display: flex; flex-direction: column; padding: 26px 14px 14px; border: 1px dashed var(--border-strong); border-radius: 14px; }
.dg-soc-label { position: absolute; top: -9px; left: 14px; padding: 0 8px; background: var(--surface); color: var(--muted); font-size: 11px; letter-spacing: 0.06em; }
.dg-fpga { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ac-line); background: var(--ac-soft); }
.dg-ips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dg-ips span { text-align: center; padding: 6px 0; border-radius: 6px; border: 1px solid var(--ac-line); color: var(--ac); }
.dg-bridge { display: flex; align-items: center; gap: 10px; padding: 4px 0 4px 50%; }
.dg-bridge-line { flex: none; width: 2px; height: 30px; margin-left: -1px; background: var(--border-strong); }
.dg-bridge-text { color: var(--muted); }
.dg-bridge-text span { color: var(--text); }
.dg-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: center; }

/* -------------------------------------------------------------- sections */
.section { padding-top: clamp(56px, 4vw + 32px, 80px); padding-bottom: clamp(56px, 4vw + 32px, 80px); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--cyan); }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 0.8vw + 20px, 32px); letter-spacing: -0.02em; line-height: 1.2; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.tile-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac); }
.tile h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.3; }
.tile p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* -------------------------------------------------------- episode browser */
.episodes { border-top: 1px solid var(--border); }
.filterbar {
  position: sticky; top: var(--header-h); z-index: 20;
  background: var(--nav-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.filterbar-inner { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.chips {
  flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 2px 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.chip:last-child { margin-right: 24px; }
.chip:hover { border-color: var(--ac, var(--border-strong)); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); }
.chip-count { font-family: var(--font-mono); font-size: 11px; opacity: 0.8; }
.chip[aria-pressed="true"] { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }
.chip[aria-pressed="true"] .chip-dot { background: var(--on-ac); }
.chip-all { --ac: var(--text); }
.chip-all[aria-pressed="true"] { color: var(--bg); }
.chip-all[aria-pressed="true"] .chip-dot { background: var(--bg); }
.search { position: relative; flex: 0 0 280px; display: flex; align-items: center; }
.search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-sans); font-size: 14px; outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.search:focus-within .icon { color: var(--cyan); }

.episode-list { display: flex; flex-direction: column; gap: 64px; padding-top: 48px; padding-bottom: 96px; }
.no-results { padding: 48px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--muted); }
.part { position: relative; padding-left: 44px; }
.part-rail { position: absolute; left: 11px; top: 14px; bottom: -64px; width: 2px; background: linear-gradient(var(--ac), transparent); }
.part-node { position: absolute; left: 4px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ac); box-shadow: 0 0 0 4px var(--ac-soft); }
.part-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 20px; }
.part-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ac); }
.part-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.card {
  min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card.is-available:hover, .card.is-available:focus-within { transform: translateY(-4px); border-color: var(--ac); }
.card.is-soon { background: var(--surface-soon); border-style: dashed; }
.card:target { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.card-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; }
.ep-code { color: var(--ac); font-weight: 600; letter-spacing: 0.04em; }
.ep-dur { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.card-title { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 1.3; font-weight: 600; overflow-wrap: break-word; }
.learn { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.learn li { display: flex; gap: 9px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.learn li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 8px; border-radius: 50%; background: var(--ac); }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.file {
  max-width: 100%; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text); overflow-wrap: anywhere;
}
.file.is-empty { color: var(--muted); }
.card-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.btn-watch {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--ac); background: var(--ac); color: var(--on-ac);
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: filter .15s ease;
}
a.btn-watch:hover { filter: brightness(1.08); }
button.btn-watch:disabled { border-color: var(--border); background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.link-udemy { padding: 8px 2px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-udemy:hover { color: var(--text); }
.badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px;
  background: var(--ac-soft); color: var(--ac); font-family: var(--font-mono); font-size: 11px; font-weight: 500; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-soon .badge { background: var(--surface-2); color: var(--muted); }
.is-soon .badge::before { background: var(--border-strong); }

/* --------------------------------------------------------------- hardware */
.hardware { border-top: 1px solid var(--border); }
.hw-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.hw { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; min-width: 0; }
.hw-check { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.hw-check .icon { stroke-width: 3; }
.hw-name { min-width: 0; overflow-wrap: break-word; }
.hw-tag { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap; }
.hw.is-optional { border-style: dashed; background: transparent; }
.hw.is-optional .hw-check { background: transparent; color: var(--muted); border-color: var(--border-strong); }

/* ----------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding-top: 40px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); }
.footer-note { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-left: auto; font-size: 14px; }
.footer-nav a { padding: 10px 8px; color: var(--text); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.copyright { flex-basis: 100%; margin: 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.copyright a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.copyright a:hover { text-decoration-color: currentColor; }

.preview-banner {
  position: fixed; left: 50%; bottom: 16px; z-index: 50; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; background: var(--amber); color: #111;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------------ responsive */
/* large tablets / small laptops: hero stacks */
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 64px; padding-bottom: 72px; }
  .diagram { max-width: 560px; }
}

/* tablets: nav collapses into the menu button, search drops under the chips */
@media (max-width: 860px) {
  :root { --filter-h: 118px; }
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
  .menu-btn { display: grid; }
  .filterbar-inner { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .chips { flex-basis: 100%; }
  .search { flex: 1 1 100%; }
}

/* phones */
@media (max-width: 720px) {
  :root { --pad-x: 20px; }
  .topbar-inner { gap: 12px; }
  .hero-grid { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .hero-copy { gap: 20px; }
  .episode-list { gap: 48px; padding-top: 32px; padding-bottom: 64px; }
  .part { padding-left: 0; }
  .part-rail, .part-node { display: none; }
  .footer-nav { margin-left: 0; }
}

@media (max-width: 480px) {
  .topbar-inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 15px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .diagram { padding: 16px; font-size: 11px; }
  .dg-box, .dg-fpga { padding: 10px 12px; }
  .dg-bridge { padding-left: 30%; }
  .card { padding: 18px; }
}

/* very small phones (320 px) */
@media (max-width: 360px) {
  :root { --pad-x: 14px; }
  .brand-name span { display: none; }
  .dg-meta { display: none; }
  .btn { padding: 0 16px; }
}

/* touch screens: bigger targets */
@media (pointer: coarse) {
  .chip { height: 40px; }
  .btn-watch { height: 44px; }
  .link-udemy { padding: 12px 4px; }
  .search input { height: 44px; font-size: 16px; } /* 16px avoids zoom on iOS */
}

/* wide screens: a little more air */
@media (min-width: 1600px) {
  .wrap { max-width: 1320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .card.is-available:hover, .card.is-available:focus-within { transform: none; }
}

@media print {
  .topbar, .filterbar, .hero-traces, .hero-dots, .skip-link { display: none !important; }
  .card { break-inside: avoid; }
}
