/* ══════════════════════════════════════════════════
   design-tokens.css
   Figma "RMA 系統操作說明" document design language
   Source: Figma node 66:310 — 07 · Manual Content · Materials
   Shared by index.html / recycler-manual.html / figma-rma-manual.html
   ══════════════════════════════════════════════════ */

:root {
  /* ── Figma core palette ── */
  --ink: #122630;          /* Document title / body-on-light */
  --muted: #586674;        /* Intro & secondary body */
  --teal: #005d67;         /* Number badge / primary accent */
  --teal-ink: #00464e;     /* Hover / pressed */
  --card: #f6f9fa;         /* Feature card fill */
  --line: #d6dfe5;         /* Hairline border */
  --media: #f0f6fa;        /* Media placeholder fill */
  --panel: #ffffff;
  --bg: #ffffff;
  --canvas: #eef3f6;       /* Page canvas behind document sheets */

  /* ── Warning / important note ── */
  --warn-bg: #fff2e5;
  --warn-line: #f5b873;
  --warn-ink: #b8470d;

  /* ── Radii (Figma) ── */
  --r-pill: 999px;
  --r-badge: 9px;
  --r-heading: 8px;
  --r-note: 12px;
  --r-card: 16px;

  /* ── Elevation ── */
  --shadow-sheet: 0 18px 60px rgba(18, 38, 48, 0.1);
  --shadow-soft: 0 8px 28px rgba(18, 38, 48, 0.06);

  /* ── Document gutter (Figma: 96 / 1920) ── */
  --gutter: clamp(20px, 5vw, 96px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Inter,
    "Noto Sans TC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ══════════════════════════════════════════════════
   Pill tag — Figma "tag · 06 · MATERIALS"
   bg #122630 · radius 999 · px14 py8 · 14px Bold white
   ══════════════════════════════════════════════════ */
.doc-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

.doc-tag--teal {
  background: var(--teal);
}

/* ══════════════════════════════════════════════════
   Shared chrome — topbar / language switch / buttons
   ══════════════════════════════════════════════════ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn,
.page-actions a,
.home-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-heading);
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.btn:hover,
.btn:focus-visible,
.page-actions a:hover,
.page-actions a:focus-visible,
.home-nav a:hover,
.home-nav a:focus-visible {
  border-color: var(--teal);
  background: var(--card);
  color: var(--teal);
  outline: none;
}

.btn--primary {
  min-height: 46px;
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  border-color: var(--teal-ink);
  background: var(--teal-ink);
  color: #fff;
}

/* ── Language switch ── */
.lang-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-heading);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: none;
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.lang-btn:hover {
  background: var(--card);
  color: var(--teal);
}

.lang-btn.lang-active {
  background: var(--teal);
  color: #fff;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--line);
}
