/* Axelrod design language, ported by hand from @axelrod/ui (tokens.css,
   DESIGN-LANGUAGE.md): bone ground, paper sheets with a faint card line,
   the ink ladder, IBM Plex Sans as the working face, Libre Caslon Text for
   the one composed lede, no monospace, amber square plus words when a
   person is needed. Light only; the page pins color-scheme light. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url(/demo/fonts/ibm-plex-sans-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/demo/fonts/libre-caslon-text-latin.woff2) format("woff2");
}
:root {
  --bone: #FAF9F6;
  --paper: #FFFFFF;
  --wash: rgba(25, 24, 23, 0.035);
  --wash-2: rgba(25, 24, 23, 0.06);
  --ink: #191817;
  --ink-2: #4A4845;
  --ink-3: #6E6B66;
  --ink-4: rgba(0, 0, 0, 0.25);
  --rule: rgba(25, 24, 23, 0.16);
  --rule-2: rgba(25, 24, 23, 0.09);
  --card-line: rgba(25, 24, 23, 0.08);
  --amber: #9A4A0C;
  --red: #c0392b;
  --selection: rgba(0, 0, 0, 0.18);
  --shadow: 0 1px 2px rgba(25, 24, 23, 0.04), 0 6px 20px rgba(25, 24, 23, 0.03);
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Libre Caslon Text", Georgia, serif;
  --text-2xs: 10.5px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-ui: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 34px;
  --tracking-title: -0.015em;
  --tracking-label: 0.06em;
  --radius-card: 12px;
  --radius-control: 8px;
  --page-narrow: 1100px;
  --topbar-h: 64px;
  --hit: 32px;
  --motion-fast: 140ms;
}
@media (width <= 767px) {
  :root {
    --text-2xs: 12px;
    --text-xs: 12.5px;
    --text-sm: 13px;
    --text-ui: 14px;
    --text-base: 15px;
    --hit: 44px;
  }
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body {
  margin: 0;
  min-height: 100svh;
}
[hidden] {
  display: none !important;
}
button,
input {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
::selection {
  background: var(--selection);
}
a {
  color: inherit;
}
code,
pre {
  font-family: inherit;
}
h1,
h2,
h3,
h4,
p,
dl,
ol,
ul {
  margin: 0;
}

/* Shell topbar: 64px, paper, one hairline. */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  text-decoration: none;
}
.topbar .text-action {
  margin-left: auto;
}
main {
  max-width: var(--page-narrow);
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* Button: control radius, semibold ui text, one ink-filled primary per surface. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--hit);
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--text-ui);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}
.button.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.button:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* TextAction: the quiet verb, underlined text, never a box. */
.text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--hit);
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-ui);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--motion-fast) ease;
}
.text-action:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Input: hairline field with the control radius. */
.field {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: var(--hit);
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--text-ui);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--motion-fast) ease;
}
.field::placeholder {
  color: var(--ink-4);
}
.field::-webkit-search-cancel-button,
.field::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--wash-2);
  }
  .button.primary:hover {
    background: var(--ink);
    opacity: 0.9;
  }
  .text-action:hover,
  .tabs button:hover {
    color: var(--ink);
  }
  .text-action:hover {
    text-decoration-color: currentColor;
  }
  .field:hover {
    border-color: var(--rule-2);
  }
}

/* Eyebrow: 11px semibold uppercase, tracked, ink-3. */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--ink-3);
}
.quiet {
  font-size: var(--text-sm);
  color: var(--ink-3);
}

/* Signed out: the auth shell column. */
.login {
  max-width: 520px;
  padding: 96px 0 80px;
}
.login h1 {
  margin-top: 12px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: var(--tracking-title);
}
.login-body {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.login .button {
  margin-top: 32px;
}
.login .quiet {
  margin-top: 24px;
}

/* Notice: the auth form's bordered message line. */
#notice:empty {
  display: none;
}
#notice {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: var(--text-ui);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#notice[data-tone="attention"]::before,
.attention::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--amber);
  vertical-align: 1px;
}

/* Record head, lede, as-of line. */
.record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
}
#property-title {
  margin-top: 2px;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--tracking-title);
  overflow-wrap: anywhere;
}
.lede {
  margin-top: 20px;
  max-width: 32em;
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  line-height: 1.1;
  font-weight: 400;
}
.lede:empty {
  display: none;
}
.as-of {
  margin-top: 12px;
  max-width: 60em;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

/* Sheet: one paper region per section, card line, faint shadow. */
.sheet {
  margin-top: 24px;
  background: var(--paper);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: clip;
}
.tabs {
  display: flex;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  min-height: var(--hit);
  margin-bottom: -1px;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-ui);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--motion-fast) ease;
}
.tabs button[aria-pressed="true"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
}
.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule-2);
}
.title-row h2 {
  font-size: var(--text-ui);
  font-weight: 600;
}
#result-status {
  font-size: var(--text-xs);
  color: var(--ink-3);
  white-space: nowrap;
}
#results[aria-busy="true"]::before {
  content: "Reading the record";
  display: block;
  padding: 32px 16px;
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* Limits: what the page could not answer, above the rows. */
.limits {
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule-2);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.limits:empty {
  display: none;
}
.limits p {
  margin: 4px 0;
}
.attention {
  color: var(--ink);
}

