body.model-wall-body, body.model-page-body {
  --ink: #352921;
  --muted: #786c60;
  --line: rgba(77,57,45,.16);
  --warm: #b58a54;
  --card: rgba(255,251,243,.82);
  background-color: #f5efe4;
  background-image: linear-gradient(rgba(184,203,210,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(184,203,210,.13) 1px, transparent 1px);
  background-size: 32px 32px;
}
body.model-wall-body .nav, body.model-page-body .nav { background: rgba(245,239,228,.9); border-bottom-color: rgba(77,57,45,.14); }
.models-hero {
  padding: 92px 0 86px;
  background: radial-gradient(circle at 85% 5%, rgba(157,183,194,.26), transparent 34%), radial-gradient(circle at 5% 20%, rgba(181,138,84,.13), transparent 28%);
  border-bottom: 1px solid rgba(77,57,45,.1);
}
.model-wall-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; align-items: center; }
.model-wall-hero-copy { min-width: 0; }
.models-hero h1 { max-width: 860px; font-size: clamp(40px, 6vw, 68px); }
.models-hero .lead { max-width: 760px; }
.wall-board { position: relative; overflow: hidden; padding: 26px; border-radius: 28px; color: var(--ink); background: linear-gradient(145deg, rgba(251,248,241,.94) 0%, rgba(226,232,230,.94) 100%); border: 1px solid rgba(77,57,45,.16); box-shadow: 0 24px 54px rgba(77,57,45,.12); }
.wall-board::after { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; bottom: -90px; border: 1px solid rgba(111,133,139,.32); border-radius: 50%; box-shadow: 0 0 0 26px rgba(111,133,139,.09), 0 0 0 52px rgba(196,170,120,.08); }
.wall-board-top, .wall-board-foot, .wall-board-stats { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; }
.wall-board-top { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.wall-board-main { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 14px; margin: 38px 0 12px; }
.wall-board-main strong { color: var(--ink); font-size: 104px; line-height: .9; letter-spacing: -.08em; }
.wall-board-main span { max-width: 84px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wall-board-line { position: relative; z-index: 1; height: 1px; margin: 22px 0; background: linear-gradient(90deg, rgba(111,133,139,.55), rgba(111,133,139,0)); }
.wall-board-stats { justify-content: flex-start; }
.wall-board-stats div { display: grid; gap: 3px; min-width: 72px; }
.wall-board-stats strong { font-size: 20px; line-height: 1; }
.wall-board-stats span { color: var(--muted); font-size: 11px; }
.wall-board-foot { align-items: center; justify-content: flex-start; margin-top: 40px; color: var(--muted); font-size: 12px; }
.wall-board-foot i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(196,170,120,.18); }
.wall-section { padding-top: 78px; background: rgba(255,251,243,.52); border-bottom: 1px solid rgba(77,57,45,.08); }
.wall-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.wall-section-head .section-intro { margin-bottom: 0; }
.wall-section-index { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.wall-section-index i { width: 42px; height: 1px; background: var(--bluegray-deep); }
.wall-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; margin: 34px 0 24px; }
.wall-toolbar label { display: block; }
.wall-control-label { display: block; margin: 0 0 8px 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.wall-search { position: relative; }
.wall-toolbar input, .wall-toolbar select { width: 100%; min-height: 54px; padding: 0 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 15px; background: #fff; font: inherit; box-shadow: 0 8px 24px rgba(24,34,58,.04); }
.wall-search input { padding-left: 43px; }
.wall-search-icon { position: absolute; z-index: 1; left: 16px; bottom: 12px; color: var(--bluegray-deep); font-size: 23px; line-height: 1; transform: rotate(-20deg); }
.wall-toolbar input:focus, .wall-toolbar select:focus { outline: 3px solid rgba(111,133,139,.16); border-color: var(--bluegray-deep); }
.wall-count { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.model-card { position: relative; display: flex; flex-direction: column; min-height: 336px; padding: 26px; overflow: hidden; border: 1px solid rgba(77,57,45,.2); border-radius: 12px; background: var(--card); box-shadow: 0 12px 24px rgba(77,57,45,.07); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.model-card::after { content: attr(data-number); position: absolute; right: -10px; bottom: -31px; color: rgba(49,87,213,.045); font-size: 150px; font-weight: 900; line-height: 1; letter-spacing: -.12em; pointer-events: none; }
.model-card:hover { color: var(--ink); border-color: rgba(111,133,139,.55); box-shadow: 0 20px 48px rgba(77,57,45,.12); transform: translateY(-2px); }
.model-card-visual { display: block; width: calc(100% + 52px); height: 154px; margin: -26px -26px 23px; object-fit: cover; border-bottom: 1px solid rgba(77,57,45,.12); }
.model-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.model-number { color: var(--bluegray-deep); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.model-category { color: var(--muted); font-size: 12px; text-align: right; }
.model-card--warm .model-number { color: #b97721; }
.model-card--green .model-number { color: #21845a; }
.model-card-body { position: relative; z-index: 1; margin-top: 58px; }
.model-card h2, .model-card h3 { margin: 0 0 10px; font-size: 25px; line-height: 1.35; }
.model-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.model-card-map { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; padding-top: 17px; border-top: 1px solid var(--line); }
.model-card-map span { padding: 4px 8px; border: 1px solid rgba(181,138,84,.24); border-radius: 3px; color: var(--muted); background: rgba(255,251,243,.6); font-size: 11px; line-height: 1.4; }
.model-card-arrow { position: relative; z-index: 1; margin-top: auto; padding-top: 22px; color: var(--bluegray-deep); font-size: 14px; font-weight: 800; }
.model-card-arrow b { display: inline-block; margin-left: 4px; transition: transform .18s ease; }
.model-card:hover .model-card-arrow b { transform: translateX(4px); }
.empty-state { padding: 28px; border: 1px dashed #cbd3e6; border-radius: 18px; color: var(--muted); background: #fbfcff; }
.model-page { padding: 68px 0 96px; }
.model-detail { max-width: 800px; margin: 0 auto; }
.model-detail h1 { max-width: none; margin: 14px 0 16px; font-size: clamp(36px, 6vw, 62px); }
.model-detail .model-summary { max-width: 720px; margin: 0; color: var(--muted); font-size: 18px; }
.model-detail .model-source-note { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.model-detail .model-source-note span { padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.model-visual-hero { margin: 36px 0 0; overflow: hidden; border: 1px solid rgba(77,57,45,.15); border-radius: 24px; background: #f1e6d3; box-shadow: 0 18px 42px rgba(77,57,45,.09); }
.model-visual-hero img { display: block; width: 100%; height: auto; }
.model-sections { margin-top: 56px; }
.model-section { margin-top: 56px; padding: 0 0 44px; border: 0; border-bottom: 1px solid rgba(77,57,45,.2); border-radius: 0; background: transparent; }
.model-section h2 { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; color: #4d392d; font-size: clamp(26px, 4vw, 36px); }
.model-section h2::before { content: ""; width: 32px; height: 3px; flex: 0 0 auto; background: var(--warm); }
.model-section h3 { margin: 28px 0 10px; font-size: 19px; line-height: 1.45; }
.model-section h3:first-of-type { margin-top: 0; }
.model-section p { margin: 15px 0; }
.model-section ul, .model-section ol { padding-left: 24px; }
.model-section li { margin: 9px 0; }
.source-label { margin: 24px 0 8px !important; color: var(--bluegray-deep); font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.missing { padding: 12px 14px; border-left: 3px solid var(--warm); color: var(--muted); background: #fffaf1; }
.source-block { margin: 22px 0; padding: 17px 18px; border: 1px dashed rgba(181,138,84,.42); border-radius: 4px; background: rgba(255,251,243,.72); }
.source-block p:first-child { margin-top: 0; }
.source-block p:last-child { margin-bottom: 0; }
.model-example { margin: 22px 0; padding: 18px 20px; border-left: 4px solid var(--warm); border-radius: 0 4px 4px 0; background: rgba(255,251,243,.76); }
.model-output { margin: 22px 0 0; padding: 18px 20px; border: 1px solid rgba(181,138,84,.26); border-radius: 4px; background: rgba(255,251,243,.72); }
.model-output strong { display: block; margin-bottom: 8px; }
.model-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--bluegray-deep); font-weight: 700; }
.model-nav a:last-child { text-align: right; }
.model-disclaimer { margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.72); font-size: 14px; }
.model-section .table-wrap { margin: 20px 0; }
.model-section table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15px; line-height: 1.65; }
.model-section th, .model-section td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.model-section th { background: rgba(181,138,84,.12); font-weight: 800; }
.model-section tr:last-child td { border-bottom: 0; }
.model-section code { padding: 2px 5px; border-radius: 3px; background: rgba(181,138,84,.12); }
.model-section pre { padding: 15px; overflow-x: auto; border-radius: 4px; background: rgba(157,183,194,.14); font: inherit; font-size: 14px; line-height: 1.7; }
.model-section .mermaid-source { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .models-hero { padding: 58px 0 50px; }
  .models-hero h1 {
    max-width: none;
    font-size: clamp(34px, 10.5vw, 46px);
    line-height: 1.2;
  }
  .models-hero .lead { font-size: 16px; line-height: 1.82; }
  .models-hero .actions { flex-wrap: wrap; gap: 8px; }
  .models-hero .actions .button { flex: 1 1 140px; min-height: 46px; }
  .model-wall-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .wall-board { padding: 22px; border-radius: 22px; }
  .wall-board-main { margin-top: 30px; }
  .wall-board-main strong { font-size: 84px; }
  .wall-board-foot { margin-top: 30px; }
  .wall-section { padding-top: 48px; }
  .wall-section-head { display: block; }
  .wall-section-index { margin-top: 20px; padding-bottom: 0; }
  .wall-toolbar { grid-template-columns: 1fr; gap: 12px; margin-top: 25px; }
  .wall-grid { grid-template-columns: 1fr; }
  .model-card { min-height: 0; padding: 22px; border-radius: 20px; }
  .model-card-visual { width: calc(100% + 44px); height: 134px; margin: -22px -22px 21px; }
  .model-card-body { margin-top: 44px; }
  .model-card h2, .model-card h3 { font-size: 23px; }
  .model-page { padding: 42px 12px 68px; }
  .model-detail h1 {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.2;
  }
  .model-detail .model-summary { font-size: 17px; line-height: 1.8; }
  .model-detail .model-source-note { gap: 6px 8px; line-height: 1.6; }
  .model-visual-hero { margin-top: 28px; border-radius: 18px; }
  .model-section { margin-top: 38px; padding-bottom: 32px; border-radius: 0; }
  .model-section h2 { font-size: 26px; }
  .model-section h3 { font-size: 18px; }
  .model-section .table-wrap { margin: 20px 0; overflow: visible; }
  .model-section table { display: block; min-width: 0; font-size: 14px; }
  .model-section thead {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .model-section tbody,
  .model-section tr,
  .model-section td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .model-section tbody tr {
    margin: 0 0 12px;
    padding: 10px 13px 8px;
    border: 1px solid rgba(77,57,45,.15);
    border-radius: 12px;
    background: rgba(255,251,243,.68);
  }
  .model-section td {
    padding: 8px 0 9px;
    border: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .model-section td + td {
    padding-top: 10px;
    border-top: 1px dashed rgba(77,57,45,.14);
  }
  .model-section td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--warm);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
  }
  .model-section td:first-child { color: var(--ink); font-weight: 700; }
  .model-section tbody tr:last-child { margin-bottom: 0; }
  .model-nav { display: block; }
  .model-nav a { display: block; margin: 12px 0; }
  .model-nav a:last-child { text-align: left; }
}
