.wizard-page {
  background:radial-gradient(ellipse at top right,#103e46 0,transparent 45%),var(--navy);
  min-height:100vh;
}

.intake {
  padding-block:clamp(2rem,4vw,4rem) clamp(3rem,6vw,6rem);
}

.intake-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:2rem;
  margin:0 0 2rem;
}

.product-name {
  color:var(--teal);
  letter-spacing:.075em;
  font-weight:580;
}

.intake-heading h1 {
  font-size:clamp(2.8rem,6vw,5.25rem);
  font-weight:520;
  letter-spacing:-.075em;
  line-height:1.04;
  margin-top:.4rem;
}

.intake-heading>p {
  max-width:31rem;
  color:#c6d9d3;
}

.wizard-layout {
  display:grid;
  grid-template-columns:minmax(12rem,.42fr) minmax(0,1.25fr);
  gap:clamp(1.3rem,3.3vw,3.2rem);
  align-items:start;
}

.wizard-page [hidden] {
  display:none!important;
}

.steps-panel {
  border-top:1px solid #719192;
  padding-top:1rem;
}

.steps-panel ol {
  list-style:none;
  display:grid;
  gap:.25rem;
  padding:0;
  margin:1rem 0;
}

.steps-panel button {
  width:100%;
  display:flex;
  align-items:center;
  gap:.8rem;
  text-align:left;
  padding:.49rem 0;
  background:transparent;
  color:#c9dad7;
  border:none;
  font-size:.94rem;
}

.steps-panel button[aria-current=step] {
  color:#fff;
  font-weight:650;
}

.steps-panel button:disabled {
  color:#90a8aa;
  cursor:default;
}

.steps-panel button span:first-child {
  border:1px solid #577479;
  min-width:1.75rem;
  height:1.75rem;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:.77rem;
}

.steps-panel [aria-current] span:first-child {
  background:var(--copper);
  border-color:var(--copper);
  color:var(--navy);
}

#progress-caption {
  font-size:.9rem;
  color:#cfddd9;
}

#progress-meter {
  width:100%;
  height:.38rem;
  display:block;
  margin:.6rem 0 0;
  accent-color:var(--teal);
  border:none;
  border-radius:1rem;
  overflow:hidden;
}

#progress-meter::-webkit-progress-bar {
  background:#294952;
}

#progress-meter::-webkit-progress-value {
  background:var(--teal);
}

.paper {
  color:var(--ink);
  background:var(--paper);
  border-top:.27rem solid var(--copper);
  padding:clamp(1.3rem,3.2vw,3.1rem);
  min-width:0;
  box-shadow:0 18px 52px #00101742;
}

.paper h2 {
  font-size:clamp(1.8rem,3.5vw,2.75rem);
  letter-spacing:-.055em;
  font-weight:560;
  line-height:1.12;
}

.lead {
  margin:.6rem 0 1.35rem;
  color:#415b5b;
}

.fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
}

.field,.choice-field,.module {
  min-width:0;
}

.field {
  display:grid;
  align-content:start;
  gap:.35rem;
}

.field span,.field label,.legend {
  font-size:.9rem;
  font-weight:600;
}

.field input,.field select,.field textarea,.upload-row select {
  color:var(--ink);
  background:#fffdfa;
  border:1px solid #8a9c95;
  border-radius:.26rem;
  font:inherit;
  width:100%;
  min-width:0;
  padding:.62rem .75rem;
}

.field textarea {
  resize:vertical;
  min-height:5.25rem;
}

.wide,.choice-field,.section-card,.module {
  grid-column:1/-1;
}

.required {
  font-size:.78rem;
  color:#4c6261;
}

.section-card,.module,fieldset.choice-field {
  padding:1rem;
  border:1px solid #aebdb2;
  border-radius:.3rem;
  min-width:0;
}

.section-card {
  display:grid;
  gap:.75rem;
}

.section-top,.row-actions,.controls,.file-line,.save-panel {
  display:flex;
  align-items:center;
  gap:.55rem;
  flex-wrap:wrap;
}

.section-top,.controls,.file-line,.save-panel {
  justify-content:space-between;
}

.section-top h3,.module h3,.paper h3 {
  margin:0;
  font-size:1.08rem;
}

.module p,.fine,.file-context {
  font-size:.88rem;
  color:#425e5c;
}

.choice-list {
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}

.choice,.small,.back,.filepick {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:2.65rem;
  border:1px solid #6a8982;
  border-radius:.25rem;
  padding:.48rem .77rem;
  background:transparent;
  color:var(--ink);
  font:inherit;
  cursor:pointer;
}

.choice:has(input:checked),.choice[aria-pressed=true] {
  background:#deede2;
  border-color:#367067;
}

