:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --border: #2b2f3a;
  --text: #e6e8ec;
  --muted: #9aa0ab;
  --accent: #4f8cff;
  --accent-hover: #3f76e0;
  --danger: #ff6b6b;
  --code-bg: #11141a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}
.panel {
  width: 100%;
  max-width: 720px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}
h1 { font-size: 1.25rem; margin: 0 0 1rem; }
p.lead { color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 1rem 0 0.35rem; }
input, textarea, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
textarea { min-height: 220px; font-family: ui-monospace, monospace; resize: vertical; }
button {
  margin-top: 1.4rem;
  padding: 0.8rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); margin: 0; padding: 0.5rem 0.9rem; }
button.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
button.small { padding: 0.35rem 0.7rem; font-size: 0.8rem; margin: 0; }
#create, #reveal { width: 100%; }
.button-link {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.ghost-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.error { color: var(--danger); margin-top: 1rem; font-size: 0.9rem; }
.note { font-size: 0.8rem; color: var(--muted); margin-top: 1.4rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; }
.topbar form { margin: 0; }
.row { display: flex; gap: 1rem; }
.row > div { flex: 1; }
.block, pre.block { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem; overflow-x: auto; font-family: ui-monospace, monospace; font-size: 0.85rem; }

.result { margin-top: 1.4rem; padding: 1.1rem; background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; }
.result-row { display: flex; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.result-row:last-of-type { border-bottom: none; }
.result-label { color: var(--muted); min-width: 110px; font-size: 0.85rem; }
.mono { font-family: ui-monospace, monospace; word-break: break-all; }

table.list { width: 100%; border-collapse: collapse; margin-top: 1.4rem; font-size: 0.9rem; }
table.list th, table.list td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
table.list th { color: var(--muted); font-weight: 500; font-size: 0.8rem; }

.content { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
.content h1 { font-size: 1.45rem; margin: 0.9rem 0 0.5rem; }
.content h2 { font-size: 1.2rem; margin: 0.85rem 0 0.45rem; }
.content h3 { font-size: 1.05rem; margin: 0.8rem 0 0.4rem; }
.content h4 { font-size: 0.95rem; margin: 0.7rem 0 0.35rem; }
.content h5, .content h6 { font-size: 0.88rem; margin: 0.6rem 0 0.3rem; color: var(--muted); }
.content pre { background: #0b0d12; border-radius: 6px; padding: 0.8rem; overflow-x: auto; }
.content code { background: #0b0d12; border-radius: 6px; padding: 0.1rem 0.35rem; font-family: ui-monospace, monospace; }
.content pre code { padding: 0; }
.content ul, .content ol { margin: 0.4rem 0; padding-left: 1.3rem; }
.content a { color: var(--accent); }

/* Utility classes (used instead of inline styles so the CSP can stay strict). */
.hidden { display: none; }
.spaced { margin-top: 1.5rem; }

/* Banner-style warning, used on the reveal page to stress saving the details. */
.banner {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}
.banner-warning {
  color: #ffd479;
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.45);
  border-left: 4px solid #ffb020;
}

/* Secondary line inside the warning banner (remaining views). */
.banner-sub { margin-top: 0.35rem; font-weight: 500; opacity: 0.95; }

/* Markdown help reference table. */
table.mdref { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.mdref th, table.mdref td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.mdref th { color: var(--muted); font-weight: 500; font-size: 0.8rem; }
table.mdref td.src pre { margin: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.6rem; font-size: 0.82rem; white-space: pre-wrap; }

/* Inline link used within labels and prose. */
.inline-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.inline-link:hover { text-decoration: underline; }
