/* NextUp paid onboarding - restyled public flow. */
:root {
  --olive: #28311e;
  --olive-soft: #3b472c;
  --green: #6e7a3f;
  --cream: #f4eddd;
  --cream-deep: #eae0c9;
  --paper: #fbf7ec;
  --melon: #c5314a;
  --melon-deep: #a82640;
  --gold: #dda63a;
  --ink: #222519;
  --line: #ddd3bc;
  --muted: #7c7761;
  --err: #b3261e;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body.nu-page {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 110px;
}

.nu-shell {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 26px 20px 40px;
}

.nu-header {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.nu-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius);
}

.nu-logo-link:focus {
  outline: 3px solid rgba(110, 122, 63, .22);
  outline-offset: 2px;
}

.nu-logo {
  display: block;
  width: auto;
  height: 44px;
}

.nu-progress-wrap { margin-bottom: 22px; }

.nu-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nu-progress-meta span:last-child {
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
}

.nu-progress-track {
  height: 6px;
  overflow: hidden;
  background: var(--cream-deep);
  border-radius: 999px;
}

.nu-progress-bar {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--green), var(--olive));
  border-radius: 999px;
  transition: width .35s ease;
}

.nu-card {
  padding: 30px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px -30px rgba(40, 49, 30, .35);
}

.nu-step { display: none; }
.nu-step.is-active { display: block; animation: nu-in .3s ease; }

@keyframes nu-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.nu-title {
  margin-bottom: 10px;
  color: var(--olive);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.nu-sub {
  max-width: 52ch;
  margin-bottom: 22px;
  color: var(--olive-soft);
  font-size: .96rem;
}

.nu-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.nu-field {
  min-width: 0;
  margin-bottom: 14px;
}

.nu-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nu-input,
.nu-select {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nu-select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E7A3F' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.nu-input:focus,
.nu-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(110, 122, 63, .18);
}

.nu-input.has-error,
.nu-select.has-error {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}

.nu-input::placeholder { color: #b4ad97; }

.nu-benefits {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0 0 6px;
}

.nu-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  color: var(--olive-soft);
  font-size: .94rem;
}

.nu-benefits svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  fill: none;
  stroke: var(--melon);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.nu-device {
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.nu-device.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(110, 122, 63, .14);
}

.nu-device-head {
  display: flex;
  gap: 14px;
}

.nu-device-img {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  object-fit: contain;
  padding: 4px;
  background: var(--cream-deep);
  border-radius: var(--radius);
}

.nu-device-body { min-width: 0; }

.nu-device-name {
  color: var(--olive);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.3;
}

.nu-device-ready {
  display: inline-block;
  padding: 2px 9px;
  margin: 5px 0 4px;
  color: var(--green);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(110, 122, 63, .12);
  border-radius: 999px;
}

.nu-device-price {
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
}

.nu-device-price .rent {
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
}

.nu-device-details {
  margin-top: 6px;
  color: var(--muted);
  font-size: .84rem;
}

.nu-device-details summary {
  color: var(--green);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
}

.nu-device-details summary::-webkit-details-marker { display: none; }
.nu-device-details p { margin-top: 4px; }

.nu-device-action {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.nu-add-btn {
  padding: 9px 20px;
  color: var(--cream);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--olive);
  border: none;
  border-radius: 999px;
  transition: background .15s ease;
}

.nu-add-btn:hover { background: var(--olive-soft); }

.nu-own {
  color: var(--muted);
  font-size: .86rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.nu-own:hover { color: var(--olive); }

.nu-controls-row {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.nu-device.is-selected .nu-controls-row { display: flex; }
.nu-device.is-selected .nu-device-action { display: none; }

.nu-added-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
}

.nu-added-label svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.nu-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nu-qty .lbl {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nu-qty button {
  width: 30px;
  height: 30px;
  color: var(--olive);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  transition: border-color .15s ease;
}

.nu-qty button:hover { border-color: var(--green); }

.nu-qty input {
  width: 44px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  background: transparent;
  border: none;
}

.nu-remove-btn {
  color: var(--melon);
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
}

.nu-remove-btn:hover { color: var(--melon-deep); }

.nu-buyrent-title {
  margin: 22px 0 10px;
  color: var(--olive);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
}

.nu-buyrent {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nu-br-opt {
  padding: 14px 16px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nu-br-opt b {
  display: block;
  margin-bottom: 3px;
  color: var(--olive);
  font-size: .96rem;
}

.nu-br-opt span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.nu-br-opt.is-on {
  border-color: var(--melon);
  box-shadow: 0 0 0 3px rgba(197, 49, 74, .13);
}

.nu-br-opt.is-on b { color: var(--melon); }

.nu-stories {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nu-story {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--cream-deep);
  border-radius: var(--radius);
}

.nu-story .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: var(--olive);
  border-radius: var(--radius);
}

.nu-story .ic svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--cream);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nu-story b {
  display: block;
  margin-bottom: 2px;
  color: var(--olive);
  font-size: .95rem;
}

.nu-story span:not(.ic) {
  color: var(--olive-soft);
  font-size: .86rem;
}

.nu-summary {
  padding: 20px 18px;
  margin-bottom: 14px;
  color: var(--cream);
  background: var(--olive);
  border-radius: var(--radius);
}

.nu-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 5px 0;
  font-size: .94rem;
}

.nu-line .muted { color: #c9c3ac; }

.nu-line b {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.nu-line.total {
  padding-top: 12px;
  margin-top: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  border-top: 1px solid rgba(244, 237, 221, .22);
}

.nu-free {
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nu-note {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .84rem;
}

.nu-note b { color: var(--olive); }

.nu-ref {
  padding: 18px;
  background: #fff;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
}

.nu-ref-head {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.nu-ref-quote {
  flex: 0 0 auto;
  color: var(--melon);
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
}

.nu-ref h3 {
  margin-bottom: 4px;
  color: var(--olive);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
}

.nu-ref p {
  color: var(--olive-soft);
  font-size: .86rem;
}

.nu-ref-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.nu-ref-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nu-ref-check {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 6px;
  transition: all .15s ease;
}

.nu-ref-toggle input:checked + .nu-ref-check {
  background: var(--melon);
  border-color: var(--melon);
}

.nu-ref-toggle input:checked + .nu-ref-check::after {
  position: absolute;
  inset: 3px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F4EDDD' stroke-width='4'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.nu-ref-text b {
  display: block;
  color: var(--olive);
  font-size: .9rem;
}

.nu-ref-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.nu-rev {
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

.nu-rev h4 {
  margin-bottom: 8px;
  color: var(--green);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nu-rev .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: .92rem;
}

.nu-rev .muted { color: var(--muted); }
.nu-agreed { color: var(--green); font-weight: 600; }
.nu-agreed a { color: var(--melon); }

.nu-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  color: var(--olive-soft);
  font-size: .86rem;
  cursor: pointer;
}

.nu-check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--melon);
}

.nu-check a {
  color: var(--melon);
  font-weight: 600;
}

.nu-error {
  margin-top: 8px;
  color: var(--err);
  font-size: .86rem;
  font-weight: 600;
}

.nu-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 26px;
  font-size: .82rem;
}

.nu-footer a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.nu-footer a:hover {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nu-controls {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(244, 237, 221, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.nu-controls-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}

.nu-btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  transition: background .15s ease, transform .1s ease;
}

.nu-btn:active { transform: scale(.98); }

.nu-btn-primary {
  flex: 1;
  padding: 15px 26px;
  color: #fff;
  font-size: 1.02rem;
  background: var(--melon);
  border: none;
  box-shadow: 0 10px 26px -12px rgba(197, 49, 74, .55);
}

.nu-btn-primary:hover { background: var(--melon-deep); }
.nu-btn-primary:disabled { opacity: .6; cursor: default; }

.nu-btn-back {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  color: var(--olive);
  font-size: 1.15rem;
  background: #fff;
  border: 1.5px solid var(--line);
}

.nu-btn-back:hover { border-color: var(--green); }

.nu-btn-ghost {
  padding: 12px 20px;
  color: var(--olive-soft);
  font-size: .92rem;
  background: transparent;
  border: 1.5px solid var(--line);
}

.nu-btn-ghost:hover { border-color: var(--green); }

.nu-stripe-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 680px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: .78rem;
}

.nu-stripe-trust svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--green);
}

.nu-stripe-wm {
  color: var(--olive);
  font-weight: 700;
}

.nu-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(92vw, 480px);
  padding: 11px 20px;
  color: var(--cream);
  font-size: .88rem;
  font-weight: 500;
  background: var(--olive);
  border-radius: 999px;
  box-shadow: 0 16px 40px -14px rgba(40, 49, 30, .6);
  transform: translate(-50%, -130%);
  transition: transform .3s ease;
}

