:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #617083;
  --line: #dce4e8;
  --brand: #176b5b;
  --brand-dark: #0d4339;
  --accent: #bd7745;
  --gold: #e7b86b;
  --paper: #ffffff;
  --soft: #f5f7f4;
  --mist: #eef4f2;
  --shadow: 0 18px 45px rgba(17, 36, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(220, 228, 232, 0.9);
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  white-space: nowrap;
}

nav a:hover {
  color: var(--brand);
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  gap: 32px;
  padding: 92px clamp(18px, 5vw, 76px) 42px;
  background:
    linear-gradient(90deg, rgba(8, 36, 35, 0.88), rgba(8, 36, 35, 0.44)),
    url("/static/legacy/study-consulting.jpg") center/cover;
  color: #fff;
}

.hero-content {
  max-width: 760px;
  padding-bottom: 54px;
}

.hero h1 {
  margin: 8px 0 18px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
}

.hero p {
  max-width: 660px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1px;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hero-metrics div {
  display: grid;
  gap: 2px;
  padding: 18px;
  background: rgba(11, 45, 42, 0.42);
}

.hero-metrics strong {
  font-size: 24px;
  line-height: 1.2;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

.primary,
.ghost,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.primary,
.button,
button {
  background: var(--brand);
  color: #fff;
}

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

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

.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.intro-band,
.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  align-items: center;
  gap: 32px;
  padding: 34px clamp(18px, 5vw, 76px);
  background: var(--brand-dark);
  color: #fff;
}

.intro-band h2,
.contact-band h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
}

.intro-band p,
.contact-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.section {
  padding: 64px clamp(18px, 5vw, 76px);
}

.section-title {
  max-width: 760px;
  margin-bottom: 24px;
}

.section h2,
.content h1,
.section h1,
.admin-shell h1 {
  margin-top: 0;
  line-height: 1.2;
}

.section h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 36, 48, 0.06);
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: -4px 0 14px;
  border-radius: 6px;
  object-fit: cover;
}

.card span,
.article-list span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.card h3 {
  margin: 8px 0;
  font-size: 20px;
  line-height: 1.35;
}

.card p,
.service-link span,
.summary {
  color: var(--muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.service-link {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 8px;
}

.service-link strong {
  font-size: 20px;
}

.service-link:hover {
  border-color: var(--brand);
  background: #fff;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 42px;
  background: var(--mist);
}

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

.process-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(23, 107, 91, 0.18);
}

.process-list strong {
  color: var(--brand-dark);
}

.process-list span {
  color: var(--muted);
}

.feature-photo {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.feature-photo img {
  display: block;
  width: 100%;
  min-height: 320px;
  object-fit: cover;
}

.soft-section {
  background: var(--soft);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(23, 107, 91, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.category-card {
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.category-card strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.category-card span {
  color: var(--muted);
}

.contact-band {
  background:
    linear-gradient(90deg, rgba(13, 67, 57, 0.96), rgba(23, 107, 91, 0.88)),
    url("/static/legacy/hero-office.jpg") center/cover;
}

.contact-band .primary {
  justify-self: end;
  background: #fff;
  color: var(--brand-dark);
}

.contact-band .primary:hover {
  background: var(--gold);
}

.narrow,
.content,
.admin-shell,
.login {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 18px;
}

.content {
  font-size: 17px;
}

.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.contact-card,
.contact-note {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.contact-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
}

.contact-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-card strong {
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact-note {
  margin-top: 16px;
}

.contact-note h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.article-hero {
  display: block;
  width: 100%;
  max-height: 420px;
  margin: 22px 0;
  border-radius: 8px;
  object-fit: cover;
}

.article-list {
  padding: 0;
  list-style: none;
}

.article-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.article-list li.no-image {
  grid-template-columns: 1fr;
}

.article-list img {
  width: 150px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.article-list a {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

footer {
  padding: 28px clamp(18px, 5vw, 76px);
  background: #111f1c;
  color: rgba(255, 255, 255, 0.76);
}

.login {
  max-width: 460px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.warning,
.notice {
  padding: 12px 14px;
  background: #fff5e8;
  border: 1px solid #efcc9e;
  border-radius: 6px;
}

.error {
  color: #b02323;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.upload-form {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  margin: 18px 0 26px;
}

.filter-form {
  grid-template-columns: minmax(120px, 0.7fr) minmax(170px, 1fr) minmax(220px, 1.3fr) auto auto;
  align-items: end;
  margin: 18px 0 22px;
}

.filter-form.compact {
  grid-template-columns: minmax(140px, 220px) auto;
}

.bulk-bar {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.media-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.media-item img,
.file-tile {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  background: var(--mist);
}

.file-tile {
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  font-weight: 800;
}

.media-item code {
  padding: 6px;
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.stats div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats strong {
  display: block;
  font-size: 32px;
  color: var(--brand);
}

.audit-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.issue-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 2px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff5e8;
  color: #7a3d14;
  border: 1px solid #efcc9e;
  font-size: 12px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.pass {
  background: #e8f6ee;
  color: #176b3c;
  border: 1px solid #b9dfc9;
}

.status-pill.warn {
  background: #fff5e8;
  color: #7a3d14;
  border: 1px solid #efcc9e;
}

.status-pill.fail {
  background: #feecec;
  color: #9d1f1f;
  border: 1px solid #f2b8b8;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

@media (max-width: 840px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 580px;
    padding-top: 72px;
  }

  .hero-metrics,
  .intro-band,
  .contact-band,
  .split {
    grid-template-columns: 1fr;
  }

  .contact-band .primary {
    justify-self: start;
  }

  .process-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .article-list li,
  .upload-form,
  .filter-form,
  .bulk-bar {
    grid-template-columns: 1fr;
  }

  .article-list img {
    width: 100%;
  }

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

@media (max-width: 560px) {
  nav {
    gap: 10px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}
