:root {
  --paper: #E8EBEE;
  --surface: #F6F7F8;
  --ink: #17202E;
  --muted: #526070;
  --line: #B9C1CA;
  --human: #1E6B57;
  --inhuman: #A63A2B;
  --on: #fff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --paper: #10161F;
    --surface: #18202B;
    --ink: #E6EAEE;
    --muted: #98A5B3;
    --line: #2B3644;
    --human: #5CC2A3;
    --inhuman: #E27D6C;
    --on: #10161F;
  }
}

:root[data-theme="dark"] {
  --paper: #10161F;
  --surface: #18202B;
  --ink: #E6EAEE;
  --muted: #98A5B3;
  --line: #2B3644;
  --human: #5CC2A3;
  --inhuman: #E27D6C;
  --on: #10161F
}

*,
*::before,
*::after {
  box-sizing: inherit
}

html {
  scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans)
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .6em
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  letter-spacing: -.02em
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem)
}

h3 {
  font-size: 1.3rem
}

p {
  margin: 0 0 1em;
  max-width: 62ch
}

a {
  color: inherit
}

:focus-visible {
  outline: 3px solid var(--human);
  outline-offset: 3px
}

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 1.25rem
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--paper);
  z-index: 20
}

.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line)
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 3.5rem;
  overflow-x: auto
}

.brand {
  font: 600 1.2rem var(--serif);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto
}

.top a.l {
  font-size: .95rem;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap
}

.top a.l:hover {
  color: var(--ink);
  text-decoration: underline
}

/* gate */
.gate {
  padding-block: clamp(2.5rem, 8vw, 6rem) 3rem
}

.gate p.lead {
  font: 1.35rem/1.5 var(--serif);
  color: var(--muted);
  max-width: 40ch
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
  margin-top: 2.5rem
}

.choice {
  font: 600 clamp(1.6rem, 5vw, 3rem) var(--serif);
  padding: 2.5rem 1rem;
  background: transparent;
  color: var(--ink);
  border: 0;
  cursor: pointer;
  text-align: left;
  padding-inline: 1.5rem;
  transition: background .2s, color .2s
}

.choice small {
  display: block;
  font: 400 .95rem var(--sans);
  margin-top: .5rem;
  opacity: .8
}

.choice+.choice {
  border-left: 2px solid var(--ink)
}

.choice[data-v="human"]:hover,
.choice[aria-pressed="true"][data-v="human"] {
  background: var(--human);
  color: var(--on)
}

.choice[data-v="inhuman"]:hover,
.choice[aria-pressed="true"][data-v="inhuman"] {
  background: var(--inhuman);
  color: var(--on)
}

.why {
  margin-top: 1.5rem;
  display: none
}

.why.on {
  display: block
}

label.f {
  display: block;
  font-weight: 500;
  margin-bottom: .4rem
}

textarea,
input[type=text] {
  width: 100%;
  max-width: 40rem;
  font: inherit;
  padding: .75rem;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  border-radius: 0
}

.btn {
  font: 600 1rem var(--sans);
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: .8rem 1.4rem;
  cursor: pointer;
  margin-top: .8rem
}

.btn:hover {
  opacity: .88
}

.err {
  color: var(--inhuman);
  font-size: .95rem;
  min-height: 1.4em;
  margin: .4rem 0 0
}

/* sections */
section.s {
  padding-block: 4.5rem;
  border-top: 1px solid var(--line)
}

.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 3rem
}

@media(max-width:760px) {
  .two {
    grid-template-columns: 1fr;
    gap: 1rem
  }

  .choices {
    grid-template-columns: 1fr
  }

  .choice+.choice {
    border-left: 0;
    border-top: 2px solid var(--ink)
  }
}

dl.std {
  margin: 0
}

dl.std dt {
  font: 600 1.25rem var(--serif);
  margin-top: 1.4rem
}

dl.std dd {
  margin: .2rem 0 0;
  color: var(--muted);
  max-width: 60ch
}

.box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem
}

.scale {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin: .5rem 0 1.2rem
}

.scale label {
  border: 1.5px solid var(--line);
  padding: .35rem .8rem;
  cursor: pointer;
  font-size: .95rem
}

.scale input {
  position: absolute;
  opacity: 0
}

.scale label:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink)
}

.scale label:has(input:focus-visible) {
  outline: 3px solid var(--human);
  outline-offset: 2px
}

.q {
  font-weight: 500;
  margin: 0 0 .2rem
}

.result {
  border-left: 5px solid var(--human);
  padding: .2rem 0 .2rem 1rem;
  margin-top: 1rem;
  display: none
}

.result.on {
  display: block
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.2rem
}

.tabs button {
  font: 500 1rem var(--sans);
  padding: .5rem 1rem;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  cursor: pointer
}

.tabs button[ aria-selected="true"] {
  background: var(--ink);
  color: var(--paper)
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line)
}

.list li {
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 14rem) 1fr;
  gap: 1rem
}

.list b {
  font-family: var(--serif);
  font-size: 1.15rem
}

@media(max-width:600px) {
  .list li {
    grid-template-columns: 1fr;
    gap: .2rem
  }
}

.needs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line)
}

.needs div {
  background: var(--paper);
  padding: 1.3rem
}

.needs p {
  font-size: .97rem;
  color: var(--muted)
}

details {
  border-top: 1px solid var(--line);
  padding: .9rem 0
}

details:last-of-type {
  border-bottom: 1px solid var(--line)
}

summary {
  font: 600 1.2rem var(--serif);
  cursor: pointer
}

details p {
  margin: .6rem 0 0;
  color: var(--muted)
}

.poll {
  margin-top: 2.5rem;
  padding: 1.2rem 1.5rem;
  border: 1.5px dashed var(--line)
}

.poll p {
  margin-bottom: .6rem;
  font-weight: 500
}

.poll .opts {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap
}

.poll button {
  font: inherit;
  font-size: .95rem;
  padding: .4rem .9rem;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  cursor: pointer
}

.poll button[ aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper)
}

.poll small {
  display: block;
  margin-top: .6rem;
  color: var(--muted)
}

ul.src {
  columns: 2 16rem;
  padding-left: 1.1rem;
  color: var(--muted)
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: .95rem
}

.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 2px solid var(--ink);
  margin-top: 2rem
}

.paths>div {
  padding: 1.6rem
}

.paths>div+div {
  border-left: 2px solid var(--ink)
}

.paths h3 {
  margin-bottom: .4rem
}

.paths .h {
  border-top: 6px solid var(--human)
}

.paths .i {
  border-top: 6px solid var(--inhuman)
}

.q1 {
  font: italic 1.5rem/1.4 var(--serif);
  max-width: 34ch;
  margin-bottom: 1.5rem
}

.def {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem
}

.def h3 {
  border-bottom: 2px solid var(--ink);
  padding-bottom: .4rem
}

.arts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.5rem
}

.arts li {
  margin-bottom: .8rem;
  color: var(--muted)
}

.arts b {
  color: var(--ink)
}

.arts a {
  display: inline-block;
  margin-left: .4rem;
  font-size: .9rem;
  color: var(--human);
  font-weight: 500
}

.arts ul {
  list-style: none;
  padding: 0;
  margin: 0
}

@media(max-width:760px) {

  .paths,
  .def {
    grid-template-columns: 1fr
  }

  .paths>div+div {
    border-left: 0;
    border-top: 2px solid var(--ink)
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important
  }
}