/* ============================================================
   FreshPDF — standalone Tools page
   ============================================================ */
.tools-main { padding: 40px 0 70px; min-height: 70vh; }

.tools-hero { text-align: center; max-width: 720px; margin: 12px auto 34px; }
.tools-hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; }
.tools-hero p { font-size: 17px; color: var(--text-soft); margin: 0 0 24px; }

.tool-search-wrap { max-width: 520px; margin: 0 auto; }
.tool-search {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 13px 20px;
  box-shadow: var(--shadow-sm); transition: border-color .14s, box-shadow .14s;
}
.tool-search:focus { outline: none; border-color: var(--sky-400); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Mega "open the full editor" button */
.tool-mega {
  display: flex; align-items: center; gap: 18px; max-width: 760px; margin: 0 auto 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff;
  border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow-md);
  transition: transform .14s, box-shadow .14s;
}
.tool-mega:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(31, 92, 158, .3); }
.tool-mega-ic { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .16); }
.tool-mega-ic svg { color: #fff; }
.tool-mega-tx { flex: 1; min-width: 0; }
.tool-mega-tx strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.tool-mega-tx span { display: block; font-size: 13.5px; color: rgba(255, 255, 255, .88); margin-top: 2px; }
.tool-mega-go { flex-shrink: 0; font-size: 14.5px; font-weight: 700; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 9px 16px; white-space: nowrap; }
@media (max-width: 560px) {
  .tool-mega { gap: 14px; padding: 16px 18px; }
  .tool-mega-ic { width: 44px; height: 44px; }
  .tool-mega-tx strong { font-size: 16px; }
  .tool-mega-go { display: none; }
}

/* Hub */
.tool-cat { margin-top: 34px; }
.tool-cat-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-strong); margin-bottom: 16px; }
.tool-cat-title svg { color: var(--brand); }
.tool-cat-title em { font-style: normal; font-size: 12px; color: var(--text-mute); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; color: var(--text); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--sky-200); box-shadow: var(--shadow-md); }
.tool-card-ic { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); }
.tool-card:hover .tool-card-ic { background: var(--brand); color: #fff; }
.tool-card-tx { min-width: 0; }
.tool-card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.tool-card p { font-size: 13px; color: var(--text-soft); margin: 0; line-height: 1.45; }
.tool-empty { text-align: center; color: var(--text-mute); padding: 40px 0; }

/* Tool panel */
.tool-panel { max-width: 680px; margin: 0 auto; }
.tool-back { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--brand-strong); margin-bottom: 18px; }
.tool-back:hover { text-decoration: underline; }
.tool-headline { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.tool-headline-ic { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-strong); }
.tool-headline-tx { min-width: 0; }
.tool-headline h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.tool-headline p { font-size: 16px; color: var(--text-soft); margin: 0; }
.tool-long { font-size: 14.5px; line-height: 1.6; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.tool-share-row { margin: 0 0 22px; }
.tool-share {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--brand-strong); background: var(--brand-soft); border: 1px solid var(--sky-200);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: background .14s, border-color .14s;
}
.tool-share:hover { background: var(--brand); color: #fff; border-color: transparent; }
.tool-share svg { flex-shrink: 0; }

.tool-drop {
  display: block; border: 2px dashed var(--sky-200); border-radius: var(--radius-lg); background: var(--surface);
  padding: 30px 22px; text-align: center; cursor: pointer; transition: border-color .14s, background .14s;
}
.tool-drop.over { border-color: var(--sky-400); background: var(--brand-soft); }
.tool-drop-inner strong { display: block; font-size: 16px; color: var(--text); }
.tool-drop-inner span { font-size: 13.5px; color: var(--text-mute); }
.tool-files { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.tool-files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.tool-files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-files li button { border: 0; background: none; color: var(--text-mute); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; flex-shrink: 0; }
.tool-files li button:hover { background: var(--border); color: var(--text); }

.tool-fields { display: grid; gap: 14px; margin: 20px 0; }
.tool-field { display: grid; gap: 6px; }
.tool-field-label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.tool-fields .ed-input {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; width: 100%;
}
.tool-fields textarea.ed-input { resize: vertical; min-height: 96px; }
.tool-fields .ed-input:focus { outline: none; border-color: var(--sky-400); box-shadow: 0 0 0 3px var(--brand-soft); }

.tool-actions { display: flex; align-items: center; gap: 16px; margin: 6px 0 8px; }
.tool-actions .btn { min-width: 120px; }
.tool-status { font-size: 13.5px; color: var(--text-soft); }
.tool-status.ok { color: var(--grass); font-weight: 600; }
.tool-status.err { color: #c2410c; font-weight: 600; }

.tool-results { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.tool-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--text); max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.tool-preview-img { max-width: 100%; border: 1px solid var(--border); border-radius: 10px; }
.tool-dl-list { display: grid; gap: 8px; }
.tool-dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  font-family: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 15px; cursor: pointer; color: var(--text); transition: border-color .14s, box-shadow .14s;
}
.tool-dl:hover { border-color: var(--sky-300); box-shadow: var(--shadow-sm); }
.tool-dl span { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-dl em { font-style: normal; font-size: 12px; color: var(--text-mute); flex-shrink: 0; }
.tool-dl::after { content: "↓"; margin-left: 6px; color: var(--brand-strong); font-weight: 800; }

.tool-privacy { margin-top: 26px; font-size: 13px; color: var(--text-mute); text-align: center; }

/* SEO reference / intro copy (crawlable) */
.tools-intro { max-width: 820px; margin: 6px auto 34px; }
.tools-intro p { font-size: 15px; line-height: 1.65; color: var(--text-soft); margin: 0 0 12px; }
.tools-seo { max-width: 900px; margin: 56px auto 0; padding-top: 34px; border-top: 1px solid var(--border); }
.tools-seo > h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; text-align: center; }
.tools-seo > p { text-align: center; color: var(--text-soft); font-size: 14.5px; margin: 0 auto 26px; max-width: 640px; }
.tools-seo-cat { margin-top: 24px; }
.tools-seo-cat h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-strong); margin-bottom: 12px; }
.tools-seo-list { display: grid; gap: 14px; }
.tools-seo-item h4 { font-size: 15px; font-weight: 700; margin: 0 0 3px; }
.tools-seo-item h4 a { color: var(--text); }
.tools-seo-item h4 a:hover { color: var(--brand-strong); }
.tools-seo-item p { font-size: 13.5px; line-height: 1.6; color: var(--text-soft); margin: 0; }

