* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
}

/* Ensure pointer cursor on all clickable elements and their children */
button,
a,
button *,
a *,
.btn *,
.option-btn *,
.contact-btn *,
.result-link,
.result-tab *,
.tag-chip .tag-remove {
  cursor: pointer;
}

:root {
  --primary-color: #000000;
  --primary-hover: #333333;
  --secondary-color: #666666;
  --success-color: #10b981;
  --error-color: #ef4444;
  --bg-color: #ffffff;
  --card-bg: #ffffff;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #e5e5e5;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 20px;
  color: var(--text-primary);
}

/* Top nav: link back to main Ari Bikes site */
.ari-site-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.ari-site-nav a {
  color: #888;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ari-site-nav a:hover,
.ari-site-nav a:focus {
  color: var(--primary-hover);
  outline: none;
}

.ari-site-nav a:focus-visible {
  text-decoration: underline;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 0;
  box-shadow: none;
  padding: 60px 40px;
  animation: fadeIn 0.5s ease-in;
}

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

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
}

/* Logo wrapper — centres both animated and static versions */
.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  cursor: pointer;
}

/* Static logo (mobile default) */
.logo-static {
  max-width: 200px;
  height: auto;
  display: block;
}

/* Animated logo — hidden by default (mobile) */
.ari-logo {
  display: none;
  align-items: center;
}
.ari-astra {
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  z-index: 2;
}
.ari-astra svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ari-text {
  overflow: hidden;
  margin-left: 14px;
  z-index: 1;
}
.ari-text svg {
  display: block;
  height: 32px;
  width: 150px;
  flex-shrink: 0;
}

/* Desktop: show animated logo, hide static */
@media (hover: hover) {
  .ari-logo {
    display: inline-flex;
    cursor: pointer;
  }
  .logo-static {
    display: none;
  }
  .ari-astra {
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .ari-text {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transition:
      max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-width, opacity;
  }
  .ari-logo:hover .ari-astra {
    transform: scale(1.06);
  }
  .ari-logo:hover .ari-text {
    max-width: 170px;
    opacity: 1;
    margin-left: 14px;
  }
  .ari-logo:hover .ari-astra svg path {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
  }
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 40px;
}

.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  width: 100%;
  transform: scaleX(0.167);
  transform-origin: left;
  transition: transform 0.3s ease;
  border-radius: 3px;
  will-change: transform;
}

.progress-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.checkmark-icon {
  width: 0.875rem;
  height: 0.875rem;
  display: inline-block;
  vertical-align: middle;
}

.progress-text.is-complete {
  color: var(--primary-color);
}

