/* CSS / LAB · La exposición demuestra su propio contenido. */
/* 01. Tokens, reset y elementos base */
:root {
  color-scheme: dark;
  --bg: #141613;
  --surface: #1b1e19;
  --surface-raised: #23271f;
  --line: #353b30;
  --text: #f0f1e9;
  --muted: #afb4a5;
  --accent: #c5f568;
  --accent-rgb: 197, 245, 104;
  --purple: #bca7ff;
  --orange: #f7ad79;
  --mint: #78dcca;
  --sidebar: 246px;
  --radius: 16px;
  --mono: "Cascadia Code", "Consolas", monospace;
  --font: "Segoe UI", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 94px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
select,
summary {
  cursor: pointer;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent-ink);
  cursor: pointer;
  margin: 12px 0 20px;
}
input[type="checkbox"] {
  accent-color: var(--accent-ink);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
select,
input[type="email"] {
  display: block;
  width: 100%;
  min-height: 44px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 9px 12px;
}
select {
  margin: 8px 0 20px;
}
label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
output {
  color: var(--accent-ink);
  font: 13px var(--mono);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 5px;
}
::selection {
  background: var(--accent);
  color: #141613;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(29px, 3.2vw, 43px);
  margin-bottom: 0;
}
h3 {
  font-size: 23px;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
p {
  color: var(--muted);
  margin-bottom: 16px;
}
p strong {
  color: var(--text);
  font-weight: 500;
}
code,
pre,
kbd {
  font-family: var(--mono);
}
p code,
.tip code {
  font-size: 0.88em;
  color: var(--text);
}
pre {
  margin: 16px 0 0;
  padding: 18px;
  background: #11130f;
  border: 1px solid #30352a;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: #c3dca4;
  overflow: auto;
  max-width: 100%;
  tab-size: 2;
}
pre code {
  white-space: pre;
}
kbd {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 100;
  padding: 12px 24px;
  background: var(--accent);
  color: #141613;
}
.skip-link:focus {
  top: 10px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

/* 02. Navegación, barra fija y progreso de lectura */
.sidebar {
  width: var(--sidebar);
  height: 100dvh;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 34px 23px 22px;
  border-right: 1px solid var(--line);
  background: #171914;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}
.brand-symbol {
  color: var(--accent-ink);
  font: 29px var(--mono);
  letter-spacing: -0.2em;
  padding-right: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-slash {
  color: var(--accent-ink);
}
.brand small {
  display: block;
  margin-top: 11px;
  font-size: 8px;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 500;
}
.index-label {
  color: #8e9782;
  font: 10px var(--mono);
  letter-spacing: 0.075em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 51px 8px 19px;
}
.index-label span {
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}
.chapter-nav {
  display: grid;
  gap: 4px;
}
.chapter-nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #adb3a2;
  transition:
    background 0.2s,
    color 0.2s;
}
.chapter-nav a > span {
  font: 10px var(--mono);
  color: #7e8774;
}
.chapter-nav i {
  font-style: normal;
  margin-left: auto;
  opacity: 0;
}
.chapter-nav a:hover {
  color: var(--text);
  background: var(--surface-raised);
}
.chapter-nav a.active {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-ink);
}
.chapter-nav a.active span,
.chapter-nav a.active i {
  color: var(--accent-ink);
  opacity: 1;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 34px 8px 0;
  color: #9da591;
  font-size: 11px;
}
.sidebar-bottom .live-dot {
  width: 5px;
  height: 5px;
  margin-right: 3px;
}
.reading-track {
  margin-top: 19px;
  height: 3px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}
.reading-track > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s;
}
.reading-label {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font: 10px var(--mono);
}
.page-shell {
  margin-left: var(--sidebar);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 0 44px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 22, 19, 0.94);
  backdrop-filter: blur(16px);
}
.breadcrumb {
  font: 10px var(--mono);
  letter-spacing: 0.07em;
  color: #a8b09d;
}
.breadcrumb > span {
  margin: 0 13px;
  color: #59614f;
}
.toolbar {
  display: flex;
  gap: 11px;
  align-items: center;
}
.icon-button,
.theme-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 12px;
  min-height: 36px;
}
.icon-button:hover,
.theme-button:hover {
  background: var(--surface-raised);
}
.palette-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.mobile-brand,
.mobile-index {
  display: none;
}
.mobile-index {
  margin: 14px 20px 0;
  border-radius: 8px;
}
.mobile-index summary {
  color: var(--accent-ink);
  font-size: 13px;
  padding: 12px 15px;
}
.mobile-index nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 15px 15px;
  gap: 5px 15px;
}
.mobile-index nav a {
  padding: 9px 0;
  font-size: 12px;
}
.mobile-index nav a > span {
  color: var(--accent-ink);
  margin-right: 5px;
}
.mobile-index nav i {
  display: none;
}
main {
  max-width: 1500px;
  margin-inline: auto;
  padding: 0 44px;
}

