:root {
  --font-body: "Roboto", "Segoe UI", sans-serif;
  --font-display: "Roboto", "Segoe UI", sans-serif;
  --bg-paper: #f7f2e8;
  --bg-mist: #ebf4ef;
  --bg-ink: #172033;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --border: rgba(23, 32, 51, 0.08);
  --text: #172033;
  --muted: #5e6a80;
  --teal: #0f766e;
  --teal-soft: #d6f3ea;
  --orange: #d97706;
  --orange-soft: #fde7cb;
  --red: #c2410c;
  --red-soft: #f9d7cf;
  --green: #1d7a46;
  --green-soft: #d8f0df;
  --gold: #c68b16;
  --gold-soft: #f9e9bd;
  --slate: #40536f;
  --navy-soft: #dbe6ff;
  --primary: #0f766e;
  --border-color: rgba(23, 32, 51, 0.08);
  --text-light: #5e6a80;
  --shadow: 0 22px 60px rgba(23, 32, 51, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 118, 110, 0.14), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(217, 119, 6, 0.16), transparent 28%),
    linear-gradient(140deg, var(--bg-paper) 0%, var(--bg-mist) 54%, #e4ebf8 100%);
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

canvas {
  width: 100% !important;
  height: 320px !important;
}

.page-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px;
}

.card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 460px);
  gap: 28px;
  padding: 28px;
}

.eyebrow,
.panel-title,
.field span,
.summary-label,
.metric-label,
.token-label,
.list-title,
.panel-meta {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--teal);
}

.masthead h1 {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.3;
}

.masthead-text,
.panel-copy,
.footer-note,
.status-note,
.summary-copy,
.detail-copy,
.plain-summary p,
.timeline-item p,
.kv-note {
  color: var(--muted);
  line-height: 1.6;
}

.masthead-text {
  max-width: 58ch;
  margin: 14px 0 0;
}

.masthead-actions {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field span,
.panel-title,
.panel-meta,
.summary-label,
.list-title,
.metric-label,
.token-label {
  font-size: 0.72rem;
  color: var(--muted);
}

select,
button {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 14px;
  background: var(--surface-strong);
  color: var(--text);
}

button {
  border: 0;
  font-weight: 700;
  color: #f7fafc;
  background: linear-gradient(135deg, #0f766e, #155e75);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.3);
}

.ghost-button,
.icon-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  box-shadow: none;
}

.icon-button {
  min-height: 40px;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metrics-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.metric-card-position {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.95)),
    rgba(255, 255, 255, 0.92);
}

.metric-card strong {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
}

.metric-card p {
  margin: 0;
}

.metric-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.76);
}

.metric-chip.running {
  color: #0f766e;
  background: var(--teal-soft);
}

.metric-chip.completed {
  color: #0f766e;
  background: var(--teal-soft);
}

.metric-chip.failed {
  color: var(--red);
  background: var(--red-soft);
}

.metric-chip.legacy {
  color: var(--slate);
  background: var(--navy-soft);
}

.metric-chip.positive {
  color: var(--green);
  background: var(--green-soft);
}

.metric-chip.negative {
  color: var(--red);
  background: var(--red-soft);
}

.metric-chip.neutral {
  color: var(--orange);
  background: var(--orange-soft);
}

.main-layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.stage-card {
  padding: 20px;
  min-height: 74vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
}

.stage-header,
.panel-header-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.stage-status {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.status-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

#sigma-container {
  position: relative;
  min-height: 580px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.06);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9), rgba(234, 244, 239, 0.96) 58%, rgba(227, 236, 248, 0.98)),
    linear-gradient(180deg, rgba(23, 32, 51, 0.02), rgba(23, 32, 51, 0));
}

.stage-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border-radius: 999px;
}

.dot-up {
  background: #1d9b6c;
}

.dot-flat {
  background: var(--orange);
}

.dot-down {
  background: #dc2626;
}

.dot-unknown {
  background: #64748b;
}

.side-layout {
  display: grid;
  gap: 24px;
  align-content: start;
}

.plain-panel,
.selection-panel,
.token-panel,
.chart-card,
.playbook-panel,
.timeline-panel {
  padding: 22px;
}

.plain-summary {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.plain-summary p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
}

.plain-summary .summary-verdict {
  font-weight: 700;
  border-width: 0;
}

.plain-summary .summary-verdict-positive {
  color: var(--green);
  background: linear-gradient(135deg, rgba(216, 240, 223, 0.96), rgba(255, 255, 255, 0.92));
}

