:root {
  color-scheme: light;
  --ink: #101826;
  --ink-soft: #566174;
  --paper: #f4f6f8;
  --white: #ffffff;
  --line: #d9dee6;
  --signal: #ff5c35;
  --signal-dark: #d7421e;
  --blue: #2e67db;
  --orange: #e66532;
  --radius: 12px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(16,24,38,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,24,38,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 1rem/1.5 "DM Sans", sans-serif;
}

button, input { font: inherit; }

.topbar {
  height: 74px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--white);
  border-bottom: 4px solid var(--signal);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font: 800 1.06rem/1 "Manrope", sans-serif;
  letter-spacing: .09em;
}

.brand-mark {
  width: 34px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--signal);
  border-radius: 8px 8px 8px 2px;
  transform: rotate(-3deg);
}

.brand-mark span { font-size: 1.35rem; transform: rotate(3deg); }

.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #cbd3df;
  font-size: .88rem;
}

.lock { color: #64d09b; font-size: .68rem; }

.workspace {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 78px) 0 42px;
}

.intro { max-width: 680px; margin-bottom: 34px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--signal-dark);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
}

h1, h2, strong { font-family: "Manrope", sans-serif; }

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5.5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.intro > p:last-child { margin: 18px 0 0; color: var(--ink-soft); font-size: 1.06rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tool-card {
  position: relative;
  min-height: 166px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--ink);
  text-align: left;
  background: rgba(255,255,255,.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 0 rgba(16,24,38,.04);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-3px);
  border-color: #9ba6b7;
  box-shadow: 0 10px 28px rgba(16,24,38,.08);
  outline: none;
}

