:root {
  --ink: #111827;
  --muted: #5b6472;
  --line: #d9dee7;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --steel: #243141;
  --steel-2: #334155;
  --accent: #d85a1f;
  --accent-2: #f59e0b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.nav-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-title {
  display: block;
  overflow: hidden;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

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

.nav-links a {
  border-radius: 6px;
  padding: 10px 12px;
  color: #364152;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: #fff1e8;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 3px;
}

.lang-switch button {
  min-width: 48px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 9px;
}

.lang-switch button.active {
  background: var(--steel);
  color: #fff;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--steel);
  font-size: 24px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 0 16px;
}

.mobile-menu a {
  display: block;
  border-radius: 6px;
  padding: 12px 0;
  color: var(--steel);
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.84)),
    url("../assets/images/logo.jpg") right 8% center / min(430px, 45vw) no-repeat,
    #111827;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), #eab308, #2563eb);
  content: "";
}

.hero-inner {
  display: grid;
  min-height: 610px;
  align-items: center;
  gap: 48px;
  padding: 72px 0 84px;
}

.eyebrow {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  max-width: 700px;
  margin: 24px 0 0;
  color: #d8dee8;
  font-size: 18px;
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 800;
  line-height: 1.2;
}

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

.button.secondary {
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
}

.button.light {
  border-color: var(--line);
  background: #fff;
  color: var(--steel);
}

.button.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: -44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.stat {
  min-height: 116px;
  padding: 24px;
  background: #fff;
}

.stat strong {
  display: block;
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section {
  padding: 84px 0;
}

.section.alt {
  background: #fff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.section h2,
.page-hero h1 {
  color: var(--steel);
}

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

.section-lead,
.page-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

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

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.tile {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.tile-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tile h3 {
  margin: 12px 0 0;
  color: var(--steel);
  font-size: 22px;
}

.tile p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  color: var(--steel);
  font-weight: 800;
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 30px;
}

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

.info-list div {
  min-width: 0;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 6px 0 0;
  color: var(--steel);
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 78px 0 58px;
}

.article-text {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-line;
}

.contact-band {
  background: var(--steel);
  color: #fff;
}

.contact-band h2 {
  color: #fff;
}

.contact-band .section-lead {
  color: #d8dee8;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 34px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.admin-page {
  background: #eef2f7;
}

.admin-shell {
  padding: 36px 0 72px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
}

.admin-section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 26px;
}

.admin-section:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.admin-section h2 {
  margin: 0 0 18px;
  color: var(--steel);
  font-size: 22px;
}

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

.form-field {
  display: grid;
  gap: 8px;
}

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

.form-field label {
  color: var(--steel);
  font-size: 13px;
  font-weight: 900;
}

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

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.notice {
  display: none;
  margin-bottom: 18px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  padding: 12px 14px;
  color: #166534;
  font-weight: 800;
}

.notice.show {
  display: block;
}

@media (max-width: 820px) {
  .nav-actions {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .mobile-menu.open {
    display: block;
  }

  .mobile-menu .lang-switch {
    margin-top: 10px;
  }

  .hero {
    background:
      linear-gradient(110deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.9)),
      #111827;
  }

  .hero-inner {
    min-height: auto;
    padding: 64px 0 86px;
  }

  .stats,
  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .info-list,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    margin-top: -34px;
  }

  .section {
    padding: 62px 0;
  }

  .section-head,
  .footer-row,
  .admin-top {
    align-items: stretch;
    flex-direction: column;
  }
}
