@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: rgba(31, 31, 31, 0.1);
  --muted: #6a6a6a;
  --r: 28px;
  --sans: 'Noto Sans TC', -apple-system, 'PingFang TC', 'Microsoft JhengHei', 'Hiragino Sans', sans-serif;
  --serif: 'Noto Serif TC', 'Songti TC', 'PingFang TC', Georgia, serif;
  --soft: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

section[id] {
  scroll-margin-top: 104px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  left: 16px;
}

/* ---------- 顶部控件 ---------- */
.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(14px, 3vw, 28px);
  background: linear-gradient(var(--mist) 55%, rgba(245, 245, 245, 0));
}

.mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.mark img {
  width: 26px;
  height: 26px;
}

.mark:hover {
  transform: scale(1.06);
}

.chrome-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cta:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

.drawer {
  position: relative;
  z-index: 60;
}

.drawer > summary {
  list-style: none;
  cursor: pointer;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--soft);
  font-size: 16px;
  position: relative;
  z-index: 50;
  user-select: none;
}

.drawer > summary::-webkit-details-marker {
  display: none;
}

.s-close {
  display: none;
}

.drawer[open] .s-open {
  display: none;
}

.drawer[open] .s-close {
  display: inline;
}

.panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--paper);
  padding: 108px clamp(20px, 6vw, 72px) 48px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: panel-in 0.28s ease both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.panel-brand {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.panel menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.panel menu a {
  display: flex;
  align-items: center;
  min-height: 58px;
  font-family: var(--serif);
  font-size: clamp(1.28rem, 4.4vw, 1.95rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.panel menu a:hover {
  transform: translateX(8px);
  opacity: 0.72;
}

/* ---------- 主栅格 ---------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px clamp(14px, 3vw, 28px) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 26px;
  align-items: start;
}

/* ---------- 首屏 ---------- */
.hero {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  padding: clamp(26px, 5vw, 64px);
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.hero-in {
  position: relative;
  z-index: 1;
  max-width: 880px;
  will-change: transform;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.6);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7.2vw, 4.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.lead {
  margin: 20px 0 0;
  max-width: 44ch;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.76);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.22s ease;
}

.chips a:hover {
  background: rgba(255, 255, 255, 0.24);
}

.badge {
  position: absolute;
  top: clamp(18px, 4vw, 34px);
  right: clamp(18px, 4vw, 34px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  transform: rotate(-3deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease;
}

.badge:hover {
  transform: rotate(-3deg) scale(1.05);
}

/* ---------- 正文 ---------- */
article {
  min-width: 0;
}

main article > section {
  background: var(--paper);
  border-radius: var(--r);
  padding: clamp(22px, 4vw, 44px);
  margin: 0 0 20px;
  box-shadow: var(--soft);
}

main article > section:nth-of-type(even) {
  margin-left: clamp(0px, 4vw, 56px);
}

main article > section:nth-of-type(3n) {
  margin-right: clamp(0px, 3vw, 34px);
}

article h2 {
  font-size: clamp(1.42rem, 3.2vw, 2.05rem);
  line-height: 1.3;
  margin: 0 0 0.55em;
}

article h3 {
  font-size: clamp(1.12rem, 1.9vw, 1.32rem);
  margin: 1.5em 0 0.5em;
}

article h4 {
  font-size: 1.06rem;
  margin: 1.3em 0 0.4em;
}

.subtitle,
.subhead,
.desc,
.lead-sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin: -0.35em 0 1.2em;
}

article p:last-child,
article ul:last-child,
article ol:last-child {
  margin-bottom: 0;
}

article ul,
article ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

article li {
  margin: 0.35em 0;
}

article a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

article a:hover {
  background: var(--mist);
}

article strong {
  font-weight: 700;
}

article blockquote {
  margin: 1.2em 0;
  padding: 16px 22px;
  background: var(--mist);
  border-radius: 18px;
  color: var(--ink);
}

article blockquote p:last-child {
  margin-bottom: 0;
}

article img {
  border-radius: 20px;
  margin: 1.1em 0;
}

article hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 1.8em 0;
}

article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 1em 0;
}

article th,
article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  min-width: 0;
}

.rail-card {
  background: var(--paper);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--soft);
}

.rail-card h2 {
  font-size: 1.22rem;
  margin: 0 0 6px;
}

.rail-card .subtitle {
  font-size: 15px;
  margin: 0 0 16px;
  color: var(--muted);
}

.rail-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-card li:last-child a {
  border-bottom: 0;
}

.rail-card a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.2s ease;
}

.rail-card a:hover {
  padding-left: 6px;
}

/* ---------- 页脚 ---------- */
.foot {
  text-align: center;
  padding: 44px 20px 44px;
  color: var(--muted);
  font-size: 15px;
}

.foot p {
  margin: 0 0 4px;
}

.foot small {
  display: block;
  font-size: 14px;
  color: #8d8d8d;
  letter-spacing: 0.04em;
}

/* ---------- 动效 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .panel {
    animation: none;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 88px;
    gap: 20px;
  }
  .hero {
    min-height: 62vh;
  }
  main article > section:nth-of-type(even),
  main article > section:nth-of-type(3n) {
    margin-left: 0;
    margin-right: 0;
  }
  .rail {
    position: static;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  .cta {
    padding: 0 16px;
  }
  .panel {
    padding-top: 96px;
  }
  .panel menu a {
    min-height: 54px;
  }
  .hero {
    border-radius: 24px;
  }
  main article > section,
  .rail-card {
    border-radius: 24px;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
