/* Tokens copied verbatim from Brand/Tokens/tokens.css, limited to what this site uses.
   Names and values must stay identical to that file; it is the only source. Do not
   hand-type colours here: every value below exists in Brand/Tokens/tokens.css.
   The site is light only (owner, 2026-09-15), so the night half of the palette is not
   copied and there is no prefers-color-scheme block. */
:root {
  color-scheme: light;

  --fp-color-paper: #F8F5F2;
  --fp-color-ink: #1E1B17;
  --fp-color-copper: #AB5B35;

  --fp-ground: var(--fp-color-paper);
  --fp-front: var(--fp-color-ink);
  --fp-accent: var(--fp-color-copper);
  --fp-accent-ink: var(--fp-color-copper);
  /* Text-link colour: .policy a at rest, .site-footer a on hover. See README.md 06. */

  --fp-font-serif: 'Noto Serif TC','Source Han Serif TC','Songti TC',serif;
  --fp-font-sans: 'Noto Sans TC','PingFang TC','Heiti TC',system-ui,sans-serif;
  --fp-font-mono: 'IBM Plex Mono','SFMono-Regular',Menlo,monospace;
}

/* Translucent text shades are mixed from --fp-front so every shade stays a token lookup;
   a hand-typed grey would fork the palette from Brand/Tokens/tokens.css. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--fp-ground);
  color: var(--fp-front);
  font-family: var(--fp-font-sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* Header */

.site-header {
  display: flex;
  align-items: center;
  padding: 28px 32px;
}

.site-header__link { line-height: 0; }

.site-header__mark { display: block; }

/* Home */

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px 120px;
  text-align: center;
}

.home__title {
  margin: 0 0 56px;
  font: 600 clamp(32px, 5.6vw, 56px)/1.4 var(--fp-font-serif);
  letter-spacing: .06em;
  min-height: 2.8em;
}

/* The full heading stays in the accessibility tree while the typed copy is rebuilt. */
.home__reader {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home__caret {
  display: inline-block;
  width: 2px;
  height: .9em;
  margin-left: 4px;
  vertical-align: -.08em;
  background: var(--fp-accent);
  opacity: 0;
}

.home__caret--blink { animation: fp-caret-blink .8s infinite; }

@keyframes fp-caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.home__badge {
  margin: 0;
  font: 400 13px/1 var(--fp-font-mono);
  letter-spacing: .3em;
  color: color-mix(in srgb, var(--fp-front) 50%, transparent);
}

/* The typewriter's start state applies only once home.js has flagged the document, so the
   page renders the finished heading and badge when scripting is off. */
.fp-js .home__typed { visibility: hidden; }

.fp-js.fp-armed .home__typed { visibility: visible; }

.fp-js .home__badge {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s ease, transform .8s ease;
}

.fp-js .home__badge--shown {
  opacity: 1;
  transform: translateY(0);
}

/* Footer. The gap/wrap layout carries the copyright plus the two policy links. */

.site-footer {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font: 400 11px/1.6 var(--fp-font-sans);
  color: color-mix(in srgb, var(--fp-front) 45%, transparent);
}

/* Footer links rest at the footer's own 45% mix and shift to the accent on hover; the
   colour change is the only affordance, so there is no underline in either state. */

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--fp-accent-ink);
}

/* Policy pages */

.policy {
  flex: 1;
  padding: 24px 28px 96px;
  font: 400 15px/1.9 var(--fp-font-sans);
  /* Long URLs in the copy are single unbreakable tokens wider than a 320px viewport, so
     they may break mid-token; ordinary words still break at their normal opportunities. */
  word-break: normal;
  overflow-wrap: anywhere;
}

.policy article {
  max-width: 68ch;
  margin: 0 auto;
}

.policy h1 {
  margin: 0 0 8px;
  font: 600 clamp(26px, 4vw, 34px)/1.4 var(--fp-font-serif);
  letter-spacing: .04em;
}

.policy__meta {
  margin: 0 0 32px;
  font-size: 13px;
  color: color-mix(in srgb, var(--fp-front) 50%, transparent);
}

.policy h2 {
  margin: 40px 0 12px;
  font: 600 18px/1.5 var(--fp-font-serif);
  scroll-margin-top: 16px;
}

.policy p { margin: 0 0 16px; }

.policy ul {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.policy li { margin: 0 0 6px; }

/* Body links keep one colour and gain the underline on hover, per README.md 06. */

.policy a {
  color: var(--fp-accent-ink);
  text-decoration: none;
}

.policy a:hover,
.policy a:focus-visible { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .home__caret { animation: none; }
  .fp-js .home__badge { transition: none; }
}
