/* ==========================================================================
   NC Solution — AI Agent Security Readiness Check (ai-check.html)
   --------------------------------------------------------------------------
   Loaded after style.css and uses its design tokens. Mobile-first, rem sizes.

   Contents
     1. Page tokens
     2. Intro
     3. Questions
     4. Result
     5. Share & report
     6. Motion
     7. Arabic (RTL)
     8. Larger screens
   ========================================================================== */


/* 1. Page tokens
   ========================================================================== */

.ac-page {
  --ac-red: #d63b3b;
  --ac-amber: #e0960f;
  --ac-green: #15985a;
  --ac-track: #e3ebf5;
  --ac-tier: var(--blue);
  background: var(--pale);
}

.ac-narrow {
  width: min(46rem, 92%);
}

.ac-card {
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px #0b2b5812;
}

.ac-card h2 {
  margin: 0.25rem 0 0.75rem;
  color: var(--navy);
  font-size: 1.375rem;
  line-height: 1.3;
}

.ac-card p {
  color: var(--muted);
}


/* 2. Intro
   ========================================================================== */

.ac-intro {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 3.5rem;
  background:
    radial-gradient(circle at 85% 20%, #1677ff55, transparent 45%),
    linear-gradient(120deg, #071b35, #0d3b77);
  color: #fff;
}

.ac-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.ac-intro h1 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2.125rem, 7vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03rem;
}

.ac-lead {
  max-width: 36rem;
  margin: 0 0 1.5rem;
  color: #d3e0f1;
  font-size: 1.0625rem;
}

.ac-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.ac-perks li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border: 1px solid #ffffff2e;
  border-radius: 999px;
  background: #ffffff14;
  font-size: 0.875rem;
  font-weight: 600;
}

.ac-perk-icon {
  font-size: 0.9375rem;
}

.ac-start {
  padding: 1rem 1.75rem;
  border: 0;
  font-family: inherit;
  font-size: 1.0625rem;
  cursor: pointer;
}

.ac-start:hover,
.ac-start:focus-visible {
  background: var(--bright);
}

.ac-count {
  margin: 1rem 0 0;
  color: #b9cdea;
  font-size: 0.875rem;
}

.ac-count b {
  color: #fff;
}

/* Decorative result preview on the right of the intro (hidden on phones). */
.ac-preview {
  display: none;
}

.ac-preview-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem;
  border: 1px solid #ffffff26;
  border-radius: 22px;
  background: #ffffff12;
  box-shadow: 0 30px 60px #00000040;
  transform: rotate(-2deg);
}

.ac-preview-lines {
  display: grid;
  flex: 1;
  gap: 0.75rem;
}

.ac-preview-lines b {
  font-size: 0.9375rem;
}

.ac-bar {
  display: block;
  height: 0.5rem;
  border-radius: 999px;
  background: #ffffff21;
}

.ac-bar i {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: inherit;
  background: #6fb2ff;
}

.ac-bar-2 i {
  width: 52%;
  background: #ffc35a;
}

.ac-bar-3 i {
  width: 30%;
  background: #ff8080;
}


/* 3. Questions
   ========================================================================== */

.ac-quiz {
  padding: 2rem 0 3.5rem;
}

.ac-progress {
  height: 0.375rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ac-track);
}

.ac-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--bright));
  transition: width 0.35s ease;
}

.ac-stepcount {
  margin: 0.625rem 0 1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.ac-question {
  outline: none;
}

.ac-card .ac-question {
  margin-bottom: 0.5rem;
  font-size: 1.3125rem;
}

.ac-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
}

.ac-body {
  margin-top: 1.25rem;
}

.ac-options {
  display: grid;
  gap: 0.625rem;
}

