.opening-dialog,
.note-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  background: #08090a;
  color: #f4f0e7;
  padding: 0;
}

.opening-dialog::backdrop,
.note-dialog::backdrop {
  background: #08090a;
}

.opening-dialog {
  position: relative;
  isolation: isolate;
  overflow: auto;
  background: #0b0d10;
}

.opening-dialog-backdrop,
.opening-dialog-scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.opening-dialog-backdrop {
  z-index: -2;
}

.opening-dialog-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  filter: saturate(0.78) contrast(1.04);
}

.opening-dialog-scrim {
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(5 7 9 / 0.42), rgb(5 7 9 / 0.74)),
    linear-gradient(90deg, rgb(7 9 12 / 0.62), transparent 35% 65%, rgb(7 9 12 / 0.62));
}

.opening-dialog .dialog-inner {
  position: relative;
  width: min(100% - 2rem, 54rem);
  z-index: 1;
}

.opening-dialog .dialog-copy {
  border: 1px solid rgb(244 240 231 / 0.34);
  background: rgb(8 10 12 / 0.68);
  box-shadow: 0 1.4rem 4rem rgb(0 0 0 / 0.34);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  text-shadow: 0 1px 1rem rgb(0 0 0 / 0.62);
  backdrop-filter: blur(5px);
}

.dialog-inner {
  display: grid;
  width: min(100% - 2rem, 48rem);
  min-height: 100%;
  margin-inline: auto;
  align-content: center;
  padding-block: 3rem;
}

.dialog-copy {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.3vw, 1.45rem);
  line-height: 1.55;
  text-align: center;
}

.dialog-copy h2 {
  margin-bottom: 2rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.dialog-punchline {
  margin-top: 2rem;
  font-weight: 700;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.dialog-actions button {
  border-color: #f4f0e7;
  background: #f4f0e7;
  color: #08090a;
}

.dialog-actions .button-quiet {
  background: transparent;
  color: #f4f0e7;
}

.note-dialog .dialog-copy {
  text-align: left;
}

.note-dialog li + li {
  margin-top: 0.75rem;
}

.memory-figure {
  position: relative;
  margin-inline: 0;
}

.memory-figure picture {
  position: relative;
  display: block;
  border-block: var(--edge-width) solid rgb(23 27 32 / var(--edge-alpha));
  background: var(--paper-deep);
  padding-block: 0.42rem;
}

.memory-figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.9) contrast(1.02);
}

.memory-figure picture::before,
.memory-figure picture::after {
  position: absolute;
  z-index: 1;
  width: 1.35rem;
  height: 1.35rem;
  border-color: var(--violet);
  content: "";
  pointer-events: none;
}

.memory-figure picture::before {
  top: -0.42rem;
  left: -0.42rem;
  border-top: var(--edge-width) solid;
  border-left: var(--edge-width) solid;
}

.memory-figure picture::after {
  right: -0.42rem;
  bottom: -0.42rem;
  border-right: var(--edge-width) solid;
  border-bottom: var(--edge-width) solid;
}

.rules-memory {
  margin-bottom: 2rem;
}

.identity-form {
  display: grid;
  max-width: 48rem;
  gap: 1.5rem;
}

.identity-form-stage {
  max-width: 32rem;
  margin-top: 1.65rem;
  gap: 1rem;
}

.identity-field {
  display: grid;
  gap: 0.55rem;
}

.identity-field label {
  font-weight: 800;
}

