/* Site-wide design tokens */
:root {
  --navy-950: #041527;
  --navy-900: #06213c;
  --navy-800: #0a2c52;
  --navy: #003366;
  --blue: #0055a5;
  --blue-600: #0b63c4;
  --sky: #00b8d4;
  --cyan-soft: #d9f4fa;
  --ink: #101828;
  --text: #243b53;
  --muted: #5b6b7f;
  --paper: #f4f7fb;
  --paper-deep: #e9eef6;
  --line: #d7e1ee;
  --white: #ffffff;
  --amber: #b45309;
  --amber-bg: #fff4e0;
  --green: #0e7c66;
  --green-bg: #e3f6f0;
  --red: #b42318;
  --red-bg: #fee4e2;
  --shadow-sm: 0 1px 2px rgba(6, 33, 60, 0.08);
  --shadow-md: 0 10px 30px rgba(6, 33, 60, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  letter-spacing: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 21, 39, 0.96);
  border-bottom: 1px solid rgba(0, 184, 212, 0.25);
  color: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.brand-text small {
  font-size: 12px;
  color: #bcd2e8;
  line-height: 1.3;
}

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

.site-nav > a {
  color: #d7e6f5;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.site-nav > a:hover,
.site-nav > a.active {
  color: var(--white);
  border-bottom-color: var(--sky);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(0, 184, 212, 0.4);
  border-radius: 999px;
  color: #d9f4fa;
  font-size: 14px;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 15px;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-600);
}

.btn-sky {
  background: var(--sky);
  color: var(--navy-950);
}

.btn-sky:hover {
  background: #29c6dd;
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--sky);
  color: var(--sky);
}

/* Hero */
.hero {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(rgba(0, 184, 212, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 212, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 58%, var(--navy) 100%);
  background-size: 44px 44px, 44px 44px, auto;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 22%, rgba(0, 184, 212, 0.14), transparent 38%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 96px;
  padding-bottom: 104px;
}

.hero-inner > div {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--sky);
  margin: 0 0 18px;
}

.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--sky);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 47px;
  line-height: 1.22;
  color: var(--white);
}

.hero .hero-en {
  margin: 0 0 20px;
  font-size: 18px;
  color: #bcd2e8;
}

.hero p {
  margin: 0 auto 24px;
  max-width: 940px;
  color: #d7e6f5;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.hero-tags li {
  padding: 7px 13px;
  border: 1px solid rgba(0, 184, 212, 0.45);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #d9f4fa;
  background: rgba(0, 184, 212, 0.08);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 18px 44px rgba(3, 32, 61, 0.16);
}

.gallery-track {
  position: relative;
  aspect-ratio: 16 / 9;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  display: none;
}

.gallery-slide.active {
  opacity: 1;
  display: block;
}

.gallery-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 34px 18px 12px;
  background: linear-gradient(transparent, rgba(2, 22, 43, 0.7));
  color: #fff;
  font-size: 15px;
  text-align: center;
}

.gallery-caption:empty {
  display: none;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(3, 32, 61, 0.38);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s;
}

.gallery-arrow:hover {
  background: rgba(3, 32, 61, 0.72);
}

.gallery-prev {
  left: 14px;
}

.gallery-next {
  right: 14px;
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.gallery-dot.active {
  background: #fff;
  transform: scale(1.2);
}

@media (max-width: 720px) {
  .gallery-track {
    aspect-ratio: 4 / 3;
  }
  .gallery-arrow {
    width: 34px;
    height: 34px;
    font-size: 21px;
  }
  .gallery-prev {
    left: 8px;
  }
  .gallery-next {
    right: 8px;
  }
}

/* Section scaffolding */
.section {
  padding: 84px 0;
}

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

.section-dark {
  background: var(--navy-950);
  color: var(--white);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
}

.section-dark .section-kicker {
  color: var(--sky);
}

.section-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.section-head h2 {
  margin: 0;
  font-size: 33px;
  line-height: 1.25;
  color: var(--ink);
}

.section-dark .section-head h2,
.section-dark .section-head p {
  color: var(--white);
}

.section-head p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
}

.section-head .section-meta {
  text-align: right;
  font-size: 14px;
  color: var(--muted);
}

.section-dark .section-head .section-meta {
  color: #bcd2e8;
}

