:root {
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --card-hover: #fafafe;
  --text: #1d1d1f;
  --text-secondary: #515154;
  --muted: #86868b;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --accent: #6c5ce7;
  --accent-hover: #5a4bd1;
  --accent-light: rgba(108,92,231,0.08);
  --accent-glow: rgba(108,92,231,0.25);
  --accent2: #00b894;
  --accent2-hover: #00a381;
  --accent2-light: rgba(0,184,148,0.08);
  --danger: #ff3b30;
  --warning: #ff9500;
  --success: #34c759;
  --info: #5ac8fa;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --max-w: 1200px;
  --header-h: 64px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="dark"] {
  --bg: #0c0c1d;
  --bg-alt: #13132b;
  --card: #181838;
  --card-hover: #1e1e42;
  --text: #f0f0f5;
  --text-secondary: #a8a8c0;
  --muted: #6b6b88;
  --border: #2e2e52;
  --border-light: #242448;
  --accent-light: rgba(108,92,231,0.15);
  --accent-glow: rgba(108,92,231,0.35);
  --accent2-light: rgba(0,184,148,0.12);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.15);
  --shadow: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.3);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ─── HEADER ─── */
.site-header {
  background: color-mix(in srgb, var(--card) 85%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.site-logo span.accent-text { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: rotate(15deg);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.mobile-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── MAIN ─── */
main { flex: 1; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section-pad { padding: 4rem 0; }

/* ─── HERO ─── */
.hero {
  text-align: center;
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
  position: relative;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a855f7 50%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
  position: relative;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
}

.hero-badge svg { width: 16px; height: 16px; color: var(--accent2); }

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, #5a4bd1 100%);
  color: #fff;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 20px var(--accent-glow);
  position: relative;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.hero-cta:active { transform: translateY(-1px); }

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  padding: 0.9rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--card);
  margin-left: 0.75rem;
}

.hero-cta-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ─── QUICK STATS BAR ─── */
.quick-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 0;
  margin: 0 auto;
  max-width: 700px;
  flex-wrap: wrap;
}

.quick-stat {
  text-align: center;
}

.quick-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.quick-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ─── CARDS ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent-light) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  position: relative;
}

.card-icon.icon-purple { background: rgba(108,92,231,0.1); color: var(--accent); }
.card-icon.icon-green { background: rgba(0,184,148,0.1); color: var(--accent2); }
.card-icon.icon-blue { background: rgba(90,200,250,0.1); color: var(--info); }
.card-icon.icon-orange { background: rgba(255,149,0,0.1); color: var(--warning); }
.card-icon.icon-red { background: rgba(255,59,48,0.1); color: var(--danger); }
.card-icon.icon-teal { background: rgba(52,199,89,0.1); color: var(--success); }

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card-link::after {
  content: "→";
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  display: inline-block;
}
.card-link:hover::after { transform: translateX(4px); }

/* ─── FEATURE HIGHLIGHT ─── */
.feature-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
}

.feature-highlight-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.feature-highlight-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent2);
  margin-top: 2px;
}

