@font-face {
  font-family: "Field Caslon";
  src: url("/assets/libre-caslon-display-400-84267e9374.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Field Sans";
  src: url("/assets/manrope-400-849290ef12.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Field Sans";
  src: url("/assets/manrope-600-f7ac6258da.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}

@font-face {
  font-family: "Field Mono";
  src: url("/assets/ibm-plex-mono-400-08949f728d.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Field Mono";
  src: url("/assets/ibm-plex-mono-italic-0840095faa.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 400;
}

:root {
  color: #25241f;
  background: #d8d0c1;
  font-family: "Field Caslon", "Songti SC", SimSun, serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #25241f;
  --soft-ink: #6f695e;
  --line: rgba(64, 59, 50, 0.38);
  --faint-line: rgba(64, 59, 50, 0.19);
  --paper: #eee7d7;
  --clay: #aa4828;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: #d8d0c1;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: #d8d0c1;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--clay); outline-offset: 4px; }

.canvas {
  min-height: 100vh;
  padding: 18px;
  background-color: #d8d0c1;
  background-image: var(--paper-texture);
  background-blend-mode: multiply;
  background-size: 620px 620px;
}

.fieldbook {
  width: min(100%, 1480px);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  background-color: var(--paper);
  background-image: var(--paper-texture);
  background-size: 620px 620px;
  box-shadow: 0 2px 26px rgba(68, 54, 39, 0.22);
  border: 1px solid rgba(87, 72, 52, 0.28);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--clay);
  font-family: "Field Sans", sans-serif;
  font-size: 0.82rem;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.spine {
  position: relative;
  min-height: 100%;
  padding: 48px 22px 30px;
  overflow: hidden;
  border-right: 1px solid rgba(86, 69, 50, 0.5);
  box-shadow: inset -10px 0 18px rgba(78, 59, 39, 0.05), 8px 0 14px rgba(78, 59, 39, 0.08);
  background-color: rgba(239, 230, 211, 0.73);
  background-image: var(--paper-texture);
  background-size: 620px 620px;
}

.spine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  border-left: 1px dashed rgba(74, 62, 48, 0.38);
}

.spine-brand {
  display: inline-block;
  margin-left: 8px;
  color: var(--clay);
  font-family: "Field Mono", monospace;
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  line-height: 1.18;
  text-decoration: none;
}

.chapter-mark {
  margin: 38px 0 52px 8px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: var(--clay);
}

.chapter-mark span {
  display: block;
  margin-bottom: 8px;
  font-family: "Field Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chapter-mark strong {
  font-family: "Field Caslon", serif;
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1;
}

.spine-nav {
  display: grid;
  gap: 0;
  margin-left: 8px;
  border-top: 1px solid var(--faint-line);
}

.spine-nav a {
  min-height: 112px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--faint-line);
  color: var(--soft-ink);
  font-family: "Field Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-orientation: mixed;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.spine-nav a.is-active { color: var(--clay); }

.spine-plant {
  position: absolute;
  left: 30px;
  bottom: 28px;
  width: 80px;
  height: 220px;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.76;
  filter: brightness(0.28) contrast(1.8);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.leaf { min-width: 0; padding: 0 42px 22px; }

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid var(--line);
}

.small-mark {
  display: none;
  color: var(--clay);
  font-family: "Field Mono", monospace;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(26px, 4vw, 64px);
  font-family: "Field Sans", sans-serif;
  font-size: 0.91rem;
}

.site-header nav a,
.site-footer nav a {
  position: relative;
  /* 🔴 觸控目標至少 44px：視覺不變，靠 padding 把可點區域撐開。 */
  padding: 14px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: 1px solid transparent;
}

.site-header nav a:hover::after,
.site-header nav a.is-active::after { border-color: var(--clay); }

main { min-height: 760px; }

.eyebrow {
  margin: 0;
  color: var(--clay);
  font-family: "Field Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 8px 46px;
  padding: 42px 8px 28px;
}

.hero-copy h1,
.page-intro h1 {
  max-width: 900px;
  margin: 26px 0 18px;
  font-family: "Field Caslon", Georgia, serif;
  font-size: clamp(4rem, 7vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.terracotta-dash { display: block; width: 56px; margin: 28px 0 36px; border-top: 2px solid var(--clay); }

.outline-link {
  min-width: 216px;
  min-height: 54px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--clay);
  color: var(--clay);
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.outline-link:hover { color: var(--paper); background: var(--clay); }

.margin-note {
  max-width: 220px;
  margin-top: 78px;
  padding: 0 6px 17px;
  border-bottom: 1px solid var(--line);
  align-self: start;
  font-family: "Field Mono", monospace;
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.65;
  transform: rotate(-2.5deg);
}

.inquiry-diagram { grid-column: 1 / -1; width: min(74%, 790px); margin: 12px 0 0 auto; }
.inquiry-diagram img { width: 100%; filter: brightness(0.43) contrast(1.65); mix-blend-mode: multiply; }

.inquiry-diagram figcaption {
  width: min(260px, 42%);
  margin: -8px 5% 0 auto;
  font-family: "Field Mono", monospace;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.5;
  transform: rotate(1.5deg);
}

.ruled-title { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 14px; }
.ruled-title h2 { margin: 0; font-size: 1.55rem; font-weight: 400; }
.ruled-title > span { border-top: 1px solid var(--line); }

.observations,
.method,
.source-notes,
.entry-index,
.topic-map,
.source-standard,
.about-purpose,
.principles { padding: 0 8px 28px; }

.observation-list { margin-top: 6px; }

.observation {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--faint-line);
}

.observation-number {
  color: var(--clay);
  font-size: 2.65rem;
  line-height: 1;
  text-align: center;
  border-right: 1px solid var(--faint-line);
}

.observation p { margin: 0; font-size: 1rem; line-height: 1.24; }
.observation p strong { font-weight: 400; }

.observation small {
  padding-left: 22px;
  border-left: 1px solid var(--faint-line);
  font-family: "Field Mono", monospace;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.4;
}

.method-icons {
  width: 100%;
  height: 78px;
  margin-top: 10px;
  object-fit: contain;
  filter: brightness(0.35) contrast(1.7);
  mix-blend-mode: multiply;
}

.method ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; }
.method li { display: grid; justify-items: center; text-align: center; font-size: 0.88rem; line-height: 1.16; }
.method li strong { font-weight: 400; }
.method li small { display: block; margin-top: 2px; color: var(--soft-ink); font-size: 0.76rem; }

.source-table {
  margin-top: 10px;
  border-bottom: 1px solid var(--faint-line);
  font-family: "Field Mono", monospace;
  font-size: 0.66rem;
}

.source-head,
.source-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1.4fr) 70px 100px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 6px 4px;
}

.source-head {
  color: var(--soft-ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.source-row { border-bottom: 1px dotted var(--faint-line); }
.source-row > span { min-width: 0; }
.source-row strong, .source-row small { display: block; }
.source-row strong { margin-bottom: 3px; font-weight: 400; }
.source-row small { color: var(--soft-ink); line-height: 1.35; }

.hand-note {
  margin: 12px 0 0;
  font-family: "Field Mono", monospace;
  font-size: 0.77rem;
  font-style: italic;
  transform: rotate(-1deg);
}

.page-intro {
  min-height: 490px;
  padding: 70px 8px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 42px;
  align-items: start;
  border-bottom: 1px solid var(--faint-line);
}

.page-intro h1 { max-width: 870px; font-size: clamp(3.8rem, 6.3vw, 6.4rem); }
.intro-summary { max-width: 660px; margin: 32px 0 0; font-size: 1.18rem; line-height: 1.65; }
.page-intro .margin-note { margin-top: 94px; }

.entry-index,
.source-standard,
.about-purpose { padding-top: 58px; }

.entry-list { margin-top: 14px; }

.entry-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 130px 98px;
  gap: 24px;
  align-items: center;
  min-height: 134px;
  padding: 18px 0;
  border-bottom: 1px solid var(--faint-line);
}

.entry-row > span { color: var(--clay); font-size: 2.55rem; }
.entry-row h2 { margin: 7px 0 5px; font-size: 1.55rem; font-weight: 400; }
.entry-row p:not(.eyebrow) { margin: 0; color: var(--soft-ink); line-height: 1.5; }
.entry-row time, .entry-row a { font-family: "Field Mono", monospace; font-size: 0.72rem; }
.entry-row a { justify-self: end; color: var(--clay); text-underline-offset: 4px; }

.topic-grid,
.standard-grid,
.principle-list {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--faint-line);
  border-bottom: 1px solid var(--faint-line);
}

.topic-grid article,
.standard-grid article,
.principle-list article {
  min-height: 190px;
  padding: 28px 30px;
  border-right: 1px solid var(--faint-line);
}

.topic-grid article:last-child,
.standard-grid article:last-child,
.principle-list article:last-child { border-right: 0; }

.topic-grid span,
.standard-grid span,
.principle-list span { color: var(--clay); font-family: "Field Mono", monospace; font-size: 0.72rem; }

.topic-grid h2,
.standard-grid h2,
.principle-list h2 { margin: 24px 0 10px; font-size: 1.45rem; font-weight: 400; }

.topic-grid p,
.standard-grid p,
.principle-list p { margin: 0; color: var(--soft-ink); line-height: 1.55; }

.hand-note--closing {
  margin: 0 8px 60px auto;
  width: max-content;
  max-width: calc(100% - 16px);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.purpose-copy {
  max-width: 820px;
  margin: 34px 0 0 20%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
  font-size: 1.18rem;
  line-height: 1.65;
}

.purpose-copy p { margin: 0; }

.contact-note { margin: 10px 8px 56px; padding: 38px 42px; border: 1px solid var(--clay); }
.contact-note h2 { margin: 15px 0 7px; font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 400; }
.contact-note > p:last-child { margin: 0; color: var(--soft-ink); }

.site-footer {
  min-height: 82px;
  padding: 18px 8px 6px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.site-footer > p {
  margin: 8px 0 0;
  color: var(--clay);
  font-family: "Field Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.site-footer nav { gap: 24px; font-size: 0.75rem; }
.site-footer .footer-date { justify-self: end; }

@media (max-width: 1050px) {
  .fieldbook { grid-template-columns: 154px minmax(0, 1fr); }
  .spine { padding-inline: 24px; }
  .spine-plant { left: 30px; }
  .leaf { padding-inline: 34px; }
  .home-hero, .page-intro { grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; }
  .hero-copy h1 { font-size: clamp(3.8rem, 8vw, 6.2rem); }
  .source-head, .source-row { grid-template-columns: 32px minmax(0, 1.4fr) 54px 88px minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 820px) {
  .canvas { padding: 0; }
  .fieldbook { min-height: 100vh; display: block; border: 0; box-shadow: none; }
  .spine {
    min-height: 104px;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }
  .spine::after, .spine-nav { display: none; }
  .spine-brand { margin: 0; font-size: 1rem; }
  .chapter-mark {
    margin: 0;
    padding: 0 0 0 22px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .chapter-mark span { margin: 0; }
  .chapter-mark strong { font-size: 2.5rem; }
  .spine-plant { display: none; }
  .leaf { padding-inline: 24px; }
  .site-header { min-height: 82px; justify-content: space-between; }
  .small-mark { display: inline-block; }
  .site-header nav { gap: 20px; font-size: 0.78rem; }
  .home-hero, .page-intro { grid-template-columns: 1fr; }
  .home-hero { padding-top: 48px; }
  .margin-note, .page-intro .margin-note { margin-top: 4px; justify-self: end; }
  .inquiry-diagram { width: 100%; margin: 12px 0 0; }
  .observation { grid-template-columns: 74px minmax(0, 1fr); }
  .observation small { grid-column: 2; padding: 0 0 12px; border-left: 0; }
  .method ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .source-head, .source-row { grid-template-columns: 36px minmax(0, 1fr); }
  .source-head span:nth-child(n + 3) { display: none; }
  .source-row > span:nth-child(n + 3) { grid-column: 2; color: var(--soft-ink); }
  .entry-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .entry-row time { grid-column: 2; }
  .entry-row a { grid-column: 3; grid-row: 1 / span 2; }
  .topic-grid, .standard-grid, .principle-list { grid-template-columns: 1fr; }
  .topic-grid article, .standard-grid article, .principle-list article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--faint-line); }
  .topic-grid article:last-child, .standard-grid article:last-child, .principle-list article:last-child { border-bottom: 0; }
  .purpose-copy { margin-left: 0; }
}

@media (max-width: 600px) {
  .leaf { padding-inline: 18px; }
  .site-header {
    min-height: 104px;
    padding: 14px 0 10px;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 7px;
  }
  /* 🔴 overflow-x 只能給主導航：語言切換是下拉式，套上滾動容器會把浮出的面板裁掉。 */
  .site-header nav:not(.lang-nav) { width: 100%; justify-content: space-between; gap: 10px; overflow-x: auto; }
  .site-header nav a { flex: 0 0 auto; }
  /* 換行之後那條分隔線變成孤立的一豎，收掉。 */
  .lang-nav { margin-left: 0; padding-left: 0; border-left: 0; }
  /* 觸發器在這個斷點靠左，面板改成靠左展開，否則會往螢幕外溢出。 */
  .lang-menu { right: auto; left: 0; }
  .hero-copy h1, .page-intro h1 { font-size: clamp(3.15rem, 15vw, 4.6rem); }
  .home-hero, .page-intro { padding-inline: 0; }
  .page-intro { min-height: 0; }
  .inquiry-diagram figcaption { width: 68%; }
  .observations, .method, .source-notes, .entry-index, .topic-map, .source-standard, .about-purpose, .principles { padding-inline: 0; }
  .method-icons { height: 82px; }
  .method ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .method li small { font-size: 0.82rem; }
  .entry-row { grid-template-columns: 46px minmax(0, 1fr); gap: 16px; }
  .entry-row > span { font-size: 2rem; }
  .entry-row time, .entry-row a { grid-column: 2; grid-row: auto; justify-self: start; }
  .purpose-copy { grid-template-columns: 1fr; gap: 18px; }
  .contact-note { margin-inline: 0; padding: 30px 24px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
  .site-footer .footer-date { grid-column: 2; grid-row: 1; }
}

.empty-state {
  margin: 12px 0 0;
  padding: 30px 0;
  border-bottom: 1px solid var(--faint-line);
  color: var(--soft-ink);
  font-family: "Field Sans", "Microsoft YaHei", sans-serif;
  font-size: 0.95rem;
  line-height: 1.8;
}

html[lang="zh-Hant"] .hero-head h1,
html[lang="zh-Hant"] .hero-copy h1,
html[lang="zh-Hant"] .page-intro h1 {
  font-family: "Field Caslon", "Songti TC", PMingLiU, serif;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  line-height: 1.26;
  letter-spacing: 0.02em;
}

html[lang="zh-Hant"] .eyebrow,
html[lang="zh-Hant"] .chapter-mark span,
html[lang="zh-Hant"] .spine-nav a,
html[lang="zh-Hant"] .source-table,
html[lang="zh-Hant"] .hand-note { font-size: 0.82rem; }

html[lang="zh-Hant"] .spine-nav a {
  transform: none;
  text-orientation: upright;
}

.source-row, .entry-row, .contact-note { overflow-wrap: anywhere; }
.source-head { font-size: 0.82rem; }
.observation p { line-height: 1.7; }
.method li { line-height: 1.7; }
.method li small { font-size: 0.82rem; }
.contact-note > a { font-family: "Field Sans", sans-serif; line-height: 2; text-underline-offset: 5px; }
.page-intro + .source-notes { padding-top: 48px; }

@media (max-width: 820px) {
  .small-mark { display: none; }
  .source-head, .source-row { grid-template-columns: 36px minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .site-header { min-height: 72px; }
  .method-icons { height: auto; margin-block: 18px 10px; }
  .inquiry-diagram { margin-top: 0; }
  .page-intro { padding-top: 40px; padding-bottom: 40px; }
  .site-header nav, .site-footer nav { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ========== 首頁：首屏轉化區與寬內鏈樞紐 ========== */
.home-hero { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; padding-top: 34px; gap: 0 46px; }
.hero-head { grid-column: 1; grid-row: 1; }
.invite-card { grid-column: 2; grid-row: 1 / span 2; }
.hero-body { grid-column: 1; grid-row: 2; }
.hero-head h1,
.hero-copy h1 {
  max-width: 900px;
  margin: 26px 0 18px;
  font-family: "Field Caslon", Georgia, serif;
  font-size: clamp(4rem, 7vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin-bottom: 0;
}
.hero-lede { max-width: 620px; margin: 0 0 30px; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 1.02rem; line-height: 1.85; color: var(--soft-ink); }

.invite-card {
  margin-top: 26px;
  padding: 22px 22px 18px;
  border: 1px solid var(--clay);
  background: rgba(255, 252, 245, 0.55);
}

.invite-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; flex-wrap: wrap; }

.invite-code {
  padding: 8px 14px;
  border: 1px dashed var(--clay);
  color: var(--clay);
  font-family: "Field Mono", monospace;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  user-select: all;
}

.invite-copy {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: "Field Sans", "Microsoft JhengHei", sans-serif;
  font-size: 0.92rem;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.invite-copy:hover { color: var(--paper); background: var(--ink); }
.invite-copy.is-copied { border-color: var(--clay); color: var(--paper); background: var(--clay); }
.invite-note { margin: 16px 0 0; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.9rem; line-height: 1.75; }
.invite-foot { margin: 10px 0 0; color: var(--soft-ink); font-family: "Field Mono", monospace; font-size: 0.72rem; line-height: 1.6; }

.desk-pick {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 28px;
  margin: 8px 8px 44px;
  padding: 26px 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.desk-pick h2 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 400; line-height: 1.45; }
.desk-pick h2 a { text-decoration-color: var(--clay); text-underline-offset: 5px; }
.desk-pick p { margin: 0; color: var(--soft-ink); font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.95rem; line-height: 1.85; }
.desk-pick .hand-note { grid-column: 2; margin-top: 12px; }

.gates { padding: 0 8px 34px; }
.gate-list { margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; list-style: none; }
.gate-list li { display: grid; gap: 4px; padding: 16px 12px 14px; border-top: 2px solid var(--faint-line); }
.gate-list li span { color: var(--clay); font-family: "Field Mono", monospace; font-size: 0.78rem; }
.gate-list li strong { font-size: 1.12rem; font-weight: 400; }
.gate-list li small { color: var(--soft-ink); font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.8rem; line-height: 1.6; }

.all-notes { padding: 0 8px 34px; }
.notes-columns { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 40px; }
.notes-group h3 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 400; }
.notes-group h3 a { text-decoration-color: var(--clay); text-underline-offset: 4px; }
.notes-group-second { margin-top: 26px; }
.compact-list { margin: 0; padding: 0; list-style: none; }
.compact-list li { padding: 9px 0; border-top: 1px solid var(--faint-line); }
.compact-list li a { display: block; font-size: 0.99rem; line-height: 1.5; text-underline-offset: 3px; }
.compact-list li span { display: block; margin-top: 3px; color: var(--soft-ink); font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.8rem; line-height: 1.6; }

/* ========== 語言切換條 ========== */
.lang-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: clamp(18px, 3vw, 40px);
  padding-left: clamp(18px, 3vw, 40px);
  border-left: 1px solid var(--faint-line);
  font-family: "Field Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.lang-switch { position: relative; }

/* 預設的三角標記各家瀏覽器長得不一樣，收掉自己畫。 */
.lang-switch summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 12px 0; min-height: 44px; color: var(--soft-ink); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after {
  content: "";
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.14s ease;
}
.lang-switch summary:hover { color: var(--clay); }
.lang-switch summary:focus-visible { outline: 1px solid var(--clay); outline-offset: 3px; }
.lang-switch[open] summary { color: var(--clay); }
.lang-switch[open] summary::after { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: max(100%, 116px);
  display: grid;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(68, 54, 39, 0.16);
}
.lang-menu > * { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; white-space: nowrap; color: var(--soft-ink); }
.lang-menu > * + * { border-top: 1px solid var(--faint-line); }
.lang-menu a:hover { color: var(--clay); background: rgba(170, 72, 40, 0.07); }
.lang-menu [aria-current] { color: var(--clay); }

/* 🔴 綁進站內的 Libre Caslon 與 Manrope 沒有西里爾字形，哈薩克語頁面會逐字回退、
   字距整個散掉。所以 kk 改用系統字系：實測 Segoe UI 與 Times New Roman 畫得出
   哈薩克專有的 ғ ұ қ ң，Georgia 畫不出來。IBM Plex Mono 有西里爾，等寬處不用換。 */
html[lang="kk"] {
  font-family: "Noto Serif", "Times New Roman", Times, serif;
}

html[lang="kk"] .hero-head h1,
html[lang="kk"] .page-intro h1,
html[lang="kk"] .entry-head h1,
html[lang="kk"] .prose h2,
html[lang="kk"] .ruled-title h2,
html[lang="kk"] .entry-row h2,
html[lang="kk"] .desk-pick h2,
html[lang="kk"] .contact-note h2 {
  font-family: "Noto Serif", "Times New Roman", Times, serif;
}

html[lang="kk"] .outline-link,
html[lang="kk"] .prose,
html[lang="kk"] .entry-deck,
html[lang="kk"] .hero-lede,
html[lang="kk"] .intro-summary,
html[lang="kk"] .invite-note,
html[lang="kk"] .gate-list li strong,
html[lang="kk"] .compact-list li a,
html[lang="kk"] .faq-list dd,
html[lang="kk"] .plain-note,
html[lang="kk"] .entry-row p:not(.eyebrow) {
  font-family: "Segoe UI", "Noto Sans", system-ui, -apple-system, sans-serif;
}

html[lang="kk"] .outline-link { letter-spacing: 0; font-size: 1.02rem; }
html[lang="kk"] .prose h3 { font-family: "Segoe UI", "Noto Sans", system-ui, sans-serif; font-weight: 600; }

/* 哈薩克語是西里爾字母：行高與字距按拉丁字系調，別沿用中文的緊排 */
html[lang="kk"] .hero-head h1,
html[lang="kk"] .page-intro h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.18; letter-spacing: -0.01em; }
html[lang="kk"] .entry-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.25; }
html[lang="kk"] .prose { font-size: 1.04rem; line-height: 1.8; }
html[lang="kk"] .prose h2 { font-size: 1.5rem; line-height: 1.3; }
html[lang="kk"] .entry-deck,
html[lang="kk"] .hero-lede { line-height: 1.75; }
html[lang="kk"] .spine-nav a { writing-mode: horizontal-tb; transform: none; min-height: 0; padding: 14px 0; text-align: center; font-size: 0.68rem; }
html[lang="kk"] .gate-list li strong { font-size: 1rem; line-height: 1.3; }

/* ========== 共用：圖版與麵包屑 ========== */
.plate-svg { width: 100%; height: auto; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; }
.inquiry-diagram { width: min(88%, 760px); }
.inquiry-diagram figcaption { width: min(320px, 60%); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 8px 0;
  color: var(--soft-ink);
  font-family: "Field Mono", monospace;
  font-size: 0.75rem;
}

.crumbs a { text-underline-offset: 3px; }
.crumbs span[aria-current] { color: var(--ink); }

/* ========== 文章頁 ========== */
.entry { max-width: 810px; margin: 0 auto; padding: 0 8px 20px; }
.entry-head { padding: 34px 0 26px; border-bottom: 1px solid var(--faint-line); }

.entry-head h1 {
  max-width: none;
  margin: 18px 0 0;
  font-family: "Field Caslon", "Songti TC", PMingLiU, serif;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: 0.01em;
}

.entry-deck { margin: 20px 0 0; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 1.03rem; line-height: 1.95; color: var(--soft-ink); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; color: var(--soft-ink); font-family: "Field Mono", monospace; font-size: 0.74rem; }

.entry-cover { margin: 30px 0 0; }
.entry-cover--plate { padding: 20px 22px 14px; border: 1px solid var(--faint-line); background: rgba(255, 252, 245, 0.42); }
.entry-cover--shot img { width: 100%; height: auto; border: 1px solid var(--faint-line); }
.entry-cover figcaption { margin-top: 12px; color: var(--soft-ink); font-family: "Field Mono", monospace; font-size: 0.75rem; font-style: italic; line-height: 1.7; }
.prose .entry-cover--shot { margin: 32px 0; }

.field-index { margin: 34px 0 0; padding: 20px 24px 16px; border-left: 2px solid var(--clay); background: rgba(255, 252, 245, 0.45); }
.field-index ol { margin: 10px 0 0; padding-left: 1.3em; }
.field-index li { margin: 5px 0; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.92rem; line-height: 1.7; }
.field-index a { text-underline-offset: 3px; }

.prose { margin-top: 36px; font-size: 1.05rem; line-height: 2.05; }
.prose p { margin: 0 0 1.35em; }
.prose .lede { font-size: 1.12rem; padding-left: 16px; border-left: 3px solid var(--clay); }

.prose h2 {
  margin: 2.2em 0 0.9em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--faint-line);
  font-family: "Field Caslon", "Songti TC", PMingLiU, serif;
  font-size: 1.62rem;
  font-weight: 400;
  line-height: 1.4;
  scroll-margin-top: 20px;
}

.prose h3 { margin: 1.9em 0 0.7em; font-size: 1.22rem; font-weight: 400; line-height: 1.5; color: var(--clay); }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.45em; }
.prose li { margin: 0.5em 0; }
.prose strong { font-weight: 600; }
.prose a { text-underline-offset: 4px; text-decoration-color: var(--clay); }
.prose code { padding: 1px 6px; border: 1px solid var(--faint-line); font-family: "Field Mono", monospace; font-size: 0.9em; }

.callout { margin: 1.8em 0; padding: 20px 24px; border: 1px solid var(--faint-line); background: rgba(255, 252, 245, 0.5); }
.callout p { margin: 0; font-size: 0.99rem; line-height: 1.95; }
.callout--warn { border-color: var(--clay); border-left-width: 4px; }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { position: relative; padding-left: 44px; margin: 0.85em 0; }

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--clay);
  color: var(--clay);
  font-family: "Field Mono", monospace;
  font-size: 0.8rem;
}

.timeline { list-style: none; padding-left: 0; }
.timeline li { padding: 0.65em 0 0.65em 18px; border-left: 2px solid var(--faint-line); margin: 0; }
.timeline li strong { color: var(--clay); font-weight: 400; }
.cost-layers { padding-left: 1.5em; }
.cost-layers li { margin: 0.7em 0; }

.data-table { width: 100%; margin: 1.7em 0; border-collapse: collapse; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.92rem; line-height: 1.7; }
.data-table th, .data-table td { padding: 11px 14px; border-bottom: 1px solid var(--faint-line); text-align: left; vertical-align: top; }
.data-table thead th { border-bottom: 1px solid var(--line); color: var(--soft-ink); font-family: "Field Mono", monospace; font-size: 0.74rem; font-weight: 400; letter-spacing: 0.04em; }
.data-table--lead { margin-top: 0; }

.faq-list { max-width: 810px; margin: 3em auto 0; padding: 0 8px; }
.faq-list dl { margin: 12px 0 0; }
.faq-list dt { margin: 1.5em 0 0.6em; font-size: 1.1rem; line-height: 1.6; color: var(--clay); }
.faq-list dd { margin: 0; padding-bottom: 1.2em; border-bottom: 1px solid var(--faint-line); font-size: 1rem; line-height: 1.95; }
.faq-list dd p { margin: 0; }

.related-notes { max-width: 810px; margin: 3.2em auto 3em; padding: 0 8px; }
.related-notes .compact-list { margin-top: 14px; }
.plain-note { margin: 14px 0 0; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.97rem; line-height: 1.95; color: var(--soft-ink); }

/* ========== 工具頁 ========== */
.entry--tool, .entry--doc { max-width: 860px; }
.tool-panel { margin: 30px 0 0; padding: 26px 28px 22px; border: 1px solid var(--ink); background: rgba(255, 252, 245, 0.6); }
.tool-panel-title { margin: 0 0 18px; font-size: 1.15rem; font-weight: 400; color: var(--clay); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.tool-grid--convert { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-field { margin: 0; display: grid; gap: 6px; }
.tool-field--wide { margin: 0 0 18px; }
.tool-field label { color: var(--soft-ink); font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.82rem; line-height: 1.5; }

.tool-field input {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: "Field Mono", monospace;
  font-size: 1rem;
}

.tool-field input:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.tool-result { margin: 24px 0 0; padding: 22px 24px 8px; border-top: 2px solid var(--clay); }
.result-label { margin: 0; color: var(--soft-ink); font-family: "Field Mono", monospace; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.result-main { margin: 8px 0 0; color: var(--clay); font-family: "Field Caslon", serif; font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.2; overflow-wrap: anywhere; }
.result-sub { margin: 10px 0 0; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.9rem; line-height: 1.8; }
.tool-result--line { padding: 16px 0 0; border-top: 2px solid var(--clay); font-family: "Field Mono", monospace; font-size: 0.95rem; line-height: 1.8; overflow-wrap: anywhere; }
.tool-breakdown { font-size: 0.86rem; }
.tool-note { margin: 18px 0 0; color: var(--soft-ink); font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.82rem; line-height: 1.75; }

.tool-guide { margin: 2.4em 0 0; padding: 18px 22px; border: 1px solid var(--faint-line); }
.tool-guide summary { cursor: pointer; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.97rem; color: var(--clay); }
.tool-guide[open] summary { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--faint-line); }
.tool-guide .prose { margin-top: 6px; font-size: 0.99rem; line-height: 1.95; }
.tool-guide .prose h3 { margin: 1.5em 0 0.5em; font-size: 1.08rem; }

/* ========== 站務頁 ========== */
.correction-log { margin: 16px 0 0; }
.correction-log dt { margin: 1.7em 0 0.5em; color: var(--clay); font-family: "Field Mono", monospace; font-size: 0.82rem; letter-spacing: 0.03em; }
.correction-log dd { margin: 0; padding-bottom: 1.2em; border-bottom: 1px solid var(--faint-line); line-height: 1.95; }

/* ========== 列表與頁尾 ========== */
.entry-row h2 { line-height: 1.45; }
.entry-row h2 a { text-decoration-color: var(--clay); text-underline-offset: 5px; }
.topic-grid h2 a { text-decoration-color: var(--clay); text-underline-offset: 5px; }

.site-footer { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 22px; }
.footer-brand { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.footer-brand > p { margin: 0; color: var(--clay); font-family: "Field Mono", monospace; font-size: 0.72rem; letter-spacing: 0.12em; }
.footer-line { color: var(--soft-ink); letter-spacing: 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 18px; font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.78rem; }
.legal-nav a { color: var(--soft-ink); padding: 6px 0; text-underline-offset: 3px; }
.footer-disclosure { margin: 6px 0 0; max-width: 78ch; color: var(--soft-ink); font-family: "Field Sans", "Microsoft JhengHei", sans-serif; font-size: 0.78rem; line-height: 1.85; }
.site-footer .footer-date { justify-self: start; }

/* ========== 窄視口 ========== */
@media (max-width: 1050px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 280px; }
  .notes-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 22px; }
  .hero-head, .invite-card, .hero-body { grid-column: 1; }
  .hero-head { grid-row: 1; }
  .invite-card { grid-row: 2; margin-top: 18px; padding: 18px 18px 14px; }
  .hero-body { grid-row: 3; margin-top: 26px; }
  .terracotta-dash { margin: 20px 0 0; }
  html[lang="zh-Hant"] .hero-head h1 { font-size: clamp(2.05rem, 8.2vw, 2.9rem); line-height: 1.24; }
  .hero-head h1 { margin-top: 16px; }
  .desk-pick { grid-template-columns: 1fr; padding: 22px 20px; }
  .desk-pick .hand-note { grid-column: 1; }
  .notes-columns { grid-template-columns: 1fr; gap: 24px; }
  .gate-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid, .tool-grid--convert { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry, .faq-list, .related-notes { max-width: none; }
  .inquiry-diagram { width: 100%; }
  .inquiry-diagram figcaption { width: 100%; }
}

@media (max-width: 600px) {
  .entry, .faq-list, .related-notes, .crumbs, .gates, .all-notes { padding-inline: 0; }
  .desk-pick { margin-inline: 0; }
  .gate-list { grid-template-columns: 1fr; gap: 0; }
  .gate-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: baseline; column-gap: 8px; }
  .gate-list li small { grid-column: 2; }
  .tool-panel { padding: 20px 18px 18px; }
  .tool-grid, .tool-grid--convert { grid-template-columns: 1fr; }
  .prose { font-size: 1.02rem; line-height: 1.95; }
  .prose h2 { font-size: 1.36rem; }
  .prose .lede { padding-left: 12px; }
  .data-table { display: block; overflow-x: auto; font-size: 0.88rem; }
  .callout { padding: 16px 18px; }
  .entry-cover--plate { padding: 14px 14px 10px; }
  .field-index { padding: 16px 18px 12px; }
  .invite-code { font-size: 1.3rem; }
}

/* 手機上把要讀的小字撐到 13px 以上；純裝飾的標號不動 */
@media (max-width: 820px) {
  .invite-foot,
  .footer-disclosure,
  .legal-nav,
  .compact-list li span,
  .gate-list li small,
  .gate-list li span,
  .entry-cover figcaption,
  .tool-note,
  .tool-field label,
  .tool-breakdown,
  .entry-meta,
  .crumbs,
  .result-label,
  .footer-brand > p,
  .data-table thead th,
  .observation small,
  .source-table { font-size: 0.85rem; line-height: 1.75; }

  .hand-note { font-size: 0.88rem; }
  .entry-row time,
  .entry-row a,
  .entry-row p:not(.eyebrow),
  .topic-grid span,
  .topic-grid p,
  .intro-summary,
  .margin-note { font-size: 0.86rem; line-height: 1.7; }

  /* 西里爾字母在同一字號下字腔更窄，小標籤要再大一點才讀得動。 */
  html[lang="kk"] .eyebrow,
  html[lang="kk"] .crumbs,
  html[lang="kk"] .lang-nav { font-size: 0.82rem; letter-spacing: 0.04em; }
}
