:root {
  --navy: #102a48;
  --navy-deep: #081d34;
  --blue: #1d63ad;
  --cyan: #079db8;
  --ice: #f5f9fd;
  --pale: #eaf4fc;
  --white: #fff;
  --muted: #5e6f82;
  --line: #cfdae8;
  --danger: #b42318;
  --success: #14765c;
  --header-height: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--navy-deep);
  background: var(--ice);
  font-family: "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: #fff;
  background: var(--navy-deep);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid rgba(16, 42, 72, .08);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  transition: height .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  height: 76px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px rgba(8, 29, 52, .08);
}
.header-inner {
  width: min(1380px, calc(100% - 56px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}
.brand { width: 132px; flex: 0 0 auto; }
.brand img { width: 100%; height: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.4vw, 40px);
  margin-left: auto;
}
.main-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .06em;
  white-space: nowrap;
}
.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }
.header-tools { flex: 0 0 auto; }
.group-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid rgba(16, 42, 72, .22);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.group-link:hover, .group-link:focus-visible {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle i, .menu-toggle i::before, .menu-toggle i::after {
  display: block;
  width: 24px;
  height: 2px;
  margin: auto;
  background: var(--navy);
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle i { position: relative; }
.menu-toggle i::before, .menu-toggle i::after { content: ""; position: absolute; left: 0; }
.menu-toggle i::before { top: -7px; }
.menu-toggle i::after { top: 7px; }
body.menu-open .menu-toggle i { background: transparent; }
body.menu-open .menu-toggle i::before { top: 0; transform: rotate(45deg); }
body.menu-open .menu-toggle i::after { top: 0; transform: rotate(-45deg); }

.account-main {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: calc(var(--header-height) + 76px) 0 94px;
  background: linear-gradient(135deg, #f8fbfe 0%, #edf5fb 100%);
}
.account-main::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: var(--header-height) 0 0;
  background: url("../images/banner.png") center / cover no-repeat;
  opacity: .27;
}
.account-main::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 13% 35%, rgba(7, 157, 184, .20), transparent 34%),
    linear-gradient(90deg, rgba(245, 249, 253, .92) 0%, rgba(245, 249, 253, .73) 48%, rgba(245, 249, 253, .9) 100%);
}
.account-layout {
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(540px, 1.18fr);
  align-items: center;
  gap: clamp(52px, 7vw, 112px);
}
.account-layout--login { grid-template-columns: minmax(300px, .95fr) minmax(430px, .82fr); }
.account-intro { max-width: 520px; }
.account-eyebrow {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.account-intro h1 {
  margin: 0;
  color: var(--navy);
  font-family: "Noto Serif TC", serif;
  font-size: clamp(44px, 5.5vw, 74px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.account-intro h1 span {
  display: block;
  margin-top: 14px;
  color: var(--cyan);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.account-intro > p:not(.account-eyebrow) {
  max-width: 440px;
  margin: 30px 0 0;
  color: #40566e;
  font-size: 17px;
  line-height: 1.9;
}
.account-mark {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 38px;
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
}
.account-mark::before { content: ""; width: 46px; height: 1px; background: var(--cyan); }

.account-card {
  width: 100%;
  padding: clamp(30px, 4.6vw, 58px);
  border-top: 4px solid var(--cyan);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 30px 80px rgba(8, 29, 52, .14);
  backdrop-filter: blur(15px);
}
.account-card-head { margin-bottom: 28px; }
.account-card-head h2 {
  margin: 0 0 9px;
  color: var(--navy);
  font-family: "Noto Serif TC", serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.3;
}
.account-card-head p { margin: 0; color: var(--muted); font-size: 15px; }
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.mode-switch a {
  position: relative;
  padding: 10px 12px 13px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
}
.mode-switch a[aria-current="page"] { color: var(--navy); }
.mode-switch a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--cyan);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.form-grid--single { grid-template-columns: 1fr; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .025em;
}
.required { margin-left: 4px; color: var(--danger); }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #bdcad9;
  border-radius: 0;
  outline: 0;
  color: var(--navy-deep);
  background: #fff;
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input::placeholder { color: #8a99a9; opacity: 1; }
.field input:hover { border-color: #8da3ba; }
.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 99, 173, .13);
}
.field input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fff9f8;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .08);
}
.field-hint, .field-error {
  display: block;
  min-height: 22px;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.55;
}
.field-hint { color: var(--muted); }
.field-error { color: var(--danger); }
.account-consent {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.account-consent a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.submit-button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  margin-top: 26px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.submit-button:hover, .submit-button:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  transform: translateY(-2px);
}
.submit-button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(7, 157, 184, .35);
  outline-offset: 3px;
}
.form-status {
  display: none;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid currentColor;
  font-size: 14px;
  line-height: 1.65;
}
.form-status.is-visible { display: block; }
.form-status.is-error { color: var(--danger); background: #fff4f2; }
.form-status.is-success { color: var(--success); background: #edf9f5; }
.account-secondary { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.account-secondary a { color: var(--blue); font-weight: 600; }

.site-footer { color: rgba(255, 255, 255, .76); background: var(--navy-deep); }
.footer-grid {
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
  padding: 58px 0 42px;
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 50px;
}
.footer-brand img { width: 130px; filter: brightness(0) invert(1); opacity: .96; }
.footer-brand p { max-width: 280px; margin: 20px 0 0; font-size: 14px; line-height: 1.8; }
.footer-column h3 { margin: 0 0 18px; color: #fff; font-size: 14px; letter-spacing: .08em; }
.footer-column a { display: block; margin-top: 10px; font-size: 14px; transition: color .2s ease; }
.footer-column a:hover, .footer-column a:focus-visible { color: #fff; }
.footer-bottom {
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .header-tools { display: none; }
  .account-layout { gap: 48px; grid-template-columns: minmax(260px, .75fr) minmax(520px, 1.25fr); }
}

@media (max-width: 900px) {
  :root { --header-height: 76px; }
  .site-header, .site-header.is-scrolled { height: var(--header-height); }
  .header-inner { width: min(100% - 36px, 1220px); }
  .brand { width: 116px; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: 0;
    overflow: hidden;
    display: block;
    padding: 0 24px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 40px rgba(8, 29, 52, .12);
    opacity: 0;
    visibility: hidden;
    transition: max-height .35s ease, opacity .25s ease, visibility .25s ease, padding .35s ease;
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .main-nav { max-height: calc(100vh - var(--header-height)); padding: 20px 24px 28px; opacity: 1; visibility: visible; overflow-y: auto; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(16, 42, 72, .09); font-size: 16px; }
  .main-nav a::after { display: none; }
  .account-main { padding: calc(var(--header-height) + 60px) 0 76px; }
  .account-layout, .account-layout--login { width: min(720px, calc(100% - 40px)); grid-template-columns: 1fr; gap: 42px; }
  .account-intro { max-width: 620px; }
  .account-intro h1 { font-size: clamp(42px, 9vw, 66px); }
  .account-intro > p:not(.account-eyebrow) { max-width: 560px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .header-inner, .account-layout, .footer-grid, .footer-bottom { width: calc(100% - 32px); }
  .account-main { padding-top: calc(var(--header-height) + 42px); }
  .account-intro h1 { font-size: 42px; }
  .account-intro h1 span { font-size: 14px; }
  .account-intro > p:not(.account-eyebrow) { margin-top: 22px; font-size: 16px; }
  .account-mark { margin-top: 26px; }
  .account-card { padding: 28px 20px 32px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .field--full { grid-column: auto; }
  .footer-grid { padding-top: 46px; grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

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