/*
 * Trick or Trust Registry pages (wallet-ghost-polish 13.1). The dark tokens are the same values as
 * apps/wallet/src/ui/theme.css, so the Registry looks like the Wallet. Same origin only: a system font stack,
 * no web font, no remote file, no animation. Mobile first, and it fits 360 px with no horizontal scroll.
 */
:root {
  /* Surfaces */
  --color-bg: #17141c;
  --color-card: #241f2b;

  /* Text. Body text reaches 4.5:1 on the card. */
  --color-text: #f4f1f8;
  --color-text-muted: #b9b2c4;

  /* Accents */
  --color-accent: #ff9a4d;
  --color-on-accent: #24140a;
  --color-focus: #ffd24d;

  /* Sizing */
  --button-height: 54px;
  --radius-card: 22px;
  --radius-button: 18px;

  /* System font stack, the same as the Wallet's --font-body. */
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* A centered column, at most 420 px wide. The footer sits at the bottom of the screen. */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 16px 16px;
}

/* The page column fills the screen, so a card can sit at the bottom on phones. */
.page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  text-align: center;
}

/* The outlined REGISTRY pill, centered at the top. */
.pill {
  align-self: center;
  margin: 0 0 8px;
  padding: 4px 12px;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* The Ghost: 96 px, centered. The art is inline SVG, so it needs no file and no request. */
.ghost {
  width: 96px;
  height: 96px;
  margin: 12px auto 8px;
}

.ghost-art {
  display: block;
  width: 100%;
  height: 100%;
}

.wordmark {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.wordmark-or {
  color: var(--color-accent);
}

h1 {
  margin: 12px 0 8px;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--color-text);
}

p {
  margin: 8px 0;
}

.lede {
  margin: 0 0 24px;
  color: var(--color-text-muted);
}

/* The card. Long values wrap, so the card never grows past the screen. */
.card {
  width: 100%;
  padding: 20px;
  background: var(--color-card);
  border-radius: var(--radius-card);
  overflow-wrap: anywhere;
}

/* The sign-in card sits at the bottom of the screen: the auto top margin takes the spare height. */
.page > .sign-card {
  margin-top: auto;
}

.sign-card .note {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent);
  overflow-wrap: anywhere;
}

/* The primary button: full width of its card, at least the Wallet's 54 px height. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--button-height);
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.gh-mark {
  flex: none;
  width: 22px;
  height: 22px;
}

/* The QR code keeps a white background, so phone cameras can read it. */
.qr {
  width: 100%;
  max-width: 260px;
  margin: 12px auto;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.small {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.raw {
  word-break: break-all;
}

.timer {
  font-weight: 700;
}

.foot {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

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

/* Reduce motion: the Registry has no animation. This rule also turns off any animation or transition added later. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
