
.category-grid.category-with-gates { grid-template-columns:repeat(4,minmax(0,1fr)); }
.category-with-gates .category { min-width:0; }
.category-with-gates .category > span { min-width:0; }
.category-with-gates .category strong { overflow-wrap:anywhere; }
.gates-page { padding-bottom:clamp(48px,7vw,100px); }
.gates-page :is(h1,h2,h3) { overflow-wrap:anywhere; }
.gates-page [hidden] { display:none !important; }
.gates-page :is(a,button):focus-visible { outline:2px solid var(--red); outline-offset:3px; }
.gate-hero { display:grid; grid-template-columns:1fr 1.07fr; border:1px solid var(--line); border-radius:28px; overflow:hidden; background:var(--card,#fbf8f3); margin-top:18px; }
.gate-intro { padding:clamp(25px,4.35vw,64px); align-self:center; min-width:0; }
.gate-intro h1 { font-size:clamp(2.35rem,4.95vw,5.1rem); line-height:1.04; letter-spacing:-.061em; margin:.27em 0; }
.gate-intro p:not(.eyebrow) { max-width:42ch; color:var(--muted); }
.gate-intro .gate-origin { margin-top:21px; font-size:.86rem; font-weight:690; }
.gate-origin span { padding-inline:.25em; }
.gate-hero-photo { position:relative; margin:0; min-height:420px; min-width:0; }
.gate-hero-photo img { display:block; width:100%; height:100%; object-fit:cover; object-position:51% 52%; position:absolute; inset:0; }
.gate-hero-photo figcaption { position:absolute; inset:auto 14px 14px auto; color:#fff; background:#1b1819dc; padding:9px 13px; border-radius:12px; font-size:.82rem; max-width:calc(100% - 28px); }
.gate-hero-photo figcaption span { display:block; color:#f0e8e5; }
.gate-anchors { display:flex; flex-wrap:wrap; gap:7px; padding:14px 0; }
.gate-anchors a { display:inline-block; padding:7px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.52); font-weight:670; font-size:.9rem; }
.gate-anchors a:hover { color:var(--red); }
.gate-section { scroll-margin-top:clamp(132px,16vw,172px); }
.gate-section .section-head > p { align-self:end; }
.gate-model-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:13px; }
.gate-model-tabs button, .gate-view-switch button, .gate-zoom, .gate-close { font:inherit; border:1px solid var(--line); background:rgba(255,255,255,.78); color:inherit; cursor:pointer; }
.gate-model-tabs button { border-radius:15px; padding:12px clamp(8px,1.3vw,16px); text-align:left; line-height:1.28; min-height:64px; }
.gate-model-tabs button strong,.gate-model-tabs button span { display:block; }
.gate-model-tabs button span { font-size:.82rem; color:var(--muted); margin-top:4px; }
.gate-model-tabs button[aria-selected="true"] { border-color:#c78d95; background:#fbefed; color:var(--red); }
.gate-model { display:grid; grid-template-columns:minmax(0,1.82fr) minmax(0,1fr); gap:clamp(12px,2.1vw,25px); align-items:start; }
.gate-model:not([hidden]) { animation:gate-enter .32s ease-out both; }
@keyframes gate-enter { from{opacity:.52;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
.gate-studio, .gate-spec, .gate-work article, .gate-calculation, .gate-contact { background:var(--card,#fbf8f3); border:1px solid var(--line); border-radius:22px; min-width:0; }
.gate-studio { overflow:hidden; }
.gate-view-switch { display:flex; flex-wrap:wrap; gap:7px; padding:10px; }
.gate-view-switch button { font-size:.87rem; font-weight:680; padding:7px 11px; border-radius:10px; min-height:39px; }
.gate-view-switch button[aria-pressed="true"],.gate-close:hover,.gate-zoom:hover { color:var(--red); border-color:#ce9ca2; background:#fcf1ef; }
.gate-view { margin:0; overflow:hidden; min-width:0; }
.gate-view img { display:block; width:100%; height:auto; aspect-ratio:1.86; object-fit:contain; background:#fff; }
.gate-view figcaption { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:9px 12px; border-top:1px solid var(--line); font-size:.82rem; color:var(--muted); }
.gate-zoom { flex:none; padding:6px 9px; border-radius:9px; font-size:.79rem; }
.gate-spec { padding:clamp(18px,2.5vw,33px); }
.gate-spec h3, .gate-calculation h3, .gate-work h3 { font-size:clamp(1.25rem,2.4vw,1.85rem); line-height:1.15; margin:0 0 .45em; }
.gate-spec p,.gate-calculation p:not(.eyebrow),.gate-detail p:not(.eyebrow),.gate-work p,.gate-contact p:not(.eyebrow) { color:var(--muted); }
.gate-facts { margin:16px 0 0; display:grid; gap:0; font-size:.9rem; }
.gate-facts div { display:grid; grid-template-columns:1fr 1.19fr; gap:10px; padding:7px 0; border-top:1px solid var(--line); }
.gate-facts dt { color:var(--muted); }
.gate-facts dd { font-weight:710; margin:0; }
.gate-calculation { display:grid; grid-template-columns:1.2fr 1fr; gap:22px; align-items:center; padding:clamp(16px,2.7vw,36px); margin-top:15px; }
.gate-equation { display:grid; gap:4px; border-left:1px solid var(--line); padding-left:clamp(10px,2.3vw,30px); color:var(--muted); font-size:.9rem; }
.gate-equation strong { font-size:clamp(1.35rem,3.2vw,2.65rem); line-height:1.17; letter-spacing:-.04em; color:var(--red); }
.gate-equation strong span { display:inline-block; }
.gate-detail { display:grid; grid-template-columns:1.18fr 1fr; gap:clamp(18px,4vw,52px); align-items:center; }
.gate-detail-view { border:1px solid var(--line); border-radius:22px; background:var(--card,#fbf8f3); }
.gate-detail h2 { margin:0 0 .25em; }
.gate-detail p:not(.eyebrow)+p { margin-top:.7em; }
.gate-work { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.gate-work article { padding:clamp(15px,2vw,26px); }
.gate-projects { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.gate-project { display:grid; align-content:start; min-width:0; border:1px solid var(--line); border-radius:18px; overflow:hidden; background:var(--card,#fbf8f3); transition:transform .25s ease, box-shadow .25s ease; }
.gate-project:hover { transform:translateY(-3px); box-shadow:0 10px 24px #261d1816; }
.gate-project img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; }
.gate-project span { padding:12px 13px; font-weight:690; font-size:.9rem; }
.gate-contact { display:grid; grid-template-columns:1fr auto; align-items:center; gap:18px; padding:clamp(18px,3vw,42px); }
.gate-contact .site-actions { justify-content:flex-start; margin:0; }
.gate-contact p:not(.eyebrow) { max-width:55ch; }
.gate-dialog { color:inherit; border:1px solid var(--line); border-radius:20px; box-shadow:0 24px 70px #17131650; padding:0; background:var(--card,#fbf8f3); width:min(1070px,calc(100% - 26px)); max-width:none; }
.gate-dialog[open] { animation:gate-enter .2s ease-out both; }
.gate-dialog::backdrop { background:#221d24bb; backdrop-filter:blur(4px); }
.gate-dialog-head { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; gap:8px; }
.gate-dialog-head h2 { font-size:clamp(1.05rem,3vw,1.48rem); margin:0; }
.gate-close { min-width:42px; min-height:42px; border-radius:12px; font-size:1.5rem; }
.gate-dialog-image { overflow:auto; background:#fff; max-height:72vh; }
.gate-dialog-image img { display:block; width:100%; height:auto; max-height:72vh; object-fit:contain; }
.gate-dialog-image.is-drawing img { min-width:min(820px,130vw); max-height:none; }
@media (max-width:1080px) {
  .category-grid.category-with-gates { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gate-contact { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .nav-row nav a:nth-child(n) { grid-column:span 2; }
  .gate-hero,.gate-model,.gate-calculation,.gate-detail,.gate-work { grid-template-columns:1fr; }
  .gate-hero-photo { min-height:0; aspect-ratio:4/3; }
  .gate-intro h1 { font-size:clamp(2.25rem,8vw,4.4rem); }
  .gate-hero { border-radius:20px; }
  .gate-detail > div { grid-row:1; }
  .gate-model-tabs,.gate-projects { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gate-equation { border-left:0; padding:12px 0 0; border-top:1px solid var(--line); }
  .gate-dialog-image.is-drawing img { min-width:760px; }
}
@media (prefers-reduced-motion:reduce) {
  .gate-model:not([hidden]),.gate-dialog[open] { animation:none; }
  .gate-project { transition:none; }
}

