:root {
  /* Colors */
  --bg:              #f7f7f5;
  --surface:         #eceef1;
  --surface-2:       #e4e6ea;
  --footer-bg:       #ffffff;
  --border:          rgba(20,21,26,0.12);
  --text:            #14151a;
  --text-muted:      #52545c;
  --text-dim:        #7d7f87;
  --accent:          #ff5c33;
  --accent-strong:   #c94523;
  --success:         #1f9d5c;
  --danger:          #d1373f;

  /* Typography */
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Layout */
  --radius:   10px;
  --radius-lg: 18px;
  --max:      1120px;
  --max-prose: 760px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(20,21,26,0.06), 0 1px 2px rgba(20,21,26,0.04);
  --shadow:    0 4px 16px rgba(20,21,26,0.08);
  --shadow-dropdown: 0 18px 40px -14px rgba(20,21,26,0.28), 0 2px 8px rgba(20,21,26,0.06);
}

/* Dark mode */
html[data-theme="dark"] {
  --bg:        #131419;
  --surface:   #1e2027;
  --surface-2: #242730;
  --footer-bg: #0d0d12;
  --border:    rgba(255,255,255,0.12);
  --text:      #ffffff;
  --text-muted:#c5c5c5;
  --text-dim:  #8a8b91;
  --success:   #4ade80;
  --danger:    #f87171;
  --shadow-dropdown: 0 18px 40px -12px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.06);
}


/* ─────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-family: var(--sans);
}
p  { margin: 0; }
a  { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }


/* ─────────────────────────────────────────────
   3. LAYOUT UTILITIES
───────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.prose-wrap {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section-head { max-width: 560px; margin: 0 auto 40px; text-align: center; }
.section-head .kicker {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.section-head p  { color: var(--text-muted); margin-top: 12px; font-size: 15.5px; }


/* ─────────────────────────────────────────────
   4. HEADER & NAVIGATION
───────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 40;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .site-header { background: rgba(13,13,18,0.9); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  flex-shrink: 0;
  text-decoration: none;
}
.logo svg   { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.logo span  { color: var(--accent); }

/* Header right */
.header-right { display: flex; align-items: center; gap: 14px; }

/* Primary nav */
nav.primary-nav { display: flex; align-items: center; gap: 28px; }
nav.primary-nav a {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.15s ease;
  padding: 4px 0;
}
nav.primary-nav a:hover  { color: var(--accent); }
nav.primary-nav a.is-active { color: var(--text); font-weight: 500; }

/* More dropdown nav item */
.nav-item { position: relative; }
.more-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 15px; padding: 4px 0;
  transition: color 0.15s ease;
}
.more-btn:hover { color: var(--accent); }
.more-btn svg { width: 12px; height: 12px; transition: transform 0.15s ease; }
.nav-item.open .more-btn     { color: var(--accent); }
.nav-item.open .more-btn svg { transform: rotate(180deg); }

