/* Hindsight (internal name: Rewind): decade-based life advice collection.

   Palette (Field Notes memo-book): butter/cream ground, warm dark-brown ink,
   muted teal accents, coral for primary action, a whisper of mustard for
   highlights. Slab-serif display face for headings feels like a stamped
   almanac cover.

   Time-boxed. When Hindsight sunsets, delete this file.
*/

:root {
  --rw-ink:        #221d14;
  --rw-ink-mute:   rgba(34, 29, 20, 0.62);
  --rw-cream:      #eccdb7;   /* page: warm salmon-pink beige */
  --rw-cream-dk:   #d9a68a;
  --rw-paper:      #faf2da;   /* card: clean warm cream */
  --rw-line:       rgba(34, 29, 20, 0.26);
  --rw-slate:      #3e7565;   /* teal eyebrow/uppercase accents */
  --rw-slate-dk:   #285544;
  --rw-coral:      #d64a3e;   /* primary action button -- unchanged */
  --rw-coral-dk:   #b33c31;
  --rw-mustard:    #c8931f;
  --rw-mustard-tint: #f3e1a6;
  --rw-display:    'Rockwell', 'Rockwell Nova', 'Superclarendon',
                   'Bookman Old Style', 'Palatino Linotype', 'Georgia', serif;
  --rw-serif:      Georgia, 'Times New Roman', serif;
  --rw-sans:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--rw-cream);
  /* Graph-paper backdrop on the salmon-pink page. Warm-brown ink
     lines (not coral) so they stay visible on the pink and don't
     compete with the coral primary button. */
  background-image:
    linear-gradient(to right,
      rgba(34, 29, 20, 0.14) 0.75px, transparent 0.75px),
    linear-gradient(to bottom,
      rgba(34, 29, 20, 0.14) 0.75px, transparent 0.75px);
  background-size: 24px 24px, 24px 24px;
  background-position: 0 0, 0 0;
}

.rw-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  color: var(--rw-ink);
  font-family: var(--rw-sans);
}

/* ── Cover ─────────────────────────────────────────────────── */

.rw-cover-frame {
  background: var(--rw-paper);
  /* Clean lifted page. No border, no framing -- the cover is just a
     sheet of paper sitting on the graph paper. Soft drop shadow
     carries the depth. */
  border: none;
  border-radius: 4px;
  padding: 56px 48px 44px;
  box-shadow:
    0 1px 2px rgba(34, 29, 20, 0.08),
    0 10px 24px rgba(34, 29, 20, 0.10),
    0 22px 44px rgba(34, 29, 20, 0.08);
  position: relative;
}

.rw-cover-eyebrow {
  font-family: var(--rw-sans);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rw-slate);
  margin-bottom: 18px;
}

.rw-cover-title {
  font-family: var(--rw-display);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 0.005em;
  line-height: 0.98;
  text-transform: uppercase;
  margin: 0 0 22px;
  color: var(--rw-ink);
  text-shadow: 1px 1px 0 rgba(34, 29, 20, 0.06);
}

/* Absolute-positioned in the upper-right of the cover frame so the
   image never overlaps the CTA / email form at the bottom. Clicks
   pass through as a safety. */
.rw-cover-image {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 160px;
  max-width: 32%;
  margin: 0;
  pointer-events: none;
  z-index: 1;
}
.rw-cover-image img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 640px) {
  /* On narrow screens fall back to inline flow so the image doesn't
     collide with the buttons or the copy. */
  .rw-cover-image {
    position: static;
    width: auto;
    max-width: 200px;
    margin: 16px auto 0;
    text-align: center;
  }
  .rw-cover-image img { margin: 0 auto; }
}

.rw-cover-mission {
  font-family: var(--rw-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rw-slate);
  margin: 0 0 22px;
  line-height: 1.4;
}

.rw-cover-tagline {
  font-family: var(--rw-sans);
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0 0 20px;
  color: #4a4335;
  font-weight: 600;
}

.rw-cover-body {
  font-family: var(--rw-sans);
  font-size: 1.02rem;
  line-height: 1.6;
  color: #4a4335;
  margin: 0 0 16px;
  text-align: justify;
}
.rw-cover-body:last-of-type { margin-bottom: 32px; }

