/* 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");
}

/* The account site's look (MR 6c-2, matched to the W6 "Plan and billing" board) on the MR 6c-1
   baseline: design tokens, 44px targets, a visible focus ring, AA contrast light and dark, and no
   sideways scroll from 320px up. Self-hosted Roboto Mono (400 and 700) comes from the Lead-owned
   stylesheet; this file never loads anything and never writes text. */
: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;
  }
}
