/* Base Styling */
:root {
  --blue-primary: #1f2937;
  --blue-deep: #111827;
  --blue-hover: #273449;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --text-main: #111827;
  --text-body: #1f2937;
  --card-bg: #ffffff;
  --tint: #f8ede2;
  --bg-gradient-start: #fef6e4;
  --bg-gradient-end: #f4f1eb;
  --progress-inactive: #d1d5db;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-color: var(--bg-gradient-end);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  color: var(--text-body);
}

.container {
  background: transparent;
}

html {
  scroll-behavior: smooth;
}

h1 {
  text-align: center;
  color: var(--text-main);
  font-size: 1.8em;
  margin: 20px 0;
}

h2,
h3 {
  color: var(--text-main);
}

.form-question {
  display: block;
  text-align: center;
  font-weight: 600;
  margin: 12px 0;
  color: var(--text-main);
}

.inline-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

.inline-option input[type="radio"],
.inline-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.medical-step {
  display: none;
}

.medical-details {
  margin-top: 10px;
}

/* Registration Landing */
.role-select {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
}

.role-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(100%, 980px);
  margin: 0 auto;
  text-align: center;
}

.role-primary {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  width: 100%;
}

.role-secondary {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Logo Styling */
.site-header,
.logo-container {
  text-align: center;
  padding: 22px 0 6px;
  background-color: white;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin: 0 auto;
}

.logo {
  max-width: 100%;
  width: 440px;
  margin: 0 auto 30px;
  display: block;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.progress-step {
  flex-grow: 1;
  height: 8px;
  background-color: var(--progress-inactive);
  margin: 0 5px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.progress-step.active::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--blue-primary);
}

/* Form Styling */
form {
  max-width: 700px;
  margin: auto;
  padding: 20px;
}

fieldset {
  border: none;
  margin-bottom: 25px;
  padding: 0;
}

legend {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 10px;
}

label {
  font-weight: 600;
  margin-top: 12px;
}

input, select, textarea {
  font-size: 1em;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

input[type="submit"],
.btn-next,
.btn-prev {
  background-color: var(--accent);
  color: #ffffff;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(240, 124, 87, 0.25);
}

input[type="submit"]:hover,
.btn-next:hover,
.btn-prev:hover {
  background-color: var(--accent-hover);
}

.btn-next-sub {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(240, 124, 87, 0.25);
  margin-top: 10px;
}

.btn-next-sub:hover {
  background-color: var(--accent-hover);
}

/* Extra polish */
hr {
  border: none;
  height: 1px;
  background: none;
  margin: 0;
}

@media (max-width: 600px) {
  .role-buttons {
    gap: 20px;
  }

  .role-primary {
    flex-direction: column;
    gap: 20px;
  }

  .role-box {
    width: 80%;
    text-align: center;
  }
}

.register-choice-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
}

.register-buttons {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 40px;
}

.register-option {
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    padding: 20px 40px;
    font-size: 1.5em;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.register-option:hover {
    background-color: #e96a44;
}

.full-screen-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  gap: 60px;
  flex-wrap: wrap;
  background-color: var(--blue-primary);
}

.role-box {
  display: inline-block;
  padding: 20px 40px;
  background-color: #f8f8f8;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 2.5em;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background-color 0.2s;
}

.role-box:hover {
  background-color: #e4f0fb;
  transform: scale(1.05) translateY(-3px);
}

.role-box-accent {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(240, 124, 87, 0.25);
}

.role-box-accent:hover {
  background-color: #e96a44;
  color: #ffffff;
}

main.role-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 50px;
  font-size: 2.2rem;
  font-weight: 700;  
}

.select-title {
  font-size: 2.2rem;
  color: var(--text-main);
  margin-bottom: 40px;
  font-weight: 600;
}

.countdown-timer {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-end;
  margin: 20px 0 10px;
}

.hidden {
  display: none !important;
}

.admin-note {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-top: 12px;
}

.flip-countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-end;
}

.flip-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.flip-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-transform: uppercase;
}

.flip-card {
  background: #111;
  color: #f3f3f3;
  font-weight: 700;
  font-size: 2.2rem;
  min-width: 96px;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
  perspective: 600px;
}

.flip-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.flip-card span {
  display: block;
  transform: translateZ(0);
}

.flip-card.flip {
  animation: flipDown 0.6s ease;
}

