/* Batch ACCT-3: shared signed-out account pages and admin console styling.
   Signed-out pages cannot load private /assets/system.css through the gate, so
   this small fallback contains only the tokens they use. */
@font-face {
  font-family: Cinzel;
  font-style: normal;
  font-weight: 600;
  font-display: block; /* Batch BRANDSTEADY-1: never paint the wordmark in a fallback serif; preloaded by each page */
  src: url('/assets/fonts/cinzel-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/inter-var-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-var-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
}

body:not(.admin-page) {
  --abyss: #050A12;
  --ink: #0B1321;
  --hull: #132335;
  --brass: #B08D57;
  --brass-hi: #D0A850;
  --squall: #4FD1E0;
  --foam: #C6E1EA;
  --fog: #94A4B0;
  --ice: #E6F0F4;
  --line: rgba(176,141,87,0.18);
  --line-strong: rgba(176,141,87,0.30);
  --steel: #2A3F58;
  --danger: #E05A5A;
  --warn: #F0B84A;
  --ok: #6BD98A;
  --font-body: Inter,-apple-system,system-ui,sans-serif;
  --font-display: Cinzel,Georgia,serif;
  --font-mono: 'JetBrains Mono',monospace;
  --track-caps: .24em;
  --track-label: .18em;
  --track-mono: .04em;
  --r-sm: 3px;
  --r-md: 6px;
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--steel) transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--steel);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-track { background: transparent; }

::selection {
  background: var(--squall-dim, #2B7F8A);
  color: var(--ice, #E6F0F4);
}

html {
  min-height: 100%;
  background: var(--abyss, #050A12);
}

body:not(.admin-page) {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 24px 16px;
  display: grid;
  place-items: center;
  color: var(--foam);
  background: var(--abyss);
  font-family: var(--font-body);
}

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

.card {
  width: min(100%, 380px);
  padding: clamp(22px, 7vw, 34px);
  background: var(--ink);
  border: 1px solid var(--line-strong);
}

/* Batch WEBLOGIN-1: the marketing site's water column behind the signed-out
   pages (website/css/muirwave.css "Background z-stack", same values). The
   whole stack lives in one fixed .backdrop under the card rather than at
   negative z-index, because this sheet paints <body>'s own background and a
   negative layer would sit underneath it. /water-column.js animates the
   two canvases; without it the wash and grain alone still render. */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.backdrop .stage { background: #050810; }
.backdrop .stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 48, 70, 0.38) 0%, rgba(30, 48, 70, 0.10) 45%, rgba(30, 48, 70, 0) 80%);
}
.backdrop #godrays { mix-blend-mode: screen; opacity: 0.85; }
.backdrop #abyss { mix-blend-mode: screen; }
.backdrop .grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
}
/* The card floats in the water. Batch LOOK-B1 (LOOK-1 concept 2, Jesse,
   2026-11-11, "as mocked up"): real glass, so the water and the animals
   passing behind it show through its edges, while the blur keeps anything
   behind the fields a soft smudge that never crosses their contrast. */
body.signed-out .card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: clamp(22px, 5vw, 34px);
  border-radius: 18px;
  border-color: rgba(198, 225, 234, 0.13);
  background: rgba(8, 15, 27, 0.62);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(230, 240, 244, 0.08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.brand-lockup img { width: auto; height: 22px; }
.wordmark { font: 600 21px/1 var(--font-display); letter-spacing: .045em; color: var(--brass-hi); }
.brand-sub { font-size: 9px; letter-spacing: var(--track-caps); color: var(--brass); text-transform: uppercase; }
body:not(.admin-page) h1 { margin: 0; color: var(--brass-hi); font: 600 clamp(22px, 7vw, 27px)/1.2 var(--font-display); }
.intro { margin: 14px 0 24px; color: var(--fog); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.card .brand-lockup { margin-bottom: 24px; }

body:not(.admin-page) form {
  display: grid;
  gap: 9px;
}

.card label {
  margin-top: 7px;
  color: var(--brass);
  font: 500 10px var(--font-mono);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

body:not(.admin-page) :is(input,select) {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--hull);
  color: var(--foam);
  font: 16px var(--font-body);
  caret-color: var(--squall);
  accent-color: var(--squall);
}

body:not(.admin-page) :is(input[type="checkbox"],input[type="radio"]) { width: auto; min-height: auto; accent-color: var(--squall); }
body:not(.admin-page) input[readonly] { background: transparent; border-color: var(--line); color: var(--fog); }
body:not(.admin-page) input[readonly]:focus { background: transparent; }

body:not(.admin-page) button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--brass-hi);
  border-radius: var(--r-sm);
  background: var(--brass-hi);
  color: var(--abyss);
  font: 600 14px var(--font-body);
  cursor: pointer;
  transition: background-color .18s,color .18s,border-color .18s,opacity .18s;
}

body:not(.admin-page) button:hover { background: var(--brass); }
body:not(.admin-page) button:active { opacity: .8; }
body:not(.admin-page) button:disabled { opacity: .55; cursor: not-allowed; }
.error { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--danger); color: var(--foam); font-size: 13px; }

/* Batch ACCT-5: the admin page has its own sheet, /auth/admin.css (admin-gated).
   The element rules above are scoped to the signed-out pages so that sheet
   starts from a clean slate rather than overriding them. */
