:root {
  --paper: #f8f9f7;
  --ink: #262b28;
  --muted: #646c65;
  --line: #dce1da;
  --accent: #386647;
  --wash: #edf1ec;
  --mono: Menlo, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --brand: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 15px; line-height: 1.8; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: #aab5a8; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.4; }
[hidden] { display: none !important; }
::selection { color: #203e2b; background: #dcebd9; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.site-shell { width: min(100% - 48px, 768px); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 42px 0 22px; }
.wordmark { display: inline-flex; align-items: center; min-height: 40px; font-family: var(--brand); font-size: 28px; font-weight: 400; line-height: 1; white-space: nowrap; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.overview-nav { font-family: var(--mono); font-size: 12px; text-decoration: none; color: var(--muted); }
.lang-toggle { min-width: 38px; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; font-family: var(--mono); font-size: 11px; }
.lang-toggle:hover { background: var(--wash); border-color: #aab5a8; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 26px; padding: 0 0 23px; border-bottom: 1px solid var(--line); }
.site-nav a { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.skip-link { position: absolute; top: -100px; padding: 8px 14px; background: var(--ink); color: white; z-index: 10; }
.skip-link:focus { top: 12px; }
.intro { padding: 34px 0 0; }
.intro h1 { font-family: var(--sans); font-size: 26px; font-weight: 500; }
.intro > p { margin-top: 14px; max-width: 640px; color: var(--muted); }
.overview-summary { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 20px; margin-top: 28px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.overview-summary h2 { padding-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.overview-summary p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.overview-summary a { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--accent); }
.home-section { margin-top: 48px; }
.section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 21px; }
.section-heading h2 { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.section-rule { flex: 1; height: 1px; background: var(--line); }
.section-heading > a, .section-heading > span:last-child:not(.section-rule) { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.project-list { list-style: none; margin: 0; padding: 0; }
.project-list > li { margin: 0; border-bottom: 1px solid var(--line); }
.project-link { display: grid; grid-template-columns: 84px minmax(0, 1fr) 20px; gap: 20px; align-items: center; padding: 20px 0; text-decoration: none; }
.project-link > img:first-child { width: 84px; height: 58px; object-fit: contain; background: #edf0eb; border: 1px solid var(--line); border-radius: 3px; }
.project-link h3 { display: inline; font-size: 15px; text-decoration: underline; text-decoration-color: #b4bcb1; text-underline-offset: 4px; }
.project-link:hover h3 { text-decoration-color: var(--accent); }
.project-link p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 5px; }
.project-link .item-arrow { color: #818d7d; width: 16px; height: 16px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-family: var(--mono); color: var(--muted); font-size: 11px; }
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-list li + li { margin-top: 24px; }
.entry-title { font-size: 15px; font-weight: 500; }
.entry-list p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.entry-type { margin-left: 10px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.empty-note { padding: 8px 0 15px; font-size: 13px; color: var(--muted); }
.empty-note p + p { margin-top: 5px; }
.empty-note strong { font-weight: 500; color: var(--ink); }
.contact-section { margin-top: 70px; padding-bottom: 35px; }
.contact-section > p { color: var(--muted); font-size: 14px; }
.contact-links { display: flex; gap: 14px 24px; flex-wrap: wrap; margin-top: 23px; font-family: var(--mono); font-size: 13px; }
.text-button { border: 0; padding: 0; background: none; text-decoration: underline; text-decoration-color: #aab5a8; text-underline-offset: 4px; font: inherit; }
.text-button:hover { color: var(--accent); }
.social-note { margin-top: 18px; font-size: 12px; color: var(--muted); }
.social-note summary { cursor: pointer; width: fit-content; }
.social-note p { margin-top: 9px; }
.site-footer { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 25px 0 44px; margin-top: 50px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10px; color: var(--muted); }
.site-footer span { margin-right: auto; }
.site-footer .icp-record { flex-basis: 100%; text-align: center; }
.page-title { padding: 42px 0 29px; }
.back-link { display: inline-block; margin-bottom: 27px; font-size: 12px; color: var(--muted); }
.page-title h1 { margin-top: 10px; font-size: 32px; font-family: var(--mono); overflow-wrap: anywhere; }
.page-title > p { max-width: 650px; margin-top: 16px; color: var(--muted); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px 20px; border-bottom: 1px solid var(--line); margin: 4px 0 0; }
.filter-button { padding: 11px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.filter-button.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.filter-button:hover { color: var(--accent); }
.case-cover { margin-top: 8px; padding: 0; }
.case-cover img { max-height: 430px; width: 100%; object-fit: contain; background: var(--wash); border: 1px solid var(--line); border-radius: 4px; }
.case-cover figcaption, .gallery-grid figcaption { margin-top: 10px; color: var(--muted); font-size: 11px; }
.case-links { display: flex; gap: 24px; margin-top: 19px; font-size: 12px; color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0 0; border-block: 1px solid var(--line); }
.facts > div { padding: 20px 12px 20px 0; }
.facts dt { font-family: var(--mono); font-size: 18px; color: var(--accent); }
.facts dd { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.article-section { margin-top: 52px; }
.article-section h2 { font-size: 20px; margin-bottom: 17px; }
.article-section h3 { font-size: 16px; margin-bottom: 9px; }
.article-section p { color: var(--muted); }
.article-section p + p { margin-top: 17px; }
.article-equation { margin: 24px 0 0; padding: 16px 0; border-block: 1px solid var(--line); font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-figure { margin-top: 28px; }
.article-figure img { width: 100%; height: auto; }
.article-figure figcaption { margin-top: 12px; font-size: 12px; color: var(--muted); }
.article-section a { overflow-wrap: anywhere; }
.detail-rows { display: grid; gap: 28px; }
.detail-row { padding-left: 17px; border-left: 2px solid var(--line); }
.detail-row p { font-size: 14px; }
.stack-line { display: flex; flex-wrap: wrap; gap: 6px 17px; margin-bottom: 25px; font-family: var(--mono); color: var(--accent); font-size: 11px; }
.prose-list { padding-left: 19px; color: var(--muted); }
.prose-list li + li { margin-top: 12px; }
.final-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery-grid img { width: 100%; max-height: 480px; object-fit: contain; background: var(--wash); }
.next-project { display: flex; justify-content: space-between; gap: 22px; align-items: center; margin-top: 65px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.next-project > span:first-child { color: var(--muted); font-size: 12px; }
.prompt-block { margin-top: 27px; border: 1px solid var(--line); border-radius: 4px; background: #f0f3ef; }
.prompt-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.copy-button { display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 5px; font-size: 12px; }
.copy-button img { width: 15px; height: 15px; }
.prompt-code { margin: 0; padding: 24px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; line-height: 1.95; }
.prompt-code-json { max-height: 640px; overflow: auto; }
.copy-status { min-height: 24px; margin-top: 7px; color: var(--accent); font-size: 12px; }
.source-note { margin-top: 25px; color: var(--muted); font-size: 12px; }
.reading-tabs { display: flex; gap: 24px; margin-bottom: 27px; border-bottom: 1px solid var(--line); }
.reading-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 13px 0; font-size: 13px; color: var(--muted); }
.reading-tabs [aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.reading-panel { min-height: 170px; }
.reading-panel:focus { outline-offset: 8px; }
dialog { width: min(100% - 40px, 460px); max-height: calc(100dvh - 48px); padding: 29px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #18251b70; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.dialog-heading h2 { font-size: 20px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: var(--wash); border-radius: 4px; }
.icon-button img { width: 16px; height: 16px; }
.contact-form { display: grid; gap: 15px; margin-top: 23px; }
.contact-form label { display: grid; gap: 5px; font-size: 12px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 9px 11px; border: 1px solid #bfc9bb; border-radius: 3px; background: white; color: var(--ink); font-size: 16px; }
.contact-form textarea { min-height: 116px; resize: vertical; }
.submit-button { border: 0; border-radius: 3px; padding: 10px 16px; background: var(--accent); color: white; }
.form-status { min-height: 22px; font-size: 12px; }
.contact-form > a { font-size: 12px; }
@media (max-width: 600px) {
  .site-shell { width: calc(100% - 40px); }
  .site-header { padding-top: 28px; padding-bottom: 16px; }
  .header-actions { gap: 15px; }
  .site-nav { gap: 7px 20px; padding-bottom: 15px; }
  .site-nav a { font-size: 11px; }
  .intro { padding-top: 32px; }
  .intro h1 { font-size: 24px; }
  .intro > p { font-size: 14px; }
  .overview-summary { grid-template-columns: 1fr; gap: 9px; margin-top: 28px; padding-block: 18px; }
  .home-section { margin-top: 44px; }
  .section-heading { gap: 10px; margin-bottom: 13px; }
  .project-link { grid-template-columns: 66px minmax(0, 1fr) 14px; gap: 13px; padding-block: 18px; }
  .project-link > img:first-child { width: 66px; height: 54px; }
  .project-link h3 { font-size: 14px; }
  .project-link p { font-size: 12px; }
  .page-title { padding-top: 28px; }
  .page-title h1 { font-size: 26px; }
  .page-title > p { font-size: 14px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .final-columns, .gallery-grid { grid-template-columns: 1fr; gap: 25px; }
  .prompt-code { padding: 18px; font-size: 12px; }
  .contact-links { font-size: 12px; }
  .site-footer { font-size: 10px; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
