/* ConvertPDF visual system. Existing behavior and component hooks live in style.css. */
:root {
  --bg: #f8f9fb;
  --surface: #fff;
  --surface-subtle: #f5f7f9;
  --text: #1c2733;
  --text-muted: #607080;
  --border: #e1e6eb;
  --border-strong: #cbd3dc;
  --primary: #cf3e37;
  --primary-hover: #b5312b;
  --primary-soft: #fff1ef;
  --primary-text: #a52f29;
  --success: #17775a;
  --warning: #a35e13;
  --danger: #b93131;
  --shadow-sm: 0 2px 10px rgb(22 36 51 / 4%);
  --shadow-md: 0 14px 36px rgb(22 36 51 / 7%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --primary-dark: var(--primary-hover);
  --primary-light: var(--primary-soft);
  --white: var(--surface);
  --radius: var(--radius-md);
  --shadow: var(--shadow-sm);
}

/* Layout and type */
html { scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; font-size: 16px; }
.container { max-width: 1180px; padding: 0 28px; }
.main { padding-bottom: 80px; }
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.3; }
p { overflow-wrap: break-word; }
a { text-underline-offset: 3px; }

/* Header */
.header { height: 68px; padding: 0; position: relative; box-shadow: 0 1px 0 rgb(22 36 51 / 2%); }
.header .container { height: 100%; gap: 24px; }
.logo { white-space: nowrap; letter-spacing: -.035em; font-size: 1.24rem; font-weight: 780; }
.nav { gap: 8px; align-items: center; flex-wrap: nowrap; }
.nav a { color: #4b5c6d; font-size: .9rem; font-weight: 600; min-height: 42px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: var(--radius-sm); }
.nav a:hover { background: var(--surface-subtle); color: var(--text); }

/* Hero and trust cues */
.hero { max-width: 960px; margin: 0 auto; padding: 70px 0 42px; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.65rem); font-weight: 760; margin-bottom: 16px; }
.hero-desc { color: var(--text-muted); font-size: 1.08rem; line-height: 1.7; margin-bottom: 16px; }
.badges { gap: 12px 24px; margin-top: 22px; }
.badge { padding: 0; background: transparent; color: #536476; font-size: .84rem; font-weight: 560; }
.badge::before { content: "✓"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border-radius: 50%; background: #e8f4ee; color: var(--success); font-size: .68rem; font-weight: 800; }
.local-note { color: #66788a; font-size: .88rem; }
.tool-hero { text-align: left; max-width: 960px; padding: 56px 0 30px; }
.tool-hero .hero-desc { max-width: 720px; font-size: 1.02rem; margin-bottom: 10px; }
.tool-hero .local-note::before { content: "✓"; margin-right: 7px; color: var(--success); font-weight: 800; }
.tools-page .hero { max-width: none; text-align: left; padding: 62px 0 48px; }
.tools-page .hero h1 { max-width: 820px; }
.tools-page .hero-desc { max-width: 660px; }

/* Buttons and focus */
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ec8078; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { gap: 12px; margin: 22px 0 0; }
.btn-primary, .btn-secondary { min-height: 48px; padding: 11px 22px; border-radius: var(--radius-sm); font-size: .94rem; font-weight: 690; transition: background .16s, border-color .16s, color .16s; }
.btn-primary { flex: none; min-width: 184px; background: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { color: #394c5e; border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-subtle); border-color: #9ba8b5; color: var(--text); }

/* Tool panels and uploader */
.tabs, .tool-shell { max-width: 960px; margin-left: auto; margin-right: auto; }
.tabs { width: min(100%, 960px); padding: 5px; gap: 4px; background: #e9edf1; border-color: transparent; border-radius: var(--radius-md); margin-bottom: 18px; }
.tab-btn { min-height: 46px; border-radius: var(--radius-sm); color: #546578; }
.tab-btn:hover:not(.active) { background: rgb(255 255 255 / 58%); color: var(--text); }
.tab-btn.active { background: var(--surface); color: var(--primary-text); box-shadow: var(--shadow-sm); }
.tool-shell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 30px; }
.drop-zone { border: 1.5px dashed #bbc7d1; border-radius: var(--radius-md); padding: 42px 24px; background: #fbfcfd; min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--primary); background: var(--primary-soft); }
.drop-zone:focus-visible { outline-offset: 3px; }
.drop-icon { width: 46px; height: 46px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 15px; background: #edf1f4; color: #566b7d; font-size: 0; }
.drop-icon svg { width: 25px; height: 25px; }
.drop-title { font-size: 1.02rem; font-weight: 690; margin-bottom: 12px; }
.file-picker { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 8px 22px; border-radius: var(--radius-sm); background: var(--primary); color: white; font-size: .9rem; font-weight: 700; margin-bottom: 11px; }
.drop-zone:hover .file-picker, .drop-zone:focus-visible .file-picker { background: var(--primary-hover); }
.drop-sub { color: var(--text-muted); font-size: .84rem; }
.drop-zone[aria-disabled="true"] { background: var(--surface-subtle); }
.status, .editor-summary { margin: 16px 0; padding: 13px 16px; border-radius: var(--radius-sm); background: #f0f5f7; color: #3e5a68; font-size: .9rem; font-weight: 600; }
.status:empty, .editor-summary:empty { display: none; }
.inline-error { background: #fff1f0; color: #9f2b2b; border-color: #f0c3bf; margin: 16px 0; }
.options { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; margin: 22px 0 0; padding: 24px 0 0; gap: 18px; }
.option-row { align-items: flex-start; gap: 14px 24px; }
.option-row label, .option-label { color: #394c5e; min-width: 116px; font-size: .9rem; font-weight: 650; padding-top: 9px; }
.btn-group { gap: 8px; }
.fmt-btn, .dpi-btn, .page-btn, .orient-btn { min-height: 42px; padding: 8px 16px; border-radius: var(--radius-sm); border-color: var(--border-strong); color: #4e6173; font-size: .88rem; }
.fmt-btn:hover:not(.active), .dpi-btn:hover:not(.active), .page-btn:hover:not(.active), .orient-btn:hover:not(.active) { background: var(--surface-subtle); color: var(--text); }
.fmt-btn.active, .dpi-btn.active, .page-btn.active, .orient-btn.active { background: var(--primary-soft); color: var(--primary-text); border-color: #e9aaa5; }
input[type="range"] { accent-color: var(--primary); }
.tool-note { color: var(--text-muted); font-size: .86rem; line-height: 1.55; }
.progress-wrap { margin: 22px 0; padding: 16px; background: var(--surface-subtle); border-radius: var(--radius-sm); }
.progress-bar { background: #dce3e8; height: 9px; }
.progress-text { text-align: left; }
.results-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px; }
.result-card { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.result-card img { height: 140px; padding: 8px; background: var(--surface-subtle); }
.result-card-info { padding: 12px; }
.result-card-dl, .editor-download { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--primary-text); border: 1px solid #e9aaa5; border-radius: var(--radius-sm); font-size: .86rem; }
.result-card-dl:hover, .editor-download:hover { background: var(--primary-soft); color: var(--primary-text); }
.img-preview-list { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
.img-preview-item { border-radius: var(--radius-md); }
.img-preview-item img { height: 108px; background: var(--surface-subtle); }
.img-preview-name { padding: 9px; }
.img-preview-item .remove-btn { min-width: 40px; min-height: 40px; width: 40px; height: 40px; border-radius: var(--radius-sm); background: #334354e0; }
.order-controls button { min-height: 42px; color: #42556a; border-radius: var(--radius-sm); }

/* PDF editor */
.editor-summary { display: inline-block; margin-bottom: 6px; }
.editor-list { gap: 10px; margin: 20px 0; }
.editor-card { position: relative; min-width: 0; padding: 15px 16px 15px 44px; border-color: var(--border); border-radius: var(--radius-md); box-shadow: none; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 16px; align-items: center; }
.editor-card::before { content: "⋮⋮"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); letter-spacing: -4px; color: #93a1ac; font-size: 19px; }
.editor-card-title { grid-column: 1; font-size: .92rem; font-weight: 680; margin: 0; }
.editor-card-detail { grid-column: 1; font-size: .82rem; margin: 2px 0 0; }
.editor-card-actions { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; }
.editor-small-btn { min-height: 40px; color: #44566a; border-color: var(--border-strong); border-radius: var(--radius-sm); padding: 7px 11px; font-size: .82rem; }
.editor-small-btn:hover:not(:disabled) { border-color: #a5b0bb; background: var(--surface-subtle); }
.editor-small-btn[aria-label*="삭제"]:hover, .editor-small-btn[aria-label*="삭제"]:focus-visible { color: var(--danger); border-color: #e0a3a3; background: #fff4f3; }
.editor-small-btn:disabled { opacity: .42; }
[data-editor-mode="organize"] .editor-list { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.editor-page-card { padding: 12px; display: flex; flex-direction: column; text-align: left; }
.editor-page-card::before { display: none; }
.editor-thumbnail { display: grid; place-items: center; width: 100%; height: 190px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--surface-subtle); overflow: hidden; }
.editor-page-card img { width: 160px; max-width: 100%; height: 160px; margin: 0; object-fit: contain; }
.editor-page-card .editor-card-title { font-size: .88rem; }
.editor-page-card .editor-card-detail { margin-bottom: 12px; }
.editor-page-card .editor-card-actions { margin-top: auto; justify-content: flex-start; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; width: 100%; }
.editor-page-card .editor-small-btn { min-width: 0; padding: 7px 3px; font-size: .76rem; }
.editor-modes { gap: 10px; flex-direction: column; }
.editor-modes legend { color: #394c5e; margin-bottom: 10px; }
.editor-modes label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
#pageRange { border-color: var(--border-strong); border-radius: var(--radius-sm); }
#pageRange:focus-visible { outline: 3px solid #ec8078; outline-offset: 2px; }
.editor-results { gap: 10px; }

/* Dashboard */
.hub-section { margin-bottom: 54px; }
.hub-section h2 { font-size: 1.5rem; margin: 0 0 20px; font-weight: 730; }
.tools-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.tools-grid.frequent { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.tool-card { position: relative; gap: 7px; min-width: 0; padding: 20px; border-radius: var(--radius-md); transition: border-color .16s, box-shadow .16s, transform .16s; }
.tool-card:hover { border-color: #dda19c; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tool-card-icon { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); background: #f1f3f5; color: #4d5f70; font-size: .76rem; font-weight: 780; letter-spacing: -.03em; }
.tool-card h3 { font-size: 1.01rem; margin-top: 5px; }
.tool-card p { color: var(--text-muted); font-size: .86rem; line-height: 1.5; }
.format-badge { order: 2; background: transparent; color: #7b8996; padding: 0; font-size: .72rem; font-weight: 650; }
.tool-card h3 { order: 3; }
.tool-card p { order: 4; }
.card-open { order: 5; margin-top: 7px; color: var(--primary-text); font-size: .86rem; }
.tools-grid.frequent .tool-card { min-height: 225px; padding: 24px; border-color: #d9e0e6; box-shadow: var(--shadow-sm); }
.tools-grid.frequent .tool-card-icon { width: 46px; height: 46px; color: var(--primary-text); background: var(--primary-soft); font-size: .82rem; }
.tools-grid.frequent .tool-card h3 { font-size: 1.12rem; }
.tools-grid:not(.frequent) .tool-card { min-height: 170px; }
.tools-grid:not(.frequent) .card-open { margin-top: auto; }
.hub-note { max-width: 800px; margin: 36px 0; }

/* Supporting content, FAQ, and cross product */
.features { padding: 68px 0 28px; max-width: 960px; margin: 0 auto; }
.features h2, .faq h2 { text-align: left; font-size: 1.55rem; }
.feature-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.feature-card { text-align: left; border-radius: var(--radius-md); padding: 22px; }
.feature-card h3 { font-size: .96rem; }
.feature-card p { color: var(--text-muted); font-size: .86rem; }
.tool-copy, .faq, .related { max-width: 800px; margin-left: auto; margin-right: auto; }
.tool-copy { margin-top: 72px; padding-top: 34px; border-top: 1px solid var(--border); }
.tool-copy h2, .related h2 { font-size: 1.35rem; margin: 30px 0 14px; }
.tool-copy p, .tool-copy li { color: #536273; line-height: 1.75; }
.tool-copy ol { margin: 14px 0 22px; }
.tool-copy li { padding-left: 4px; }
.faq { padding: 32px 0 44px; }
.faq-list { gap: 0; border-top: 1px solid var(--border); }
.faq-item { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.faq-item summary { padding: 18px 3px; min-height: 58px; }
.faq-item summary::after { content: "+"; color: #617385; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 3px 20px; color: var(--text-muted); }
.related { margin-top: 26px; }
.tool-links { gap: 10px; }
.tool-links a { border-color: var(--border); border-radius: var(--radius-sm); color: #435469; min-height: 43px; }
.tool-links a:hover { color: var(--primary-text); background: var(--surface); border-color: #e4aaa5; }
.crosslink-banner { display: flex; align-items: center; gap: 18px; max-width: 960px; margin: 42px auto 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); text-decoration: none; }
.crosslink-banner:hover { border-color: #c6cadf; box-shadow: var(--shadow-sm); }
.crosslink-mark { display: inline-grid; place-items: center; flex: 0 0 45px; width: 45px; height: 45px; border-radius: var(--radius-sm); background: #f0eefb; color: #5b55a9; font-size: .77rem; font-weight: 800; }
.crosslink-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.crosslink-content strong { font-size: .96rem; }
.crosslink-content > span { color: var(--text-muted); font-size: .82rem; }
.crosslink-action { color: #5b55a9; font-size: .85rem; font-weight: 690; white-space: nowrap; }

/* Legal pages and empty state */
.content-page { max-width: 800px; padding-top: 58px; padding-bottom: 28px; }
.content-page h1 { font-size: 2rem; margin-bottom: 12px; }
.content-page h2 { font-size: 1.23rem; margin: 32px 0 12px; }
.content-page p, .content-page li { color: #536273; line-height: 1.85; margin-bottom: 16px; }
.content-page ul { padding-left: 24px; margin: 12px 0 30px; }
.content-page a { color: var(--primary-text); }
.not-found { min-height: 55vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 0; }
.error-code { color: var(--primary-text); background: var(--primary-soft); border-radius: 100px; padding: 5px 16px; font-size: .86rem; font-weight: 760; margin-bottom: 18px; }
.not-found .hero-desc { max-width: 540px; }
.not-found-links { justify-content: center; margin-top: 8px; }
.not-found-links a:first-child { background: var(--primary); color: white; border-color: var(--primary); }
.not-found-links a:first-child:hover { background: var(--primary-hover); color: white; }

/* Footer */
.footer { text-align: left; padding: 48px 0 26px; }
.footer-top { display: flex; justify-content: space-between; align-items: start; gap: 40px; padding-bottom: 32px; }
.footer-description { color: var(--text-muted); font-size: .86rem; margin-top: 10px; }
.footer-links { justify-content: flex-end; gap: 10px 24px; max-width: 620px; margin: 0; }
.footer-links a { color: #526477; font-size: .86rem; }
.footer-copy { padding-top: 20px; border-top: 1px solid var(--border); color: #708092; font-size: .8rem; }

/* Responsive */
@media (max-width: 1050px) {
  .tools-grid.frequent { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tools-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  [data-editor-mode="organize"] .editor-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .container { padding: 0 20px; }
  .header { height: 64px; }
  .logo { font-size: 1.1rem; }
  .nav { gap: 2px; }
  .nav a { padding: 0 8px; font-size: .84rem; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 2rem; }
  .hero-desc { font-size: .98rem; }
  .tool-hero, .tools-page .hero { padding: 42px 0 26px; }
  .tool-shell { padding: 22px; }
  .drop-zone { min-height: 220px; padding: 30px 18px; }
  .tools-grid.frequent, .tools-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-links { justify-content: flex-start; }
  .feature-grid { grid-template-columns: 1fr; }
  .editor-card { grid-template-columns: 1fr; gap: 2px; }
  .editor-card-actions { grid-column: 1; grid-row: 3; justify-content: flex-start; margin-top: 12px; }
  .editor-small-btn { min-height: 44px; }
}
@media (max-width: 560px) {
  .main { padding-bottom: 54px; }
  .hero h1 { font-size: 1.86rem; }
  .badges { gap: 8px 16px; }
  .badge { font-size: .78rem; }
  .tool-shell { padding: 16px; border-radius: var(--radius-md); }
  .drop-zone { min-height: 210px; }
  .actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; min-height: 48px; }
  .option-row { align-items: stretch; }
  .option-row label, .option-label { padding-top: 0; }
  .btn-group button { min-height: 44px; }
  .tools-grid.frequent { grid-template-columns: 1fr; }
  .tools-grid:not(.frequent) { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .tools-grid.frequent .tool-card, .tools-grid:not(.frequent) .tool-card { min-height: 0; }
  .tools-grid:not(.frequent) .tool-card { padding: 15px; }
  .tools-grid:not(.frequent) .tool-card h3 { font-size: .9rem; }
  .tools-grid:not(.frequent) .tool-card p { font-size: .79rem; }
  .tool-card { padding: 20px; }
  .hub-section { margin-bottom: 44px; }
  [data-editor-mode="organize"] .editor-list { grid-template-columns: 1fr; }
  .editor-page-card { padding: 14px; }
  .editor-thumbnail { height: 180px; }
  .editor-page-card .editor-card-actions { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .editor-page-card .editor-small-btn { min-height: 44px; }
  .crosslink-banner { flex-wrap: wrap; padding: 18px; }
  .crosslink-action { width: 100%; padding-left: 63px; }
  .content-page { padding-top: 42px; }
}
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .logo { font-size: 1rem; }
  .nav a { padding: 0 6px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool-card, .btn-primary, .btn-secondary, .drop-zone, .tab-btn { transition: none; }
}

/* Final visual system v3: open hero, dark work area, illustrated tools, quiet content. */
:root {
  --page-bg: #f7f9fb;
  --ink: #101820;
  --text: #17212b;
  --muted: #687786;
  --border: #dce3e9;
  --dark-950: #11161c;
  --dark-900: #171d24;
  --dark-850: #1e252d;
  --dark-border: #343e49;
  --coral-600: #f04444;
  --coral-500: #ff5151;
  --coral-hover: #db3737;
  --coral-soft: #fff0ee;
  --blue-600: #347bf6;
  --green-600: #2fb95b;
  --purple-600: #7657e8;
  --primary: var(--coral-600);
  --primary-hover: var(--coral-hover);
  --primary-soft: var(--coral-soft);
  --primary-text: #bd3030;
  --bg: var(--page-bg);
  --shadow-sm: 0 5px 16px rgb(16 24 32 / 6%);
  --shadow-md: 0 16px 40px rgb(15 20 26 / 14%);
}
body { background: var(--page-bg); color: var(--text); }
.header { background: #fff; border-bottom-color: #e7ecf0; }
.logo { color: var(--ink); }
.logo span { color: var(--coral-600); }
.main { padding-bottom: 70px; }
h1, h2, h3 { color: var(--ink); }
.btn-primary, .file-picker { background: var(--coral-600); color: #fff; }
.btn-primary:hover:not(:disabled), .drop-zone:hover .file-picker, .drop-zone:focus-visible .file-picker { background: var(--coral-hover); }
:focus-visible { outline-color: var(--coral-500); }

/* The home hero stays open; the dark work area below owns the focal point. */
.home-hero {
  width: min(100%, 1100px); max-width: none; margin: 30px auto 20px;
  padding: 10px 4px 8px; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr);
  align-items: center; gap: 22px; text-align: left; background: transparent; border: 0;
}
.home-hero .hero-copy { min-width: 0; }
.hero-eyebrow { margin: 0 0 13px; color: #bf3b38; font-size: .78rem; font-weight: 770; letter-spacing: .08em; }
.home-hero h1 { font-size: clamp(2.7rem,3.55vw,3.25rem); line-height: 1.17; letter-spacing: -.045em; margin: 0 0 18px; }
.home-hero h1 span { color: #d73535; }
.home-hero .hero-desc { max-width: 600px; color: var(--muted); font-size: 1.1rem; line-height: 1.65; }
.home-hero .badges { justify-content: flex-start; gap: 10px 21px; margin-top: 22px; }
.home-hero .badge { color: #526170; font-weight: 660; }
.home-hero .badge::before { background: #eaf7ed; color: #24974a; }
.hero-visual { width: 100%; max-width: 455px; justify-self: end; }
.hero-visual svg { display: block; width: 100%; height: auto; }
.tool-hero, .tools-page .hero {
  max-width: 1000px; margin: 26px auto 18px; padding: 32px 8px 22px;
  background: transparent; border: 0; text-align: left;
}
.tool-hero h1, .tools-page .hero h1 { font-size: clamp(2.1rem,3.3vw,2.8rem); }
.tool-hero .hero-desc, .tools-page .hero-desc { color: var(--muted); }
.tools-page .hero { max-width: 1120px; }

/* Shared dark upload workspace. Existing tab, input, option, and result hooks stay intact. */
.home-workspace {
  width: min(100%,1080px); margin: 0 auto; padding: 25px 29px 26px;
  border: 1px solid #2d363f; border-radius: 21px; background: var(--dark-950);
  box-shadow: var(--shadow-md); color: #fff;
}
.home-workspace .tabs { width: 100%; max-width: none; margin: 0 0 20px; }
.home-workspace .tool-shell { width: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
[data-tool-mode]:not([data-tool-mode="home"]) .tool-shell,
[data-editor-mode] .tool-shell {
  width: min(100%,1040px); max-width: none; padding: 30px;
  border: 1px solid #2d363f; border-radius: 20px; background: var(--dark-950);
  box-shadow: var(--shadow-md); color: #fff;
}
.home-workspace .tabs {
  padding: 5px; background: #242c35; border: 1px solid #343e49; border-radius: 11px;
}
.tab-btn { color: #c4ced8; font-weight: 690; }
.tab-btn:hover:not(.active) { background: #35404b; color: #fff; }
.tab-btn.active { background: var(--coral-600); color: #fff; box-shadow: none; }
.home-workspace .tab-btn { min-height: 50px; }
.home-workspace .drop-zone,
[data-tool-mode]:not([data-tool-mode="home"]) .drop-zone,
[data-editor-mode] .drop-zone {
  min-height: 210px; padding: 28px 20px; border: 1.5px dashed #65717e;
  border-radius: 13px; background: var(--dark-850); color: #fff;
}
.home-workspace .drop-zone:hover, .home-workspace .drop-zone.drag-over,
[data-tool-mode]:not([data-tool-mode="home"]) .drop-zone:hover,
[data-tool-mode]:not([data-tool-mode="home"]) .drop-zone.drag-over,
[data-editor-mode] .drop-zone:hover, [data-editor-mode] .drop-zone.drag-over {
  border-color: var(--coral-500); background: #252e38;
}
.drop-icon {
  position: relative; width: 50px; height: 50px; margin-bottom: 12px;
  background: #333d48; color: #fff; border-radius: 10px;
}
.drop-icon svg { width: 27px; height: 27px; }
.drop-icon::after {
  content: "+"; position: absolute; right: -5px; bottom: -5px; display: grid;
  place-items: center; width: 18px; height: 18px; border-radius: 5px;
  background: var(--coral-600); color: #fff; font-size: 13px; line-height: 1;
}
.drop-title { color: #fff; font-size: 1.08rem; }
.drop-sub { color: #aeb8c2; }
.file-picker { min-height: 44px; border-radius: 9px; box-shadow: 0 4px 12px rgb(240 68 68 / 23%); }
.workspace-privacy { margin: 19px 0 0; color: #aeb8c2; font-size: .79rem; text-align: center; }
.home-workspace .status, .home-workspace .editor-summary,
[data-tool-mode]:not([data-tool-mode="home"]) .status,
[data-editor-mode] .status, [data-editor-mode] .editor-summary {
  border: 1px solid #526273; background: #26323d; color: #e4edf4;
}
.home-workspace .inline-error,
[data-tool-mode]:not([data-tool-mode="home"]) .inline-error,
[data-editor-mode] .inline-error { border-color: #9c4a4a; background: #3c2529; color: #ffd7d7; }
.home-workspace .options, [data-tool-mode]:not([data-tool-mode="home"]) .options { border-top-color: #394450; }
.home-workspace .option-label, .home-workspace .option-row label,
[data-tool-mode]:not([data-tool-mode="home"]) .option-label,
[data-tool-mode]:not([data-tool-mode="home"]) .option-row label { color: #dce4eb; }
.home-workspace .fmt-btn, .home-workspace .dpi-btn, .home-workspace .page-btn, .home-workspace .orient-btn,
[data-tool-mode]:not([data-tool-mode="home"]) .fmt-btn,
[data-tool-mode]:not([data-tool-mode="home"]) .dpi-btn,
[data-tool-mode]:not([data-tool-mode="home"]) .page-btn,
[data-tool-mode]:not([data-tool-mode="home"]) .orient-btn {
  background: #252d36; border-color: #45515e; color: #e0e8ef;
}
.home-workspace .fmt-btn.active, .home-workspace .dpi-btn.active, .home-workspace .page-btn.active, .home-workspace .orient-btn.active,
[data-tool-mode]:not([data-tool-mode="home"]) .fmt-btn.active,
[data-tool-mode]:not([data-tool-mode="home"]) .dpi-btn.active,
[data-tool-mode]:not([data-tool-mode="home"]) .page-btn.active,
[data-tool-mode]:not([data-tool-mode="home"]) .orient-btn.active {
  background: var(--coral-600); border-color: var(--coral-600); color: #fff;
}
.home-workspace .tool-note, [data-tool-mode]:not([data-tool-mode="home"]) .tool-shell .tool-note { color: #b7c1cc; }
.home-workspace .btn-secondary, [data-tool-mode]:not([data-tool-mode="home"]) .btn-secondary,
[data-editor-mode] .btn-secondary { background: #222b34; border-color: #607080; color: #e5edf3; }
.home-workspace .btn-secondary:hover:not(:disabled),
[data-tool-mode]:not([data-tool-mode="home"]) .btn-secondary:hover:not(:disabled),
[data-editor-mode] .btn-secondary:hover:not(:disabled) { background: #34404d; color: #fff; }
.home-workspace .progress-wrap, [data-tool-mode]:not([data-tool-mode="home"]) .progress-wrap { background: #232c35; color: #e5edf3; }
.home-workspace .result-card, .home-workspace .img-preview-item,
[data-tool-mode]:not([data-tool-mode="home"]) .result-card,
[data-tool-mode]:not([data-tool-mode="home"]) .img-preview-item { background: #fff; color: var(--text); }

/* Editor workspaces open dark and reveal light document canvases when loaded. */
[data-editor-mode] .editor-card { background: #fff; color: var(--text); }
[data-editor-mode] .editor-card-title { color: var(--ink); }
[data-editor-mode] .editor-card-detail { color: var(--muted); }
[data-editor-mode] .editor-modes legend, [data-editor-mode] #editorSettings > label { color: #e5edf3; }
[data-editor-mode] .editor-modes label { background: #26313b; border-color: #4d5a67; color: #ecf2f7; }
[data-editor-mode] .editor-modes label:has(input:checked) { background: #4a2b2d; border-color: var(--coral-600); color: #fff; }
[data-editor-mode] #pageRange { background: #fff; color: var(--text); }
[data-editor-mode="organize"] .tool-shell:has(#editorList:not(:empty)) {
  border-color: #dce3e9; background: #fff; color: var(--text);
}
[data-editor-mode="organize"] .tool-shell:has(#editorList:not(:empty)) .status,
[data-editor-mode="organize"] .tool-shell:has(#editorList:not(:empty)) .editor-summary {
  border-color: #dce3e9; background: #f1f5f7; color: #465969;
}
[data-editor-mode="organize"] .tool-shell:has(#editorList:not(:empty)) .btn-secondary { background: #fff; color: #405263; }
.editor-thumbnail { background: #f3f5f7; border: 1px solid #e2e8ed; }
.editor-page-card { background: #fff; box-shadow: var(--shadow-sm); }
.editor-page-card img { background: #fff; border: 1px solid #dce3e9; box-shadow: 0 4px 12px rgb(16 24 32 / 12%); }
.editor-page-card .editor-card-title { font-size: .94rem; font-weight: 740; }
.editor-page-card .editor-card-detail { margin-bottom: 11px; }
.editor-page-card .editor-card-actions { grid-template-columns: repeat(5,44px); justify-content: center; gap: 7px; }
.editor-page-card .editor-small-btn.editor-icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  min-width: 44px; min-height: 44px; padding: 0; font-size: 0;
}
.editor-icon-btn svg { width: 20px; height: 20px; }
.editor-icon-btn--trash:hover:not(:disabled) { background: #fff0ee; color: #c93131; }

/* Illustrated primary tools and restrained conversion shortcuts. */
.main-tools-section, .compact-tools-section { width: min(100%,1120px); margin-left: auto; margin-right: auto; }
.main-tools-section { margin-top: 66px; }
.compact-tools-section { margin-top: 58px; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-header h2 { font-size: 1.8rem; margin: 0; }
.section-header > p { margin: 0 0 3px; color: var(--muted); font-size: .89rem; }
.section-kicker { color: #c43c3b; font-size: .76rem; font-weight: 760; letter-spacing: .08em; margin: 0 0 7px; }
.main-tools-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.main-tool-card {
  position: relative; display: grid; grid-template-columns: minmax(0,55%) minmax(0,45%);
  align-items: center; column-gap: 3px; min-width: 0; min-height: 218px;
  padding: 18px 16px 18px 21px; border: 1px solid transparent; border-radius: 15px; text-decoration: none;
  color: var(--ink); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.main-tool-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(16 24 32 / 11%); }
.main-tool-card--merge { background: #fff0ee; border-color: #f4cfca; }
.main-tool-card--split { background: #eef5ff; border-color: #d5e4ff; }
.main-tool-card--organize { background: #ecfaef; border-color: #cdeed6; }
.main-tool-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; width: 100%; height: 100%; min-width: 0; }
.main-tool-label { font-size: .73rem; font-weight: 760; margin-bottom: 12px; color: #ac3f3b; }
.main-tool-card--split .main-tool-label { color: #2867c6; }
.main-tool-card--organize .main-tool-label { color: #218d45; }
.main-tool-copy strong { font-size: 1.26rem; line-height: 1.3; }
.main-tool-description { min-height: 42px; margin-top: 8px; color: #546373; font-size: .84rem; line-height: 1.5; }
.main-tool-action { margin-top: auto; padding-top: 12px; font-size: .82rem; font-weight: 760; color: #ba3935; }
.main-tool-card--split .main-tool-action { color: #2867c6; }
.main-tool-card--organize .main-tool-action { color: #218d45; }
.main-tool-art { display: grid; place-items: center; width: calc(100% + 12px); height: 182px; margin-right: -12px; min-width: 0; }
.main-tool-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.compact-tools-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.compact-tool-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 151px;
  padding: 17px 17px 25px; background: #fff; border: 1px solid var(--border);
  border-radius: 11px; color: var(--ink); text-decoration: none;
  transition: border-color .16s, background .16s;
}
.compact-tool-card:hover { border-color: #c5d0d9; background: #fcfdfe; }
.compact-tool-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 13px; border-radius: 9px; background: #f2f5f7; color: #566b7d; }
.compact-tool-icon svg { width: 24px; height: 24px; }
.compact-tool-card--coral .compact-tool-icon { background: #fff0ee; color: #ce4440; }
.compact-tool-card--purple .compact-tool-icon { background: #f1edff; color: #7657e8; }
.compact-tool-card--blue .compact-tool-icon { background: #eef5ff; color: #347bf6; }
.compact-tool-card--green .compact-tool-icon { background: #ecfaef; color: #259c4b; }
.compact-tool-card strong { font-size: .96rem; line-height: 1.35; }
.compact-tool-card small { color: var(--muted); font-size: .77rem; line-height: 1.45; margin-top: 5px; }
.compact-tool-arrow { position: absolute; right: 16px; bottom: 12px; font-weight: 760; color: #b54944; }
.all-tools-link { display: inline-flex; align-items: center; gap: 7px; color: #bf3b38; font-weight: 730; text-decoration: none; font-size: .91rem; }
.all-tools-link:hover { text-decoration: underline; }

/* ConvertIMG is a second product, shown as an illustrated dark banner. */
.crosslink-banner--visual {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: min(100%,1120px); max-width: none; min-height: 196px; margin: 58px auto 0;
  padding: 22px 35px; border: 1px solid #303145; border-radius: 17px;
  background: radial-gradient(circle at 75% 50%,rgb(118 87 232 / 22%),transparent 44%),#141720;
  color: #fff; overflow: hidden; box-shadow: 0 12px 28px rgb(15 18 31 / 13%);
}
.crosslink-banner--visual:hover { border-color: #8c74dc; box-shadow: 0 16px 34px rgb(15 18 31 / 19%); }
.banner-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; }
.banner-eyebrow { color: #c7b6ff; font-size: .77rem; font-weight: 750; margin-bottom: 10px; }
.banner-copy strong { color: #fff; font-size: 1.45rem; line-height: 1.3; }
.banner-description { margin-top: 10px; color: #bec2d1; font-size: .84rem; }
.banner-action { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 10px 14px; border-radius: 9px; background: #7657e8; color: #fff; font-size: .86rem; font-weight: 750; }
.banner-art { flex: 0 0 43%; max-width: 430px; align-self: center; }
.banner-art svg { display: block; width: 100%; height: auto; }

/* Hub: distinct featured cards, then one compact component for every category. */
.tools-page .hero { margin-bottom: 12px; }
.hub-section { width: min(100%,1120px); margin: 0 auto 47px; }
.hub-section h2 { display: flex; align-items: center; gap: 11px; font-size: 1.55rem; margin-bottom: 19px; }
.hub-section h2::before { content: ""; width: 8px; height: 23px; border-radius: 4px; background: #f04444; }
.hub-section--pdf-image h2::before { background: #7893b1; }
.hub-section--image-pdf h2::before { background: #8775b9; }
.hub-section--popular .tools-grid.frequent { gap: 13px; }
.hub-popular-card {
  position: relative; display: flex; flex-direction: column; min-height: 231px; padding: 19px;
  border: 1px solid #f0d2ce; border-radius: 15px; background: #fff0ee;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.hub-popular-card--blue { background: #eef5ff; border-color: #d5e4ff; }
.hub-popular-card--purple { background: #f1edff; border-color: #ded5ff; }
.hub-popular-card:hover { border-color: #c5ced7; box-shadow: 0 10px 25px rgb(16 24 32 / 12%); }
.hub-popular-art { position: absolute; right: -7px; top: 9px; width: 116px; height: 102px; opacity: .9; }
.hub-popular-art svg { width: 100%; height: 100%; }
.hub-popular-card .format-badge { z-index: 1; margin-top: 95px; background: transparent; color: #a94440; }
.hub-popular-card--blue .format-badge { color: #2867c6; }
.hub-popular-card--purple .format-badge { color: #6649c9; }
.hub-popular-card h3 { z-index: 1; font-size: 1.13rem; margin-top: 2px; }
.hub-popular-card p { z-index: 1; color: #566879; font-size: .82rem; line-height: 1.4; }
.hub-popular-card .card-open { z-index: 1; margin-top: auto; color: #b83b36; font-weight: 750; }
.hub-popular-card--blue .card-open { color: #2867c6; }
.hub-popular-card--purple .card-open { color: #6649c9; }
.hub-compact-card { min-height: 164px; border-color: var(--border); background: #fff; box-shadow: none; }
.hub-compact-card:hover { border-color: #bfcbd5; box-shadow: var(--shadow-sm); transform: none; }
.hub-compact-card .tool-card-icon { width: 42px; height: 42px; color: #52697b; background: #f2f5f7; }
.hub-compact-card .tool-card-icon svg { width: 24px; height: 24px; }
.hub-compact-card .format-badge { color: #778592; }
.hub-compact-card .card-open { margin-top: auto; color: #b54944; }
.hub-section--cross { margin-top: 42px; }
.hub-section--cross .crosslink-banner--visual { margin-top: 0; }

/* Supporting content stays quiet after the stronger task areas. */
.features { max-width: 1120px; padding: 64px 0 21px; }
.features h2, .faq h2 { font-size: 1.6rem; margin-bottom: 20px; }
.feature-grid { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature-card { padding: 24px 27px 22px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.feature-card + .feature-card { padding-left: 25px; border-left: 1px solid var(--border); }
.feature-card h3 { font-size: .98rem; }
.feature-card p { color: var(--muted); }
.faq { max-width: 1120px; padding: 30px 0 36px; }
.faq-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 32px; }
.faq-item { min-width: 0; }
.faq-item summary { color: var(--ink); font-weight: 630; }
.footer { border-top: 1px solid #e4e9ed; background: #f0f3f5; box-shadow: none; }
.footer-description, .footer-copy { color: #687786; }
.footer-links a { color: #4e606f; }
.content-page { max-width: 800px; }
.content-page h1 { font-size: 2.2rem; }
.content-page h2 { padding-top: 6px; }
.content-page p, .content-page li { color: #4f5f6e; }
.not-found { max-width: 700px; }
.not-found-art { width: 70px; height: 78px; margin-bottom: 18px; filter: drop-shadow(0 8px 10px rgb(16 24 32 / 9%)); }
.not-found .error-code { color: #d23d3b; background: var(--coral-soft); }

@media (max-width: 1050px) {
  .home-hero { grid-template-columns: minmax(0,1.15fr) minmax(270px,.85fr); }
  .main-tool-card { grid-template-columns: minmax(0,54%) minmax(0,46%); min-height: 214px; padding: 16px 12px 16px 16px; }
  .main-tool-art { width: calc(100% + 8px); height: 164px; margin-right: -8px; }
  .compact-tools-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hub-section--popular .tools-grid.frequent { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .home-hero { margin: 21px auto 15px; padding: 8px 0; grid-template-columns: 1fr; gap: 6px; }
  .home-hero h1 { font-size: clamp(2rem,8vw,2.35rem); margin-bottom: 12px; }
  .home-hero .hero-desc { font-size: .96rem; margin-bottom: 10px; }
  .home-hero .badges { gap: 5px 13px; margin-top: 14px; }
  .home-hero .badge { font-size: .72rem; }
  .hero-visual { max-width: 220px; justify-self: center; }
  .home-workspace { padding: 18px; border-radius: 18px; }
  .home-workspace .tabs { margin-bottom: 15px; }
  .home-workspace .tab-btn { min-height: 47px; }
  [data-tool-mode]:not([data-tool-mode="home"]) .tool-shell,
  [data-editor-mode] .tool-shell { padding: 20px; }
  .main-tools-section { margin-top: 53px; }
  .compact-tools-section { margin-top: 45px; }
  .main-tools-grid { grid-template-columns: 1fr; gap: 12px; }
  .main-tool-card { grid-template-columns: minmax(0,54%) minmax(0,46%); min-height: 190px; }
  .main-tool-art { width: calc(100% + 8px); height: 166px; margin-right: -8px; }
  .section-header h2 { font-size: 1.5rem; }
  .compact-tools-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crosslink-banner--visual { flex-direction: column; align-items: stretch; min-height: 0; padding: 24px; }
  .banner-copy strong { font-size: 1.25rem; }
  .banner-art { flex: none; align-self: center; width: 100%; max-width: 340px; height: 145px; overflow: hidden; margin-top: 5px; }
  .banner-art svg { height: 100%; }
  .features { padding-top: 48px; }
  .feature-grid, .faq-list { grid-template-columns: 1fr; }
  .feature-card { padding: 17px 0; }
  .feature-card + .feature-card { padding: 17px 0; border-left: 0; border-top: 1px solid var(--border); }
  .footer { padding-top: 35px; }
}
@media (max-width: 560px) {
  .container { padding-left: 17px; padding-right: 17px; }
  .home-hero .hero-desc br { display: none; }
  .home-workspace { margin-left: -1px; width: calc(100% + 2px); padding: 14px; }
  .home-workspace .drop-zone,
  [data-tool-mode]:not([data-tool-mode="home"]) .drop-zone,
  [data-editor-mode] .drop-zone { min-height: 197px; padding: 22px 12px; }
  .home-workspace .tab-btn { font-size: .82rem; }
  .workspace-privacy { font-size: .72rem; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 9px; }
  .main-tool-card { min-height: 184px; padding: 16px 12px 16px 17px; }
  .main-tool-label { margin-bottom: 10px; }
  .main-tool-copy strong { font-size: 1.1rem; }
  .main-tool-description { min-height: 0; font-size: .78rem; }
  .main-tool-action { padding-top: 9px; }
  .main-tool-art { width: calc(100% + 8px); height: 152px; margin-right: -8px; }
  .compact-tool-card { min-height: 142px; padding: 14px 13px 24px; }
  .hub-section--popular .tools-grid.frequent { grid-template-columns: 1fr; }
  .hub-popular-card { min-height: 160px; }
  .hub-popular-card .format-badge { margin-top: 41px; }
  .hub-popular-art { right: 4px; width: 100px; height: 90px; }
  .hub-compact-card { min-height: 152px; }
  .crosslink-banner--visual { padding: 22px; }
  .banner-art { height: 135px; }
  .editor-page-card .editor-card-actions { grid-template-columns: repeat(5,44px); justify-content: center; }
}
@media (max-width: 380px) {
  .container { padding-left: 15px; padding-right: 15px; }
  .home-hero .badges { gap: 4px 9px; }
  .home-hero .badge { font-size: .69rem; }
  .compact-tools-grid { grid-template-columns: 1fr; }
  .compact-tool-card { min-height: 111px; padding-left: 70px; }
  .compact-tool-icon { position: absolute; left: 14px; top: 15px; }
  .editor-page-card .editor-card-actions { gap: 3px; }
}
