:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --ink: #11110f;
  --muted: #68665f;
  --line: #c9c4b8;
  --accent: #ff725d;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang HK",
    "Noto Sans TC", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  background: var(--ink);
  color: var(--paper);
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-nav,
main,
.site-footer {
  margin-inline: auto;
  max-width: var(--max);
  width: calc(100% - 48px);
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--ink);
  display: flex;
  height: 88px;
  justify-content: space-between;
}

.wordmark {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  text-decoration: none;
}

.wordmark span {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--paper);
  display: inline-flex;
  font-family: Georgia, serif;
  font-size: 1.1rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.wordmark strong {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
}

.language-switch {
  border: 1px solid var(--ink);
  display: flex;
}

.language-switch button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 40px;
  min-width: 52px;
}

.language-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.site-nav {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 60px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 650;
  padding-block: 1.25rem;
  position: relative;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  background: var(--accent);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.language-panel[hidden] {
  display: none !important;
}

.home-hero {
  align-items: end;
  border-bottom: 1px solid var(--ink);
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr auto;
  min-height: 410px;
  padding-block: 4rem 3rem;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 1.5rem;
}

.home-hero h1 {
  font-family: Georgia, "Songti TC", serif;
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.9;
  margin: 0;
  max-width: 9ch;
}

.hero-mark {
  color: var(--accent);
  font-family: "Songti TC", serif;
  font-size: 1.15rem;
  margin: 0;
  padding-bottom: 0.5rem;
  writing-mode: vertical-rl;
}

.index-list {
  margin-block: 1.5rem 5rem;
}

.index-row {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 42px 1fr auto;
  padding-block: 1.7rem;
  text-decoration: none;
}

.index-row:hover strong,
.index-row:focus-visible strong {
  color: var(--accent);
}

.index-number,
.index-arrow {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 0.8rem;
}

.index-row strong {
  display: block;
  font-family: Georgia, "Songti TC", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
  transition: color 160ms ease;
}

.index-row small {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  line-height: 1.6;
  margin-top: 0.45rem;
}

.contact-strip {
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto;
  margin-bottom: 5rem;
  padding: 1.5rem;
}

.contact-strip span {
  font-size: 0.88rem;
  line-height: 1.6;
}

.contact-strip a {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.document {
  display: grid;
  gap: clamp(3rem, 8vw, 8rem);
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  padding-block: clamp(4rem, 10vw, 8rem);
}

.document-header {
  align-self: start;
  position: sticky;
  top: 2rem;
}

.document-header h1 {
  font-family: Georgia, "Songti TC", serif;
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin: 0;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 2rem 0 1rem;
  max-width: 34rem;
}

.updated {
  color: var(--muted);
  font-size: 0.78rem;
}

.legal-section {
  border-top: 1px solid var(--ink);
  padding-block: 1.5rem 2.5rem;
}

.legal-section h2 {
  font-family: Georgia, "Songti TC", serif;
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0 0 1rem;
}

.legal-section p,
.legal-section li {
  color: #34332f;
  font-size: 0.98rem;
  line-height: 1.85;
}

.legal-section p {
  margin: 0 0 0.75rem;
}

.legal-section ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.legal-section li + li {
  margin-top: 0.65rem;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--ink);
  display: grid;
  font-size: 0.72rem;
  gap: 1rem;
  grid-template-columns: 1fr auto auto;
  letter-spacing: 0.08em;
  min-height: 110px;
}

.not-found {
  min-height: 65vh;
  padding-block: 8rem;
}

.not-found h1 {
  font-family: Georgia, "Songti TC", serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 400;
}

@media (max-width: 720px) {
  .site-header,
  .site-nav,
  main,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    height: 72px;
  }

  .home-hero {
    min-height: 330px;
    padding-block: 3rem 2rem;
  }

  .home-hero h1 {
    font-size: clamp(3.3rem, 17vw, 5.4rem);
  }

  .document {
    display: block;
    padding-block: 3.5rem;
  }

  .document-header {
    position: static;
  }

  .document-body {
    margin-top: 3.5rem;
  }

  .contact-strip {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: start;
    grid-template-columns: 1fr;
    padding-block: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .index-row strong {
    transition: none;
  }
}