/* Record rows: identity first, then the facts, non-events muted. */
.record {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-2);
}
.record h3 {
  font-size: var(--text-ui);
  font-weight: 600;
}
.record p {
  margin-top: 4px;
  font-size: var(--text-ui);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record .value {
  margin-top: 2px;
  font-size: var(--text-md);
  font-weight: 500;
}
.record .muted,
.source .muted {
  color: var(--ink-3);
  font-size: var(--text-sm);
}
.condition {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.condition h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--ink-3);
}
.condition ul {
  margin: 4px 0;
  padding-left: 16px;
}
.condition p {
  margin-top: 2px;
  font-size: var(--text-sm);
}
.record > details {
  display: inline-block;
  vertical-align: top;
  margin-right: 16px;
}
.record > details[open] {
  display: block;
  margin-right: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.empty {
  padding: 32px 16px;
  font-size: var(--text-base);
  color: var(--ink-2);
}
#pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px;
  border-top: 1px solid var(--rule);
}
#pagination:empty {
  display: none;
}

/* Folds: a quiet underlined summary; opened content sits on wash, never in a box. */
details > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--hit);
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::before {
  content: "\25B8";
  color: var(--ink-3);
  font-size: var(--text-xs);
}
details[open] > summary::before {
  content: "\25BE";
}
.source {
  margin: 8px 0;
  padding: 12px 16px;
  background: var(--wash);
}
.source h4 {
  font-size: var(--text-ui);
  font-weight: 500;
}
.source p {
  margin-top: 4px;
  font-size: var(--text-ui);
  color: var(--ink-2);
}
.source code {
  display: block;
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
pre {
  margin: 8px 0;
  padding: 12px 16px;
  max-height: 60vh;
  overflow: auto;
  background: var(--wash);
  font-size: var(--text-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#results > details {
  padding: 8px 16px;
}

/* Folded sheets: the summary is the sheet head, the count reports while folded. */
details.sheet > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding: 8px 16px;
  color: var(--ink);
  font-size: var(--text-ui);
  font-weight: 600;
  text-decoration: none;
}
details.sheet > summary::before {
  content: none;
}
details.sheet > summary::after {
  content: "\25B8";
  margin-left: auto;
  color: var(--ink-3);
  font-size: var(--text-xs);
}
details.sheet[open] > summary::after {
  content: "\25BE";
}
details.sheet[open] > summary {
  border-bottom: 1px solid var(--rule);
}
.count {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-3);
}
.count:empty {
  display: none;
}
.sheet-body {
  padding: 16px;
}
.sheet-body > p {
  max-width: 60em;
  font-size: var(--text-ui);
  color: var(--ink-2);
}
.sheet-body > p + .facts {
  margin-top: 12px;
}
.facts > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  min-width: 0;
  font-size: var(--text-sm);
  color: var(--ink-3);
  white-space: nowrap;
}
.facts dd {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 8px;
  min-width: 0;
  margin: 0;
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.facts dd .text-action {
  margin-left: -8px;
}
.facts + .quiet {
  margin-top: 12px;
}
#calls {
  margin-top: 8px;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--ink-2);
}
#calls li {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule-2);
  overflow-wrap: anywhere;
}
#calls:empty {
  display: none;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  z-index: 10;
}
.skip:focus {
  top: 16px;
}
noscript {
  display: block;
  margin: 32px 24px;
}

@media (width <= 767px) {
  .topbar {
    padding: 0 16px;
  }
  main {
    padding: 16px 16px 48px;
  }
  .login {
    padding: 40px 0 48px;
  }
  .login h1 {
    font-size: 26px;
  }
  .lede {
    font-size: var(--text-xl);
    line-height: 1.15;
  }
  .record-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .record-head .text-action {
    margin-left: -8px;
  }
  .search {
    flex-wrap: wrap;
  }
  .search label {
    flex-basis: 100%;
  }
  .search .button {
    flex: 1;
  }
  .facts > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .tabs {
    padding-right: 32px;
  }
  .field {
    font-size: var(--text-md);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
