@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --header-bg: #0f172a;
  --header-text: #f1f5f9;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.dark {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --header-bg: #020617;
  --primary-light: #1e3a5f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

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

img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--header-text) !important;
  text-decoration: none !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.logo-icon { color: #60a5fa; font-size: 1.4rem; }

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
nav a {
  color: #cbd5e1;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  text-decoration: none !important;
}
nav a:hover { color: #fff; background: rgba(255,255,255,0.1); }
nav a.active { color: #60a5fa; }

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

.search-wrap {
  position: relative;
}
.search-wrap input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--header-text);
  padding: 0.4rem 0.75rem 0.4rem 2rem;
  border-radius: 20px;
  font-size: 0.8rem;
  width: 180px;
  outline: none;
  transition: background 0.2s, width 0.2s;
}
.search-wrap input::placeholder { color: #94a3b8; }
.search-wrap input:focus { background: rgba(255,255,255,0.15); width: 220px; }
.search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
  pointer-events: none;
}

#dark-mode-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--header-text);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
}
#dark-mode-toggle:hover { background: rgba(255,255,255,0.1); }

.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--header-text);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .hamburger { display: block; }
  nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    align-items: flex-start;
  }
  nav.open { display: flex; }
  .search-wrap input { width: 140px; }
  .search-wrap input:focus { width: 160px; }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  color: #f1f5f9;
}
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto 2rem;
}
.hero-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto 2rem;
  gap: 0;
}
.hero-search input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #334155;
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 0.95rem;
  outline: none;
}
.hero-search input::placeholder { color: #64748b; }
.hero-search input:focus { border-color: var(--primary); }
.hero-search button {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
}
.hero-search button:hover { background: var(--primary-dark); }

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #334155;
}
.stat-item { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: #60a5fa; display: block; }
.stat-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== POPULAR TOOLS STRIP ===== */
.popular-strip {
  background: var(--primary);
  padding: 0.6rem 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.popular-strip-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  margin-right: 0.5rem;
}
.popular-strip a {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.3);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.popular-strip a:hover { background: rgba(255,255,255,0.15); text-decoration: none; }

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.tool-card {
  display: flex;
  flex-direction: column;
}
.tool-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}
.tool-card-badge {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.tool-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.tool-card p { font-size: 0.85rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; }
.tool-card .btn { align-self: flex-start; }

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.section-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none !important;
  line-height: 1.5;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); text-decoration: none !important; }
.btn:active { transform: translateY(0); }
.btn-success { background: var(--success); }
.btn-success:hover { background: var(--success-dark); }
.btn-danger { background: var(--danger); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary) !important;
}
.btn-outline:hover { background: var(--primary); color: #fff !important; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

/* ===== TOOL AREA ===== */
.tool-page-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem 1.5rem;
}
.tool-page-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.4rem; }
.tool-page-header p { color: var(--text-muted); font-size: 0.95rem; }

.tool-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

/* ===== DROP ZONE ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.drop-zone-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; color: var(--text-muted); }
.drop-zone h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.drop-zone p { font-size: 0.85rem; color: var(--text-muted); }
.drop-zone input[type="file"] { display: none; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-control:focus { border-color: var(--primary); }
select.form-control { cursor: pointer; }

.range-wrap { display: flex; align-items: center; gap: 0.75rem; }
input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}
.range-val {
  min-width: 3rem;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: 0; }
.tab {
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== PREVIEW ===== */
.preview-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.preview-area canvas, .preview-area img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

/* ===== FILE LIST ===== */
.file-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.875rem;
  cursor: grab;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--bg); }
.file-item.dragging { opacity: 0.5; }
.drag-handle { color: var(--text-muted); cursor: grab; }
.file-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.file-remove { background: none; border: none; color: var(--danger); cursor: pointer; padding: 0.2rem; font-size: 1rem; }