/* Dropdown */
.dropdown-menu {
  display: flex; flex-direction: row; align-items: stretch; gap: 14px;
  position: absolute; top: calc(100% + 14px); right: 0;
  min-width: 300px;
  background: #ffffff;
  border-radius: 20px; padding: 14px;
  box-shadow: var(--shadow-dropdown);
  z-index: 50;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.nav-item.open .dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.dropdown-links { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dropdown-menu a {
  font-size: 15px; color: #14151a;
  padding: 10px 12px; border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-menu a:hover { background: #f2f1ef; color: var(--accent); }
.dropdown-divider { height: 1px; background: rgba(20,21,26,0.12); margin: 6px 8px; }
.dropdown-visual {
  flex-shrink: 0; width: 116px; border-radius: 14px;
  background: rgba(255,92,51,0.1);
  display: flex; align-items: center; justify-content: center;
}
.dropdown-visual svg { width: 64px; height: 64px; color: var(--accent); }

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--border);
  border-radius: 7px; padding: 7px;
  color: var(--text); flex-shrink: 0;
}
.menu-toggle svg { width: 20px; height: 20px; display: block; }

/* Dark mode toggle */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: 7px; padding: 7px;
  color: var(--text); flex-shrink: 0;
  transition: border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }


/* ─────────────────────────────────────────────
   5. FOOTER
───────────────────────────────────────────── */
footer { background: var(--footer-bg); padding: 56px 0 32px; }

.footer-top {
  display: flex; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { max-width: 280px; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 12.5px; color: var(--text-muted);
  font-weight: 600; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a  { font-size: 15px; color: var(--text); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px; color: var(--text-muted);
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text); }


/* ─────────────────────────────────────────────
   6. HERO (front page)
───────────────────────────────────────────── */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 40px; }

.hero-copy { text-align: center; max-width: 640px; }
.hero-copy h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.hero-copy p.lede {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto; margin-right: auto;
  line-height: 1.65;
}

/* Badges */
.badges { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.badge {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px;
  display: flex; align-items: center; gap: 6px;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* Preset chips */
.preset-chips { margin-top: 28px; text-align: center; }
.preset-chips > p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  font-size: 12.5px; font-family: var(--mono);
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 12px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.chip:hover, .chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,92,51,0.06);
}


/* ─────────────────────────────────────────────
   7. TOOL CARD & UPLOAD ZONE
───────────────────────────────────────────── */
.tool-card {
  background: var(--footer-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  z-index: 10;
  /* isolation removed — was causing extra paint layers */
  will-change: auto;
}

html[data-theme="dark"] .tool-card { background: var(--surface); }

/* Upload zone */
.upload-zone {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  padding: 36px 24px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
  isolation: isolate;        /* prevents ad injection inside zone */
  overflow: hidden;          /* clips any injected ad iframe */
  z-index: 5;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(255,92,51,0.05);
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.upload-icon { font-size: 2rem; line-height: 1; }
.upload-zone p     { font-size: 14px; color: var(--text-muted); }
.upload-zone strong{ color: var(--text); }
.upload-zone small { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }

/* File loaded state (shown inside upload-zone after pick) */
.upload-meta { width: 100%; margin-top: 10px; display: none; }
.file-loaded {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(31,157,92,0.08);
  border: 1px solid rgba(31,157,92,0.25);
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
}
.file-loaded svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }
.file-loaded .sep { color: var(--text-dim); }
#uploadFileName {
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 160px;
}
#uploadFileSize { color: var(--text-muted); font-family: var(--mono); font-size: 12px; flex-shrink: 0; }

/* Target size row */
.target-row { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.target-box {
  display: flex; align-items: center; gap: 8px;
  flex: 1; height: 44px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 6px 0 16px;
  transition: border-color 0.15s ease;
}
.target-box:focus-within { border-color: var(--accent); }
.target-box input[type="number"] {
  flex: 1; background: transparent; border: none;
  color: var(--text); font-family: var(--mono);
  font-size: 15px; font-weight: 600;
  padding: 0; height: 100%; min-width: 0;
  -moz-appearance: textfield;
}
.target-box input[type="number"]::-webkit-outer-spin-button,
.target-box input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.target-box input[type="number"]:focus-visible { outline: none; }
.target-box .unit {
  font-family: var(--mono); font-size: 13px;
  color: var(--text-muted); padding-right: 10px; flex-shrink: 0;
}

/* Convert button */
.convert-btn {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; height: 44px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; padding: 0 22px;
  transition: background 0.15s ease;
}
.convert-btn:hover   { background: var(--accent-strong); }
.convert-btn:disabled{ background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }


/* ─────────────────────────────────────────────
   8. PROGRESS BAR
───────────────────────────────────────────── */
.progress-wrap { display: none; margin-top: 14px; }
.progress-wrap.active { display: block; }
.progress-track {
  height: 6px; background: var(--surface-2);
  border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.progress-text {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-muted); margin-top: 6px; text-align: center;
}


/* ─────────────────────────────────────────────
   9. RESULT PANEL
───────────────────────────────────────────── */
.result-panel {
  display: none;
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.25s ease;
}
.result-panel.visible { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.result-preview {
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  min-height: 120px;
}
.result-preview img {
  max-width: 100%; max-height: 280px;
  object-fit: contain; display: block; border-radius: var(--radius);
}

.result-stats {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 8px; margin-bottom: 16px;
}
.stat-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 8px; text-align: center;
}
.stat-box .label {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.stat-box .value {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-top: 4px; word-break: break-all;
}
.stat-box .value.success { color: var(--success); }
.stat-box .value.warn    { color: var(--accent); }

/* Result action buttons */
.result-actions { display: flex; gap: 10px; }
.btn {
  flex: 1; padding: 13px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; border: none;
  background: var(--surface-2); color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover  { background: var(--accent-strong); }
.btn:not(.primary):hover { color: var(--accent); }


/* ─────────────────────────────────────────────
   10. PRESET CHIPS & BADGES  (already in §6)
───────────────────────────────────────────── */
/* Defined above in §6 hero section */


/* ─────────────────────────────────────────────
   11. KB ↔ MB CONVERTER WIDGET
───────────────────────────────────────────── */
.converter-widget {
  width: 100%; max-width: 560px;
  background: var(--footer-bg);
  border-radius: var(--radius-lg); padding: 22px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .converter-widget { background: var(--surface); }
.converter-widget h3 {
  font-size: 14px; font-weight: 600;
  color: var(--text); margin-bottom: 14px;
}
.converter-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.converter-row:last-child { margin-bottom: 0; }
.converter-row input {
  flex: 1; height: 40px; padding: 0 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono); font-size: 14px;
  color: var(--text); transition: border-color 0.15s ease;
}
.converter-row input:focus { outline: none; border-color: var(--accent); }
.converter-row .arrow { font-family: var(--mono); color: var(--text-dim); font-size: 14px; flex-shrink: 0; }
.converter-result {
  flex: 1; height: 40px; padding: 0 14px;
  background: rgba(255,92,51,0.08);
  border: 1.5px solid rgba(255,92,51,0.2);
  border-radius: var(--radius);
  font-family: var(--mono); font-size: 14px;
  font-weight: 600; color: var(--accent);
  display: flex; align-items: center;
}


/* ─────────────────────────────────────────────
   12. HOMEPAGE SECTIONS
───────────────────────────────────────────── */

/* How it works — steps */
.steps-list {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0;
}
.step { padding: 24px 20px; text-align: center; }
.step .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.step h3   { font-size: 16px; font-weight: 600; margin-top: 10px; }
.step p    { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }

/* Tools grid */
.tools-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.tool-link-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s ease;
  background: var(--footer-bg);
}
.tool-link-card:hover { border-color: var(--accent); }
.tool-link-card .card-kb    { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.tool-link-card .card-title { font-size: 14px; font-weight: 600; margin-top: 4px; }
.tool-link-card .card-desc  { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

/* Why list */
.why-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 0; }
.why-item {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 10px; padding: 28px 24px;
}
.why-item svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.why-item h3  { font-size: 15.5px; font-weight: 600; }
.why-item p   { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.6; }

/* FAQ — uses native <details> */
.faq-list { border-top: 1px solid var(--border); }
details.faq-item { border-bottom: 1px solid var(--border); }
details.faq-item summary {
  padding: 18px 0; cursor: pointer;
  font-weight: 500; font-size: 15px;
  list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+'; font-family: var(--mono);
  color: var(--text-muted); font-size: 18px; flex-shrink: 0;
}
details.faq-item[open] summary::after { content: '–'; }
details.faq-item .faq-body {
  padding: 0 0 20px;
  color: var(--text-muted); font-size: 14.5px;
  line-height: 1.7; max-width: 700px;
}
details.faq-item .faq-body a { color: var(--accent); text-decoration: underline; }


/* ─────────────────────────────────────────────
   13. TOOL PAGE (page-kb-tool.php)
───────────────────────────────────────────── */

/* Breadcrumb */
nav.pg-breadcrumb {
  display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
nav.pg-breadcrumb a { color: var(--accent); }
nav.pg-breadcrumb a:hover { text-decoration: underline; }
nav.pg-breadcrumb span { color: var(--text-dim); }

/* Tool page hero */
.tool-page-hero { padding: 48px 0 36px; border-bottom: 1px solid var(--border); }
.tool-page-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800; color: var(--text);
  letter-spacing: -0.025em; line-height: 1.15;
  margin-bottom: 12px;
}
.tool-page-hero p {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.65; max-width: 560px;
  margin-bottom: 20px;
}


/* ─────────────────────────────────────────────
   14. CONTENT BLOCK — unified article typography
   Used on: tool pages, single posts, static pages
───────────────────────────────────────────── */
.content-block,
.pg-content,
.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Headings */
.content-block h2, .pg-content h2, .article-content h2 {
  font-size: 1.35rem; font-weight: 700;
  color: var(--text); margin: 2em 0 0.6em;
  letter-spacing: -0.01em; line-height: 1.25;
}
.content-block h3, .pg-content h3, .article-content h3 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text); margin: 1.6em 0 0.5em;
}
.content-block h4, .pg-content h4, .article-content h4 {
  font-size: 1rem; font-weight: 700;
  color: var(--text); margin: 1.4em 0 0.4em;
}
.content-block h2:first-child,
.pg-content h2:first-child,
.article-content h2:first-child { margin-top: 0; }

/* Paragraphs */
.content-block p, .pg-content p, .article-content p {
  margin-bottom: 1.25em;
}
.content-block p:last-child,
.pg-content p:last-child,
.article-content p:last-child { margin-bottom: 0; }

/* Links */
.content-block a, .pg-content a, .article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.content-block a:hover, .pg-content a:hover, .article-content a:hover {
  color: var(--accent-strong);
}

/* Strong, em */
.content-block strong, .pg-content strong, .article-content strong {
  color: var(--text); font-weight: 600;
}
.content-block em, .pg-content em, .article-content em { font-style: italic; }

/* Lists */
.content-block ul,  .pg-content ul,  .article-content ul,
.content-block ol,  .pg-content ol,  .article-content ol {
  margin: 0.8em 0 1.25em 1.5em;
  padding: 0; list-style: revert;
}
.content-block li, .pg-content li, .article-content li {
  margin-bottom: 0.4em; line-height: 1.75;
}

/* Blockquote */
.content-block blockquote,
.pg-content blockquote,
.article-content blockquote {
  border-left: 3px solid var(--accent);
  background: rgba(255,92,51,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.8em 0; padding: 14px 20px;
  color: var(--text-muted);
}
.content-block blockquote p,
.pg-content blockquote p,
.article-content blockquote p { margin-bottom: 0; }

/* Horizontal rule */
.content-block hr, .pg-content hr, .article-content hr {
  border: none; border-top: 1px solid var(--border); margin: 2.4em 0;
}

/* Tables */
.content-block table,
.pg-content table,
.article-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.6em 0; font-size: 14px;
  display: block; overflow-x: auto;
}
.content-block th, .pg-content th, .article-content th {
  background: var(--surface); font-weight: 600;
  text-align: left; padding: 11px 14px;
  border: 1px solid var(--border); color: var(--text);
}
.content-block td, .pg-content td, .article-content td {
  padding: 11px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.content-block tr:nth-child(even) td,
.pg-content tr:nth-child(even) td,
.article-content tr:nth-child(even) td { background: var(--surface); }

/* Images */
.content-block img, .pg-content img, .article-content img {
  max-width: 100%; height: auto;
  border-radius: var(--radius);
  display: block; margin: 1.4em auto;
}

/* Code */
.content-block code, .pg-content code, .article-content code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px;
  font-size: 0.87em; font-family: var(--mono);
  color: var(--text);
}
.content-block pre, .pg-content pre, .article-content pre {
  background: #1e2027; color: #e2e8f0;
  border-radius: var(--radius); padding: 18px 22px;
  overflow-x: auto; margin: 1.6em 0;
  font-size: 14px; line-height: 1.7; font-family: var(--mono);
}
.content-block pre code,
.pg-content pre code,
.article-content pre code { background: none; border: none; padding: 0; color: inherit; }

/* Highlight box (used inline in content) */
.highlight-box {
  background: rgba(255,92,51,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; margin: 18px 0;
  font-size: 0.93rem; color: var(--text-muted);
}

/* Content section wrapper (tool pages, front page SEO block) */
.content-section { padding: 56px 0; }
.content-inner {
  max-width: var(--max-prose);
  margin: 0 auto; padding: 0 24px;
}


/* ─────────────────────────────────────────────
   15. RELATED TAGS
───────────────────────────────────────────── */
.related-links { padding: 36px 0; border-top: 1px solid var(--border); }
.related-links h3 {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 14px;
}
.related-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.related-tag {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 10px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.related-tag:hover { border-color: var(--accent); color: var(--accent); }


/* ─────────────────────────────────────────────
   16. BLOG LISTING PAGE (page-blog.php)
───────────────────────────────────────────── */
.blog-page { background: var(--bg); min-height: 100vh; }

/* Hero */
.blog-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--border); text-align: center; }
.blog-hero-inner { max-width: 620px; margin: 0 auto; padding: 0 24px; }
.blog-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,92,51,0.08);
  border: 1.5px solid rgba(255,92,51,0.22);
  border-radius: 999px; padding: 5px 16px;
  font-size: 12.5px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 18px;
  font-family: var(--mono);
}
.blog-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800; color: var(--text);
  letter-spacing: -0.025em; margin-bottom: 14px;
}
.blog-hero .lede { font-size: 16px; color: var(--text-muted); line-height: 1.7; }