.rw-cover-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ── Buttons ───────────────────────────────────────────────── */

.rw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 22px;
  border: 1.5px solid transparent;
  font-family: var(--rw-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.rw-btn-primary {
  background: var(--rw-coral);
  color: #fff;
  border-color: var(--rw-coral);
}
.rw-btn-primary:hover:not(:disabled) {
  background: var(--rw-coral-dk);
  border-color: var(--rw-coral-dk);
}
.rw-btn-primary:disabled { opacity: 0.55; cursor: default; }

.rw-btn-ghost {
  background: transparent;
  color: var(--rw-ink);
  border-color: var(--rw-ink);
}
.rw-btn-ghost:hover:not(:disabled) {
  background: var(--rw-ink);
  color: #fff;
}

/* ── Post-submit thank-you + feedback panel ─────────────────── */

.rw-thanks-head {
  text-align: center;
  padding: 8px 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rw-line);
}
.rw-thanks-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dfeed6;
  color: #3e7565;
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.rw-thanks-title {
  font-family: var(--rw-display);
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--rw-ink);
  margin: 0 0 10px;
  line-height: 1.1;
}
.rw-thanks-lede {
  font-family: var(--rw-sans);
  font-size: 1.02rem;
  line-height: 1.6;
  color: #4a4335;
  margin: 0 auto;
  max-width: 520px;
}

/* ── Cover relink shortcut ──────────────────────────────────── */

.rw-cover-relink { margin-top: 14px; }
.rw-cover-relink-toggle {
  background: transparent;
  border: none;
  color: var(--rw-slate);
  font-family: var(--rw-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}
.rw-cover-relink-toggle:hover { color: var(--rw-slate-dk); }

.rw-cover-relink-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.rw-cover-relink-form input[type=email] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  font-family: var(--rw-sans);
  font-size: 0.92rem;
  background: #fff;
  color: var(--rw-ink);
}
.rw-cover-relink-form input[type=email]:focus {
  outline: none;
  border-color: var(--rw-slate);
}

.rw-cover-relink-status {
  font-family: var(--rw-sans);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 1.2em;
  color: var(--rw-ink-mute);
}
.rw-cover-relink-status.is-success { color: var(--rw-slate-dk); font-weight: 700; }
.rw-cover-relink-status.is-error { color: var(--rw-coral-dk); font-weight: 700; }

/* ── Interior ──────────────────────────────────────────────── */

.rw-interior { margin-top: 0; }

.rw-header-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.rw-header-link {
  background: transparent;
  border: none;
  color: var(--rw-ink-mute);
  font-family: var(--rw-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 4px 0;
}
.rw-header-link:hover { color: var(--rw-slate); }

/* ── Save & come back later ─────────────────────────────── */

.rw-savelater {
  background: #fff8e5;
  border: 1px solid #e8dcae;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.rw-savelater-blurb {
  font-family: var(--rw-sans);
  font-size: 0.85rem;
  color: var(--rw-ink);
  margin-bottom: 10px;
}
.rw-savelater-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rw-savelater-form .rw-input {
  flex: 1 1 240px;
  min-width: 220px;
}
.rw-savelater-status {
  margin-top: 8px;
  font-family: var(--rw-sans);
  font-size: 0.82rem;
  color: var(--rw-ink-mute);
  min-height: 1em;
}
.rw-savelater-status.is-ok { color: #2f6b3a; }
.rw-savelater-status.is-error { color: #a4322a; }

.rw-card {
  background: var(--rw-paper);
  border: 1px solid var(--rw-line);
  border-radius: 3px;
  padding: 40px 40px 32px;
  position: relative;
  margin-top: 22px;
  /* Lifted-paper shadow -- reads like a card taped down on the
     graph-paper background rather than an embedded panel. */
  box-shadow:
    0 1px 0 rgba(34, 29, 20, 0.10),
    0 6px 14px rgba(34, 29, 20, 0.10),
    0 18px 34px rgba(34, 29, 20, 0.09);
}

/* Two strips of washi tape holding the card down at the top corners.
   Semi-transparent mustard so the coral grid faintly shows through,
   and lightly rotated so it doesn't read as machine-cut. */
.rw-card::before,
.rw-card::after {
  content: '';
  position: absolute;
  top: -12px;
  height: 22px;
  background: rgba(62, 117, 101, 0.55);
  box-shadow: 0 2px 4px rgba(34, 29, 20, 0.18);
  pointer-events: none;
}
.rw-card::before {
  left: 32px;
  width: 94px;
  transform: rotate(-3.5deg);
}
.rw-card::after {
  right: 40px;
  width: 78px;
  transform: rotate(3deg);
}

.rw-card-head {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rw-line);
  position: relative;
}

.rw-card-eyebrow {
  font-family: var(--rw-sans);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rw-slate);
  margin-bottom: 10px;
}

.rw-card-heading {
  font-family: var(--rw-display);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--rw-ink);
}

