/* ==========================================================================
   Takin Cyber — Owner Guides Stylesheet
   File: public/css/guides.css (Strictly <= 520 lines, High-Contrast & Responsive)
   ========================================================================== */

:root {
  --v3-text-primary: #0f172a;
  --v3-text-secondary: #475569;
  --v3-surface: #ffffff;
  --v3-border: #cbd5e1;
  --v3-bg: #f8fafc;
  --v3-accent: #047857;
  --v3-accent-light: #ecfdf5;
  --v3-link: #0369a1;
}

html[data-theme="dark"] {
  --v3-text-primary: #f8fafc;
  --v3-text-secondary: #cbd5e1;
  --v3-surface: #0f172a;
  --v3-border: rgba(148, 163, 184, 0.28);
  --v3-bg: #070b14;
  --v3-accent: #34d399;
  --v3-accent-light: rgba(16, 185, 129, 0.16);
  --v3-link: #38bdf8;
}

.guides-body { overflow-x: clip; }
.guides-main { padding-top: 108px; padding-bottom: 64px; }
.guides-hero { text-align: center; max-width: 860px; margin: 0 auto 32px; }
.guides-hero-title {
  font-family: Rubik, sans-serif;
  font-size: clamp(1.85rem, 3.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 12px 0;
  color: var(--v3-text-primary, #0f172a);
}
.guides-hero-sub {
  font-size: 1.05rem;
  color: var(--v3-text-secondary, #475569);
  line-height: 1.65;
  margin-bottom: 20px;
}

.guide-breadcrumb {
  font-size: 0.88rem;
  color: var(--v3-text-secondary, #475569);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-breadcrumb a { color: var(--v3-link, #0369a1); text-decoration: none; font-weight: 600; }
.guide-breadcrumb a:hover { text-decoration: underline; }

.sec20-legal-banner {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--v3-border, #cbd5e1);
  border-right: 4px solid #0284c7;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--v3-text-primary, #0f172a);
  text-align: start;
  margin-bottom: 24px;
  line-height: 1.55;
}
html[dir="ltr"] .sec20-legal-banner { border-right: 1px solid var(--v3-border, #cbd5e1); border-left: 4px solid #0284c7; }
html[data-theme="dark"] .sec20-legal-banner {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
  border-right-color: #38bdf8;
  color: #f8fafc;
}
html[dir="ltr"][data-theme="dark"] .sec20-legal-banner { border-left-color: #38bdf8; }

.guides-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 28px;
}

.guide-filter-btn {
  padding: 8px 14px;
  min-height: 44px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--v3-border, #cbd5e1);
  background: var(--v3-surface, #ffffff);
  color: var(--v3-text-primary, #0f172a);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.guide-filter-btn:hover { border-color: #0284c7; transform: translateY(-1px); }
.guide-filter-btn.active { background: #0f172a; color: #ffffff; border-color: #0f172a; }
html[data-theme="dark"] .guide-filter-btn { background: #0f172a; color: #e2e8f0; border-color: rgba(148, 163, 184, 0.28); }
html[data-theme="dark"] .guide-filter-btn.active { background: #10b981; color: #02130c; border-color: #10b981; font-weight: 800; }

.guides-list { display: flex; flex-direction: column; gap: 24px; max-width: 960px; margin: 0 auto; }
.guide-card {
  background: var(--v3-surface, #ffffff);
  border: 1px solid var(--v3-border, #cbd5e1);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease;
}
html[data-theme="dark"] .guide-card { background: #0f172a; border-color: rgba(148, 163, 184, 0.28); box-shadow: 0 8px 28px rgba(0,0,0,0.45); }
.guide-card:target, .guide-card.is-targeted { border-color: #0284c7; box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35); }
.guide-card-header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.guide-kicker { display: inline-block; font-size: 0.8rem; font-weight: 700; color: #047857; }
html[data-theme="dark"] .guide-kicker { color: #34d399; }
.guide-title {
  font-family: Rubik, sans-serif;
  font-size: 1.38rem;
  font-weight: 800;
  margin: 0;
  color: var(--v3-text-primary, #0f172a);
  line-height: 1.3;
}
html[data-theme="dark"] .guide-title { color: #f8fafc; }
.guide-standalone-h1 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); }

.guide-read-full-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--v3-link, #0369a1);
  text-decoration: none;
  margin-top: 4px;
}
.guide-read-full-link:hover { text-decoration: underline; }

.guide-direct-answer {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--v3-text-primary, #0f172a);
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
html[data-theme="dark"] .guide-direct-answer { color: #e2e8f0; background: rgba(16, 185, 129, 0.12); }

.guide-dropoff-scan-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-right: 4px solid #059669;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 22px;
}
html[dir="ltr"] .guide-dropoff-scan-box { border-right: 1px solid #86efac; border-left: 4px solid #059669; }
html[data-theme="dark"] .guide-dropoff-scan-box { background: #022c22; border-color: rgba(52, 211, 153, 0.35); border-right-color: #34d399; }
html[dir="ltr"][data-theme="dark"] .guide-dropoff-scan-box { border-left-color: #34d399; }
.guide-dropoff-title { font-size: 1.08rem; font-weight: 800; margin: 0 0 10px; color: var(--v3-text-primary, #0f172a); }
.guide-dropoff-reassurance { font-size: 0.84rem; line-height: 1.5; margin: 10px 0 0; color: var(--v3-text-secondary, #475569); }
html[data-theme="dark"] .guide-dropoff-reassurance { color: #94a3b8; }

.guide-section { margin-top: 24px; }
.guide-section-h2 {
  font-family: Rubik, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--v3-text-primary, #0f172a);
}

.guide-case-box {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}
.guide-case-top, .guide-case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.guide-case-badge { font-weight: 700; font-size: 0.86rem; color: #b45309; }
html[data-theme="dark"] .guide-case-badge { color: #fbbf24; }
.guide-case-text { margin: 0; font-size: 0.93rem; line-height: 1.65; color: var(--v3-text-primary, #0f172a); }
html[data-theme="dark"] .guide-case-text { color: #e2e8f0; }

.guide-vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.guide-vs-box {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--v3-border, #cbd5e1);
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--v3-bg, #f8fafc);
}
html[data-theme="dark"] .guide-vs-box { background: #0b1120; border-color: rgba(148, 163, 184, 0.25); }
.guide-vs-box.is-bad strong { color: #b91c1c; }
html[data-theme="dark"] .guide-vs-box.is-bad strong { color: #fca5a5; }
.guide-vs-box.is-good strong { color: #047857; }
html[data-theme="dark"] .guide-vs-box.is-good strong { color: #6ee7b7; }
.guide-vs-box p { margin: 6px 0 0; color: var(--v3-text-secondary, #475569); }
html[data-theme="dark"] .guide-vs-box p { color: #cbd5e1; }

.guide-table-wrap {
  overflow-x: auto;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid var(--v3-border, #cbd5e1);
}
.guide-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  background: var(--v3-surface, #ffffff);
}
html[data-theme="dark"] .guide-comparison-table { background: #0f172a; }
.guide-comparison-table th, .guide-comparison-table td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid var(--v3-border, #cbd5e1);
}
.guide-comparison-table th { background: rgba(15, 23, 42, 0.04); font-weight: 700; color: var(--v3-text-primary, #0f172a); }
html[data-theme="dark"] .guide-comparison-table th { background: rgba(255, 255, 255, 0.04); color: #f8fafc; }
.col-featured { background: rgba(16, 185, 129, 0.12) !important; color: #047857 !important; }
html[data-theme="dark"] .col-featured { background: rgba(16, 185, 129, 0.2) !important; color: #34d399 !important; }
.cell-bad { color: #b91c1c; font-weight: 600; }
html[data-theme="dark"] .cell-bad { color: #fca5a5; }
.cell-warn { color: #b45309; font-weight: 600; }
html[data-theme="dark"] .cell-warn { color: #fbbf24; }
.cell-good { color: #047857; font-weight: 700; background: rgba(16, 185, 129, 0.06); }
html[data-theme="dark"] .cell-good { color: #34d399; background: rgba(16, 185, 129, 0.12); }

.guide-faq-item { border-bottom: 1px solid var(--v3-border, #cbd5e1); padding: 12px 0; }
.guide-faq-item:last-child { border-bottom: none; }
.guide-faq-q { font-size: 0.98rem; font-weight: 700; margin: 0 0 6px; color: var(--v3-text-primary, #0f172a); }
.guide-faq-a { font-size: 0.92rem; line-height: 1.6; margin: 0; color: var(--v3-text-secondary, #475569); }

.auto-seo-links {
  background: var(--v3-bg, #f8fafc);
  border: 1px solid var(--v3-border, #cbd5e1);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 24px;
}
html[data-theme="dark"] .auto-seo-links { background: #0b1120; border-color: rgba(148, 163, 184, 0.25); }
.auto-seo-links h3 { font-size: 1rem; font-weight: 800; margin: 0 0 10px; color: var(--v3-text-primary, #0f172a); }
.auto-seo-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
}
.auto-seo-links li a { color: var(--v3-link, #0369a1); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.auto-seo-links li a:hover { text-decoration: underline; }

.guide-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--v3-border, #cbd5e1);
}
.guide-domain-input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--v3-border, #cbd5e1);
  background: var(--v3-bg, #f8fafc);
  color: var(--v3-text-primary, #0f172a);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  text-align: left;
  direction: ltr;
}
html[data-theme="dark"] .guide-domain-input { background: #0b1120; border-color: rgba(148, 163, 184, 0.28); color: #f8fafc; }
.guide-scan-btn {
  min-height: 48px;
  box-sizing: border-box;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: #047857;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.guide-scan-btn:hover { background: #065f46; }
.guide-wizard-link {
  min-height: 48px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--v3-border, #cbd5e1);
  color: var(--v3-text-primary, #0f172a);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  transition: all 0.2s ease;
}
html[data-theme="dark"] .guide-wizard-link { color: #f8fafc; border-color: rgba(148, 163, 184, 0.28); }
.guide-wizard-link:hover { border-color: #0284c7; }

.guides-bottom-cta {
  background: var(--v3-surface, #ffffff);
  border: 1px solid var(--v3-border, #cbd5e1);
  border-radius: 18px;
  padding: 32px 24px;
  margin-top: 36px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
html[data-theme="dark"] .guides-bottom-cta { background: #0f172a; border-color: rgba(148, 163, 184, 0.28); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.guides-bottom-cta h2 {
  font-family: Rubik, sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--v3-text-primary, #0f172a);
}
html[data-theme="dark"] .guides-bottom-cta h2 { color: #f8fafc; }
.guides-bottom-cta p {
  color: var(--v3-text-secondary, #475569);
  font-size: 1rem;
  margin: 0 auto 20px;
  max-width: 680px;
}
html[data-theme="dark"] .guides-bottom-cta p { color: #cbd5e1; }
.master-cta-bar { justify-content: center; max-width: 640px; margin: 0 auto; border-top: none; padding-top: 0; }

.guides-footer {
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid var(--v3-border, #cbd5e1);
  text-align: center;
}
html[data-theme="dark"] .guides-footer { border-top-color: rgba(148, 163, 184, 0.2); }
.guides-footer-sec20 { font-size: 0.82rem; color: var(--v3-text-secondary, #475569); margin-bottom: 14px; }
html[data-theme="dark"] .guides-footer-sec20 { color: #cbd5e1; }
.guides-footer-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.guides-footer-links a { color: #0369a1; text-decoration: none; font-size: 0.84rem; font-weight: 600; }
html[data-theme="dark"] .guides-footer-links a { color: #38bdf8; }
.guides-footer-links a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (max-width: 640px) {
  .guides-main { padding-top: 92px; padding-bottom: 40px; }
  .guides-filter-bar { gap: 6px; padding: 0 2px; }
  .guide-filter-btn { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 8px 10px; font-size: 0.8rem; overflow-wrap: anywhere; }
  .guide-card { padding: 18px 14px; border-radius: 14px; }
  .guide-title { font-size: 1.18rem; }
  .guide-cta-bar { flex-direction: column; align-items: stretch; }
  .guide-domain-input { flex: 0 0 auto; width: 100%; min-height: 48px; text-align: left; direction: ltr; box-sizing: border-box; }
  .guide-scan-btn, .guide-wizard-link, .guide-read-full-link { width: 100%; min-height: 48px; text-align: center; box-sizing: border-box; }
}
