/* The Line Test — "editorial ink": a newspaper chart on warm paper. Near-black ink, one signal
   red for you, one ink blue for the other person. Serif numbers, plain sans text. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Keep in sync with src/shared/palette.ts */
  --paper: #f3eee4;
  --paper-deep: #e8e0d2;
  --ink: #1b1815;
  --muted: #5f5850;
  --rule: #c9bfaf;
  --red: #c8231b;
  --red-wash: #f0d3cc;
  --blue: #1d4e9e;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.75rem, 9vw, 4.5rem);
  --step-5: clamp(5rem, 24vw, 9rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  --radius-sm: 2px;
  --radius-md: 6px;
  --rule-heavy: 3px solid var(--ink);
  --rule-light: 1px solid var(--rule);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 120ms;
  --medium: 220ms;

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

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

[tabindex="-1"]:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-2) var(--space-4);
  z-index: 10;
}
.skip:focus {
  top: var(--space-4);
}

/* Masthead and colophon ---------------------------------------------------- */

.masthead,
.colophon,
.page {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding-inline: var(--space-4);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: var(--space-4) var(--space-2);
  border-bottom: var(--rule-heavy);
}
.masthead__name {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: var(--step--1);
}
.masthead__issue {
  color: var(--muted);
  font-size: var(--step--1);
}

.page {
  flex: 1;
}

.colophon {
  border-top: var(--rule-light);
  padding-block: var(--space-6);
  color: var(--muted);
  font-size: var(--step--1);
}
.colophon p {
  margin: 0 0 var(--space-1);
}

/* Type ----------------------------------------------------------------------- */

.screen {
  padding-block: var(--space-8) var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.kicker {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display--number {
  font-size: var(--step-5);
  line-height: 0.9;
  color: var(--red);
}

.lede {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.2;
  text-wrap: pretty;
}

.fineprint {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.15;
}

.loading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  color: var(--muted);
}

/* Panels: ruled sections, like columns in a paper ------------------------------ */

.panel {
  border-top: var(--rule-heavy);
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.panel p {
  margin: 0;
}
.panel--challenge {
  border-top-color: var(--red);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Buttons ---------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font: 600 var(--step-0) / 1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
  touch-action: manipulation;
}
.button:active:not(:disabled) {
  transform: translateY(1px);
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.button--primary {
  background: var(--ink);
  color: var(--paper);
}
.button--primary:hover:not(:disabled) {
  background: #000;
}
.button--secondary {
  background: transparent;
  color: var(--ink);
}
.button--secondary:hover:not(:disabled) {
  background: var(--paper-deep);
}
.button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.button--big {
  min-height: 56px;
  font-size: var(--step-1);
  align-self: flex-start;
}

/* Forms ------------------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}
.field label {
  font-weight: 600;
}
.field input,
.field textarea {
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: #fffdf8;
  color: var(--ink);
  font: var(--step-1) var(--font-text);
}
.field textarea {
  resize: vertical;
  line-height: 1.35;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red);
}
.field__help {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.field__error {
  margin: 0;
  color: var(--red);
  font-weight: 600;
  font-size: var(--step--1);
  min-height: 1.3em;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-4);
}
/* Beside the field on wide screens, the button lines up with the input; stacked, it sits under it. */
@media (min-width: 30rem) {
  .field-row .button {
    margin-top: 1.6rem;
  }
}
.check {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--step--1);
}
.check input {
  width: 24px;
  height: 24px;
  margin: 0;
  flex: none;
  accent-color: var(--ink);
}

/* Question ------------------------------------------------------------------------ */

.progress {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
}
.question__setup {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 6.5vw, 2.5rem);
  line-height: 1.08;
  text-wrap: balance;
}

/* The strip: where you draw your line ------------------------------------------------ */

.strip {
  --track-height: 7rem;
  padding: 3rem 0 0;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: 6px;
}
.strip__track {
  position: relative;
  height: var(--track-height);
  border-bottom: var(--rule-heavy);
}
.strip__ticks .tick {
  position: absolute;
  bottom: -0.6rem;
  width: 1px;
  height: 0.6rem;
  background: var(--ink);
  transform: translateX(-50%);
}
.strip__ticks .tick--major {
  width: 2px;
  height: 1rem;
  bottom: -1rem;
}
.strip__scale {
  position: relative;
  height: 2.5rem;
  margin-top: 1.1rem;
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.strip__scale span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.strip__scale span:first-child {
  transform: none;
}
.strip__scale span:last-child {
  transform: translateX(-100%);
}
.strip__late {
  position: absolute;
  inset: 0 0 0 auto;
  right: 0;
  background: repeating-linear-gradient(-45deg, var(--red-wash) 0 6px, transparent 6px 12px);
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: var(--space-2);
}
.strip__late span {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--red);
  font-style: italic;
}
.strip__marker {
  position: absolute;
  top: -1rem;
  bottom: -1rem;
  width: 4px;
  margin-left: -2px;
  background: var(--red);
  display: none;
  transition: left var(--fast) var(--ease);
}
.strip.is-dragging .strip__marker {
  transition: none;
}
.strip__time {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.strip__hint {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-2);
  color: var(--muted);
  pointer-events: none;
}
.strip.is-placed .strip__late {
  display: flex;
}
.strip.is-placed .strip__marker {
  display: block;
}
.strip.is-placed .strip__hint {
  display: none;
}

.strip__time[data-align="start"] {
  left: 0;
  transform: none;
}
.strip__time[data-align="end"] {
  left: auto;
  right: 0;
  transform: none;
}

.question__bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
}
.question__stop {
  display: flex;
  justify-content: center;
  border-top: var(--rule-light);
  padding-top: var(--space-4);
}
.question__stop .button {
  min-width: 12rem;
}