.rw-card-lede {
  font-family: var(--rw-sans);
  font-size: 1.02rem;
  line-height: 1.6;
  color: #4a4335;
  margin: 0;
}
.rw-card-lede + .rw-card-lede { margin-top: 14px; }

/* ── Fields ────────────────────────────────────────────────── */

.rw-step-form { display: flex; flex-direction: column; gap: 22px; }

.rw-field { display: flex; flex-direction: column; gap: 10px; }

.rw-field-label {
  font-family: var(--rw-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rw-slate);
}

.rw-field input[type=email] {
  padding: 12px 16px;
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  font-family: var(--rw-sans);
  font-size: 0.98rem;
  background: #fff;
  color: var(--rw-ink);
}
.rw-field input[type=email]:focus {
  outline: none;
  border-color: var(--rw-slate);
  box-shadow: 0 0 0 3px rgba(74, 95, 116, 0.15);
}

.rw-decade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.rw-decade-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1.5px solid var(--rw-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: var(--rw-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rw-ink);
  transition: border-color 0.14s, background 0.14s;
}
.rw-decade-option:hover { border-color: var(--rw-slate); }
.rw-decade-option:has(input:checked) {
  background: var(--rw-ink);
  color: #fff;
  border-color: var(--rw-ink);
}
.rw-decade-option input[type=radio] { accent-color: var(--rw-coral); }
.rw-decade-label { flex: 1; }

.rw-field-hint {
  font-family: var(--rw-sans);
  font-size: 0.98rem;
  color: #4a4335;
  line-height: 1.55;
  margin: -4px 0 8px;
}
/* Inline follow-up prompt within an existing rw-field. Reads as
   flowing paragraph text between two textareas rather than a second
   heavy label. Matches rw-field-hint sizing/color for consistency;
   only the margin differs (positive top since it follows a textarea). */
.rw-field-inline-prompt {
  font-family: var(--rw-sans);
  font-size: 0.98rem;
  color: #4a4335;
  line-height: 1.55;
  margin: 14px 0 8px;
}

/* Madlib block for "What were you measuring?" -- soft coral card
   with two lead-plus-blank rows. Visual break from stacked textareas. */
.rw-madlib-block {
  background: rgba(209, 90, 79, 0.06);
  border: 1px solid rgba(209, 90, 79, 0.28);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rw-madlib-eyebrow {
  font-family: var(--rw-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rw-coral-dk);
  margin-bottom: 6px;
}
.rw-madlib-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-family: var(--rw-sans);
  font-size: 1rem;
  color: var(--rw-ink);
  line-height: 1.6;
}
.rw-madlib-lead {
  flex-shrink: 0;
}
/* base.css sets a global input rule with (0,4,1) specificity
   (input:not([type=...]) x 4). We need !important to beat it on
   the visual shape properties. Non-shape props (font, color) get
   applied via the normal cascade because base doesn't specify them. */
.rw-madlib-input {
  flex: 1;
  min-width: 200px;
  border: none !important;
  border-bottom: 1.5px solid var(--rw-coral) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 4px 8px !important;
  font-family: var(--rw-sans);
  font-size: 1rem;
  color: var(--rw-ink);
  font-style: italic;
  width: auto;
  display: inline-block;
}
.rw-madlib-input:focus {
  outline: none;
  border-bottom-color: var(--rw-coral-dk) !important;
  background: rgba(255, 255, 255, 0.55) !important;
  box-shadow: none !important;
}
/* Q3 madlib inputs use a bracketed underline (left/right/bottom
   border with rounded bottom corners) so they read distinct from
   Q1's flat underlines. Scoped inside .rw-madlib-sentence. */
