/* ============================================================
   MDTools — style.css
   Single stylesheet for the entire site
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --teal:        #00BFA6;
  --teal-light:  #00D4B8;
  --blue:        #0066FF;
  --indigo:      #4338CA;

  /* Gradient */
  --grad-brand:  linear-gradient(135deg, #00BFA6 0%, #0066FF 100%);

  /* Hero (always dark) */
  --hero-bg:       #060C1A;
  --hero-surface:  rgba(255,255,255,0.04);
  --hero-border:   rgba(255,255,255,0.08);
  --hero-text:     #F1F5F9;
  --hero-muted:    #94A3B8;

  /* Light mode (default) */
  --bg:          #F8FAFF;
  --bg-2:        #EEF2FF;
  --surface:     #FFFFFF;
  --surface-2:   #F1F5F9;
  --border:      #E2E8F0;
  --text:        #0F172A;
  --text-2:      #475569;
  --text-3:      #94A3B8;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
  --shadow:      0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.12);
  --shadow-teal: 0 8px 32px rgba(0,191,166,0.25);

  /* Spacing */
  --s1:0.25rem; --s2:0.5rem; --s3:0.75rem; --s4:1rem;
  --s6:1.5rem;  --s8:2rem;   --s12:3rem;   --s16:4rem;
  --s20:5rem;   --s24:6rem;

  /* Radius */
  --r-sm:6px; --r:12px; --r-lg:20px; --r-xl:28px;

  /* Nav */
  --nav-h: 68px;

  /* Max width */
  --max-w: 1200px;
}

[data-theme="dark"] {
  --bg:        #0B0F1A;
  --bg-2:      #111827;
  --surface:   #141B2D;
  --surface-2: #1E293B;
  --border:    #1E293B;
  --text:      #F1F5F9;
  --text-2:    #94A3B8;
  --text-3:    #475569;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; line-height: 1.2; }

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s4);
  background: var(--teal);
  color: #fff;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-sm);
  z-index: 9999;
  font-weight: 600;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: var(--s4); }

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
}

/* ── Nav ───────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(6,12,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hero-border);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(6,12,26,0.97);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.nav-container {
  display: flex;
  align-items: center;
  gap: var(--s4);
  height: var(--nav-h);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.nav-logo-text strong { color: var(--teal); font-weight: 800; }
#nav-menu { margin-left: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--hero-muted);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
  background: none;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--teal);
  background: rgba(0,191,166,0.08);
  text-decoration: none;
}
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #0F172A;
  border: 1px solid var(--hero-border);
  border-radius: var(--r);
  min-width: 180px;
  padding: var(--s2) 0;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: block;
  padding: var(--s2) var(--s4);
  font-size: 0.88rem;
  color: var(--hero-muted);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.dropdown-item:hover, .dropdown-item.active {
  background: rgba(0,191,166,0.08);
  color: var(--teal);
  text-decoration: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-left: var(--s4);
}
.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--hero-muted);
  transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--teal); background: rgba(0,191,166,0.08); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--hero-muted);
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--hero-bg);
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--s20) 0;
}
.hero::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 400px; height: 400px;
  top: -80px; left: -100px;
  background: rgba(0,191,166,0.35);
  filter: blur(80px);
  animation: orb-drift 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 350px; height: 350px;
  bottom: -60px; right: -80px;
  background: rgba(0,102,255,0.30);
  filter: blur(80px);
  animation: orb-drift 14s ease-in-out infinite alternate-reverse;
}
.orb-3 {
  width: 280px; height: 280px;
  top: 40%; right: 20%;
  background: rgba(67,56,202,0.25);
  filter: blur(70px);
  animation: orb-drift 20s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 20px) scale(1.08); }
  100% { transform: translate(-20px, 40px) scale(0.95); }
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s12);
  align-items: center;
  width: 100%;
}
.hero-text { color: var(--hero-text); }
.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s4);
}
.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--hero-text);
  margin-bottom: var(--s4);
  line-height: 1.1;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--hero-muted);
  margin-bottom: var(--s6);
  max-width: 480px;
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.pill {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--hero-muted);
  font-size: 0.8rem;
  padding: var(--s1) var(--s3);
  border-radius: 999px;
}

/* ── Glass card ────────────────────────────────────────────── */
.glass-card {
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  backdrop-filter: blur(20px);
  border-radius: var(--r-xl);
  padding: var(--s6);
}
.converter-card {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

/* ── Upload zone ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--teal);
  border-radius: var(--r-lg);
  padding: var(--s8) var(--s4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;
  color: var(--hero-muted);
}
.upload-zone:hover, .upload-zone.drag-active {
  background: rgba(0,191,166,0.06);
  border-color: var(--teal-light);
}
.upload-zone svg { opacity: 0.7; color: var(--teal); }
.upload-title { font-size: 1rem; font-weight: 500; color: var(--hero-text); }
.upload-hint { font-size: 0.82rem; color: var(--hero-muted); }

/* ── Editor row ────────────────────────────────────────────── */
.editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}
.pane-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hero-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s2);
}
.editor-textarea {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--hero-border);
  border-radius: var(--r);
  color: var(--hero-text);
  resize: vertical;
  min-height: 320px;
  width: 100%;
  padding: var(--s4);
  transition: border-color 0.2s;
  outline: none;
}
.editor-textarea:focus { border-color: var(--teal); }
.preview-pane {
  min-height: 320px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hero-border);
  border-radius: var(--r);
  overflow-y: auto;
  padding: var(--s4) var(--s6);
  color: var(--hero-text);
}
.preview-placeholder { color: var(--hero-muted); font-style: italic; font-size: 0.9rem; }