.tool-card.is-active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.file-pair { display: flex; align-items: center; gap: 9px; }
.file-pair b {
  min-width: 38px;
  height: 34px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 5px 5px 5px 1px;
  font-size: .72rem;
  letter-spacing: .04em;
}
.file-pair i { color: #8390a3; font-style: normal; font-size: 1.2rem; }
.file-pair .pdf { background: var(--signal); }
.file-pair .word { background: var(--blue); font-size: 1rem; }
.file-pair .ppt { background: var(--orange); font-size: 1rem; }

.tool-copy { display: flex; flex-direction: column; gap: 3px; }
.tool-copy strong { font-size: 1.02rem; }
.tool-copy small { color: #6f7a8c; font-size: .78rem; line-height: 1.35; }
.is-active .tool-copy small { color: #b9c3d2; }
.corner-arrow { position: absolute; top: 17px; right: 18px; color: #9aa4b4; }
.is-active .corner-arrow { color: var(--signal); }

.stack-icon { position: relative; width: 48px; height: 39px; }
.stack-icon i { position: absolute; width: 34px; height: 27px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; }
.stack-icon i:nth-child(1) { left: 0; top: 10px; }
.stack-icon i:nth-child(2) { left: 6px; top: 5px; }
.stack-icon i:nth-child(3) { left: 12px; top: 0; }
.stack-icon b { position: absolute; right: 0; bottom: 0; z-index: 2; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--signal); color: #fff; }

.split-icon { display: flex; align-items: center; gap: 5px; height: 39px; }
.split-icon i { width: 18px; height: 32px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; }
.split-icon b { color: var(--signal); font-size: 1.15rem; }

.drop-panel {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 46px);
  display: grid;
  grid-template-columns: 58px minmax(220px, .8fr) minmax(360px, 1.2fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--signal);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(16,24,38,.07);
}

.step-index {
  align-self: start;
  color: #bcc4cf;
  font: 800 2.3rem/1 "Manrope", sans-serif;
  letter-spacing: -.08em;
}

.drop-copy h2 { margin: 0 0 8px; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.04em; }
.drop-copy > p:last-child { margin: 0; color: var(--ink-soft); }

.drop-zone {
  min-height: 180px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #aeb8c7;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.drop-zone:hover, .drop-zone.is-dragging { background: #fff3ee; border-color: var(--signal); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 38px; height: 38px; margin-bottom: 9px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1.3rem; }
.drop-zone strong { font-size: 1rem; }
.drop-zone > span:not(.upload-icon) { color: var(--ink-soft); font-size: .88rem; }
.drop-zone u { color: var(--signal-dark); text-underline-offset: 2px; }
.drop-zone small { margin-top: 12px; color: #7f8998; }

.job-panel { grid-column: 1 / -1; padding-top: 26px; border-top: 1px solid var(--line); }
.job-head, .job-actions, .progress-meta, .result-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.job-head strong { font-size: 1.08rem; }
.text-button { padding: 8px 0; color: var(--signal-dark); border: 0; background: none; font-weight: 700; cursor: pointer; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.file-list { margin: 18px 0 20px; padding: 0; display: grid; gap: 8px; list-style: none; }
.file-row { min-height: 58px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 8px; }
.file-type { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: var(--signal); border-radius: 5px 5px 5px 1px; font: 800 .65rem/1 "Manrope", sans-serif; }
.file-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.file-info small { color: #7b8697; }
.file-order { display: flex; gap: 4px; }
.file-order button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.file-order button:disabled { opacity: .3; cursor: default; }
.range-field { margin-bottom: 20px; display: grid; gap: 7px; }
.range-field span { font-weight: 700; }
.range-field input { width: min(100%, 420px); min-height: 46px; padding: 0 13px; border: 1px solid #aeb8c7; border-radius: 7px; color: var(--ink); background: #fff; font-size: 1rem; }
.range-field input:focus { border-color: var(--signal); outline: 3px solid rgba(255,92,53,.14); }
.range-field small { color: #768294; }
.job-actions { padding-top: 18px; border-top: 1px solid var(--line); }
.job-actions p { margin: 0; color: var(--ink-soft); font-size: .86rem; }
.primary-button { min-width: 190px; min-height: 50px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #fff; background: var(--signal); border: 0; border-radius: 7px; font-weight: 700; cursor: pointer; box-shadow: 0 5px 0 var(--signal-dark); transition: transform .15s ease, box-shadow .15s ease; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--signal-dark); }
.primary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--signal-dark); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.progress-wrap { margin-top: 20px; }
.progress-meta { margin-bottom: 7px; color: var(--ink-soft); font-size: .83rem; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e4e8ee; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--signal); border-radius: inherit; transition: width .25s ease; }
.result-card { margin-top: 20px; padding: 17px; justify-content: flex-start; border: 1px solid #abd9c2; border-radius: 8px; background: #effaf4; }
.result-check { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #21865a; font-weight: 700; }
.result-card div { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.result-card small { color: #507263; }
.result-card a { padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 6px; text-decoration: none; font-weight: 700; }
.error-card { margin-top: 20px; padding: 14px 16px; color: #8b2a16; background: #fff0ec; border: 1px solid #ffc1b2; border-radius: 8px; }

.document-render-stage {
  position: fixed;
  top: 0;
  left: -100000px;
  z-index: -1;
  width: max-content;
  min-width: 900px;
  overflow: visible;
  background: #fff;
  pointer-events: none;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  color: #737f90;
  font-size: .74rem;
  letter-spacing: .06em;
}

@media (max-width: 860px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .drop-panel { grid-template-columns: 44px 1fr; }
  .drop-zone { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .topbar { height: 66px; }
  .privacy-note { width: 10px; overflow: hidden; white-space: nowrap; }
  .privacy-note .lock { font-size: .8rem; }
  .workspace { width: min(100% - 28px, 1180px); padding-top: 34px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 142px; }
  .drop-panel { grid-template-columns: 1fr; padding: 24px 18px; }
  .step-index { display: none; }
  footer { width: calc(100% - 28px); flex-direction: column; gap: 4px; }
  .job-head, .job-actions, .result-card { align-items: stretch; flex-direction: column; }
  .primary-button, .result-card a { width: 100%; }
  .result-card a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
