:root {
  --max-content-width: 1100px;
  --gap: 20px;
  --brand: #ffffff;
  --brand-contrast: #ffffff;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --muted: #ffffff;
  --bg: #000000;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--brand);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.3;
}
body {
    position: relative;
    background-color: #000000;
}

.bg-img {
    position: fixed;
    inset: 0;
    background: url("../images/kairo_waves2.png") 70% 20%/cover no-repeat;
    z-index: 0;
    pointer-events: none;
}

@media (min-width: 768px) {
    .bg-img {
        background: url("../images/kairo_waves3.png") 70% 20%/cover no-repeat;
    }
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 0;
    pointer-events: none;
}
.site-content {
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.container {
  width: min(100% - 32px, var(--max-content-width));
  margin-inline: auto;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: bg;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img.header-logo {
  width: 48px;
  height: 48px;
  box-shadow: var(--shadow);
  object-fit: contain;
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 1.25rem;
}

/* Intro overlay */
.intro {
  position: fixed;
  inset: 0;
  background:
    rgba(0,0,0,0.8),
    url("../images/kairo_waves2.png") 70% 20%/cover no-repeat;
  display: none;
  place-items: center;
  z-index: 99999;
  overflow: hidden;
}

@media (min-width: 768px) {
    .intro {
        background:
            rgba(0,0,0,0.8),
            url("../images/kairo_waves3.png") 70% 20%/cover no-repeat;
    }
}

.intro.show { display: grid; }
.intro .intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  will-change: transform;
  transition: transform 1200ms cubic-bezier(.2,.9,.2,1), opacity 300ms ease;
}
.intro img.intro-logo {
  width: min(60vw, 360px);
  height: min(60vw, 360px);
  object-fit: contain;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: transparent;
}
.intro h1 {
  margin: 0;
  font-size: clamp(32px, 5vw + 15px, 60px);
  color: #ffffff;
  font-weight: 700;
}
.intro.hide {
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 60px 16px 40px;
    text-align: center;
}

.hero h2 {
    margin: 0 auto;
    font-size: clamp(36px, 6vw, 80px);
    font-weight: 800;
    line-height: 1.2;
    max-width: 22ch;
    letter-spacing: -0.025em;
}

.hero p {
    margin: 20px auto 0;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 26px);
    max-width: 60ch;
}

/* Fine-tune mobile separately */
@media (max-width: 640px) {
  .hero {
    min-height: 45vh;
    padding-top: 10px;
    padding-bottom: 20px;
  }
}
/* Tablet fix */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero { min-height: 45vh; }
  .hero h2 { font-size: 60px; }
  .hero p { font-size: 36px; }
}

/* CTA pair */
.cta-pair {
  padding: 28px 0 20px;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
@media (max-width: 640px) { .btn-row { grid-template-columns: 1fr; } }

/* Glass button with animated gradient border */
.glass-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 240px;
  block-size: 56px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  z-index: 0;
  overflow: hidden;
}
.glass-button::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #0AAAFE, #303ECE, #0AAAFE);
  background-size: 300% 100%;
  -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}
.glass-button:hover { background: rgba(255, 255, 255, 0.14); }
.glass-button:hover::before { animation: borderMove 8s linear infinite; }

