/* OM Workouts: charcoal paper background with white typography. */
:root {
  color-scheme: dark;
  --bg: #242424;
  --panel: rgba(18, 18, 18, 0.78);
  --ink: #fafafa;
  --muted: #d5d5d5;
  --line: rgba(255, 255, 255, 0.2);
}

body {
  background: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)),
    url('dark-paper-background.webp') center / cover fixed;
  background-color: var(--bg);
  color: var(--ink);
}

.workspace {
  border-color: var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.photo-rail {
  border: 1px solid var(--line);
  padding: 0;
  min-height: 0;
  background: #191919;
  justify-content: flex-start;
}
.photo-rail:after { content: none; }
.rail-photo { flex-shrink: 0; background: #eae9ed; }
.rail-image {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  filter: none;
  transform: none;
  z-index: auto;
}
.rail-body { min-width: 0; padding: 24px; }
.rail-brand { margin-bottom: 20px; }
/* Match the approved welcome mark without the old circular poster crop. */
.rail-brand .logo-crop {
  position: relative;
  width: 80px;
  height: auto;
  aspect-ratio: 188 / 174;
  background: transparent;
  border-radius: 0;
}
.rail-brand .logo-crop img {
  position: absolute;
  display: block;
  width: 170.212766%;
  max-width: none;
  height: auto;
  left: -35.106383%;
  top: -36.781609%;
  transform: none;
  filter: invert(1) brightness(1.7);
  mix-blend-mode: screen;
}
.rail-content { margin-top: 0; width: 100%; max-width: none; }
.rail-content h2 { font-size: 1.6rem; margin: 10px 0 12px; }
.welcome-layout { display: block; max-width: 760px; margin-inline: auto; }
.welcome-workspace { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 32px 36px; text-align: center; }
.welcome-content { width: 100%; max-width: 540px; }
.welcome-logo { position: relative; overflow: hidden; width: 188px; max-width: 100%; aspect-ratio: 188 / 174; margin: 0 auto 18px; }
/* Display only the original mark, excluding the poster's surrounding text. */
.welcome-logo img { position: absolute; display: block; width: 170.212766%; max-width: none; height: auto; left: -35.106383%; top: -36.781609%; filter: invert(1) brightness(1.7); mix-blend-mode: screen; }
#welcome-title { font-size: clamp(1.65rem, 2.8vw, 2.15rem); line-height: 1.55; font-weight: 600; margin: 0 0 16px; }
#welcome-title span { display: inline-block; font-family: Arial, sans-serif; font-weight: 700; letter-spacing: -.04em; }
.welcome-lead { color: var(--muted); font-size: 1rem; line-height: 1.9; margin: 0; }
.welcome-actions { margin-top: 24px; }
.welcome-actions .primary { min-width: 170px; }
.closing-intro { padding-block: 38px 12px; }
.closing-next { margin-top: 18px; }
@media (max-width: 780px) {
  .photo-rail {
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    height: auto;
    min-height: 0;
    align-items: center;
  }
  .rail-photo { height: 100%; display: flex; align-items: center; }
  .rail-image {
    width: 100%;
  }
  .rail-body { padding: 18px; }
  .rail-content h2 { font-size: 1.25rem; line-height: 1.65; margin: 9px 0 0; }
  .rail-content .kicker { font-size: .65rem; letter-spacing: 1.5px; }
  .rail-tags { margin-top: 12px; }
  .welcome-workspace { padding: 24px 22px; }
  .welcome-logo { width: 160px; margin-bottom: 16px; }
  #welcome-title { font-size: 1.65rem; margin-bottom: 14px; }
  .welcome-actions { margin-top: 22px; }
  .welcome-actions .primary { width: 100%; max-width: 280px; }
}
@media (max-width: 370px) {
  .rail-body { padding: 12px; }
  .rail-content h2 { font-size: 1.1rem; }
}
.wordmark span { border-color: rgba(255, 255, 255, 0.4); }

#header-label, .site-footer, .step-button, .progress-label, .eyebrow,
.intro-text, .optional-note, .question-hint, .field label, .unit,
.clear-choice, .skip-button, .keyboard-hint, .edit, .review-item h3,
.review-answer.empty, .answer-count {
  color: var(--muted);
}

.question-title, .form-intro h1, .review-group-header h2,
.review-answer, .step-button[aria-current=step] { color: #fff; }

.language, .choice, .quick-pick, .secondary {
  color: #f7f7f7;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.language:hover, .choice:hover, .quick-pick:hover, .secondary:hover,
.step-button:hover { background: rgba(255, 255, 255, 0.12); }

input:not([type=radio]), textarea {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.32);
}

input::placeholder, textarea::placeholder { color: #bababa; opacity: 1; }
input:not([type=radio]):focus, textarea:focus {
  border-color: #eee;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.choice input { accent-color: #fff; }
.choice:has(input:checked) {
  background: rgba(255, 255, 255, 0.16);
  border-color: #eee;
  box-shadow: inset 0 0 0 1px #eee;
  color: #fff;
}

.step-number, .answer-count { border-color: rgba(255, 255, 255, 0.4); }
.step-button[aria-current=step] .step-number {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  color: #fff;
}
.step-button.passed .step-number {
  background: rgba(255, 255, 255, 0.1);
  border-color: #aaa;
  color: #fff;
}

.progress-track { background: rgba(255, 255, 255, 0.15); }
.progress-fill, .optional-note:before { background: #eee; }
.stage-actions, .review-item { border-color: var(--line); }

.primary {
  background: #444;
  border-color: #c8c8c8;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.primary:hover { background: #585858; }
.primary:disabled {
  background: #323232;
  border-color: #656565;
  color: #bdbdbd;
}

.review-group, .notice {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
  color: #e3e3e3;
}
kbd { background: #333; border-color: #777; color: #eee; }
.field-error, .stage-error { color: #ffb9b9; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: #ed9999; }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, .choice:focus-within { outline-color: #eee; }
::selection { background: #d8d8d8; color: #181818; }
.submit-consent { display: flex; align-items: flex-start; gap: 12px; line-height: 1.7; margin: 24px 0 12px; font-size: 14px; }
.submit-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 4px; accent-color: #bd9c60; }

/* HTML is readable before the small interaction layer is available. */
[hidden] { display: none !important; }
.language, .step-button, a.primary { text-decoration: none; }
a.primary { display: inline-flex; justify-content: center; align-items: center; }
#application-fields { min-width: 0; margin: 0; border: 0; padding: 0; }
.form-intro h2 { margin: 0 0 7px; font-size: 2rem; line-height: 1.5; font-weight: 600; color: #fff; }
html[lang=ar] .form-intro h2 { letter-spacing: normal; }
.application-layout { scroll-margin-top: 24px; }
html:not(.enhanced) .application-layout { margin-top: 28px; }
html:not(.enhanced) .stage-panel + .stage-panel { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 8px; }
.enhanced-only { display: none; }
.enhanced .enhanced-only { display: block; }
.enhanced .stage-actions.enhanced-only { display: flex; }
.enhanced .no-script-note { display: none; }
.enhanced .stage-panel { animation: reveal .2s ease; }
.skip-link { position: absolute; top: 8px; inset-inline-start: 12px; padding: 10px 18px; border-radius: 8px; background: #fff; color: #181818; z-index: 10; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.submit-consent input { min-height: 20px; padding: 0; }
[data-question-id="goals"] .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
[data-question-id="goals"] .choice { min-width: 0; height: 100%; align-items: flex-start; }
[data-question-id="goals"] .choice input { margin-top: 4px; }
#hint-health, #q-health::placeholder { color: #ffb9b9; opacity: 1; }
[aria-disabled=true] { cursor: not-allowed; opacity: .65; }
@media (max-width: 1040px) { .form-intro h2 { font-size: 1.8rem; } }
@media (max-width: 780px) { .form-intro h2 { font-size: 1.65rem; } }
@media (prefers-reduced-motion: reduce) { .enhanced .stage-panel { animation: none; } }

/* Small disclosure below the explicit consent choice. */
.consent-details { margin-top: 2px; }
.consent-details summary { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 8px; direction: ltr; list-style: none; cursor: pointer; min-height: 44px; padding: 4px 0; font-size: 13px; color: #c8c8c8; }
.consent-details summary::-webkit-details-marker { display: none; }
.consent-title { text-align: left; text-decoration: underline; text-underline-offset: 3px; }
html[dir=rtl] .consent-title { direction: rtl; text-align: right; }
.consent-arrow { display: block; text-align: center; font-size: 22px; line-height: 1; transform: rotate(0); }
.consent-details[open] .consent-arrow { transform: rotate(-90deg); }
.consent-details summary:focus-visible { outline: 2px solid #eee; outline-offset: 3px; border-radius: 4px; }
.consent-details ul { margin: 0; padding: 0 4px 12px; padding-inline-start: 22px; font-size: 14px; line-height: 1.8; color: #ddd; }
.consent-details li + li { margin-top: 8px; }
.consent-details a { color: inherit; overflow-wrap: anywhere; }
.submit-consent { margin-top: 18px; }
.submit-consent input { accent-color: #ddd; }
@media (max-width: 480px) { [data-question-id="goals"] .choice { padding: 10px; font-size: 14px; gap: 7px; } }
