/* YouCube Home 1.8.0. Card rules stay inside mounted content.
 * Full-width rules run only after a successful Site home mount. No navbar selectors or external fonts. */
body.local-youcubehome-active .ych-host {
    display: block !important;
    background: #f5f7fb;
    padding: 0 !important;
    margin-inline: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
    float: none !important;
    flex: 1 1 100%;
}
body.local-youcubehome-active #local-youcubehome-original[hidden],
#local-youcubehome-staging[hidden],
#local-youcubehome [hidden] { display: none !important; }
#local-youcubehome.ych-root {
    --ych-navy: #182542;
    --ych-muted: #7a8696;
    --ych-line: #e2e7ef;
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 1368px;
    margin: 0 auto;
    padding: 73px 0 16px;
    color: var(--ych-navy);
    background: #f5f7fb;
    font-family: Heebo, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: start;
    isolation: isolate;
}
#local-youcubehome .ych-shell,
#local-youcubehome .ych-main,
#local-youcubehome .ych-sidebar,
#local-youcubehome .ych-grid,
#local-youcubehome .ych-domain,
#local-youcubehome .ych-domain *,
#local-youcubehome .ych-navigation *,
#local-youcubehome .ych-search * { box-sizing: border-box; }
/* Reference-width inner layout. The host/root background still spans the viewport.
   At desktop size: 1368 = 200 sidebar + 120 content padding + 1048 card grid.
   The two 514px columns share a 20px gutter. No CSS zoom or font scaling. */
#local-youcubehome .ych-shell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    width: 100%;
    max-width: 1368px;
    margin-inline: auto;
}
#local-youcubehome .ych-sidebar {
    margin: 43px 0 0;
    padding: 42px 23px 0;
    border: 0;
    border-inline-end: 1px solid var(--ych-line);
    background: transparent;
}
#local-youcubehome[dir="ltr"] .ych-sidebar { padding-inline: 23px; }
#local-youcubehome .ych-nav-caption {
    color: #8893a5;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    margin: 0 0 20px;
    padding: 0 13px;
}
#local-youcubehome .ych-navigation { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
#local-youcubehome a.ych-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 13px;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    color: #788399;
    background: transparent;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    white-space: normal;
    overflow-wrap: anywhere;
}
#local-youcubehome .ych-nav-link img { display: block; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; border: 0; }
#local-youcubehome a.ych-nav-link:hover { background: #eaf0f6; }
#local-youcubehome a.ych-nav-link.ych-current { background: var(--ych-navy); color: #fff; }
#local-youcubehome .ych-side-note {
    margin-top: 89px;
    padding: 30px 12px;
    border-top: 1px solid var(--ych-line);
    color: #8893a5;
    font-size: 13px;
    line-height: 1.8;
}
#local-youcubehome .ych-mini-cube { color: #209f95; font-size: 32px; line-height: 42px; margin: 0 0 9px; }
#local-youcubehome .ych-side-note strong { color: #263953; display: block; font-size: 14px; }
#local-youcubehome .ych-side-note p { margin: 5px 0 0; padding: 0; font-size: 13px; line-height: 1.8; }
#local-youcubehome .ych-main { min-width: 0; padding: 0 60px; }
#local-youcubehome[dir="ltr"] .ych-main { padding-inline: 60px; }
#local-youcubehome .ych-brand {
    position: relative;
    inset-inline-start: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 175px;
    margin: 0;
}
#local-youcubehome h1.ych-brand-image { max-width: 100%; min-width: 0; display: block; margin: 0; padding: 0; border: 0; font-size: 0; line-height: 0; }
#local-youcubehome .ych-brand-image img { display: block; width: 658px; max-width: 100%; height: auto; margin: 0; border: 0; }
#local-youcubehome .ych-live-brand { display: flex; gap: 24px; align-items: center; max-width: 100%; }
#local-youcubehome .ych-live-brand > img { width: 156px; max-width: 25%; height: auto; }
#local-youcubehome .ych-live-brand h1 { color: #000; font: 800 96px/1.1 Arial, sans-serif; margin: 0; }
#local-youcubehome .ych-live-brand p { color: #000; font-size: 22px; line-height: 1.3; font-weight: 700; text-align: center; margin: 10px 0 0; }
#local-youcubehome .ych-count {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-height: 31px;
    margin-bottom: 30px;
    font-size: 13px;
    color: var(--ych-muted);
}
#local-youcubehome .ych-count b { color: var(--ych-navy); font-size: 21px; font-weight: 700; }
#local-youcubehome .ych-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#local-youcubehome .ych-domain {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ych-line);
    border-radius: 17px;
    overflow: hidden;
    color: var(--ych-navy);
    background: #fff;
    text-decoration: none;
    box-shadow: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#local-youcubehome .ych-mechanics { --ych-accent: #237d90; --ych-tint: #e7f4f7; }
