/*
 * Server pages (sign-in, sign-up, account, plans, about, legal, errors). Plain, accessible,
 * no scripts. Every colour, radius and size comes from tokens.css (generated from
 * design/tokens/tokens.json, linked first); no hex values here. Light or dark follows the system.
 */
/* Lexend (SIL OFL 1.1), self-hosted like the app's; the licence is in LICENSES/ and on /about/. */
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lexend-latin-400-normal.deb3728b3468.woff2") format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/lexend-latin-600-normal.9b13427c526f.woff2") format('woff2'); }
/* Lexend has no Cyrillic: Andika's (SIL OFL 1.1) fills the 'Lexend' family for Ukrainian and Russian (LB5). */
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/andika-cyrillic-400-normal.297a9cc3cc1b.woff2") format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/andika-cyrillic-700-normal.0d7650e258f9.woff2") format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); line-height: var(--leading-normal);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-thickness: 2px; } }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: var(--space-2) var(--space-4); z-index: 10; border-radius: var(--radius-md); }
.site-header, .site-footer {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: center;
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line);
}
.site-footer { border-bottom: 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: var(--text-sm); }
.site-footer a { color: var(--ink-soft); }
.brand {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: var(--weight-bold); font-size: 1.1rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink); margin-right: auto; min-height: var(--target);
}
.brand img { display: block; width: auto; height: 1.6rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); align-items: center; }
.inline-form { display: inline; margin: 0; }
/* The interface languages (LB5): in the footer, and at the top of sign-in and sign-up. */
main { max-width: 44rem; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-12); }
main.narrow { max-width: 28rem; }
h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: -0.015em; margin: var(--space-2) 0 var(--space-4); }
h2 { font-size: var(--text-xl); line-height: var(--leading-tight); margin: var(--space-8) 0 var(--space-2); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.field { margin: 0 0 var(--space-4); }
.field label { display: block; font-weight: var(--weight-bold); margin-bottom: var(--space-1); }
.field.checkbox { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) 0.6rem; align-items: start; }
.field.checkbox label { font-weight: var(--weight-regular); margin: 0; }
.field.checkbox .errorlist, .field.checkbox .help { grid-column: 1 / -1; }
.field.checkbox input { width: 1.4rem; height: 1.4rem; margin-top: 0.15rem; accent-color: var(--primary); }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; min-height: var(--target); padding: var(--space-2) var(--space-3); font: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
}
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--target); padding: 0.55rem var(--space-5); font: inherit; font-weight: var(--weight-bold);
  color: var(--on-primary); background: var(--primary); border: 1px solid var(--primary); border-radius: var(--radius-pill);
  cursor: pointer; text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  button:hover, .button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
}
button.link {
  min-height: var(--target); padding: 0 var(--space-1); background: none; border: 0; border-radius: var(--radius-sm);
  color: inherit; font-weight: var(--weight-regular); text-decoration: underline; text-underline-offset: 0.18em;
}
@media (hover: hover) and (pointer: fine) { button.link:hover { background: none; text-decoration-thickness: 2px; } }
button.link[aria-pressed="true"] { color: var(--ink); font-weight: var(--weight-bold); text-decoration: none; }
.errorlist { list-style: none; margin: var(--space-1) 0; padding: 0; color: var(--error); font-size: 0.95rem; }
.help, .muted { color: var(--ink-soft); font-size: var(--text-sm); }
.notice {
  border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-6);
  background: var(--warning-bg); color: var(--ink);
}
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
pre.license {
  white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.45;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4);
}
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th, td { text-align: left; padding: 0.4rem var(--space-2); border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; hyphens: auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
