:root {
  --bg: #faf5ed;
  --surface: #fffdf9;
  --tint: #f3e8d8;
  --text: #2a1a14;
  --muted: #654e42;
  --primary: #9e2a2b;
  --primary-hover: #7d1f20;
  --accent: #c48b28;
  --border: #e3d3be;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(42, 26, 20, .06);
  --shadow-md: 0 8px 24px rgba(42, 26, 20, .08);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 12px;
}
h1 { font-size: 36px; }
h2 { font-size: 26px; margin-top: 32px; }
h3 { font-size: 20px; margin-top: 20px; }
p { margin: 0 0 14px; max-width: 70ch; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.jba-skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.jba-skip:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 16px;
  clip-path: none;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius);
  z-index: 200;
}

.jba-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.jba-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.jba-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; }
.jba-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: 'Noto Serif TC', Georgia, serif;
  font-weight: 700;
  font-size: 18px;
}
.jba-brand:hover { text-decoration: none; color: var(--primary); }
.jba-nav { display: flex; align-items: center; gap: 4px; }
.jba-link {
  padding: 8px 12px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.jba-link:hover, .jba-link.active { background: var(--tint); color: var(--primary); text-decoration: none; }

.jba-main { padding: 18px 0 56px; }
.jba-hero { margin-bottom: 14px; }
.jba-crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.jba-lead { font-size: 16px; color: var(--muted); margin: 0; }

.jba-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

.jba-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 32px;
}
.jba-article h2:first-child { margin-top: 0; }
.jba-article ul, .jba-article ol { padding-left: 20px; margin: 0 0 16px; max-width: 70ch; }
.jba-article li { margin-bottom: 6px; }
.jba-article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.jba-article th, .jba-article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.jba-article th { background: var(--tint); font-weight: 600; }

.jba-faq { margin-bottom: 36px; }
.jba-faq h2 { margin-top: 0; margin-bottom: 16px; }
.jba-faq-list { display: flex; flex-direction: column; gap: 10px; }
.jba-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.jba-faq-item summary { font-weight: 600; cursor: pointer; list-style: none; }
.jba-faq-item p { margin: 10px 0 0; color: var(--muted); }

.jba-rel h2 { margin-top: 0; margin-bottom: 16px; }
.jba-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.jba-rel-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.jba-rel-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.jba-rel-card strong { color: var(--text); font-size: 15px; }
.jba-rel-card span { color: var(--muted); font-size: 13px; }

.jba-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 28px 0; }
.jba-foot-col { display: flex; flex-direction: column; gap: 12px; }
.jba-tagline { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.jba-foot-nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.jba-copy { color: var(--muted); font-size: 13px; margin: 0; }

@media (max-width: 640px) {
  h1 { font-size: 24px; margin-bottom: 4px; }
  h2 { font-size: 22px; }
  .jba-wrap { padding: 0 14px; }
  .jba-head-row { min-height: 46px; gap: 8px; }
  .jba-brand { font-size: 16px; }
  .jba-nav { overflow-x: auto; gap: 2px; }
  .jba-link { padding: 6px 8px; font-size: 13px; min-height: 36px; white-space: nowrap; }
  .jba-main { padding: 10px 0 40px; }
  .jba-hero { margin-bottom: 10px; }
  .jba-lead { font-size: 14px; line-height: 1.4; }
  .jba-stage { padding: 14px; margin-bottom: 24px; }
  .jba-article { padding: 18px 16px; }
  .jba-rel-grid { grid-template-columns: 1fr; }
}