/* Build Your 2027 Roadmap — page-specific styles.
   Uses the site's existing design tokens from styles.css (--accent, --bg, --white,
   --muted, --border, --radius, --font-head/--font-body). Badge/tag fills use a
   literal mint (#5EEAD4) rather than --accent-2 — that token is referenced in
   CLAUDE.md's governance note but is not actually defined anywhere in the
   shared CSS, so var(--accent-2) silently resolved to transparent (invisible
   near-black-on-black text). Flag this to whoever owns styles.css.
   All selectors are scoped under .rm- to avoid clashing with shared site classes. */

/* The site's shared .btn classes set their own `display`, which otherwise beats the
   browser's default [hidden] styling — without this, a hidden Back/Next/Submit button
   still renders. Force it for every hideable control in this page. */
#rmRoot [hidden] { display: none !important; }

/* The sitewide button script (js/main.js) appends the same forward-pointing arrow,
   after the label, to every .btn — correct for Next/Submit, backwards for Back.
   Reverse the icon side and mirror the arrow for this one button only. */
#rmBackBtn { flex-direction: row-reverse; }
#rmBackBtn .btn-icon svg { transform: scaleX(-1); }

.rm-section { max-width: 640px; }
#rmRoot input[type="checkbox"] { accent-color: var(--accent); }
.rm-hero { text-align: center; }
.rm-hero .lede { max-width: 480px; margin: 0 auto 20px; }
.rm-muted { color: var(--muted); font-size: 0.92rem; }
.rm-field .rm-muted, .rm-preview-card .rm-muted { color: #6b6b6b; }

.rm-hiw-row { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 28px; }
.rm-hiw-card {
  width: 100%; max-width: 320px; background: #fff; border: 1px solid #ececec; border-radius: 16px;
  padding: 28px 24px; text-align: center; color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 8px 20px -12px rgba(0,0,0,0.18);
}
.rm-hiw-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem;
  margin: 0 auto 16px; font-family: var(--font-head);
}
.rm-hiw-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--ink); }
.rm-hiw-card p { margin: 0; font-size: 0.9rem; color: #5c5c5c; line-height: 1.5; }
.rm-hiw-arrow { color: var(--accent); width: 26px; height: 26px; transform: rotate(90deg); flex: none; }
.rm-hiw-arrow svg { width: 100%; height: 100%; display: block; }
.rm-hiw-cta { text-align: center; margin-top: 32px; }
@media (min-width: 760px) {
  .rm-hiw-row { flex-direction: row; align-items: stretch; justify-content: center; gap: 16px; }
  .rm-hiw-card { flex: 1 1 0; }
  .rm-hiw-arrow { transform: none; }
}

.rm-progress-track { height: 8px; background: var(--glass-bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.rm-progress-fill { height: 100%; background: var(--accent); width: 14.28%; transition: width 0.3s ease; }
.rm-step-label { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }

.rm-field {
  margin-bottom: 22px;
  padding: 22px 20px 24px;
  background: #fff;
  border: 1px solid #F0D7D7;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.14), 0 10px 24px -16px rgba(0,0,0,0.3);
}
.rm-field-label {
  display: block;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  color: var(--ink);
  font-family: var(--font-head);
  line-height: 1.35;
}
/* step headings sit directly on the dark page, above the white question cards */
#rmStepContainer > h2 {
  color: var(--white);
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.rm-chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.rm-chip {
  min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1px solid #e3dede;
  background: var(--neutral-soft); color: var(--ink); cursor: pointer; font-size: 0.92rem; font-weight: 400;
  font-family: var(--font-body); transition: all 0.12s ease;
}
.rm-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rm-chip:hover:not([aria-pressed="true"]) { background: #efe9e9; }

.rm-card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 480px) { .rm-card-grid.rm-grid-2 { grid-template-columns: 1fr 1fr; } }
.rm-card {
  text-align: left; width: 100%; min-height: 48px; padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid #e3dede; background: var(--neutral-soft); color: var(--ink); cursor: pointer;
  font-family: var(--font-body); transition: all 0.12s ease;
}
.rm-card:hover:not([aria-pressed="true"]) { background: #efe9e9; }
.rm-card strong { display: block; font-size: 0.95rem; font-weight: 400; margin-bottom: 4px; font-family: var(--font-body); color: var(--ink); }
.rm-card .rm-card-note { display: block; font-size: 0.85rem; color: #6b6b6b; }
.rm-card[aria-pressed="true"] { border-color: var(--accent); border-width: 2px; background: #FBECED; }
.rm-card .rm-tag {
  display: inline-block; margin-top: 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em;
  color: #0A0A0A; background: #5EEAD4; border: 1px solid rgba(0,0,0,0.08); border-radius: 999px; padding: 5px 12px;
}

.rm-input, .rm-select, .rm-textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid #bdbdbd; font-family: var(--font-body); background: #fff; color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.rm-input:focus, .rm-select:focus, .rm-textarea:focus { border-color: var(--accent); }
.rm-select option { background: #fff; color: var(--ink); }
.rm-textarea { min-height: 90px; resize: vertical; }
.rm-char-count { font-size: 0.8rem; color: #8a8a8a; text-align: right; margin-top: 4px; }
.rm-error-text { color: var(--accent); font-size: 0.88rem; margin-top: 6px; display: none; }
.rm-field.rm-has-error .rm-error-text { display: block; }
.rm-field.rm-has-error .rm-input, .rm-field.rm-has-error .rm-select { border-color: var(--accent); }

.rm-slider-block { margin-bottom: 26px; }
.rm-slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rm-slider-title { font-weight: 700; color: var(--ink); font-family: var(--font-head); }
.rm-slider-score { font-weight: 800; font-size: 1.1rem; color: var(--accent); }
.rm-slider-block input[type="range"] { width: 100%; height: 48px; -webkit-appearance: none; background: transparent; }
.rm-slider-block input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: #e3dede; }
.rm-slider-block input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); margin-top: -10px; cursor: pointer;
}
.rm-slider-block input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: #e3dede; }
.rm-slider-block input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); cursor: pointer;
}
.rm-weakest-badge {
  display: inline-block; margin-top: 10px; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.02em;
  color: #0A0A0A; background: #5EEAD4; border: 1px solid rgba(0,0,0,0.08); border-radius: 999px; padding: 5px 12px;
}
.rm-chart-wrap { margin-top: 24px; background: var(--neutral-soft); border: 1px solid #e3dede; border-radius: var(--radius-sm); padding: 16px; }

.rm-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
@media (max-width: 560px) {
  .rm-nav { flex-direction: column-reverse; }
  .rm-nav .btn { width: 100%; }
}
.rm-banner { background: #FBECED; border: 1px solid #F3C9CC; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 0.92rem; margin-bottom: 20px; color: #6B0707; }

/* Customer-value "calculator" result card (step 4) */
.rm-value-card {
  margin-top: 8px;
  padding: 20px;
  border-radius: var(--radius);
  background: #F6EAEA;
  border: 1px solid rgba(161, 10, 10, 0.3);
}
.rm-value-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.rm-value-stat { text-align: center; padding: 16px 8px; background: #FDF4F4; border-radius: var(--radius-sm); }
.rm-value-stat .rm-value-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.5rem, 5vw, 2rem); color: var(--accent); }
.rm-value-stat .rm-value-caption { display: block; font-size: 0.8rem; color: #5A4444; margin-top: 4px; }
.rm-value-note { font-size: 0.85rem; color: #5A4444; margin: 0; }
.rm-value-tracking-text { font-size: 0.95rem; color: #2A1A1A; margin: 0; font-weight: 600; }
.rm-nudge { background: #FBECED; border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.88rem; margin-top: 10px; display: none; color: #6B0707; }
.rm-nudge.rm-show { display: block; }
.rm-tip { background: var(--neutral-soft); border: 1px solid #e3dede; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.88rem; margin-top: 10px; color: #555; }
.rm-checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); }
.rm-checkbox-row input[type="checkbox"] { width: 22px; height: 22px; min-width: 22px; margin-top: 2px; }

.rm-thankyou { text-align: center; }
.rm-preview-card { background: #fff; border: 1px solid #ececec; box-shadow: 0 1px 3px rgba(0,0,0,0.14), 0 10px 24px -16px rgba(0,0,0,0.3); border-radius: var(--radius); padding: 20px; text-align: left; margin: 20px 0; }
.rm-preview-row { margin-bottom: 12px; color: var(--ink); }
.rm-preview-row strong { display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; color: #8a8a8a; }
.rm-countup { font-size: 2.2rem; font-weight: 800; color: var(--accent); }

.rm-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .rm-step-panel { animation: rmFadeIn 0.25s ease; }
  @keyframes rmFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
