/* PDFuna — ViviT design layer 2026-12-02. The same design system as
   ViviT School, applied as an additive layer over the Round 6 build:
   Miami Blue #00AEEF + Coral #FF806B + Warm Ivory #FFF8EF + dark navy,
   Fraunces headlines (self-hosted), aurora background, film grain,
   cursor glow, 3D card tilt, scroll reveals, gradient buttons, frosted
   nav. No tool code, no page text, and no honesty/safety copy is
   touched by this layer - it only re-skins. Remove this file's <link>
   and the pdfuna-vivit.js <script> from the pages and Round 6 is back
   exactly as it was. */

@font-face {font-family:"Fraunces";src:url("/assets/fonts/fraunces.woff2") format("woff2");font-weight:400 700;font-style:normal;font-display:swap}
@font-face {font-family:"Fraunces";src:url("/assets/fonts/fraunces-italic.woff2") format("woff2");font-weight:400 700;font-style:italic;font-display:swap}

/* ---------- Light palette (ViviT light) ---------- */
:root {
  --color-primary:#00AEEF; --color-secondary:#FF806B; --color-accent:#0072BC;
  --color-foreground:#0E2A47; --color-muted-foreground:#617891; --color-card:#FFFEFA;
  --color-ring:#00AEEF;
  --bg:#FFF8EF; --bg-2:#FFF1E0; --hero-wash:#FFF8EF; --stage:#F1E6CF;
  --surface:#FFFEFA; --surface-2:#FFF6E9;
  --ink:#0E2A47; --ink-soft:#3D5875; --ink-faint:#617891;
  --line:#D9C8A9; --line-soft:#EDDFC6;
  --brand:#00AEEF; --accent:#00AEEF; --accent-hover:#0090D8; --accent-text:#0072BC;
  --accent-soft:#E1F4FD; --accent-ink:#062A44;
  --cta:#0072BC; --cta-hover:#005E99; --cta-ink:#FFFFFF;
  --amber:#E8862E; --ring:rgba(0,174,239,.45);
  --good:#0E9F6E; --good-soft:#DDF5E9;
  --warn-soft:#FDEBD3; --drop-bg:#EFF9FE; --strip:#0E2A47;
  --tint-1:#E1F4FD; --tint-ink-1:#075E8F;
  --tint-2:#FFE9E4; --tint-ink-2:#B4442F;
  --tint-3:#DDF5E9; --tint-ink-3:#0B6B45;
  --tint-4:#E3F0FE; --tint-ink-4:#0E4E92;
  --tint-5:#DFF6F5; --tint-ink-5:#0B6B6B;
  --tint-6:#FDEBD3; --tint-ink-6:#8A5A00;
  --shadow:0 1px 2px rgba(14,42,71,.06);
  --shadow-float:0 12px 32px rgba(14,42,71,.13);
  --shadow-lg:0 18px 48px rgba(14,42,71,.16);
  --radius:18px; --radius-s:14px;
}