/* 03. Portada: tipografía, geometría y movimiento hechos con CSS */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 28px;
  padding: 59px 0 54px;
}
.eyebrow {
  font: 10px var(--mono);
  color: var(--accent-ink);
  letter-spacing: 0.09em;
  margin-bottom: 19px;
}
.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}
.hero h1 {
  font-size: clamp(55px, 5.9vw, 91px);
  line-height: 1.01;
  letter-spacing: -0.065em;
  margin: 0 0 24px;
}
.hero h1 em {
  color: var(--accent-ink);
  font-style: normal;
}
.hero-asterisk {
  color: var(--accent-ink);
  display: inline-block;
  margin-left: 24px;
  font-size: 0.76em;
  animation: slow-spin 25s linear infinite;
}
.hero-copy > p {
  font-size: 14px;
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 23px;
  margin: 27px 0 31px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  min-height: 45px;
  padding: 12px 19px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  transition:
    translate 0.2s,
    box-shadow 0.2s;
}
.button:hover {
  translate: 0 -3px;
  box-shadow: 0 7px 25px rgba(var(--accent-rgb), 0.12);
}
.accent {
  background: var(--accent);
  color: #151a10;
}
.button > span {
  font-size: 18px;
}
.text-link {
  font-size: 12px;
}
.text-link span {
  color: var(--accent-ink);
  margin-left: 10px;
}
.hero-meta {
  display: flex;
  gap: 22px;
  font: 10px var(--mono);
  color: #919b84;
}
.hero-meta b {
  font-weight: 400;
  color: var(--text);
  font-size: 12px;
  margin-right: 4px;
}
.hero-art {
  position: relative;
  isolation: isolate;
  min-height: 355px;
  border: 1px solid #3b4331;
  border-radius: 15px;
  overflow: hidden;
  background-color: #20271a;
  background-image:
    linear-gradient(#8a9b6510 1px, transparent 1px),
    linear-gradient(90deg, #8a9b6510 1px, transparent 1px),
    radial-gradient(ellipse at 50% 50%, #718c2930, transparent 75%);
  background-size:
    28px 28px,
    28px 28px,
    100% 100%;
}
.art-top,
.art-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 8px var(--mono);
  color: #bac7a0;
  letter-spacing: 0.05em;
}
.art-top {
  top: 19px;
}
.art-top .live-dot {
  width: 4px;
  height: 4px;
  margin-right: 6px;
}
.art-bottom {
  bottom: 17px;
  color: #a2b781;
  font-size: 10px;
}
.art-bottom > span:last-child {
  font-size: 21px;
  color: var(--accent-ink);
}
.orbit {
  position: absolute;
  width: 278px;
  height: 278px;
  left: 50%;
  top: 50%;
  border: 1px solid #8aa65e40;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.orbit-two {
  width: 210px;
  height: 210px;
  border-style: dashed;
  animation: orbit-spin 40s linear infinite;
}
.art-cross {
  position: absolute;
  color: #90a574;
  font: 20px var(--mono);
}
.cross-one {
  top: 82px;
  left: 40px;
}
.cross-two {
  bottom: 65px;
  right: 34px;
}
.css-sculpture {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 254px;
  height: 176px;
  transform: translate(-50%, -50%) rotate(-8deg);
  animation: sculpture-float 7s ease-in-out infinite;
}
.sculpture-front,
.sculpture-back {
  position: absolute;
  inset: 0;
  background: var(--accent);
  color: #233019;
  border: 1px solid #dafcad;
  border-radius: 15px;
  font-weight: 850;
  font-size: 97px;
  letter-spacing: -0.08em;
  line-height: 1.35;
  padding: 9px 20px;
  box-shadow: 0 25px 50px #0003;
}
.sculpture-back {
  transform: translate(12px, 14px);
  background: #617d35;
  border-color: #8bad51;
  color: transparent;
}
.sculpture-front {
  background: linear-gradient(125deg, #e3ffb6, var(--accent) 65%, #8cb943);
}
.sculpture-front span {
  display: block;
  font: 8px var(--mono);
  letter-spacing: 0.3em;
  padding-left: 6px;
}
.floating-tag {
  position: absolute;
  border: 1px solid #6b795555;
  background: #1a2017e6;
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 6px;
  color: #d9eac3;
  font: 9px var(--mono);
  box-shadow: 0 9px 25px #0003;
}
.tag-transform {
  right: 18px;
  top: 71px;
  rotate: 5deg;
}
.tag-color {
  bottom: 69px;
  left: 19px;
  rotate: -3deg;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tag-color i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
}
.topic-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  font: 10px var(--mono);
  letter-spacing: 0.1em;
  color: #a9b09b;
}
.topic-strip b {
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 400;
}

/* 04. Sistema de secciones y experimentos */
.lab-section {
  padding: 62px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 6px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}
.section-title .eyebrow {
  margin-bottom: 12px;
}
.section-badge {
  font: 9px var(--mono);
  color: #aab39a;
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 7px 10px;
  white-space: nowrap;
  margin-bottom: 3px;
}
.section-intro {
  max-width: 720px;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 28px;
}
.two-columns,
.three-columns,
.foundation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 21px;
}
.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.panel,
.syntax-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.panel-label {
  display: block;
  color: #a6af98;
  font: 10px var(--mono);
  letter-spacing: 0.075em;
}
.panel p,
.effect-card p {
  font-size: 14px;
}
.experiment {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
  background: var(--surface);
}
.experiment-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
  font: 10px var(--mono);
  color: #b2bba4;
}
.experiment-bar > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-ink);
}
.experiment-bar .live-dot {
  width: 5px;
  height: 5px;
}
.experiment-body {
  padding: 26px;
  min-width: 0;
}
.experiment-body > div {
  min-width: 0;
}
.experiment-body p {
  font-size: 14px;
}
.controls-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.4fr);
  gap: 30px;
}
.controls {
  min-width: 0;
}
.controls pre {
  font-size: 12px;
  padding: 15px;
}
.check-control {
  justify-content: flex-start;
  gap: 9px;
  margin: 15px 0;
  font-size: 13px;
}
.control-row {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
}
.micro-note {
  font-size: 12px !important;
  color: #929d85;
  display: block;
  line-height: 1.7;
}
.result-note {
  font: 11px var(--mono);
  color: var(--muted);
}
.tip {
  font-size: 13px;
  margin: 20px 0 0;
  line-height: 1.8;
}
.tip > span {
  color: var(--accent-ink);
  margin-right: 9px;
  font-size: 19px;
}
.concept-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 23px;
}
.concept-row > div {
  border-left: 2px solid var(--line);
  padding-left: 15px;
  min-width: 0;
}
.concept-row code {
  color: var(--accent-ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.concept-row p {
  font-size: 12px;
  margin: 5px 0 0;
}
.concept-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.small-button {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 11px;
  min-height: 32px;
}
.small-button:hover {
  border-color: var(--accent-ink);
}
.segmented {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.segmented.wrap {
  flex-wrap: wrap;
}
.segmented button {
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 5px;
  font: 12px var(--mono);
  min-height: 36px;
}
.segmented button[aria-pressed="true"] {
  background: var(--accent);
  color: #172012;
}
.segmented button:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.segmented.compact {
  padding: 2px;
}
.segmented.compact button {
  font-size: 10px;
  padding: 5px 12px;
  min-height: 27px;
}

/* 05. Fundamentos, cascada y selectores */
.syntax-card {
  background: linear-gradient(130deg, #252e1d, var(--surface));
}
.syntax-line {
  font: 27px/1.8 var(--mono);
  margin: 23px 0;
  color: #7f8c71;
}
.token-selector {
  color: var(--accent-ink);
}
.token-property {
  color: var(--purple);
}
.token-value {
  color: var(--orange);
}
.syntax-legend,
.box-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font: 10px var(--mono);
  color: var(--muted);
}
.syntax-legend i,
.box-legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 7px;
}
.lime {
  background: var(--accent);
}
.purple {
  background: var(--purple);
}
.orange {
  background: var(--orange);
}
details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
summary {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  list-style: none;
  font-size: 14px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
}
details[open] > summary::after {
  content: "−";
}
summary > span {
  color: #8d9a7c;
  font: 10px var(--mono);
}
summary b {
  color: var(--accent-ink);
  background: rgba(var(--accent-rgb), 0.07);
  padding: 3px 7px;
  border-radius: 3px;
  font: 8px var(--mono);
}
details p {
  padding: 0 20px;
  margin: 0 0 13px;
  font-size: 13px;
}
details pre {
  margin: 0 16px 17px;
  font-size: 11px;
  padding: 12px;
}
.method-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.method-list > details {
  min-width: 0;
}
.cascade-stage {
  padding: 20px;
  text-align: center;
  background: #24291e;
  border-radius: 10px;
  min-height: 130px;
  display: grid;
  align-content: center;
}
:where(.cascade-stage) p {
  color: #c5f568;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 650;
  margin-bottom: 12px;
}
/* :where() aísla el ejemplo sin sumar especificidad al selector didáctico. */
:where(.cascade-stage) p {
  color: #c5f568;
}
:where(.cascade-stage) .mensaje {
  color: #bca7ff;
}
:where(.cascade-stage.id-rule) #mensaje {
  color: #78dcca;
}
:where(.cascade-stage.important-rule) p {
  color: #c5f568 !important;
}
.selector-stage {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  padding: 30px 2px;
}
.selector-tile {
  margin: 0;
  background: #24291e;
  color: #777f6d;
  min-height: 114px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.25s,
    outline-color 0.25s;
  outline: 2px solid transparent;
  outline-offset: 3px;
}
.selector-tile b {
  font: 33px var(--mono);
  font-weight: 400;
}
.selector-tile code {
  font-size: 8px;
  margin-top: 10px;
  text-align: center;
}
.selector-tile.matched {
  color: var(--accent-ink);
  outline-color: var(--accent-ink);
  background: rgba(var(--accent-rgb), 0.07);
  transform: translateY(-3px);
}
.inline-explanation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 25px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 12px;
}
.inline-explanation code {
  color: var(--accent-ink);
  overflow-wrap: anywhere;
}
.inline-explanation > span {
  color: var(--muted);
}

