:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #607086;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --line: #d9e1ec;
  --line-strong: #b8c4d4;
  --blue: #265ed7;
  --blue-strong: #1745aa;
  --green: #0b7a62;
  --yellow: #ffd166;
  --red: #b3344a;
  --shadow: 0 22px 60px rgba(44, 57, 79, 0.13);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(38, 94, 215, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(11, 122, 98, 0.08), transparent 30%),
    var(--paper);
}

button,
select,
input {
  font: inherit;
}

button,
a.download-link {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 0;
}

.top-nav a,
.link-grid a {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.top-nav a:hover,
.link-grid a:hover {
  border-color: var(--blue);
  color: var(--blue-strong);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace,
.reference {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(217, 225, 236, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.workspace {
  padding: 26px;
}

.intro {
  max-width: 760px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 4vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro p:last-child,
.note,
dd,
.status-line,
.file-meta,
.result-meta {
  color: var(--muted);
  line-height: 1.55;
}

.converter {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 260px;
  gap: 16px;
  align-items: stretch;
}

.drop-zone {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 154px;
  padding: 22px;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcff;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.drop-zone.is-over {
  border-color: var(--blue);
  background: #eef4ff;
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.drop-copy {
  display: grid;
  gap: 6px;
}

.drop-copy strong {
  font-size: 1.2rem;
}

.drop-copy span:last-child {
  color: var(--muted);
}

.drop-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green);
  font-size: 1.45rem;
  font-weight: 800;
}

.controls {
  display: grid;
  gap: 10px;
  align-content: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.controls label {
  font-size: 0.9rem;
  font-weight: 800;
}

select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.primary {
  padding: 0 18px;
  color: #ffffff;
  background: var(--blue);
}

.primary:hover:not(:disabled) {
  background: var(--blue-strong);
}

.secondary,
.text-button {
  color: var(--ink);
  background: #e8edf5;
}

.secondary:hover:not(:disabled),
.text-button:hover:not(:disabled) {
  background: #dce4ef;
}

.text-button {
  min-height: 36px;
  padding: 0 12px;
}

.status-line {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.status-line[data-tone="success"] {
  color: var(--green);
  border-color: rgba(11, 122, 98, 0.28);
  background: rgba(11, 122, 98, 0.08);
}

.status-line[data-tone="error"] {
  color: var(--red);
  border-color: rgba(179, 52, 74, 0.28);
  background: rgba(179, 52, 74, 0.08);
}

.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.reference h2 {
  margin: 0;
  font-size: 1rem;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.file-list,
.result-list {
  display: grid;
  gap: 0;
  min-height: 190px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list:empty::before,
.result-list:empty::before {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  content: "Nothing here yet.";
}

.file-item,
.result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.file-name,
.result-name {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta,
.result-meta {
  display: block;
  font-size: 0.88rem;
}

.file-kind {
  padding: 5px 9px;
  border-radius: 999px;
  color: #233348;
  background: #edf2f8;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

a.download-link {
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  color: #ffffff;
  background: var(--green);
  text-decoration: none;
}

.reference {
  align-self: start;
  padding: 22px;
}

.reference dl {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

.reference dt {
  margin-bottom: 4px;
  font-weight: 800;
}

.reference dd {
  margin: 0;
}

.note {
  margin: 18px -2px 0;
  padding: 14px;
  border-left: 4px solid var(--yellow);
  background: #fff8e3;
}

.seo-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.seo-section h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.seo-section p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seo-page {
  width: min(780px, calc(100% - 32px));
  margin: 42px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.seo-page h1 {
  margin-bottom: 12px;
}

.seo-page p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.primary-link {
  display: inline-grid;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 18px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.primary-link:hover {
  background: var(--blue-strong);
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .converter,
  .panels,
  .seo-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
  }

  .top-nav,
  .seo-section {
    width: min(100% - 20px, 1180px);
  }

  .workspace,
  .reference,
  .seo-section {
    padding: 16px;
  }

  .drop-zone,
  .file-item,
  .result-item {
    grid-template-columns: 1fr;
  }

  .primary,
  .secondary,
  .text-button,
  a.download-link {
    width: 100%;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}
