@font-face {
  font-family: "Geist";
  src: url("fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --raised: #ffffff;
  --wash: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-faint: #c7c7cc;
  --hair: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-wash: rgba(0, 113, 227, 0.14);
  --on-ink: #ffffff;
  --draft: #a35200;
  --draft-wash: #fdf3e6;
  --warn: #c5221f;
  --warn-wash: #fdf0ef;
  --mark-1: #0071e3;
  --mark-2: #7ab8f5;
  --mark-none: #e3e3e8;
  --lift: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02), 0 12px 40px rgba(0, 0, 0, 0.07);
  --lift-focus: 0 0 0 1px rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.03), 0 16px 48px rgba(0, 0, 0, 0.1);
  --thumb: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
  --header: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101012;
  --raised: #1c1c1f;
  --wash: #1c1c1f;
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-faint: #48484c;
  --hair: rgba(255, 255, 255, 0.1);
  --accent: #4aa3ff;
  --accent-wash: rgba(74, 163, 255, 0.22);
  --on-ink: #101012;
  --draft: #f0b35c;
  --draft-wash: #2d2416;
  --warn: #ff8a80;
  --warn-wash: #2f1b1a;
  --mark-1: #3a93ef;
  --mark-2: #2663b0;
  --mark-none: #2e2e32;
  --lift: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 12px 40px rgba(0, 0, 0, 0.5);
  --lift-focus: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 16px 48px rgba(0, 0, 0, 0.6);
  --thumb: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Geist",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-wash);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

summary {
  cursor: pointer;
}

.quiet {
  color: var(--ink-2);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header);
  padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  /* Holding a finger on it opens the mark, so the link preview and the selection that would replace it are off. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.brand:hover {
  text-decoration: none;
}

.views {
  position: relative;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--wash);
}

.views a {
  position: relative;
  z-index: 1;
  padding: 5px 16px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 20px;
  transition: color 200ms ease;
}

.views a:hover {
  color: var(--ink);
  text-decoration: none;
}

.views a[aria-current="page"] {
  color: var(--ink);
}

.views-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 999px;
  background: var(--raised);
  box-shadow: var(--thumb);
  transition:
    transform 320ms var(--ease),
    width 320ms var(--ease);
}

.top-end {
  display: flex;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  gap: 12px;
  min-width: 0;
}

.scope {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.theme {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -3px -6px -3px 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  transition: color 200ms ease;
}

.theme:hover {
  color: var(--ink);
}

.theme::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.theme[data-mode="light"]::before {
  background: none;
}

.theme[data-mode="dark"]::before {
  background: linear-gradient(currentColor, currentColor);
}

.notice {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--warn-wash);
  color: var(--warn);
  font-size: 0.9375rem;
}

.page-note {
  max-width: 720px;
  margin: 96px auto;
  padding: 0 24px;
  text-align: center;
}

.draft {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--draft-wash);
  color: var(--draft);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.01em;
  vertical-align: 2px;
}

.draft-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--draft);
}

.ticket {
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ticket.unverified {
  color: var(--warn);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.not-from-source {
  margin-left: 6px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Ask */

.ask {
  width: min(720px, 100% - 48px);
  margin: 0 auto;
}

.ask-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100dvh - var(--header) - 64px);
}

.intro {
  text-align: center;
  margin-bottom: 40px;
}

