.pdf-tool-page,
.pdf-hub-hero { --pdf-accent: #0e8d87; --pdf-ink: #082d50; --pdf-soft: #eff9f8; }

.pdf-tool-hero,
.pdf-hub-hero {
    overflow: hidden;
    border-bottom: 1px solid #dce8ee;
    background:
        radial-gradient(circle at 84% 18%, rgba(73, 205, 194, .18), transparent 28%),
        radial-gradient(circle at 8% 80%, rgba(64, 137, 216, .12), transparent 26%),
        linear-gradient(145deg, #fbfdff, #eff8fa);
}

.pdf-tool-hero__inner { max-width: 900px; text-align: center; }
.pdf-tool-hero h1,
.pdf-hub-hero h1 { margin: .65rem 0 1rem; color: var(--pdf-ink); font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.05em; }
.pdf-tool-hero .lead,
.pdf-hub-hero .lead { max-width: 770px; margin: 0 auto; color: #47667e; font-size: clamp(1.02rem, 1.6vw, 1.22rem); line-height: 1.7; }
.eyebrow { margin: 0; color: #087b76; font-size: .77rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }

.pdf-hub-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.pdf-hub-hero .lead { margin-inline: 0; }
.pdf-privacy-card { padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid rgba(14, 141, 135, .18); border-radius: 24px; background: rgba(255, 255, 255, .84); box-shadow: 0 20px 60px rgba(8, 45, 80, .1); }
.pdf-privacy-card__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #dcf6f3; font-size: 1.35rem; }
.pdf-privacy-card h2 { margin: 1rem 0 .6rem; color: var(--pdf-ink); font-size: 1.3rem; }
.pdf-privacy-card p { margin: 0; color: #526c80; line-height: 1.7; }

.pdf-trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem 1.35rem; margin-top: 1.6rem; color: #294f69; font-size: .88rem; font-weight: 650; }
.pdf-hub-hero .pdf-trust-row { justify-content: flex-start; }

.section--soft { background: #f5f8fa; }
.section-heading { max-width: 700px; margin-bottom: 2rem; }
.section-heading h2 { margin: .55rem 0 0; color: var(--pdf-ink, #082d50); font-size: clamp(1.75rem, 3vw, 2.6rem); letter-spacing: -.035em; }
.pdf-tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.pdf-tool-card { display: flex; min-height: 270px; padding: 1.7rem; flex-direction: column; border: 1px solid #dbe5eb; border-radius: 22px; color: inherit; background: #fff; box-shadow: 0 8px 24px rgba(8, 45, 80, .05); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.pdf-tool-card:hover { transform: translateY(-4px); border-color: #86cfc9; box-shadow: 0 18px 44px rgba(8, 45, 80, .1); }
.pdf-tool-card__icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; color: #087b76; background: #e5f7f5; font-size: 1.5rem; font-weight: 800; }
.pdf-tool-card h3 { margin: 1.3rem 0 .55rem; color: #082d50; font-size: 1.35rem; }
.pdf-tool-card p { margin: 0; color: #587083; line-height: 1.65; }
.pdf-tool-card__link { margin-top: auto; padding-top: 1.2rem; color: #087b76; font-weight: 750; }
.pdf-hub-copy { max-width: 860px; }

.pdf-workspace-section { padding-top: clamp(1.5rem, 4vw, 3rem); background: linear-gradient(#fff, #f8fafc); }
.pdf-workspace { max-width: 960px; margin-inline: auto; padding: clamp(1rem, 3vw, 2rem); border: 1px solid #dce6eb; border-radius: 26px; background: #fff; box-shadow: 0 22px 70px rgba(8, 45, 80, .1); }
.pdf-dropzone { padding: clamp(2rem, 6vw, 4.5rem) 1.5rem; border: 2px dashed #9dbfc9; border-radius: 20px; text-align: center; background: #f8fcfc; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.pdf-dropzone:hover,
.pdf-dropzone:focus-visible,
.pdf-dropzone.is-dragging { border-color: #0e8d87; outline: 0; background: #eefaf8; transform: translateY(-2px); }
.pdf-dropzone.has-files { padding-block: 1.6rem; }
.pdf-dropzone__icon { display: inline-grid; width: 64px; height: 64px; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(145deg, #0f9b93, #08736f); box-shadow: 0 10px 24px rgba(14, 141, 135, .2); font-size: .86rem; font-weight: 850; letter-spacing: .04em; }
.pdf-dropzone h2 { margin: 1rem 0 .4rem; color: #082d50; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.pdf-dropzone p { margin: 0 0 1.1rem; color: #687f90; }

.button { display: inline-flex; min-height: 46px; padding: .72rem 1.25rem; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button--primary { color: #fff; background: #082d50; box-shadow: 0 8px 22px rgba(8, 45, 80, .18); }
.button--primary:hover { background: #0c3d69; }
.button--secondary { color: #082d50; border-color: #9db5c5; background: #fff; }
.button--secondary:hover { background: #edf7f8; }
.button--ghost { color: #526c80; background: transparent; }

.pdf-file-list { display: grid; gap: .65rem; margin-top: 1rem; }
.pdf-file-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .8rem 1rem; border: 1px solid #e1e9ee; border-radius: 14px; background: #fff; }
.pdf-file-row__icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: #ad2929; background: #fff0f0; font-size: .69rem; font-weight: 850; }
.pdf-file-row__name { min-width: 0; }
.pdf-file-row__name strong { display: block; overflow: hidden; color: #163b57; text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-row__name small { color: #6a8192; }
.pdf-file-row__actions { display: flex; gap: .3rem; }
.pdf-icon-button { width: 34px; height: 34px; border: 1px solid #d6e1e7; border-radius: 9px; color: #274b64; background: #fff; cursor: pointer; }
.pdf-icon-button:hover { background: #eef7f8; }
.pdf-icon-button:disabled { opacity: .35; cursor: default; }

.pdf-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.3rem 0 .65rem; padding: 0; border: 0; }
.pdf-options legend { grid-column: 1 / -1; margin-bottom: .35rem; color: #173c58; font-weight: 800; }
.pdf-option-card { position: relative; display: flex; min-height: 92px; padding: 1rem; align-items: flex-start; gap: .7rem; border: 1px solid #dbe5eb; border-radius: 15px; cursor: pointer; }
.pdf-option-card:has(input:checked) { border-color: #0e8d87; background: #effaf9; box-shadow: 0 0 0 2px rgba(14, 141, 135, .1); }
.pdf-option-card input { margin-top: .25rem; accent-color: #0e8d87; }
.pdf-option-card strong,
.pdf-option-card small { display: block; }
.pdf-option-card strong { color: #123b57; }
.pdf-option-card small { margin-top: .25rem; color: #698091; line-height: 1.35; }
.pdf-option-card em { padding: .18rem .4rem; border-radius: 999px; color: #08736f; background: #d9f4f1; font-size: .62rem; font-style: normal; text-transform: uppercase; }
.pdf-muted { color: #687f90; font-size: .87rem; line-height: 1.55; }

.pdf-split-controls { display: grid; gap: .75rem; margin-top: 1.2rem; }
.pdf-split-controls > input[type="text"] { width: 100%; min-height: 48px; padding: .75rem 1rem; border: 1px solid #b9cbd5; border-radius: 12px; font: inherit; }
.pdf-split-controls > input[type="text"]:focus { border-color: #0e8d87; outline: 3px solid rgba(14, 141, 135, .13); }
.pdf-check { display: flex; gap: .55rem; align-items: center; color: #365770; }
.pdf-check input { width: 18px; height: 18px; accent-color: #0e8d87; }
.pdf-page-picker { display: grid; max-height: 360px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .7rem; overflow: auto; padding: .8rem; border: 1px solid #e0e8ed; border-radius: 15px; background: #f8fafb; }
.pdf-page-card { display: grid; gap: .5rem; padding: .55rem; border: 1px solid #dbe5ea; border-radius: 11px; background: #fff; cursor: pointer; }
.pdf-page-card:has(input:checked) { border-color: #0e8d87; box-shadow: 0 0 0 2px rgba(14, 141, 135, .1); }
.pdf-page-card canvas { width: 100%; height: 118px; object-fit: contain; background: #edf1f4; }
.pdf-page-card span { color: #294d66; font-size: .8rem; font-weight: 650; }
.pdf-page-picker__note { grid-column: 1 / -1; }

.pdf-workspace__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.35rem; }
.pdf-progress { display: flex; gap: .9rem; align-items: center; margin-top: 1rem; padding: 1rem; border-radius: 14px; color: #173c58; background: #eef7fb; }
.pdf-progress p { margin: .15rem 0 0; color: #587487; }
.pdf-spinner { width: 28px; height: 28px; flex: 0 0 auto; border: 3px solid #bdd7df; border-top-color: #0e8d87; border-radius: 50%; animation: pdf-spin .8s linear infinite; }
@keyframes pdf-spin { to { transform: rotate(1turn); } }
.pdf-error { margin-top: 1rem; padding: 1rem; border: 1px solid #f3b5b5; border-radius: 12px; color: #8f1d1d; background: #fff1f1; }

.pdf-result { margin-top: 1.2rem; padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid #aadfd9; border-radius: 20px; background: #f0fbf9; }
.pdf-result__heading { display: flex; gap: .9rem; align-items: center; }
.pdf-result__heading h2 { margin: .2rem 0 0; color: #082d50; }
.pdf-result__check { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #fff; background: #0e8d87; font-size: 1.4rem; }
.pdf-result__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: 1.2rem 0; }
.pdf-result__stats div { padding: .85rem; border-radius: 12px; background: #fff; }
.pdf-result__stats dt { color: #6a8192; font-size: .76rem; }
.pdf-result__stats dd { margin: .2rem 0 0; color: #103852; font-size: 1.08rem; font-weight: 800; }
.pdf-result__notes { padding-left: 1.2rem; color: #42657b; font-size: .88rem; }
.pdf-download { margin-top: .5rem; }

.pdf-download-complete { margin-top: 1rem; padding: 1.5rem; border: 1px solid #cfdce4; border-radius: 18px; text-align: center; background: #fff; }
.pdf-download-complete > div { display: grid; width: 42px; height: 42px; margin: 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #15803d; }
.pdf-download-complete h2 { margin: .8rem 0 .4rem; color: #082d50; }
.pdf-download-complete p { margin: 0 0 1rem; color: #5a7486; }
.pdf-privacy-note { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid #e1e8ec; color: #647b8c; font-size: .82rem; line-height: 1.6; }

.pdf-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.pdf-related { position: sticky; top: 110px; padding: 1.25rem; border: 1px solid #dfe8ed; border-radius: 18px; background: #fff; }
.pdf-related h2 { margin: 0 0 .75rem; color: #082d50; font-size: 1.05rem; }
.pdf-related a { display: flex; padding: .75rem 0; justify-content: space-between; border-bottom: 1px solid #edf1f4; color: #31566f; font-weight: 650; }
.pdf-related a:last-child { border: 0; }
.pdf-faq { max-width: 900px; }
.pdf-faq details { border-bottom: 1px solid #dce5ea; }
.pdf-faq summary { padding: 1.1rem 2rem 1.1rem 0; color: #113a56; font-weight: 750; cursor: pointer; }
.pdf-faq details p { margin: -.35rem 0 1.15rem; color: #577183; line-height: 1.7; }

[hidden] { display: none !important; }

@media (max-width: 820px) {
    .pdf-hub-hero__grid,
    .pdf-content-grid { grid-template-columns: 1fr; }
    .pdf-tool-cards { grid-template-columns: 1fr; }
    .pdf-options { grid-template-columns: 1fr; }
    .pdf-related { position: static; }
}

@media (max-width: 540px) {
    .pdf-workspace { padding: .75rem; border-radius: 18px; }
    .pdf-dropzone { padding: 2rem .75rem; }
    .pdf-file-row { grid-template-columns: auto minmax(0, 1fr); }
    .pdf-file-row__actions { grid-column: 1 / -1; justify-content: flex-end; }
    .pdf-result__stats { grid-template-columns: 1fr; }
    .pdf-workspace__actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .pdf-tool-card,
    .pdf-dropzone,
    .button { transition: none; }
    .pdf-spinner { animation-duration: 1.8s; }
}
