.has-mega.is-keyboard-open > .mega {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

.mega-toggle:focus-visible,
.mega a:focus-visible {
    outline: 3px solid #1e9e8e;
    outline-offset: 3px;
}

.has-mega a[hidden] { display: none !important; }

.diaco-kb-tools {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
    padding: 20px;
    border: 1px solid #dfe8e6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(14,58,120,.07);
}
.diaco-kb-tools label { display:block; margin-bottom:8px; font-weight:700; color:#173f3a; }
.diaco-kb-tools input { width:100%; min-height:48px; padding:10px 14px; border:1px solid #cbd8d5; border-radius:12px; font:inherit; }
.diaco-kb-filters { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.diaco-kb-filters button { padding:8px 14px; border:1px solid #cbd8d5; border-radius:999px; background:#fff; color:#173f3a; cursor:pointer; font:inherit; }
.diaco-kb-filters button.is-active { border-color:#1e9e8e; background:#1e9e8e; color:#fff; }
.diaco-kb-empty { margin:14px 0 0; color:#8a1f2d; }
.kb-card[hidden], .kb-category[hidden] { display:none !important; }

/* Plugins page: compact hero, reliable inline icons and a bounded selector. */
.phv-plugins {
    min-height: 0 !important;
    padding: clamp(46px, 6vw, 76px) 0 !important;
}
.phv-plugins .page-hero__grid {
    align-items: center !important;
    gap: clamp(34px, 5vw, 76px) !important;
}
.phv-plugins .page-hero__copy { max-width: 650px; }
.phv-plugins .page-hero__copy h1 {
    max-width: 620px;
    font-size: clamp(34px, 3.35vw, 54px) !important;
    line-height: 1.25 !important;
}
.phv-plugins .page-hero__visual { align-self: stretch; }
.phv-plugins .phv-shelves {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: 12px !important;
    height: 100%;
}
.phv-plugins .phv-shelf {
    min-width: 0;
    padding: 15px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.065) !important;
    box-shadow: 0 14px 36px rgba(0,22,19,.18);
    backdrop-filter: blur(8px);
}
.phv-plugins .phv-shelf:first-child { grid-column: 1 / -1; }
.phv-plugins .phv-shelf__hdr { margin-bottom: 11px !important; }
.phv-plugins .phv-shelf__row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
}
.phv-plugins .phv-shelf:not(:first-child) .phv-shelf__row { grid-template-columns: 1fr; }
.phv-plugins .phv-pill {
    display: flex !important;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.72) !important;
    border-radius: 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.phv-plugins .phv-pill--extra { display: none !important; }
.phv-plugins .phv-pill__ic {
    display: grid !important;
    flex: 0 0 25px;
    width: 25px !important;
    height: 25px !important;
    margin-inline-end: 7px;
    place-items: center;
}
.diaco-plugin-icon { display:block; width:22px; height:22px; }
.phv-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px dashed rgba(255,255,255,.42);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}
.phv-more:hover { background: rgba(255,255,255,.15); }
.phv-more span { color: #ffbc40; }

#plugins { scroll-margin-top: 92px; }
#plugins .segtabs {
    display: grid !important;
    grid-template-columns: minmax(280px, 350px) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: clamp(24px, 3.5vw, 48px) !important;
}
#plugins .segtabs__rail {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    position: sticky;
    top: 96px;
    max-height: min(68vh, 650px);
    padding: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto;
    border: 1px solid #dce9e6;
    border-radius: 20px;
    background: #f6fbfa;
    box-shadow: 0 14px 36px rgba(10,65,57,.08);
    scrollbar-color: #18aa9b #e5f1ef;
    scrollbar-width: thin;
}
#plugins .segtabs__rail > * { flex: 0 0 auto !important; width: 100% !important; }
#plugins .segtabs__rail::-webkit-scrollbar { width: 7px; }
#plugins .segtabs__rail::-webkit-scrollbar-thumb { border-radius: 10px; background: #18aa9b; }
#plugins .segtabs__rail::-webkit-scrollbar-track { background: #e5f1ef; }
#plugins .diaco-plugin-tools {
    position: sticky;
    top: -10px;
    z-index: 5;
    width: 100%;
    margin: -10px 0 8px;
    padding: 14px 8px 12px;
    border-bottom: 1px solid #dce9e6;
    background: rgba(246,251,250,.97);
    backdrop-filter: blur(10px);
}
#plugins .diaco-plugin-tools label {
    display: block;
    margin-bottom: 7px;
    color: #173f3a;
    font-size: 12px;
    font-weight: 900;
}
#plugins .diaco-plugin-tools input {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #c9dcda;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #173f3a;
    font: inherit;
    font-size: 12px;
    transition: border-color .2s, box-shadow .2s;
}
#plugins .diaco-plugin-tools input:focus {
    border-color: #1aa898;
    box-shadow: 0 0 0 3px rgba(26,168,152,.12);
}
#plugins .diaco-plugin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}
#plugins .diaco-plugin-filters button {
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #c9dcda;
    border-radius: 999px;
    background: #fff;
    color: #315d57;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
}
#plugins .diaco-plugin-filters button:hover { border-color: #1aa898; color: #117f73; }
#plugins .diaco-plugin-filters button.is-active {
    border-color: #169f90;
    background: #169f90;
    color: #fff;
}
#plugins .diaco-plugin-empty {
    margin: 10px 2px 0;
    color: #9b3b46;
    font-size: 11px;
    font-weight: 700;
}
#plugins .diaco-plugin-empty[hidden],
#plugins .segtab[hidden],
#plugins .segtabs__group[hidden],
#plugins .diaco-plugin-panel-empty[hidden] { display: none !important; }
#plugins .diaco-plugin-panel-empty {
    display: grid;
    min-height: 330px;
    padding: 40px;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 1px dashed #bfd8d4;
    border-radius: 22px;
    background: #fff;
    color: #52736e;
    text-align: center;
    box-shadow: 0 18px 46px rgba(10,65,57,.07);
}
#plugins .diaco-plugin-panel-empty .diaco-plugin-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 4px;
    color: #18aa9b;
}
#plugins .diaco-plugin-panel-empty strong { color: #173f3a; font-size: 20px; }
#plugins .diaco-plugin-panel-empty span { font-size: 13px; }
#plugins .segtabs__group {
    position: relative;
    top: auto;
    z-index: 1;
    margin: 0 -2px 7px !important;
    padding: 11px 10px 8px !important;
    background: linear-gradient(#f6fbfa 78%, rgba(246,251,250,.88));
}
#plugins .segtab {
    min-height: 64px !important;
    margin-bottom: 7px !important;
    padding: 8px 9px !important;
    border: 1px solid #e3eeec !important;
    border-radius: 14px !important;
    background: #fff !important;
}
#plugins .segtab:hover { border-color: #9ed8d0 !important; transform: translateY(-1px); }
#plugins .segtab.active {
    border-color: #1bb4a4 !important;
    background: linear-gradient(110deg, #fff, #effbf8) !important;
    box-shadow: 0 8px 20px rgba(18,153,137,.13) !important;
}
#plugins .segtab__ic {
    display: grid !important;
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
    place-items: center;
    border-radius: 12px !important;
    background: #eaf8f5 !important;
    color: #138f82 !important;
}
#plugins .segtab.active .segtab__ic { background: #18aa9b !important; color: #fff !important; }
#plugins .segtab__txt { min-width: 0; }
#plugins .segtab__txt b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#plugins .segtab__txt > span {
    display: -webkit-box !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