.progress-text.is-complete .checkmark-icon {
  animation: checkmark-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

@keyframes checkmark-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Quiz Container */
.quiz-container {
  min-height: 400px;
  position: relative;
}

.question-step {
  display: none;
  animation: slideIn 0.4s ease-out;
}

.question-step.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.question-step h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 40px;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

/* Tag Options Grid - flexbox wrap layout for tags */
.tag-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.tag-instruction {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: left;
  font-weight: 400;
}

/* Tag buttons - smaller, more compact */
.tag-options-grid .tag-btn {
  padding: 10px 16px;
  min-height: auto;
  height: auto;
  white-space: nowrap;
}

.option-btn {
  background: var(--card-bg);
  border: 2px solid var(--border-color); /* Always 2px, visible by default */
  border-radius: 0;
  padding: 24px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  min-height: 100px;
}

/* Only apply hover effects on devices that support hover (not touch devices) */
@media (hover: hover) {
  .option-btn:hover {
    border-color: var(--text-primary); /* Changes to visible border on hover */
    background: #fafafa;
  }

  /* Experience level hover colors (matches trail difficulty tags) */
  .question-step[data-step="4"] .option-btn[data-value="beginner"]:hover {
    color: #15803d;
    border-color: #bbf7d0;
    background: #f0fdf4;
  }

  .question-step[data-step="4"] .option-btn[data-value="intermediate"]:hover {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .question-step[data-step="4"] .option-btn[data-value="advanced"]:hover {
    color: #000000;
    border-color: #d4d4d4;
    background: #f5f5f5;
  }

  .question-step[data-step="4"] .option-btn[data-value="expert"]:hover {
    color: #991b1b;
    border-color: #fecaca;
    background: #fef2f2;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
  .option-btn:hover {
    border-color: var(--border-color); /* Keep default border on touch devices */
    background: var(--card-bg);
  }
}

.option-btn.selected {
  border-color: var(--primary-color); /* Changes to black when selected */
  background: var(--card-bg);
  /* No need for border-width since it's already 2px */
}

.option-icon {
  font-size: 2rem;
}

.option-label {
  font-weight: 400;
  text-align: center;
  letter-spacing: -0.01em;
}

.option-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

#submitBtn {
  min-width: 200px;
}

/* On mobile: stacked layout, Find My Bike / Next above Previous, 30px top margin */
@media (max-width: 768px) {
  .nav-buttons {
    flex-direction: column;
    margin-top: 30px;
  }

  #prevBtn {
    order: 2; /* Previous button appears second (bottom) */
  }

  #question5NextBtn,
  #question6NextBtn,
  #submitBtn {
    order: 1; /* Next / Find My Bike appears first (top) */
  }
}

.btn {
  padding: 14px 28px;
  border: 1px solid var(--primary-color);
  border-radius: 0;
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.09);
  transform: translateY(0);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #fafafa;
}

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

/* Loading State */
.loading-container {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  min-height: 1.5rem;
  transition: opacity 0.3s ease;
}

/* Skeleton Loaders */
.skeleton-container {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Desktop layout: side by side */
@media (min-width: 769px) {
  .skeleton-card {
    flex-direction: row;
    align-items: stretch;
  }

  .skeleton-left {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-right: 1px solid var(--border-color);
  }

  .skeleton-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    justify-content: space-between;
  }
}

/* Mobile layout: stacked */
@media (max-width: 768px) {
  .skeleton-left {
    padding: 20px 20px 0 20px;
  }

  .skeleton-right {
    padding: 20px;
    gap: 16px;
  }
}

.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    #f0f0f0 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  will-change: background-position;
  margin-bottom: 16px;
  border-radius: 0;
}

.skeleton-title {
  width: 70%;
  height: 24px;
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    #f0f0f0 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  will-change: background-position;
  margin-bottom: 12px;
}

.skeleton-price {
  width: 50%;
  height: 32px;
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    #f0f0f0 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  will-change: background-position;
}

.skeleton-line {
  height: 16px;
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    #f0f0f0 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  will-change: background-position;
  border-radius: 0;
}

.skeleton-line-long {
  width: 100%;
}

.skeleton-line-medium {
  width: 80%;
}

.skeleton-line-short {
  width: 60%;
}

.skeleton-button {
  width: 100%;
  height: 48px;
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    #f0f0f0 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  will-change: background-position;
  margin-top: auto;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Results Container */
.results-container {
  animation: fadeIn 0.5s ease-in;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 30px;
}

.results-container h2 {
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.download-icon-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-icon-btn svg {
  width: 22px;
  height: 22px;
}

.download-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .results-container h2 {
    font-size: 1.65rem;
  }

  .download-icon-btn {
    display: none;
  }
}

/* Email Form Container */
.email-form-container {
  max-width: 100%;
  margin: 30px 0 0;
  padding: 30px 20px;
  background: #f5f5f5;
  text-align: center;
}

.email-form-heading {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.email-form-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.email-form {
  max-width: 460px;
  margin: 0 auto;
}

.email-input-group {
  display: flex;
  gap: 10px;
}

.email-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #ffffff;
  transition: border-color 0.2s ease;
  letter-spacing: -0.01em;
}

.email-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.email-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.email-submit-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.email-error {
  font-size: 0.8rem;
  color: var(--error-color);
  margin-top: 8px;
  text-align: left;
}

.email-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--success-color);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.email-success-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--success-color);
}

