/* PRD §6.2 design tokens — copied verbatim. Components must use these variables only. */
:root {
  /* 色彩 */
  --c-bg: #f8fafc;
  --c-surface: #ffffff;
  --c-surface-alt: #f1f5f9;
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;
  --c-text: #0f172a;
  --c-text-muted: #475569;
  --c-text-subtle: #64748b;
  --c-primary: #16a34a;
  --c-primary-text: #15803d;
  --c-primary-hover: #15803d;
  --c-primary-soft: #f0fdf4;
  --c-warn: #b45309;
  --c-warn-bg: #fef3c7;
  --c-danger: #dc2626;
  --c-focus: #2563eb;

  /* 排版（系统字体栈，零外部请求） */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-h1: clamp(28px, 5vw, 44px);
  --fs-h2: clamp(22px, 3.4vw, 30px);
  --fs-h3: 18px;
  --fs-body: 16px;
  --lh-body: 1.65;
  --fs-small: 14px;
  --fs-tiny: 13px;

  /* 间距 / 圆角 / 阴影 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);

  /* 布局 */
  --w-container: 960px;
  --w-tool: 720px;
}

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--c-primary-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

p,
ul,
ol {
  margin-top: var(--sp-3);
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.container {
  width: 100%;
  max-width: var(--w-container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.tool-wrap {
  width: 100%;
  max-width: var(--w-tool);
  margin-inline: auto;
}

.page-main {
  padding-block: var(--sp-12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn--primary {
  background: var(--c-primary);
  color: var(--c-surface);
}

.btn--primary:hover {
  background: var(--c-primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--c-primary-text);
  border-color: var(--c-border-strong);
}

.btn--ghost:hover {
  background: var(--c-primary-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}

.field input,
.field select,
select {
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
}

.note {
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}

.note--danger {
  color: var(--c-danger);
}

@media (min-width: 640px) {
  .container {
    padding-inline: var(--sp-6);
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: var(--w-container);
  }
}