@keyframes flipDown {
  0% {
    transform: rotateX(0deg);
  }
  40% {
    transform: rotateX(-90deg);
  }
  70% {
    transform: rotateX(20deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

.countdown-text {
  font-size: 1rem;
  color: var(--text-main);
  margin-top: 6px;
}

.countdown-text {
  font-size: 1rem;
  color: var(--text-main);
  margin-top: 6px;
}

@media (max-width: 600px) {
  .flip-countdown {
    gap: 8px;
  }
  .flip-card {
    min-width: 68px;
    padding: 10px 12px;
    font-size: 1.6rem;
  }
  .flip-label {
    font-size: 0.75rem;
  }
}

.map-embed {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.map-embed iframe {
  border: 0;
  width: 100%;
  height: 240px;
}

body {
  opacity: 0;
  animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .logo {
    width: 320px;
    max-width: 80vw;
    margin-bottom: 16px;
  }

  .role-box {
    font-size: 1.8rem;
    padding: 20px 30px;
  }

  .role-buttons {
    flex-direction: column;
    gap: 20px;
  }

  .site-header {
    padding: 16px 0 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  }
}

@media (max-width: 760px) {
  .form-step input, .form-step select, .form-step textarea {
    width: 100%;
    font-size: 16px;
  }

  .btn-next, .btn-prev {
    width: 100%;
    margin-top: 10px;
  }

  .container {
    padding: 0 10px;
  }

  .site-header {
    padding: 16px 0 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  }
}

input:invalid.
select:invalid,
textarea:invalid {
  border: 2px solid red;
  background-color: #ffe6e6;
}

input,
select,
textarea {
  margin-bottom: 12px;
  padding: 8px;
}

/* ===== Homepage styles ===== */

.home-page {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #cce4f5 0%, #f0f8ff 40%, #ffffff 100%);
  color: var(--text-body);
  display: block; /* override base flex layout so header spans full width */
}

body.admin-page {
  align-items: stretch;
  overflow-x: hidden;
}

.admin-dashboard-main {
  width: 100%;
  max-width: none;
  padding: 24px;
  box-sizing: border-box;
}

.admin-dashboard-section {
  width: 100%;
  min-width: 0;
}

.admin-table-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-table-scroll {
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 280px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

.admin-registrations-table {
  min-width: 2200px;
  width: max-content;
  border-collapse: collapse;
}

.admin-registrations-table th,
.admin-registrations-table td {
  padding: 8px 10px;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.admin-registrations-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fa;
  box-shadow: inset 0 -1px 0 #d1d5db;
}

.admin-registrations-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-registrations-table .admin-table-empty {
  padding: 12px;
  text-align: center;
}

@media (max-width: 640px) {
  .admin-dashboard-main {
    padding: 16px 12px 24px;
  }

  .admin-table-scroll {
    max-height: calc(100vh - 240px);
  }
}

.home-page .site-header {
  background: white;
  width: 100%;
  margin: 0;
}

.main-nav {
  background: #f4f1eb;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #d0c7ba;
}

.main-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 12px 16px;
}

.main-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
  position: relative;
}

.main-nav a.nav-admin {
  font-size: 0.95rem;
  opacity: 0.9;
}

.admin-link-top {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.95rem;
}

.admin-link-top a {
  display: inline-block;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  font-size: 1rem;
  line-height: 1.2;
}

.admin-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.admin-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  min-width: 180px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}

.admin-menu-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.admin-menu:hover .admin-menu-dropdown,
.admin-menu:focus-within .admin-menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.admin-menu-user {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  word-break: break-all;
}

.admin-menu-logout {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.admin-menu-logout:hover {
  background: var(--accent-hover);
}

@media (max-width: 640px) {
  .admin-link-top {
    top: 6px;
    right: 8px;
  }
  .admin-link-top a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .admin-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  .logo {
    max-width: 85vw;
  }
}

.admin-link-top a:hover {
  background: var(--accent-hover);
}

.main-nav a:hover,
.main-nav a:focus {
  background-color: var(--tint);
  color: #2a4a66;
  outline: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.15s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  transform: scaleX(1);
}

.idle-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
}

.idle-modal.hidden {
  display: none;
}

.idle-modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 28px;
  text-align: center;
  max-width: 360px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.idle-modal-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #1f2937;
}

.idle-modal-content p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 16px;
}

/* Hero */
.home-hero {
  background: #ffffff;
  color: var(--text-main);
  text-align: center;
  padding: 2.2rem 1.5rem 2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-radius: 0 0 16px 16px;
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  position: relative;
  overflow: hidden;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(17, 24, 39, 0.12), rgba(249, 115, 22, 0.1));
  pointer-events: none;
}