/* Preview rendered markdown */
.preview-pane h1 { font-size: 1.6rem; margin-bottom: var(--s3); }
.preview-pane h2 { font-size: 1.3rem; margin: var(--s4) 0 var(--s2); }
.preview-pane h3 { font-size: 1.1rem; margin: var(--s3) 0 var(--s2); }
.preview-pane p  { margin-bottom: var(--s3); }
.preview-pane ul, .preview-pane ol { margin: var(--s2) 0 var(--s3) var(--s6); list-style: disc; }
.preview-pane ol { list-style: decimal; }
.preview-pane code { font-family: 'Fira Code', monospace; font-size: 0.85em; background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; }
.preview-pane pre { background: rgba(0,0,0,0.3); border-radius: var(--r); padding: var(--s4); overflow-x: auto; margin-bottom: var(--s3); }
.preview-pane pre code { background: none; padding: 0; }
.preview-pane blockquote { border-left: 3px solid var(--teal); padding-left: var(--s4); color: var(--hero-muted); margin-bottom: var(--s3); }
.preview-pane table { border-collapse: collapse; width: 100%; margin-bottom: var(--s3); }
.preview-pane th, .preview-pane td { border: 1px solid var(--hero-border); padding: var(--s2) var(--s3); font-size: 0.9rem; }
.preview-pane th { background: rgba(255,255,255,0.06); font-weight: 600; }
.preview-pane a { color: var(--teal); }
.preview-pane strong { font-weight: 700; }
.preview-pane em { font-style: italic; }

/* ── Action bar ────────────────────────────────────────────── */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s3);
  flex-wrap: wrap;
}
.btn-link {
  font-size: 0.82rem;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s2) 0;
  text-decoration: underline;
  transition: opacity 0.2s;
}
.btn-link:hover { opacity: 0.75; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-teal);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,191,166,0.35);
  text-decoration: none;
  color: #fff;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--surface-2); text-decoration: none; }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: var(--s20) 0; background: var(--bg); }
.section-alt { background: var(--bg-2); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--s3);
  color: var(--text);
}
.section-subtitle {
  text-align: center;
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto var(--s12);
}
.section-header { margin-bottom: var(--s12); }

