/* AI section: hub and topic pages. Loaded after the shared site stylesheets. */
:root {
  --ai-ink: #0a1838;
  --ai-muted: rgba(10, 24, 56, .74);
  --ai-cobalt: #0d47c9;
  --ai-line: #dbe4f2;
  --ai-paper: #ffffff;
  --ai-tint: #eef3fb;
  --ai-used: #0f6b4a;
  --ai-built: #0d47c9;
  --ai-prog: #8a5a00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ai-ink: #0a1838;
  }
}

body.ai-page { color: var(--ai-ink); }
.ai-page .wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Hero */
.ai-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 5vw, 56px);
  background:
    radial-gradient(50% 70% at 0% 0%, rgba(13, 71, 201, .14), transparent 62%),
    radial-gradient(40% 60% at 100% 10%, rgba(56, 208, 255, .14), transparent 60%);
  border-bottom: 1px solid var(--ai-line);
}
.ai-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -.02em;
  max-width: 22ch;
  margin: 0 0 18px;
}
.ai-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ai-cobalt);
}
.ai-lead {
  max-width: 62ch;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--ai-muted);
  margin: 0;
}

/* Main and sections */
.ai-main { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.ai-section { margin: 0 0 clamp(36px, 5vw, 56px); }
.ai-section h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}
.ai-section h3 { font-size: 18px; margin: 0 0 8px; }
.ai-section p { font-size: 17px; line-height: 1.6; margin: 0 0 12px; max-width: 68ch; }

/* Two paths on the hub */
.ai-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.ai-path {
  background: var(--ai-paper);
  border: 1px solid var(--ai-line);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 8px 24px -12px rgba(10, 24, 56, .18);
}
.ai-path h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.15; margin: 0 0 12px; }
.ai-path p { font-size: 16px; line-height: 1.6; color: var(--ai-muted); margin: 0 0 14px; }
.ai-path-alt { background: var(--ai-tint); }
.ai-path-actions { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-top: 20px; }

/* Lists */
.ai-list { margin: 0 0 14px; padding-left: 20px; font-size: 16px; line-height: 1.6; max-width: 68ch; }
.ai-list li { margin: 0 0 6px; }
.ai-steps { padding-left: 24px; }

/* Topic cards on hub */
.ai-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}
.ai-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--ai-paper);
  border: 1px solid var(--ai-line);
  border-radius: 16px;
  color: var(--ai-ink);
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.ai-card:hover { transform: translateY(-3px); border-color: rgba(13, 71, 201, .3); box-shadow: 0 18px 36px -20px rgba(13, 71, 201, .35); }
.ai-card h3 { font-size: 19px; margin: 0; }
.ai-card p { font-size: 15px; line-height: 1.5; margin: 0; color: var(--ai-muted); }

/* Rows: each item is marked Used, Built or In progress */
.ai-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ai-rows li {
  padding: 18px 20px;
  background: var(--ai-paper);
  border: 1px solid var(--ai-line);
  border-radius: 14px;
}
.ai-rows p { font-size: 15px; line-height: 1.55; margin: 8px 0 0; color: var(--ai-muted); max-width: 70ch; }
.ai-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-row-head strong { font-size: 17px; }
.ai-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  line-height: 1.3;
}
.ai-tag-used { background: var(--ai-used); }
.ai-tag-built { background: var(--ai-built); }
.ai-tag-prog { background: var(--ai-prog); }
.ai-tag-incident { background: #7a1f1f; }

/* Notice */
.ai-notice {
  margin: 0;
  padding: 16px 18px;
  border-left: 4px solid var(--ai-cobalt);
  background: var(--ai-tint);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 70ch;
}

/* Two columns (partner page) */
.ai-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.ai-two > div { background: var(--ai-paper); border: 1px solid var(--ai-line); border-radius: 16px; padding: 22px; }

/* FAQ */
.faq details {
  background: var(--ai-paper);
  border: 1px solid var(--ai-line);
  border-radius: 14px;
  margin: 0 0 10px;
  padding: 0 20px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 17px;
  list-style-position: outside;
}
.faq details p { padding: 0 0 18px; font-size: 16px; margin: 0; color: var(--ai-muted); }

/* Buttons and links */
.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ai-ink);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s;
}
.ai-btn:hover { transform: translateY(-1px); background: var(--ai-cobalt); }
.ai-btn:disabled { opacity: .6; cursor: default; transform: none; }
.ai-btn-ghost { background: transparent; color: var(--ai-ink); border: 1.5px solid var(--ai-ink); }
.ai-btn-ghost:hover { background: var(--ai-ink); color: #fff; }
.ai-link { color: var(--ai-cobalt); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Closing band */
.ai-closing {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 22px;
  background: linear-gradient(135deg, #061a4d, #0d47c9);
  color: #fff;
}
.ai-closing h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.ai-closing p { color: rgba(255, 255, 255, .85); margin: 0; font-size: 16px; max-width: 52ch; }
.ai-closing-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ai-closing .ai-btn { background: #fff; color: var(--ai-ink); }
.ai-closing .ai-btn:hover { background: var(--ai-tint); color: var(--ai-ink); }
.ai-closing .ai-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.ai-closing .ai-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Partner form */
.ai-form { display: grid; gap: 14px; max-width: 720px; }
.ai-form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.ai-form input, .ai-form textarea {
  font: inherit;
  font-weight: 400;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #b9c7e0;
  border-radius: 10px;
  background: #fff;
  color: var(--ai-ink);
  width: 100%;
  box-sizing: border-box;
}
.ai-form textarea { resize: vertical; min-height: 140px; }
.ai-form-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.ai-status { min-height: 1.5em; font-weight: 700; color: var(--ai-ink); }

/* Phones */
@media (max-width: 640px) {
  .ai-page .wrap { width: calc(100% - 32px); }
  .ai-path-actions .ai-btn { width: 100%; }
  .ai-closing-actions .ai-btn { width: 100%; }
}
