@font-face {
  font-family: "Noto Sans SC";
  src: local("Noto Sans SC"), url("assets/fonts/NotoSansSC-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #fffdf5;
  --ink: #000000;
  --muted: #2d2d2d;
  --subtle: #636b7d;
  --white: #ffffff;
  --blue: #74b9ff;
  --yellow: #ffd23f;
  --green: #88d498;
  --red: #ff6b6b;
  --lavender: #f5f0fc;
  --blue-soft: #ebf5ff;
  --yellow-soft: #fff7d6;
  --green-soft: #edfaf0;
  --panel: #f4f6fa;
  --demo-blue: #2e47b8;
  --line-soft: #c7ccd9;
  --border: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --max: 1248px;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  width: min(calc(100% - 40px), var(--max));
  margin: 48px auto 0;
  transition: transform .2s ease;
}
.site-header.is-scrolled { transform: translateY(-6px); }
.nav-shell {
  height: 62px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 5px;
  background: var(--white);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.nav-brand {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 46px;
  border: var(--border);
  border-radius: 999px;
  background: var(--blue);
  font: 500 14px/22px var(--sans);
  text-decoration: none;
}
.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 10px;
  margin-left: 72px;
}
.nav-links a {
  padding: 12px 24px;
  border: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { border-color: var(--ink); background: var(--white); }
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 13px;
  border: 2px solid var(--ink);
  background: var(--white);
  font: 500 14px/22px var(--sans);
}
main section[id] { scroll-margin-top: 120px; }

.case-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px 96px 96px;
  display: flex;
  flex-direction: column;
  gap: 144px;
  overflow: hidden;
}