/* ── Cards ─────────────────────────────────────────────────── */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s8);
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-card-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(0,191,166,0.12), rgba(0,102,255,0.12));
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s4);
  color: var(--teal);
}
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: var(--s2); color: var(--text); }
.feature-card p  { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

/* ── Grids ─────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s6); }

/* ── How it works ──────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s8); }
.step-card { text-align: center; }
.step-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--s4);
  box-shadow: var(--shadow-teal);
}
.step-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: var(--s2); color: var(--text); }
.step-card p  { font-size: 0.9rem; color: var(--text-2); }

/* ── FAQ accordion ─────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: var(--s3); max-width: 800px; margin: 0 auto; }
details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
details.faq-item summary {
  padding: var(--s4) var(--s6);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: background 0.2s;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--teal);
  font-weight: 300;
  transition: transform 0.3s;
  flex-shrink: 0;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item summary:hover { background: var(--surface-2); }
.faq-answer {
  padding: 0 var(--s6) var(--s4);
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
}
.faq-answer p { margin-bottom: var(--s2); }
.faq-answer code { font-family: 'Fira Code', monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* ── Related tools ─────────────────────────────────────────── */
.related-tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.related-tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}
.related-tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.related-tool-icon { width: 40px; height: 40px; color: var(--teal); }
.related-tool-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.related-tool-card p  { font-size: 0.85rem; color: var(--text-2); flex: 1; }
.related-tool-link { font-size: 0.82rem; color: var(--teal); font-weight: 600; }

/* ── CTA section ───────────────────────────────────────────── */
.cta-section {
  background: var(--hero-bg);
  padding: var(--s20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--hero-text); margin-bottom: var(--s4); }
.cta-section p  { color: var(--hero-muted); font-size: 1.05rem; margin-bottom: var(--s8); }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb-container { padding-top: var(--s4); padding-bottom: var(--s2); }
.breadcrumb-nav { font-size: 0.85rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; color: var(--text-3); }
.breadcrumb li { display: flex; align-items: center; gap: var(--s2); }
.breadcrumb li:not(:last-child)::after { content: '›'; color: var(--text-3); }
.breadcrumb a { color: var(--teal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-2); }

/* ── Blog cards ────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-body { padding: var(--s6); }
.blog-card-meta { display: flex; gap: var(--s3); font-size: 0.78rem; color: var(--text-3); margin-bottom: var(--s3); }
.blog-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: var(--s3); line-height: 1.3; }
.blog-card h2 a { color: var(--text); text-decoration: none; }
.blog-card h2 a:hover { color: var(--teal); }
.blog-card p { font-size: 0.9rem; color: var(--text-2); margin-bottom: var(--s4); line-height: 1.6; }
.blog-card-link { font-size: 0.88rem; color: var(--teal); font-weight: 600; }

/* ── Blog post ─────────────────────────────────────────────── */
.blog-post-header { padding: var(--s16) 0 var(--s8); background: var(--bg-2); }
.blog-post-meta { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: 0.85rem; color: var(--text-2); margin-bottom: var(--s4); align-items: center; }
.blog-post-meta span { display: flex; align-items: center; gap: var(--s1); }
.blog-post-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; margin-bottom: var(--s4); }
.blog-post-desc { font-size: 1.1rem; color: var(--text-2); max-width: 640px; }
.blog-post-content { max-width: 760px; margin: 0 auto; padding: var(--s12) var(--s6); }
.blog-post-content h2 { font-size: 1.5rem; margin: var(--s8) 0 var(--s4); }
.blog-post-content h3 { font-size: 1.2rem; margin: var(--s6) 0 var(--s3); }
.blog-post-content p  { margin-bottom: var(--s4); color: var(--text-2); line-height: 1.8; }
.blog-post-content ul, .blog-post-content ol { margin: var(--s3) 0 var(--s4) var(--s8); color: var(--text-2); }
.blog-post-content ul { list-style: disc; }
.blog-post-content ol { list-style: decimal; }
.blog-post-content li { margin-bottom: var(--s2); line-height: 1.7; }
.blog-post-content pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4); overflow-x: auto; margin-bottom: var(--s4); }
.blog-post-content code { font-family: 'Fira Code', monospace; font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.blog-post-content pre code { background: none; padding: 0; }
.blog-post-content blockquote { border-left: 3px solid var(--teal); padding-left: var(--s4); color: var(--text-2); margin-bottom: var(--s4); font-style: italic; }
.blog-post-content table { border-collapse: collapse; width: 100%; margin-bottom: var(--s4); }
.blog-post-content th, .blog-post-content td { border: 1px solid var(--border); padding: var(--s2) var(--s4); }
.blog-post-content th { background: var(--surface-2); font-weight: 700; }
.blog-post-content a { color: var(--teal); }
.blog-post-content img { border-radius: var(--r); margin: var(--s4) auto; }
.author-bio { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); margin: var(--s8) 0; }
.author-bio h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: var(--s2); }
.author-bio p { font-size: 0.9rem; color: var(--text-2); }

