:root {
  color-scheme: dark;
  color: #f1eee4;
  background: #111411;
  font: 16px/1.55 system-ui, sans-serif;
  --muted: #b4b9ab;
  --line: #3b4339;
  --lime: #e2ef73;
  --mono: ui-monospace, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--lime); }
button { font: inherit; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
[hidden] { display: none !important; }

.shell { width: min(1344px, 100% - 80px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; }
.header-inner a { text-decoration: none; }
.header-inner nav { display: flex; gap: clamp(12px, 3vw, 24px); color: var(--muted); font-size: .9rem; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 650 1rem var(--mono); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  background: var(--lime);
  color: #171b10;
  border-radius: 5px;
  font-size: .76rem;
}

.intro { padding-block: clamp(36px, 5vw, 72px) clamp(26px, 3.5vw, 44px); }
.comparison-intro { padding-block: clamp(28px, 4vw, 52px) 25px; }
.kicker { color: var(--lime); text-transform: uppercase; letter-spacing: .13em; font: 650 .85rem var(--mono); }
h1, .playground-intro h2 {
  margin-block: 11px 15px;
  font: 400 clamp(3.1rem, 7vw, 6.5rem)/.98 Georgia, serif;
  letter-spacing: -.068em;
}
.playground-intro h2 { font-size: clamp(2.5rem, 6vw, 4.75rem); }
.intro em { color: var(--lime); font-weight: inherit; }
.lede { max-width: 64ch; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.18rem); }

.comparison { margin: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #191e18; }
.comparison video { display: block; width: 100%; height: auto; aspect-ratio: 2248 / 896; background: #101018; }
.comparison figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.comparison-links { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--lime); }

.playground { display: grid; grid-template-columns: minmax(0, .73fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 11px; min-width: 0; background: #191e18; }
.panel-header, .actions, .preview-note { display: flex; align-items: center; gap: 8px 14px; padding: 11px 15px; }
.panel-header { justify-content: space-between; min-height: 58px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: .92rem; }
.dimensions { font: .85rem var(--mono); color: var(--muted); }
.files { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 4px 11px 0; border-bottom: 1px solid var(--line); }
button {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: .88rem;
}
button:enabled:hover { border-color: var(--line); color: var(--lime); }
button:disabled { opacity: .55; cursor: default; }
.files button { border-radius: 4px 4px 0 0; font-family: var(--mono); }
.files [aria-pressed="true"] { color: var(--lime); border-bottom-color: var(--lime); }
#code {
  display: block;
  width: 100%;
  height: clamp(19rem, 33vw, 33rem);
  resize: vertical;
  padding: 15px;
  border: 0;
  border-radius: 0;
  color: #e0ecc9;
  background: #111610;
  font: .91rem/1.55 var(--mono);
  tab-size: 4;
}
#code:focus-visible { outline-offset: -2px; }
.actions, .preview-note { flex-wrap: wrap; border-top: 1px solid var(--line); }
.actions #status { flex: 1 1 11rem; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.actions #status.error { color: #ffbda8; }
.primary { background: var(--lime); color: #181d10; font-weight: 700; padding-inline: 13px; }
.primary:enabled:hover { background: #f3ff9a; color: #181d10; }
#copy, #jump { border-color: var(--line); }
#preview-stage { position: relative; overflow: hidden; aspect-ratio: 1040 / 688; background: #1c201e; }
#preview {
  display: block;
  width: 1040px;
  height: 688px;
  border: 0;
  transform: scale(var(--scale, 0));
  transform-origin: top left;
}
.preview-note { justify-content: space-between; min-height: 64px; }
.preview-note p { max-width: 48ch; flex: 1 1 16rem; color: var(--muted); }
.preview-note strong { color: #f1eee4; }

.details { max-width: 67ch; margin-block: 42px 52px; }
.details h2 { font: 400 2.1rem/1.1 Georgia, serif; }
.details p { margin-block: 11px; color: var(--muted); }
.details a { color: var(--lime); }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@media (max-width: 860px) {
  .shell { width: calc(100% - 40px); }
  .playground { grid-template-columns: minmax(0, 1fr); }
  .preview { grid-row: 1; }
  #code { height: 21rem; }
}
@media (max-width: 400px) {
  .shell { width: calc(100% - 28px); }
  .panel-header, .actions, .preview-note { padding-inline: 11px; }
  .files { padding-inline: 4px; }
  .files button { padding-inline: 8px; font-size: .8rem; }
}
