/* =========================================================
   Retro terminal / BBS theme

   Loaded after the base auth.css (see view/static/auth.css and
   view/layout.html's {{if hasThemeCss}} include) so it only needs to
   override tokens and add a few retro touches — no layout.html or
   auth.css override required. Shared by the auth pages and the account
   dashboard (themes/retro/account/index.html links this file directly).
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --radius: 0;

  --color-bg: #f2f4ef;
  --color-body: #e6ebe2;
  --color-fg: #16241a;
  --color-muted: #4b5c4f;

  --color-primary-bg: #1f8f4d;
  --color-primary-fg: #f5fff7;
  --color-accent-bg: #eef2ea;
  --color-accent-fg: #16241a;
  --color-danger-bg: #c62828;
  --color-danger-fg: #fff5f5;
  --color-highlight: #0f766e;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a0d0a;
    --color-body: #10140f;
    --color-fg: #c9f7d2;
    --color-muted: #6f8f78;
    --color-primary-bg: #3ddc71;
    --color-primary-fg: #06110a;
    --color-accent-bg: #0f140f;
    --color-accent-fg: #c9f7d2;
    --color-danger-bg: #ff5c5c;
    --color-danger-fg: #170606;
    --color-highlight: #5eead4;
  }
}

[data-theme="light"] {
  --color-bg: #f2f4ef;
  --color-body: #e6ebe2;
  --color-fg: #16241a;
  --color-muted: #4b5c4f;
  --color-primary-bg: #1f8f4d;
  --color-primary-fg: #f5fff7;
  --color-accent-bg: #eef2ea;
  --color-accent-fg: #16241a;
  --color-danger-bg: #c62828;
  --color-danger-fg: #fff5f5;
  --color-highlight: #0f766e;
}

[data-theme="dark"] {
  --color-bg: #0a0d0a;
  --color-body: #10140f;
  --color-fg: #c9f7d2;
  --color-muted: #6f8f78;
  --color-primary-bg: #3ddc71;
  --color-primary-fg: #06110a;
  --color-accent-bg: #0f140f;
  --color-accent-fg: #c9f7d2;
  --color-danger-bg: #ff5c5c;
  --color-danger-fg: #170606;
  --color-highlight: #5eead4;
}

body {
  font-weight: 400;
  font-family:
    "IBM Plex Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    "Liberation Mono",
    monospace;
}

::selection {
  background-color: var(--color-primary-bg);
  color: var(--color-primary-fg);
}

/* The base layout renders an animated particle canvas behind the card;
   the retro theme replaces it with flat CRT scanlines instead. */
#canvas {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 3px
  );
}

.auth-title::after {
  content: "_";
  color: var(--color-primary-bg);
  margin-left: 2px;
}

.auth-label::before {
  content: "> ";
  color: var(--color-primary-bg);
}

.auth-error::before {
  content: "! ";
}

.consent-scope-item::before {
  content: "» ";
  color: var(--color-primary-bg);
}
