/* ============================================================
   Freecvt.com — Shared Converter UI Stylesheet
   Crisp light theme. Single source of truth.
   Applies to ALL converter tools (client-side & server-side).
   ============================================================ */

/* Enforce [hidden] attribute */
[hidden] { display: none !important; }

/* --- Variables --- */
:root {
  /* Backgrounds — matches landing page */
  --bg-primary: #ffffff;
  --bg-surface: #ffffff;
  --bg-muted: #f3f4f6;
  --bg-hover: #e5e7eb;
  --bg-card: #ffffff;

  /* Text */
  --text-primary: #000000;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  /* Accent — landing page blue */
  --accent: #0078FF;
  --accent-hover: #0066dd;
  --accent-light: #e0edff;
  --accent-glow: rgba(0, 120, 255, 0.12);

  /* Semantic */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --error: #dc2626;
  --error-bg: #fef2f2;

  /* Borders */
  --border: #e5e7eb;
  --border-focus: #0078FF;

  /* Radius */
  --radius: 10px;
  --radius-sm: 6px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);

  /* Type */
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  /* Motion */
  --transition: 0.2s ease;

  /* Aliases for convert/ pages (--color-* naming) */
  --color-primary: #0078FF;
  --color-primary-hover: #0066dd;
  --color-primary-light: #e0edff;
  --color-primary-glow: rgba(0, 120, 255, 0.12);
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #000000;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-border-hover: #0078FF;
  --color-dashed: #9ca3af;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-error: #dc2626;
  --color-error-bg: #fef2f2;
  --color-warning: #f59e0b;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
  font-size: 0.85rem;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HEADER — logo + lang-switcher + nav
   ============================================================ */