/* Blog wrap */
.blog-wrap { max-width: 860px; margin: 0 auto; padding: 48px 24px 88px; }

/* Featured post */
.post-featured {
  display: flex; align-items: center; gap: 28px;
  background: var(--footer-bg);
  border: 1.5px solid var(--border);
  border-radius: 22px; padding: 36px 40px;
  margin-bottom: 28px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}
.post-featured::before {
  content: '✦ Featured';
  position: absolute; top: 14px; right: 20px;
  font-size: 11px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.06em;
  text-transform: uppercase; font-family: var(--mono);
}
.post-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(255,92,51,0.10);
  transform: translateY(-3px);
}
.post-featured .post-body { flex: 1; min-width: 0; }
.post-featured .tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,92,51,0.08);
  border: 1.5px solid rgba(255,92,51,0.18);
  border-radius: 999px; padding: 4px 12px;
  font-size: 11.5px; font-weight: 700;
  color: var(--accent); margin-bottom: 12px;
  font-family: var(--mono);
}
.post-featured h2 {
  font-size: 1.3rem; font-weight: 800;
  color: var(--text); line-height: 1.28;
  margin-bottom: 10px; letter-spacing: -0.01em;
}
.post-featured p {
  font-size: 0.94rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 16px;
}
.post-featured .read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--accent);
  transition: gap 0.15s ease;
}
.post-featured:hover .read-more { gap: 10px; }
.post-featured .visual {
  flex-shrink: 0; width: 100px; height: 100px;
  background: rgba(255,92,51,0.07);
  border: 1.5px solid rgba(255,92,51,0.14);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.post-featured .visual svg { width: 38px; height: 38px; color: var(--accent); }
.post-featured .visual img { width:100%; height:100%; object-fit:cover; display:block; }

/* Post grid */
.post-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 28px; }

