/* PDFStudio Pro — Tools Hub + Pro utility tools */
:root{
  --th-ink:#0f172a;--th-muted:#64748b;--th-paper:#f1f5f9;--th-card:#fff;
  --th-line:#e2e8f0;--th-brand:#0f766e;--th-brand2:#14b8a6;--th-accent:#2563eb;
  --th-danger:#dc2626;--th-warn:#d97706;--th-ok:#059669;
  --th-radius:16px;--th-shadow:0 12px 32px rgba(15,23,42,.1);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body.th-body{margin:0;font:16px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--th-ink);background:var(--th-paper)}
a{color:var(--th-brand);text-underline-offset:2px}
.th-wrap{width:min(1100px,calc(100% - 32px));margin:auto}
.th-top{background:var(--th-card);border-bottom:1px solid var(--th-line);position:sticky;top:0;z-index:40;backdrop-filter:blur(10px)}
.th-nav{height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.th-brand{font-weight:800;text-decoration:none;color:var(--th-ink);letter-spacing:-.03em}
.th-brand span{color:var(--th-brand)}
.th-links{display:flex;gap:14px;flex-wrap:wrap;font-size:13px}
.th-links a{color:var(--th-muted);text-decoration:none}
.th-links a:hover{color:var(--th-brand)}
.th-crumb{font-size:13px;color:var(--th-muted);margin:18px 0 10px}
.th-crumb a{color:var(--th-muted);text-decoration:none}
.th-pro-hero{
  position:relative;overflow:hidden;border-radius:22px;padding:30px 26px;margin:8px 0 22px;
  background:radial-gradient(ellipse 60% 80% at 90% 10%,rgba(20,184,166,.35),transparent 55%),linear-gradient(135deg,#0f172a 0%,#134e4a 48%,#0f766e 100%);
  color:#fff;box-shadow:0 28px 56px rgba(15,23,42,.28),0 0 0 1px rgba(255,255,255,.1);
  transform:perspective(1000px) rotateX(1.2deg);transform-style:preserve-3d;
}
.th-pro-hero h1{margin:0 0 10px;font-size:clamp(1.5rem,3.4vw,2.15rem);letter-spacing:-.03em;text-shadow:0 4px 24px rgba(0,0,0,.4);line-height:1.2}
.th-pro-hero p{margin:0;opacity:.93;max-width:58ch;font-size:15px}
.th-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.th-badge{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22)}
.th-panel-3d{
  background:linear-gradient(165deg,#fff 0%,#f8fafc 100%);border:1px solid var(--th-line);border-radius:20px;padding:22px;
  box-shadow:var(--th-shadow),0 1px 0 rgba(255,255,255,.9) inset;transform:perspective(1100px) rotateX(.4deg);
  transition:transform .2s,box-shadow .2s;margin-bottom:24px;
}
.th-panel-3d:hover{transform:perspective(1100px) rotateX(0) translateY(-2px);box-shadow:0 28px 52px rgba(15,23,42,.14)}
.th-panel-3d h2{margin:0 0 14px;font-size:1.15rem}
.th-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:12px}
.th-field{flex:1;min-width:130px}
.th-field label{display:block;font-size:12.5px;font-weight:650;margin-bottom:4px;color:#334155}
.th-field input[type=text],.th-field input[type=number],.th-field input[type=password],.th-field select,.th-field textarea{width:100%;padding:11px 12px;border:1px solid var(--th-line);border-radius:12px;font:inherit;background:#fff}
.th-field textarea{min-height:150px;resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13.5px}
.th-field input[type=range]{width:100%}
.th-check{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;margin-right:6px;cursor:pointer}
.th-btn{appearance:none;border:0;border-radius:12px;padding:12px 18px;font:inherit;font-weight:700;cursor:pointer;background:var(--th-brand);color:#fff;min-height:44px}
.th-btn:hover{background:#0d9488}
.th-btn.alt{background:#e2e8f0;color:var(--th-ink)}
.th-btn:disabled{opacity:.5;cursor:not-allowed}
.th-btn-3d{box-shadow:0 10px 24px rgba(15,118,110,.38);transition:transform .15s,box-shadow .15s}
.th-btn-3d:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 14px 30px rgba(15,118,110,.45)}
.th-btn-3d:active{transform:scale(.98)}
.th-out{margin-top:10px;padding:14px 16px;background:#0f172a;color:#e2e8f0;border-radius:12px;word-break:break-all;font-family:ui-monospace,Menlo,monospace;font-size:15px;min-height:52px;letter-spacing:.03em;box-shadow:inset 0 2px 8px rgba(0,0,0,.35)}
.th-status{font-size:13px;color:var(--th-muted);margin-top:10px;min-height:1.25em}
.th-status.ok{color:var(--th-ok)}
.th-status.err{color:var(--th-danger)}
.th-meter{height:10px;background:#e2e8f0;border-radius:99px;overflow:hidden;margin-top:10px}
.th-meter > i{display:block;height:100%;width:0;border-radius:99px;transition:width .35s}
.th-meter.weak > i{background:linear-gradient(90deg,#f87171,#dc2626);width:28%}
.th-meter.fair > i{background:linear-gradient(90deg,#fbbf24,#d97706);width:52%}
.th-meter.good > i{background:linear-gradient(90deg,#34d399,#059669);width:76%}
.th-meter.strong > i{background:linear-gradient(90deg,#2dd4bf,#0f766e);width:100%}
.th-chip-row{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px}
.th-chip{appearance:none;border:1px solid var(--th-line);background:#fff;border-radius:999px;padding:7px 13px;font-size:12.5px;font-weight:600;cursor:pointer;color:var(--th-muted)}
.th-chip:hover,.th-chip.on{border-color:var(--th-brand);color:var(--th-brand);background:#f0fdfa}
.th-split{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.th-table{width:100%;border-collapse:collapse;font-size:13.5px;margin-top:12px}
.th-table th,.th-table td{border:1px solid var(--th-line);padding:8px 10px;text-align:left}
.th-table th{background:#f1f5f9}
.th-canvas-wrap{position:relative;max-width:100%;overflow:auto;border:1px solid var(--th-line);border-radius:14px;background:#0b1220;min-height:200px;margin-top:8px}
.th-canvas-wrap canvas{display:block;max-width:100%;margin:auto;cursor:crosshair;touch-action:none}
.th-article{padding:4px 0 48px;max-width:740px}
.th-article h2{margin:28px 0 10px;font-size:1.35rem;letter-spacing:-.02em}
.th-article h3{margin:20px 0 8px;font-size:1.08rem}
.th-article p,.th-article li{color:#334155;font-size:15.5px;line-height:1.7}
.th-article ul,.th-article ol{padding-left:1.25rem}
.th-footer{border-top:1px solid var(--th-line);padding:20px 0;font-size:13px;color:var(--th-muted)}
.th-footer a{color:var(--th-muted)}
.th-toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(14px);background:#0f172a;color:#fff;padding:11px 18px;border-radius:999px;font-size:13px;font-weight:650;opacity:0;pointer-events:none;transition:.25s;z-index:60;box-shadow:0 12px 30px rgba(0,0,0,.25)}
.th-toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
.th-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;padding:8px 0 36px}
.th-card{background:var(--th-card);border:1px solid var(--th-line);border-radius:var(--th-radius);padding:18px;text-decoration:none;color:inherit;box-shadow:var(--th-shadow);transition:transform .15s,border-color .15s}
.th-card:hover{transform:translateY(-3px);border-color:var(--th-brand2)}
.th-card h2,.th-card h3{margin:0 0 6px;font-size:1.05rem}
.th-card p{margin:0;font-size:13.5px;color:var(--th-muted)}
.th-hero{padding:28px 0 8px}
.th-hero h1{font-size:clamp(1.6rem,3.5vw,2.2rem);letter-spacing:-.03em;margin:0 0 10px;line-height:1.2}
.th-hero p{color:var(--th-muted);margin:0 0 16px;max-width:62ch}
@media(max-width:720px){
  .th-split{grid-template-columns:1fr}
  .th-pro-hero,.th-panel-3d{transform:none!important}
  .th-btn{width:100%}
  .th-row .th-btn{flex:1;min-width:120px}
}
@media(prefers-reduced-motion:reduce){
  .th-pro-hero,.th-panel-3d,.th-btn-3d{transform:none!important;transition:none}
}
