:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #171918;
  --muted: #777c79;
  --line: #e7e9e7;
  --mint: #66d7b2;
}

* { box-sizing: border-box; }

body.login-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f4f5f3;
  color: var(--ink);
}

button, input { font: inherit; }

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr);
  min-height: 100vh;
  padding: 14px;
  gap: 14px;
}

.login-story {
  position: relative;
  display: flex;
  min-height: calc(100vh - 28px);
  flex-direction: column;
  overflow: hidden;
  padding: clamp(30px, 4.2vw, 66px);
  border: 1px solid #252a28;
  border-radius: 20px;
  background: #111413;
  color: #f4f6f4;
  isolation: isolate;
}

.story-grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .22;
  background-image: radial-gradient(#77827d 0.65px, transparent 0.65px);
  background-size: 19px 19px;
  mask-image: linear-gradient(135deg, black, transparent 72%);
}

.login-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.login-brand-mark {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border: 1px solid rgba(102, 215, 178, .42);
  border-radius: 15px;
  background: rgba(102, 215, 178, .08);
  box-shadow: 0 0 30px rgba(102, 215, 178, .08);
}

.login-brand-mark svg { width: 32px; fill: none; stroke: var(--mint); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.login-brand strong { display: block; font-size: 18px; font-weight: 730; letter-spacing: -.04em; }
.login-brand small { display: block; margin-top: 4px; color: #78827d; font: 600 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }

.story-copy {
  position: relative;
  z-index: 1;
  max-width: 630px;
  margin-top: clamp(68px, 10vh, 126px);
}

.story-kicker, .login-panel-top, .form-index, .password-label-row span, .story-footer, .art-coordinate, .login-footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
}

.story-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 25px; color: #8e9993; font-size: 10px; font-weight: 650; }
.story-kicker span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 13px rgba(102, 215, 178, .75); }
.story-copy h1 { max-width: 670px; margin: 0; font-size: clamp(42px, 5.3vw, 78px); font-weight: 640; line-height: .99; letter-spacing: -.075em; }
.story-copy h1 span { color: #929a95; }
.story-description { max-width: 440px; margin: 24px 0 0; color: #9ba29e; font-size: 15px; line-height: 1.8; }

.network-art {
  position: relative;
  width: min(100%, 730px);
  height: clamp(245px, 31vh, 350px);
  margin: auto auto 0;
}

.network-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.art-link { fill: none; stroke: url(#linkFade); stroke-width: 1.1; stroke-dasharray: 4 7; }
.art-link-dim { opacity: .35; stroke-dasharray: 2 8; }
.art-node > circle, .art-node > rect { fill: url(#nodeFill); stroke: rgba(230, 238, 233, .68); stroke-width: 1.3; }
.art-node > path { fill: none; stroke: rgba(232, 240, 235, .9); stroke-width: 1.25; stroke-linecap: round; }
.art-node .node-lit { fill: var(--mint); stroke: none; filter: drop-shadow(0 0 5px rgba(102, 215, 178, .95)); }
.art-node .node-halo { fill: none; stroke: rgba(212, 226, 218, .12); stroke-width: 1; }
.art-node-main > rect { fill: #1c2723; stroke: rgba(102, 215, 178, .8); }
.art-node-main > path { stroke: var(--mint); }
.art-node-square > rect { fill: #1b211f; }

.art-label { position: absolute; padding: 7px 9px; border: 1px solid rgba(214, 225, 218, .15); border-radius: 6px; background: rgba(16, 21, 19, .78); color: #aeb8b2; font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.label-core { top: 47%; left: 9%; color: #d6e0da; }
.label-core i { display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--mint); }
.label-pop { top: 24%; left: 33%; }
.label-client { right: 4%; bottom: 17%; }
.art-coordinate { position: absolute; right: 4px; bottom: 2px; color: #69736d; font-size: 8px; }
.art-coordinate span { padding: 0 5px; color: var(--mint); }

.story-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; color: #737d77; font-size: 8px; font-weight: 600; }
.story-footer span:first-child { display: flex; align-items: center; gap: 8px; }
.story-footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.story-footer b { padding: 0 5px; color: #c4ccc7; }

.login-panel {
  display: flex;
  min-height: calc(100vh - 28px);
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 58px);
  border: 1px solid #e8eae8;
  border-radius: 20px;
  background: #fff;
}

.login-panel-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: #858b87; font-size: 9px; font-weight: 650; }
.lock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #eaeeeb; border-radius: 999px; color: #545b57; font-size: 8px; letter-spacing: .09em; }
.lock-badge svg { width: 13px; fill: none; stroke: #505753; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }

.login-form-wrap { width: min(100%, 430px); margin: clamp(48px, 8vh, 92px) auto; }
.form-index { margin-bottom: 21px; color: #99a09b; font-size: 9px; font-weight: 600; }
.form-index span { margin-left: 7px; color: #b8bdb9; }
.login-form-wrap h2 { margin: 0; font-size: clamp(38px, 4vw, 54px); font-weight: 650; line-height: 1.04; letter-spacing: -.07em; }
.login-intro { max-width: 340px; margin: 17px 0 38px; color: #777d79; font-size: 14px; line-height: 1.7; }
.login-form { display: flex; flex-direction: column; }
.login-form > label, .password-label-row label { margin-bottom: 9px; color: #313633; font-size: 12px; font-weight: 650; }
.password-label-row { display: flex; justify-content: space-between; align-items: center; margin-top: 21px; }
.password-label-row label { margin: 0 0 9px; }
.password-label-row span { padding-bottom: 9px; color: #a2a8a4; font-size: 8px; }
.input-wrap { display: flex; height: 54px; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid #e2e5e2; border-radius: 10px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.input-wrap:focus-within { border-color: #464d49; box-shadow: 0 0 0 3px rgba(30, 36, 32, .07); }
.input-wrap > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #858c87; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.input-wrap input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #202421; font-size: 13px; }
.input-wrap input::placeholder { color: #adb2ae; }
.password-toggle { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #828985; cursor: pointer; }
.password-toggle:hover { background: #f3f4f3; color: #242925; }
.password-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.login-error { min-height: 22px; margin-top: 10px; color: #bd3737; font-size: 12px; line-height: 1.5; }
.login-submit { display: flex; height: 54px; justify-content: space-between; align-items: center; margin-top: 5px; padding: 0 17px 0 20px; border: 1px solid #141716; border-radius: 10px; background: #171a18; color: #fff; font-size: 13px; font-weight: 650; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.login-submit:hover { transform: translateY(-1px); background: #272c29; box-shadow: 0 9px 18px rgba(20, 24, 21, .13); }
.login-submit:disabled { transform: none; cursor: wait; opacity: .65; }
.login-submit svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.form-security { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: #8a908c; font-size: 10px; line-height: 1.5; }
.security-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border: 1px solid #eaedeb; border-radius: 8px; color: #727975; }
.security-icon svg { width: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.2; }
.login-footer { display: flex; justify-content: space-between; gap: 12px; color: #a4aaa6; font-size: 8px; font-weight: 600; }

@media (max-width: 950px) {
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); }
  .login-story { padding: 34px; }
  .story-copy h1 { font-size: clamp(40px, 6vw, 60px); }
}

@media (max-width: 740px) {
  body.login-page { background: #fff; }
  .login-layout { display: block; min-height: 100svh; padding: 0; }
  .login-story { min-height: 0; height: auto; padding: 24px 24px 25px; border: 0; border-radius: 0 0 20px 20px; }
  .login-brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  .login-brand-mark svg { width: 28px; }
  .story-copy { margin-top: 42px; }
  .story-kicker { margin-bottom: 15px; font-size: 8px; }
  .story-copy h1 { font-size: clamp(36px, 10vw, 54px); }
  .story-description { max-width: 380px; margin-top: 13px; font-size: 12px; line-height: 1.65; }
  .network-art { display: none; }
  .story-footer { margin-top: 30px; font-size: 7px; }
  .login-panel { min-height: auto; padding: 25px 24px 22px; border: 0; border-radius: 0; }
  .login-panel-top { font-size: 8px; }
  .login-form-wrap { margin: 45px auto 55px; }
  .login-form-wrap h2 { font-size: 42px; }
  .login-intro { margin-bottom: 30px; }
  .login-footer { font-size: 7px; }
}

@media (max-width: 380px) {
  .story-footer { letter-spacing: .07em; }
  .login-form-wrap { margin-top: 36px; }
  .login-panel, .login-story { padding-right: 19px; padding-left: 19px; }
}

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