/* ============================================================
   VERINESS: request flow (§18) and product preview shell
   Depends on styles.css tokens and styles/product.css primitives.
   ============================================================ */

.flow-page { min-height: 100vh; padding: clamp(104px, 12vw, 132px) 0 90px; background: var(--paper); }
.flow-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

.flow-head { margin-bottom: 30px; }
.flow-head h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 4.6vw, 54px); font-weight: 600; line-height: 1.02; letter-spacing: -.05em;
}
.flow-head p { max-width: 560px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* progress rail */
.flow-progress { display: grid; gap: 10px; margin-bottom: 26px; }
.flow-bar { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.flow-bar i { display: block; height: 100%; width: 16.6%; border-radius: 99px; background: var(--green); transition: width .4s cubic-bezier(.2,.7,.3,1); }
.flow-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.flow-steps span {
  color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  transition: color .3s;
}
.flow-steps span[data-state="current"] { color: var(--green-dark); font-weight: 500; }
.flow-steps span[data-state="done"] { color: var(--ink); }
.flow-steps span[data-state="done"]::before { content: "✓ "; color: var(--green-dark); }

/* card */
.flow-card {
  padding: clamp(26px, 3.6vw, 46px);
  border: 1px solid var(--line); border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 26px 70px rgba(16, 29, 47, .08);
}
.flow-step-panel[hidden] { display: none; }
.flow-step-panel > .step-index {
  display: block; margin-bottom: 12px;
  color: var(--green-dark); font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
}
.flow-step-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.08; letter-spacing: -.04em;
}
.flow-step-panel > p.hint { max-width: 560px; margin: 0 0 28px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* option cards */
.opt-grid { display: grid; gap: 12px; }
.opt-grid.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.opt {
  position: relative; display: block; cursor: pointer;
  padding: 20px 22px 20px 54px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.opt:hover { border-color: color-mix(in srgb, var(--green), transparent 55%); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt::before {
  content: ""; position: absolute; left: 20px; top: 22px;
  width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.opt.check::before { border-radius: 6px; }
.opt b { display: block; font-size: 15px; letter-spacing: -.015em; }
.opt small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.opt:has(input:checked) { border-color: var(--green); background: color-mix(in srgb, var(--green), transparent 95%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green), transparent 88%); }
.opt:has(input:checked)::before { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3.5px var(--surface); }
.opt.check:has(input:checked)::before { box-shadow: none; }
.opt:has(input:focus-visible) { outline: 2px solid var(--green-dark); outline-offset: 3px; }

/* fields */
.flow-fields { display: grid; gap: 18px; }
.flow-fields.two { grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 7px; }
.field > label { color: var(--ink); font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.field > label .req { color: var(--green-dark); }
.field small.help { color: var(--muted); font-size: 12px; line-height: 1.55; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.45;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 108px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green), transparent 86%);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #d64545; }
.field .error { color: #c33b3b; font-size: 12px; min-height: 0; }

/* review */
.review-list { display: grid; gap: 0; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.review-list > div {
  display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding: 16px 20px; background: var(--surface);
}
.review-list > div + div { border-top: 1px solid var(--hairline, var(--line)); }
.review-list dt { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.review-list dd { margin: 0; font-size: 14.5px; line-height: 1.6; }
.review-list dd ul { margin: 0; padding-left: 18px; }
.review-list button {
  padding: 0; border: 0; background: none; color: var(--green-dark);
  font-family: var(--sans); font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: underline;
}

/* actions */
.flow-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
}
.flow-actions .spacer { flex: 1; }
.flow-error {
  margin: 18px 0 0; padding: 13px 16px;
  border: 1px solid #f0c2c2; border-radius: 12px; background: #fdf2f2; color: #a53131;
  font-size: 13.5px;
}
[data-theme="dark"] .flow-error { border-color: #62302f; background: #2a1717; color: #f0a9a9; }

/* success */
.flow-success { text-align: center; padding: clamp(30px, 5vw, 60px) 20px; }
.flow-success .tick {
  width: 66px; height: 66px; margin: 0 auto 24px; display: grid; place-items: center;
  border-radius: 50%; background: color-mix(in srgb, var(--green), transparent 84%); color: var(--green-dark);
  font-size: 30px;
}
.flow-success h2 { margin: 0 0 14px; font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; letter-spacing: -.04em; }
.flow-success p { max-width: 480px; margin: 0 auto 10px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.flow-success .ref {
  display: inline-block; margin: 22px 0 30px; padding: 11px 18px;
  border: 1px dashed var(--line); border-radius: 12px;
  font-family: var(--mono); font-size: 14px; letter-spacing: .05em;
}
.flow-aside {
  margin-top: 24px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel, var(--surface-2));
  color: var(--muted); font-size: 13px; line-height: 1.7;
}
.flow-aside b { color: var(--ink); }

@media (max-width: 720px) {
  .flow-fields.two { grid-template-columns: 1fr; }
  .review-list > div { grid-template-columns: 1fr; gap: 6px; }
  .flow-actions { flex-direction: column-reverse; align-items: stretch; }
  .flow-actions .button { justify-content: center; }
  .flow-actions .spacer { display: none; }
}
