:root {
  --paper: #f7f6ef;
  --surface: #fffefa;
  --surface-soft: #efefe7;
  --ink: #10181d;
  --text: #253035;
  --muted: #68736f;
  --blue: #173f5f;
  --green: #4d725e;
  --red: #8f3e35;
  --gold: #a87d3e;
  --line: rgba(16, 24, 29, 0.14);
  --line-strong: rgba(16, 24, 29, 0.28);
  --shadow: 0 22px 70px rgba(16, 24, 29, 0.08);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(247, 246, 239, 0) 360px),
    linear-gradient(90deg, rgba(16, 24, 29, 0.026) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 96px 96px, auto;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 239, 0.9);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wordmark span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.wordmark strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.15;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.admin-entry,
.lang-button,
.admin-close {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
}

.site-nav a:hover,
.admin-entry:hover,
.lang-button:hover,
.admin-close:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.64);
}

.language-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  background: rgba(255, 255, 255, 0.62);
}

.lang-button {
  min-height: 30px;
  padding: 0 10px;
}

.lang-button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.admin-entry {
  color: var(--muted);
}

.hero {
  padding: clamp(72px, 9vw, 116px) clamp(20px, 4vw, 48px) clamp(72px, 8vw, 104px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: clamp(38px, 6vw, 84px);
  width: min(var(--max), 100%);
  margin: 0 auto;
  align-items: start;
}

.overline,
.section-label,
.aside-kicker,
.platform-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 840px;
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 5.35vw, 4.75rem);
  font-weight: 400;
  line-height: 1.02;
}

html[lang="zh-CN"] .hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 4.7vw, 4.25rem);
  line-height: 1.08;
}

.hero-title-zh {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--red);
  font-size: clamp(1.15rem, 1.6vw, 1.48rem);
  font-weight: 760;
  line-height: 1.45;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: clamp(1.02rem, 1.15vw, 1.14rem);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.platform-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 850;
}

.primary-action,
.platform-link {
  background: var(--ink);
  color: var(--paper);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover,
.platform-link:hover {
  transform: translateY(-1px);
}

.hero-aside {
  margin-top: 8px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding: 18px 0 22px;
}

.hero-aside dl {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
}

.hero-aside div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
}

.hero-aside dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-aside dd {
  margin: 0;
  color: var(--text);
  line-height: 1.58;
}

.statement-band,
.research-band,
.platform-band,
.notes-band {
  padding: clamp(68px, 8vw, 96px) clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.statement-band,
.platform-band {
  background: rgba(255, 255, 255, 0.5);
}

.statement-layout,
.research-head,
.platform-head,
.research-lines,
.platform-list,
.notes-layout {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.section-label {
  width: min(var(--max), 100%);
  margin: 0 auto 24px;
  color: var(--red);
}

.statement-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.78fr);
  gap: clamp(32px, 5vw, 72px);
}

.statement-layout h2,
.research-head h2,
.platform-head h2,
.notes-layout h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.25vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
}

html[lang="zh-CN"] .statement-layout h2,
html[lang="zh-CN"] .research-head h2,
html[lang="zh-CN"] .platform-head h2,
html[lang="zh-CN"] .notes-layout h2 {
  font-size: clamp(2rem, 2.9vw, 3rem);
  line-height: 1.18;
}

.statement-copy {
  display: grid;
  gap: 16px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.78;
}

.statement-copy p,
.research-head p,
.platform-head p,
.research-lines p,
.platform-main p,
.notes-list p {
  margin: 0;
}

.research-head,
.platform-head {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.74fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}

.research-head p,
.platform-head p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.74;
}

.research-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.research-lines article {
  min-height: 236px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-lines span,
.notes-list span,
.platform-index {
  color: var(--red);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 850;
}

.research-lines h3 {
  margin: 38px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  font-weight: 400;
  line-height: 1.12;
}

.research-lines p {
  color: var(--muted);
  line-height: 1.68;
}

.resource-search {
  display: grid;
  gap: 10px;
}

.resource-search span,
.json-editor-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.resource-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

.resource-search input:focus,
.admin-login input:focus,
.json-editor:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 63, 95, 0.14);
}

.platform-list {
  display: grid;
  margin-top: 38px;
  border-top: 1px solid var(--line-strong);
}

.platform-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 164px;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.platform-main h3 {
  margin: 7px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1.12;
}

html[lang="zh-CN"] .platform-main h3 {
  font-size: clamp(1.45rem, 2vw, 2.05rem);
}

.platform-main p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.68;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.platform-tags span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.empty-state {
  margin: 36px 0 0;
  color: var(--muted);
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
}

.notes-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.notes-list li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.notes-list p {
  color: var(--text);
  line-height: 1.68;
}