/* Stats */
.stats-strip {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

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

.stat-cell {
  background: var(--white);
  padding: 26px 22px;
}

.stat-value {
  display: block;
  margin-bottom: 6px;
  font-size: 31px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

.stat-cell small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

/* Overview */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: start;
}

.prose p {
  margin: 0 0 16px;
}

.prose .placeholder-box {
  margin: 22px 0 0;
  padding: 16px 18px;
  border: 1px dashed #9fb4c9;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  background: var(--paper);
}

.capability-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.capability-list span {
  font-size: 14px;
  color: var(--muted);
}

/* Research */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.research-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 28px;
  min-height: 460px;
}

.research-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: rgba(0, 184, 212, 0.16);
  color: var(--sky);
}

.research-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
  color: var(--white);
}

.research-card p {
  margin: 0 0 16px;
  color: #c8dcee;
}

.research-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.research-features li {
  padding: 5px 11px;
  border: 1px solid rgba(0, 184, 212, 0.4);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #d9f4fa;
}

.research-card figure {
  margin: auto 0 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(4, 21, 39, 0.5);
}

.research-card figure img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 4px;
}

.research-card figcaption {
  padding-top: 8px;
  font-size: 13px;
  color: #9fb9d3;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.team-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.team-avatar {
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #9fb4c9;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  padding: 10px;
}

.team-avatar svg {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  color: var(--blue);
}

.team-card h3 {
  margin: 0 0 4px;
  font-size: 21px;
  color: var(--ink);
}

.team-role {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
}

.team-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: #c8dcee;
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.8fr) 220px;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
}

.footer-brand h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--white);
}

.footer-brand p {
  margin: 0;
  font-size: 14px;
  color: #9fb9d3;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--white);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 9px;
  font-size: 15px;
  color: #c8dcee;
}

.footer-col a {
  color: #c8dcee;
}

.footer-col a:hover {
  color: var(--sky);
}

.qr-placeholder {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #bcd2e8;
  font-size: 13px;
  padding: 8px;
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  font-size: 14px;
  color: #8fa9c2;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Tools page */
.tools-hero {
  background:
    linear-gradient(rgba(0, 184, 212, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 212, 0.1) 1px, transparent 1px),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 60%, var(--navy) 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--white);
}

.tools-hero-inner {
  padding-top: 76px;
  padding-bottom: 72px;
}

.tools-hero .section-kicker {
  color: var(--sky);
}

.tools-hero h1 {
  margin: 0 0 12px;
  font-size: 39px;
  line-height: 1.25;
}

.tools-hero p {
  margin: 0;
  max-width: 720px;
  color: #c8dcee;
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.featured-tool {
  display: block;
  max-width: 860px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.featured-tool:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.featured-tool h3 {
  margin: 12px 0 8px;
  font-size: 24px;
  color: var(--ink);
}

.featured-tool p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tool-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--cyan-soft);
  color: var(--blue);
}

.tool-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.35;
}

.tool-card p {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--muted);
  flex: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-running {
  color: var(--green);
  background: var(--green-bg);
}

.status-maintenance {
  color: var(--amber);
  background: var(--amber-bg);
}

.tool-card .btn {
  align-self: flex-start;
}

/* Tool placeholder pages */
.tool-page {
  padding: 56px 0 72px;
}

.breadcrumb {
  margin: 0 0 26px;
  font-size: 15px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--blue);
}

.placeholder-panel {
  border: 1px dashed #9fb4c9;
  border-radius: var(--radius);
  background: var(--white);
  padding: 30px;
}

.placeholder-panel h1 {
  margin: 0 0 10px;
  font-size: 29px;
  color: var(--ink);
}

.placeholder-panel .placeholder-desc {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--muted);
  max-width: 760px;
}

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

.module-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--paper);
}

.module-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--ink);
}

.module-box span {
  font-size: 14px;
  color: var(--muted);
}

.placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 14px;
  border: 1px solid #d8b26a;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 14px;
  font-weight: 600;
}

.footer-slim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 0;
  color: #8fa9c2;
  font-size: 14px;
}

.footer-slim a {
  color: #bcd2e8;
}

/* Login page */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.08), transparent 34%),
    radial-gradient(circle at 84% 86%, rgba(0, 184, 212, 0.10), transparent 36%),
    #eef2f7;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-row .brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
}

.brand-row .brand-title {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.3;
}

.brand-row .brand-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-card .view-title {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--ink);
}

.login-card .login-sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
}

