.finder-production {
  --paper: #FBF8F0;
  --border: #D8CBA9;
  --muted: #655943;
  --success: #285B3A;
  --focus: #125EAA;
  --shadow: 0 18px 45px rgba(36, 26, 18, .09);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: Cinzel, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 0;
  padding-block: 48px 120px;
}

.finder-production *, .finder-production *::before, .finder-production *::after { box-sizing: border-box; }
.finder-production button, .finder-production input, .finder-production select { font: inherit; }
.finder-production button, .finder-production a, .finder-production input, .finder-production select, .finder-production summary { -webkit-tap-highlight-color: transparent; }
.finder-production :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.finder-production [hidden] { display: none !important; }
.dialog-backdrop[hidden] { display: none !important; }
.finder-production section { padding: 0; }
.finder-production p { overflow-wrap: anywhere; }
.finder-production fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

.finder-production .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.finder-app-shell { width: min(1120px, 100%); margin-inline: auto; }
.finder-stage-note { margin: 0 0 18px; color: var(--muted); text-align: center; font-size: 15px; font-style: italic; }
.stage-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: rgba(251, 248, 240, .72);
}
.stage-rail span {
  min-width: 0;
  padding: 12px 8px;
  color: var(--muted);
  text-align: center;
  font: 600 11px/1.35 var(--display);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.stage-rail span + span { border-left: 1px solid var(--border); }
.stage-rail [aria-current="step"] { background: var(--ink); color: var(--gold-light); }
.stage-rail .is-complete { background: var(--gold-light); color: var(--ink); }

#finder-app { width: min(780px, 100%); margin: 38px auto 0; scroll-margin-top: 96px; }
.question-card, .loading-card, .result-shell {
  border: 1.5px solid var(--border);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.question-card, .loading-card { padding: clamp(26px, 5vw, 54px); }
.finder-production .eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font: 600 11px/1.4 var(--display);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.finder-production .eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin: 0 9px 3px 0;
  background: var(--gold);
}
.finder-production h1, .finder-production h2, .finder-production h3, .finder-production legend {
  margin-top: 0;
  font-family: var(--display);
  line-height: 1.18;
  letter-spacing: .015em;
}
.finder-production h1 { margin-bottom: 14px; font-size: clamp(30px, 6vw, 46px); font-weight: 600; }
.finder-production h2 { font-size: clamp(24px, 4.5vw, 34px); }
.finder-production h3 { font-size: 20px; }
.lede { max-width: 60ch; margin: 0 0 30px; color: var(--muted); font-size: 19px; }
.helper { margin: 8px 0 20px; color: var(--muted); font-size: 16px; }
.error {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-left: 4px solid var(--clay-deep);
  background: #F4E4DC;
  color: #5D2210;
  font-weight: 600;
}

.finder-production legend { width: 100%; margin-bottom: 7px; font-size: clamp(24px, 5vw, 36px); font-weight: 600; }
.finder-production .question-title { margin-bottom: 7px; font-size: clamp(24px, 5vw, 36px); font-weight: 600; }
.choice-grid { display: grid; gap: 12px; margin-top: 22px; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.environment-grid { grid-auto-rows: 1fr; }
.environment-grid .choice, .environment-grid .choice label { height: 100%; }
.choice { position: relative; min-width: 0; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice label {
  min-height: 56px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  background: var(--marble);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.choice label::before {
  content: "";
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin-top: 2px;
  border: 2px solid var(--clay);
  border-radius: 50%;
  background: var(--paper);
}
.choice input[type="checkbox"] + label::before { border-radius: 2px; }
.choice input:checked + label {
  border-color: var(--ink);
  box-shadow: inset 5px 0 0 var(--gold);
  background: var(--gold-light);
  font-weight: 600;
}
.choice input:checked + label::before { box-shadow: inset 0 0 0 4px var(--paper); background: var(--clay); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
.choice-main { display: block; font-weight: 600; }
.choice-note { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; font-weight: 400; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.field label { display: block; margin-bottom: 7px; font-weight: 600; }
.field select, .field input[type="number"] {
  width: 100%;
  min-height: 52px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 42px 10px 13px;
}
.time-custom { margin-top: 18px; }

.capability-list { display: grid; gap: 18px; margin-top: 26px; }
.capability-card { border: 1.5px solid var(--border); background: var(--marble); }
.capability-card > header { position: static; padding: 19px 20px 0; border: 0; background: transparent; }
.capability-card h2 { margin-bottom: 5px; font-size: 22px; }
.capability-meta { margin: 0; color: var(--muted); font: 600 12px/1.5 var(--mono); }
.requirements { margin: 14px 20px; border-top: 1px solid var(--border); }
.requirements summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--clay-deep); font-weight: 600; }
.requirements ul { margin: 0 0 18px; padding-left: 22px; }
.requirements li + li { margin-top: 6px; }
.capability-options { padding: 0 20px 20px; }
.replacement-box { margin: 8px 0 14px; padding: 15px; border: 1px solid var(--gold); background: var(--gold-light); }
.replacement-box h3 { margin-bottom: 8px; font-size: 16px; }
.replacement-box p { margin: 7px 0; font-size: 15px; }

.derived-track { margin: 22px 0; padding: 18px; border: 1px solid var(--gold); background: var(--gold-light); }
.derived-track strong { font-family: var(--display); }
.text-action {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--clay-deep);
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 600;
}

.actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 34px; }
.actions-end { justify-content: flex-end; }
.finder-production .button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.finder-production .button-primary { background: var(--clay); border-color: var(--clay); color: #FFFDF8; }
.finder-production .button-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.finder-production .button-secondary { background: transparent; color: var(--ink); }
.finder-production .button-secondary:hover { background: var(--ink); color: var(--marble); }
.finder-production .button-danger { background: var(--clay-deep); border-color: var(--clay-deep); color: #FFFDF8; }
.finder-production .button[disabled], .finder-production .button[aria-disabled="true"] {
  border-color: #A99E86;
  background: #D7D0C1;
  color: #756D60;
  cursor: not-allowed;
  pointer-events: none;
}
.start-over-row { margin-top: 22px; text-align: center; }

.finder-production .result-shell { padding: clamp(28px, 5vw, 56px); scroll-margin-top: 96px; }
.result-head { position: static; max-width: 64ch; margin-bottom: clamp(30px, 5vw, 46px); border: 0; background: transparent; }
.result-head h1 { max-width: 18ch; font-size: clamp(30px, 4.6vw, 42px); }
.result-head .lede { max-width: 55ch; margin-bottom: 0; }
.result-head .helper { margin: 16px 0 0; }
.result-section > h2 { max-width: 20ch; margin-bottom: 20px; font-size: clamp(25px, 3.8vw, 32px); }
.result-section + .result-section { margin-top: 46px; padding-top: 38px; border-top: 2px solid var(--ink); }
.result-section.subordinate { border-top: 1px solid var(--border); }
.result-grid { display: grid; gap: 22px; }
.result-grid.co-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.result-card { min-width: 0; display: flex; flex-direction: column; padding: clamp(24px, 3.6vw, 32px); border: 1.5px solid var(--ink); background: var(--marble); }
.result-card.caveat { border-color: var(--gold); background: #FAF3DE; }
.result-card.is-leading { border-width: 2px; box-shadow: inset 6px 0 0 var(--gold); }
.result-card.is-alternative { border-color: #8D816B; }
.result-card.is-positioning-mismatch { border-color: var(--clay-deep); }
.result-card.is-coequal { border-width: 2px; }
.result-card h3 { margin: 0; font-size: clamp(23px, 3.2vw, 28px); }
.program-positioning { margin: 7px 0 0; color: var(--clay-deep); font-weight: 600; }
.result-badge {
  align-self: flex-start;
  margin-bottom: 13px;
  padding: 5px 9px;
  border: 1px solid var(--gold);
  color: var(--clay-deep);
  font: 600 10px/1.35 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.result-badge.is-alternative { border-color: var(--border); color: var(--muted); }
.result-badge.is-mismatch { border-color: var(--clay-deep); color: var(--clay-deep); }
.result-badge.is-coequal { border-color: var(--ink); color: var(--ink); }
.result-details { display: grid; gap: 24px; margin: 28px 0; }
.result-details section { min-width: 0; }
.result-details section + section { padding-top: 22px; border-top: 1px solid var(--border); }
.result-details h4 { margin: 0 0 7px; font: 600 13px/1.4 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.result-details p, .result-details ul { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.result-details p + p { margin-top: 7px; }
.result-details ul { padding-left: 20px; }
.result-details li + li { margin-top: 8px; }
.result-card .button { margin-top: auto; }
.route-picker { margin: 18px 0; padding: 15px; border: 1px solid var(--border); background: var(--paper); }
.route-picker legend { font-size: 17px; }
.route-picker .choice-grid { margin-top: 10px; }
.route-picker .choice label { min-height: 48px; padding-block: 11px; }
.difference { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 16px; line-height: 1.5; }
.result-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin-top: 30px; }
.result-actions .button { min-width: min(100%, 11rem); }
.result-shell > .result-actions { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border); }
.unavailable-programs { margin: 18px 0 0; padding-left: 22px; }

.dialog-backdrop {
  --paper: #FBF8F0;
  --border: #D8CBA9;
  --muted: #655943;
  --focus: #125EAA;
  --shadow: 0 22px 64px rgba(36, 26, 18, .28);
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 26, 18, .72);
}
.dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px;
  border: 2px solid var(--ink);
  background: #FBF8F0;
  color: var(--ink);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.dialog h2 { margin-bottom: 10px; }
.dialog p:not(.eyebrow) { color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.dialog .button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 11px 22px;
  cursor: pointer;
  font: 600 18px/1.35 "EB Garamond", Georgia, serif;
}
.dialog .button-primary { background: var(--clay); border-color: var(--clay); color: #FFFDF8; }
.dialog .button-secondary { background: transparent; color: var(--ink); }
.dialog .button-danger { background: var(--clay-deep); border-color: var(--clay-deep); color: #FFFDF8; }
.dialog :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.noscript { margin: 30px; padding: 20px; border: 2px solid var(--clay-deep); }

@media (max-width: 680px) {
  .finder-production { padding-top: 26px; padding-bottom: 108px; }
  .finder-stage-note { font-size: 14px; }
  #finder-app { margin-top: 22px; }
  .stage-rail span { padding-inline: 4px; font-size: 9px; letter-spacing: .03em; }
  .question-card, .loading-card { padding: 22px 17px; }
  .finder-production .result-shell { padding: 24px 20px; }
  [data-screen-form="positioning"] { padding-bottom: 112px; }
  .choice-grid.two, .field-row, .result-grid.co-equal { grid-template-columns: 1fr; }
  .environment-grid { grid-auto-rows: auto; }
  .actions {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 76px;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1.5px solid var(--ink);
    background: rgba(244, 239, 227, .98);
  }
  .actions .button { flex: 1 1 0; min-width: 0; }
  .capability-card > header, .capability-options { padding-inline: 14px; }
  .requirements { margin-inline: 14px; }
  .result-actions { flex-direction: column; }
  .result-actions .button { width: 100%; }
  .result-shell > .result-actions { margin-top: 34px; padding-top: 22px; }
}

@media (max-width: 480px) {
  .dialog { padding: 24px 20px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions .button { width: 100%; }
}

@media (max-width: 350px) {
  .stage-rail { grid-template-columns: 1fr 1fr; }
  .stage-rail span:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .stage-rail span:nth-child(4) { border-top: 1px solid var(--border); }
  .actions { flex-wrap: wrap; }
}

@media (max-height: 430px) and (orientation: landscape) {
  .finder-production { padding-bottom: 86px; }
  .actions { min-height: 64px; }
}

@media (prefers-reduced-motion: no-preference) {
  .finder-production .button, .choice label { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}

@media (prefers-reduced-motion: reduce) {
  .finder-production *, .finder-production *::before, .finder-production *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .choice input:checked + label { border-width: 3px; }
  .result-badge { border: 2px solid CanvasText; }
}