.feature-preview {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

/* ─── TOOL AREA ─── */
.tool-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

.tool-input-area {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.tool-textarea {
  width: 100%;
  min-height: 340px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tool-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.tool-textarea::placeholder { color: var(--muted); }

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.tool-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.tool-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  line-height: 1;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a4bd1);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 4px 14px var(--accent-glow); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-success {
  background: linear-gradient(135deg, var(--accent2), #00a381);
  color: #fff;
}
.btn-success:hover { opacity: 0.9; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }

/* ─── READING TIMER ─── */
.reading-timer {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  text-align: center;
}

.reading-timer-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.reading-timer-clock {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.75rem;
}

.reading-timer-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.reading-timer-result {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: left;
}

/* ─── STATS PANEL ─── */
.stats-panel {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.stats-panel h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.stat-item:last-child { border-bottom: none; }

.stat-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-value.highlight {
  color: var(--accent);
  font-size: 1.25rem;
}

.reading-time-display {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--accent-light), var(--accent2-light));
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-light);
}

.reading-time-display .time-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.reading-time-display .time-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ─── WPM INPUT ─── */
.wpm-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.wpm-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.wpm-input {
  width: 76px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.wpm-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ─── LANG TOGGLE ─── */
.lang-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.lang-toggle button {
  padding: 0.5rem 1.5rem;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.lang-toggle button.active {
  background: linear-gradient(135deg, var(--accent), #5a4bd1);
  color: #fff;
  border-radius: 50px;
}

/* ─── KEYWORD DENSITY ─── */
.keyword-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.keyword-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.keyword-list { list-style: none; }

.keyword-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.85rem;
}

.keyword-word {
  font-weight: 600;
  min-width: 100px;
  color: var(--text);
}

.keyword-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.keyword-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

.keyword-count {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── SEO WIDGETS ─── */
.seo-widgets {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.seo-widget { margin-bottom: 0.85rem; }

.seo-widget label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.seo-meter {
  height: 5px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.seo-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s, background 0.3s;
}

.seo-meter-fill.good { background: var(--success); }
.seo-meter-fill.warn { background: var(--warning); }
.seo-meter-fill.bad { background: var(--danger); }

.seo-char-count {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ─── PRIVACY TOGGLE ─── */
.privacy-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--muted);
}

.privacy-toggle input { accent-color: var(--accent); cursor: pointer; }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span.sep { color: var(--border); }
.breadcrumb span.current { color: var(--text-secondary); font-weight: 500; }

/* ─── CONTENT ─── */
.content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.content-wrap h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.content-wrap h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.85rem;
  letter-spacing: -0.01em;
}

.content-wrap h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.6rem;
}

.content-wrap p {
  margin-bottom: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.content-wrap ul, .content-wrap ol {
  margin: 0 0 1.15rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.content-wrap li { margin-bottom: 0.4rem; }
.content-wrap strong { color: var(--text); }

.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.sidebar-widget h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.sidebar-widget ul { list-style: none; }
.sidebar-widget li { margin-bottom: 0.4rem; }

.sidebar-widget li a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: block;
  padding: 0.35rem 0;
  transition: color var(--transition);
}

.sidebar-widget li a:hover { color: var(--accent); }

/* ─── ACCORDION ─── */
.accordion { margin: 1.25rem 0; }

.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  overflow: hidden;
  transition: border-color var(--transition);
}

.accordion-item:hover { border-color: var(--border); }
.accordion-item.open { border-color: var(--accent); }

.accordion-trigger {
  width: 100%;
  background: var(--card);
  border: none;
  padding: 1.1rem 1.5rem;
  text-align: left;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.accordion-trigger:hover { background: var(--bg); }

.accordion-trigger::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  transition: transform 0.3s, color 0.3s;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 1rem;
}

.accordion-item.open .accordion-trigger::after { content: "−"; }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}

.accordion-item.open .accordion-content { max-height: 600px; }

.accordion-body {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ─── SEARCH ─── */
.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3.2rem;
  border: 2px solid var(--border-light);
  border-radius: 50px;
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-chip {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  background: var(--card);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.filter-chip:hover, .filter-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.search-results { max-width: 700px; margin: 0 auto; }

.search-result-item {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.search-result-item:hover { background: var(--accent-light); }

.search-result-item h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.search-result-item h3 a { color: var(--text); }
.search-result-item h3 a:hover { color: var(--accent); }
.search-result-item p { font-size: 0.88rem; color: var(--muted); margin: 0; }

.search-result-item .result-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  background: var(--accent-light);
  color: var(--accent);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* ─── TEMPLATE COPY ─── */
.template-block {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1.25rem 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.template-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, var(--accent), #5a4bd1);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all var(--transition);
}

.template-copy-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px var(--accent-glow); }

/* ─── AD SLOTS ─── */
.ad-slot {
  background: var(--bg);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  overflow: hidden;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--bg);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── CTA SECTION ─── */
.cta-section {
  text-align: center;
  padding: 3.5rem 2.5rem;
  background: linear-gradient(135deg, var(--accent-light), var(--accent2-light));
  border-radius: var(--radius);
  margin: 3rem 0;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.cta-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  position: relative;
  letter-spacing: -0.02em;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  position: relative;
}

/* ─── LINK GRID ─── */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin: 1.75rem 0;
}

.link-grid a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.link-grid a::before {
  content: "→";
  color: var(--accent);
  font-weight: 600;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.link-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateX(3px);
}

.link-grid a:hover::before { transform: translateX(2px); }

/* ─── SECTION HEADER ─── */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  margin-top: 0.6rem;
  font-size: 1.05rem;
}

.section-label {
  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(--accent);
  margin-bottom: 0.5rem;
}

/* ─── PROGRAMMATIC PAGE ─── */
.prog-hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.prog-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.prog-hero .big-stat {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 1rem 0;
}

.prog-hero .stat-sub { color: var(--muted); font-size: 1rem; }

.content-section {
  max-width: 800px;
  margin: 0 auto 2rem;
}

.content-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.75rem 0 0.85rem;
}

.content-section p {
  margin-bottom: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.cta-wrap { text-align: center; margin: 2.5rem 0; }

.disclaimer {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-light);
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ─── COOKIE BANNER ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--card) 95%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  z-index: 9998;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  font-size: 0.88rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { color: var(--text-secondary); margin: 0; }
.cookie-banner a { text-decoration: underline; }

/* ─── DATA TABLE ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg);
}

.data-table td { color: var(--text-secondary); }
.data-table tr:hover td { background: var(--accent-light); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .tool-wrapper { grid-template-columns: 1fr; }
  .stats-panel { position: static; }
  .content-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-highlight { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--card) 98%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    z-index: 99;
    gap: 0.25rem;
  }

  .nav-links.open a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .hero { padding: 3rem 0 1.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .link-grid { grid-template-columns: 1fr 1fr; }
  .cookie-banner { flex-direction: column; text-align: center; }
  .quick-stats { gap: 2rem; }
  .hero-cta-secondary { margin-left: 0; margin-top: 0.75rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .link-grid { grid-template-columns: 1fr; }
  .tool-buttons { flex-direction: column; }
  .tool-buttons .btn { width: 100%; justify-content: center; }
  .quick-stats { gap: 1.5rem; }
  .quick-stat-value { font-size: 1.6rem; }
  .hero-badges { gap: 0.5rem; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .cookie-banner, .tool-buttons, .theme-toggle, .mobile-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .stats-panel { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; }
}
