:root {
  --forest: #0b2d29;
  --ink: #13221f;
  --paper: #f8faf7;
  --canvas: #e8efeb;
  --line: #c7d2cc;
  --muted: #66736f;
  --accent: #e35d31;
  --display: "Iowan Old Style", "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.login-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr); }
.login-story {
  position: relative;
  min-height: 100dvh;
  padding: 42px clamp(36px, 6vw, 94px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--paper);
  background: var(--forest);
}
.login-story::before {
  content: "";
  position: absolute;
  width: 58vw;
  height: 58vw;
  right: -26vw;
  top: -22vw;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 7vw rgba(255,255,255,.025), 0 0 0 14vw rgba(255,255,255,.02);
}
.login-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(135deg,#000,transparent 72%);
  pointer-events: none;
}
.brand {
  position: relative;
  z-index: 1;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .11em;
}
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; color: var(--forest); background: var(--paper); border-radius: 2px 8px 2px 2px; font: 700 13px/1 var(--display); }
.login-story > div { position: relative; z-index: 1; }
.kicker, .step, .boundary { font: 700 10px/1.5 var(--mono); letter-spacing: .09em; }
.kicker { color: #88b5a6; }
h1 { max-width: 750px; margin: 26px 0 0; font-family: var(--display); font-size: clamp(52px, 5.4vw, 82px); font-weight: 500; line-height: .96; letter-spacing: -.055em; }
.lead { max-width: 520px; margin: 28px 0 0; color: #b8cbc4; font-size: 15px; line-height: 1.75; }
.boundary { position: relative; z-index: 1; color: #769b8f; }
.login-panel { display: grid; place-items: center; padding: 50px; background: radial-gradient(circle at 100% 0, #fff, transparent 38%), var(--canvas); }
.form-wrap { width: min(100%, 420px); animation: enter .65s cubic-bezier(.16,1,.3,1) both; }
.step { margin: 0; color: var(--accent); }
h2 { margin: 17px 0 0; font-family: var(--display); font-size: 42px; font-weight: 500; letter-spacing: -.04em; }
.hint { margin: 14px 0 32px; color: var(--muted); font-size: 12px; line-height: 1.7; }
form { display: grid; }
label { margin: 0 0 8px; font-size: 12px; font-weight: 700; }
input { width: 100%; height: 52px; margin-bottom: 21px; padding: 0 14px; color: var(--ink); background: rgba(255,255,255,.76); border: 1px solid #aebdb7; border-radius: 3px 12px 3px 3px; outline: none; font: 15px/1 var(--sans); }
input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(11,45,41,.1); }
.form-error { min-height: 34px; margin: -2px 0 16px; color: #7b5042; font-size: 10px; line-height: 1.6; }
button { min-height: 52px; color: #fff; background: var(--forest); border: 0; border-radius: 3px 13px 3px 3px; cursor: pointer; font-weight: 700; transition: transform .18s, background .18s; }
button:hover { background: #16443e; }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(227,93,49,.38); outline-offset: 3px; }
.setup-status { display: flex; align-items: center; gap: 12px; margin-top: 34px; padding: 17px; color: #31534c; background: #dce8e2; border: 1px solid #becfc7; border-radius: 3px 13px 3px 3px; font-size: 12px; }
.setup-status span { width: 9px; height: 9px; flex: none; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(227,93,49,.12); }

@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 850px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 49dvh; padding: 30px 26px; }
  h1 { font-size: clamp(48px, 13vw, 72px); }
  .lead { margin-top: 20px; }
  .login-panel { min-height: 51dvh; padding: 42px 24px; }
  .boundary { margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
