/* ============================================================
   Career & Learning Mindset Survey — "Academic Register" theme
   Palette:
     --navy    #1B2A4A  (institutional ink)
     --oxblood #7A1F2B  (accent / required marks)
     --parchment #F1ECDD (page)
     --paper   #FBF8F1  (card surface)
     --brass   #A9782F  (seal / accent line)
     --ink     #211D17  (body text)
   ============================================================ */

:root {
  --navy: #1B2A4A;
  --navy-soft: #2C3E63;
  --oxblood: #7A1F2B;
  --parchment: #F1ECDD;
  --paper: #FBF8F1;
  --brass: #A9782F;
  --ink: #211D17;
  --ink-soft: #514A3D;
  --line: #D8CEB6;
  --ok: #2F5D3A;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--parchment);
  background-image:
    repeating-linear-gradient(180deg, transparent, transparent 27px, rgba(27,42,74,0.035) 28px);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ticket-frame {
  max-width: 900px;
  margin: 32px auto 96px;
  padding: 0 20px;
}

@media (max-width: 600px) {
  .ticket-frame {
    margin: 16px auto 48px;
    padding: 0 12px;
  }
}

/* ---------- Survey Navigation Bar ---------- */
.survey-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.btn-back {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-back:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ---------- Active Set Badge ---------- */
.active-set-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--navy);
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(27, 42, 74, 0.15);
  white-space: nowrap;
}

/* ---------- Hub / Directory Cards ---------- */
.hub-sets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.hub-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 42, 74, 0.08);
  border-color: var(--brass);
}

.hub-card__tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(122, 31, 43, 0.1);
  color: var(--oxblood);
  margin-bottom: 8px;
}

.hub-card__tag--alt {
  background: rgba(27, 42, 74, 0.1);
  color: var(--navy);
}

.hub-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px;
}

.hub-card__desc {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.5;
}

.hub-card__meta {
  font-size: 12px;
  color: var(--brass);
  margin-bottom: 20px;
}

.hub-card__btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ---------- Progress Bar ---------- */
.progress-bar-container {
  height: 4px;
  width: 100%;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--oxblood);
  width: 0%;
  transition: width 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 32px 8px 28px;
  border-bottom: 3px double var(--navy);
  margin-bottom: 8px;
}

.hero__seal {
  position: absolute;
  top: 8px;
  right: 0;
  width: 108px;
  height: 108px;
  animation: spin 34s linear infinite;
}
@media (max-width: 620px) {
  .hero { padding: 20px 4px 20px; }
  .hero__seal { width: 64px; height: 64px; top: 0; right: 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero__seal { animation: none; }
}

.seal__ring { fill: none; stroke: var(--brass); stroke-width: 1.4; }
.seal__ring--inner { stroke-width: 1; opacity: 0.7; }
.seal__text {
  font-family: var(--font-mono);
  font-size: 9.2px;
  letter-spacing: 1.5px;
  fill: var(--navy);
}
.seal__center {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  fill: var(--oxblood);
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 10px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 5vw, 2.9rem);
  line-height: 1.08;
  margin: 0 0 14px;
  color: var(--navy);
  max-width: 80%;
}

.hero__sub {
  max-width: 520px;
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0;
}

/* ---------- Perforation divider ---------- */
.perforation {
  height: 0;
  border-top: 2px dashed var(--line);
  margin: 28px 0;
  position: relative;
}
.perforation::before, .perforation::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--parchment);
  border: 2px dashed var(--line);
}
.perforation::before { left: -27px; }
.perforation::after { right: -27px; }

@media (max-width: 600px) {
  .perforation::before { left: -18px; }
  .perforation::after { right: -18px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: 0 1px 0 rgba(27,42,74,0.04);
}

@media (max-width: 600px) {
  .card {
    padding: 18px 16px;
    margin-bottom: 14px;
  }
}

.card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.card__question {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
}
.card__question .req { color: var(--oxblood); margin-left: 3px; }
.card__hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/* ---------- Fields (identity section) ---------- */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--navy-soft);
}
.field input, .field select, .custom-select {
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .custom-select:focus,
.option input:focus-visible + span,
textarea:focus,
.consent__toggle input:focus-visible + span {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}
.mono-input { font-family: var(--font-mono); letter-spacing: 1px; }

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- Options (radio & checkbox groups) ---------- */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) { .option-grid { grid-template-columns: 1fr; } }

.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  font-size: 14px;
}
.option:hover:not(.option--disabled) { border-color: var(--brass); }
.option input { position: absolute; opacity: 0; }
.option input:checked ~ .tick {
  border-color: var(--oxblood);
  background: var(--oxblood);
}
.option input:checked ~ .tick::after { opacity: 1; }
.option:has(input:checked) {
  border-color: var(--oxblood);
  background: #FBF1EC;
}

.option--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f2ea;
}

.tick {
  flex: 0 0 16px;
  width: 16px; height: 16px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 50%;
  margin-top: 1px;
  position: relative;
}
.tick--square {
  border-radius: 3px;
}
.tick::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
  opacity: 0;
}

/* ---------- Rating Scale (1 to 5) ---------- */
.rating-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.rating-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rating-pill {
  flex: 1;
  min-width: 48px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  transition: all 0.15s ease;
}
.rating-pill input { position: absolute; opacity: 0; }
.rating-pill:hover { border-color: var(--brass); background: #faf7f0; }
.rating-pill:has(input:checked) {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

textarea {
  width: 100%;
  min-height: 96px;
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  resize: vertical;
  color: var(--ink);
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-align: right;
  margin-top: 4px;
}

/* ---------- Consent section ---------- */
.card--consent { border-color: var(--brass); }
.consent__text {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.consent__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.consent__toggle input { width: 16px; height: 16px; accent-color: var(--oxblood); }
.consent__status {
  font-family: var(--font-mono);
  font-size: 12px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  min-height: 16px;
}
.consent__status.granted { color: var(--ok); }
.consent__status.denied { color: var(--oxblood); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn--primary {
  background: var(--oxblood);
  color: #fff;
}
.btn--primary:hover {
  background: #5b1720;
}
.btn--secondary {
  background: var(--navy);
  color: #fff;
}
.btn--secondary:hover {
  background: var(--navy-soft);
}

/* ---------- Submit ---------- */
.submit-row {
  text-align: center;
  padding-top: 8px;
}
.submit-btn {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--navy);
  border: none;
  padding: 15px 40px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  width: 100%;
  max-width: 320px;
}
.submit-btn:hover { background: var(--oxblood); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled { background: #A6A091; cursor: not-allowed; }

.submit-note {
  font-size: 13px;
  color: var(--oxblood);
  margin-top: 12px;
  min-height: 18px;
}
.submit-note.ok { color: var(--ok); }

/* ---------- Success panel ---------- */
.success-panel {
  text-align: center;
  padding: 60px 20px;
}
.success-panel__stamp {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border: 2.5px solid var(--ok);
  border-radius: 50%;
  color: var(--ok);
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-8deg);
}
.success-panel h2 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 8px;
}
.success-panel p { color: var(--ink-soft); margin: 0; }
.success-panel__ref {
  margin-top: 14px !important;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass) !important;
}