.case-section { width: 1248px; }
.hero-section {
  height: 1108px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.eyebrow,
.card-kicker {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .3px;
}
.eyebrow { height: 18px; font-size: 14px; line-height: 18px; }
.card-kicker { height: 18px; font-size: 12px; line-height: 18px; }
.hero-section h1 {
  height: 84px;
  margin: 0;
  font-size: 64px;
  font-weight: 900;
  line-height: 84px;
  letter-spacing: -1px;
}
.hero-lead {
  height: 32px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 32px;
  white-space: nowrap;
}
.tag-row { height: 34px; display: flex; gap: 8px; align-items: stretch; }
.tag {
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.bg-blue { background: var(--blue); }
.bg-yellow { background: var(--yellow); }
.bg-green { background: var(--green); }
.bg-red { background: var(--red); }

.section-heading {
  width: 1248px;
  height: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section-heading h2 {
  height: 56px;
  margin: 0;
  font-size: 40px;
  font-weight: 900;
  line-height: 56px;
  letter-spacing: -.5px;
}

/* Interactive prototype */
.prototype-viewport { width: 1248px; height: 780px; overflow: visible; }
.memory-demo {
  width: 1248px;
  height: 780px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transform-origin: top left;
}
.neo-panel,
.demo-panel {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.demo-header {
  width: 1212px;
  height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.demo-brand,
.demo-actions { display: flex; align-items: center; }
.demo-brand { gap: 10px; }
.demo-brand strong { font-size: 17px; line-height: 25px; }
.demo-brand > span:last-child { color: var(--subtle); font-size: 14px; line-height: 20px; }
.demo-logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}
.demo-actions { gap: 8px; }
.mcp-status {
  width: 132px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #2e753d;
  background: #e5f7e8;
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
}
.demo-actions button {
  width: 112px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  background: var(--demo-blue);
  font-size: 12px;
  font-weight: 700;
}
.demo-tabs {
  width: 1212px;
  height: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.demo-tab {
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  text-align: left;
}
.demo-tab b { font: 700 16px/23px var(--mono); }
.demo-tab strong { font-size: 18px; line-height: 26px; }
.demo-tab span {
  width: 68px;
  height: 24px;
  display: none;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}
.demo-tab.is-active span { display: grid; }
.demo-tab.is-active.state-blue { background: var(--blue); }
.demo-tab.is-active.state-yellow { background: var(--yellow); }
.demo-tab.is-active.state-green { background: var(--green); }
.demo-states,
.demo-state { width: 1212px; height: 608px; }
.demo-state { display: grid; gap: 12px; }
.state-sort { grid-template-columns: 188px 660px 340px; }
.state-read { grid-template-columns: 760px 440px; }
.state-review { grid-template-columns: 210px 650px 328px; }
.demo-panel { height: 608px; padding: 16px; overflow: hidden; }
.demo-kicker { margin: 0; color: var(--subtle); font: 700 11px/16px var(--mono); }
.scope-panel { display: flex; flex-direction: column; gap: 10px; }
.scope-item {
  width: 156px;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid transparent;
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.scope-item b { font: 700 11px/16px var(--mono); }
.scope-item.selected { border-color: var(--ink); background: var(--blue); font-weight: 700; }
.scope-panel hr { width: 156px; height: 1px; margin: 0; border: 0; background: #d1d4d6; }
.current-project { width: 156px; height: 58px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; background: #f6f7fb; }
.current-project strong { font-size: 13px; line-height: 20px; }
.current-project span { color: var(--subtle); font-size: 11px; line-height: 17px; }
.mini-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tags span,
.soft-chip,
.chip,
.selected-memory footer span,
.opening-memory footer span,
.review-options span {
  min-height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f6f7fb;
  font-size: 11px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
}
.library-panel { display: flex; flex-direction: column; gap: 10px; }
.library-tools { height: 38px; display: flex; align-items: center; gap: 8px; }
.search-box { width: 288px; height: 38px; padding-left: 12px; display: flex; align-items: center; border: 1.5px solid var(--line-soft); border-radius: 7px; color: var(--subtle); background: #f6f7fb; font-size: 12px; }
.view-switch { height: 32px; display: flex; align-items: center; justify-content: space-between; }
.view-switch > div { display: flex; gap: 6px; }
.view-switch button { width: 88px; height: 32px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--white); font-size: 12px; font-weight: 700; }
.view-switch button.active { color: var(--white); background: var(--ink); }
.view-switch > span { color: var(--subtle); font-size: 11px; line-height: 17px; }
.memory-entry {
  width: 628px;
  height: 138px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1.5px solid var(--line-soft);
  border-radius: 8px;
}
.memory-entry > div { height: 24px; display: flex; align-items: center; justify-content: space-between; }
.memory-entry strong { font-size: 14px; line-height: 21px; }
.memory-entry > div b { color: var(--subtle); font: 700 10px/15px var(--mono); }
.memory-entry p { width: 604px; margin: 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.memory-entry footer { height: 24px; display: flex; gap: 6px; }
.chip.blue, .blue { background: var(--blue); }
.chip.yellow, .yellow { background: var(--yellow); }
.chip.green, .green { background: var(--green); }
.lavender { background: #e8e0fa; }
.preview-panel { display: flex; flex-direction: column; gap: 12px; }
.preview-title { height: 30px; display: flex; align-items: center; justify-content: space-between; }
.preview-title strong { font-size: 15px; line-height: 23px; }
.preview-title span { min-width: 82px; height: 24px; padding: 0 9px; display: grid; place-items: center; border-radius: 12px; background: #e8e0fa; font-size: 11px; }
.preview-panel > p { margin: 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.selected-memory { width: 308px; height: 168px; padding: 14px; display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--demo-blue); border-radius: 8px; background: #f0f5ff; }
.selected-memory > b { color: var(--demo-blue); font: 700 11px/16px var(--mono); }
.selected-memory > strong { font-size: 16px; line-height: 24px; }
.selected-memory p { margin: 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.selected-memory footer { display: flex; gap: 6px; }
.reason-box { width: 308px; height: 144px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f6f7fb; }
.reason-box b { color: var(--subtle); font: 700 11px/16px var(--mono); }
.reason-box span { font-size: 12px; line-height: 18px; }
.demo-next { width: 100%; height: 44px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); color: var(--white); font-size: 13px; font-weight: 700; cursor: pointer; }
.blue-button { background: var(--demo-blue); }
.dark-button { background: var(--ink); }
.green-button { color: var(--ink); background: var(--green); }

.search-workspace { display: flex; flex-direction: column; gap: 10px; }
.query-box { width: 728px; height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border: 1.5px solid var(--ink); border-radius: 8px; background: #f6f7fb; }
.query-box strong { font-size: 14px; line-height: 21px; }
.query-box span { width: 60px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--white); font: 700 9px/13px var(--mono); }
.filter-row { height: 24px; display: flex; gap: 6px; }
.result-summary { height: 42px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; background: var(--yellow-soft); }
.result-summary strong { font-size: 13px; line-height: 20px; }
.result-summary span { color: var(--subtle); font-size: 11px; line-height: 17px; }
.search-result { width: 728px; height: 126px; padding: 12px; border: 1.5px solid var(--line-soft); border-radius: 8px; }
.search-result header { height: 24px; display: flex; align-items: center; justify-content: space-between; }
.search-result header strong { font-size: 14px; line-height: 21px; }
.search-result header span { min-height: 24px; padding: 0 9px; display: grid; place-items: center; border-radius: 12px; font-size: 11px; font-weight: 500; }
.search-result p { margin: 10px 0 4px; color: var(--subtle); font-size: 12px; line-height: 18px; }
.search-result > b { color: var(--subtle); font: 700 10px/15px var(--mono); }
.read-panel { display: flex; flex-direction: column; gap: 10px; }
.read-title { height: 32px; display: flex; align-items: center; justify-content: space-between; }
.read-title strong { font-size: 16px; line-height: 24px; }
.budget { height: 78px; padding: 10px 12px; background: #f6f7fb; }
.budget b { float: left; font-size: 12px; line-height: 18px; }
.budget strong { float: right; color: var(--demo-blue); font: 700 11px/16px var(--mono); }
.budget > span { clear: both; width: 100%; height: 8px; margin-top: 12px; display: block; border-radius: 4px; background: #d8dce8; }
.budget i { width: 72%; height: 8px; display: block; border-radius: 4px; background: var(--demo-blue); }
.opening-memory { height: 176px; padding: 12px; display: flex; flex-direction: column; gap: 7px; border: 1.5px solid var(--demo-blue); border-radius: 8px; background: #f0f5ff; }
.opening-memory > b { color: var(--demo-blue); font: 700 11px/16px var(--mono); }
.opening-memory > strong { font-size: 14px; line-height: 21px; }
.opening-memory p { margin: 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.opening-memory footer { display: flex; gap: 6px; }
.follow-search { height: 126px; padding: 12px; display: flex; flex-direction: column; gap: 7px; border: 1.5px solid var(--green); border-radius: 8px; background: var(--green-soft); }
.follow-search > b { color: #2e753d; font: 700 11px/16px var(--mono); }
.follow-search p { margin: 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.follow-search code { padding: 7px 9px; color: var(--demo-blue); background: var(--white); font: 700 10px/15px var(--mono); }

.inbox-panel { padding-inline: 14px; display: flex; flex-direction: column; gap: 10px; }
.inbox-panel h3 { margin: 0 0 4px; font-size: 18px; line-height: 27px; }
.inbox-item { width: 182px; height: 76px; padding: 10px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--white); text-align: left; }
.inbox-item.selected { border: 2px solid var(--demo-blue); background: #f0f5ff; }
.inbox-item span { display: flex; justify-content: space-between; color: var(--subtle); font: 700 9px/13px var(--mono); }
.inbox-item strong { font-size: 12px; line-height: 18px; }
.review-content { display: flex; flex-direction: column; gap: 10px; }
.review-heading { height: 44px; display: flex; justify-content: space-between; }
.review-heading h3 { margin: 0; font-size: 16px; line-height: 24px; }
.review-heading p { margin: 1px 0 0; color: var(--subtle); font-size: 10px; line-height: 15px; }
.review-item { width: 618px; height: 142px; padding: 12px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; border: 1.5px solid var(--line-soft); border-radius: 8px; }
.checkbox { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 4px; font-size: 12px; font-weight: 700; }
.review-item.selected .checkbox { color: var(--white); background: var(--demo-blue); }
.review-item header { display: flex; justify-content: space-between; align-items: center; }
.review-item header strong { font-size: 14px; line-height: 21px; }
.review-item p { margin: 8px 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.review-item footer { display: flex; gap: 6px; }
.review-options { display: flex; gap: 8px; font-size: 11px; }
.summary-panel { display: flex; flex-direction: column; gap: 12px; }
.summary-panel > h3 { height: 24px; margin: 0; font-size: 16px; line-height: 24px; }
.metric-row { height: 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric-row div { display: grid; place-items: center; border: 1.5px solid var(--ink); }
.metric-row strong { font-size: 18px; line-height: 27px; }
.metric-row span { font-size: 12px; font-weight: 700; }
.rules-box { height: 178px; padding: 12px; display: flex; flex-direction: column; gap: 9px; background: #f6f7fb; }
.rules-box b { color: var(--subtle); font: 700 11px/16px var(--mono); }
.rules-box span { font-size: 12px; line-height: 18px; }
.after-box { height: 104px; padding: 12px; border: 1.5px solid var(--green); border-radius: 8px; background: var(--green-soft); }
.after-box b { color: #2e753d; font: 700 11px/16px var(--mono); }
.after-box p { margin: 8px 0 0; color: var(--subtle); font-size: 12px; line-height: 18px; }
.secondary-button { width: 100%; height: 38px; border: 1.5px solid var(--ink); background: var(--white); font-size: 12px; font-weight: 700; }

/* Evidence */
.evidence-section { height: 1026px; display: flex; flex-direction: column; gap: 48px; }
.evidence-grid { display: grid; grid-template-columns: repeat(2, 612px); grid-template-rows: repeat(2, 420px); gap: 48px 24px; }
.evidence-card {
  width: 612px;
  height: 420px;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.evidence-blue { background: var(--blue-soft); }
.evidence-yellow { background: var(--yellow-soft); }
.evidence-green { background: var(--green-soft); }
.evidence-lavender { background: var(--lavender); }
.evidence-card figcaption {
  width: max-content;
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 1px solid #d1d4d6;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}
.evidence-card img { width: 572px; height: 336px; border: 2px solid #0d0d0d; border-radius: 8px; object-fit: cover; object-position: center; }
.evidence-card img.crop-left { object-position: left top; }
.evidence-card img.crop-top { object-position: center 14%; }

/* Public records */
.public-notes { height: 843px; display: flex; flex-direction: column; gap: 48px; }
.note-grid { height: 705px; display: grid; grid-template-columns: repeat(3, 400px); gap: 24px; }
.note-card {
  width: 400px;
  height: 676px;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.note-card img { width: 360px; height: 450px; flex: 0 0 450px; border: 3px solid var(--ink); object-fit: cover; }
.note-card .card-kicker { margin-top: 20px; }
.note-card h3 { height: 34px; margin: 20px 0 0; font-size: 24px; font-weight: 900; line-height: 34px; white-space: nowrap; }
.note-meta { height: 20px; margin: 20px 0 0; color: #6f6f6f; font-size: 13px; line-height: 20px; }
.note-card a { margin-top: auto; align-self: flex-end; font: 500 13px/17px var(--mono); }

/* Product reasoning sections */
.compact-section { height: 334px; display: flex; flex-direction: column; gap: 48px; }
.info-grid { height: 196px; display: grid; gap: 24px; }
.three-columns { grid-template-columns: repeat(3, 400px); }
.two-columns { grid-template-columns: repeat(2, 612px); }
.info-card {
  height: 196px;
  padding: 32px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
}
.info-card h3 { margin: 16px 0; font-size: 24px; font-weight: 900; line-height: 34px; }
.info-card p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 24px; }
.iteration-card h3 { font-size: 22px; line-height: 32px; }

/* Footer */
.case-links {
  width: 1248px;
  height: 206px;
  padding: 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--blue);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.case-links h2 { height: 52px; margin: 0; font-size: 38px; font-weight: 900; line-height: 52px; letter-spacing: -.5px; }
.case-links p { height: 18px; margin: 0; display: flex; gap: 16px; font: 700 13px/18px var(--mono); letter-spacing: .3px; }

@media (max-width: 1199px) {
  .case-page {
    max-width: none;
    padding: 40px clamp(20px, 5vw, 72px) 72px;
    gap: 104px;
  }
  .case-section,
  .section-heading,
  .case-links,
  .prototype-viewport { width: 100%; }
  .hero-section,
  .evidence-section,
  .public-notes,
  .compact-section { height: auto; }
  .hero-lead { height: auto; white-space: normal; }
  .prototype-viewport { position: relative; }
  .evidence-grid { width: 100%; height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 32px 20px; }
  .evidence-card { width: 100%; height: auto; aspect-ratio: 612 / 420; }
  .evidence-card img { width: 100%; height: auto; flex: 1; min-height: 0; }
  .note-grid { width: 100%; height: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .note-card { width: 100%; height: auto; min-height: 620px; }
  .note-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; flex-basis: auto; }
  .note-card h3 { height: auto; white-space: normal; }
  .info-grid { width: 100%; height: auto; }
  .three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-card { height: auto; min-height: 196px; }
}

/* Mobile prototype: show one readable workflow at a time instead of shrinking the desktop canvas. */
@media (max-width: 960px) {
  .prototype-viewport {
    width: 100%;
    height: auto !important;
    overflow: visible;
  }
  .memory-demo {
    width: 100%;
    height: auto;
    padding: 12px;
    gap: 10px;
    box-shadow: 5px 5px 0 var(--ink);
    transform: none !important;
  }
  .demo-header,
  .demo-tabs,
  .demo-states,
  .demo-state {
    width: 100%;
    height: auto;
  }
  .demo-header {
    min-height: 52px;
    padding: 9px 10px;
  }
  .demo-brand { min-width: 0; gap: 8px; }
  .demo-brand strong { font-size: 15px; line-height: 22px; white-space: nowrap; }
  .demo-brand > span:last-child,
  .mcp-status { display: none; }
  .demo-actions button {
    width: auto;
    min-width: 92px;
    padding: 0 10px;
    white-space: nowrap;
  }
  .demo-tabs { gap: 6px; }
  .demo-tab {
    min-width: 0;
    height: 72px;
    padding: 9px 7px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .demo-tab b {
    font-size: 11px;
    line-height: 16px;
  }
  .demo-tab strong {
    font-size: 13px;
    line-height: 19px;
    white-space: nowrap;
  }
  .demo-tab span {
    position: absolute;
    top: 7px;
    right: 6px;
    width: max-content;
    height: 18px;
    padding: 0 7px;
    border-radius: 9px;
    font-size: 9px;
    line-height: 13px;
  }
  .demo-state {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .demo-panel {
    width: 100%;
    height: auto;
    padding: 14px;
    overflow: visible;
    box-shadow: 3px 3px 0 var(--ink);
  }

  /* 01 分类整理 */
  .scope-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .scope-panel > .demo-kicker,
  .scope-panel > hr,
  .scope-panel > .current-project,
  .scope-panel > .mini-tags { grid-column: 1 / -1; }
  .scope-item,
  .scope-panel hr,
  .current-project { width: 100%; }
  .current-project { height: auto; min-height: 56px; }
  .library-panel { gap: 12px; }
  .library-tools {
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-box {
    grid-column: 1 / -1;
    width: 100%;
  }
  .soft-chip { width: 100%; }
  .view-switch {
    height: auto;
    align-items: flex-start;
    gap: 10px;
  }
  .view-switch > div {
    min-width: 0;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .view-switch button { width: 100%; min-width: 0; font-size: 11px; }
  .view-switch > span { padding-top: 7px; white-space: nowrap; }
  .memory-entry {
    width: 100%;
    height: auto;
    min-height: 126px;
  }
  .memory-entry > div { height: auto; gap: 8px; }
  .memory-entry p { width: auto; }
  .memory-entry footer { height: auto; flex-wrap: wrap; }
  .preview-title { height: auto; gap: 10px; }
  .selected-memory,
  .reason-box {
    width: 100%;
    height: auto;
  }
  .selected-memory footer { flex-wrap: wrap; }

  /* 02 按需读取 */
  .search-workspace,
  .read-panel { gap: 12px; }
  .query-box,
  .search-result { width: 100%; }
  .filter-row {
    height: auto;
    display: flex;
    flex-wrap: wrap;
  }
  .result-summary {
    height: auto;
    min-height: 64px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
  }
  .search-result {
    height: auto;
    min-height: 126px;
  }
  .search-result header { height: auto; gap: 8px; }
  .search-result header strong { min-width: 0; }
  .search-result header span { flex: 0 0 auto; }
  .read-title { height: auto; }
  .budget,
  .opening-memory,
  .follow-search { height: auto; min-height: 0; }
  .opening-memory footer { flex-wrap: wrap; }
  .follow-search code { overflow-wrap: anywhere; }

  /* 03 确认更新 */
  .inbox-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .inbox-panel > .demo-kicker,
  .inbox-panel > h3 { grid-column: 1 / -1; }
  .inbox-panel h3 { margin-bottom: 2px; }
  .inbox-item {
    width: 100%;
    height: auto;
    min-height: 76px;
  }
  .review-content,
  .summary-panel { gap: 12px; }
  .review-heading {
    height: auto;
    flex-direction: column;
    gap: 8px;
  }
  .review-heading > span { align-self: flex-start; }
  .review-item {
    width: 100%;
    height: auto;
    min-height: 142px;
  }
  .review-item header { align-items: flex-start; gap: 8px; }
  .review-item header strong { min-width: 0; }
  .review-item header span { flex: 0 0 auto; }
  .review-item footer,
  .review-options { flex-wrap: wrap; }
  .summary-panel > h3,
  .metric-row,
  .rules-box,
  .after-box { height: auto; }
  .metric-row { min-height: 80px; }

  .demo-state p,
  .demo-state strong,
  .demo-state span,
  .demo-state b { overflow-wrap: anywhere; }
}

@media (max-width: 820px) {
  .site-header { width: calc(100% - 28px); top: 10px; margin-top: 18px; }
  .nav-shell { border-radius: 24px; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; margin-left: 0; padding: 12px; background: var(--white); border: var(--border); box-shadow: var(--shadow); }
  .nav-links.open { display: grid; grid-template-columns: 1fr; }
  .nav-links a { text-align: center; }
  .case-page { padding: 24px 20px 48px; gap: 88px; }
  .hero-section { gap: 28px; }
  .hero-section h1 { height: auto; font-size: clamp(44px, 13vw, 64px); line-height: 1.22; }
  .hero-lead { font-size: 16px; line-height: 28px; }
  .tag-row { height: auto; flex-wrap: wrap; }
  .section-heading { height: auto; }
  .section-heading h2 { height: auto; font-size: clamp(30px, 8.5vw, 40px); line-height: 1.35; }
  .evidence-grid,
  .note-grid,
  .three-columns,
  .two-columns { grid-template-columns: 1fr; }
  .evidence-card { aspect-ratio: 612 / 420; padding: 14px; gap: 10px; }
  .evidence-card figcaption { height: 28px; font-size: 11px; }
  .note-card { min-height: 0; }
  .note-card h3 { font-size: 22px; line-height: 32px; }
  .info-card { min-height: 196px; padding: 28px; }
  .case-links { height: auto; min-height: 206px; padding: 36px 28px; }
  .case-links h2 { height: auto; font-size: 30px; line-height: 42px; }
  .case-links p { height: auto; flex-wrap: wrap; gap: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
