/* ===================================================
   ilovekeyword.com — Complete Stylesheet
   DM Sans body | DM Serif Display headings
   =================================================== */

/* ---- CSS Variables ---- */
:root {
  --primary:        #0ea574;
  --primary-light:  #e6f7f2;
  --primary-dark:   #0a7c57;
  --primary-xlight: #f0fbf7;
  --accent:         #f59e0b;
  --accent-light:   #fef3c7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --warning:        #f59e0b;
  --success:        #10b981;
  --text-primary:   #111827;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;
  --bg-white:       #ffffff;
  --bg-light:       #f9fafb;
  --bg-card:        #ffffff;
  --border:         #e5e7eb;
  --border-light:   #f3f4f6;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 24px rgba(0,0,0,0.10);
  --shadow-xl:      0 20px 60px rgba(0,0,0,0.12);
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      20px;
  --radius-full:    9999px;
  --font-body:      'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:   'DM Serif Display', Georgia, serif;
  --header-h:       64px;
  --container-max:  1200px;
  --transition:     0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, textarea, select { font-family: var(--font-body); font-size: 1rem; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 600; color: var(--text-primary); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 9999;
  background: var(--primary); color: #fff; padding: 0.5rem 1rem;
  border-radius: var(--radius-md); font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===================================================
   HEADER
   =================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  height: var(--header-h);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 1.5rem;
}

/* Logo */
.header__logo {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; flex-shrink: 0;
}
.logo__icon {
  width: 34px; height: 34px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.logo__text { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.logo__love { color: var(--text-primary); }
.logo__heart { color: var(--danger); font-size: 1.05rem; }
.logo__kw { color: var(--primary); }

/* Nav */
.header__nav { flex: 1; display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: 0.25rem; }
.nav__item { position: relative; }
.nav__link {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 500; color: var(--text-primary);
  transition: all var(--transition);
}
.nav__link:hover, .nav__link.active {
  background: var(--primary-light); color: var(--primary);
}
.nav__chevron { font-size: 0.65rem; transition: transform var(--transition); }
.nav__item--dropdown:hover .nav__chevron,
.nav__item--dropdown.is-open .nav__chevron { transform: rotate(180deg); }

/* Dropdown */
.nav__dropdown {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 8px 30px rgba(0,0,0,0.13);
  min-width: 480px; padding: 0.75rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem;
  z-index: 1000;
  /* padding-top creates invisible hover bridge — mouse never loses hover state */
  padding-top: 1rem;
  margin-top: -0.5rem;
}
.nav__item--dropdown.is-open .nav__dropdown,
.nav__item--dropdown:hover .nav__dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav__item--dropdown.is-open .nav__chevron { transform: rotate(180deg); }
.nav__dropdown-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-md);
  color: var(--text-primary); transition: background var(--transition);
}
.nav__dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.nav__dropdown-item i {
  width: 20px; text-align: center; margin-top: 0.15rem;
  color: var(--primary); font-size: 0.9rem; flex-shrink: 0;
}
.nav__dropdown-item strong { display: block; font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.nav__dropdown-item small { display: block; font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.1rem; }

/* Header actions */
.header__actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; padding: 6px;
  border-radius: var(--radius-sm);
}
.hamburger__bar {
  display: block; width: 100%; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all 0.25s ease;
}
.hamburger.open .hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(17,24,39,0.6); backdrop-filter: blur(4px);
}
.mobile-nav-overlay.open { display: flex; justify-content: flex-end; }
.mobile-nav {
  background: var(--bg-white); width: 85%; max-width: 360px;
  height: 100%; display: flex; flex-direction: column;
  padding: 1.25rem;
  animation: slideInRight 0.25s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.mobile-nav__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.mobile-nav__close {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1px solid var(--border); font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
}
.mobile-nav__list { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav__link {
  display: block; padding: 0.75rem 1rem;
  border-radius: var(--radius-md); font-size: 0.95rem; font-weight: 500;
  color: var(--text-primary); transition: all var(--transition);
}
.mobile-nav__link:hover { background: var(--primary-light); color: var(--primary); }
.mobile-nav__footer { margin-top: 1.5rem; }

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.25rem; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: 2px solid transparent; white-space: nowrap; text-decoration: none;
}
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(14,165,116,0.3); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-light); color: var(--text-primary); }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--lg { padding: 0.85rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===================================================
   HERO SECTION
   =================================================== */
.hero {
  background: var(--bg-white);
  position: relative; overflow: hidden;
  padding: 5rem 0 4rem;
}
/* Subtle dot pattern */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6; pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-white));
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  text-align: center; max-width: 760px; margin: 0 auto;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--primary-light); color: var(--primary);
  padding: 0.35rem 0.9rem; border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 1.5rem;
  border: 1px solid rgba(14,165,116,0.2);
}
.hero__h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400; /* DM Serif Display looks best at 400 */
  color: var(--text-primary); line-height: 1.18; margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.hero__h1 span { color: var(--primary); }
