/* KIMI contract: gateway content only; site chrome remains owner-managed. */
body:has(.sbv-brand-gateway) .sbv-brand-gateway {
    --sbv-ink: #222;
    --sbv-muted: #757575;
    --sbv-line: #e3e3e1;
    --sbv-paper: #f7f7f5;
    width: min(100%, 1344px);
    max-width: none;
    padding: clamp(48px, 4.5vw, 64px) clamp(20px, 3.34vw, 48px) 64px;
    background: var(--sbv-paper);
    color: #333;
    font: 400 16px/1.65 Jost, Arial, sans-serif;
}
body:has(.sbv-brand-gateway) .sbv-brand-gateway :is(h1, h2, h3) { color: #222; }
body:has(.sbv-brand-gateway) .sbv-brand-gateway :is(.sbv-brand-gateway__eyebrow) {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    letter-spacing: .08em;
}
body:has(.sbv-brand-gateway) .sbv-brand-gateway h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; }
body:has(.sbv-brand-gateway) .sbv-brand-gateway h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
body:has(.sbv-brand-gateway) .sbv-brand-gateway__hero { align-items: center; gap: clamp(28px, 4vw, 64px); }
body:has(.sbv-brand-gateway) .sbv-brand-gateway__brand { min-height: 0; padding: 28px 0; }
body:has(.sbv-brand-gateway) .sbv-brand-gateway__brand-name { font-size: clamp(24px, 2.5vw, 36px); }
body:has(.sbv-brand-gateway) .sbv-brand-gateway__selection {
    gap: clamp(28px, 4vw, 64px);
    margin-top: clamp(48px, 5vw, 64px);
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--sbv-line);
}
body:has(.sbv-brand-gateway) .sbv-brand-gateway__button { min-height: 48px; border-radius: 0; }
@media (max-width: 600px) {
    body:has(.sbv-brand-gateway) .sbv-brand-gateway { padding: 28px 20px 40px; }
    body:has(.sbv-brand-gateway) .sbv-brand-gateway :is(.sbv-brand-gateway__hero, .sbv-brand-gateway__selection) { gap: 28px; }
}

/* Archive-only KIMI surface. Active catalog, hub and product templates are excluded. */
body:has(main [class$="-archive-head"]) :is([data-sbv-brand-template], .sbv-atix-v1-content-slot [data-sbv-brand-template="atix"], .sbv-dahua-v1-content-slot [data-sbv-brand-template="dahua"]) {
    --sbv-brand-ink: #222;
    --sbv-brand-line: #e3e3e1;
    --sbv-ctv-muted: #757575;
    background: #f7f7f5;
    color: #333;
    font: 400 16px/1.65 Jost, Arial, sans-serif;
}
body:has(main [class$="-archive-head"]) :is([data-sbv-brand-template], .sbv-atix-v1-content-slot [data-sbv-brand-template="atix"], .sbv-dahua-v1-content-slot [data-sbv-brand-template="dahua"]) :is(h1, h2, h3) { color: #222; font-weight: 500; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-archive-head, .sbv-atix-v1-archive-head, .sbv-dahua-v1-archive-head) h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-catalog__layout, .sbv-atix-v1-catalog__layout, .sbv-dahua-v1-catalog__layout) { grid-template-columns: minmax(0, 1fr); gap: 32px; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-grid, .sbv-atix-v1-grid, .sbv-dahua-v1-grid) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-card, .sbv-atix-v1-card, .sbv-dahua-v1-card) { min-width: 0; border: 1px solid #e3e3e1; background: #f7f7f5; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-card__image, .sbv-atix-v1-card__image, .sbv-dahua-v1-card__image) { height: auto; min-height: 180px; padding: 16px; background: #f7f7f5; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-card img, .sbv-atix-v1-card img, .sbv-dahua-v1-card img) { width: auto; height: auto; max-width: 100%; max-height: 280px; object-fit: contain; }
body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-card__body, .sbv-atix-v1-card__body, .sbv-dahua-v1-card__body) { padding: 20px; }
@media (max-width: 1099px) {
    body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-grid, .sbv-atix-v1-grid, .sbv-dahua-v1-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    body:has(main [class$="-archive-head"]) :is(.sbv-ctv-v3-grid, .sbv-atix-v1-grid, .sbv-dahua-v1-grid) { grid-template-columns: minmax(0, 1fr); }
}

