.tool-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 28px 0;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  min-height: 108px;
  padding: 16px;
  text-align: left;
}

.tool-card:hover,
.tool-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.tool-card strong {
  display: block;
  margin-bottom: 8px;
}

.tool-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.converter-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header h3 {
  font-size: 1.4rem;
  margin: 0;
}

.status-pill {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 42%, transparent);
  border-radius: 999px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 10px;
}

.converter-form {
  display: grid;
  gap: 14px;
}

.field-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

select,
input[type="text"] {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

.drop-zone {
  align-items: center;
  background: var(--surface-2);
  border: 2px dashed var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 176px;
  position: relative;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone.dragging {
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  border-color: var(--brand);
}

.drop-zone input {
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
}

.drop-content {
  display: grid;
  gap: 6px;
  pointer-events: none;
  text-align: center;
}

.drop-content strong {
  font-size: 1.25rem;
}

.drop-content span {
  color: var(--muted);
}

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

.file-item,
.download-item {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
}

.file-item span,
.download-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-group {
  display: grid;
  gap: 8px;
}

.progress-label {
  color: var(--muted);
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  justify-content: space-between;
}

.progress-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  background: var(--accent);
  height: 100%;
  transition: width 180ms ease;
  width: 0%;
}

.download-list {
  display: grid;
  gap: 10px;
}

.download-item a {
  color: var(--brand-strong);
  font-weight: 900;
}

.message {
  border-radius: 8px;
  font-weight: 800;
  padding: 10px 12px;
}

.message.error {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.message.success {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-strong);
}

.render-host {
  background: #ffffff;
  color: #111827;
  left: -10000px;
  padding: 48px;
  position: fixed;
  top: 0;
  width: 794px;
  z-index: -1;
}

.docshift-render {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.docshift-render h1,
.docshift-render h2,
.docshift-render h3 {
  color: #111827;
  line-height: 1.15;
}

.docshift-render pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

.docshift-render table {
  border-collapse: collapse;
  font-size: 11px;
  margin: 12px 0 28px;
  width: 100%;
}

.docshift-render td,
.docshift-render th {
  border: 1px solid #cbd5e1;
  padding: 5px 6px;
  vertical-align: top;
}

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