#local-youcubehome .ych-electricity { --ych-accent: #5355bc; --ych-tint: #efedfc; }
#local-youcubehome .ych-alternative { --ych-accent: #b45e22; --ych-tint: #fbf0e4; }
#local-youcubehome .ych-labs { --ych-accent: #24816c; --ych-tint: #e6f4ee; }
#local-youcubehome a.ych-domain[href] { cursor: pointer; }
#local-youcubehome a.ych-domain[href] * { cursor: inherit; }
#local-youcubehome a.ych-domain:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 14px 30px #1727440c; border-color: var(--ych-accent); }
#local-youcubehome a.ych-domain:focus-visible,
#local-youcubehome a.ych-nav-link:focus-visible,
#local-youcubehome .ych-search button:focus-visible,
#local-youcubehome .ych-search input:focus-visible { outline: 3px solid #237d90; outline-offset: 4px; }
#local-youcubehome .ych-domain-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 126px;
    padding: 23px 27px;
    background: var(--ych-tint);
}
#local-youcubehome .ych-domain-number {
    align-self: flex-start;
    color: var(--ych-on-tint, var(--ych-accent));
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 18px;
    white-space: nowrap;
}
#local-youcubehome img.ych-diagram { display: block; width: 150px; height: 85px; max-width: 44%; object-fit: contain; margin: 0; border: 0; }
#local-youcubehome .ych-domain-body { padding: 22px 26px; background: #fff; }
#local-youcubehome .ych-domain-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#local-youcubehome .ych-domain h2 { color: var(--ych-navy); font-family: inherit; font-size: 26px; font-weight: 800; line-height: 36px; margin: 0; padding: 0; border: 0; }
#local-youcubehome .ych-domain p { margin: 9px 0 20px; padding: 0; color: var(--ych-muted); font-size: 15px; font-weight: 400; line-height: 22px; }
#local-youcubehome .ych-domain-bottom { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--ych-line); padding-top: 15px; color: var(--ych-muted); font-size: 13px; line-height: 20px; }
#local-youcubehome .ych-domain-bottom strong { color: var(--ych-accent); font-size: 13px; font-weight: 600; }
/* Align the existing search block with the card grid, in RTL and LTR.
   Keep the actual block node/handlers unchanged; only its outer layout moves. */