/* ---------- Dark palette (ViviT dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-primary:#00AEEF; --color-secondary:#FF806B; --color-accent:#7FD8FA;
    --color-foreground:#F2F7FC; --color-muted-foreground:#93A9BF; --color-card:#0D2B4C;
    --color-ring:#00AEEF;
    --bg:#081C30; --bg-2:#0A2438; --hero-wash:#081C30; --stage:#051626;
    --surface:#0D2B4C; --surface-2:#12365E;
    --ink:#F2F7FC; --ink-soft:#C7D6E4; --ink-faint:#93A9BF;
    --line:#1E4468; --line-soft:#14324F;
    --brand:#00AEEF; --accent:#00AEEF; --accent-hover:#33C1E8; --accent-text:#7FD8FA;
    --accent-soft:#0E3050; --accent-ink:#062A44;
    --cta:#00AEEF; --cta-hover:#33C1E8; --cta-ink:#062A44;
    --amber:#FFAB9C; --ring:rgba(0,174,239,.5);
    --good:#3ED598; --good-soft:#0E2E22;
    --red:#FFAB9C; --red-text:#FFB4AB;
    --warn-soft:#3A2C14; --drop-bg:#0E3050; --strip:#0D2B4C;
    --tint-1:#0E3050; --tint-ink-1:#7FD8FA;
    --tint-2:#40241E; --tint-ink-2:#FFAB9C;
    --tint-3:#0E2E22; --tint-ink-3:#7FE7BC;
    --tint-4:#12294D; --tint-ink-4:#A8C7FA;
    --tint-5:#0C2E33; --tint-ink-5:#8FE3E0;
    --tint-6:#33270F; --tint-ink-6:#FFD98A;
    --shadow:0 1px 2px rgba(0,0,0,.4); --shadow-float:0 10px 30px rgba(0,0,0,.5); --shadow-lg:0 16px 44px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  --color-primary:#00AEEF; --color-secondary:#FF806B; --color-accent:#7FD8FA;
  --color-foreground:#F2F7FC; --color-muted-foreground:#93A9BF; --color-card:#0D2B4C;
  --color-ring:#00AEEF;
  --bg:#081C30; --bg-2:#0A2438; --hero-wash:#081C30; --stage:#051626;
  --surface:#0D2B4C; --surface-2:#12365E;
  --ink:#F2F7FC; --ink-soft:#C7D6E4; --ink-faint:#93A9BF;
  --line:#1E4468; --line-soft:#14324F;
  --brand:#00AEEF; --accent:#00AEEF; --accent-hover:#33C1E8; --accent-text:#7FD8FA;
  --accent-soft:#0E3050; --accent-ink:#062A44;
  --cta:#00AEEF; --cta-hover:#33C1E8; --cta-ink:#062A44;
  --amber:#FFAB9C; --ring:rgba(0,174,239,.5);
  --good:#3ED598; --good-soft:#0E2E22;
  --red:#FFAB9C; --red-text:#FFB4AB;
  --warn-soft:#3A2C14; --drop-bg:#0E3050; --strip:#0D2B4C;
  --tint-1:#0E3050; --tint-ink-1:#7FD8FA;
  --tint-2:#40241E; --tint-ink-2:#FFAB9C;
  --tint-3:#0E2E22; --tint-ink-3:#7FE7BC;
  --tint-4:#12294D; --tint-ink-4:#A8C7FA;
  --tint-5:#0C2E33; --tint-ink-5:#8FE3E0;
  --tint-6:#33270F; --tint-ink-6:#FFD98A;
  --shadow:0 1px 2px rgba(0,0,0,.4); --shadow-float:0 10px 30px rgba(0,0,0,.5); --shadow-lg:0 16px 44px rgba(0,0,0,.55);
}

/* ---------- Aurora background (same drift as ViviT) ---------- */
html {background:var(--bg)}
body {background:transparent}
body::before {content:"";position:fixed;inset:-14vh -12vw;z-index:-1;pointer-events:none;background:radial-gradient(560px 420px at 12% 6%,rgba(0,174,239,.13),transparent 70%),radial-gradient(620px 460px at 88% 88%,rgba(255,128,107,.10),transparent 70%)}
body::after {content:"";position:fixed;inset:-14vh -12vw;z-index:-1;pointer-events:none;background:radial-gradient(520px 400px at 85% 8%,rgba(255,128,107,.10),transparent 70%),radial-gradient(560px 420px at 6% 92%,rgba(0,174,239,.09),transparent 70%)}
@media (prefers-reduced-motion: no-preference) {
  body::before {animation:aurora-a 30s ease-in-out infinite alternate}
  body::after {animation:aurora-b 38s ease-in-out infinite alternate}
}
@keyframes aurora-a {from {transform:translate3d(-1.6%,-1%,0) scale(1)} to {transform:translate3d(1.8%,1.4%,0) scale(1.07)}}
@keyframes aurora-b {from {transform:translate3d(1.4%,1%,0) scale(1.05);opacity:.75} to {transform:translate3d(-1.6%,-1.2%,0) scale(1);opacity:1}}

