/* The Lotan Group system: ink background, glass cards, the orange->yellow
   accent, Montserrat over Inter.  Tokens lifted from the site itself. */

:root {
  --ink:        #08090c;
  --ink-2:      #0b0d12;
  --ink-3:      #10131a;
  --text:       #f6f7fa;
  --muted:      #9aa2b1;
  --changeable: #ff5c5c;
  --faint:      #6a7280;

  --orange:     #f75200;
  --orange-lit: #ff6a1a;
  --amber:      #ffa51f;
  --yellow:     #ffc93c;
  --green:      #46d07f;

  --accent-grad: linear-gradient(100deg, #f75200 0%, #ff8a12 45%, #ffc93c 100%);
  --accent-soft: linear-gradient(100deg, rgba(247,82,0,.16), rgba(255,201,60,.10));
  --surface:     linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  --surface-hi:  linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.03));

  --line:     rgba(255,255,255,.08);
  --line-str: rgba(255,255,255,.14);

  --display: 'Montserrat', system-ui, -apple-system, sans-serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow:      0 24px 60px -20px rgba(0,0,0,.75);
  --shadow-glow: 0 18px 50px -12px rgba(247,82,0,.45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1200px;
}

* { box-sizing: border-box; }
/* hidden means hidden, whatever display a class gives the element */
[hidden] { display: none !important; }
html { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* the orange bloom the site carries behind its hero */
.glow {
  position: fixed;
  inset: -20vh 0 auto 0;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 26rem at 18% 0%, rgba(247,82,0,.20) 0%, transparent 65%),
    radial-gradient(44rem 22rem at 82% 8%, rgba(255,201,60,.10) 0%, transparent 65%);
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8,9,12,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 20px;
}

.brand { display: inline-flex; }
.brand img { display: block; height: 34px; width: auto; }

.nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
.nav-meta .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--faint);
}

/* ---------- the wizard: steps down the side, one stage at a time ---------- */

.wizard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 72px;
}

.steps {
  position: sticky;
  top: 116px;
  padding: 6px 0;
}
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; position: relative; }

/* The rail behind the dots, and how far along it the run has come. */
.steps-track {
  position: absolute;
  inset-inline-start: 24px; top: var(--track-top, 30px); bottom: 30px;
  width: 2px;
  background: var(--line-str);
  border-radius: 2px;
}
.steps-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--progress, 0%);          /* set by app.js */
  background: var(--accent-grad);
  border-radius: 2px;
  transition: height .6s var(--ease);
}

.step-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.step-link:disabled { cursor: default; }
.step-link:focus-visible { outline: 2px solid var(--yellow); outline-offset: 6px; border-radius: 12px; }

.step-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line-str);
  background: var(--ink-3);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--faint);
  transition: background .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted);
  transition: color .4s var(--ease);
}
.step-hint { font-size: .8rem; font-weight: 300; color: var(--faint); }

.step[aria-current="step"] .step-dot {
  color: #140800;
  border-color: transparent;
  background: var(--accent-grad);
  box-shadow: var(--shadow-glow);
}
.step[aria-current="step"] .step-name { color: var(--text); }
.step.done .step-dot {
  color: var(--green);
  border-color: rgba(70,208,127,.45);
  background: #10231a;              /* solid, so the rail does not show through */
}
.step.done .step-name { color: var(--text); }
.step.done .step-link:not(:disabled):hover .step-name { color: var(--amber); }

/* The optional step sits above the others, apart from the run itself. */
.step-optional .step-dot svg { width: 22px; height: 22px; }
.step-optional { padding-bottom: 30px; border-bottom: 1px dashed var(--line-str); }
.step-tag {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-str);
  font-family: var(--body);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  vertical-align: 2px;
}
.step-optional[aria-current="step"] .step-dot {
  color: #140800;
  border-color: transparent;
  background: var(--accent-grad);
  box-shadow: var(--shadow-glow);
}

.template-card { padding: 22px 26px; margin-bottom: 18px; }
.template-now { display: flex; align-items: center; gap: 20px; }
.template-now .btn { margin-inline-start: auto; flex: 0 0 auto; }
.btn-small { padding: 11px 20px; font-size: .85rem; }

.notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid rgba(70,208,127,.35);
  border-radius: var(--r-md);
  background: rgba(70,208,127,.08);
  color: var(--text);
  line-height: 1.6;
}
.notice strong { color: var(--green); font-family: var(--display); }
.notice span { color: var(--muted); }
.warnings { margin: 6px 0 0; padding-inline-start: 20px; color: var(--amber); }
.warnings:empty { display: none; }

.stage-head { margin-bottom: 28px; }
.stage-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-top: 18px; }
.stage-head .lede { margin-top: 14px; }

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}
.stage-actions .btn:only-child { margin-inline-start: auto; }

/* ---------- Hebrew: right to left, in a font that has the letters ---------- */

html[lang="he"] {
  --display: 'Heebo', system-ui, -apple-system, sans-serif;
  --body:    'Heebo', system-ui, -apple-system, sans-serif;
}
/* Wide tracking suits Latin capitals; Hebrew has none and reads better tight. */
html[lang="he"] :is(.nav-meta, .step-tag, .eyebrow, .card-title, .drop-badge,
                    .status, .field-label, .site-footer) {
  letter-spacing: .01em;
}
html[lang="he"] :is(h1, h2, h3) { letter-spacing: 0; }
html[lang="he"] .lede { font-weight: 400; }

/* The arrows point the way the page reads. */
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover:not(:disabled) .arrow { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .btn-ghost:hover:not(:disabled) .arrow { transform: scaleX(-1) translateX(-4px); }

/* ---------- the language switch ---------- */

.nav-end { display: flex; align-items: center; gap: 22px; }
.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-str);
  border-radius: 999px;
  background: rgba(0,0,0,.3);
}
.lang button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: 'Heebo', var(--body);
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--accent-grad); color: #140800; }
.lang button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
/* The login page's switch is links, not buttons: the same look. */
.lang a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-family: 'Heebo', var(--body);
  font-weight: 600;
  font-size: .82rem;
  text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--accent-grad); color: #140800; }
.lang a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------- logging in and out ---------- */

.logout { display: flex; align-items: center; gap: 12px; margin: 0; }
.logout-user { color: var(--muted); font-size: .85rem; }
.logout .btn { width: auto; }

.login {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 84px - 90px);
  padding-top: clamp(40px, 10vh, 110px);
  padding-bottom: 60px;
}
.login-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: 100%;
  max-width: 440px;
  padding: 36px 34px 34px;
  box-shadow: var(--shadow);
}
.login-card .eyebrow { align-self: flex-start; }
.login-card h1 { font-size: clamp(1.8rem, 3.4vw, 2.3rem); margin-top: 4px; }
.login-card .lede { margin: 0 0 6px; }
.login-card .btn { margin-top: 8px; }
.login-error {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255,92,92,.4);
  border-radius: var(--r-md);
  background: rgba(255,92,92,.08);
  color: var(--changeable);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,165,31,.24);
  background: var(--accent-soft);
}

.lede {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 300;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  transition: transform .5s var(--ease), border-color .5s var(--ease),
              box-shadow .5s var(--ease), background .5s var(--ease);
}

.card-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- the drop slot ---------- */

.drop {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  margin-bottom: 18px;
  cursor: pointer;
  border-style: dashed;
  border-color: var(--line-str);
}
.drop:hover, .drop:focus-within {
  background: var(--surface-hi);
  border-color: rgba(255,165,31,.45);
  transform: translateY(-2px);
}
.drop.over {
  border-color: var(--orange-lit);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.drop.filled { border-style: solid; border-color: rgba(70,208,127,.4); }

.drop input[type=file] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid rgba(255,165,31,.24);
  color: var(--amber);
  transition: background .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease);
}
.drop-icon svg { width: 24px; height: 24px; }
.drop.filled .drop-icon {
  color: var(--green);
  border-color: rgba(70,208,127,.35);
  background: rgba(70,208,127,.10);
}

.drop-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.drop-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  word-break: break-word;
}
.drop.filled .drop-title { color: var(--green); }

.drop-sub { color: var(--muted); font-size: .88rem; font-weight: 300; }
.drop.filled .drop-sub { display: none; }

.drop-fallback {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--faint);
  word-break: break-all;
  margin-top: 4px;
}
.drop-fallback.bad { color: var(--orange-lit); }
.drop.filled .drop-fallback { display: none; }

