/* ── AI Readiness Checker ───────────────────────────────────────────────── */

/* Results section */
.aic-results {
  margin-top: 1.5rem;
}

/* Score header */
.aic-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.aic-score-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

/* Grade circle */
.aic-grade {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--surface);
  border: 3px solid var(--border);
  color: var(--text);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.aic-grade--A { background: rgba(34, 197, 94, 0.15); border-color: #22c55e; color: #22c55e; }
.aic-grade--B { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; color: #3b82f6; }
.aic-grade--C { background: rgba(234, 179, 8, 0.15); border-color: #eab308; color: #eab308; }
.aic-grade--D { background: rgba(249, 115, 22, 0.15); border-color: #f97316; color: #f97316; }
.aic-grade--F { background: rgba(239, 68, 68, 0.15); border-color: var(--danger); color: var(--danger); }

.aic-score-info {
  min-width: 160px;
}

.aic-domain {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  word-break: break-all;
}

.aic-score-line {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.aic-score-bar-wrap {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  width: 160px;
}

.aic-score-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  width: 0;
  transition: width 0.6s ease;
}

.aic-summary {
  flex: 1;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  padding-top: 0.25rem;
}

/* Check list */
.aic-checks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.aic-check {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.aic-check-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  background: var(--surface);
  transition: background 0.15s;
  user-select: none;
}

.aic-check-head:hover {
  background: var(--bg);
}

.aic-check--pass .aic-check-head {
  border-left: 3px solid #22c55e;
}

.aic-check--partial .aic-check-head {
  border-left: 3px solid #eab308;
}

.aic-check--fail .aic-check-head {
  border-left: 3px solid var(--danger);
}

.aic-check-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.aic-check-label {
  flex: 1;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
}

.aic-check-detail {
  font-size: 0.82rem;
  color: var(--muted);
}

.aic-check-pts {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.aic-check-pts-val {
  font-weight: 600;
}

.aic-check-pts-val--full { color: #22c55e; }
.aic-check-pts-val--partial { color: #eab308; }
.aic-check-pts-val--zero { color: var(--danger); }

.aic-check-toggle {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.aic-check[aria-expanded="true"] .aic-check-toggle {
  transform: rotate(180deg);
}

/* Expandable body */
.aic-check-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: none;
}

.aic-check[aria-expanded="true"] .aic-check-body,
details.aic-check[open] .aic-check-body {
  display: block;
}

/* <details>/<summary> resets for result page */
details.aic-check > summary {
  list-style: none;
  cursor: pointer;
}
details.aic-check > summary::-webkit-details-marker { display: none; }
details.aic-check > summary::marker { display: none; }

.aic-how-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.aic-code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.875rem 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e6edf3;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

.aic-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.aic-copy-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.aic-check-pass-note {
  font-size: 0.87rem;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Footer */
.aic-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aic-cached-badge {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* About section */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.info-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.info-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.info-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.info-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 600px) {
  .aic-header {
    flex-direction: column;
    gap: 1rem;
  }

  .aic-score-wrap {
    width: 100%;
  }

  .aic-score-bar-wrap {
    width: 100%;
    max-width: 200px;
  }

  .aic-check-head {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .aic-check-detail {
    width: 100%;
    order: 3;
  }
}

/* Form layout */
.robots-form .form-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.robots-form .form-row .input-wrap--domain { flex: 1; }
@media (max-width: 600px) {
  .robots-form .form-row { flex-direction: column; }
  .robots-form .form-row .btn-primary { width: 100%; justify-content: center; }
}

/* Bing index badge */
.aic-bing-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Bing index block */
.aic-bing-block { margin-top: 8px; }
.aic-bing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.aic-bing-left { display: flex; align-items: center; gap: 12px; }
.aic-bing-icon { font-size: 20px; flex-shrink: 0; }
.aic-bing-title { font-size: 13px; font-weight: 600; color: var(--text); }
.aic-bing-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.aic-bing-right { text-align: right; flex-shrink: 0; }
.aic-bing-count {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.aic-bing-count--zero { color: var(--muted); }
.aic-bing-count-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.aic-bing-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(89,168,255,.3);
  border-radius: 6px;
  transition: background 0.15s;
}
.aic-bing-link:hover { background: rgba(89,168,255,.08); }
@media (max-width: 480px) {
  .aic-bing-card { flex-direction: column; align-items: flex-start; }
  .aic-bing-right { text-align: left; }
}
