:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #f5f2ed;
  background: #120f10;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 15%, rgb(144 19 32 / 24%), transparent 32rem),
    #120f10;
}

a {
  color: #ffb0a8;
}

.demo-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  gap: 0.75rem;
  padding: 0.75rem;
}

.demo-shell.-fallback {
  display: block;
  height: auto;
  max-width: 48rem;
  margin: 0 auto;
}

.demo-shell.-fallback > .demo-guide {
  display: block;
}

.demo-shell.-fallback > .editor-panel,
.demo-shell.-fallback .guide-step,
.demo-shell.-fallback .guide-actions,
.demo-shell.-fallback .completion-panel {
  display: none;
}

.demo-shell > .demo-guide,
.demo-shell > .editor-panel {
  min-width: 0;
}

.demo-guide {
  display: grid;
  grid-template-columns: minmax(20rem, 2fr) minmax(32rem, 3fr);
  column-gap: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid #47383c;
  border-radius: 1rem;
  background: rgb(26 21 23 / 94%);
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 30%);
}

.demo-guide > .topline,
.demo-guide > .title,
.demo-guide > .summary,
.demo-guide > .profile-choice {
  grid-column: 1;
}

.demo-guide > .topline {
  grid-row: 1;
}

.demo-guide > .title {
  grid-row: 2;
}

.demo-guide > .summary {
  grid-row: 3;
}

.demo-guide > .profile-choice {
  grid-row: 4;
}

.demo-guide > .guide-stage {
  grid-column: 2;
  grid-row: 1 / span 4;
  min-width: 0;
}

.demo-guide > .fallback-panel {
  grid-column: 1 / -1;
}

.demo-guide > .topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.demo-guide > .topline > .eyebrow {
  margin: 0;
  color: #ff8377;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.language-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 0.25rem;
}

.language-switch > button {
  padding: 0.35rem 0.5rem;
  border: 1px solid #5e4a4e;
  border-radius: 0.4rem;
  color: #d4c9ca;
  background: transparent;
  cursor: pointer;
}

.language-switch > button[aria-pressed="true"] {
  border-color: #ff8377;
  color: #fff;
  background: #4a2426;
}

.demo-guide > .title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.15;
}

.demo-guide > .summary,
.demo-guide > .hint {
  margin: 0.4rem 0;
  color: #d4c9ca;
  font-size: 0.875rem;
  line-height: 1.4;
}

.profile-choice {
  margin: 0.35rem 0;
}

.profile-choice > h2 {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
}

.profile-choice > .options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.profile-choice > .options > button {
  display: grid;
  gap: 0.25rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #5e4a4e;
  border-radius: 0.6rem;
  color: #d4c9ca;
  background: #171315;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-choice > .options > button:hover,
.profile-choice > .options > button:focus-visible,
.profile-choice > .options > button[aria-pressed="true"] {
  border-color: #ff8377;
  outline: none;
}

.profile-choice > .options > button[aria-pressed="true"] {
  color: #fff;
  background: #3a2023;
}

.profile-choice > .options > button > span {
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-choice > .note {
  margin: 0.35rem 0 0;
  color: #aa9da0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.guide-step {
  padding: 0.65rem 0.85rem;
  border: 1px solid #47383c;
  border-radius: 0.75rem;
  background: #171315;
}

.guide-stage > .guide-step {
  margin-top: 0;
}

.guide-step > .progress {
  margin: 0 0 0.35rem;
  color: #ff8377;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-step > .title {
  margin: 0;
  font-size: 1.1rem;
}

.guide-step > .body,
.guide-step > .action,
.guide-step > .check {
  margin: 0.45rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.guide-step > .body {
  color: #d4c9ca;
}

.guide-step > .action {
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #fff;
  background: #272126;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.guide-step > .check {
  margin-bottom: 0;
  color: #b7d9b8;
  font-size: 0.9rem;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #5e4a4e;
  border-radius: 0.5rem;
  color: #f5f2ed;
  background: #272126;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.action-button:hover,
.action-button:focus-visible {
  border-color: #ff8377;
  outline: none;
}

.action-button.-primary {
  border-color: #ff8377;
  color: #160d0e;
  background: #ff8f85;
  font-weight: 750;
}

.completion-panel {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #567458;
  border-radius: 0.75rem;
  background: #162218;
}

.completion-panel > h2 {
  margin-top: 0;
}

.fallback-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #47383c;
  color: #d4c9ca;
  line-height: 1.55;
}

.fallback-panel > h2 {
  color: #f5f2ed;
}

[hidden] {
  display: none !important;
}

.status-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  border-top: 1px solid #47383c;
}

.status-banner > .label {
  color: #bbaeb0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-banner > .value {
  color: #ffcfca;
}

.editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #47383c;
  border-radius: 1rem;
  background: #070707;
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 30%);
}

.editor-panel > .bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #2a2425;
  background: #181415;
}

.editor-panel > .bar > .title {
  margin: 0;
  font-size: 0.9rem;
}

.editor-panel > .bar > .status {
  color: #b7d9b8;
  font: 0.75rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.editor-panel > .bar > .runtime-state {
  display: flex;
  gap: 0.75rem;
  color: #b7d9b8;
  font: 0.75rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.editor-panel > .grid {
  min-height: 0;
  padding: 0.5rem;
  overflow: auto;
  outline: none;
  color: #dfe5f1;
  background: #050912;
  font: 14px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

.editor-panel > .grid:focus {
  box-shadow: inset 0 0 0 2px #ff8377;
}

.editor-panel > .grid > .cursor {
  outline: 1px solid currentColor;
}

noscript {
  display: block;
  padding: 2rem;
}

@media (max-width: 63.99rem) {
  .demo-shell.-fallback > .demo-guide {
    display: block;
    padding: 1rem;
  }
}