/* ── Tools hub cards ───────────────────────────────────────── */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.tool-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  transition: transform 0.25s, box-shadow 0.25s;
}
.tool-hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-hub-icon { width: 52px; height: 52px; color: var(--teal); margin-bottom: var(--s2); }
.tool-hub-card h2 { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.tool-hub-card p  { font-size: 0.9rem; color: var(--text-2); flex: 1; line-height: 1.6; }

/* ── Page hero (non-tool pages) ────────────────────────────── */
.page-hero {
  background: var(--bg-2);
  padding: var(--s16) 0 var(--s8);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: var(--s4); color: var(--text); }
.page-hero p, .page-hero p.lead { font-size: 1.05rem; color: var(--text-2); max-width: 640px; margin-bottom: var(--s2); }
.page-hero .hero-subtitle { color: var(--text-2); font-size: 1.1rem; max-width: 640px; margin-bottom: var(--s2); }

/* ── Contact form ──────────────────────────────────────────── */
.contact-form { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s4); }
.form-group { display: flex; flex-direction: column; gap: var(--s2); }
.form-group label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.75rem var(--s4);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--teal); }
.form-group textarea { min-height: 160px; resize: vertical; }
.form-alert {
  padding: var(--s4) var(--s6);
  border-radius: var(--r);
  font-size: 0.95rem;
  font-weight: 500;
}
.form-alert.success { background: rgba(0,191,166,0.1); border: 1px solid rgba(0,191,166,0.3); color: var(--teal); }
.form-alert.error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #ef4444; }

/* ── Changelog ─────────────────────────────────────────────── */
.changelog-entry { margin-bottom: var(--s12); padding-bottom: var(--s8); border-bottom: 1px solid var(--border); }
.changelog-entry:last-child { border-bottom: none; }
.changelog-version { font-size: 1.2rem; font-weight: 800; color: var(--teal); margin-bottom: var(--s2); }
.changelog-date { font-size: 0.85rem; color: var(--text-3); margin-bottom: var(--s4); }
.changelog-entry ul { list-style: disc; padding-left: var(--s6); color: var(--text-2); }
.changelog-entry li { margin-bottom: var(--s2); line-height: 1.6; }

