:root {
  --ink: #152445;
  --ink-deep: #0d1d3d;
  --muted: #6f7d96;
  --blue: #2469ed;
  --blue-deep: #164ca8;
  --coral: #ff715b;
  --yellow: #ffc95c;
  --mint: #35bfa0;
  --line: #dbe4ef;
  --soft: #f5f7fb;
  --surface: #ffffff;
  --shadow: 0 20px 50px rgba(22, 48, 87, .09);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(21,36,69,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,36,69,.025) 1px, transparent 1px),
    var(--soft);
  background-size: 32px 32px;
}
button, input { font: inherit; }
[hidden] { display: none !important; }

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(208,218,231,.9);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.account-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.account-brand strong { font-size: 17px; letter-spacing: -.025em; }
.account-brand__mark { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); box-shadow: 0 7px 18px rgba(36,105,237,.2); }
.account-brand__mark::before, .account-brand__mark::after, .account-brand__mark i { position: absolute; border: 1px solid white; border-radius: 50%; content: ""; }
.account-brand__mark::before { inset: 7px; }
.account-brand__mark::after { inset: 13px; }
.account-brand__mark i { inset: 17px; border-width: 2px; background: white; }
.account-header nav { display: flex; align-items: center; gap: 22px; }
.account-header nav a, .account-header nav button { color: var(--muted); font-size: 12px; font-weight: 750; text-decoration: none; }
.account-header nav a:hover { color: var(--blue); }
.account-header nav button { min-height: 36px; padding: 0 13px; border: 1px solid #efc9c9; border-radius: 9px; color: #af4848; background: #fff8f8; cursor: pointer; }
.account-header nav button:hover { border-color: #dcaaaa; background: #fff0f0; }

.account-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 56px; }
.account-intro { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: end; margin-bottom: 22px; }
.account-intro p, .guest-pitch > p, .workspace-heading p { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.account-intro p { grid-column: 1 / -1; margin-bottom: 5px; color: var(--blue); }
.account-intro h1 { margin: 0; font-size: clamp(31px, 4vw, 42px); letter-spacing: -.055em; }
.account-intro > span { padding-bottom: 5px; color: var(--muted); font-size: 12px; }

/* Guest account entrance */
.guest-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); min-height: 540px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.guest-pitch { position: relative; overflow: hidden; padding: 58px; color: white; background: #15336a; }
.guest-pitch::after { position: absolute; right: -110px; bottom: -140px; width: 340px; height: 340px; border: 48px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.guest-pitch > p { color: #b9dcff; }
.guest-pitch h2 { max-width: 430px; margin: 24px 0 0; font-size: clamp(32px, 4vw, 47px); line-height: 1.2; letter-spacing: -.05em; }
.guest-pitch ul { display: grid; gap: 13px; margin: 36px 0; padding: 0; list-style: none; }
.guest-pitch li { position: relative; padding-left: 24px; color: #e3efff; font-size: 13px; }
.guest-pitch li::before { position: absolute; left: 0; color: var(--yellow); content: "✓"; font-weight: 900; }
.guest-pitch > a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; color: white; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 800; text-decoration: none; }
.guest-pitch > a span { font-size: 18px; }
.guest-signal { position: relative; width: 90px; height: 90px; margin-bottom: 38px; border-radius: 50%; background: rgba(255,255,255,.1); }
.guest-signal i { position: absolute; border: 1px solid rgba(255,255,255,.82); border-radius: 50%; }
.guest-signal i:nth-child(1) { inset: 12px; }
.guest-signal i:nth-child(2) { inset: 27px; }
.guest-signal i:nth-child(3) { inset: 40px; background: white; }

.auth-panel { align-self: center; width: min(100% - 72px, 450px); margin: 46px auto; }
.auth-panel__heading p { margin: 0 0 5px; color: var(--coral); font-size: 10px; font-weight: 800; }
.auth-panel__heading h2 { margin: 0 0 22px; font-size: 27px; letter-spacing: -.035em; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; padding: 4px; border-radius: 11px; background: #eef2f7; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.auth-tabs button.is-active { color: var(--blue-deep); background: white; box-shadow: 0 5px 13px rgba(30,70,120,.09); }
.account-form { display: grid; gap: 15px; }
.account-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.account-form input, .activation-form input { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid #c6d4e4; border-radius: 9px; color: var(--ink); background: white; outline: none; }
.account-form input:focus, .activation-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,105,237,.1); }
.code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.code-field button { padding: 0 12px; border: 1px solid #bfd3e8; border-radius: 9px; color: var(--blue-deep); background: #eff6ff; cursor: pointer; font-size: 11px; font-weight: 800; }
.form-primary { min-height: 45px; border: 0; border-radius: 9px; color: white; background: var(--blue); cursor: pointer; font-weight: 850; }
.form-primary:hover { background: var(--blue-deep); }
.account-consent { display: flex !important; align-items: center; gap: 7px !important; margin-top: -4px; font-size: 10px !important; }
.account-consent input { width: 15px; min-height: 15px; margin: 0; }
.account-message { min-height: 0; margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.account-message:empty { display: none; }
.account-message[data-kind="success"] { color: #177b60; }
.account-message[data-kind="error"] { color: #c24651; }

/* Signed-in member credential */
.member-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 350px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.profile-card { position: relative; min-height: 350px; overflow: hidden; padding: 28px; color: var(--ink); border-right: 1px solid #d9e6f4; background: linear-gradient(150deg, #f8fbff 0%, #edf5ff 58%, #f7fbff 100%); }
.profile-card::before { position: absolute; right: -106px; bottom: -108px; width: 295px; height: 295px; border: 38px solid rgba(36,105,237,.06); border-radius: 50%; content: ""; box-shadow: 0 0 0 30px rgba(36,105,237,.025); }
.profile-card::after { position: absolute; top: 0; left: 28px; width: 54px; height: 4px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--blue), #55b9f3); content: ""; }
.profile-card__topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.profile-card__topline p, .profile-card__topline span { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.profile-card__topline p { color: var(--blue); }
.profile-card__topline span { color: #91a0b7; }
.profile-signal { position: relative; width: 82px; height: 82px; margin: 25px 0 20px; border: 1px solid #d5e5f6; border-radius: 50%; background: rgba(255,255,255,.78); box-shadow: 0 12px 30px rgba(36,105,237,.11); }
.profile-signal i { position: absolute; border: 1px solid rgba(36,105,237,.42); border-radius: 50%; }
.profile-signal i:nth-child(1) { inset: 7px; }
.profile-signal i:nth-child(2) { inset: 18px; }
.profile-signal i:nth-child(3) { inset: 28px; background: var(--blue); border-color: var(--blue); }
.profile-signal b { position: absolute; inset: 0; display: grid; place-items: center; color: white; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .08em; }
.member-status { position: absolute; z-index: 2; top: 78px; right: 28px; display: inline-flex; padding: 6px 10px; border: 1px solid #c5d8ed; border-radius: 999px; color: var(--blue-deep); background: rgba(255,255,255,.82); font-size: 9px; font-weight: 900; box-shadow: 0 6px 16px rgba(22,76,168,.08); }
.member-status[data-level="member"] { color: #3b2d0a; background: var(--yellow); border-color: var(--yellow); }
.member-status[data-level="owner"] { color: white; background: var(--coral); border-color: var(--coral); }
.profile-card h2 { position: relative; z-index: 1; margin: 0 0 18px; color: var(--ink-deep); font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.profile-entitlement { position: relative; z-index: 1; padding: 13px 0 14px; border-top: 1px solid #cfdeed; border-bottom: 1px solid #cfdeed; }
.profile-entitlement small, .profile-entitlement strong { display: block; }
.profile-entitlement small { color: #7890ad; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.profile-entitlement strong { margin-top: 6px; color: #273c61; font-size: 11px; line-height: 1.55; }
.profile-actions { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; align-items: center; margin-top: 18px; }
.profile-actions a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 9px; color: white; background: var(--blue); font-size: 10px; font-weight: 850; text-decoration: none; }

.activation-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 36px 40px; border-left: 1px solid var(--line); background: linear-gradient(145deg, #ffffff 25%, #f8fbff 100%); }
.workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.workspace-heading p { margin-bottom: 5px; color: var(--coral); }
.workspace-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.045em; }
.workspace-heading div > span { display: block; max-width: 520px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.activation-card__link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #cddcf0; border-radius: 9px; color: var(--blue-deep); background: white; font-size: 9px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.activation-card__link span { color: var(--blue); font-size: 13px; }
.activation-form { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(330px, 1.45fr); align-items: center; gap: 18px; padding: 17px; border: 1px solid #d7e3f0; border-radius: 14px; background: #f3f7fc; }
.activation-form label, .activation-form small { display: block; }
.activation-form label { color: var(--ink); font-size: 11px; font-weight: 850; }
.activation-form small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.activation-form > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.activation-form input { min-height: 50px; font-size: 14px; }
.activation-form button { min-width: 110px; padding: 0 17px; border: 0; border-radius: 9px; color: white; background: var(--blue); cursor: pointer; font-size: 11px; font-weight: 850; }
.activation-form button:hover { background: var(--blue-deep); }
.activation-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 16px; color: #63748d; font-size: 9px; line-height: 1.5; }
.activation-notes span { display: flex; align-items: center; gap: 7px; }
.activation-notes i { display: grid; flex: 0 0 17px; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: #14715b; background: #e3f7f1; font-size: 9px; font-style: normal; font-weight: 900; }

/* Account and membership now share one route. */
.integrated-membership { margin-top: 42px; scroll-margin-top: 22px; }
.membership-heading { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: end; gap: 34px; margin-bottom: 20px; padding: 0 2px; }
.membership-heading p { margin: 0 0 6px; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.membership-heading h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.05em; }
.membership-heading > span { padding-bottom: 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.plan-section { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; min-height: 410px; overflow: hidden; padding: 23px 21px 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 16px 38px rgba(22,48,87,.08); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.plan-card:hover { border-color: #9ebff0; transform: translateY(-4px); box-shadow: 0 23px 50px rgba(22,48,87,.13); }
.plan-card--featured { border: 2px solid var(--blue); background: #fbfcff; }
.plan-card--lifetime { background: linear-gradient(155deg, #fff 0%, #eefaff 100%); }
.plan-card--lifetime::after { position: absolute; right: -48px; top: 105px; width: 120px; height: 120px; border: 22px solid rgba(53,191,160,.08); border-radius: 50%; content: ""; }
.plan-card__ribbon { position: absolute; top: 0; right: 18px; padding: 7px 11px; border-radius: 0 0 8px 8px; color: #4d3500; background: var(--yellow); font-size: 8px; font-weight: 900; }
.plan-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.plan-card__top span { color: var(--blue); font-size: 10px; font-weight: 850; }
.plan-card__top small { color: #91a0b7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 7px; font-weight: 850; letter-spacing: .12em; }
.plan-card h3 { margin: 0; font-size: 25px; letter-spacing: -.045em; }
.plan-card__duration { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.plan-card__price { display: flex; align-items: flex-start; gap: 3px; margin: 24px 0 0; color: #4f5ed7; }
.plan-card__price sup { margin-top: 7px; color: var(--coral); font-size: 13px; font-weight: 900; }
.plan-card__price strong { font-size: 40px; line-height: 1; letter-spacing: -.06em; }
.plan-card__summary { min-height: 38px; margin: 15px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.plan-card ul { display: grid; gap: 10px; margin: 20px 0 22px; padding: 0; list-style: none; }
.plan-card li { position: relative; padding-left: 19px; color: #536580; font-size: 10px; line-height: 1.5; }
.plan-card li::before { position: absolute; left: 0; top: -1px; color: var(--blue); content: "✓"; font-size: 13px; font-weight: 900; }
.plan-card button { min-height: 43px; margin-top: auto; border: 1px solid #9bb2ea; border-radius: 9px; color: var(--blue-deep); background: #f5f8ff; cursor: pointer; font-size: 11px; font-weight: 850; }
.plan-card button:hover, .plan-card--featured button { border-color: var(--blue); color: white; background: var(--blue); }
.payment-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px auto 0; color: var(--muted); font-size: 10px; text-align: center; }
.payment-note > span { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-family: Georgia, serif; font-weight: 700; }

.payment-dialog { width: min(500px, calc(100vw - 28px)); padding: 0; overflow: hidden; border: 1px solid #cdddf0; border-radius: 18px; color: var(--ink); box-shadow: 0 28px 90px rgba(15,47,95,.28); }
.payment-dialog::backdrop { background: rgba(13,33,70,.45); backdrop-filter: blur(5px); }
.payment-dialog__bar { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; color: white; background: var(--ink-deep); }
.payment-dialog__bar button { border: 0; color: white; background: transparent; cursor: pointer; font-size: 24px; }
.payment-dialog__body { padding: 26px; }
.payment-dialog__body > p:first-child { margin: 0 0 7px; color: var(--coral); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.payment-dialog__body h2 { margin: 0; font-size: 24px; }
.payment-dialog__body > p:not(:first-child) { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.payment-dialog__actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.payment-dialog__actions button { min-height: 41px; padding: 0 15px; border: 0; border-radius: 9px; color: white; background: var(--blue); cursor: pointer; font-size: 11px; font-weight: 850; }

:focus-visible { outline: 3px solid rgba(36,105,237,.22); outline-offset: 3px; }

@media (max-width: 980px) {
  .guest-layout { grid-template-columns: 1fr; }
  .guest-pitch { min-height: 400px; padding: 44px; }
  .member-layout { grid-template-columns: 1fr; }
  .profile-card { min-height: 350px; }
  .profile-card { border-right: 0; border-bottom: 1px solid #d9e6f4; }
  .profile-signal { width: 76px; height: 76px; margin: 21px 0 17px; }
  .profile-signal i:nth-child(3) { inset: 27px; }
  .activation-card { min-height: 320px; border-top: 1px solid var(--line); border-left: 0; }
  .plan-section { grid-template-columns: 1fr 1fr; }
  .membership-heading { grid-template-columns: 1fr; gap: 7px; }
}

@media (max-width: 700px) {
  .account-header { min-height: 66px; padding: 0 14px; }
  .account-brand strong { max-width: 176px; font-size: 13px; line-height: 1.25; }
  .account-header nav { gap: 12px; }
  .account-header nav a:not(:last-child) { display: none; }
  .account-main { width: min(100% - 24px, 1180px); padding-top: 27px; }
  .account-intro { display: block; margin-bottom: 17px; }
  .account-intro > span { display: block; margin-top: 7px; padding: 0; }
  .guest-layout { border-radius: 18px; }
  .guest-pitch { min-height: 340px; padding: 29px 23px; }
  .guest-pitch h2 { font-size: 33px; }
  .guest-signal { width: 72px; height: 72px; margin-bottom: 28px; }
  .guest-signal i:nth-child(3) { inset: 30px; }
  .auth-panel { width: auto; margin: 30px 19px; }
  .member-layout { border-radius: 18px; }
  .profile-card { min-height: 330px; padding: 22px; }
  .member-status { top: 72px; right: 22px; }
  .activation-card { min-height: 0; padding: 25px 20px; }
  .workspace-heading { display: block; }
  .activation-card__link { margin-top: 14px; }
  .activation-form { grid-template-columns: 1fr; gap: 12px; }
  .activation-form > span { grid-template-columns: 1fr; }
  .activation-form button { min-height: 43px; }
  .activation-notes { grid-template-columns: 1fr; }
  .integrated-membership { margin-top: 34px; }
  .plan-section { grid-template-columns: 1fr; }
  .plan-card { min-height: 390px; }
}

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