:root {
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --surface: #ffffff;
  --canvas: #f4f6f9;
  --blue: #175cd3;
  --blue-dark: #1849a9;
  --blue-soft: #eff4ff;
  --red: #b42318;
  --red-soft: #fef3f2;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
}

button,
input {
  font: inherit;
}

main {
  width: min(600px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.workbench {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 10px 28px rgb(23 32 51 / 6%);
}

.drop-zone {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #98a2b3;
  border-radius: 5px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.drop-zone:focus-within {
  outline: 3px solid rgb(23 92 211 / 20%);
  outline-offset: 3px;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid #b2ccff;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
}

.upload-icon svg,
.icon-button svg,
.download-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drop-zone strong {
  color: var(--blue);
}

.message-error {
  margin-top: 14px;
  border: 1px solid #fecdca;
  border-radius: 5px;
  padding: 11px 13px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 13px;
  line-height: 1.45;
}

.file-summary {
  display: grid;
  grid-template-columns: 42px 1fr 36px;
  align-items: center;
  gap: 12px;
}

.file-type {
  width: 42px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #b2ccff;
  border-radius: 4px;
  color: var(--blue);
  background: var(--blue-soft);
  font: 700 10px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.file-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-identity span {
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line);
  color: var(--red);
  background: var(--red-soft);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

.encoding-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.encoding-options label {
  position: relative;
  cursor: pointer;
}

.encoding-options label + label {
  border-left: 1px solid var(--line);
}

.encoding-options input {
  position: absolute;
  opacity: 0;
}

.encoding-options span {
  min-height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.encoding-options input:checked + span {
  color: var(--blue);
  background: var(--blue-soft);
}

.encoding-options input:focus-visible + span {
  outline: 3px solid rgb(23 92 211 / 22%);
  outline-offset: -3px;
}

.download-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 5px;
  color: white;
  background: var(--blue);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.download-button:hover {
  background: var(--blue-dark);
}

.download-button:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgb(23 92 211 / 25%);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 600px) {
  main {
    width: calc(100% - 24px);
    padding: 28px 0;
  }

  .workbench {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