.plain-summary .summary-verdict-negative {
  color: var(--red);
  background: linear-gradient(135deg, rgba(249, 215, 207, 0.96), rgba(255, 255, 255, 0.92));
}

.plain-summary .summary-verdict-neutral {
  color: var(--orange);
  background: linear-gradient(135deg, rgba(253, 231, 203, 0.96), rgba(255, 255, 255, 0.92));
}

.panel-meta.tone-positive {
  color: var(--green);
}

.panel-meta.tone-negative {
  color: var(--red);
}

.panel-meta.tone-neutral {
  color: var(--orange);
}

.token-stack {
  display: grid;
  gap: 14px;
}

.token-meter {
  display: grid;
  gap: 10px;
}

.token-stack-bar {
  display: flex;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
}

.token-segment {
  height: 100%;
}

.token-segment-prompt {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.token-segment-completion {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.token-bar {
  position: relative;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(23, 32, 51, 0.08);
}

.token-fill,
.token-fill-secondary {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
}

.token-fill {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.token-fill-secondary {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.26), rgba(217, 119, 6, 0.7));
}

.token-grid,
.summary-grid,
.identity-grid,
.mini-kv {
  display: grid;
  gap: 12px;
}

.token-grid,
.summary-grid,
.identity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.token-stat,
.summary-box,
.identity-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
}

.token-stat strong,
.summary-box strong,
.identity-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
}

.selection-panel h2 {
  margin: 0;
  font-size: 1.7rem;
}

.identity-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.identity-swatch {
  flex: none;
  width: 18px;
  height: 72px;
  border-radius: 999px;
}

.forecast-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.forecast-up {
  color: #0f766e;
  background: var(--teal-soft);
}

.forecast-flat {
  color: var(--orange);
  background: var(--orange-soft);
}

.forecast-down {
  color: var(--red);
  background: var(--red-soft);
}

.forecast-unknown {
  color: var(--slate);
  background: var(--navy-soft);
}

.list-block {
  margin-top: 20px;
}

.kv-list,
.playbook-list,
.timeline-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.kv-list li,
.timeline-item,
.playbook-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
}

.kv-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.kv-list strong,
.timeline-item strong,
.playbook-item strong {
  color: var(--text);
}

.copy-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.copy-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
}

.copy-card p,
.playbook-item p,
.timeline-item p {
  margin: 8px 0 0;
}

.copy-card-topline,
.timeline-topline,
.playbook-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.analytics-grid,
.lower-grid {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.analytics-grid {
  grid-template-columns: 1fr 1fr;
}

.chart-card-full {
  grid-column: 1 / -1;
}

.lower-grid {
  grid-template-columns: 1fr;
}

.playbook-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.playbook-item {
  display: grid;
  gap: 12px;
}

.playbook-copy {
  display: grid;
  gap: 8px;
}

.playbook-copy div {
  padding-top: 8px;
  border-top: 1px solid rgba(23, 32, 51, 0.06);
}

.playbook-copy span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.timeline-list {
  max-height: 460px;
  overflow: auto;
}

.timeline-item time {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-kv {
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-shell.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 28px 80px rgba(11, 18, 32, 0.25);
}

.modal-card h2 {
  margin: 10px 0 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1;
}

.modal-validator-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.92), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(23, 32, 51, 0.08);
  display: grid;
  gap: 14px;
}

.modal-validator-head {
  align-items: center;
}

.modal-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-field {
  margin: 0;
}

.modal-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.position-card {
  display: grid;
  gap: 14px;
}

.position-order {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.position-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.position-pill-positive {
  color: var(--green);
  background: var(--green-soft);
}

.position-pill-neutral {
  color: var(--orange);
  background: var(--orange-soft);
}

.position-pill-negative {
  color: var(--red);
  background: var(--red-soft);
}

.position-rows {
  display: grid;
  gap: 10px;
}

.position-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.position-row-label,
.position-row-value {
  font-size: 0.88rem;
  font-weight: 700;
}

.position-row-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
}

.position-row-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

.position-row-fill-positive {
  background: linear-gradient(90deg, #1d7a46, #31a461);
}

.position-row-fill-neutral {
  background: linear-gradient(90deg, #c68b16, #e3ab2f);
}

.position-row-fill-negative {
  background: linear-gradient(90deg, #c2410c, #dc2626);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
}

.help-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 999px;
}

.help-modal-card {
  max-width: 760px;
}

.help-steps {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.help-step-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
}

.help-step-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.help-step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.help-step-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(21, 94, 117, 0.22));
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 900;
}

