﻿/* ── Tool hero ── */
.tool-hero {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, #F8F8FF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border);
}

.tool-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.tool-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #18181B 0%, #3F3F46 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tool-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tool-hero .lead {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 780px;
  line-height: 1.75;
}

/* ── Scan form panel ── */
.scan-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 2.5rem auto 1.5rem;
  box-shadow: var(--shadow);
}

.scan-form-main {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.scan-form-main .form-input {
  flex: 1;
  font-size: 1rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-lg);
  border-width: 1.5px;
}

.scan-form-main .btn-primary {
  padding: 0.8rem 1.75rem;
  font-size: 0.9rem;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
}

.scan-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.scan-options-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin-bottom: 0.75rem;
  transition: color 0.15s;
}
.scan-options-toggle:hover { color: var(--accent); }
.scan-options-toggle svg { transition: transform 0.2s; }
.scan-options-toggle.open svg { transform: rotate(90deg); }

/* ── Progress / status bar ── */
.scan-status-bar {
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
}

.scan-status-bar.visible { display: flex; }

.scan-status-bar .progress-bar { flex: 1; }

.scan-counter {
  white-space: nowrap;
  color: var(--text-3);
  font-size: 0.75rem;
}

/* ── Filter tabs ── */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-tab {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-xs);
}

.filter-tab:hover {
  border-color: var(--border-2);
  color: var(--text);
  background: var(--surface-2);
}

.filter-tab.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-border);
}

.filter-tab .count {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0 5px;
  font-size: 0.66rem;
}

.filter-tab.active .count {
  background: rgba(99,102,241,0.12);
  color: var(--accent);
}

/* ── Results area ── */
.results-section { display: none; }
.results-section.visible { display: block; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
  margin-bottom: 1.5rem;
}

.results-actions { display: flex; gap: 0.5rem; }

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.data-table .status-code { font-weight: 600; }

.status-2xx  { color: #047857; }
.status-3xx  { color: #7C3AED; }
.status-4xx  { color: #b91c1c; }
.status-5xx  { color: #b45309; }
.status-err  { color: #b91c1c; }
.status-skip { color: var(--text-3); font-style: italic; }

.response-time { color: var(--text-3); }
.response-time.slow { color: #B45309; font-weight: 600; }

.anchor-text {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 2px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.anchor-generic {
  color: #b45309;
  font-style: normal;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-3);
}

.empty-state svg { margin: 0 auto 1rem; opacity: 0.25; color: var(--text-3); }
.empty-state p { font-family: var(--font-mono); font-size: 0.8rem; }

/* ── Content sections below tool ── */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.content-body h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.content-body h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.content-body p {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.content-body ul, .content-body ol {
  color: var(--text-2);
  padding-left: 1.5rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

.content-body li { margin-bottom: 0.4rem; }

.content-body code {
  background: var(--accent-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.85em;
}

.sidebar .card + .card { margin-top: 1rem; }

.sidebar .card p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 0.5rem;
}

/* ── Author bio ── */
.author-bio {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 3rem;
  box-shadow: var(--shadow-sm);
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 2px solid var(--accent-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 800;
}

.author-info .author-name {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.author-info .author-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── How it works steps ── */
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.how-step {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
}

.how-step:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.how-step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-3);             /* was --border-2 (#D1D1D6, 1.5:1) → --text-3 (5.6:1) for WCAG AA large-text */
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
}

.how-step h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.how-step p {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Tips list ── */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.tip-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.tip-icon {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  height: fit-content;
  font-weight: 600;
}

.tip-item p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.tip-item strong { color: var(--text); }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.875rem 0;
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-3);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pagination-ellipsis {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-3);
  padding: 0 0.25rem;
}

.page-num { min-width: 2rem; justify-content: center; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .scan-form-main { flex-direction: column; }
}

@media (max-width: 768px) {
  .results-header { flex-direction: column; align-items: stretch; }
  .results-actions { justify-content: flex-end; }
  /* Right-edge fade hints that the table scrolls horizontally */
  .table-wrapper {
    box-shadow: var(--shadow-sm), inset -24px 0 12px -8px rgba(0,0,0,0.04);
  }
}

@media (max-width: 640px) {
  .scan-panel { padding: 1.25rem; border-radius: var(--radius-lg); }
  .tool-hero { padding: 1.75rem 0 1.25rem; }
  .tool-hero .lead { font-size: 0.95rem; }
  .tool-hero-tag { font-size: 0.75rem; }
  .cdn-bypass-inputs { grid-template-columns: 1fr !important; }
  .recent-grid { grid-template-columns: 1fr !important; }
  #scan-config > div { gap: 0.75rem !important; }
  .pagination { justify-content: center; }
  .pagination-info { width: 100%; text-align: center; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stat-card { padding: 0.75rem; }
  /* Ensure Advanced options toggle meets 44px tap target */
  .scan-options-toggle { min-height: 44px; padding: 0.5rem 0.25rem; }

  /* Table card layout */
  .table-wrapper { border-radius: var(--radius); }
  .data-table { display: block; }
  .data-table thead { display: none; }
  .data-table tbody { display: block; }
  .data-table tr {
    display: block;
    border-bottom: 2px solid var(--border);
    padding: 0.25rem 0;
  }
  .data-table tr:last-child { border-bottom: none; }
  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
  }
  .data-table td:last-child { border-bottom: none; }
  .data-table td::before {
    content: attr(data-label);
    font-size: 0.62rem;
    font-family: var(--font-mono);
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 68px;
    padding-top: 2px;
  }
  .data-table .url-cell { max-width: 100%; }
  .data-table .url-cell a { word-break: break-all; }
  .data-table td:empty::before { display: none; }
  .data-table td[data-label="Type"],
  .data-table td[data-label="Noindex"] { display: none; }
}
