/* Declared here as well as in style.css, because the sign-in page loads this
   sheet on its own. Same relative path, same versioned directory, so the
   browser fetches the file once and reuses it for the portal. */
@font-face{
  font-family:"Plex Sans"; src:url("fonts/plex-sans-var.woff2") format("woff2");
  font-weight:100 700; font-style:normal; font-display:swap;
}

/* PulseEcho sign-in.
   The palette, the glassy card and the wave field are ported from the original
   PulseEcho front end at /var/www/hydrowatch — same colours, same shapes, now
   in front of authentication that actually works. Its own stylesheet rather than
   an override of the portal's: that one is dark-first and built for a wall, this
   one is a single bright page, and making one set of tokens serve both would
   compromise each. */
/* Retuned to the mark on 2026-10-03. These were ported from the old front end
   and were a different product's palette: a mid blue page under a near white
   card, with the brand nowhere in it. Every value below now comes from
   doc/brand/pulse-echo-master.svg, so the page, the water and the portal behind
   the sign-in all agree. */
:root{
  --hydro-deep:#03152C;    /* the master's outer ground */
  --hydro-medium:#1677FF;  /* where the trace starts */
  --hydro-light:#14C7F2;   /* the node */
  --hydro-mint:#19F0D2;    /* the outermost arc */
  --hydro-pale:#EAF2FF;
  --hydro-ground:#061F40;  /* the page, the same value style.css calls --bg */
  --ink:#EAF2FF;
  --dim:#8EA8CE;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--hydro-ground);
  color:var(--ink);
  font:15px/1.5 "Plex Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  -webkit-text-size-adjust:100%;
  overflow:hidden;
}

/* ---------- the water ----------
   Three layered waves, each a wide SVG drifting sideways at its own speed. The
   original used a Next.js animation loop; this is the same look with nothing to
   load and nothing to run — CSS transforms the compositor handles on its own. */