@media (max-width: 768px) {
  .email-form-container {
    padding: 20px;
  }

  .email-input-group {
    flex-direction: column;
  }

  .email-submit-btn {
    width: 100%;
  }
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.result-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.2s ease;
  animation: fadeIn 0.5s ease-in;
  display: flex;
  flex-direction: column;
}

.result-card:hover {
  border-color: var(--primary-color);
  outline: 1px solid var(--primary-color);
  outline-offset: -1px;
}

.result-image-container {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.result-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--bg-color);
  display: block;
}

.discount-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #f0fef2;
  color: #237123;
  border: 1px solid #dce8dc;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 400;
  border-radius: 0px;
  z-index: 10;
  letter-spacing: -0.01em;
  opacity: 1;
}

/* Desktop layout: side by side */
@media (min-width: 769px) {
  .result-card {
    flex-direction: row;
    align-items: stretch;
  }

  .result-left {
    position: relative;
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-right: 1px solid var(--border-color);
  }

  .result-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    justify-content: space-between;
  }
}

/* Mobile layout: stacked */
@media (max-width: 768px) {
  .result-left {
    position: relative;
    padding: 20px 20px 0 20px;
  }

  .result-right {
    padding: 20px;
  }
}

.result-content {
  padding: 20px;
}

.result-title {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.result-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.result-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.result-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  letter-spacing: -0.01em;
}

.result-tab:hover {
  color: var(--text-primary);
}

.result-tab.active {
  color: var(--text-primary);
}

.result-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
}

.result-tab-content {
  flex: 1;
  margin-bottom: 16px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.result-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

.result-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-item {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: baseline;
}

.spec-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.spec-value {
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.result-link {
  display: inline-block;
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 0;
  font-weight: 400;
  transition: background 0.2s ease;
  letter-spacing: -0.01em;
}

.result-link:hover {
  background: var(--primary-hover);
}

/* Contact Section */
.contact-section {
  margin: 40px 0;
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.contact-heading {
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.contact-subheading {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0;
  text-decoration: none;
  color: var(--text-primary);
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  letter-spacing: -0.01em;
  min-width: 180px;
  justify-content: center;
}

.contact-btn:hover {
  border-color: var(--primary-color);
  background: #fafafa;
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

/* SMS and Phone buttons - change to green on hover */
.contact-btn-sms:hover .contact-icon,
.contact-btn-phone:hover .contact-icon {
  color: #40d12e;
}

/* Email button - change to blue on hover */
.contact-btn-email:hover .contact-icon {
  color: #32a6fd;
}

@media (max-width: 768px) {
  .contact-section {
    margin: 30px 0;
    padding: 30px 0;
  }

  .contact-heading {
    font-size: 1.5rem;
  }

  .contact-subheading {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-btn {
    width: 100%;
    min-width: auto;
  }
}

/* Results Actions (Restart button) */
.results-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 30px auto 0;
  max-width: 220px;
}

.results-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.results-actions .btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#restartBtn:hover {
  border-color: #f4dbde;
  background: #ffeff1;
  color: #c50821;
}

#restartBtn:hover .btn-icon {
  color: #c50821;
}

/* Results Footer */
.results-footer {
  margin-top: 40px;
  padding-top: 30px;
  text-align: center;
}

.assurances {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.assurance-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

.assurance-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.results-disclaimer {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.8;
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

.results-disclaimer .copyright {
  font-size: 1.1em;
  vertical-align: baseline;
}

@media (max-width: 768px) {
  .assurances {
    gap: 16px;
  }

  .assurance-item {
    font-size: 0.8rem;
  }

  .results-disclaimer {
    font-size: 0.75rem;
  }
}

/* Error Message */
.error-message {
  background: #fafafa;
  border: 1px solid var(--error-color);
  color: var(--error-color);
  padding: 16px;
  border-radius: 0;
  margin-top: 20px;
  text-align: center;
  font-weight: 400;
}

/* Special Requirements Text Input */
.text-input-container {
  margin-top: 30px;
  position: relative;
}

.text-input-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 400;
  transition: margin-bottom 0.3s ease;
}

.tags-container {
  display: grid;
  grid-template-rows: 0fr;
  transition:
    grid-template-rows 0.3s ease,
    margin-bottom 0.3s ease;
  margin-bottom: 0;
}

.tags-container > .tags-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
  min-height: 0;
}

.tags-container.has-tags {
  grid-template-rows: 1fr;
  margin-bottom: 12px;
}

/* Adjust label margin when tags are present */
.text-input-container:has(.tags-container.has-tags) .text-input-label {
  margin-bottom: 8px;
}

/* Fallback for browsers without :has() support - using adjacent sibling */
.tags-container.has-tags + .special-requirements-text {
  margin-top: 0;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f5f5f5;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  animation: tagSlideIn 0.3s ease;
}

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

.tag-chip .tag-remove {
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  margin-left: 4px;
}

.tag-chip .tag-remove:hover {
  color: var(--text-primary);
}

.special-requirements-text {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-family:
    'Google Sans Flex',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--card-bg);
  resize: vertical;
  transition:
    border-color 0.2s ease,
    margin-top 0.3s ease;
  line-height: 1.5;
  margin-top: 0;
}

.special-requirements-text:focus {
  outline: none;
  border-color: var(--primary-color);
}

.special-requirements-text::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ===== Dot Map (Question 7) ===== */
.question-step[data-step="7"] h2 {
  margin-bottom: 20px;
}

#dot-map-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

#map-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 550px;
  width: 100%;
}

#dot-grid {
  display: grid;
  gap: 0;
  width: 100%;
}

