/* COG-260 MR 6c (Lead only): Roboto Mono, self-hosted (Google Fonts' official release v3.001, SIL
   OFL 1.1: fonts/roboto-mono-3.001/OFL.txt). Served from the site's own address only (font-src 'self');
   the build puts this before app.css in the one stylesheet. A test pins each file's sha256. */
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/roboto-mono-3.001/RobotoMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/roboto-mono-3.001/RobotoMono-Bold.woff2") format("woff2");
}

/* COG-20 gift page demo (Kimi's area with src/screens/): starts from the account site's tokens and
   base styles (44px targets, focus ring, AA contrast light and dark, no sideways scroll from 320px).
   This file never loads anything and never styles the demo banner (Lead-owned frame.css). */
:root {
  --bg: #ffffff;
  --surface: #f4f6f5;
  --text: #1a1a1a;
  --muted: #5a6360;
  --primary: #1f6f5c;
  --on-primary: #ffffff;
  --border: #d9dedc;
  --danger: #b3261e;
  --focus: #1f6f5c;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1211;
    --surface: #1a1f1d;
    --text: #f2f4f3;
    --muted: #a7b0ad;
    --primary: #5cc2a4;
    --on-primary: #0f1211;
    --border: #2c3331;
    --danger: #f2b8b5;
    --focus: #5cc2a4;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Phone first: one centred column, at most 560px on a laptop. */
.page {
  max-width: 560px;
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

/* Header: the wordmark left, "Sign out" right (only when signed in). */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-size: 1.125rem;
  font-weight: 700;
}
h1 {
  margin: 0 0 var(--space-lg);
  font-size: 1.5rem;
  line-height: 1.25;
}
h2 {
  margin: 0 0 var(--space-sm);
  font-size: 1.25rem;
}

/* Every control is at least 44 x 44 px. */
.button,
.link,
input {
  min-height: 44px;
  min-width: 44px;
  font: inherit;
}
/* Primary filled, secondary outlined; both full width in the column, radius 12. */
.button {
  display: block;
  width: 100%;
  margin: var(--space-sm) 0;
  padding: 10px var(--space-md);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
}
.button.primary {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}
.button.secondary {
  background: transparent;
  color: var(--primary);
}
.top .button {
  width: auto;
  margin: 0;
}
.button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Quiet text buttons ("Back to passkey sign-in", the language switch): 44px tall, they sit side
   by side and wrap. The current language is bold (aria-pressed stays the marker). */
.link {
  display: inline-block;
  background: none;
  border: none;
  padding: 10px 0;
  margin-right: var(--space-md);
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}
button:disabled {
  color: var(--muted);
  cursor: default;
}
.link[aria-pressed="true"] {
  font-weight: 700;
}
a {
  color: var(--primary);
}

/* One field per screen: the label above, a big input under it. */
label {
  display: block;
  margin: var(--space-md) 0 var(--space-xs);
  font-weight: 700;
}
input {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-md);
  padding: 10px var(--space-md);
  font-size: 1.125rem;
  border: 2px solid var(--muted);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
input:focus {
  border-color: var(--focus);
}
input[aria-invalid="true"] {
  border-color: var(--danger);
}
/* The 6-digit code stays ONE input; the digits are spaced so they are easy to read and type. */
input.code {
  font-size: 1.5rem;
  letter-spacing: 0.25em;
}

/* Always a visible focus ring (never removed without a replacement). */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* The plan card (W6 B-03's top card) and the quiet "Add a passkey" aside under it. */
.card,
.aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin: 0 0 var(--space-md);
}
.facts {
  margin: 0;
  padding-left: 1.25em;
}
.facts li + li {
  margin-top: var(--space-xs);
}
.aside p {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.aside .button {
  margin-bottom: 0;
}

/* A failed payment: the notice inside the card, a left accent in the danger colour. */
.notice {
  margin: var(--space-md) 0 0;
  padding-left: var(--space-sm);
  border-left: 4px solid var(--danger);
}

.sub,
.small {
  color: var(--muted);
  font-size: 0.9rem;
}
/* The passkey sub-line sits directly under its button. */
.sub {
  margin: 0 0 var(--space-md);
}
.small {
  margin: var(--space-md) 0;
}
/* The waitlist line closes the sign-in screen, set off from the buttons. */
.small:last-child {
  margin: var(--space-lg) 0 0;
}

/* Errors: a bold sentence in the danger colour; "Reload" only for the reload error. */
.error {
  margin: var(--space-md) 0;
  color: var(--danger);
  font-weight: 700;
}
.error p {
  margin: 0;
}
.error .button {
  width: auto;
  margin: var(--space-sm) 0 0;
}

/* The status line (role="status") and the loading line stay quiet. */
.status,
.loading {
  color: var(--muted);
  font-size: 0.9rem;
}
.status {
  margin: var(--space-md) 0;
}
.status:empty {
  margin: 0;
}

/* Footer: the language switch, set off by a rule. */
.foot {
  margin-top: var(--space-xl);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* COG-402 (c): the loading skeleton, the plan page's shape in quiet blocks. Static (no animation), so
   reduced-motion needs nothing extra. Screen readers get "Loading…" from the aria-label. */
.skeleton {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.skeleton-block {
  background: var(--surface);
  border-radius: var(--radius);
}
.skeleton-title {
  min-height: 32px;
  width: 60%;
}
.skeleton-card {
  min-height: 64px;
  padding: var(--space-xl);
}
.skeleton-row {
  min-height: 44px;
}

/* COG-20 gift screens (Kimi): the steps' own styles on the tokens above. The frame's banner and
   footer styles are the Lead's and load after this file. */

/* The amount picker (G-01b): a radio group whose options read as large tappable rows. */
.amount-group {
  margin: var(--space-md) 0;
  padding: 0;
  border: none;
}
.amount-group legend {
  margin-bottom: var(--space-xs);
  padding: 0;
  font-weight: 700;
}
.amount-options {
  display: grid;
  gap: var(--space-sm);
}
.amount-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  margin: 0;
  padding: 10px var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 400;
  cursor: pointer;
}
.amount-option:has(input:checked) {
  border-color: var(--primary);
  font-weight: 700;
}
/* The label is the 44px target; the radio itself stays small (undo the big text-input base). */
.amount-option input[type="radio"] {
  display: inline-block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
}

/* The optional message: the same field styling as the text inputs. */
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0 0 var(--space-md);
  padding: 10px var(--space-md);
  font: inherit;
  font-size: 1.125rem;
  border: 2px solid var(--muted);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
textarea:focus {
  border-color: var(--focus);
}

/* The fee box on the give step: the total stands out, the notes stay quiet. */
.fee-box p {
  margin: 0 0 var(--space-xs);
}
.fee-box p:last-child {
  margin-bottom: 0;
}
.fee-box .fee-total {
  font-weight: 700;
}

/* The send step (G-02b): one full-width button per way to give, the title over its hint. */
.send-options {
  display: grid;
  gap: var(--space-sm);
  margin: 0 0 var(--space-md);
}
.button.option {
  margin: 0;
  text-align: left;
}
.option-title {
  display: block;
  font-weight: 700;
}
.option-hint {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}
.badge {
  display: inline-block;
  margin-left: var(--space-sm);
  padding: 2px var(--space-sm);
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.8rem;
  vertical-align: middle;
}

/* Rows of bank details or the one-time address, each with a copy button that stays 44px. */
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 44px;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}
.copy-text {
  min-width: 0;
}
.copy-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}
.copy-value {
  display: block;
  font-weight: 700;
}
.button.copy {
  width: auto;
  flex-shrink: 0;
  margin: 0;
}
/* The reference: its label, then the code in large type, then its own copy button. */
.reference-label {
  margin: var(--space-lg) 0 var(--space-xs);
  font-weight: 700;
  color: var(--text);
}
.reference-code {
  margin: 0 0 var(--space-sm);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.reference-code + .button.copy {
  margin-bottom: var(--space-md);
}

/* The strong boxes: the reference warning (bank) and the network warning (crypto). */
.warning {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 700;
}

/* Back: a quiet text button under every step after the first. */
.link.back {
  margin-top: var(--space-lg);
}
