/* =========================================================== WolfTrack TR
   Sign in and sign up. Depends on css/tokens.css.
   ====================================================================== */

.auth-page{min-height:calc(100vh - 68px); display:grid; place-items:center; padding:48px 24px 72px}
.auth{width:100%; max-width:430px}
.auth-head{text-align:center; margin-bottom:28px}
.auth-head img{width:52px; height:52px; margin:0 auto 18px}
.auth-head h1{font-size:27px; margin-bottom:9px}
.auth-head p{color:var(--dim); font-size:15px}

.auth-card{
  background:var(--paper); border:1px solid var(--rule); border-radius:var(--r);
  padding:28px 26px; box-shadow:var(--shadow);
}

/* --------------------------------------------------------------- fields */
.field{margin-bottom:18px}
.field label{display:block; font-size:13.5px; font-weight:600; margin-bottom:7px}
.field input[type="email"],
.field input[type="password"],
.field input[type="text"]{
  width:100%; padding:12px 13px; border:1px solid var(--rule); border-radius:var(--r-sm);
  background:var(--paper); font-size:15px; transition:border-color .16s, box-shadow .16s;
}
.field input:focus{outline:none; border-color:var(--wine); box-shadow:var(--ring)}
.field input[aria-invalid="true"]{border-color:var(--down)}
.field input[aria-invalid="true"]:focus{box-shadow:0 0 0 3px rgba(198,65,58,.2)}
.field .err{
  display:block; min-height:0; font-size:13px; color:var(--down); margin-top:6px;
}
.field .err:empty{margin-top:0}
.field .hint{display:block; font-size:12.5px; color:var(--dim2); margin-top:6px}

.pw-wrap{position:relative}
.pw-wrap input{padding-right:58px}
.pw-toggle{
  position:absolute; right:5px; top:5px; bottom:5px; padding:0 11px;
  border:0; background:none; color:var(--dim); font-size:12.5px; font-weight:600;
  cursor:pointer; border-radius:6px;
}
.pw-toggle:hover{color:var(--wine); background:var(--panel2)}

/* ---------------------------------------------------------------- captcha
   One framed block, the way people know these: the picture on top, the box
   to type in and the "new picture" button under it (auth/captcha.js). */
.cap-box{border:1px solid var(--rule); border-radius:var(--r-sm); background:var(--paper); overflow:hidden}
.cap-img{display:grid; place-items:center; min-height:88px; padding:6px; background:var(--panel2);
         border-bottom:1px solid var(--rule)}
.cap-img img{display:block; width:100%; max-width:260px; height:auto; aspect-ratio:260/80; border-radius:4px}
.cap-img img[hidden]{display:none}
.cap-msg{font-size:13px; color:var(--dim); text-align:center; padding:0 10px}
.cap-row{display:flex; align-items:stretch}
/* same weight as .field input[type="text"] above, so no !important needed */
.field .cap-row input[type="text"]{
  flex:1; min-width:0; border:0; border-radius:0; padding:12px 13px;
  font:600 17px/1.2 var(--mono); letter-spacing:.18em; text-transform:uppercase;
}
.field .cap-row input[type="text"]::placeholder{font:400 14.5px/1.2 var(--sans); letter-spacing:0; text-transform:none; color:var(--dim2)}
.field .cap-row input[type="text"]:focus{box-shadow:inset 0 0 0 2px var(--wine)}
.field .cap-row input[aria-invalid="true"]{box-shadow:inset 0 0 0 2px var(--down)}
.cap-new{flex:0 0 48px; display:grid; place-items:center; border:0; border-left:1px solid var(--rule);
         background:var(--paper); color:var(--dim); cursor:pointer}
.cap-new:hover,.cap-new:focus-visible{color:var(--wine); background:var(--panel2)}
.cap-new:focus-visible{outline:2px solid var(--wine); outline-offset:-3px}

/* ------------------------------------------------------ strength readout
   Four blocks rather than a percentage, because a number invites arguing
   with it and blocks just say "keep going". */
.meter{display:flex; gap:5px; margin-top:9px}
.meter i{flex:1; height:4px; border-radius:2px; background:var(--rule); transition:background-color .2s}
.meter+.lvl{font-size:12.5px; color:var(--dim2); margin-top:7px; display:block}
.meter.s1 i:nth-child(-n+1){background:var(--down)}
.meter.s2 i:nth-child(-n+2){background:var(--warn)}
.meter.s3 i:nth-child(-n+3){background:var(--wine)}
.meter.s4 i{background:var(--up)}

/* ---------------------------------------------------------- checkbox row */
.check{display:flex; gap:11px; align-items:flex-start; margin-bottom:20px; font-size:13.5px;
       color:var(--dim); line-height:1.55}
.check input{margin-top:2px; width:17px; height:17px; accent-color:var(--wine); flex:0 0 auto}
.check a{font-weight:600}