/* The split: a line through an ordered list ----------------------------------------- */

.split {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  user-select: none;
  -webkit-user-select: none;
  outline-offset: 6px;
}
.split__hint {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--muted);
}
.split.is-placed .split__hint {
  visibility: hidden;
}
.split__wrap {
  position: relative;
}
.split__top {
  height: 2.25rem;
  display: flex;
  align-items: center;
  font-size: var(--step--1);
  color: var(--muted);
  cursor: pointer;
}
.split__items {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--rule-light);
  touch-action: manipulation;
}
.split__item {
  height: 2.75rem;
  display: flex;
  align-items: center;
  padding-inline: var(--space-3);
  border-bottom: var(--rule-light);
  cursor: pointer;
  font-size: var(--step-1);
  line-height: 1.1;
  transition:
    background var(--fast) var(--ease),
    color var(--fast) var(--ease);
}
.split__item:hover {
  background: var(--paper-deep);
}
.split__item.is-a {
  font-weight: 600;
}
.split__item.is-b {
  color: var(--red);
  background: repeating-linear-gradient(-45deg, var(--red-wash) 0 6px, transparent 6px 12px);
}
/* The line sits on the boundary between two rows. */
.split__line {
  position: absolute;
  left: -0.5rem;
  right: -0.5rem;
  height: 4px;
  margin-top: -2px;
  background: var(--red);
  display: none;
  pointer-events: none;
  transition: top var(--fast) var(--ease);
}
.split.is-placed .split__line {
  display: block;
}
.split__tag {
  position: absolute;
  right: 0.5rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  padding-inline: var(--space-1);
  white-space: nowrap;
}
.split__tag--a {
  bottom: 100%;
  margin-bottom: 2px;
  color: var(--ink);
}
.split__tag--b {
  top: 100%;
  margin-top: 2px;
  color: var(--red);
}
.split__line[data-edge="top"] .split__tag--a,
.split__line[data-edge="bottom"] .split__tag--b {
  display: none;
}

/* Charts ---------------------------------------------------------------------------- */

