:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fb;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, #dce9ff 0, transparent 35%),
    #f3f6fb;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 48px auto;
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 24px;
  align-items: start;
}

.card,
.preview-card {
  background: #fff;
  border: 1px solid #e3e9f3;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(42, 59, 91, 0.1);
}

.card {
  padding: 30px;
}

.heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  color: white;
  background: #2563eb;
  font-size: 25px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
}

p {
  margin-top: 5px;
  color: #68748a;
  line-height: 1.4;
  font-size: 14px;
}

form {
  display: grid;
  gap: 18px;
}

.drop-zone {
  min-height: 170px;
  border: 2px dashed #b9c8e5;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: #2563eb;
  background: #f4f8ff;
}

.drop-zone.has-file {
  border-style: solid;
  border-color: #22a06b;
  background: #f3fcf7;
}

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

.drop-zone span,
.field span {
  color: #7a8598;
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

.field input {
  width: 100%;
  border: 1px solid #d9e0ec;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #dbe8ff;
}

button,
.download {
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#submit {
  color: #fff;
  background: #2563eb;
}

#submit:hover {
  background: #1d4ed8;
}

#submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  min-height: 20px;
  margin-top: 18px;
  font-size: 14px;
}

.status.error {
  color: #c23030;
}

.status.success {
  color: #168055;
}

.download {
  display: block;
  margin-top: 12px;
  color: #fff;
  background: #168055;
  text-align: center;
  text-decoration: none;
}

.download[hidden] {
  display: none;
}

.preview-card {
  overflow: hidden;
}

.preview-header {
  height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8edf5;
}

.close {
  padding: 4px 10px;
  color: #68748a;
  background: transparent;
  font-size: 24px;
}

iframe {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
}

@media (max-width: 800px) {
  .container {
    margin: 24px auto;
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px;
  }

  iframe {
    height: 560px;
  }
}
