/* axi0 Animate (/my/animate/): the axi0 family look, as on Translate and Notes. True black or paper (theme.js: the
   device's setting, or the choice kept in this browser and in the Key profile), Instrument Sans, the orange core as
   the one accent. No inline styles in the markup. */
@font-face {
  font-family: "Instrument Sans";
  src: url(/axi0/fonts/instrument-sans-latin-var.woff2) format("woff2");
  font-weight: 400 700;
  font-display: optional;
}
:root {
  --bg: #000; --panel: #0a0a0c; --field: #050506; --btn: #111114; --raise: #18181d; --stage-pic: #000; --over: #120d08; --ask: #0d0a07;
  --line: #1c1c21; --line1b: #1d1d23; --line2: #2a2a31; --field-line: #2a2a31;
  --head: #fff; --ink2: #e7e7ec; --chip: #e2e2e8; --text: #d6d6dc; --text2: #c8c8d0; --soft: #b4b4bd; --lede: #a3a3ad;
  --soft4: #9a9aa4; --mute: #8e8e98; --faint: #868692; --foot-link: #c4c4cc; --knob-off: #55555e;
  --core: #f6a04d; --core-ink: #f6a04d; --core-hover: #ffb469; --on-core: #000;
  --danger: #ff8f78; --ok: #4fe0b0; --uline: rgba(196, 196, 204, .45);
  color-scheme: dark;
}
html[data-axi0-theme="light"] {
  --bg: #f6f2ea; --panel: #fffdf9; --field: #fffdf9; --btn: #fffdf9; --raise: #ece5d8; --stage-pic: #ece5d8; --over: #fbeedd; --ask: #fdf3e6;
  --line: #e6dfd3; --line1b: #e6dfd3; --line2: #d3cabb; --field-line: #8a8174;
  --head: #17140f; --ink2: #1f1b16; --chip: #2c2823; --text: #2c2823; --text2: #3d3730; --soft: #4a433b; --lede: #4f4940;
  --soft4: #5d554b; --mute: #675f54; --faint: #675f54; --foot-link: #3d3730; --knob-off: #8a8174;
  --core-ink: #9a4a0a; --danger: #b3261e; --ok: #1d6b4f; --uline: rgba(61, 55, 48, .45);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  html:not([data-axi0-theme="dark"]) {
    --bg: #f6f2ea; --panel: #fffdf9; --field: #fffdf9; --btn: #fffdf9; --raise: #ece5d8; --stage-pic: #ece5d8; --over: #fbeedd; --ask: #fdf3e6;
    --line: #e6dfd3; --line1b: #e6dfd3; --line2: #d3cabb; --field-line: #8a8174;
    --head: #17140f; --ink2: #1f1b16; --chip: #2c2823; --text: #2c2823; --text2: #3d3730; --soft: #4a433b; --lede: #4f4940;
    --soft4: #5d554b; --mute: #675f54; --faint: #675f54; --foot-link: #3d3730; --knob-off: #8a8174;
    --core-ink: #9a4a0a; --danger: #b3261e; --ok: #1d6b4f; --uline: rgba(61, 55, 48, .45);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font: 15px/1.55 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--core-ink); text-underline-offset: 3px; }
::selection { background: rgba(246, 160, 77, .35); }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 8px 14px; border-radius: 999px; background: var(--core); color: var(--on-core); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--core-ink); outline-offset: 2px; }

