/* =============================================
   BLUEDAY DESIGN DISCOVERY — BRAND STYLESHEET
   Navy canvas + off-white card system, matching
   the Landing Page / Step 1 / brand-kit references.
   Mobile-first: base rules target phones; layout is
   progressively enhanced at the 640px and 960px steps.
   ============================================= */

@font-face {
  font-family: 'Pasajero';
  src: url('../assets/fonts/pasajero.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----- Tokens ----- */
:root {
  --navy:       #1a2e6e;   /* primary brand navy from brand kit */
  --navy-deep:  #0f1c45;   /* deeper shade, canvas edges / shadows */
  --navy-light: #2c4090;   /* hover / lighter accent */
  --white:      #ffffff;
  --off-white:  #f7f8fc;
  --border:     #e2e5ec;
  --text-dark:  #0f1c45;
  --text-mid:   #4b5068;
  --text-light: #8b91a8;
  --selected-bg: var(--navy);
  --selected-text: var(--white);

  /* Shell — navy canvas surrounding the off-white content card */
  --canvas-bg: var(--navy);
  --card-surface: #faf8f3;    /* warm off-white, not stark white */
  --card-radius: 28px;
  --card-radius-sm: 20px;
  --card-shadow: 0 40px 90px -20px rgba(6, 14, 40, 0.55);

  --font-display: 'Pasajero', 'Manrope', -apple-system, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Fluid spacing used across breakpoints instead of hard jumps */
  --content-pad-x: clamp(20px, 6vw, 56px);
  --content-pad-top: clamp(28px, 6vw, 52px);
  --content-pad-bottom: clamp(28px, 7vw, 48px);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --content-max-width: 1040px;
  --frame-max-width: 1180px;

  --ease-natural: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 0.18s;
  --duration-mid: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0.001s; --duration-mid: 0.001s; }
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

button, .card, a, input, textarea, select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  background: var(--canvas-bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h3 { font-family: var(--font-display); }

/* Screen headings (h2) are full sentences authored per-step and will hit
   almost any letter — including "H", whose glyph is broken/missing in the
   Pasajero font (renders as a bare vertical stroke, e.g. "Have" → "I ave").
   h1/h3 stay on the display face since they're short, fixed brand/label text
   (the DNA result title, triage card names) that never uses that glyph. */
h2 { font-family: var(--font-body); }

/* =============================================
   APP CANVAS — full-viewport navy background that
   frames either the landing screen or the discovery
   frame (brand row + card). Only one is visible at a
   time; app.js toggles display.
   ============================================= */
.app-canvas {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas-bg);
}

/* =============================================
   LANDING SCREEN — faithful to Assets/Landing Page:
   flat navy, logo lockup top-left, big display
   headline + tagline, lower half is the tap target.
   ============================================= */
.landing-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 6vw, 56px) clamp(24px, 7vw, 72px);
  color: var(--white);
  overflow: hidden;
}

.landing-top { position: relative; z-index: 2; }

/* Real brand asset (fingerprint + wordmark baked into one file) rather than
   the hand-traced SVG + separately-styled text used by the compact in-flow
   brand-row header, where there's no equivalently-cropped source image. */
.landing-logo-img {
  width: clamp(64px, 15vw, 96px);
  height: auto;
  display: block;
}

.brand-lockup-name { display: flex; flex-direction: column; line-height: 1; }
.brand-blueday { font-family: var(--font-body); font-size: 15px; font-weight: 800; letter-spacing: 0.16em; color: var(--white); }
.brand-designs { font-family: var(--font-body); font-size: 8px; font-weight: 600; letter-spacing: 0.34em; color: rgba(255,255,255,0.62); margin-top: 4px; }

/* Thin rule under the logo lockup and under the headline, per the reference. */
.landing-divider {
  width: 56px;
  height: 1px;
  background: rgba(255,255,255,0.4);
  margin-top: 14px;
  flex-shrink: 0;
}

.landing-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.fingerprint-watermark-svg {
  width: min(70vw, 620px);
  height: auto;
  transform: translateX(28%);
  opacity: 0.05;
}
.fingerprint-watermark-svg path { fill: var(--white); }

