:root {
  --ink: #17203b;
  --muted: #6c738a;
  --line: #e8e9f1;
  --paper: #ffffff;
  --cream: #faf9f7;
  --coral: #ff664e;
  --coral-dark: #ec4f39;
  --coral-soft: #fff0ec;
  --purple: #6f5bea;
  --purple-soft: #f0edff;
  --green: #2db87c;
  --shadow: 0 18px 60px rgba(27, 31, 55, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--cream); font-family: "DM Sans", sans-serif; overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bg-orb { position: fixed; z-index: -1; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.orb-one { width: 340px; height: 340px; background: rgba(255, 219, 207, .33); top: 80px; left: -180px; }
.orb-two { width: 390px; height: 390px; background: rgba(219, 213, 255, .28); right: -190px; top: 300px; }

.site-header { height: 76px; padding: 0 max(24px, calc((100vw - 1160px) / 2)); display: flex; align-items: center; gap: 42px; background: rgba(255,255,255,.82); border-bottom: 1px solid rgba(226,227,235,.8); backdrop-filter: blur(15px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 22px "Manrope", sans-serif; }
.brand > span:last-child span { color: var(--coral); }
.brand-mark { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--coral); box-shadow: 0 7px 18px rgba(255,102,78,.28); }
.brand-mark svg { width: 22px; }
.nav-links { display: flex; gap: 5px; align-self: stretch; }
.nav-link { border: 0; background: transparent; padding: 0 14px; color: var(--muted); font-weight: 600; position: relative; text-decoration: none; display: flex; align-items: center; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { content: ""; height: 3px; border-radius: 10px 10px 0 0; background: var(--coral); position: absolute; bottom: 0; left: 13px; right: 13px; }
.privacy-pill { margin-left: auto; padding: 8px 13px; display: inline-flex; align-items: center; gap: 7px; color: #398466; background: #eaf8f1; border-radius: 100px; font-size: 13px; font-weight: 600; }

main { width: min(1060px, calc(100% - 34px)); margin: 0 auto; }
.hero { padding: 66px 0 47px; text-align: center; }
.eyebrow { color: var(--coral); font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; display: flex; justify-content: center; align-items: center; gap: 8px; }
.eyebrow span { width: 19px; height: 2px; background: var(--coral); }
.hero h1 { margin: 13px 0 14px; font: 800 clamp(38px, 5vw, 59px)/1.1 "Manrope", sans-serif; letter-spacing: -.045em; }
.hero h1 em { color: var(--coral); font-style: normal; position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 3px; right: 0; bottom: -5px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='8' viewBox='0 0 300 8'%3E%3Cpath d='M2 5.5c70-4 186-5 296 0' fill='none' stroke='%23ff664e' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.hero > p { max-width: 660px; margin: 0 auto; color: var(--muted); line-height: 1.7; font-size: 16px; }
.hero-trust { margin-top: 24px; display: flex; justify-content: center; gap: 25px; color: #71778a; font-size: 13px; }
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-trust svg { color: var(--green); width: 16px; }

.workspace { margin-bottom: 70px; background: var(--paper); border: 1px solid #ececf2; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.tool-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f4f3f1; padding: 8px; gap: 8px; border-bottom: 1px solid #ededf3; }
.tool-tab { border: 0; border-radius: 15px; background: transparent; padding: 16px 20px; display: flex; align-items: center; gap: 13px; text-align: left; color: #777c8c; transition: .2s ease; }
.tool-tab.active { background: white; color: var(--ink); box-shadow: 0 4px 15px rgba(32,35,55,.07); }
.tool-tab strong, .tool-tab small { display: block; }
.tool-tab strong { font: 700 15px "Manrope", sans-serif; }
.tool-tab small { margin-top: 2px; font-size: 12px; color: #9195a4; }
.tab-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; }
.tab-icon.coral { background: var(--coral-soft); color: var(--coral); }
.tab-icon.purple { background: var(--purple-soft); color: var(--purple); }
.tab-icon svg { width: 21px; }
.panel { padding: 34px; }
.panel-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 23px; }
.panel-head > div, .list-heading > div { display: flex; align-items: center; gap: 12px; }
.panel-head h2, .list-heading h2 { font: 700 19px "Manrope", sans-serif; margin: 0; }
.panel-head > p { margin: 0; font-size: 13px; color: #9195a3; }
.step-number { width: 32px; height: 32px; display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--coral); background: var(--coral-soft); border-radius: 9px; font: 800 11px "Manrope", sans-serif; }
.purple-number { color: var(--purple); background: var(--purple-soft); }

.dropzone { min-height: 330px; padding: 38px; border: 1.5px dashed #d8d8e2; border-radius: 17px; background: #fdfdfd; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: .2s ease; outline: none; }
.dropzone:hover, .dropzone.dragover, .dropzone:focus-visible { border-color: var(--coral); background: #fffbfa; box-shadow: inset 0 0 0 1px rgba(255,102,78,.07); }
.upload-art { width: 70px; height: 70px; display: grid; place-items: center; color: var(--coral); background: var(--coral-soft); border-radius: 20px; transform: rotate(-3deg); margin-bottom: 18px; }
.upload-art svg { width: 39px; transform: rotate(3deg); }
.dropzone h3 { font: 700 18px "Manrope", sans-serif; margin: 0 0 5px; }
.dropzone p { color: #9296a5; font-size: 13px; margin: 0 0 20px; }
.dropzone small { color: #a5a8b4; margin-top: 14px; font-size: 11px; }
.primary-btn, .secondary-btn { min-height: 43px; padding: 0 18px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 13px; border: 0; transition: .2s ease; }
.primary-btn { background: var(--coral); color: white; box-shadow: 0 8px 18px rgba(255,102,78,.23); }
.primary-btn:hover { background: var(--coral-dark); transform: translateY(-1px); }
.primary-btn svg, .secondary-btn svg { width: 17px; }
.primary-btn.small { min-height: 40px; }
.secondary-btn { background: #f4f4f7; color: #575d71; border: 1px solid #e5e5ec; }
.secondary-btn:hover { background: #ebebf0; }
.purple-btn { background: var(--purple); box-shadow: 0 8px 18px rgba(111,91,234,.22); }
.purple-btn:hover { background: #5d4cce; }

.processing { min-height: 160px; border: 1px solid var(--line); border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 15px; }
.processing strong, .processing span { display: block; }
.processing strong { font: 700 15px "Manrope", sans-serif; }
.processing span { margin-top: 4px; font-size: 12px; color: var(--muted); }
.spinner { width: 31px; height: 31px; border: 3px solid var(--coral-soft); border-top-color: var(--coral); border-radius: 50%; animation: spin .75s linear infinite; }
.purple-spin { border-color: var(--purple-soft); border-top-color: var(--purple); }
@keyframes spin { to { transform: rotate(360deg); } }

.result-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid #ddefe6; background: #f7fcf9; border-radius: 14px; }
.result-header > div:first-child, .merge-success { display: flex; align-items: center; gap: 12px; }
.success-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: #dff6eb; color: var(--green); display: grid; place-items: center; }
.success-icon svg { width: 20px; stroke-width: 2.3; }
.result-header h3, .merge-success h3 { margin: 0; font: 700 15px "Manrope", sans-serif; }
.result-header p, .merge-success p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.result-actions { display: flex; gap: 8px; }
.selection-row { height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.selection-row > span { font-size: 12px; color: var(--muted); }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.check-label input { position: absolute; opacity: 0; pointer-events: none; }
.check-label span { width: 18px; height: 18px; border: 1.5px solid #c8cad4; border-radius: 5px; display: inline-grid; place-items: center; }
.check-label input:checked + span { background: var(--coral); border-color: var(--coral); }
.check-label input:checked + span::after { content: ""; width: 7px; height: 4px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg) translate(1px,-1px); }
.page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 20px; }
.page-card { border: 1px solid var(--line); border-radius: 13px; padding: 10px; background: #fbfbfc; position: relative; transition: .2s ease; }
.page-card.selected { border-color: rgba(255,102,78,.55); box-shadow: 0 5px 17px rgba(255,102,78,.09); }
.page-check { position: absolute; z-index: 2; left: 17px; top: 17px; width: 21px; height: 21px; accent-color: var(--coral); }
.pdf-preview { height: 260px; border-radius: 8px; overflow: hidden; background: #e9e9ed; border: 1px solid #e1e1e7; }
.pdf-preview iframe { width: 100%; height: 100%; border: 0; background: white; }
.page-meta { padding: 10px 2px 2px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.page-meta strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-meta small { color: #979ba9; font-size: 10px; }
.icon-download { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--coral-soft); color: var(--coral); display: grid; place-items: center; flex: 0 0 auto; }
.icon-download:hover { background: var(--coral); color: white; }
.icon-download svg { width: 16px; }

.dropzone.compact { min-height: 108px; padding: 22px 25px; flex-direction: row; justify-content: space-between; text-align: left; }
.dropzone.compact:hover, .dropzone.compact.dragover, .dropzone.compact:focus-visible { border-color: var(--purple); background: #fbfaff; }
.compact-copy { display: flex; align-items: center; gap: 14px; }
.compact-copy h3 { font-size: 15px; }
.compact-copy p { margin: 3px 0 0; }
.mini-upload { width: 43px; height: 43px; border-radius: 11px; background: var(--purple-soft); color: var(--purple); display: grid; place-items: center; }
.mini-upload svg { width: 23px; }
.merge-files { padding-top: 29px; }
.list-heading { display: flex; justify-content: space-between; align-items: center; }
.list-heading > span { color: var(--muted); font-size: 12px; }
.drag-hint { display: flex; align-items: center; gap: 5px; margin: 13px 0 10px; color: #999dab; font-size: 11px; }
.drag-hint svg { width: 15px; }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item { min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 12px; background: white; transition: .18s ease; }
.file-item.dragging { opacity: .45; }
.file-item.drag-target { border-color: var(--purple); transform: translateY(2px); }
.drag-handle { color: #b2b4bf; cursor: grab; display: grid; place-items: center; }
.drag-handle svg { width: 17px; }
.file-badge { width: 42px; height: 48px; background: var(--purple-soft); color: var(--purple); border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.file-badge svg { width: 22px; }
.file-info { min-width: 0; flex: 1; }
.file-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.file-info span { display: block; color: #9296a4; font-size: 11px; margin-top: 4px; }
.order-actions { display: flex; gap: 3px; }
.order-actions button { width: 31px; height: 31px; border-radius: 7px; border: 0; background: #f5f5f7; color: #727789; display: grid; place-items: center; }
.order-actions button:hover:not(:disabled) { background: var(--purple-soft); color: var(--purple); }
.order-actions button:disabled { opacity: .35; cursor: default; }
.order-actions .remove-file:hover { color: #e55050; background: #fff0f0; }
.order-actions svg { width: 15px; }
.merge-button { width: 100%; min-height: 66px; margin-top: 17px; border: 0; border-radius: 12px; background: var(--purple); color: white; display: grid; grid-template-columns: 28px auto 1fr; align-items: center; justify-content: center; column-gap: 9px; padding: 10px 22px; box-shadow: 0 9px 22px rgba(111,91,234,.22); }
.merge-button:hover { background: #5d4cce; }
.merge-button span { font: 700 14px "Manrope", sans-serif; }
.merge-button small { justify-self: end; opacity: .7; font-size: 11px; }
.merged-result { padding-top: 4px; }
.merge-success { padding: 18px; background: #f7fcf9; border: 1px solid #ddefe6; border-radius: 13px; }
.merged-preview { height: 480px; margin: 16px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #ececef; }
.merged-preview iframe { width: 100%; height: 100%; border: 0; }
.merged-actions { display: flex; justify-content: flex-end; gap: 9px; }

.home-info { margin: 0 0 70px; padding: clamp(25px, 5vw, 48px); background: white; border: 1px solid var(--line); border-radius: 22px; }
.home-info > div:first-child { max-width: 730px; }
.section-kicker { color: var(--coral); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.home-info h2 { margin: 10px 0 12px; font: 800 clamp(27px, 4vw, 39px)/1.2 "Manrope", sans-serif; letter-spacing: -.03em; }
.home-info > div:first-child p, .info-cards p { color: var(--muted); line-height: 1.7; }
.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.info-cards article { padding: 20px; border-radius: 13px; background: #faf9f7; border: 1px solid var(--line); }
.info-cards strong { font: 700 15px "Manrope", sans-serif; }
.info-cards p { margin: 7px 0 0; font-size: 13px; }
.site-footer { min-height: 120px; border-top: 1px solid #e4e4e9; width: min(1060px, calc(100% - 34px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 25px; color: #9296a4; font-size: 12px; }
.site-footer p { margin: 6px 0 0; }
.footer-brand { color: var(--ink); font: 800 18px "Manrope", sans-serif; text-decoration: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--coral); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 50; min-width: 280px; max-width: calc(100% - 30px); padding: 13px 16px; border-radius: 11px; background: #20263b; color: white; box-shadow: 0 12px 35px rgba(0,0,0,.2); display: flex; align-items: center; gap: 10px; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast > span { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.toast.error > span { background: #ff6b6b; }
.toast p { margin: 0; font-size: 12px; }

[hidden] { display: none !important; }
@media (max-width: 760px) {
  .site-header { height: auto; min-height: 66px; gap: 10px 18px; padding: 12px 17px 0; flex-wrap: wrap; }
  .nav-links { width: calc(100% + 34px); margin: 0 -17px; padding: 0 10px; order: 3; height: 43px; overflow-x: auto; border-top: 1px solid var(--line); }
  .nav-link { padding: 0 10px; white-space: nowrap; font-size: 13px; }
  .privacy-pill { font-size: 11px; }
  .hero { padding: 46px 0 35px; }
  .hero h1 { font-size: 38px; }
  .hero-trust { flex-wrap: wrap; gap: 10px 18px; }
  .tool-tab { padding: 12px; }
  .tool-tab small { display: none; }
  .panel { padding: 22px 16px; }
  .panel-head { align-items: flex-start; }
  .panel-head > p { display: none; }
  .dropzone { min-height: 290px; padding: 25px; }
  .result-header { align-items: flex-start; flex-direction: column; }
  .result-actions { width: 100%; }
  .result-actions button { flex: 1; }
  .page-grid { grid-template-columns: 1fr; }
  .info-cards { grid-template-columns: 1fr; }
  .pdf-preview { height: 360px; }
  .dropzone.compact { flex-direction: column; align-items: stretch; gap: 17px; }
  .compact-copy { text-align: left; }
  .order-actions button:nth-child(-n+2) { display: none; }
  .merge-button { grid-template-columns: 25px auto; }
  .merge-button small { grid-column: 1 / -1; justify-self: center; }
  .merged-preview { height: 410px; }
  .merged-actions { flex-direction: column; }
  .site-footer { padding: 28px 0; flex-direction: column; align-items: flex-start; }
}
