/* palette: art/DESIGN.md */
:root {
  --brand: #c86fb9;
  --brand-deep: #a94f9a;
  --brand-deeper: #8d3f81;
  --link: #a94f9a;
  --bg: #ffffff;
  --band: #f6e7f2;
  --panel: #fbf7fa;
  --text: #2a2028;
  --muted: #6b5f68;
  --border: #eadfe7;
  --error: #d4526e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --link: #d98fcd;
    --bg: #231c21;
    --band: #382b34;
    --panel: #2e242b;
    --text: #ece5ea;
    --muted: #b1a1ac;
    --border: #453842;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--brand);
  position: sticky;
  top: 0;
  background: var(--band);
  z-index: 1;
}
.mascot { height: 2rem; width: auto; }
h1 { font-size: 1.15rem; margin: 0; }
h1 .thin { font-weight: 300; color: var(--muted); }
nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

button, select {
  font: inherit;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
button.primary {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
  font-weight: 600;
}
button.primary:hover { background: var(--brand-deeper); border-color: var(--brand-deeper); }
button:hover, select:hover { border-color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
a { color: var(--link); }
nav a.gh { text-decoration: none; padding: 0.35rem 0.2rem; }

main { flex: 1; }

/* the buffer up top, the console beneath, prose below: go.dev/play's shape */
#editor-wrap {
  display: flex;
  height: 62vh;
  min-height: 16rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
#gutter {
  padding: 1rem 0.25rem 1rem 0;
  min-width: 2.6rem;
  overflow: hidden;
  text-align: right;
  color: var(--muted);
  background: var(--panel);
  border-right: 1px solid var(--border);
  user-select: none;
  font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
#gutter div { padding-right: 0.55rem; }
#gutter .err-line {
  color: var(--error);
  font-weight: 700;
  background: color-mix(in srgb, var(--error) 12%, transparent);
}
#editor {
  flex: 1;
  border: 0;
  resize: none;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}
#editor:focus { outline: none; }

#output-pane {
  min-height: 8rem;
  padding: 0.75rem 1rem 1rem;
  border-bottom: 2px solid var(--brand);
}
#status { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
#status.error { color: var(--error); font-weight: 600; }
#output {
  margin: 0;
  white-space: pre-wrap;
  font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
#output.error { color: var(--error); }

#about {
  max-width: 42rem;
  padding: 1.25rem 1rem 2rem;
}
#about h2 { font-size: 1rem; margin: 1.4rem 0 0.4rem; }
#about h2:first-child { margin-top: 0; }
#about p { margin: 0.5rem 0; }
#about code {
  font: 0.9em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.25em;
}
#about pre.install {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
