:root {
  color-scheme: dark;
  --bg: #0d1210;
  --panel: #151b18;
  --panel-2: #1c241f;
  --text: #f4f1e8;
  --muted: #a9b0a5;
  --line: #303a34;
  --accent: #d7ff55;
  --accent-soft: rgba(215, 255, 85, 0.12);
  --danger: #ff6b4a;
  --link: #b6adff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: var(--link);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
  max-width: 100vw;
}

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

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 18px;
}

.panel {
  padding: 24px;
  margin-bottom: 18px;
}

.narrow {
  width: min(520px, 100%);
  margin: 56px auto 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

h3 {
  margin-bottom: 14px;
  font-size: 19px;
}

.lead,
.muted,
.section-head p,
.quiz-card p,
.upload-box p {
  color: var(--muted);
  line-height: 1.5;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 17px;
}

.topline,
.status-row,
.publish-panel,
.publish-actions,
.actions,
.section-head,
.upload-box,
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.quiz-card,
.empty-state {
  padding: 20px;
}

.quiz-card h2 {
  margin-top: 14px;
}

.copy-row {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101512;
  padding: 8px;
}

.copy-row span {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

.published {
  background: var(--accent-soft);
  color: var(--accent);
}

.draft {
  background: #2a2f2b;
  color: var(--muted);
}

.create-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(300px, 1.35fr);
  gap: 22px;
}

.create-form,
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.stack,
.friendly-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101512;
  color: var(--text);
  font: inherit;
  padding: 12px;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
}

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

button,
.button,
.share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: fit-content;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #101512;
  font-weight: 800;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
}

.ghost,
.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.ghost-link {
  color: var(--text);
  text-decoration: none;
}

.steps {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0 18px;
  background: var(--bg);
}

.steps a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 9px 12px;
  text-decoration: none;
  font-weight: 800;
}

.steps span,
.step-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #101512;
  font-size: 14px;
  font-weight: 900;
  flex: 0 0 auto;
}

.section-head {
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 18px;
}

.publish-copy p {
  margin: 8px 0 0;
  color: var(--muted);
}

.upload-box {
  margin-top: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 16px;
}

.upload-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chips,
.card-list,
.list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
}

.chips span,
.mini-card,
.row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101512;
  padding: 12px;
}

.mini-card,
.row {
  display: grid;
  gap: 6px;
}

.row span,
.mini-card span {
  color: var(--muted);
}

.editor-question,
.question {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  min-width: 0;
  padding-top: 18px;
  margin-top: 18px;
}