.landing-copy {
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 14vh, 140px);
  max-width: 480px;
}

.landing-title {
  font-family: var(--font-body);
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: clamp(18px, 3vw, 26px);
}

/* "DISCOVERY" reads lighter and more spaced than the two bold lines above it. */
.landing-title-light {
  font-weight: 300;
  letter-spacing: 0.05em;
}

.landing-tagline {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  max-width: 34ch;
}

.landing-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(28px, 5vw, 44px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  animation: hint-float 2.6s ease-in-out infinite;
}

.landing-hint-chevron { width: 16px; height: 16px; }

@keyframes hint-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-hint { animation: none; }
}

/* The actual interaction target: lower half of the screen, full width,
   invisible but keyboard-focusable via the visual hint above it. */
.landing-hit-area {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  z-index: 1;
  background: transparent;
  border: none;
  cursor: pointer;
}
.landing-hit-area:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: -8px;
}

/* Smooth hand-off into the discovery flow */
.app-canvas.is-entering-discovery .landing-screen {
  animation: landing-fade-out var(--duration-mid) var(--ease-natural) forwards;
}
.discovery-frame {
  animation: frame-fade-in var(--duration-mid) var(--ease-natural);
}
@keyframes landing-fade-out {
  to { opacity: 0; transform: scale(0.98); }
}
@keyframes frame-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   DISCOVERY FRAME — navy canvas + top brand row +
   the large rounded card. Same shell for every step.
   ============================================= */
.discovery-frame {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: var(--frame-max-width);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px) clamp(14px, 4vw, 32px);
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: clamp(4px, 1.5vw, 12px) clamp(4px, 1vw, 8px) clamp(16px, 3vw, 28px);
  color: var(--white);
}

.brand-row-logo { display: flex; align-items: center; gap: 10px; }
.fingerprint-svg-row { width: 24px; height: 30px; flex-shrink: 0; }
.fingerprint-svg-row path { fill: var(--white); }
.brand-row-logo .brand-blueday { font-size: 12px; }
.brand-row-logo .brand-designs { font-size: 6.5px; letter-spacing: 0.3em; }

.brand-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
}
.brand-row-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.brand-row-section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  min-height: 1em;
}

/* ----- The card ----- */
.discovery-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card-surface);
  border-radius: var(--card-radius-sm);
  box-shadow: var(--card-shadow);
  padding: var(--content-pad-top) var(--content-pad-x) var(--content-pad-bottom);
  transition: background var(--duration-mid) var(--ease-natural);
}

.discovery-card > * { width: 100%; max-width: var(--content-max-width); margin-left: auto; margin-right: auto; }

/* Result / DNA screen: the card dissolves into the navy canvas for a
   full-bleed marquee moment, rather than switching to a jarring dark card
   mid-flow — see the "one system" note in the redesign brief. */
.discovery-card.discovery-card--marquee {
  background: transparent;
  box-shadow: none;
  color: var(--white);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(24px, 6vh, 64px);
}

/* First-paint skeleton */
#app:empty { gap: var(--space-4); }
#app:empty::before, #app:empty::after {
  content: '';
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(15,28,69,0.06) 25%, rgba(15,28,69,0.12) 37%, rgba(15,28,69,0.06) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
#app:empty::before { width: 160px; height: 12px; }
#app:empty::after { width: 100%; max-width: var(--content-max-width); height: 240px; }
@keyframes skeleton-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* =============================================
   SECTION HEADER (inside the card)
   e.g. "02 / BEGIN WITH YOU"   ·   "STEP 1 OF 3 ----"
   ============================================= */
.screen-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: clamp(20px, 4vw, 32px);
}

.section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-light);
  text-transform: uppercase;
}

.section-substep {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.substep-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-light);
  text-transform: uppercase;
  white-space: nowrap;
}

.substep-dots { display: flex; align-items: center; gap: 5px; }
.substep-dot {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background var(--duration-fast) var(--ease-natural);
}
.substep-dot.filled { background: var(--navy); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h2 {
  font-size: clamp(22px, 4.4vw, 34px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-bottom: var(--space-3);
  line-height: 1.18;
  text-wrap: balance;
}

.block-subheading {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: clamp(24px, 5vw, 36px);
  line-height: 1.6;
  max-width: 60ch;
}

.field-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--space-3);
}

