:root {
  color-scheme: light;
  --navy: #10233f;
  --ink: #172033;
  --muted: #5f6b7a;
  --line: #dce3ec;
  --surface: #fff;
  --soft: #f3f7fb;
  --accent: #6d28d9;
  --danger: #b42318;
  font:
    16px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
}
button,
input {
  font: inherit;
}
.tool {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  padding: 8px;
}
.tool__header,
.section-heading,
.result__header,
.file-row,
.actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.tool__header h2 {
  margin: 2px 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.15;
}
.eyebrow,
.step {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lead,
.hint,
.boundary,
.result-note {
  margin: 0;
  color: var(--muted);
}
.privacy {
  flex: none;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: #f5f3ff;
  color: #5b21b6;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 700;
}
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 12px 30px rgb(15 35 64 / 7%);
}
.section-heading h3 {
  margin: 2px 0 0;
  font-size: 1.15rem;
}
.section-heading {
  margin-bottom: 16px;
}
.hint {
  max-width: 430px;
  text-align: right;
  font-size: 0.9rem;
}
.file-picker {
  display: grid;
  place-items: center;
  min-height: 116px;
  border: 2px dashed #a8b4c4;
  border-radius: 14px;
  background: var(--soft);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  padding: 20px;
}
.file-picker:focus-within {
  outline: 3px solid rgb(109 40 217 / 28%);
  outline-offset: 2px;
}
.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.busy {
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
}
.error {
  margin: 12px 0 0;
  border-radius: 10px;
  background: #fef3f2;
  color: var(--danger);
  padding: 10px 12px;
}
.file-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}
.file-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: var(--soft);
}
.file-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}
.file-meta {
  color: var(--muted);
  font-size: 0.84rem;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex: none;
}
.row-actions button,
.secondary {
  border: 1px solid #c9d2df;
  background: #fff;
  color: var(--navy);
}
button,
.button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 15px;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
.button:focus-visible {
  outline: 3px solid rgb(109 40 217 / 30%);
  outline-offset: 2px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}
.metrics.compact {
  margin-top: 14px;
}
.metrics div {
  border-radius: 12px;
  background: var(--soft);
  padding: 11px;
}
.metrics dt {
  color: var(--muted);
  font-size: 0.78rem;
}
.metrics dd {
  margin: 3px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.boundary,
.result-note {
  margin-top: 14px;
  font-size: 0.88rem;
}
.actions {
  justify-content: flex-start;
  margin-top: 16px;
}
.result {
  border-color: #c4b5fd;
}
.result__header {
  align-items: center;
}
.result__header .section-heading {
  margin: 0;
}
@media (max-width: 620px) {
  .tool {
    padding: 4px;
  }
  .tool__header,
  .section-heading {
    display: grid;
  }
  .privacy {
    justify-self: start;
  }
  .hint {
    text-align: left;
  }
  .card {
    padding: 16px;
  }
  .file-row {
    display: grid;
    align-items: flex-start;
  }
  .row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .row-actions button {
    min-width: 0;
    padding: 8px 5px;
    overflow-wrap: anywhere;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    display: grid;
  }
  .actions > * {
    width: 100%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  .button {
    transition:
      transform 0.15s ease,
      opacity 0.15s ease;
  }
  button:not(:disabled):hover,
  .button:hover {
    transform: translateY(-1px);
  }
}
