:root {
  color-scheme: light;
  --canvas: #f9f7ed;
  --paper: #fffdf6;
  --ink: #252b3a;
  --muted: #565e59;
  --green: #315943;
  --green-dark: #234332;
  --line: #dedbcd;
  --blue: #5bc2ff;
  --pink: #ff7eb6;
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: "Noto Serif CJK SC", "Songti SC", "SimSun", Georgia, serif;
  --wrap: 76rem;
}
:root[lang="en"] { --serif: Georgia, "Times New Roman", serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.65 var(--sans); }
button, input { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin: 0; }
img, video { display: block; max-width: 100%; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.6rem;
  padding-block: .65rem;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 10.6rem; height: auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; align-items: center; }
.nav-links a, .locale-link { text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 650; }
.nav-links a:hover, .locale-link:hover { text-decoration: underline; text-underline-offset: .25em; }
.locale-link { padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 2rem; white-space: nowrap; }
.nav-end { display: flex; gap: .8rem; align-items: center; }

.button {
  min-height: 2.85rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--green);
  border-radius: .75rem;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  cursor: pointer;
  text-align: center;
}
.button:hover { background: var(--green-dark); }
.button.outline { background: transparent; color: var(--green-dark); border-color: #aab7a8; }
.button.outline:hover { background: #e9eee3; }
.button[aria-disabled="true"], .button:disabled { cursor: default; opacity: .48; }
.button.small { min-height: 2.55rem; font-size: .9rem; padding: .5rem .85rem; }
.button svg { width: 1rem; height: 1rem; flex: none; }
.text-link { display: inline-block; text-underline-offset: .22em; font-weight: 700; }
.eyebrow { color: var(--green); font-size: .8rem; font-weight: 800; letter-spacing: .11em; }
.skip-link { position: absolute; z-index: 5; top: .5rem; left: .5rem; transform: translateY(-170%); }
.skip-link:focus { transform: none; }

.site-footer { border-top: 1px solid var(--line); padding: 1.7rem 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; }
.footer-links { display: flex; gap: .45rem 1.2rem; flex-wrap: wrap; }
.footer-links a { text-underline-offset: .2em; }

.clip-dialog {
  width: min(56rem, calc(100% - 1.25rem));
  max-height: calc(100% - 1.25rem);
  padding: 0;
  border: 1px solid #d8d7cc;
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1.25rem 5rem #16221950;
}
.clip-dialog::backdrop { background: #1b2823bb; }
.clip-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .8rem .65rem 1.15rem; }
.clip-heading h2 { font-size: 1.05rem; }
.clip-dialog video { width: 100%; max-height: min(69vh, 35rem); background: #161c22; }
.clip-note { padding: .65rem 1.15rem .85rem; font-size: .86rem; color: var(--muted); }

@media (max-width: 650px) {
  .wrap { width: calc(100% - 2rem); }
  .topbar-inner { min-height: 3.9rem; gap: .5rem; }
  .brand img { width: 8.25rem; }
  .nav-end { gap: .5rem; }
  .locale-link { font-size: .83rem; }
}
