:root {
  --bg: #f3f5f8;
  --bg-elevated: #eaf0f6;
  --surface: #fcfdfe;
  --surface-2: #f6f8fb;
  --text: #202734;
  --text-strong: #141a24;
  --muted: #5e697a;
  --accent: #4b607f;
  --accent-strong: #334765;
  --border: rgba(40, 54, 76, 0.16);
  --border-strong: rgba(40, 54, 76, 0.26);
  --focus: #7f9bc2;
  --ok: #3f6b5c;
  --danger: #7c3a45;
  --shadow-soft: 0 10px 24px rgba(20, 30, 45, 0.055);
  --shadow-card: 0 4px 12px rgba(20, 30, 45, 0.06);
  --radius-panel: 16px;
  --radius-card: 12px;

  --font-en: "Inter", "Inter Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-zh: "Noto Sans SC", "Noto Sans TC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-sans: var(--font-zh);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-size: clamp(16px, 0.4vw + 14px, 19px);
}

body {
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 54%, #edf2f7 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.72;
  letter-spacing: 0.002em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:lang(zh-CN),
:lang(zh) {
  --font-sans: var(--font-zh);
  font-family: var(--font-sans);
}

:lang(en) {
  --font-sans: var(--font-en);
  font-family: var(--font-en);
  letter-spacing: 0;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
  color: #283a56;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  color: var(--text-strong);
  padding: 0.58rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--accent);
  z-index: 1000;
}

.lang-switch-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(252, 253, 254, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem;
  box-shadow: 0 4px 14px rgba(25, 35, 54, 0.12);
  backdrop-filter: blur(7px);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 36px;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--text);
  outline: none;
  background: rgba(75, 96, 127, 0.1);
}

.lang-btn.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f8fbff;
}

.site-header {
  background: radial-gradient(circle at 8% 14%, rgba(127, 155, 194, 0.18), transparent 38%),
    radial-gradient(circle at 86% 4%, rgba(199, 210, 226, 0.34), transparent 34%), var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 6rem 0 3rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  margin: 0;
}

h1 {
  margin-top: 0.5rem;
  margin-bottom: 0.9rem;
  font-size: clamp(1.9rem, 1.38rem + 2.5vw, 3rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 76ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.64rem 1rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  font-weight: 560;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  border-color: rgba(75, 96, 127, 0.62);
  background: #fff;
  color: var(--text);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #f6faff;
  border-color: transparent;
  background: linear-gradient(135deg, #5a7091, #2c405f);
}

.btn-primary {
  border-color: transparent;
  color: #f6faff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

main {
  padding: 2rem 0 4rem;
}

.panel {
  margin: 1.2rem 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.6));
  box-shadow: var(--shadow-soft);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

h2 {
  font-size: clamp(1.24rem, 1rem + 1.16vw, 1.8rem);
}

.data-meta {
  margin-top: 0.35rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.23rem 0.62rem;
  color: #48586f;
  background: linear-gradient(180deg, #f7fafe, #eef3f9);
  font-size: 0.78rem;
  font-weight: 560;
  white-space: nowrap;
}

.chip-live {
  color: #315f53;
  border-color: rgba(63, 107, 92, 0.35);
  background: linear-gradient(180deg, rgba(118, 168, 153, 0.24), rgba(118, 168, 153, 0.14));
}

.state-box {
  margin-top: 0.85rem;
}

.state-note {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 0.9rem;
  background: var(--surface-2);
  color: var(--muted);
}

.state-note.is-error {
  border-color: rgba(124, 58, 69, 0.4);
  color: var(--danger);
  background: rgba(124, 58, 69, 0.08);
}

.board {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.board-column {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.72rem;
  background: rgba(252, 253, 254, 0.9);
  min-height: 320px;
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.02rem;
  line-height: 1.3;
}

.count-chip {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: #eef3fa;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.52rem;
}

.column-list {
  display: grid;
  gap: 0.56rem;
}

.repo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 0.62rem 0.68rem;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.repo-title {
  font-size: 0.94rem;
  line-height: 1.38;
  margin: 0 0 0.28rem;
  word-break: break-word;
}

.repo-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.48;
}

.repo-meta {
  margin-top: 0.48rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.06rem 0.46rem;
  font-size: 0.72rem;
  color: #43556f;
  background: #f7fafe;
}

.badge.positive {
  border-color: rgba(63, 107, 92, 0.42);
  color: var(--ok);
  background: rgba(63, 107, 92, 0.1);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
}

@media (max-width: 1150px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    padding-top: 4.8rem;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .board-column {
    min-height: 0;
  }

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

  .btn {
    width: 100%;
  }
}
