/* The web pages in the app's look, RecipeApp's "Editorial" (docs/build-plans/fas-k-design-editorial.md,
   decision D5; the app's mobile/lib/ui/theme.dart): warm Paper and Ink, Fraunces for headings and
   Inter for text, one ink-blue accent for what can be tapped, cards with 20 px corners, round
   buttons and filled fields. The fonts are subsets (Latin, Swedish) served from here, SIL OFL. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/Fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f1e4; /* Paper: flat, the card is set apart by a hairline */
  --card: #f7f1e4;
  --field: #efe7d6;
  --text: #1b1712;
  --muted: #6b6053;
  --border: #e4dac8;
  --accent: #3d5a80;
  --accent-text: #ffffff;
  --error-bg: #f6e1da;
  --error-text: #8a1c11;
  --warning-bg: #f4e7c8;
  --warning-text: #5e4200;
  --notice-bg: #e3e7ee;
  --notice-text: #23395b;
  --danger: #b3261e;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120d; /* Ink */
    --card: #1f1a14;
    --field: #2a231c;
    --text: #f6efe4;
    --muted: #b8aa97;
    --border: #3a322a;
    --accent: #a9c7f2;
    --accent-text: #10131a;
    --error-bg: #3b1d19;
    --error-text: #ffb4a8;
    --warning-bg: #3a2e12;
    --warning-text: #f3d68c;
    --notice-bg: #1d2633;
    --notice-text: #c6dbf3;
    --danger: #ff8a80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 400px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* The eyebrow: small capitals in the accent, above the heading. */
.brand {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0 0 20px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  font-variation-settings: "opsz" 28, "SOFT" 0, "WONK" 1;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h3 {
  margin: 24px 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  font-variation-settings: "opsz" 20, "SOFT" 0, "WONK" 1;
}

label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; }

input, select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid transparent;
  border-radius: 12px;
}

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  width: 100%;
  margin-top: 22px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 999px; /* stadium, as the app's buttons */
  cursor: pointer;
}

button.secondary { margin-top: 10px; color: var(--text); background: transparent; border: 1px solid var(--border); }

.redirect-host {
  margin: 0 0 16px;
  padding: 10px 14px;
  font: 600 17px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--field);
  border-radius: 12px;
  word-break: break-all;
}

.warning { padding: 10px 14px; color: var(--warning-text); background: var(--warning-bg); border-radius: 12px; font-size: 14px; }
.error { padding: 10px 14px; color: var(--error-text); background: var(--error-bg); border-radius: 12px; }
.notice { padding: 10px 14px; color: var(--notice-text); background: var(--notice-bg); border-radius: 12px; font-size: 14px; }

.muted { color: var(--muted); font-size: 14px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.center { text-align: center; }
a { color: var(--accent); text-underline-offset: 2px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }

.recovery-key {
  margin: 10px 0 6px;
  padding: 14px 12px;
  font: 600 18px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
  text-align: center;
  background: var(--field);
  border: 1px dashed var(--border);
  border-radius: 12px;
  word-break: break-word;
  user-select: all;
}

.recovery-key.token { font-size: 15px; letter-spacing: 0; word-break: break-all; }

/* QR codes need dark modules on a light background to scan, also in dark mode. */
.qr { width: 200px; margin: 12px auto; padding: 10px; background: #ffffff; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }

label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 18px; }
label.check input { width: auto; margin-top: 3px; accent-color: var(--accent); }

/* Lists as grouped cards with hairlines, as in the app's Konto. */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list li form.inline { margin: 0; flex-shrink: 0; }
.list li.member { flex-wrap: wrap; align-items: center; }
.list .actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.list .actions form.inline { display: flex; gap: 8px; align-items: center; }
.list .actions select { width: auto; padding: 4px 8px; font-size: 14px; border-radius: 8px; }
.list.spaced { margin-top: 22px; }

button.link { width: auto; margin: 0; padding: 0; font-weight: 400; color: var(--accent); background: none; border: 0; border-radius: 0; text-decoration: underline; text-underline-offset: 2px; }
button.danger { background: var(--danger); color: #ffffff; }
a.danger { color: var(--danger); }
a.button { display: block; padding: 13px 20px; text-align: center; font-weight: 600; text-decoration: none; color: var(--accent-text); background: var(--accent); border-radius: 999px; }

form.create { display: flex; gap: 8px; margin-top: 10px; }
form.create input { flex: 1; }
form.create button { width: auto; margin: 0; padding: 0 18px; }

.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
