/* AHI theme + language switcher + RTL + clean logo */

:root,
.sw-root {
  --sw-bg: #f3eee6;
  --sw-ink: #241f1a;
  --sw-ink-soft: #6a625a;
  --sw-accent: #c4a06a;
  --sw-font-display: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans Hebrew",
    "Arial Hebrew", sans-serif;
  --sw-font-body: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans Hebrew",
    "Arial Hebrew", system-ui, sans-serif;
}

html,
body {
  margin: 0;
  background: var(--sw-bg);
  overflow-x: hidden;
}

/* Topbar sized around 65px logo */
.sw-root .sw-topbar {
  min-height: 65px;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(18px, 5vw, 64px);
  box-sizing: border-box;
}

/* Actions group: langs + CTA stay together on one row at every breakpoint */
.sw-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Logo: transparent PNG, no pill / border / shadow — sits on page bg */
.sw-brand.sw-brand--logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
  line-height: 0;
  height: 65px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  text-decoration: none;
}

.sw-brand__logo {
  display: block;
  height: 65px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: none;
}

/* Nav / CTA / langs: same visual height as logo (65px) */
.sw-root .sw-nav {
  height: 48px;
  align-items: center;
  box-sizing: border-box;
  padding: 4px 6px;
  gap: 2px;
}

.sw-root .sw-nav__item {
  height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  padding: 0 16px;
  box-sizing: border-box;
}

.sw-root .sw-topcta {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  font-size: 0.95rem;
  box-sizing: border-box;
  /* Instant tap feedback */
  transform-origin: center;
}

.sw-root .sw-gallery-btn {
  background: color-mix(in srgb, #fff 55%, transparent);
  color: var(--sw-ink);
  border: 1.5px solid color-mix(in srgb, var(--sw-ink) 25%, transparent);
  /* Instant tap feedback */
  transform-origin: center;
}
.sw-root .sw-gallery-btn:hover {
  background: var(--sw-ink);
  color: #fff;
}

/* Tap feedback state (set via JS on pointerdown) */
.sw-root .sw-nav__item:active,
.sw-root .sw-topcta:active,
.sw-root .sw-gallery-btn:active,
.sw-root .sw-btn:active,
.sw-root .sw-route__dot:active,
.sw-root .ahi-langs__btn:active {
  transform: scale(var(--tap-scale, 0.97));
  transition: transform 0.1s ease-out;
}

/* Language switcher (injected into .sw-topbar) */
.ahi-langs {
  display: flex;
  align-items: center;
  height: 48px;
  gap: 2px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 55%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--sw-accent) 16%, transparent);
  flex-shrink: 0;
}

.ahi-langs__btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sw-ink-soft);
  border: 0;
  background: transparent;
  cursor: pointer;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.ahi-langs__btn:hover {
  color: var(--sw-ink);
}

.ahi-langs__btn.is-active {
  color: #fff;
  background: var(--sw-ink);
}

/* Real photo stages: slightly stronger still presence */
.sw-scene__still {
  filter: saturate(1.02) contrast(1.02);
}

/* Soft vignette so copy stays readable on bright Israeli interiors */
.sw-stage::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  background: radial-gradient(
      90% 70% at 70% 45%,
      transparent 30%,
      color-mix(in srgb, var(--sw-bg) 18%, transparent) 100%
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--sw-bg) 35%, transparent) 0%,
      transparent 42%
    );
}


/* ---------- RTL (Hebrew) ---------- */
html.is-rtl .sw-copylayer::before {
  left: auto;
  right: 0;
  background: linear-gradient(
    270deg,
    var(--sw-bg) 0%,
    color-mix(in srgb, var(--sw-bg) 82%, transparent) 34%,
    color-mix(in srgb, var(--sw-bg) 40%, transparent) 62%,
    transparent 100%
  );
}

html.is-rtl .sw-copy {
  left: auto;
  right: clamp(18px, 5vw, 64px);
  text-align: right;
}

