/* /registry/ and /registry/submit/ on nameswallet.app. Load order: /assets/tokens.css,
   /assets/chrome.css (the shared header, footer and skip link: .site-*), /assets/site.css (base
   type, .wrap .lead .measure .sec .sec-head .marks pre code), then this file. Everything the two
   pages use beyond that is here, including the page-head classes (.rule .page-head .hero-grid
   .state .door) that used to live in site.css's "Legacy" block, so that block can go.
   No inline styles anywhere (CSP: style-src 'self').

   Tokens used: --card --ink --dim --line --orange --orange-text --radius --font-head.
   Never --green or --ok, never orange as text or as a focus ring.
   Every colour goes through the --reg-* aliases below, so a token rename is a one-block edit. */

.reg {
  --reg-surface: var(--card);
  --reg-text: var(--ink);
  --reg-muted: var(--dim);
  --reg-rule: var(--line);
  --reg-accent: var(--orange);   /* rules only: 2.9:1 on light paper, never text */
  --reg-link-line: var(--orange-text); /* underline colour only; link text stays ink */
  --reg-radius: var(--radius);
  --reg-measure: 40rem;
}

.reg .sec p, .reg .sec li, .reg .sec dd { max-width: var(--reg-measure); }
.reg .sec h3 { margin: 22px 0 6px; }
.reg .reg-note { color: var(--reg-muted); font-size: .9375rem; }
.reg code { overflow-wrap: anywhere; }
.reg pre { max-width: 46rem; }
.reg pre code { overflow-wrap: normal; }

/* Page head (moved from site.css's Legacy block, unchanged apart from the aliases) */
.reg .page-head { padding: 28px 0 36px; }
.reg .page-head h1 { font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem); }
.reg .rule { width: 40px; height: 3px; background: var(--reg-accent); border-radius: 2px; margin: 14px 0 16px; }
.reg .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.reg .state { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 4px 12px 4px 10px; border: 1px solid var(--reg-rule); border-radius: 999px; font-weight: 600; font-size: .875rem; background: var(--reg-surface); }
.reg .state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.reg .state.pending::before { border: 2px solid var(--reg-text); }

/* "Not deployed yet": the sentence the old notice strip under the header carried */
.reg .reg-notice { max-width: 46rem; margin: 16px 0 18px; padding: 10px 14px; background: var(--reg-surface); border: 1px solid var(--reg-rule); border-left: 3px solid var(--reg-accent); border-radius: var(--reg-radius); font-size: .9375rem; line-height: 1.5; }

/* Hero: text left, the example sheet in a 22rem column. Two columns from 900px (the .sec
   breakpoint): below that the text column would be narrower than the sheet. */
@media (min-width: 900px) { .reg .reg-hero-grid { grid-template-columns: minmax(0, 1fr) 22rem; gap: 56px; } }
.reg .reg-hero-grid .state { margin-top: 8px; }

/* The example approval sheet: what a wallet shows without and with the registry */
.reg .reg-sheet { max-width: 34rem; margin: 0; background: var(--reg-surface); border: 1px solid var(--reg-rule); border-radius: var(--reg-radius); padding: 18px 18px 14px; }
.reg .reg-sheet-step { margin: 0; }
.reg .reg-sheet-step + .reg-sheet-step { margin-top: 12px; padding-top: 14px; border-top: 3px solid var(--reg-accent); }
.reg .reg-sheet-when { display: block; color: var(--reg-muted); font-size: .8125rem; margin-bottom: 4px; }
.reg .reg-sheet-id { display: block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .875rem; color: var(--reg-muted); overflow-wrap: anywhere; }
.reg .reg-sheet-label { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: -.015em; line-height: 1.25; }
.reg .reg-sheet-facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: .875rem; line-height: 1.45; }
.reg .reg-sheet-facts li { position: relative; padding-left: 16px; }
.reg .reg-sheet-facts li::before { content: ""; position: absolute; left: 1px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--reg-text); }
.reg .reg-sheet figcaption { margin-top: 12px; }

/* Term lists */
.reg .reg-terms { margin: 0 0 1em; display: grid; gap: 12px; }
.reg .reg-terms dt { font-weight: 700; }
.reg .reg-terms dd { margin: 2px 0 0; }

/* Steps that really are a sequence (id, compare, IDL, rebuild; the app publishing steps) */
.reg .reg-flow { list-style: none; counter-reset: step; display: grid; gap: 16px; margin: 0 0 1.1em; padding: 0; }
.reg .reg-flow li { counter-increment: step; position: relative; padding-left: 40px; }
.reg .reg-flow li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--reg-text); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: .8125rem; line-height: 1; }
.reg .reg-flow li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 30px; bottom: -14px; width: 2px; background: var(--reg-rule); }
.reg .reg-flow h3 { margin: 2px 0 2px; font-size: 1rem; }
.reg .reg-flow p { margin: 0; }

/* Where it stands: hairline rows; the unreleased row carries the site's outline dot */
.reg .reg-ledger { margin: 0; border-top: 1px solid var(--reg-rule); }
.reg .reg-ledger > div { display: grid; gap: 2px 24px; padding: 12px 0; border-bottom: 1px solid var(--reg-rule); }
@media (min-width: 640px) { .reg .reg-ledger > div { grid-template-columns: 8.5rem minmax(0, 1fr); } }
.reg .reg-ledger dt { font-weight: 700; display: flex; align-items: center; gap: 8px; align-self: start; }
.reg .reg-ledger .reg-pending dt::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--reg-text); flex: none; }
.reg .reg-ledger dd { margin: 0; }
.reg .reg-after { margin-top: 16px; }

/* The door to the submit page (moved from site.css's Legacy .door), sized to the text column */
.reg .door { display: block; background: var(--reg-surface); border: 1px solid var(--reg-rule); border-radius: var(--reg-radius); padding: 18px 20px; text-decoration: none; color: var(--reg-text); }
.reg .door:hover { border-color: var(--reg-text); }
.reg .door h3 { font-size: 1.1875rem; margin: 0 0 4px; }
.reg .door p { margin: 0 0 12px; font-size: .95rem; }
.reg .door .go { font-weight: 600; font-size: .95rem; text-decoration: underline; text-decoration-color: var(--reg-link-line); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.reg .door .status { display: flex; align-items: flex-start; gap: 8px; font-size: .8125rem; color: var(--reg-muted); border-top: 1px solid var(--reg-rule); padding-top: 10px; margin-top: 12px; }
.reg .door .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: .45em; }
.reg .door .status.pending::before { border: 2px solid var(--reg-text); }
.reg .reg-door { max-width: var(--reg-measure); margin: 0 0 8px; }

/* Placeholder for the registry's testnet program id */
.reg .reg-placeholder { margin: 18px 0 0; padding: 12px 14px; border: 2px dashed var(--reg-rule); border-radius: var(--reg-radius); max-width: 46rem; }
.reg .reg-placeholder p { margin: 0; }
.reg .reg-placeholder p + p { margin-top: 6px; }

.reg .reg-onward { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; font-weight: 600; }
.reg .sec .marks { margin-bottom: 1em; }
