:root {
  /* Sunset palette */
  --coral: #ff7e5f;
  --teal-deep: #264653;
  --sand: #f4e4c1;
  --gold: #e9c46a;

  /* Semantic tokens */
  --ink: var(--teal-deep);
  --ink-soft: #1f3d47;
  --parchment: var(--sand);
  --parchment-deep: #e8d4a8;
  --cream: #faf3e0;
  --amber: var(--gold);
  --amber-glow: rgba(233, 196, 106, 0.35);
  --teal: #3a6b7c;
  --sage: var(--teal);
  --text-dark: var(--teal-deep);
  --text-muted-dark: rgba(38, 70, 83, 0.65);
  --text-light: var(--sand);
  --text-muted-light: rgba(244, 228, 193, 0.55);
  --border-dark: rgba(244, 228, 193, 0.12);
  --border-parchment: rgba(38, 70, 83, 0.12);
  --radius: 4px;
  --radius-lg: 20px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Sora", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-light);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmospheric layers */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.mesh-orb--teal {
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(38, 70, 83, 0.35) 0%, transparent 70%);
  top: -10%;
  left: -8%;
  animation: drift 18s ease-in-out infinite alternate;
}

.mesh-orb--coral {
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(255, 126, 95, 0.18) 0%, transparent 70%);
  bottom: 5%;
  right: 10%;
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

.coord-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 228, 193, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 228, 193, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, black 20%, transparent 75%);
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 6%) scale(1.08); }
}

/* Page layout */
.page {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: flex;
  color: var(--coral);
  width: 2.5rem;
  height: 2.5rem;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted-light);
  margin-top: 0.1rem;
}

.progress-track {
  flex: 1;
  max-width: 280px;
  height: 3px;
  background: var(--border-dark);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  border-radius: 99px;
  transition: width 0.6s var(--ease-out);
}

/* Split layout — asymmetric overlap */
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  align-items: start;
  min-height: calc(100vh - 9rem);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    min-height: auto;
  }

  .panel-steps {
    margin-top: 0 !important;
  }
}

/* Panels */
.panel {
  position: relative;
  border-radius: var(--radius-lg);
}

.panel-input {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 2.5rem 2.75rem;
  background: rgba(31, 61, 71, 0.78);
  border: 1px solid var(--border-dark);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 32px 64px rgba(15, 35, 42, 0.4),
    inset 0 1px 0 rgba(244, 228, 193, 0.08);
  z-index: 2;
}

.panel-glow {
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 126, 95, 0.45), transparent);
  pointer-events: none;
}

.panel-steps {
  margin-top: 2.5rem;
  margin-left: -1.5rem;
  padding: 2.25rem 2rem 2.5rem 2.5rem;
  background: var(--parchment);
  color: var(--text-dark);
  border: 1px solid var(--border-parchment);
  box-shadow:
    12px 24px 48px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  z-index: 1;
}

.ticket-notch {
  position: absolute;
  left: -10px;
  width: 20px;
  height: 20px;
  background: var(--ink);
  border-radius: 50%;
}

.ticket-notch--top { top: 28%; }
.ticket-notch--bottom { bottom: 28%; }

/* Reveal animations */
.reveal {
  animation: revealUp 0.9s var(--ease-out) both;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.22s; }

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

.view {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: viewIn 0.45s var(--ease-out) both;
}

.view.hidden {
  display: none;
}

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

/* Typography */
.eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 1rem;
}

.eyebrow--success {
  color: var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}

.hero-sub {
  color: var(--text-muted-light);
  font-size: 1rem;
  font-weight: 300;
  max-width: 26rem;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(233, 196, 106, 0.4);
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  margin: 0 0 1.25rem;
  width: fit-content;
}

.step-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.question-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.65rem;
}

.question-text {
  color: var(--text-muted-light);
  font-weight: 300;
  margin: 0 0 2rem;
  max-width: 30rem;
}