@media (max-width: 560px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .tool-card p { display: none; }
  .tool-card { padding: 12px; gap: 10px; }
  .tool-card-ic { width: 34px; height: 34px; }
}
/* ============================================================
   Per-tool landing pages (/tools/<id>.html)
   ============================================================ */
.tp-crumbs { font-size: 13px; color: var(--text-mute); margin: 4px 0 22px; }
.tp-crumbs a { color: var(--brand-strong); }
.tp-crumbs a:hover { text-decoration: underline; }
.tp-crumbs span[aria-current] { color: var(--text-soft); }

.tp-hero { display: flex; align-items: flex-start; gap: 18px; max-width: 780px; margin: 0 auto 22px; }
.tp-hero-ic { flex-shrink: 0; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-strong); }
.tp-hero-tx { min-width: 0; }
.tp-cat { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-strong); background: var(--brand-soft); border-radius: 999px; padding: 3px 11px; margin-bottom: 10px; }
.tp-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; }
.tp-hero-tx > p { font-size: 17px; color: var(--text-soft); margin: 0 0 18px; }
.tp-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.tp-long { max-width: 780px; margin: 0 auto 30px; }
.tp-section { max-width: 780px; margin: 0 auto 30px; }
.tp-section h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
.tp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tp-steps li { display: flex; align-items: flex-start; gap: 14px; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.tp-n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; background: var(--brand); color: #fff; }
.tp-private p { font-size: 15px; line-height: 1.65; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin: 0; }
.tp-related { margin-bottom: 16px; }
.tp-all a { font-size: 14px; font-weight: 600; color: var(--brand-strong); }
.tp-all a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .tp-hero { gap: 13px; }
  .tp-hero-ic { width: 50px; height: 50px; }
  .tp-cta .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { .tool-card, .tool-dl, .tool-search, .tool-mega { transition: none; } }
