:root {
  --ink: #10181a;
  --slate: #263439;
  --panel: #192528;
  --jade: #5b817d;
  --copper: #c8a177;
  --paper: #eee9de;
  --sage: #a6b7ae;
  --border: #485856;
  --serif: "Instrument Serif", Georgia, "Noto Serif CJK SC", "Songti SC", serif;
  --sans:
    "DM Sans", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "DM Mono", monospace;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 85% 12%, #26343970, transparent 55%), var(--ink);
  color: var(--paper);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 5px;
}
a:hover {
  color: var(--copper);
}
[hidden] {
  display: none !important;
}
img,
svg {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
}
h1 {
  font-size: clamp(54px, 5.4vw, 78px);
  letter-spacing: -0.012em;
}
h2 {
  font-size: clamp(42px, 4.6vw, 64px);
}
h3 {
  font-size: 34px;
}
em {
  color: var(--copper);
  font-style: normal;
}
p {
  color: var(--sage);
}
.container {
  width: min(1280px, calc(100% - 160px));
  margin-inline: auto;
}
/* Grid children must be allowed to shrink instead of clipping long bilingual copy. */
.systems-grid > *,
.about-grid > *,
.case-layout > *,
.note-categories > * {
  min-width: 0;
}
.label {
  font: 12px/1.6 var(--mono);
  letter-spacing: 0.025em;
}
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  padding: 12px 18px;
  z-index: 30;
  background: var(--paper);
  color: var(--ink);
}
.skip:focus {
  top: 12px;
}
.header {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--border);
}
.brand {
  font: 38px/1 var(--serif);
  white-space: nowrap;
  letter-spacing: -1px;
}
.brand span {
  color: var(--copper);
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
  color: var(--sage);
}
.desktop-nav a {
  padding-block: 14px;
  font-size: 16px;
}
.desktop-nav a[aria-current] {
  color: var(--copper);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.language,
.menu-trigger,
.menu-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--paper);
  min-width: 44px;
  min-height: 44px;
  font-size: 13px;
  padding: 8px;
}
.language:hover,
.menu-trigger:hover,
.menu-close:hover {
  border-color: var(--border);
  color: var(--copper);
}
.menu-trigger {
  display: none;
}
.fallback-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}
.fallback-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}
dialog::backdrop {
  background: var(--ink);
}
.menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.menu-top > span {
  font: 30px var(--serif);
}
dialog nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 50px;
}
dialog nav a {
  font: 42px var(--serif);
  width: fit-content;
  min-height: 48px;
}
dialog .label {
  color: var(--sage);
}
body.menu-open {
  overflow: hidden;
}
.hero {
  display: grid;
  grid-template-columns: 45% 55%;
  min-height: calc(100svh - 108px);
  align-items: center;
  padding-block: 26px 42px;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-block: 42px;
}
.eyebrow {
  margin-bottom: 42px;
  color: var(--sage);
  font-size: 12px;
}
.hero h1 {
  margin-bottom: 40px;
}
.hero-lead {
  font-size: 22px;
  line-height: 1.5;
  color: var(--copper);
  margin-bottom: 16px;
}
.hero-support {
  font-size: 20px;
  max-width: 445px;
  line-height: 1.6;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 52px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 26px;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  transition:
    background 0.18s,
    border-color 0.18s;
}
.primary {
  background: var(--copper);
  color: var(--ink);
  border-color: var(--copper);
}
.primary:hover {
  background: #dfb88a;
  color: var(--ink);
}
.secondary:hover {
  border-color: var(--copper);
}
.hero-index {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 110px;
  color: var(--sage);
  width: fit-content;
}
.hero-index i {
  width: 150px;
  height: 1px;
  background: var(--copper);
}
.hero-art {
  position: relative;
  aspect-ratio: 1;
  width: calc(100% + 40px);
  margin-left: -2px;
  background: radial-gradient(ellipse at 60% 45%, #26343980, transparent 70%);
}
.hero-art img {
  width: 100%;
  height: auto;
}
.art-fallback {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
}
.hero-art.asset-error .cairn {
  display: none;
}
.hero-art.asset-error .art-fallback {
  position: relative;
  z-index: 0;
}
.section {
  padding-block: 96px 26px;
}
.chapter {
  color: var(--copper);
  padding-bottom: 20px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.section-intro {
  font-size: 18px;
  max-width: 590px;
  margin-top: 28px;
  line-height: 1.75;
}
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 38px;
}
.project {
  display: grid;
  grid-template-columns: 35% 65%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
  min-width: 0;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.project:hover,
.project:focus-within {
  transform: translateY(-3px);
  border-color: var(--copper);
}
.project.featured {
  grid-column: 1/-1;
  grid-template-columns: 47% 53%;
  padding: 14px;
  min-height: 260px;
}
.project-copy {
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.featured .project-copy {
  padding: 8px 34px;
}
.project .label {
  font-size: 10px;
  color: var(--copper);
  margin-bottom: 12px;
}
.project h3 {
  font-size: 32px;
  margin-bottom: 12px;
}
.featured h3 {
  font-size: 46px;
  margin-bottom: 20px;
}
.project-copy > p:not(.label) {
  font-size: 15px;
  line-height: 1.65;
}
.project-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--copper);
  font-size: 14px;
  border-bottom: 1px solid var(--copper);
  margin-top: 16px;
}
.project-copy .status {
  margin-top: 16px;
  color: var(--sage);
  font-size: 12px;
}
.schematic {
  background: #203032;
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 20px;
  min-width: 0;
  overflow: hidden;
}
.steps {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  gap: 22px;
}
.steps:before {
  content: "";
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
  background: var(--copper);
}
.steps span {
  position: relative;
  flex: 1;
  padding: 20px 8px;
  background: #29413f;
  border: 1px solid var(--jade);
  border-radius: 4px;
  color: var(--paper);
  font: 11px var(--mono);
  min-width: 0;
}
.chatbi .steps {
  gap: 0;
}
.chatbi .steps span {
  padding: 12px 3px;
  font-size: 7px;
  border-radius: 0;
}
.schematic svg {
  width: 100%;
  height: 140px;
}
.gridline {
  stroke: var(--border);
  fill: none;
}
.chartline {
  stroke: var(--copper);
  stroke-width: 4;
  fill: none;
}
.chartpoint {
  fill: var(--copper);
}
.video-icon {
  border: 2px solid var(--jade);
  border-radius: 9px;
  padding: 10px 15px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.video-icon span {
  font: 45px var(--sans);
  line-height: 1;
  color: var(--copper);
}
.video-icon i {
  width: 55px;
  height: 3px;
  background: var(--sage);
}
.dialogue {
  width: 85%;
  display: grid;
  gap: 12px;
}
.dialogue i {
  width: 75%;
  height: 18px;
  background: var(--jade);
  border-radius: 6px;
}
.dialogue i:nth-child(2n) {
  margin-left: auto;
  background: #75604b;
}
.fineprint {
  font: 11px/1.8 var(--mono);
  margin-top: 20px;
  color: var(--sage);
}
.systems-grid {
  display: grid;
  grid-template-columns: 44% 53%;
  gap: 3%;
  align-items: start;
}
.systems-grid .section-intro {
  max-width: 385px;
}
.focus-areas {
  margin-top: 70px;
}
.focus-areas > .label {
  color: var(--copper);
  margin-bottom: 20px;
}
.skills {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 440px;
  padding: 0;
  margin: 0;
}
.skills li {
  border: 1px solid var(--border);
  background: #1d2d2b;
  border-radius: 5px;
  padding: 10px 14px;
  font: 13px/1.6 var(--mono);
}
.workflow {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #192a2b;
  padding: 26px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.workflow > figcaption {
  align-self: flex-start;
  color: var(--sage);
  margin-bottom: 26px;
}
.node {
  border: 1px solid var(--jade);
  border-radius: 8px;
  background: #213638;
  width: 70%;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.node small {
  font: 10px/1.5 var(--mono);
  color: var(--copper);
}
.node span {
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.node.active {
  border-color: var(--copper);
  background: #2c4642;
}
.node.active small {
  color: #ddb98e;
}
.connector {
  height: 34px;
  width: 1px;
  background: var(--copper);
  flex-shrink: 0;
}
.branch {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
}
.branch .node {
  width: 100%;
}
.branch:before {
  content: "";
  position: absolute;
  top: -14px;
  left: 24%;
  right: 24%;
  height: 14px;
  border: 1px solid var(--copper);
  border-bottom: 0;
}
.branch:after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 24%;
  right: 24%;
  height: 14px;
  border: 1px solid var(--copper);
  border-top: 0;
}
.workflow > .fineprint {
  align-self: stretch;
  font-size: 10px;
  margin-top: 24px;
}
.about-grid {
  display: grid;
  grid-template-columns: 45% 50%;
  gap: 5%;
}
.about-grid .section-intro {
  max-width: 420px;
  font-size: 20px;
}
.beliefs {
  margin-top: 58px;
}
.beliefs .label {
  color: var(--copper);
  margin-bottom: 20px;
}
.beliefs p:not(.label) {
  color: var(--paper);
  margin-bottom: 10px;
  font-size: 18px;
}
.fields {
  border-left: 1px solid var(--border);
  padding-left: 60px;
}
.fields > .label {
  color: var(--copper);
  margin-bottom: 24px;
}
.fields ol {
  list-style: none;
  counter-reset: field;
  padding: 0;
  margin: 0;
}
.fields li {
  position: relative;
  counter-increment: field;
  padding: 0 0 28px 62px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.fields li:before {
  content: "0" counter(field);
  position: absolute;
  left: 0;
  top: 4px;
  font: 17px var(--mono);
  color: var(--copper);
}
.fields h3 {
  font-size: 30px;
  margin-bottom: 10px;
}
.fields p {
  font-size: 15px;
}
.contact {
  padding-block: 96px 100px;
}
.contact > p:not(.chapter) {
  max-width: 560px;
  margin-top: 25px;
  font-size: 18px;
}
.contact .btn {
  margin-top: 30px;
}
.footer {
  border-top: 1px solid var(--border);
  padding-block: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font: 12px/1.7 var(--mono);
  color: var(--sage);
}
.footer a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.case-page {
  padding-block: 56px 100px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--copper);
  font-size: 14px;
  margin-bottom: 28px;
}
.case-page h1 {
  margin-bottom: 28px;
}
.case-page h2 {
  max-width: 850px;
}
.case-status {
  border-left: 2px solid var(--copper);
  padding: 14px 22px;
  background: var(--panel);
  max-width: 850px;
  font-size: 15px;
  margin-block: 30px;
}
.case-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
  align-items: start;
}
.case-layout h3 {
  font-size: 30px;
  margin-bottom: 20px;
}
.case-layout p {
  margin-bottom: 36px;
}
.case-layout .workflow p {
  margin-bottom: 0;
}
.case-layout .chatbi {
  width: 100%;
  min-height: 260px;
}
.case-layout .chatbi .steps span {
  font-size: 12px;
  padding: 20px 8px;
}
.decisions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 52px;
}
.decisions section {
  border-top: 1px solid var(--border);
  padding-top: 25px;
}
.decisions h3 {
  margin-bottom: 15px;
}
.paper {
  background: var(--paper);
  color: var(--ink);
  --sage: #435c58;
  --border: #acb5ac;
  --copper: #79552e;
  --panel: #e4ded1;
  color-scheme: light;
}
.paper .brand span {
  color: #936639;
}
.paper .language,
.paper .menu-trigger {
  color: var(--ink);
}
.paper dialog {
  background: var(--paper);
  color: var(--ink);
}
.paper .primary {
  background: #79552e;
  color: var(--paper);
}
.notes-page {
  padding-block: 55px 100px;
  min-height: calc(100svh - 200px);
}
.notes-page h1 {
  font-size: clamp(52px, 5.4vw, 78px);
}
.note-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 64px;
}
.note-categories article {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.note-categories .label {
  color: var(--copper);
}
.note-categories h2 {
  font-size: 30px;
  margin: 18px 0;
}
.note-categories p {
  font-size: 16px;
}
.empty-state {
  margin-top: 60px;
  font-size: 16px;
}
:lang(zh-CN) h1,
:lang(zh-CN) h2,
:lang(zh-CN) h3 {
  font-family: "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  line-height: 1.35;
}
:lang(zh-CN) .hero h1 {
  font-size: clamp(42px, 4vw, 60px);
}
@media (min-width: 1600px) {
  .hero {
    min-height: 800px;
  }
  .hero-art {
    width: 100%;
  }
}
@media (max-width: 1200px) {
  .container {
    width: calc(100% - 80px);
  }
  .desktop-nav {
    gap: 22px;
  }
  .hero-art {
    width: 100%;
    margin: 0;
  }
  .hero h1 {
    font-size: 64px;
  }
  .hero-lead {
    font-size: 20px;
  }
  .hero-support {
    font-size: 18px;
  }
  .hero-index {
    margin-top: 70px;
  }
  .project h3 {
    font-size: 28px;
  }
  .project-copy {
    padding-inline: 16px;
  }
  .featured .project-copy {
    padding-inline: 26px;
  }
  .fields {
    padding-left: 36px;
  }
}
@media (max-width: 900px) {
  .container {
    width: calc(100% - 64px);
  }
  .header {
    min-height: 88px;
    flex-wrap: wrap;
  }
  .desktop-nav {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
  .menu-trigger {
    display: inline-block;
  }
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-block: 50px 0;
  }
  .hero-copy {
    padding-block: 0;
  }
  .hero h1 {
    font-size: 64px;
    max-width: 640px;
    margin-bottom: 28px;
  }
  .hero-support {
    max-width: 540px;
  }
  .eyebrow {
    margin-bottom: 28px;
  }
  .cta-row {
    margin-top: 30px;
  }
  .hero-index {
    display: none;
  }
  .hero-art {
    width: min(100%, 660px);
    margin: 20px auto 0;
  }
  .section {
    padding-top: 76px;
  }
  .project {
    grid-template-columns: 1fr;
  }
  .project.featured {
    grid-template-columns: 45% 55%;
    min-height: 240px;
  }
  .featured h3 {
    font-size: 38px;
  }
  .featured .steps {
    gap: 8px;
  }
  .featured .steps span {
    font-size: 8px;
    padding-inline: 6px;
  }
  .project-copy {
    padding: 18px 10px 8px;
  }
  .schematic {
    min-height: 150px;
  }
  .systems-grid,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .systems-grid .section-intro {
    max-width: 580px;
  }
  .focus-areas {
    margin-top: 32px;
  }
  .workflow {
    max-width: 680px;
    width: 100%;
  }
  .fields {
    padding-left: 30px;
  }
  .about-grid .section-intro {
    max-width: 580px;
  }
  .case-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .decisions {
    gap: 20px;
  }
  .fallback-nav {
    width: 100%;
    padding-bottom: 14px;
  }
  .note-categories {
    gap: 20px;
  }
}
@media (max-width: 540px) {
  body {
    font-size: 16px;
  }
  .container {
    width: calc(100% - 48px);
  }
  .header {
    min-height: 78px;
    gap: 12px;
  }
  .brand {
    font-size: 30px;
  }
  .nav-actions {
    gap: 0;
  }
  .language,
  .menu-trigger {
    font-size: 12px;
    padding: 6px;
  }
  .hero {
    padding-top: 40px;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 24px;
  }
  .hero h1 {
    font-size: 48px;
    line-height: 1.12;
    margin-bottom: 24px;
  }
  .hero-lead {
    font-size: 17px;
  }
  .hero-support {
    font-size: 16px;
  }
  .cta-row {
    gap: 12px;
    margin-top: 32px;
  }
  .btn {
    min-height: 54px;
    padding: 13px 23px;
    font-size: 15px;
  }
  .hero .secondary {
    font-size: 13px;
    padding-inline: 15px;
  }
  .hero-art {
    margin-top: 26px;
    width: 100%;
  }
  h2 {
    font-size: 40px;
  }
  .chapter {
    font-size: 11px;
    margin-bottom: 28px;
    padding-bottom: 16px;
  }
  .section {
    padding-block: 62px 0;
  }
  .section-intro {
    font-size: 16px;
    margin-top: 22px;
  }
  .projects {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 28px;
  }
  .project.featured {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .featured .schematic {
    min-height: 170px;
  }
  .featured .project-copy {
    padding: 20px 10px 8px;
  }
  .featured h3 {
    font-size: 34px;
  }
  .project h3 {
    font-size: 29px;
  }
  .project .label {
    font-size: 10px;
  }
  .featured .steps {
    gap: 12px;
  }
  .featured .steps span {
    font-size: 9px;
    padding: 17px 6px;
  }
  .project-copy > p:not(.label) {
    font-size: 15px;
  }
  .chatbi .steps span {
    font-size: 11px;
    padding: 18px 6px;
  }
  .fineprint {
    font-size: 10px;
  }
  .skills {
    gap: 10px;
  }
  .skills li {
    font-size: 11px;
    padding: 10px;
  }
  .workflow {
    padding: 22px 16px;
  }
  .workflow > figcaption {
    font-size: 10px;
  }
  .node {
    width: 90%;
    padding: 11px;
  }
  .node span {
    font-size: 14px;
  }
  .node small {
    font-size: 9px;
  }
  .branch {
    gap: 14px;
  }
  .connector {
    height: 28px;
  }
  .beliefs {
    margin-top: 36px;
  }
  .about-grid .section-intro {
    font-size: 17px;
  }
  .fields {
    padding-left: 20px;
  }
  .fields li {
    padding-left: 40px;
  }
  .fields h3 {
    font-size: 27px;
  }
  .beliefs p:not(.label) {
    font-size: 16px;
  }
  .contact {
    padding-block: 62px;
  }
  .contact > p:not(.chapter) {
    font-size: 16px;
  }
  .footer {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
  }
  .footer > span:nth-child(2) {
    display: none;
  }
  .case-page {
    padding-block: 32px 65px;
  }
  .case-page h1 {
    font-size: 46px;
    overflow-wrap: anywhere;
  }
  .case-page h2 {
    font-size: 38px;
  }
  .case-status {
    font-size: 14px;
    padding: 12px 16px;
  }
  .case-layout {
    margin-top: 35px;
  }
  .case-layout .chatbi {
    min-height: 200px;
  }
  .case-layout .chatbi .steps span {
    font-size: 10px;
    padding-inline: 5px;
  }
  .decisions {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }
  .notes-page {
    padding-block: 40px 65px;
  }
  .notes-page h1 {
    font-size: 48px;
  }
  .note-categories {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
  }
  .empty-state {
    margin-top: 36px;
  }
  :lang(zh-CN) .hero h1 {
    font-size: 35px;
    line-height: 1.5;
  }
  :lang(zh-CN) h2 {
    font-size: 32px;
  }
  :lang(zh-CN) .hero-lead {
    font-size: 15px;
  }
}
/* Keep all menu destinations reachable on short landscape phone viewports. */
@media (max-height: 540px) {
  dialog {
    padding-top: 16px;
  }
  .menu-top {
    padding-bottom: 12px;
  }
  dialog nav {
    padding-block: 20px;
    gap: 10px;
  }
  dialog nav a {
    font-size: 30px;
  }
}
@media (max-width: 360px) {
  .container {
    width: calc(100% - 36px);
  }
  .brand {
    font-size: 27px;
  }
  .hero h1 {
    font-size: 41px;
  }
  .hero-lead {
    font-size: 16px;
  }
  .hero .secondary {
    display: none;
  }
  .hero-support {
    font-size: 15px;
  }
  .hero .cta-row {
    margin-top: 27px;
  }
  h2 {
    font-size: 35px;
  }
  .hero-art {
    margin-top: 24px;
  }
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .branch .node span {
    font-size: 12px;
  }
  .case-page h1 {
    font-size: 39px;
  }
  :lang(zh-CN) .hero h1 {
    font-size: 29px;
  }
  :lang(zh-CN) h2 {
    font-size: 29px;
  }
  .footer {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
  .project:hover,
  .project:focus-within {
    transform: none;
  }
}


/* v5 / UI craft: consistent tactile controls, with accessible keyboard focus.
   Shared by the homepage, light Notes, and case studies. */
.language,
.menu-trigger,
.menu-close {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #84988768;
  border-radius: 999px;
  background: linear-gradient(155deg, #273933e8, #172626ef);
  box-shadow: inset 0 1px #ffffff12, 0 4px 13px #030a0a20;
  color: #eae8dd;
  font: 11px/1 var(--mono);
  letter-spacing: .02em;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s,
    color .2s, background-color .2s, box-shadow .2s;
}
.language::before {
  content: "文";
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid #c4a57b80;
  border-radius: 50%;
  color: #dfbd96;
  font: 11px/1 var(--sans);
  flex-shrink: 0;
}
.language:hover, .menu-trigger:hover, .menu-close:hover {
  border-color: #d0b088a6;
  color: #f5e7d5;
  box-shadow: inset 0 1px #ffffff17, 0 5px 18px #030a0a38;
}
.language:active, .menu-trigger:active, .menu-close:active {
  transform: translateY(1px) scale(.97);
}
.language:focus, .menu-trigger:focus, .menu-close:focus {
  outline: none;
}
.language:focus-visible, .menu-trigger:focus-visible, .menu-close:focus-visible {
  outline: none;
  border-color: #e7c397;
  box-shadow: 0 0 0 2px #cda57457, inset 0 1px #ffffff18;
}
.paper .language,
.paper .menu-trigger,
.paper .menu-close {
  background: linear-gradient(150deg, #f6efe3, #e4dace);
  border-color: #87745c72;
  color: #4b3f30;
  box-shadow: inset 0 1px #ffffffbb, 0 4px 13px #4b392015;
}
.paper .language::before { color: #74522f; border-color: #96775688; }
.paper .language:hover, .paper .menu-trigger:hover, .paper .menu-close:hover {
  color: #49321b; border-color: #926c41b3; background: #f7ebdb;
}
.paper .language:focus-visible,
.paper .menu-trigger:focus-visible,
.paper .menu-close:focus-visible {
  box-shadow: 0 0 0 2px #8c653f80;
}
.btn, .project-filters button, .motion-switch, .linga-phase,
.harness-replay, .project-action, .footer a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition-duration: .24s;
  transition-timing-function: cubic-bezier(.2,.8,.2,1);
}
.btn {
  box-shadow: inset 0 1px #ffffff16, 0 5px 20px #030a0a2c;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px #ffffff25, 0 9px 26px #030a0a46;
}
.btn:active, .project-filters button:active, .motion-switch:active,
.linga-phase:active, .harness-replay:not(:disabled):active {
  transform: translateY(1px) scale(.975);
}
.btn:focus-visible, .project-filters button:focus-visible,
.motion-switch:focus-visible, .linga-phase:focus-visible,
.harness-replay:focus-visible, .project-action:focus-visible,
.footer a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #caa6759c;
  border-color: #dcb688;
  border-radius: 4px;
}
.project-action:active, .footer a:active { opacity: .75; }
/* Navigation is deliberately collapsed only on smaller viewports. */
.menu-trigger { display: none; }
@media (max-width: 900px) {
  .menu-trigger { display: inline-flex; }
}
@media (hover: none) {
  .btn:hover { transform: none; }
}
@media (max-width: 540px) {
  /* Restore the intentionally designed pill spacing after legacy mobile rules. */
  .language, .menu-trigger { padding: 10px 12px; font-size: 11px; }
  .nav-actions { gap: 7px; }
  .language { min-width: 76px; }
}
@media (max-width: 360px) {
  .language, .menu-trigger { padding: 10px 9px; }
  .nav-actions { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .language, .menu-trigger, .menu-close, .btn, .project-action,
  .motion-switch, .project-filters button, .linga-phase, .harness-replay {
    transition: none !important;
    transform: none !important;
  }
}

/* Native dialog keeps focus trapping while the panel and links enter together. */
#mobile-menu {
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  height: calc(100dvh - 24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding-inline: clamp(20px, 6vw, 48px);
  box-shadow: 0 24px 80px #0006;
}
#mobile-menu::backdrop { background: #030a0ad9; }
#mobile-menu[open] { animation: menu-panel-in .32s cubic-bezier(.2,.8,.2,1) both; }
#mobile-menu[open]::backdrop { animation: menu-backdrop-in .25s ease both; }
#mobile-menu nav { counter-reset: menu-link; }
#mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 22px;
  width: 100%;
  padding-block: 5px;
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
  animation: menu-link-in .36s cubic-bezier(.2,.8,.2,1) both;
}
#mobile-menu nav a::before {
  counter-increment: menu-link;
  content: "0" counter(menu-link);
  font: 11px var(--mono);
  color: var(--copper);
}
#mobile-menu nav a:nth-child(1) { animation-delay: .04s; }
#mobile-menu nav a:nth-child(2) { animation-delay: .075s; }
#mobile-menu nav a:nth-child(3) { animation-delay: .11s; }
#mobile-menu nav a:nth-child(4) { animation-delay: .145s; }
#mobile-menu nav a:nth-child(5) { animation-delay: .18s; }
#mobile-menu[open].is-closing { animation: menu-panel-out .18s ease both; }
#mobile-menu.is-closing nav a { animation: none; }
#mobile-menu.is-closing::backdrop { animation: menu-backdrop-out .18s ease both; }
@keyframes menu-panel-in {
  from { opacity: 0; transform: translateY(20px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-panel-out { to { opacity: 0; transform: translateY(12px) scale(.99); } }
@keyframes menu-link-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-backdrop-out { to { opacity: 0; } }
@media (max-height: 540px) {
  #mobile-menu { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  #mobile-menu nav { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #mobile-menu, #mobile-menu::backdrop, #mobile-menu nav a { animation: none !important; }
}
.motion-off #mobile-menu, .motion-off #mobile-menu::backdrop,
.motion-off #mobile-menu nav a { animation: none !important; }