/* ===== PROGRESS ===== */
.progress-wrap { margin: 1rem 0; }
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
  width: 0%;
}
.progress-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ===== STATUS MESSAGES ===== */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
html.dark .alert-success { background: #052e16; color: #4ade80; border-color: #166534; }
html.dark .alert-error { background: #450a0a; color: #f87171; border-color: #991b1b; }
html.dark .alert-info { background: #1e3a5f; color: #93c5fd; border-color: #1e40af; }

/* ===== PAGE THUMBNAILS (PDF SPLIT) ===== */
.thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}
.thumb-item {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.thumb-item canvas {
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

/* ===== QR PAGE ===== */
#qr-output {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  min-height: 150px;
  align-items: center;
}
#qr-output canvas, #qr-output img { border-radius: 4px; }

/* ===== AGE RESULT ===== */
.age-result {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}
.age-main { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.age-sub { font-size: 1rem; opacity: 0.85; }
.age-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.age-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.age-stat-box .val { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.age-stat-box .lbl { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ===== CONTENT SECTIONS ===== */
.content-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.content-section h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.content-section h3 { font-size: 1.1rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.content-section p { margin-bottom: 0.75rem; color: var(--text); line-height: 1.75; font-size: 0.95rem; }
.content-section ul, .content-section ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.content-section li { margin-bottom: 0.4rem; font-size: 0.95rem; line-height: 1.7; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-q::after { content: '-'; }
.faq-a { display: none; margin-top: 0.6rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* Related tools */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.related-card:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.related-card-icon { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.related-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
.related-card p { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

/* ===== BLOG ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card-body { padding: 1.25rem; }
.blog-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.blog-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.blog-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Blog article page */
.article-wrap { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.article-wrap h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.3; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.article-wrap h2 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.article-wrap h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.article-wrap p { margin-bottom: 1rem; line-height: 1.8; font-size: 0.95rem; }
.article-wrap ul, .article-wrap ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-wrap li { margin-bottom: 0.5rem; line-height: 1.75; font-size: 0.95rem; }
.article-wrap table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.875rem; }
.article-wrap th { background: var(--primary); color: #fff; padding: 0.6rem 0.875rem; text-align: left; font-weight: 600; }
.article-wrap td { padding: 0.6rem 0.875rem; border-bottom: 1px solid var(--border); }
.article-wrap tr:nth-child(even) td { background: var(--bg); }
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}
.cta-box h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.cta-box p { opacity: 0.85; margin-bottom: 1rem; font-size: 0.9rem; }
.cta-box .btn { background: #fff; color: var(--primary) !important; }
.cta-box .btn:hover { background: #f0f9ff; }

/* ===== FOOTER ===== */
footer {
  background: var(--header-bg);
  color: #94a3b8;
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
footer h4 { color: #f1f5f9; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; }
footer p { font-size: 0.8rem; line-height: 1.6; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.4rem; }
footer ul a { color: #94a3b8; font-size: 0.8rem; }
footer ul a:hover { color: #f1f5f9; }
.footer-bottom {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { justify-content: center; }
}

/* ===== PDF EDITOR CANVAS ===== */
.pdf-page-wrap {
  position: relative;
  display: inline-block;
  margin: 0.5rem;
  cursor: crosshair;
}
.pdf-overlay {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
}
.pdf-overlay.active { pointer-events: all; }

/* Color picker */
.color-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0; }
.color-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s;
}
.color-swatch.active { border-color: var(--primary); transform: scale(1.2); }

/* Inline info row */
.info-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0.75rem 0; }
.info-item { font-size: 0.85rem; }
.info-item strong { color: var(--text); }
.info-item span { color: var(--text-muted); }

/* Preset buttons */
.preset-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.preset-btn {
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.preset-btn:hover, .preset-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== UTILITY ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.w-full { width: 100%; }

/* Feature highlights */
.feature-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.feature-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.feature-item-icon { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.feature-item h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.feature-item p { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

@media (max-width: 768px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .tool-area { padding: 1.25rem; }
  .content-section { padding: 1.25rem; }
  .article-wrap { padding: 1.5rem 1rem 3rem; }
  .article-wrap h1 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }
}