@keyframes borderMove {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

.medium-text {
  text-align: center;
  color: var(--brand);
  font-size: clamp(16px, 1.4vw + 10px, 20px);
  margin: 18px auto 10px;
  max-width: 70ch;
}

.square-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
  margin: 28px auto 64px;
  width: min(100%, 720px);
}
.square {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  z-index: 0;
  overflow: hidden;
  transition: transform .1s ease, box-shadow .2s ease;
}
.square:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.square::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(270deg, #303ECE,#0AAAFE );
  -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
}
.icon-wrapper svg { width: 128px; height: 128px; display: block; }
.icon-label {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

@media (max-width: 640px) {
  .hero { text-align: left; padding-left: 24px; padding-right: 24px; }
  .btn-row { flex-direction: column; }
  .square-grid {
    grid-template-columns: repeat(2, 1fr);
    width: min(100% - 32px, 400px);
    gap: 8px;
    margin: 28px auto 64px;
    justify-items: center;
  }
  .square { width: 100%; max-width: 140px; padding: 8px; }
  .icon-wrapper { width: 80px; height: 80px; }
  .icon-wrapper svg { width: 80px; height: 80px; }
  .icon-label { font-size: 0.8rem; }
}
@media (max-width: 500px) and (min-width: 401px) {
  .square-grid { gap: 10px 6px; width: min(100% - 32px, 380px); }
  .square { max-width: 150px; padding: 10px; }
  .icon-wrapper { width: 90px; height: 90px; }
  .icon-wrapper svg { width: 90px; height: 90px; }
  .icon-label { font-size: 0.85rem; }
}
@media (max-width: 400px) {
  .square-grid { gap: 8px 4px; width: min(100% - 24px, 320px); }
  .square { max-width: 140px; padding: 8px; }
  .icon-wrapper { width: 80px; height: 80px; }
  .icon-wrapper svg { width: 80px; height: 80px; }
  .icon-label { font-size: 0.8rem; }
}

footer {
  border-top: 1px solid #e5e7eb;
  padding: 28px 0;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

/* Form-specific styles */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px clamp(12px, 4vw, 32px) 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: .2px; font-size: clamp(16px, 4vw, 18px); }
.brand-badge {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #00c2ff);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  flex-shrink: 0;
}

/* Progress Indicator */
.progress-indicator {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 500;
}
.question-counter {
  background: rgba(255,255,255,0.1);
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  letter-spacing: 0.5px;
}
.progress-percentage {
  color: var(--accent);
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  letter-spacing: 0.5px;
}

/* Tooltip */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  cursor: help;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s ease;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  justify-content: center;
  position: relative;
}
.tooltip-trigger:hover { color: var(--accent); }
.tooltip-trigger:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.help-icon { width: 16px; height: 16px; stroke: currentColor; }

.tooltip {
  position: fixed;
  background: rgba(0,0,0,0.9);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 280px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.tooltip.tooltip-visible { opacity: 1; transform: translateY(0); }
.tooltip-content { position: relative; }
.tooltip-arrow {
  position: absolute;
  width: 0; height: 0; border-style: solid;
}
.tooltip-arrow {
  top: 100%; left: 50%; transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: rgba(0,0,0,0.9) transparent transparent transparent;
}
.tooltip.tooltip-below .tooltip-arrow {
  top: -6px; bottom: auto;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent rgba(0,0,0,0.9) transparent;
}

@media (max-width: 768px) {
  .tooltip { max-width: 240px; font-size: 13px; padding: 10px 14px; }
  .tooltip-trigger { width: 24px; height: 24px; margin-left: 6px; }
  .help-icon { width: 18px; height: 18px; }
}
@media (max-width: 480px) {
  .tooltip { max-width: 200px; font-size: 12px; padding: 8px 12px; }
}

/* Email Step */
.email-step { max-width: 500px; margin: 0 auto; }
.email-header { text-align: center; margin-bottom: 32px; }
.email-header .page-title { margin-bottom: 8px; }

.control.error {
  border-color: var(--error);
  background: rgba(255, 107, 107, 0.05);
}
.error-message { color: var(--error); font-size: 13px; margin-top: 6px; line-height: 1.4; }

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

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.segmented, .btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: var(--brand);
  cursor: pointer;
  transition: all .2s ease;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}
.btn:hover::before { left: 100%; }
.btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.btn:active {
  transform: translateY(0px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  color: var(--accent-contrast);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #1d4ed8, var(--accent));
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
  transform: translateY(-2px);
}
.btn.primary:active {
  transform: translateY(0px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}
.btn:disabled:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255,255,255,0.05);
}

/* Progress */
.progress { height: 6px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); }
.progress > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #00d68f); transition: width .35s ease; }

/* Card */
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  margin-top: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-title { margin: 0 0 4px; font-size: clamp(18px, 2.6vw, 24px); font-weight: 650; line-height: 1.2; }
.page-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* Fieldset */
.fieldset { display: grid; gap: 20px; flex: 1; }
.field { display: grid; gap: 8px; }
.label { font-weight: 600; font-size: 14px; line-height: 1.3; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.4; }
.error { color: #ff6b6b; font-size: 13px; line-height: 1.4; }

/* Controls */
.control, select, input[type="text"], input[type="number"], input[type="email"] {
  width: 100%;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--brand);
  padding: 14px 16px;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
  font-size: 15px;
  min-height: 48px;
  box-sizing: border-box;
}

