@font-face {
  font-family: Mono;
  src: url("./fonts/mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  background: #f4f3e6;
  color: #0c0d0d;
  font:
    14px/1.5 Mono,
    ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid;
  padding: 10px 12px;
  min-height: 44px;
  text-align: left;
}
button:hover {
  background: #0c0d0d;
  color: #f4f3e6;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0c0d0d;
  outline-offset: 2px;
}
#dialog-title:focus {
  outline: 0;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p,
ol,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3,
strong,
small {
  font-size: inherit;
  font-weight: 400;
}
.terminal .register {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: calc(80ch + 48px);
  margin: auto;
  padding: 20px 24px 8px;
}
.identity,
.demo-label {
  flex: none;
}
.artist-link {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.artist-link::before,
.artist-link::after {
  position: absolute;
  inset: 0;
  content: attr(data-label);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.artist-link::before {
  clip-path: inset(0 0 50% 0);
}
.artist-link::after {
  clip-path: inset(50% 0 0 0);
}
.artist-link:hover > bdi {
  opacity: 0;
}
.artist-link:hover::before,
.artist-link:hover::after {
  opacity: 1;
}
.artist-link:hover::before {
  animation: artist-glitch-top 280ms steps(2, end) infinite;
}
.artist-link:hover::after {
  animation: artist-glitch-bottom 330ms steps(2, end) infinite;
}
@keyframes artist-glitch-top {
  50% {
    transform: translate(1px, -0.5px);
  }
}
@keyframes artist-glitch-bottom {
  50% {
    transform: translate(-1px, 0.5px);
  }
}
.demo-label {
  margin-bottom: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: none;
  width: min(100%, 44ch);
}
.totals > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.totals dd {
  white-space: nowrap;
}
.net-qualification {
  display: block;
}
.summary-details {
  flex: none;
  font-size: 0.82rem;
}
.register > .totals + .summary-details {
  margin-top: 8px;
}
.summary-details summary {
  width: fit-content;
  cursor: pointer;
  min-height: 28px;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.summary-details summary:hover {
  text-decoration-thickness: 2px;
}
.summary-details[open] {
  padding-bottom: 12px;
}
.summary-details > .totals,
.summary-details > .muted {
  margin-inline-start: 18px;
}
.summary-details > .totals {
  width: min(calc(100% - 18px), 52ch);
}
.inline-link {
  border: 0;
  min-height: 24px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  flex: none;
  margin: 8px 0;
}
.terminal-link {
  border: 0;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terminal-link:hover,
.inline-link:hover {
  background: transparent;
  color: inherit;
  text-decoration-thickness: 2px;
}
.register-meta {
  border-top: 1px solid;
  border-bottom: 1px solid;
  padding: 6px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex: none;
}
.stream {
  flex: 1;
  min-height: 80px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #0c0d0d80 transparent;
  scrollbar-gutter: stable;
  overflow-anchor: none;
}
.stream ol {
  list-style: none;
  padding: 10px 12px 0 0;
}
.empty-entry {
  padding: 14px 0 20px;
}
.entry {
  border-bottom: 1px solid #0c0d0d30;
}
.entry-line {
  width: 100%;
  display: grid;
  grid-template-columns: 12ch minmax(0, 1fr) auto;
  gap: 4px 20px;
  padding: 10px 0;
  border: 0;
  align-items: baseline;
}
.entry-line:hover,
.entry-line:focus-visible {
  background: #0c0d0d08;
  color: inherit;
}
.entry-line:hover .entry-main,
.entry-line:focus-visible .entry-main {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-line:focus-visible {
  outline-offset: -2px;
}
.entry-line:active,
.terminal-link:active {
  background: #0c0d0d;
  color: #f4f3e6;
}
.entry-time {
  white-space: nowrap;
}
.entry-main {
  min-width: 0;
  overflow-wrap: anywhere;
}
.entry-amount {
  text-align: right;
  white-space: nowrap;
}
.entry-message {
  margin-left: calc(12ch + 20px);
  padding-bottom: 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.entry-source-line {
  margin: 0.15rem 0 0.25rem;
  color: #4d4e47;
  font-size: 0.78rem;
}
.public-footer {
  flex: none;
  display: block;
  border-top: 1px solid;
  min-height: 62px;
}
.footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  flex-wrap: wrap;
}
.currency-ticker {
  height: 18px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  direction: ltr;
  white-space: nowrap;
}
.currency-ticker span {
  display: block;
  width: max-content;
  transform: translateX(-110%);
}
.currency-ticker.active {
  opacity: 1;
}
.currency-ticker.active span {
  animation: register-currency-ticker 1s linear both;
}
@keyframes register-currency-ticker {
  to {
    transform: translateX(calc(720px + 110%));
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
/* When zoom or a very short viewport cannot fit the controls, allow reflow
   instead of clipping them. At normal phone/desktop sizes only the ledger scrolls. */
@media (max-height: 380px) {
  .terminal .register {
    height: auto;
    min-height: 100dvh;
  }
  .terminal .stream {
    flex: none;
    height: 35dvh;
  }
}
@media (max-width: 700px) {
  .terminal .register {
    padding: 12px 16px 4px;
  }
  .demo-label {
    margin-bottom: 8px;
  }
  .totals {
    grid-template-columns: minmax(0, 1fr);
  }
  .support-actions {
    gap: 0 20px;
    margin: 4px 0;
  }
  .entry-line {
    grid-template-columns: 11ch minmax(0, 1fr) auto;
    column-gap: 8px;
  }
  .entry-message {
    margin-left: 0;
  }
}
dialog {
  --dialog-outer-gap: 28px;
  background: #f4f3e6;
  color: #0c0d0d;
  border: 1px solid;
  width: min(610px, calc(100% - 24px));
  max-height: calc(100dvh - (2 * var(--dialog-outer-gap)));
  max-height: calc(
    var(--visible-height, 100dvh) - (2 * var(--dialog-outer-gap))
  );
  top: calc(var(--visible-top, 0px) + var(--dialog-outer-gap));
  bottom: auto;
  margin: 0 auto var(--dialog-outer-gap);
  transform: none;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #0c0d0d88;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid;
  padding-bottom: 8px;
  margin-bottom: 16px;
  gap: 12px;
}
.dialog-head button {
  border: 0;
  padding: 6px;
  flex: none;
}
.stack {
  display: grid;
  gap: 14px;
}
.stack label {
  display: grid;
  gap: 6px;
}
.stack input:not([type="checkbox"]),
.stack textarea,
.stack select {
  width: 100%;
  border: 1px solid;
  background: transparent;
  padding: 10px;
  min-height: 44px;
  border-radius: 0;
  font-size: max(1rem, 16px);
}
.stack textarea {
  resize: vertical;
  min-height: 76px;
}
.stack .check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.check input {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin: 0;
  accent-color: #0c0d0d;
}
.primary {
  background: #0c0d0d;
  color: #f4f3e6;
}
.primary:hover {
  background: #fedc99;
  color: #0c0d0d;
}
.primary:disabled {
  background: #0c0d0d;
  color: #f4f3e6;
  -webkit-text-fill-color: #f4f3e6;
}
.preview {
  border-top: 1px solid;
  border-bottom: 1px solid;
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.preview small {
  display: block;
  margin-bottom: 6px;
}
.preview-message {
  white-space: pre-wrap;
}
.feedback {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.feedback:empty {
  display: none;
}
.feedback[data-tone="error"] {
  border-inline-start: 3px solid #8b1e1e;
  padding-inline-start: 8px;
}
.feedback[data-tone="success"] {
  background: #0c0d0d08;
  padding: 8px;
}
.mailbox {
  background: #fedc99;
  padding: 12px;
}
.mailbox code {
  font: inherit;
  display: block;
  margin: 8px 0;
  word-break: break-all;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prose p {
  margin: 12px 0;
}
.prose h3 {
  margin-top: 20px;
}
.quiet {
  color: #4d4e47;
}
.text-button {
  border: 0;
  text-decoration: underline;
}
.operator {
  max-width: 960px;
  margin: auto;
  padding: 36px 28px 64px;
  font-size: 15px;
  line-height: 1.55;
}
.operator header {
  border-bottom: 2px solid;
  padding-bottom: 24px;
  margin-bottom: 32px;
}
.operator header p,
.operator > section > p,
.operator > details > p,
.operator-tool > p,
.technical-note > p {
  max-width: 72ch;
}
.operator header p {
  margin-top: 12px;
}
.operator h1 {
  font-size: 21px;
}
.operator h2 {
  font-size: 18px;
  margin: 0;
}
.operator h3 {
  margin-bottom: 8px;
  font-weight: 600;
}
.operator-overview {
  padding-bottom: 36px;
  border-bottom: 1px solid;
}
.status-summary {
  display: grid;
  gap: 0;
  margin: 20px 0 24px;
  border-top: 1px solid #0c0d0d30;
}
.status-summary > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #0c0d0d30;
}
.status-summary dt {
  color: #4d4e47;
}
.status-summary dd[data-tone="attention"],
.control-result[data-tone="attention"] {
  background: #fedc99;
  padding: 4px 6px;
}
.status-summary dd[data-tone="error"],
.control-result[data-tone="error"] {
  border-inline-start: 3px solid #8b1e1e;
  padding-inline-start: 8px;
}
.operator .danger {
  border-color: #8b1e1e;
  color: #701717;
}
.operator .danger:hover,
.operator .danger:focus-visible {
  background: #8b1e1e;
  color: #f4f3e6;
}
.operator-section {
  margin: 0;
  padding: 24px 0;
  border-bottom: 1px solid;
}
.operator-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.operator-section[open] > summary {
  margin-bottom: 20px;
}
.operator-tool {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #0c0d0d45;
}
.operator-tool + .operator-tool {
  margin-top: 24px;
}
.scope-help {
  display: grid;
  gap: 8px;
}
.control-result {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.technical-note {
  margin-top: 16px;
}
.source-card {
  border: 1px solid #b8b8ae !important;
  margin-top: 16px;
  padding: 16px !important;
}
.operator pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px Mono;
  line-height: 1.7;
  max-height: 330px;
  overflow: auto;
}
.op-list {
  display: grid;
  gap: 12px;
}
.op-row {
  border-top: 1px solid #0c0d0d44;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.op-row small {
  display: block;
  line-height: 1.7;
}
.op-row button {
  flex-shrink: 0;
}
.op-row .button-row {
  justify-content: flex-end;
}
.op-row a {
  font-size: 13px;
}
.operator label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.operator details {
  margin-top: 0;
}
.operator summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
}
.muted {
  color: #4d4e47;
  font-size: 13px;
  line-height: 1.65;
}
.notice {
  background: #0c0d0d08;
  padding: 12px;
  font-size: 13px;
  line-height: 1.65;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.spinner {
  width: 0.9em;
  height: 0.9em;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: register-spin 700ms linear infinite;
}
.access-identity {
  overflow-wrap: anywhere;
}
@keyframes register-spin {
  to {
    transform: rotate(1turn);
  }
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .operator {
    padding: 24px 16px;
  }
  .status-summary > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .operator-tool {
    padding: 16px;
  }
  .op-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  dialog {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  .spinner {
    animation: none;
    border-right-color: currentColor;
    border-top-color: transparent;
  }
  .currency-ticker.active {
    background: #0c0d0d0c;
  }
  .currency-ticker.active span {
    animation: none;
    transform: none;
  }
  .artist-link:hover > bdi {
    opacity: 1;
  }
  .artist-link:hover::before,
  .artist-link:hover::after {
    opacity: 0;
    animation: none;
  }
}

.terminal .register.reflow {
  height: auto;
  min-height: 100dvh;
}
.terminal .register.reflow .stream {
  flex: none;
  height: 35dvh;
}

@media (max-width: 360px) {
  .entry-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .entry-time {
    grid-column: 1;
  }
  .entry-main {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  .entry-amount {
    grid-column: 2;
    grid-row: 1;
  }
}
.terminal:has(dialog[open]) .demo-label {
  visibility: hidden;
}
.dialog-demo {
  margin-bottom: 16px;
}
.small-copy,
.provider-disclaimer,
.publication-details {
  font-size: 0.82rem;
  line-height: 1.6;
}
.provider-disclaimer {
  display: grid;
  gap: 8px;
}
.message-details > summary {
  cursor: pointer;
  width: fit-content;
  min-height: 44px;
  padding: 10px 0;
  text-decoration: none;
  list-style: none;
}
.message-toggle-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.message-chevron {
  display: inline-block;
  min-width: 1.3em;
  text-decoration: none;
}
.message-details > summary::-webkit-details-marker {
  display: none;
}
.message-details[open] > summary {
  margin-bottom: 12px;
}
#message-editor {
  min-width: 0;
  margin-inline: 18px;
  padding-bottom: 16px;
}
.message-details .check,
.consent-required {
  font-size: 0.82rem;
  line-height: 1.6;
}
.character-count {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.preview-label {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.5;
}
.entry-preview {
  margin-block: 10px 14px;
}
.preview-output {
  border-top: 1px solid #0c0d0d30;
  border-bottom: 1px solid #0c0d0d30;
  padding: 10px 0 14px;
  overflow-wrap: anywhere;
}
.preview-output .preview-message {
  margin-top: 8px;
}
.manage-dialog {
  padding: 24px;
}
.manage-panel {
  display: grid;
  gap: 24px;
}
.manage-group,
.manage-session,
.manage-provider,
.manage-subscriptions {
  display: grid;
  gap: 8px;
}
.manage-label,
.manage-value {
  margin: 0;
}
.manage-label {
  font-size: 0.82rem;
  line-height: 1.5;
}
.manage-value {
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.manage-subscriptions {
  gap: 16px;
}
.manage-rule {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid;
}
.manage-session .terminal-link {
  width: fit-content;
}
.payment-details > summary {
  width: fit-content;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.payment-details[open] > summary {
  margin-bottom: 8px;
}
.payment-details .provider-disclaimer {
  margin-inline: 16px;
  padding-bottom: 12px;
}
.support-amount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.support-amount-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  min-height: 44px;
}
.support-amount-controls > select,
.support-amount-controls > #custom-amount {
  height: 44px;
  min-height: 44px;
}
#custom-amount::placeholder {
  color: #3d3e38;
  font-style: italic;
  opacity: 1;
}
#custom-amount:disabled {
  color: #77786f;
  -webkit-text-fill-color: #77786f;
  opacity: 1;
}
#custom-amount:disabled::placeholder {
  color: #77786f;
  opacity: 0.72;
}
.payment-action,
.payment-action > button {
  display: block;
  width: 100%;
}
.support-payment-context {
  display: grid;
  gap: 2px;
}
.recurring-cadence {
  padding-top: 8px;
  padding-bottom: 12px;
  font-size: 0.82rem;
}
.message-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.field-error:empty {
  display: none;
}
.field-error {
  overflow-wrap: anywhere;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.preview-message:empty {
  display: none;
}
.detail-fields > div {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #0c0d0d30;
}
.detail-fields dd {
  overflow-wrap: anywhere;
}
#detail-message {
  margin-top: 12px;
}
.publication-details summary,
#payment-tests summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.publication-details p {
  margin-bottom: 8px;
}
#retry-refresh {
  min-height: 44px;
  padding: 0;
}
.register-meta {
  min-height: 46px;
  padding: 0;
  align-items: center;
  gap: 8px;
}
@media (max-width: 450px) {
  .support-actions {
    gap: 0 16px;
  }
}

/* Keep identity, demo disclosure and close reachable above a scrolling form. */
dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dialog-head,
.dialog-demo {
  flex: none;
}
#dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 3px;
}
/* M2: keep the ledger measure; use shaped script fonts only where needed. */
html {
  font-family:
    Mono, "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans SC",
    ui-monospace, monospace;
}
html:lang(ar) {
  font-family:
    "Noto Sans Arabic", Mono, "Noto Sans Devanagari", "Noto Sans SC", sans-serif;
  line-height: 1.8;
}
html:lang(hi) {
  font-family:
    "Noto Sans Devanagari", Mono, "Noto Sans Arabic", "Noto Sans SC", sans-serif;
  line-height: 1.7;
}
html:lang(zh-Hans) {
  font-family:
    "Noto Sans SC", Mono, "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif;
  line-height: 1.65;
}
.terminal .register {
  max-width: 720px;
}
button {
  text-align: start;
}
.public-footer {
  align-items: stretch;
}
.footer-controls {
  gap: 0 16px;
}
.language-control {
  display: inline-flex;
  align-items: center;
}
.language-control select {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 44px;
  max-width: 150px;
  text-decoration: underline;
  font-size: inherit;
}
#dialog-language {
  flex: none;
  border-top: 1px solid #0c0d0d30;
  margin-top: 20px;
  padding-top: 18px;
}
.language-summary > .muted {
  color: #4d4e47;
  font-size: inherit;
}
.entry-amount,
.totals dd,
[data-money],
.numeric {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.entry-time {
  unicode-bidi: isolate;
}
.entry-message,
.preview-message {
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}
.stream ol {
  padding-inline: 0 12px;
}
.entry-message {
  margin-left: 0;
  margin-inline-start: calc(12ch + 20px);
}
[dir="rtl"] .entry-amount {
  text-align: left;
}
.totals {
  width: min(100%, 52ch);
}
.totals dt {
  overflow-wrap: anywhere;
  min-width: 0;
}
.totals dd {
  flex: none;
}
.detail-fields > div {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
input[type="email"],
#code {
  direction: ltr;
  unicode-bidi: isolate;
}
.support-amount {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}
.recurring-cadence {
  padding-bottom: 0;
}
@media (max-width: 700px) {
  dialog {
    --dialog-outer-gap: 12px;
  }
  .entry-message {
    margin-inline-start: 0;
  }
  .entry-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .entry-time {
    grid-column: 1;
  }
  .entry-main {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  .entry-amount {
    grid-column: 2;
    grid-row: 1;
  }
  .register-meta {
    flex-wrap: wrap;
  }
  .support-actions {
    gap: 0 16px;
  }
}