.drop-badge {
  margin-inline-start: auto;
  flex: 0 0 auto;
  display: none;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(70,208,127,.35);
  background: rgba(70,208,127,.10);
  color: var(--green);
  font-family: var(--display);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.drop.filled .drop-badge { display: inline-block; }

/* ---------- variables ---------- */

.fields { padding: 24px 28px 28px; margin-bottom: 26px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr;     /* one field under the other, full width */
  gap: 18px;
  margin-top: 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.field-label {
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--line-str);
  border-radius: var(--r-sm);
  background: rgba(0,0,0,.30);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255,165,31,.14);
}
/* Starts one line tall, like the list; app.js grows it with each new line. */
.field textarea { resize: none; overflow: hidden; display: block; }
/* The list drawn like the box above it, with an arrow of its own at the end
   of the line: on the right, or on the left for a right-to-left list. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa2b1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: right 14px center;
}
.field select[dir="rtl"],
.field select:dir(rtl) { background-position: left 14px center; }
.field select option { color: #111; background: #fff; }
/* Hebrew labels read as written, not shouted in capitals. */
.field-label:lang(he) { letter-spacing: .02em; text-transform: none; font-size: .82rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .92rem;
  padding: 15px 30px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  color: #140800;
  background: var(--accent-grad);
  box-shadow: 0 10px 30px -14px rgba(247,82,0,.7);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .3s;
}
.btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.btn svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.btn:hover:not(:disabled) .arrow { transform: translateX(4px); }

.btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-str);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { box-shadow: none; border-color: rgba(255,165,31,.45); }
.btn-ghost:hover:not(:disabled) .arrow { transform: translateX(-4px); }

.btn-download {
  color: var(--text);
  background: rgba(70,208,127,.12);
  border: 1px solid rgba(70,208,127,.4);
  box-shadow: none;
}
.btn-download:hover { box-shadow: 0 16px 40px -16px rgba(70,208,127,.5); }
.btn-download:hover svg { transform: translateY(3px); }

/* ---------- the run ---------- */

.output { padding: 22px 26px 26px; }

/* While it works: a bar that runs, since how long is not known in advance. */
.working { padding: 36px 8px 30px; text-align: center; color: var(--muted); font-weight: 300; }
.working p { margin: 18px 0 0; }
.bar {
  position: relative;
  height: 6px;
  max-width: 420px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}
.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: var(--accent-grad);
  animation: slide 1.3s var(--ease) infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .bar span { animation: none; width: 100%; opacity: .6; } }

/* ---------- step 2: how the chapters are edited ---------- */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.mode {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line-str);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.mode:has(input:checked) { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,165,31,.14); }
.mode input { margin-top: 4px; accent-color: var(--amber); }
.mode-text { display: grid; gap: 3px; }
.mode-text span { font-size: .85rem; color: var(--muted); }

/* ---------- step 2: per-site adjustments ---------- */
.adjust-title { margin-bottom: 16px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* One item: its number, its text, + and ×; indented by its depth in the chapter. */
.row {
  display: grid;
  grid-template-columns: minmax(3.2em, max-content) 1fr auto;
  align-items: start;
  gap: 10px;
  margin-inline-start: calc(var(--depth, 0) * 22px);
}
.row-label {
  padding-top: 8px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  text-align: end;
  white-space: nowrap;
}
.row-text,
.row-kind {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line-str);
  border-radius: var(--r-sm);
  background: rgba(0,0,0,.30);
  color: var(--text);
  font: inherit;
  font-size: .92rem;
  line-height: 1.5;
}
.row-text { resize: none; overflow: hidden; display: block; }
/* A chapter where only some items change: the rest is there to be read. */
.row-static { display: block; padding: 7px 2px; font-size: .92rem; line-height: 1.5; color: var(--muted); }
/* What the user may change is red, as it will be in the parasha. */
.row-changeable .row-text { color: var(--changeable); border-color: var(--changeable); }
.row-changeable .row-label { color: var(--changeable); }
.row-kind { width: auto; min-width: 3.2em; padding: 7px 8px; font-size: .8rem; }
.row-text:focus,
.row-kind:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,165,31,.14); }
.row-added .row-text { border-color: var(--amber); }
.row-seker {
  padding: 7px 11px;
  border: 1px dashed var(--line-str);
  border-radius: var(--r-sm);
  font-size: .85rem;
  color: var(--faint);
}
.row-tools { display: flex; gap: 4px; padding-top: 4px; }
.row-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-str);
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.row-btn:hover { color: var(--text); border-color: var(--amber); }
.row-remove:hover { color: #ff6b6b; border-color: #ff6b6b; }
.adjust-note { margin-top: 14px; font-size: .85rem; color: var(--faint); }
@media (max-width: 640px) {
  .row { margin-inline-start: calc(var(--depth, 0) * 10px); gap: 6px; }
}
.section-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------- step 3: fonts and sizes ---------- */

.style-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.style-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.style-group legend { padding: 0; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }

.sample {
  margin-top: 26px;
  padding: 22px 26px;
  border-radius: var(--r-md);
  background: #fff;
  color: #111;
  line-height: 1.5;
}
.sample p { margin: 0; }
.sample-heading { font-weight: 700; color: #365f91; margin-bottom: 8px !important; }

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}
.status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status[data-state="running"] { color: var(--amber); animation: pulse 1.1s ease-in-out infinite; }
.status[data-state="done"]    { color: var(--green); }
.status[data-state="failed"]  { color: var(--orange-lit); }

@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .status { animation: none; }
  .card, .btn { transition: none; }
}

