.flow-page {
  --flow-ink: #171c36;
  --flow-muted: #626b83;
  --flow-brand: #5045ed;
  --flow-line: #e2e5ef;
  --flow-subtle: #f7f8fc;
  padding-top: clamp(24px, 5vw, 66px);
  padding-bottom: clamp(52px, 8vw, 112px);
  color: var(--flow-ink);
}
.flow-page [hidden] { display: none !important; }
.flow-page a:not(.button) {
  color: var(--flow-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.flow-page a:focus-visible,
.flow-page button:focus-visible,
.flow-page input:focus-visible {
  outline: 2px solid var(--flow-brand);
  outline-offset: 3px;
}
.flow-heading { margin-bottom: clamp(24px, 4vw, 42px); }
.flow-heading h1 {
  margin: 13px 0 7px;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -.05em;
}
.flow-heading p, .flow-card p { margin: 0; line-height: 1.65; }
.flow-heading p { color: var(--flow-muted); }
.flow-crumb { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--flow-muted); }
.flow-crumb a:not(.button) { text-decoration: none; }
.flow-crumb a:not(.button):hover { text-decoration: underline; }
.flow-progress {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 30px);
  list-style: none;
  margin: 0 0 clamp(18px, 3vw, 30px);
  padding: 0;
}
.flow-progress li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--flow-muted);
  white-space: nowrap;
}
.flow-step-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--flow-line);
  background: #fff;
  font-size: .75rem;
  font-weight: 700;
}
.flow-progress .flow-step-done { color: #345643; }
.flow-step-done .flow-step-number { background: #e8f7ee; border-color: #d8eee1; color: #237048; }
.flow-progress .flow-step-current { color: var(--flow-brand); font-weight: 700; }
.flow-step-current .flow-step-number { background: var(--flow-brand); border-color: var(--flow-brand); color: #fff; }
.flow-step-done.flow-step-current .flow-step-number { background: #21734b; border-color: #21734b; color: #fff; }
.flow-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(260px, .54fr); gap: clamp(14px, 2.4vw, 28px); }
.flow-stack { display: grid; min-width: 0; gap: 15px; margin: 0; }
.flow-card {
  min-width: 0;
  border: 1px solid var(--flow-line);
  border-radius: 22px;
  background: #fff;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 7px 24px #20294407;
}
.flow-card-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 15px;
  margin-bottom: 16px;
}
.flow-card h2, .flow-access-note h2 { margin: 0; font-size: clamp(1.12rem, 2vw, 1.43rem); line-height: 1.3; letter-spacing: -.02em; }
.flow-card h3 { margin: 0; font-size: 1.03rem; }
.flow-card-head a { font-size: .88rem; }
.flow-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1efff;
  color: #4734b1;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.flow-small { color: var(--flow-muted); font-size: .88rem; }
.flow-product-line { display: flex; align-items: center; gap: 13px; }
.flow-product-line strong { word-break: break-word; }
.flow-product-line p { color: var(--flow-muted); font-size: .88rem; }
.flow-product-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #8071ff, #4b3dbd 70%);
  font-size: 1.55rem;
  box-shadow: 0 3px 9px #5748c033;
}
.flow-line-quantity { margin-left: auto; color: var(--flow-muted); font-size: .88rem; white-space: nowrap; }
.flow-card .flow-callout {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 16px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--flow-subtle);
  color: var(--flow-muted);
  font-size: .84rem;
}
.flow-callout strong { color: var(--flow-ink); }
.flow-summary { position: sticky; top: 88px; }
.flow-costs, .flow-details { display: grid; gap: 11px; margin: 0; }
.flow-costs div, .flow-details div { display: flex; justify-content: space-between; gap: 9px 18px; }
.flow-costs dt, .flow-details dt { color: var(--flow-muted); font-size: .9rem; flex: none; }
.flow-costs dd, .flow-details dd { margin: 0; font-size: .9rem; text-align: right; overflow-wrap: anywhere; }
.flow-details { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--flow-line); }
.flow-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--flow-line);
  font-weight: 650;
}
.flow-total strong { color: var(--flow-brand); font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -.04em; }
.flow-wide { display: flex; justify-content: center; width: 100%; }
.flow-summary .flow-wide { margin-top: 16px; }
.flow-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 260px;
  align-content: center;
  text-align: center;
}
.flow-empty p { max-width: 45ch; color: var(--flow-muted); }
.flow-empty .button { margin-top: 6px; }
.flow-empty-icon {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border-radius: 17px;
  color: var(--flow-brand);
  background: #f2efff;
  font-size: 1.73rem;
}
.flow-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--flow-tone-bg);
  color: var(--flow-tone-fg);
  font-size: .77rem;
  font-weight: 700;
  white-space: nowrap;
}
.flow-state > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.flow-tone-neutral { --flow-tone-bg: #eef1f6; --flow-tone-fg: #4b576e; }
.flow-tone-danger { --flow-tone-bg: #fdecef; --flow-tone-fg: #a12740; }
.flow-tone-active { --flow-tone-bg: #efedff; --flow-tone-fg: #4532c0; }
.flow-tone-success { --flow-tone-bg: #e7f8ef; --flow-tone-fg: #17643c; }
.flow-status-box { border-radius: 15px; background: var(--flow-tone-bg); padding: 12px; }
.flow-status-box p { margin: 6px 3px 0; color: var(--flow-tone-fg); font-size: .9rem; }
.flow-status-box:focus { outline: 2px solid var(--flow-brand); outline-offset: 2px; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.flow-confirm { margin-top: 15px; padding: 12px; border: 1px solid #dfd9ff; border-radius: 13px; background: #f8f6ff; }
.flow-confirm .flow-actions { margin-top: 9px; }
.flow-error {
  padding: 11px 14px;
  border: 1px solid #f3ccd3;
  border-radius: 10px;
  background: #fff1f3;
  color: #8b2237;
  font-size: .88rem;
}
.flow-card .flow-error { margin-top: 12px; }
.flow-timeline { margin: 0; padding: 0; list-style: none; }
.flow-timeline li {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-left: 5px;
  padding: 0 0 12px 17px;
  border-left: 1px solid #d9d4f5;
  font-size: .9rem;
}
.flow-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.flow-timeline li::before {
  position: absolute;
  top: .42em;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6a5fe8;
  content: "";
}
.flow-timeline time { color: var(--flow-muted); }
.flow-account-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
  background: #f5f3ff;
  border-color: #e8e3ff;
}
.flow-account-strip .flow-error { flex-basis: 100%; margin: 0; }
.flow-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px; margin-bottom: 12px; }
.flow-search .flow-field { flex: 1 1 190px; max-width: 390px; }
.flow-order-rows { margin-top: 9px; }
.flow-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px 19px;
  padding: 15px 0;
  border-top: 1px solid var(--flow-line);
}
.flow-order-meta { display: grid; justify-items: end; gap: 4px; }
.flow-order-id { color: var(--flow-muted); overflow-wrap: anywhere; font: .75rem/1.6 ui-monospace, monospace; }
.flow-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(230px, 1fr);
  align-items: stretch;
  gap: 16px;
}
.flow-account-page { max-width: 930px; }
.flow-access-card { max-width: 510px; }
.flow-access-note {
  align-content: center;
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 22px;
  background: radial-gradient(ellipse at 95% 0, #6b57ea 0, transparent 58%), #27234d;
  color: #fff;
}
.flow-access-note > span { display: block; margin-bottom: 14px; color: #dbd6ff; font-size: 1.8rem; }
.flow-access-note p { margin: 10px 0; color: #e3dfff; line-height: 1.65; }
.flow-access-note ul { margin: 14px 0 0; padding-left: 20px; color: #e3dfff; font-size: .88rem; line-height: 1.65; }
.flow-field { display: grid; gap: 5px; }
.flow-field label { font-size: .9rem; font-weight: 650; }
.flow-field small { color: var(--flow-muted); font-size: .8rem; }
.flow-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #ced3e2;
  border-radius: 10px;
  padding: 8px 11px;
  background: #fff;
  color: var(--flow-ink);
  font: inherit;
}
.flow-field input[aria-invalid="true"] { border-color: #a12740; }
.flow-field + .flow-field { margin-top: 13px; }
.flow-access-card form .flow-wide { margin-top: 12px; }
.flow-access-card .flow-access-link { margin-top: 18px; color: var(--flow-muted); font-size: .88rem; }
@media (max-width: 700px) {
  .flow-layout, .flow-access-layout { grid-template-columns: minmax(0, 1fr); }
  .flow-summary { position: static; }
  .flow-access-note { display: none; }
  .flow-access-card { max-width: none; }
  .flow-progress { justify-content: space-between; }
}
@media (max-width: 460px) {
  .flow-progress li { gap: 4px; font-size: .78rem; }
  .flow-step-number { width: 23px; height: 23px; }
  .flow-order-row { grid-template-columns: minmax(0, 1fr) auto; }
  .flow-order-row .button { grid-column: 1 / -1; justify-content: center; }
  .flow-status-box p { margin-inline: 1px; }
  .flow-actions .button { flex-grow: 1; }
}