.screen-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-light);
  margin-top: var(--space-5);
  max-width: 52ch;
}

.block + .block { margin-top: clamp(28px, 5vw, 40px); }

/* =============================================
   FIELDS (contact details / project specifics /
   household) — label above, icon-prefixed input.
   ============================================= */
.field { margin-bottom: var(--space-5); }
.field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--space-2);
}

.field-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
  display: flex;
}
.field-icon svg { width: 100%; height: 100%; }

.field-input-row.has-icon input,
.field-input-row.has-icon select {
  padding-left: 46px;
}

/* =============================================
   ICON-SELECT LIST (property type)
   ============================================= */
.icon-select-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.icon-select-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dark);
  transition: border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-mid) var(--ease-natural), transform var(--duration-mid) var(--ease-natural);
}

.icon-select-row:hover { border-color: #b0b7d0; box-shadow: 0 6px 16px rgba(26,46,110,0.08); }
.icon-select-row:active { transform: scale(0.99); }

.icon-select-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--navy);
  display: flex;
}
.icon-select-icon svg { width: 100%; height: 100%; }

.icon-select-label { flex: 1; text-align: left; }

.icon-select-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.icon-select-row.selected {
  border-color: var(--navy);
  background: rgba(26,46,110,0.04);
}
.icon-select-row.selected .icon-select-radio {
  border-color: var(--navy);
  border-width: 6px;
}

@media (min-width: 640px) {
  .icon-select-list { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   CARD GRIDS (chip / image / mood selections)
   ============================================= */
.card-grid { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.card-grid-chip { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.card-grid-image { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card-grid-mood { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

.card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  padding: 16px 14px;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 1px 2px rgba(15,28,69,0.04);
  transition: border-color var(--duration-fast), background var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-mid) var(--ease-natural), transform var(--duration-mid) var(--ease-natural);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card:hover:not(.selected) { border-color: #b0b7d0; box-shadow: 0 10px 22px rgba(26,46,110,0.1); transform: translateY(-2px); }
.card:active:not(.selected) { transform: translateY(0) scale(0.98); box-shadow: 0 1px 2px rgba(15,28,69,0.06); }

.card.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(26,46,110,0.28);
}

.card-label { line-height: 1.3; }

.card img { width: 100%; border-radius: 8px; margin-bottom: 10px; aspect-ratio: 4/3; object-fit: cover; background: var(--border); }

/* Checkmark badge on plain image cards */
.card-grid-image .card { padding-bottom: 12px; }
.card-grid-image .card::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(15,28,69,0.15);
  transition: background var(--duration-fast), border-color var(--duration-fast);
}
.card-grid-image .card.selected::after {
  background: var(--navy)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    no-repeat center / 12px;
  border-color: var(--navy);
}
.card-grid-image .card.selected { background: var(--white); color: var(--text-dark); border-color: var(--navy); box-shadow: 0 10px 26px rgba(26,46,110,0.18); }
.card-grid-image .card.selected .card-label { color: var(--text-dark); }

/* Mood cards (Emotional DNA): photo-first, label overlays the image on a
   gradient scrim so the word reads as a caption, not a caption below it. */
.card-mood { padding: 0; border: none; background: transparent; box-shadow: none; }
.card-mood img { margin-bottom: 0; border-radius: 14px; aspect-ratio: 3/4; }
.card-mood .card-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  text-align: left;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.card-mood::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(6,14,40,0.68) 100%);
  transition: box-shadow var(--duration-mid) var(--ease-natural);
}
.card-mood::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.6);
}
.card-mood:hover { transform: translateY(-3px); }
.card-mood.selected::before { box-shadow: inset 0 0 0 3px var(--navy); }
.card-mood.selected::after {
  background: var(--navy)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    no-repeat center / 11px;
  border-color: var(--navy);
}

/* =============================================
   TRIAGE CARDS (Design Language)
   ============================================= */