html.is-rtl .sw-route {
  right: auto;
  left: clamp(14px, 2.4vw, 30px);
}

html.is-rtl .sw-route__label {
  right: auto;
  left: 24px;
  transform: translateY(-50%) translateX(-6px);
}

html.is-rtl .sw-route__dot:hover .sw-route__label,
html.is-rtl .sw-route__dot.is-active .sw-route__label {
  transform: translateY(-50%) translateX(0);
}

html.is-rtl .sw-scrollbar span {
  transform-origin: 100% 50%;
}

html.is-rtl .sw-stage::after {
  background: radial-gradient(
      90% 70% at 30% 45%,
      transparent 30%,
      color-mix(in srgb, var(--sw-bg) 18%, transparent) 100%
    ),
    linear-gradient(
      270deg,
      color-mix(in srgb, var(--sw-bg) 35%, transparent) 0%,
      transparent 42%
    );
}

/* Re-assert wide 4:3 fit after RTL base vignette */
@media (min-width: 960px) and (min-aspect-ratio: 4 / 3) {
  html.is-rtl .sw-stage::after {
    background: linear-gradient(
      270deg,
      color-mix(in srgb, var(--sw-bg) 55%, transparent) 0%,
      color-mix(in srgb, var(--sw-bg) 18%, transparent) 28%,
      transparent 48%
    );
  }
}

html.is-rtl .sw-copy__tags {
  justify-content: flex-end;
}

html.is-rtl .sw-copy__cta {
  justify-content: flex-end;
}

html.is-rtl .sw-brand__logo {
  object-position: right center;
}

html.is-rtl .sw-topbar__actions,
html.is-rtl .sw-root .sw-topbar .sw-topbar__actions {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 860px) {
  html.is-rtl .sw-copylayer::before {
    left: 0;
    right: 0;
    background: linear-gradient(
      0deg,
      var(--sw-bg) 8%,
      color-mix(in srgb, var(--sw-bg) 70%, transparent) 46%,
      transparent 100%
    );
  }

  html.is-rtl .sw-copy {
    left: clamp(18px, 5vw, 64px);
    right: clamp(18px, 5vw, 64px);
    text-align: right;
  }

  .sw-root .sw-topbar {
    min-height: 65px;
    padding: 10px clamp(14px, 4vw, 24px);
    gap: 10px;
  }

  .sw-brand.sw-brand--logo,
  .sw-brand__logo {
    height: 65px;
  }

  .ahi-langs {
    height: 44px;
    padding: 3px;
  }

  .ahi-langs__btn {
    height: 36px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .sw-root .sw-topcta {
    height: 44px;
    padding: 0 14px;
    font-size: 0.82rem;
  }
}

/* ============================================================================
   Tablet breakpoint (1350px → 861px): nav wraps to a second row (sized to
   content, not full width). gallery-btn stays on row 1 with the actions.
   ============================================================================ */
@media (max-width: 1350px) and (min-width: 861px) {
  .sw-root .sw-topbar {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 10px clamp(14px, 4vw, 28px);
    gap: 8px 12px;
  }

  /* Row 1: logo → gallery-btn → actions (pushed right) */
  .sw-root .sw-topbar .sw-brand { order: 0; }
  .sw-root .sw-topbar .sw-gallery-btn { order: 1; }
  .sw-root .sw-topbar .sw-topbar__actions { order: 2; margin-left: auto; }

  /* Force wrap before nav */
  .sw-root .sw-topbar::after {
    content: "";
    flex-basis: 100%;
    order: 2;
  }

  /* Row 2: nav — sized to content, centered via auto margins */
  .sw-root .sw-topbar .sw-nav {
    order: 3;
    flex-basis: auto;
    width: fit-content;
    max-width: 100%;
    margin: 2px auto 0;
    /* Override the engine's display:none (kicks in at 860px) */
    display: flex;
  }
}

/* ============================================================================
   Narrow tablet (860px → 576px): nav hidden, gallery-btn stays on row 1.
   ============================================================================ */
@media (max-width: 860px) and (min-width: 576px) {
  .sw-root .sw-topbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 10px clamp(14px, 4vw, 24px);
    gap: 8px 12px;
  }

  /* Row 1 (single row): logo → gallery-btn → actions (right) */
  .sw-root .sw-topbar .sw-brand { order: 0; flex-shrink: 0; }
  .sw-root .sw-topbar .sw-gallery-btn { order: 1; flex-shrink: 0; }
  .sw-root .sw-topbar .sw-topbar__actions { order: 2; margin-left: auto; flex-shrink: 0; }

  /* Nav hidden on this range */
  .sw-root .sw-topbar .sw-nav { display: none; }
}

