/* Ferrous Design hub: the sign-in pages. The page shell has its own stylesheet, app.css.
   Light and dark follow the device setting. Since 00.35.00 (GS-32) the tokens carry app.css's names for the same parts
   (the card is the panel, a field the second panel, the button the highlight), each with the value it had, so a pad's
   theme (data/theme.json, core/site_look.py) dresses these pages as it dresses the shell; with no theme they look as
   they always have. */

:root {
  color-scheme: light dark;
  --bg: #f5f5f2;
  --panel: #ffffff;
  --text: #1f201d;
  --muted: #66675f;
  --line: #dcdbd4;
  --panel-2: #fbfbf9;
  --accent: #2b5b86;
  --on-accent: #ffffff;
  --highlight: var(--accent);
  --on-highlight: var(--on-accent);
  --trim: var(--accent);
  --link: var(--trim);
  --warn-soft: #f7eddb;
  --bad: #9f3528;
  --radius: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --site-font: var(--sans);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131412;
    --panel: #1b1c19;
    --text: #e7e7e2;
    --muted: #a0a198;
    --line: #34352f;
    --panel-2: #161714;
    --accent: #8fb8de;
    --on-accent: #0d1620;
    --warn-soft: #33291a;
    --bad: #f0958a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--sans);
  overflow-wrap: anywhere;
}
a { color: var(--link); text-underline-offset: 2px; }
h1 { line-height: 1.25; margin: 0 0 12px; font-size: 1.4rem; font-family: var(--site-font); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.auth { display: flex; justify-content: center; padding: 10vh 16px 32px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.auth-site { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.stack { display: grid; gap: 8px; margin: 16px 0; }
label { font-weight: 600; font-size: .95rem; }
input[type=email], input[type=text] {
  width: 100%; font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.code-input { font-family: var(--mono); font-size: 1.35rem; letter-spacing: .25em; }
.button {
  margin-top: 4px; padding: 10px 14px; font: inherit; font-weight: 600;
  color: var(--on-highlight); background: var(--highlight); border: 0; border-radius: 8px; cursor: pointer;
}
/* "Sign in with Ferrous Design" is a link that looks like the button. */
a.button { display: block; text-align: center; text-decoration: none; }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
.field-error { margin: 0; color: var(--bad); font-size: .95rem; }
.notice {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 8px;
  background: var(--warn-soft); font-size: .95rem;
}
/* Selected text in a theme's own colours (GS-32): only when the pad's theme sets selection and on-selection. */
.has-theme-selection ::selection { color: var(--on-selection); background: var(--selection); }
