:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --line: #d6e0f1;
  --text: #13243e;
  --text-muted: #41557b;
  --primary: #0f3d92;
  --primary-light: #1a56c4;
  --accent: #2d6fd4;
  --success: #0f7d32;
  --shadow: 0 8px 32px rgba(15, 61, 146, 0.08);
  --radius: 0.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(960px, 92vw);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(19, 36, 62, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  flex-wrap: nowrap;
}

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

.brand img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 40px;
  display: block;
}

@media (min-width: 601px) {
  .brand img {
    max-height: 64px;
    max-width: min(420px, 58vw);
  }
}

.lang-nav {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-nav a {
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lang-nav a:hover,
.lang-nav a:focus-visible {
  background: #ebf1ff;
  color: var(--primary);
  border-color: #c9d7f7;
}

.lang-nav a.active {
  background: #ebf1ff;
  color: var(--primary);
  border-color: #b8c9eb;
}

/* Device language preference */
.pref-zh .lang-en-only,
.pref-en .lang-zh-only {
  display: none;
}

/* Hero / status banner */
.status-hero {
  background: linear-gradient(135deg, #0f3d92 0%, #1a56c4 55%, #2d6fd4 100%);
  color: #fff;
  padding: 2.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.status-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.status-hero .container {
  position: relative;
  z-index: 1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: fadeSlideDown 0.6s ease-out;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7a0;
  box-shadow: 0 0 0 0 rgba(110, 231, 160, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(110, 231, 160, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(110, 231, 160, 0);
  }
}

.status-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  animation: fadeSlideDown 0.6s ease-out 0.1s both;
}

.status-hero .subtitle {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  opacity: 0.92;
  max-width: 42em;
  animation: fadeSlideDown 0.6s ease-out 0.2s both;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress section */
.progress-section {
  padding: 2rem 0 1rem;
}

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

.progress-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.progress-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.progress-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
}

.progress-bar-wrap {
  height: 8px;
  background: #e8eef8;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  width: 0;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-card.visible .progress-bar {
  width: var(--target, 65%);
}

.progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Working animation strip */
.working-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1.25rem 0 2rem;
  box-shadow: var(--shadow);
}

.gears {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.gear {
  width: 22px;
  height: 22px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: relative;
}

.gear::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--accent);
  border-radius: 50%;
}

.gear:nth-child(1) {
  animation: spin 3s linear infinite;
}

.gear:nth-child(2) {
  animation: spin 2.2s linear infinite reverse;
  width: 16px;
  height: 16px;
  align-self: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.working-strip p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.working-strip strong {
  color: var(--text);
}

/* Contact cards */
.contact-section {
  padding-bottom: 1.5rem;
}

.contact-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.contact-card:hover {
  border-color: #b8c9eb;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.contact-card .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.contact-card .value {
  margin: 0;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.contact-card.external .value {
  font-size: 0.85rem;
  word-break: break-all;
}

/* Announcement content */
.announcements {
  padding: 0 0 3rem;
}

.announcement-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.85rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  scroll-margin-top: 5.5rem;
}

.announcement-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.announcement-block h2 {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  color: var(--primary);
  line-height: 1.4;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #ebf1ff;
}

.announcement-block h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1rem;
  color: var(--text);
}

.announcement-block p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.announcement-block ul {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

.announcement-block li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.announcement-block a {
  color: var(--primary);
  font-weight: 600;
  word-break: break-all;
}

.announcement-block a:hover {
  color: var(--primary-light);
}

.announcement-block .sign-off {
  margin-top: 1.25rem;
  font-weight: 600;
}

.lang-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 2.5rem 0;
  border: 0;
}

/* Footer */
.site-footer {
  background: #091832;
  color: #dce6ff;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 600px) {
  .header-inner {
    gap: 0.5rem;
  }

  .lang-nav a {
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
  }

  .announcement-block {
    padding: 1.25rem 1.15rem;
  }
}
