:root {
  --paper: #f7f5f1;
  --paper-light: #fcfbf8;
  --surface: #ffffff;
  --ink: #23201a;
  --ink-2: #6b655a;
  --ink-3: #9c958a;
  --seal: #722ed1;
  --seal-hover: #5f23b5;
  --seal-soft: rgba(114, 46, 209, 0.06);
  --line: #ddd8ce;
  --line-light: #eae6de;
  --success: #287a52;
  --warning: #a46012;
  --sans: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(35, 32, 26, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 32, 26, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.section-shell, .header-inner, .site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 241, 0.96);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 42px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.seal-mark, .tiny-seal {
  display: inline-grid;
  place-items: center;
  color: var(--seal);
  border: 1px solid var(--seal);
  font-family: var(--serif);
}
.seal-mark { width: 34px; height: 34px; font-size: 19px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: 0.08em; }
.brand-copy small, .kicker, .chapter-label, .sheet-top, .sheet-title small, .sheet-stats span,
.project-meta, .status-label, .detail-topline {
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.brand-copy small { color: var(--ink-3); font-size: 9px; letter-spacing: 0.18em; }
.main-nav { display: flex; align-items: center; gap: 28px; margin-right: auto; color: var(--ink-2); font-size: 13px; }
.main-nav a { padding: 22px 0 19px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--seal); border-color: var(--seal); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.back-link { color: var(--ink-2); font-size: 11px; }
.back-link:hover { color: var(--seal); }
.back-link span { margin-left: 4px; color: var(--seal); }
.primary-button, .secondary-button, .outline-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--seal);
  border-radius: 8px;
  padding: 0 17px;
  font-size: 12px;
  font-weight: 600;
}
.primary-button { color: var(--surface); background: var(--seal); }
.primary-button:hover { background: var(--seal-hover); border-color: var(--seal-hover); }
.primary-button.compact { min-height: 34px; padding: 0 12px; }
.secondary-button, .outline-button { color: var(--ink); background: transparent; border-color: var(--line); }
.secondary-button:hover, .outline-button:hover { color: var(--seal); border-color: var(--seal); }
.text-button, .text-link, .inverse-button { padding: 6px 0; border: 0; color: var(--ink-2); background: transparent; font-size: 12px; }
.text-button:hover, .text-link:hover { color: var(--seal); }
.menu-button, .mobile-nav { display: none; }

.hero {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 0.85fr) minmax(450px, 1.15fr);
  align-items: center;
  gap: 92px;
  padding-top: 84px;
  padding-bottom: 92px;
}
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 21px; color: var(--ink-3); font-size: 10px; }
.kicker span { color: var(--seal); font-family: var(--serif); font-size: 19px; letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: 0; }
h1 { max-width: 500px; margin-bottom: 23px; font-family: var(--serif); font-size: clamp(56px, 7vw, 88px); font-weight: 600; line-height: 0.98; }
h1 em, h2 em { color: var(--seal); font-style: normal; font-weight: 400; }
.hero-lead { max-width: 520px; margin-bottom: 16px; font-family: var(--serif); font-size: 24px; line-height: 1.5; }
.hero-body { max-width: 530px; margin-bottom: 30px; color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--ink-3); font-family: var(--mono); font-size: 10px; }
.tiny-seal { width: 21px; height: 21px; font-size: 12px; }

.catalog-sheet {
  position: relative;
  min-height: 378px;
  padding: 22px 26px 24px;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: 20px 20px 0 var(--seal);
}
.sheet-top { display: flex; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 9px; }
.sheet-title { display: flex; gap: 18px; padding: 32px 0 26px; }
.sheet-index { color: var(--seal); font-family: var(--serif); font-size: 38px; line-height: 1; }
.sheet-title div { display: grid; align-content: start; gap: 6px; }
.sheet-title small { color: var(--ink-3); font-size: 9px; }
.sheet-title strong { font-family: var(--serif); font-size: 31px; font-weight: 600; }
.sheet-title p { margin: 0; color: var(--ink-2); font-size: 12px; }
.sheet-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet-stats div { display: grid; gap: 5px; min-height: 86px; padding: 16px 12px 12px 0; border-right: 1px solid var(--line); }
.sheet-stats div:not(:first-child) { padding-left: 14px; }
.sheet-stats div:last-child { border-right: 0; }
.sheet-stats strong { font-family: var(--mono); font-size: 25px; font-weight: 500; }
.sheet-stats span { color: var(--ink-3); font-size: 9px; letter-spacing: 0; }
.sheet-rule { display: flex; align-items: center; gap: 6px; margin-top: 27px; }
.sheet-rule span { width: 7px; height: 7px; background: var(--seal); }
.sheet-rule span:nth-child(2) { background: var(--ink); }
.sheet-rule span:nth-child(3) { background: var(--ink-3); }
.sheet-rule i { flex: 1; height: 1px; background: var(--line); }
.sheet-note { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; color: var(--ink-3); font-size: 10px; }
.sheet-note strong { color: var(--ink-2); font-size: 11px; font-weight: 500; }
.sheet-seal { position: absolute; right: 22px; bottom: 8px; color: rgba(114, 46, 209, 0.12); font-family: var(--serif); font-size: 38px; }

