:root {
  --ink: #1c1915;
  --paper: #e7efe8;
  --card: #f7faf7;
  --line: #c9d7cb;
  --green: #217346;
  --rust: #9a3b24;
  --muted: #5c665c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 "Segoe UI", "Microsoft YaHei", sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 24px 28px 16px;
  background: #f7faf7;
  border-bottom: 1px solid var(--line);
}

h1 { margin: 0; font-size: 32px; }
h2 { margin: 0 0 8px; }
.mark { margin: 0; color: var(--green); letter-spacing: 0.14em; font-size: 12px; }
.lede, .muted { color: var(--muted); }
.lede { margin: 6px 0 0; max-width: 720px; }
.risk { color: var(--rust); font-weight: 650; }

nav, .row { display: flex; gap: 8px; flex-wrap: wrap; }

button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

button.primary, button.tab.on { background: var(--green); color: white; border-color: var(--green); }

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: 8px;
}

.panel, article { padding: 8px 22px 32px; }
label, fieldset { display: block; margin: 12px 0; font-size: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; }
.choice { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font: inherit;
  color: var(--ink);
}

.choice input { width: auto; margin: 0; }
code { font-family: Consolas, monospace; font-size: 13px; }

.stage {
  width: min(420px, 100%);
  margin: 12px auto;
  background: #111;
  border-radius: 28px;
  padding: 14px;
}

.stage iframe, .stage video, .stage img {
  width: 100%;
  border: 0;
  border-radius: 18px;
  background: white;
  display: block;
}

.stage iframe { height: 760px; }
caption, .copy {
  white-space: pre-wrap;
  background: white;
  border-radius: 12px;
  padding: 12px;
}

.empty { color: var(--muted); padding: 40px 0; }

@media (max-width: 900px) {
  header { flex-direction: column; align-items: start; }
  .layout { grid-template-columns: 1fr; }
}