#plugins .tabs__content,
#plugins .segtabs__content { min-width: 0; }
#plugins .seg-panel.active {
    min-height: 0 !important;
    padding: clamp(24px, 3vw, 42px) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 46px rgba(10,65,57,.10) !important;
}
#plugins .seg-panel__ic {
    display: grid !important;
    place-items: center;
    color: #fff !important;
}
#plugins .seg-panel__ic .diaco-plugin-icon { width: 30px; height: 30px; }

@media (max-width: 980px) {
    .phv-plugins .page-hero__grid { grid-template-columns: 1fr !important; }
    .phv-plugins .page-hero__visual { width: 100%; }
    #plugins .segtabs { grid-template-columns: minmax(240px, 310px) minmax(0, 1fr) !important; gap: 20px !important; }
}
@media (max-width: 760px) {
    .phv-plugins { padding: 38px 0 46px !important; }
    .phv-plugins .phv-shelves { grid-template-columns: 1fr; }
    .phv-plugins .phv-shelf:first-child { grid-column: auto; }
    #plugins .segtabs { display: flex !important; flex-direction: column !important; }
    #plugins .segtabs__rail {
        position: relative;
        top: auto;
        width: 100%;
        max-height: 390px;
    }
    #plugins .diaco-plugin-tools { top: -10px; }
    #plugins .seg-panel.active { padding: 22px 18px !important; }
}
@media (max-width: 480px) {
    .phv-plugins .phv-shelf__row { grid-template-columns: 1fr; }
    .phv-plugins .phv-shelf:first-child .phv-pill:nth-of-type(n+4) { display:none !important; }
}

/* Two-way module ↔ plugin relationships. */
.diaco-module-plugin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.diaco-module-plugin-card {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #dce9e6;
    border-radius: 15px;
    background: #fff;
    color: #173f3a;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(10,65,57,.06);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.diaco-module-plugin-card:hover {
    border-color: #25aa9b;
    box-shadow: 0 12px 28px rgba(10,110,96,.12);
    transform: translateY(-2px);
}
.diaco-module-plugin-card__icon {
    display: grid;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    place-items: center;
    background: #e9f8f5;
    color: #148f82;
}
.diaco-module-plugin-card__icon .diaco-plugin-icon { width: 24px; height: 24px; }
.diaco-module-plugin-card > span:nth-child(2) { display:grid; min-width:0; gap:3px; }
.diaco-module-plugin-card strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.diaco-module-plugin-card small { color:#6d8884; font-size:10px; }
.diaco-module-plugin-card > b { color:#1a9e90; font-size:18px; }

#plugins .diaco-related-modules {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 20px 0 22px;
    padding: 14px 16px;
    border: 1px solid #dce9e6;
    border-radius: 15px;
    background: #f5fbf9;
}
#plugins .diaco-related-modules > strong { color:#315d57; font-size:12px; }
#plugins .diaco-related-modules > div { display:flex; flex-wrap:wrap; gap:7px; }
#plugins .diaco-related-modules a {
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:7px 11px;
    border:1px solid #bcd9d4;
    border-radius:999px;
    background:#fff;
    color:#117f73;
    font-size:11px;
    font-weight:800;
    text-decoration:none;
}
#plugins .diaco-related-modules a:hover { border-color:#169f90; background:#169f90; color:#fff; }

@media (max-width: 700px) {
    .diaco-module-plugin-grid { grid-template-columns: 1fr; }
    .diaco-module-plugin-card { min-height:66px; }
    #plugins .diaco-related-modules { align-items:flex-start; flex-direction:column; }
}