.triage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.triage-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(15,28,69,0.04);
  transition: box-shadow var(--duration-mid) var(--ease-natural), transform var(--duration-mid) var(--ease-natural);
}
.triage-card:hover { box-shadow: 0 14px 28px rgba(26,46,110,0.1); transform: translateY(-2px); }

.triage-card img { width: 100%; border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 14px; }
.triage-card h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; font-family: var(--font-body); }
.triage-card p { font-size: 12.5px; color: var(--text-mid); line-height: 1.55; flex: 1; margin-bottom: 18px; }

.triage-buttons { display: flex; gap: 6px; }
.triage-buttons button {
  flex: 1;
  padding: 9px 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--duration-fast);
}
.triage-buttons button:hover { border-color: #b0b7d0; color: var(--text-dark); }
.triage-buttons button:active { transform: scale(0.96); }
.triage-buttons button.selected { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* =============================================
   YES / NO LIST
   ============================================= */
.yes-no-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.yes-no-row span { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.yes-no-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.yes-no-row button {
  min-width: 60px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--duration-fast);
}
.yes-no-row button:hover:not(.selected) { border-color: #b0b7d0; }
.yes-no-row button:active { transform: scale(0.96); }
.yes-no-row button.selected { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* =============================================
   TEXT INPUTS
   ============================================= */
textarea, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px; /* avoids iOS Safari auto-zoom on focus */
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--duration-fast);
  outline: none;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5068' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
}
select:invalid, select option[value=""] { color: var(--text-light); }
textarea:focus, input:focus, select:focus { border-color: var(--navy); }
textarea { min-height: 120px; resize: vertical; margin-top: 4px; }

/* =============================================
   NAVIGATION BAR
   ============================================= */
.screen-nav {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: clamp(28px, 6vw, 48px);
  gap: var(--space-3);
}

.btn-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-mid) var(--ease-natural);
  color: var(--text-dark);
}
.btn-back:hover { border-color: var(--navy); background: rgba(26,46,110,0.05); }
.btn-back:active { transform: scale(0.94); }
.btn-back svg { width: 16px; height: 16px; }

.nav-progress { flex: 1; display: flex; align-items: center; min-width: 0; }

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 30px;
  padding: 14px clamp(18px, 4vw, 32px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  flex-shrink: 0;
  transition: background var(--duration-fast), transform var(--duration-mid) var(--ease-natural);
}
.btn-next svg { width: 14px; height: 14px; }
.btn-next:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-next:active { transform: translateY(0) scale(0.97); }

/* =============================================
   RESULT / DNA MARQUEE SCREEN
   ============================================= */
.block-result { display: flex; flex-direction: column; align-items: center; color: var(--white); }
.result-mark { width: 76px; height: auto; margin-bottom: 22px; }
.result-mark path { fill: var(--white); }
.block-result h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.block-result .result-sub { font-size: 14px; color: rgba(255,255,255,0.55); margin-bottom: clamp(28px, 6vw, 48px); }

.dna-row {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  gap: 6px;
  text-align: left;
}
.dna-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.dna-value { font-size: 15px; font-weight: 500; color: var(--white); line-height: 1.5; }

.design-direction {
  margin-top: clamp(24px, 5vw, 40px);
  max-width: 480px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
}

/* =============================================
   RESPONSIVE — small tablet / large phone
   ============================================= */