.rw-madlib-sentence .rw-madlib-input {
  border: 1.5px solid var(--rw-coral) !important;
  border-top: none !important;
  border-radius: 0 0 12px 12px !important;
  /* Tight line-height + small padding-bottom keeps the whole box
     compact (so bracket sides stay short) while giving descenders
     a few pixels of clearance above the border line. */
  padding: 0 12px 4px !important;
  height: auto !important;
  line-height: 1 !important;
  vertical-align: baseline !important;
}
.rw-madlib-sentence .rw-madlib-input:focus {
  border-color: var(--rw-coral-dk) !important;
  border-top: none !important;
}
.rw-madlib-input::placeholder {
  color: var(--rw-ink-mute);
  opacity: 0.7;
}

/* ── Per-decade overall rating (single slider) ────────────────── */

.rw-overall {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--rw-line);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.rw-overall-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.rw-overall-label {
  font-family: var(--rw-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rw-ink);
}
.rw-overall-value {
  font-family: var(--rw-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--rw-coral-dk);
  min-width: 36px;
  text-align: right;
}
.rw-overall-slider {
  width: 100% !important;
  height: 8px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: rgba(214, 74, 62, 0.18) !important;
  border: none !important;
  border-radius: 999px !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.rw-overall-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rw-coral);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(34, 29, 20, 0.25);
  cursor: pointer;
}
.rw-overall-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rw-coral);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(34, 29, 20, 0.25);
  cursor: pointer;
}
.rw-overall-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--rw-sans);
  font-size: 0.72rem;
  color: var(--rw-ink-mute);
}
.rw-overall-anchors {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-family: var(--rw-sans);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #4a4335;
}
.rw-overall-anchors strong {
  color: var(--rw-coral-dk);
  margin-right: 4px;
}

/* ── Q3: Postcards to your younger self ─────────────────────
   Three postcard-shaped cards, one per prompt (Prioritize, Avoid,
   Look out for). Header with "To your younger self" + numbered
   stamp. Dashed divider. Body with prompt lead + underline input
   + "because" continuation.  */
.rw-postcards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}
.rw-postcards-eyebrow {
  font-family: var(--rw-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rw-coral-dk);
  margin-bottom: 2px;
}
.rw-postcard {
  background: #faf2da;
  border: 1px solid rgba(34, 29, 20, 0.22);
  border-radius: 4px;
  /* padding-right leaves room for the absolute-positioned stamp */
  padding: 12px 46px 12px 16px;
  box-shadow:
    0 1px 0 rgba(34, 29, 20, 0.08),
    0 6px 14px rgba(34, 29, 20, 0.08);
  position: relative;
}
/* subtle scattered rotation for hand-placed feel */
.rw-postcard-stamp-a { transform: rotate(-0.5deg); }
.rw-postcard-stamp-b { transform: rotate(0.3deg); }
.rw-postcard-stamp-c { transform: rotate(-0.2deg); }
.rw-postcard-head {
  /* head wrapper now just anchors the stamp; not part of body flow */
  position: absolute;
  top: 12px;
  right: 12px;
}
.rw-postcard-stamp {
  width: 24px;
  height: 28px;
  background: var(--rw-coral);
  border: 1.5px dashed rgba(255, 255, 255, 0.6);
  outline: 1px solid var(--rw-coral);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rw-postcard-stamp span {
  font-family: var(--rw-display);
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff;
}
.rw-postcard-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rw-postcard-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.rw-postcard-because {
  padding-left: 24px;
}
.rw-postcard-lead {
  flex-shrink: 0;
  font-family: var(--rw-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--rw-ink);
}
.rw-postcard-because .rw-postcard-lead {
  font-weight: 400;
  font-style: italic;
  color: var(--rw-ink-mute);
}
.rw-postcard-input {
  flex: 1 !important;
  min-width: 200px !important;
  width: auto !important;
  border: none !important;
  border-bottom: 1.5px dashed rgba(34, 29, 20, 0.32) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 4px 4px 2px !important;
  font-family: var(--rw-sans);
  font-size: 1rem;
  color: var(--rw-ink);
  font-style: italic;
  line-height: 1.4;
}
.rw-postcard-input:focus {
  outline: none;
  border-bottom-color: var(--rw-coral) !important;
  border-bottom-style: solid !important;
  box-shadow: none !important;
}

/* Numbered sentence-style madlib (Q3): each sentence wraps a
   main clause + an indented "because" clause on its own line. */
.rw-madlib-sentence {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.rw-madlib-sentence:last-child { margin-bottom: 0; }
.rw-madlib-num {
  flex-shrink: 0;
  font-family: var(--rw-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--rw-coral-dk);
  min-width: 20px;
}
.rw-madlib-because {
  padding-left: 32px;
}

.rw-step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.rw-step-status {
  font-family: var(--rw-sans);
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--rw-ink-mute);
  margin-top: 6px;
  text-align: right;
}
.rw-step-status.is-error { color: var(--rw-coral-dk); font-weight: 700; }

/* ── Saved-state summary ───────────────────────────────────── */

.rw-saved-summary {
  background: var(--rw-cream-dk);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.rw-saved-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rw-line);
  font-family: var(--rw-sans);
  font-size: 0.9rem;
}
.rw-saved-row:last-of-type { border-bottom: none; }

