/* STANAGELOG public surface on log.stanage.org: Google sign-in and the welcome questions.
   Linked as /static/stanage-rack.css?v=32.
   Off-white canvas, bold type, strong CTAs. A notice sits on the status dot.
   Sign-in and welcome stay in their cards. Type is self-hosted Libre Caslon.
   Brand names are Fragment Mono. */
/* swap paints Georgia first, then the file from this origin. */
@font-face {
  font-family: "Libre Caslon Text";
  src: url("/static/fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("/static/fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("/static/fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Display";
  src: url("/static/fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("/static/fonts/fragment-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("/static/fonts/fragment-mono-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
:root {
  --bg: #faf9f7;
  --bg-deep: #f3f1ec;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #0a0a0a;
  --muted: #555550;
  --faint: #8a8a85;
  --line: #d8d4cc;
  --line-strong: #d8d4cc;
  --sage: #1f4d32;
  --sage-deep: #173a26;
  --sage-soft: #2f6b46;
  --danger: #ef4444;
  --danger-soft: #ef444426;
  --shadow: 0 24px 60px rgba(17, 17, 16, 0.08);
  --shadow-sm: 0 10px 30px rgba(17, 17, 16, 0.05);
  --radius: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Libre Caslon Text", Georgia, serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, .auth-title {
  font-family: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
}
a { text-decoration: none; color: inherit; }
/* Brand names. GO and RACK use the italic file when they sit in em. */
.wordmark,
.site-wordmark {
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.wordmark em,
.site-wordmark em { font-style: italic; font-weight: 400; color: #1f4d32; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .wordmark em,
  html:not([data-theme="light"]) .site-wordmark em { color: #5fa77a; }
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0a0a;
    --bg-deep: #0a0a0a;
    --surface: #141414;
    --ink: #ffffff;
    --ink-soft: #ffffff;
    --muted: #aaaaaa;
    --faint: #8a8a85;
    --line: #2a2a2a;
    --line-strong: #2a2a2a;
    --danger: #ef4444;
    --danger-soft: #ef444426;
  }
}
/* The shared stanage_theme cookie can pick dark on a light device.
   stanage-theme.js then sets data-theme="dark", and these match the block above. */
html[data-theme="dark"] .wordmark em,
html[data-theme="dark"] .site-wordmark em { color: #5fa77a; }
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-deep: #0a0a0a;
  --surface: #141414;
  --ink: #ffffff;
  --ink-soft: #ffffff;
  --muted: #aaaaaa;
  --faint: #8a8a85;
  --line: #2a2a2a;
  --line-strong: #2a2a2a;
  --danger: #ef4444;
  --danger-soft: #ef444426;
}
.wordmark strong,
.site-wordmark strong { font-weight: 400; font-style: normal; }

/* Nav */
.kit-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.kit-nav-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1.5rem;
  min-height: 4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.kit-nav-brand { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.kit-nav-logo { font-size: 1.15rem; color: var(--ink); }
.kit-nav-logo:hover { color: var(--sage-deep); }

/* Buttons — pill CTAs like stanage.org. Sign-in and welcome use these. */
.hero-btn {
  display: inline-block; font-size: 1rem; font-weight: 600;
  padding: 0.95rem 1.55rem; border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1.5px solid transparent; cursor: pointer;
  text-align: center;
}
.hero-btn-primary { background: var(--ink); color: #faf9f7; box-shadow: var(--shadow-sm); }
.hero-btn-primary:hover { background: #000; color: #fff; transform: translateY(-2px); }
.hero-btn-ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.hero-btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.hero-btn-sm { padding: 0.55rem 1.1rem; font-size: 0.92rem; }

/* Shared label on the public pages. */
.section-label {
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--sage); margin-bottom: 1.1rem;
}

/* Auth */
body.page-auth { overflow: auto; }
.auth-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.auth-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem 3rem;
}
.auth-card {
  width: 100%; max-width: 26rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 1.6rem; padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow);
}
/* Sign-in error only. The words sit on the page ground, not in the
   white card. Side inset belonged to that card; the page gutter on
   .auth-main (1.5rem, 24px) is the left edge. Sign-in and welcome
   do not use this class, so their cards stay. */
.auth-card.auth-card--plain {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}
.auth-card .site-wordmark { font-size: 1.15rem; display: inline-block; margin-bottom: 1.5rem; }
.auth-title {
  font-size: 2rem; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 0.45rem; color: var(--ink);
}
.auth-sub { color: var(--muted); font-size: 1rem; margin: 0 0 1.5rem; line-height: 1.55; }
.auth-error {
  background: var(--danger-soft); color: var(--danger);
  border-radius: 0.9rem; padding: 0.75rem 0.9rem; font-size: 0.9rem;
  margin-bottom: 1.1rem;
}
.auth-label {
  display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.45rem;
}
.auth-input {
  width: 100%; font-size: 1rem;
  padding: 0.8rem 0.95rem; border: 1px solid var(--line-strong); border-radius: 0.9rem;
  background: #fff; color: var(--ink); margin-bottom: 1rem;
}
.auth-input:focus {
  outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage);
}
.auth-input.code {
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}
.auth-submit {
  width: 100%; margin-top: 0.35rem; border: none;
}
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: 0.95rem; color: var(--muted); }
.auth-foot a { color: var(--sage-deep); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-foot + .auth-foot { margin-top: 0.55rem; }
/* STANAGE stays roman. RACK is the italic em. */
.site-wordmark.stanagerack strong { font-weight: 400; font-style: normal; }
.site-wordmark.stanagerack em { font-style: italic; font-weight: 400; }

:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .auth-card {
    animation: rise-in 0.7s cubic-bezier(.22, .7, .25, 1) both;
  }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Welcome questions. One card, same type and buttons as sign-in.
   The options are large enough to tap on a phone. */
.auth-card.welcome-card { max-width: 34rem; }
.welcome-q {
  border: 0;
  padding: 0;
  margin: 0 0 1.15rem;
}
.welcome-q legend {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 0.35rem;
  padding: 0;
}
.welcome-q legend em { font-style: italic; font-weight: 500; }
.welcome-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.15rem 0;
  font-size: 1rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.welcome-option input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--sage);
  flex-shrink: 0;
}
.welcome-name { margin-top: 0.15rem; }
.welcome-skip {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.45rem;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
}
.welcome-skip:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-title em { font-style: italic; font-weight: 500; }

/* Same reserved dot as the signed-in shell. Fixed size, fixed card. */
.link-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.link-status-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f8f5a;
}
.link-status[data-tone="clear"] .link-status-dot { background: #3f8f5a; }
.link-status[data-tone="waiting"] .link-status-dot { background: #c9761e; }
.link-status[data-tone="failed"] .link-status-dot { background: #b42318; }
.link-status:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.link-status-card {
  position: fixed;
  z-index: 80;
  width: min(280px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  line-height: 1.45;
}
.link-status-card[hidden] { display: none !important; }
.link-status-card p { margin: 0; }
.link-status-card p + p { margin-top: 0.45rem; }
@media (max-width: 640px) {
  .auth-card.welcome-card { padding: 1.35rem 1.1rem 1.2rem; }
  .welcome-q legend { font-size: 1rem; }
}

/* wordmark-org:begin */
/* wordmark-org: the organisation name, THESTANAGEPROJECT.
   Markup (one snippet everywhere, see docs/brand/wordmark-org.md):
     <span class="wordmark wm-org"><i>THE</i><b>STANAGE</b><i>PROJECT</i></span>
   STANAGE is bold. THE and PROJECT are italic at normal weight. Caps, no
   spaces, one colour (the colour of the text around it). Size, letter-spacing
   and font come from the surrounding .wordmark rule, so it fits any line.
   It uses <i> and <b>, not <em> and <strong>, so the older .wordmark em and
   .wordmark strong rules (accent colours, normal weight) never touch it.
   Edit docs/brand/wordmark-org.css, then run scripts/sync_wordmark_css.py. */
.wordmark.wm-org {
  text-transform: none;
  white-space: nowrap;
  font-variant-caps: normal;
  line-height: 1; /* the name never makes its line taller */
}
.wordmark.wm-org b {
  font-weight: 700;
  font-style: normal;
  letter-spacing: inherit;
  color: inherit;
}
.wordmark.wm-org i {
  font-weight: 400;
  font-style: italic;
  letter-spacing: inherit;
  line-height: 1;
  color: inherit;
}
/* wordmark-org:end */
