:root {
  --ink: #0b0b0b;
  --ink-soft: #3a3a3a;
  --muted: #6f6f6f;
  --paper: #f6f6f4;
  --paper-2: #efefec;
  --white: #ffffff;
  --line: #e6e6e2;
  --line-strong: #d2d2cc;
  --seal: #e10600;
  --seal-deep: #b80500;
  --ok: #157a3a;
  --max: 1160px;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(11, 11, 11, 0.06);
  --ease: 160ms ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--seal); }
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.hx-wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.hx-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 246, 244, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.hx-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.hx-brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1;
}
.hx-brand:hover { color: var(--ink); }
.hx-brand__en {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--muted);
}
.hx-brand__zh {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hx-util {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.hx-util__link {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.hx-util__link:hover,
.hx-util__link[aria-current="page"] { color: var(--ink); }
.hx-util--mobile { display: none; }
.hx-nav__cta {
  background: var(--ink);
  color: var(--white) !important;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
}
.hx-nav__cta:hover { background: var(--seal); color: #fff !important; }
.hx-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}
.hx-menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--ink);
}

.hx-cats {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0;
  padding: 0 4px;
}
.hx-cats__item { position: relative; flex: 1 1 auto; text-align: center; }
.hx-cats__link {
  display: block;
  padding: 11px 6px 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.hx-cats__link:hover,
.hx-cats__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--seal);
}
.hx-cats__sub {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  transform: translateX(-50%);
  min-width: 220px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: left;
  z-index: 30;
}
.hx-cats__item--sub:hover .hx-cats__sub,
.hx-cats__item--sub:focus-within .hx-cats__sub { display: block; }
.hx-cats__sub a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
}
.hx-cats__sub a:hover { color: var(--seal); background: var(--paper); }

/* Hero */
.hx-hero {
  padding: 72px 0 28px;
}
.hx-hero__inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  max-width: 820px;
}
.hx-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 18px;
  text-transform: uppercase;
}
.hx-hero__kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--seal);
}
.hx-hero h1 {
  font-size: clamp(48px, 9vw, 84px);
  margin: 0 0 12px;
  letter-spacing: -0.05em;
}
.hx-hero__slogan {
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
.hx-hero__lead {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 34em;
  margin: 0;
}
.hx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hx-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}
.hx-jump a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.hx-jump a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.hx-btn--solid { background: var(--ink); color: #fff !important; }
.hx-btn--solid:hover { background: var(--seal); color: #fff !important; }
.hx-btn--ghost,
.hx-btn--ghost-light {
  border-color: var(--line-strong);
  color: var(--ink) !important;
  background: var(--white);
}
.hx-btn--ghost:hover,
.hx-btn--ghost-light:hover {
  border-color: var(--ink);
  color: var(--ink) !important;
}

/* Sections */
.hx-section { padding: 56px 0; }
.hx-section--tight { padding: 40px 0 64px; }
.hx-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--seal);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.hx-section h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 10px; }
.hx-lede { color: var(--ink-soft); max-width: 38em; margin-bottom: 28px; }