#local-youcubehome .ych-below {
    box-sizing: border-box;
    width: 100%;
    max-width: 1368px;
    margin: 22px auto 0;
    padding-inline-start: 260px;
    padding-inline-end: 60px;
}
#local-youcubehome .ych-search { padding: 16px 28px 38px; background: #fff; }
#local-youcubehome .ych-search h2 { margin: 0 0 20px; padding: 0 0 8px; color: #526270; border: 0; border-bottom: 1px solid #e7eaef; font-size: 18px; font-weight: 600; line-height: 24px; position: relative; }
#local-youcubehome .ych-search h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -1px; width: 75px; height: 3px; background: #62a8ea; }
#local-youcubehome .ych-search-form { display: flex; align-items: center; gap: 9px; margin: 0; }
#local-youcubehome .ych-search input { min-width: 0; flex: 1; width: 100%; height: 51px; padding: 9px 12px; border: 1px solid #cbd4e0; border-radius: 0; box-shadow: none; background: #fff; color: #263953; font-size: 15px; line-height: 1.5; font-family: inherit; }
#local-youcubehome .ych-search input::placeholder { color: #7a8696; opacity: 1; }
#local-youcubehome .ych-search button { flex: 0 0 64px; height: 40px; padding: 0; border: 1px solid #56a1e6; border-radius: 0; color: #fff; background: #62a8ea; font-size: 23px; line-height: 36px; box-shadow: 0 2px 4px #0002; cursor: pointer; }
#local-youcubehome .ych-search button:hover { background: #398cda; }
#local-youcubehome .ych-live-search, #local-youcubehome .ych-other-blocks { min-width: 0; }
/* Native widgets retain their own markup, styles and handlers. Only their outer block spacing changes. */
#local-youcubehome .ych-live-search > .block { margin: 0 0 20px; width: 100%; max-width: none; }
#local-youcubehome .ych-other-blocks { margin-top: 20px; }
#local-youcubehome .ych-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; }
@media (max-width: 1100px) {
    #local-youcubehome.ych-root { padding-top: 48px; }
    #local-youcubehome .ych-shell { grid-template-columns: 190px minmax(0, 1fr); }
    #local-youcubehome .ych-sidebar { padding-inline-start: 24px; padding-inline-end: 20px; }
    #local-youcubehome.ych-root .ych-main { padding-inline: 35px; }
    #local-youcubehome .ych-brand { inset-inline-start: 0; }
    #local-youcubehome .ych-below { padding-inline-start: 225px; padding-inline-end: 35px; }
    #local-youcubehome .ych-domain-body { padding-inline: 22px; }
}
@media (max-width: 1000px) {
    #local-youcubehome .ych-shell { grid-template-columns: 185px minmax(0, 1fr); }
    #local-youcubehome .ych-sidebar { padding-inline: 14px; }
    #local-youcubehome.ych-root .ych-main { padding-inline: 24px; }
    #local-youcubehome .ych-below { padding-inline-start: 209px; padding-inline-end: 24px; }
    #local-youcubehome .ych-brand-image img { width: 540px; }
    #local-youcubehome .ych-domain-top { padding-inline: 18px; }
    #local-youcubehome .ych-domain-number { font-size: 10px; letter-spacing: .06em; }
    #local-youcubehome .ych-domain h2 { font-size: 23px; }
    #local-youcubehome .ych-domain-body { padding: 18px; }
    #local-youcubehome .ych-domain-bottom { flex-direction: column; gap: 4px; }
    #local-youcubehome .ych-live-brand h1 { font-size: 64px; }
    #local-youcubehome .ych-live-brand p { font-size: 17px; }
}
@media (max-width: 750px) {
    #local-youcubehome.ych-root { padding-top: 0; }
    #local-youcubehome .ych-shell { display: flex; flex-direction: column; }
    #local-youcubehome .ych-sidebar { margin: 0; padding: 12px 15px; border: 0; border-bottom: 1px solid var(--ych-line); background: #fff; }
    #local-youcubehome .ych-nav-caption, #local-youcubehome .ych-side-note { display: none; }
    #local-youcubehome .ych-navigation { flex-direction: row; gap: 5px; overflow-x: auto; padding-bottom: 3px; }
    #local-youcubehome a.ych-nav-link { flex-shrink: 0; padding: 10px 12px; font-size: 14px; gap: 7px; min-height: 42px; }
    #local-youcubehome .ych-nav-link img { width: 17px; height: 17px; flex-basis: 17px; }
    #local-youcubehome.ych-root .ych-main { padding: 28px 20px 0; }
    #local-youcubehome .ych-brand { min-height: 0; padding: 0 0 20px; }
    #local-youcubehome .ych-brand-image img { width: 540px; }
    #local-youcubehome .ych-count { min-height: 28px; margin-bottom: 20px; }
    #local-youcubehome .ych-grid { gap: 15px; }
    #local-youcubehome .ych-domain-top { height: 108px; padding: 17px; }
    #local-youcubehome img.ych-diagram { width: 105px; height: 72px; }
    #local-youcubehome .ych-domain-body { padding: 16px; }
    #local-youcubehome .ych-domain h2 { font-size: 22px; line-height: 32px; }
    #local-youcubehome .ych-domain p { font-size: 14px; line-height: 21px; min-height: 42px; }
    #local-youcubehome .ych-below { margin: 20px auto 0; padding-inline: 20px; }
    #local-youcubehome .ych-search { padding: 16px 16px 24px; }
    #local-youcubehome .ych-search button { flex-basis: 42px; }
    #local-youcubehome .ych-search input { font-size: 16px; }
    #local-youcubehome .ych-live-brand { gap: 16px; }
    #local-youcubehome .ych-live-brand h1 { font-size: clamp(40px, 10vw, 64px); }
    #local-youcubehome .ych-live-brand p { font-size: 16px; }
}
@media (max-width: 480px) {
    #local-youcubehome .ych-grid { grid-template-columns: minmax(0, 1fr); }
    #local-youcubehome .ych-domain-top { height: 110px; }
    #local-youcubehome img.ych-diagram { width: 130px; height: 75px; }
    #local-youcubehome .ych-domain p { min-height: 0; }
    #local-youcubehome .ych-domain-bottom { flex-direction: row; font-size: 12px; }
    #local-youcubehome .ych-domain-bottom strong { font-size: 12px; }
    #local-youcubehome .ych-live-brand p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    #local-youcubehome .ych-domain { transition: none; }
    #local-youcubehome a.ych-domain:hover { transform: none; }
}