/* ============================================================================
   Mobile (<575px): logo, gallery-btn, and actions all on row 1.
   ============================================================================ */
@media (max-width: 575px) {
  .sw-root .sw-topbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 8px clamp(10px, 3vw, 16px);
    gap: 6px;
    /* No overflow-x needed: compact langs free up enough space */
    overflow: visible;
  }

  /* Shrink logo from 65px → 50px to save ~15px */
  .sw-root .sw-topbar .sw-brand.sw-brand--logo,
  .sw-root .sw-topbar .sw-brand__logo {
    height: 50px;
  }

  /* Row layout */
  .sw-root .sw-topbar .sw-brand {
    order: 0;
    flex-shrink: 0;
  }

  .sw-root .sw-topbar .sw-gallery-btn {
    order: 1;
    height: 40px;
    padding: 0 10px;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .sw-root .sw-topbar .sw-topbar__actions {
    order: 2;
    margin-left: auto;
    gap: 4px;
    flex-shrink: 0;
  }

  /* ---- Compact lang switcher ---- */
  /* Wrapper becomes relative anchor for the dropdown */
  .sw-root .sw-topbar .ahi-langs {
    position: relative;
    height: 40px;
    padding: 3px;
  }

  /* Hide all inactive lang buttons — only active stays visible */
  .sw-root .sw-topbar .ahi-langs .ahi-langs__btn:not(.is-active) {
    display: none;
  }

  /* Active button: add chevron via ::after, shrink padding */
  .sw-root .sw-topbar .ahi-langs .ahi-langs__btn.is-active {
    height: 34px;
    padding: 0 8px 0 11px;
    font-size: 0.72rem;
    gap: 3px;
    display: inline-flex;
    align-items: center;
  }

  /* Chevron indicator — rotates when open */
  .sw-root .sw-topbar .ahi-langs .ahi-langs__btn.is-active::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }

  /* Rotate chevron when dropdown is open */
  .sw-root .sw-topbar .ahi-langs.is-open .ahi-langs__btn.is-active::after {
    transform: rotate(180deg);
  }

  /* Dropdown panel: absolutely positioned below the wrapper */
  .sw-root .sw-topbar .ahi-langs.is-open {
    /* Keep the pill shape for the active btn; panel goes outside flow */
  }

  .sw-root .sw-topbar .ahi-langs.is-open .ahi-langs__btn:not(.is-active) {
    display: inline-flex;
  }

  /* The dropdown container that wraps all inactive buttons */
  .sw-root .sw-topbar .ahi-langs__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    background: color-mix(in srgb, #fff 72%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid color-mix(in srgb, var(--sw-accent) 18%, transparent);
    border-radius: 12px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--sw-ink) 12%, transparent);
    /* Animate in */
    transform-origin: top right;
    animation: ahi-langs-in 0.15s ease-out;
  }

  .sw-root .sw-topbar .ahi-langs.is-open .ahi-langs__dropdown {
    display: flex;
  }

  /* Dropdown buttons inherit base style, slightly wider for readability */
  .sw-root .sw-topbar .ahi-langs__dropdown .ahi-langs__btn {
    display: inline-flex;
    height: 34px;
    padding: 0 16px;
    font-size: 0.78rem;
    width: 100%;
    justify-content: center;
  }

  @keyframes ahi-langs-in {
    from { opacity: 0; transform: scale(0.92) translateY(-4px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
  }

  .sw-root .sw-topbar .sw-topcta {
    height: 40px;
    padding: 0 14px;
    font-size: 0.82rem;
  }

  /* Nav hidden on mobile (engine hides it at 860px anyway) */
  .sw-root .sw-topbar .sw-nav { display: none; }
}

/* Hebrew line-height comfort */
html[lang="he"] .sw-copy__title {
  line-height: 1.12;
  letter-spacing: 0;
}

html[lang="he"] .sw-copy__body {
  line-height: 1.65;
}

/* ============================================================================
   Reduced Transparency — make materials more opaque when user prefers it
   ============================================================================ */
@media (prefers-reduced-transparency: reduce) {
  .sw-root .sw-topbar,
  .sw-nav,
  .ahi-langs,
  .sw-topcta,
  .sw-btn--ghost,
  .sw-route__label,
  .gal-topbar,
  .gal-back,
  .gal-lightbox__close,
  .gal-lightbox__nav {
    backdrop-filter: none !important;
    background: var(--sw-bg) !important;
    border-color: color-mix(in srgb, var(--sw-ink) 20%, transparent) !important;
  }
  
  .sw-sky__grad,
  .sw-sky__glow {
    opacity: 0.8;
  }
  
  .gal-item__category,
  .gal-lightbox__caption {
    background: var(--sw-bg) !important;
  }
}

/* ============================================================================
   AHI Lead & Project Feedback Modal
   ============================================================================ */
/* ============================================================================
   AHI Lead & Project Feedback Modal
   ============================================================================ */
dialog.ahi-modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 580px;
  width: 92%;
  color: var(--sw-ink);
  font-family: var(--sw-font-body);
  box-shadow: none;
  overflow: visible;
}

