/* Scoped interface refinements. Author: Sandro Brotini. */
html .ti-site .opt-portfolio .opt-project-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;}
html .ti-site .opt-portfolio .opt-project-card {height:100%;border:1px solid var(--line,#e2e7ef);border-radius:20px;overflow:hidden;background:var(--surface,#fff);}
html .ti-site .opt-portfolio .opt-project-card img {display:block;width:100%;aspect-ratio:20/13;object-fit:cover;}
html .ti-site .opt-portfolio .opt-project-copy {padding:24px;}
html .ti-site .opt-portfolio .opt-project-copy h3 {font-size:1.4rem;line-height:1.25;margin:8px 0 12px;}
html .ti-site .opt-portfolio .opt-project-copy p {line-height:1.7;}
html .ti-site .opt-portfolio .opt-project-filters {display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 28px;}
html .ti-site .opt-portfolio .opt-project-filters [aria-pressed="true"] {background:var(--accent,#3459e6);color:#fff;}
html .ti-site .opt-portfolio [hidden] {display:none!important;}
html .ti-site .opt-project-detail .prose {margin-bottom:32px;}
html .ti-site .opt-project-detail .opt-project-gallery {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:32px 0;}
html .ti-site .opt-project-detail .opt-project-gallery figure {margin:0;min-width:0;}
html .ti-site .opt-project-detail .opt-project-gallery img {display:block;width:100%;height:auto;border-radius:12px;}
html .ti-site .opt-project-detail .opt-project-gallery figcaption {font-size:.9rem;line-height:1.5;margin-top:8px;}
html .ti-site .opt-project-detail .opt-project-services {display:flex;flex-wrap:wrap;gap:12px;}
html .ti-site .service-details .opt-commercial-note {display:block;margin-top:15px;line-height:1.6;}
html .ti-site .service-hero .service-price:empty {display:none;}
html .ti-site .site-header .main-nav a:focus-visible,
html .ti-site .site-header .strategy-nav-item summary:focus-visible,
html .ti-site .opt-portfolio .button:focus-visible,
html .ti-site .opt-project-detail a:focus-visible {outline:3px solid var(--accent,#3459e6);outline-offset:4px;}
html .ti-site .service-hero .button:active,
html .ti-site .site-header .menu-toggle:active,
html .ti-site .opt-portfolio .button:active {transform:translateY(1px);filter:brightness(.94);}
html .ti-admin .opt-editor .opt-gallery-editor {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px;}
html .ti-admin .opt-editor .opt-gallery-row {padding:16px;border:1px solid #dde4ed;border-radius:10px;min-width:0;}
html .ti-admin .opt-editor .opt-related-picker {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
html .ti-admin .opt-editor .opt-related-picker label {display:flex;align-items:center;gap:10px;line-height:1.5;}
html .ti-admin .opt-editor .opt-related-picker input {width:20px;height:20px;flex-shrink:0;}
html .ti-admin .opt-editor details summary {cursor:pointer;min-height:44px;padding:12px 0;font-weight:600;}
html .ti-admin .opt-editor details {margin-block:22px;}
@media(max-width:1000px){
 html .ti-site .opt-portfolio .opt-project-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px){
 html .ti-site .opt-portfolio .opt-project-grid,
 html .ti-site .opt-project-detail .opt-project-gallery,
 html .ti-admin .opt-editor .opt-gallery-editor,
 html .ti-admin .opt-editor .opt-related-picker {grid-template-columns:1fr;}
 html .ti-site .opt-portfolio .button {min-height:44px;}
 html .ti-site .service-hero .hero-actions .button {min-height:46px;}
}
@media(prefers-reduced-motion:reduce){
 html .ti-site .service-hero .button:active,
 html .ti-site .site-header .menu-toggle:active,
 html .ti-site .opt-portfolio .button:active {transform:none;}
}