.library-section, .method-section { border-top: 1px solid var(--line); }
.library-section { padding: 102px 0 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 45px; margin-bottom: 42px; }
.chapter-label { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--ink-3); font-size: 10px; }
.chapter-label span { color: var(--seal); font-family: var(--serif); font-size: 22px; letter-spacing: 0; }
.section-heading h2, .service-callout h2 { margin-bottom: 0; font-family: var(--serif); font-size: clamp(35px, 4.7vw, 58px); line-height: 1.1; font-weight: 600; }
.section-intro { max-width: 320px; margin-bottom: 5px; color: var(--ink-2); font-size: 13px; line-height: 1.8; }

.pool-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.pool-tab { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 72px; padding: 0 16px 0 0; border: 0; border-right: 1px solid var(--line); color: var(--ink-2); background: transparent; text-align: left; }
.pool-tab:first-child { padding-left: 0; }
.pool-tab:last-child { border-right: 0; }
.pool-tab span { color: var(--ink-3); font-family: var(--serif); font-size: 19px; }
.pool-tab strong { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.pool-tab small { color: var(--ink-3); font-family: var(--mono); font-size: 9px; }
.pool-tab:hover, .pool-tab.active { color: var(--seal); }
.pool-tab.active strong { color: var(--ink); }

.library-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 25px; padding: 28px 0 17px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; width: min(430px, 100%); align-items: center; gap: 10px; border-bottom: 1px solid var(--ink); }
.search-field > span { color: var(--seal); font-size: 22px; line-height: 1; }
.search-field input { width: 100%; padding: 11px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.filter-tabs { display: flex; flex-wrap: wrap; justify-content: end; gap: 18px; }
.filter-tab { padding: 8px 0; border: 0; border-bottom: 2px solid transparent; color: var(--ink-2); background: transparent; font-size: 11px; }
.filter-tab:hover, .filter-tab.active { color: var(--seal); border-color: var(--seal); }
.library-subtoolbar { display: flex; align-items: center; justify-content: space-between; min-height: 59px; color: var(--ink-3); font-family: var(--mono); font-size: 10px; }
.select-group { display: flex; gap: 15px; }
.select-field { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-family: var(--sans); font-size: 11px; }
.select-field select { padding: 7px 25px 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--paper-light); font-size: 11px; }

.project-list { border-top: 1px solid var(--ink); }
.project-row { display: grid; grid-template-columns: 38px 46px minmax(0, 1fr) 172px 145px; align-items: center; gap: 18px; min-height: 150px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: background 160ms ease, padding 160ms ease; }
.project-row:hover { padding-right: 10px; padding-left: 10px; background: var(--paper-light); }
.project-index { color: var(--seal); font-family: var(--serif); font-size: 18px; }
.project-avatar { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--paper-light); }
.project-name-line { display: flex; align-items: baseline; gap: 10px; }
.project-name-line h3 { margin-bottom: 6px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.project-name-line span { color: var(--ink-2); font-size: 11px; }
.project-identity p { max-width: 620px; margin-bottom: 10px; color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.project-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--ink-3); font-size: 9px; letter-spacing: 0; }
.project-verdict { display: grid; gap: 6px; align-content: center; padding-left: 18px; border-left: 1px solid var(--line); }
.status-label { color: var(--seal); font-size: 9px; letter-spacing: 0; }
.project-verdict strong { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.project-verdict small { color: var(--ink-3); font-size: 10px; }
.project-actions { display: grid; justify-items: start; gap: 12px; }
.project-actions .text-link { color: var(--seal); font-size: 11px; }
.outline-button { min-height: 32px; padding: 0 11px; border-radius: 6px; font-size: 10px; }
.empty-state { display: grid; justify-items: center; gap: 10px; padding: 70px 0; border-top: 1px solid var(--ink); color: var(--ink-2); }
.empty-state strong { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.empty-state span { font-size: 12px; }
.library-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; color: var(--ink-3); font-size: 11px; }
.library-foot .text-link { color: var(--seal); }

.method-section { padding: 94px 0 96px; background: var(--paper-light); }
.compact-heading { margin-bottom: 36px; }
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.method-grid article { min-height: 205px; padding: 22px 20px 18px 0; border-right: 1px solid var(--line); }
.method-grid article:not(:first-child) { padding-left: 20px; }
.method-grid article:last-child { border-right: 0; }
.method-grid article > span { color: var(--seal); font-family: var(--serif); font-size: 22px; }
.method-grid h3 { margin: 42px 0 10px; font-family: var(--serif); font-size: 19px; }
.method-grid p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.7; }

