:root {
  color-scheme: light;
  --paper: #d1d1c6;
  --panel: #deded3;
  --steel: #b7bab1;
  --ink: #232520;
  --line: #666b60;
  --dark: #252723;
  --rust: #eb8f62;
  --sage: #cad3ad;
  font: 14px/1.5 "Courier New", monospace;
  color: var(--ink);
  background: #858881;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background-image: repeating-linear-gradient(0deg,#00000009 0 1px,transparent 1px 4px);
}
button, select, input { font: inherit; }
button, a, select, input { touch-action: manipulation; }
button { cursor: pointer; }
:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #315983; outline-offset: 3px; }
.skip { position: absolute; transform: translateY(-180%); padding: 10px; background: var(--rust); z-index: 1; }
.skip:focus { transform: none; }
.page { width: min(1054px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 22px; }
header, section { border: 1px solid var(--dark); }
.masthead, .strap, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.masthead { padding: 8px 14px; color: #f0efe2; background: var(--dark); font-size: .86rem; }
.masthead nav { display: flex; gap: 20px; flex-wrap: wrap; }
.banner { display: grid; grid-template-columns: 58% 42%; min-height: 197px; border-top: 1px solid #686956; background: #333630; color: #eeede2; }
.title { position: relative; display: grid; align-content: center; padding: 8px 29px 19px; }
.title h1 { font: 900 clamp(76px, 13vw, 142px)/.8 Arial, Helvetica, sans-serif; letter-spacing: -.087em; margin: 0 0 14px -.055em; }
.title h1 span { color: var(--rust); margin-left: .035em; }
.title p { margin: 0; font-weight: bold; color: var(--sage); letter-spacing: .17em; }
.banner-image { position: relative; overflow: hidden; border-left: 1px solid #141611; background: #555950 url("./media/header.webp") center 48% / cover no-repeat; }
.gears { position: absolute; inset: 0; pointer-events: none; }
.gear { position: absolute; aspect-ratio: 1; }
.gears.motion-enabled .gear { animation: spin var(--duration) linear infinite; }
.gear-large { --duration: 20s; width: clamp(72px, 13vw, 163px); bottom: -16%; right: 12%; }
.gear-small { --duration: 14s; width: clamp(49px, 9.1vw, 110px); bottom: 38%; right: -2%; filter: brightness(.79); }
.gears.motion-enabled .gear-small { animation-direction: reverse; }
.gears.motion-enabled.paused .gear { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .gears.motion-enabled .gear { animation: none; }
  button.gear-toggle:not(.text-button) { display: none; }
}
button.gear-toggle:not(.text-button) {
  position: absolute; right: 6px; bottom: 6px; min-height: 27px; min-width: 29px;
  padding: 2px 6px; background: var(--dark); border-color: #a4a698; color: #eeede2;
}
button.gear-toggle:not(:disabled):hover:not(.text-button) { color: var(--ink); }
.strap { padding: 7px 14px; color: var(--ink); background: var(--sage); border-top: 1px solid var(--dark); }
.strap p { margin: 0; }
.strap span { white-space: nowrap; font-size: .85rem; }
.strap i { display: inline-block; width: .63em; height: .63em; background: #437049; border: 1px solid #304d34; }
main { display: grid; gap: 16px; margin-top: 16px; }
.section-bar { margin: 0; color: #f5f2e7; background: var(--dark); padding: 6px 13px; font-size: 1rem; }
.bench { display: grid; grid-template-columns: 206px minmax(0, 1fr); background: var(--panel); }
.tools { background: var(--steel); border-right: 1px solid var(--line); padding: 15px 13px; }
fieldset { margin: 0; border: 0; padding: 0; display: grid; gap: 4px; min-width: 0; }
legend { padding: 0 0 7px; font-weight: bold; }
fieldset label { position: relative; cursor: pointer; }
fieldset input { position: absolute; opacity: 0; inset: 0; }
fieldset span { display: block; min-height: 36px; border: 1px solid var(--line); padding: 6px 10px; background: var(--paper); }
fieldset span::before { content: '·'; display: inline-block; width: 1.15em; }
fieldset label:hover span { background: #e8e8dc; }
fieldset input:checked + span { background: var(--rust); border-color: #613b29; font-weight: bold; }
fieldset input:checked + span::before { content: '›'; }
fieldset input:focus-visible + span { outline: 3px solid #315983; outline-offset: 1px; }
.tool-note { line-height: 1.4; font-size: .86rem; margin: 14px 0 0; }
.console { padding: 14px 18px 15px; min-width: 0; }
.input-header { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 5px; }
h3, p { margin: 0; }
h3 { font-size: 1.05rem; }
.text-button { padding: 4px 0 4px 8px; border: 0; color: #304568; background: none; text-decoration: underline; text-underline-offset: 3px; }
.drop { padding: 12px; border: 1px dashed var(--line); background: #ccccbf; overflow-wrap: anywhere; }
.drop.drag { border-style: solid; background: var(--sage); }
.drop > div { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drop p { margin-top: 6px; color: #3d4036; font-size: .88rem; }
button:not(.text-button), .button, .picker, select, input[type="number"] {
  border: 1px solid #54594f;
  color: var(--ink);
  background: #eeeee4;
  min-height: 36px;
  padding: 6px 10px;
}
.button, .picker { display: inline-flex; align-items: center; text-decoration: none; }
.picker { position: relative; cursor: pointer; }
.picker input { opacity: 0; position: absolute; inset: 0; width: 100%; cursor: pointer; }
.picker:focus-within { outline: 3px solid #315983; outline-offset: 3px; }
.picker:has(input:disabled) { opacity: .6; }
.effect-header { margin-top: 14px; }
.effect-header p { color: #424539; font-size: .91rem; margin-top: 2px; }
.options { display: flex; align-items: end; gap: 8px 13px; flex-wrap: wrap; margin-top: 9px; }
.options label { display: grid; gap: 3px; min-width: 0; font-size: .89rem; }
.options select { max-width: 100%; }
.options input[type="number"] { width: 100px; }
.secondary { margin-top: 12px; border: 1px solid var(--line); padding: 8px; background: var(--paper); font-size: .89rem; }
.clip-header, .clip-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.clip-header { justify-content: space-between; }
.clip-header h4 { margin: 0; font-size: 1rem; }
#clip-help { margin-top: 3px; color: #424539; }
#clip-list { display: grid; gap: 4px; padding-left: 26px; margin: 6px 0 0; }
#clip-list:empty { display: none; }
#clip-list li { padding-top: 4px; border-top: 1px dotted var(--line); }
.clip-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.clip-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.clip-entry input[type="number"] { width: 76px; }
button.clip-action:not(.text-button) { min-width: 29px; padding: 2px 6px; min-height: 28px; }
.acceleration { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 11px; font-size: .89rem; }
.acceleration p { color: #424539; }
.render { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
button.primary { background: var(--rust); border-color: #613b29; font-weight: bold; }
button.primary span { margin-left: 9px; }
button:not(:disabled):hover:not(.text-button), .picker:hover, .button:hover { background: #f4dfbb; }
button:disabled { opacity: .65; }
.status { min-height: 1.3rem; margin: 7px 0 0; color: #3d4036; font-size: .88rem; }
.status progress { width: 100%; height: 7px; accent-color: #3e5941; }
.monitors, .reel { display: grid; gap: 8px; }
.monitors { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.monitors figcaption { margin-top: 0; padding: 4px 7px; background: var(--steel); border: 1px solid var(--line); }
.monitors figcaption { overflow-wrap: anywhere; }
.monitors .clip-actions { margin-top: 5px; }
.monitors p { padding: 8px; }
.reel { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px; background: var(--paper); }
.reel-preview { position: relative; }
.reel-preview button:not(.text-button) {
  position: absolute; inset: auto auto 7px 7px; color: #f5f2e7; background: var(--dark);
  border-color: #a4a698; min-width: 44px; min-height: 36px;
}
.reel-preview button:not(:disabled):hover:not(.text-button) { color: var(--ink); }
#reel-status { padding: 0 10px 10px; background: var(--paper); font-size: .88rem; }
figure { margin: 0; min-width: 0; }
video { display: block; background: #20211d; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
figcaption { font-size: .86rem; margin-top: 4px; }
footer { margin-top: 12px; font-size: .84rem; padding: 7px 0; border-top: 1px solid #30322c; color: #141611; }
@media (max-width: 690px) {
  .page { width: calc(100% - 20px); padding: 10px 0; }
  .masthead { align-items: flex-start; flex-direction: column; gap: 4px; }
  .masthead nav { gap: 15px; }
  .banner { min-height: 143px; grid-template-columns: 59% 41%; }
  .title { padding-left: 15px; }
  .title p { font-size: .87rem; letter-spacing: .07em; }
  .strap { align-items: flex-start; flex-direction: column; gap: 3px; }
  .bench { grid-template-columns: minmax(0, 1fr); }
  .tools { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  fieldset { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  fieldset span { padding: 9px 5px; min-height: 42px; font-size: .88rem; }
  fieldset span::before { width: .75em; }
  .tool-note { margin-top: 8px; }
  .console { padding: 12px; }
  button:not(.text-button), .button, .picker, select, input[type="number"] { min-height: 44px; }
  select, input[type="number"] { font-size: 16px; }
  .reel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reel-preview button:not(.text-button) { min-height: 44px; }
  button.gear-toggle:not(.text-button) { min-height: 32px; min-width: 32px; }
  button.clip-action:not(.text-button) { min-height: 40px; min-width: 40px; }
}
@media (max-width: 390px) {
  .monitors { grid-template-columns: 1fr; }
  .title h1 { font-size: clamp(58px, 19.5vw, 76px); }
}
@media (max-width: 350px) {
  fieldset span::before { display: none; }
}