.choice input,.check input {
  width:1.1rem;
  height:1.1rem;
  accent-color:#2f6e65;
  flex-shrink:0;
}

.choices-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.6rem;
}

.choices-grid .choice {
  justify-content:flex-start;
}

.check {
  display:flex;
  gap:.65rem;
  align-items:start;
  font-size:.95rem;
}

.check input {
  margin-top:.22rem;
}

.filepick {
  display:grid;
  justify-content:stretch;
  white-space:normal;
}

.filepick input {
  max-width:100%;
  font:inherit;
  font-size:.88rem;
}

.controls {
  border-top:1px solid #bfccc3;
  margin-top:1.5rem;
  padding-top:1rem;
}

.primary {
  background:var(--navy);
  color:#fff;
  border:1px solid var(--navy);
  border-radius:.25rem;
  padding:.7rem 1.1rem;
  font-weight:580;
  min-height:2.75rem;
}

.primary:hover {
  background:#134348;
}

.primary:disabled,.small:disabled {
  opacity:.55;
  cursor:default;
}

.controls .primary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.6rem;
  margin-left:auto;
  cursor:pointer;
  touch-action:manipulation;
}
.next-arrow {
  line-height:1;
  font-size:1.05em;
}
.step-stage { position:relative; }
.step-exit {
  position:absolute;
  inset:0;
  overflow:hidden;
  pointer-events:none;
}
.field .step-error { margin:0; font-size:.88rem; }
.fields > .step-error { grid-column:1/-1; }


.small {
  padding:.27rem .65rem;
  min-height:2.4rem;
  font-size:.85rem;
}

.step-error {
  color:#8a2520;
  font-weight:580;
  margin-top:1rem;
}

.step-error:empty {
  display:none;
}

.save-panel {
  margin-top:.85rem;
  color:#c9d9d6;
  font-size:.87rem;
  align-items:baseline;
}

.save-panel button,.save-panel a {
  background:none;
  color:#a3e0d6;
  border:0;
  border-bottom:1px solid #6d9e97;
  font:inherit;
  padding:.1rem 0;
}

.save-panel div {
  display:flex;
  gap:.9rem;
  flex-wrap:wrap;
}

.section-list,.upload-list,.review-list {
  display:grid;
  gap:.7rem;
}

.upload-row {
  padding:.75rem 0;
  border-bottom:1px solid #bfccc3;
}

.file-line {
  overflow-wrap:anywhere;
  flex-wrap:nowrap;
}

.file-line strong {
  min-width:0;
  margin-right:auto;
}

.file-line img {
  width:3.25rem;
  height:3.25rem;
  object-fit:contain;
  background:#fff;
}

.upload-row select {
  max-width:24rem;
  margin-top:.4rem;
}

.review-list details {
  border-top:1px solid #b5c5bc;
  padding:.6rem 0;
}

.review-list summary {
  font-weight:600;
  cursor:pointer;
}

.review-list dl {
  margin:.7rem 0;
  display:grid;
  grid-template-columns:minmax(8rem,.6fr) minmax(0,1.4fr);
  gap:.4rem 1rem;
}

.review-list dt {
  color:#46605f;
}

.review-list dd {
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}

.review-list img {
  max-width:7rem;
  max-height:6rem;
  object-fit:contain;
}

.price-note {
  padding:1rem;
  background:#e1e9df;
  border-left:3px solid #2b6b62;
  margin:1rem 0;
}

.price-note strong {
  display:block;
}

.price-note p {
  font-size:.92rem;
}