.intro h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.intro p {
  max-width: 48ch;
  margin: 16px auto 0;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.starters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.starter {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.starter:hover {
  background: var(--wash);
  color: var(--ink);
}

.thread {
  padding-top: 56px;
}

.shared-note {
  margin-bottom: 40px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.turn {
  margin-bottom: 72px;
  scroll-margin-top: calc(var(--header) + 32px);
}

.turn:last-child {
  min-height: calc(100dvh - var(--header) - 168px);
  margin-bottom: 24px;
}

.asked {
  margin-bottom: 24px;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.answer {
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.answer p {
  margin: 0 0 16px;
}

.answer ul,
.answer ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.answer li {
  margin-bottom: 8px;
  padding-left: 2px;
}

.answer li::marker {
  color: var(--ink-2);
}

.answer h3,
.answer h4,
.answer h5 {
  margin: 32px 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.answer strong {
  font-weight: 600;
}

.cite-unit {
  position: relative;
}

.cite-mark {
  position: absolute;
  top: 4px;
  left: calc(100% + 16px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition:
    opacity 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

button.cite-mark::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.cite-unit:hover > .cite-mark,
.cite-mark:focus-visible,
.cite-mark[aria-expanded="true"] {
  opacity: 1;
}

button.cite-mark:hover,
.cite-mark[aria-expanded="true"] {
  background: var(--accent-wash);
  color: var(--accent);
}

.cite-mark:focus-visible {
  outline-offset: 2px;
  border-radius: 999px;
}

.cite-mark.none {
  padding: 0;
  background: none;
  font-weight: 400;
}

.answer h3 > .cite-mark,
.answer h4 > .cite-mark,
.answer h5 > .cite-mark {
  top: -2px;
}

.cite-table > .cite-mark {
  top: 0;
}

.cite-pop {
  position: fixed;
  z-index: 20;
  width: min(380px, calc(100vw - 32px));
  max-height: min(60vh, 440px);
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--lift);
  font-size: 0.8125rem;
  line-height: 1.45;
  overscroll-behavior: contain;
}

.cite-pop h3 {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
}

.cite-sources {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cite-sources > li + li {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
}

.cite-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.cite-head a {
  font-weight: 500;
}

.cite-title {
  flex-basis: 100%;
  color: var(--ink);
}

.cite-pop .source-meta {
  margin: 2px 0 0;
  white-space: normal;
}

.cite-quote {
  display: -webkit-box;
  margin: 8px 0 0;
  padding-left: 10px;
  overflow: hidden;
  border-left: 2px solid var(--hair);
  color: var(--ink-2);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

@media (max-width: 1199px) {
  .cite-mark {
    left: auto;
    right: -20px;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
  }

  .cite-word {
    display: none;
  }

  .cite-mark.none::before {
    content: "";
    width: 6px;
    height: 6px;
    border: 1px solid var(--ink-faint);
    border-radius: 50%;
  }
}

@media (hover: none) {
  button.cite-mark {
    opacity: 0.8;
  }

  .cite-mark.none {
    display: none;
  }
}

.thinking {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 1.4s ease-in-out infinite;
}

.thinking-text {
  background: linear-gradient(90deg, var(--ink-2) 35%, var(--ink) 50%, var(--ink-2) 65%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 2.4s linear infinite;
}

@keyframes breathe {
  50% {
    transform: scale(0.65);
    opacity: 0.5;
  }
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

:not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--wash);
}

pre {
  overflow-x: auto;
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--wash);
  font-size: 0.75rem;
  line-height: 1.55;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

th {
  padding: 0 20px 10px 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px 20px 12px 0;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.nowrap {
  white-space: nowrap;
}

.composer-host {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 32px 0 24px;
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}

.ask-empty .composer-host {
  position: static;
  padding: 0;
  background: none;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 10px 10px 20px;
  border-radius: 26px;
  background: var(--raised);
  box-shadow: var(--lift);
  transition: box-shadow 200ms ease;
}

.composer:focus-within {
  box-shadow: var(--lift-focus);
}

.composer textarea {
  flex: 1;
  min-width: 0;
  max-height: 180px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  line-height: 1.5;
  resize: none;
}

.composer textarea::placeholder {
  color: var(--ink-2);
}

.composer textarea:focus-visible {
  outline: none;
}

.composer .plain {
  flex: none;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 0.8125rem;
  white-space: nowrap;
  transition: color 160ms ease;
}

.composer .plain:hover {
  color: var(--ink);
}

.send {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  transition:
    transform 160ms var(--ease),
    opacity 160ms ease;
}

.send:hover {
  transform: scale(1.06);
}

.send:active {
  transform: scale(0.96);
}

.send.idle {
  opacity: 0.2;
}

.send svg {
  display: block;
}

.evidence {
  margin-top: 32px;
  font-size: 0.875rem;
}

.evidence h3 {
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
}

.sources {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sources li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 7px 0;
  line-height: 1.45;
}

.source-meta {
  color: var(--ink-2);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.source-kind {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.disclose {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.disclose[open] {
  margin-bottom: 20px;
}

.disclose > summary,
.as-table > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  list-style: none;
  transition: color 160ms ease;
}

.disclose > summary:hover,
.as-table > summary:hover {
  color: var(--ink);
}

.disclose > summary::-webkit-details-marker,
.as-table > summary::-webkit-details-marker,
.steps summary::-webkit-details-marker {
  display: none;
}

.disclose > summary::before,
.as-table > summary::before {
  content: "";
  width: 5px;
  height: 5px;
  margin: 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 200ms var(--ease);
}

.disclose[open] > summary::before,
.as-table[open] > summary::before {
  transform: rotate(45deg);
}

.disclose .sources {
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.875rem;
}

.steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.steps li {
  padding: 3px 0;
}

.steps summary {
  list-style: none;
}

.steps .failed summary {
  color: var(--warn);
}

.cost {
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

/* What's inside */

.inside {
  width: min(1120px, 100% - 64px);
  margin: 0 auto;
  padding-bottom: 96px;
}

.hero {
  padding: 72px 0 32px;
}

.hero h1 {
  max-width: 21ch;
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.hero p {
  max-width: 60ch;
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.chain-section {
  padding: 56px 0 40px;
}

.section-title {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.lede {
  max-width: 60ch;
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.chain {
  display: grid;
  grid-template-columns: repeat(5, auto minmax(96px, 1fr)) auto;
  grid-template-rows: auto auto auto;
  row-gap: 4px;
  list-style: none;
  margin: 48px 0 32px;
  padding: 0;
}

.node {
  grid-column: var(--col);
  grid-row: 1 / span 3;
  display: grid;
  grid-template-rows: subgrid;
}

.node-link {
  grid-row: 1 / span 3;
  display: grid;
  grid-template-rows: subgrid;
  color: inherit;
}

a.node-link:hover {
  text-decoration: none;
}

a.node-link:hover .node-count {
  color: var(--accent);
}

.node-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.node-count {
  font-size: 3.25rem;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}

.node-count.zero {
  color: var(--ink-faint);
}

.node-state {
  color: var(--ink-2);
  font-size: 0.75rem;
  white-space: nowrap;
}

.node-state.is-draft {
  color: var(--draft);
}

.hop {
  grid-column: var(--col);
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
}

.hop-name,
.hop-detail {
  white-space: nowrap;
}

.line {
  display: block;
  height: 0;
  border-top: var(--lw, 0) var(--ls, solid) var(--lc, transparent);
}

.line.declared {
  --lw: 2px;
  --ls: solid;
  --lc: var(--ink);
}

.line.derived {
  --lw: 1px;
  --ls: solid;
  --lc: var(--ink);
}

.line.curated {
  --lw: 4px;
  --ls: double;
  --lc: var(--ink);
}

.line.inferred {
  --lw: 2px;
  --ls: dashed;
  --lc: var(--ink);
}

.line.placeholder {
  --lw: 2px;
  --ls: dotted;
  --lc: var(--draft);
}

.chain.arrive .node {
  animation: settle 560ms var(--ease) both;
  animation-delay: calc(var(--i) * 110ms);
}

.chain.arrive .line {
  transform-origin: left;
  animation: draw 620ms var(--ease) both;
  animation-delay: calc(var(--i) * 110ms + 60ms);
}

.chain.arrive .hop-name,
.chain.arrive .hop-detail {
  animation: settle 560ms var(--ease) both;
  animation-delay: calc(var(--i) * 110ms + 160ms);
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes draw {
  from {
    transform: scaleX(0);
  }
}

.link-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 0.75rem;
}

.link-key li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-key .line {
  width: 22px;
}

.row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 80px;
  padding: 64px 0;
}

.row-head {
  position: sticky;
  top: calc(var(--header) + 24px);
  align-self: start;
}

.row-head .lede {
  font-size: 0.875rem;
}

.chart-columns {
  width: 100%;
  overflow: hidden;
}

.chart-columns svg {
  display: block;
}

.grid {
  stroke: var(--hair);
  stroke-width: 1;
}

.axis {
  fill: var(--ink-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.value {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

path.mark-1 {
  fill: var(--mark-1);
}

.hit {
  fill: transparent;
  transition: fill 120ms ease;
}

.hit:hover {
  fill: var(--hair);
}

.mark-1 {
  background: var(--mark-1);
}

.mark-2 {
  background: var(--mark-2);
}

.mark-none {
  background: var(--mark-none);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
}

.segments {
  display: flex;
  gap: 2px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
}

.segment {
  flex-basis: 0;
  min-width: 2px;
}

.segment-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.segment-share {
  display: block;
  font-size: 2.25rem;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.segment-label {
  display: block;
  margin-top: 8px;
  font-size: 0.8125rem;
}

.segment-count {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.bars {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) 56px;
  gap: 16px;
  align-items: center;
  padding: 7px 0;
}

.bar-label {
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: left;
}

button.bar-label {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  transition: color 160ms ease;
}

button.bar-label:hover {
  color: var(--accent);
}

.bar-track {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
}

.bar-seg {
  display: block;
  height: 6px;
  min-width: 2px;
}

.bar-seg:first-child {
  border-radius: 999px 0 0 999px;
}

.bar-seg:last-child {
  border-radius: 0 999px 999px 0;
}

.bar-seg:only-child {
  border-radius: 999px;
}

.bar-value {
  color: var(--ink-2);
  font-size: 0.8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.as-table {
  margin-top: 24px;
}

.as-table table {
  margin-top: 16px;
}

.limits-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.limits-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.limits-list li:first-child {
  padding-top: 0;
}

.limits-list li:last-child {
  border-bottom: 0;
}

/* Conversations */

.history {
  width: min(720px, 100% - 48px);
  margin: 16px auto 0;
}

.history > summary {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  list-style: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.history > summary::-webkit-details-marker {
  display: none;
}

.history > summary:hover,
.history[open] > summary {
  background: var(--wash);
  color: var(--ink);
}

.history[open] > summary {
  margin-bottom: 12px;
}

.history-new {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  transition: background-color 120ms ease;
}

.history-new:hover {
  background: var(--wash);
}

.history-new svg {
  color: var(--ink-2);
}

.history section {
  margin-top: 20px;
}

.history h2 {
  margin: 0 0 4px;
  padding: 0 12px;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-list li {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 10px;
  transition: background-color 120ms ease;
}

.history-list li:hover,
.history-list li.current {
  background: var(--wash);
}

.history-list a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 4px 7px 12px;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.35;
}

.history-list a:hover {
  text-decoration: none;
}

.history-list li.current a {
  font-weight: 500;
}

.history-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-live {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.history-delete {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  opacity: 0;
  transition:
    opacity 120ms ease,
    color 120ms ease;
}

.history-list li:hover .history-delete,
.history-delete:focus-visible {
  opacity: 1;
}

.history-delete:hover {
  color: var(--ink);
}

.history-note {
  margin: 24px 12px 0;
  color: var(--ink-2);
  font-size: 0.75rem;
}

@media (min-width: 1280px) {
  .history {
    position: fixed;
    top: calc(var(--header) + 16px);
    bottom: 16px;
    left: 24px;
    width: 248px;
    margin: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .history:hover {
    scrollbar-color: var(--hair) transparent;
  }

  .history > summary {
    display: none;
  }

  .history:not([hidden]) ~ .ask .composer .plain {
    display: none;
  }
}

@media (hover: none) {
  .history-delete {
    opacity: 1;
  }
}

/* Directory */

.directory {
  width: min(1200px, 100% - 64px);
  margin: 0 auto;
  padding-top: 32px;
}

.type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 40px -12px;
  font-size: 0.875rem;
}

.type-tabs a {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.type-tabs a:hover {
  color: var(--ink);
  text-decoration: none;
}

.type-tabs a.current {
  background: var(--wash);
  color: var(--ink);
  font-weight: 500;
}

.directory-body {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 72px;
}

.directory-side {
  position: sticky;
  top: calc(var(--header) + 16px);
  align-self: start;
  display: flex;
  flex-direction: column;
  /* Sized for its unscrolled position, 104px of padding and tabs lower than where it sticks, so it never runs past the window. */
  max-height: max(280px, calc(100dvh - var(--header) - 104px - 32px));
}

.directory-side input {
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--wash);
  font-size: 0.875rem;
  -webkit-appearance: none;
  appearance: none;
}

.directory-side input::placeholder {
  color: var(--ink-2);
}

.list-note {
  margin: 12px 14px 4px;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.45;
}

.directory-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 32px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
}

.directory-list:hover {
  scrollbar-color: var(--hair) transparent;
}

.directory-list > .quiet {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.directory-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: background-color 120ms ease;
}

.directory-list .list-name {
  display: grid;
}

.directory-list .active-span {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.directory-list a:hover {
  background: var(--wash);
  text-decoration: none;
}

.directory-list a.current {
  background: var(--wash);
  font-weight: 500;
}

.detail {
  min-width: 0;
  padding-bottom: 96px;
}

.detail-empty {
  margin: 0;
  padding-top: 8px;
  color: var(--ink-2);
}

.detail-type {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.detail-head {
  margin-bottom: 64px;
}

.detail-head h1 {
  display: inline;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.detail-head .draft {
  vertical-align: 8px;
}

.aliases {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.button-link {
  display: inline-block;
  margin-top: 20px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: transform 160ms var(--ease);
}

.button-link:hover {
  transform: scale(1.03);
  text-decoration: none;
}

.detail section {
  margin-bottom: 72px;
}

.detail h2 {
  margin-bottom: 24px;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

.spine {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.stop,
.stop-link {
  display: grid;
  grid-template-columns: 96px 12px minmax(0, 1fr);
  column-gap: 16px;
}

.stop-type {
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 24px;
}

.stop-dot {
  justify-self: center;
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.stop.empty .stop-dot {
  border: 1.5px solid var(--ink-faint);
  background: none;
}

.stop.here .stop-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.stop-body {
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 24px;
}

.stop.empty .stop-body {
  color: var(--ink-2);
}

.stop-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stop-nodes .self {
  font-weight: 500;
}

.lead {
  display: inline-block;
  margin-left: 12px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 400;
}

.stop-link {
  min-height: 44px;
}

.stop-link .line {
  grid-column: 2;
  justify-self: center;
  width: 0;
  height: auto;
  margin: 2px 0;
  border-top: 0;
  border-left: var(--lw, 0) var(--ls, solid) var(--lc, transparent);
}

.stop-note {
  grid-column: 3;
  align-self: center;
  padding: 8px 0;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.4;
}

.gaps {
  list-style: none;
  max-width: 72ch;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
}

.gaps li {
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
}

.gaps li:first-child {
  padding-top: 0;
}

.gaps li:last-child {
  border-bottom: 0;
}

.activity {
  list-style: none;
  max-width: 72ch;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
}

.activity li {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
}

.activity li:last-child {
  border-bottom: 0;
}

.activity .quiet {
  font-size: 0.8125rem;
}

.detail section h3 {
  margin: 28px 0 12px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.tickets .muted {
  color: var(--ink-2);
}

.section-note {
  max-width: 60ch;
  margin: -12px 0 20px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.tooltip {
  position: fixed;
  z-index: 10;
  max-width: 280px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* Sign-in and access */

.views[hidden] {
  display: none;
}

.account {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  max-width: 160px;
  padding-left: 12px;
  border-left: 1px solid var(--hair);
  line-height: 1.35;
}

.who {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sign-out {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 0.75rem;
  transition: color 200ms ease;
}

.sign-out:hover {
  color: var(--ink);
}

.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(480px, 100% - 48px);
  min-height: calc(100dvh - var(--header) - 64px);
  margin: 0 auto;
  text-align: center;
}

.gate .tesseract {
  width: min(240px, 46vw);
  /* Room for the frame it opens into, so its corners stay clear of the words below. */
  margin-bottom: clamp(56px, 12vh, 104px);
  /* A finger that drifts while holding it open would start a scroll, and the browser would take the touch away. */
  touch-action: pinch-zoom;
}

.gate h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.gate p {
  margin: 16px 0 32px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.gate .notice {
  margin: -8px 0 24px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.button {
  display: inline-block;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  transition: transform 160ms var(--ease);
}

.button:hover {
  transform: scale(1.03);
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: var(--on-ink);
}

.button.small {
  padding: 4px 12px;
}

.access {
  width: min(880px, 100% - 48px);
  margin: 0 auto;
  padding: 56px 0 96px;
}

.access h1,
.corrections-view h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  letter-spacing: -0.03em;
}

.access-lede {
  max-width: 60ch;
  margin: 12px 0 48px;
  color: var(--ink-2);
}

.access .notice {
  margin: 0 0 32px;
}

.access section {
  margin-bottom: 56px;
}

.access h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.0625rem;
}

.access h2 .count {
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.access-table td {
  vertical-align: middle;
}

.access-table th:first-child {
  width: 100%;
}

.access-table .end {
  text-align: right;
  white-space: nowrap;
}

.person-name {
  font-weight: 500;
}

.you {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 18px;
  vertical-align: 1px;
}

.email {
  display: block;
  color: var(--ink-2);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.actions {
  display: inline-flex;
  gap: 6px;
}

.approved-controls {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.steward-label {
  font-size: 0.75rem;
}

.steward-areas {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 360px;
}

.steward-areas button {
  padding: 2px 10px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 18px;
}

.steward-areas button:hover {
  color: var(--ink);
}

.steward-areas button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent-wash);
  color: var(--accent);
}

.role-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--wash);
}

.role-switch button {
  padding: 3px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 20px;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

.role-switch button:hover:not(:disabled) {
  color: var(--ink);
}

.role-switch button[aria-pressed="true"] {
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--thumb);
}

.role-switch button:disabled {
  cursor: default;
}

.role-switch button:disabled:not([aria-pressed="true"]) {
  color: var(--ink-faint);
}

@media (max-width: 600px) {
  .access-table thead {
    display: none;
  }

  .access-table tbody {
    display: block;
  }

  .access-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--hair);
  }

  .access-table tbody tr:last-child {
    border-bottom: 0;
  }

  .access-table td {
    padding: 0;
    border: 0;
  }

  .access-table td:first-child,
  .access-table td:has(.approved-controls) {
    grid-column: 1 / -1;
  }

  .approved-controls,
  .steward-areas {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .node-count {
    font-size: 2.5rem;
  }

  .hop {
    padding: 0 10px;
  }

  .chain {
    grid-template-columns: repeat(5, auto minmax(84px, 1fr)) auto;
  }
}

@media (max-width: 900px) {
  .top {
    grid-template-columns: auto minmax(0, 1fr);
    height: auto;
    gap: 4px 12px;
    padding: 12px 16px;
  }

  .brand {
    white-space: nowrap;
  }

  .views {
    justify-self: end;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .views a {
    flex: none;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .chain {
    display: block;
    margin-top: 32px;
  }

  .node {
    display: block;
  }

  .node-link {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
  }

  .node-count {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 2.25rem;
  }

  .node-label {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .node-state {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .hop {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 2px;
    align-content: center;
    min-height: 56px;
    padding: 0;
    text-align: left;
  }

  .hop .line {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: start;
    width: 0;
    height: 100%;
    min-height: 56px;
    margin-left: 14px;
    border-top: 0;
    border-left: var(--lw, 0) var(--ls, solid) var(--lc, transparent);
  }

  .hop-name {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .hop-detail {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .chain.arrive .line {
    transform-origin: top;
    animation-name: settle;
  }

  .top-end {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
  }

  .scope {
    font-size: 0.75rem;
  }

  .ask {
    width: calc(100% - 32px);
  }

  .starters {
    grid-template-columns: minmax(0, 1fr);
  }

  .inside,
  .directory {
    width: calc(100% - 32px);
  }

  .hero {
    padding-top: 40px;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 40px 0;
  }

  .row-head {
    position: static;
  }

  .type-tabs {
    margin: 0 0 24px -12px;
  }

  .directory-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .directory-side {
    position: static;
    max-height: none;
  }

  .directory-list {
    max-height: 240px;
  }

  .sources li {
    grid-template-columns: minmax(0, 1fr);
  }

  .source-meta {
    white-space: normal;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 2px 12px;
  }

  .bar-label {
    grid-column: 1 / -1;
  }

  .stop,
  .stop-link {
    grid-template-columns: 76px 12px minmax(0, 1fr);
    column-gap: 10px;
  }

  .segment-stats {
    gap: 12px;
  }

  .segment-share {
    font-size: 1.625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .thinking-text {
    background: none;
    color: var(--ink-2);
  }
}

@media (forced-colors: active) {
  .bar-seg,
  .segment,
  .swatch,
  .draft-dot,
  .stop-dot {
    border: 1px solid CanvasText;
  }

  .views-thumb {
    display: none;
  }

  .theme::before {
    forced-color-adjust: none;
    color: CanvasText;
  }

  .views a[aria-current="page"] {
    text-decoration: underline;
  }

  .role-switch button[aria-pressed="true"] {
    outline: 1px solid CanvasText;
  }

  .thinking-text {
    background: none;
    color: CanvasText;
  }
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.875rem;
}

.link-button:hover {
  text-decoration: underline;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  vertical-align: middle;
  transition: background 120ms var(--ease);
}

.icon-button:hover {
  background: var(--wash);
  color: var(--ink);
}

.detail-head .icon-button {
  margin-left: 4px;
  vertical-align: 4px;
}

.modal {
  width: min(560px, 100% - 32px);
  max-height: min(720px, 100dvh - 64px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--lift);
}

@media (forced-colors: active) {
  .modal {
    border: 1px solid CanvasText;
  }
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 4px 20px;
}

.modal-head h2 {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.modal-body {
  padding: 0 20px 20px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.correct-lede {
  margin: 0 0 12px;
  font-size: 0.8125rem;
}

.correct-body .notice,
.correct-message {
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: 0.8125rem;
}

.correct-message {
  border-radius: 10px;
  background: var(--wash);
  color: var(--ink);
}

.correct-group + .correct-group {
  margin-top: 20px;
}

.correct-group h3 {
  margin: 0 0 4px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
}

.correct-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.correct-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 36px;
  border-bottom: 1px solid var(--hair);
}

.correct-label {
  color: var(--ink-2);
}

.correct-actions {
  display: flex;
  gap: 2px;
}

.correct-draft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 8px 8px 8px 12px;
  border-radius: 10px;
  background: var(--draft-wash);
  font-size: 0.8125rem;
}

.correct-draft .button {
  background: var(--raised);
  box-shadow: var(--thumb);
}

.correct-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 6px 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.corrected-by {
  font-size: 0.75rem;
}

.correct-body .tag {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.6875rem;
  line-height: 18px;
}

.correct-editor {
  display: grid;
  grid-column: 2 / -1;
  gap: 6px;
  padding: 6px 0 10px;
}

.correct-add .correct-editor {
  grid-column: auto;
}

.correct-editor input[type="text"],
.correct-editor select,
.corrections input[type="text"] {
  width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
}

.correct-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.correct-add {
  padding-top: 8px;
}

.modal .correction {
  padding: 10px 0;
}

.modal .correction-reason {
  margin: 4px 0;
  padding-left: 10px;
  font-size: 0.875rem;
}

.modal .correction-actions {
  margin-top: 6px;
}

.add-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
}

.correct-retire {
  margin-top: 20px;
}

.correct-retire p {
  margin: 0 0 6px;
  font-size: 0.8125rem;
}

.link-button.danger {
  color: var(--warn);
  font-size: 0.8125rem;
}

.directory-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.directory-search input {
  flex: 1;
  min-width: 0;
}

.candidate-input {
  display: block;
}

.corrections {
  margin: 0;
  padding: 0;
  list-style: none;
}

.correction {
  padding: 16px 0;
  border-top: 1px solid var(--hair);
}

.correction p {
  margin: 0 0 4px;
}

.correction-what {
  font-weight: 500;
}

.correction-reason {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 2px solid var(--hair);
  color: var(--ink);
  font-size: 0.9375rem;
}

.correction-meta,
.correction-note {
  font-size: 0.8125rem;
}

.correction-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.correction-actions .review-note {
  flex: 1 1 240px;
}

.corrections-view {
  width: min(880px, 100% - 48px);
  margin: 0 auto;
  padding: 56px 0 96px;
}

.corrections-view section {
  margin-top: 48px;
}

.drafts-lede {
  margin: 0 0 12px;
  font-size: 0.9375rem;
}

.draft-group {
  border-top: 1px solid var(--hair);
}

.draft-group summary {
  padding: 10px 0;
  font-weight: 500;
  cursor: pointer;
}

.draft-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border-top: 1px solid var(--hair);
  font-size: 0.9375rem;
}

.draft-row .tag {
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.6875rem;
}

.corrections-view h2 {
  margin-bottom: 8px;
  font-size: 1.125rem;
}

@media (max-width: 600px) {
  .correct-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .correct-label {
    grid-column: 1 / -1;
    padding-top: 6px;
  }

  .correct-value {
    padding-top: 0;
  }

  .correct-editor {
    grid-column: 1 / -1;
  }
}

.activity + .section-note {
  margin-top: 14px;
}

.sources {
  width: min(1040px, 100% - 48px);
}

.sources .back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.sources .back::before {
  content: "\2190\00a0";
}

.account-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 16px;
  background: var(--raised);
  box-shadow: var(--lift);
  font-size: 0.875rem;
}

.account-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.account-card .actions {
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-head h3 {
  margin: 0;
  font-size: 1rem;
}

.account-problem,
.fetch-status.warn {
  color: var(--warn);
}

.state {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}

.state.ok {
  background: var(--accent-wash);
  color: var(--accent);
}

.state.warn {
  background: var(--warn-wash);
  color: var(--warn);
}

.sources-table td {
  vertical-align: middle;
}

.sources-table .end {
  text-align: right;
}

.source-name a {
  display: block;
  font-weight: 500;
}

.source-name .quiet,
.fetch-next {
  display: block;
  font-size: 0.8125rem;
}

.fetch-status.busy {
  color: var(--accent);
}

.fetch-status.quiet {
  color: var(--ink-2);
}

.schedule {
  padding: 5px 10px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
}

.button:disabled {
  color: var(--ink-faint);
  cursor: default;
  transform: none;
}

.schedule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  font-size: 0.875rem;
}

.schedule-row .fetch-cell {
  display: flex;
  flex-direction: column;
}

.channel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 16px 0 12px;
}

.channel-controls input {
  flex: 0 1 240px;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.875rem;
}

.channel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: -12px;
}

.channel-tabs button {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.channel-tabs button:hover {
  color: var(--ink);
}

.channel-tabs button.current {
  background: var(--wash);
  color: var(--ink);
  font-weight: 500;
}

.channel-name {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.channel-name .state {
  margin-left: 8px;
}

.channels-table .end .button + .button {
  margin-left: 6px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  border-radius: 14px;
  background: var(--wash);
  font-size: 0.8125rem;
}

.stat-value {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fetch-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
}

.fetch-log .end {
  text-align: right;
}

.fetch-row.open td {
  border-bottom: 0;
}

.fetch-detail > td {
  padding: 0 0 20px 20px;
}

.fetch-detail p {
  margin: 0 0 12px;
  font-size: 0.8125rem;
}

.fetch-detail table {
  font-size: 0.8125rem;
}

.fetch-detail td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.fetch-only {
  margin-bottom: 16px;
}

.fetch-log-link {
  font-size: 0.875rem;
}

.connect-form {
  display: grid;
  gap: 14px;
}

.connect-form p {
  margin: 0;
}

.connect-form label {
  display: grid;
  gap: 4px;
  font-size: 0.8125rem;
}

.connect-form label > span:first-child {
  font-weight: 500;
}

.connect-form input,
.connect-form textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
}

.connect-form code {
  overflow-wrap: anywhere;
  font-size: 0.75rem;
}

.connect-buttons {
  display: flex;
  gap: 8px;
}

.connect-field {
  display: grid;
  justify-items: start;
  gap: 4px;
  font-size: 0.8125rem;
}

.connect-field > span:first-child {
  font-weight: 500;
}

.connect-form .schedule {
  justify-self: start;
}

.check-findings {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--wash);
  font-size: 0.8125rem;
}

.check-sample {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.add-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
  font-size: 0.8125rem;
}

.source-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 20px;
  margin: 0 0 14px;
  font-size: 0.875rem;
}

.facts dt {
  color: var(--ink-2);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .sources-table thead {
    display: none;
  }

  .sources-table tbody {
    display: block;
  }

  .sources-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--hair);
  }

  .sources-table tbody tr:last-child {
    border-bottom: 0;
  }

  .sources-table td {
    padding: 0;
    border: 0;
  }

  .sources-table td:empty {
    display: none;
  }

  .sources-table .source-name,
  .sources-table .fetch-cell {
    grid-column: 1 / -1;
  }
}

.tesseract {
  position: relative;
  display: inline-block;
  flex: none;
  width: 26px;
  aspect-ratio: 1;
  /* A finger opens it by pressing and holding, which a phone would otherwise answer by selecting the nearest text. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* The drawing is larger than the mark, so the cells have room to fly apart over whatever is around it. */
.tesseract canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  pointer-events: none;
}

.tesseract-flat {
  background: url("favicon.svg") center / contain no-repeat;
}

.tesseract-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
}

.tesseract-notes {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.tesseract-note,
.tesseract-leader {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  will-change: transform, opacity;
}

.tesseract-note {
  color: #ecd29a;
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
  translate: 0 -50%;
  white-space: nowrap;
}

.tesseract-note-left {
  translate: -100% -50%;
}

.tesseract-sum {
  color: #a89e8a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

.tesseract-leader {
  width: 1px;
  height: 1px;
  background: #e3bd72;
  transform-origin: 0 0;
}

/* The words need a column of clear space either side of the drawing. Where there is none, it goes without. */
@media (max-width: 1040px) {
  .tesseract-notes {
    display: none;
  }
}

/* The page people meet before they are let in: black, gold, and a lot of room. It looks the same whichever theme
   is chosen, so it sets every colour it uses. */
:root[data-scene="foundation"] {
  color-scheme: dark;
  --bg: #05060a;
  --raised: #0f0f15;
  --wash: #15151c;
  --ink: #f4ecdc;
  --ink-2: #a89e8a;
  --ink-faint: #4b4638;
  --hair: rgba(233, 201, 135, 0.16);
  --accent: #e3bd72;
  --accent-wash: rgba(227, 189, 114, 0.18);
  --on-ink: #0b0a07;
  --warn: #ffa193;
  --warn-wash: rgba(255, 122, 102, 0.12);
}

:root[data-scene="foundation"] .gate h1 {
  /* Tracking adds space after the last letter too, which would pull the word off centre. */
  margin-right: -0.42em;
  background: linear-gradient(180deg, #fff6df 8%, #e9c684 52%, #a47a32 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.375rem, 3.4vw, 2.125rem);
  font-weight: 300;
  letter-spacing: 0.42em;
  line-height: 1.3;
  text-transform: uppercase;
}

:root[data-scene="foundation"] .gate p {
  max-width: 36ch;
  margin: 20px 0 40px;
  font-size: 1rem;
  font-weight: 350;
  line-height: 1.6;
}

:root[data-scene="foundation"] .gate .notice {
  margin: -16px 0 32px;
  font-size: 0.875rem;
}

:root[data-scene="foundation"] .gate .button {
  padding: 11px 28px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(233, 201, 135, 0.42);
  color: #ecd29a;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition:
    transform 160ms var(--ease),
    box-shadow 240ms var(--ease),
    filter 240ms var(--ease);
}

:root[data-scene="foundation"] .gate .button.primary {
  background: linear-gradient(180deg, #f8e2ab 0%, #e2ba6c 46%, #c2934a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 232, 0.75),
    inset 0 0 0 1px rgba(255, 236, 190, 0.28),
    0 10px 36px rgba(227, 189, 114, 0.16);
  color: #1b1405;
  font-weight: 550;
}

:root[data-scene="foundation"] .gate .button.primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 232, 0.85),
    inset 0 0 0 1px rgba(255, 236, 190, 0.4),
    0 10px 48px rgba(227, 189, 114, 0.34);
  filter: brightness(1.06);
}

:root[data-scene="foundation"] .gate .button:focus-visible {
  outline: 2px solid #fff0c9;
  outline-offset: 3px;
}