.login-card .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.login-card .tab {
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-radius: 6px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.login-card .tab.active {
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(31, 41, 55, 0.12);
}

.login-card .view {
  display: block;
}

.login-card .view.hidden {
  display: none !important;
}

.login-card .link-btn {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  padding: 10px 0 0;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}

.login-card .inline-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.login-card .inline-row input {
  flex: 1;
  min-width: 0;
}

.login-card .btn-secondary {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}

.login-card .btn-secondary:hover {
  background: #f9fafb;
}

.login-card .status-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  margin: 0 auto 14px;
}

.login-card .status-badge.ok {
  background: var(--green-bg, #ecfdf5);
  color: var(--green, #059669);
}

.login-card .copy-box {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fafb;
}

.login-card .copy-hint {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.login-card .copy-row {
  display: flex;
  gap: 8px;
}

.login-card .copy-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
}

.field {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.field input {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.14);
}

.field textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  outline: none;
  resize: vertical;
}

.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.14);
}

.contact-form {
  max-width: 760px;
}

.contact-status {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 14px;
}

.contact-status.success {
  color: #2e9e5b;
}

.contact-status.error {
  color: #b3261e;
}

.contact-status a {
  color: var(--blue);
  text-decoration: underline;
}

.login-message {
  min-height: 20px;
  margin: 4px 0 14px;
  font-size: 14px;
  color: var(--muted);
}

.login-message.error {
  color: var(--red);
}

.login-message.success {
  color: var(--green);
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  font-size: 15px;
}

.login-links a {
  color: var(--blue);
}

.login-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--navy-900);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .overview-grid,
  .research-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-head .section-meta {
    text-align: left;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav {
    position: fixed;
    top: 76px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(0, 184, 212, 0.3);
    padding: 10px 24px 18px;
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav > a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-actions {
    margin: 12px 0 0;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small {
    font-size: 11px;
  }

  .brand img {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .hero h1 {
    font-size: 33px;
  }

  .section {
    padding: 60px 0;
  }

  .section-head h2 {
    font-size: 27px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-value {
    font-size: 25px;
  }

  .capability-list {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    grid-template-columns: 1fr;
  }

  .team-avatar {
    width: 100%;
    height: 190px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tools-hero h1 {
    font-size: 31px;
  }

  .placeholder-panel {
    padding: 22px 18px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 29px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
.btn-block {
  width: 100%;
}


/* Search + language controls */
.search-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d7e6f5;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 4px;
  white-space: nowrap;
}

.search-link:hover {
  color: var(--sky);
}

.lang-toggle {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: var(--sky);
  color: var(--sky);
}

/* Page hero (shared by section pages) */
.page-hero {
  background:
    linear-gradient(rgba(0, 184, 212, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 212, 0.1) 1px, transparent 1px),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 60%, var(--navy) 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--white);
}

.page-hero-inner {
  padding-top: 72px;
  padding-bottom: 66px;
}

.page-hero .section-kicker {
  color: var(--sky);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: 39px;
  line-height: 1.25;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: #c8dcee;
}

/* Overview */
.overview-copy p {
  margin: 0 0 16px;
}

/* Direction cards (light background) */
.direction-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.direction-card .research-icon {
  background: var(--cyan-soft);
  color: var(--blue);
  margin-bottom: 18px;
}

.direction-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--ink);
}

.direction-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.direction-card figure {
  margin: auto 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.direction-card figure img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.direction-card figcaption {
  padding-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Projects table */
.project-table-wrap {
  overflow-x: auto;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.project-table th,
.project-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.project-table th {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.project-table tr:last-child td {
  border-bottom: 0;
}

/* PI card */
.pi-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.pi-avatar {
  width: 220px;
  height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #9fb4c9;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  padding: 12px;
}

.pi-card h3 {
  margin: 0 0 6px;
  font-size: 27px;
  color: var(--ink);
}

.pi-role {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
}

.pi-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.academic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.academic-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  background: var(--white);
}

.academic-links a:hover {
  border-color: var(--blue);
  background: var(--cyan-soft);
}

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

.member-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.member-avatar {
  height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #9fb4c9;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  padding: 10px;
  margin-bottom: 14px;
}

.member-card h3 {
  margin: 0 0 4px;
  font-size: 19px;
  height: 56px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  color: var(--ink);
}

.level-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  align-self: flex-start;
}

.member-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Alumni */
.alumni-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.alumni-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.alumni-table th,
.alumni-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.alumni-table th {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

/* Publications */
.pub-list {
  display: grid;
  gap: 14px;
}

.pub-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px 22px;
}

.pub-item .pub-year {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pub-item h3 {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.4;
}

.pub-item .pub-meta {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pub-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* News */
.news-list {
  display: grid;
  gap: 14px;
}

.news-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 18px 20px;
}

.news-date {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.news-type {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.news-type:hover {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber);
}

.news-item h3 {
  margin: 6px 0 6px;
  font-size: 18px;
  color: var(--ink);
}

.news-item p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

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

.facility-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px;
}

.facility-cat {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(25, 118, 210, 0.1);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.facility-card .facility-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 12px;
  background: var(--line);
}

.facility-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--ink);
}

.facility-card .model {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
}

.facility-card p {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
}

.facility-card .facility-status {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--blue);
  font-weight: 600;
}

.facility-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e9e5b;
  box-shadow: 0 0 0 3px rgba(46, 158, 91, 0.15);
}

.instrument-card .instrument-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.instrument-block h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--blue);
}