.chart {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.chart figcaption {
  font-size: var(--step--1);
  color: var(--muted);
}
.chart svg {
  width: 100%;
  height: auto;
}
.chart .col {
  fill: var(--ink);
  opacity: 0.8;
}
.chart .col--mine {
  fill: var(--red);
  opacity: 1;
}
.chart .axis {
  fill: var(--muted);
  font: 9px var(--font-text);
}

.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bars__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 2.75rem;
  align-items: center;
  gap: var(--space-3);
  font-variant-numeric: tabular-nums;
}
.bars__track {
  height: 1.25rem;
}
.bars__fill {
  display: block;
  height: 100%;
  background: var(--ink);
  opacity: 0.8;
}
.bars__value {
  text-align: right;
}
.bars__row.is-mine {
  color: var(--red);
  font-weight: 600;
}
.bars__row.is-mine .bars__fill {
  background: var(--red);
  opacity: 1;
}
.bars__you {
  grid-column: 2;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: calc(var(--space-2) * -1);
}

.chart__scale {
  position: relative;
  height: 1.25rem;
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart__scale span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.chart__scale span:first-child {
  left: 0 !important;
  transform: none;
}
.chart__scale span:last-child {
  left: auto !important;
  right: 0;
  transform: none;
}

/* Results ------------------------------------------------------------------------------ */

.take {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.take__q {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 600;
  text-wrap: balance;
}
.take__you {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1;
  color: var(--red);
  overflow-wrap: anywhere;
}
.take__typical {
  margin: 0;
  color: var(--muted);
}

.progress-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  border-top: var(--rule-light);
  padding-top: var(--space-4);
}
.progress-note .button {
  padding-inline: 0;
}

.suggest__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}
.suggest__options legend {
  padding: 0;
  margin-bottom: var(--space-1);
  font-weight: 600;
}
.suggest__add {
  align-self: flex-start;
  padding-inline: 0;
}
.comments {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.comments__toggle {
  align-self: flex-start;
  padding-inline: 0;
}
.comments__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.comments__body[hidden],
.comment__content[hidden],
.comments__sort[hidden] {
  display: none;
}
.comments__sort {
  display: flex;
  gap: var(--space-2);
}
.comments__sort-option {
  min-height: 36px;
  padding: 0 var(--space-3);
  border: var(--rule-light);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 var(--step--1) var(--font-text);
  cursor: pointer;
}
.comments__sort-option[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.comments__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Thread line: each level of replies hangs off a thin rule, like a forum. */
.comments__replies:not(:empty) {
  margin-top: var(--space-2);
  padding-left: var(--space-3);
  border-left: 2px solid var(--rule);
}
.comments__replies--flat:not(:empty) {
  padding-left: 0;
  border-left: 0;
}
.comment {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.comment__collapse {
  width: 28px;
  height: 28px;
  border: var(--rule-light);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 var(--step--1) / 1 var(--font-text);
  cursor: pointer;
}
.comment__collapse:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.comment__name {
  font-weight: 600;
  color: var(--ink);
}
.comment__you {
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
}
.comment__answer::before,
.comment__time::before {
  content: "·";
  margin-right: var(--space-2);
}
.comment__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-left: calc(28px + var(--space-2));
}
.comment__body {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.comment__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.comment__votes {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.comment__score {
  min-width: 2ch;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.comment__score[data-sign="up"] {
  color: var(--red);
}
.vote,
.comment__action {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: 600 var(--step--1) var(--font-text);
  cursor: pointer;
}
.comment__action {
  padding: 0 var(--space-2);
}
.vote:hover,
.comment__action:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}
.vote--up[aria-pressed="true"] {
  color: var(--red);
}
.vote--down[aria-pressed="true"] {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.comment-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.groups-line {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.answer__count {
  color: var(--muted);
}
.everyone {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-block: var(--space-8) var(--space-12);
  border-top: var(--rule-heavy);
  scroll-margin-top: var(--space-4);
}
.everyone + .panel {
  margin-bottom: var(--space-12);
}
.everyone .answer .kicker {
  margin-bottom: calc(-1 * var(--space-2));
}

.actions--single {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  border-top: var(--rule-heavy);
  padding-top: var(--space-4);
}
.answer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-6);
  border-bottom: var(--rule-light);
}
.answer__q {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.15;
  text-wrap: balance;
}
.answer__mine {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-6);
  font-variant-numeric: tabular-nums;
}
.answer__you {
  color: var(--red);
  font-weight: 600;
}
.answer__typical {
  color: var(--muted);
}
.answer__standing {
  margin: 0;
}

/* Head to head ------------------------------------------------------------------------ */

.duel__headline {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-weight: 400;
}
.duel__headline .display--number {
  color: var(--ink);
}
.duel__insync {
  font-family: var(--font-display);
  font-size: var(--step-3);
}
.duel__names {
  margin: 0;
  font-size: var(--step-1);
}
.tone--you {
  color: var(--red);
}
.tone--them {
  color: var(--blue);
}
.duel__names .tone--you,
.duel__names .tone--them {
  font-weight: 600;
}

.duel-strip {
  margin: 0;
  padding-block: 2.5rem 2.5rem;
}
.duel-strip__track {
  position: relative;
  height: 4rem;
  border-bottom: var(--rule-heavy);
}
.duel-strip__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
}
.duel-strip__marker--you {
  background: var(--red);
  color: var(--red);
}
.duel-strip__marker--them {
  background: var(--blue);
  color: var(--blue);
}
.duel-strip__tag {
  position: absolute;
  white-space: nowrap;
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.duel-strip__marker--top .duel-strip__tag {
  bottom: 100%;
  margin-bottom: var(--space-1);
}
.duel-strip__marker--bottom .duel-strip__tag {
  top: 100%;
  margin-top: var(--space-2);
}
/* Labels centre on their line, and hug the inside near either end of the strip. */
.duel-strip__marker--center .duel-strip__tag {
  left: 50%;
  transform: translateX(-50%);
}
.duel-strip__marker--start .duel-strip__tag {
  left: 0;
}
.duel-strip__marker--end .duel-strip__tag {
  right: 0;
}

.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.compare-list__item {
  padding-block: var(--space-3);
  border-bottom: var(--rule-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.compare-list__q {
  margin: 0;
}
.compare-list__answers {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  font-variant-numeric: tabular-nums;
}
.compare-list__agree {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Share ---------------------------------------------------------------------------------- */

.share {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.share > .button--primary {
  min-height: 56px;
  font-size: var(--step-1);
}
.share__more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.share__more .button {
  flex: 1 1 8rem;
  padding-inline: var(--space-3);
}
.share__url {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.share__status {
  margin: 0;
  min-height: 1.5em;
  font-weight: 600;
}

.image-dialog {
  border: var(--rule-heavy);
  background: var(--paper);
  color: var(--ink);
  padding: var(--space-4);
  max-width: min(24rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.image-dialog::backdrop {
  background: rgb(27 24 21 / 0.6);
}
.image-dialog__img {
  width: 100%;
  height: auto;
  border: var(--rule-light);
}

.inbox__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-heavy);
}
.inbox__list a {
  display: block;
  padding: var(--space-3) 0;
  border-bottom: var(--rule-light);
  font-size: var(--step-1);
  text-decoration: none;
}

/* Static pages ----------------------------------------------------------------------------- */

.prose {
  padding-block: var(--space-8) var(--space-12);
  max-width: 36rem;
}
.prose h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.05;
  margin: 0 0 var(--space-6);
}
.prose h2 {
  margin: var(--space-8) 0 var(--space-2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}

/* Comments and Share sit side by side under each chart; their panels open below, full width. */
.answer__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
}
.answer__tools > .comments,
.answer__tools > .question-share {
  display: contents;
}
.answer__tools .comments__toggle {
  order: 0;
}
.question-share__toggle {
  order: 1;
  padding-inline: 0;
}
.answer__tools .comments__body {
  order: 2;
  flex: 1 1 100%;
}
.question-share__panel {
  order: 3;
  flex: 1 1 100%;
}
.question-share__panel[hidden] {
  display: none;
}

/* Answering straight from the list. */
.answer-here {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.answer-here > .button {
  align-self: flex-start;
}
.answer-here .actions {
  justify-content: flex-start;
}
