:root {
  --aica-red: #f40b1c;
  --aica-black: #111111;
  --aica-white: #ffffff;
  --aica-grey-dark: #3e3e3e;
  --aica-grey-light: #e6e5e5;
}

body {
  color: var(--aica-black);
  background: var(--aica-white);
  font-family: 'Inter', system-ui, sans-serif;
}

h1, h2, h3, h4 {
  color: var(--aica-black);
}

.page-wrap {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hero-wrap {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.75rem, 4.5vw, 3.85rem);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.why-hero-content .hero-title {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
}

.docs-hero-product {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 650;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .docs-hero-product {
    white-space: normal;
    font-size: clamp(1.15rem, 5vw, 1.45rem);
  }
}

.api-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 1.25rem;
  list-style: none;
  padding: 0;
}

.api-capability {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(244, 11, 28, 0.08);
  color: #1f2937;
  font-size: 0.92rem;
  font-weight: 600;
}

.api-capability i {
  color: var(--aica-red);
}

.hero-content .api-capability {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-content .api-capability i {
  color: #fff;
}

.brand-title {
  color: var(--aica-red);
  font-size: 50px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-link:hover,
.footer-link:hover {
  color: var(--aica-red);
}

.lang-globe {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #444;
  border: 1px solid #ddd;
  border-radius: 9999px;
  padding: 0.35rem 0.65rem;
}

.lang-globe:hover {
  color: var(--aica-red);
  border-color: var(--aica-red);
}

.profile-btn {
  font-size: 1.65rem;
  color: #333;
  line-height: 1;
}

.profile-btn:hover {
  color: var(--aica-red);
}

.btn-aica {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--aica-red);
  color: var(--aica-white);
  border: 1.5px solid var(--aica-red);
  border-radius: 0.5rem;
  padding: 0.55rem 1.1rem;
  min-height: 2.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.15s ease;
}

.btn-aica:hover {
  background: var(--aica-white);
  color: var(--aica-red);
}

.btn-aica-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--aica-white);
  color: var(--aica-red);
  border: 1.5px solid var(--aica-red);
  border-radius: 0.5rem;
  padding: 0.55rem 1.1rem;
  min-height: 2.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-aica-outline:hover {
  background: var(--aica-red);
  border-color: var(--aica-red);
  color: var(--aica-white);
}

.btn-aica-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #e5e7eb;
  color: #111827;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.55rem 1.1rem;
  min-height: 2.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-aica-secondary:hover {
  background: #d1d5db;
  border-color: #9ca3af;
  color: #111827;
}

.btn-aica-outline:disabled,
.btn-aica-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Public pages: keep outline CTAs readable on dark heroes and light sections */
.hero-full .btn-aica-outline,
.hero-content .btn-aica-outline {
  background: var(--aica-white);
  border-color: var(--aica-red);
  color: var(--aica-red);
}

.hero-full .btn-aica-outline:hover,
.hero-content .btn-aica-outline:hover {
  background: var(--aica-red);
  border-color: var(--aica-red);
  color: var(--aica-white);
}

/* Dashboard / API portal — compact uniform controls */
.dashboard-content .btn-aica,
.dashboard-content .btn-aica-outline,
.dashboard-content .btn-aica-secondary,
.dashboard-panel .btn-aica,
.dashboard-panel .btn-aica-outline,
.dashboard-panel .btn-aica-secondary {
  min-height: 2rem;
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  border-radius: 0.45rem;
  border-width: 1px;
  gap: 0.3rem;
  box-sizing: border-box;
}

.dashboard-content .btn-aica.w-full,
.dashboard-content .btn-aica-outline.w-full,
.dashboard-content .btn-aica-secondary.w-full {
  width: 100%;
  height: 2.15rem;
  min-height: 2.15rem;
}

.dashboard-content .dash-key-action-btn,
.dashboard-content .dash-key-icon-btn {
  height: 2rem;
  min-height: 2rem;
}

.dashboard-content .dash-key-icon-btn {
  width: 2rem;
  padding: 0;
}

.dashboard-content .dash-page-link {
  min-height: 2rem;
  height: 2rem;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
}

.dashboard-content .input-aica {
  min-height: 2.15rem;
  font-size: 0.85rem;
  border-radius: 0.45rem;
}

.dashboard-content .dash-install-copy {
  min-height: 2rem;
  height: 2rem;
  padding: 0 0.7rem;
  font-size: 0.75rem;
}

.section-grey { background: var(--aica-grey-light); }
.section-black { background: var(--aica-black); color: var(--aica-white); }
.section-black h2, .section-black h3 { color: var(--aica-white); }

/* Homepage B2B API CTA */
.home-api-cta {
  background:
    linear-gradient(180deg, #f7f7f7 0%, #ffffff 55%, #ffffff 100%);
  border-top: 1px solid var(--aica-grey-light);
  border-bottom: 1px solid var(--aica-grey-light);
  padding: 3.5rem 0;
}

.home-api-cta-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.home-api-cta-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--aica-black);
}

.home-api-cta-desc {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #4b5563;
}

.home-api-cta-features {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.25rem;
}

.home-api-cta-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--aica-black);
  line-height: 1.35;
}

.home-api-cta-features i {
  color: var(--aica-red);
  font-size: 1.05rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.home-api-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 1.75rem;
}

.home-api-cta-actions .btn-aica {
  font-size: 1rem;
  padding: 0.8rem 1.25rem;
}

.home-api-cta-docs {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aica-grey-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.home-api-cta-docs:hover {
  color: var(--aica-red);
}

.home-api-cta-proof {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--aica-grey-light);
  max-width: 28rem;
}

.home-api-cta-proof-count {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--aica-black);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .home-api-cta-proof-count {
    font-size: 2rem;
    line-height: 1.15;
  }
}

.home-api-cta-specs {
  margin-top: 0.85rem;
}

.home-api-cta-specs-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--aica-black);
}

.home-api-cta-specs ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-api-cta-specs li {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.home-api-cta-proof-since {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
}

.home-api-cta-proof-asof {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.home-api-cta-visual {
  min-width: 0;
}

.home-api-mock {
  background: var(--aica-white);
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.9rem;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.08);
  overflow: hidden;
}

.home-api-mock-chrome {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: #f3f3f3;
  border-bottom: 1px solid var(--aica-grey-light);
}

.home-api-mock-chrome span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d1d5db;
}

.home-api-mock-chrome span:first-child { background: #fca5a5; }
.home-api-mock-chrome span:nth-child(2) { background: #fcd34d; }
.home-api-mock-chrome span:nth-child(3) { background: #86efac; }

.home-api-mock-body {
  padding: 1.25rem 1.15rem 1.35rem;
}

.home-api-mock-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.45rem;
}

.home-api-mock-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--aica-grey-light);
  border-radius: 0.55rem;
  background: #fafafa;
  color: #6b7280;
  font-size: 0.95rem;
}