/* Select dropdown specific styling */
select {
  background: rgba(255,255,255,0.08);
  color: var(--brand);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}
select option { background: #1a1a1a; color: #ffffff; padding: 8px 12px; }
select option:hover { background: #2a2a2a; }
select option:checked { background: var(--accent); color: var(--accent-contrast); }

.control:focus, select:focus, input:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(255,255,255,0.12);
}

/* Radio & Checkbox rows */
.choices { display: grid; gap: 12px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,.02);
  cursor: pointer;
  transition: all .2s ease;
  min-height: 48px;
}
.choice:hover { background: rgba(0,0,0,.04); border-color: var(--accent); }
.choice input[type="radio"] {
  width: 18px; height: 18px; margin: 0; accent-color: var(--accent);
}

/* Button group (acts like radio or multi-select) */
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,.02);
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all .2s ease;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.chip:hover { background: rgba(0,0,0,.04); border-color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Image button styles */
.chip.image-button {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  z-index: 0;
  overflow: hidden;
  transition: transform .1s ease, box-shadow .2s ease;
  min-height: 120px;
  width: 120px;
  padding: 8px;
}
.chip.image-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
/* Gradient border for image buttons */
.chip.image-button::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(270deg, #303ECE, #0AAAFE);
  -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.chip.image-button .icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
}
.chip.image-button .icon-wrapper img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.chip.image-button .icon-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}

/* Selected state for image buttons — integrates visual indicator with your theme */
.chip.image-button[aria-pressed="true"] {
  background: #111;         /* keep the dark tile look */
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35); /* stronger than generic chip */
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-1px);
}
/* Check badge in top-right when selected */
.chip.image-button[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* Pager */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  position: relative;
}
.pager::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}
.pager .btn { min-width: 120px; position: relative; }
.pager .btn:not(:disabled)::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}
.pager .btn:not(:disabled):hover::after { width: 100%; height: 100%; }
.pager .btn.primary {
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  position: relative;
  overflow: hidden;
}
.pager .btn.primary::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}
.pager .btn.primary:hover::before { left: 100%; }

/* Summary */
.summary pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(0,0,0,.02);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
}

/* Disabled */
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* Accessibility focus rings */
.btn:focus-visible,
.control:focus-visible,
.choice:focus-within,
.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth transitions */
* { transition: opacity 0.2s ease, transform 0.2s ease; }

/* High contrast support */
@media (prefers-contrast: high) {
  :root {
    --card-stroke: currentColor;
    --focus: 0 0 0 3px currentColor;
  }
}

/* Loading spinner */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Responsive */
@media (max-width: 480px) {
  .wrap { padding: 12px 16px 16px; }
  .actions { gap: 6px; }
  .segmented, .btn { padding: 6px 10px; font-size: 12px; min-height: 32px; }
  .btn-group { gap: 8px; }
  .chip { padding: 10px 14px; font-size: 13px; min-height: 40px; }
  .pager { flex-direction: column; gap: 12px; }
  .pager .btn { width: 100%; justify-content: center; }
  .page-title { font-size: 20px; }
}
@media (min-width: 768px) {
  .fieldset { gap: 24px; }
  .btn-group { gap: 16px; }
  .choices { gap: 16px; }
  .wrap { padding: 24px 32px 40px; }
}
@media (min-width: 1024px) {
  .wrap { padding: 32px 40px 48px; }
  .card { padding: 32px 40px; }
}
/* Strong, always-visible selected state for image buttons */
.chip.image-button[aria-pressed="true"] {
  background: #111 !important;           /* ensure we don't inherit the blue chip bg */
  color: #fff;
  border-color: transparent;
  /* Selection ring that isn't clipped on mobile */
  box-shadow:
    0 0 0 3px var(--accent),              /* ring */
    0 10px 24px rgba(37, 99, 235, 0.35);  /* glow */
  transform: translateY(-1px);
}

/* Check badge in the corner */
.chip.image-button[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  z-index: 2;                              /* above gradient border */
}

