/* ============================================================
   Base — design tokens, reset, shared primitives
   ============================================================ */

:root {
  --paper: #f4f1e8;
  --paper-soft: #faf8f2;
  --ink: #17211f;
  --ink-soft: #3d4a47;
  --muted: #5f6b67;
  --accent: #0e8a7a;
  --accent-deep: #0a6b5f;
  --accent-soft: rgba(14, 138, 122, 0.12);
  --line: rgba(23, 33, 31, 0.12);
  --line-strong: rgba(23, 33, 31, 0.22);

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC",
    "SimSun", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-soft: 0 1px 2px rgba(23, 33, 31, 0.05),
    0 12px 34px -18px rgba(23, 33, 31, 0.35);
  --shadow-lift: 0 2px 4px rgba(23, 33, 31, 0.06),
    0 26px 60px -28px rgba(23, 33, 31, 0.5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

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

::selection {
  background: rgba(14, 138, 122, 0.22);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