.rw-saved-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rw-slate);
}

.rw-saved-value {
  font-weight: 600;
  color: var(--rw-ink);
}

.rw-note {
  font-size: 0.88rem;
  color: var(--rw-ink-mute);
  font-style: italic;
  margin: 0;
}

/* ── Step nav (progress dots) ─────────────────────────────── */

.rw-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rw-step-nav {
  display: flex;
  gap: 8px;
}

.rw-step-dot {
  background: transparent;
  border: 1.5px solid var(--rw-line);
  color: var(--rw-ink-mute);
  border-radius: 6px;
  font-family: var(--rw-sans);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 9px;
  cursor: pointer;
  transition: all 0.14s;
}
.rw-step-dot:hover { border-color: var(--rw-slate); color: var(--rw-slate); }
.rw-step-dot.active { background: var(--rw-ink); border-color: var(--rw-ink); color: #fff; }
.rw-step-dot.done { border-color: var(--rw-slate); color: var(--rw-slate); }

.rw-step-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--rw-line);
}
.rw-step-nav-spacer { flex: 1; }

/* ── Form controls: textarea, input, select ─────────────── */

.rw-textarea,
.rw-input,
.rw-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  font-family: var(--rw-sans);
  font-size: 0.92rem;
  background: #fff;
  color: var(--rw-ink);
  box-sizing: border-box;
}
.rw-textarea { resize: vertical; min-height: 90px; font-family: var(--rw-sans); font-size: 0.96rem; line-height: 1.55; }
.rw-textarea:focus,
.rw-input:focus,
.rw-select:focus { outline: none; border-color: var(--rw-slate); box-shadow: 0 0 0 3px rgba(74, 95, 116, 0.15); }

.rw-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rw-checkbox-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--rw-sans);
  font-size: 0.9rem;
  color: var(--rw-ink);
  cursor: pointer;
  line-height: 1.5;
}
.rw-checkbox-row input[type=checkbox],
.rw-radio-row input[type=radio] { accent-color: var(--rw-coral); flex-shrink: 0; }

.rw-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.rw-radio-stack { display: flex; flex-direction: column; gap: 12px; }
.rw-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--rw-line);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--rw-sans);
  font-size: 0.9rem;
  color: var(--rw-ink);
  transition: border-color 0.14s, background 0.14s;
}
.rw-radio-row:hover { border-color: var(--rw-slate); }
.rw-radio-row:has(input:checked) { background: var(--rw-cream-dk); border-color: var(--rw-ink); }

.rw-consent-row {
  padding: 14px 16px;
  border: 1.5px dashed var(--rw-line);
  border-radius: 10px;
  background: var(--rw-cream-dk);
  font-size: 0.88rem;
  line-height: 1.55;
}
.rw-ethnicity-block { margin-top: 20px; }

/* ── Decade cards ─────────────────────────────────────────── */

.rw-decade-card {
  background: var(--rw-cream);
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 18px;
}

/* Per-decade tint so contributors always know which decade they're
   editing at a glance. Chosen to stay legible against the salmon
   page and the paper card behind them. Borders shift with the
   fill so the card frame reads as a set. */