/* ── Ad unit ───────────────────────────────────────────────── */
.ad-unit {
  width: 100%;
  max-width: 728px;
  margin: var(--s8) auto;
  text-align: center;
  min-height: 90px;
  background: transparent;
}

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Comparison table ──────────────────────────────────────── */
.comparison-table { width: 100%; border-collapse: collapse; margin: var(--s6) 0; }
.comparison-table th { background: var(--surface-2); font-weight: 700; padding: var(--s3) var(--s4); border: 1px solid var(--border); text-align: left; }
.comparison-table td { padding: var(--s3) var(--s4); border: 1px solid var(--border); color: var(--text-2); font-size: 0.9rem; }
.comparison-table tr:nth-child(even) td { background: var(--surface-2); }
.check { color: var(--teal); font-weight: 700; }
.cross { color: #ef4444; }

/* ── Content prose (about, privacy, terms) ─────────────────── */
.prose, .prose-container { max-width: 760px; margin: 0 auto; }
.prose h2, .prose-container h2 { font-size: 1.4rem; font-weight: 800; margin: var(--s8) 0 var(--s4); color: var(--text); }
.prose h3, .prose-container h3 { font-size: 1.1rem; font-weight: 700; margin: var(--s6) 0 var(--s3); color: var(--text); }
.prose p, .prose-container p { margin-bottom: var(--s4); color: var(--text-2); line-height: 1.8; }
.prose ul, .prose ol, .prose-container ul, .prose-container ol { margin: var(--s3) 0 var(--s4) var(--s8); color: var(--text-2); }
.prose ul, .prose-container ul { list-style: disc; }
.prose ol, .prose-container ol { list-style: decimal; }
.prose li, .prose-container li { margin-bottom: var(--s2); line-height: 1.7; }
.prose a, .prose-container a { color: var(--teal); }
.prose strong, .prose-container strong { color: var(--text); font-weight: 700; }
.prose code, .prose-container code { font-family: 'Fira Code', monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: 0.88em; }
.prose pre, .prose-container pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4); overflow-x: auto; margin-bottom: var(--s4); }
.prose pre code, .prose-container pre code { background: none; padding: 0; }
.prose table, .prose-container table { border-collapse: collapse; width: 100%; margin-bottom: var(--s4); }
.prose th, .prose td, .prose-container th, .prose-container td { border: 1px solid var(--border); padding: var(--s2) var(--s4); font-size: 0.9rem; }
.prose th, .prose-container th { background: var(--surface-2); font-weight: 700; }
.last-updated { font-size: 0.82rem; color: var(--text-3); margin-top: var(--s2); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--hero-bg);
  border-top: 1px solid var(--hero-border);
  padding: var(--s16) 0 0;
  color: var(--hero-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s12);
  padding-bottom: var(--s12);
}
.footer-brand .footer-logo { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s4); text-decoration: none; }
.footer-tagline { font-size: 0.9rem; color: var(--hero-muted); line-height: 1.7; margin-bottom: var(--s3); }
.footer-updated { font-size: 0.8rem; color: var(--hero-muted); opacity: 0.6; }
.footer-heading { font-size: 0.78rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s4); }
.footer-links li { margin-bottom: var(--s2); }
.footer-links a { font-size: 0.88rem; color: var(--hero-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid var(--hero-border);
  padding: var(--s4) 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--hero-muted);
  opacity: 0.7;
}
.footer-legal-links { display: flex; gap: var(--s4); }
.footer-legal-links a { color: var(--hero-muted); text-decoration: none; }
.footer-legal-links a:hover { color: var(--teal); }

/* ── Focus styles ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Output textarea (for HTML/MD output pages) ────────────── */
.output-textarea {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  resize: vertical;
  min-height: 320px;
  width: 100%;
  padding: var(--s4);
  outline: none;
  transition: border-color 0.2s;
}
.output-textarea:focus { border-color: var(--teal); }

/* ── Tool page content sections ────────────────────────────── */
.content-section { padding: var(--s16) 0; }
.content-section h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: var(--s4); }
.content-section h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: var(--s3); color: var(--text-2); }
.content-section p  { color: var(--text-2); line-height: 1.8; margin-bottom: var(--s4); }
.content-section ul { list-style: disc; padding-left: var(--s6); color: var(--text-2); margin-bottom: var(--s4); }
.content-section li { margin-bottom: var(--s2); line-height: 1.7; }

/* ── Inline tool action buttons row ───────────────────────── */
.btn-group { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.btn-copy {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 0.6rem 1.2rem; border-radius: var(--r);
  font-size: 0.88rem; font-weight: 500; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-copy:hover { background: var(--surface); border-color: var(--teal); }
.btn-copy.copied { color: var(--teal); border-color: var(--teal); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--s8); }
  .hero { min-height: auto; padding: var(--s12) 0; }
  .hero-subtitle { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .related-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --s20: 3rem; --s16: 2.5rem; }
  .hamburger { display: flex; }
  #nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(6,12,26,0.98);
    border-bottom: 1px solid var(--hero-border);
    padding: var(--s4);
  }
  #nav-menu.open { display: block; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-link { width: 100%; padding: var(--s3) var(--s4); border-radius: 0; }
  .nav-dropdown .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(255,255,255,0.04);
    border: none;
    padding-left: var(--s4);
  }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .editor-row { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .related-tools-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; gap: var(--s3); text-align: center; }
  .action-bar { justify-content: stretch; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .hero-text h1 { font-size: 2rem; }
  .blog-post-content { padding: var(--s8) var(--s4); }
  .page-hero { padding: var(--s8) 0 var(--s6); }
  .prose-container, .prose { padding: 0 var(--s2); }
  .glass-card { padding: var(--s4); border-radius: var(--r-lg); }
  .upload-zone { padding: var(--s6) var(--s3); }
  .editor-textarea { min-height: 200px; }
  .preview-pane { min-height: 200px; }
  .section { padding: var(--s12) 0; }
  .faq-list { gap: var(--s2); }
}