/* Topic digest */
.hx-digest { display: grid; gap: 28px; }
.hx-digest__group { padding: 0; border: 0; }
.hx-digest__group h3 {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.hx-digest__list { list-style: none; padding: 0; margin: 0; }
.hx-digest__list a,
.hx-spot a,
.hx-guide-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.hx-digest__list a:hover,
.hx-spot a:hover,
.hx-guide-list a:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.hx-digest__name {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hx-digest__meta { color: var(--muted); font-size: 13px; }

.hx-spot {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.hx-spot a { margin: 0; min-height: 92px; }
.hx-spot .hx-digest__name { font-size: 18px; }

.hx-guide-list { list-style: none; padding: 0; margin: 0; }
.hx-guide-list li { counter-increment: guide; }
.hx-guide-list { counter-reset: guide; }
.hx-guide-list a { grid-template-columns: 36px minmax(0, 1fr) auto; }
.hx-guide-num {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hx-more {
  display: inline-flex;
  margin-top: 18px;
  font-weight: 600;
  text-decoration: none;
}
.hx-more:hover { color: var(--seal); }

/* Article */
.hx-article { width: min(740px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 80px; }
.hx-article h1 { font-size: clamp(32px, 4.5vw, 46px); margin: 12px 0 18px; }
.hx-article .hx-lead { font-size: 19px; color: var(--ink-soft); }
.hx-article h2 { font-size: 24px; margin: 36px 0 10px; }
.hx-article h3 { font-size: 18px; margin: 24px 0 8px; }
.hx-faq { border-top: 1px solid var(--line); margin: 32px 0; }
.hx-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.hx-faq summary { cursor: pointer; font-weight: 600; }

.hx-cite {
  margin: 40px 0 0;
  padding: 20px 22px 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
}
.hx-cite h2 { font-size: 14px; margin: 0 0 10px; letter-spacing: 0.06em; }

.hx-cta {
  margin: 40px 0 0;
  padding: 28px;
  background: var(--ink);
  color: #f4f4f4;
  border-radius: 16px;
}
.hx-cta h2 { color: #fff; font-size: 26px; margin: 0 0 8px; letter-spacing: -0.03em; }
.hx-cta p { color: #cfcfcf; }
.hx-cta .hx-btn--solid { background: #fff; color: var(--ink) !important; }
.hx-cta .hx-btn--solid:hover { background: var(--seal); color: #fff !important; }
.hx-cta .hx-btn--ghost,
.hx-cta .hx-btn--ghost-light {
  background: transparent;
  border-color: #5a5a5a;
  color: #fff !important;
}
.hx-cta .hx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.hx-crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hx-crumb a { color: var(--muted); text-decoration: none; }
.hx-crumb a:hover { color: var(--seal); }
.hx-crumb__sep { margin: 0 8px; }

.hx-related { margin-top: 48px; }
.hx-related ul { list-style: none; padding: 0; }
.hx-related li { margin: 0; }
.hx-related a {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

/* Forms */
.hx-form { display: grid; gap: 14px; max-width: 560px; }
.hx-form label { font-size: 14px; color: var(--ink-soft); display: grid; gap: 6px; font-weight: 500; }
.hx-form input,
.hx-form select,
.hx-form textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.hx-form input:focus,
.hx-form select:focus,
.hx-form textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.hx-form textarea { min-height: 140px; resize: vertical; }
.hx-form__note { font-size: 14px; color: var(--muted); margin: 0; }
.hx-notice { padding: 12px 14px; background: #e8f6ec; color: var(--ok); margin-bottom: 16px; border-radius: 10px; }
.hx-notice--err { background: #fde8e8; color: var(--seal-deep); }

/* Footer */
.hx-footer {
  margin-top: 24px;
  padding: 48px 0 28px;
  background: var(--ink);
  color: #bdbdbd;
  font-size: 14px;
}
.hx-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.hx-footer .hx-brand__en { color: #8a8a8a; margin: 0 0 6px; }
.hx-footer .hx-brand__zh { color: #fff; margin: 0 0 10px; }
.hx-footer a { color: #d6d6d6; text-decoration: none; }
.hx-footer a:hover { color: #fff; }
.hx-footer ul { list-style: none; padding: 0; margin: 0; }
.hx-footer li { margin: 0 0 8px; }
.hx-footer strong { color: #fff; font-size: 13px; letter-spacing: 0.06em; }
.hx-footer__legal { border-top: 1px solid #2a2a2a; padding-top: 16px; font-size: 13px; color: #8f8f8f; }

.hx-page { padding: 48px 0 80px; }
.hx-page h1 { font-size: clamp(32px, 5vw, 48px); margin: 8px 0 16px; }
.hx-prose { max-width: 680px; }

@media (max-width: 1080px) {
  .hx-menu-btn { display: inline-block; }
  .hx-header { position: relative; }
  .hx-util--bar { display: none; }
  .hx-cats-wrap {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px 20px 24px;
    background: var(--paper);
  }
  .hx-cats-wrap.is-open { display: block; }
  .hx-util--mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .hx-cats {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }
  .hx-cats__item { text-align: left; }
  .hx-cats__link { padding: 10px 0; white-space: normal; border-bottom: 1px solid var(--line); }
  .hx-cats__sub {
    position: static;
    display: block;
    transform: none;
    border: 0;
    padding: 0 0 8px 8px;
    background: transparent;
    box-shadow: none;
  }
  .hx-footer__grid { grid-template-columns: 1fr; }
  .hx-digest__list a,
  .hx-spot a,
  .hx-guide-list a { grid-template-columns: 1fr; gap: 4px; }
  .hx-guide-list a { grid-template-columns: 28px 1fr; }
  .hx-spot { grid-template-columns: 1fr; }
  .hx-hero { padding-top: 40px; }
}
