:root {
  --bg: #fbfaf8; --fg: #1c1b19; --muted: #6b6862; --line: #ddd8d0;
  --accent: #2f5d50; --accent-soft: #e8f0ed; --warn: #8a3324;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #17181a; --fg: #eceae6; --muted: #9a978f; --line: #33352f;
          --accent: #7fb8a5; --accent-soft: #1f2a27; --warn: #d98b78; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 42rem; margin: 0 auto; padding: 2rem 1.25rem 5rem; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: .25rem 0 1rem; }
h2 { font-size: 1rem; margin: 0 0 .6rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); font-size: .875rem; }
.step { color: var(--muted); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .25rem; }
.error { background: var(--warn); color: #fff; padding: .6rem .8rem;
  border-radius: 6px; }

.progress { height: 3px; background: var(--line); border-radius: 2px;
  margin-bottom: 1.5rem; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent);
  transition: width .3s ease; }

.card { background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 1rem 1.1rem; border-radius: 0 6px 6px 0; margin-bottom: 1.5rem; }
blockquote.sent { margin: 0 0 1.5rem; padding: .9rem 1.1rem; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; }
blockquote.raw { background: transparent; border-style: dashed; }
blockquote.alt { border-color: var(--accent); }
blockquote.para { font-style: italic; }
blockquote.phrase { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 600; }
details.original { margin: -.75rem 0 1.5rem; }
details.original summary { cursor: pointer; color: var(--muted);
  font-size: .875rem; margin-bottom: .5rem; }

section { margin-bottom: 1.75rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.probe { padding-bottom: 1.1rem; }
.probe-q { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }

textarea, input[type=text] { width: 100%; font: inherit; padding: .7rem .8rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--fg); resize: vertical; }
textarea:focus, input[type=text]:focus { outline: 2px solid var(--accent);
  outline-offset: 1px; }
.field span { display: block; margin-bottom: .5rem; font-weight: 600; }

.choices { display: flex; flex-direction: column; gap: .35rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: .25rem; flex: none; }

.scale-anchors { display: flex; justify-content: space-between; gap: 1rem;
  font-size: .8rem; color: var(--muted); margin-bottom: .35rem; }
.scale-anchors span:last-child { text-align: right; }
.scale-row { display: flex; gap: .3rem; }
.pip { flex: 1; }
.pip input { position: absolute; opacity: 0; width: 0; height: 0; }
.pip span { display: block; text-align: center; padding: .55rem 0;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  font-variant-numeric: tabular-nums; }
.pip input:checked + span { background: var(--accent); color: #fff;
  border-color: var(--accent); }
.pip input:focus-visible + span { outline: 2px solid var(--accent);
  outline-offset: 2px; }
.scale-mid { font-size: .78rem; color: var(--muted); margin: .4rem 0 0; }

.conf { display: flex; align-items: center; gap: .5rem; margin-top: .6rem;
  flex-wrap: wrap; }
.conf-label { font-size: .78rem; color: var(--muted); }
.conf-opt input { position: absolute; opacity: 0; }
.conf-opt span { display: inline-block; padding: .25rem .6rem; font-size: .8rem;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.conf-opt input:checked + span { background: var(--accent); color: #fff;
  border-color: var(--accent); }

.openness { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag input { position: absolute; opacity: 0; }
.tag span { display: inline-block; padding: .35rem .7rem; font-size: .85rem;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.tag input:checked + span { background: var(--accent); color: #fff;
  border-color: var(--accent); }

button { font: inherit; font-weight: 600; padding: .75rem 1.5rem; border: 0;
  border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; }
button:hover { filter: brightness(1.08); }
.consent-check { display: flex; gap: .6rem; margin: 1.5rem 0; align-items: center; }

.code { font: 600 1.25rem ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--accent-soft); padding: .8rem 1rem; border-radius: 8px;
  letter-spacing: .05em; }

table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem;
  font-size: .875rem; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.cov td { text-align: center; font-variant-numeric: tabular-nums; }
.cov td.full { background: var(--accent-soft); }
.cov td.part { color: var(--muted); }

a.btn { display: inline-block; font-weight: 600; padding: .75rem 1.5rem;
  border-radius: 8px; background: var(--accent); color: #fff;
  text-decoration: none; }
a.btn:hover { filter: brightness(1.08); }