/* Keep the decorative gradient border behind everything */
.chip.image-button::before {
  z-index: 0;
}
/* Optional fallback if you use the class */
.chip.image-button.is-selected {
  background: #111 !important;
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent), 0 10px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.chip.image-button.is-selected::after { /* same badge as above */ }

.ccp-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9998; }
.ccp-banner {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(780px, calc(100% - 24px)); z-index: 9999;
  background: #fff; color: #0f172a; border-radius: 14px;
  box-shadow: 0 20px 40px rgba(2,6,23,.18);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  overflow: hidden;
}
.ccp-inner { padding: 20px 20px 10px; }
.ccp-title { font-weight: 700; font-size: 1.1rem; margin: 0 0 8px; }
.ccp-text { font-size: .95rem; line-height: 1.5; margin: 0 0 10px; color: #334155; }
.ccp-small { font-size: .87rem; color: #475569; margin: 0 0 2px; }
.ccp-links a { color: #0ea5e9; text-decoration: underline; }
.ccp-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.ccp-badge { font-size: .78rem; padding: 6px 8px; border-radius: 999px; background: #f1f5f9; color: #0f172a; }
.ccp-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 20px 18px; flex-wrap: wrap; }
.ccp-btn {
  appearance: none; border: 1px solid #e2e8f0; background: #f8fafc; color: #0f172a;
  padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.ccp-btn:hover { background: #eef2f7; }
.ccp-btn-primary { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.ccp-btn-primary:hover { filter: brightness(0.95); }
@media (prefers-color-scheme: dark) {
  .ccp-banner { background: #0b1020; color: #e5e7eb; }
  .ccp-text { color: #cbd5e1; }
  .ccp-small { color: #a5b4fc; }
  .ccp-btn { background: #0f172a; border-color: #1f2937; color: #e5e7eb; }
  .ccp-btn-primary { background: #22c55e; border-color: #22c55e; color: #04120a; }
  .ccp-badge { background: #111827; color: #e5e7eb; }
}

/* Prevent page interaction while blocked (fallback in case JS runs late) */
html.ccp-locked, body.ccp-locked { overflow: hidden !important; }

/* ===== INDEX PAGE SPECIFIC STYLES ===== */

/* Intro overlay logo animation */
.intro {
  position: fixed;
  inset: 0;
  background: 
    rgba(0,0,0,0.8),
    url("../images/kairo_waves2.png") 70% 20%/cover no-repeat;
  display: none;
  place-items: center;
  z-index: 99999;
  overflow: hidden;
}

@media (min-width: 768px) {
  .intro {
    background: 
      rgba(0,0,0,0.8),
      url("../images/kairo_waves3.png") 70% 20%/cover no-repeat;
  }
}

.intro.show {
  display: grid;
}

.intro .intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  will-change: transform;
  transition: transform 1200ms cubic-bezier(.2,.9,.2,1), opacity 300ms ease;
}

.intro img.intro-logo {
  width: min(60vw, 360px);
  height: min(60vw, 360px);
  object-fit: contain;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: transparent;
}

.intro h1 {
  margin: 0;
  font-size: clamp(32px, 5vw + 15px, 60px);
  color: #ffffff;
  font-weight: 700;
}

.intro.hide {
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 60px 16px 40px;
  text-align: center;
}

.hero h2 {
  margin: 0 auto;
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.2;
  max-width: 22ch;
  letter-spacing: -0.025em;
}

.hero p {
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 26px);
  max-width: 60ch;
}

@media (max-width: 640px) {
  .hero {
    min-height: 45vh;
    padding-top: 10px;
    padding-bottom: 20px;
    text-align: left;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hero {
    min-height: 45vh; 
  }
  .hero h2 {
    font-size: 60px;
  }
  .hero p {
    font-size: 36px;
  }
}

/* CTA section */
.cta-pair {
  padding: 28px 0 20px;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

@media (max-width: 640px) {
  .btn-row { 
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

/* Glass button with animated gradient border */
.glass-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 240px;
  block-size: 56px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  z-index: 0;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.glass-button::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #0AAAFE, #303ECE, #0AAAFE);
  background-size: 300% 100%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.glass-button:hover::before {
  animation: borderMove 8s linear infinite;
}

@keyframes borderMove {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

/* Square icon grid */
.square-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
  margin: 28px auto 64px;
  width: min(100%, 720px);
}

.square {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  z-index: 0;
  overflow: hidden;
  transition: transform .1s ease, box-shadow .2s ease;
}

.square:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.square::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(270deg, #303ECE,#0AAAFE );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
}

.icon-wrapper svg {
  width: 128px;
  height: 128px;
  display: block;
}

.icon-label {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

/* Mobile responsive squares */
@media (max-width: 640px) {
  .square-grid { 
    grid-template-columns: repeat(2, 1fr);
    width: min(100% - 32px, 400px);
    gap: 8px;
    margin: 28px auto 64px;
    justify-items: center;
  }
  .square {
    width: 100%;
    max-width: 140px;
    padding: 8px;
  }
  .icon-wrapper {
    width: 80px;
    height: 80px;
  }
  .icon-wrapper svg {
    width: 80px;
    height: 80px;
  }
  .icon-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 500px) and (min-width: 401px) {
  .square-grid { 
    gap: 10px 6px;
    width: min(100% - 32px, 380px);
  }
  .square {
    max-width: 150px;
    padding: 10px;
  }
  .icon-wrapper {
    width: 90px;
    height: 90px;
  }
  .icon-wrapper svg {
    width: 90px;
    height: 90px;
  }
  .icon-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 400px) {
  .square-grid { 
    gap: 8px 4px;
    width: min(100% - 24px, 320px);
  }
  .square {
    max-width: 140px;
    padding: 8px;
  }
  .icon-wrapper {
    width: 80px;
    height: 80px;
  }
  .icon-wrapper svg {
    width: 80px;
    height: 80px;
  }
  .icon-label {
    font-size: 0.8rem;
  }
}

/* Icon sizing helper */
.icon-128 svg { 
  width: 128px; 
  height: 128px; 
  display: block; 
}

/* Language Selector */
.language-selector {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  outline: none;
}

.language-selector:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.language-selector:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.language-selector option {
  background: #1e293b;
  color: #fff;
  padding: 8px;
}

@media (prefers-color-scheme: dark) {
  .language-selector option {
    background: #0f172a;
  }
}

@media (max-width: 640px) {
  .language-selector {
    font-size: 0.85rem;
    padding: 4px 8px;
  }
}

/* Professional Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px 20px;
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.2);
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.9rem;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.footer-links a:hover {
  color: #0ea5e9;
  text-decoration: underline;
}

.footer-copyright {
  color: #9ca3af;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-copyright a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-copyright a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.footer-divider {
  color: #4b5563;
  font-weight: 300;
  user-select: none;
}

/* Responsive footer */
@media (max-width: 640px) {
  .site-footer {
    padding: 24px 16px;
  }
  
  .footer-content {
    gap: 12px;
  }
  
  .footer-links {
    font-size: 0.85rem;
    gap: 8px;
  }
  
  .footer-copyright {
    font-size: 0.8rem;
    gap: 6px;
  }
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .footer-links {
    justify-content: flex-start;
  }
  
  .footer-copyright {
    justify-content: flex-end;
  }
}

.bg-img, .bg-overlay { position: fixed; inset: 0; z-index: 0; }
.site-content { position: relative; z-index: 2; }
.chip { cursor: pointer; }
.chip[aria-pressed="true"] { outline: 2px solid var(--primary); }
[v-cloak] { visibility: hidden; }
.flash { margin-top:12px; padding:10px; border-radius:8px; font-size:.95rem }
.flash.ok { background:rgba(16,185,129,.12); border:1px solid rgba(16,185,129,.35); }
.flash.err { background:rgba(244,63,94,.12); border:1px solid rgba(244,63,94,.35); }
/* Thank-you card */
.card.thankyou { text-align:center; padding:28px; }
.card.thankyou .logo {
  width: 88px;           /* tweak as you like */
  height: auto;
  display: block;
  margin: 0 auto 12px;
  max-width: 25vw;       /* responsive cap */
}
.card.thankyou h2 { margin: 6px 0 8px; }
.card.thankyou p  { margin: 0 0 16px; opacity: .9; }
.thank-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }