:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d6678;
  --surface: #ffffff;
  --line: #dfe4ec;
  --brand: #155eef;
  --brand-dark: #0f47b8;
  --page: #f3f6fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family:
    "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}

.container {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: inline-block;
  padding: 18px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

main.container {
  padding: 64px 0;
}

.card {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgb(34 53 84 / 8%);
}

.hero {
  max-width: 720px;
}

.home-page {
  background: #fff;
}

.home-page .site-header {
  position: absolute;
  z-index: 10;
  width: 100%;
  border-bottom: 1px solid rgb(255 255 255 / 22%);
  background: linear-gradient(180deg, rgb(6 22 44 / 62%), transparent);
}

.home-page .brand {
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgb(0 0 0 / 28%);
}

.home-page main.container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.home-page .site-footer {
  background: #071b36;
  color: rgb(255 255 255 / 62%);
}

.home-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.portal-hero {
  position: relative;
  display: grid;
  min-height: clamp(520px, 67vw, 720px);
  overflow: hidden;
  place-items: center;
  color: #fff;
  background: #17324c url("../images/home/campus-hero-optimized.webp") center 46% / cover no-repeat;
}

.portal-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(5 24 48 / 76%) 0%, rgb(5 24 48 / 34%) 58%, rgb(5 24 48 / 12%) 100%),
    linear-gradient(0deg, rgb(5 24 48 / 48%) 0%, transparent 56%);
}

.portal-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 54px;
}

.portal-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #70a9ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.portal-hero h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 70px);
  letter-spacing: 0.03em;
  text-shadow: 0 4px 28px rgb(0 0 0 / 38%);
}

.portal-intro {
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 23px);
  letter-spacing: 0.14em;
  text-shadow: 0 2px 16px rgb(0 0 0 / 40%);
}

.portal-session-note {
  display: inline-flex;
  padding: 7px 14px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
  color: rgb(255 255 255 / 88%);
  background: rgb(7 30 59 / 36%);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.home-message {
  max-width: 620px;
  margin-bottom: 22px;
  padding: 12px 16px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 10px;
  background: rgb(7 30 59 / 72%);
  box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
}

.home-message-error {
  border-color: rgb(255 210 210 / 58%);
  background: rgb(126 27 27 / 78%);
}

.hero-scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 46px;
  border: 2px solid rgb(255 255 255 / 68%);
  border-radius: 999px;
  place-items: start center;
  transform: translateX(-50%);
}

.hero-scroll-cue span {
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border-radius: 50%;
  background: #fff;
  animation: hero-scroll 1.8s ease-in-out infinite;
}

@keyframes hero-scroll {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(17px); opacity: 1; }
}

.home-section {
  padding: clamp(64px, 8vw, 104px) 0;
}

.service-section {
  background:
    radial-gradient(circle at 8% 18%, rgb(21 94 239 / 7%), transparent 24%),
    #fff;
}

.home-section-heading {
  max-width: 680px;
  margin: 0 auto 42px;
  text-align: center;
}

.home-section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
}

.home-section-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.portal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.portal-button {
  position: relative;
  display: flex;
  min-height: 230px;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #e1e8f2;
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 18px 48px rgb(32 67 111 / 10%);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.portal-button::after {
  position: absolute;
  right: -50px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgb(21 94 239 / 6%);
  content: "";
}

.portal-button:hover,
.portal-button:focus-visible {
  border-color: rgb(21 94 239 / 42%);
  outline: none;
  box-shadow: 0 24px 58px rgb(32 67 111 / 18%);
  transform: translateY(-7px);
}

.portal-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  border-radius: 18px;
  color: var(--brand);
  background: #edf4ff;
  place-items: center;
}

.portal-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
}

.portal-button-single .portal-icon {
  color: #087f73;
  background: #e8f8f5;
}

.portal-button-result .portal-icon {
  color: #ba6309;
  background: #fff4e5;
}

.portal-button-copy {
  display: grid;
  gap: 5px;
}

.portal-button-title {
  color: #1b4e92;
  font-size: 22px;
  font-weight: 800;
}

.portal-button-note {
  color: var(--muted);
  font-size: 14px;
}

.portal-arrow {
  position: absolute;
  right: 28px;
  bottom: 25px;
  z-index: 1;
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
  transition: transform 180ms ease;
}

.portal-button:hover .portal-arrow,
.portal-button:focus-visible .portal-arrow {
  transform: translateX(5px);
}

.campus-section {
  background: #f2f6fb;
}

.home-section-heading-left {
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

.campus-gallery {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 22px;
}

.campus-card {
  position: relative;
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #dbe5ef;
  box-shadow: 0 16px 40px rgb(31 62 102 / 13%);
}

.campus-card-tall {
  min-height: 430px;
  transform: translateY(-24px);
}

.campus-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.campus-card:hover img {
  transform: scale(1.045);
}

.campus-card::after {
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(0deg, rgb(4 20 39 / 82%), transparent);
  content: "";
}

.campus-card figcaption {
  position: absolute;
  right: 24px;
  bottom: 23px;
  left: 24px;
  z-index: 1;
  display: grid;
  color: #fff;
}

.campus-card figcaption strong {
  font-size: 21px;
}

.campus-card figcaption span {
  color: rgb(255 255 255 / 76%);
  font-size: 13px;
}

.asset-replace-note {
  margin: 18px 0 0;
  color: #7a8799;
  font-size: 12px;
  text-align: right;
}

.narrow {
  max-width: 620px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 22px;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-dark);
}