.site-footer {
  padding: 42px clamp(20px, 4vw, 48px) 28px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-grid,
.footer-bottom {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.9fr;
  gap: clamp(22px, 4vw, 54px);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.footer-grid section {
  min-width: 0;
}

.footer-label {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
}

.site-footer p {
  margin: 0 0 8px;
  line-height: 1.62;
}

.site-footer a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(16, 24, 29, 0.24);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
}

.footer-bottom p {
  margin: 0;
}

.footer-brand {
  color: var(--ink);
  font-weight: 850;
}

.admin-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 24, 29, 0.42);
  backdrop-filter: blur(10px);
}

.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100vw);
  height: 100vh;
  padding: 22px;
  border-left: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 239, 231, 0.78)),
    var(--paper);
  transform: translateX(104%);
  transition: transform 180ms ease;
  overflow: hidden;
}

.admin-panel.is-open {
  transform: translateX(0);
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.admin-header h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  font-weight: 400;
}

.admin-login,
.admin-workspace {
  display: grid;
  gap: 14px;
}

.admin-login {
  max-width: 520px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.72);
  box-shadow: var(--shadow);
}

.admin-login label,
.admin-form label,
.json-editor-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-workspace {
  min-height: 0;
  flex: 1;
}

.admin-shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 0;
  height: calc(100vh - 126px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(23, 63, 95, 0.18), rgba(16, 24, 29, 0) 220px),
    var(--ink);
}

.admin-tab {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  background: transparent;
  color: rgba(247, 246, 239, 0.74);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: left;
}

.admin-tab:hover,
.admin-tab.is-active {
  border-color: rgba(247, 246, 239, 0.24);
  background: rgba(247, 246, 239, 0.1);
  color: var(--paper);
}

.admin-main {
  min-width: 0;
  overflow: auto;
  padding: clamp(18px, 2.2vw, 30px);
}

.admin-pane {
  display: none;
}

.admin-pane.is-active {
  display: grid;
  gap: 20px;
}

.admin-pane-head {
  display: grid;
  gap: 8px;
  max-width: 780px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-pane-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
  font-weight: 400;
  line-height: 1.08;
}

.admin-pane-head p:not(.overline) {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-metrics div,
.admin-module-grid button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.8);
}

.admin-metrics div {
  min-height: 118px;
  padding: 16px;
}

.admin-metrics span,
.admin-list span,
.admin-module-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.48;
}

.admin-metrics strong {
  display: block;
  margin-top: 18px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-module-grid button {
  display: grid;
  gap: 10px;
  min-height: 134px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
}

.admin-module-grid button:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.admin-module-grid strong,
.admin-list strong {
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.28;
}

.admin-editor-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.58);
}

.admin-list button {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 66px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.admin-list button:hover,
.admin-list button.is-active {
  border-color: var(--line-strong);
  background: var(--surface);
}

.admin-list button.is-active {
  box-shadow: inset 3px 0 0 var(--red);
}

.admin-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-login input,
.admin-form input,
.admin-form textarea {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.admin-form textarea {
  min-height: 96px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

.admin-login input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.json-editor:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(16, 24, 29, 0.08);
}

.login-message,
.admin-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.danger-lite {
  border-color: rgba(143, 62, 53, 0.4);
  color: var(--red);
}

.json-editor {
  width: 100%;
  min-height: 52vh;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  outline: none;
  resize: vertical;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  transform: translate(-50%, 140%);
  transition: transform 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero-grid,
  .statement-layout,
  .research-head,
  .platform-head,
  .notes-layout {
    grid-template-columns: 1fr;
  }

  .research-lines {
    grid-template-columns: 1fr;
  }

  .platform-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .platform-link {
    grid-column: 2;
    justify-self: start;
  }

  .admin-panel {
    padding: 16px;
  }

  .admin-shell,
  .admin-editor-layout {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    height: calc(100vh - 116px);
  }

  .admin-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .admin-tab {
    min-height: 38px;
    padding: 0 9px;
    text-align: center;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    position: relative;
    align-items: flex-start;
  }

  .wordmark strong {
    font-size: 1rem;
  }

  .site-nav a {
    display: none;
  }

  .hero {
    padding-top: 54px;
  }

  .hero h1,
  html[lang="zh-CN"] .hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.45rem);
    line-height: 1.08;
  }

  .hero-aside div,
  .notes-list li {
    grid-template-columns: 1fr;
  }

  .platform-row {
    gap: 14px;
  }

  .site-footer {
    padding-bottom: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .admin-header {
    align-items: flex-start;
  }

  .admin-header h2 {
    font-size: 1.65rem;
  }

  .admin-login {
    max-width: none;
    padding: 18px;
  }

  .admin-main {
    padding: 16px;
  }

  .admin-metrics,
  .admin-module-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics div,
  .admin-module-grid button {
    min-height: auto;
  }

  .admin-metrics strong {
    margin-top: 8px;
    font-size: 1.85rem;
  }
}

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