dialog.ahi-modal::backdrop {
  background: rgba(36, 31, 26, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: ahi-modal-backdrop-in 0.25s ease-out;
}

dialog.ahi-modal[open] {
  animation: ahi-modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ahi-modal-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ahi-modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ahi-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.ahi-modal__container {
  position: relative;
  z-index: 2;
  background: color-mix(in srgb, var(--sw-bg) 94%, #ffffff 6%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid color-mix(in srgb, var(--sw-ink) 14%, transparent);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(36, 31, 26, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--sw-ink) 25%, transparent) transparent;
}

.ahi-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--sw-ink) 14%, transparent);
  background: color-mix(in srgb, var(--sw-ink) 5%, transparent);
  color: var(--sw-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  transform-origin: center;
}

[dir="rtl"] .ahi-modal__close {
  right: auto;
  left: 20px;
}

.ahi-modal__close:hover {
  background: color-mix(in srgb, var(--sw-ink) 12%, transparent);
  color: var(--sw-ink);
  transform: scale(1.05);
}

.ahi-modal__close:active {
  transform: scale(var(--tap-scale, 0.97));
}

.ahi-modal__header {
  margin-bottom: 24px;
  padding-right: 32px;
}

[dir="rtl"] .ahi-modal__header {
  padding-right: 0;
  padding-left: 32px;
}

.ahi-modal__title {
  font-family: var(--sw-font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--sw-ink);
  letter-spacing: -0.01em;
}

.ahi-modal__subtitle {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--sw-ink-soft);
  margin: 0;
}

.ahi-modal__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ahi-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .ahi-form__grid {
    grid-template-columns: 1fr;
  }
  .ahi-modal__container {
    padding: 22px 18px;
    border-radius: 18px;
  }
}

.ahi-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ahi-form__label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sw-ink);
}