.home-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.home-hero h1 {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.home-tagline {
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
  color: var(--text-main);
}

.home-hero-subtext {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Main layout */
.home-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.home-section {
  margin-bottom: 2.5rem;
}

.home-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: var(--text-main);
}

.home-section-text {
  max-width: 800px;
  margin: 0.5rem auto 1.5rem;
  text-align: center;
  line-height: 1.5;
}

.home-flyer-wrap {
  text-align: center;
}

.home-flyer {
  width: 100%;
  max-width: 960px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* Cards & grids */
.home-highlight {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.75rem 1.25rem 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.home-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.home-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.home-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.home-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.founder-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.founder-photo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.founder-info h3 {
  margin: 0 0 6px 0;
}

.founder-info p {
  margin: 0;
}

@media (max-width: 600px) {
  .founder-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .founder-photo {
    width: 100%;
    height: auto;
  }
}

.home-card ul {
  padding-left: 1.1rem;
  margin: 0;
}

/* “Photos” section (text blocks you can later swap with real images) */
.home-photos {
  background: var(--tint);
  border-radius: 10px;
  padding: 2rem 1.25rem;
}

.home-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.home-photo-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.photo-grid .photo-card {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.photo-slider {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.photo-slide img {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: contain;
  background: #111;
  display: block;
  transition: opacity 0.25s ease;
}

.photo-slide img.fade-out {
  opacity: 0;
}

.photo-controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.photo-controls button {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.photo-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.photo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  display: inline-block;
  cursor: pointer;
}

.photo-dot.active {
  background: rgba(255, 255, 255, 0.9);
}

/* Filters modal */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-dashboard-main .filter-bar h1 {
  margin: 0 auto;
}

.filter-trigger {
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.filter-modal.hidden {
  display: none;
}

.filter-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  box-sizing: border-box;
}

.filter-content {
  width: min(820px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.filter-form {
  max-width: none;
  margin: 0;
  padding: 0;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.filter-header h3 {
  margin: 0;
}

.filter-header button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.filter-form .filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.filter-form select,
.filter-form input[type="text"],
.filter-form input[type="number"],
.filter-form input[type="date"] {
  width: 100%;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.filter-reset {
  text-decoration: none;
  padding: 10px 15px;
}

.filter-actions .btn-next,
.filter-actions .btn-prev {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.returning-card {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.home-cta-btn.small {
  padding: 6px 14px;
  font-size: 0.9rem;
}

.returning-summary .filter-content {
  width: min(960px, 94vw);
  max-height: 85vh;
  overflow-y: auto;
}

.summary-section {
  margin-top: 14px;
}

.summary-section h4 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.summary-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-field input,
.summary-field select,
.summary-field textarea {
  width: 100%;
}

.summary-field textarea {
  min-height: 70px;
}

.summary-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.summary-edit {
  background: none;
  border: none;
  color: var(--blue-primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}

.summary-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.summary-status {
  margin-top: 8px;
  color: #b91c1c;
}

/* Buttons */
.home-cta-btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, color 0.1s ease;
  box-shadow: 0 10px 24px rgba(240, 124, 87, 0.25);
}

.home-cta-btn.large {
  padding: 0.9rem 2.3rem;
  font-size: 1.05rem;
}

.home-cta-btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(240, 124, 87, 0.35);
  transform: translateY(-1px);
}

/* CTA stripe */
.home-cta-section {
  text-align: center;
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

/* Footer */
.home-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 1.5rem;
}

.thankyou-container {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.directions {
  margin-top: 6px;
}

.directions summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.directions a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  margin-top: 4px;
}

.directions a:hover {
  color: var(--accent-hover);
}

/* Help Chat */
.helpchat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-weight: 600;
  box-shadow: 0 14px 26px rgba(17, 24, 39, 0.2);
  cursor: pointer;
  z-index: 1200;
}

.helpchat-fab:hover {
  background: var(--accent-hover);
}

.helpchat-modal {
  position: fixed;
  right: 24px;
  bottom: 88px;
  width: 360px;
  max-height: 70vh;
  display: none;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(17, 24, 39, 0.18);
  overflow: hidden;
  z-index: 1201;
}

.helpchat-modal.open {
  display: flex;
}

.helpchat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.9rem 1.1rem 0.6rem;
  border-bottom: 1px solid #f1f1f1;
}

.helpchat-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.helpchat-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.helpchat-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

.helpchat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.helpchat-message {
  display: flex;
  flex-direction: column;
}

.helpchat-message.user {
  align-items: flex-end;
}

.helpchat-message.assistant {
  align-items: flex-start;
}

.helpchat-bubble {
  max-width: 85%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.helpchat-message.user .helpchat-bubble {
  background: var(--accent);
  color: #ffffff;
}

.helpchat-message.assistant .helpchat-bubble {
  background: #f3f4f6;
  color: var(--text-main);
}

.helpchat-citations {
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #eef2f7;
  font-size: 0.72rem;
  color: #4b5563;
  max-width: 85%;
}

.helpchat-citations-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.helpchat-citation {
  margin-bottom: 0.35rem;
}

.helpchat-citation:last-child {
  margin-bottom: 0;
}

.helpchat-citation-label {
  font-weight: 600;
}

.helpchat-citation-snippet {
  color: #6b7280;
}

.helpchat-input {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid #f1f1f1;
}

.helpchat-input input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}

.helpchat-input button {
  border: none;
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.helpchat-input button:hover {
  background: var(--accent-hover);
}

.helpchat-escalate,
.helpchat-escalate-form {
  margin-top: 0.4rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #eef2f7;
  font-size: 0.85rem;
}

.helpchat-escalate-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.helpchat-escalate-actions {
  display: flex;
  gap: 0.5rem;
}

.helpchat-escalate-actions button {
  border: none;
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
}

.helpchat-escalate-actions button:last-child {
  background: #e5e7eb;
  color: #374151;
}

.helpchat-escalate-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.helpchat-escalate-form input {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

.helpchat-escalate-form button {
  align-self: flex-start;
  border: none;
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .helpchat-modal {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: 12px;
    width: auto;
    max-height: none;
  }

  .helpchat-fab {
    right: 16px;
    bottom: 16px;
  }
}