/* Inputs */
.input-area {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.input-area.hidden {
  display: none;
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 26rem;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.choice-btn {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(244, 228, 193, 0.05);
  color: var(--text-light);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
}

.choice-btn:hover {
  border-color: rgba(255, 126, 95, 0.5);
  background: rgba(255, 126, 95, 0.1);
  box-shadow: 0 0 24px rgba(255, 126, 95, 0.2);
  transform: translateY(-1px);
}

.choice-btn:active {
  transform: translateY(0) scale(0.98);
}

.choice-btn--selected {
  border-color: rgba(255, 126, 95, 0.85);
  background: rgba(255, 126, 95, 0.2);
  box-shadow: 0 0 20px rgba(255, 126, 95, 0.25);
}

.multi-choice-done {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.text-field {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-light);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.text-field::placeholder {
  color: var(--text-muted-light);
}

.text-field:focus {
  outline: none;
  border-color: rgba(255, 126, 95, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 126, 95, 0.15);
}

.char-counter {
  margin: -0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted-light);
  text-align: right;
}

.char-counter.hidden {
  display: none;
}

.char-counter--low {
  color: rgba(255, 180, 120, 0.95);
}

.char-counter--over {
  color: #ff8a7a;
}

/* Buttons */
.btn {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  width: fit-content;
}

.btn:active {
  transform: scale(0.98);
}

.btn-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s var(--ease-out);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #d4a84a 100%);
  color: var(--teal-deep);
  box-shadow: 0 4px 20px var(--amber-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(233, 196, 106, 0.45);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-lg {
  padding: 1rem 1.65rem;
  font-size: 0.92rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted-light);
  border: 1px solid var(--border-dark);
}

.btn-ghost:hover {
  background: rgba(244, 228, 193, 0.06);
  color: var(--text-light);
  border-color: rgba(244, 228, 193, 0.22);
}

.panel-steps .btn-ghost {
  color: var(--text-muted-dark);
  border-color: var(--border-parchment);
}

.panel-steps .btn-ghost:hover {
  background: var(--parchment-deep);
  color: var(--text-dark);
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.input-error {
  color: var(--coral);
  font-size: 0.85rem;
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 126, 95, 0.1);
  border-left: 2px solid var(--coral);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-error.hidden {
  display: none;
}

/* Steps panel */
.steps-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-parchment);
}

.steps-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

.steps-count {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-item {
  position: relative;
  padding: 0 0 1.35rem 2.25rem;
  animation: stepIn 0.4s var(--ease-out) both;
}

.step-item:last-child {
  padding-bottom: 0;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-item::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 1.75rem;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-parchment) 0,
    var(--border-parchment) 4px,
    transparent 4px,
    transparent 8px
  );
}

.step-item:last-child::before {
  display: none;
}

.step-marker {
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1.5px solid var(--border-parchment);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted-dark);
  transition: all 0.3s var(--ease-out);
}

.step-item.done .step-marker {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
  color: var(--sand);
}

.step-item.active .step-marker {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--sand);
  box-shadow: 0 0 0 4px rgba(255, 126, 95, 0.25);
}

.step-label {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.1rem;
}

.step-question {
  font-size: 0.78rem;
  color: var(--text-muted-dark);
  margin-bottom: 0.2rem;
  line-height: 1.45;
}

.step-answer {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--teal-deep);
  padding: 0.25rem 0.5rem;
  background: rgba(38, 70, 83, 0.1);
  border-radius: var(--radius);
  display: inline-block;
  margin-top: 0.15rem;
}

.step-item.pending .step-label {
  color: var(--text-muted-dark);
  font-weight: 500;
}

.step-item.pending .step-question {
  opacity: 0.6;
}

.step-item.editable {
  cursor: pointer;
  border-radius: var(--radius);
  margin-left: -0.35rem;
  padding-left: 2.6rem;
  transition: background 0.2s;
}

.step-item.editable:hover {
  background: rgba(255, 126, 95, 0.08);
}

.step-item.editable:focus-visible {
  outline: 2px solid rgba(255, 126, 95, 0.55);
  outline-offset: 2px;
}

/* Summary */
.summary-card {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: var(--cream);
  border: 1px solid var(--border-parchment);
  border-radius: var(--radius);
}

.summary-card.hidden {
  display: none;
}

.summary-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  margin: 0 0 0.85rem;
}

.summary-dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.summary-dl div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(38, 70, 83, 0.08);
}

.summary-dl div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-dl dt {
  color: var(--text-muted-dark);
  margin: 0;
  font-weight: 500;
}

.summary-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-dark);
}

/* Searching */
.searching-orbit {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--border-dark);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--amber-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Results */
.results-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
  padding-right: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) transparent;
}

.warnings {
  background: rgba(233, 196, 106, 0.12);
  border: 1px solid rgba(233, 196, 106, 0.35);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  color: var(--gold);
}

.warnings.hidden {
  display: none;
}

.result-section {
  margin-bottom: 1.75rem;
}

.result-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.85rem;
  color: var(--text-light);
}

.result-section-icon {
  font-size: 1.1rem;
}

.result-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-bottom: 0.65rem;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, transform 0.2s;
}

.result-card:hover {
  border-color: rgba(255, 126, 95, 0.4);
  transform: translateX(3px);
}

.result-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(244, 228, 193, 0.08);
}

.result-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0.4;
}

.result-body h4 {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.result-body p {
  margin: 0.15rem 0;
  font-size: 0.8rem;
  color: var(--text-muted-light);
  font-weight: 300;
}

.result-body a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.result-body a:hover {
  text-decoration: underline;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.result-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius);
  background: rgba(38, 70, 83, 0.2);
  color: var(--sand);
}

.weather-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.weather-days li {
  font-size: 0.82rem;
  color: var(--text-muted-light);
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  border-left: 2px solid var(--coral);
}

.weather-summary {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted-light);
  font-style: italic;
}

.site-footer {
  margin-top: 2rem;
  text-align: center;
}

.bmc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-dark);
  color: var(--sand);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}

.bmc-link:hover {
  color: var(--coral);
  border-color: rgba(255, 126, 95, 0.45);
  background: rgba(255, 126, 95, 0.08);
}
