:root {
  --twilight-blue: #5f7dc6;
  --horizon-azure: #6d97cd;
  --sunset-glow: #d89b8f;
  --soft-amber: #f2b37d;
  --stone-mist: #d1d2cb;
  --ink: #4a63a0;
  --paper: #fbf6ea;
  --surface: #f0f7fd;
  --ivory: #fcf9f2;
  --white: #ffffff;
  --muted: #6d97cd;
  --dark-canvas: #2f4070;
  --max: 760px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Hiragino Sans CNS", "Noto Sans TC", "Microsoft JhengHei", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--twilight-blue);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--twilight-blue);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  border: 2px solid var(--horizon-azure);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 0 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  color: var(--ink);
}

.brand img,
.header-app-icon img {
  display: block;
  object-fit: cover;
  background: #fffaf1;
  border-radius: 22%;
}

.brand img {
  width: 40px;
  height: 40px;
}

.header-app-icon {
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 0;
}

.header-app-icon img {
  width: 44px;
  height: 44px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
}

.header-nav a {
  color: var(--ink);
  text-decoration: none;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--twilight-blue);
  text-decoration: underline;
}

.lang-switch {
  display: inline-flex;
  border: 2px solid var(--horizon-azure);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 12px;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--twilight-blue);
  color: var(--white);
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 24px 0 8px;
  color: var(--dark-canvas);
}

.lede {
  font-size: 1.12rem;
  margin: 0 0 16px;
}

.kicker {
  display: inline-block;
  background: var(--surface);
  border: 2px solid var(--horizon-azure);
  color: var(--twilight-blue);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.features {
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 12px 0;
  border-bottom: 1px solid var(--stone-mist);
}

h2 {
  font-size: 1.15rem;
  margin: 28px 0 8px;
  color: var(--dark-canvas);
}

h3 {
  font-size: 1.02rem;
  margin: 20px 0 6px;
  color: var(--ink);
}

.prose p,
.prose li {
  margin: 0 0 12px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.muted {
  color: var(--muted);
}

.crumb {
  color: var(--muted);
  font-size: 0.92rem;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--horizon-azure);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
}

.cta-link {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--twilight-blue);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.cta-link:hover {
  background: var(--dark-canvas);
}

footer {
  margin: 48px 0 28px;
  padding-top: 16px;
  border-top: 1px solid var(--stone-mist);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 0;
}

.footer-links a {
  color: var(--ink);
}

.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 20px;
}

.help-toc a {
  font-size: 0.92rem;
  font-weight: 700;
}

.license-table-wrap {
  overflow-x: auto;
  margin: 12px 0 20px;
  -webkit-overflow-scrolling: touch;
}

.license-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.license-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  color: var(--dark-canvas);
  padding: 0 0 8px;
}

.license-table th,
.license-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--stone-mist);
  vertical-align: top;
}

.license-table th {
  color: var(--dark-canvas);
}

.license-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84em;
  white-space: nowrap;
}

html[lang="en"] .zh-only {
  display: none !important;
}

html[lang="zh-Hant"] .en-only {
  display: none !important;
}
