:root {
  --ink: #1c1b19;
  --quiet: #6b6760;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #ded9cf;
  --mark: #1f5f4a;
  --mark-ink: #ffffff;
  --live: #b3261e;
  --ask: #fff4d6;
  --ask-line: #e2c36b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece8e1;
    --quiet: #a39e95;
    --paper: #161513;
    --card: #201f1c;
    --line: #3a3833;
    --mark: #6fc2a4;
    --mark-ink: #10231c;
    --live: #f2776d;
    --ask: #3a3220;
    --ask-line: #8a7433;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem calc(2rem + env(safe-area-inset-bottom));
}
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
h3 { font-size: .95rem; margin: 1rem 0 .35rem; }
h3 small { font-weight: 400; color: var(--quiet); }
p { margin: .4rem 0; }
.quiet { color: var(--quiet); font-size: .9rem; }
.plain {
  border-left: 3px solid var(--mark);
  padding: .1rem 0 .1rem .75rem;
  margin: 1rem 0;
}

.record { text-align: center; margin: 1.5rem 0; }
#talk {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  border: 0;
  background: var(--mark);
  color: var(--mark-ink);
  font: inherit;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  /* Holding a finger on it must record, not select text, scroll or open a menu. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#talk.live { background: var(--live); color: #fff; transform: scale(1.04); }
#talk:disabled { opacity: .5; cursor: default; }
#talk:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
#status { min-height: 1.5rem; font-weight: 600; }

section.note, #kept, #figures, .notice, .quietbox {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1rem;
  margin: 1rem 0;
}
.notice { border-color: var(--ask-line); background: var(--ask); }
.transcript { white-space: pre-wrap; margin: .25rem 0 .5rem; }
.ask {
  background: var(--ask);
  border: 1px solid var(--ask-line);
  border-radius: .5rem;
  padding: .6rem .75rem;
  margin: .5rem 0;
}
/* A question about a name, right under the pattern it is about (P-055). */
.ask.under { margin: 0 0 .75rem 1rem; }
/* A pattern in two languages: the text the person reads, and the other one under it (P-121). */
.pair { flex: 1; }
.pair p { margin: 0 0 .2rem; }
.pair .pair-main { font-weight: 600; }
.row { display: flex; gap: .5rem; align-items: center; margin: .35rem 0; flex-wrap: wrap; }
.row input[type="text"] { flex: 1 1 12rem; min-width: 0; }
input[type="text"] {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .4rem;
  padding: .5rem .6rem;
}
button.small, .actions button, #allow {
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: .4rem;
  padding: .5rem .8rem;
  min-height: 2.75rem;
  cursor: pointer;
}
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.actions button.main, #allow { background: var(--mark); color: var(--mark-ink); border-color: var(--mark); font-weight: 600; }
.wrong { color: var(--live); font-weight: 600; }
ul.plainlist { list-style: none; margin: 0; padding: 0; }
ul.plainlist li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding: .3rem 0; border-top: 1px solid var(--line); }
ul.plainlist li:first-child { border-top: 0; }
footer { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.busy { color: var(--quiet); font-style: italic; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: .3rem .4rem; border-top: 1px solid var(--line); }
th { font-weight: 600; border-top: 0; color: var(--quiet); }
th:first-child, td:first-child { text-align: left; }
[hidden] { display: none !important; }

/* The host's approval view (P-086): one card at a time, with its texts open to edit. */
textarea, select {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .4rem;
  padding: .5rem .6rem;
}
textarea { display: block; width: 100%; margin: .25rem 0 .6rem; font-weight: 400; resize: vertical; }
select { max-width: 100%; min-height: 2.75rem; }
label { display: block; font-weight: 600; font-size: .9rem; }
.name { font-weight: 600; margin-bottom: 0; }
.words { margin-bottom: 1rem; }
button:disabled { opacity: .5; cursor: default; }
textarea:focus-visible, select:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }

/* A person's side (P-090): one answer chosen from a few, and a one-line field for the host's exact place. */
label.choice { display: flex; gap: .5rem; align-items: center; font-weight: 400; font-size: 1rem; min-height: 2.75rem; }
fieldset { border: 1px solid var(--line); border-radius: .5rem; margin: .5rem 0; padding: .4rem .75rem; }
fieldset label.choice { display: inline-flex; margin-right: 1rem; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .25rem; }
input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--mark); }
label input[type="text"] { display: block; width: 100%; margin: .25rem 0 .6rem; font-weight: 400; }

/* Many people in the app (P-097 to P-102): a small menu on a person's pages, boxes to tick, and a link to copy. */
nav#nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: .6rem 0 0; }
nav#nav a, .quiet a { color: var(--mark); font-weight: 600; text-underline-offset: .2em; }
nav#nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--mark); }
ul.plainlist li { flex-wrap: wrap; }
ul.plainlist li span { flex: 1 1 14rem; }
.row input[readonly] { font-size: .85rem; }
