/* PAGE HERO */
.ct-hero {
  padding: 9rem 2rem 4rem;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.ct-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.ct-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.ct-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.ct-hero-sub {
  font-size: 1.05rem;
  color: var(--ink3);
  max-width: 560px;
  margin: 0 auto 0.75rem;
  line-height: 1.7;
}

.ct-how {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.ct-how-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
}

.ct-how-step svg {
  width: 11px;
  height: 11px;
  stroke: var(--blue-mid);
}

.ct-how-arrow {
  color: var(--border2);
  font-size: 0.9rem;
}

/* SEARCH SECTION */
.ct-search-section {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}

.ct-search-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.ct-input-row {
  display: flex;
  gap: 0.75rem;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.ct-input-row:focus-within {
  border-color: var(--ink);
}

.ct-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.6rem 0.75rem;
}

.ct-input::placeholder {
  color: var(--muted);
}

.ct-search-btn {
  background: var(--blue-dark);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 0.7rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.ct-search-btn:hover:not(:disabled) {
  background: var(--blue-deepest);
}

.ct-search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* RATE LIMIT INFO */
.ct-rate-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ct-rate-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

/* LOADING */
.ct-loading {
  display: none;
  text-align: center;
  padding: 3rem 0;
}

.ct-loading.active {
  display: block;
}

.ct-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue-dark);
  border-radius: 50%;
  animation: ctSpin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes ctSpin {
  to { transform: rotate(360deg); }
}

.ct-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  margin-top: 1.25rem;
}

.ct-loading-step {
  color: var(--muted);
  transition: color 0.3s;
}

.ct-loading-step.active {
  color: var(--ink);
}

.ct-loading-step.done {
  color: var(--accent2);
}

.ct-loading-step.done::before {
  content: '\2713  ';
}

/* ERROR */
.ct-error {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: #991b1b;
}

.ct-error.active {
  display: flex;
}

/* RESULTS SECTION */
.ct-results-section {
  display: none;
  padding: 3rem 2rem 3rem;
  background: var(--bg);
}

.ct-results-section.active {
  display: block;
}

.ct-results-wrap {
  max-width: 800px;
  margin: 0 auto;
}

/* RESULTS HEADER */
.ct-results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.ct-results-domain {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.ct-results-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ct-results-meta-dot {
  width: 4px;
  height: 4px;
  background: var(--border2);
  border-radius: 50%;
}

/* SUMMARY CARDS */
.ct-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ct-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.ct-summary-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--ink);
}

.ct-summary-num.green  { color: #16a34a; }
.ct-summary-num.red    { color: #dc2626; }
.ct-summary-num.yellow { color: #d97706; }
.ct-summary-num.orange { color: #ea580c; }

.ct-summary-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* ROBOTS BADGE */
.ct-robots-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.ct-robots-badge.found {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.ct-robots-badge.not-found {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* RESULTS TABLE */
.ct-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ct-table {
  width: 100%;
  border-collapse: collapse;
}

.ct-table thead th {
  background: var(--surface2);
  padding: 0.85rem 1.1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-align: left;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.ct-table tbody td {
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.ct-table tbody tr:last-child td {
  border-bottom: none;
}

.ct-table tbody tr {
  transition: background 0.12s;
}

.ct-table tbody tr:hover {
  background: var(--bg2);
}

.ct-bot-name {
  font-weight: 600;
  color: var(--ink);
  display: block;
}

.ct-bot-org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

/* STATUS PILLS */
.ct-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
}

.ct-pill.allowed {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.ct-pill.blocked {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.ct-pill.no-robots {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

/* VERDICT BADGES */
.ct-verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
}

.ct-verdict.allowed {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.ct-verdict.blocked_robots {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.ct-verdict.blocked_firewall {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}

.ct-verdict.blocked_both {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* LEGEND */
.ct-legend {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ct-legend h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.ct-legend-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.ct-legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink3);
}

/* ACTIONS BAR */
.ct-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.ct-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ct-action-btn:hover {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.ct-action-btn.copied {
  border-color: var(--blue-mid);
  color: var(--blue-mid);
}

.ct-action-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

/* NEW TEST PROMPT */
.ct-new-test {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.ct-new-test p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.ct-new-test-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ct-new-test-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* WHY TEST SECTION */
/* Uses existing .why-grid, .why-card etc from style.css */

/* FAQ SECTION */
.ct-faq-section {
  padding: 4rem 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.ct-faq-wrap {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.ct-faq-wrap .section-title {
  margin-bottom: 2.5rem;
}

.ct-faq-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ct-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ct-faq-item.open {
  border-color: var(--blue-mid);
  box-shadow: var(--shadow);
}

.ct-faq-question {
  display: block;
  width: 100%;
  padding: 1.1rem 3rem 1.1rem 1.4rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.98rem;
  color: var(--ink);
  font-weight: 500;
  background: none;
  border: none;
  text-align: left;
  position: relative;
  user-select: none;
  line-height: 1.5;
  transition: background 0.15s;
}

.ct-faq-question:hover {
  background: var(--surface2);
}

.ct-faq-question::after {
  content: "+";
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  color: var(--blue-dark);
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s;
}

.ct-faq-item.open .ct-faq-question::after {
  content: "\2212";
}

/* Hide the inline SVG chevron since we use ::after now */
.ct-faq-chevron {
  display: none;
}

.ct-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ct-faq-item.open .ct-faq-answer {
  max-height: 300px;
}

.ct-faq-answer-inner {
  padding: 0 1.4rem 1.2rem;
  color: var(--ink3);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* EXPORT OVERLAY (off-screen for PNG) */
#ctExportWrap {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 860px;
  background: #ffffff;
  padding: 28px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ct-export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ct-export-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
}

.ct-export-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--blue-dark);
  font-weight: 600;
}

.ct-export-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: right;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .ct-hero { padding: 7rem 1.25rem 3rem; }
  .ct-search-section { padding: 2rem 1.25rem; }
  .ct-results-section { padding: 2rem 1.25rem 2rem; }
  .ct-faq-section { padding: 3rem 1.5rem; }
  .ct-faq-question {
    font-size: 0.92rem;
    padding: 1rem 2.5rem 1rem 1.1rem;
  }

  .ct-faq-question::after {
    right: 1.1rem;
  }

  .ct-faq-answer-inner {
    padding: 0 1.1rem 1rem;
    font-size: 0.88rem;
  }
  .ct-input-row { flex-direction: column; }
  .ct-search-btn { width: 100%; }
  .ct-summary-bar { grid-template-columns: repeat(2, 1fr); }
  .ct-results-header { flex-direction: column; }
  .ct-actions-bar { flex-direction: column; }
  .ct-action-btn { width: 100%; justify-content: center; }
  .ct-legend-items { grid-template-columns: 1fr; }
  .ct-how { gap: 0.35rem; }

  .ct-table thead th,
  .ct-table tbody td {
    padding: 0.65rem 0.6rem;
    font-size: 0.78rem;
  }
  .ct-verdict { font-size: 0.62rem; padding: 0.15rem 0.5rem; }
  .ct-pill { font-size: 0.62rem; padding: 0.1rem 0.45rem; }
}

@media (max-width: 480px) {
  .ct-summary-bar { grid-template-columns: 1fr 1fr; }
  .ct-table thead th:nth-child(2),
  .ct-table tbody td:nth-child(2) {
    display: none;
  }
}
