/* AIBotRadar overhaul layer — 2026-11-21.
   Loads after style.css, directory.css, and news.css. Goals: readable type sizes,
   honest homepage tiles (no placeholder art), category chips, Guides hub, and a useful footer. */

:root {
  --ov-ink: #1f2337;
  --ov-body: #4a5068;
  --ov-muted: #6f7489;
  --ov-line: #e6e8f0;
  --ov-accent: #5b4bd6;
  --ov-accent-soft: #f1efff;
  --ov-card: #fff;
  --ov-radius: 14px;
}

body.ai-hub { font-size: 15px; color: var(--ov-ink); -webkit-font-smoothing: antialiased; }

/* ---------- Top bar ---------- */
.top-navigation { gap: 4px; }
.top-link { font-size: 14px; font-weight: 600; color: #3b4057; padding: 8px 12px; border-radius: 9px; }
.top-link:hover { background: #f4f3fb; color: var(--ov-accent); }
.top-link.is-current { color: var(--ov-accent); background: var(--ov-accent-soft); }
.top-link.is-current::after { display: none; }
.tiny-chevron { display: none; }

/* ---------- Sidebar ---------- */
.sidebar-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-all-link { margin: 0 0 6px; font-weight: 700; }
.category-link { font-size: 13.5px; }

/* ---------- Homepage hero ---------- */
@media (min-width: 951px) {
  body.home .hero { padding: 28px 20px 22px; }
  body.home .hero-brand { margin-top: 6px; }
  body.home .hero h1 { margin: 10px 0 6px; font-size: 34px; line-height: 1.15; letter-spacing: -.8px; }
  body.home .hero-subtitle { font-size: 16px; margin: 0 0 16px; }
}
.hero-subtitle { color: var(--ov-muted); }
.search-tab { font-size: 13px; }
.hero-search input { font-size: 15px; }
.quick-searches { font-size: 13px; }
.quick-searches a { font-size: 13px; }

/* Portal tiles: compact, no fake wireframe art. */
.portal-grid { gap: 14px; margin: 8px 0 26px; }
body.home .portal-card,
.portal-card {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--ov-radius);
}
body.home .portal-card::after { content: none; display: none; }
body.home .portal-card > span:nth-child(2) { grid-column: auto; grid-row: auto; }
body.home .portal-arrow, .portal-arrow { position: static; display: block; color: #8d91a6; font-size: 16px; }
.portal-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
.portal-card strong { font-size: 15px; padding-right: 0; }
.portal-card small { font-size: 13px; margin-top: 4px; white-space: normal; }

/* ---------- Section headings ---------- */
.section-heading h2, .category-section-heading h2 { font-size: 22px; letter-spacing: -.4px; color: var(--ov-ink); }
.section-heading p, .category-section-heading p { font-size: 14px; color: var(--ov-muted); max-width: 760px; }
.view-more { font-size: 13.5px; font-weight: 600; color: var(--ov-accent); white-space: nowrap; }
.section-pill { display: none; }

/* ---------- Tool cards ---------- */
.tool-card { min-height: 84px; padding: 14px; border-radius: 12px; border-color: var(--ov-line); }
.tool-card:hover { border-color: #d6d2fb; box-shadow: 0 6px 18px rgba(40,36,90,.07); }
.tool-icon {
  width: 46px; height: 46px; border-radius: 12px;
  object-fit: contain; background: #f6f7fb; padding: 4px; box-sizing: border-box;
  border: 1px solid #eef0f5;
}
.tool-card-main { gap: 12px; }
.tool-card-copy strong { font-size: 14.5px; line-height: 1.3; color: var(--ov-ink); }
.tool-card-copy small { font-size: 13px; line-height: 1.45; color: var(--ov-muted); margin-top: 3px; }
.tool-card-arrow { width: 28px; height: 28px; font-size: 13px; }

/* ---------- Category chips (homepage index + all-tools page) ---------- */
.category-index { margin: 10px 0 30px; }
.category-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.category-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--ov-line); border-radius: 999px;
  background: #fff; color: #3b4057; font-size: 13.5px; font-weight: 600;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.category-chip b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #f2f3f8; color: var(--ov-muted); font-size: 12px; font-weight: 700; text-align: center; }
.category-chip:hover { border-color: #c9c2fa; color: var(--ov-accent); background: #faf9ff; }
.category-chip:hover b { background: var(--ov-accent-soft); color: var(--ov-accent); }

.category-preview { margin-top: 34px; }
.category-title-icon { width: 38px; height: 38px; font-size: 17px; }

/* ---------- All tools archive ---------- */
.listing-heading { padding: 34px 6px 18px; }
.listing-heading h1 { font-size: 34px; letter-spacing: -.8px; }
.listing-heading p { font-size: 16px; color: var(--ov-muted); }
.listing-heading .hero-badge { display: none; }
.listing-chips { justify-content: center; margin: 0 auto 18px; max-width: 1100px; }
.listing-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0 0 12px; font-size: 13.5px; color: var(--ov-muted); }
.listing-toolbar a { padding: 5px 11px; border-radius: 8px; color: #3b4057; font-weight: 600; }
.listing-toolbar a.is-current { background: var(--ov-accent-soft); color: var(--ov-accent); }
.pagination { font-size: 14px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--ov-line); border-radius: 9px; background: #fff; }
.pagination .page-numbers.current { background: var(--ov-accent); border-color: var(--ov-accent); color: #fff; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* ---------- Tool detail ---------- */
.detail-heading h1 { font-size: 34px; letter-spacing: -.8px; }
.detail-heading p { font-size: 16px; line-height: 1.55; color: var(--ov-body); }
.detail-icon { object-fit: contain; background: #f6f7fb; padding: 6px; box-sizing: border-box; }
.detail-panel h2 { font-size: 21px; }
.detail-prose { font-size: 15.5px; line-height: 1.75; color: var(--ov-body); }
.detail-prose h3 { margin: 22px 0 8px; font-size: 17px; color: var(--ov-ink); }
.detail-prose ul { padding-left: 20px; }
.detail-prose li { margin: 5px 0; }
.detail-prose strong { color: var(--ov-ink); }
.popular-tools-note { font-size: 13px; }
.detail-sidebar-card h2 { font-size: 18px; }

/* ---------- Static pages ---------- */
.static-page-card .hero-badge { display: none; }
.static-page-content { font-size: 16px; line-height: 1.75; color: var(--ov-body); max-width: 760px; }

/* ---------- Guides hub ---------- */
.guides-hub .guide-archive-hero { text-align: left; }
.guides-hub .guide-archive-hero h1 { font-size: 34px; letter-spacing: -.8px; }
.guides-hub .guide-archive-hero p { font-size: 16px; color: var(--ov-muted); max-width: 680px; }
.guides-search { display: flex; gap: 8px; max-width: 520px; margin: 16px 0 6px; }
.guides-search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--ov-line); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; }
.guides-search button { height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--ov-accent); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.guides-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.guides-jump a { display: inline-flex; gap: 7px; align-items: center; padding: 7px 12px; border: 1px solid var(--ov-line); border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 600; color: #3b4057; }
.guides-jump b { color: var(--ov-muted); font-size: 12px; }
.guides-group { margin-top: 34px; }
.guides-group .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ---------- Footer ---------- */
.site-footer-rich { text-align: left; padding: 40px 27px 28px; }
.site-footer-rich .footer-top { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 1100px; margin: 0 auto 26px; }
.site-footer-rich .footer-brand { justify-content: flex-start; font-size: 17px; }
.site-footer-rich .footer-about p { margin: 10px 0 0; max-width: 380px; font-size: 14px; line-height: 1.6; color: var(--ov-muted); }
.site-footer-rich .footer-col { display: flex; flex-direction: column; gap: 9px; }
.site-footer-rich .footer-col strong { font-size: 13px; color: var(--ov-ink); }
.site-footer-rich .footer-col a { font-size: 14px; color: var(--ov-muted); }
.site-footer-rich .footer-col a:hover { color: var(--ov-accent); }
.site-footer-rich > small { display: block; max-width: 1100px; margin: 0 auto; padding-top: 18px; border-top: 1px solid var(--ov-line); font-size: 12.5px; color: #8a8ea2; text-align: left; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 950px) {
  .top-navigation { overflow-x: auto; scrollbar-width: none; }
  .top-link { padding: 7px 9px; font-size: 13.5px; white-space: nowrap; }
}
@media (max-width: 700px) {
  .portal-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .portal-card, body.home .portal-card { padding: 13px; gap: 10px; }
  .portal-icon { width: 36px; height: 36px; font-size: 17px; }
  .portal-card strong { font-size: 14px; }
  .portal-card small { font-size: 12px; }
  .portal-arrow, body.home .portal-arrow { display: none; }
  .tool-card { min-height: 72px; padding: 11px; }
  .tool-icon { width: 40px; height: 40px; border-radius: 10px; }
  .tool-card-copy strong { font-size: 14px; }
  .tool-card-copy small { font-size: 12.5px; }
  .section-heading h2, .category-section-heading h2 { font-size: 19px; }
  .listing-heading h1, .guides-hub .guide-archive-hero h1 { font-size: 27px; }
  .detail-heading h1 { font-size: 26px; }
  .detail-heading p { font-size: 15px; }
  .detail-prose { font-size: 15px; }
  .listing-chips { justify-content: flex-start; }
  .site-footer-rich { padding: 30px 16px 24px; }
  .site-footer-rich .footer-top { grid-template-columns: 1fr 1fr; }
  .site-footer-rich .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .tool-card-copy small { -webkit-line-clamp: 2; }
  .category-chip { font-size: 13px; padding: 7px 10px; }
}

/* Homepage grids: four readable columns instead of six or seven truncated ones. */
body.home .tool-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1250px) { body.home .tool-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 950px) { body.home .tool-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } }
@media (max-width: 520px) { body.home .tool-card-grid, .tool-card-grid { grid-template-columns: 1fr; } }

/* Mobile homepage: keep each section short; "See all" links lead to the full lists. */
@media (max-width: 700px) {
  body.home .category-preview .tool-card-grid > :nth-child(n+5),
  body.home #hot-tools .tool-card-grid > :nth-child(n+7),
  body.home #latest-added .tool-card-grid > :nth-child(n+5) { display: none; }
  body.home .category-preview { margin-top: 26px; }
  .category-section-heading p { display: none; }
}

/* Guides hub: three-up grid with consistent 16:9 thumbnails. */
.guides-hub .guide-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guides-hub .guide-card-thumbnail { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
@media (max-width: 1100px) { .guides-hub .guide-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .guides-hub .guide-card-grid { grid-template-columns: 1fr; } }

/* Tool hero actions stack cleanly on phones. */
@media (max-width: 700px) {
  .detail-hero-actions { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
  .detail-hero-actions .detail-visit, .detail-hero-actions .detail-compare-link { width: 100%; justify-content: center; margin: 0; box-sizing: border-box; }
}

/* Category buying guide below the grid. */
.category-guide { max-width: 860px; margin: 34px 0 10px; padding: 24px 26px; border: 1px solid var(--ov-line); border-radius: var(--ov-radius); background: #fff; }
.category-guide h2 { margin: 0 0 10px; font-size: 20px; color: var(--ov-ink); letter-spacing: -.3px; }
.category-guide p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.7; color: var(--ov-body); }
.category-guide ul { margin: 0; padding-left: 20px; }
.category-guide li { margin: 6px 0; font-size: 15px; line-height: 1.6; color: var(--ov-body); }
@media (max-width: 700px) { .category-guide { padding: 18px; } }

/* Search page */
.listing-search { margin: 16px auto 0; }
.search-empty { max-width: 760px; margin: 10px auto 30px; padding: 26px; border: 1px solid var(--ov-line); border-radius: var(--ov-radius); background: #fff; text-align: center; }
.search-empty h2 { margin: 0 0 6px; font-size: 20px; }
.search-empty p { margin: 0 0 14px; color: var(--ov-muted); font-size: 15px; }
.search-empty .category-chip-grid { justify-content: center; }

/* Category pages: curated placements and the remaining tools form one continuous grid. */
.category-merged-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.category-merged-grid > .tool-card-grid { display: contents; }
.category-merged-grid > p { grid-column: 1 / -1; }
@media (max-width: 1250px) { .category-merged-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 950px) { .category-merged-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } }
@media (max-width: 520px) { .category-merged-grid { grid-template-columns: 1fr; } }

/* Video-companion guides (2026-11-22) */
.guide-article>.guide-body,.guide-body{min-width:0}
.guide-body pre{max-width:100%;overflow-x:auto;margin:18px 0;padding:14px 16px;border-radius:12px;background:#151a2b;color:#eef0f8;font-size:.86rem;line-height:1.6}
.guide-body pre code{background:none;padding:0;color:inherit;font-size:inherit;white-space:pre}
.guide-body :not(pre)>code{padding:1px 6px;border-radius:6px;background:#f1f0fb;color:#3b2f8f;font-size:.88em}
.guide-body .guide-deck{font-size:1.08rem;color:#4b5168;line-height:1.65}
.guide-body .guide-source{margin:18px 0 26px;padding:14px 18px;border:1px solid #e4e2f6;border-radius:14px;background:#faf9ff}
.guide-body .guide-source-label{margin:0 0 6px;font-size:.78rem;font-weight:700;letter-spacing:.04em;color:#6b5fd6}
.guide-body .guide-source ul{margin:0 0 6px;padding-left:18px}
.guide-body .guide-source p:last-child{margin:0;font-size:.86rem;color:#737a92}
.guide-body figure.guide-figure img{border-radius:12px;height:auto}
.guide-body figure.guide-figure figcaption{margin-top:8px;color:#737d98;font-size:.86rem;text-align:center}

/* Credit line at the end of video-companion guides (2026-11-24) */
.guide-body .guide-credit{margin:6px 0;color:#8a8fa0;font-size:12.5px;line-height:1.6}