.instrument-block p {
  margin: 0;
}

.resource-list {
  display: grid;
  gap: 12px;
}

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

.resource-item strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.resource-item span {
  font-size: 14px;
  color: var(--muted);
}

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

.position-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
}

.position-card .position-type {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.position-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--ink);
}

.position-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

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

.process-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 18px;
  position: relative;
}

.process-step .step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.process-step strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.process-step span {
  font-size: 14px;
  color: var(--muted);
}

.material-list {
  display: grid;
  gap: 12px;
}

.material-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.material-item strong {
  color: var(--ink);
  font-size: 16px;
}

.material-item span {
  color: var(--muted);
  font-size: 14px;
}

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

.contact-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
}

.contact-block h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--ink);
}

.contact-block p {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--muted);
}

.map-placeholder {
  height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #9fb4c9;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
  padding: 16px;
}

/* Search page */
.search-shell {
  padding: 60px 0 80px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin: 26px 0 30px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  outline: none;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.14);
}

.result-group {
  margin-bottom: 28px;
}

.result-group h2 {
  margin: 0 0 12px;
  font-size: 21px;
  color: var(--ink);
}

.result-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.result-item strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.result-item span {
  font-size: 14px;
  color: var(--muted);
}

/* Admin */
.admin-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--paper);
}

.admin-sidebar {
  background: var(--navy-950);
  color: var(--white);
  padding: 22px 16px;
}

.admin-sidebar h2 {
  margin: 0 0 16px;
  font-size: 18px;
  padding: 0 10px;
}

.admin-tabs {
  display: grid;
  gap: 4px;
}

.admin-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #c8dcee;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.admin-tab.active {
  background: var(--blue);
  color: var(--white);
}

.admin-main {
  padding: 30px 34px 60px;
  min-width: 0;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
  margin-bottom: 20px;
}

.admin-card h3 {
  margin: 0 0 18px;
  font-size: 21px;
  color: var(--ink);
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.admin-image-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-image-row .admin-input {
  flex: 1;
  min-width: 0;
}

.admin-field {
  display: grid;
  gap: 6px;
}

.messages-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.message-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.message-row.message-unread {
  border-left: 3px solid var(--blue);
  background: rgba(25, 118, 210, 0.04);
}

.message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.message-head strong {
  color: var(--ink);
}

.message-head span {
  color: var(--muted);
  font-size: 13px;
}

.message-body {
  margin: 8px 0 10px;
  color: var(--text);
  white-space: pre-wrap;
}

.admin-field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.admin-input,
.admin-textarea,
.admin-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

.admin-textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.6;
}

.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.14);
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: #f2b8b5;
}

.btn-danger:hover {
  background: #fdd3d1;
}

.btn-edit {
  background: var(--paper);
  color: var(--blue);
  border-color: var(--line);
}

.btn-edit:hover {
  border-color: var(--blue);
}

.list-editor {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.list-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--paper);
}

.list-group .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-group-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.tool-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--white);
  margin-bottom: 10px;
}

.tool-admin-row strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.tool-admin-row span {
  font-size: 14px;
  color: var(--muted);
}