[hidden] { display: none !important; }

.sign-in-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--foam); text-decoration: none; font: 600 14px var(--font-body); }
.sign-in-link:hover { background: transparent; border-color: var(--brass); color: var(--ice); }

/* Batch PWRESET-1: the quiet way to /forgot, under the sign-in form. */
.card .forgot-row { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; margin: 4px 0 -8px; }
.forgot-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--fog); font: 14px var(--font-body);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.forgot-link:hover { color: var(--foam); text-decoration-color: var(--brass); }

/* ---- LOOK-B1 glass card (LOOK-1 concept 2, the review page's proposed card) ----
   The same words and fields. The lockup is given room and a soft brass glow;
   the heading, labels and intro move to Inter for reading; fields and button
   take a 10 px radius; a focused field is lit in squall rather than outlined
   (a transparent outline keeps it marked where shadows are dropped, as in
   forced colours). Every rule here is the signed-out pages' alone: the admin
   page keeps its own look. */
body.signed-out .card .brand-lockup { flex-direction: column; gap: 12px; margin-bottom: 26px; }
body.signed-out .brand-lockup img { height: 40px; filter: drop-shadow(0 0 18px rgba(208, 168, 80, 0.35)); }
body.signed-out .wordmark { font-size: 30px; text-shadow: 0 0 30px rgba(208, 168, 80, 0.28); }
body.signed-out .brand-sub { display: inline-flex; align-items: center; gap: 12px; font-size: 10px; line-height: 1; }
body.signed-out .brand-sub::before,
body.signed-out .brand-sub::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
body.signed-out h1 { color: var(--ice); font: 600 19px/1.2 var(--font-body); }
body.signed-out .card .intro { margin: 8px 0 18px; }
body.signed-out .card label { color: var(--fog); font: 500 12.5px var(--font-body); letter-spacing: .01em; text-transform: none; }
body.signed-out :is(input,select) {
  min-height: 48px;
  border-color: rgba(148, 164, 176, 0.24);
  border-radius: 10px;
  background: rgba(19, 35, 53, 0.62);
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
body.signed-out :is(input,select):focus {
  outline: 2px solid transparent;
  outline-offset: 0;
  border-color: var(--squall);
  background: rgba(19, 35, 53, 0.9);
  box-shadow: 0 0 0 4px rgba(79, 209, 224, 0.14), 0 0 24px rgba(79, 209, 224, 0.12);
}
body.signed-out input[readonly],
body.signed-out input[readonly]:focus { background: transparent; }
body.signed-out button {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  margin-top: 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  box-shadow: 0 8px 24px rgba(208, 168, 80, 0.22);
  transition: transform .14s, box-shadow .2s, opacity .18s;
}
body.signed-out button:hover { background: linear-gradient(180deg, var(--brass-hi), var(--brass)); }
body.signed-out button:disabled { box-shadow: none; }
/* Under a pointer that hovers (never a tap, which would leave it stuck), the
   button lifts and a sheen crosses it, once. */
body.signed-out button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
@media (hover: hover) {
  body.signed-out button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(208, 168, 80, 0.36); }
  body.signed-out button:hover:not(:disabled)::after { transform: translateX(120%); transition: transform .7s ease; }
}
body.signed-out .sign-in-link { min-height: 48px; border-radius: 10px; }
body.signed-out .error { border-radius: 10px; }
@media (prefers-reduced-motion: reduce) {
  body.signed-out button:hover:not(:disabled) { transform: none; }
  body.signed-out button::after { display: none; }
}
/* Where transparency is reduced, or the browser cannot blur behind the card,
   the glass turns near-opaque so nothing sharp crosses the fields. */
@media (prefers-reduced-transparency: reduce) {
  body.signed-out .card { background: rgba(8, 15, 27, 0.92); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.signed-out .card { background: rgba(8, 15, 27, 0.92); }
}
/* ---- end LOOK-B1 ---- */

/* ---- Batch SEA-1: the shared sea along the top of the window (/auth/sea/), over the water column ----
   Its sky is opaque, so the light, the snow and the animals stay under the waterline. The weather sets the
   light in the water, as on muirwave.com. The card keeps clear of the sky on a short window. */
body.signed-out { padding-top: calc(var(--sea-line, 0px) + 28px); }
body.signed-out > .mw-sea { position: fixed; z-index: 0; }
body.signed-out .backdrop .stage::before {
  background:
    radial-gradient(ellipse 44% 58% at var(--sea-bloom-x, 50%) var(--sea-line, 0px),
      rgb(var(--sea-pool-rgb, 181 170 127) / var(--sea-pool-a, 0)) 0%,
      rgb(var(--sea-pool-rgb, 181 170 127) / 0) 100%),
    linear-gradient(180deg,
      rgb(var(--sea-wash-rgb, 30 48 70) / var(--sea-wash-a, 0.38)) 0%,
      rgb(var(--sea-wash-rgb, 30 48 70) / calc(var(--sea-wash-a, 0.38) * 0.26)) 45%,
      rgb(var(--sea-wash-rgb, 30 48 70) / 0) 80%);
}
body.signed-out .backdrop #godrays { opacity: calc(0.85 * var(--sea-shafts, 1)); }
/* ---- end SEA-1 ---- */

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
