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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: var(--text-xl); line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; }
h2 { font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: var(--text-base); font-weight: 600; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }

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

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

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 640px) { .wrap { padding-inline: var(--space-6); } }

.stack > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-2); }
.stack-lg > * + * { margin-top: var(--space-8); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .grid-aside { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } } /* 郵件範本兩欄：表單 75% : 可用變數 25%（固定，勿改） */
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* App 外殼 */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--accent); flex: none; }
.brand__logo { height: 28px; width: auto; max-width: 150px; object-fit: contain; flex: none; }
.brand__name { font-size: var(--text-sm); letter-spacing: -0.01em; }
.brand__sub { display: none; font-size: var(--text-xs); color: var(--text-muted); }
@media (min-width: 640px) { .brand__sub { display: block; } }

main { padding-block: var(--space-8) var(--space-16); }

.page-head { margin-bottom: var(--space-6); }
.eyebrow {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-8);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