.help-support-block {
  margin-top: 22px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(214, 243, 234, 0.46), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(15, 118, 110, 0.16);
  display: grid;
  gap: 14px;
}

.help-support-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.support-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  color: #f7fafc;
  background: linear-gradient(135deg, #0f766e, #155e75);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.support-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.3);
}

.support-link-button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: none;
}

.help-support-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(23, 32, 51, 0.16);
  color: var(--muted);
}

@media (max-width: 1220px) {
  .masthead,
  .main-layout,
  .insights-grid,
  .analytics-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playbook-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px;
  }

  .metrics-grid,
  .action-row,
  .token-grid,
  .summary-grid,
  .identity-grid,
  .mini-kv {
    grid-template-columns: 1fr;
  }

  .stage-footer,
  .stage-header,
  .panel-header-row,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #sigma-container {
    min-height: 420px;
  }

  .help-support-actions,
  .help-step-card {
    grid-template-columns: 1fr;
  }

  .help-fab {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}

.setup-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.setup-card {
  max-width: 680px;
  width: 100%;
  padding: 3rem 2.5rem;
  text-align: center;
}

.landing-card {
  max-width: 820px;
}

.setup-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  font-weight: 900;
  margin: 0 0 1rem;
  color: var(--text);
}

.setup-desc {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: left;
}

.form-section {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 252, 0.9));
}

.form-section-head {
  display: grid;
  gap: 0.3rem;
}

.form-step {
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-section-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.form-section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-age-range {
  align-content: start;
}

.size-slider-block {
  display: grid;
  gap: 0.8rem;
}

.size-slider-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.size-slider-summary strong {
  font-size: 1.05rem;
}

.size-slider-summary span {
  color: var(--teal);
  font-weight: 700;
}

.size-slider-input {
  appearance: none;
  width: 100%;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.22), rgba(217, 119, 6, 0.28));
  box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.08);
}

.size-slider-input::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #155e75);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.size-slider-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #155e75);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.size-slider-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.size-slider-scale span:nth-child(2),
.size-slider-scale span:nth-child(3),
.size-slider-scale span:nth-child(4) {
  text-align: center;
}

.size-slider-scale span:last-child {
  text-align: right;
}

.pricing-tier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pricing-tier-item {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 32, 51, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.setup-form textarea,
.setup-form select,
.setup-form input[type="text"],
.setup-form input[type="number"],
.setup-form input[type="tel"],
.setup-form input[type="password"] {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-family: var(--font-body);
  box-sizing: border-box;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.setup-form textarea:focus,
.setup-form select:focus,
.setup-form input[type="text"]:focus,
.setup-form input[type="number"]:focus,
.setup-form input[type="tel"]:focus,
.setup-form input[type="password"]:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.giant-button {
  font-size: 1.08rem;
  padding: 1rem;
  margin-top: 0.4rem;
}

.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.path-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 252, 0.9));
  color: var(--text);
  box-shadow: 0 16px 34px rgba(23, 32, 51, 0.08);
  text-align: center;
}

.path-option:hover {
  border-color: rgba(15, 118, 110, 0.25);
  box-shadow: 0 22px 44px rgba(15, 118, 110, 0.14);
}

.path-icon {
  font-size: 2.2rem;
}

.path-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.path-hint {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.path-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.paid-tag {
  background: var(--orange);
}

@media (max-width: 560px) {
  .path-grid {
    grid-template-columns: 1fr;
  }

  .form-section-grid {
    grid-template-columns: 1fr;
  }

  .size-slider-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  background: none;
  border: none;
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: left;
  padding: 0;
  box-shadow: none;
}

.back-link:hover {
  text-decoration: underline;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.small-input {
  width: 80px !important;
  text-align: center;
}

.range-sep,
.range-unit,
.payment-note {
  color: var(--muted);
}

.payment-note {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.25rem;
  line-height: 1.5;
}

.paywall-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.paywall-card {
  max-width: 460px;
  width: 100%;
  padding: 2.5rem;
}

.paywall-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.paywall-card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.paywall-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--orange);
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}

.hidden {
  display: none !important;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 248, 245, 0.97);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loadingSpin 1s linear infinite;
  margin-bottom: 2rem;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay.hidden {
  display: none !important;
}

.loading-subtext {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}
