.site-header {
  box-shadow: 0 1px 0 rgba(44, 47, 61, 0.08);
}

body {
  background: #f7f7fb;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.back-link::before {
  content: "<-";
  margin-right: 8px;
}

.converter-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 26px;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 24px 24px;
}

.converter-hero-copy,
.converter-hero-board,
.converter-panel,
.converter-results {
  border: 1px solid #e6e8f0;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(41, 44, 61, 0.06);
}

.converter-hero-copy {
  border-radius: 18px;
  padding: 34px;
}

.converter-hero-copy h1 {
  max-width: 760px;
  margin: 0;
  color: #2c2f3d;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.converter-hero-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #555b6d;
  font-size: 16px;
  line-height: 1.58;
}

.converter-hero-board {
  position: relative;
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 300px;
  border-radius: 18px;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(109, 107, 232, 0.14), rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.format-card {
  position: relative;
  z-index: 1;
  max-width: 270px;
  border: 1px solid #e1e3ec;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 12px 26px rgba(41, 44, 61, 0.08);
}

.target-card {
  justify-self: end;
}

.format-card span,
.converter-guide-grid span {
  color: #62687a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.format-card strong {
  display: block;
  margin: 6px 0 12px;
  color: #2c2f3d;
  font-size: 24px;
  letter-spacing: 0;
}

.format-card i {
  display: block;
  height: 9px;
  margin-top: 8px;
  border-radius: 999px;
  background: #eef0f6;
}

.format-card i:nth-of-type(2) {
  width: 76%;
}

.format-card i:nth-of-type(3) {
  width: 48%;
}

.format-flow {
  position: absolute;
  inset: 38px 42px;
  border: 1px dashed rgba(109, 107, 232, 0.4);
  border-radius: 22px;
}

.converter-workbench {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 28px;
}

.converter-panel,
.converter-results {
  border-radius: 12px;
  padding: 24px;
}

.converter-results {
  margin-top: 18px;
}

.panel-heading,
.results-top,
.action-row,
.results-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading h2,
.results-top h2 {
  margin: 0;
  color: #2c2f3d;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.limit-pill {
  border: 1px solid rgba(109, 107, 232, 0.24);
  border-radius: 999px;
  background: #f1f1ff;
  color: #4c49ba;
  font-size: 12px;
  font-weight: 950;
  padding: 9px 12px;
}

.converter-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.converter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #4b5063;
  font-size: 13px;
  font-weight: 850;
}

textarea,
input,
select {
  width: 100%;
  border: 1.5px solid #d9dce7;
  border-radius: 10px;
  background: #ffffff;
  color: #252936;
  font: inherit;
  font-size: 15px;
  outline: none;
  padding: 13px 14px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(109, 107, 232, 0.7);
  box-shadow: 0 0 0 4px rgba(109, 107, 232, 0.12);
}

#converter-input {
  min-height: 310px;
  resize: vertical;
}

#converter-output {
  min-height: 330px;
  margin-top: 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  line-height: 1.5;
  resize: vertical;
}

.file-drop {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 310px;
  border: 1.5px dashed #ccd2e1;
  border-radius: 12px;
  background: #fafbfe;
  padding: 16px;
}

.file-drop.is-dragging {
  border-color: rgba(109, 107, 232, 0.7);
  background: #f4f4ff;
}

.file-drop input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop label {
  place-items: center;
  min-height: 172px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
}

.file-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #6d6be8;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
}

.file-drop strong {
  color: #2c2f3d;
}

.file-drop small {
  max-width: 240px;
  color: #6a7081;
  font-weight: 600;
  line-height: 1.45;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-list span {
  overflow: hidden;
  border: 1px solid #e4e7f0;
  border-radius: 8px;
  background: #ffffff;
  color: #4e5365;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.converter-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.converter-guide-grid article {
  border: 1px solid #e8eaf2;
  border-radius: 10px;
  background: #fbfcff;
  padding: 14px;
}

.converter-guide-grid p {
  margin: 6px 0 0;
  color: #62687a;
  font-size: 13px;
  line-height: 1.45;
}

.action-row {
  justify-content: flex-start;
  margin-top: 20px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  padding: 12px 16px;
}

.primary-button {
  background: #ff5a4f;
  color: #ffffff;
}

.secondary-button {
  border: 1px solid #dfe2ec;
  background: #ffffff;
  color: #2c2f3d;
}

.ghost-button {
  background: transparent;
  color: #62687a;
}

.status-text {
  color: #62687a;
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 880px) {
  .converter-hero,
  .converter-grid,
  .converter-options {
    grid-template-columns: 1fr;
  }

  .converter-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .converter-hero {
    padding-inline: 16px;
  }

  .converter-workbench {
    padding-inline: 16px;
  }

  .converter-hero-copy,
  .converter-panel,
  .converter-results {
    padding: 20px;
  }

  .converter-hero-board {
    min-height: 230px;
  }

  .converter-guide-grid {
    grid-template-columns: 1fr;
  }
}