.nu-toast.show { transform: translate(-50%, 0); }

.nu-toast svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-width: 2;
}

.nu-modal[hidden] { display: none; }

.nu-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 37, 25, .55);
  backdrop-filter: blur(3px);
}

.nu-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow: auto;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}

.nu-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
}

.nu-modal-head h3 {
  color: var(--olive);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.nu-modal-x {
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 50%;
}

.nu-modal-x:hover {
  color: var(--olive);
  background: var(--cream-deep);
}

.nu-modal-body { padding: 14px 22px; }

.nu-legal {
  color: var(--olive-soft);
  font-size: .88rem;
}

.nu-legal-meta { margin-bottom: 10px; }
.nu-legal ul { margin: 0 0 12px 18px; }
.nu-legal li { margin-bottom: 6px; }
.nu-legal a { color: var(--melon); font-weight: 600; }

.nu-modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 22px;
}

.nu-modal-foot .nu-btn-primary {
  flex: 0 0 auto;
  padding: 12px 22px;
  font-size: .94rem;
}

.nu-accept {
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

@media (min-width: 600px) {
  .nu-title { font-size: 2rem; }
}

@media (max-width: 560px) {
  .nu-shell { padding-right: 16px; padding-left: 16px; }
  .nu-grid-2 { grid-template-columns: 1fr; }
  .nu-buyrent { grid-template-columns: 1fr; }
  .nu-card { padding: 24px 18px; }
  .nu-device-head { gap: 12px; }
  .nu-device-img { width: 62px; height: 62px; }
  .nu-modal-foot { justify-content: stretch; }
  .nu-modal-foot .nu-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nu-step.is-active { animation: none; }
  .nu-progress-bar,
  .nu-toast { transition: none; }
}