.hero__sub {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 2rem; line-height: 1.65;
}

/* Hero search form */
.hero__search-form {
  background: var(--bg-white); border: 2px solid var(--border);
  border-radius: var(--radius-xl); padding: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: var(--shadow-lg); max-width: 600px; margin: 0 auto 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero__search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14,165,116,0.12), var(--shadow-lg);
}
.hero__search-input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 1rem; color: var(--text-primary); padding: 0.5rem 0.75rem;
}
.hero__search-input::placeholder { color: var(--text-muted); }

/* Trust badges */
.hero__trust {
  display: flex; align-items: center; justify-content: center;
  gap: 1.25rem; flex-wrap: wrap; margin-top: 0.5rem;
}
.trust-badge {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.82rem; color: var(--text-secondary); font-weight: 500;
}
.trust-badge i { color: var(--primary); }

/* ===================================================
   TOOL SEARCH FORM (reused on tool pages)
   =================================================== */
.tool-search-box {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 1.75rem;
  box-shadow: var(--shadow-md); margin-bottom: 2rem;
}
.tool-search-box__title {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem;
}
.search-input-row {
  display: flex; gap: 0.5rem; align-items: stretch; flex-wrap: wrap;
}
.search-input-wrap { flex: 1; min-width: 200px; position: relative; }
.search-input-wrap i {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.search-input {
  width: 100%; padding: 0.85rem 1rem 0.85rem 2.6rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  font-size: 1rem; background: var(--bg-white); color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,116,0.1);
}
.search-select {
  padding: 0.85rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-white);
  font-size: 0.88rem; color: var(--text-primary); cursor: pointer;
  min-width: 130px; outline: none;
  transition: border-color var(--transition);
}
.search-select:focus { border-color: var(--primary); }
.search-btn {
  padding: 0.85rem 1.5rem; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-lg); font-size: 0.95rem;
  font-weight: 600; cursor: pointer; display: flex; align-items: center;
  gap: 0.4rem; transition: all var(--transition); white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(14,165,116,0.3); }
.search-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Example keywords chips */
.example-chips { margin-top: 1rem; display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.example-chips__label { font-size: 0.78rem; color: var(--text-muted); }
.chip {
  display: inline-block; padding: 0.25rem 0.65rem;
  background: var(--primary-xlight); color: var(--primary);
  border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 500;
  border: 1px solid rgba(14,165,116,0.2); cursor: pointer;
  transition: all var(--transition);
}
.chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===================================================
   RESULTS SECTION
   =================================================== */
.results-section { display: none; animation: fadeIn 0.3s ease; }
.results-section.visible { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Results header */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem;
}
.results-header__left { display: flex; align-items: center; gap: 1rem; }
.results-count { font-size: 0.88rem; color: var(--text-secondary); }
.results-count strong { color: var(--primary); font-weight: 700; }
.results-header__actions { display: flex; gap: 0.5rem; }

/* Tabs */
.results-tabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); margin-bottom: 0;
}
.tab-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1rem; font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer; transition: all var(--transition); border: none; background: none;
  position: relative; bottom: -2px;
}
.tab-btn:hover { color: var(--primary); background: var(--primary-light); }
.tab-btn.active {
  color: var(--primary); background: var(--bg-white);
  border: 2px solid var(--border); border-bottom-color: var(--bg-white);
}
.tab-badge {
  background: var(--primary-light); color: var(--primary);
  padding: 0.1rem 0.45rem; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700;
}
.tab-btn.active .tab-badge { background: var(--primary); color: #fff; }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Results table */
.results-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0 var(--radius-md) var(--radius-md); }
.results-table {
  width: 100%; border-collapse: collapse; min-width: 500px;
  font-size: 0.875rem;
}
.results-table th {
  background: var(--bg-light); padding: 0.75rem 1rem;
  text-align: left; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-secondary); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.results-table th:first-child { width: 50px; text-align: center; }
