/* ==========================================================================
   ResumeMatchATS — Authoritative Career-Tech Stylesheet
   Palette: Forest Teal (#0f766e), Mint (#ecfdf5), Clean Slate-White (#f8fafc)
   Zero external dependencies — Fast, Accessible, Mobile-First & Print-Ready
   ========================================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-mint: #ecfdf5;
  --bg-mint-strong: #d1fae5;
  --teal-primary: #0f766e;
  --teal-hover: #115e59;
  --teal-dark: #134e4a;
  --teal-light: #14b8a6;
  --teal-border: #99f6e4;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --status-good-bg: #ecfdf5;
  --status-good-text: #065f46;
  --status-good-border: #a7f3d0;

  --status-warn-bg: #fffbeb;
  --status-warn-text: #92400e;
  --status-warn-border: #fde68a;

  --status-miss-bg: #fef2f2;
  --status-miss-text: #991b1b;
  --status-miss-border: #fecaca;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-teal: 0 8px 22px rgba(15, 118, 110, 0.16);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--teal-hover);
  text-decoration: underline;
}

img,
svg {
  vertical-align: middle;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 999;
  background: var(--teal-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
}

/* ==========================================================================
   SwiftKitHub Global Top Bar / Breadcrumb & Related Tools Mesh
   ========================================================================== */
.swiftkithub-topbar {
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.82rem;
  border-bottom: 1px solid #1e293b;
}

.swiftkithub-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
}

.swiftkithub-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #94a3b8;
}

.swiftkithub-breadcrumbs a {
  color: #e2e8f0;
  font-weight: 600;
  text-decoration: none;
}

.swiftkithub-breadcrumbs a:hover {
  color: #5eead4;
  text-decoration: underline;
}

.swiftkithub-breadcrumbs span {
  color: #5eead4;
  font-weight: 600;
}

.swiftkithub-all-tools {
  color: #5eead4;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.swiftkithub-all-tools:hover {
  color: #99f6e4;
  text-decoration: underline;
}

.related-calculators-section {
  padding: 44px 0 52px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid var(--border-light);
}

.related-grid-two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  margin-top: 22px;
}

.related-group-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
}

.related-group-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
}

