:root {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1d2530;
  --ink: #edf2f7;
  --muted: #9aa8b6;
  --line: #2a3442;
  --accent: #4fd1bd;
  --accent-soft: #123832;
  --danger: #ff7b6d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

main {
  width: min(1120px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

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

.badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #285c3d;
  border-radius: 999px;
  color: #b8f5d0;
  background: #102819;
  font-weight: 900;
}

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

.card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card {
  display: grid;
  gap: 12px;
  padding: 18px;
  text-decoration: none;
}

.card:hover {
  background: var(--surface-2);
}

.card span,
.pill {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  gap: 16px;
}

.hero {
  height: 280px;
  background:
    radial-gradient(circle at 70% 28%, rgba(79, 209, 189, 0.26), transparent 24%),
    linear-gradient(135deg, #222c38, #10161e 62%, #0c1016);
}

.panel-body {
  padding: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

.render-box,
.result-box {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141b;
  overflow-wrap: anywhere;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f141b;
  color: var(--ink);
}

input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 124px;
  padding: 12px;
  resize: vertical;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #06110f;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.button-secondary {
  border: 1px solid #365063;
  background: #10161e;
  color: var(--ink);
}

.share-url {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f141b;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 0.9rem;
}

.hint-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--muted);
}

@media (max-width: 840px) {
  .grid,
  .lab-layout {
    grid-template-columns: 1fr;
  }

  .top {
    flex-direction: column;
  }
}