.admin-gate {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.admin-gate-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

/* Responsive additions */
@media (max-width: 960px) {
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pi-card {
    grid-template-columns: 1fr;
  }

  .pi-avatar {
    width: 100%;
    height: 200px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding: 14px 16px;
  }

  .admin-tabs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  .admin-tab {
    white-space: nowrap;
    width: auto;
  }

  .admin-main {
    padding: 24px 18px 50px;
  }
}

@media (max-width: 720px) {
  .member-grid,
  .facility-grid,
  .join-grid,
  .contact-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .tool-admin-row {
    grid-template-columns: 1fr;
  }

  .tool-admin-row .admin-actions {
    margin-top: 4px;
  }

  .page-hero h1,
  .tools-hero h1 {
    font-size: 31px;
  }
}

.hidden {
  display: none !important;
}

.hero .hero-mission {
  margin: 0 auto 22px;
  max-width: 940px;
  font-size: 22px;
  font-weight: 700;
  color: var(--sky);
  line-height: 1.7;
}

.hero-intro {
  font-size: 19px;
  line-height: 1.95;
  text-align: justify;
  text-justify: inter-ideograph;
}

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

.quick-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.quick-link:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.quick-link strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--ink);
}

.quick-link span {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

/* Header contrast and alignment overrides */
.site-header {
  background: #041527;
  box-shadow: 0 1px 0 rgba(0, 184, 212, 0.25), 0 4px 18px rgba(0, 0, 0, 0.28);
}

.site-header .container {
  max-width: none;
  padding-left: 12px;
  padding-right: 24px;
}

.header-inner {
  gap: 18px;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
  margin-right: auto;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-text strong,
.brand-text small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.site-nav > a {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.site-nav > a:hover {
  color: #00e5ff;
  border-bottom-color: #00e5ff;
}

.search-link {
  color: #ffffff;
  font-weight: 700;
}

.user-chip {
  color: #ffffff;
  border-color: rgba(0, 230, 255, 0.55);
}

@media (max-width: 1240px) {
  .site-nav {
    gap: 10px;
  }

  .site-nav > a {
    font-size: 15px;
  }

  .search-link span {
    display: none;
  }
}

/* Keep language/search controls readable, never squeezed by nav */
.site-nav {
  flex-wrap: nowrap;
}

.site-nav > a,
.search-link,
.lang-toggle,
.user-chip,
.nav-actions .btn {
  flex: 0 0 auto;
}

.nav-actions {
  flex: 0 0 auto;
}

.lang-toggle {
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .site-nav {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .site-nav > a {
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Lab updates page (referenced from official 绿洲新闻 layout) */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.news-filter {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.news-filter:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.news-filter.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.lab-news-item {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 24px;
}

.lab-news-item .news-date {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  border-right: 1px solid var(--line);
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  line-height: 1.4;
}

.lab-news-item .news-body {
  min-width: 0;
}

.lab-news-item .news-type {
  margin-bottom: 8px;
}

.lab-news-item h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.45;
}

.lab-news-item h3 a {
  color: var(--ink);
}

.lab-news-item h3 a:hover {
  color: var(--blue);
}

.lab-news-item p {
  margin: 0 0 10px;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.news-meta a {
  font-weight: 700;
  color: var(--blue);
}

.news-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.page-item.current {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.page-item.disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 640px) {
  .lab-news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lab-news-item .news-date {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 40px;
    padding-bottom: 8px;
  }
}

.member-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 12px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  background: var(--white);
}

.member-link:hover {
  border-color: var(--blue);
  background: var(--cyan-soft);
}
.wechat-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 16px 18px;
  color: var(--text);
}

.wechat-link-card > div:last-child {
  min-width: 0;
}

.wechat-link-card:hover {
  border-color: var(--blue);
}

.wechat-link-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: break-word;
}

.wechat-link-card span {
  font-size: 14px;
  color: #3d5068;
}
.overview-figure {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px;
}

.overview-figure img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  max-height: 340px;
}

.overview-figure figcaption {
  padding-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.map-embed iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

.map-note {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
  background: var(--paper);
}
.footer-qr-link {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  color: #bcd2e8;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
}

.footer-qr-link:hover {
  color: #fff;
  border-color: var(--sky);
}
html, body { overflow-x: hidden; }
.footer-qr-link {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  color: #bcd2e8;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
}
.footer-qr-link:hover { color: #fff; border-color: var(--sky); }

.member-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.pi-avatar img,
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.pi-card .pi-text {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(6, 33, 60, 0.10);
}

.pi-card .pi-text h3 {
  font-size: 29px;
}

.pi-card .pi-text p,
.pi-card .pi-text .pi-role {
  color: var(--text);
}

.pi-avatar {
  position: relative;
  overflow: hidden;
}

.pi-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,21,39,0.05), rgba(4,21,39,0.25));
  pointer-events: none;
}

.pi-avatar img,
.member-avatar img {
  position: relative;
  z-index: 1;
}

.member-card .member-body {
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 8px;
}

.member-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Force photos as plain in-flow blocks above text, never overlapping */
.pi-avatar,
.member-avatar {
  position: static;
  overflow: visible;
  border-radius: var(--radius);
}

.pi-avatar::after {
  content: none;
}

.pi-avatar img,
.member-avatar img,
.member-photo-img {
  position: static;
  z-index: auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.pi-avatar {
  width: 220px;
  height: 240px;
  margin: 0;
}

.member-avatar {
  width: 100%;
  height: 180px;
  margin: 0 0 14px;
}

.pi-card {
  align-items: stretch;
}

.member-card {
  display: grid;
  grid-template-columns: 1fr;
}

.member-card h3,
.member-card .level-pill,
.member-card .member-body,
.member-card .member-link {
  position: relative;
  z-index: 1;
}

/* Stack PI photo above text (no overlap) */
.pi-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.pi-avatar {
  width: 100%;
  height: 280px;
  margin: 0 auto;
}

.pi-card .pi-text {
  width: 100%;
  max-width: none;
}

@media (min-width: 721px) {
  .pi-avatar {
    width: 300px;
    height: 300px;
  }
}

/* Member/PI cards: name + role on top, photo below, no overlap, no dashed border */
.member-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
}

.member-card .level-pill {
  order: -1;
}

.member-card h3 {
  order: 0;
  margin: 0 0 4px;
  font-size: 19px;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.member-card .member-avatar {
  order: 1;
  width: 100%;
  height: 200px;
  margin: 6px 0 0;
  border: none;
  background: var(--paper);
  overflow: hidden;
}

.member-card .member-body {
  order: 2;
}

.member-card .member-link {
  order: 3;
}

.pi-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pi-card .pi-name {
  order: 0;
  margin: 0 0 6px;
}

.pi-card .pi-role {
  order: -1;
  margin: 0 0 4px;
}

.pi-card .pi-avatar {
  order: 1;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  border: none;
  background: var(--paper);
  overflow: hidden;
}

.pi-card .pi-text {
  width: 100%;
  max-width: none;
}

.pi-avatar,
.member-avatar {
  border: none;
  border-radius: var(--radius);
}
/* PI card: name on top, photo below, then the full info card below the photo */
.pi-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.pi-card .pi-text-head {
  order: -1;
  padding: 0;
}

.pi-card .pi-avatar {
  order: 1;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.pi-card .pi-text {
  order: 2;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

/* Members: keep the photo at full natural size (square), not cropped to short strip */
.member-card .member-avatar {
  order: 2;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 10px 0 0;
  border: none;
  background: transparent;
  overflow: hidden;
}

.member-card .member-avatar img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: top;
}

.member-card .member-body {
  order: 3;
  margin-top: 12px;
}

.member-card .member-link {
  order: 4;
  margin-top: 12px;
}
.member-card {
  grid-template-rows: 34px 56px auto auto auto;
}
.member-card h3 {
  margin-bottom: 0;
}
.member-card .level-pill {
  margin-bottom: 0;
  height: 24px;
  align-self: start;
}
/* Make research direction feature tags vivid */
.direction-card .research-features li,
.research-features li {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #05386b;
  background: linear-gradient(135deg, #00e5ff, #4db8ff);
  border: 1px solid #0093cc;
  box-shadow: 0 2px 6px rgba(0, 85, 165, 0.2);
}

.direction-card .research-features li:hover,
.research-features li:hover {
  background: linear-gradient(135deg, #ffd25e, #ff9d2d);
  color: #4a2a00;
  border-color: #e08a00;
}

/* Admin English toggle button - vivid, high contrast */
#admin-lang-toggle {
  background: linear-gradient(135deg, #0055a5, #0b63c4);
  color: #ffffff;
  border: 1px solid #00e5ff;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 85, 165, 0.45);
}

#admin-lang-toggle:hover {
  background: linear-gradient(135deg, #e08a00, #ff9d2d);
  border-color: #ffe08a;
  color: #3a2300;
}