/* Homepage: the three newest items across articles and news. */
body.home #main > section.section {
    padding-top: clamp(58px, 5vw, 68px) !important;
    padding-bottom: clamp(58px, 5vw, 68px) !important;
}
.diaco-latest {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 5vw, 72px) 0;
    background: linear-gradient(180deg, #f7fbfa 0%, #eef7f5 100%);
    color: #173f3a;
    isolation: isolate;
}
.diaco-clients-section { padding-bottom: clamp(44px, 4vw, 56px) !important; }
.diaco-latest__orb {
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .46;
    pointer-events: none;
}
.diaco-latest__orb--one { top: -210px; right: -120px; background: radial-gradient(circle, rgba(32,183,168,.22), transparent 68%); }
.diaco-latest__orb--two { bottom: -240px; left: -100px; background: radial-gradient(circle, rgba(14,58,120,.17), transparent 68%); }
.diaco-latest__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}
.diaco-latest__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #168f82;
    font-size: 13px;
    font-weight: 900;
}
.diaco-latest__eyebrow i { width: 24px; height: 2px; border-radius: 9px; background: #20b7a8; }
.diaco-latest__head h2 { margin: 0 0 10px; color: #0e3a34; font-size: clamp(30px, 4vw, 46px); line-height: 1.25; }
.diaco-latest__head p { max-width: 610px; margin: 0; color: #607d78; font-size: 15px; line-height: 1.9; }
.diaco-latest__all { display: flex; flex: 0 0 auto; gap: 8px; }
.diaco-latest__all a {
    padding: 10px 15px;
    border: 1px solid #bdd8d3;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #167f74;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    transition: .2s ease;
}
.diaco-latest__all a:hover { border-color: #20a999; background: #fff; transform: translateY(-2px); }
.diaco-latest__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.diaco-latest__card {
    overflow: hidden;
    border: 1px solid rgba(183,211,206,.78);
    border-radius: 24px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 18px 50px rgba(12,73,63,.09);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.diaco-latest__card:hover { border-color: #84c9bf; box-shadow: 0 24px 58px rgba(12,73,63,.14); transform: translateY(-6px); }
.diaco-latest__media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #dceeea; }
.diaco-latest__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.diaco-latest__card:hover .diaco-latest__media img { transform: scale(1.045); }
.diaco-latest__media.is-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #0f6f64, #123d68); }
.diaco-latest__media.is-placeholder::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1px); background-size: 18px 18px; }
.diaco-latest__media.is-placeholder > i { position: relative; color: rgba(255,255,255,.94); font-size: 64px; font-style: normal; font-weight: 900; }
.diaco-latest__type { position: absolute; top: 14px; right: 14px; padding: 7px 12px; border-radius: 999px; background: #fff; color: #117d72; font-size: 11px; font-weight: 900; box-shadow: 0 7px 20px rgba(0,0,0,.12); }
.diaco-latest__type--news { background: #0e3a78; color: #fff; }
.diaco-latest__body { display: flex; min-height: 255px; padding: 21px 21px 20px; flex-direction: column; }
.diaco-latest__body time { color: #79908c; font-size: 11px; font-weight: 700; }
.diaco-latest__body h3 { margin: 9px 0 10px; font-size: 18px; line-height: 1.75; }
.diaco-latest__body h3 a { color: #133f39; text-decoration: none; }
.diaco-latest__body p { display: -webkit-box; overflow: hidden; margin: 0 0 18px; color: #6b827e; font-size: 12px; line-height: 1.9; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.diaco-latest__more { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: auto; color: #159486; font-size: 12px; font-weight: 900; text-decoration: none; }
.diaco-latest__more span { transition: transform .2s ease; }
.diaco-latest__more:hover span { transform: translateX(-4px); }
@media (max-width: 900px) {
    .diaco-latest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .diaco-latest__card:last-child { grid-column: 1 / -1; width: calc(50% - 10px); justify-self: center; }
}
@media (max-width: 640px) {
    body.home #main > section.section { padding-top: 48px !important; padding-bottom: 48px !important; }
    .diaco-latest { padding: 48px 0; }
    .diaco-clients-section { padding-bottom: 40px !important; }
    .diaco-latest__head { align-items: stretch; flex-direction: column; margin-bottom: 26px; }
    .diaco-latest__all { width: 100%; }
    .diaco-latest__all a { flex: 1; text-align: center; }
    .diaco-latest__grid { grid-template-columns: 1fr; }
    .diaco-latest__card:last-child { grid-column: auto; width: 100%; }
    .diaco-latest__body { min-height: 0; }
}