.home-api-mock-input i {
  color: var(--aica-red);
}

.home-api-mock-results {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.55rem;
  overflow: hidden;
}

.home-api-mock-results li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--aica-grey-light);
  background: var(--aica-white);
}

.home-api-mock-results li:last-child {
  border-bottom: none;
}

.home-api-mock-results li.is-active {
  background: rgba(244, 11, 28, 0.06);
}

.home-api-mock-results i {
  color: var(--aica-red);
  margin-top: 0.15rem;
}

.home-api-mock-results strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--aica-black);
  line-height: 1.3;
}

.home-api-mock-results span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: #6b7280;
}

@media (max-width: 900px) {
  .home-api-cta {
    padding: 2.75rem 0;
  }

  .home-api-cta-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-api-cta-features {
    grid-template-columns: 1fr;
  }
}

.hero-full {
  --hero-height: calc(100svh - 72px);
  height: var(--hero-height);
  min-height: var(--hero-height);
  max-height: var(--hero-height);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  background: #000 center/cover no-repeat;
  background-image: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)), url('../images/aica-square-logo-no-words-aica.webp');
}

@supports (height: 100dvh) {
  .hero-full {
    --hero-height: calc(100dvh - 72px);
  }
}

.hero-full .hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  padding-top: clamp(0.75rem, 2.5vh, 2rem);
  padding-bottom: clamp(0.75rem, 2.5vh, 2rem);
}

.hero-content {
  max-width: min(52rem, 62vw);
}

.hero-content .hero-subtitle {
  margin-top: clamp(0.65rem, 1.8vh, 1.25rem);
}

.hero-content .hero-cta-row {
  margin-top: clamp(0.85rem, 2.5vh, 2rem);
}

.hero-stat-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  padding: 0.6rem 0.75rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.hero-stat-count {
  margin: 0.2rem 0 0;
  font-size: clamp(0.95rem, 1.8vw, 1.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-stat-label {
  margin: 0.05rem 0 0;
  font-size: clamp(0.68rem, 1.1vw, 0.85rem);
  font-weight: 600;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-stat-icon {
  display: block;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1;
  color: #fff;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.hero-illustration {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  line-height: 0;
  pointer-events: none;
  max-width: min(58vw, 760px);
  max-height: min(52vh, 520px);
}

.hero-illustration img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
  object-fit: contain;
  object-position: bottom right;
}

.benefits-centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.benefit-card {
  width: 100%;
  max-width: 320px;
}

.img-placeholder {
  border: 2px dashed #ccc;
  background: #fafafa;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: #666;
  border-radius: 0.75rem;
}

.auth-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.auth-hero-full {
  flex: 1;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0.85rem 1rem 1.25rem;
  overflow-y: auto;
}

.auth-hero-center {
  width: 100%;
  max-width: 52rem;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
}

.auth-hero-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.auth-hero-stack .card-auth {
  width: 100%;
  max-width: 28rem;
}

.auth-heading {
  text-align: center;
  margin-bottom: 0;
}

.auth-heading-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--aica-black);
  line-height: 1.15;
}

.auth-heading-subtitle {
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: #555;
  font-weight: 500;
  line-height: 1.25;
}

.auth-tagline-rule {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  margin: 0;
}

.auth-tagline-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-tagline {
  text-align: center;
  font-size: clamp(0.62rem, 1.35vw, 0.82rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.auth-optional-details {
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #fafafa;
}

.auth-optional-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--aica-grey-dark);
  list-style: none;
}

.auth-optional-details summary::-webkit-details-marker {
  display: none;
}

.auth-optional-details summary::after {
  content: ' ▾';
  color: var(--aica-red);
}

.auth-optional-details[open] summary::after {
  content: ' ▴';
}

.auth-optional-fields {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--aica-grey-light);
}

.auth-form-resend {
  margin-top: 0.5rem;
}

.verify-email-watch {
  line-height: 1.45;
}

.verify-email-synced {
  text-align: center;
  padding: 1.25rem 0.5rem 0.5rem;
}

.verify-email-synced-icon {
  font-size: 2.4rem;
  color: #15803d;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.verify-email-synced-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--aica-black);
  margin: 0 0 0.35rem;
}

.verify-email-synced-body {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0;
}

@media (max-width: 640px) {
  .auth-tagline {
    font-size: 0.58rem;
    line-height: 1.25;
    white-space: normal;
  }
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 500;
  max-width: 22rem;
  background: var(--aica-white);
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.85rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  padding: 1.1rem 1.15rem;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--aica-black);
  margin: 0 0 0.4rem;
}

.cookie-banner-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #555;
  margin: 0 0 0.85rem;
}