.results-table td {
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-light);
  color: var(--text-primary); vertical-align: middle;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: var(--primary-xlight); }
.results-table td:first-child { text-align: center; color: var(--text-muted); font-size: 0.8rem; }

.kw-cell { display: flex; align-items: center; gap: 0.4rem; }
.kw-text { font-weight: 500; }
.vol-cell, .cpc-cell, .comp-cell { white-space: nowrap; }
.vol-na { color: var(--text-muted); cursor: help; }

.comp-bar {
  display: flex; align-items: center; gap: 0.4rem;
}
.comp-bar__track {
  flex: 1; max-width: 60px; height: 5px;
  background: var(--border); border-radius: var(--radius-full); overflow: hidden;
}
.comp-bar__fill { height: 100%; border-radius: var(--radius-full); background: var(--primary); }

/* Row actions */
.row-actions { display: flex; gap: 0.35rem; align-items: center; }
.row-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; cursor: pointer; transition: all var(--transition);
  border: 1px solid var(--border); background: var(--bg-white); color: var(--text-secondary);
}
.row-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.row-btn--add:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.row-btn--copy:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.row-btn.added { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Keyword basket */
.keyword-basket {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 500;
}
.basket-toggle {
  width: 52px; height: 52px; border-radius: var(--radius-full);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: var(--shadow-lg); cursor: pointer;
  transition: all var(--transition); border: none;
  position: relative;
}
.basket-toggle:hover { background: var(--primary-dark); transform: scale(1.05); }
.basket-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #fff;
  width: 20px; height: 20px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.basket-count.visible { display: flex; }

.basket-panel {
  position: absolute; bottom: calc(100% + 0.75rem); right: 0;
  width: 320px; background: var(--bg-white);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: none; flex-direction: column; max-height: 420px;
  animation: fadeIn 0.2s ease;
}
.basket-panel.open { display: flex; }
.basket-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.basket-panel__header h4 { font-size: 0.9rem; font-weight: 700; }
.basket-panel__actions { display: flex; gap: 0.4rem; }
.basket-list {
  flex: 1; overflow-y: auto; padding: 0.75rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.basket-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.6rem; background: var(--primary-xlight);
  border-radius: var(--radius-sm); font-size: 0.82rem;
}
.basket-item__kw { font-weight: 500; color: var(--primary-dark); }
.basket-item__remove {
  color: var(--text-muted); cursor: pointer; font-size: 0.8rem;
  transition: color var(--transition);
}
.basket-item__remove:hover { color: var(--danger); }
.basket-empty {
  text-align: center; padding: 2rem 1rem; color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===================================================
   LOADING STATE
   =================================================== */
.loading-overlay {
  display: none; flex-direction: column; align-items: center;
  justify-content: center; padding: 3rem 1rem; gap: 1rem;
}
.loading-overlay.visible { display: flex; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }

/* Progress steps */
.loading-steps { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; max-width: 280px; }
.loading-step {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted);
}
.loading-step.done { color: var(--primary); }
.loading-step i { font-size: 0.75rem; }

/* ===================================================
   CARDS & TOOLS GRID
   =================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: all var(--transition); display: flex; flex-direction: column; gap: 0.75rem;
}
.tool-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-card__icon {
  width: 44px; height: 44px; background: var(--primary-light);
  border-radius: var(--radius-md); display: flex; align-items: center;
  justify-content: center; color: var(--primary); font-size: 1.1rem;
}
.tool-card__badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  width: fit-content;
}
.tool-card__title { font-size: 1rem; font-weight: 700; }
.tool-card__desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.tool-card__link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.85rem; font-weight: 600; color: var(--primary);
  transition: gap var(--transition);
}
.tool-card:hover .tool-card__link { gap: 0.5rem; }

/* ===================================================
   SECTION LAYOUTS
   =================================================== */
.section { padding: 4rem 0; }
.section--alt { background: var(--bg-light); }
.section__header { text-align: center; max-width: 580px; margin: 0 auto 2.5rem; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--primary); margin-bottom: 0.75rem;
}
.section__h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400;
  line-height: 1.25; margin-bottom: 0.75rem;
}
.section__sub { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

/* Feature grid (3-col) */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem;
}
.feature-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.feature-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 1rem;
}
.feature-card__title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card__desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* Stats bar */
.stats-bar {
  background: var(--primary); color: #fff; padding: 1.25rem 0;
}
.stats-bar__inner {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
}
.stat-item { display: flex; align-items: center; gap: 0.5rem; }
.stat-item__value { font-size: 1.4rem; font-weight: 700; }
.stat-item__label { font-size: 0.85rem; opacity: 0.85; }
.stat-separator { opacity: 0.4; }
/* Force white text inside the green stats bar regardless of other overrides */
.stats-bar .stat-item { gap: 0.4rem; }
.stats-bar .stat-item__value { font-size: 1.4rem; font-weight: 700; color: #fff !important; }
.stats-bar .stat-item__label { font-size: 0.85rem; color: rgba(255,255,255,0.88) !important; }
.stats-bar .stat-separator { color: rgba(255,255,255,0.5); font-size: 1.2rem; margin: 0 0.25rem; }

/* How it works */
.how-steps {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem; position: relative;
}
.step-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; text-align: center;
}
.step-card__num {
  width: 40px; height: 40px; background: var(--primary);
  color: #fff; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; margin: 0 auto 1rem;
}
.step-card__title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.step-card__desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ===================================================
   FAQ
   =================================================== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.faq-item__q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; cursor: pointer; font-weight: 600;
  font-size: 0.95rem; gap: 1rem; transition: background var(--transition);
  user-select: none;
}
.faq-item__q:hover { background: var(--primary-xlight); }
.faq-item__q i { color: var(--primary); transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-item__q i { transform: rotate(180deg); }
.faq-item__a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65;
}
.faq-item.open .faq-item__a { max-height: 400px; padding: 0 1.25rem 1.1rem; }

