button,
.button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  display: inline-block;
  background: #242424;
  color: #fff;
  border: 1px solid #242424;
  padding: 0.55rem 0.85rem;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
}
button.secondary {
  background: transparent;
  color: #242424;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:hover,
.button:hover {
  background: #454545;
  color: #fff;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #575757;
  outline-offset: 4px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 1.5rem 0;
}
legend {
  font-weight: 600;
  font-size: 1.12rem;
  padding: 0;
  margin-bottom: 0.8rem;
}
label {
  display: block;
  margin: 0.7rem 0;
}
input[type="radio"],
input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  vertical-align: middle;
  margin-right: 0.6rem;
}
input:not([type="radio"]):not([type="checkbox"]),
textarea,
select {
  display: block;
  max-width: 100%;
  width: 100%;
  border: 1px solid #8a8a86;
  padding: 0.55rem;
  background: #fff;
  color: #242424;
  border-radius: 2px;
}
textarea {
  min-height: 7rem;
  resize: vertical;
}
small,
.muted {
  color: #595955;
}
.review-section {
  padding: 2rem 0;
  border-bottom: 1px solid #d9d9d2;
}
.review-section h2 {
  margin-top: 0;
}
.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.reading {
  max-width: 760px;
}
.notice {
  border-left: 3px solid #777;
  padding: 0.5rem 1rem;
  background: #f3f3ef;
}
.error {
  border-left-color: #8a2525;
}
.node-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.node-button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #242424;
  border: 1px solid #d9d9d2;
  padding: 0.7rem;
}
.node-button[aria-pressed="true"] {
  border: 2px solid #242424;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.map-detail {
  position: sticky;
  top: 1rem;
  border-top: 2px solid #242424;
  padding: 1rem 0;
  max-height: 88vh;
  overflow: auto;
}
.map-detail h2 {
  font-size: 1.6rem;
}
.map-detail h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}
.map-visual .node-list {
  grid-template-columns: 1fr;
}
.connection {
  display: block;
  margin: 0.4rem 0;
}
.topic-result {
  padding: 2rem 0;
  border-top: 1px solid #aaa;
}
.topic-result h2 {
  font-size: 1.6rem;
}
.result-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.result-pair h3 {
  font-size: 1rem;
}
.question-progress {
  font-variant-numeric: tabular-nums;
}
.source-links {
  padding-left: 1.2rem;
}
.diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.diff pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  background: #f3f3ef;
  padding: 1rem;
}
.review-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.review-nav a {
  font-size: 0.95rem;
}
.pill {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.view-record {
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
}
details {
  margin: 1rem 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
#status {
  min-height: 1.5em;
}
.draft-banner {
  border-bottom: 2px solid #999;
  padding: 0.7rem 0;
  font-weight: 600;
}
.edge-text {
  font-size: 0.88rem;
  color: #595955;
}
.map-layer {
  border-top: 1px solid #ddd;
  padding: 0.7rem 0;
}
.map-layer h2 {
  font-size: 1.2rem;
}
.danger {
  color: #7b2020;
}
.pending {
  padding: 1.5rem 0;
  border-bottom: 1px solid #ddd;
}
code {
  overflow-wrap: anywhere;
}
@media (max-width: 800px) {
  .map-layout {
    display: block;
  }
  .map-detail {
    position: static;
    max-height: none;
  }
  .node-list,
  .result-pair,
  .diff {
    grid-template-columns: 1fr;
  }
  .map-visual {
    display: none;
  }
  .map-visual.map-requested {
    display: block;
  }
  .map-detail:empty {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

@media (min-width: 800px) {
  .map-layout.map-expanded {
    display: block;
  }
  .map-expanded .map-detail {
    position: static;
    max-height: none;
    margin-top: 2rem;
  }
  .map-visual {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
  .map-visual .map-layer {
    position: relative;
    border-top: 0;
  }
  .map-visual .map-layer h2 {
    font-size: 1rem;
    min-height: 4.5rem;
  }
  .map-visual .node-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .map-visual .node-button {
    position: relative;
    background: #fdfdfb;
    font-size: 0.9rem;
    min-height: 6.5rem;
  }
  .map-visual .edge-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .connection-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
  }
  .directed-edge {
    fill: none;
    stroke: #777;
    stroke-width: 1.2;
    opacity: 0.55;
  }
}

.notification-section {
  overflow-wrap: anywhere;
}