.sea{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:0}
.sea svg{position:absolute;bottom:0;left:0;width:220%;height:58vh;min-height:320px}
.sea .w1{animation:drift 26s linear infinite;opacity:.30}
.sea .w2{animation:drift 38s linear infinite reverse;opacity:.22}
.sea .w3{animation:drift 52s linear infinite;opacity:.45}
@keyframes drift{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* Respect a stated preference for stillness — the waves are decoration, and
   decoration should never be the reason somebody cannot use a login form. */
@media (prefers-reduced-motion:reduce){
  .sea .w1,.sea .w2,.sea .w3{animation:none}
}

/* ---------- layout ---------- */
.wrap{position:relative;z-index:10;min-height:100%;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:48px 16px}
.box{width:100%;max-width:28rem;animation:rise .8s cubic-bezier(.2,.7,.3,1) both}
@keyframes rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

/* ---------- mark ---------- */
.mark{text-align:center;margin-bottom:22px}
/* The mark is 1.83:1, so the box is too -- object-fit would letterbox it
   otherwise, and the sign-in page is the one place it is shown large. */
.logo{width:230px;height:126px;margin:0 auto 2px}
.logo img{width:100%;height:100%;object-fit:contain;display:block}
.mark h1{font-size:24px;font-weight:700;color:#fff;letter-spacing:.03em;margin:0}
.mark p{margin:6px 0 0;color:rgba(255,255,255,.75);font-size:13.5px}

/* ---------- card ----------
   This was a near white glass panel floating on the navy. It was the light
   theme's card sitting on the dark theme's background, and that mismatch, more
   than any single element, was what made the page look unfinished: the product
   it introduces is navy, and the first thing anyone sees was a pale slab.
   It is now the same ground as the mark, lifted and blurred. */
.card{position:relative;border-radius:16px;border:1px solid rgba(120,180,255,.18);
  background:rgba(10,49,95,.55);backdrop-filter:blur(14px) saturate(120%);
  box-shadow:0 24px 48px -12px rgba(2,12,28,.55),
             inset 0 1px 0 rgba(255,255,255,.07);
  padding:28px 26px}

label{display:block;font-size:13px;font-weight:500;letter-spacing:.01em;
  color:rgba(234,242,255,.72);margin-bottom:7px}
.field{position:relative;margin-bottom:18px}
.field svg.lead{position:absolute;left:12px;top:50%;transform:translateY(-50%);
  width:19px;height:19px;color:rgba(142,168,206,.75);pointer-events:none}
/* `email` joined the list on 2026-10-11, when /signup gained an address
   field. This stylesheet had only ever dressed the two types /login uses, so
   the new input arrived with no width, no padding and the leading icon sitting
   on top of its placeholder -- which is what an attribute selector does when a
   page grows a type it was not told about. Found by screenshotting the page,
   not by reading it. */
input[type=text],input[type=password],input[type=email]{
  width:100%;border-radius:10px;border:1px solid rgba(120,180,255,.22);
  background:rgba(3,21,44,.5);padding:.8rem 1rem .8rem 2.7rem;
  color:#EAF2FF;font:inherit;
  transition:border-color .18s,box-shadow .18s,background .18s}
input::placeholder{color:rgba(142,168,206,.55)}
input[type=text]:focus,input[type=password]:focus,input[type=email]:focus{
  border-color:#14C7F2;background:rgba(3,21,44,.72);outline:2px solid transparent;
  box-shadow:0 0 0 3px rgba(20,199,242,.22)}
.peek{position:absolute;right:10px;top:50%;transform:translateY(-50%);
  background:none;border:0;padding:4px;cursor:pointer;
  color:rgba(142,168,206,.75);line-height:0}
.peek:hover{color:#14C7F2}
.peek svg{width:20px;height:20px}

/* The one loud thing on the page, and it is the thing you came to press. The
   gradient is the mark's own, running the same direction the signal travels. */
button.go{width:100%;border:0;border-radius:10px;cursor:pointer;
  background:linear-gradient(90deg,#1677FF,#14C7F2);color:#04203f;
  font:inherit;font-weight:700;font-size:15px;letter-spacing:.01em;
  padding:.85rem 1rem;
  box-shadow:0 8px 22px -6px rgba(20,199,242,.45);
  transition:filter .15s,transform .06s}
button.go:hover{filter:brightness(1.07)}
button.go:active{transform:translateY(1px)}

.err{background:rgba(217,79,79,.14);border:1px solid rgba(217,79,79,.45);
  color:#ffc9c9;padding:10px 13px;border-radius:10px;font-size:13.5px;
  margin-bottom:18px}
.foot{text-align:center;margin-top:16px;font-size:12.5px;
  color:rgba(234,242,255,.5)}

/* ---------- keep me signed in, and the honest answer about resets ---------- */
/* Deliberately not positioned: the panel below anchors to the card, and a
   position here would quietly make this the offset parent instead, dropping the
   panel over the Sign in button. */
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:-4px 0 18px}

.tick{display:flex;align-items:center;gap:8px;margin:0;cursor:pointer;
  font-size:13px;color:rgba(234,242,255,.78);user-select:none}
.tick input{width:16px;height:16px;margin:0;cursor:pointer;accent-color:#14C7F2;
  flex:none}

/* Static on purpose: the panel below anchors to the card, not to this summary.
   Anchored here it dropped straight over the Sign in button, which is the one
   element on the page it must never cover. */
/* An anchor since 2026-10-11, where this was a <details> whose summary
   explained that an administrator resets your password. /forgot exists now, so
   the explanation it opened would be untrue -- and a disclosure that reveals
   one sentence was always a lot of machinery for a link. The selectors below
   are deliberately on `.forgot` itself rather than on a child, so a future
   change of element does not silently un-style it the way removing the
   <summary> just did. */
.forgot{position:static;cursor:pointer;font-size:13px;color:#5FD0F5;
  white-space:nowrap;text-decoration:none}
.forgot:hover{color:#19F0D2;text-decoration:underline}
.forgot:focus-visible{outline:2px solid #14C7F2;outline-offset:3px;
  border-radius:4px}

/* The two public pages that are a message rather than a form: /forgot after it
   has accepted an address, which must read the same whether or not that
   address exists. Matches .err's shape so the card does not jump between the
   two states. */
.ok{background:rgba(25,240,210,.10);border:1px solid rgba(25,240,210,.34);
  border-radius:12px;padding:13px 15px;font-size:13px;line-height:1.5;
  color:rgba(234,242,255,.9)}
.ok b{display:block;margin-bottom:4px;color:#EAF2FF;font-weight:600}
.foot a{color:#5FD0F5;text-decoration:none}
.foot a:hover{color:#19F0D2;text-decoration:underline}


/* ---------- phones ---------- */
@media (max-width: 560px) {
  .wrap{padding:28px 16px calc(28px + env(safe-area-inset-bottom))}
  /* Defensive, not a fix for an observed bug. A flex item's automatic minimum
     size is its content, so the two labels in the tick row cannot shrink below
     their own text and could push the card wider than a narrow viewport. I
     reported this as a real overflow and that was wrong: headless Chrome clamps
     its viewport to 500px and then crops the screenshot to the width asked for,
     which is indistinguishable from an overflow. Measured properly afterwards,
     scrollWidth equals clientWidth and nothing overflows. These rules stay
     because they are right, and the claim that they repaired something does
     not. */
  .box{max-width:min(28rem,100%)}
  .row{flex-wrap:wrap;gap:10px 12px}
  .tick,.forgot{min-width:0}
  .forgot summary{white-space:normal}
  .logo{width:190px;height:104px}
  .card{padding:22px 18px}
  /* 16px or mobile Safari zooms the page the moment the field is focused. */
  input[type=text],input[type=password],input[type=email]{font-size:16px}
  button.go{min-height:46px}
  .sea svg{height:46vh}
}