/* ===================================================
   SEO CONTENT BLOCKS (below tools)
   =================================================== */
.seo-content { padding: 3rem 0; border-top: 1px solid var(--border); }
.seo-content__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.seo-block h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.seo-block p, .seo-block li {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7;
}
.seo-block ul, .seo-block ol { padding-left: 1.25rem; margin-top: 0.5rem; }
.seo-block ul { list-style: disc; }
.seo-block ol { list-style: decimal; }
.seo-block li { margin-bottom: 0.4rem; }

/* Related tools section */
.related-tools { margin-top: 2.5rem; }
.related-tools__grid { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.related-tool-link {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; background: var(--primary-light);
  border: 1px solid rgba(14,165,116,0.2); border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 600; color: var(--primary);
  transition: all var(--transition);
}
.related-tool-link:hover { background: var(--primary); color: #fff; }

/* ===================================================
   TOOL PAGE HERO (smaller than home hero)
   =================================================== */
.page-hero {
  background: var(--bg-white); padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border); position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px; opacity: 0.5; pointer-events: none;
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero__badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--primary-light); color: var(--primary);
  padding: 0.25rem 0.75rem; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.75rem;
}
.page-hero__h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400;
  margin-bottom: 0.5rem;
}
.page-hero__sub { font-size: 0.95rem; color: var(--text-secondary); max-width: 540px; }

/* ===================================================
   KEYWORD DENSITY SPECIFIC
   =================================================== */
