:root {
  color-scheme: light dark;
  --bg: #f7f7f3;
  --panel: #ffffff;
  --text: #171717;
  --muted: #666a73;
  --border: #ddded9;
  --accent: #225cff;
  --accent-ink: #ffffff;
  --soft: #eef1ff;
  --danger: #b42318;
  --shadow: 0 20px 60px rgba(20, 20, 20, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --panel: #181a1f;
    --text: #f2f2f2;
    --muted: #a6acb8;
    --border: #2b2f36;
    --accent: #8ea8ff;
    --accent-ink: #111318;
    --soft: #20263a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 92, 255, 0.16), transparent 34rem),
    var(--bg);
}

code {
  padding: 0.12rem 0.32rem;
  border-radius: 0.4rem;
  background: var(--soft);
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 7vw, 5.25rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.status-card,
.panel {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.status-card {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
}

.panel {
  border-radius: 28px;
  padding: 24px;
  margin-top: 18px;
}

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

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.uploader {
  display: grid;
  gap: 16px;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  padding: 28px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 24px;
  background: color-mix(in srgb, var(--soft) 46%, transparent);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--soft) 70%, transparent);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--panel);
  color: var(--accent);
  font-size: 2rem;
  font-weight: 800;
}

.drop-title {
  font-size: 1.1rem;
  font-weight: 760;
}

.drop-help,
#file-meta,
figcaption {
  color: var(--muted);
  font-size: 0.92rem;
}

.file-preview {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.file-preview img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--soft);
}

.file-preview strong,
.file-preview span {
  display: block;
}

.button,
.link-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.button.secondary,
.link-button.muted {
  background: var(--soft);
  color: var(--text);
}

.url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.url-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.9rem 1rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.svg-preview-wrap {
  margin: 0;
  display: grid;
  gap: 10px;
}

.svg-preview-wrap img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(45deg, rgba(127, 127, 127, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(127, 127, 127, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, 0.12) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .shell {
    padding: 32px 0;
  }

  .hero,
  .panel-header,
  .url-row {
    grid-template-columns: 1fr;
  }

  .status-card {
    width: max-content;
  }
}