.text-link {
  color: var(--brand);
}

.muted,
.privacy-note {
  color: var(--muted);
}

.privacy-note {
  margin-top: 24px;
  font-size: 13px;
}

.alert {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid #f0b7b7;
  border-radius: 8px;
  color: #8f1d1d;
  background: #fff3f3;
}

.form-field {
  margin: 18px 0;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #b9c1ce;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.form-field input:focus {
  border-color: var(--brand);
  outline: 3px solid rgb(21 94 239 / 14%);
}

.field-error {
  display: block;
  margin-top: 5px;
  color: #a11d1d;
  font-size: 13px;
}

.captcha-panel {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faff;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.captcha-row img {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.submit-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.hidden {
  display: none;
}

.form-page {
  display: grid;
  gap: 22px;
}

.page-heading h1,
.form-section h2 {
  margin-top: 0;
}

.page-heading-with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-heading-with-action > div {
  min-width: 0;
}

.page-heading-action {
  flex: 0 0 auto;
  padding-top: 4px;
}

.logout-button {
  margin: 0;
  border-color: #9aa9be;
  color: #42536b;
  background: #fff;
}

.logout-button:hover,
.logout-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: 3px solid rgb(21 94 239 / 12%);
}

.form-section {
  padding: 28px;
}

.field-grid,
.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.identity-grid div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.identity-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.identity-grid dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.form-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #b9c1ce;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.action-guidance {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faff;
}

.action-guidance p {
  margin: 5px 0;
}

.secondary-button {
  padding: 11px 22px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  color: var(--brand);
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.success-alert {
  padding: 12px 14px;
  border: 1px solid #9ed5b2;
  border-radius: 8px;
  color: #176335;
  background: #f0fbf4;
}

.choice-summary {
  padding-left: 24px;
}

.receipt-number {
  margin: 8px 0;
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.version-list {
  padding-left: 20px;
}

@media print {
  .site-header,
  .site-footer,
  .no-print {
    display: none;
  }

  body {
    background: #fff;
  }

  main.container {
    width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}

.site-footer {
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  main.container {
    padding: 32px 0;
  }

  .card {
    padding: 24px;
    border-radius: 12px;
  }

  .field-grid,
  .identity-grid {
    grid-template-columns: 1fr;
  }

  .page-heading-with-action {
    gap: 14px;
  }

  .logout-button {
    padding: 9px 14px;
    white-space: nowrap;
  }

  .portal-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .portal-button {
    min-height: 72px;
    flex-direction: row;
    align-items: center;
    padding: 12px 42px 12px 14px;
    border-radius: 14px;
  }

  .home-page .site-header .container,
  .home-shell {
    width: calc(100% - 28px);
  }

  .home-page .brand {
    padding: 12px 0;
    font-size: 16px;
  }

  .portal-hero {
    min-height: 238px;
    background-position: center center;
  }

  .portal-hero-content {
    padding-top: 42px;
  }

  .portal-kicker {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .portal-hero h1 {
    margin-bottom: 8px;
    font-size: 29px;
  }

  .portal-intro {
    margin-bottom: 0;
    font-size: 14px;
    letter-spacing: 0.06em;
  }

  .portal-session-note,
  .hero-scroll-cue {
    display: none;
  }

  .home-section {
    padding: 22px 0;
  }

  .home-section-heading {
    margin-bottom: 14px;
  }

  .home-section-heading .section-kicker {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .home-section-heading h2 {
    margin-bottom: 5px;
    font-size: 23px;
  }

  .home-section-heading p:last-child {
    font-size: 12px;
    line-height: 1.45;
  }

  .portal-button::after {
    right: -62px;
    bottom: -78px;
  }

  .portal-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin: 0 12px 0 0;
    border-radius: 12px;
  }

  .portal-icon svg {
    width: 25px;
    height: 25px;
  }

  .portal-button-copy {
    gap: 0;
  }

  .portal-button-title {
    font-size: 17px;
  }

  .portal-button-note {
    font-size: 11px;
  }

  .portal-arrow {
    top: 50%;
    right: 14px;
    bottom: auto;
    font-size: 20px;
    transform: translateY(-50%);
  }

  .portal-button:hover .portal-arrow,
  .portal-button:focus-visible .portal-arrow {
    transform: translate(4px, -50%);
  }

  .campus-gallery {
    grid-template-columns: 1fr;
  }

  .campus-card,
  .campus-card-tall {
    min-height: 260px;
    transform: none;
  }

  .asset-replace-note {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .portal-hero {
    min-height: 220px;
  }

  .portal-hero h1 {
    font-size: 27px;
  }

  .service-section {
    padding: 18px 0;
  }

  .service-section .home-section-heading p:last-child {
    display: none;
  }

  .portal-button {
    min-height: 68px;
  }
}