/* ---- header ------------------------------------------------------------------------------------------------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1080px; margin: 0 auto; padding: 22px 20px 8px; }
.mark { display: inline-flex; align-items: baseline; gap: .12em; color: var(--head); text-decoration: none; font-size: 26px; font-weight: 600; letter-spacing: -.045em; white-space: nowrap; }
.mark-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--core); box-shadow: 0 0 9px var(--core); transform: translateY(-2px); }
.mark-s { color: var(--mute); font-weight: 500; }
.top-right { display: flex; align-items: center; gap: 14px; }
.top-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 20px; }
.top-nav a { color: var(--soft); text-decoration: none; font-size: 14px; line-height: 44px; }
.top-nav a:hover { color: var(--head); text-decoration: underline; }
.theme-btn {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line2); border-radius: 50%;
  background: var(--panel); color: var(--soft); cursor: pointer; transition: border-color .15s, color .15s;
}
.theme-btn:hover { border-color: var(--core); color: var(--head); }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-moon, html[data-axi0-theme="light"] .theme-btn .i-sun { display: none; }
html[data-axi0-theme="light"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  html:not([data-axi0-theme="dark"]) .theme-btn .i-sun { display: none; }
  html:not([data-axi0-theme="dark"]) .theme-btn .i-moon { display: block; }
}
.me-slot { position: relative; flex: none; width: 36px; height: 36px; }
.me-slot:empty { display: none; }

/* ---- layout ------------------------------------------------------------------------------------------------- */
main { max-width: 1080px; margin: 0 auto; padding: 4px 20px 28px; }
h1 { margin: 22px 0 8px; color: var(--head); font-size: clamp(32px, 5vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
h2 { margin: 0 0 10px; color: var(--head); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.lede { max-width: 46em; margin: 0; color: var(--lede); }
.error { margin: 8px 0 0; color: var(--danger); font-size: 13.5px; }
.error:empty { display: none; }

/* ---- the stage ---------------------------------------------------------------------------------------------- */
.stage-wrap { margin: 24px 0 0; }
.stage {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px; background: var(--panel);
}
.stage.is-over { border-color: var(--core); background: var(--over); }
.stage.has-pic { aspect-ratio: auto; max-height: none; border-color: var(--line); background: var(--stage-pic); }
.pick { display: grid; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.pick-t { margin: 0; color: var(--mute); font-size: 13.5px; }
#view { display: block; }

.state { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 44px; margin: 10px 0 0; }
.state-t { flex: 1 1 22em; margin: 0; color: var(--mute); font-size: 13.5px; }
.state-t.is-bad { color: var(--danger); }
progress { flex: 0 1 220px; height: 6px; border: 0; border-radius: 999px; background: var(--line1b); color: var(--core-ink); accent-color: var(--core); -webkit-appearance: none; appearance: none; }
progress::-webkit-progress-bar { border-radius: 999px; background: var(--line1b); }
progress::-webkit-progress-value { border-radius: 999px; background: var(--core); }
progress::-moz-progress-bar { border-radius: 999px; background: var(--core); }
.ask { margin: 6px 0 0; padding: 16px 18px; border: 1px solid rgba(246, 160, 77, .45); border-radius: 16px; background: var(--ask); }
.ask p { margin: 0 0 10px; color: var(--ink2); }

/* ---- cards, rows, buttons ----------------------------------------------------------------------------------- */
.card { margin: 14px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.card p { margin: 0 0 10px; }
.cards { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; }
.row.tight { flex-wrap: nowrap; }
.hint, .note { margin: 10px 0 0; color: var(--mute); font-size: 13px; }
.note:empty { display: none; }
.note.is-bad { color: var(--danger); }
.note.is-ok { color: var(--ok); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; margin: 0;
  border: 1px solid var(--line2); border-radius: 999px; background: var(--btn); color: var(--head); font: inherit; font-size: 14px;
  white-space: nowrap; cursor: pointer; transition: border-color .15s;
}
.btn:hover { border-color: rgba(246, 160, 77, .7); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { border-color: var(--core); background: var(--core); color: var(--on-core); font-weight: 600; }
.btn.primary:hover { background: var(--core-hover); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--head); outline-offset: 2px; }
select, input[type=text] {
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: 12px;
  background: var(--field); color: var(--head); font: inherit; font-size: 14px;
}
input[type=text] { flex: 1 1 auto; min-width: 0; }
input[type=text]::placeholder { color: var(--mute); }
select:focus, input[type=text]:focus { outline: none; border-color: var(--core); box-shadow: 0 0 0 3px rgba(246, 160, 77, .18); }
label { color: var(--text2); font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; }
.check input { width: 18px; height: 18px; accent-color: var(--core); }
.done { margin: 10px 0 0; font-size: 14px; }
.done span { color: var(--mute); }
#ebar { display: block; width: 100%; margin: 10px 0 0; }

/* ---- motion controls ---------------------------------------------------------------------------------------- */
.styles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.styles legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; color: var(--text2); font-size: 14px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 999px; color: var(--chip); cursor: pointer; }
.chip input:checked + span { border-color: var(--core); background: rgba(246, 160, 77, .14); color: var(--head); }
.chip input:focus-visible + span { outline: 2px solid var(--core-ink); outline-offset: 2px; }
.styles:disabled .chip span { opacity: .5; cursor: default; }
.range-row { display: flex; align-items: center; gap: 14px; margin: 16px 0 0; }
.range-row input { flex: 1 1 auto; max-width: 420px; accent-color: var(--core); }
.range-row output { min-width: 2.5em; color: var(--head); font-variant-numeric: tabular-nums; }

/* ---- the switch that is not there yet ----------------------------------------------------------------------- */
.pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--line1b); color: var(--text2); font-size: 11.5px; font-weight: 500; letter-spacing: .02em; vertical-align: 2px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--soft4); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line1b); border: 1px solid var(--line2); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--knob-off); }
.switch input:checked + .track { background: rgba(246, 160, 77, .4); }
.switch input:checked + .track::after { left: 19px; background: var(--core); }

.facts { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--lede); font-size: 14px; }
.facts li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.facts strong { display: block; margin-bottom: 4px; color: var(--head); font-weight: 600; }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- footer ------------------------------------------------------------------------------------------------ */
.foot { max-width: 1080px; margin: 0 auto; padding: 4px 20px 44px; color: var(--faint); font-size: 12.5px; }
.foot p { margin: 0 0 6px; max-width: 60em; }
.foot a { color: var(--foot-link); text-decoration: underline; text-decoration-color: var(--uline); }
.foot a:hover { text-decoration-color: currentColor; }

@media (max-width: 600px) {
  .top { flex-wrap: wrap; gap: 4px 12px; padding: 16px 16px 2px; }
  .mark { margin-right: auto; font-size: 22px; }
  .top-right { display: contents; }
  .top-nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 0 14px; margin: 0; }
  main { padding: 0 14px 22px; }
  .stage { aspect-ratio: 4 / 3; }
  .card { padding: 16px; }
  .foot { padding: 4px 16px 36px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .theme-btn { transition: none; } }