.service-section { padding: 100px 0 112px; }
.service-callout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 45px 80px; padding: 58px 64px 52px; color: var(--surface); background: var(--ink); }
.chapter-label.inverse { color: rgba(255,255,255,0.55); }
.chapter-label.inverse span { color: #bf95f1; }
.service-callout h2 { color: var(--surface); }
.service-callout h2 em { color: #bf95f1; }
.service-callout p:not(.chapter-label) { max-width: 440px; margin-top: 24px; color: rgba(255,255,255,0.66); font-size: 13px; line-height: 1.8; }
.service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: end; border-top: 1px solid rgba(255,255,255,0.25); }
.service-list div { display: grid; gap: 9px; min-height: 140px; padding: 17px 14px 11px 0; border-right: 1px solid rgba(255,255,255,0.18); }
.service-list div:not(:first-child) { padding-left: 14px; }
.service-list div:last-child { border-right: 0; }
.service-list span { color: #bf95f1; font-family: var(--mono); font-size: 10px; }
.service-list strong { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.service-list small { align-self: end; color: rgba(255,255,255,0.58); font-size: 10px; }
.service-actions { display: flex; align-items: center; gap: 24px; grid-column: 1 / -1; padding-top: 27px; border-top: 1px solid rgba(255,255,255,0.16); }
.primary-button.light { color: var(--ink); background: var(--surface); border-color: var(--surface); }
.primary-button.light:hover { color: var(--surface); background: var(--seal); border-color: var(--seal); }
.inverse-button { color: rgba(255,255,255,0.72); }
.inverse-button:hover { color: #bf95f1; }

.site-footer { padding: 30px 0 42px; border-top: 1px solid var(--line); }
.footer-main, .footer-meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-main p, .footer-meta { color: var(--ink-3); font-size: 10px; }
.footer-meta { margin-top: 30px; font-family: var(--mono); letter-spacing: 0; }

.modal-backdrop, .detail-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(35, 32, 26, 0.56); }
.modal, .detail-modal { position: relative; width: min(500px, 100%); padding: 38px; background: var(--paper); box-shadow: 0 18px 44px rgba(35, 32, 26, 0.18); }
.modal-close { position: absolute; top: 14px; right: 17px; padding: 2px 6px; border: 0; color: var(--ink-3); background: transparent; font-size: 25px; line-height: 1; }
.modal h2, .detail-modal h2 { margin-bottom: 13px; font-family: var(--serif); font-size: 37px; font-weight: 600; }
.modal > p:not(.kicker):not(.form-message) { color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.modal form { display: grid; gap: 15px; margin-top: 24px; }
.modal label { display: grid; gap: 7px; color: var(--ink-2); font-size: 10px; }
.modal input, .modal textarea { width: 100%; padding: 10px 0; resize: vertical; border: 0; border-bottom: 1px solid var(--line); outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.form-message { margin: 15px 0 0; color: var(--success); font-size: 12px; }
.detail-modal { width: min(720px, 100%); }
.detail-topline { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 9px; }
.detail-title { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 15px; margin: 28px 0 18px; }
.detail-title img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.detail-title span { color: var(--ink-2); font-size: 11px; }
.detail-title h2 { margin: 4px 0 0; }
.detail-title > strong { color: var(--seal); font-family: var(--serif); font-size: 15px; }
.detail-lead { max-width: 600px; color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; border-top: 1px solid var(--line); }
.detail-grid > div { display: grid; gap: 7px; padding: 17px 15px 17px 0; border-bottom: 1px solid var(--line); }
.detail-grid > div:nth-child(even) { padding-left: 15px; border-left: 1px solid var(--line); }
.detail-grid span, .detail-note > span { color: var(--ink-3); font-family: var(--mono); font-size: 9px; }
.detail-grid strong { font-size: 12px; font-weight: 500; line-height: 1.5; }
.detail-note { display: grid; gap: 8px; padding-top: 18px; }
.detail-note p { margin: 0; color: var(--warning); font-size: 12px; }
.detail-actions { display: flex; gap: 12px; margin-top: 26px; }

[hidden] { display: none !important; }

@media (max-width: 960px) {
  .header-inner, .section-shell, .site-footer { width: min(100% - 36px, 760px); }
  .main-nav { gap: 18px; }
  .hero { grid-template-columns: 1fr; gap: 60px; padding-top: 64px; }
  .catalog-sheet { width: min(680px, 100%); }
  .project-row { grid-template-columns: 30px 44px minmax(0, 1fr) 150px; }
  .project-actions { grid-column: 3 / -1; display: flex; gap: 18px; padding-top: 4px; }
  .service-callout { grid-template-columns: 1fr; gap: 42px; }
  .service-actions { grid-column: auto; }
}

@media (max-width: 640px) {
  .section-shell, .header-inner, .site-footer { width: min(100% - 30px, 540px); }
  .header-inner { min-height: 62px; gap: 14px; }
  .main-nav, .back-link { display: none; }
  .header-actions { margin-left: auto; }
  .menu-button { display: grid; width: 34px; height: 34px; place-content: center; gap: 5px; border: 1px solid var(--line); background: transparent; }
  .menu-button span { display: block; width: 14px; height: 1px; background: var(--ink); }
  .mobile-nav { display: none; padding: 10px 15px 16px; border-top: 1px solid var(--line); background: var(--paper); }
  .nav-open .mobile-nav { display: grid; }
  .mobile-nav a { padding: 11px 0; border-bottom: 1px solid var(--line-light); color: var(--ink-2); font-size: 13px; }
  .mobile-nav a:last-child { border-bottom: 0; }
  .hero { min-height: 0; padding: 56px 0 72px; }
  h1 { font-size: 57px; }
  .hero-lead { font-size: 20px; }
  .catalog-sheet { min-height: 350px; padding: 19px 16px 20px; box-shadow: 10px 10px 0 var(--seal); }
  .sheet-title { gap: 12px; padding: 25px 0 22px; }
  .sheet-title strong { font-size: 25px; }
  .sheet-stats div { min-height: 75px; }
  .pool-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pool-tab, .pool-tab:first-child { min-height: 64px; padding-left: 0; }
  .pool-tab:nth-child(2) { border-right: 0; }
  .pool-tab:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .pool-tab:nth-child(3) { border-right: 1px solid var(--line); }
  .library-toolbar { display: block; }
  .filter-tabs { justify-content: start; gap: 15px; margin-top: 20px; }
  .library-subtoolbar { align-items: flex-start; flex-direction: column; justify-content: center; gap: 11px; padding: 14px 0; }
  .select-group { flex-wrap: wrap; gap: 9px; }
  .project-row { grid-template-columns: 27px 42px minmax(0, 1fr); gap: 11px; min-height: 0; padding: 18px 0; }
  .project-index { align-self: start; padding-top: 8px; }
  .project-avatar { align-self: start; }
  .project-identity { min-width: 0; }
  .project-name-line { display: block; }
  .project-name-line h3 { margin-bottom: 4px; font-size: 17px; }
  .project-name-line span { font-size: 10px; }
  .project-identity p { margin-top: 9px; font-size: 11px; }
  .project-meta { gap: 8px; line-height: 1.6; }
  .project-verdict { grid-column: 3; padding: 12px 0 0; border-top: 1px solid var(--line-light); border-left: 0; }
  .project-actions { grid-column: 3; padding-top: 0; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .method-grid article { min-height: 190px; border-bottom: 1px solid var(--line); }
  .method-grid article:nth-child(2) { border-right: 0; }
  .method-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
  .method-grid article:not(:first-child) { padding-left: 14px; }
  .method-grid article:nth-child(odd) { padding-left: 0; }
  .library-foot, .footer-main, .footer-meta { align-items: flex-start; flex-direction: column; }
  .service-callout { padding: 35px 24px 28px; }
  .service-list { grid-template-columns: 1fr; }
  .service-list div, .service-list div:not(:first-child) { min-height: 91px; padding: 15px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
  .service-list div:last-child { border-bottom: 0; }
  .service-actions { align-items: stretch; flex-direction: column; }
  .service-actions .primary-button { width: 100%; }
  .modal, .detail-modal { padding: 29px 22px 24px; }
  .detail-title { grid-template-columns: 42px minmax(0, 1fr); }
  .detail-title img { width: 42px; height: 42px; }
  .detail-title > strong { grid-column: 2; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div, .detail-grid > div:nth-child(even) { padding: 14px 0; border-left: 0; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-actions .primary-button, .detail-actions .secondary-button { width: 100%; }
}

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