/* One answer: a large, easy-to-tap button with a round or square marker. */
.ac-option {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.9375rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ac-option:hover {
  border-color: #9cc2f5;
}

.ac-option:focus-visible,
.ac-chip:focus-visible,
.ac-back:focus-visible,
.ac-share .btn:focus-visible {
  outline: 3px solid #1677ff66;
  outline-offset: 2px;
}

.ac-option:active {
  transform: scale(0.99);
}

.ac-mark {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border: 2px solid #b6c6da;
  border-radius: 50%;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.ac-multi .ac-mark {
  border-radius: 6px;
}

.ac-option[aria-pressed="true"] {
  border-color: var(--blue);
  background: #eef5ff;
}

.ac-option[aria-pressed="true"] .ac-mark {
  border-color: var(--blue);
  background: var(--blue);
}

.ac-option[aria-pressed="true"] .ac-mark::after {
  content: "✓";
}

.ac-option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Profile screen: three groups of small chips. */
.ac-group + .ac-group {
  margin-top: 1.375rem;
}

.ac-group h3 {
  margin: 0 0 0.625rem;
  color: var(--navy);
  font-size: 0.9375rem;
}

.ac-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ac-chip {
  padding: 0.5625rem 0.9375rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.ac-chip:hover {
  border-color: #9cc2f5;
}

.ac-chip[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.ac-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ac-nav .btn {
  border: 0;
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.ac-nav .btn:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.4;
}

.ac-back {
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.ac-back:hover {
  color: var(--blue);
}

.ac-back[hidden] + .btn {
  margin-inline-start: auto;
}


/* 4. Result
   ========================================================================== */

.ac-result {
  padding: 2rem 0 3.5rem;
}

.ac-result[data-tier="exposed"] {
  --ac-tier: var(--ac-red);
}

.ac-result[data-tier="developing"] {
  --ac-tier: var(--ac-amber);
}

.ac-result[data-tier="controlled"] {
  --ac-tier: var(--ac-green);
}

.ac-score-card {
  border-top: 5px solid var(--ac-tier);
}

.ac-score-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1rem;
  text-align: center;
}

/* Score ring: the filled share comes from --p (0–100), set by ai-check.js. */
.ac-ring {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 9.5rem;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--ac-tier) calc(var(--p) * 1%), var(--ac-track) 0);
}

.ac-ring::before {
  position: absolute;
  inset: 0.75rem;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.ac-ring span,
.ac-ring small {
  position: relative;
}

.ac-ring span {
  color: var(--navy);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
}

.ac-ring small {
  position: absolute;
  bottom: 2.1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.ac-ring-demo {
  --p: 62;
  --ac-tier: #6fb2ff;
  --ac-track: #ffffff21;
  flex: none;
  width: 7rem;
  height: 7rem;
}

.ac-ring-demo::before {
  inset: 0.5625rem;
  background: #0b2b58;
}

.ac-ring-demo span {
  color: #fff;
  font-size: 2rem;
}

.ac-card .ac-tier {
  margin: 0 0 0.375rem;
  color: var(--ac-tier);
  font-size: 1.75rem;
  outline: none;
}

.ac-exposure {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
}

.ac-exposure b {
  color: var(--navy);
}

.ac-benchmark {
  margin: 1.25rem 0 0;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  background: var(--pale);
  font-size: 0.9375rem;
  text-align: center;
}

.ac-card .ac-benchmark {
  color: var(--ink);
}

.ac-benchmark b {
  color: var(--blue);
}

.ac-recs {
  display: grid;
  gap: 0.875rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rec;
}

.ac-recs li {
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--pale);
  counter-increment: rec;
}

.ac-recs li::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  content: counter(rec);
}

.ac-recs b {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--navy);
}

.ac-recs span {
  color: var(--muted);
}


/* 5. Share & report
   ========================================================================== */

.ac-share-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  margin-top: 1rem;
}

.ac-share .btn {
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.ac-btn-wa {
  background: #1fa855;
  color: #fff;
}

.ac-btn-li {
  background: #0a66c2;
  color: #fff;
}

.ac-btn-ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.ac-btn-ghost:hover {
  border-color: var(--blue);
}

.ac-note {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.ac-card .ac-note {
  color: var(--ac-green);
}

.ac-card .ac-note.is-error {
  color: var(--ac-red);
}

.ac-report {
  background: linear-gradient(180deg, #fff, #f3f8ff);
}

.ac-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin: 1.25rem 0 1rem;
}

.ac-fields label {
  display: grid;
  gap: 0.375rem;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
}

.ac-fields input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
}

.ac-fields input:focus {
  border-color: var(--blue);
  outline: none;
}

/* Hidden field that only bots fill in. */
.ac-hp {
  position: absolute;
  left: -9999px;
}

.ac-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.5;
}

.ac-check input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  accent-color: var(--blue);
}

.ac-lead-form .btn {
  margin-top: 0.5rem;
  border: 0;
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.ac-lead-form .btn:disabled {
  cursor: progress;
  opacity: 0.6;
}

.ac-card .ac-privacy {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

.ac-cta {
  margin-bottom: 1.25rem;
}

.ac-retake {
  text-align: center;
}


/* 6. Motion
   ========================================================================== */

.ac-enter {
  animation: ac-in 0.35s ease both;
}

@keyframes ac-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-enter {
    animation: none;
  }

  .ac-progress span,
  .ac-option {
    transition: none;
  }
}


/* 7. Arabic (RTL)
   ========================================================================== */

[dir="rtl"] .ac-intro h1,
[dir="rtl"] .ac-card h2 {
  font-family: "Tajawal", sans-serif;
  line-height: 1.4;
  letter-spacing: 0;
}

[dir="rtl"] .ac-intro h1 {
  font-size: clamp(2rem, 6.5vw, 3.125rem);
}

[dir="rtl"] .ac-lead {
  line-height: 1.9;
}

[dir="rtl"] .ac-progress span {
  background: linear-gradient(270deg, var(--blue), var(--bright));
}

[dir="rtl"] .ac-recs li {
  padding: 1rem 3.5rem 1rem 1rem;
}

[dir="rtl"] .ac-recs li::before {
  right: 1rem;
  left: auto;
}

[dir="rtl"] .ac-hp {
  right: -9999px;
  left: auto;
}

[dir="rtl"] .ac-preview-card {
  transform: rotate(2deg);
}


/* 8. Larger screens
   ========================================================================== */

@media (min-width: 33.8125em) {
  .ac-card {
    padding: 2rem;
  }

  .ac-share-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .ac-fields {
    grid-template-columns: 1fr 1fr;
  }

  .ac-fields label:first-child {
    grid-column: 1 / -1;
  }

  .ac-score-row {
    grid-template-columns: auto 1fr;
    gap: 2rem;
    text-align: start;
  }

  .ac-ring {
    margin: 0;
  }
}

@media (min-width: 47.5625em) {
  .ac-cta {
    flex-direction: row;
    align-items: center;
  }

  .ac-card .ac-question {
    font-size: 1.5rem;
  }
}

@media (min-width: 56.3125em) {
  .ac-intro {
    padding: 5rem 0 5.5rem;
  }

  .ac-intro-grid {
    grid-template-columns: 1.35fr 1fr;
  }

  .ac-preview {
    display: block;
  }
}
