/* CueClass site — base: tokens, reset, typography, layout, header, nav, buttons, footer.
   System fonts only (no external CDN).
   Text colour pairs (all >= 4.5:1):
     ink #1E1C1A on cream #FCF7F0 ≈ 16:1      muted #554E47 on cream ≈ 7.6:1
     muted on sand #F3E8DA ≈ 6.5:1            accent #A63B00 on cream ≈ 6:1
     white on ink ≈ 16:1                      white on accent ≈ 6.4:1
     disabled text #4A443E on #E6DED3 ≈ 7:1   footer links #FFD2AD on ink ≈ 12:1 */

:root {
  --cream: #fcf7f0;
  --sand: #f3e8da;
  --line: #d9cbb8;
  --ink: #1e1c1a;
  --muted: #554e47;
  --accent: #a63b00;
  --orange: #ff7a1a; /* decoration only, never text */
  --tag-bg: #ffe3cc;
  --tag-ink: #7a2c00;
  --disabled-bg: #e6ded3;
  --disabled-ink: #4a443e;
  --radius: 18px;
  --font: "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Heiti TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: Consolas, "Cascadia Mono", ui-monospace, monospace;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

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

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--sand);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.narrow {
  width: min(780px, 100% - 40px);
}

.center {
  text-align: center;
}

.fine {
  font-size: 0.92rem;
  color: var(--muted);
}

.eyebrow {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4em;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ---------------------------------------------------------------- header + nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 247, 240, 0.97);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  min-height: 64px;
  padding: 6px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.nav-list a:hover {
  background: var(--sand);
  color: var(--ink);
}

/* current page (aria-current="page") and current section (aria-current="true") */
.nav-list a[aria-current] {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

/* ---------------------------------------------------------------- page heads + sections */

.page-head {
  padding: 48px 0 32px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 122, 26, 0.18), transparent 34%),
    linear-gradient(180deg, var(--cream), var(--sand));
}

.page-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.page-head .lead {
  margin-bottom: 0;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--sand);
}

.section-lead {
  color: var(--muted);
  max-width: 40em;
  margin-bottom: 32px;
}

.more-link {
  font-weight: 700;
}

/* ---------------------------------------------------------------- buttons */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #3a3632;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--sand);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  border-color: var(--disabled-bg);
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--ink);
  color: #f5efe6;
  padding: 40px 0;
}

.site-footer a {
  color: #ffd2ad;
}

.site-footer :focus-visible {
  outline-color: #ffd2ad;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0 0 6px;
}

.brand-small {
  font-weight: 700;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

@media (max-width: 600px) {
  .section {
    padding: 48px 0;
  }
  .nav-list a {
    padding: 4px 8px;
    font-size: 0.95rem;
  }
}