/* Post card */
.post-card {
  background: var(--footer-bg);
  border: 1.5px solid var(--border);
  border-radius: 16px; padding: 24px 26px;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(255,92,51,0.10);
  transform: translateY(-2px);
}
.post-card .tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,92,51,0.07);
  border: 1.5px solid rgba(255,92,51,0.14);
  border-radius: 999px; padding: 3px 11px;
  font-size: 11px; font-weight: 700;
  color: var(--accent); width: fit-content; font-family: var(--mono);
}
.post-card h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text); line-height: 1.38; margin: 0;
}
.post-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; margin: 0; }
.post-card .card-read {
  font-size: 12px; font-weight: 700; color: var(--accent);
  margin-top: auto; padding-top: 6px;
  display: flex; align-items: center; gap: 4px; font-family: var(--mono);
}
.post-card .card-read::after { content: ' →'; }

/* Pagination */
.blog-pagination {
  display: flex; justify-content: center;
  align-items: center; gap: 8px;
  margin-bottom: 52px; flex-wrap: wrap;
}
.blog-pagination a,
.blog-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: var(--radius); font-size: 13.5px; font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted); background: var(--footer-bg);
  font-family: var(--mono); transition: all 0.15s ease;
}
.blog-pagination a:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(255,92,51,0.06);
}
.blog-pagination .current {
  background: var(--accent); color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255,92,51,0.28);
}

