:root {
  --ink: #121117;
  --ink-soft: #24222b;
  --paper: #fbfbf8;
  --surface: #ffffff;
  --line: #e5e3df;
  --muted: #74727a;
  --lime: #c8ff34;
  --lime-soft: #efffc7;
  --teal: #0e6676;
  --teal-soft: #e8f7f5;
  --danger: #a6303e;
  --danger-soft: #fff0f1;
  --shadow: 0 20px 60px rgba(18, 17, 23, .1);
  --radius: 22px;
  --max: 1220px;
  font-family: Inter, Aptos, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.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; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; padding: 12px 18px; background: var(--lime); color: var(--ink); border-radius: 8px; font-weight: 800; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; }

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 70px);
  background: rgba(251, 251, 248, .94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); position: relative; flex: 0 0 auto; }
.brand-mark::before { content: ""; position: absolute; width: 20px; height: 11px; left: 11px; top: 10px; border: 2px solid var(--lime); border-radius: 50%; transform: rotate(-4deg); }
.brand-mark i { position: absolute; width: 2px; height: 11px; background: var(--lime); top: 22px; left: 20px; border-radius: 2px; }
.brand-copy { display: grid; line-height: 1.05; letter-spacing: .11em; font-size: 13px; }
.brand-copy img { width: 92px; height: 29px; object-fit: contain; object-position: left center; }
.brand-copy small { letter-spacing: .03em; color: var(--muted); font-size: 10px; margin-top: 4px; }
.brand-divider { height: 25px; width: 1px; background: var(--line); margin-left: 7px; }
.partner { font-size: 12px; color: var(--muted); font-weight: 650; }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.nav-link { border: 0; background: none; text-decoration: none; font-weight: 650; color: var(--muted); cursor: pointer; padding: 12px 0; position: relative; }
.nav-link.active, .nav-link:hover, .nav-link:focus-visible { color: var(--ink); }
.nav-link.active::after { content: ""; height: 2px; background: var(--ink); position: absolute; left: 0; right: 0; bottom: 3px; }
.favorites-link span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; background: var(--ink); color: white; border-radius: 20px; font-size: 11px; margin-left: 4px; }
.favorites-link.active { color: #8a1742; }
.favorites-link.active span { background: #8a1742; }
.admin-link { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; background: white; font-size: 13px; font-weight: 750; transition: transform .2s, border-color .2s; }
.admin-link:hover { transform: translateY(-1px); border-color: #bbb8b2; }

.hero { min-height: 440px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); align-items: center; background: var(--ink); color: white; padding: 58px max(5vw, calc((100vw - var(--max)) / 2)); overflow: hidden; }
.hero-content { position: relative; z-index: 2; padding-left: 8px; }
.eyebrow { color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .18em; margin: 0 0 18px; }
.eyebrow.dark { color: var(--teal); }
.hero h1 { font-size: clamp(54px, 6vw, 88px); line-height: .88; letter-spacing: -.055em; margin: 0; max-width: 680px; }
.hero h1 em { display: inline-block; font-family: Georgia, "Times New Roman", serif; color: var(--lime); font-weight: 500; letter-spacing: -.06em; margin-top: 12px; }
.hero-copy { max-width: 480px; color: #d4d1dc; font-size: 18px; line-height: 1.6; margin: 28px 0 0; }
.hero-art { height: 330px; position: relative; margin-right: -30px; }
.hero-art svg { position: absolute; width: 620px; max-width: 110%; height: auto; top: 20px; left: 0; z-index: 2; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.orbit-one { width: 380px; height: 380px; right: -20px; top: -170px; }
.orbit-two { width: 230px; height: 230px; right: 52px; top: -95px; }

.catalog-shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 80px 0 100px; scroll-margin-top: 78px; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.catalog-heading h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1; letter-spacing: -.045em; margin: 0 0 12px; }
.catalog-heading p:not(.eyebrow) { color: var(--muted); margin: 0; }
.updated { color: var(--muted); font-size: 13px; padding-bottom: 4px; }
.search-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(18,17,23,.05); padding: 20px; }
.search-box { min-height: 64px; border: 1.5px solid #d6d4ce; border-radius: 16px; display: flex; align-items: center; padding: 0 18px; gap: 14px; transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200,255,52,.24); }
.search-icon { width: 19px; height: 19px; border: 2px solid var(--ink); border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ""; width: 8px; height: 2px; background: var(--ink); position: absolute; right: -6px; bottom: -3px; transform: rotate(45deg); border-radius: 2px; }
.search-box input { border: 0; outline: 0; min-width: 0; flex: 1; background: transparent; font-size: 17px; color: var(--ink); }
.search-box input::placeholder { color: #9a979d; }
.search-box kbd { border: 1px solid var(--line); background: #f6f5f1; border-radius: 7px; padding: 5px 8px; color: var(--muted); font-size: 11px; }
.filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding-top: 16px; }
.filter-row > span { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin: 0 5px; }
.filter-chip { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 13px; cursor: pointer; font-size: 13px; font-weight: 650; }
.filter-chip:hover { border-color: #b5b2ab; }
.filter-chip.active { border-color: var(--ink); background: var(--ink); color: white; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }
.results-toolbar p { color: var(--muted); font-size: 14px; margin: 0; }
.text-button { border: 0; background: transparent; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.shape-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.shape-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; position: relative; transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.shape-card:hover { transform: translateY(-5px); border-color: #d0cdc7; box-shadow: var(--shadow); }
.shape-preview { display: block; width: 100%; border: 0; padding: 0; background: #f7f8f5; cursor: pointer; }
.shape-preview img { display: block; width: 100%; height: auto; aspect-ratio: 360/190; object-fit: cover; }
.favorite-button { position: absolute; right: 14px; top: 14px; z-index: 3; width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(18,17,23,.1); background: rgba(255,255,255,.9); box-shadow: 0 4px 18px rgba(0,0,0,.08); cursor: pointer; font-size: 20px; }
.favorite-button.active { color: #a10f49; background: #fff4f8; }
.shape-card-body { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 20px 14px; }
.model-label, .caliber-badge small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .14em; display: block; }
.shape-card h3 { font-size: 18px; letter-spacing: -.02em; margin: 5px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 235px; }
.caliber-badge { min-width: 58px; height: 58px; border-radius: 15px; background: var(--lime-soft); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 18px; font-weight: 850; }
.caliber-badge small { color: #5d6c2d; font-size: 8px; }
.shape-card-footer { min-height: 50px; border-top: 1px solid var(--line); margin: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.detail-link { border: 0; background: none; cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 750; }
.detail-link span { display: inline-block; margin-left: 4px; }
.download-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: white; display: grid; place-items: center; text-decoration: none; font-size: 19px; }
.download-icon:hover { background: var(--teal); }
.demo-badge { font-size: 9px; letter-spacing: .12em; color: var(--muted); }

.skeleton { height: 342px; padding: 18px; pointer-events: none; }
.skeleton div, .skeleton span { display: block; background: linear-gradient(90deg, #efeeea 25%, #f8f8f5 50%, #efeeea 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
.skeleton div { height: 190px; }
.skeleton span { height: 20px; width: 65%; margin-top: 24px; }
.skeleton span:last-child { width: 40%; margin-top: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { border: 1px dashed #c9c6bf; border-radius: var(--radius); min-height: 340px; display: grid; place-items: center; align-content: center; text-align: center; padding: 40px; }
.empty-state h3 { font-size: 24px; margin: 15px 0 5px; }
.empty-state p { color: var(--muted); margin: 0 0 22px; }
.empty-graphic { width: 72px; height: 40px; border: 3px solid var(--muted); border-radius: 50%; transform: rotate(-8deg); position: relative; opacity: .65; }
.empty-graphic::after { content: ""; position: absolute; width: 72px; height: 40px; border: 3px solid var(--muted); border-radius: 50%; left: 82px; top: 10px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 44px; }
.pagination button { border: 1px solid var(--line); background: white; min-width: 40px; height: 40px; border-radius: 11px; cursor: pointer; }
.pagination button.active { background: var(--ink); color: white; border-color: var(--ink); }
.pagination button:disabled { opacity: .35; cursor: default; }
.error-panel { grid-column: 1 / -1; min-height: 240px; border: 1px solid #f2b9bf; background: var(--danger-soft); border-radius: var(--radius); display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 40px; }
.error-panel span { color: var(--danger); }

.primary-button, .secondary-button { min-height: 46px; border-radius: 12px; padding: 0 20px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: white; }
.primary-button:hover { background: var(--teal); border-color: var(--teal); }
.secondary-button { border: 1px solid var(--line); background: white; }

footer { border-top: 1px solid var(--line); min-height: 140px; display: flex; align-items: center; gap: 28px; justify-content: space-between; padding: 0 max(5vw, calc((100vw - var(--max)) / 2)); color: var(--muted); font-size: 13px; }
.footer-brand { display: grid; color: var(--ink); letter-spacing: .1em; font-size: 12px; }
.footer-brand img { width: 112px; height: 36px; object-fit: contain; object-position: left center; }
.footer-brand span { color: var(--muted); letter-spacing: .03em; font-size: 10px; }
footer a { font-weight: 700; }

.shape-dialog { width: min(900px, calc(100% - 28px)); max-height: calc(100vh - 40px); border: 0; border-radius: 25px; padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,.3); overflow: auto; }
.shape-dialog::backdrop { background: rgba(10,9,14,.72); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 15px; top: 15px; z-index: 2; width: 42px; height: 42px; border: 1px solid var(--line); background: white; border-radius: 50%; cursor: pointer; font-size: 26px; line-height: 1; }
.dialog-preview { background: #f7f8f5; }
.dialog-preview img { display: block; width: 100%; max-height: 380px; object-fit: contain; }
.dialog-body { padding: 32px; }
.dialog-body h2 { margin: 0 0 24px; font-size: 38px; letter-spacing: -.04em; }
.dialog-body dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.dialog-body dl div { background: #f5f4f0; border-radius: 14px; padding: 14px; min-width: 0; }
.dialog-body dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dialog-body dd { margin: 5px 0 0; font-weight: 750; overflow: hidden; text-overflow: ellipsis; }
.dialog-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.demo-note { color: var(--muted); font-size: 13px; align-self: center; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--ink); color: white; padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 980px) {
  .site-header { height: 72px; }
  .brand-divider, .partner { display: none; }
  .site-header nav { gap: 16px; }
  .nav-link { font-size: 13px; }
  .hero { grid-template-columns: 1fr; min-height: 650px; padding-top: 70px; }
  .hero-art { height: 270px; margin: 20px 0 -40px; }
  .hero-art svg { top: 0; left: 50%; transform: translateX(-50%); }
  .shape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-header { padding: 0 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-mark::before { left: 9px; top: 9px; }
  .brand-mark i { left: 18px; top: 21px; }
  .brand-copy b { font-size: 11px; }
  .site-header .nav-link.active, .favorites-link { display: none; }
  .admin-link { padding: 9px 12px; font-size: 12px; }
  .hero { min-height: 610px; padding: 58px 24px 0; overflow: hidden; }
  .hero h1 { font-size: clamp(47px, 14vw, 70px); }
  .hero-copy { font-size: 16px; line-height: 1.5; }
  .hero-art { width: 650px; left: 50%; transform: translateX(-50%); }
  .catalog-shell { width: min(100% - 28px, var(--max)); padding: 60px 0 74px; }
  .catalog-heading { align-items: start; }
  .updated { display: none; }
  .search-panel { padding: 12px; }
  .search-box { min-height: 58px; padding: 0 14px; }
  .search-box kbd { display: none; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-chip { white-space: nowrap; }
  .shape-grid { grid-template-columns: 1fr; }
  .shape-card h3 { max-width: 215px; }
  .dialog-body { padding: 24px 20px; }
  .dialog-body h2 { font-size: 30px; }
  .dialog-body dl { grid-template-columns: 1fr; }
  .dialog-actions { display: grid; }
  footer { padding: 35px 22px; flex-direction: column; align-items: start; gap: 12px; }
  footer p { margin: 0; }
}

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