/* --------------------------------------------------------------- notices */
.msg{
  border-radius:var(--r-sm); padding:12px 14px; font-size:14px; margin-bottom:18px;
  line-height:1.55; border:1px solid transparent;
}
.msg.bad {background:#FDF1F0; border-color:rgba(198,65,58,.35); color:#8E2A24}
.msg.good{background:#EFF8F3; border-color:rgba(23,122,78,.35); color:#0F5C39}
.msg.info{background:var(--rose-wash); border-color:var(--rose); color:var(--wine-deep)}

/* --------------------------------------------------------------- social */
.sep{display:flex; align-items:center; gap:14px; margin:22px 0; color:var(--dim2); font-size:12.5px}
.sep::before,.sep::after{content:""; flex:1; height:1px; background:var(--rule)}
.social{display:grid; gap:10px}
.social .btn{width:100%; border-color:var(--rule); background:var(--paper); font-weight:500}
.social .btn:hover{border-color:var(--ink); color:var(--ink)}

.auth-alt{text-align:center; margin-top:22px; font-size:14.5px; color:var(--dim)}
.auth-alt a{font-weight:600}
.auth-legal{text-align:center; margin-top:26px; font-size:12.5px; color:var(--dim2); line-height:1.6}

/* ------------------------------------------------------------- loading
   Shown while the journal's scripts come down on the way into /app. */
.loading{min-height:70vh; display:grid; place-items:center; text-align:center; padding:40px 24px}
.loading img{width:66px; height:66px; margin:0 auto 22px; animation:breathe 2.4s ease-in-out infinite}
@keyframes breathe{0%,100%{opacity:.55; transform:scale(.97)} 50%{opacity:1; transform:scale(1)}}
.loading h2{font-size:19px; margin-bottom:10px}
.loading p{color:var(--dim); font-size:14.5px}
.bar{width:220px; height:4px; border-radius:2px; background:var(--rule); margin:22px auto 0; overflow:hidden}
.bar i{display:block; height:100%; width:0; background:var(--grad); transition:width .25s}

/* ==================================================== verification code
   One field, not six boxes. Six boxes look clever and then fight every
   password manager, every paste of "Your code is 481920", and every screen
   reader. A single input with autocomplete="one-time-code" is what phones
   and mail clients actually know how to fill. */
/* .field input[type="text"] above is (0,2,1) and would win on font-size, so
   this is written at the same weight rather than reached for with !important */
.field input[type="text"].code-input{
  font:600 30px/1 var(--mono); letter-spacing:.34em; text-align:center;
  padding:16px 12px 16px 24px;            /* the tracking pushes the text right */
  text-indent:.34em;                      /* …so the last gap is pulled back */
}
.code-input::placeholder{color:var(--rule); letter-spacing:.34em}

/* ================================================================ legal */
.prose{max-width:720px; margin:0 auto; padding:56px 24px 88px}
.prose h1{font-size:32px; margin-bottom:10px}
.prose .upd{color:var(--dim2); font-size:13.5px; margin-bottom:38px}
.prose h2{font-size:20px; margin:38px 0 12px}
.prose p,.prose li{color:var(--dim); font-size:15.5px; line-height:1.72}
.prose p+p{margin-top:14px}
.prose ul{margin:14px 0; padding-left:22px; display:grid; gap:9px}
.todo{
  background:var(--rose-wash); border:1px solid var(--rose); border-left:4px solid var(--wine);
  border-radius:var(--r-sm); padding:16px 18px; margin:22px 0;
}
.todo b{display:block; color:var(--wine-deep); margin-bottom:8px; font-size:14px}
.todo li{font-size:14px; color:var(--ink)}
.todo b + p b,.todo p b{display:inline; margin:0; font-size:inherit}

/* the placeholders a reader has to find and replace — set apart so they are
   greppable on the page as well as in the file */
.prose code,.todo code{
  font:600 13px/1 var(--mono); background:var(--paper); color:var(--wine-deep);
  border:1px solid var(--rose); border-radius:5px; padding:2px 6px; white-space:nowrap;
}
/* quoted contract wording: this is the sentence the customer has to tick, so
   it is set as the object it is rather than folded into a paragraph */
.prose blockquote{
  margin:16px 0; padding:14px 18px; border-left:3px solid var(--wine);
  background:var(--panel2); border-radius:0 var(--r-sm) var(--r-sm) 0;
  color:var(--ink); font-size:15.5px; line-height:1.6; font-style:italic;
}
.prose .dim{color:var(--dim2); font-size:14px}
.prose .mono{font-family:var(--mono); font-size:14px}

/* the sub-processor table: who touches the data, stated as a table because a
   paragraph is where this kind of disclosure goes to hide */
.subs{width:100%; border-collapse:collapse; margin:16px 0; font-size:14px}
.subs th,.subs td{
  text-align:left; vertical-align:top; padding:10px 12px;
  border-bottom:1px solid var(--rule); color:var(--dim); line-height:1.55;
}
.subs th{
  font:600 10px/1 var(--mono); letter-spacing:.11em; text-transform:uppercase;
  color:var(--dim2); border-bottom-color:var(--rule);
}
.subs td b{color:var(--ink)}
@media (max-width:640px){
  .subs,.subs tr,.subs td,.subs th{display:block; width:100%}
  .subs tr:first-child{display:none}          /* the header row means nothing stacked */
  .subs tr{border:1px solid var(--rule); border-radius:var(--r-sm); margin-bottom:12px; padding:4px 0}
  .subs td{border-bottom:1px solid var(--rule2); padding:8px 14px}
  .subs td:last-child{border-bottom:0}
}
