:root {
  --ink: #15201d;
  --muted-ink: #5c6964;
  --paper: #fbfaf6;
  --white: #ffffff;
  --line: #dfe5de;
  --jade: #27695f;
  --jade-deep: #103e3b;
  --cinnabar: #a6402f;
  --gold: #c59a4a;
  --mist: #eef4f0;
  --shadow: 0 18px 48px rgba(18, 43, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(223, 229, 222, 0.88);
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--white);
  background: var(--jade-deep);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand small {
  color: var(--muted-ink);
  font-size: 11px;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted-ink);
  font-size: 14px;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--jade-deep);
  background: var(--mist);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  color: var(--white);
  background: #0f2724;
}

#heroCanvas,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(10, 25, 23, 0.86), rgba(10, 25, 23, 0.48) 55%, rgba(10, 25, 23, 0.2)),
    linear-gradient(0deg, rgba(10, 25, 23, 0.76), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 8vw, 110px);
  padding: 48px 0 150px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: var(--cinnabar);
  box-shadow: 0 12px 24px rgba(166, 64, 47, 0.24);
}

.button.secondary {
  color: var(--jade-deep);
  background: var(--white);
}

.button.ghost {
  color: var(--jade-deep);
  border-color: var(--line);
  background: var(--white);
}

.button.compact {
  min-width: 96px;
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.hero-panel {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 34px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 1px;
  width: min(560px, calc(100% - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-panel div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-panel span {
  display: block;
  font-size: 26px;
  font-weight: 850;
}

.hero-panel small {
  color: rgba(255, 255, 255, 0.76);
}

.quick-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.quick-tools a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 2px 14px;
  min-height: 122px;
  padding: 24px clamp(16px, 3vw, 34px);
  background: var(--white);
}

.quick-tools a:hover {
  background: var(--mist);
}

.tool-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--white);
  background: var(--jade);
  font-weight: 850;
}

.quick-tools strong {
  align-self: end;
}

.quick-tools small {
  color: var(--muted-ink);
}

.section {
  padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 28px;
}

.section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: 0;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.3;
}

.section p {
  color: var(--muted-ink);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: center;
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted-ink);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--jade);
  font-weight: 900;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--jade-deep);
  background: var(--mist);
}

.query-box,
.registration-form,
.status-board,
.faq,
.contact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.query-box {
  padding: clamp(20px, 4vw, 34px);
}

.form {
  display: grid;
  gap: 18px;
}

.form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd8d1;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 12px 13px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(39, 105, 95, 0.18);
  border-color: var(--jade);
}

.inline-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.result {
  display: grid;
  gap: 6px;
  min-height: 150px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
}

.result strong {
  font-size: 20px;
}

.result span,
.result p {
  margin: 0;
  color: var(--muted-ink);
}

.result.valid {
  border-color: rgba(39, 105, 95, 0.5);
  background: #eef7f2;
}

.result.invalid {
  border-color: rgba(166, 64, 47, 0.44);
  background: #fff3f0;
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.registration-form,
.status-board {
  padding: clamp(20px, 3vw, 32px);
}

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

.status-board {
  display: grid;
  gap: 16px;
}

.status-row,
.latest-application {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border-radius: 8px;
  background: var(--mist);
}

.latest-application {
  display: grid;
}

.latest-application strong,
.latest-application span {
  display: block;
}

.latest-application small {
  color: var(--muted-ink);
}

.muted {
  background: var(--mist);
}

.about-section {
  background: var(--white);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}

.mission-box {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding: 20px;
  border-left: 4px solid var(--cinnabar);
  border-radius: 6px;
  background: var(--mist);
}

.mission-box span {
  color: var(--muted-ink);
}

.expert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.expert-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.expert-card strong,
.expert-card span {
  display: block;
}

.expert-card span {
  margin-top: 4px;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 800;
}

.expert-card p {
  margin-bottom: 0;
}

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

.program-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 280px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.program-card p {
  flex: 1;
}

.level {
  margin-bottom: 16px;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 850;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(28px, 5vw, 70px);
}

.timeline {
  display: grid;
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.timeline article {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--cinnabar);
  font-weight: 850;
}

.timeline p {
  margin: 0;
}

.faq {
  padding: 28px;
  box-shadow: none;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 800;
}

.faq p {
  margin: 0 0 18px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 clamp(18px, 5vw, 72px);
  padding: 28px;
}

.contact h2,
.contact p {
  margin: 0;
}

.admin-section {
  padding-top: clamp(54px, 8vw, 86px);
}

.admin-login,
.admin-dashboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-login {
  padding: clamp(20px, 3vw, 30px);
}

.demo-account {
  align-self: center;
  color: var(--muted-ink);
  font-size: 14px;
}

.admin-dashboard {
  overflow: hidden;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar h3,
.admin-toolbar p {
  margin: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-actions input {
  min-width: 230px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}

.admin-metrics div {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  background: var(--mist);
}

.admin-metrics span {
  color: var(--muted-ink);
  font-size: 13px;
}

.admin-metrics strong {
  font-size: 28px;
  line-height: 1;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted-ink);
  background: #f7f8f5;
  font-size: 13px;
}

.admin-table td strong,
.admin-table td span,
.admin-table td small {
  display: block;
}

.admin-table td small {
  color: var(--muted-ink);
}

.status-pill {
  display: inline-flex !important;
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--jade-deep);
  background: var(--mist);
  font-size: 13px;
  font-weight: 800;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.row-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--jade-deep);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}

.row-actions button:hover {
  border-color: var(--jade);
  background: var(--mist);
}

.empty-table {
  color: var(--muted-ink);
  text-align: center !important;
}

.content-admin {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-top: 1px solid var(--line);
  background: #fbfcf8;
}

.content-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.content-panel h3 {
  margin: 0;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mist);
}

.admin-list-item strong,
.admin-list-item small {
  display: block;
}

.admin-list-item small,
.empty-content {
  color: var(--muted-ink);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted-ink);
  border-top: 1px solid var(--line);
  background: var(--white);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 8px;
  color: var(--white);
  background: var(--jade-deep);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .quick-tools,
  .program-grid,
  .expert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .registration-layout,
  .two-column,
  .about-layout,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    display: grid;
  }

  .status-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .latest-application {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: 66px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    align-self: start;
    margin: 0 auto;
    padding-top: 86px;
  }

  .hero-panel {
    left: 18px;
    right: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-panel div {
    padding: 12px 10px;
  }

  .hero-panel span {
    font-size: 21px;
  }

  .hero-panel small {
    font-size: 11px;
    line-height: 1.35;
  }

  .quick-tools,
  .program-grid,
  .expert-grid,
  .form-grid,
  .status-board,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions input {
    min-width: 0;
  }

  .inline-control {
    grid-template-columns: 1fr;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