.style-option {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.sample {
  height:1.15rem;
  width:4rem;
  background:linear-gradient(90deg,#244242 0 33%,#c6c9ac 33% 68%,#ede8d9 68%);
  border:1px solid #abb9ad;
}

.sample.soft {
  background:linear-gradient(90deg,#92776c 0 33%,#dac0ac 33% 68%,#f3e8de 68%);
}

.sample.bold {
  background:linear-gradient(90deg,#212244 0 33%,#e98c5c 33% 68%,#fdcc79 68%);
}

@media(max-width:850px) {
  .intake-heading {
    display:block;
  }
  .intake-heading>p {
    margin-top:.85rem;
  }
  .wizard-layout {
    grid-template-columns:1fr;
    gap:.8rem;
  }
  .steps-panel {
    padding-top:.6rem;
  }
  .steps-panel ol {
    display:none;
  }
  .intake-heading {
    margin-bottom:1rem;
  }
  .paper {
    padding:1.4rem;
  }
  .intake {
    width:min(90%,49rem);
  }
}

@media(max-width:520px) {
  .fields,.choices-grid {
    grid-template-columns:1fr;
  }
  .paper {
    padding:1.1rem;
  }
  .review-list dl {
    grid-template-columns:1fr;
    gap:.1rem;
  }
  .review-list dd {
    margin-bottom:.65rem;
  }
  .intake {
    width:93%;
  }
  .section-top {
    align-items:start;
  }
  .file-line {
    flex-wrap:wrap;
  }
  .save-panel {
    display:grid;
  }
  .intake-heading h1 {
    font-size:2.7rem;
  }
}

.wizard-page dialog {
  width:min(92vw,42rem);
  max-height:85vh;
  overflow:auto;
  border:1px solid #6b8983;
  border-radius:.4rem;
  color:var(--ink);
  background:var(--paper);
  padding:1.3rem;
}

.wizard-page dialog::backdrop {
  background:#001521bd;
}

.wizard-page dialog img,.wizard-page dialog iframe {
  display:block;
  width:100%;
  max-height:60vh;
  object-fit:contain;
  margin:.8rem 0;
}

.wizard-page dialog iframe {
  height:53vh;
}

.wizard-page dialog pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.wizard-page dialog button,.wizard-page dialog a {
  margin:.45rem .65rem .2rem 0;
}

.paper [aria-invalid=true] {
  outline:2px solid #912f24;
}

.filepick {
  margin:.8rem 0;
}

.review-list .small {
  margin-top:.5rem;
}

#receipt p {
  margin:.7rem 0;
}

#receipt a {
  display:block;
  margin:.75rem 0;
}

#step-heading {
  scroll-margin-top:1.2rem;
}

#step-heading:focus {
  outline:none;
}

.wizard-page .languages button {
  border:0;
  background:transparent;
  color:#c6dcd7;
  font:inherit;
  font-size:.78rem;
  padding:.42rem .55rem;
  cursor:pointer;
}

.wizard-page .languages button[aria-pressed="true"] {
  background:var(--copper);
  color:var(--navy);
}
/* The native progress element remains available to assistive technology.
   A separate fill interpolates the numeric fraction as the current step changes. */
.progress-track {
  position:relative;
  height:.38rem;
  margin:.6rem 0 0;
  overflow:hidden;
  border-radius:1rem;
  background:#32515a;
}

.progress-track #progress-meter {
  position:absolute;
  inset:0;
  margin:0;
  height:100%;
  opacity:0;
}

.progress-fill {
  position:absolute;
  inset:0;
  display:block;
  background:var(--teal);
  transform:scaleX(var(--wizard-progress,.125));
  transform-origin:left;
  pointer-events:none;
}

.wizard-page {
  --wizard-ease:cubic-bezier(.22,.72,.2,1);
}

.steps-panel button {
  border-radius:.28rem;
  padding-inline:.32rem;
}

.steps-panel button:enabled:not([aria-current]):hover {
  color:#fff;
  background:#153740;
}

.steps-panel button[aria-current=step] {
  background:#143640;
}

/* Feedback on focus and selection only, never on the value of a text field. */
.paper :is(.field input,.field select,.field textarea,.upload-row select):focus {
  border-color:#28665f;
  box-shadow:0 0 0 2px #39766c29;
}

.paper .choice:focus-within,
.paper .filepick:focus-within {
  border-color:#28665f;
  box-shadow:0 0 0 2px #39766c29;
}

.choice:has(input:checked) {
  border-color:#367067;
  box-shadow:inset 3px 0 #43786c;
}

.paper .step-error:not(:empty) {
  padding:.55rem .75rem;
  border-inline-start:3px solid #9f4034;
  background:#f4e8df;
}

.paper .filepick input::file-selector-button {
  padding:.34rem .62rem;
  margin-inline-end:.55rem;
  font:inherit;
  color:#163d3d;
  background:#e7eee7;
  border:1px solid #91aaa0;
  border-radius:.2rem;
  cursor:pointer;
}

.paper .small:active:not(:disabled),
.paper .back:active:not(:disabled),
.paper .filepick input:active::file-selector-button {
  background:#d7e7de;
}

.review-list summary {
  padding-block:.24rem;
}

.review-list summary::marker {
  color:#367067;
}

.review-list details[open] {
  border-color:#74998b;
}

#receipt {
  position:relative;
  overflow-wrap:anywhere;
}

#receipt::before,
#receipt::after {
  content:"";
  pointer-events:none;
}

#receipt::before {
  display:block;
  width:2.8rem;
  height:2.8rem;
  margin-bottom:.95rem;
  border:1px solid #759b8b;
  border-radius:50%;
  background:#dfebe1;
}