/* .density-form defined below in tool-specific section */
/* .density-textarea and :focus defined below */
.density-results-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem; margin-top: 1.5rem;
}
.density-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; text-align: center;
}
.density-card__val { font-size: 2rem; font-weight: 700; color: var(--primary); }
.density-card__label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.25rem; }
.density-status {
  display: inline-block; padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 700;
  margin-top: 0.5rem;
}
.density-status--good { background: #d1fae5; color: #065f46; }
.density-status--low  { background: #fef3c7; color: #92400e; }
.density-status--high { background: #fee2e2; color: #991b1b; }

/* ===================================================
   FORMS (contact, etc.)
   =================================================== */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.form-input, .form-textarea, .form-select {
  padding: 0.75rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); font-size: 0.9rem;
  background: var(--bg-white); color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,116,0.1);
}
.form-textarea { min-height: 140px; resize: vertical; font-family: var(--font-body); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-alert {
  padding: 0.9rem 1.1rem; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.5rem;
}
.form-alert--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.form-alert--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--text-primary); color: #d1d5db;
  padding: 3.5rem 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 2rem; padding-bottom: 2.5rem;
}
.footer__logo .logo__love,
.footer__logo .logo__kw,
.footer__logo .logo__icon { color: #fff; background: rgba(255,255,255,0.15); }
.footer__logo .logo__heart { color: #f87171; }
.footer__tagline { font-size: 0.85rem; margin-top: 0.75rem; line-height: 1.6; color: #9ca3af; max-width: 220px; }
.footer__made { font-size: 0.8rem; color: #6b7280; margin-top: 0.5rem; }
.footer__social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.social-link {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08); color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; transition: all var(--transition);
}
.social-link:hover { background: var(--primary); color: #fff; }
.footer__heading { color: #fff; font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__links a { font-size: 0.85rem; color: #9ca3af; transition: color var(--transition); }
.footer__links a:hover { color: var(--primary); }
.footer__newsletter-desc { font-size: 0.82rem; color: #9ca3af; margin-bottom: 0.75rem; line-height: 1.5; }
.newsletter-input-wrap {
  display: flex; gap: 0.4rem;
}
.newsletter-input {
  flex: 1; padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md); color: #fff; font-size: 0.85rem;
  outline: none; transition: border-color var(--transition);
}
.newsletter-input::placeholder { color: #6b7280; }
.newsletter-input:focus { border-color: var(--primary); }
.newsletter-btn {
  padding: 0.65rem 0.85rem; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  font-size: 0.85rem; transition: background var(--transition);
}
.newsletter-btn:hover { background: var(--primary-dark); }
.footer__privacy-note { font-size: 0.75rem; color: #6b7280; margin-top: 0.5rem; }
.newsletter-success { background: rgba(16,185,129,0.15); color: #6ee7b7; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.82rem; margin-bottom: 0.5rem; }
.newsletter-error { background: rgba(239,68,68,0.15); color: #fca5a5; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.82rem; margin-bottom: 0.5rem; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0; display: flex;
  align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer__copy { font-size: 0.8rem; color: #6b7280; }
.footer__links-bottom { font-size: 0.8rem; color: #6b7280; }
.footer__links-bottom a { color: #6b7280; transition: color var(--transition); }
.footer__links-bottom a:hover { color: var(--primary); }

/* ===================================================
   ABOUT PAGE
   =================================================== */
/* .about-grid defined below */
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.about-stat { background: var(--primary-light); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; }
.about-stat__value { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.about-stat__label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* ===================================================
   PRIVACY / TERMS PAGE
   =================================================== */
/* .legal-content defined below */
.legal-content h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--text-primary); }
.legal-content p, .legal-content li { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.75; }
.legal-content ul, .legal-content ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 0.4rem; }
.legal-content a { color: var(--primary); }

/* ===================================================
   CONTACT PAGE
   =================================================== */
/* .contact-grid defined below */
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.contact-info-item i { color: var(--primary); font-size: 1rem; margin-top: 0.15rem; }
.contact-info-item strong { display: block; font-size: 0.85rem; font-weight: 700; }
.contact-info-item span { font-size: 0.85rem; color: var(--text-secondary); }

/* ===================================================
   TOAST / NOTIFICATIONS
   =================================================== */
.toast-container {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--text-primary); color: #fff;
  padding: 0.65rem 1.25rem; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.5rem;
  animation: toastIn 0.25s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast--success { background: var(--primary); }
.toast--error   { background: var(--danger); }
@keyframes toastIn  { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; } }

/* ===================================================
   UPGRADE BANNER (no volume data)
   =================================================== */
.upgrade-notice {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--accent-light); border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-md); padding: 0.75rem 1rem;
  font-size: 0.82rem; margin-bottom: 1rem; color: #92400e;
}
.upgrade-notice i { color: var(--accent); }
.upgrade-notice a { color: #92400e; font-weight: 700; text-decoration: underline; }

/* ===================================================
   BREADCRUMB
   =================================================== */
.breadcrumb { margin-bottom: 1.25rem; }
.breadcrumb__list { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.breadcrumb__item { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb__item:not(:last-child)::after { content: '/'; color: var(--border); }
.breadcrumb__item a { color: var(--text-secondary); }
.breadcrumb__item a:hover { color: var(--primary); }
.breadcrumb__item--active { color: var(--text-primary); font-weight: 500; }

/* ===================================================
   RESPONSIVE
   =================================================== */

/* Tablet portrait 640px+ */
@media (min-width: 640px) {
  .stat-separator { display: block; }
}

/* Tablet landscape 768px+ */
@media (min-width: 768px) {
  .seo-content__grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}

/* Desktop 1024px+ */
@media (min-width: 1024px) {
  .hamburger { display: none; }
  .header__nav { display: flex; }
}

/* Wide 1280px+ */
@media (min-width: 1280px) {
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; }
}

/* === MOBILE FIRST (< 1024px) === */
@media (max-width: 1023px) {
  .header__nav { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 3rem 0 2.5rem; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col--brand { grid-column: 1 / -1; }

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

@media (max-width: 767px) {
  .section { padding: 2.5rem 0; }
  .tools-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .seo-content__grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .keyword-basket { bottom: 1rem; right: 1rem; }
  .basket-panel { width: 290px; }
  .hero__search-form { flex-direction: row; }
  .search-input-row { flex-direction: column; }
  .search-select { min-width: unset; }
  .results-tabs { gap: 0.15rem; }
  .tab-btn { padding: 0.5rem 0.65rem; font-size: 0.78rem; }
  .stats-bar__inner { flex-direction: column; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .hero__h1 { font-size: 1.7rem; }
  .section__h2 { font-size: 1.45rem; }
  .hero__trust { gap: 0.75rem; }
  .trust-badge { font-size: 0.75rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .keyword-basket, .toast-container { display: none; }
  .results-table { font-size: 12px; }
}

/* =============================================
   ADDITIONAL PAGE STYLES
   ============================================= */

/* Page Hero variants */
.page-hero--youtube .badge--youtube {
  background: rgba(255,0,0,0.12);
  color: #cc0000;
}
.page-hero--about .page-hero__content { max-width: 700px; }

/* Buttons */
.btn--youtube {
  background: #ff0000;
  color: #fff;
  border-color: #ff0000;
}
.btn--youtube:hover { background: #cc0000; border-color: #cc0000; }
/* .btn--full defined above */

/* Badge variants */
.badge--youtube { background: rgba(255,0,0,0.1); color: #cc0000; border: 1px solid rgba(255,0,0,0.2); }

/* ---- About Page ---- */
.about-section { padding: 4rem 0; }
.about-grid { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start; }
.about-content h2 { font-family: 'DM Serif Display', serif; font-size: 1.6rem; color: var(--text-primary); margin: 2rem 0 0.75rem; }
.about-content h2:first-child { margin-top: 0; }
.about-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; }
.about-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.about-list li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--text-secondary); line-height: 1.6; }
.about-list li i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.about-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.stats-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.stats-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; }
/* About page sidebar stat-card - scoped to avoid overriding stats-bar */
.stats-card .stat-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); }
.stats-card .stat-item:last-child { border-bottom: none; }
.stats-card .stat-item__value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stats-card .stat-item__label { font-size: 0.875rem; color: var(--text-secondary); }
.contact-card { background: var(--primary); border-radius: var(--radius-lg); padding: 1.5rem; color: #fff; }
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.contact-card p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 1rem; }
.contact-card .btn--primary { background: #fff; color: var(--primary); border-color: #fff; }
.contact-card .btn--primary:hover { background: var(--primary-light); }
.tools-quick-links { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.tools-quick-links h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; }
.quick-link { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid var(--border-light); transition: color 0.2s; }
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { color: var(--primary); }
.quick-link i { color: var(--primary); width: 16px; }

/* Values Section */
.values-section { background: var(--bg-light); padding: 4rem 0; }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.value-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; text-align: center; }
.value-card__icon { width: 52px; height: 52px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.2rem; color: var(--primary); }
.value-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.value-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }

/* ---- Contact Page ---- */
.contact-section { padding: 4rem 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start; }
.contact-form-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.required { color: #ef4444; }
/* form-group, form-label, form-input etc. defined in base section above */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
/* .contact-info defined below */
.contact-info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.contact-info-card__icon { width: 40px; height: 40px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 0.75rem; }
.contact-info-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; }
.contact-info-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Legal Pages ---- */
.legal-section { padding: 3rem 0 5rem; }
.legal-content { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; max-width: 1100px; margin: 0 auto; }
.legal-toc { position: sticky; top: 90px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.legal-toc h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; }
.legal-toc ol { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.legal-toc a { font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.legal-toc a:hover { color: var(--primary); }
.legal-body { min-width: 0; }
.legal-intro { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.8; padding: 1.25rem; background: var(--primary-light); border-radius: var(--radius-md); border-left: 4px solid var(--primary); margin-bottom: 2rem; }
.legal-body h2 { font-family: 'DM Serif Display', serif; font-size: 1.4rem; color: var(--text-primary); margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--border-light); }
.legal-body h2:first-of-type { border-top: none; }
.legal-body h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 1.25rem 0 0.5rem; }
.legal-body p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; }
.legal-body ul, .legal-body ol { padding-left: 1.4rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.legal-body li { color: var(--text-secondary); line-height: 1.7; }
.legal-body a { color: var(--primary); }
.legal-body strong { color: var(--text-primary); }

/* ---- Keyword Density Checker ---- */
.tool-box {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 1.75rem;
  box-shadow: var(--shadow-md); margin-bottom: 2rem;
}
.tool-box--density { padding: 0; overflow: hidden; }
.density-form { display: flex; flex-direction: column; }
.density-form__content { padding: 1.5rem; }
.density-textarea { width: 100%; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.95rem; font-family: inherit; color: var(--text-primary); resize: vertical; transition: border-color 0.2s; }
.density-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,116,0.12); }
.density-form__meta { display: flex; gap: 1.5rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.density-form__options { padding: 1rem 1.5rem; background: var(--bg-light); border-top: 1px solid var(--border); }
.options-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.option-group { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.option-group select { padding: 0.4rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; }
.option-group input[type=checkbox] { accent-color: var(--primary); }
.density-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.density-stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; }
.density-stat-card__value { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 0.4rem; }
.density-stat-card__label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.density-bar { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; min-width: 80px; }
.density-bar__fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
.density-bar__fill--good { background: #10b981; }
.density-bar__fill--warn { background: var(--accent); }
.density-bar__fill--danger { background: #ef4444; }
.status-badge { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 20px; }
.status--good { background: #ecfdf5; color: #065f46; }
.status--warn { background: #fffbeb; color: #92400e; }
.status--danger { background: #fef2f2; color: #991b1b; }
.density-guide { margin-top: 1.5rem; padding: 1.25rem; background: var(--bg-light); border-radius: var(--radius-md); }
.density-guide h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; }
.density-guide__items { display: flex; flex-direction: column; gap: 0.5rem; }
.density-guide__item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--text-secondary); }
.guide-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.guide-dot--good { background: #10b981; }
.guide-dot--warn { background: var(--accent); }
.guide-dot--danger { background: #ef4444; }

/* ---- YouTube Tags Export ---- */
.tags-export-box { margin-top: 1.5rem; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.tags-export-box__header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.tags-export-box__header h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.tags-textarea { width: 100%; padding: 0.75rem 1rem; border: none; background: transparent; font-family: monospace; font-size: 0.85rem; color: var(--text-secondary); resize: none; min-height: 70px; }

/* ---- About / Contact sidebars responsive ---- */
@media (max-width: 1023px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .legal-content { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .density-stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row--2col { grid-template-columns: 1fr; }
  .options-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .values-grid { grid-template-columns: 1fr; }
  .density-stats-row { grid-template-columns: 1fr 1fr; }
}