.identity-field input {
  width: 100%;
  min-height: 3.5rem;
  border: 0;
  border-bottom: calc(var(--edge-width) * 2) solid var(--ink);
  border-radius: 0;
  background: rgb(255 253 248 / 0.5);
  padding: 0.65rem 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.identity-form-stage .identity-field label {
  color: #fffdf8;
}

.identity-form-stage .identity-field input {
  border: 1px solid rgb(255 253 248 / 0.66);
  border-radius: var(--edge-radius);
  background: rgb(7 12 18 / 0.5);
  color: #fffdf8;
  caret-color: #fffdf8;
  box-shadow: inset 0 0 0 1px rgb(7 12 18 / 0.18);
}

.identity-form-stage .identity-field input:focus-visible {
  outline-color: #fffdf8;
}

.identity-privacy,
.identity-edit-note {
  max-width: 62ch;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.identity-privacy {
  color: rgb(255 253 248 / 0.76);
}

.identity-enter {
  display: inline-flex;
  width: min(100%, 20rem);
  align-items: center;
  justify-content: space-between;
  border-color: #fffdf8;
  background: #fffdf8;
  color: #10161d;
  font-size: 1rem;
}

.identity-enter:hover:not(:disabled) {
  background: #e8e0d2;
}

.identity-form-stage .form-error {
  color: #ffe1dc;
}

.identity-edit-dialog {
  width: min(100% - 2rem, 38rem);
  max-width: none;
  border: var(--edge-width) solid rgb(23 27 32 / var(--edge-alpha));
  border-radius: var(--edge-radius);
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 1.5rem 5rem rgb(7 12 18 / 0.34);
}

.identity-edit-dialog::backdrop {
  background: rgb(7 12 18 / 0.72);
  backdrop-filter: blur(5px);
}

.identity-edit-inner {
  padding: clamp(1.25rem, 5vw, 2.5rem);
}

.identity-edit-inner > h2 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.identity-edit-inner > p {
  margin-top: 0.85rem;
  color: var(--ink-soft);
}

.identity-form-edit {
  margin-top: 1.5rem;
}

.identity-edit-note {
  color: var(--ink-soft);
}

.identity-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (forced-colors: active) {
  .identity-form-stage .identity-field label,
  .identity-privacy {
    color: CanvasText;
  }

  .identity-form-stage .identity-field input {
    border-color: ButtonText;
    background: Field;
    color: FieldText;
    caret-color: FieldText;
  }
}

.vote-form {
  max-width: 56rem;
}

.vote-fieldset,
.rating-fieldset {
  margin: 0 0 2rem;
  border: 0;
  padding: 0;
}

.vote-fieldset legend,
.rating-fieldset legend {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 800;
}

.choice-axis,
.confidence-axis,
.rating-axis {
  display: grid;
  gap: 0.55rem;
}

.choice-axis {
  grid-template-columns: repeat(3, 1fr);
}

.confidence-axis {
  grid-template-columns: repeat(5, minmax(2.75rem, 1fr));
  max-width: 32rem;
}

.rating-axis {
  grid-template-columns: repeat(3, 1fr);
}

.choice-option,
.confidence-option,
.rating-option {
  position: relative;
}

.choice-option input,
.confidence-option input,
.rating-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.choice-option span,
.confidence-option span,
.rating-option span {
  display: grid;
  min-height: 3.25rem;
  place-items: center;
  border: var(--edge-width) solid rgb(23 27 32 / var(--edge-alpha));
  border-radius: var(--edge-radius);
  background: rgb(255 253 248 / 0.5);
  padding: 0.65rem;
  text-align: center;
}

.choice-option input:checked + span,
.confidence-option input:checked + span,
.rating-option input:checked + span {
  border-color: var(--violet);
  background: var(--violet-soft);
  box-shadow: inset 0 0 0 2px var(--violet);
  color: #2c173c;
}

.choice-option small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 500;
}

.choice-option input:focus-visible + span,
.confidence-option input:focus-visible + span,
.rating-option input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.axis-notes {
  display: flex;
  max-width: 32rem;
  justify-content: space-between;
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.optional-field {
  display: grid;
  max-width: var(--reading);
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.optional-field label {
  font-weight: 800;
}

.sentence-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border-bottom: 2px solid var(--ink);
}

.sentence-input span {
  font-family: var(--serif);
  font-size: 1.2rem;
}

.sentence-input input {
  min-height: 3rem;
  border: 0;
  background: transparent;
  padding: 0.55rem;
}

.form-error {
  margin-top: 0.75rem;
  color: #8b241b;
  font-weight: 700;
}

.form-status {
  min-height: 1.5rem;
  margin-top: 1rem;
  color: var(--violet);
  font-weight: 700;
}

.sealed-choice {
  display: flex;
  max-width: var(--reading);
  gap: 0.9rem;
  align-items: baseline;
  border-block: calc(var(--edge-width) * 3) double var(--violet);
  padding-block: 1.4rem;
  color: var(--violet);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.sealed-choice p,
.sealed-rating p {
  margin-bottom: 0;
}

.sealed-rating {
  color: var(--violet);
}

.argument {
  position: relative;
  padding-block: 1.5rem;
}

.argument-proposition {
  border-top: calc(var(--edge-width) * 4) solid var(--navy);
}

.argument-opposition {
  border-top: calc(var(--edge-width) * 4) solid var(--coral);
}

.argument h3 {
  margin-block: 0.45rem 1.5rem;
}

.argument dl {
  margin: 0;
}

.argument dl > div {
  border-top: var(--edge-width) solid rgb(23 27 32 / 0.18);
  padding-block: 0.9rem;
}

.argument dt {
  margin-bottom: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.argument dd {
  max-width: 62ch;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.argument .claim dd {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
}

.argument .weakness {
  border-left: 3px solid var(--violet);
  padding-left: 0.8rem;
}

.content-tag {
  display: inline-flex;
  border: 1px solid currentColor;
  border-radius: var(--edge-radius);
  padding: 0.35rem 0.5rem;
}

.content-label {
  width: fit-content;
  max-width: 32rem;
}

.content-label summary {
  min-height: 2.75rem;
  align-items: center;
  list-style-position: inside;
}

.content-label p {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.exhibit-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.3rem;
}

.exhibit-header h3 {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.exhibit-favors {
  border: 1px solid var(--violet);
  border-radius: var(--edge-radius);
  color: var(--violet);
  padding: 0.5rem 0.65rem;
}

.exhibit {
  border-block: var(--edge-width) solid rgb(23 27 32 / var(--edge-alpha));
  background: rgb(255 253 248 / 0.42);
  padding-block: clamp(1.25rem, 4vw, 2.5rem);
}

.exhibit-instruction,
.exhibit-conclusion {
  max-width: var(--reading);
}

.exhibit-conclusion {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
}

.exhibit details {
  margin-top: 1.5rem;
  border-top: 1px solid rgb(23 27 32 / 0.25);
  padding-top: 1rem;
}

.exhibit summary {
  min-height: 2.75rem;
  font-weight: 800;
}

.rating-wrap {
  max-width: 50rem;
  margin-inline: auto;
  border-top: calc(var(--edge-width) * 3) double var(--ink);
  border-bottom: calc(var(--edge-width) * 3) double var(--ink);
  padding-block: 2rem;
}

.rating-wrap .form-status {
  margin-bottom: 0;
}

.editorial-reveal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  border-top: var(--edge-width) solid var(--violet);
  border-bottom: var(--edge-width) solid var(--violet);
  background: rgb(102 76 130 / 0.055);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.editorial-reveal > header {
  grid-column: 1 / -1;
}

.rebuttal {
  border-left: 3px solid var(--line);
  padding-left: 1rem;
}

.rebuttal p,
.editorial-copy p {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.marshal {
  grid-column: 1 / -1;
  margin-top: 1rem;
  border-top: 1px solid rgb(23 27 32 / 0.2);
  padding-top: 1rem;
  font-style: italic;
}

.sources {
  margin-top: 1rem;
}

.sources li + li {
  margin-top: 0.5rem;
}

.status-tag {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--coral);
}

.result-axis {
  position: relative;
  max-width: 52rem;
  margin-block: clamp(3rem, 8vw, 6rem);
  padding-block: 3rem;
}

.result-axis-line {
  position: absolute;
  top: 50%;
  right: 1rem;
  left: 1rem;
  height: 2px;
  background: linear-gradient(90deg, var(--navy), var(--violet), var(--coral));
}

.result-axis-labels {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

.result-marker {
  position: absolute;
  z-index: 2;
  left: var(--position-percent);
  display: grid;
  width: 7rem;
  justify-items: center;
  transform: translateX(-50%);
}

.result-marker::before {
  width: 1.1rem;
  height: 1.1rem;
  border: 3px solid var(--paper);
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
  content: "";
}

.result-marker-before {
  top: 0.25rem;
}

.result-marker-after {
  bottom: 0.25rem;
}

.result-marker-after::before {
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 2px var(--violet);
}

.result-marker.position-step-0 {
  left: 0;
  justify-items: start;
  text-align: left;
  transform: none;
}

.result-marker.position-step-2 {
  right: 0;
  left: auto;
  justify-items: end;
  text-align: right;
  transform: none;
}

.result-transition {
  max-width: 38ch;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.sync-panel {
  max-width: 54rem;
  margin-block: 2.5rem;
  border-block: calc(var(--edge-width) * 3) double var(--violet);
  background: rgb(102 76 130 / 0.055);
  padding-block: 1.4rem;
}

.sync-heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.sync-indicator {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  background: transparent;
  transform: rotate(45deg);
}

.sync-panel[data-status="queued"] .sync-indicator,
.sync-panel[data-status="syncing"] .sync-indicator {
  border-color: var(--violet);
}

.sync-panel[data-status="synced"] .sync-indicator {
  border-color: var(--navy);
  background: var(--navy);
}

.sync-panel[data-status="error"] .sync-indicator,
.sync-panel[data-status="local-error"] .sync-indicator {
  border-color: var(--coral);
  background: var(--coral);
}

.sync-message {
  max-width: var(--reading);
  margin-top: 0.8rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.boundary-map {
  max-width: 54rem;
  margin-top: 2rem;
}

.map-row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.45fr) 1fr minmax(7rem, 0.35fr);
  gap: 1rem;
  align-items: center;
  border-top: 1px solid rgb(23 27 32 / 0.22);
  padding-block: 1rem;
}

.map-track {
  position: relative;
  height: 1.25rem;
  background: linear-gradient(90deg, var(--navy-soft), var(--violet-soft), var(--coral-soft));
}

.map-track::after {
  position: absolute;
  top: 50%;
  left: var(--position-percent);
  width: 1rem;
  height: 1rem;
  border: 3px solid var(--paper);
  border-radius: calc(var(--edge-radius) * 2);
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
  content: "";
  transform: translate(-50%, -50%);
}

@media (max-width: 46rem) {
  .choice-axis,
  .rating-axis {
    grid-template-columns: 1fr;
  }

  .sentence-input {
    grid-template-columns: 1fr;
  }

  .exhibit-header,
  .editorial-reveal {
    grid-template-columns: 1fr;
  }

  .editorial-reveal > header,
  .marshal {
    grid-column: auto;
  }

  .map-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