/* 06. Modelo de caja, tipografía y color */
.box-model-stage {
  background: #171a14;
  border: 1px dashed #46523a;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  padding: 22px 8px;
  position: relative;
  overflow: auto;
}
.box-label {
  position: absolute;
  top: 15px;
  left: 18px;
  color: var(--orange);
  font: 10px var(--mono);
}
.box-outer {
  display: flow-root;
  flex-shrink: 0;
  align-self: safe center;
  background: #f7ad7920;
  border: 1px dashed #f7ad7950;
}
.box-demo {
  box-sizing: content-box;
  width: 120px;
  padding: 24px;
  border: 3px solid var(--purple);
  margin: 20px;
  background: #c5f56828;
  transition:
    padding 0.15s,
    margin 0.15s,
    border-width 0.15s;
}
.box-content {
  box-sizing: border-box;
  width: 120px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #243318;
  font: 12px var(--mono);
}
.box-content span {
  font-size: 9px;
  opacity: 0.7;
  margin-top: 3px;
}
.box-legend {
  margin-top: 24px;
  gap: 14px;
}
.box-model-stage > p {
  margin: 16px 0 0;
  text-align: center;
  font-size: 10px;
}
.type-preview {
  height: 185px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  font-size: 64px;
  letter-spacing: -2px;
  line-height: 1.1;
}
.type-preview > span {
  font-size: 0.28em;
  margin-top: 15px;
}
.type-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  align-items: center;
}
.type-controls select {
  margin: 0;
}
.type-controls + pre {
  margin-top: 20px;
}
.gradient-preview {
  border-radius: 10px;
  min-height: 185px;
  background: linear-gradient(135deg, #c5f568, #78dcca, #bca7ff);
  margin: 22px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d3d32;
}
.gradient-preview > span {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.055em;
}
.color-formats {
  display: grid;
  gap: 8px;
  font: 9px var(--mono);
  margin-top: 19px;
}
.color-formats span {
  display: flex;
  justify-content: space-between;
  color: #94a182;
}
.color-formats code {
  color: var(--muted);
}

/* 07. Layout, posicionamiento y estados */
.layout-stage {
  min-height: 360px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px dashed #45513a;
  border-radius: 10px;
  padding: 18px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 23px,
      #8a9b6509 24px
    ),
    #171b13;
}
.layout-stage > div {
  background: var(--accent);
  color: #233219;
  font: 22px var(--mono);
  border-radius: 7px;
  padding: 18px 13px;
  min-width: 48px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.layout-stage > div:nth-child(2) {
  background: var(--purple);
}
.layout-stage > div:nth-child(3) {
  background: var(--mint);
}
.layout-stage > div:nth-child(4) {
  background: var(--orange);
}
.position-stage {
  position: relative;
  display: flex;
  gap: 12px;
  height: 185px;
  margin: 22px 0;
  padding: 20px;
  border: 1px dashed #46523a;
  border-radius: 10px;
}
.position-anchor,
.position-target {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--surface-raised);
  color: #8b997c;
  border: 1px solid #47533b;
  border-radius: 8px;
  font: 17px var(--mono);
}
.position-target {
  background: var(--accent);
  color: #203014;
  z-index: 1;
}
.position-origin {
  position: absolute;
  bottom: 12px;
  left: 16px;
  color: #7d8f69;
  font: 9px var(--mono);
}
.layers-stage {
  height: 235px;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.layer {
  position: absolute;
  width: 180px;
  height: 120px;
  border-radius: 12px;
  padding: 20px;
  color: #242330;
  font: 15px var(--mono);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s;
}
.layer-back {
  z-index: 1;
  background: var(--purple);
  transform: translate(-30px, -15px) rotate(-9deg);
  pointer-events: none;
}
.layer-front {
  z-index: 2;
  background: var(--accent);
  transform: translate(30px, 23px) rotate(7deg);
}
.layer small {
  font-size: 9px;
  margin-top: 12px;
}
.layer-front[aria-pressed="true"] {
  z-index: 0;
  transform: translate(45px, 36px) rotate(7deg);
}
.state-panel {
  padding: 21px;
}
.state-panel .panel-label {
  min-height: 30px;
  font-size: 9px;
}
.state-button {
  width: 100%;
  margin: 33px 0;
  padding: 16px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-radius: 7px;
  background: var(--accent);
  color: #1a2512;
  font-size: 12px;
  transition:
    translate 0.2s,
    scale 0.2s,
    box-shadow 0.2s;
}
.state-button:hover {
  translate: 0 -4px;
  box-shadow: 0 12px 30px #c5f56820;
}
.state-button:active {
  scale: 0.96;
}
.state-panel pre {
  font-size: 10px;
  padding: 13px;
}
.css-switch {
  justify-content: flex-start;
  cursor: pointer;
  gap: 9px;
  margin-top: 21px;
  font-size: 12px;
  position: relative;
}
.css-switch input {
  position: absolute;
  width: 46px;
  height: 26px;
  inset: 0 auto auto 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch-track {
  width: 46px;
  height: 26px;
  background: #3f4835;
  border-radius: 50px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.3s;
  pointer-events: none;
}
.switch-track::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: #cad0c1;
  border-radius: 50%;
  transition: transform 0.3s;
}
.css-switch input:checked + .switch-track {
  background: var(--accent);
}
.css-switch input:checked + .switch-track::before {
  transform: translateX(20px);
  background: #243019;
}
.css-switch input:focus-visible + .switch-track {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}
.idea-light {
  font-size: 56px;
  color: #566247;
  text-align: center;
  line-height: 1.45;
  transition:
    color 0.3s,
    text-shadow 0.3s;
}
.state-panel:has(input:checked) {
  border-color: var(--accent-ink);
}
.state-panel:has(input:checked) .idea-light {
  color: var(--accent-ink);
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.5);
}
.pseudo-quote {
  position: relative;
  font-size: 25px;
  color: var(--purple);
  line-height: 1.25;
  letter-spacing: -0.04em;
  padding: 20px 16px;
  margin-block: 10px 16px;
}
.pseudo-quote::before {
  content: "«";
  position: absolute;
  left: -3px;
  top: 10px;
  font-size: 27px;
}
.pseudo-quote::after {
  content: "»";
  font-size: 27px;
  margin-left: 4px;
}
.validation-demo {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.validation-demo h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.validation-demo p {
  font-size: 13px;
  margin-bottom: 0;
}
.validation-demo label {
  margin-bottom: 8px;
}
.validation-demo input:focus {
  border-color: var(--purple);
}
.validation-demo input:not(:placeholder-shown):invalid {
  border-color: #ff9e91;
}
.validation-demo input:not(:placeholder-shown):valid {
  border-color: var(--accent-ink);
}

/* 08. Movimiento y diseño adaptable */
.motion-stage {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 340px;
  background: radial-gradient(ellipse, #3e482b50, transparent 70%), #171b13;
  border: 1px solid #38432e;
  border-radius: 10px;
  overflow: hidden;
}
.motion-orbit {
  position: absolute;
  width: 215px;
  height: 215px;
  border: 1px dashed #4a5939;
  border-radius: 50%;
}
.animated-object {
  width: 124px;
  height: 124px;
  border-radius: 28px;
  background: var(--accent);
  color: #213115;
  font-size: 82px;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 20px 70px rgba(var(--accent-rgb), 0.12);
  animation: float 3s ease-in-out infinite;
}
.motion-caption {
  position: absolute;
  bottom: 20px;
  color: #8d9c7c;
  font: 10px var(--mono);
}
.transform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.transform-demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.transform-demo > span {
  width: 58px;
  height: 58px;
  background: #bca7ff16;
  color: var(--purple);
  border: 1px solid #bca7ff50;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 30px;
  transition: transform 0.35s;
}
.transform-demo code {
  font-size: 10px;
  color: var(--muted);
}
.demo-rotate:is(:hover, :focus-visible) > span {
  transform: rotate(15deg);
}
.demo-scale:is(:hover, :focus-visible) > span {
  transform: scale(1.15);
}
.demo-skew:is(:hover, :focus-visible) > span {
  transform: skewX(-15deg);
}
.demo-translate:is(:hover, :focus-visible) > span {
  transform: translateY(-12px);
}
.responsive-track {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  min-height: 320px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 39px,
    #8a9b6512 40px
  );
}
.responsive-container {
  container-type: inline-size;
  width: 100%;
  max-width: 100%;
  min-width: min(230px, 100%);
  border: 1px solid #546541;
  border-radius: 12px;
  padding: 18px;
  background: #252e1d;
  transition: width 0.2s;
  align-self: center;
}
.responsive-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px;
  align-items: center;
}
.responsive-visual {
  align-self: stretch;
  min-height: 145px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #223615;
  font: 50px var(--mono);
}
.responsive-card h3 {
  margin: 12px 0 9px;
  font-size: 24px;
}
.responsive-card p {
  font-size: 13px;
}
.responsive-card .panel-label {
  font-size: 8px;
}
.responsive-chip {
  background: #c5f56815;
  padding: 4px 8px;
  border: 1px solid #52613e;
  color: var(--accent-ink);
  font: 9px var(--mono);
  border-radius: 20px;
  display: inline-block;
}
@container (max-width: 460px) {
  .responsive-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .responsive-visual {
    min-height: 90px;
  }
  .responsive-card h3 {
    font-size: 23px;
  }
}

