.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.25rem;
  margin-bottom: 1.5rem;
}

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

.ai-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  color: #d7e4ff;
  background: rgba(142, 182, 255, 0.12);
  border: 1px solid rgba(142, 182, 255, 0.24);
  border-radius: 9999px;
}

.ai-dashboard {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

@media (min-width: 980px) {
  .ai-dashboard {
    grid-template-columns: 19rem minmax(0, 1fr);
  }
}

.ai-score-panel {
  background:
    linear-gradient(180deg, rgba(142, 182, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.4rem;
  padding: 1.4rem;
  color: #f2f5fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(24px);
}

.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.12);
  stroke-width: 10;
}

.ai-score-ring-fill {
  fill: none;
  stroke: #8eb6ff;
  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;
}

.ai-score-num {
  font-family: 'Instrument Serif', 'Noto Serif SC', serif;
  font-size: 2.6rem;
  font-weight: 400;
}

.ai-score-label,
.ai-score-grade,
.ai-score-hint {
  font-size: 0.75rem;
  color: #8b93a3;
}

.ai-score-grade {
  font-size: 0.875rem;
  font-weight: 650;
  color: #f2f5fb;
}

.ai-dimensions {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.3rem;
  padding: 1.2rem 1.3rem;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

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

.ai-dimensions-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.ai-dimensions-updated {
  font-size: 0.7rem;
  color: #8b93a3;
}

.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.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(142, 182, 255, 0.14);
  color: #d7e4ff;
}

.ai-dim-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c5ccd8;
  margin-bottom: 0.3rem;
}

.ai-dim-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  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,
.ai-dim-bar-fill--good,
.ai-dim-bar-fill--info,
.ai-dim-bar-fill--brand {
  background: linear-gradient(90deg, #6a96f0, #8eb6ff);
}

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

.ai-insights {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.35rem;
}

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

.ai-insight-card {
  background: rgba(255, 255, 255, 0.055);
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.15rem;
  backdrop-filter: blur(16px);
}

.ai-insight-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ai-insight-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(142, 182, 255, 0.16);
  color: #d7e4ff;
  font-size: 0.72rem;
}

.ai-insight-title {
  font-size: 0.875rem;
  font-weight: 700;
}

.ai-insight-text {
  font-size: 0.8rem;
  color: #8b93a3;
  line-height: 1.65;
  margin: 0;
}

.ai-insight-action {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: #081018;
  background: linear-gradient(180deg, #c9dbff, #8eb6ff);
  border: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.ai-keywords-section,
.ai-action-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.3rem;
  padding: 1.35rem;
  backdrop-filter: blur(18px);
}

.ai-keywords-section {
  margin-bottom: 1.35rem;
}

.ai-keywords-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.ai-keywords-title,
.ai-action-title {
  font-family: 'Instrument Serif', 'Noto Serif SC', serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.ai-keywords-desc,
.ai-action-desc {
  font-size: 0.8rem;
  color: #8b93a3;
  margin-top: 0.25rem;
  line-height: 1.6;
}

.ai-keywords-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: #081018;
  background: linear-gradient(180deg, #c9dbff, #8eb6ff);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}

.ai-keywords-groups {
  display: grid;
  gap: 1rem;
}

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

.ai-kw-group-label {
  font-size: 0.68rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b93a3;
  margin-bottom: 0.5rem;
}

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

.ai-kw-chip {
  font-size: 0.75rem;
  padding: 0.32rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.ai-kw-chip--missing {
  color: #d7e4ff;
  background: rgba(142, 182, 255, 0.08);
  border-color: rgba(142, 182, 255, 0.22);
}

.ai-kw-chip--found,
.ai-kw-chip.is-filled {
  color: #081018;
  background: linear-gradient(180deg, #c9dbff, #8eb6ff);
}

.ai-actions {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

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

.ai-action-card {
  display: flex;
  flex-direction: column;
}

.ai-action-card--highlight {
  background:
    linear-gradient(160deg, rgba(142, 182, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.ai-action-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
  background: rgba(142, 182, 255, 0.16);
  color: #d7e4ff;
}

.ai-action-btn {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 650;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  align-self: flex-start;
}

.ai-action-btn--primary,
.ai-action-btn--secondary {
  color: #081018;
  background: linear-gradient(180deg, #c9dbff, #8eb6ff);
}

.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: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  position: relative;
}

.ai-intro-text {
  font-size: 0.8125rem;
  color: #c5ccd8;
  line-height: 1.75;
  margin: 0;
}

.ai-intro-copy {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.7rem;
  font-weight: 650;
  color: #d7e4ff;
  background: rgba(8, 16, 24, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.ai-intro-copy.is-copied {
  color: #081018;
  background: #8eb6ff;
}

.ai-bottom-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  padding-top: 0.4rem;
}

.ai-bottom-cta a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0.7rem 1.35rem;
}

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

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