.page-ai .site-header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.page-ai main {
  position: relative;
  z-index: 1;
}

.ai-hero {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 1024px) {
  .ai-hero {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
  }
}

.ai-hero-text .plaza-subtitle {
  max-width: 36rem;
}

.ai-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #0d5c4d;
  background: #eef6f3;
  border: 1px solid #d4e6e0;
  border-radius: 0;
}

.ai-privacy-badge i {
  font-size: 0.7rem;
}

.ai-dashboard {
  display: grid;
  gap: 1.75rem;
  margin: 2rem 0 0;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .ai-dashboard {
    grid-template-columns: minmax(0, 280px) 1fr;
    align-items: stretch;
  }
}

.ai-score-panel {
  background: #16130f;
  border-radius: 0;
  padding: 1.75rem 1.5rem;
  color: #f7f1e4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.ai-score-panel::before,
.ai-score-panel::after {
  display: none;
}

.ai-score-ring-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: 1rem;
}

.ai-score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ai-score-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 10;
}

.ai-score-ring-fill {
  fill: none;
  stroke: #fff;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ai-score-num {
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.ai-score-label {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.ai-score-grade {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.95;
}

.ai-score-hint {
  font-size: 0.75rem;
  opacity: 0.8;
  line-height: 1.5;
  max-width: 14rem;
}

.ai-dimensions {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.25rem 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-dimensions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ai-dimensions-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
}

.ai-dimensions-updated {
  font-size: 0.7rem;
  color: #9ca3af;
}

.ai-dim-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.ai-dim-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ai-dim-icon--keywords {
  background: #fef3c7;
  color: #d97706;
}

.ai-dim-icon--layout {
  background: #d1fae5;
  color: #059669;
}

.ai-dim-icon--metrics {
  background: #dbeafe;
  color: #2563eb;
}

.ai-dim-icon--ats {
  background: #e4f0ec;
  color: #0d5c4d;
}

.ai-dim-body {
  min-width: 0;
}

.ai-dim-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}

.ai-dim-bar {
  height: 6px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}

.ai-dim-bar-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-dim-bar-fill--warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.ai-dim-bar-fill--good {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.ai-dim-bar-fill--info {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.ai-dim-bar-fill--brand {
  background: linear-gradient(90deg, #0d5c4d, #3d9a84);
}

.ai-dim-pct {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #111827;
  min-width: 2.5rem;
  text-align: right;
}

.ai-section-head {
  padding: 2.15rem 0 1.15rem;
}

.ai-section-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c4783a;
}

.ai-section-title {
  margin: 0;
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 600;
  color: #16130f;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.ai-report {
  border-top: 1px solid #e6dfd2;
}

.ai-insights {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid #e6dfd2;
  border-bottom: 1px solid #e6dfd2;
}

@media (min-width: 768px) {
  .ai-insights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ai-insight {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1.35rem 0 1.4rem;
  border-bottom: 1px solid #efe8d9;
}

@media (min-width: 768px) {
  .ai-insight {
    padding: 1.35rem 1.25rem 1.4rem 0;
    border-bottom: 0;
  }

  .ai-insight + .ai-insight {
    padding-left: 1.25rem;
    border-left: 1px solid #e6dfd2;
  }
}

.ai-insight-no {
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c4783a;
  padding-top: 0.15rem;
}

.ai-insight-status {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f675c;
}

.ai-insight--warn .ai-insight-status {
  color: #c4783a;
}

.ai-insight--good .ai-insight-status {
  color: #0d5c4d;
}

.ai-insight--info .ai-insight-status {
  color: #6f675c;
}

.ai-insight-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #16130f;
  line-height: 1.4;
}

.ai-insight-text {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #6f675c;
  line-height: 1.7;
}

.ai-keywords {
  padding: 1.75rem 0 0.35rem;
  border-top: 1px solid #efe8d9;
}

.ai-keywords-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.35rem;
}

.ai-keywords-title {
  margin: 0;
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #16130f;
  letter-spacing: -0.02em;
}

.ai-keywords-desc {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #6f675c;
  line-height: 1.65;
  max-width: 36rem;
}

.ai-keywords-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fffdf8;
  background: #0d5c4d;
  padding: 0.55rem 1rem;
  border-radius: 0;
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.ai-keywords-btn:hover {
  background: #0a4a3e;
}

.ai-keywords-btn:disabled {
  background: #eef6f3;
  color: #0d5c4d;
  cursor: default;
}

.ai-keywords-groups {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 640px) {
  .ai-keywords-groups {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .ai-keywords-groups > div {
    padding-right: 2rem;
  }

  .ai-keywords-groups > div + div {
    padding-left: 2rem;
    border-left: 1px solid #e6dfd2;
  }
}

.ai-kw-group-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f675c;
  margin-bottom: 0.7rem;
}

.ai-kw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ai-kw-chip {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.32rem 0.8rem;
  border-radius: 0;
  border: 1px solid #d8d0c0;
  background: transparent;
  color: #2a241c;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.ai-kw-chip--missing {
  color: #c4783a;
  border-color: #e2c4a4;
  background: transparent;
}

.ai-kw-chip--found,
.ai-kw-chip.is-filled {
  color: #0d5c4d;
  background: #eef6f3;
  border-color: #d4e6e0;
}

.ai-kw-chip.is-filled {
  animation: ai-chip-pop 0.35s ease;
}

@keyframes ai-chip-pop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.ai-next {
  margin-top: 1.25rem;
  border-top: 1px solid #e6dfd2;
}

.ai-actions {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid #e6dfd2;
}

@media (min-width: 768px) {
  .ai-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.ai-action-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 1.65rem;
  border-bottom: 1px solid #efe8d9;
  background: transparent;
}

@media (min-width: 768px) {
  .ai-action-card {
    padding: 1.5rem 2rem 1.75rem 0;
    border-bottom: 0;
  }

  .ai-action-card + .ai-action-card {
    padding-left: 2rem;
    border-left: 1px solid #e6dfd2;
  }
}

.ai-action-no {
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c4783a;
}

.ai-action-title {
  margin: 0.55rem 0 0;
  font-family: 'Fraunces', 'Noto Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #16130f;
  letter-spacing: -0.02em;
}

.ai-action-desc {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #6f675c;
  line-height: 1.7;
  flex: 1;
}

.ai-action-btn {
  margin-top: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.55rem 1.05rem;
  border-radius: 0;
  border: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  align-self: flex-start;
}

.ai-action-btn--primary {
  color: #fffdf8;
  background: #0d5c4d;
}

.ai-action-btn--primary:hover {
  background: #0a4a3e;
}

.ai-action-btn--ghost {
  color: #2a241c;
  background: #fffdf8;
  border: 1px solid #d8d0c0;
}

.ai-action-btn--ghost:hover {
  border-color: #0d5c4d;
  color: #0d5c4d;
  background: #eef6f3;
}

.ai-action-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.ai-action-btn.is-loading i {
  animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-intro-output {
  margin-top: 1.1rem;
  padding: 1.1rem 4.5rem 1.1rem 1rem;
  background: #fffdf8;
  border: 1px solid #e6dfd2;
  position: relative;
}

.ai-intro-output.is-visible {
  animation: ai-fade-in 0.35s ease;
}

@keyframes ai-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-intro-text {
  margin: 0;
  font-size: 0.85rem;
  color: #2a241c;
  line-height: 1.75;
}

.ai-intro-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #0d5c4d;
  background: transparent;
  border: 1px solid #d4e6e0;
  padding: 0.25rem 0.55rem;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ai-intro-copy:hover {
  background: #eef6f3;
}

.ai-intro-copy.is-copied {
  color: #0d5c4d;
  border-color: #0d5c4d;
  background: #eef6f3;
}

.ai-bottom-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-start;
  padding: 1.75rem 0 0.5rem;
  margin-top: 0.25rem;
  border-top: 1px solid #e6dfd2;
}

.ai-bottom-cta a {
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 0;
}

.ai-bottom-cta .btn-primary,
.ai-bottom-cta .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
