:root {
  --canvas: #f9f8f5;
  --surface: #ffffff;
  --surface-muted: #edf2ee;
  --ink: #181b1a;
  --ink-muted: #62706a;
  --teal: #086a63;
  --teal-deep: #10423e;
  --orange: #ca5b42;
  --line: #d9ddd7;
  --focus: rgba(8, 106, 99, 0.2);
  --shadow: 0 24px 56px rgba(23, 32, 29, 0.12);
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(410px, 0.96fr);
  min-height: 100dvh;
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5.2vw, 84px);
  overflow: hidden;
  background: var(--teal-deep) url("/landing/assets/journal-desk.jpg") center / cover;
  color: #fff;
}

.login-story::before {
  position: absolute;
  inset: 0;
  background: rgba(12, 49, 45, 0.78);
  content: "";
}

.login-story > * { position: relative; z-index: 1; }

.brand {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
}

.brand-mark::before,
.brand-mark::after { position: absolute; content: ""; }

.brand-mark::before {
  width: 19px;
  height: 19px;
  top: 9px;
  left: 10px;
  border: 1.8px solid #fff;
  border-radius: 56% 44% 56% 44%;
  transform: rotate(-36deg);
}

.brand-mark::after {
  width: 14px;
  height: 2px;
  left: 14px;
  bottom: 9px;
  border-radius: 4px;
  background: #fff;
  transform: rotate(-42deg);
  transform-origin: left center;
}

.brand strong,
.brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 19px; font-weight: 800; }
.brand small { margin-top: 2px; color: rgba(255, 255, 255, 0.72); font-size: 10px; font-weight: 700; }

.story-copy { max-width: 510px; margin: 72px 0; }

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.story-copy h1,
.panel-heading h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  font-weight: 800;
}

.story-copy h1 {
  margin-top: 18px;
  font-size: clamp(44px, 4.6vw, 72px);
  line-height: 1.17;
}

.story-copy > p:last-child {
  max-width: min(420px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.79);
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.story-copy-next { white-space: nowrap; }

.story-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 530px);
  margin: 0;
}

.story-meta div { padding-left: 12px; border-left: 2px solid var(--orange); }
.story-meta dt { color: rgba(255, 255, 255, 0.68); font-size: 12px; font-weight: 800; }
.story-meta dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }

.login-panel {
  display: flex;
  width: min(100%, 590px);
  align-self: center;
  justify-self: center;
  flex-direction: column;
  padding: clamp(36px, 7vw, 96px) clamp(28px, 7vw, 80px);
}

.panel-heading { margin-bottom: 34px; }
.panel-heading h2 { margin-top: 12px; font-size: clamp(32px, 3.1vw, 44px); line-height: 1.22; }
.panel-heading > p:last-child { margin: 14px 0 0; color: var(--ink-muted); font-size: 15px; }

form { display: grid; gap: 21px; }
.field-group { display: grid; gap: 8px; }
label { color: #2c3531; font-size: 14px; font-weight: 800; }

input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input::placeholder { color: #98a19c; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--focus); }

.password-field { position: relative; }
.password-field input { padding-right: 74px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  min-width: 58px;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-50%);
}
.password-toggle:hover { background: var(--surface-muted); }

.remember-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -5px;
}

.remember-option {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  color: #2c3531;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.remember-option input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.remember-hint {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.form-message {
  min-height: 22px;
  margin: -4px 0 0;
  color: #aa3f2c;
  font-size: 14px;
  line-height: 1.55;
}

.primary-button {
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-button:hover { background: var(--teal-deep); box-shadow: 0 14px 28px rgba(16, 66, 62, 0.2); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.68; transform: none; box-shadow: none; }

.panel-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 27px;
  color: var(--ink-muted);
  font-size: 14px;
}
.panel-footer a,
.home-link { color: var(--teal); font-weight: 800; }
.panel-footer a:hover,
.home-link:hover { color: var(--teal-deep); text-decoration: underline; }
.home-link { width: fit-content; margin: 21px auto 0; font-size: 13px; }

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 390px; padding: 30px 28px; }
  .story-copy { margin: 50px 0; }
  .login-panel { width: min(100%, 620px); padding: 48px 28px 56px; }
}

@media (max-width: 560px) {
  .login-story { min-height: 360px; }
  .story-copy h1 { font-size: 42px; }
  .story-copy > p:last-child { font-size: 15px; line-height: 1.8; }
  .story-copy-next { display: block; margin-top: 2px; white-space: normal; }
  .story-meta { gap: 8px; }
  .story-meta dd { font-size: 12px; }
  .login-panel { padding: 38px 20px 48px; }
  .remember-row { align-items: flex-start; flex-direction: column; gap: 2px; }
  .remember-hint { padding-left: 27px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
