:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #182033;
  --muted: #667085;
  --border: #d8ddea;
  --accent: #2f6feb;
  --accent-2: #1f56c3;
  --danger: #b42318;
  --success: #027a48;
  --info: #175cd3;
  --code-bg: #f1f3f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --card: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #374151;
    --accent: #6ea8fe;
    --accent-2: #93c5fd;
    --danger: #f97066;
    --success: #32d583;
    --info: #84caff;
    --code-bg: #1f2937;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header,
main,
footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  padding: 48px 0 24px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

h2 {
  margin-top: 0;
}

p {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

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

label {
  display: block;
  font-weight: 650;
  margin: 14px 0 6px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

button,
.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

button:hover,
.button:hover {
  background: var(--accent-2);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-left: 8px;
}

small,
.muted {
  color: var(--muted);
}

.status {
  min-height: 24px;
  margin-top: 14px;
  font-weight: 650;
}

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

.status.success {
  color: var(--success);
}

.status.info {
  color: var(--info);
}

.link-box,
.raw-output {
  overflow-wrap: anywhere;
  background: var(--code-bg);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--border);
}

.raw-output {
  color: var(--text);
}

.attachments {
  margin-top: 22px;
}

.attachments ul {
  padding-left: 22px;
}

.attachments a {
  color: var(--accent);
  font-weight: 700;
}

.attachment-size {
  color: var(--muted);
  margin-left: 8px;
  font-size: 0.9em;
}

footer {
  padding: 28px 0 48px;
  color: var(--muted);
}
