:root {
  --primary: #F97316;
  --primary-hover: #ea580c;
  --primary-light: #FFF3E6;
  --primary-dark: #C2410C;
  --accent: #F59E0B;
  --text: #221A10;
  --text-muted: #786A56;
  --bg: #FAF5EC;
  --white: #fff;
  --border: #EAE0CC;
  --success: #10b981;
  --error: #ef4444;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(34,26,16,.04), 0 8px 24px -12px rgba(34,26,16,.18);
  --shadow-lg: 0 16px 34px -14px rgba(34,26,16,.28);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header .container,
.site-footer .container {
  max-width: 100% !important;
  padding: 0 40px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

@media (max-width: 768px) {
  .site-header .container,
  .site-footer .container {
    padding: 0 16px;
  }
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo span {
  color: var(--primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  margin-right: 8px;
}

.logo-img {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  min-height: 36px;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Mega Dropdown */
.mega-dropdown {
  position: relative;
}

.mega-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  min-height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.mega-trigger:hover,
.mega-trigger.active {
  color: var(--primary);
  background: var(--primary-light);
}

.mega-trigger svg {
  transition: transform 0.2s;
}

.mega-dropdown:hover .mega-trigger svg {
  transform: rotate(180deg);
}

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  min-width: 200px;
  z-index: 200;
}

.mega-dropdown:hover .mega-menu {
  display: flex;
}

.mega-menu-wide {
  min-width: 700px;
}

.mega-menu-medium {
  min-width: 400px;
}

.mega-column {
  display: flex;
  flex-direction: column;
  min-width: 140px;
}

.mega-column h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.mega-column a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}

.mega-column a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .mega-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    min-width: 100%;
    flex-direction: column;
    gap: 0;
  }

  .mega-menu-wide {
    min-width: 100%;
  }

  .mega-dropdown:hover .mega-menu {
    display: none;
  }

  .mega-dropdown.open .mega-menu {
    display: flex;
  }

  .mega-trigger {
    width: 100%;
    justify-content: space-between;
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
}

/* Placeholder slots */
.banner-zone {
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 24px auto;
  min-height: 90px;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-zone {
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  min-height: 600px;
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 80px;
  z-index: 50;
}

#slot-left {
  left: calc(50% - 780px);
}

#slot-right {
  right: calc(50% - 780px);
}

@media (max-width: 1580px) {
  .side-zone { display: none; }
}

/* Hero - light style (homepage) */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 56px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #7c3aed 100%);
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: heroDrift 20s linear infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
  border-radius: 50%;
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroDrift {
  from { transform: translate(0,0); }
  to { transform: translate(40px,40px); }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.05rem;
  opacity: .9;
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .hero { padding: 48px 16px 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
}

/* Homepage filter tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Homepage main container */
.home-main {
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1581px) {
  .home-main {
    max-width: 1240px;
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .home-main { padding: 0 16px; }
}

/* Tool Sections */
.tools-section {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}

.tools-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools-section h2 a {
  color: var(--text);
}

.tools-section h2 a:hover {
  color: var(--primary);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
  display: block;
  color: var(--text);
}

.tool-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-lg), inset 4px 0 0 0 var(--primary);
  transform: translateY(-2px);
  color: var(--text);
}

.tool-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.tool-card .card-icon.pdf { background: #FFF7ED; color: #C2410C; }
.tool-card .card-icon.image { background: #ECFEFF; color: #0E7490; }
.tool-card .card-icon.text { background: #FFFBEB; color: #B45309; }

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-top: 16px;
  margin-left: auto;
}

.tool-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

body.dark .tool-more-btn { border-color: #334155; color: #94A3B8; }
body.dark .tool-more-btn:hover { border-color: #F97316; color: #F97316; background: #1E3A5F; }

/* Page Header (for tool pages) */
.page-header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 24px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #7c3aed 100%);
  color: #fff;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: heroDrift 20s linear infinite;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
  border-radius: 50%;
  animation: heroFloat 6s ease-in-out infinite;
}

.page-header h1 {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* Tool Workspace */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 16px 0 32px;
}

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
}

.tool-workspace {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.tool-workspace .drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.tool-workspace .drop-zone:hover,
.tool-workspace .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.tool-workspace .drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.tool-workspace .drop-zone p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tool-workspace .drop-zone .browse-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: #DDE3FC;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* File list */
.file-list {
  list-style: none;
  margin: 16px 0;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.file-list .file-name {
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list .file-size {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0 12px;
  white-space: nowrap;
}

.file-list .remove-btn {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.file-list .remove-btn:hover {
  background: #FEE2E2;
}

/* Status / Messages */
.status {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-weight: 500;
  font-size: 0.9rem;
  display: none;
}

.status.show { display: block; }

.status.info {
  background: var(--primary-light);
  color: var(--primary);
}

.status.success {
  background: #ECFDF5;
  color: #065F46;
}

.status.error {
  background: #FEF2F2;
  color: #991B1B;
}

.status.loading {
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Preview */
.preview-container {
  margin: 16px 0;
  text-align: center;
}

.preview-container canvas,
.preview-container img {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.preview-container .preview-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.preview-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 600px) {
  .preview-compare { grid-template-columns: 1fr; }
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: var(--font);
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Results */
.result-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}

.result-box pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  background: var(--white);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
}

/* Stats cards (for word counter) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* SEO content section */
.seo-content {
  padding: 40px 0;
}

.seo-content-divider {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.seo-content p {
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .seo-grid { grid-template-columns: 1fr; }
}

.seo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.seo-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.seo-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.seo-card ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.seo-card ul li { margin-bottom: 4px; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 32px 0 24px;
}

.site-footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer .footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .footer-links {
  display: flex;
  gap: 16px;
}

.site-footer .footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .footer-links a:hover {
  color: var(--primary);
}

.site-footer .footer-bottom {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.site-footer .footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 24px;
}

.footer-grid-row2 {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--primary); }

.footer-col a.footer-more {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.footer-col a.footer-more:hover { color: var(--primary-dark); }

/* Range slider */
input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.range-value {
  font-weight: 600;
  color: var(--primary);
}

/* Checkbox toggle */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.toggle-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* category page special */
.category-hero {
  text-align: center;
  padding: 40px 20px;
}

.category-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.category-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.result-box { position: relative; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: var(--max-width) !important;
}

/* Print */
@media print {
  .site-header, .site-footer, .banner-zone, .side-zone { display: none; }
}

/* Header center + search */
.header-center {
  flex: 1;
  max-width: 360px;
  margin: 0 20px;
}

.search-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  margin-top: 4px;
}

.search-results.open { display: block; }

.search-result-item {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-light); color: var(--primary); }

.search-result-item .result-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .header-center { display: none; }
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-trigger {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 600;
}

.lang-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s;
  z-index: 1000;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
  font-size: 14px;
}

.lang-option:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.lang-option:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.lang-option.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.lang-check {
  width: 18px;
  font-size: 14px;
  flex-shrink: 0;
}

.lang-native {
  flex: 1;
}

.lang-code-sm {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

body.dark .lang-trigger { color: #94A3B8; }
body.dark .lang-trigger:hover { color: #F97316; }
body.dark .lang-dropdown { background: #1E293B; border-color: #334155; }
body.dark .lang-option { color: #E2E8F0; }
body.dark .lang-option:hover { background: #1E3A5F; color: #F97316; }
body.dark .lang-option.active { background: #1E3A5F; color: #F97316; }

/* RTL overrides */
[dir="rtl"] .tools-section h2 a::after { content: " ←"; }
[dir="rtl"] .tools-section h2 a::before { content: ""; }
[dir="rtl"] .tool-more-btn::before { content: "← "; }
[dir="rtl"] .tool-more-btn::after { content: ""; }
[dir="rtl"] .footer-more::before { content: "← "; }
[dir="rtl"] .footer-more::after { content: ""; }
[dir="rtl"] .mega-trigger svg { transform: rotate(180deg); }

body.dark .icon-sun { display: block; }
body.dark .icon-moon { display: none; }
body:not(.dark) .icon-sun { display: none; }
body:not(.dark) .icon-moon { display: block; }

/* Dark mode variables */
body.dark {
  --text: #e2d5c3;
  --text-muted: #a89880;
  --bg: #1a1510;
  --white: #2a2118;
  --border: #3d3020;
  --primary-light: #2a1f14;
  --input-bg: #2a2118;
  --success: #059669;
  --error: #ef4444;
}

body.dark .site-header { background: #1E293B; }
body.dark .site-footer { background: #1E293B; }
body.dark .nav-links a { color: #94A3B8; }
body.dark .nav-links a:hover,
body.dark .nav-links a.active { color: #F97316; background: #1E3A5F; }
body.dark .mega-trigger { color: #94A3B8; }
body.dark .mega-trigger:hover,
body.dark .mega-trigger.active { color: #F97316; background: #1E3A5F; }
body.dark .mega-menu { background: #1E293B; border-color: #334155; }
body.dark .mega-column h4 { color: #F97316; border-color: #334155; }
body.dark .mega-column a { color: #94A3B8; }
body.dark .mega-column a:hover { color: #F97316; background: #1E3A5F; }
body.dark .search-results { background: #1E293B; border-color: #334155; }
body.dark .search-result-item { color: #E2E8F0; border-color: #334155; }
body.dark .search-result-item:hover { background: #1E3A5F; }
body.dark .toast { background: #E2E8F0; color: #0F172A; }

/* Dark mode overrides for Tailwind utility classes on tool pages */
body.dark { background: #1a1510; color: #e2d5c3; }
body.dark.bg-slate-50 { background-color: #0F172A; }
body.dark.text-slate-800 { color: #E2E8F0; }
body.dark.text-slate-900 { color: #F1F5F9; }

body.dark .bg-white { background-color: #1E293B !important; }
body.dark .border-slate-100 { border-color: #334155 !important; }
body.dark .border-slate-200 { border-color: #334155 !important; }
body.dark .text-slate-900 { color: #F1F5F9 !important; }
body.dark .text-slate-800 { color: #E2E8F0 !important; }
body.dark .text-slate-700 { color: #CBD5E1 !important; }
body.dark .text-slate-600 { color: #94A3B8 !important; }
body.dark .text-slate-500 { color: #94A3B8 !important; }
body.dark .text-slate-400 { color: #64748B !important; }
body.dark .text-slate-300 { color: #94A3B8 !important; }
body.dark .bg-slate-50 { background-color: #1E293B !important; }
body.dark .bg-slate-100 { background-color: #1E293B !important; }
body.dark .hover\:bg-slate-50:hover { background-color: #1E293B !important; }
body.dark .hover\:bg-slate-100:hover { background-color: #1E293B !important; }
body.dark .hover\:bg-orange-100:hover { background-color: #1E3A5F !important; }

body.dark input[type="file"] { color: #94A3B8; }
body.dark select.form-control { background-color: #0F172A; color: #E2E8F0; border-color: #334155; }
body.dark textarea.form-control { background-color: #0F172A; color: #E2E8F0; border-color: #334155; }
body.dark input[type="text"],
body.dark input[type="number"],
body.dark input[type="email"],
body.dark input[type="url"],
body.dark textarea { background: var(--input-bg); color: var(--text); border-color: var(--border); }
body.dark select { background: var(--input-bg); color: var(--text); border-color: var(--border); }
body.dark input[type="range"] { background: #334155; }
body.dark input[type="color"] { border-color: #334155; }

body.dark .shadow-xl { box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important; }

body.dark .seo-content h2 { color: #F1F5F9; }
body.dark .seo-content p { color: #94A3B8; }
body.dark .seo-card { background: #1E293B; border-color: #334155; }
body.dark .seo-card h3 { color: #F1F5F9; }
body.dark .seo-card p { color: #94A3B8; }

body.dark .also-try { background: #1E293B; border-color: #334155; }
body.dark .also-try p { color: #94A3B8; }
body.dark .also-try a { color: #F97316; }

body.dark .faq-item { background: #1E293B; border-color: #334155; }
body.dark .faq-q { color: #E2E8F0; }
body.dark .faq-a { color: #94A3B8; }

body.dark .result-box { background: #0F172A; border-color: #334155; }
body.dark .result-box pre { background: #1E293B; border-color: #334155; color: #E2E8F0; }

body.dark .stat-card { background: #1E293B; border-color: #334155; }
body.dark .tool-card { background: #1E293B; border-color: #334155; }
body.dark .tool-card:hover { color: #E2E8F0; }
body.dark .tool-card h3 { color: #F1F5F9; }
body.dark .tool-card p { color: #94A3B8; }

body.dark .category-hero h1 { color: #F1F5F9; }
body.dark .category-hero p { color: #94A3B8; }

/* Breadcrumb */
.breadcrumb {
  padding: 12px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--primary); }

.breadcrumb .sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* FAQ Section */
.faq {
  margin: 32px 0;
}

.faq h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 14px 16px;
  background: var(--white);
}

.faq-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* Related tools */
.related-tools {
  margin-top: 24px;
}

.related-tools h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.related-link {
  display: block;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.related-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* Share button */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Analytics placeholder */
.analytics-placeholder {
  display: none;
}

/* ============================================
   Generic Tool Page Classes
   ============================================ */

/* Tool page body */
body.tool-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Tool card wrapper */
.tool-card-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 28px;
  margin: 24px 0;
  overflow: clip;
}

/* Tool with sidebar layout */
.tool-with-sidebar {
  display: flex;
  gap: 20px;
  margin: 24px 0;
  align-items: flex-start;
}

.tool-with-sidebar .tool-card-box {
  flex: 0 0 80%;
  margin: 0;
}

.tool-sidebar {
  flex: 0 0 calc(20% - 20px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 80px;
}

.tool-sidebar h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.sidebar-link {
  display: block;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.sidebar-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .tool-with-sidebar {
    flex-direction: column;
  }
  .tool-with-sidebar .tool-card-box,
  .tool-sidebar {
    flex: 0 0 100%;
  }
  .tool-sidebar {
    position: static;
  }
  .tool-sidebar .sidebar-link {
    display: inline-block;
    width: auto;
    margin-bottom: 0;
  }
}

/* Tool title */
.tool-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
}

/* Tool subtitle */
.tool-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 24px;
}

/* Tool label */
.tool-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

/* Small label */
.tool-label-sm {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* Tool input */
.tool-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.tool-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Tool select */
.tool-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.tool-select:focus {
  outline: none;
  border-color: var(--primary);
}

.tool-select option {
  background: var(--white);
  color: var(--text);
}

/* Tool file input */
.tool-file {
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-file::file-selector-button {
  margin-right: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 0;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: var(--primary-light);
  color: var(--primary-dark);
  transition: background 0.2s;
}

.tool-file::file-selector-button:hover {
  background: var(--primary);
  color: var(--white);
}

/* Tool controls area */
.tool-controls {
  space-y: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

/* Tool button primary */
.tool-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  margin-top: 16px;
}

.tool-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.tool-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tool-btn-reset {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  gap: 6px;
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-top: 16px;
  background: transparent !important;
}

.tool-btn-reset:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light) !important;
}

body.dark .tool-btn-reset { border-color: #334155; color: #94A3B8; }
body.dark .tool-btn-reset:hover:not(:disabled) { border-color: #F97316; color: #F97316; background: #1E3A5F !important; }

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.copy-btn:hover {
  background: var(--primary-hover);
}

.copy-btn.copied,
.copy-btn:active {
  background: #16a34a;
}

body.dark .copy-btn { color: #fff; }

/* Output box */
.output-box {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-secondary, #f1f5f9);
  border-bottom: 1px solid var(--border);
}

.output-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

.output-content {
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  background: var(--bg);
  min-height: 60px;
  max-height: 400px;
  overflow-y: auto;
}

body.dark .output-header {
  background: #1e293b;
}

/* Info notice (warning/info banner) */
.info-notice {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
}

body.dark .info-notice {
  background: #2a1f0a;
  border-color: #b45309;
  color: #fbbf24;
}

/* Section boxes */
.section-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.section-box:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  display: inline-block;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* Section-box inner field spacing override */
.section-box .tool-label {
  font-size: 0.75rem;
}

.section-box .space-y-4 > div {
  margin-bottom: 0;
}

.tool-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .tool-grid-3 { grid-template-columns: 1fr; }
}

/* Output text formatting */
.output-content strong {
  color: var(--primary);
  font-weight: 700;
}

.output-content .output-section-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  margin-top: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.output-content .output-section-label:first-child {
  margin-top: 0;
}

/* Also try section */
.also-try {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.85rem;
}

.also-try p {
  color: var(--text-muted);
  margin: 0;
}

.also-try a {
  color: var(--primary);
  font-weight: 500;
}

/* Status message */
.tool-status {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 16px;
  display: none;
}

.tool-status.show { display: block; }
.tool-status.success { color: var(--success); }
.tool-status.error { color: var(--error); }
.tool-status.loading { color: var(--primary); }

/* Grid layout for tool controls */
.tool-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .tool-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   How To Use Section
   ============================================ */
.how-to-use {
  margin: 32px 0;
}

.how-to-use h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.how-to-use .steps {
  list-style: none;
  counter-reset: steps;
  padding: 0;
}

.how-to-use .steps li {
  counter-increment: steps;
  position: relative;
  padding: 14px 16px 14px 52px;
  margin-bottom: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.how-to-use .steps li::before {
  content: counter(steps);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-wrap {
  margin: 16px 0;
  text-align: center;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Blog section on tool pages (injected via component) */
.blog-section {
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.blog-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.blog-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.blog-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

body.dark .blog-tag {
  background: #1E293B;
  color: #F1F5F9;
  border-color: #334155;
}

body.dark .blog-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   Blog Styles
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

@media (max-width: 500px) {
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--text);
  transition: all 0.25s;
}

.blog-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: var(--text);
}

.blog-card-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.blog-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Blog article */
.blog-article {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 32px;
  margin: 24px 0;
}

.blog-article .blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-article h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.3;
}

.blog-article h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 28px 0 12px;
}

.blog-article p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.blog-article a {
  color: var(--primary);
  font-weight: 500;
}

.blog-article a:hover {
  text-decoration: underline;
}

/* ============================================
   Action buttons row (share + copy)
   ============================================ */
.tool-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Blog dark mode */
body.dark .blog-card { background: #1E293B; border-color: #334155; }
body.dark .blog-card h2 { color: #F1F5F9; }
body.dark .blog-card p { color: #94A3B8; }
body.dark .blog-card:hover { border-color: #F97316; }
body.dark .blog-article h1 { color: #F1F5F9; }
body.dark .blog-article h2 { color: #F1F5F9; }
body.dark .blog-article p { color: #94A3B8; }
body.dark .blog-card-tag { background: #1E3A5F; color: #93C5FD; }
body.dark .blog-article { background: #1E293B; border-color: #334155; }
body.dark .blog-share { border-color: #334155; }
body.dark .blog-related .blog-card { background: #1E293B; border-color: #334155; }
body.dark .blog-related .blog-card:hover { border-color: #F97316; }
body.dark .blog-toc-list a { color: #94A3B8; }
body.dark .blog-toc-list a:hover,
body.dark .blog-toc-list a.active { color: #F97316; border-left-color: #F97316; }

/* Blog scroll progress bar */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #f97316);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Blog hero banner */
.blog-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  margin-top: -24px;
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  padding: 40px 32px 32px;
  color: #fff;
}

.blog-hero-content h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.blog-hero-date {
  opacity: 0.85;
}

/* Article meta bar (below hero) */
.blog-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-article-meta-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0.85;
}

.blog-meta-item svg {
  flex-shrink: 0;
}

.blog-read-time {
  opacity: 0.85;
}

/* Blog card images (thumbnails on listing & related) */
.blog-card-image {
  width: calc(100% + 56px);
  margin: -28px -28px 16px;
  height: 160px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image-fallback {
  background: var(--primary-light);
}

body.dark .blog-card-image-fallback {
  background: #1E3A5F;
}

/* Blog reading time badge */
.blog-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.85;
}

/* Two-column layout: TOC sidebar + article */
.blog-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.blog-toc {
  flex: 0 0 240px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  display: none;
}

.blog-toc-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc-list li {
  margin-bottom: 4px;
}

.blog-toc-list a {
  display: block;
  padding: 4px 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
}

.blog-toc-list a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
}

.blog-toc-list a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.blog-article {
  flex: 1;
  min-width: 0;
}

/* Share section */
.blog-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  margin: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.blog-share-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-right: 4px;
}

/* Related posts section */
.blog-related {
  margin: 40px 0;
}

.blog-related-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Blog detail 80/20 layout */
.blog-detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
  margin: 24px 0;
}
.blog-detail-main { min-width: 0; }
.blog-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.blog-detail-meta span:nth-child(2) {
  margin-left: auto;
}
.blog-detail-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blog-sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.blog-sidebar-label {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
body.dark .blog-sidebar-card { background: #1E293B; border-color: #334155; }
body.dark .blog-sidebar-label { color: #F1F5F9; }

/* Blog prompt block */
.blog-prompt-block {
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.blog-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--primary-light, #f0f4ff);
  border-bottom: 1px solid var(--border);
}
.blog-prompt-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.blog-prompt-copy {
  position: static;
  flex-shrink: 0;
}
.blog-prompt-block > p {
  margin: 0;
  padding: 16px 20px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.blog-prompt-block pre {
  margin: 0;
  padding: 16px 20px;
  background: #1E293B;
  color: #E2E8F0;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}
body.dark .blog-prompt-block { border-color: #334155; }
body.dark .blog-prompt-header { background: #1E3A5F; border-color: #334155; }
body.dark .blog-prompt-header h3 { color: #F1F5F9; }

/* Responsive: stack TOC on mobile */
@media (max-width: 900px) {
  .blog-layout { flex-direction: column; }
  .blog-toc {
    flex: none;
    position: static;
    width: 100%;
    max-height: none;
  }
  .blog-hero { min-height: 240px; margin-top: -16px; }
  .blog-hero-content h1 { font-size: 1.4rem; }
  .blog-hero-content { padding: 24px 0; }
  .blog-card-image { height: 140px; }
  .blog-detail-layout { grid-template-columns: 1fr; }
  .blog-detail-sidebar { position: static; }
  .blog-article h1 { font-size: 1.4rem; }
}

@media print {
  .site-header, .site-footer, .banner-zone, .side-zone { display: none; }
}



/* ACCENT TRIGGER */
.accent-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}

.accent-trigger:hover { transform: scale(1.1); }
.accent-trigger svg { color: #fff; width: 20px; height: 20px; }

.accent-panel {
  display: none;
  position: fixed;
  bottom: 82px;
  right: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 999;
  width: 200px;
}

.accent-panel.open { display: block; }

.accent-panel h4 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform .15s, border-color .15s;
}

.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--text); }

/* TOOL COUNT */
.home-page .tool-count {
  text-align: center;
  padding: 24px 0 0;
  font-size: .9rem;
  color: var(--text-muted);
}

/* FILTER TABS */
.home-page .tabs-wrap {
  padding: 20px 0 0;
  text-align: center;
}

.home-page .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  border-bottom: none;
  margin-bottom: 0;
}

.home-page .tab {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}

.home-page .tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.home-page .tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* UNIFIED TOOL GRID */
.home-page .unified-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.home-page .unified-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.home-page .tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .25s;
  display: block;
  color: var(--text);
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.home-page .tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform .25s;
  transform-origin: top;
}

.home-page .tool-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  color: var(--text);
}

.home-page .tool-card:hover::before {
  transform: scaleY(1);
}

.home-page .tool-card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.home-page .tool-card .card-icon.pdf { background: #fff7ed; color: #c2410c; }
.home-page .tool-card .card-icon.img { background: #ecfeff; color: #0e7490; }
.home-page .tool-card .card-icon.dev { background: #f0fdf4; color: #15803d; }
.home-page .tool-card .card-icon.biz { background: #fef3c7; color: #b45309; }
.home-page .tool-card .card-icon.ai { background: #f5f3ff; color: #7c3aed; }
.home-page .tool-card .card-icon.seo { background: #ede9fe; color: #6d28d9; }
.home-page .tool-card .card-icon.soc { background: #fce7f3; color: #be185d; }
.home-page .tool-card .card-icon.hlth { background: #dcfce7; color: #16a34a; }
.home-page .tool-card .card-icon.fin { background: #fef9c3; color: #a16207; }
.home-page .tool-card .card-icon.image { background: #ecfeff; color: #0e7490; }
.home-page .tool-card .card-icon.text { background: #fffbeb; color: #b45309; }

.home-page .tool-card h3 {
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.home-page .tool-card p {
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.4;
}

/* TRUST STRIP */
.home-page .trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.home-page .trust-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all .25s;
}

.home-page .trust-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.home-page .trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.4rem;
}

.home-page .trust-card h3 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.home-page .trust-card p {
  color: var(--text-muted);
  font-size: .82rem;
}

/* FAQ ACCORDION */
.home-page .faq {
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 24px;
}

.home-page .faq h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.home-page .faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--white);
  padding: 16px 20px;
}

.home-page .faq-q {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  margin: 0 0 6px;
}



.home-page .faq-a {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
}

/* SEO CONTENT */
.home-page .seo-content {
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.home-page .seo-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.home-page .seo-content > p {
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.home-page .seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.home-page .seo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.home-page .seo-card h3 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.home-page .seo-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* EXPANDED FOOTER */
.site-footer {
  margin-top: auto;
  background: #FAF5EC;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  margin-bottom: 24px;
}

.footer-grid + .footer-grid {
  margin-top: 0;
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-col a {
  display: block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  transition: color .2s;
}

.footer-col a:hover { color: var(--primary); }

.footer-col a.f-more {
  margin-top: 6px;
  font-size: .78rem;
  color: var(--primary);
  font-weight: 600;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: .8rem;
}

body.dark .home-page .tool-card { background: #2a2118; color: #e2d5c3; }
body.dark .home-page .tool-card h3 { color: #e2d5c3; }
body.dark .home-page .tool-card p { color: #a89880; }
body.dark .home-page .trust-card { background: #2a2118; }
body.dark .home-page .trust-card h3 { color: #e2d5c3; }
body.dark .home-page .trust-card p { color: #a89880; }
body.dark .home-page .tab { background: #2a2118; color: #a89880; border-color: #3d3020; }
body.dark .home-page .tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
body.dark .home-page .faq-item { background: #2a2118; border-color: #3d3020; }
body.dark .home-page .faq-q { color: #e2d5c3; }
body.dark .home-page .faq-a { color: #a89880; }
body.dark .home-page .seo-card { background: #2a2118; border-color: #3d3020; }
body.dark .home-page .seo-card h3 { color: #e2d5c3; }
body.dark .home-page .seo-card p { color: #a89880; }

body.dark .footer-col h4 { color: #e2d5c3; }
body.dark .footer-col a { color: #a89880; }
body.dark .footer-col a:hover { color: var(--primary); }
body.dark .footer-bottom p { color: #a89880; }

/* Warm dark mode overrides for tool pages */
body.dark .tool-card,
body.dark .blog-card,
body.dark .blog-article,
body.dark .blog-sidebar-card,
body.dark .how-to-use .steps li,
body.dark .also-try,
body.dark .tool-workspace,
body.dark .faq-item:not(.home-page .faq-item),
body.dark .seo-card:not(.home-page .seo-card) {
  background: #2a2118;
  border-color: #3d3020;
}

body.dark .tool-card h3,
body.dark .tool-card p,
body.dark .blog-card h2,
body.dark .blog-card p,
body.dark .blog-article h1,
body.dark .blog-article h2,
body.dark .blog-article p,
body.dark .faq-q:not(.home-page .faq-q) {
  color: #e2d5c3;
}

body.dark .tool-card p,
body.dark .blog-card p,
body.dark .blog-article p,
body.dark .faq-a:not(.home-page .faq-a) {
  color: #a89880;
}

body.dark .category-hero h1 { color: #e2d5c3; }
body.dark .category-hero p { color: #a89880; }
body.dark .breadcrumb { color: #a89880; }
body.dark .breadcrumb a { color: #a89880; }
body.dark .breadcrumb a:hover { color: var(--primary); }
body.dark .how-to-use h2 { color: #e2d5c3; }
body.dark .how-to-use .steps li { color: #e2d5c3; }

@media (max-width: 768px) {
  .home-page .hero h1 { font-size: 1.8rem; }
  .home-page .hero p { font-size: 1rem; }
  .home-page .hero { padding: 48px 16px 40px; }
  .home-page .tabs { gap: 6px; }
  .home-page .tab { padding: 6px 14px; font-size: .78rem; }
  .home-page .unified-grid { grid-template-columns: 1fr 1fr; }
  .home-page .unified-section { padding: 16px 16px 0; }
  .home-page .trust-strip { grid-template-columns: 1fr 1fr; padding: 24px 16px; }
  .home-page .seo-grid { grid-template-columns: 1fr; }
  .home-page .seo-content { padding: 24px 16px; }
  .home-page .faq { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .site-footer .container { padding: 0 16px; }
}

@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
  .home-page .trust-strip { grid-template-columns: 1fr; }
  .home-page .unified-grid { grid-template-columns: 1fr; }
}

/* Override side ads z-index to stay below accent picker */
#slot-left, #slot-right { z-index: 50; }

/* Language switcher click toggle support */
.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