/* Newsletter */
.blog-newsletter {
  background: rgba(255,92,51,0.04);
  border: 1.5px solid rgba(255,92,51,0.16);
  border-radius: 22px; padding: 44px 40px; text-align: center;
}
.blog-newsletter h3 {
  font-size: 1.3rem; font-weight: 800; color: var(--text);
  margin-bottom: 10px; letter-spacing: -0.01em;
}
.blog-newsletter > p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.65; }
.newsletter-form {
  display: flex; gap: 10px; max-width: 440px; margin: 0 auto 12px;
}
.newsletter-form input[type="email"] {
  flex: 1; height: 48px; background: var(--footer-bg);
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: 0 20px; font-family: var(--sans);
  font-size: 0.94rem; color: var(--text); outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.newsletter-form input[type="email"]::placeholder { color: var(--text-dim); }
.newsletter-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,92,51,0.10);
}
.newsletter-form button {
  height: 48px; padding: 0 26px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 999px;
  font-size: 0.92rem; font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255,92,51,0.24);
  transition: background 0.15s ease, transform 0.15s ease;
}
.newsletter-form button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.newsletter-note { font-size: 12.5px; color: var(--text-dim); font-family: var(--mono); }


/* ─────────────────────────────────────────────
   17. STATIC PAGES (page.php)
   About, Contact, Privacy, Terms, Disclaimer
───────────────────────────────────────────── */
.page-wrap { padding: 48px 0 80px; min-height: 60vh; }

/* Page hero */
.pg-hero { padding: 48px 0 36px; border-bottom: 1px solid var(--border); }
.pg-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800; color: var(--text);
  letter-spacing: -0.025em; line-height: 1.15;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

/* Content area */
.pg-article { max-width: var(--max-prose); padding: 0 24px; }


