/* The review panel's one stylesheet. System fonts, light and dark from the system setting. */
:root {
  --bg: #fbfaf7; --fg: #1d1d1b; --muted: #5f5e58; --line: #dcd9d0; --panel: #f1efe8;
  --accent: #1f5f8b; --accent-fg: #fff; --warn-bg: #fdf0e6; --warn-line: #d9822b;
  --ok-bg: #eaf4ec; --differs: #fbeaea; --you: #eef4fa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615; --fg: #ecebe6; --muted: #a7a59d; --line: #3a3935; --panel: #22221f;
    --accent: #7ab4dc; --accent-fg: #0d1b25; --warn-bg: #33261a; --warn-line: #d9822b;
    --ok-bg: #1b2b1e; --differs: #3a2224; --you: #1c2733;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .2rem 0 .6rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .6rem; }
.inner, .reading, .wide { margin: 0 auto; padding: 0 16px; }
.reading { max-width: 44rem; }
.wide { max-width: 72rem; }
main { padding: 1.5rem 0 3rem; }

.topbar { border-bottom: 1px solid var(--line); }
.topbar .inner { max-width: 72rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: baseline; justify-content: space-between; padding-top: .7rem; padding-bottom: .7rem; }
.wordmark { font-weight: 700; text-decoration: none; color: var(--fg); }
.wordmark span { font-weight: 400; color: var(--muted); }
nav { color: var(--muted); }
nav a[aria-current] { font-weight: 600; }
form.inline { display: inline; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit;
  text-decoration: underline; cursor: pointer; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.foot .inner { max-width: 72rem; padding-top: 1rem; padding-bottom: 2rem; }

.label { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted);
  margin: 0; }
.standfirst { font-size: 1.1rem; }
.quiet, .hint { color: var(--muted); font-size: .9rem; }
.optional { font-weight: 400; color: var(--muted); }

.notice, .problems, .newhere { border-left: 4px solid var(--accent); background: var(--panel);
  padding: .5rem 1rem; margin: 1rem 0; }
.notice { background: var(--ok-bg); }
.problems { border-color: var(--warn-line); background: var(--warn-bg); }

.button, .button-quiet { display: inline-block; padding: .5rem 1rem; border-radius: 4px;
  font: inherit; cursor: pointer; text-decoration: none; }
.button { background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); }
.button-quiet { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0; }
.actions form { margin: 0; }

.form .field { margin: 1rem 0; }
.form label { display: block; font-weight: 600; }
.form input[type=text], .form input[type=email], .form textarea, .form select {
  width: 100%; padding: .45rem .5rem; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; }
.form fieldset { border: 1px solid var(--line); border-radius: 4px; margin: 1rem 0; padding: .5rem 1rem; }
.form legend { font-weight: 600; padding: 0 .25rem; }
.form label.choice { display: inline-block; font-weight: 400; margin-right: 1.25rem; }
.trap { position: absolute; left: -9999px; }
.keeps { margin-top: 2rem; font-size: .9rem; color: var(--muted); }
ul.people { list-style: none; padding: 0; }
ul.people li { border-bottom: 1px solid var(--line); padding: .5rem 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; background: var(--panel); }
.card h2 { margin-top: 0; }
.big { font-size: 2rem; font-weight: 700; margin: 0; }
.big span { font-size: 1rem; font-weight: 400; color: var(--muted); }

.provision { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 1rem; font-size: 1.02rem; max-height: 32rem; overflow: auto; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
table.answers td:first-child { white-space: nowrap; font-weight: 600; }
tr.you td { background: var(--you); }
tr.differs td, td.differs { background: var(--differs); }
ol.duties { margin: 0; padding-left: 1.2rem; }
ol.duties li { margin-bottom: .3rem; }
.type { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: .25rem; }
.facet { display: inline-block; font-size: .8rem; color: var(--muted); border: 1px solid var(--line);
  border-radius: 3px; padding: 0 .3rem; margin-left: .25rem; }
.conf-low { border-color: var(--warn-line); }
.note { color: var(--muted); font-size: .9rem; margin: .25rem 0 0; }

table.duty-form td { padding: .25rem; border: 0; }
table.duty-form td:nth-child(1) { width: 55%; }
table.duty-form td:nth-child(2) { width: 25%; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; margin: 1rem 0; }
.filters label { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; }
.filters select { font: inherit; padding: .3rem; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; }
table.list { font-size: .92rem; }

@media (max-width: 40rem) {
  table.duty-form thead { display: none; }
  table.duty-form tr { display: block; border-bottom: 1px solid var(--line); padding: .4rem 0; }
  table.duty-form td { display: block; width: 100% !important; }
  .wide { overflow-x: hidden; }
  table.answers, table.list { display: block; overflow-x: auto; }
}

/* The row's section (D20), with the row under review marked. */
.section { border: 1px solid var(--line); border-radius: 6px; max-height: 36rem; overflow: auto; }
.section .sub { display: flex; gap: .75rem; padding: .5rem .75rem; color: var(--muted);
  border-bottom: 1px solid var(--line); }
.section .sub:last-child { border-bottom: 0; }
.section .sub.self { color: var(--fg); background: var(--you); border-left: 4px solid var(--accent); }
.section .ref { font-weight: 700; min-width: 2.5rem; font-variant-numeric: tabular-nums; }
.section .text { white-space: pre-wrap; }
.link-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; }
.link-fields label { font-weight: 400; font-size: .9rem; color: var(--muted); }
.link-to { margin: 0 0 .25rem; font-size: .9rem; }

/* The chain above a row (D21). */
ol.chain { list-style: none; padding: 0; margin: 0; }
ol.chain > li { border-left: 3px solid var(--line); padding: .25rem 0 .75rem 1rem; margin-left: .5rem; }
.tier-head { margin: 0 0 .25rem; }
.provision.small { font-size: .92rem; max-height: 14rem; }
table.answers.compact td { padding: .25rem .5rem; }
details summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