/* Each .dot fills its full grid cell so there are no hover dead zones.
   The visible circle is drawn via ::before. */
.dot {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.dot::before {
  content: '';
  width: 65%;
  height: 65%;
  border-radius: 50%;
  background-color: var(--dot-color, #4a4a4a);
  transition: none;
  display: block;
}

/* Staggered entrance animation */
.dot.dot-enter::before {
  opacity: 0;
  animation: dotPopIn 0.2s ease forwards;
  animation-delay: var(--enter-delay, 0ms);
  will-change: opacity;
}

@keyframes dotPopIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dot.empty {
  pointer-events: none;
}

.dot.empty::before {
  background: transparent;
}

.dot.outside {
  cursor: default;
  pointer-events: none;
}

.dot.outside::before {
  background: transparent;
}

/* Hover: dim other regions */
.dot.dimmed::before {
  background-color: #e0e0e0;
  transform: scale(1);
}

/* Click / Active state — scale up on desktop, skip on touch devices */
.dot.active-region::before {
  transform: scale(1.2);
}

@media (hover: none) and (pointer: coarse) {
  .dot.active-region::before {
    transform: none;
  }
}

/* Logo Dots (office locations) */
.dot.logo-dot::before {
  width: 85%;
  height: 85%;
  border-radius: 0;
  background: var(--dot-color, #4a4a4a);
  -webkit-mask: url('assets/ari_logo_astra.svg') center / contain no-repeat;
  mask: url('assets/ari_logo_astra.svg') center / contain no-repeat;
}

.dot.logo-dot.dimmed::before {
  background: #e0e0e0;
}

/* Tooltip */
.logo-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #ffffff;
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

.dot.logo-dot:hover .logo-tooltip {
  opacity: 1;
}

/* Region Buttons — styled to match quiz tag buttons */
#region-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.region-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--border-color);
  border-radius: 0;
  background: var(--card-bg);
  cursor: pointer;
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  transition: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.region-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--region-color, #999);
  flex-shrink: 0;
  opacity: 0.4;
  transition: none;
}

/* Hover state (desktop + map-driven) */
@media (hover: hover) {
  .region-btn:hover,
  .region-btn.hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
  }

  .region-btn:hover::before,
  .region-btn.hover::before {
    opacity: 1;
  }
}

/* Active / selected state */
.region-btn.active {
  background-color: var(--region-color, #999);
  border-color: var(--region-color, #999);
  color: #ffffff;
}

.region-btn.active::before {
  background-color: #ffffff;
  opacity: 1;
}

/* Dot Map Responsive */
@media (max-width: 700px) {
  #region-buttons {
    gap: 6px;
    margin-top: 16px;
  }
  .region-btn {
    font-size: 0.75rem;
    padding: 8px 10px;
    gap: 6px;
  }
  .region-btn::before {
    width: 6px;
    height: 6px;
  }
}

/* Tag button selected state */
.tag-btn.selected {
  border-color: var(--primary-color);
  background: #fafafa;
  border-width: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 40px 24px;
    margin: 0;
  }

  .header h1 {
    font-size: 2rem;
  }

  .question-step h2 {
    font-size: 1.5rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .option-btn {
    min-height: 80px;
    padding: 20px 16px;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .ari-site-nav {
    margin-top: 16px;
  }

  .container {
    padding: 30px 20px;
  }

  .header h1 {
    font-size: 1.75rem;
  }

  .question-step h2 {
    font-size: 1.25rem;
  }
}

/* ===== Trail Finder ===== */

/* Trail CTA (in bike results) */
.trail-cta {
  position: relative;
  overflow: hidden;
  margin: 30px 0 0;
  padding: 112px 40px;
  text-align: center;
  background: #1a1a1a;
}

.trail-cta-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: grayscale(100%);
  transition: filter 0.6s ease;
}

@media (hover: hover) {
  .trail-cta:hover .trail-cta-video {
    filter: grayscale(30%);
  }
}

/* On touch devices, show the color/lighter version by default */
@media (hover: none) {
  .trail-cta-video {
    filter: grayscale(30%);
  }

  .trail-cta-overlay {
    background: rgba(0, 0, 0, 0.45);
  }
}

.trail-cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
  transition: background 0.6s ease;
}

@media (hover: hover) {
  .trail-cta:hover .trail-cta-overlay {
    background: rgba(0, 0, 0, 0.45);
  }
}

.trail-cta-content {
  position: relative;
  z-index: 2;
}

.trail-cta-heading {
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.trail-cta-subtext {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.trail-cta-btn {
  min-width: 260px;
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.trail-cta-btn:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #000000;
}

@media (max-width: 768px) {
  .trail-cta {
    margin: 30px -24px 0;
    padding: 88px 24px;
  }

  .trail-cta-heading {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .trail-cta {
    margin: 30px -20px 0;
    padding: 72px 20px;
  }
}

/* Trail Finder Container */
.trail-finder-container {
  animation: fadeIn 0.5s ease-in;
}

/* Trail Progress */
.trail-progress-container {
  margin-bottom: 40px;
}

.trail-progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.trail-progress-fill {
  height: 100%;
  background: var(--primary-color);
  width: 50%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

/* Trail Steps */
.trail-step {
  display: none;
  animation: slideIn 0.4s ease-out;
}

.trail-step.active {
  display: block;
}

.trail-step h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Trail Bike Selection Grid */
.trail-bike-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.trail-bike-option {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 0;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease;
}

@media (hover: hover) {
  .trail-bike-option:hover {
    border-color: var(--text-primary);
    background: #fafafa;
  }
}

.trail-bike-option.selected {
  border-color: var(--primary-color);
}

.trail-bike-option-image {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
  mix-blend-mode: multiply;
}

.trail-bike-option-name {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Trail Form */
.trail-form-group {
  margin-bottom: 28px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.trail-form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 400;
}

.trail-required {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.trail-form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #ffffff;
  transition: border-color 0.2s ease;
  letter-spacing: -0.01em;
}

.trail-form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.trail-form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.trail-form-input.optional-field::placeholder {
  opacity: 0.4;
}

/* Trail Distance Slider */
.trail-slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trail-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.trail-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.trail-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.trail-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.trail-slider-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 80px;
  text-align: right;
  letter-spacing: -0.01em;
}

.trail-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Trail Nav Buttons */
.trail-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

#trailSubmitBtn {
  min-width: 200px;
}

#trailSubmitBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #999999;
  border-color: #999999;
}

@media (max-width: 768px) {
  .trail-nav-buttons {
    flex-direction: column;
    margin-top: 30px;
  }

  #trailBackToResultsBtn,
  #trailPrevBtn {
    order: 2;
  }

  #trailNextBtn,
  #trailSubmitBtn {
    order: 1;
  }
}

/* Trail Loading */
.trail-loading {
  text-align: center;
}

/* Trail Results */
.trail-results {
  animation: fadeIn 0.5s ease-in;
}

.trail-results > h2 {
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Trail Bike Section (in results) */
.trail-bike-section {
  margin-bottom: 40px;
}

.trail-bike-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.trail-bike-header-image {
  width: 80px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.trail-bike-header h3 {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Trail Cards */
.trail-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trail-card {
  border: 1px solid var(--border-color);
  padding: 20px;
  transition: border-color 0.2s ease;
  animation: fadeIn 0.5s ease-in;
}

.trail-card:hover {
  border-color: var(--primary-color);
  outline: 1px solid var(--primary-color);
  outline-offset: -1px;
}

.trail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.trail-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.trail-difficulty {
  font-size: 0.75rem;
  font-weight: 400;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Difficulty colors */
.trail-difficulty.difficulty-green {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.trail-difficulty.difficulty-blue {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.trail-difficulty.difficulty-black {
  color: #000000;
  border-color: #d4d4d4;
  background: #f5f5f5;
}

.trail-difficulty.difficulty-double-black {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.trail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.trail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.trail-meta-separator {
  opacity: 0.4;
}

.trail-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.trail-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trail-length {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.trail-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

.trail-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .trail-step h2 {
    font-size: 1.5rem;
  }

  .trail-bike-grid {
    gap: 12px;
  }

  .trail-bike-option {
    padding: 12px;
  }

  .trail-bike-option-image {
    height: 90px;
  }

  .trail-bike-option-name {
    font-size: 0.8rem;
  }

  .trail-results > h2 {
    font-size: 1.65rem;
  }

  .trail-bike-header-image {
    width: 60px;
    height: 45px;
  }

  .trail-card {
    padding: 16px;
  }

  .trail-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .trail-step h2 {
    font-size: 1.25rem;
  }
}

/* Print Styles */
@media print {
  body {
    padding: 0;
    background: white;
  }

  .container {
    max-width: 100%;
    padding: 20px;
    box-shadow: none;
  }

  /* Hide elements not needed in print */
  .results-actions,
  .download-icon-btn,
  .results-footer,
  .email-form-container,
  .trail-cta,
  .trail-finder-container,
  .contact-section,
  .progress-container {
    display: none !important;
  }

  /* Ensure results show properly */
  .results-container {
    display: block !important;
  }

  .result-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 20px;
  }

  /* Hide tabs in print, show Why this bike content */
  .result-tabs {
    display: none !important;
  }

  .tab-pane {
    display: block !important;
  }

  .tab-pane[data-pane='specs'] {
    display: none !important;
  }

  /* Ensure images print */
  .result-image {
    max-width: 100%;
    height: auto;
  }

  /* Clean up links for print */
  .result-link {
    background: white;
    color: black;
    border: 1px solid black;
  }
}