/* Editable cards: all selectors stay inside the existing mounted content region. */
#local-youcubehome .ych-card-groups { display: flex; flex-direction: column; gap: 20px; }
#local-youcubehome .ych-domain-number { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
#local-youcubehome .ych-domain h2,
#local-youcubehome .ych-domain p,
#local-youcubehome .ych-domain-bottom { overflow-wrap: anywhere; }
#local-youcubehome .ych-domain-title h2 { min-width: 0; }
#local-youcubehome .ych-diagram { flex-shrink: 0; }
#local-youcubehome .ych-domain img.ych-raster { width: 220px; height: 100px; max-width: 50%; object-fit: contain; }
#local-youcubehome .ych-extra1,
#local-youcubehome .ych-extra2 { --ych-accent: #24816c; --ych-tint: #e6f4ee; }
#local-youcubehome .ych-domain.ych-unlinked { cursor: default; }
/* Compact cards use the SAME typography rules as regular cards. Only image
   height and padding are smaller. Half-height is a target, never a reason to
   hide description/footer text or reduce the font. Long content can grow. */
#local-youcubehome .ych-domain.ych-compact {
    display: flex;
    flex-direction: column;
    min-height: var(--ych-compact-height, 158px);
    height: auto;
    background: #fff;
}
#local-youcubehome .ych-compact .ych-domain-top {
    flex: 0 0 auto;
    height: auto;
    min-height: max(38px, calc(var(--ych-compact-height, 158px) * .28));
    padding: 4px 16px;
    gap: 8px;
    align-items: center;
}
#local-youcubehome .ych-compact .ych-domain-number {
    align-self: center;
    max-height: none;
    overflow: visible;
}
#local-youcubehome .ych-compact img.ych-diagram {
    width: 150px;
    height: max(30px, calc(var(--ych-compact-height, 158px) * .28 - 8px));
    max-height: none;
    max-width: 48%;
    object-fit: contain;
}
#local-youcubehome .ych-compact .ych-domain-body {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    min-height: 0;
    padding: 4px 16px;
    gap: 2px;
    overflow: visible;
    background: #fff;
}
#local-youcubehome .ych-compact .ych-domain-title { flex: 0 0 auto; min-height: 0; }
#local-youcubehome .ych-compact p { flex: 0 0 auto; min-height: 0; margin: 0; }
#local-youcubehome .ych-compact .ych-domain-bottom {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-start;
    min-width: 0;
    gap: 6px;
    margin-top: auto;
    padding-top: 3px;
}
/* Match footer font sizes at every breakpoint; no compact-only font overrides. */
#local-youcubehome .ych-domain-bottom span,
#local-youcubehome .ych-domain-bottom strong { min-width: 0; max-width: 100%; }
#local-youcubehome .ych-compact .ych-domain-bottom span,
#local-youcubehome .ych-compact .ych-domain-bottom strong { flex: 0 1 auto; }
@media (max-width: 750px) {
    #local-youcubehome .ych-card-groups { gap: 15px; }
    #local-youcubehome .ych-domain img.ych-raster { width: 150px; height: 90px; max-width: 48%; }
    #local-youcubehome .ych-compact .ych-domain-top { padding-inline: 12px; }
    #local-youcubehome .ych-compact .ych-domain-body { padding-inline: 12px; }
}

/* Free-form top captions must stay inside their coloured region. */
#local-youcubehome .ych-domain-number { max-height: 100%; overflow: hidden; }

#local-youcubehome .ych-compact .ych-domain-number { max-height: none; overflow: visible; }

/* Full-page mode: paint empty margins and release only the safe content ancestors
   labelled by our mount code. No global .container/.navbar/header modifications. */
body#page-site-index.local-youcubehome-active.local-youcubehome-fullwidth {
    background: #f5f7fb !important;
}
body#page-site-index.local-youcubehome-active.local-youcubehome-fullwidth .ych-layout-path {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    background: #f5f7fb !important;
    border-inline: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}
body#page-site-index.local-youcubehome-active.local-youcubehome-fullwidth .ych-host {
    position: relative !important;
    left: var(--ych-page-offset, 0px) !important;
    right: auto !important;
    width: var(--ych-page-width, 100%) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    background: #f5f7fb !important;
    overflow: visible !important;
}
body.local-youcubehome-fullwidth #local-youcubehome.ych-root {
    width: 100%;
    max-width: none;
    min-height: var(--ych-page-minheight, 100vh);
    padding-top: clamp(24px, 3vw, 48px);
    padding-bottom: 28px;
}
/* Full width means edge-to-edge BACKGROUND, not unbounded card widths.
   Both regular and compact cards use the same centered shell above. */
body.local-youcubehome-fullwidth #local-youcubehome .ych-brand { inset-inline-start: 0; }
@media (max-width: 750px) {
    body.local-youcubehome-fullwidth #local-youcubehome.ych-root { padding-top: 0; }
}
@media print {
    body.local-youcubehome-fullwidth .ych-host { left: 0 !important; width: 100% !important; }
}