@media (min-width: 640px) {
  .card-grid-chip { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .card-grid-image { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .card-grid-mood { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .dna-row { flex-direction: row; align-items: flex-start; gap: var(--space-6); text-align: left; }
  .dna-label { flex: 0 0 160px; padding-top: 2px; }
}

/* =============================================
   RESPONSIVE — desktop: comfortable margins around
   the framed card, larger type and grids
   ============================================= */
@media (min-width: 960px) {
  .app-canvas { display: flex; align-items: stretch; }
  .discovery-frame { padding: clamp(28px, 4vw, 48px) clamp(24px, 5vw, 56px); min-height: 100vh; }
  .discovery-card { border-radius: var(--card-radius); padding: 56px clamp(40px, 5vw, 72px) 44px; }

  /* Desktop landing: an adapted two-column composition rather than the
     mobile column left pinned in a half-empty viewport — logo spans the
     top, copy sits centered in the left column, and the fingerprint mark
     becomes a deliberate hero graphic filling the right column. */
  .landing-screen { display: grid; grid-template-columns: minmax(360px, 640px) 1fr; grid-template-rows: auto 1fr; align-items: stretch; }
  .landing-top { grid-column: 1 / -1; grid-row: 1; }
  .landing-copy { grid-column: 1; grid-row: 2; align-self: center; margin-top: 0; max-width: 560px; }
  .landing-watermark { grid-column: 2; grid-row: 1 / -1; position: relative; inset: auto; justify-content: center; }
  .fingerprint-watermark-svg { width: min(58%, 560px); transform: none; opacity: 0.12; }
  .landing-title { font-size: clamp(48px, 4.6vw, 64px); }

  .card { padding: 18px 16px; }
  .card-grid { gap: var(--space-4); }
  .card-grid-chip { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .card-grid-image { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .card-grid-mood { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .triage-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-5); }
  .yes-no-row button { min-width: 72px; padding: 8px 22px; }
  .result-mark { width: 96px; margin-bottom: 28px; }
}

/* =============================================
   ADMIN PANEL — shares brand tokens, lighter touch
   ============================================= */
.admin-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--off-white);
  font-family: var(--font-body);
  padding: clamp(20px, 6vw, 48px) clamp(16px, 5vw, 32px);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(20px, 5vw, 32px);
}

.admin-header h1 { font-family: var(--font-display); font-size: clamp(20px, 4.5vw, 28px); font-weight: 400; color: var(--text-dark); letter-spacing: -0.01em; }

.admin-brand { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: var(--navy); text-transform: uppercase; }

.admin-back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; margin-bottom: 20px; }
.admin-back-link:hover { text-decoration: underline; }

.admin-login-shell { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--navy); padding: 20px; }

.admin-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-surface);
  border: none;
  border-radius: var(--card-radius-sm);
  padding: clamp(32px, 6vw, 44px) clamp(28px, 5vw, 36px);
  box-shadow: var(--card-shadow);
}

.admin-card h1 { font-family: var(--font-display); font-size: 24px; font-weight: 400; color: var(--text-dark); margin-bottom: 24px; text-align: center; }

#login-form { display: flex; flex-direction: column; gap: 14px; }

#login-form button, .admin-card button[type="submit"] {
  margin-top: 8px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 30px;
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--duration-fast);
}
#login-form button:hover { background: var(--navy-light); }

.admin-error { margin-top: 14px; font-size: 13px; color: #b91c1c; text-align: center; min-height: 16px; }

.admin-table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }

#submissions-table { width: 100%; border-collapse: collapse; }
#submissions-table thead { display: none; }
#submissions-table tbody tr { display: block; padding: 16px; border-bottom: 1px solid var(--border); }
#submissions-table tbody tr:last-child { border-bottom: none; }
#submissions-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; color: var(--text-dark); text-align: right; }
#submissions-table td::before { content: attr(data-label); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); text-align: left; }
#submissions-table td a { color: var(--navy); font-weight: 600; text-decoration: none; }
#submissions-table td a:hover { text-decoration: underline; }

@media (min-width: 640px) {
  #submissions-table thead { display: table-header-group; }
  #submissions-table tbody tr { display: table-row; padding: 0; border-bottom: 1px solid var(--border); }
  #submissions-table td { display: table-cell; text-align: left; padding: 14px 16px; }
  #submissions-table td::before { content: none; }
  #submissions-table th { padding: 14px 16px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); background: var(--off-white); border-bottom: 1px solid var(--border); }
}

.admin-detail-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: clamp(20px, 5vw, 32px); }
.admin-detail-card h1 { font-family: var(--font-display); font-size: clamp(20px, 5vw, 28px); font-weight: 400; color: var(--text-dark); margin-bottom: 6px; }
.admin-detail-card > p { font-size: 14px; color: var(--text-mid); margin-bottom: 24px; }
.admin-detail-card h2 { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--text-dark); text-transform: uppercase; letter-spacing: 0.08em; margin: 24px 0 10px; }
.admin-detail-card pre { background: var(--off-white); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-size: 12.5px; line-height: 1.5; color: var(--text-dark); white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
