@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --paper: #f6f5f0;
  --white: #fffefa;
  --ink: #17252e;
  --muted: #617078;
  --line: #dcded7;
  --accent: #18645b;
  --accent-hover: #114d46;
  --soft: #e9eeea;
  --night: #11212c;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #59a69b; outline-offset: 5px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 600; letter-spacing: -.045em; }
h2 { font-size: clamp(32px, 3.7vw, 46px); }
h3 { font-size: 21px; letter-spacing: -.025em; }
code, pre { font-family: "Consolas", "Courier New", monospace; }
code { font-size: .9em; }
.wrap { width: min(1220px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }
.identity { display: flex; flex-direction: column; text-decoration: none; font-size: 20px; font-weight: 650; line-height: 1.4; letter-spacing: -.03em; }
.identity span { font-size: 12px; font-weight: 400; letter-spacing: .025em; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
nav a { font-size: 13px; font-weight: 500; text-decoration: none; }
nav a:hover { color: var(--accent); }
.hero { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 56px; padding-block: 82px 94px; }
.eyebrow { margin: 0 0 17px; color: var(--accent); font-size: 12px; line-height: 1.4; letter-spacing: .1em; font-weight: 650; text-transform: uppercase; }
h1 { font-size: clamp(40px, 4.4vw, 62px); line-height: 1.07; letter-spacing: -.055em; }
.hero-description { max-width: 460px; margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 29px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 48px; padding: 13px 20px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-size: 13px; line-height: 1.4; font-weight: 600; transition: background .16s ease, border-color .16s ease; }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { border-color: #c4cec8; background: transparent; color: var(--ink); }
.button-secondary:hover { background: #edf1eb; }
.text-link { display: inline-flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 600; text-decoration: none; border-bottom: 1px solid #a6b7ad; padding-block: 6px; }
.text-link:hover { color: var(--accent); }
.context-note { margin: 26px 0 0; max-width: 445px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.video-card { margin: 0; border: 1px solid #d6dbd4; border-radius: var(--radius); background: var(--white); padding: 10px; box-shadow: 0 18px 55px #152c3410; scroll-margin-top: 28px; }
.narration-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 3px 9px 12px; }
.narration-control label { font-size: 12px; font-weight: 600; }
.narration-control select { width: min(200px, 55%); min-height: 36px; border: 1px solid #cdd7ce; border-radius: 7px; padding: 6px 9px; background: #f7f8f3; color: var(--ink); font-size: 12px; }
.narration-note { margin: 3px 9px 6px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.narration-status { margin: 4px 9px 5px; color: var(--accent); font-size: 11px; line-height: 1.6; }
.narration-status:empty { display: none; }
.video-card video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--night); }
.video-card figcaption { padding: 14px 9px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.video-card figcaption a { text-decoration: none; color: var(--accent); font-weight: 550; }
.example-section { padding: 72px 0 80px; background: #e9eee8; border-block: 1px solid #dce3da; }
.section-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: 33px; }
.section-intro > p { margin: 0; max-width: 425px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.interactive-card { padding: 25px; background: var(--white); border-radius: var(--radius); border: 1px solid #d1dbd0; }
.input-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.input-grid label { display: flex; align-items: center; gap: 15px; min-width: 0; padding: 13px 17px; border: 1px solid #d7ddd4; border-radius: 10px; background: #f7f8f3; }
.input-grid label span { font-weight: 600; font-size: 13px; white-space: nowrap; }
.input-grid input { width: 100%; min-width: 0; border: 0; border-bottom: 1px solid #b2c4b8; background: transparent; color: var(--accent); font-size: 22px; font-weight: 600; text-align: right; border-radius: 0; padding: 0 2px; }
.input-hint { margin: 9px 0 18px; color: var(--muted); font-size: 11px; }
.visual-wrap { background: var(--night); border-radius: 13px; overflow: hidden; }
#collective-visual { display: block; width: 100%; height: 340px; }
.interactive-controls { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-top: 21px; }
.control-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-status { margin: 0; color: var(--accent); font-size: 13px; font-weight: 550; }
.simulation-note { margin: 17px 0 0; max-width: 760px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.quiz-section { padding-block: 80px 86px; }
.question-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.question-card { min-width: 0; margin: 0; padding: 25px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; }
.question-card legend { float: left; width: 100%; margin-bottom: 23px; font-size: 15px; font-weight: 600; line-height: 1.6; letter-spacing: -.018em; }
.question-card legend + label { clear: both; }
.question-card label { display: flex; align-items: flex-start; gap: 11px; margin-top: 15px; color: #52616a; font-size: 13px; line-height: 1.7; cursor: pointer; }
.question-card input { flex-shrink: 0; width: 15px; height: 15px; margin: 4px 0 0; accent-color: var(--accent); }
.quiz-feedback { clear: both; min-height: 0; margin: 0; color: var(--accent); font-size: 12px; line-height: 1.7; }
.quiz-feedback:not(:empty) { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 15px; }
.question-card.needs-review .quiz-feedback { color: #8a4c28; }
.question-card.correct { border-color: #8daf9c; }
.quiz-controls { display: flex; align-items: center; gap: 24px; margin-top: 26px; }
#quiz-status { margin: 0; color: var(--muted); font-size: 13px; }
.guide-section { padding-block: 73px; background: #edece5; border-block: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.guide-grid > div > p:not(.eyebrow) { margin: 22px 0 25px; max-width: 460px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.command-card { padding: 31px; border: 1px solid #d1d6cc; border-radius: 15px; background: var(--white); }
.command-card p { margin-top: 16px !important; font-size: 13px !important; }
.command-card pre { margin: 21px -10px; padding: 20px; border-radius: 8px; background: var(--night); color: #dcece7; overflow-x: auto; font-size: 12px; line-height: 1.6; }
.command-card .command-note { margin-bottom: 0 !important; font-size: 12px !important; }
.details-section { padding-block: 44px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 70px; align-items: start; }
.transcript { border-block: 1px solid var(--line); }
.transcript summary { cursor: pointer; padding: 18px 4px; font-size: 14px; font-weight: 600; }
.transcript > div { padding: 4px 4px 17px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.sources { padding-top: 18px; }
.sources h3 { font-size: 14px; letter-spacing: 0; }
.sources ul { padding: 0; margin: 15px 0 0; list-style: none; }
.sources li + li { margin-top: 9px; }
.sources a { font-size: 12px; color: var(--muted); text-decoration: none; }
.sources a:hover { color: var(--accent); text-decoration: underline; }
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding-block: 45px 70px; border-top: 1px solid var(--line); }
.about-section h2 { max-width: 430px; font-size: 34px; }
.about-section > p { align-self: center; color: var(--muted); font-size: 14px; line-height: 1.85; margin: 0; }
.site-footer { padding-block: 25px 30px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

/* Shared showroom and project-page elements. */
nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.lab-intro { padding-block: 66px 42px; }
.lab-intro h1 { max-width: 950px; font-size: clamp(40px, 4.4vw, 58px); }
.lab-description { max-width: 835px; margin-top: 24px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.lab-intro-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 23px; }
.lab-intro + .hero { padding-top: 49px; border-top: 1px solid var(--line); }
.walkthrough-title { font-size: clamp(36px, 3.7vw, 50px); }
.roadmap-section { padding-block: 42px 68px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-card { padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.topic-card h3 { font-size: 20px; line-height: 1.3; }
.topic-card > p:not(.availability) { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.topic-card .text-link { margin-top: 18px; font-size: 12px; }
.availability { margin: 0 0 13px; color: var(--accent); font-size: 11px; line-height: 1.6; font-weight: 600; letter-spacing: .035em; }

/* Homepage: previews lead to complete project pages. */
.showroom-hero { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 90px; padding-block: 83px 92px; }
.showroom-hero h1 { font-size: clamp(45px, 5.1vw, 72px); }
.studio-line { margin: 24px 0 0; color: var(--accent); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; font-size: 15px; line-height: 1.8; letter-spacing: .07em; }
.showroom-description { max-width: 620px; margin: 26px 0 0; font-size: 18px; line-height: 1.8; color: var(--muted); }
.start-card { padding: 30px; border: 1px solid #cfd9cf; border-radius: 16px; background: #e9eee7; }
.start-card .eyebrow { margin-bottom: 17px; font-size: 11px; }
.start-card h2 { font-size: 29px; line-height: 1.2; letter-spacing: -.035em; }
.start-checks { margin: 24px 0 21px; border-top: 1px solid #cdd8cc; }
.start-checks > div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding-block: 11px; border-bottom: 1px solid #cdd8cc; }
.start-checks dt { font-size: 12px; color: #53675f; }
.start-checks dd { margin: 0; font-size: 12px; color: #284f43; }
.start-card > p:not(.eyebrow) { margin-bottom: 17px; color: #617067; font-size: 12px; line-height: 1.8; }
.start-card .text-link { font-size: 12px; }
.projects-section { padding-top: 6px; }
.projects-section .section-intro { margin-bottom: 32px; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.project-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #d2d9d1; border-radius: var(--radius); background: var(--white); text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease; }
.project-card:hover { border-color: #7f9b8c; box-shadow: 0 10px 30px #17252e0b; }
.project-card:hover h3 { color: var(--accent); }
.project-visual { border-bottom: 1px solid #d5ddd3; }
.project-visual svg { display: block; width: 100%; height: auto; font-family: "DM Sans", system-ui, sans-serif; }
.visual-infrastructure { background: #e3ebe3; }
.visual-practice { background: #eee6da; border-bottom-color: #dfd6c9; }
.visual-community { background: var(--night); border-bottom-color: #29424a; }
.visual-workshops { background: #e4ebed; border-bottom-color: #d3dee1; }
.project-copy { display: flex; flex-direction: column; flex-grow: 1; padding: 27px 30px 28px; }
.project-copy h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; font-size: 27px; line-height: 1.2; }
.project-copy h3 > span { flex-shrink: 0; color: var(--accent); font-size: 22px; font-weight: 400; }
.project-copy > p:not(.availability) { margin: 17px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.project-action { display: flex; align-items: center; gap: 11px; margin-top: auto; padding-top: 21px; color: var(--accent); font-size: 12px; font-weight: 600; }
.showroom-about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 78px; padding-block: 49px 67px; border-top: 1px solid var(--line); }
.showroom-about h2 { max-width: 420px; font-size: 37px; }
.showroom-about > div > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.showroom-about .about-detail { margin-top: 16px !important; font-size: 12px !important; }

@media (max-width: 1080px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 32px; padding-block: 65px 75px; }
  h1 { font-size: 45px; }
  .hero-actions { gap: 15px; }
  nav { gap: 18px; }
  .question-card { padding: 20px; }
  .input-grid label { padding: 12px; gap: 8px; }
  .guide-grid, .about-section { gap: 45px; }
  .showroom-hero { gap: 48px; padding-block: 66px 77px; }
  .showroom-hero h1 { font-size: 60px; }
  .showroom-description { font-size: 16px; }
  .start-card { padding: 25px; }
  .start-card h2 { font-size: 27px; }
  .project-copy { padding: 24px; }
  .project-copy h3 { font-size: 24px; }
  .showroom-about { gap: 45px; }
}

@media (max-width: 780px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 23px; gap: 16px; }
  nav { gap: 18px; }
  nav a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 35px; padding-block: 45px 55px; }
  h1 { font-size: clamp(41px, 8.5vw, 61px); }
  .hero-description { max-width: 560px; font-size: 16px; }
  .context-note { max-width: 570px; }
  .video-card { max-width: 650px; width: 100%; }
  .section-intro { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 27px; }
  .section-intro > p { max-width: 540px; }
  .example-section, .quiz-section { padding-block: 55px; }
  .interactive-card { padding: 18px; }
  .interactive-controls { align-items: flex-start; flex-direction: column; gap: 16px; }
  .question-grid { grid-template-columns: 1fr; gap: 15px; }
  .question-card { padding: 23px; }
  .question-card legend { margin-bottom: 9px; }
  .quiz-controls { align-items: flex-start; flex-direction: column; gap: 14px; }
  .guide-grid, .about-section, .details-section { grid-template-columns: 1fr; gap: 30px; }
  .guide-section { padding-block: 55px; }
  .details-section { padding-block: 35px 45px; }
  .sources { padding-top: 0; }
  .about-section { padding-block: 37px 50px; }
  .about-section h2 { font-size: 32px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 9px; }
  .lab-intro { padding-block: 43px 32px; }
  .lab-description { font-size: 16px; }
  .lab-intro + .hero { padding-top: 36px; }
  .walkthrough-title { font-size: clamp(36px, 6vw, 46px); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .roadmap-section { padding-block: 15px 49px; }
  .showroom-hero { grid-template-columns: 1fr; gap: 33px; padding-block: 46px 57px; }
  .showroom-hero h1 { font-size: clamp(43px, 8.2vw, 62px); }
  .showroom-description { max-width: 580px; font-size: 16px; }
  .start-card { max-width: 600px; width: 100%; }
  .start-card h2 br { display: none; }
  .project-grid { gap: 20px; }
  .project-copy { padding: 21px; }
  .project-copy h3 { font-size: 21px; gap: 13px; }
  .project-copy > p:not(.availability) { font-size: 13px; }
  .project-copy .availability { font-size: 10px; }
  .showroom-about { grid-template-columns: 1fr; gap: 23px; margin-top: 51px; padding-block: 36px 45px; }
  .showroom-about h2 { font-size: 32px; }
}

@media (max-width: 620px) {
  .project-grid, .topic-grid { grid-template-columns: 1fr; }
  .project-copy { padding: 25px; }
  .project-copy h3 { font-size: 25px; }
  .project-copy > p:not(.availability) { font-size: 14px; }
  .project-copy .availability { font-size: 11px; }
  .project-card { max-width: 560px; width: 100%; }
}

@media (max-width: 450px) {
  .wrap { width: calc(100% - 32px); }
  nav { column-gap: 16px; row-gap: 9px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 13px; }
  .hero .eyebrow { font-size: 11px; }
  .input-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .input-grid label { padding: 12px; }
  .input-grid input { font-size: 22px; }
  .interactive-card { padding: 13px; }
  .control-buttons { gap: 9px; }
  .control-buttons .button { padding-inline: 14px; font-size: 12px; }
  #collective-visual { height: 290px; }
  .video-card figcaption { align-items: flex-start; font-size: 10px; padding-inline: 3px; }
  .command-card { padding: 23px; }
  .command-card pre { margin-inline: -10px; padding: 15px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