/* ---------- Film grain + cursor glow + floating glyphs ---------- */
.grain-fx {position:fixed;inset:-60%;width:220%;height:220%;pointer-events:none;z-index:2000;opacity:.05;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E")}
@media (prefers-reduced-motion: no-preference) {
  .grain-fx {animation:grain-shift 8s steps(6) infinite}
}
@keyframes grain-shift {0% {transform:translate(0,0)} 20% {transform:translate(-2%,1%)} 40% {transform:translate(1%,-2%)} 60% {transform:translate(-1%,2%)} 80% {transform:translate(2%,-1%)} 100% {transform:translate(0,0)}}
.cursor-glow {position:fixed;left:0;top:0;width:520px;height:520px;margin:-260px 0 0 -260px;border-radius:50%;pointer-events:none;z-index:-1;background:radial-gradient(circle,rgba(0,174,239,.08),rgba(255,128,107,.035) 45%,transparent 68%)}
.bg-fx {position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.bg-fx span {position:absolute;font-family:"Fraunces",Georgia,serif;color:var(--ink);line-height:1;opacity:.045}
@media (prefers-reduced-motion: no-preference) {
  .bg-fx span {animation:glyph-float 11s ease-in-out infinite alternate}
}
@keyframes glyph-float {from {transform:translateY(-8px) rotate(-3deg)} to {transform:translateY(10px) rotate(3deg)}}

/* ---------- Type: Fraunces headlines, ViviT hero scale ---------- */
h1, h2, .sec-title, .ws-title h1, .route-head h1 {font-family:"Fraunces",Georgia,"Times New Roman",serif;letter-spacing:-.015em}
.hero {padding-top:clamp(54px,9vh,102px)}
.hero h1 {font-size:clamp(46px,6.8vw,84px);line-height:1.02;letter-spacing:-.02em;font-weight:600}
.hero h1 .free {background:linear-gradient(92deg,#00AEEF 10%,#FF806B 90%);-webkit-background-clip:text;background-clip:text;color:transparent}
.pd-caret::after {content:"";display:inline-block;width:.55ch;height:.82em;margin-left:2px;vertical-align:-.08em;background:#00AEEF;animation:caret-blink 1s steps(1) infinite}
@keyframes caret-blink {50% {opacity:0}}
::selection {background:#00AEEF;color:#062A44}

/* ---------- Frosted nav with the gradient line ---------- */
.topnav {background-color:color-mix(in srgb,var(--bg) 84%,transparent);background-image:linear-gradient(90deg,#00AEEF,#FF806B,#33C1E8,#00AEEF);background-size:100% 3px;background-repeat:no-repeat;background-position:top left;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}

/* ---------- Gradient buttons ---------- */
.btn-primary, .btn-teal, .btn-download {background-image:linear-gradient(135deg,#00AEEF,#0090D8);background-color:#0090D8;color:#FFFFFF;border-color:transparent;box-shadow:0 8px 20px rgba(0,144,216,.26)}
.btn-primary:hover, .btn-teal:hover, .btn-download:hover {background-image:linear-gradient(135deg,#33C1E8,#0072BC);background-color:#0072BC;transform:translateY(-1px);box-shadow:0 12px 26px rgba(0,144,216,.32)}

/* ---------- Cards: ViviT radius, lift + 3D tilt ---------- */
.toolcard {border-radius:20px}
@media (prefers-reduced-motion: no-preference) and (hover:hover) {
  .toolcard:hover, .toolcard:focus-visible {
    transform:translateY(-5px) scale(1.012) perspective(720px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
    transition:transform .18s ease-out,box-shadow .18s ease-out,border-color .18s ease-out;
    box-shadow:var(--shadow-float);
    border-color:color-mix(in srgb,var(--brand) 45%,var(--line));
  }
}

/* ---------- Scroll reveals (JS adds .pd-reveal; no-JS keeps all visible) ---------- */
.pd-js .pd-reveal {opacity:0;transform:translateY(16px)}
.pd-js .pd-reveal.pd-from-left {transform:translateX(-22px)}
.pd-js .pd-reveal.pd-from-right {transform:translateX(22px)}
.pd-js .pd-reveal.in {opacity:1;transform:none;transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
@media (prefers-reduced-motion: reduce) {
  .pd-js .pd-reveal {opacity:1;transform:none}
}

/* ---------- Round 2: hero split, floating cards, clean lower page, mobile nav ---------- */

/* Hero: headline left, dropzone right, one screen, big (wide screens) */
@media (min-width: 1024px) {
  .wrap:has(> .hero) { max-width: 1280px; }
  .hero {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    column-gap: 52px;
    row-gap: 20px;
    grid-template-areas:
      "head drop"
      "sub drop"
      "pill drop"
      "trust search"
      "install install"
      "nl nl";
    align-items: start;
    text-align: left;
    min-height: calc(100svh - 57px);
    align-content: center;
    padding: 30px 0 44px;
  }
  .hero > h1 { grid-area: head; font-size: clamp(52px, 5vw, 82px); margin: 0; }
  .hero > .sub { grid-area: sub; margin: 0; max-width: 34em; }
  .hero-drop {
    grid-area: drop;
    height: 100%;
    min-height: 340px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .hero > div:has(> .local-pill) { grid-area: pill; }
  .hero .trust { grid-area: trust; justify-content: flex-start; margin: 0; }
  .hero .searchbox { grid-area: search; margin: 0; align-self: center; }
  .hero .install-row { grid-area: install; justify-self: center; margin-top: 10px; }
  .hero .nlbar { grid-area: nl; margin-top: 4px; }
}

/* Tool cards float gently; tilt and reveal compose on separate properties */
@media (prefers-reduced-motion: no-preference) {
  .toolcard { animation: pd-float 6.8s ease-in-out infinite alternate; }
  .toolcard:nth-child(3n+2) { animation-duration: 7.6s; animation-delay: -2.4s; }
  .toolcard:nth-child(3n) { animation-duration: 6.1s; animation-delay: -4.3s; }
  .toolcard:hover { animation-play-state: paused; }
}
@keyframes pd-float {
  from { translate: 0 -3px; }
  to { translate: 0 4px; }
}

/* Below the hero: less text, cleaner page (headings and honesty lines stay) */
#view-home .sec-sub,
#view-home .why-item p,
#view-home .step-item p { display: none; }

/* Search follows the theme in both modes */
.searchbox { background: var(--surface); border: 1px solid var(--line); }
.searchbox input { background: transparent; color: var(--ink); }
.searchbox input::placeholder { color: var(--ink-faint); }

/* Phone: logo left, actions all the way right */
@media (max-width: 900px) {
  .topnav-in { justify-content: space-between; }
  .nav-actions { margin-left: auto; }
  .nl-row { flex-wrap: wrap; }
  .nl-row input { flex: 1 1 220px; }
}

/* Round 2 fixes: center dropzone contents in the split hero; search pill shape */
@media (min-width: 1024px) {
  .hero-drop { align-items: center; }
  .hero-drop .dz-sub { max-width: 42em; }
}
.searchbox { border-radius: 999px; }

/* ---------- Round 3: bigger headline, split hero v2, showcased Why/Privacy ---------- */
.hero h1 { font-size: clamp(54px, 7.8vw, 104px); }
@media (min-width: 1024px) {
  .hero {
    grid-template-areas:
      "head drop"
      "sub drop"
      "search search"
      "install install";
    row-gap: 22px;
  }
  .hero > h1 { font-size: clamp(72px, 7.2vw, 118px); }
}
/* Bring back the substance lines on the sections that carry them */
#view-home .why-item p,
#projects-block .sec-sub,
#privacy-block .sec-sub,
section.block:has(.why-grid) .sec-sub { display: block; }
/* Why PDFuna + Private by design: centered, larger, professional */
section.block:has(.why-grid) .sec-title,
#privacy-block .sec-title {
  text-align: center;
  font-size: clamp(36px, 4.6vw, 52px);
}
section.block:has(.why-grid) .sec-sub,
#privacy-block .sec-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  font-size: 16.5px;
  line-height: 1.65;
}
#privacy-block p { text-align: center; }
.why-grid { gap: 22px; margin-top: 26px; }
.why-item {
  text-align: center;
  padding: 30px 24px 26px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.why-item h3 { font-size: 20px; justify-content: center; }
.why-item h3 svg { color: var(--accent-text); }
.why-item p { font-size: 15px; line-height: 1.65; }

/* Search suggestions (spelling-tolerant) */
.pd-suggest {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.pd-suggest.show { display: flex; }
.pd-suggest .pd-sug-label { color: var(--ink-soft); font-size: 14px; font-weight: 600; margin-right: 2px; }
.pd-suggest button {
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-text);
  cursor: pointer;
}
.pd-suggest button:hover { border-color: var(--accent); }

/* ============ Tool pages: the big box (2026-12-03) ============
   One large panel, about 70% of the screen: the tool name and the
   dropzone inside it, related tools in small boxes underneath,
   and nothing else. Same cleanliness as the big sites, our skin. */
#view-tool > .wrap {
  width: min(1160px, 94vw);
  margin: 22px auto 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(8, 28, 48, 0.13);
  padding: clamp(20px, 3.4vw, 42px);
  min-height: 70vh;
  display: flex;
  flex-direction: column;
}
#view-tool .crumbs { font-size: 12.5px; opacity: 0.75; }
#view-tool .tp-head { text-align: center; margin-top: 6px; }
#view-tool .tp-head h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.05;
  margin: 8px 0 10px;
}
#view-tool .tp-lede { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 16.5px; }
#view-tool .ws-head { margin-top: 14px; }
#view-tool .ws-title { display: none; }
#view-tool .ws-tools-row { display: flex; justify-content: flex-end; margin: 2px 0 10px; }
#view-tool #ws-body .panel { background: transparent; border: 0; box-shadow: none; padding: 0; }
#view-tool .dropzone {
  min-height: 290px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  border: 2px dashed var(--accent);
  border-radius: 22px;
  background: var(--accent-soft);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
}
#view-tool .dropzone .dz-icon svg { width: 54px; height: 54px; }
#view-tool .dropzone .dz-title { font-size: clamp(20px, 2.4vw, 27px); font-weight: 750; }
#view-tool .dropzone .dz-sub { color: var(--muted); font-size: 15px; }
#view-tool .filelist, #view-tool .result { max-width: 720px; width: 100%; margin-left: auto; margin-right: auto; }
#view-tool .actions { justify-content: center; }
#view-tool .actions .btn-primary { padding: 15px 36px; font-size: 17px; border-radius: 14px; }
#view-tool #ws-privnote { margin-top: auto; padding-top: 18px; display: flex; justify-content: center; gap: 6px; text-align: center; font-size: 13px; }
#view-tool #ws-howto, #view-tool #tp-body { display: none !important; }
.pd-related { width: min(1160px, 94vw); margin: 18px auto 34px; text-align: center; }
.pd-rel-title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.pd-rel-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pd-rel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 650; font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pd-rel-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(8, 28, 48, 0.10); }
@media (max-width: 700px) {
  #view-tool > .wrap { min-height: 66vh; border-radius: 20px; }
  #view-tool .dropzone { min-height: 230px; }
}

/* ============ Merge: visual file cards (2026-12-03) ============
   After files are added, they show as big preview cards side by
   side - first page visible, zoom, rotate, drag to reorder.
   Scoped to the merge tool via :has(#input-merge). */
#view-tool:has(#input-merge) #ws-body:has(.fileitem) .dropzone { min-height: 104px; padding: 16px 14px; }
#view-tool:has(#input-merge) #ws-body:has(.fileitem) .dropzone .dz-icon svg { width: 30px; height: 30px; }
#view-tool:has(#input-merge) #ws-body:has(.fileitem) .dropzone .dz-title { font-size: 17px; }
#view-tool:has(#input-merge) .filelist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
  gap: 14px; max-width: 900px; margin: 20px auto 8px; padding: 0; list-style: none;
}
#view-tool:has(#input-merge) .fileitem {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
}
#view-tool:has(#input-merge) .fileitem .fi-badge { position: absolute; top: 20px; left: 20px; z-index: 2; }
#view-tool:has(#input-merge) .fileitem .pv-strip { display: none; }
#view-tool:has(#input-merge) .fileitem .pd-thumbbox {
  order: -1; height: 205px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
#view-tool:has(#input-merge) .fileitem .pd-thumbbox canvas { max-width: 100%; max-height: 100%; box-shadow: 0 2px 8px rgba(8,28,48,0.12); }
#view-tool:has(#input-merge) .fileitem .fi-name { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-tool:has(#input-merge) .fileitem .fi-meta { color: var(--muted); font-size: 12.5px; }
#view-tool:has(#input-merge) .fileitem[draggable="true"] { cursor: grab; }
#view-tool:has(#input-merge) .fileitem.pd-dragging { opacity: 0.45; }
#view-tool:has(#input-merge) .fileitem.pd-drag-over { outline: 2px solid var(--accent); outline-offset: 2px; }
.pd-card-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; margin-top: auto; flex-wrap: wrap; }
#view-tool:has(#input-merge) .pd-card-actions .iconbtn { width: 34px; height: 34px; padding: 0; flex: 0 0 auto; }
.pd-thumb-fail { color: var(--muted); font-size: 13px; padding: 12px; text-align: center; }
body.pd-busy .pd-act { opacity: 0.4; pointer-events: none; }
.pd-lightbox {
  position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 28, 48, 0.74); padding: 18px;
}
.pd-lb-card { background: var(--surface); border-radius: 18px; padding: 16px; max-width: 94vw; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.pd-lb-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.pd-lb-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-lb-close { font: inherit; font-size: 22px; line-height: 1; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.pd-lb-stage { display: flex; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.pd-lb-stage canvas { max-width: 100%; height: auto; }
.pd-lb-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.pd-lb-nav button { font: inherit; font-weight: 650; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.pd-lb-pageno { color: var(--muted); font-size: 13.5px; }

/* ---- Split PDF: settings-panel layout (Sayed's iLovePDF reference, 2026-12-03).
   The bundle's own modes (Extract pages / Every page separate) are restyled as
   tiles; an added card brings the missing modes: By ranges, Every N pages,
   By file size — all splitting into multiple PDFs delivered as one ZIP. */
#view-tool:has(#input-split) #ws-body:has(.fileitem) .dropzone { min-height: 104px; padding: 16px 14px; }
#view-tool:has(#input-split) #ws-body:has(.fileitem) .dropzone .dz-icon svg { width: 30px; height: 30px; }
#view-tool:has(#input-split) #ws-body:has(.fileitem) .dropzone .dz-title { font-size: 17px; }
#view-tool .panel:has(> #dz-split) .options,
.pd-splitx {
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px; text-align: left;
}
#view-tool .panel:has(> #dz-split) .options .flabel,
#view-tool .panel:has(> #dz-split) .options label { font-weight: 700; color: var(--ink); }
#view-tool .panel:has(> #dz-split) .options .seg { display: flex; gap: 10px; margin-top: 8px; }
#view-tool .panel:has(> #dz-split) .options .seg button {
  flex: 1 1 0; padding: 14px 10px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 14.5px;
}
#view-tool .panel:has(> #dz-split) .options .seg button[aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text);
}
#view-tool .panel:has(> #dz-split) .options #input-ranges {
  width: 100%; box-sizing: border-box; margin-top: 8px; padding: 12px 14px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 15px;
}
.pd-splitx { margin-top: 16px; }
.pd-sx-head { font-weight: 800; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.pd-sx-sub { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.pd-sx-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-sx-tiles button {
  flex: 1 1 0; min-width: 100px; padding: 13px 8px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 14px;
}
.pd-sx-tiles button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.pd-sx-field { margin-top: 14px; }
.pd-sx-field label { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }
.pd-sx-field input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px;
}
.pd-sx-note { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.pd-sx-go {
  margin-top: 16px; width: 100%; padding: 14px 20px; border: 0; border-radius: 999px;
  cursor: pointer; font: inherit; font-weight: 800; font-size: 15.5px; color: #fff;
  background: linear-gradient(135deg, var(--cta-1), var(--cta-2)); box-shadow: var(--shadow-btn);
}
.pd-sx-go[disabled] { opacity: .55; cursor: wait; }
.pd-sx-status { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.pd-sx-status.err { color: var(--danger); font-weight: 600; }
.pd-sx-status a { color: var(--accent-text); font-weight: 700; }
@media (min-width: 1024px) {
  #view-tool .panel:has(> #dz-split) {
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
    column-gap: 26px; align-items: start;
  }
  #view-tool .panel:has(> #dz-split) > #dz-split { grid-column: 1 / -1; grid-row: 1; }
  #view-tool .panel:has(> #dz-split) > #extra-split { grid-column: 1 / -1; grid-row: 2; }
  #view-tool .panel:has(> #dz-split) > #list-split { grid-column: 1; grid-row: 3 / span 4; margin-top: 0; }
  #view-tool .panel:has(> #dz-split) > .options { grid-column: 2; grid-row: 3; }
  #view-tool .panel:has(> #dz-split) > .pd-splitx { grid-column: 2; grid-row: 4; }
  #view-tool .panel:has(> #dz-split) > #split-hint { grid-column: 2; grid-row: 5; }
  #view-tool .panel:has(> #dz-split) > .actions { grid-column: 2; grid-row: 6; justify-content: stretch; }
  #view-tool .panel:has(> #dz-split) > .actions .btn { width: 100%; }
  #view-tool .panel:has(> #dz-split) > .progress { grid-column: 1 / -1; }
  #view-tool .panel:has(> #dz-split) > .error { grid-column: 1 / -1; }
  #view-tool .panel:has(> #dz-split) > .result { grid-column: 1 / -1; }
}

/* ---- Homepage restructure (Sayed's iLovePDF reference, 2026-12-03):
   slim centered hero (no dropzone box, no search bar), the full tool grid
   with category pills directly underneath, then three big panels and an
   honest-numbers strip. The old Popular / category-tiles / Why / Private /
   How sections are replaced by the grid + panels (their substance moved
   into the panels). */
#view-home #hero-drop,
#view-home .hero .searchbox { display: none !important; }
#view-home .hero {
  display: block !important; text-align: center;
  min-height: 0 !important; padding: clamp(44px, 6.5vh, 76px) 0 6px;
}
#view-home .hero .hero-sub { margin-left: auto; margin-right: auto; }
#view-home .hero .hero-actions { justify-content: center; }
.pd-hide { display: none !important; }
.pd-alltools { padding-top: 10px; }
.pd-pills {
  display: flex; flex-wrap: wrap; gap: 9px; justify-content: center;
  margin: 14px auto 26px; max-width: 900px;
}
.pd-pills button {
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font: inherit;
  font-weight: 700; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line);
}
.pd-pills button[aria-pressed="true"] {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.pd-pills button .pd-pill-n { opacity: .55; font-weight: 600; margin-left: 5px; font-size: 12.5px; }
.pd-tools-grid { align-items: stretch; }
a.toolcard.pd-tcard { text-decoration: none; color: inherit; }
.pd-panels { padding-top: 26px; }
.pd-panels-title { text-align: center; }
.pd-panels-sub { text-align: center; color: var(--text-2); max-width: 620px; margin: 8px auto 0; }
.pd-panels-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px;
}
@media (max-width: 900px) { .pd-panels-grid { grid-template-columns: 1fr; } }
.pd-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  padding: 30px 28px 32px; box-shadow: var(--shadow-card); text-align: left;
}
.pd-panel .pd-panel-ic {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px;
}
.pd-panel h3 { font-family: var(--font-d); font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.pd-panel p { color: var(--text-2); font-size: 15px; line-height: 1.65; }
.pd-stats {
  display: flex; flex-wrap: wrap; gap: 14px 44px; justify-content: center;
  margin-top: 40px; padding: 26px 10px 4px; border-top: 1px solid var(--line);
}
.pd-stat { text-align: center; }
.pd-stat .pd-stat-n { font-family: var(--font-d); font-size: 40px; font-weight: 650; color: var(--ink); line-height: 1; }
.pd-stat .pd-stat-l { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-top: 7px; }

/* ---- Homepage round 2 (Sayed, 2026-12-03): one-line centered headline on
   desktop, Install moves to the top nav on desktop, Saved section removed
   on phones so the tools come first. */
#view-home .hero .sub { text-align: center; margin-left: auto; margin-right: auto; }
#pwaInstallBtn.pd-nav-install { margin-left: 10px; align-self: center; }
@media (min-width: 1024px) {
  #view-home .hero h1 { white-space: nowrap; font-size: clamp(38px, 3.9vw, 56px); letter-spacing: -0.01em; }
  #view-home .hero .install-row { display: none !important; }
}
@media (max-width: 1023px) {
  #pwaInstallBtn.pd-nav-install { display: none !important; }
  #view-home #projects-block { display: none !important; }
}

/* ---- Centering + wordmark fixes (Sayed, 2026-12-03): the hero h1 carried
   a 780px max-width from the old two-column hero, so "centered" text was
   centered in a left-hugging box, 121px off true center. And the logo is a
   flex row with a 9px gap, which also landed between "PDF" and "una". */
#view-home .hero h1 { max-width: none !important; width: 100%; }
.logo em { margin-left: -9px; }
#view-home { overflow-x: clip; }

/* ---- Homepage round 3 (Sayed, 2026-12-03): tools grouped under category
   headings, Flow & Batch centered, footer slogan + mega list removed, and
   a working search panel behind the nav search icon. */
.pd-catsec { margin-top: 34px; }
.pd-catsec:first-of-type { margin-top: 6px; }
.pd-cat-title {
  font-family: var(--font-d); font-size: clamp(23px, 2.6vw, 30px); font-weight: 600;
  color: var(--ink); margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px;
}
.pd-cat-n { font-family: var(--font-b); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
#flow-block .sec-title, #flow-block .sec-sub { text-align: center; }
#flow-block .sec-sub { margin-left: auto; margin-right: auto; }
#flow-block .flow-cards { justify-content: center; }
footer > p { display: none !important; }
.pd-search {
  position: fixed; inset: 0; z-index: 200; display: grid; justify-items: center;
  align-items: start; padding: 10vh 16px 16px;
  background: rgba(8, 28, 48, .48); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pd-search[hidden] { display: none; }
.pd-search-box {
  width: min(680px, 94vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow-pop, 0 24px 60px rgba(8,28,48,.35));
  padding: 18px; max-height: 76vh; display: flex; flex-direction: column;
}
#pd-search-input {
  width: 100%; box-sizing: border-box; padding: 15px 18px; font: inherit; font-size: 17px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
}
#pd-search-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.pd-search-results { overflow-y: auto; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pd-sr-label { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); padding: 4px 6px 2px; }
.pd-sr-item {
  display: flex; gap: 13px; align-items: center; padding: 10px 12px; border-radius: 14px;
  text-decoration: none; color: var(--ink); border: 1px solid transparent;
}
.pd-sr-item:hover { background: var(--accent-soft); border-color: var(--line); }
.pd-sr-item .tc-icon { flex: 0 0 auto; }
.pd-sr-text { display: flex; flex-direction: column; min-width: 0; }
.pd-sr-text strong { font-size: 15.5px; }
.pd-sr-text small { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-sr-none { padding: 14px 8px; color: var(--text-2); font-size: 14.5px; }
.pd-search-hint { margin-top: 12px; font-size: 12.5px; color: var(--text-2); text-align: center; }