/* ─────────────────────────────────────────────
   18. SINGLE BLOG POST (single.php)
───────────────────────────────────────────── */
.article-page { background: var(--bg); min-height: 60vh; }

/* Breadcrumb */
.breadcrumb-bar { border-bottom: 1px solid var(--border); }
.breadcrumb-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb-inner a { color: var(--accent); }
.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-inner span { color: var(--text-dim); }

/* Article layout */
.article-wrap { max-width: var(--max-prose); margin: 0 auto; padding: 48px 24px 80px; }

.article-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800; color: var(--text);
  line-height: 1.15; letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.article-meta {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 32px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.article-meta .sep { color: var(--text-dim); }

.article-featured-img { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.article-featured-img img { width: 100%; height: auto; display: block; }

.article-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Related articles */
.related-section { padding: 44px 24px 52px; }
.related-inner { max-width: var(--max-prose); margin: 0 auto; }
.related-heading { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 18px; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 20px; background: var(--footer-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.related-card-date    { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.related-card-title   { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }
.related-card:hover .related-card-title { color: var(--accent); }
.related-card-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.related-card-read    { font-size: 12px; font-weight: 600; color: var(--accent); margin-top: 2px; }

/* Article CTA box */
.article-cta  { max-width: var(--max-prose); margin: 0 auto; padding: 0 24px 60px; }
.cta-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px; text-align: center;
}
.cta-box h2  { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.cta-box p   { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.cta-btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 13px 28px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta-btn:hover { background: var(--accent-strong); transform: translateY(-1px); color: #fff; }


/* ─────────────────────────────────────────────
   19. TOAST & STICKY DOWNLOAD
───────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text); color: #fff;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500; font-family: var(--mono);
  z-index: 9999; transition: transform 0.35s ease;
  white-space: nowrap; box-shadow: var(--shadow);
}
.toast.show    { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

.sticky-download {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--accent); color: #fff;
  padding: 16px 24px; font-size: 1rem; font-weight: 700;
  text-align: center; z-index: 200; border: none;
  font-family: var(--sans); display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}


/* ─────────────────────────────────────────────
   20. RESPONSIVE
───────────────────────────────────────────── */

/* ── 880px — tablet/mobile nav breakpoint ── */
@media (max-width: 880px) {
  /* Show hamburger */
  .menu-toggle { display: block; }

  /* Nav becomes mobile drawer */
  nav.primary-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(20,21,26,0.12);
    padding: 10px 24px 16px;
    box-shadow: 0 12px 24px -12px rgba(20,21,26,0.18);
  }
  nav.primary-nav.open { display: flex; }
  nav.primary-nav a {
    padding: 11px 0;
    border-bottom: 1px solid rgba(20,21,26,0.08);
    color: #14151a;
  }
  .nav-item {
    position: static;
    border-bottom: 1px solid rgba(20,21,26,0.08);
  }
  .more-btn {
    width: 100%; justify-content: space-between;
    padding: 11px 0; color: #14151a;
  }
  .nav-item.open .more-btn { color: var(--accent); }
  .dropdown-menu {
    position: static; display: flex; flex-direction: column;
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: none; box-shadow: none;
    border: 1px solid rgba(20,21,26,0.1);
    border-radius: 14px; background: #fbfaf9;
    padding: 0 12px; margin: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  }
  .nav-item.open .dropdown-menu { max-height: 320px; padding: 10px 12px; margin: 8px 0 12px; }
  .dropdown-visual { display: none; }
  .site-header .wrap { position: relative; }

  /* Sections */
  .section       { padding: 48px 0; }
  .steps-list    { grid-template-columns: repeat(2,1fr); }
  .why-list      { grid-template-columns: 1fr; }
  .tools-grid    { grid-template-columns: repeat(2,1fr); }
  .hero          { padding: 40px 0 52px; }
  .hero .wrap    { gap: 32px; }

  /* Footer */
  .footer-top  { flex-direction: column; gap: 28px; }
  .footer-cols { gap: 32px; }

  /* Blog */
  .post-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 640px — mobile ── */
@media (max-width: 640px) {
  .wrap       { padding: 0 18px; }
  .prose-wrap { padding: 0 18px; }
  .site-header .wrap { height: 60px; }

  /* Hero */
  .hero { padding: 32px 0 44px; }
  .hero-copy h1 { font-size: 26px; }
  .hero-copy p.lede { font-size: 15px; }

  /* Tool card */
  .tool-card    { padding: 20px 16px; }
  .upload-zone  { padding: 28px 16px; }
  .target-row   { flex-direction: column; gap: 10px; }
  .target-box   { width: 100%; }
  .convert-btn  { width: 100%; height: 48px; font-size: 15px; }

  /* Result */
  .result-stats   { grid-template-columns: repeat(2,1fr); }
  .result-actions { flex-direction: column; }

  /* Converter widget */
  .converter-row         { flex-direction: column; gap: 6px; }
  .converter-row input,
  .converter-result      { width: 100%; }
  .converter-row .arrow  { display: none; }

  /* Chips */
  .chip-row { gap: 6px; }
  .chip     { font-size: 12px; padding: 6px 9px; }

  /* Homepage sections */
  .steps-list    { grid-template-columns: 1fr; }
  .tools-grid    { grid-template-columns: 1fr 1fr; }
  .section-head  { margin-bottom: 28px; }

  /* Sticky download */
  .sticky-download { display: block; }

  /* Blog */
  .blog-hero    { padding: 40px 0 32px; }
  .blog-wrap    { padding: 32px 18px 60px; }
  .post-featured {
    flex-direction: column;
    padding: 24px 22px 28px; border-radius: 18px;
  }
  .post-featured .visual  { display: none; }
  .post-featured::before  { display: none; }
  .post-featured h2       { font-size: 1.1rem; }
  .post-grid              { grid-template-columns: 1fr; }
  .post-card              { padding: 20px; }
  .blog-newsletter        { padding: 32px 20px; border-radius: 18px; }
  .newsletter-form        { flex-direction: column; }
  .newsletter-form input[type="email"],
  .newsletter-form button { width: 100%; border-radius: 12px; }

  /* Tool page */
  .tool-page-hero   { padding: 28px 0 20px; }
  .tool-page-hero h1{ font-size: 22px; }
  .tool-page-hero p { font-size: 14px; }

  /* Content block */
  .content-block, .pg-content, .article-content { font-size: 15px; }
  .content-block h2, .pg-content h2, .article-content h2 { font-size: 1.15rem; }
  .content-block h3, .pg-content h3, .article-content h3 { font-size: 1rem; }
  .content-inner { padding: 0 18px; }

  /* Static pages */
  .page-wrap  { padding: 28px 0 60px; }
  .pg-hero h1 { font-size: 22px; padding-bottom: 16px; margin-bottom: 22px; }
  .pg-article { padding: 0 18px; }

  /* Single post */
  .article-wrap    { padding: 28px 18px 56px; }
  .article-title   { font-size: 22px; }
  .related-section { padding: 32px 18px 40px; }
  .article-cta     { padding: 0 18px 48px; }
  .cta-box         { padding: 24px 18px; }

  /* Footer */
  .footer-top    { flex-direction: column; gap: 24px; }
  .footer-cols   { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
}

/* ── 460px — small phones ── */
@media (max-width: 460px) {
  .tools-grid { grid-template-columns: 1fr; }
  .badges     { gap: 6px; }
  .badge      { font-size: 11px; padding: 5px 10px; }
  .result-stats { grid-template-columns: repeat(2,1fr); }
}

/* ── Breadcrumb ── */
.kb-breadcrumb {
  border-bottom: 1px solid var(--border);
}
.kb-breadcrumb .wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 14px;
  padding-bottom: 14px;
}
.kb-breadcrumb a        { color: var(--accent); }
.kb-breadcrumb a:hover  { text-decoration: underline; }
.kb-breadcrumb span     { color: var(--text-dim); }

/* ── Hero — matches homepage style exactly ── */
.kb-hero {
  /* Same gradient as homepage hero */
  padding: 64px 0 72px;
  background: var(--bg);
}
.kb-hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* Copy block — identical to .hero-copy on homepage */
.kb-hero-copy {
  text-align: center;
  max-width: 680px;
}
.kb-hero-copy h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.kb-hero-copy p.lede {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Article section — blog-style, no border, centered ── */
.kb-article-section {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border);
}
.kb-article-inner {
  max-width: 760px;   /* same as blog article */
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .kb-hero       { padding: 36px 0 48px; }
  .kb-hero-copy h1 { font-size: 24px; }
  .kb-hero-copy p.lede { font-size: 15px; }
  .kb-article-inner { padding: 0 18px; }
  .kb-article-section { padding: 40px 0 32px; }
}
/* ══════════════════════════════════════════════
   PHOTO / SIGNATURE RESIZER PAGE
   page-photo-resizer.php additions
   Paste at the VERY BOTTOM of main.css
   (after the kb-tool additions)
══════════════════════════════════════════════ */

/* ── Error blocks — article-style, no card border ── */
.pkbr-error-block {
  border-left: 3px solid var(--danger);
  background: rgba(209,55,63,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.pkbr-error-block:last-child { margin-bottom: 0; }
.pkbr-error-block strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--danger);
  display: block;
  margin-bottom: 6px;
}
.pkbr-error-block p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.pkbr-fix {
  display: block;
  margin-top: 7px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--success);
}

/* ── Result preview sizing per tool type ── */
.pkbr-type-signature .result-preview img { max-height: 160px; }
.pkbr-type-photo     .result-preview img { max-height: 300px; max-width: 260px; margin: 0 auto; }
.pkbr-type-thumb     .result-preview img { max-height: 220px; max-width: 220px; margin: 0 auto; }

/* ── Cropper dark container ── */
#editorArea img { max-width: 100%; height: auto; display: block; }

/* Force cropper container to never be square */
#editorArea .cropper-container { display: block; }
#editorArea .cropper-canvas    { display: block; }

/* Photo crop preview: 276×197 ratio (~4:3 landscape) */
.nsdl-crop-wrap.is-photo {
  height: 360px;
}

/* Signature crop preview: 354×157 ratio (~2.25:1 very wide) */
.nsdl-crop-wrap.is-signature {
  height: 220px;
}

/* ── Anti-auto-ad protection ── */
.upload-zone ins.adsbygoogle,
.tool-card ins.adsbygoogle,
.target-row ins.adsbygoogle,
.chip-row ins.adsbygoogle {
  display: none !important;  /* hide any ad unit injected inside tool area */
}
/* Manual ad below lede — KB tool pages */
.lede-ad {
  position: relative;
  z-index: 1;
  isolation: auto;
  overflow: visible;
  width: 100%;
  max-width: 600px;
  margin: 16px auto;
  display: block;
  text-align: center;
}

.lede-ad ins.adsbygoogle {
  display: block !important;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .lede-ad {
    width: 100%;
    margin: 12px 0;
    padding: 0 16px;
    box-sizing: border-box;
    overflow: visible;
    max-height: none;
  }
}

/* Fix text cut off on mobile — KB tool hero */
@media (max-width: 768px) {
  .kb-hero-copy {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    text-align: center;
  }
  .kb-hero-copy h1 {
    font-size: 1.6rem;
    word-break: break-word;
  }
  .kb-hero-copy .lede {
    font-size: 14px;
    word-break: break-word;
  }
}

/* ── NSDL Type Selector Buttons ───────────────────────────── */
.nsdl-type-btn {
  display:         flex;
  flex-direction:  column;
  align-items:     flex-start;
  gap:             6px;
  flex:            1;
  min-width:       200px;
  padding:         18px 20px;
  background:      var(--surface);
  border:          2px solid var(--border);
  border-radius:   var(--radius);
  cursor:          pointer;
  text-align:      left;
  transition:      border-color 0.18s, background 0.18s, box-shadow 0.18s;
  box-shadow:      var(--shadow-sm);
}

.nsdl-type-btn:hover {
  background:      var(--surface-2);
  border-color:    var(--accent);
  box-shadow:      var(--shadow);
}

.nsdl-type-btn.active {
  background:      var(--surface-2);
  border-color:    var(--accent);
  box-shadow:      0 0 0 3px rgba(255,92,51,0.15);
}

.nsdl-type-btn .type-icon {
  font-size:       1.6rem;
  line-height:     1;
}

.nsdl-type-btn .type-label {
  font-size:       .95rem;
  font-weight:     600;
  color:           var(--text);
  line-height:     1.3;
}

.nsdl-type-btn .type-specs {
  font-size:       .78rem;
  color:           var(--text-muted);
  line-height:     1.4;
}

/* Active label color */
.nsdl-type-btn.active .type-label {
  color:           var(--accent);
}

/* Mobile: stack buttons full width */
@media (max-width: 540px) {
  #typeSelector > div {
    flex-direction: column;
  }
  .nsdl-type-btn {
    min-width: 0;
    width:     100%;
  }
}
/* ── Cropper aspect ratio fix ───────────────────────────────── */
#nsdlCropWrap .cropper-container {
  width:  100% !important;
}

/* Photo: 276×197 — landscape, wider than tall */
#nsdlCropWrap.is-photo .cropper-container {
  min-height: 300px !important;
}

/* Signature: 354×157 — very wide landscape strip */
#nsdlCropWrap.is-signature .cropper-container {
  min-height: 180px !important;
}

/* Ensure crop box itself never collapses */
#nsdlCropWrap .cropper-crop-box {
  min-width:  60px !important;
  min-height: 40px !important;
}