.ahi-form__input,
.ahi-form__textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid color-mix(in srgb, var(--sw-ink) 18%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.93rem;
  color: var(--sw-ink);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ahi-form__input::placeholder,
.ahi-form__textarea::placeholder {
  color: color-mix(in srgb, var(--sw-ink-soft) 60%, transparent);
}

.ahi-form__input:focus,
.ahi-form__textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--sw-accent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--sw-accent) 25%, transparent);
}

.ahi-form__textarea {
  resize: vertical;
  min-height: 75px;
}

/* File Dropzone */
.ahi-dropzone {
  position: relative;
  border: 1.5px dashed color-mix(in srgb, var(--sw-ink) 24%, transparent);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  background: color-mix(in srgb, #ffffff 45%, transparent);
  transition: all 0.2s ease;
  cursor: pointer;
}

.ahi-dropzone:hover,
.ahi-dropzone.is-dragover {
  border-color: var(--sw-accent);
  background: color-mix(in srgb, var(--sw-accent) 10%, transparent);
}

.ahi-dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.ahi-dropzone__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.ahi-dropzone__icon {
  color: var(--sw-ink-soft);
  transition: color 0.2s ease;
}

.ahi-dropzone:hover .ahi-dropzone__icon {
  color: var(--sw-accent);
}

.ahi-dropzone__hint {
  font-size: 0.82rem;
  color: var(--sw-ink-soft);
  line-height: 1.4;
}

/* File List */
.ahi-file-list {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ahi-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid color-mix(in srgb, var(--sw-ink) 14%, transparent);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.ahi-file-item__icon {
  color: var(--sw-accent);
  flex-shrink: 0;
}

.ahi-file-item__name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--sw-ink);
  font-weight: 500;
}

.ahi-file-item__size {
  color: var(--sw-ink-soft);
  font-size: 0.76rem;
  flex-shrink: 0;
}

.ahi-file-item__remove {
  background: none;
  border: none;
  color: var(--sw-ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.ahi-file-item__remove:hover {
  color: #dc2626;
}

/* Israeli Compliance Checkbox */
.ahi-form__group--checkbox {
  margin-top: 4px;
}

.ahi-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.ahi-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid color-mix(in srgb, var(--sw-ink) 32%, transparent);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.ahi-checkbox:checked {
  background: var(--sw-ink);
  border-color: var(--sw-ink);
}

.ahi-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ahi-checkbox-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--sw-ink-soft);
}

.ahi-form__error {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  border: 1px solid color-mix(in srgb, #ef4444 28%, transparent);
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
}

/* Submit & Modal Action Buttons — Match common CTA (.sw-topcta / .sw-btn--primary) */
.ahi-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  background: var(--sw-ink);
  color: #ffffff;
  border: none;
  border-radius: 999px; /* Shared CTA pill shape */
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--sw-ink) 25%, transparent);
  margin-top: 6px;
  transform-origin: center;
}

.ahi-form__submit:hover {
  background: color-mix(in srgb, var(--sw-ink) 85%, var(--sw-accent));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--sw-ink) 35%, transparent);
  transform: translateY(-1px);
}

.ahi-form__submit:active {
  transform: scale(var(--tap-scale, 0.97));
}

.ahi-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ahi-form__spinner {
  animation: ahi-spin 1s linear infinite;
}

@keyframes ahi-spin {
  to { transform: rotate(360deg); }
}

/* Success state & Hidden rules */
.ahi-modal [hidden],
.ahi-form__error[hidden],
.ahi-modal__success[hidden] {
  display: none !important;
}

.ahi-modal__success {
  text-align: center;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ahi-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sw-accent) 20%, transparent);
  color: var(--sw-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ahi-success__title {
  font-family: var(--sw-font-display);
  font-size: 1.35rem;
  color: var(--sw-ink);
  margin: 0 0 8px 0;
  font-weight: 700;
}

.ahi-success__body {
  font-size: 0.92rem;
  color: var(--sw-ink-soft);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.ahi-success__btn {
  max-width: 200px;
}