.rw-decade-card[data-decade="0"]  { background: #dfeed6; border-color: #a9c99a; }  /* Teens */
.rw-decade-card[data-decade="20"] { background: #fbeeb8; border-color: #cfb852; }  /* 20s */
.rw-decade-card[data-decade="30"] { background: #d3e5f4; border-color: #8bb2d1; }  /* 30s */
.rw-decade-card[data-decade="40"] { background: #f0d1de; border-color: #c88ba4; }  /* 40s */
.rw-decade-card[data-decade="50"] { background: #dfd6ec; border-color: #a99cc4; }  /* 50s */
.rw-decade-card[data-decade="60"] { background: #f7d4b0; border-color: #cf9866; }  /* 60s */
.rw-decade-card[data-decade="70"] { background: #cfe4c1; border-color: #92b57e; }  /* 70s */
.rw-decade-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.rw-decade-card-title {
  font-family: var(--rw-sans);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rw-ink);
}
.rw-inprogress-badge {
  font-family: var(--rw-sans);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--rw-slate);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: 6px;
}
.rw-decade-remove {
  background: transparent;
  border: none;
  color: var(--rw-ink-mute);
  font-family: var(--rw-sans);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}
.rw-decade-remove:hover { color: var(--rw-coral-dk); }

.rw-decade-card .rw-field { margin-bottom: 16px; }
.rw-decade-card .rw-field:last-of-type { margin-bottom: 0; }

/* ── Decade context reveal card ─────────────────────────────
   Folded by default. Contributor opens it if they want to see the
   "advantages / common challenges" reference material for this
   decade before answering the questions below. */
.rw-decade-context {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rw-line);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.rw-decade-context > summary {
  cursor: pointer;
  font-family: var(--rw-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rw-slate-dk);
  list-style: none;
  padding: 2px 0;
}
.rw-decade-context > summary::-webkit-details-marker { display: none; }
.rw-decade-context > summary::before {
  content: '+';
  display: inline-block;
  width: 14px;
  margin-right: 6px;
  font-weight: 700;
  color: var(--rw-slate);
}
.rw-decade-context[open] > summary::before { content: '−'; }
.rw-decade-context-body {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--rw-line);
  font-family: var(--rw-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4a4335;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rw-decade-context-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.rw-decade-context-up   { background: #dfeed6; color: #285544; }
.rw-decade-context-down { background: #f6e1c6; color: #8b3e28; }
.rw-decade-context-list {
  margin: 0;
  padding-left: 20px;
}
.rw-decade-context-list li {
  margin: 4px 0;
}

/* ── Tag chips ───────────────────────────────────────────── */

.rw-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #fff;
  border: 1.5px solid var(--rw-line);
  border-radius: 20px;
  font-family: var(--rw-sans);
  font-size: 0.82rem;
  color: var(--rw-ink);
  cursor: pointer;
  transition: all 0.14s;
}
.rw-chip:hover { border-color: var(--rw-slate); }
.rw-chip.is-on { background: var(--rw-ink); color: #fff; border-color: var(--rw-ink); }
.rw-chip input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.rw-chip.is-custom { background: var(--rw-coral); color: #fff; border-color: var(--rw-coral); cursor: default; }
.rw-chip-x {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 4px;
}

.rw-custom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.rw-custom-tags:empty { margin-top: 0; }

.rw-add-tag-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.rw-add-tag-row .rw-input { flex: 1; padding: 6px 12px; font-size: 0.85rem; }

.rw-btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ── Add-a-decade row ─────────────────────────────────────── */

.rw-add-decade-row {
  padding: 16px 20px;
  background: var(--rw-cream-dk);
  border-radius: 8px;
  margin-top: 8px;
}
.rw-add-decade-row .rw-select { width: auto; min-width: 200px; }

/* ── Status text ─────────────────────────────────────────── */

.rw-step-status.is-ok { color: var(--rw-slate-dk); font-weight: 700; }

/* ── Timeline strip (Step 3) ──────────────────────────────── */

.rw-timeline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 12px 4px 28px;
  margin: 0 0 18px;
  overflow-x: auto;
}

.rw-timeline-dot {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  flex-shrink: 0;
}
.rw-timeline-dot-mark {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--rw-line);
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.rw-timeline-dot:hover .rw-timeline-dot-mark {
  border-color: var(--rw-slate);
  transform: scale(1.15);
}
.rw-timeline-dot.is-filled .rw-timeline-dot-mark {
  background: var(--rw-ink);
  border-color: var(--rw-ink);
}
/* is-active: the decade currently on screen. Coral ring signals
   focus (moved from is-current, which now relies on the in-card
   "(in progress)" tag alone). */
.rw-timeline-dot.is-active .rw-timeline-dot-mark {
  border-color: var(--rw-coral);
  border-width: 3px;
  width: 16px;
  height: 16px;
  transform: scale(1.4);
  box-shadow: 0 0 0 4px rgba(217, 106, 90, 0.18);
}
.rw-timeline-dot.is-active.is-filled .rw-timeline-dot-mark {
  background: var(--rw-coral);
}
.rw-timeline-dot.is-active .rw-timeline-dot-label { color: var(--rw-ink); font-weight: 800; }

.rw-decade-cardnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}
.rw-decade-cardnav > span { flex: 1; }

.rw-patterns {
  margin: 40px 0 0;
  padding-top: 32px;
  border-top: 1px dashed var(--rw-line);
}
.rw-patterns:empty { display: none; }
.rw-patterns-head { margin-bottom: 20px; }
.rw-patterns-eyebrow {
  font-family: var(--rw-sans);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rw-slate);
  margin-bottom: 6px;
}
.rw-patterns-title {
  font-family: var(--rw-display);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--rw-ink);
  margin-bottom: 6px;
}
.rw-patterns-lede {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--rw-ink-mute);
}
.rw-patterns-group {
  background: var(--rw-cream);
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.rw-patterns-group-title {
  font-family: var(--rw-display);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--rw-ink);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rw-line);
}
.rw-patterns-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rw-line);
}
.rw-patterns-group[data-cols="2"] .rw-patterns-row {
  grid-template-columns: 76px 1fr 1fr;
}
.rw-patterns-group[data-cols="3"] .rw-patterns-row {
  grid-template-columns: 76px 1fr 1fr 1fr;
}
.rw-patterns-row:last-of-type { border-bottom: none; }
.rw-patterns-row-head {
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--rw-line);
}
.rw-patterns-colhead {
  font-family: var(--rw-sans);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--rw-slate);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rw-patterns-era {
  font-family: var(--rw-sans);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--rw-slate);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: start;
  padding-top: 2px;
}
.rw-patterns-body {
  font-family: var(--rw-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--rw-ink);
  white-space: pre-wrap;
}
.rw-patterns-body.is-empty::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--rw-line);
  vertical-align: middle;
}
.rw-patterns-empty {
  font-size: 0.85rem;
  color: var(--rw-ink-mute);
  font-style: italic;
}
@media (max-width: 640px) {
  .rw-patterns-group[data-cols="2"] .rw-patterns-row,
  .rw-patterns-group[data-cols="3"] .rw-patterns-row {
    grid-template-columns: 76px 1fr;
  }
  .rw-patterns-group[data-cols="2"] .rw-patterns-body + .rw-patterns-body,
  .rw-patterns-group[data-cols="3"] .rw-patterns-body + .rw-patterns-body {
    grid-column: 2;
    padding-top: 4px;
    border-top: 1px dashed var(--rw-line);
  }
  .rw-patterns-row-head .rw-patterns-colhead { display: none; }
}
.rw-timeline-dot-label {
  font-family: var(--rw-sans);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--rw-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rw-timeline-dot.is-filled .rw-timeline-dot-label,
.rw-timeline-dot.is-current .rw-timeline-dot-label {
  color: var(--rw-ink);
}
.rw-timeline-line {
  flex: 1;
  height: 2px;
  background: var(--rw-line);
  min-width: 24px;
  align-self: flex-start;
  margin-top: 18px;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 640px) {
  .rw-cover-frame,
  .rw-card { padding: 32px 24px 28px; }
  .rw-cover-title { font-size: 2.4rem; }
  .rw-cover-tagline { font-size: 1rem; }
  .rw-cover-body { font-size: 0.9rem; }
  .rw-field-row { grid-template-columns: 1fr; }
  .rw-checkbox-grid { grid-template-columns: 1fr; }
}
