@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&family=Inter:wght@500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --paper: #f2eee4;
  --panel: #fbfaf6;
  --ink: #141712;
  --muted: #667069;
  --line: #cfd2c8;
  --coral: #ff7058;
  --lime: #b5ff32;
  --blue: #6d79f6;
  --butter: #ffd768;
  --green: #0c7157;
  --soft-blue: #edf0ff;
  --shadow: 0 24px 60px rgb(24 31 27 / 9%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 94% 3%, rgb(255 112 88 / 13%), transparent 25%),
    radial-gradient(circle at 5% 0%, rgb(109 121 246 / 12%), transparent 22%),
    var(--paper);
  font-family: Inter, "Hiragino Sans", "Yu Gothic", sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
.preview-scroller:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.page {
  width: min(100% - 28px, 1580px);
  margin-inline: auto;
  padding: 24px 0 38px;
}

.hero {
  position: relative;
  min-height: 200px;
  padding: 8px 12px 28px;
}

.eyebrow,
.section-heading p,
.control-intro p,
.canvas-head p,
.insight-panel header p,
.code-heading p,
.page-footer p {
  margin: 0;
  color: var(--green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow i { width: 18px; height: 18px; border: 2px solid var(--blue); border-radius: 5px; box-shadow: 5px 5px 0 var(--lime); }

h1 {
  margin: 12px 0 7px;
  font-size: clamp(48px, 5.5vw, 88px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .92;
  white-space: nowrap;
}

.lead { margin: 22px 0 0; padding-right: 470px; color: var(--muted); font-size: clamp(15px, 1.3vw, 21px); font-weight: 700; }
.lead strong { color: var(--ink); }

.hero-actions { position: absolute; right: 12px; bottom: 28px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.support-chip,
.top-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
}
.support-chip { display: grid; place-items: center; padding: 0 15px; color: var(--green); background: #e7fff5; }
.support-chip.simulated { color: #745200; background: #fff5cf; }
.top-button { padding: 0 18px; background: var(--panel); cursor: pointer; transition: transform .18s ease, background .18s ease; }
.top-button:hover { transform: translateY(-2px); }
.top-button.dark { color: white; background: var(--ink); border-color: var(--ink); }

.lab-shell,
.insight-panel,
.code-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--line);
}
.section-number { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; color: white; background: var(--coral); border-radius: 14px; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 800; }
.section-heading h2,
.insight-panel h2,
.code-panel h2 { margin: 3px 0 0; font-size: clamp(22px, 2vw, 31px); line-height: 1.05; }
.heading-metrics { display: flex; gap: 8px; margin-left: auto; }
.heading-metrics span { display: flex; align-items: baseline; gap: 5px; padding: 8px 11px; color: var(--muted); background: #f0f1eb; border-radius: 999px; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.heading-metrics i { color: var(--blue); font-size: 15px; font-style: normal; }

.studio { display: grid; grid-template-columns: 292px minmax(0, 1fr); align-items: start; }
.controls { align-self: start; width: 100%; padding: 22px 20px; background: #f7f4ec; border-right: 1px solid var(--line); }
.control-intro h3 { margin: 5px 0 0; font-size: 20px; line-height: 1.25; }

.preset-list { display: grid; gap: 7px; margin-top: 16px; }
.preset-list button { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 8px; min-height: 43px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); cursor: pointer; text-align: left; }
.preset-list button span { display: grid; place-items: center; width: 27px; height: 27px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.preset-list button b { font-size: 12px; }
.preset-list button small { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 10px; white-space: nowrap; }
.preset-list button[aria-pressed="true"] { color: white; background: var(--ink); border-color: var(--ink); }
.preset-list button[aria-pressed="true"] span { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.preset-list button[aria-pressed="true"] small { color: rgb(255 255 255 / 66%); }

.control-block,
.range-control,
.switch-stack { display: block; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.control-block.emphasized { margin-top: 18px; }
.control-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.control-title span { color: var(--muted); letter-spacing: .08em; }
.control-title output { color: var(--blue); font-size: 10px; }
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #e9e8e2; }
.segmented button { position: relative; z-index: 2; height: 39px; border: 0; background: transparent; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; }
.segmented i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: white; border-radius: 9px; box-shadow: 0 3px 10px rgb(20 23 18 / 10%); transition: translate .3s cubic-bezier(.2,.8,.2,1), background .2s; }
.segmented button[data-mode="lanes"][aria-pressed="true"] ~ i { translate: 100% 0; background: var(--lime); }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.choice-row button { height: 42px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); font-size: 11px; font-weight: 800; cursor: pointer; }
.choice-row button i { margin-right: 5px; color: var(--blue); font-style: normal; font-size: 16px; }
.choice-row button[aria-pressed="true"] { color: white; background: var(--blue); border-color: var(--blue); }
.choice-row button[aria-pressed="true"] i { color: var(--lime); }

.range-control > span { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.range-control > span b { font-size: 12px; }
.range-control output { color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 700; }
.range-control input { width: 100%; height: 5px; margin: 15px 0 9px; accent-color: var(--blue); cursor: pointer; }
.range-control small { display: flex; justify-content: space-between; color: #8a918d; font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.range-control small i { font-style: normal; }
.range-control em { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; font-style: normal; line-height: 1.5; }
.tolerance-control.is-disabled { opacity: .4; }

.switch-stack { display: grid; gap: 13px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.switch-row > span { display: grid; gap: 3px; }
.switch-row b { font-size: 11px; }
.switch-row small { color: var(--muted); font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row > i { position: relative; flex: 0 0 auto; width: 42px; height: 24px; background: #cfd1cc; border-radius: 999px; transition: background .2s; }
.switch-row > i::after { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: white; border-radius: 50%; content: ""; box-shadow: 0 2px 5px rgb(0 0 0 / 20%); transition: translate .2s; }
.switch-row input:checked + i { background: var(--blue); }
.switch-row input:checked + i::after { translate: 18px 0; }
.shuffle-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 18px; color: white; background: var(--ink); border: 0; border-radius: 12px; font-size: 11px; font-weight: 800; cursor: pointer; }
.shuffle-button span { color: var(--lime); font-size: 19px; }

.preview-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-width: 0; height: var(--preview-panel-height, 760px); padding: 18px; background: #e5e7e0; }
.browser-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 48px; padding: 8px 16px; background: #d7dad3; border: 1px solid #bfc4bb; border-radius: 15px 15px 0 0; }
.browser-address { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.browser-address i { flex: 0 0 auto; width: 8px; height: 8px; background: var(--coral); border-radius: 50%; }
.browser-address i:nth-child(2) { background: var(--butter); }
.browser-address i:nth-child(3) { background: #50c99a; }
.browser-address span { margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-state { display: flex; align-items: center; gap: 8px; }
.browser-state b,
.browser-state span { padding: 7px 9px; border-radius: 999px; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; white-space: nowrap; }
.browser-state b { color: var(--ink); background: var(--lime); }
.browser-state b.regular { color: white; background: var(--ink); }
.browser-state span { color: white; background: var(--blue); }

.canvas-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 22px 22px 18px; background: var(--panel); border-inline: 1px solid #bfc4bb; }
.canvas-head h3 { margin: 6px 0 0; font-size: clamp(25px, 3vw, 46px); line-height: .95; }
.canvas-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; }
.canvas-legend span { display: flex; align-items: center; gap: 5px; }
.canvas-legend i { width: 9px; height: 9px; border-radius: 50%; }
.canvas-legend .coral { background: var(--coral); }
.canvas-legend .lime { background: var(--lime); }
.canvas-legend .blue { background: var(--blue); }

.preview-scroller { position: relative; min-height: 0; background: #e9e5da; border: 1px solid #bfc4bb; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--blue) #d8d8d0; scrollbar-width: thin; }
.preview-stage { position: relative; min-width: 760px; min-height: 100%; padding: 20px; }
.gallery { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; min-height: 500px; }
.gallery.is-simulated { display: block; }
.gallery.is-native { display: grid-lanes; gap: var(--layout-gap); flow-tolerance: var(--flow-tolerance); }
.gallery.is-native[data-direction="waterfall"] { grid-template-columns: repeat(var(--lane-count), minmax(0, 1fr)); }
.gallery.is-native[data-direction="brick"] { grid-template-rows: repeat(var(--lane-count), 136px); width: max-content; }
.gallery.is-native .work-card { position: static; }
.gallery.is-native[data-direction="waterfall"] .work-card.featured.is-spanning { grid-column: span 2; }
.gallery.is-native[data-direction="brick"] .work-card.featured.is-spanning { grid-row: span 2; }

.lane-guides { position: absolute; inset: 20px; z-index: 0; pointer-events: none; }
.lane-guides i { position: absolute; border: 1px dashed rgb(109 121 246 / 35%); border-radius: 12px; }
.lane-guides[data-direction="waterfall"] i { top: 0; bottom: 0; }
.lane-guides[data-direction="brick"] i { right: 0; left: 0; }

.work-card { position: relative; z-index: 1; min-width: 0; padding: 12px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 17px; box-shadow: 6px 7px 0 rgb(20 23 18 / 14%); overflow: hidden; will-change: left, top, width, height, transform; }
.gallery.is-simulated .work-card { position: absolute; }
.work-card.coral { background: var(--coral); }
.work-card.lime { background: var(--lime); }
.work-card.blue { background: var(--blue); }
.work-card.butter { background: var(--butter); }
.work-card.paper { background: #fffdf5; }
.work-card.ink { color: white; background: var(--ink); }
.order-badge { position: absolute; top: 9px; right: 9px; z-index: 4; display: grid; place-items: center; min-width: 29px; height: 25px; padding-inline: 6px; color: white; background: var(--ink); border-radius: 999px; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; }
.work-card.ink .order-badge { color: var(--ink); background: var(--lime); }
.gallery.hide-order .order-badge { opacity: 0; }
.work-copy { position: absolute; right: 13px; bottom: 13px; left: 13px; z-index: 3; }
.work-copy small { display: block; margin-bottom: 5px; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.work-copy h4 { margin: 0; font-size: clamp(20px, 2vw, 33px); line-height: .93; }
.work-copy p { margin: 7px 0 0; max-width: 38ch; font-size: 10px; font-weight: 700; line-height: 1.45; }
.work-art { position: absolute; inset: 13px 13px 72px; overflow: hidden; }

.art-orbit { border-radius: 50%; border: 3px solid var(--ink); }
.art-orbit i { position: absolute; border-radius: 50%; border: 3px solid var(--ink); }
.art-orbit i:first-child { inset: 20%; background: var(--lime); }
.art-orbit i:nth-child(2) { top: -24%; left: 42%; width: 24%; height: 148%; border-radius: 50%; transform: rotate(28deg); }
.art-orbit i:nth-child(3) { top: 45%; left: -16%; width: 132%; height: 4px; background: var(--ink); border: 0; transform: rotate(-14deg); }
.art-type b { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(70px, 8vw, 126px); line-height: 1; }
.art-type i { position: absolute; right: 8%; bottom: 7%; width: 42%; height: 18%; background: var(--blue); border: 3px solid var(--ink); border-radius: 999px; transform: rotate(-12deg); }
.quote-mark { margin: -22px 0 0 5px; color: var(--coral); font-family: Georgia, serif; font-size: 150px; line-height: 1; }
.art-window { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.art-window i { border: 3px solid var(--ink); border-radius: 50% 50% 8px 8px; background: var(--butter); }
.art-window i:nth-child(2) { background: var(--coral); translate: 0 24%; }
.art-window i:nth-child(3) { grid-column: 1 / -1; height: 22px; border-radius: 999px; background: var(--lime); }
.art-lines { display: flex; align-items: stretch; justify-content: center; gap: 6%; transform: rotate(12deg) scale(1.2); }
.art-lines i { width: 11%; background: var(--line-color, var(--coral)); border-radius: 999px; }
.art-lines i:nth-child(2), .art-lines i:nth-child(5) { --line-color: var(--lime); translate: 0 20%; }
.art-lines i:nth-child(3) { --line-color: var(--blue); translate: 0 -18%; }
.art-disc { display: grid; place-items: center; }
.art-disc i { width: min(82%, 180px); aspect-ratio: 1; background: var(--ink); border-radius: 50%; box-shadow: inset 0 0 0 22px var(--coral), inset 0 0 0 46px var(--lime); }
.art-disc b { position: absolute; color: white; font-family: "IBM Plex Mono", monospace; font-size: 20px; }
.art-stairs { display: flex; align-items: flex-end; gap: 4px; }
.art-stairs i { flex: 1; height: var(--step); background: var(--ink); }
.art-stairs i:nth-child(1) { --step: 28%; }
.art-stairs i:nth-child(2) { --step: 48%; }
.art-stairs i:nth-child(3) { --step: 70%; }
.art-stairs i:nth-child(4) { --step: 94%; background: var(--lime); border: 3px solid var(--ink); }
.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.art-grid i { background: var(--cell, var(--lime)); border: 3px solid var(--ink); border-radius: 9px; }
.art-grid i:nth-child(2), .art-grid i:nth-child(6) { --cell: var(--coral); }
.art-grid i:nth-child(4) { grid-column: span 2; --cell: var(--butter); }
.art-pill { display: grid; place-items: center; }
.art-pill i { position: absolute; width: 72%; height: 38%; border: 3px solid var(--ink); border-radius: 999px; background: var(--coral); transform: rotate(25deg); }
.art-pill i:nth-child(2) { background: var(--blue); transform: rotate(-28deg); mix-blend-mode: multiply; }
.art-numbers b { display: block; color: var(--blue); font-size: clamp(80px, 9vw, 136px); line-height: .8; }
.art-numbers i { display: block; width: 86%; height: 13px; margin: 14px 0 0 auto; background: var(--lime); border: 2px solid var(--ink); transform: rotate(-5deg); }
.art-cross i { position: absolute; top: 44%; left: 10%; width: 80%; height: 18px; background: var(--coral); transform: rotate(36deg); }
.art-cross i:nth-child(2) { background: var(--lime); transform: rotate(-36deg); }
.art-sun i:first-child { position: absolute; top: 4%; left: 50%; width: min(70%, 150px); aspect-ratio: 1; background: var(--coral); border: 3px solid var(--ink); border-radius: 50%; translate: -50% 0; }
.art-sun i:nth-child(2) { position: absolute; right: -20%; bottom: 0; left: -20%; height: 45%; background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 17px); transform: perspective(80px) rotateX(32deg); }
.art-arrow i { position: absolute; top: 10%; right: 13%; width: 50%; aspect-ratio: 1; border-top: 20px solid var(--lime); border-right: 20px solid var(--lime); }
.art-arrow i::after { position: absolute; top: -9px; right: -5px; width: 130%; height: 20px; background: var(--lime); content: ""; transform: rotate(-45deg); transform-origin: right center; }
.art-eye { display: grid; place-items: center; }
.art-eye i { width: 88%; height: 66%; background: var(--butter); border: 3px solid var(--ink); border-radius: 100% 0 100% 0; transform: rotate(-45deg); }
.art-eye b { position: absolute; width: 36%; aspect-ratio: 1; background: var(--blue); border: 3px solid var(--ink); border-radius: 50%; }

body[data-preset="editorial"] .work-card { border-radius: 5px; box-shadow: 4px 4px 0 rgb(20 23 18 / 18%); }
body[data-preset="editorial"] .canvas-head h3 { font-family: Georgia, serif; font-weight: 500; }
body[data-preset="catalog"] .work-card { border-width: 1px; border-radius: 24px; box-shadow: 0 12px 28px rgb(20 23 18 / 13%); }

.preview-footer { display: grid; grid-template-columns: repeat(3, auto) 1fr; align-items: center; gap: 12px; min-height: 62px; padding: 10px 16px; background: var(--ink); border-radius: 0 0 15px 15px; }
.preview-footer div { display: grid; gap: 3px; padding-right: 12px; border-right: 1px solid rgb(255 255 255 / 16%); }
.preview-footer span { color: rgb(255 255 255 / 48%); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.preview-footer b { color: var(--lime); font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.preview-footer p { margin: 0 0 0 auto; max-width: 42ch; color: rgb(255 255 255 / 66%); font-size: 10px; line-height: 1.45; text-align: right; }

.insight-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 16px; margin-top: 16px; }
.insight-panel,
.code-panel { padding: 24px; }
.insight-panel header { display: flex; align-items: center; gap: 13px; }
.comparison-visual { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: center; gap: 9px; height: 190px; margin-top: 20px; padding: 18px; background: #e9e7df; border-radius: 17px; overflow: hidden; }
.comparison-visual > i { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--ink); border-radius: 50%; font-style: normal; }
.mini-layout { position: relative; height: 142px; }
.mini-layout span { position: absolute; width: calc(33.333% - 5px); background: var(--mini-color); border: 2px solid var(--ink); border-radius: 7px; }
.mini-layout span:nth-child(3n + 1) { --mini-color: var(--coral); left: 0; }
.mini-layout span:nth-child(3n + 2) { --mini-color: var(--lime); left: 33.333%; }
.mini-layout span:nth-child(3n) { --mini-color: var(--blue); left: 66.666%; }
.regular-mini span:nth-child(-n + 3) { top: 0; height: var(--mini-h); }
.regular-mini span:nth-child(n + 4) { top: 80px; height: var(--mini-h); }
.mini-layout span:nth-child(1), .mini-layout span:nth-child(5) { --mini-h: 72px; }
.mini-layout span:nth-child(2), .mini-layout span:nth-child(6) { --mini-h: 48px; }
.mini-layout span:nth-child(3), .mini-layout span:nth-child(4) { --mini-h: 62px; }
.lanes-mini span:nth-child(1) { top: 0; height: 72px; }
.lanes-mini span:nth-child(2) { top: 0; height: 48px; }
.lanes-mini span:nth-child(3) { top: 0; height: 62px; }
.lanes-mini span:nth-child(4) { top: 77px; height: 62px; }
.lanes-mini span:nth-child(5) { top: 53px; height: 72px; }
.lanes-mini span:nth-child(6) { top: 67px; height: 48px; }
.insight-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.insight-points div { min-width: 0; padding: 12px; background: #f1efe8; border-radius: 12px; }
.insight-points span { color: var(--coral); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; }
.insight-points p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.insight-points b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; }

.code-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.code-heading button { min-height: 40px; padding: 0 14px; color: white; background: var(--ink); border: 0; border-radius: 10px; font-size: 10px; font-weight: 800; cursor: pointer; }
.code-tabs { display: flex; gap: 5px; margin-top: 20px; }
.code-tabs button { min-width: 76px; height: 35px; color: var(--muted); background: #edeee9; border: 1px solid var(--line); border-radius: 9px 9px 0 0; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 800; cursor: pointer; }
.code-tabs button[aria-selected="true"] { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.code-panel pre { min-height: 285px; max-height: 340px; margin: 0; padding: 18px; color: #e8ede8; background: #151916; border-radius: 0 13px 13px 13px; overflow: auto; }
.code-panel code { font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.72; white-space: pre; }
.support-note { display: flex; align-items: center; gap: 9px; min-height: 40px; margin-top: 12px; padding: 8px 11px; background: #f1efe8; border-radius: 10px; }
.support-note span { flex: 0 0 auto; width: 10px; height: 10px; background: var(--butter); border-radius: 50%; box-shadow: 0 0 0 4px rgb(255 215 104 / 24%); }
.support-note span.supported { background: #26b987; box-shadow: 0 0 0 4px rgb(38 185 135 / 20%); }
.support-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 25px 6px 0; }
.page-footer div { display: flex; gap: 16px; }
.page-footer a { color: var(--muted); font-size: 10px; font-weight: 700; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; padding: 12px 16px; color: white; background: var(--ink); border-radius: 11px; box-shadow: var(--shadow); font-size: 11px; font-weight: 800; opacity: 0; pointer-events: none; translate: 0 12px; transition: opacity .2s, translate .2s; }
.toast.show { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1180px) {
  .hero { min-height: 0; }
  .lead { padding-right: 0; }
  .hero-actions { position: static; justify-content: flex-start; margin-top: 18px; }
  .studio { grid-template-columns: 258px minmax(0, 1fr); }
  .controls { padding-inline: 16px; }
  .canvas-legend { display: none; }
  .preview-footer { grid-template-columns: repeat(3, 1fr); }
  .preview-footer p { grid-column: 1 / -1; margin-left: 0; text-align: left; }
}

@media (max-width: 900px) {
  .page { width: min(100% - 18px, 780px); padding-top: 16px; }
  .studio { grid-template-columns: 1fr; }
  .preview-panel { height: auto; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .preset-list { grid-template-columns: repeat(3, 1fr); }
  .preset-list button { grid-template-columns: 29px 1fr; }
  .preset-list button small { display: none; }
  .controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .control-intro, .preset-list, .switch-stack, .shuffle-button { grid-column: 1 / -1; }
  .shuffle-button { width: min(100%, 280px); justify-self: center; }
  .insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .page { width: min(100% - 12px, 520px); }
  .hero { padding: 6px 7px 22px; }
  h1 { font-size: clamp(28px, 9vw, 46px); white-space: normal; }
  .lead { margin-top: 17px; font-size: 14px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .support-chip { grid-column: 1 / -1; }
  .top-button { padding-inline: 10px; }
  .lab-shell, .insight-panel, .code-panel { border-radius: 18px; }
  .section-heading { align-items: flex-start; min-height: 76px; padding: 13px; }
  .section-number { width: 42px; height: 42px; }
  .section-heading h2 { font-size: 20px; }
  .heading-metrics { display: none; }
  .controls { display: block; padding: 18px 14px; }
  .preset-list { grid-template-columns: 1fr; }
  .preset-list button small { display: block; }
  .preview-panel { padding: 9px; }
  .browser-bar { padding-inline: 10px; }
  .browser-state span { display: none; }
  .canvas-head { padding: 17px 15px 14px; }
  .canvas-head h3 { font-size: 28px; }
  .preview-panel { grid-template-rows: auto auto 510px auto; }
  .preview-scroller { min-height: 0; }
  .preview-stage { min-width: 680px; }
  .preview-footer { grid-template-columns: 1fr 1fr; }
  .preview-footer div:nth-child(3) { display: none; }
  .insight-panel, .code-panel { padding: 17px 14px; }
  .comparison-visual { height: 160px; padding: 10px; }
  .mini-layout { height: 130px; }
  .insight-points { grid-template-columns: 1fr; }
  .code-heading { align-items: flex-start; }
  .code-panel pre { min-height: 315px; }
  .page-footer { align-items: flex-start; }
}