/* 09. Efectos visuales, referencia y proyecto final */
.effect-card {
  min-width: 0;
}
.effect-card h3 {
  font-size: 20px;
  margin: 20px 0 10px;
}
.effect-card pre {
  font-size: 10px;
  padding: 13px;
}
.effect-stage {
  height: 200px;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #20281a;
}
.glass-stage {
  background:
    radial-gradient(circle at 10% 95%, #966dd160, transparent 65%), #20271a;
}
.glass-orb {
  position: absolute;
  top: 40px;
  right: 22px;
  width: 110px;
  height: 110px;
  background: var(--accent);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
.glass-pane {
  background: #ffffff12;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffff30;
  border-radius: 12px;
  padding: 24px 20px;
  color: var(--text);
  font: 40px var(--mono);
  rotate: -7deg;
  box-shadow: 0 20px 40px #0002;
}
.glass-pane small {
  display: block;
  font-size: 7px;
  margin-top: 10px;
}
.clip-shape {
  width: 120px;
  height: 120px;
  background: var(--purple);
  color: #372b54;
  font-size: 47px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  transition: clip-path 0.5s;
}
.clip-shape:focus-visible {
  background: var(--accent);
}
.clip-stage > span {
  position: absolute;
  bottom: 12px;
  font: 8px var(--mono);
  color: var(--muted);
}
.filter-pattern {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    var(--mint) 0deg 15deg,
    #303e2b 15deg 30deg
  );
  box-shadow: 0 0 45px #78dcca25;
}
.modern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.modern-grid summary {
  font-size: 14px;
}
.documentation-link {
  border-bottom: 1px solid #687d4e;
  color: var(--accent-ink);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  padding: 20px 0 10px;
  gap: 15px;
}
.final-section {
  border-bottom: 0;
}
.final-card-stage {
  min-height: 430px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #56713230, transparent 70%);
  padding: 25px 15px;
}
.creation-card {
  width: min(270px, 100%);
  background: var(--accent);
  color: #24341b;
  border-radius: 24px;
  padding: 23px;
  transform: rotate(-4deg);
  box-shadow: 12px 18px 0 #080a07;
  transition:
    border-radius 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.creation-top,
.creation-bottom {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
}
.creation-top > span:last-child {
  font-size: 18px;
  line-height: 1;
}
.creation-symbol {
  font-size: 85px;
  line-height: 1.3;
  margin-top: 10px;
}
.creation-card h3 {
  font-size: 43px;
  margin: 5px 0 15px;
}
.creation-card p {
  color: #3b512a;
  font-size: 12px;
  line-height: 1.6;
}
.creation-bottom {
  border-top: 1px solid #415c3740;
  padding-top: 15px;
  margin-top: 22px;
  font-size: 8px;
}
.copy-button {
  margin-top: 20px;
  width: 100%;
}
.copy-button + span {
  margin-top: 8px;
  min-height: 20px;
}
.closing-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 48px;
  font-size: clamp(19px, 2.5vw, 31px);
  letter-spacing: -0.04em;
}
.closing-line > span {
  color: var(--muted);
}
.closing-line > strong {
  color: var(--accent-ink);
  font-weight: 500;
}
footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-size: 10px;
  color: #919c84;
}
.footer-brand {
  color: var(--text);
  font: 14px var(--mono);
}

