.model-gallery-page { background: #fff; }
.model-gallery-embedded { scroll-margin-top: 100px; }
.model-gallery-embedded .model-collection { border-bottom: 1px solid var(--line); }
.model-gallery-page [hidden] { display: none !important; }
.model-gallery-page button, .model-gallery-page input { font: inherit; }
.model-intro { padding: 48px 0 34px; border-bottom: 1px solid var(--line); }
.model-intro h1 { max-width: 900px; font-size: 44px; line-height: 1.14; margin: 12px 0 20px; }
.model-intro-bottom { display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.model-intro-bottom p { max-width: 760px; margin: 0; }
.model-intro-bottom .btn { flex-shrink: 0; }
.model-collection { padding: 28px 0 64px; }
.model-tools { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.model-filters { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.model-filters button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 14px; border: 1px solid #d8dfdd; background: #fff; color: #354444; font-size: 14px; font-weight: 650; cursor: pointer; border-radius: 4px; }
.model-filters button span { font-size: 12px; font-weight: 400; opacity: .75; }
.model-filters button:hover { background: #f0f4f3; }
.model-filters button[aria-pressed=true] { background: var(--green); color: #fff; border-color: var(--green); }
.model-search { display: flex; align-items: center; gap: 10px; width: min(100%, 420px); padding: 0 12px; border: 1px solid #cfd7d5; border-radius: 4px; }
.model-search > svg { width: 18px; height: 18px; flex-shrink: 0; color: #5b6d6b; }
.model-search input { min-width: 0; width: 100%; height: 44px; border: 0; outline: 0; background: transparent; font-size: 14px; }
.model-search:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.model-search button { background: transparent; border: 0; padding: 6px; width: 32px; height: 32px; cursor: pointer; }
.model-search button svg { width: 18px; height: 18px; }
.model-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.model-context { display: flex; justify-content: space-between; gap: 32px; align-items: flex-end; padding: 28px 0 24px; }
.model-context h2 { font-family: inherit; font-size: 23px; line-height: 1.3; margin: 0 0 8px; }
.model-context p { margin: 0; font-size: 14px; max-width: 800px; line-height: 1.65; }
.model-context .model-count { flex-shrink: 0; font-size: 13px; color: #536764; }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.model-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e2e6e3; border-radius: 4px; overflow: hidden; background: #fff; }
.model-photo { display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; padding: 0; margin: 0; border: 0; background: #f0f1ee; cursor: zoom-in; overflow: hidden; }
.model-photo img { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.model-photo:hover img { opacity: .93; }
.model-code { position: absolute; left: 12px; bottom: 12px; background: #fff; color: #283b38; padding: 5px 9px; font-size: 11px; font-weight: 700; border: 1px solid #e3e7e3; }
.model-expand { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; display: grid; place-items: center; background: #fff; color: #253e3b; border: 1px solid #e3e7e3; }
.model-expand svg { width: 16px; height: 16px; }
.model-info { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.model-category { color: var(--green); font-size: 11px; font-weight: 750; text-transform: uppercase; margin: 0 0 9px; }
.model-info h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.35; }
.model-info h3 button { text-align: left; color: inherit; font-weight: inherit; border: 0; padding: 0; background: transparent; cursor: pointer; }
.model-info h3 button:hover { color: var(--green); }
.model-description { font-size: 14px; line-height: 1.7; margin: 0 0 16px; }
.model-tags { display: flex; flex-wrap: wrap; list-style: none; gap: 6px 12px; padding: 0; margin: 0 0 20px; }
.model-tags li { font-size: 11px; color: #60706a; border-bottom: 1px solid #d8e1db; padding-bottom: 3px; }
.model-quote { display: flex; align-items: center; gap: 8px; color: var(--green-dark); padding-top: 14px; margin-top: auto; border-top: 1px solid #e3e8e4; font-size: 13px; font-weight: 700; text-decoration: none; min-height: 44px; }
.model-quote svg { width: 17px; height: 17px; flex-shrink: 0; }
.model-quote svg:last-child { margin-left: auto; }
.model-more { display: flex; justify-content: center; padding: 36px 0 0; }
.model-reference-note { margin: 32px 0 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 900px; font-size: 12px; line-height: 1.8; }
.model-empty { text-align: center; padding: 56px 16px; }
.model-empty > svg { width: 36px; height: 36px; color: #71827a; }
.model-empty h3 { margin: 16px 0 24px; font-size: 20px; }
.model-dialog { padding: 0; border: 0; width: min(1180px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); border-radius: 6px; color: var(--ink); background: #fff; overflow: hidden; }
.model-dialog::backdrop { background: rgb(14 20 18 / 80%); }
.model-dialog-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); min-height: min(720px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); overflow: auto; }
.model-viewer { position: relative; background: #eff0ed; display: flex; justify-content: center; align-items: center; min-width: 0; padding: 20px 20px 64px; }
.model-viewer > img { display: block; width: 100%; height: min(650px, calc(100dvh - 132px)); object-fit: contain; }
.model-viewer-controls { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; white-space: nowrap; padding: 4px; background: #fff; border: 1px solid #dbe1db; }
.model-viewer-controls span { font-size: 13px; min-width: 52px; text-align: center; color: #3f5049; }
.model-icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: #fff; color: #253b33; cursor: pointer; border-radius: 3px; flex-shrink: 0; }
.model-icon-button svg { width: 22px; height: 22px; }
.model-icon-button:hover { background: #e6eee8; }
.model-icon-button:disabled { opacity: .35; cursor: default; }
.model-dialog-close { position: absolute; right: 12px; top: 12px; z-index: 2; border: 1px solid #dbe1db; }
.model-detail { padding: 60px 32px 28px; align-self: center; min-width: 0; }
.model-detail .eyebrow { font-size: 11px; margin-bottom: 10px; }
.model-detail-code { color: #78827b; font-size: 12px; margin: 0 0 12px; }
.model-detail h2 { font-size: 29px; line-height: 1.18; margin: 0 0 20px; }
.model-detail > p:not(.eyebrow):not(.model-detail-code) { font-size: 14px; line-height: 1.8; }
.model-detail .model-tags { margin-top: 18px; }
.model-material { border-top: 1px solid #dfe6e0; padding-top: 20px; margin: 24px 0; }
.model-material h3 { margin: 0 0 8px; font-size: 14px; }
.model-material p { font-size: 13px; line-height: 1.7; margin: 0 0 8px; }
.model-detail > .btn { width: 100%; min-height: 48px; justify-content: center; white-space: normal; text-align: center; }
.model-detail-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 20px; }
.model-detail-links a, .model-detail-links button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: #385448; font-size: 12px; padding: 0; border: 0; background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.model-detail-links svg { width: 15px; height: 15px; }
.model-detail .model-copy-status { min-height: 24px; margin: 8px 0 0; font-size: 12px !important; color: #365d44; overflow-wrap: anywhere; }
.model-gallery-page button:focus-visible, .model-gallery-page a:focus-visible { outline: 3px solid #a1722e; outline-offset: 3px; }
@media (max-width: 1000px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-dialog-layout { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); }
  .model-detail { padding: 60px 24px 24px; }
  .model-detail h2 { font-size: 25px; }
  .model-intro h1 { font-size: 36px; }
}
@media (max-width: 700px) {
  .model-intro { padding: 30px 0 24px; }
  .model-intro h1 { font-size: 31px; }
  .model-intro-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .model-intro-bottom p { font-size: 14px; }
  .model-intro-bottom .btn { display: none; }
  .model-filters { gap: 7px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 10px; }
  .model-filters button { padding: 8px 10px; font-size: 12px; gap: 6px; flex-shrink: 0; }
  .model-tools { gap: 18px; }
  .model-search { width: 100%; }
  .model-context { flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 0 20px; }
  .model-context h2 { font-size: 21px; }
  .model-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .model-dialog-layout { display: block; min-height: 0; max-height: calc(100dvh - 20px); }
  .model-viewer { padding: 12px 12px 64px; }
  .model-viewer > img { height: min(54dvh, 540px); }
  .model-detail { padding: 24px; }
  .model-detail h2 { font-size: 27px; }
  .model-dialog-close { right: 8px; top: 8px; }
}
@media (max-width: 600px) {
  .model-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .model-photo { aspect-ratio: 4 / 5; }
  .model-info { padding: 20px; }
  .model-intro h1 { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { .model-photo img { transition: none; } }