.error {
  margin: 0 0 4px;
  padding: 14px 18px;
  border: 1px solid rgba(255,106,26,.35);
  border-radius: var(--r-md);
  background: rgba(247,82,0,.08);
  color: var(--orange-lit);
  line-height: 1.6;
  word-break: break-word;
}

/* The parts the seker lacked: a warning over the page, and the list under the status. */
.status[data-state="warning"] { color: var(--amber); }
.missing {
  max-width: min(560px, calc(100vw - 32px));
  padding: 26px 28px 22px;
  border: 1px solid rgba(255,165,31,.4);
  border-radius: var(--r-lg);
  background: var(--ink-3);
  color: var(--text);
  box-shadow: var(--shadow);
}
.missing::backdrop { background: rgba(0,0,0,.6); }
.missing h2 { margin: 0 0 8px; font-family: var(--display); color: var(--amber); }
.missing p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }
.missing form { display: flex; justify-content: flex-end; margin-top: 18px; }
.missing-list {
  margin: 0 0 14px;
  padding-inline-start: 20px;
  line-height: 1.6;
}
.missing-list li + li { margin-top: 8px; }
.missing-list strong { display: block; color: var(--changeable); font-family: var(--mono); font-size: .85rem; }
.card .missing-list {
  padding: 14px 18px;
  padding-inline-start: 38px;
  border: 1px solid rgba(255,165,31,.35);
  border-radius: var(--r-md);
  background: rgba(255,165,31,.07);
}

/* The generated parasha, drawn page by page by docx-preview. */
.viewer {
  max-height: 80vh;
  overflow: auto;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #1b1e25;
}
.viewer .docx-wrapper {
  background: transparent;
  padding: 26px 16px;
  align-items: center;
}
.viewer .docx-wrapper > section.docx {
  margin-bottom: 26px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.9);
}
.viewer .docx-wrapper > section.docx:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--faint);
  font-size: .8rem;
  letter-spacing: .04em;
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  /* The steps across the top instead of down the side. */
  .wizard { grid-template-columns: 1fr; gap: 26px; padding-top: 28px; }
  .steps { position: static; }
  .steps ol { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .step-optional { padding-bottom: 0; border-bottom: 0; }
  .step-tag { display: none; }
  .steps-track { inset-inline: 37.5% 12.5%; top: 25px; bottom: auto; width: auto; height: 2px; }
  .steps-fill { inset-block: 0; inset-inline: 0 auto; height: 100%; width: var(--progress, 0%);
                transition: width .6s var(--ease); }
  .step-link { flex-direction: column; text-align: center; gap: 8px; }
  .step-hint { display: none; }
  .style-groups { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { height: 70px; }
  .nav-meta { display: none; }
  .nav-end { gap: 12px; }
  .logout-user { display: none; }
  .login-card { padding: 28px 22px; }
  .drop { flex-wrap: wrap; gap: 16px; padding: 22px; }
  .drop-badge { margin-inline-start: 0; }
  .btn { width: 100%; }
}
