/* Animated shares the Director's Console layout while carrying its own mint accent. */
body.origami-page {
  --bg: #0c1717;
  --panel: #142320;
  --panel-soft: #0f1d1b;
  --line: #26463b;
  --text: #edf9f3;
  --muted: #a3bdb1;
  --faint: #628175;
  --accent: #78e2aa;
  --accent-ink: #061a11;
  --danger: #ff9d9d;
  --shadow: 0 18px 48px rgb(0 0 0 / 0.26);
  color: var(--text);
  background:
    linear-gradient(rgb(7 17 16 / 0.74), rgb(7 17 16 / 0.94)),
    radial-gradient(circle at 84% -6%, rgb(120 226 170 / 0.16), transparent 33rem),
    var(--bg);
}

body.origami-page::before { display: none; }
body.origami-page .site-header {
  border-bottom-color: rgb(120 226 170 / 0.2);
  background: rgb(7 17 16 / 0.88);
}
body.origami-page .service-switcher {
  border-color: rgb(120 154 143 / 0.3);
  background: rgb(6 15 14 / 0.78);
}
body.origami-page .panel {
  border-color: rgb(120 154 143 / 0.26);
  background: linear-gradient(150deg, rgb(22 42 36 / 0.95), rgb(13 29 27 / 0.96));
}
body.origami-page .brand.is-animated .brand-mark {
  border-color: rgb(120 226 170 / 0.78);
  border-radius: 8px 2px 8px 2px;
  background: rgb(120 226 170 / 0.14);
  box-shadow: 0 0 0 1px rgb(120 226 170 / 0.14), 0 0 14px rgb(120 226 170 / 0.1);
  color: #a7f1c9;
}
body.origami-page .service-switcher-button[aria-current="page"] {
  background: rgb(120 226 170 / 0.17);
  color: #a7f1c9;
}
body.origami-page .service-switcher-button:focus-visible,
body.origami-page a:focus-visible,
body.origami-page button:focus-visible,
body.origami-page input:focus-visible,
body.origami-page textarea:focus-visible,
body.origami-page select:focus-visible,
body.origami-page summary:focus-visible {
  outline-color: var(--accent);
}
.origami-home-link {
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}
.origami-home-link:hover { color: var(--text); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

body.origami-page .terms-banner {
  border-color: rgb(120 154 143 / 0.28);
  background: linear-gradient(135deg, rgb(120 226 170 / 0.1), rgb(12 28 25 / 0.95));
}

.origami-inline-status {
  min-height: 22px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}
.origami-unsupported {
  max-width: 760px;
  margin: 0 auto 28px;
  border-color: rgb(255 157 157 / 0.34);
}
.origami-unsupported h2 { margin-top: 8px; }
.origami-unsupported p { color: var(--muted); font-size: 13px; }
.origami-unsupported-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.origami-unsupported-actions .secondary-button { padding: 10px 13px; text-decoration: none; }

.origami-workspace { display: block; }
.origami-source-panel { width: 100%; }
.origami-drop-zone { min-height: 205px; }
.origami-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.origami-drop-zone:has(.origami-file-input:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(120 226 170 / 0.12);
}
.origami-source-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 20px;
  margin-top: 0;
  padding: 15px;
  border-color: rgb(120 154 143 / 0.28);
  background: rgb(6 15 14 / 0.68);
}
.origami-source-card .source-meta { min-width: 0; }
.origami-source-card .text-button { align-self: center; }
.field-feedback { min-height: 18px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.field-feedback.is-error { color: var(--danger); }
.field-feedback.is-success { color: #92e4bf; }

#origami-form { display: grid; gap: 18px; }
.origami-field select,
.origami-field input[type="number"],
.origami-field textarea {
  width: 100%;
  border: 1px solid rgb(120 154 143 / 0.35);
  border-radius: 7px;
  background: rgb(5 14 13 / 0.72);
  color: var(--text);
}
.origami-field select,
.origami-field input[type="number"] {
  min-height: 42px;
  padding: 0 12px;
}
.origami-field textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
  line-height: 1.65;
}
.origami-field select:focus,
.origami-field input[type="number"]:focus,
.origami-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(120 226 170 / 0.11);
  outline: 0;
}
.origami-field textarea::placeholder { color: var(--faint); }
.origami-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.origami-field input[type="number"]::-webkit-inner-spin-button { opacity: 1; }
.origami-advanced {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgb(120 154 143 / 0.18);
}
.origami-advanced summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.origami-range-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 16px; }
.origami-range-field { display: grid; gap: 9px; color: var(--muted); font-size: 12px; }
.origami-range-field > span { display: flex; justify-content: space-between; gap: 10px; }
.origami-range-field strong { color: var(--text); }
.origami-range-field output { color: var(--accent); font: 700 11px Consolas, monospace; }
.origami-range-field input { width: 100%; accent-color: var(--accent); }
.origami-chroma-note {
  margin: 19px 0 0;
  padding: 12px 14px;
  border: 1px solid rgb(120 226 170 / 0.2);
  border-radius: 7px;
  background: rgb(120 226 170 / 0.06);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.origami-chroma-note strong { color: var(--accent); }
.origami-generate-panel { margin-top: 20px; }
.origami-generate-panel .primary-button { margin-top: 0; }
.origami-generate-panel .primary-button:disabled { opacity: 0.42; }

.origami-preview-panel { min-width: 0; }
.origami-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.origami-preview-card {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(120 154 143 / 0.27);
  border-radius: 7px;
  background: rgb(5 14 13 / 0.7);
}
.origami-preview-card canvas,
.origami-preview-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #060d12;
}
.origami-preview-visual { height: clamp(170px, 32vw, 440px); min-width: 0; background: #060d12; }
.origami-preview-visual img:not([src]) { visibility: hidden; }
.origami-preview-card canvas { image-rendering: auto; }
.origami-preview-card > span { padding: 8px 10px; color: var(--muted); font-size: 10px; }
.origami-preview-panel .inline-note { margin-bottom: 0; }

.origami-job-panel { min-width: 0; }
.origami-stage-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 17px;
  padding: 0;
  list-style: none;
}
.origami-stage-list li {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 5px;
  border: 1px solid rgb(120 154 143 / 0.2);
  border-radius: 6px;
  color: var(--faint);
  text-align: center;
}
.origami-stage-list li span { font: 700 9px Consolas, monospace; }
.origami-stage-list li strong { overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.origami-stage-list li.is-current { border-color: var(--accent); background: rgb(120 226 170 / 0.11); color: var(--accent); }
.origami-stage-list li.is-done { border-color: rgb(120 226 170 / 0.35); color: #92e4bf; }
.origami-progress-track { overflow: hidden; min-height: 7px; }
.origami-progress-track span { width: 0; }
.origami-progress-track.is-active span { width: 28%; animation: origami-progress 1.8s ease-in-out infinite; }
.origami-progress-track.is-queued span { width: 8%; }
.origami-progress-track.is-complete span { width: 100%; }
.origami-progress-track.is-failed span { width: 100%; background: var(--danger); }
@keyframes origami-progress {
  0% { transform: translateX(-125%); }
  50% { transform: translateX(245%); }
  100% { transform: translateX(385%); }
}
.origami-job-panel .progress-message { margin-bottom: 0; }
.origami-job-details,
.origami-job-details dt,
.origami-job-details dd { margin: 0; }
.origami-job-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}
.origami-job-details dt { color: var(--faint); }
.origami-job-details dd { min-width: 0; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.origami-job-actions { display: flex; justify-content: flex-end; margin-top: 17px; }
.origami-job-actions .stop-job-button { min-height: 36px; padding: 0 13px; }

.origami-prompt-panel .origami-field textarea { min-height: 168px; color: #d5f1e1; font-family: Consolas, monospace; font-size: 11px; }
.origami-result-frame {
  display: grid;
  min-height: 230px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(120 154 143 / 0.28);
  border-radius: 7px;
  background: #060d12;
}
.origami-result-frame img { display: block; width: 100%; max-height: min(64vh, 620px); height: auto; object-fit: contain; }
.origami-preview-toggle { width: 100%; margin-top: 12px; padding: 10px 13px; }
.origami-result-panel .inline-note { margin-bottom: 0; }
.origami-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.origami-downloads a { padding: 9px 11px; font-size: 11px; text-decoration: none; }
.is-hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .origami-progress-track.is-active span { animation: none; }
  .origami-page *, .origami-page *::before, .origami-page *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 640px) {
  .origami-page .hero h1 { white-space: normal; }
  .origami-options, .origami-range-grid { grid-template-columns: 1fr; }
  .origami-stage-list { gap: 3px; }
  .origami-stage-list li { padding: 7px 2px; }
  .origami-stage-list li strong { font-size: 9px; }
  .origami-source-card { grid-template-columns: 1fr; }
  .origami-source-card .text-button { justify-self: start; }
}