.related-group-sub {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.related-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-links-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.91rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.related-links-list li a:hover {
  background: var(--bg-mint);
  border-color: var(--teal-border);
  color: var(--teal-dark);
  text-decoration: none;
  transform: translateX(2px);
}

.related-link-arrow {
  color: var(--teal-primary);
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .related-grid-two-col {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Sticky Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-logo:hover {
  color: var(--teal-primary);
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.brand-accent {
  color: var(--teal-primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--bg-mint);
  color: var(--teal-primary);
  text-decoration: none;
}

.nav-badge-privacy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--status-good-text);
  background: var(--bg-mint);
  border: 1px solid var(--status-good-border);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   AdSense Slots (Hidden cleanly unless configured or preview enabled)
   ========================================================================== */
.ad-slot {
  display: none;
  margin: 18px auto;
  max-width: 1200px;
  text-align: center;
}

.ad-slot.is-active {
  display: block;
}

.ad-placeholder-box {
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 18px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.ad-placeholder-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

/* ==========================================================================
   Hero Section (Compact & High-Utility so Tool stays Right Above the Fold)
   ========================================================================== */
.hero-section {
  padding: 28px 0 18px;
  background: radial-gradient(circle at top right, #ecfdf5 0%, #f8fafc 58%);
  border-bottom: 1px solid var(--border-light);
}

.hero-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-mint);
  color: var(--teal-primary);
  border: 1px solid var(--teal-border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 3.1vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  font-weight: 800;
}

.hero-subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 680px;
}

.hero-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
  line-height: 1.25;
}

.btn:focus-visible {
  outline: 2px solid var(--teal-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--teal-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.22);
}

.btn-primary:hover {
  background: var(--teal-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--teal-primary);
  border-color: var(--teal-border);
  background-color: var(--bg-mint);
}

.btn-secondary:hover {
  background: var(--bg-mint-strong);
  color: var(--teal-dark);
  text-decoration: none;
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #94a3b8;
  text-decoration: none;
}

.btn-sm {
  font-size: 0.82rem;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Interactive Scanner Workspace
   ========================================================================== */
.workspace-section {
  padding: 22px 0 36px;
}

.scanner-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.toolbar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

/* Side-by-Side Inputs */
.inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.input-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-card:focus-within {
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.input-card.drag-over {
  border-color: var(--teal-primary);
  background: var(--bg-mint);
}

.input-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.input-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.input-card-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-upload-label {
  cursor: pointer;
  margin: 0;
}

.scanner-textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-primary);
  background: #fcfdfe;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.scanner-textarea:focus {
  outline: none;
  border-color: var(--teal-primary);
  background: #ffffff;
}

.input-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Results Dashboard (SVG Gauge + Keyword Breakdown + Health Checks)
   ========================================================================== */
.results-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.results-top-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
  align-items: stretch;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

/* Gauge Card */
.score-gauge-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ecfdf5 100%);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.score-gauge-card.tier-low {
  background: linear-gradient(180deg, #fffafa 0%, #fef2f2 100%);
  border-color: var(--status-miss-border);
}

.score-gauge-card.tier-mid {
  background: linear-gradient(180deg, #fffdf7 0%, #fffbeb 100%);
  border-color: var(--status-warn-border);
}

.score-gauge-card.tier-high {
  background: linear-gradient(180deg, #f6fef9 0%, #ecfdf5 100%);
  border-color: var(--status-good-border);
}

.gauge-svg-wrap {
  position: relative;
  width: 156px;
  height: 156px;
  margin-bottom: 12px;
}

.gauge-svg {
  width: 156px;
  height: 156px;
  transform: rotate(-90deg);
}

.gauge-bg-ring {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 12;
}

.gauge-progress-ring {
  fill: none;
  stroke: var(--teal-primary);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.3s ease;
}

.gauge-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-score-number {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.gauge-score-caption {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}

.status-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tier-low .status-tier-pill {
  background: #fee2e2;
  color: #991b1b;
}

.tier-mid .status-tier-pill {
  background: #fef3c7;
  color: #92400e;
}

.tier-high .status-tier-pill {
  background: #d1fae5;
  color: #065f46;
}

.score-advice-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

/* Summary Metrics & Sub-bars */
.summary-details-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.summary-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.summary-kpis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.kpi-mini-card {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.kpi-mini-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
}

.kpi-mini-value.text-good {
  color: var(--status-good-text);
}

.kpi-mini-value.text-miss {
  color: var(--status-miss-text);
}

.kpi-mini-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.category-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-bar-item {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.cat-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.cat-bar-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  background: var(--teal-primary);
  border-radius: var(--radius-pill);
  transition: width 0.45s ease;
}

/* Keyword Filter Tabs & Columns */
.keywords-section {
  padding-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
}

.keywords-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-pills {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  flex-wrap: wrap;
}

.filter-pill {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill.active {
  background: var(--bg-surface);
  color: var(--teal-primary);
  box-shadow: var(--shadow-xs);
}

.keywords-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.keyword-panel {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: #fcfdfe;
}

.keyword-panel.missing-panel {
  background: #fffdfd;
  border-color: #fecaca;
}

.keyword-panel.matched-panel {
  background: #f9fefc;
  border-color: #a7f3d0;
}

.panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.panel-title.missing-title {
  color: var(--status-miss-text);
}

.panel-title.matched-title {
  color: var(--status-good-text);
}

.panel-hint {
  margin: 0 0 12px;
  font-size: 0.81rem;
  color: var(--text-muted);
}

.badge-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kw-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.kw-badge-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  opacity: 0.85;
}

.kw-badge.matched {
  background: var(--status-good-bg);
  color: var(--status-good-text);
  border: 1px solid var(--status-good-border);
}

.kw-badge.matched .kw-counts {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: rgba(6, 95, 70, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.kw-badge.missing {
  background: var(--status-miss-bg);
  color: var(--status-miss-text);
  border: 1px solid var(--status-miss-border);
  cursor: pointer;
  user-select: none;
}

.kw-badge.missing.high-priority {
  background: #fffbeb;
  color: #92400e;
  border-color: #fbbf24;
}

.kw-badge.missing:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(153, 27, 27, 0.12);
}

.kw-badge.missing .kw-counts {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: rgba(153, 27, 27, 0.09);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.kw-badge.missing.high-priority .kw-counts {
  background: rgba(146, 64, 14, 0.12);
}

.kw-badge.copied {
  background: var(--teal-primary) !important;
  color: #ffffff !important;
  border-color: var(--teal-primary) !important;
}

.empty-cloud-msg {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 10px 0;
  font-style: italic;
}

/* Bonus Resume Health Checks */
.health-checks-section {
  padding-top: 22px;
}

.section-subhead {
  margin: 0 0 14px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.health-card {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.health-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.health-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.health-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.health-pill.pass {
  background: var(--status-good-bg);
  color: var(--status-good-text);
  border: 1px solid var(--status-good-border);
}

.health-pill.warn {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
  border: 1px solid var(--status-warn-border);
}

.health-pill.fail {
  background: var(--status-miss-bg);
  color: var(--status-miss-text);
  border: 1px solid var(--status-miss-border);
}

.health-metric {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.health-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Toast Notification */
.copy-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  background: var(--teal-dark);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Contextual Affiliate Partner Cards (#recommended-tools)
   ========================================================================== */
.partner-section {
  padding: 28px 0 36px;
}

.partner-box {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius-xl);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}

.partner-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.partner-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.partner-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.ftc-inline-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

.affiliate-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.affiliate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.affiliate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
  border-color: var(--teal-light);
}

.affiliate-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--bg-mint);
  color: var(--teal-primary);
  border: 1px solid var(--teal-border);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.affiliate-name {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
}

.affiliate-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.52;
}

.affiliate-cta {
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   SEO Guide Content Section (#guide) & Benchmark Table
   ========================================================================== */
.guide-section {
  padding: 44px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.prose-article h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.prose-article h3 {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 28px 0 10px;
}

.prose-article p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.72;
}

.prose-article ul,
.prose-article ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.prose-article li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.prose-article strong {
  color: var(--text-primary);
}

.formula-callout {
  background: var(--bg-mint);
  border-left: 4px solid var(--teal-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.formula-callout code {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal-dark);
}

.table-responsive {
  overflow-x: auto;
  margin: 20px 0 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--bg-surface);
}

.benchmark-table th,
.benchmark-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.benchmark-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ==========================================================================
   FAQ Accordion (#faq)
   ========================================================================== */
.faq-section {
  padding: 48px 0;
}

.section-heading-center {
  text-align: center;
  margin-bottom: 28px;
}

.section-heading-center h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-heading-center p {
  margin: 0;
  color: var(--text-secondary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--teal-primary);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
}

.faq-item.open .faq-answer {
  display: block;
  padding-top: 14px;
}

/* ==========================================================================
   Subpages (Privacy, Terms, About, Contact)
   ========================================================================== */
.subpage-main {
  padding: 44px 0 64px;
}

.subpage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}

.subpage-card h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subpage-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-control {
  padding: 10px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #fcfdfe;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0 32px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e293b;
}

.footer-brand-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.footer-desc {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 0.88rem;
  max-width: 460px;
}

.ftc-footer-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

.footer-col-title {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #5eead4;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 0.82rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 980px) {
  .results-top-grid {
    grid-template-columns: 1fr;
  }

  .health-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .affiliate-cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  .nav-badge-privacy {
    display: none;
  }

  .inputs-grid,
  .keywords-columns {
    grid-template-columns: 1fr;
  }

  .summary-kpis-grid {
    grid-template-columns: 1fr;
  }

  .health-grid {
    grid-template-columns: 1fr;
  }

  .subpage-card {
    padding: 24px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Print Stylesheet (Clean ATS Report Printout)
   ========================================================================== */
@media print {
  .swiftkithub-topbar,
  .site-header,
  .hero-actions-bar,
  .scanner-toolbar,
  .inputs-grid,
  .partner-section,
  .ad-slot,
  .guide-section,
  .faq-section,
  .related-calculators-section,
  .site-footer,
  .copy-toast,
  #copyAllMissingBtn,
  #printReportBtn {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .results-wrapper {
    box-shadow: none;
    border: 1px solid #cbd5e1;
    padding: 16px;
  }
}
