:root {
    --bg: #1c1b2e;
    --bg-card: #232235;
    --bg-deep: #161525;
    --pink: #e85d9e;
    --pink-light: #f080b8;
    --pink-dim: rgba(232,93,158,0.15);
    --gold: #f4c542;
    --silver: #b0bec5;
    --bronze: #cd7f32;
    --platinum: #a8d8ea;
    --text: #e8e6f0;
    --text-muted: #9896ac;
    --border: rgba(232,93,158,0.25);
    --line: rgba(232,93,158,0.3);
    --spark-bg: rgba(80,30,60,0.5);
    --spark-border: rgba(232,93,158,0.4);
    --radius: 12px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background: var(--bg-deep);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  /* ── PROGRESS BAR ── */
  #progress-bar-wrap {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: rgba(255,255,255,0.06);
    z-index: 100;
  }
  #progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--pink-light));
    transition: width 0.4s ease;
    border-radius: 0 4px 4px 0;
  }

  /* ── PAGE CONTAINER ── */
  .workbook {
    width: 100%;
    max-width: 860px;
    padding: 20px 16px 60px;
  }

  /* ── PAGES ── */
  .page {
    display: none;
    animation: fadeIn 0.4s ease;
  }
  .page.active { display: block; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── COVER PAGE ── */
  .cover {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 0 40px;
  }
  .badge-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 32px;
  }
  .badge-pill {
    border: 1px solid;
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .badge-pill.bronze { color: var(--bronze); border-color: var(--bronze); }
  .badge-pill.silver { color: var(--silver); border-color: var(--silver); }
  .badge-pill.gold   { color: var(--gold);   border-color: var(--gold); }
  .badge-pill.platinum { color: var(--platinum); border-color: var(--platinum); }

  .cover-eyebrow {
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--pink);
    font-family: 'DM Mono', monospace;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  .cover-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 7vw, 68px);
    line-height: 1.1;
    color: var(--pink);
    margin-bottom: 20px;
  }
  .cover-sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 48px;
  }

  /* ── SECTION HEADER ── */
  .section-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pink);
    margin-bottom: 6px;
  }
  .page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 5vw, 42px);
    color: var(--pink);
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 600px;
  }
  .level-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border-left: 4px solid var(--pink);
  }
  .level-num {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: var(--pink);
    opacity: 0.3;
    line-height: 1;
  }
  .level-info { flex: 1; }
  .level-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--pink);
  }
  .level-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
  }
  .level-purpose {
    font-size: 14px;
    color: var(--text);
    line-height: 1.75;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 28px;
    border: 1px solid var(--border);
  }

  /* ── CARD ── */
  .card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
  }
  .card-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--pink-light);
    margin-bottom: 20px;
  }

  /* ── FIELD LABEL ── */
  label.field-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
  }

  /* ── LINED INPUTS ── */
  .lined-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    padding: 10px 4px;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 14px;
  }
  .lined-input:focus { border-bottom-color: var(--pink); }
  .lined-input::placeholder { color: rgba(232,93,158,0.25); font-style: italic; }

  .lined-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    padding: 10px 4px;
    outline: none;
    resize: none;
    line-height: 2.2;
    background-image: repeating-linear-gradient(
      transparent,
      transparent calc(2.2em - 1px),
      var(--line) calc(2.2em - 1px),
      var(--line) 2.2em
    );
    min-height: 120px;
  }
  .lined-textarea:focus { outline: none; }
  .lined-textarea::placeholder { color: rgba(232,93,158,0.25); font-style: italic; }

  /* ── CHECKBOXES ── */
  .check-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }
  .check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
  }
  .check-item input[type="checkbox"] { display: none; }
  .check-box {
    width: 20px; height: 20px;
    border: 1px solid var(--line);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .check-item input:checked + .check-box {
    background: var(--pink);
    border-color: var(--pink);
  }
  .check-item input:checked + .check-box::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
  }
  .check-label {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    padding-top: 1px;
  }

  /* ── RADIO ── */
  .radio-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
  .radio-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
  .radio-item input[type="radio"] { display: none; }
  .radio-dot {
    width: 18px; height: 18px;
    border: 1px solid var(--line);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .radio-item input:checked + .radio-dot {
    border-color: var(--pink);
    background: var(--pink-dim);
  }
  .radio-item input:checked + .radio-dot::after {
    content: '';
    width: 8px; height: 8px;
    background: var(--pink);
    border-radius: 50%;
  }
  .radio-label { font-size: 14px; color: var(--text); }

  /* ── IDEA SPARK ── */
  .idea-spark {
    background: var(--spark-bg);
    border: 1px solid var(--spark-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 20px;
    margin-bottom: 8px;
  }
  .spark-head {
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0.12em;
    color: var(--pink);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .spark-head::before { content: '💡'; }
  .spark-body { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

  /* ── PURDUE EXAMPLE ── */
  .example-box {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    border-left: 3px solid var(--pink);
  }
  .example-head {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0.12em;
    color: var(--pink);
    margin-bottom: 8px;
  }
  .example-body { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

  /* ── VISION STATEMENT ── */
  .vision-builder {
    background: linear-gradient(135deg, rgba(232,93,158,0.08), rgba(80,30,60,0.3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
  }
  .vision-template {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
  }
  .vision-template span {
    color: var(--pink);
    font-style: normal;
    border-bottom: 1px dashed var(--pink);
    padding: 0 4px;
  }

  /* ── TWO COLUMN ── */
  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }
  @media(max-width: 600px) { .two-col { grid-template-columns: 1fr; } }

  /* ── SECTOR GRID ── */
  .sector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  @media(max-width: 500px) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
  .sector-btn {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.2s;
    user-select: none;
  }
  .sector-btn.selected {
    border-color: var(--pink);
    background: var(--pink-dim);
    color: var(--pink);
  }

  /* ── DIVIDER ── */
  .divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
  }

  /* ── ADAPTIVE STATEMENT ── */
  .statement-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
  @media(max-width: 580px) { .statement-examples { grid-template-columns: 1fr; } }
  .stmt-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
  }
  .stmt-type {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    color: var(--pink);
    letter-spacing: 0.1em;
    margin-bottom: 10px;
  }
  .stmt-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 8px;
  }
  .stmt-note { font-size: 12px; color: var(--text-muted); }

  /* ── BUTTONS ── */
  .btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    gap: 12px;
  }
  .btn {
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
  }
  .btn-next {
    background: var(--pink);
    color: white;
    box-shadow: 0 4px 24px rgba(232,93,158,0.3);
  }
  .btn-next:hover {
    background: var(--pink-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(232,93,158,0.4);
  }
  .btn-back {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
  }
  .btn-back:hover { color: var(--text); border-color: var(--text-muted); }
  .btn-submit {
    background: linear-gradient(135deg, var(--pink), #c0336f);
    color: white;
    font-size: 16px;
    padding: 16px 40px;
    box-shadow: 0 4px 30px rgba(232,93,158,0.35);
  }
  .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(232,93,158,0.45);
  }
  .page-counter {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
  }

  /* ── SAVE INDICATOR ── */
  #save-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(35,34,53,0.95);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 8px 20px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 200;
    pointer-events: none;
  }
  #save-indicator.visible { opacity: 1; }
  #save-indicator.saved { color: var(--pink); }

  .btn-download {
    background: transparent;
    color: var(--platinum);
    border: 1px solid var(--platinum);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .btn-download:hover {
    background: rgba(168,216,234,0.1);
    transform: translateY(-1px);
  }

  #resume-banner {
    display: none;
    background: var(--spark-bg);
    border: 1px solid var(--spark-border);
    border-radius: var(--radius);
    padding: 16px 24px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  #resume-banner.show { display: flex; }
  .resume-text { line-height: 1.5; }
  .resume-text strong { color: var(--pink); }
  .btn-clear {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    flex-shrink: 0;
  }
  .btn-clear:hover { color: var(--text); }

  /* ── SUCCESS PAGE ── */
  .success-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
  }
  .success-icon {
    font-size: 64px;
    margin-bottom: 24px;
  }
  .success-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--pink);
    margin-bottom: 16px;
  }
  .success-body {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.7;
  }

  /* ── SELECT ── */
  select.lined-input {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e85d9e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
  }
  select.lined-input option { background: var(--bg-card); color: var(--text); }