/* ── Section content typography (bare h2/h3/p in .section) ──── */
.section h2:not([class]) { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; color: var(--text); margin-bottom: var(--s3); margin-top: var(--s8); }
.section h3:not([class]) { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: var(--s2); margin-top: var(--s6); }
.section p:not([class]) { color: var(--text-2); line-height: 1.8; margin-bottom: var(--s4); }
.section ul:not([class]) { list-style: disc; padding-left: var(--s6); color: var(--text-2); margin-bottom: var(--s4); }
.section ol:not([class]) { list-style: decimal; padding-left: var(--s6); color: var(--text-2); margin-bottom: var(--s4); }
.section li:not([class]) { margin-bottom: var(--s2); line-height: 1.7; }

/* ── Inline icon badges / tag chips ────────────────────────── */
.tag { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; }
.tag-teal { background: rgba(0,191,166,0.1); border-color: rgba(0,191,166,0.3); color: var(--teal); }

/* ── About page team cards ──────────────────────────────────── */
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); text-align: center; }
.team-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: var(--s1); }
.team-card p { font-size: 0.88rem; color: var(--text-2); }

/* ── Word to MD / output-only converter pages ───────────────── */
.output-section { display: flex; flex-direction: column; gap: var(--s4); }
.output-section .pane-label { color: var(--text-3); }
.output-section .output-textarea { background: var(--surface-2); border-color: var(--border); color: var(--text); }

/* ── Blog post sidebar / table of contents ──────────────────── */
.blog-toc { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4) var(--s6); margin-bottom: var(--s8); }
.blog-toc h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: var(--s3); }
.blog-toc ul { list-style: disc; padding-left: var(--s4); }
.blog-toc li { margin-bottom: var(--s1); }
.blog-toc a { font-size: 0.88rem; color: var(--teal); }

/* ── Nav position context for mobile dropdown ───────────────── */
.site-header { position: sticky; }
@media (max-width: 640px) {
  .site-header { position: relative; }
}

/* ── Converter page: word-to-md / upload-only layout ────────── */
.upload-only-card { max-width: 600px; margin: 0 auto; }

/* ── Changelog header ───────────────────────────────────────── */
.changelog-header { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.changelog-entry h3 { font-size: 0.9rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; margin: var(--s4) 0 var(--s2); }

/* ── Content list (used on md-to-pdf power features) ───────── */
.content-list {
  list-style: disc;
  padding-left: var(--s6);
  color: var(--text-2);
  margin: var(--s4) 0 var(--s6);
}
.content-list li { margin-bottom: var(--s3); line-height: 1.7; }
.content-list strong { color: var(--text); font-weight: 700; }

/* ── Tool page content sections (below converter hero) ─────── */
.tool-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: var(--s10, 2.5rem) 0 var(--s4);
  color: var(--text);
}
.tool-content h2:first-child { margin-top: 0; }
.tool-content h3 { font-size: 1.1rem; font-weight: 700; margin: var(--s6) 0 var(--s3); color: var(--text); }
.tool-content p  { color: var(--text-2); line-height: 1.8; margin-bottom: var(--s4); }
.tool-content ul, .tool-content ol { margin: var(--s3) 0 var(--s4) var(--s6); color: var(--text-2); }
.tool-content ul { list-style: disc; }
.tool-content ol { list-style: decimal; }
.tool-content li { margin-bottom: var(--s2); line-height: 1.7; }
.tool-content strong { color: var(--text); font-weight: 700; }