.cookie-banner-link {
  color: var(--aica-red);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-banner-btn {
  width: 100%;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.card-auth {
  background: var(--aica-white);
  border: 1px solid var(--aica-grey-light);
  border-radius: 1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.auth-card-solid {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.15rem 1.35rem 1rem;
}

.auth-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card-body .input-aica {
  padding: 0.5rem 0.75rem;
}

.auth-card-body label {
  margin-bottom: 0.15rem !important;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.auth-form .btn-aica {
  padding: 0.55rem 1.2rem;
  margin-top: 0.15rem;
}

.two-factor-panels {
  width: 100%;
}

.two-factor-panel {
  border: 1px solid #e8e8e8;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem 0.85rem;
  background: #fafafa;
}

.two-factor-panel-recovery {
  background: #fff8f8;
  border-color: #f5d0d0;
}

.two-factor-panel-label {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}

.two-factor-panel-label-recovery {
  color: var(--aica-red);
}

.two-factor-totp-input {
  font-size: 1.15rem;
  letter-spacing: 0.35em;
}

.two-factor-recovery-input {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  font-family: ui-monospace, monospace;
}

.two-factor-switch-wrap {
  margin: 0.75rem 0 0;
  text-align: center;
}

.two-factor-switch-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--aica-red);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  line-height: 1.4;
}

.two-factor-switch-link:hover {
  color: #c00915;
}

.auth-terms-note {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #666;
  margin: 0;
}

.auth-footer-link {
  margin-top: 0.65rem;
  text-align: center;
  font-size: 0.82rem;
}

.auth-card-body .alert-error,
.auth-card-body .alert-success {
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
}

.input-aica {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
}

.input-aica:focus {
  outline: 2px solid var(--aica-red);
  outline-offset: 1px;
}

#aica-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#aica-loader.active { display: flex; }

.aica-spinner {
  width: 56px;
  height: 56px;
  animation: aica-spin 1s linear infinite;
}

@keyframes aica-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dashboard-sidebar .sidebar-link.active {
  background: var(--aica-red);
  color: white;
}

.dashboard-sidebar .sidebar-link:not(.active):hover {
  background: #f3f4f6;
}

.pricing-card.featured {
  border: 2px solid var(--aica-red);
}

.alert-success { background: #ecfdf5; color: #065f46; padding: 0.75rem 1rem; border-radius: 0.5rem; }

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #bfdbfe;
}

.dash-security-setup-only {
  grid-template-columns: 1fr !important;
  max-width: 36rem;
  margin: 0 auto;
}
.alert-error { background: #fef2f2; color: #991b1b; padding: 0.75rem 1rem; border-radius: 0.5rem; }

.key-display {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  background: #f3f4f6;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.link-red {
  color: var(--aica-red);
  font-weight: 600;
}

.link-red:hover {
  text-decoration: underline;
}

/* Site header */
.header-wrap {
  max-width: 1520px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--aica-white);
  border-bottom: 1px solid var(--aica-grey-light);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.header-logo-link,
.header-brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.35rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.header-brand-link:hover,
.header-brand-link:focus-visible {
  color: inherit;
  text-decoration: none;
}

.header-aica-logo {
  height: 23px;
  width: auto;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.header-product-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--aica-black);
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.header-product-accent {
  color: var(--aica-red);
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.main-nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  padding: 0.35rem 0.5rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.main-nav-link:hover {
  color: var(--aica-red);
}

.main-nav-link.is-active {
  color: var(--aica-red);
  border-bottom-color: var(--aica-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: flex-end;
}

.header-cta {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.5rem;
  background: var(--aica-white);
  color: var(--aica-black);
  font-size: 1.35rem;
  cursor: pointer;
  flex-shrink: 0;
}

.header-menu-toggle:hover {
  border-color: var(--aica-red);
  color: var(--aica-red);
}

.header-mobile-panel {
  display: contents;
}

.profile-menu-wrap {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 190px;
  background: var(--aica-white);
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.65rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 0.35rem 0;
  z-index: 300;
}

.profile-dropdown[hidden] {
  display: none;
}

.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
}

.profile-dropdown a:hover {
  background: #f9fafb;
  color: var(--aica-red);
}

/* Dashboard fixed shell */
.dashboard-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  flex: 1;
  width: 100%;
  max-width: 1520px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 0.5rem 2rem;
}

.dashboard-sidebar {
  position: sticky;
  top: 88px;
  width: 200px;
  flex-shrink: 0;
  align-self: start;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dashboard-sidebar .sidebar-link {
  display: block;
  padding: 0.55rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.dashboard-main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.dashboard-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0;
  flex-shrink: 0;
}

.dashboard-flash {
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.dashboard-panel {
  background: #fafafa;
  border: 1px solid var(--aica-grey-light);
  border-radius: 1rem;
  padding: 1.5rem;
  min-height: 560px;
  flex: 1;
  width: 100%;
}

.dashboard-content {
  min-height: 520px;
  width: 100%;
}

.dash-subcard {
  background: var(--aica-white);
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.dash-subcard-title {
  font-weight: 600;
  font-size: 1rem;
}

.dash-form-narrow {
  max-width: 32rem;
}

.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dash-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.dash-layout-split {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.dash-keys-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-keys-editor {
  min-width: 0;
}

.dash-key-pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-key-pick {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-key-pick:hover {
  border-color: #f40b1c;
}

.dash-key-pick.is-active {
  border-color: #f40b1c;
  box-shadow: 0 0 0 1px #f40b1c;
  background: #fff8f8;
}

.dash-key-pick-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.dash-key-pick-meta {
  font-size: 0.75rem;
  color: #6b7280;
  word-break: break-all;
}

.dash-key-pick-foot {
  font-size: 0.75rem;
  color: #9ca3af;
}

.dash-keys-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dash-key-card {
  width: 100%;
}

.dash-purpose-radios {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-purpose-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.dash-install-details {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
}

.dash-install-summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  list-style: none;
}

.dash-install-summary::-webkit-details-marker {
  display: none;
}

.dash-install {
  margin-top: 0.75rem;
}

.dash-install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.dash-install-tab {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 0.375rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: #374151;
}

.dash-install-tab.is-active {
  border-color: #f40b1c;
  color: #f40b1c;
  font-weight: 600;
}

.dash-install-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.dash-install-code-wrap {
  position: relative;
}

.dash-install-code {
  background: #111827;
  color: #e5e7eb;
  font-size: 0.7rem;
  line-height: 1.45;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
}

.dash-install-code.docs-code-hl .tok-tag { color: #fb923c; }
.dash-install-code.docs-code-hl .tok-attr { color: #5eead4; }
.dash-install-code.docs-code-hl .tok-string { color: #86efac; }
.dash-install-code.docs-code-hl .tok-url { color: #60a5fa; }
.dash-install-code.docs-code-hl .tok-key { color: #f9a8d4; }
.dash-install-code.docs-code-hl .tok-comment { color: #9ca3af; font-style: italic; }
.dash-install-code.docs-code-hl .tok-keyword { color: #c4b5fd; }
.dash-install-code.docs-code-hl .tok-header { color: #38bdf8; }
.dash-install-code.docs-code-hl .tok-var { color: #fde68a; }
.dash-install-code.docs-code-hl .tok-punct { color: #9ca3af; }

.dash-install-copy {
  margin-top: 0.5rem;
}

.usage-preview-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.usage-preview-cell .usage-preview-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-preview-btn {
  flex-shrink: 0;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  line-height: 1.2;
}

.usage-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.usage-preview-modal[hidden] {
  display: none !important;
}

.usage-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}

.usage-preview-panel {
  position: relative;
  z-index: 1;
  width: min(36rem, 100%);
  max-height: min(70vh, 28rem);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
}

.usage-preview-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.usage-preview-body {
  font-size: 0.875rem;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.usage-preview-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.usage-preview-close {
  margin-top: 1rem;
}

body.usage-preview-open {
  overflow: hidden;
}

.dash-key-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-key-secret {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.dash-key-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.dash-key-inline-form {
  display: inline-flex;
  margin: 0;
}

.dash-key-action-btn {
  white-space: nowrap;
}

.dash-key-masked {
  word-break: break-all;
}

.dash-key-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #fff;
  color: #374151;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.dash-key-icon-btn:hover {
  border-color: #f40b1c;
  color: #f40b1c;
}

.dash-key-badges {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.badge-paused { color: #d97706; font-weight: 600; }
.badge-kill { color: #dc2626; font-weight: 600; }

.dash-key-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.domain-rows-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.domain-rows-head {
  display: grid;
  grid-template-columns: 1fr 1fr 2rem;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.03em;
}

.domain-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2rem;
  gap: 0.5rem;
  align-items: center;
}

.domain-row-remove {
  width: 2rem;
  height: 2rem;
  border: 1px solid #ddd;
  border-radius: 0.4rem;
  background: #fff;
  color: #666;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.domain-row-remove:hover {
  color: var(--aica-red);
  border-color: var(--aica-red);
}

.key-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--aica-grey-light);
}

.key-actions-row form {
  margin: 0;
}

.key-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--aica-grey-light);
}

.dash-usage-stats-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 0.5rem 1rem;
  margin-left: auto;
}

.dash-usage-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 5.5rem;
}

.dash-usage-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--aica-red, #f40b1c);
}

.dash-usage-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-top: 0.25rem;
}

.dash-usage-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-mini-keys {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-mini-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fafafa;
  border: 1px solid var(--aica-grey-light);
  border-radius: 0.5rem;
}

.dash-security-grid,
.dash-billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.dash-security-grid .dash-subcard {
  padding-bottom: 1rem;
}

.dash-security-grid .dash-subcard form {
  margin-bottom: 0;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
  min-height: 65px;
}

.turnstile-wrap .cf-turnstile {
  transform-origin: center top;
}

@media (max-width: 480px) {
  .turnstile-wrap .cf-turnstile {
    transform: scale(0.88);
  }
}

.dash-billing-grid .dash-subcard:last-child {
  grid-column: 1 / -1;
}

.billing-manual-address {
  border: 1px solid var(--aica-grey-light, #e5e7eb);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fafafa;
}

.billing-manual-address-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
  list-style: none;
}

.billing-manual-address-summary::-webkit-details-marker {
  display: none;
}

.billing-manual-address-summary::before {
  content: '+ ';
  color: #f40b1c;
  font-weight: 700;
}

.billing-manual-address[open] .billing-manual-address-summary::before {
  content: '− ';
}

.billing-quick-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
}

.billing-quick-links .btn-aica-secondary {
  flex: 1 1 0;
  justify-content: center;
  text-align: center;
  white-space: normal;
  min-height: 2.75rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.25;
}

.aica-kill-banner {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fef2f2 0%, #fff5f5 100%);
  text-align: center;
}

.aica-kill-banner-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.aica-kill-banner-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #991b1b;
  margin: 0;
}

.aica-kill-banner-body {
  margin: 0.5rem 0 0.9rem;
  color: #7f1d1d;
  font-size: 0.95rem;
  line-height: 1.45;
}

.aica-kill-banner-cta {
  display: inline-flex;
}

.aica-usage-chart-wrap {
  position: relative;
  width: 100%;
  height: 260px;
}

.aica-usage-view-toggle {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.aica-usage-view-toggle .btn-aica-secondary.is-active {
  background: #f40b1c;
  border-color: #f40b1c;
  color: #fff;
}

@media (max-width: 900px) {
  .billing-quick-links {
    flex-wrap: wrap;
  }

  .billing-quick-links .btn-aica-secondary {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

@media (max-width: 640px) {
  .billing-quick-links {
    flex-direction: column;
  }

  .billing-quick-links .btn-aica-secondary {
    flex: 1 1 auto;
    width: 100%;
  }
}

.dash-table-wrap {
  overflow-x: auto;
  padding: 0;
}

.dash-table {
  border-collapse: collapse;
}

.dash-table th,
.dash-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--aica-grey-light);
}

.dash-table thead th {
  background: #f3f4f6;
  font-weight: 600;
}

/* API usage logs — compact, fit viewport (no horizontal scrollbar) */
.dash-usage-table-wrap {
  overflow-x: hidden;
  padding: 0.4rem 0.5rem;
}

.dash-usage-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.72rem;
  line-height: 1.3;
}

.dash-usage-table th,
.dash-usage-table td {
  padding: 0.3rem 0.35rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
}

.dash-usage-table thead th {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.35rem;
}

.dash-usage-table th:nth-child(1),
.dash-usage-table td:nth-child(1) { width: 15%; }
.dash-usage-table th:nth-child(2),
.dash-usage-table td:nth-child(2) { width: 18%; }
.dash-usage-table th:nth-child(3),
.dash-usage-table td:nth-child(3) { width: 30%; }
.dash-usage-table th:nth-child(4),
.dash-usage-table td:nth-child(4) { width: 12%; }
.dash-usage-table th:nth-child(5),
.dash-usage-table td:nth-child(5) { width: 17%; }
.dash-usage-table th:nth-child(6),
.dash-usage-table td:nth-child(6) { width: 8%; text-align: center; }

.dash-usage-table .dash-usage-empty {
  white-space: normal;
  padding: 1.25rem 0.5rem;
}

.dash-usage-table .usage-preview-cell {
  max-width: 100%;
}

@media (max-width: 900px) {
  .dash-usage-table {
    font-size: 0.68rem;
  }

  .dash-usage-table th,
  .dash-usage-table td {
    padding: 0.25rem 0.28rem;
  }

  .dash-usage-table th:nth-child(4),
  .dash-usage-table td:nth-child(4) { width: 11%; }
  .dash-usage-table th:nth-child(5),
  .dash-usage-table td:nth-child(5) { width: 14%; }
  .dash-usage-table .usage-preview-btn {
    padding: 0.08rem 0.28rem;
    font-size: 0.6rem;
  }
}

.dash-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dash-page-link {
  padding: 0.35rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid var(--aica-grey-light);
  background: #fff;
  font-size: 0.875rem;
}

.dash-page-link.is-active {
  background: var(--aica-red);
  color: #fff;
  border-color: var(--aica-red);
}

.dash-empty-state {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout {
  margin-top: 0.5rem;
  color: #b91c1c !important;
}

/* Auth */
.auth-security-logo {
  max-width: 90px;
  height: auto;
  object-fit: contain;
}

.auth-card-bottom-logo {
  display: flex;
  justify-content: center;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
}

.security-screen-main {
  align-items: center;
  justify-content: center;
}

.security-screen-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.security-screen-panel {
  text-align: center;
  color: #fff;
  max-width: 22rem;
}

.security-screen-phase {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  min-height: 1.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.security-screen-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aica-spin 0.9s linear infinite;
}

.security-screen-logo {
  width: 132px;
  max-width: 35vw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.35));
}

.recovery-codes-box {
  background: #fff8f8;
  border: 1px solid #fecaca;
  border-radius: 0.65rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.recovery-codes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.recovery-codes-list code {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.login-activity-table-wrap {
  overflow-x: auto;
}

.login-activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.login-activity-table th,
.login-activity-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--aica-grey-light);
  vertical-align: top;
}

.login-activity-table th {
  font-weight: 700;
  color: #444;
  background: #fafafa;
}

@media (max-width: 768px) {
  .hero-stat-badge {
    padding: 0.5rem 0.6rem;
  }

  .hero-stat-count {
    font-size: clamp(0.85rem, 3.8vw, 1.1rem);
  }

  .hero-stat-label {
    font-size: clamp(0.65rem, 2.6vw, 0.78rem);
  }

  .hero-stat-icon {
    font-size: clamp(1.45rem, 7.5vw, 2.1rem);
  }

  .hero-illustration {
    max-width: min(72vw, 360px);
    max-height: min(40vh, 300px);
    opacity: 0.92;
  }

  .hero-illustration img {
    max-height: min(40vh, 300px);
  }

  .hero-content {
    max-width: 100%;
    padding-right: 0.25rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3.8vw, 1.1rem);
    line-height: 1.45;
  }
}

@media (max-height: 820px) {
  .hero-title {
    font-size: clamp(2rem, 4.8vh, 2.85rem);
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 2.2vh, 1.2rem);
    line-height: 1.4;
  }

  .hero-illustration {
    max-width: min(50vw, 620px);
    max-height: min(44vh, 420px);
  }

  .hero-illustration img {
    max-height: min(44vh, 420px);
  }
}

/* Pricing */
.pricing-hero-img {
  max-height: 220px;
  width: 100%;
  max-width: 560px;
  object-fit: cover;
}

.pricing-toggle-wrap {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem auto 2rem;
  padding: 0.35rem;
  background: #f3f4f6;
  border-radius: 9999px;
  width: fit-content;
}

.pricing-toggle-btn {
  border: none;
  background: transparent;
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.35rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.pricing-toggle-btn.is-active {
  background: var(--aica-red);
  color: var(--aica-white);
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.pricing-card-v2 {
  position: relative;
  background: var(--aica-white);
  border: 1px solid var(--aica-grey-light);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.pricing-card-v2.featured {
  border: 2px solid var(--aica-red);
  box-shadow: 0 8px 28px rgba(244, 11, 28, 0.12);
}

.pricing-promo-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 1.85rem;
  padding: 0.42rem 0.7rem;
  border-radius: 0.4rem;
  background: #22c55e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.45);
}

.pricing-promo-badge i {
  font-size: 0.82rem;
}

.pricing-promo-label {
  display: none;
}

@media (min-width: 768px) {
  .pricing-promo-label {
    display: inline;
  }
}

.pricing-popular-badge {
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  background: var(--aica-red);
  color: var(--aica-white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(244, 11, 28, 0.25);
}

.pricing-card-v2.pricing-card-custom {
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
  border-color: #d1d5db;
}

.pricing-card-head h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.pricing-price {
  margin-top: 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--aica-red);
}

.pricing-price span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.pricing-metrics,
.pricing-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-metrics {
  margin-top: 1rem;
  flex: 1;
}

.pricing-metrics li,
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #444;
  margin-bottom: 0.45rem;
}

.pricing-metrics .bi-check2 {
  color: var(--aica-red);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.pricing-features {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #e5e7eb;
}

.pricing-features-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  margin-bottom: 0.5rem;
}

.pricing-trial-banner {
  margin-top: 3rem;
  padding: 1.75rem 2rem;
  border-radius: 1rem;
  background: var(--aica-grey-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.pricing-payg-banner {
  margin-top: 3rem;
  margin-bottom: 0;
  border: 1px solid #ddd;
  background: #f3f3f3;
}

.pricing-payg-banner + .pricing-trial-banner {
  margin-top: 1.25rem;
}

.pricing-payg-points {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.pricing-payg-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #374151;
}

.pricing-payg-points i {
  color: var(--aica-red);
  margin-top: 0.15rem;
}

.pricing-trial-banner h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.pricing-trial-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pricing-trial-note .bi-x-circle {
  color: var(--aica-red);
}

/* Footer */
.site-footer {
  background: var(--aica-white);
  border-top: 1px solid var(--aica-grey-light);
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-heading-split {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  gap: 0.1rem;
}

.footer-aica-logo {
  max-width: 140px;
  height: auto;
}

.footer-seo {
  margin-top: 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #555;
  max-width: 280px;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

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

.footer-links a {
  display: block;
  font-size: 0.875rem;
  color: #555;
  padding: 0.2rem 0;
}

.footer-links a:hover {
  color: var(--aica-red);
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--aica-grey-light);
  font-size: 0.8rem;
  color: #777;
  text-align: center;
}

.footer-copy p {
  margin: 0;
}

.footer-copy-sub {
  margin-top: 0.35rem !important;
}

.page-photo {
  width: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
}

.demo-split-wrap {
  max-width: none;
}

.demo-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 1.25rem;
  text-align: center;
}

.demo-hero-sub {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  line-height: 1.35;
}

.demo-split-hint {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: #f40b1c;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.demo-widget-note {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: #888;
  line-height: 1.4;
}

.demo-embed-host {
  width: 100%;
  margin-top: 0.5rem;
}

.demo-api-secure-tag {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.4;
}

.demo-api-secure-tag i {
  color: #f40b1c;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

#aica-address {
  width: 100%;
  min-height: 52px;
  position: relative;
  z-index: 5;
}

#aica-address.aica-ac .aica-ac-search-btn {
  background: #f40b1c !important;
}

#aica-address.aica-ac .aica-ac-search-btn:hover {
  background: #d40919 !important;
}

#aica-address.aica-ac .aica-ac-input {
  border-color: #d4d4d4;
}

#aica-address.aica-ac .aica-ac-input:focus {
  border-color: #f40b1c !important;
}

#aica-address .aica-ac-panel {
  z-index: 50;
}

.demo-widget-error {
  color: #b91c1c;
  font-size: 0.85rem;
  padding: 0.75rem;
  border: 1px dashed #fecaca;
  border-radius: 8px;
  background: #fff5f5;
}

.demo-split {
  display: grid;
  grid-template-columns: 1fr 3px 1fr;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--aica-grey-light);
  overflow: visible;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  min-height: 320px;
}

.demo-split-divider {
  background: linear-gradient(180deg, #f40b1c 0%, #d40919 100%);
  width: 3px;
  min-height: 100%;
}

.demo-split-col {
  padding: 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.demo-split-left {
  justify-content: flex-start;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.demo-split-right {
  background: #fafafa;
}

.demo-dev-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.demo-dev-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  font-weight: 700;
  background: #f40b1c;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.demo-dev-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.demo-json-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 0;
}

.demo-json-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.65rem;
  background: #f3f4f6;
  font-size: 0.7rem;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.demo-json-copy {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #f40b1c;
  font-size: 0.85rem;
}

.demo-json-output {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.7rem;
  line-height: 1.5;
  background: #111827;
  color: #a5f3b4;
  flex: 1;
  min-height: 200px;
  max-height: 340px;
  overflow: auto;
  white-space: pre;
  word-break: normal;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}

.demo-dev-foot {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #888;
  line-height: 1.4;
}

.demo-dev-link {
  color: #f40b1c;
  font-weight: 600;
  text-decoration: none;
}

.demo-dev-link:hover {
  text-decoration: underline;
}

@media (min-width: 1025px) {
  .main-nav {
    grid-column: 2;
  }

  .header-actions {
    grid-column: 3;
  }

  .header-mobile-extra-link {
    display: none;
  }

  .header-cta-mobile {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .demo-split {
    grid-template-columns: 1fr;
  }
  .demo-split-divider {
    width: 100%;
    height: 3px;
    min-height: 3px;
  }
}

.contact-left-col {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.contact-title {
  text-align: center;
}

.contact-intro-block {
  max-width: 100%;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--aica-grey-light);
}

.contact-intro-fast {
  font-weight: 700;
  color: var(--aica-black);
}

.contact-split {
  display: grid;
  gap: 3rem;
  align-items: stretch;
  margin-top: 0;
}

@media (min-width: 768px) {
  .contact-split {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center;
  }
}

.contact-form-col {
  display: flex;
  flex-direction: column;
}

.contact-submit-wrap {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.contact-photo-wrap {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  max-width: 445px;
  width: 100%;
  margin: 0 auto;
  align-self: center;
}

.contact-photo {
  width: 100%;
  height: auto;
  max-height: 540px;
  min-height: 0;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.contact-icon-stack {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.contact-stack-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--aica-red);
  color: var(--aica-white);
  border: 2px solid var(--aica-red);
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.contact-stack-icon:hover {
  background: var(--aica-white);
  color: var(--aica-red);
  border-color: var(--aica-red);
}

.demo-code-placeholder {
  background: #1e1e1e;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: left;
}

.demo-code-placeholder pre {
  margin: 0;
  color: #d4d4d4;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
}

.qr-wrap {
  display: flex;
  justify-content: center;
}

.profile-btn-link {
  display: inline-flex;
  text-decoration: none;
}

.header-mobile-auth-btn,
.header-cta-mobile {
  display: none;
}

.header-cta-desktop {
  display: inline-flex;
}

.footer-heading-split .footer-accent-red {
  color: var(--aica-red);
}

@media (max-width: 1024px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .header-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
  }

  .header-brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .header-mobile-panel {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 0.5rem;
    border-top: 1px solid var(--aica-grey-light);
  }

  .site-header.is-menu-open .header-mobile-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .header-product-title {
    font-size: 0.85rem;
    white-space: normal;
    line-height: 1.2;
  }

  .header-aica-logo {
    height: 20px;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: visible;
    padding-top: 0;
  }

  .main-nav-link {
    padding: 0.65rem 0.25rem;
    border-bottom: 1px solid #f0f0f0;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    width: 100%;
  }

  .header-mobile-auth-btn,
  .header-cta-mobile {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .header-mobile-auth-btn {
    order: 1;
  }

  .header-cta-mobile {
    order: 2;
  }

  .header-cta-desktop {
    display: none;
  }

  .mobile-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
    width: 100%;
    align-items: start;
  }

  .mobile-nav-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mobile-nav-col .main-nav-link {
    font-size: 0.82rem;
    padding: 0.5rem 0.15rem;
  }

  .footer-copy,
  .footer-copy-sub {
    font-size: 0.7rem;
    line-height: 1.4;
  }

  .lang-globe {
    order: 0;
  }

  .profile-menu-wrap {
    display: none;
  }


  .dashboard-sidebar {
    display: none;
  }

  .dashboard-title-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .dash-usage-stats-bar {
    margin-left: 0;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
  }

  .dashboard-panel {
    padding: 1rem;
    min-height: auto;
  }

  .dashboard-main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .dash-usage-filter .input-aica {
    max-width: 100%;
    width: 100%;
  }

  .key-save-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .dash-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-actions-row .btn-aica,
  .dash-actions-row .btn-aica-outline {
    width: 100%;
    justify-content: center;
  }

  .page-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title {
    font-size: 1.75rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pricing-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-photo-wrap {
    max-width: 100%;
    margin: 0 auto;
  }

  .contact-photo {
    max-height: 430px;
  }

  .contact-icon-stack {
    right: 0.75rem;
    bottom: 0.75rem;
  }

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

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    width: 100%;
  }

  .dashboard-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dash-stat-grid,
  .dash-layout-split,
  .dash-security-grid,
  .dash-billing-grid {
    grid-template-columns: 1fr;
  }
}

/* Subscription welcome success modal */
body.has-aica-welcome-modal {
  overflow: hidden;
}

.aica-welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.aica-welcome-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.aica-welcome-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: var(--aica-white);
  border-radius: 0.85rem;
  border: 1px solid var(--aica-grey-light);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

.aica-welcome-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0.5rem;
  background: #f5f5f5;
  color: var(--aica-black);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aica-welcome-modal-close:hover {
  background: var(--aica-grey-light);
  color: var(--aica-red);
}

.aica-welcome-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--aica-black);
  margin: 0 0 0.75rem;
}

.aica-welcome-modal-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4b5563;
  margin: 0 0 1.5rem;
}

.aica-welcome-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.aica-welcome-modal-actions .btn-aica,
.aica-welcome-modal-actions .btn-aica-secondary {
  justify-content: center;
  width: 100%;
}

/* Asteroids interceptor — first-login / 2FA modal */
body.has-asteroids-interceptor {
  overflow: hidden;
}

.asteroids-interceptor {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.asteroids-interceptor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.asteroids-interceptor-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--aica-white);
  border-radius: 0.85rem;
  border: 1px solid var(--aica-grey-light);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 1.75rem 1.5rem 1.5rem;
}

.asteroids-interceptor-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0.5rem;
  background: #f5f5f5;
  color: var(--aica-black);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.asteroids-interceptor-close:hover {
  background: var(--aica-grey-light);
  color: var(--aica-red);
}

.asteroids-interceptor-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--aica-black);
  padding-right: 2.5rem;
  margin-bottom: 0.5rem;
}

.asteroids-interceptor-body {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.asteroids-interceptor-2fa {
  border-top: 1px solid var(--aica-grey-light);
  padding-top: 1rem;
}

/* Why AICA marketing page */
.why-hero { min-height: 88vh; }
.why-hero-content { max-width: 42rem; }
.why-h2--center {
  text-align: center;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  max-width: 100%;
}
.why-section-head--tight {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  max-width: 100%;
}
.why-page-wrap--build {
  max-width: 1440px;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
.why-section--build { padding-left: 0; padding-right: 0; }
.why-media-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.why-media-col .why-photo {
  max-height: 18rem;
}
.why-nav-divider {
  width: 2px;
  height: 1.15rem;
  background: var(--aica-red);
  flex-shrink: 0;
  border-radius: 1px;
}
.why-sticky-nav-inner {
  justify-content: center;
  gap: 0;
}
.why-sticky-nav a {
  padding: 0.35rem 0.85rem;
}
.why-use-grid--centered { max-width: 56rem; margin-left: auto; margin-right: auto; }
.why-use-icon {
  display: block;
  font-size: 2rem;
  color: var(--aica-red);
  margin-bottom: 0.65rem;
}
.why-pre--manual { border: 1px solid #555; }
.why-pre--good {
  background: #0d2818;
  border: 2px solid #22c55e;
  color: #bbf7d0;
}
.why-code-label--good { color: #16a34a; }
.why-quote--short { color: #16a34a; font-weight: 700; }
.why-video-wrap { position: relative; cursor: pointer; }
.why-video-zoom {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
}
.why-video-zoom:hover { background: var(--aica-red); }
body.why-video-modal-open { overflow: hidden; }
.why-video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.why-video-modal[hidden] { display: none !important; }
.why-video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.why-video-modal-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  background: #111;
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.why-video-modal-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: var(--aica-red);
  color: #fff;
  cursor: pointer;
}
.why-video-modal-player {
  width: 100%;
  max-height: 80vh;
  border-radius: 0.65rem;
  background: #000;
}
.why-json-block { position: relative; }
.why-json-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  cursor: pointer;
}
.why-json-copy:hover,
.why-json-copy.is-copied { background: var(--aica-red); color: #fff; }
.why-json code { font-family: ui-monospace, monospace; }
.why-json .json-key { color: #7dd3fc; }
.why-json .json-string { color: #86efac; }
.why-json .json-number { color: #fcd34d; }
.why-json .json-punct { color: #94a3b8; }
.why-json .json-bool { color: #f472b6; }
.why-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(244, 11, 28, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.why-hero-thumbs {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.65rem;
  padding: 0.5rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.why-hero-thumb {
  width: 4.5rem;
  height: 3.25rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}
.why-hero-thumb:hover,
.why-hero-thumb.is-active {
  opacity: 1;
  border-color: var(--aica-red);
  transform: translateY(-2px);
}
.why-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.why-sticky-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--aica-grey-light);
  backdrop-filter: blur(8px);
}
.why-sticky-nav-inner {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  scrollbar-width: none;
}
.why-sticky-nav-inner::-webkit-scrollbar { display: none; }
.why-sticky-nav a {
  color: var(--aica-grey-dark);
  text-decoration: none;
}
.why-sticky-nav a:hover { color: var(--aica-red); }
/* Phone: normal in-flow nav (not sticky) so it scrolls away with the page */
@media (max-width: 767px) {
  .why-sticky-nav {
    position: static;
    z-index: auto;
    backdrop-filter: none;
  }
  .why-sticky-nav-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow-x: visible;
    white-space: normal;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.9rem;
  }
  .why-sticky-nav-inner .why-nav-divider {
    display: none;
  }
  .why-sticky-nav a {
    display: block;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--aica-grey-light);
    line-height: 1.35;
  }
  .why-sticky-nav a:last-child {
    border-bottom: none;
  }
  .why-sticky-nav a:hover {
    background: #fafafa;
  }
}
.why-section { padding: 3.5rem 0; }
.why-card {
  background: var(--aica-white);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.why-card--flush { box-shadow: none; background: transparent; padding: 0; }
.why-h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.why-h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.why-p {
  color: #444;
  line-height: 1.65;
  margin-bottom: 0.85rem;
}
.why-lead { font-size: 1.05rem; font-weight: 600; color: var(--aica-black); }
.why-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .why-split { grid-template-columns: 1fr 1fr; }
  .why-split--reverse > :first-child { order: 2; }
  .why-split--reverse > :last-child { order: 1; }
}
.why-photo {
  width: 100%;
  border-radius: 1rem;
  object-fit: cover;
  max-height: 28rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}
.why-media-stack { position: relative; }
.why-photo--overlap {
  position: absolute;
  right: -0.5rem;
  bottom: -1.5rem;
  width: 42%;
  max-height: 12rem;
  border: 3px solid var(--aica-white);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.why-video {
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  background: #111;
  max-height: 24rem;
  object-fit: cover;
}
.why-quote {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--aica-red);
  background: #fafafa;
  font-family: ui-monospace, monospace;
  font-size: 0.92rem;
}
.why-quote--short { color: var(--aica-red); font-weight: 700; }
.why-code-compare {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (min-width: 480px) { .why-code-compare { grid-template-columns: 1fr 1fr; } }
.why-code-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 0.35rem;
}
.why-pre {
  background: #1a1a1a;
  color: #f3f3f3;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.why-pre--accent { border: 2px solid var(--aica-red); color: #ffb4b9; }
.why-json {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  padding-top: 2.5rem;
  border-radius: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 22rem;
}
.why-list {
  list-style: disc;
  padding-left: 1.25rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.why-list--grid {
  display: grid;
  gap: 0.25rem 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .why-list--grid { grid-template-columns: 1fr 1fr; } }
.why-use-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .why-use-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-use-grid { grid-template-columns: repeat(3, 1fr); } }
.why-use-grid.why-use-grid--four {
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 900px) {
  .why-use-grid.why-use-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.why-use-grid.why-use-grid--four .why-use-card {
  padding: 0.7rem 0.55rem;
  border-radius: 0.75rem;
}
.why-use-grid.why-use-grid--four .why-use-icon {
  font-size: 1.45rem;
  margin-bottom: 0.4rem;
}
.why-use-grid.why-use-grid--four .why-h3 {
  font-size: 0.92rem;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}
.why-use-grid.why-use-grid--four .why-p {
  font-size: 0.8rem;
  line-height: 1.45;
  margin-bottom: 0;
}
.why-use-card {
  background: var(--aica-white);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  height: 100%;
}
.why-use-img {
  width: 100%;
  height: 8rem;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.why-subcard {
  padding: 1.5rem;
  border-radius: 1rem;
  background: #f8f8f8;
  border: 1px solid var(--aica-grey-light);
}
.why-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.why-cta-row--compact { margin-top: 1rem; }
.why-cta-row--center { justify-content: center; }
.why-table-wrap { overflow-x: auto; }
.why-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.why-table th,
.why-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--aica-grey-light);
  text-align: left;
  vertical-align: top;
}
.why-table th { background: #fafafa; font-weight: 700; }
.why-yes { color: var(--aica-red); font-weight: 700; text-align: center; }
.why-no { color: #999; text-align: center; }
.why-note {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 0.65rem;
  border-left: 4px solid var(--aica-red);
}
.why-final-cta { padding: 4rem 0; }
.why-section-head {
  text-align: center;
  max-width: 100%;
  margin: 0 auto 2rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}
.why-h2.why-h2--center,
.why-section-head .why-h2 {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}
@media (max-width: 767px) {
  .why-hero-thumbs { bottom: 0.75rem; max-width: calc(100% - 1.5rem); }
  .why-hero-thumb { width: 3.5rem; height: 2.5rem; }
  .why-photo--overlap { position: static; width: 55%; margin: -2rem auto 0; display: block; }
  .page-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .why-section { padding: 2.25rem 0; }
  .why-card { padding: 1.15rem; border-radius: 1rem; }
  .why-h2 { font-size: clamp(1.35rem, 6vw, 1.75rem); }
  .why-h3 { font-size: 1.05rem; }
  .why-page-wrap--build {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .why-use-grid.why-use-grid--four {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .why-use-grid.why-use-grid--four .why-use-card {
    padding: 1rem 0.9rem;
  }
  .why-use-grid.why-use-grid--four .why-h3 { font-size: 1rem; }
  .why-use-grid.why-use-grid--four .why-p { font-size: 0.9rem; }
  .why-code-compare { grid-template-columns: 1fr; }
  .why-table { min-width: 28rem; font-size: 0.85rem; }
  .why-json, .why-pre { font-size: 0.75rem; padding: 0.75rem; }
  .why-media-col .why-photo { max-height: 14rem; }
  .why-video { max-height: 16rem; }
  .why-final-cta { padding: 2.5rem 0; }
  .pricing-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .pricing-card-v2 { padding: 1.15rem; }
  .docs-card { padding: 1rem; }
  .docs-body { min-width: 0; }
  .hero-title { font-size: clamp(1.85rem, 8vw, 2.5rem); }
  .hero-subtitle { font-size: clamp(0.95rem, 3.5vw, 1.15rem); }
  .hero-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ===== Try-now page ===== */
.try-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1rem;
}
.try-panel .demo-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  box-shadow: none;
  border: 1px solid #e5e7eb;
  min-height: 0;
  background: #fff;
}
.try-panel .demo-split-divider {
  display: none;
}
.try-panel .demo-split-col {
  padding: 1.15rem 1.35rem;
}
.try-panel .demo-split-right {
  background: #f9fafb;
  border-left: 1px solid #e5e7eb;
}
.try-temp-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #374151;
  max-width: 48rem;
}
.try-key-flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.try-key-flow .btn-aica {
  width: auto;
}
.try-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.85rem;
}
.try-h {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #111;
}
.try-sub,
.try-hint {
  margin: 0;
  font-size: 0.86rem;
  color: #555;
}
.try-hint {
  color: #f40b1c;
  font-weight: 600;
}
.try-warn {
  margin: 0;
  font-size: 0.88rem;
  color: #6b7280;
}
.try-mini-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #374151;
}
.try-error {
  margin: 0.45rem 0 0;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
}
.try-key-panel {
  margin-top: 0.9rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0.7rem;
  padding: 0.8rem;
  max-width: 36rem;
}
.try-key-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.try-key-value {
  display: block;
  word-break: break-all;
  font-size: 0.84rem;
  background: #111;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.65rem 0.8rem;
}
.try-key-meta {
  margin: 0.45rem 0 0;
  font-size: 11px;
  color: #666;
}
.try-icon-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 0.45rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.try-icon-btn:hover { border-color: #f40b1c; color: #f40b1c; }
.try-controls {
  max-width: 100%;
}
.try-sample-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}
.try-sample-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
}
.try-sample-chip:hover {
  border-color: #f40b1c;
  color: #f40b1c;
}
.try-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #222;
}
.try-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  background: #fff;
}
.try-input:focus {
  outline: none;
  border-color: #f40b1c;
  box-shadow: 0 0 0 3px rgba(244,11,28,0.12);
}
.try-url-box {
  margin-top: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  overflow: hidden;
}
.try-url-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.75rem;
  font-weight: 700;
}
.try-url-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.try-open-btn {
  padding: 0.28rem 0.6rem !important;
  font-size: 0.75rem !important;
  width: auto !important;
}
.try-open-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.try-url-value {
  display: block;
  padding: 0.65rem;
  word-break: break-all;
  font-size: 0.74rem;
  color: #111;
  background: #fff;
}
.try-coord-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}
.try-run-btn {
  margin-top: 0.75rem;
  width: auto !important;
}
.try-json-panel {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  height: 100%;
}
.try-json-output,
.demo-split-right .try-json-output,
#demo-json-output.try-json-output,
#try-validate-json.try-json-output,
#try-reverse-json.try-json-output {
  flex: 1;
  min-height: 480px;
  max-height: none;
  height: auto;
  overflow: auto;
}
.try-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  padding: 1.15rem 1.25rem;
}
.try-cta-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #111;
}
.try-cta-body {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #4b5563;
  max-width: 34rem;
}
.try-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.try-cta-actions .btn-aica,
.try-cta-actions .btn-aica-outline {
  width: auto;
}
@media (max-width: 900px) {
  .try-panel .demo-split {
    grid-template-columns: 1fr;
  }
  .try-panel .demo-split-right {
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }
  .try-coord-grid {
    grid-template-columns: 1fr;
  }
  .try-json-panel {
    min-height: 220px;
  }
  .try-json-output,
  #demo-json-output.try-json-output,
  #try-validate-json.try-json-output,
  #try-reverse-json.try-json-output {
    min-height: 200px;
    max-height: min(50vh, 320px);
    overflow: auto;
  }
}

/* Try page: stop horizontal page swipe from cut-off / overflowing panels */
body.try-page {
  overflow-x: clip;
}
body.try-page main,
body.try-page .page-wrap,
body.try-page .try-panel,
body.try-page .demo-split,
body.try-page .demo-split-col,
body.try-page .demo-json-panel,
body.try-page .try-json-panel,
body.try-page .try-controls,
body.try-page .try-url-box,
body.try-page #aica-address,
body.try-page .aica-ac {
  max-width: 100%;
  min-width: 0;
}
body.try-page .try-panel .demo-split {
  width: 100%;
}
body.try-page .try-json-output,
body.try-page .demo-json-output,
body.try-page #demo-json-output,
body.try-page #try-validate-json,
body.try-page #try-reverse-json {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.try-page .try-url-box-head {
  flex-wrap: wrap;
}
body.try-page .try-url-actions {
  flex-wrap: wrap;
}
body.try-page .try-sample-chip {
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}
body.try-page .turnstile-wrap,
body.try-page .cf-turnstile {
  max-width: 100%;
  overflow: hidden;
}
body.try-page .try-key-flow {
  width: 100%;
}
@media (max-width: 640px) {
  body.try-page .page-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  body.try-page .try-panel {
    padding: 0.85rem 0.8rem 1rem;
  }
  body.try-page .try-panel .demo-split-col {
    padding: 0.85rem 0.75rem;
  }
  body.try-page .demo-section-title {
    font-size: 1.35rem;
  }
  body.try-page .try-h {
    font-size: 1.05rem;
  }
  body.try-page .try-cta-bar {
    padding: 1rem;
  }
  body.try-page .try-cta-actions {
    width: 100%;
  }
  body.try-page .try-cta-actions .btn-aica,
  body.try-page .try-cta-actions .btn-aica-outline {
    width: 100%;
    justify-content: center;
  }
}
