:root {
  --blue: #2B2E6E;
  --blue-dark: #1E2152;
  --blue-light: #EEF0FA;
  --blue-mid: #C3C8EC;
  --teal: #C7900B;
  --gold: #F5C542;
  --text: #1A1D33;
  --muted: #5C6178;
  --line: #E5E6F0;
  --bg: #F7F8FC;
  --max: 1120px;
  --grad: linear-gradient(90deg, #2B2E6E 0%, #454AA0 100%);
  --gold-grad: linear-gradient(90deg, #D9A414 0%, #F5C542 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Inter", "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-height: 66px;
  padding: 8px 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-img {
  height: 42px; width: auto; aspect-ratio: 350 / 160;
  object-fit: cover; object-position: top;
  display: block;
}
.brand-name { line-height: 1.2; }
.brand-name .en { font-weight: 800; font-size: 14px; color: var(--text); display: block; letter-spacing: 0.2px; }
.brand-name .zh { font-size: 11px; color: var(--muted); display: block; }
.menu { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; row-gap: 4px; justify-content: center; order: 3; flex: 0 0 100%; margin-top: 4px; }
.menu a { font-size: 12px; color: var(--muted); letter-spacing: 0.15px; white-space: nowrap; }
.menu a .zh { color: var(--text); font-weight: 600; margin-left: 4px; font-size: 11px; }
.menu a:hover { color: var(--blue); }
.menu a.active { color: var(--blue); font-weight: 700; }
.lang {
  font-size: 11.5px; font-weight: 600; color: var(--blue);
  border: 1.5px solid var(--blue-mid); border-radius: 999px; padding: 4px 11px;
  white-space: nowrap;
  transition: all .15s;
}
.lang:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 兩行式導航：第1行 品牌 + 語言切換；第2行 9 項雙語菜單整行居中（2026-10-23） */
.nav .brand { order: 1; }
.nav .lang { order: 2; margin-left: auto; }

/* Hero — dark indigo, RISC-V style */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: #2B2E6E;
  padding-bottom: 72px;
}
.hero-inner {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.hero-art {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 1;
}
.hero-content { position: relative; max-width: 640px; padding: 56px 0 8px; z-index: 2; }
.kicker {
  display: inline-block;
  font-size: 12px; letter-spacing: 3px; font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(245,197,66,0.55);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 42px; line-height: 1.28; font-weight: 800;
  margin-bottom: 18px; letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(20,22,60,0.5);
}
.hero p { font-size: 16.5px; color: #EDECF9; margin-bottom: 24px; max-width: 560px; text-shadow: 0 1px 8px rgba(20,22,60,0.45); }
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 999px;
  font-size: 14px; font-weight: 700; margin-right: 12px;
  transition: all .15s;
}
.btn-primary { background: var(--gold-grad); color: #1E2152; box-shadow: 0 6px 20px rgba(245,197,66,0.35); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.7); color: #fff; }
.btn-outline { border: 1.5px solid var(--blue); color: var(--blue); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(245,197,66,0.45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* Stats band — floating card */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23,26,62,0.14);
  border: 1px solid var(--line);
  margin-top: -64px;
  position: relative;
  z-index: 5;
  overflow: hidden;
}
.stat { padding: 22px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num {
  font-size: 34px; font-weight: 800; letter-spacing: -1px;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--teal);
}
.stat .label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Sections */
section { padding: 52px 0; }
section.alt { background: var(--bg); }
.sec-head { margin-bottom: 26px; }
.sec-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 40px; flex-wrap: wrap; }
.sec-head.split .sh-note { max-width: 430px; font-size: 14px; color: var(--muted); line-height: 1.75; margin-bottom: 3px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 2.5px; font-weight: 800;
  color: var(--teal); margin-bottom: 10px; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px;
  background: var(--gold-grad); display: inline-block;
}
.sec-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.4px; }
.sec-head .sub { font-size: 15px; color: var(--muted); margin-top: 10px; max-width: 720px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 20px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-mid);
  box-shadow: 0 14px 34px rgba(23,26,62,0.10);
}
.card .icon {
  width: 34px; height: 6px; border-radius: 3px;
  background: var(--grad); margin-bottom: 13px;
}
.card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--muted); line-height: 1.75; }

.dual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.dual .card { background: var(--blue-light); border-color: var(--blue-mid); }
.dual .card .icon { background: var(--teal); }

/* News */
.news-card {
  display: block; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; color: var(--text); background: #fff;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-mid);
  box-shadow: 0 14px 34px rgba(23,26,62,0.10);
  color: var(--text);
}
.news-card .thumb {
  height: 110px;
  background: linear-gradient(135deg, #2B2E6E 0%, #454AA0 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.thumb-tag {
  position: absolute; top: 12px; left: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--gold);
  border: 1px solid rgba(245,197,66,0.5);
  background: rgba(30,33,82,0.35);
  border-radius: 999px; padding: 2px 12px;
}
.thumb-icon { font-size: 48px; filter: drop-shadow(0 5px 12px rgba(0,0,0,0.3)); }
.news-card .body { padding: 16px 18px; }
.news-card .date { font-size: 12px; color: var(--muted); }
.news-card h3 { font-size: 15.5px; font-weight: 700; margin-top: 8px; line-height: 1.55; }

/* Page hero (inner pages) — dark indigo */
.page-hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(700px 300px at 90% -20%, rgba(245,197,66,0.12), transparent 60%),
    radial-gradient(500px 260px at 5% 120%, rgba(110,116,196,0.22), transparent 60%),
    linear-gradient(135deg, #23265C 0%, #2B2E6E 60%, #3A3E85 100%);
  padding: 44px 0;
}
.page-hero .eyebrow { color: var(--gold); margin-bottom: 10px; }
.page-hero .eyebrow::before { background: var(--gold-grad); }
.page-hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.4px; }
.page-hero p { font-size: 15.5px; color: #C3CDEB; margin-top: 12px; max-width: 720px; }

/* Article / prose */
.prose { max-width: 780px; }
.prose h2 { font-size: 22px; font-weight: 800; margin: 30px 0 10px; letter-spacing: -0.3px; }
.prose p { font-size: 15px; color: #38404F; margin-bottom: 11px; }
.prose ul { margin: 0 0 11px 22px; font-size: 15px; color: #38404F; }
.prose li { margin-bottom: 6px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  background: var(--blue-light);
  color: var(--blue); border-radius: 999px; padding: 3px 14px; margin-bottom: 12px;
}

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 14px 0; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 14px; text-align: left; vertical-align: top; }
th {
  background: var(--blue); color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: 0.5px;
}
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
tbody tr:hover td, tr:hover td { background: #F8FAFE; }
.members td:last-child { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Application entry links */
.apply-links { list-style: none; margin: 0; padding: 0; }
.apply-links li { margin-bottom: 12px; }
.apply-links a {
  display: flex; flex-direction: column; gap: 3px; position: relative;
  padding: 15px 48px 15px 18px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.apply-links a:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 28px rgba(43,95,199,0.14);
  transform: translateY(-2px);
}
.apply-links a::after {
  content: "→"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  transition: background .15s, color .15s;
}
.apply-links a:hover::after { background: var(--grad); color: #fff; }
.apply-links b { font-size: 15px; color: var(--text); }
.apply-links span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Org chart */
.org { display: flex; flex-direction: column; gap: 11px; margin: 16px 0; }
.org-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.org-node {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.org-node:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(23,26,62,0.08); }
.org-node b { display: block; font-size: 14px; }
.org-node span { font-size: 12px; color: var(--muted); }
.org-node.top {
  background: var(--grad); border-color: transparent;
  box-shadow: 0 8px 24px rgba(43,95,199,0.35);
}
.org-node.top b, .org-node.top span { color: #fff; }

/* Contact form */
.form-card { max-width: 620px; box-shadow: 0 10px 34px rgba(23,26,62,0.06); }
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 5px; }
input, textarea, select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; font-family: inherit; background: #fff;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,95,199,0.15); }
button[type="submit"] {
  margin-top: 18px; background: var(--grad); color: #fff; border: none;
  padding: 12px 36px; border-radius: 999px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(43,95,199,0.4); }

/* Footer */
footer {
  background: linear-gradient(180deg, #2B2E6E 0%, #1E2152 100%);
  color: #B9BFDF; padding: 38px 0 22px; font-size: 13px;
}
.foot {
  display: grid;
  grid-template-columns: minmax(255px, .95fr) 2.2fr;
  gap: 26px 46px;
  align-items: start;
}
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-brand .logo-img {
  height: 40px; width: auto; flex: 0 0 auto;
  background: #fff; border-radius: 9px; padding: 5px 9px;
  object-fit: contain; object-position: center;
}
.foot-brand .fname { color: #fff; font-weight: 800; font-size: 12.5px; line-height: 1.5; letter-spacing: .1px; max-width: 300px; }
.foot-brand .fsub { color: #A9AFD4; font-size: 11.5px; line-height: 1.65; margin-top: 0; max-width: 300px; }
.foot-cols { display: grid; grid-template-columns: 1.05fr .95fr 1fr; gap: 26px; }
.foot-col h4 { color: var(--gold); font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 10px; }
.foot-col a { display: block; color: #B9BFDF; margin-bottom: 6px; font-size: 12.5px; line-height: 1.5; }
.foot-col a:hover { color: var(--gold); }
.copyright { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 24px; padding-top: 14px; color: #858AB6; font-size: 12px; }

/* ===== New channels: Scenarios & Community (added 2026-10) ===== */
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  color: var(--teal); background: #FBF3DD; border: 1px solid #EBD9A6;
  border-radius: 999px; padding: 3px 12px; margin: 0 6px 10px 0;
}
.pill.alt { color: var(--blue); background: var(--blue-light); border-color: var(--blue-mid); }
.lead { font-size: 15.5px; color: var(--muted); max-width: 860px; line-height: 1.85; }
.scn { display: flex; flex-direction: column; }
.scn .emoji {
  width: 42px; height: 42px; border-radius: 12px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-light); border: 1px solid var(--blue-mid); margin-bottom: 12px;
}
.scn h3 { font-size: 17.5px; }
.scn .needs { font-size: 14px; color: var(--muted); margin: 8px 0 14px; line-height: 1.75; }
.scn .path {
  font-size: 13px; color: var(--text); line-height: 1.7;
  border-left: 3px solid var(--teal); padding: 8px 0 8px 13px; margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(199,144,11,.10), transparent);
}
.scn .cta { margin-top: auto; font-size: 13.5px; font-weight: 700; color: var(--blue); }
.scn .cta:hover { color: var(--teal); }
.figure {
  font-size: 28px; font-weight: 800; letter-spacing: -1px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--teal);
}
.bench { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bench .card .chip-no { font-size: 12px; color: var(--teal); font-weight: 700; letter-spacing: .6px; margin-bottom: 6px; }
.bench .card p { font-size: 13.5px; }
.repo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.repo .card .chip-no { font-size: 12px; color: var(--blue); font-weight: 700; letter-spacing: .4px; margin-bottom: 6px; }
.repo .card p { font-size: 13.5px; }
.linkrow { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.note {
  font-size: 13px; color: var(--muted); border-left: 3px solid var(--blue-mid);
  padding: 7px 0 7px 14px; background: var(--blue-light); border-radius: 0 8px 8px 0; margin-top: 14px;
}

@media (max-width: 860px) {
  .bench, .repo { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: -48px; }
  .stat { padding: 20px 18px; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-3, .grid-4, .dual { grid-template-columns: 1fr; }
  .org-row { grid-template-columns: 1fr; }
  .hero { padding-bottom: 56px; }
  .hero h1 { font-size: 28px; }
  .hero-inner { min-height: 360px; }
  .hero-art { background-position: 72% top; }
  .hero-content { padding-top: 44px; }
  .menu { display: none; }
  section { padding: 40px 0; }
  .sec-head h2 { font-size: 24px; }
}

/* 兩行式導航下中文副標恆顯示；極窄屏(<860)整條菜單已在下方 media 隱藏 */

/* 頁腳響應式（2026-10-23 模板重做） */
@media (max-width: 860px) {
  .foot { grid-template-columns: 1fr; gap: 24px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
  .foot-brand .fname { font-size: 12.5px; }
}
@media (max-width: 520px) {
  .foot-cols { grid-template-columns: 1fr; }
}

/* 申請表多選項（2026-10-23） */
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin: 2px 0 4px; }
.check-grid label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; margin: 0; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.check-grid label:hover { border-color: var(--blue-mid); background: var(--blue-light); }
.check-grid input[type="checkbox"] { width: 15px; height: 15px; margin: 0; flex: 0 0 auto; accent-color: var(--blue); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps .card .chip-no { font-size: 12px; font-weight: 800; color: var(--teal); letter-spacing: .8px; margin-bottom: 6px; }
.steps .card h3 { font-size: 15.5px; margin-bottom: 5px; }
.steps .card p { font-size: 13px; }
@media (max-width: 720px) { .check-grid { grid-template-columns: 1fr; } .steps { grid-template-columns: 1fr; } }
/* 五個工作委員會：長名稱縮排（2026-10-23） */
.org-row.five .org-node { padding: 12px 8px; }
.org-row.five .org-node b { font-size: 12.5px; line-height: 1.4; }
.org-row.five .org-node span { font-size: 11.5px; line-height: 1.5; display: block; margin-top: 3px; }