/* ── Tools hub grid ─────────────────────────────────────────── */
.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s6);
}
.tool-hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.tool-hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tool-hub-badge {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tool-hub-cta { font-size: 0.88rem; font-weight: 600; color: var(--teal); margin-top: auto; }

/* ── Blog list (blog/index.php) ─────────────────────────────── */
.blog-list { display: flex; flex-direction: column; gap: var(--s8); }
.blog-card { background: none; box-shadow: none; border: none; padding: 0; }
.blog-card-title { font-size: 1.3rem; font-weight: 700; margin: var(--s2) 0 var(--s3); line-height: 1.3; }
.blog-card-title a { color: var(--text); text-decoration: none; }
.blog-card-title a:hover { color: var(--teal); }
.blog-card-excerpt { color: var(--text-2); line-height: 1.7; margin-bottom: var(--s3); }
.blog-read-more { font-size: 0.9rem; font-weight: 600; color: var(--teal); }
.blog-read-more:hover { text-decoration: underline; }
.blog-sep { color: var(--text-3); }
.blog-date, .blog-read, .blog-author { font-size: 0.8rem; color: var(--text-3); }

/* ── Contact page ───────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--s12);
  align-items: start;
}
.contact-info h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: var(--s4); color: var(--text); }
.contact-info p  { color: var(--text-2); line-height: 1.8; margin-bottom: var(--s4); }
.contact-info h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: var(--s3); }
.contact-info ul { list-style: disc; padding-left: var(--s6); color: var(--text-2); line-height: 2; }
.contact-item { display: flex; align-items: center; gap: var(--s3); color: var(--text-2); margin-bottom: var(--s3); }
.contact-item svg { color: var(--teal); flex-shrink: 0; }
.contact-item a  { color: var(--teal); }

/* ── Alert boxes (contact form feedback) ────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4) var(--s4);
  border-radius: var(--r);
  margin-bottom: var(--s6);
  font-size: 0.95rem;
  line-height: 1.6;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: #DCFCE7; border: 1px solid #86EFAC; color: #166534; }
.alert-error   { background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B; }
[data-theme="dark"] .alert-success { background: #14532D; border-color: #166534; color: #86EFAC; }
[data-theme="dark"] .alert-error   { background: #450A0A; border-color: #991B1B; color: #FCA5A5; }

/* ── Changelog badges & change-type labels ──────────────────── */
.changelog-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-new { background: var(--teal); color: #fff; }
.change-type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: var(--s2);
  vertical-align: middle;
}
.change-type.new      { background: #DCFCE7; color: #166534; }
.change-type.improved { background: #DBEAFE; color: #1D4ED8; }
.change-type.fixed    { background: #FEF9C3; color: #854D0E; }
[data-theme="dark"] .change-type.new      { background: #14532D; color: #86EFAC; }
[data-theme="dark"] .change-type.improved { background: #1E3A5F; color: #93C5FD; }
[data-theme="dark"] .change-type.fixed    { background: #422006; color: #FDE68A; }

/* ── About page: who-grid ───────────────────────────────────── */
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s6);
  margin-top: var(--s6);
}
.who-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
}
.who-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--s3); color: var(--text); }
.who-card p  { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; }

/* ── Tools list in about.php ────────────────────────────────── */
.tools-list-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.tools-list-item {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.tools-list-item:last-child { border-bottom: none; }
.tools-list-item a { color: var(--teal); font-weight: 600; white-space: nowrap; }
.tools-list-item p { font-size: 0.88rem; color: var(--text-2); margin: 0; line-height: 1.5; }

/* ── Section separator ──────────────────────────────────────── */
.section-separator {
  height: 1px;
  background: var(--border);
  margin: var(--s12) 0;
}

/* ── Responsive: contact grid & tools hub ───────────────────── */
@media (max-width: 768px) {
  .contact-grid  { grid-template-columns: 1fr; gap: var(--s8); }
  .tools-hub-grid { grid-template-columns: 1fr; }
}

/* ── Print styles ───────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .ad-unit, .cta-section { display: none; }
  body { background: #fff; color: #000; }
  .section { padding: 1rem 0; }
}
