/* ============================================================
   PDF Tools Suite — public theme (hand-written, no build step)
   Look & feel: clean white, dark slate text, bold red primary.
   ============================================================ */

:root {
  --red: #e5322d;
  --red-dark: #c42722;
  --red-light: #fdecea;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-lg: 0 8px 30px rgba(16, 24, 40, .12);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img, svg { max-width: 100%; }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; color: var(--ink); }
p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo .logo-pdf { color: var(--red); }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  margin-left: auto;
  cursor: pointer;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 0;
}
.nav-toggle-label svg { width: 22px; height: 22px; }

.ad-slot { margin: 16px 0; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 30px;
  border-radius: 10px;
  transition: background .15s ease, transform .05s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(229, 50, 45, .35); }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--red); color: var(--red); }
.btn-lg { font-size: 1.1rem; padding: 16px 44px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--red-light) 0%, #fff 90%);
  padding: 64px 0 56px;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; margin-bottom: .35em; }
.hero h1 .accent { color: var(--red); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; margin: 0 auto 1.6em; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Tool grid ---------- */
.tools-section { padding: 48px 0; }
.tools-section.alt { background: var(--bg-soft); }
.category-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-title::before {
  content: "";
  width: 6px;
  height: 26px;
  background: var(--red);
  border-radius: 3px;
  display: inline-block;
}
.category-sub { color: var(--muted); margin-bottom: 20px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #f3c1bf;
}
.tool-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card .icon-wrap svg { width: 26px; height: 26px; }
.tool-card h3 { font-size: 1.02rem; margin: 0; font-weight: 700; }
.tool-card p { font-size: .86rem; color: var(--muted); margin: 0; flex: 1; }
.tool-card .go { font-size: .85rem; font-weight: 700; color: var(--red); }

/* ---------- Feature strip ---------- */
.features { padding: 56px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.feature .f-icon {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.feature .f-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.1rem; margin-bottom: .3em; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq-section { padding: 48px 0 64px; }
.faq-section h2, .section-head h2 { text-align: center; font-size: 1.7rem; font-weight: 800; }
.faq-list { max-width: 760px; margin: 24px auto 0; }
details.faq {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}
details.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 400;
  flex: none;
}
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding: 0 20px 18px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 48px 0 24px;
  margin-top: 0;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #9ca3af; }
.site-footer a:hover { color: #fff; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-note { font-size: .85rem; color: #6b7280; }
.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: #6b7280;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .88rem; color: var(--muted); margin: 20px 0 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { margin: 0 8px; color: #cbd5e1; }

/* ---------- Tool page ---------- */
.tool-head { text-align: center; padding: 36px 0 8px; max-width: 720px; margin: 0 auto; }
.tool-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.tool-head h1 .t-icon {
  display: inline-flex; vertical-align: -6px; margin-right: 10px;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--red-light); color: var(--red);
  align-items: center; justify-content: center;
}
.tool-head h1 .t-icon svg { width: 26px; height: 26px; }
.tool-head .tagline { color: var(--ink-soft); font-size: 1.08rem; }
.tool-head .meta-line { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.tool-notice { font-size: .82rem; color: #8a6d1a; background: #fff8e1; border: 1px solid #f0e0a8; border-radius: 10px; padding: 8px 12px; margin-top: 12px; max-width: 640px; }

.upload-panel {
  max-width: 760px;
  margin: 24px auto 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--red);
  background: var(--red-light);
}
.dropzone .dz-icon {
  width: 60px; height: 60px; margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.dropzone .dz-icon svg { width: 30px; height: 30px; }
.dropzone .dz-title { font-weight: 800; font-size: 1.15rem; margin-bottom: 4px; }
.dropzone .dz-sub { color: var(--muted); font-size: .9rem; }
.dropzone input[type="file"] { display: none; }

.file-list { list-style: none; margin: 16px 0 0; padding: 0; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: .92rem;
  background: #fff;
}
.file-list .f-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .f-size { color: var(--muted); font-size: .82rem; flex: none; }
.file-list .f-remove {
  border: 0; background: none; color: var(--red);
  cursor: pointer; font-weight: 700; font-size: 1.1rem; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
}
.file-list .f-remove:hover { background: var(--red-light); }
.file-count { font-size: .88rem; color: var(--muted); margin-top: 8px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.form-group .help { font-size: .83rem; color: var(--muted); margin-top: 4px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.form-control:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(229, 50, 45, .12); }
textarea.form-control { min-height: 90px; resize: vertical; }
.check-row { display: flex; align-items: flex-start; gap: 10px; }
.check-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--red); }
.options-box {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}
.options-box h3 { font-size: 1.05rem; margin-bottom: 14px; }

/* ---------- Alerts ---------- */
.alert { border-radius: 10px; padding: 14px 18px; margin: 16px 0; font-size: .95rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-error ul { margin: 6px 0 0; padding-left: 20px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ---------- Steps strip ---------- */
.steps { padding: 8px 0 56px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.step { text-align: center; padding: 12px; }
.step .n {
  width: 44px; height: 44px; margin: 0 auto 10px;
  border-radius: 50%; background: var(--red); color: #fff;
  font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1rem; margin-bottom: .25em; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* ---------- Result page ---------- */
.result-wrap { max-width: 640px; margin: 48px auto 64px; text-align: center; }
.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 44px 32px;
}
.result-check {
  width: 76px; height: 76px; margin: 0 auto 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex; align-items: center; justify-content: center;
}
.result-check svg { width: 40px; height: 40px; }
.result-card h1 { font-size: 1.7rem; }
.result-file {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
  text-align: left;
}
.result-file .rf-icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 8px; background: var(--red-light); color: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.result-file .rf-icon svg { width: 24px; height: 24px; }
.result-file .rf-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-file .rf-size { font-size: .85rem; color: var(--muted); }
.expiry-note { font-size: .88rem; color: var(--muted); margin-top: 16px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Unavailable ---------- */
.unavailable-wrap { max-width: 640px; margin: 56px auto 72px; text-align: center; }
.unavailable-card {
  background: #fff8f8;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 44px 32px;
}
.unavailable-card .u-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%; background: #fef2f2; color: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.unavailable-card .u-icon svg { width: 32px; height: 32px; }
.unavailable-card code {
  background: #1f2937; color: #f9fafb;
  padding: 3px 10px; border-radius: 6px; font-size: .9em;
}

/* ---------- Error pages ---------- */
.error-wrap { max-width: 560px; margin: 80px auto; text-align: center; }
.error-wrap .code { font-size: 5rem; font-weight: 800; color: var(--red); line-height: 1; }
.error-wrap h1 { font-size: 1.6rem; margin: 12px 0 8px; }
.error-wrap p { color: var(--muted); }

/* ---------- Misc ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .upload-panel { padding: 18px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    box-shadow: var(--shadow-lg);
  }
  .nav-toggle-label { display: block; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .header-inner { position: relative; }
  .result-card, .unavailable-card { padding: 30px 20px; }
}
@media (max-width: 420px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .tool-card { padding: 16px 12px; }
}
