:root {
  --ink: #152f4c;
  --blue: #1664df;
  --sky: #edf5ff;
  --line: #d8e4f2;
  --muted: #52677e;
  --white: #fff;
  --body: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --utility: Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 17px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }

.masthead {
  max-width: 1280px;
  margin: auto;
  padding: 30px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.wordmark { font: italic 700 40px/1 Georgia, serif; letter-spacing: -3px; }
.wordmark span { color: var(--blue); }
.brand-name { border-left: 1px solid var(--line); padding-left: 20px; font-size: 17px; }
.domain { font: 16px var(--utility); color: var(--muted); }
.login-layout {
  max-width: 1170px;
  min-height: calc(100svh - 190px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 80px;
  padding: 38px 56px 50px;
}
.eyebrow { font-size: 16px; font-weight: 600; color: var(--blue); margin: 0 0 20px; }
h1 { font-size: clamp(34px, 3.7vw, 46px); line-height: 1.4; letter-spacing: -1px; margin: 0 0 22px; font-weight: 650; }
h1, h2, h3 { text-wrap: balance; }
.intro-copy { color: var(--muted); font-size: 18px; line-height: 1.9; margin: 0; }
.route-map {
  position: relative;
  height: 140px;
  margin-top: 28px;
  max-width: 405px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
  border-radius: 14px;
}
.route-line { position: absolute; top: 57px; left: 40px; right: 40px; height: 2px; background: var(--line); }
.route-node {
  position: absolute;
  top: 47px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  font-size: 16px;
  color: var(--muted);
  width: 80px;
  background: var(--white);
}
.route-node i { display: block; width: 22px; height: 22px; border: 6px solid var(--sky); border-radius: 50%; background: var(--blue); outline: 1px solid var(--line); }
.node-one { left: 0; }
.node-two { left: calc(50% - 40px); }
.node-three { right: 0; }
.map-caption, .share-target { display: none; }
.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  padding: 34px 32px 28px;
  border-radius: 18px;
  box-shadow: 0 18px 55px #152f4c08;
}
.card-kicker { display: block; font-size: 16px; color: var(--blue); margin-bottom: 12px; font-weight: 600; }
.login-card .card-kicker { display: none; }
h2 { font-size: 28px; line-height: 1.5; font-weight: 600; margin: 0 0 8px; }
.card-description { margin: 0 0 28px; color: var(--muted); font-size: 17px; }
label { display: block; font-size: 17px; font-weight: 600; margin-bottom: 10px; }
input { width: 100%; height: 54px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: 0 15px; color: var(--ink); outline: none; font-size: 18px; transition: border-color .15s; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }
input::placeholder { color: var(--muted); font-size: 17px; }
.password-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 23px; margin-bottom: 10px; }
.password-label label { margin: 0; }
.text-button { border: 0; background: none; color: var(--muted); padding: 4px 0; font-size: 16px; line-height: 1.6; }
.text-button:hover { color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 28px; border: 0; min-height: 54px; border-radius: 8px; padding: 13px 22px; font-size: 18px; font-weight: 600; transition: background .15s, transform .15s; }
.primary { color: var(--white); background: var(--blue); }
.primary:hover { background: #1256c0; }
.primary:active { transform: translateY(1px); }
.button:disabled { opacity: .65; cursor: wait; }
#login-button { width: 100%; justify-content: space-between; }
.form-error { color: #b52b3b; min-height: 24px; font-size: 16px; line-height: 1.7; margin: 12px 0 15px; }
.session-note { margin: 22px 0 0; text-align: center; font-size: 16px; line-height: 1.7; color: var(--muted); }
.lock-icon { color: var(--blue); margin-right: 5px; }
.page-footer { max-width: 1280px; padding: 24px 56px; margin: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: 16px; }
.account { display: flex; gap: 22px; align-items: center; font-size: 16px; }
.account > span { color: var(--muted); }
.dashboard { max-width: 1170px; margin: 30px auto 60px; padding: 0 56px; min-height: calc(100svh - 230px); }
.welcome { padding: 25px 0 32px; }
.welcome .eyebrow { margin-bottom: 16px; }
.welcome h1 { font-size: 38px; margin-bottom: 14px; }
.welcome p:last-child, .manage-card p, .section-heading p { color: var(--muted); line-height: 1.8; margin: 0; font-size: 17px; }
.manage-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; background: var(--sky); padding: 30px 32px; border-radius: 12px; border: 1px solid var(--line); }
.manage-card .card-kicker { margin-bottom: 9px; }
.manage-card h2 { font-size: 25px; margin-bottom: 10px; }
.manage-card .button { white-space: nowrap; }
.button[aria-disabled=true] { pointer-events: none; opacity: .5; }
.subscriptions { margin-top: 42px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { font-size: 26px; margin-bottom: 6px; }
.small-tag { font-size: 16px; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.share-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 24px; min-width: 0; }
.share-card h3 { font-size: 22px; line-height: 1.5; margin: 0 0 12px; font-weight: 600; }
.share-description { flex: 1; color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0 0 22px; }
.copy-button { width: 100%; border: 1px solid var(--line); background: var(--white); color: var(--ink); min-height: 50px; padding: 10px; border-radius: 7px; font: 17px/1.6 var(--body); }
.copy-button:hover { border-color: var(--blue); color: var(--blue); background: var(--sky); }
.help-note { display: flex; gap: 12px; margin-top: 28px; font-size: 16px; color: var(--muted); line-height: 1.8; }
.help-note > span { color: var(--blue); font-size: 22px; }
.help-note p { margin: 0; }
#toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 14px 24px; background: var(--ink); color: var(--white); border-radius: 8px; font-size: 17px; max-width: 90vw; z-index: 20; }
#toast:empty { display: none; }

@media (min-width: 1400px) {
  .login-layout { gap: 110px; }
}
@media (max-width: 900px) {
  .login-layout { gap: 32px; padding-left: 36px; padding-right: 36px; }
  .masthead, .page-footer { padding-left: 36px; padding-right: 36px; }
  .login-card { padding: 30px 26px; }
  .dashboard { padding: 0 36px; }
  .manage-card { padding: 26px; align-items: flex-start; flex-direction: column; }
  .share-grid { grid-template-columns: 1fr; }
  .share-card { padding: 24px; }
  .section-heading { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .masthead { padding: 26px 24px; gap: 12px; }
  .wordmark { font-size: 38px; }
  .brand { gap: 14px; }
  .brand-name { padding-left: 14px; font-size: 16px; }
  .domain { display: none; }
  .login-layout { display: flex; flex-direction: column; align-items: stretch; gap: 30px; padding: 24px 24px 36px; min-height: auto; max-width: 520px; }
  .eyebrow { margin-bottom: 14px; }
  h1 { font-size: 34px; line-height: 1.4; margin-bottom: 16px; }
  .introduction h1 br { display: initial; }
  .intro-copy br { display: none; }
  .intro-copy { font-size: 17px; line-height: 1.8; }
  .route-map { display: none; }
  .login-card { padding: 28px 24px; }
  .card-description { margin-bottom: 26px; }
  .page-footer { padding: 22px 24px; }
  .dashboard { padding: 0 24px; margin-top: 12px; }
  .welcome { padding: 18px 0 28px; }
  .welcome h1 { font-size: 32px; }
  .manage-card { display: block; padding: 24px; }
  .manage-card h2 { font-size: 24px; }
  .manage-card .button { margin-top: 24px; width: 100%; justify-content: space-between; }
  .subscriptions { margin-top: 34px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 25px; }
  .account { gap: 12px; }
  .account > span { max-width: 65px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) {
  .account > span { display: none; }
  .login-layout, .dashboard { padding-left: 18px; padding-right: 18px; }
  .login-card { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