/* 10. Keyframes y accesibilidad del movimiento */
@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes orbit-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes sculpture-float {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-8deg);
  }
  50% {
    transform: translate(-50%, -56%) rotate(-3deg);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-22px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.12);
  }
}
@keyframes morph {
  0%,
  100% {
    border-radius: 28px;
    transform: rotate(0);
  }
  50% {
    border-radius: 50%;
    transform: rotate(90deg);
  }
}
@keyframes section-enter {
  from {
    opacity: 0.55;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.section-enter {
  animation: section-enter 0.65s ease-out both;
}
html.motion-paused *,
html.motion-paused *::before,
html.motion-paused *::after {
  animation-play-state: paused !important;
  transition: none !important;
}
html.motion-paused {
  scroll-behavior: auto;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 11. Escritorio, tablet y móvil */
@media (min-width: 821px) and (max-height: 800px) {
  .sidebar {
    padding-block: 24px 14px;
    scrollbar-width: thin;
  }
  .index-label {
    margin-top: 33px;
    margin-bottom: 12px;
  }
  .chapter-nav {
    gap: 1px;
  }
  .chapter-nav a {
    min-height: 34px;
    padding-block: 7px;
  }
  .sidebar-bottom {
    padding-top: 18px;
  }
}
@media (max-width: 820px) {
  .mobile-index {
    display: block;
  }
}
@media (min-width: 1500px) {
  main {
    padding-inline: 65px;
  }
  .hero {
    padding-block: 80px;
    gap: 45px;
  }
  .hero-art {
    min-height: 420px;
  }
  .css-sculpture {
    scale: 1.13;
  }
}
@media (max-width: 1190px) {
  :root {
    --sidebar: 218px;
  }
  .sidebar {
    padding-inline: 15px;
  }
  main {
    padding-inline: 30px;
  }
  .topbar {
    padding-inline: 30px;
  }
  .hero {
    gap: 20px;
  }
  .hero-art {
    min-height: 330px;
  }
  .hero h1 {
    font-size: 62px;
  }
  .hero-asterisk {
    margin-left: 13px;
  }
  .css-sculpture {
    width: 222px;
    height: 160px;
  }
  .sculpture-front,
  .sculpture-back {
    font-size: 83px;
  }
  .hero-meta {
    gap: 12px;
  }
  .hero-actions {
    gap: 15px;
  }
  .breadcrumb {
    font-size: 9px;
  }
  .section-badge {
    font-size: 8px;
  }
  .three-columns {
    gap: 12px;
  }
  .state-panel {
    padding: 15px;
  }
  .selector-stage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topic-strip {
    font-size: 8px;
  }
  .controls-layout {
    gap: 23px;
  }
  .experiment-body {
    padding: 22px;
  }
}
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 53px;
  }
  .hero-asterisk {
    font-size: 0.6em;
    margin-left: 8px;
  }
  .hero-art {
    min-height: 310px;
  }
  .art-top {
    font-size: 7px;
    left: 12px;
    right: 12px;
  }
  .tag-transform {
    font-size: 7px;
    right: 8px;
  }
  .hero-meta {
    flex-wrap: wrap;
    gap: 8px 15px;
  }
  .hero-copy > p {
    font-size: 13px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-badge {
    display: none;
  }
  .three-columns {
    grid-template-columns: 1fr;
  }
  .state-panel {
    padding: 24px;
  }
  .state-panel .panel-label {
    min-height: auto;
  }
  .state-button {
    max-width: 300px;
  }
  .state-panel pre {
    font-size: 12px;
  }
  .pseudo-quote {
    width: fit-content;
  }
  .idea-light {
    text-align: left;
    padding-left: 45px;
  }
  .effect-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0 22px;
  }
  .effect-stage {
    grid-row: span 5;
    height: 210px;
  }
  .effect-card h3 {
    margin-top: 8px;
  }
  .effect-card pre {
    margin-top: 5px;
  }
  .glass-pane {
    padding: 18px 12px;
  }
  .glass-pane small {
    font-size: 6px;
  }
  .effect-card input {
    margin-bottom: 10px;
  }
  .controls-layout {
    grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1fr);
  }
  .box-model-stage {
    padding-inline: 0;
  }
  .concept-row.four {
    grid-template-columns: 1fr 1fr;
  }
  .foundation-grid {
    gap: 14px;
  }
  .syntax-line {
    font-size: 23px;
  }
  .syntax-card {
    padding: 20px;
  }
  .syntax-legend {
    gap: 10px;
  }
  .method-list summary {
    padding: 16px 12px;
    gap: 8px;
  }
  .method-list summary b {
    font-size: 7px;
  }
  .two-columns {
    gap: 15px;
  }
  .panel {
    padding: 19px;
  }
  .type-controls {
    grid-template-columns: 1fr;
  }
  .type-controls select {
    margin-top: 8px;
  }
  .type-preview {
    height: 170px;
  }
  .gradient-preview {
    min-height: 220px;
  }
  .gradient-preview > span {
    font-size: 24px;
  }
  .modern-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  :root {
    --sidebar: 0px;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    justify-content: space-between;
    min-height: 66px;
  }
  .mobile-brand {
    display: block;
    font: 16px var(--mono);
    color: var(--accent-ink);
  }
  .hero {
    gap: 28px;
  }
  .hero h1 {
    font-size: 65px;
  }
  .hero-art {
    min-height: 335px;
  }
  .hero-asterisk {
    font-size: 0.7em;
  }
  .hero .eyebrow {
    font-size: 8px;
  }
  .hero-meta {
    font-size: 9px;
  }
  .breadcrumb {
    display: none;
  }
  .controls-layout {
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.4fr);
  }
  .css-sculpture {
    width: 230px;
  }
  .sculpture-front,
  .sculpture-back {
    font-size: 87px;
  }
  .topic-strip {
    font-size: 9px;
  }
  .closing-line {
    font-size: 24px;
  }
}
@media (max-width: 600px) {
  html {
    scroll-padding-top: 86px;
  }
  main {
    padding-inline: 20px;
  }
  .topbar {
    padding-inline: 18px;
    gap: 8px;
  }
  .mobile-brand {
    font-size: 14px;
  }
  .toolbar {
    gap: 6px;
  }
  .icon-button,
  .theme-button {
    padding: 7px 9px;
  }
  .icon-button span {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 37px 0 28px;
    gap: 27px;
  }
  .hero h1 {
    font-size: clamp(55px, 13vw, 75px);
  }
  .hero .eyebrow {
    font-size: 8px;
  }
  .hero-copy > p {
    font-size: 14px;
  }
  .hero-actions {
    margin: 22px 0;
  }
  .hero-meta {
    gap: 20px;
  }
  .hero-art {
    min-height: 310px;
  }
  .css-sculpture {
    width: 254px;
    height: 176px;
  }
  .sculpture-front,
  .sculpture-back {
    font-size: 97px;
  }
  .art-top {
    font-size: 8px;
    left: 20px;
    right: 20px;
  }
  .tag-transform {
    font-size: 9px;
    right: 18px;
  }
  .topic-strip {
    overflow: auto;
    white-space: nowrap;
    gap: 20px;
    padding-block: 15px;
    font-size: 9px;
    scrollbar-width: thin;
  }
  .lab-section {
    padding: 40px 0;
  }
  .eyebrow {
    font-size: 9px;
  }
  h2 {
    font-size: 32px;
  }
  .section-intro {
    font-size: 14px;
  }
  .foundation-grid,
  .two-columns,
  .controls-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .syntax-line {
    font-size: 28px;
  }
  .syntax-card {
    padding: 24px;
  }
  .syntax-legend {
    gap: 24px;
  }
  .method-list summary {
    padding: 17px 20px;
  }
  .experiment-bar {
    padding: 12px 16px;
    font-size: 9px;
  }
  .experiment-body {
    padding: 18px;
  }
  .experiment-bar > span:last-child {
    font-size: 8px;
  }
  .selector-stage {
    gap: 13px;
  }
  .selector-tile {
    min-height: 95px;
  }
  .selector-tile code {
    font-size: 7px;
  }
  .segmented button {
    padding: 9px 10px;
    font-size: 11px;
  }
  .concept-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .concept-row.four {
    grid-template-columns: 1fr 1fr;
  }
  .box-model-stage {
    min-height: 315px;
  }
  .type-controls {
    grid-template-columns: 1fr 1fr;
  }
  .gradient-preview {
    min-height: 190px;
  }
  .gradient-preview > span {
    font-size: 31px;
  }
  .type-preview {
    height: 200px;
  }
  .layout-stage {
    min-height: 310px;
  }
  .position-stage {
    height: 200px;
  }
  .validation-demo {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  .transform-grid {
    grid-template-columns: 1fr 1fr;
  }
  .transform-demo code {
    font-size: 11px;
  }
  .responsive-track {
    min-height: 330px;
  }
  .responsive-container {
    padding: 14px;
    min-width: min(220px, 100%);
  }
  .effect-card {
    grid-template-columns: 1fr;
  }
  .effect-stage {
    grid-row: auto;
    height: 230px;
  }
  .effect-card h3 {
    margin-top: 20px;
  }
  .effect-card pre {
    margin-bottom: 25px;
  }
  .glass-pane {
    padding: 25px 24px;
  }
  .glass-pane small {
    font-size: 8px;
  }
  .glass-orb {
    right: 55px;
  }
  .clip-shape {
    width: 145px;
    height: 145px;
  }
  .filter-pattern {
    width: 170px;
    height: 170px;
  }
  .modern-grid summary {
    padding: 17px 15px;
    gap: 12px;
    font-size: 13px;
  }
  .final-card-stage {
    min-height: 445px;
  }
  .closing-line {
    flex-direction: column;
    gap: 5px;
    font-size: 26px;
    padding-top: 32px;
  }
  footer {
    flex-wrap: wrap;
    gap: 13px;
    padding-bottom: 30px;
  }
  footer > span {
    order: 3;
    flex-basis: 100%;
    font-size: 9px;
  }
  .hero-asterisk {
    margin-left: 25px;
  }
  .panel-label {
    font-size: 10px;
  }
}
@media (max-width: 360px) {
  main {
    padding-inline: 14px;
  }
  .hero-meta {
    gap: 11px;
  }
  .hero-asterisk {
    margin-left: 14px;
  }
  .mobile-brand {
    font-size: 12px;
  }
  .topbar {
    padding-inline: 12px;
  }
  .type-controls {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 54px;
  }
}
@media (max-width: 600px) {
  .foundation-grid,
  .two-columns,
  .controls-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .syntax-line {
    font-size: clamp(19px, 5.8vw, 28px);
  }
  .syntax-legend {
    gap: 12px;
  }
}
@media print {
  :root {
    color-scheme: light;
    --bg: white;
    --text: #111;
    --muted: #444;
    --surface: #f7f7f7;
    --line: #aaa;
  }
  .sidebar,
  .topbar,
  .hero-art,
  .hero-actions,
  .toolbar,
  .copy-button,
  .skip-link {
    display: none;
  }
  .page-shell {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .hero {
    display: block;
    padding: 20px 0;
  }
  .hero h1 {
    font-size: 50px;
    color: #111;
  }
  .lab-section {
    padding: 24px 0;
  }
  .experiment,
  .panel,
  details {
    break-inside: avoid;
  }
  pre {
    white-space: pre-wrap;
    background: #eee;
    color: #17210f;
  }
  pre code {
    white-space: pre-wrap;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .section-enter {
    opacity: 1;
    transform: none;
  }
}
