/* Scoped visual layer for the directory, upload workspace and loaded editor. */
.tools-directory { width:min(100% - 32px,1120px);padding-block:40px 72px; }
.directory-heading h1 { font-size:44px;line-height:1.15;letter-spacing:-.035em;margin:0 0 8px; }
.directory-heading p { margin:0;color:#526071;font-size:16px;line-height:1.5; }
.category-nav { margin:24px 0 14px; }
.category-chips { display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none; }
.category-chips a { display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border:1px solid #dde2ed;border-radius:8px;background:#fff;color:#1e293b;font-size:14px;font-weight:650;text-decoration:none; }
.category-chips a:hover { border-color:var(--coral); }
.category-chips .category-chip-all { border-color:var(--coral);background:var(--coral);color:#fff; }
.category-select label { display:block;margin-bottom:6px;color:#475569;font-size:14px;font-weight:650; }
.category-select select { width:100%;min-height:44px;padding:0 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:16px; }
.category-select[hidden] { display:none; }
.directory-note { margin:0 0 8px;color:#526071;font-size:14px;line-height:1.5; }
.directory-note a { display:inline-flex;align-items:center;gap:4px;color:var(--coral);font-weight:700; }
.directory-note .icon { width:14px;height:14px; }
.tool-category { scroll-margin-top:16px;--category-ink:#2563eb;--category-bg:#eff4ff; }
.category-from-pdf { --category-ink:#c2410c;--category-bg:#fff1e7; }
.category-to-pdf { --category-ink:#15803d;--category-bg:#e9f8ee; }
.category-security { --category-ink:#7c3aed;--category-bg:#f3edff; }
.category-held { --category-ink:#0e7490;--category-bg:#e6f7fa; }
.category-heading { display:flex;align-items:center;gap:10px;margin:32px 0 14px;font-size:22px;letter-spacing:-.02em; }
.tool-card-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:0;list-style:none; }
.tool-card-grid li { min-width:0; }
.directory-card { display:flex;align-items:center;gap:14px;height:100%;min-height:72px;padding:14px 16px;border:1px solid #dde2ed;border-radius:10px;background:#fff;color:#182238;text-decoration:none; }
.directory-card:hover { border-color:var(--category-ink); }
.directory-card:focus-visible { outline:2px solid var(--coral);outline-offset:2px; }
.tool-art { display:grid;flex:none;place-items:center;width:36px;height:36px;border-radius:8px;background:var(--category-bg);color:var(--category-ink); }
.tool-art .icon { width:19px;height:19px; }
.card-text { flex:1;min-width:0; }
.directory-card h3 { margin:0 0 3px;font-size:15px;line-height:1.3;letter-spacing:-.01em; }
.directory-card p { display:-webkit-box;margin:0;overflow:hidden;color:#526071;font-size:14px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
.card-arrow { flex:none;width:7px;height:7px;border:solid #94a3b8;border-width:2px 2px 0 0;transform:rotate(45deg); }
.directory-card:hover .card-arrow { border-color:var(--category-ink); }
.access-tag { padding:2px 8px;border-radius:99px;background:#f0f2f7;color:#475569;font-size:12px;font-weight:700;letter-spacing:0; }
.access-free { background:#e4f5eb;color:#246442; }
.quality-note { max-width:760px;margin:-4px 0 14px;padding:12px 14px;border-radius:8px;background:#fff7e0;color:#6b4a07;font-size:14px;line-height:1.5; }
.held-tools summary { display:inline-flex;align-items:center;min-height:44px;margin-bottom:12px;color:var(--coral);font-weight:700;cursor:pointer; }
.editor-document-bar { border-top:3px solid #7450d4; }
.editor-doc-actions > .button-primary { min-width:112px;min-height:40px;box-shadow:0 4px 12px #4f36c930; }
.editor-toolbar { background:#211d36;gap:8px; }
.toolbar-group { background:#ffffff06;border-radius:9px;padding:3px; }
.tool-button { color:#d1cddd; }
.tool-button:hover { background:#403452; }
.tool-button.is-active { background:#6544bb;box-shadow:inset 0 0 0 1px #ac92ec;color:white; }
.tool-button.is-active span { color:white; }
.editor-toolbar :focus-visible { outline:2px solid #e0cdff;outline-offset:-2px; }
.toolbar-divider { background:#524464; }
.page-rail { background:#f4f0fa; }
.page-thumb.is-active { border-color:#8a6ccb;background:#fff;box-shadow:0 3px 12px #56389718; }
.page-thumb.is-active .page-thumb-image { outline-color:#7450d4; }
.canvas-workspace { background:#e6e8ef; background-image:none; }
.editor-inspector { background:#fff;border-left-color:#d9d5e5; }
.inspector-head { background:#faf8fe; }
.selected-page-badge { background:#6142a8; }
@media(max-width:900px) {
 .tool-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:640px) {
 .tools-directory { padding-top:24px; }
 .directory-heading h1 { font-size:31px; }
 .category-nav.has-select .category-chips { display:none; }
 .tool-card-grid { grid-template-columns:1fr;gap:10px; }
 .category-heading { margin-top:26px;font-size:20px; }
}
@media(min-width:641px) {
 .category-select { display:none; }
}


/* Optional next step, only on the successful PDF export return. */
.export-next-step { margin: 12px 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.export-next-step-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.export-next-step h2 { margin: 0; font-size: 18px; }
.signature-referral { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.signature-referral h3 { margin: 0; font-size: 16px; }
.signature-referral p { margin: 6px 0; font-size: 14px; }
.signature-referral .quiet-link { display: inline-flex; flex-wrap: wrap; min-height: 44px; align-items: center; gap: 6px; }
.signature-referral .signature-referral-note { color: #526071; font-size: 13px; }
@media (max-width: 600px) { .export-next-step { margin: 10px; padding: 14px; } }
/* JPG to PDF page-size choice, above the dropzone: clear of its focus ring. */
.tool-upload-panel .page-fit-field { margin: 0 0 20px; }
.tool-upload-panel [data-upload-error] { white-space: pre-line; }

/* Home and free-tool upload: one centered upload panel, then task shortcuts (WIN-1176). */
.refresh-introduction { padding: 40px 0 20px; text-align: center; }
.refresh-introduction h1 { max-width: 900px; margin: 0 auto; font-size: 44px; line-height: 1.15; letter-spacing: -.035em; }
.refresh-introduction .tool-intro-copy { margin: 12px auto 0; font-size: 16px; }
.upload-hero { width: min(720px, calc(100% - 32px)); max-width: 720px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.upload-hero .dropzone { min-height: 0; padding: 28px 20px; gap: 8px; border: 1px dashed #b9abe6; border-radius: 12px; background: #faf9ff; }
.upload-hero .dropzone:hover, .upload-hero .dropzone.is-dragging { border-color: #4f36c9; background: #f3f0ff; }
/* The native input must not intercept clicks at the visible picker center. */
.upload-hero .dropzone input[type="file"] { clip-path: inset(50%); pointer-events: none; }
.upload-hero .dropzone .hero-upload-icon { width: 40px; height: 40px; border-radius: 0; background: none; }
.upload-hero .dropzone .hero-upload-icon .icon { width: 28px; height: 28px; }
.upload-hero .dropzone .select-files { min-height: 48px; margin: 4px 0; padding: 12px 24px; border-radius: 8px; font-size: 16px; }
.upload-hero .dropzone > span:not(.hero-upload-icon) { font-size: 14px; }
.upload-hero .dropzone small { font-size: 13px; }
.upload-hero .field-error:not([hidden]) { margin-top: 10px; }
.upload-hero .button-submit { width: auto; min-height: 48px; margin: 12px auto 0; display: flex; justify-content: center; gap: 10px; padding: 12px 24px; }
.upload-hero .button-submit[hidden] { display: none; }
.upload-hero .upload-reassurance { margin: 12px 0 0; font-size: 13px; font-weight: 500; color: #526071; }
.upload-hero .tool-details { margin: 0; padding: 4px 0 0; border: 0; text-align: center; font-size: 13px; }
.upload-hero .tool-details summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.upload-hero .tool-details p { text-align: left; color: #526071; }
.home-tasks { max-width: 1120px; padding: 28px 0 40px; }
.home-tasks h2, .home-steps h2, .home-guide h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: -.015em; }
.home-tasks h2 { max-width: 690px; margin-inline: auto; }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 690px; margin: 0 auto; padding: 0; list-style: none; }
.task-grid li { min-width: 0; }
.task-grid a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none; }
.task-grid a:hover { border-color: #4f36c9; background: #faf9ff; }
.task-icon { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: #ede9fe; color: #4f36c9; }
.task-icon .icon { width: 16px; height: 16px; }
.task-all { display: flex; align-items: center; justify-content: center; gap: 6px; width: max-content; min-height: 44px; margin: 12px auto 0; color: #39249c; font-weight: 650; text-decoration: none; }
.task-all:hover { text-decoration: underline; }
.home-steps { padding: 40px 0; background: #f7f8fc; }
.home-steps .shell { max-width: 1120px; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.guide-steps li { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; row-gap: 4px; counter-increment: steps; }
.guide-steps li::before { content: counter(steps); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ede9fe; color: #39249c; font-size: 13px; font-weight: 750; }
.guide-steps span { color: #526071; font-size: 14px; line-height: 1.5; }
.home-steps .task-all { margin: 20px 0 0; }
.home-guide { max-width: 760px; padding: 40px 0 56px; }
.guide-faq details { border-bottom: 1px solid var(--line); }
.guide-faq summary { display: flex; align-items: center; min-height: 48px; padding: 8px 0; cursor: pointer; font-weight: 650; }
.guide-faq p { margin: 0 0 16px; color: #526071; line-height: 1.6; }
.file-handling-line { color: #526071; font-size: 14px; line-height: 1.6; }
.home-guide .file-handling-line { margin-top: 24px; }
/* Free tool landings: compact steps, one notice, subdued related links. */
.free-tool-guide { max-width: 800px; padding-top: 24px; }
.free-tool-guide h2 { font-size: 22px; }
.free-tool-guide > ol { gap: 16px; }
.free-tool-guide > ol li { padding: 0 0 0 40px; border: 0; background: none; position: relative; line-height: 1.5; }
.free-tool-guide > ol li::before { position: absolute; left: 0; top: -2px; width: 28px; height: 28px; margin: 0; font-size: 13px; }
.guide-callout { margin: 20px 0; padding: 12px 16px; border-left: 3px solid #b4a0e5; background: #faf9ff; color: #3b4558; font-size: 14px; line-height: 1.6; }
.free-tool-guide .related-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.free-tool-guide .related-tools a { min-height: 44px; padding: 0; gap: 8px; border: 0; background: none; color: #39249c; font-weight: 600; }
.free-tool-guide .related-tools a:hover { text-decoration: underline; }
.free-tool-guide .related-icon, .free-tool-guide .related-tools a > .icon { display: none; }
@media (max-width: 600px) {
  .refresh-introduction { padding: 24px 0 16px; }
  .refresh-introduction h1 { font-size: 31px; }
  .refresh-introduction .tool-intro-copy { font-size: 15px; }
  .upload-hero { width: calc(100% - 32px); padding: 0; border-radius: 0; }
  .upload-hero .dropzone { padding: 20px 14px; }
  .home-tasks { width: calc(100% - 32px); padding: 24px 0 32px; }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .task-grid a { gap: 10px; padding: 8px 10px; font-size: 14px; }
  .guide-steps { grid-template-columns: 1fr; gap: 16px; }
  .home-steps .shell, .home-guide { width: calc(100% - 32px); }
  .free-tool-guide .related-tools { flex-direction: column; }
}