/* word-to-pdf style: simple centered header */
header { text-align: center; padding: 0.5rem 0; }
header h1 { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
header p  { font-size: 0.85rem; color: var(--text-muted); }

/* pdf-to-word style: full header with logo + nav */
.header {
  width: 100%;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start;
}

/* app-header alias (pdf-to-jpg, etc.) */
.app-header {
  width: 100%;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
}

/* Button aliases (pdf-to-png, pdf-to-jpg, etc.) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), transform 0.1s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-icon {
  font-size: 1.1rem;
}

/* drop-zone alias (pdf-to-png, pdf-to-jpg) */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  background: var(--bg-surface);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.drop-zone:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}
.drop-zone-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.drop-zone-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.drop-zone-limit {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.drop-zone-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.header-inner .logo {
  margin-right: auto;
}
.header-inner .lang-switcher {
  flex-shrink: 0;
  margin: 0 auto;
  width: auto;
}
.header-inner nav {
  width: 100%;
  justify-content: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-right: auto;
}
.logo svg { stroke: var(--accent); }

nav { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: center; }
.nav-link {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg-muted); color: var(--accent); }
.nav-link.active { background: var(--accent); color: #fff; }

/* --- Lang Switcher (Phase 1 — 2-row desktop / 3-row mobile, collapsible) --- */
.lang-switcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
}
.lang-switcher.collapsed .lang-rows {
  display: none;
}
.lang-pill {
  display: none;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.lang-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.lang-row {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}
.lang-row a {
  white-space: nowrap;
  padding: 0.2rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: all var(--transition);
}
.lang-row a:hover { background: var(--accent-light); color: var(--accent); }
.lang-row a.active { background: var(--accent); color: #fff; }
.lang-row a.future {
  color: #9ca3af;
  cursor: default;
  pointer-events: none;
}

/* Default (desktop): 2 rows, show desktop-only, hide mobile-only */
.lang-rows-desktop { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.lang-rows-mobile { display: none; }

@media (min-width: 641px) {
  .lang-switcher { flex-direction: column; }
  .lang-pill { display: none; }
  .lang-switcher.collapsed .lang-rows { display: flex; }
  .lang-rows-desktop { display: flex; }
  .lang-rows-mobile { display: none; }
}

/* Mobile: 3 rows, pill collapse */
@media (max-width: 640px) {
  .lang-switcher.expanded .lang-pill { display: none; }
  .lang-switcher.collapsed .lang-pill { display: inline-block; }
  .lang-switcher.expanded .lang-rows { display: flex; }
  .lang-switcher.collapsed .lang-rows { display: none; }
  .lang-rows-desktop { display: none; }
  .lang-rows-mobile { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
}

/* RTL support for Arabic */
html[lang="ar"] .lang-switcher { direction: rtl; }
html[lang="ar"] .header-inner { direction: rtl; }
html[lang="ar"] .logo { margin-right: 0; margin-left: auto; }
html[lang="ar"] .header-inner nav { direction: rtl; }

/* ============================================================
   APP LAYOUT — centered converter card
   ============================================================ */

/* word-to-pdf style wrapper */
.app {
  width: 100%;
  max-width: 560px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

/* pdf-to-word style wrapper */
.converter-section,
main {
  width: 100%;
  max-width: 640px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.25rem;
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  background: var(--bg-surface);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.upload-zone:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}
.upload-zone.has-file {
  border-color: var(--success);
  border-style: solid;
  background: var(--success-bg);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 48px; height: 48px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-icon svg {
  width: 48px; height: 48px;
  stroke: var(--text-muted);
  transition: stroke var(--transition);
}
.upload-zone:hover .upload-icon svg,
.upload-zone.dragover .upload-icon svg {
  stroke: var(--accent);
}

.upload-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   FILE INFO
   ============================================================ */

/* word-to-pdf style */
.file-info {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.file-info.visible,
.file-info[hidden]:not([hidden="false"]) ~ .file-info { display: none; }

/* pdf-to-word style */
.file-info-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.file-info-icon,
.file-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-info-icon svg,
.file-icon svg {
  width: 18px; height: 18px;
  stroke: var(--accent);
}

.file-info-details { flex: 1; min-width: 0; }
.file-info-name,
.file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-info-size,
.file-size {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.file-info-remove,
.remove-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: color var(--transition), background var(--transition);
}
.file-info-remove:hover,
.remove-btn:hover {
  color: var(--error);
  background: var(--error-bg);
}

/* ============================================================
   BUTTONS
   ============================================================ */

/* word-to-pdf style */
.btn-convert {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), transform 0.1s;
  position: relative;
  overflow: hidden;
}
.btn-convert:hover:not(:disabled) { background: var(--accent-hover); }
.btn-convert:active:not(:disabled) { transform: scale(0.985); }
.btn-convert:disabled { opacity: 0.45; cursor: not-allowed; }

/* pdf-to-word style */
.convert-btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.convert-btn:hover:not(:disabled) { background: var(--accent-hover); }
.convert-btn:active:not(:disabled) { transform: scale(0.985); }
.convert-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Spinner */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PROGRESS
   ============================================================ */

.progress-container {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}
.progress-container.visible { display: flex; }

/* word-to-pdf style */
.progress-bar-track {
  width: 100%; height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* pdf-to-word style */
.progress-bar {
  width: 100%; height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   RESULT
   ============================================================ */

.result:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  padding: 1.25rem;
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--success);
}
.result.visible { display: flex; }

/* word-to-pdf style */
.result-icon {
  width: 48px; height: 48px;
  margin: 0 auto;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-icon svg { width: 28px; height: 28px; stroke: var(--success); }

.result-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* pdf-to-word style */
.result-success { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.success-icon {
  width: 48px; height: 48px;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon svg { stroke: var(--success); }
.result-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.result-detail { font-size: 0.85rem; color: var(--text-secondary); }

/* Download buttons */
.btn-download,
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--success);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform 0.1s;
  align-self: center;
}
.btn-download:hover,
.download-btn:hover { background: #15803d; }
.btn-download:active,
.download-btn:active { transform: scale(0.98); }
.btn-download svg,
.download-btn svg { width: 16px; height: 16px; }

/* Convert another */
.convert-another-btn {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.convert-another-btn:hover { background: var(--bg-muted); color: var(--text-primary); }

/* ============================================================
   ERROR
   ============================================================ */

.error-msg {
  display: none;
  padding: 0.75rem 1rem;
  background: var(--error-bg);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--error);
  text-align: center;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}
.error-msg.visible { display: flex; }
.error-msg[hidden] { display: none; }
.error-icon { flex-shrink: 0; stroke: var(--error); }

/* ============================================================
   FEATURES SECTION (SEO/AISEO content cards)
   ============================================================ */

.features {
  width: 100%;
  max-width: 720px;
  padding: 1.5rem 1rem;
}
.features-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.feature-icon {
  width: 40px; height: 40px;
  margin: 0 auto 0.75rem;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { stroke: var(--accent); }
.feature-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text-primary); }
.feature-card p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer,
footer {
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer a,
footer a { color: var(--text-secondary); }
.footer a:hover,
footer a:hover { color: var(--accent); }

/* ============================================================
   AISEO / SEO CONTENT BLOCKS
   ============================================================ */

.aiseo-section,
.seo-content {
  width: 100%;
  max-width: 720px;
  padding: 0 1rem;
}
/* convert/ page uses .aiseo-block instead of .aiseo-section */
.aiseo-block {
  margin-bottom: 2rem;
}
.aiseo-block h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.aiseo-block p {
  color: var(--text-secondary);
  line-height: 1.7;
}
.format-definitions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.format-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}
.format-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.format-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.use-cases, .limitations {
  list-style: none;
  padding: 0;
}
.use-cases li, .limitations li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.use-cases li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: bold;
}
.limitations li::before {
  content: "⚠";
  position: absolute;
  left: 0;
}
.aiseo-section h2,
.seo-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}
.aiseo-section h3,
.seo-content h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1rem 0 0.4rem;
}
.aiseo-section p,
.aiseo-section li,
.seo-content p,
.seo-content li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.aiseo-section ul,
.seo-content ul {
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}

/* FAQ / Details */
.aiseo-section details,
.seo-content details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  background: var(--bg-surface);
}
.faq-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.faq-section h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.faq-question {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
details[open] .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.aiseo-section summary,
.seo-content summary {
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}
.aiseo-section summary::before,
.seo-content summary::before {
  content: "▸";
  margin-right: 0.5rem;
  display: inline-block;
  transition: transform var(--transition);
}
.aiseo-section details[open] summary::before,
.seo-content details[open] summary::before {
  transform: rotate(90deg);
}
.aiseo-section details > div,
.seo-content details > div {
  padding: 0 1rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Related tools */
.related-tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.related-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.related-section h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.related-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.related-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.related-link.reverse {
  border-color: var(--accent);
  color: var(--accent);
}
.related-tools a {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
}
.related-tools a:hover { background: var(--accent); color: #fff; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  max-width: 800px;
  margin: 1rem auto 0;
  padding: 0.5rem 1.5rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.3rem; }

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

@media (min-width: 640px) {
  .app, .converter-section, main { padding: 2.5rem 1.5rem; gap: 1.25rem; }
  header h1, .page-title { font-size: 1.5rem; }
  header p, .page-subtitle { font-size: 0.9rem; }
  .upload-zone { padding: 3rem 2rem; }
  .upload-text { font-size: 1rem; }
}

@media (min-width: 1024px) {
  .app, .converter-section, main { padding: 3rem 2rem; }
  header h1, .page-title { font-size: 1.65rem; }
}

/* ============================================================
   FOCUS VISIBLE (global)
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  body { background: #fff; }
  .upload-zone, .convert-btn, .btn-convert, .progress-container,
  .lang-switcher, nav, .header, footer { display: none !important; }
}
