@import url("./design-tokens.css?v=studio-2");

:root {
  color-scheme: light;
  font-family: var(--hv-font);
  color: #172642;
  background: #eff3ff;
  --ink: var(--hv-ink);
  --muted: var(--hv-muted);
  --accent: var(--hv-focus);
  --gutter: clamp(30px, 7.7vw, 148px);
  --mast-y: clamp(26px, 5.9vh, 68px);
  --mast-size: 37px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }
button:focus-visible { outline: 3px solid #3e63bf; outline-offset: 5px; }
.hidden, [hidden] { display: none !important; }

/* One backdrop for the whole content window, including the native title bar's inside edge. */
.login-scene {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background-color: #eef3ff;
  background-image: linear-gradient(100deg, rgba(251,253,255,.87) 0%, rgba(249,251,255,.72) 28%, rgba(245,248,255,.16) 58%, transparent 77%), url("silk.webp");
  background-size: cover;
  background-position: center, 58% center;
  overflow: clip;
}
.login-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 80% 48%, #eff6ff91 0%, transparent 41%), radial-gradient(ellipse at 70% 88%, #92adff28 0%, transparent 50%);
}
.masthead { position: absolute; left: var(--gutter); top: var(--mast-y); z-index: 2; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: var(--mast-size); height: var(--mast-size); display: block; }
.wordmark { color: #172943; font-size: 28px; font-weight: 680; line-height: 1; letter-spacing: -.065em; }
.wordmark span { color: #385b95; }
.login-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  align-items: center;
  min-height: inherit;
  padding: calc(var(--mast-y) + var(--mast-size) + 27px) var(--gutter) clamp(40px, 8vh, 78px);
}
.access { position: relative; z-index: 1; width: 100%; }
.mode-pane, .account-pane { animation: type-in .36s cubic-bezier(.2,.65,.3,1) both; }
.entry-title { margin: 0; font-size: clamp(55px, 5.75vw, 98px); font-weight: 750; letter-spacing: -.065em; line-height: 1.16; }
.entry-title > span { color: #365bbc; }
.title-period { display: inline-block; margin-left: .035em; width: .28em; font-size: .67em; color: #4880d5; }
.entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 23px; margin-top: clamp(26px, 4.9vh, 48px); }
.action-primary, .action-link, .back { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; }
.action-primary {
  padding: 0 23px;
  min-height: 48px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(110deg,#25375e,#334c85);
  transition: background-color .16s, transform .16s, box-shadow .16s;
}
.action-primary:hover { box-shadow: 0 5px 16px #203b7025; transform: translateY(-1px); }
.action-primary:active { transform: translateY(1px); }
.action-link, .back { padding: 0; min-height: 44px; color: #3d527a; background: transparent; font-size: 14px; font-weight: 550; }
.action-link:hover, .back:hover { color: #294eaa; }
.arrow-icon { display: inline-block; width: 15px; height: 12px; position: relative; flex: 0 0 auto; }
.arrow-icon::before, .arrow-icon::after { content: ""; position: absolute; background: none; transition: transform .16s; }
.arrow-icon::before { top: 5px; left: 0; width: 13px; height: 1.5px; background: currentColor; }
.arrow-icon::after { top: 2px; left: 6px; width: 8px; height: 8px; border-top: 1.5px solid; border-right: 1.5px solid; transform: rotate(45deg); }
.action-primary:hover .arrow-icon, .action-link:hover .arrow-icon { translate: 2px 0; }
.back .arrow-icon { rotate: 180deg; width: 14px; }
.mascot-stage { position: relative; justify-self: center; width: min(51vw, 76vh, 840px); aspect-ratio: 1; align-self: center; pointer-events: none; }
.mascot { display: block; position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 13px 16px #7d9dda26); animation: suspended 7s ease-in-out infinite; }
.mascot-shadow { position: absolute; left: 21%; right: 18%; bottom: 4%; height: 5%; border-radius: 50%; background: #768bd1; filter: blur(15px); opacity: .18; }

.account-pane { max-width: 365px; }
.account-pane .back { min-height: 34px; margin-bottom: 12px; font-size: 12px; gap: 7px; }
.form-title { margin: 0; font-size: clamp(32px, 3.2vw, 48px); line-height: 1.16; letter-spacing: -.055em; font-weight: 700; }
.form-description { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.account-switch { display: flex; gap: 26px; margin: 18px 0 16px; border-bottom: 1px solid #b6c3d7; }
.account-switch button { border: 0; padding: 5px 1px 8px; background: transparent; color: #53627a; font-size: 14px; font-weight: 500; position: relative; min-height: 36px; }
.account-switch button.on { color: #254ea3; font-weight: 660; }
.account-switch button.on::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: currentColor; }
.fields { display: grid; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.field label { font-size: 12px; color: #344663; font-weight: 600; line-height: 1.5; }
.field input { display: block; width: 100%; min-width: 0; height: 36px; padding: 4px 2px 6px; color: var(--ink); border: 0; border-bottom: 1px solid #a5b4cb; border-radius: 0; background: transparent; font-size: 14px; }
.field input::placeholder { color: #65738a; opacity: 1; }
.field input:focus-visible { outline: none; border-bottom: 2px solid #395ea9; }
.field input[aria-invalid="true"] { border-color: #a6314e; }
.password-control { position: relative; }
.password-control input { padding-right: 42px; }
.password-control button { display: grid; place-items: center; position: absolute; right: -3px; bottom: 2px; width: 38px; height: 34px; padding: 0; border: 0; background: transparent; color: #596984; }
.remember { display: flex; align-items: center; gap: 7px; min-height: 26px; margin: 8px 0 11px; color: #4b5b74; font-size: 12px; width: max-content; }
.remember input { margin: 0; width: 14px; height: 14px; accent-color: #3658a5; }
.submit { min-height: 43px; width: 100%; }
.trial-inline { margin-top: 6px; }
.mode-status, .msg { margin: 0; font-size: 13px; line-height: 1.55; color: #245f57; }
.mode-status:not(:empty) { margin-top: 14px; }
.msg:not(:empty) { margin-bottom: 9px; }
.err { color: #9a2843; }
@keyframes type-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes suspended { 0%,100% { transform: translateY(2px) rotate(.25deg); } 50% { transform: translateY(-5px) rotate(-.5deg); } }
@media (min-width: 741px) and (max-height: 740px) {
  :root { --mast-y: 27px; --mast-size: 32px; }
  .login-layout { padding-top: 83px; padding-bottom: 26px; }
  .account-pane .back { min-height: 28px; margin-bottom: 5px; }
  .account-switch { margin: 13px 0 11px; }
  .fields { gap: 7px; }
}
@media (max-width: 740px) {
  :root { --gutter: clamp(23px, 7.4vw, 46px); --mast-y: 24px; --mast-size: 31px; }
  .login-scene { background-position: center, 64% center; }
  .wordmark { font-size: 24px; }
  .login-layout { display: flex; flex-direction: column-reverse; align-items: stretch; justify-content: center; gap: 7px; padding: 77px var(--gutter) 34px; }
  .access { align-self: center; max-width: 410px; }
  .entry-title { font-size: clamp(43px, 8.5vw, 59px); }
  .entry-actions { margin-top: 23px; gap: 12px 23px; }
  .mascot-stage { width: min(85vw, 41svh, 400px); align-self: center; margin-left: 7%; }
  .account-pane { max-width: none; }
  .login-scene:has(#authShell:not(.hidden)) .mascot-stage { display: none; }
  .login-layout:has(#authShell:not(.hidden)) { padding-top: 91px; }
  .mascot-shadow { opacity: .14; }
}
@media (max-width: 740px) and (max-height: 660px) {
  .login-layout { padding-top: 70px; padding-bottom: 23px; }
  .mascot-stage { width: min(72vw, 31svh); }
  .entry-title { font-size: 40px; }
  .entry-actions { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Galaxy's traveling arrow and drawn check are adapted to native, keyboard-operable controls. */
.entry-title > span {
  background: linear-gradient(102deg,#2852a7 4%,#4f64bf 65%,#486fc1);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.entry-title .title-period { -webkit-text-fill-color: #4875b5; }
.action-primary { background: var(--hv-action); font-family: var(--hv-font); }
#chooseFormal { padding: 4px 5px 4px 21px; gap: 18px; min-height: 48px; border-radius: 13px; background: linear-gradient(110deg,#263b76,#365bad); }
.action-tail { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: #ffffff1f; transition: background var(--hv-fast), transform var(--hv-medium) var(--hv-ease); }
#chooseFormal:is(:hover,:focus-visible) .action-tail { background: #ffffff38; transform: translateX(-2px); }
#chooseTrial { isolation: isolate; position: relative; justify-content: flex-start; color: #354977; border-radius: 8px; padding-inline: 10px; }
#chooseTrial::before { content: ""; position: absolute; inset: 4px 0; z-index: -1; background: #dce8fe; border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform var(--hv-medium) var(--hv-ease); }
#chooseTrial:is(:hover,:focus-visible)::before { transform: scaleX(1); }
.studio-halo { position: absolute; width: 110%; height: 64%; top: 24%; left: -7%; transform: rotate(-19deg); border-radius: 50%; pointer-events: none; }
.studio-halo::before, .studio-halo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid #8ba7d54c; border-top-color: #ffffffae; border-right-color: #b4cdfa8c; }
.studio-halo::after { inset: 4% -2%; opacity: .64; }
.studio-halo i,.studio-halo b { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #9cbae6; }
.studio-halo i { left: 6.5%; top: 23%; }.studio-halo b { right: 4%; bottom: 27%; background:#fff; box-shadow: 0 0 9px #90aff3; }
.account-switch { position: relative; }
.account-switch button.on { color:var(--hv-action); }
.field { position: relative; }
.field::after { content: ""; position: absolute; pointer-events: none; left: 0; right: 0; bottom: 0; height: 2px; background: var(--hv-focus); transform: scaleX(0); transform-origin: left; transition: transform var(--hv-medium) var(--hv-ease); }
.field:focus-within::after { transform: scaleX(1); }
.field:has([aria-invalid=true])::after { background: #a33552; }
.field:focus-within label { color: var(--hv-action); }
.field input:focus-visible { border-bottom: 1px solid #8c9ebe; }
.remember { position: relative; cursor: pointer; gap: 9px; }
.remember input { position: absolute; left:0; top:50%; transform:translateY(-50%); width:17px; height:17px; margin:0; opacity:0; }
.check-ink { position: relative; display:inline-block; width:16px; height:16px; flex:none; border:1px solid #899bb7; border-radius:4px; background:#fff8; transition: background var(--hv-fast); }
.check-ink::after { content:""; position:absolute; left:4px; top:1.5px; width:5px; height:9px; border:solid white; border-width:0 1.8px 1.8px 0; transform:rotate(42deg) scale(.2); opacity:0; transition:transform .18s var(--hv-ease),opacity .14s; }
.remember input:checked + .check-ink { background:var(--hv-action); border-color:var(--hv-action); }
.remember input:checked + .check-ink::after { transform:rotate(42deg) scale(1); opacity:1; }
.remember input:focus-visible + .check-ink { outline:2px solid var(--hv-focus); outline-offset:3px; }
@media(max-width:740px){ .studio-halo{width:101%;left:0} }
@media(forced-colors:active){ .remember input{position:static;opacity:1;transform:none}.check-ink{display:none}.entry-title>span{-webkit-text-fill-color:CanvasText} }