#receipt::after {
  position:absolute;
  top:.83rem;
  left:.78rem;
  width:1.22rem;
  height:.65rem;
  border-left:2px solid #245c50;
  border-bottom:2px solid #245c50;
  transform:rotate(-45deg);
}

@media (hover:hover) and (pointer:fine) {
  .paper :is(.small,.back):enabled:hover,
  .paper .choice:hover,
  .paper .filepick:hover {
    border-color:#39756a;
    background-color:#e9efe7;
  }

  .paper .choice:has(input:checked):hover {
    background-color:#dbeade;
  }

  .paper .primary:enabled:hover {
    box-shadow:0 3px 9px #153d3a24;
  }
}

/* Entrance classes are set on real navigation and successful submission.
   Draft updates and the open pane's ordinary re-renders add no animation. */
@media (prefers-reduced-motion:no-preference) {
  .intake-heading > div,
  .intake-heading > p {
    animation:wizard-welcome .3s var(--wizard-ease) backwards;
  }

  .intake-heading > p {
    animation-delay:45ms;
  }

  .steps-panel,
  .workspace > .paper {
    animation:wizard-welcome .32s var(--wizard-ease) backwards;
  }

  .workspace > .paper {
    animation-delay:45ms;
  }

  .step-enter-forward { --wizard-travel:1rem; }

  .step-enter-back { --wizard-travel:-1rem; }

  #step-content:is(.step-enter-forward,.step-enter-back) {
    animation:wizard-step .32s var(--wizard-ease) backwards;
  }

  .step-exit {
    animation:wizard-depart .13s ease-out both;
  }

  .progress-fill {
    transition:transform .32s var(--wizard-ease);
  }

  .controls .primary {
    transition:transform .16s var(--wizard-ease), background-color .16s ease, box-shadow .16s ease;
  }

  .controls .primary:enabled:active { transform:scale(.96); }
  .next-arrow { transition:transform .18s var(--wizard-ease); }
  .primary.advanced .next-arrow { animation:wizard-advance .3s var(--wizard-ease); }
  @media (hover:hover) and (pointer:fine) {
    .primary:enabled:hover .next-arrow { transform:translateX(.22rem); }
  }

  .steps-panel button,
  .steps-panel button span:first-child,
  .wizard-page .languages button {
    transition:color .16s ease, background-color .16s ease, border-color .16s ease;
  }

  .paper :is(input,select,textarea,.choice,.filepick,.small,.back,.primary),
  .paper .filepick input::file-selector-button,
  .review-list details {
    transition:background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
  }

  #step-content[data-step="8"]:is(.step-enter-forward,.step-enter-back) .review-list > details {
    animation:wizard-review .22s var(--wizard-ease) backwards;
  }

  #step-content[data-step="8"]:is(.step-enter-forward,.step-enter-back) .review-list > details:nth-child(n+2) {
    animation-delay:18ms;
  }

  #step-content[data-step="8"]:is(.step-enter-forward,.step-enter-back) .review-list > details:nth-child(n+4) {
    animation-delay:36ms;
  }

  #receipt.receipt-enter {
    animation:wizard-welcome .28s var(--wizard-ease);
  }

  #receipt.receipt-enter::after {
    animation:wizard-check .32s var(--wizard-ease) 60ms backwards;
  }

  @keyframes wizard-welcome {
    from { opacity:.88; transform:translateY(.45rem); }
    to { opacity:1; transform:none; }
  }

  @keyframes wizard-step {
    from { opacity:0; transform:translateX(var(--wizard-travel)); }
    35% { opacity:.35; }
    to { opacity:1; transform:none; }
  }

  @keyframes wizard-depart {
    from { opacity:1; transform:none; }
    to { opacity:0; transform:translateX(calc(-1 * var(--wizard-travel))); }
  }

  @keyframes wizard-advance {
    0%,100% { transform:none; }
    45% { transform:translateX(.32rem); }
  }

  @keyframes wizard-review {
    from { transform:translateY(.2rem); }
    to { transform:none; }
  }

  @keyframes wizard-check {
    from { clip-path:inset(0 100% 0 0); }
    to { clip-path:inset(0); }
  }
}

@media (max-width:850px) {
  .step-enter-forward { --wizard-travel:.7rem; }
  .step-enter-back { --wizard-travel:-.7rem; }
}

@media (max-width:520px) {
  .paper :is(.small,.back,.primary,.choice) {
    min-height:2.75rem;
  }
}

@media (forced-colors:active) {
  .progress-track #progress-meter {
    opacity:1;
    accent-color:auto;
  }

  .progress-fill { display:none; }

  .steps-panel button[aria-current=step],
  .paper .choice:has(input:checked) {
    outline:1px solid Highlight;
  }
}