/* Shared Dahua reset is deliberately limited to the two approved page roots. */
body:has(#sbv-dahua-partner) .sbv-dahua-partner,
body:has(#sbv-dahua-support) .sbv-dahua-support {
    color: #333;
    font: 400 16px/1.65 Jost, Arial, sans-serif;
}
body:has(#sbv-dahua-partner) .sbv-dahua-partner {
    max-width: 1344px;
    padding: clamp(48px, 4.5vw, 64px) clamp(20px, 3.34vw, 48px) 64px;
    background: #f7f7f5;
}
body:has(#sbv-dahua-partner) .sbv-dahua-partner :is(h1, h2, h3) { color: #222; font-weight: 500; }
body:has(#sbv-dahua-partner) .sbv-dahua-partner__eyebrow {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body:has(#sbv-dahua-partner) .sbv-dahua-partner h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; }
body:has(#sbv-dahua-partner) .sbv-dahua-partner__section h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
body:has(#sbv-dahua-partner) .sbv-dahua-partner__hero { gap: clamp(28px, 4vw, 64px); padding: 0 0 clamp(48px, 4.5vw, 64px); }
/* Defeat the later inherited image-height rule without forcing an enlarged image. */
body:has(#sbv-dahua-partner) .sbv-dahua-partner .sbv-dahua-partner__hero-image {
    width: auto;
    max-width: 100%;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
}
body:has(#sbv-dahua-partner) .sbv-dahua-partner :is(.sbv-dahua-partner__card, .sbv-dahua-partner__next) { border-color: #e3e3e1; border-radius: 0; }
body:has(#sbv-dahua-partner) .sbv-dahua-partner :is(.sbv-dahua-action) { min-height: 48px; border-radius: 0; }
body:has(#sbv-dahua-partner) .sbv-dahua-partner__section { padding: clamp(28px, 4vw, 48px) 0; border-color: #e3e3e1; }
@media (max-width: 600px) {
    body:has(#sbv-dahua-partner) .sbv-dahua-partner { padding: 28px 20px 40px; }
    body:has(#sbv-dahua-partner) .sbv-dahua-partner__hero-image { order: -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
}

/* Support pages only: preserve source lists, form values and table semantics. */
body:has(#sbv-dahua-support) .sbv-dahua-support {
    --support-ink: #222;
    --support-muted: #757575;
    --support-line: #e3e3e1;
    --support-paper: #f7f7f5;
    --support-link: #2563eb;
    width: min(calc(100% - 96px), 1344px);
    padding: clamp(48px, 4.5vw, 64px) 0;
    background: #f7f7f5;
    color: #333;
    font: 400 16px/1.65 Jost, Arial, sans-serif;
}
body:has(#sbv-dahua-support) .sbv-dahua-support__eyebrow {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    font-weight: 400;
}
body:has(#sbv-dahua-support) .sbv-dahua-support h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 500; }
body:has(#sbv-dahua-support) .sbv-dahua-support h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 500; line-height: 1.2; }
body:has(#sbv-dahua-support) .sbv-dahua-support__toc { padding: 16px 0; border-inline: 0; background: transparent; }
body:has(#sbv-dahua-support) .sbv-dahua-support__toc ul { gap: 8px 20px; }
body:has(#sbv-dahua-support) .sbv-dahua-support__toc a { color: #2563eb; text-underline-offset: 3px; }
body:has(#sbv-dahua-support) .sbv-dahua-support__section { padding: clamp(28px, 4vw, 48px) 0 8px; }
body:has(#sbv-dahua-support) .sbv-dahua-support__action { min-height: 48px; border-radius: 0; }
body:has(#sbv-dahua-support) .sbv-dahua-support :is(.sbv-dahua-support__links li, .sbv-dahua-support__note, .sbv-dahua-support__next) { background: #f7f7f5; border-color: #e3e3e1; border-radius: 0; }
@media (max-width: 600px) {
    body:has(#sbv-dahua-support) .sbv-dahua-support { width: calc(100% - 40px); padding: 28px 0 40px; }
}

/* Calculator override is confined to the Dahua support root. */
body:has(#sbv-dahua-support) .sbv-dahua-selection__form { padding: clamp(20px, 3vw, 32px); border-color: #e3e3e1; background: #f7f7f5; }
body:has(#sbv-dahua-support) .sbv-dahua-selection__field :is(input, select),
body:has(#sbv-dahua-support) .sbv-dahua-selection__field .ik_select_link {
    min-height: 48px;
    border-color: #e3e3e1;
    border-radius: 0;
    color: #333;
    font: 400 16px/1.35 Jost, Arial, sans-serif;
}
body:has(#sbv-dahua-support) .sbv-dahua-selection__specification textarea { border-color: #e3e3e1; background: #f7f7f5; }
body:has(#sbv-dahua-support) .sbv-dahua-selection__model { border-color: #e3e3e1; border-radius: 0; background: #f7f7f5; }
body:has(#sbv-dahua-support) .sbv-dahua-selection :is(.sbv-dahua-support__action, .sbv-dahua-selection__secondary) { min-height: 48px; border-radius: 0; }
@media (max-width: 600px) {
    body:has(#sbv-dahua-support) .sbv-dahua-selection__form { padding: 20px; }
    body:has(#sbv-dahua-support) .sbv-dahua-selection__field :is(input, select),
    body:has(#sbv-dahua-support) .sbv-dahua-selection__field .ik_select_link { font-size: 16px; }
}

/* Common KIMI surface; loaded only by the owned reference templates. */
body#main:has(#sbv-kimi-references),
body#main:has(#sbv-kimi-references) :is(.body,.main,.main>.container,#content,#content>.wrapper_inner,.page-top-wrapper,.page-top,.right_block,.middle) {
 background:#f7f7f5!important;
}
body#main:has(#sbv-kimi-references) #content { color:#333;font:400 16px/1.65 Jost,Arial,sans-serif; }
body#main:has(#sbv-kimi-references) #content :is(h1,h2,h3) { font-family:Jost,Arial,sans-serif;letter-spacing:normal; }
body#main:has(#sbv-kimi-references) #content a:not([class*="action"]):not([class*="button"]):not(.sbv-contact-chip):not(.sbv-tile-buy):not(.sbv-tile-detail) {color:#2563eb;}
body#main:has(#sbv-kimi-references) #content :is(button,a,input,select,summary):focus-visible {outline:2px solid #2563eb;outline-offset:3px;}
body#main:has(#sbv-kimi-references) .sbv-shop-banner h1 {font:500 clamp(32px,3.5vw,48px)/1.12 Jost,Arial,sans-serif;color:#222;letter-spacing:0;margin:0 0 20px;}
body#main:has(#sbv-kimi-references) :is(.sbv-dahua-partner,.sbv-dahua-support,.sbv-brand-gateway) {width:min(1344px,calc(100% - 96px));max-width:1344px;margin-inline:auto;padding-inline:0;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__hero {align-items:center;gap:24px 48px;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__eyebrow {margin:0;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-name {display:flex;align-items:center;min-height:80px;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-name img {display:block;width:160px;height:64px;object-fit:contain;max-width:100%;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-name img[src*="dahua-logo"] {filter:grayscale(1) brightness(.48);}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-action {border:0;color:#2563eb;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__selection {display:block;}
body#main:has(#sbv-kimi-references) .sbv-dahua-partner__hero {grid-template-columns:1fr 1fr;min-height:0;align-items:center;}
body#main:has(#sbv-kimi-references) .sbv-dahua-partner__hero .sbv-dahua-partner__hero-image {width:100%;height:auto!important;aspect-ratio:auto;object-fit:contain;max-height:520px!important;}
body#main:has(#sbv-kimi-references) :is(.sbv-dahua-partner__card,.sbv-dahua-support__links li) {background:transparent;border:0;border-top:1px solid #e3e3e1;padding:24px 0;}
body#main:has(#sbv-kimi-references) .sbv-dahua-support__toc {background:transparent;border-inline:0;padding:24px 0;}
body#main:has(#sbv-kimi-references) .sbv-reference-secondary {display:flex;flex-wrap:wrap;gap:24px;align-items:center;margin-top:24px;}
/* Archive readers have their own controls/data. Avoid matching current stores. */
body#main:has(main [class$="-archive-head"]) #content :is([class$="-eyebrow"],[class$="-catalog__count"],[class$="-source"]) {font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#757575;}
body#main:has(main [class$="-archive-head"]) #content :is([class$="-button"],[class*="-button--"],button,input:not([type=checkbox]):not([type=radio]),select) {border-radius:0;box-shadow:none;min-height:48px;font:400 16px/1.4 Jost,Arial,sans-serif;}
body#main:has(main [class$="-archive-head"]) #content :is(a[class$="-button"],button[class$="-button"]) {background:#30363a;border-color:#30363a;color:#fff;}
body#main:has(main [class$="-archive-head"]) #content :is([class$="-page"],[class$="-catalog"],[class$="-archive-head"],[class$="-card"],[class$="-card__image"]) {background:#f7f7f5;border-radius:0;}
body#main:has(main [class$="-archive-head"]) #content [class$="-grid"] {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;}
body#main:has(main [class$="-archive-head"]) #content [class$="-card"] {min-width:0;}
body#main:has(main [class$="-archive-head"]) #content [class$="-card__image"] {display:grid;place-items:center;height:200px;min-height:0;padding:16px;}
body#main:has(main [class$="-archive-head"]) #content [class$="-card"] img {width:auto;height:auto;max-width:100%;max-height:168px;object-fit:contain;}
body#main:has(main [class$="-archive-head"]) #content [class$="-card"] h3 {font:500 18px/1.3 Jost,Arial,sans-serif;overflow-wrap:anywhere;}
@media(max-width:1099px){body#main:has(main [class$="-archive-head"]) #content [class$="-grid"]{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:767px){
 body#main:has(#sbv-kimi-references) :is(.sbv-dahua-partner,.sbv-dahua-support,.sbv-brand-gateway){width:calc(100% - 40px);}
 body#main:has(#sbv-kimi-references) .sbv-dahua-partner__hero{grid-template-columns:1fr;gap:24px;}
 body#main:has(#sbv-kimi-references) .sbv-dahua-partner__hero .sbv-dahua-partner__hero-image{order:-1;aspect-ratio:4/3;object-fit:cover;max-height:none!important;}
 body#main:has(#sbv-kimi-references) .sbv-brand-gateway__hero{grid-template-columns:1fr;}
}
@media(max-width:599px){body#main:has(main [class$="-archive-head"]) #content [class$="-grid"]{grid-template-columns:1fr;}}
/* Native inline brand rules carry !important; resolve the whole scoped component. */
body#main:has(#sbv-kimi-references) :is(.top_inner_block_wrapper,.page-top-wrapper,.page-top) {background:#f7f7f5!important;}
body#main:has(#sbv-kimi-references) .page-top h1 {font:500 clamp(32px,3.5vw,48px)/1.12 Jost,Arial,sans-serif!important;text-align:left!important;color:#222!important;}
body#main:has(main [class$="-archive-head"]) #content :is([class$="-link-button"],button,input:not([type=checkbox]):not([type=radio]),select) {border-radius:0!important;box-shadow:none!important;min-height:48px!important;font:400 16px/1.4 Jost,Arial,sans-serif!important;}
body#main:has(main [class$="-archive-head"]) #content [class$="-link-button"] {background:#30363a!important;border-color:#30363a!important;color:#fff!important;}
body#main:has(main [class$="-archive-head"]) #content :is([class$="-eyebrow"],[class$="-source"],[class$="-result-meta"]) {font-family:ui-monospace,SFMono-Regular,Consolas,monospace!important;color:#757575!important;}
body#main:has(main [class$="-archive-head"]) #content :is(h1,h2,h3) {text-align:left!important;}
/* Exact reference: home.html .brand-zone-grid/.brand-zone and banner left alignment. */
body#main:has(#sbv-kimi-references) #content :is(h1,h2,h3) {text-align:left!important;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brands {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:24px;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand {display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;align-items:center;padding:20px;border:1px solid #e3e3e1;background:#fff;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-name {grid-column:1;grid-row:1/3;width:96px;min-height:64px;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-name img {width:96px;height:44px;filter:grayscale(1) brightness(.48);}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-name img[src*="atix-logo"] {height:64px;filter:grayscale(1) brightness(.55);}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-copy {grid-column:2;font-size:13px;line-height:1.45;color:#757575;}
body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brand-action {grid-column:2;min-height:48px;display:flex;align-items:center;font-size:13px;line-height:1.45;margin-top:8px;white-space:normal;}
body#main:has(#sbv-kimi-references) :is(.sbv-dahua-partner,.sbv-brand-gateway){padding-block:64px;}
body#main:has(#sbv-kimi-references) :is(.sbv-dahua-partner__section,.sbv-dahua-support__section){padding-block:64px;border-color:#e3e3e1;}
@media(max-width:1099px){body#main:has(#sbv-kimi-references) .sbv-brand-gateway__brands{grid-template-columns:1fr;}}
@media(max-width:767px){
 body#main:has(#sbv-kimi-references) :is(.sbv-dahua-partner,.sbv-brand-gateway,.sbv-dahua-partner__section,.sbv-dahua-support__section){padding-block:48px;}
}
