/* Brand palette from the supplied reference. */
:root {
  --teal: #2a9d8f;
  --gold: #e9c46a;
  --cream: #f4f1de;
  --ink: #264653;
  --muted: #586971;
  --border: #dce3e3;
  --white: #ffffff;
  --button: #264653;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

/* Shared elements and keyboard accessibility. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

/* Top navigation. */
.site-header {
  min-height: 88px;
  max-width: 1440px;
  padding: 20px 48px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.brand-domain {
  color: #688087;
  font-weight: 400;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  font-size: 13px;
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.local-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* Main tool: a spacious white panel on a warm cream background. */
.workspace {
  background: var(--cream);
  border-block: 1px solid #e8e4d1;
  padding: 30px 48px 24px;
}

.workspace-inner {
  max-width: 1180px;
  margin: auto;
}

.section-label {
  display: flex;
  gap: 13px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  margin-bottom: 23px;
}

.section-label span {
  color: #919988;
}

.card {
  background: var(--white);
  border: 1px solid #c7d0ca;
  border-radius: 8px;
  overflow: hidden;
}

.drop {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 36px;
  min-height: 435px;
  padding: 54px 64px;
  outline: 2px dashed transparent;
  outline-offset: -10px;
  transition: background-color 150ms, outline-color 150ms;
}

.drop.over {
  background: #f0f8f6;
  outline-color: var(--teal);
}

.tool-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 700;
}

h1 {
  margin: 22px 0 18px;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -2px;
  font-weight: 700;
}

.intro {
  max-width: 420px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 27px;
}

.primary, .download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 15px 23px;
  min-height: 49px;
  border: 1px solid var(--button);
  border-radius: 5px;
  background: var(--button);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 150ms;
}

.primary:hover:not(:disabled), .download:hover {
  background: #183440;
}

.drop-instruction {
  font-size: 12px;
  color: var(--muted);
  margin: 13px 0 26px;
}

.hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.hint span {
  margin-inline: 6px;
}

.tool-art {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-art img {
  width: 100%;
  max-width: 330px;
  height: auto;
}

.art-caption {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 10px;
  color: #61767a;
}

/* Selected files and their reorder/remove controls. */
.queue {
  padding: 30px 40px;
  border-top: 1px solid var(--border);
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.5px;
}

#count {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 5px;
}

.text-button {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 16px;
}

#files {
  list-style: none;
  padding: 0;
  margin: 0;
}

#files li {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 43px;
  flex-shrink: 0;
  background: #edf7f4;
  color: #236b62;
  border: 1px solid #bbd9d2;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.actions {
  display: flex;
  gap: 6px;
}

.actions button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
}

.actions button:hover:not(:disabled) {
  background: var(--cream);
}

.merge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 24px;
}

#total {
  color: var(--muted);
  font-size: 12px;
}

/* Progress, errors, and the final download. */
.result {
  padding-inline: 40px;
}

#status {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#status:not(:empty) {
  padding-block: 0 24px;
}

#status.error {
  color: #a0362d;
}

.download {
  margin-bottom: 28px;
  background: var(--teal);
  border-color: var(--teal);
  color: #102e30;
}

.download:hover {
  background: #238779;
  color: var(--white);
}

.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.privacy svg {
  flex-shrink: 0;
}

.privacy p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.privacy strong {
  color: var(--ink);
}

/* Short usage instructions and footer. */
.instructions {
  max-width: 1276px;
  padding: 46px 48px 50px;
  margin: auto;
  scroll-margin-top: 24px;
}

.instructions-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.instructions-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.steps li {
  display: flex;
  gap: 15px;
}

.step-number {
  color: #4d6d73;
  font-size: 12px;
  padding-top: 3px;
  border-top: 3px solid var(--gold);
  min-width: 23px;
}

.steps h3 {
  font-size: 14px;
  margin: 3px 0 10px;
}

.steps p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  max-width: 260px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  font-size: 11px;
  color: var(--muted);
}

.site-footer > span:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Tablet and phone layouts. */
@media (max-width: 850px) {
  .site-header {
    padding-inline: 24px;
  }

  .local-label {
    display: none;
  }

  .workspace {
    padding-inline: 24px;
  }

  .drop {
    padding: 38px 32px;
    gap: 16px;
  }

  .instructions {
    padding-inline: 24px;
  }

  .steps {
    gap: 20px;
  }

  .site-footer {
    padding-inline: 24px;
  }

}

@media (max-width: 580px) {
  .site-header {
    min-height: 74px;
    padding: 15px 20px;
    gap: 12px;
  }

  .brand {
    font-size: 19px;
    gap: 9px;
  }

  .brand img {
    width: 32px;
    height: 36px;
  }

  .nav-link {
    font-size: 11px;
  }

  .workspace {
    padding: 23px 16px;
  }

  .section-label {
    font-size: 9px;
    margin-bottom: 17px;
  }

  .drop {
    grid-template-columns: 1fr;
    padding: 32px 25px;
    min-height: auto;
  }

  h1 {
    font-size: 37px;
    letter-spacing: -1.4px;
  }

  .intro {
    font-size: 14px;
  }

  .tool-art {
    display: none;
  }

  .queue {
    padding: 24px 20px;
  }

  .result {
    padding-inline: 20px;
  }

  .actions {
    gap: 3px;
  }

  .actions button {
    width: 30px;
  }

  .merge-footer {
    flex-wrap: wrap;
  }

  .privacy {
    align-items: flex-start;
  }

  .instructions {
    padding: 32px 24px;
  }

  .instructions-heading {
    display: block;
  }

  .instructions-heading p {
    margin-top: 10px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 25px;
  }

  .steps p {
    max-width: none;
  }

  .site-footer {
    flex-wrap: wrap;
    padding: 22px 24px;
  }

  .site-footer > span:nth-child(2) {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

}
