:root {
    --cns-green: #006b3f;
    --cns-green-dark: #004d2d;
    --cns-red: #970f25;
    --cns-gold: #f2c94c;
    --cns-ink: #17231d;
    --cns-muted: #637068;
    --cns-line: rgba(18, 48, 34, .13);
    --cns-shell: 1240px;
}

* { box-sizing: border-box; }

.cns-shell {
    width: min(var(--cns-shell), calc(100% - 40px));
    margin-inline: auto;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 12px 16px;
    color: #fff;
    background: var(--cns-green-dark);
    border-radius: 8px;
    transform: translateY(-150%);
    transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.cns-header {
    position: relative;
    z-index: 1000;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 1px 0 var(--cns-line);
}

.cns-header__accent { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 4px; }
.cns-header__accent span:nth-child(1) { background: var(--cns-green); }
.cns-header__accent span:nth-child(2) { background: var(--cns-gold); }
.cns-header__accent span:nth-child(3) { background: var(--cns-red); }

.cns-header__topbar { color: rgba(255,255,255,.9); background: var(--cns-green-dark); }
.cns-header__topbar-inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: .78rem; }
.cns-header__topbar p { margin: 0; font-weight: 700; letter-spacing: .025em; }
.cns-header__quick-links { display: flex; gap: 20px; }
.cns-header__quick-links a { color: inherit; text-decoration: none; }
.cns-header__quick-links a:hover { color: #fff; text-decoration: underline; }

.cns-header__identity { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cns-brand { display: inline-flex; align-items: center; gap: 18px; color: var(--cns-ink); text-decoration: none; }
.cns-brand__mark { width: 82px; height: 82px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 22px; background: linear-gradient(145deg, #fff, #eef6f1); border: 1px solid rgba(0,107,63,.12); box-shadow: 0 10px 30px rgba(0,77,45,.09); }
.cns-brand__mark img { display: block; max-width: 68px; max-height: 68px; object-fit: contain; }
.cns-brand__text { display: grid; line-height: 1.18; }
.cns-brand__text strong { color: var(--cns-green); font-size: 2rem; letter-spacing: -.04em; }
.cns-brand__text > span { margin-top: 2px; font-size: 1.05rem; font-weight: 800; }
.cns-brand__text small { margin-top: 7px; color: var(--cns-muted); font-size: .78rem; }

.cns-header__actions { display: flex; align-items: center; gap: 14px; }
.cns-header__portal-link { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 16px; color: var(--cns-green-dark); font-size: .88rem; font-weight: 800; text-decoration: none; border: 1px solid rgba(0,107,63,.16); border-radius: 12px; background: #f3f8f5; transition: .2s ease; }
.cns-header__portal-link svg { width: 20px; fill: currentColor; }
.cns-header__portal-link:hover { color: #fff; background: var(--cns-green); transform: translateY(-2px); }

.cns-nav-wrap { background: #fff; border-top: 1px solid var(--cns-line); }
.cns-nav { display: flex; align-items: stretch; gap: 4px; }
.cns-nav a { position: relative; display: inline-flex; align-items: center; min-height: 58px; padding: 0 20px; color: #34433b; font-size: .92rem; font-weight: 750; text-decoration: none; transition: color .2s ease, background .2s ease; }
.cns-nav a::after { content: ""; position: absolute; right: 20px; bottom: 0; left: 20px; height: 3px; border-radius: 3px 3px 0 0; background: var(--cns-red); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
.cns-nav a:hover { color: var(--cns-green); background: #f7faf8; }
.cns-nav a:hover::after, .cns-nav a.is-active::after { transform: scaleX(1); }
.cns-nav a.is-active { color: var(--cns-green-dark); }

.cns-menu-toggle { display: none; width: 46px; height: 46px; padding: 0; border: 1px solid var(--cns-line); border-radius: 12px; background: #fff; cursor: pointer; }
.cns-menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--cns-green-dark); transition: .2s ease; }
.cns-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cns-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.cns-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.cns-header.is-scrolled { position: sticky; top: 0; box-shadow: 0 12px 30px rgba(22,53,38,.12); }
.cns-header.is-scrolled .cns-header__topbar, .cns-header.is-scrolled .cns-header__identity { display: none; }

/* Footer */
.cns-footer { color: rgba(255,255,255,.82); background: #720b1c; }
.cns-footer__main { padding: 64px 0 50px; background: linear-gradient(135deg, #7f0c20, #9a1129 55%, #780b1e); }
.cns-footer__grid { display: grid; grid-template-columns: 1.25fr .75fr 1.35fr 1fr; gap: 46px; }
.cns-footer h3 { position: relative; margin: 0 0 24px; padding-bottom: 13px; color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.cns-footer h3::after { content: ""; position: absolute; bottom: 0; left: 0; width: 34px; height: 3px; border-radius: 999px; background: var(--cns-gold); }
.cns-footer p { line-height: 1.75; }
.cns-footer a { color: rgba(255,255,255,.86); text-decoration: none; }
.cns-footer a:hover { color: #fff; text-decoration: underline; }
.cns-footer ul { margin: 0; padding: 0; list-style: none; }
.cns-footer li + li { margin-top: 12px; }
.cns-footer li a { display: inline-block; line-height: 1.5; }

.cns-footer__logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 18px; color: #fff !important; text-decoration: none !important; }
.cns-footer__logo img { width: 60px; height: 60px; object-fit: contain; padding: 5px; border-radius: 14px; background: rgba(255,255,255,.95); }
.cns-footer__logo span { display: grid; font-size: .86rem; line-height: 1.25; }
.cns-footer__logo strong { font-size: 1.6rem; }
.cns-footer__brand > p { max-width: 360px; margin: 0 0 20px; }
.cns-footer__more { display: inline-flex; gap: 8px; color: #fff !important; font-weight: 800; }
.cns-footer__contact { font-style: normal; }
.cns-footer__contact p { display: grid; grid-template-columns: 22px 1fr; gap: 8px; margin: 0 0 12px; line-height: 1.55; }

.cns-footer__links { border-top: 1px solid rgba(255,255,255,.11); border-bottom: 1px solid rgba(255,255,255,.11); background: rgba(64,0,13,.22); }
.cns-footer__links-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cns-footer__links-inner > p { margin: 0; color: #fff; font-weight: 800; }
.cns-footer__links nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; font-size: .84rem; }
.cns-footer__bottom { padding: 20px 0; background: #5e0716; }
.cns-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .8rem; }
.cns-footer__bottom p { margin: 0; }

.cns-back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 1200; width: 48px; height: 48px; display: grid; place-items: center; color: #fff; font-size: 1.25rem; border: 0; border-radius: 50%; background: var(--cns-green); box-shadow: 0 12px 28px rgba(0,77,45,.28); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s ease; }
.cns-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.cns-back-to-top:hover { background: var(--cns-green-dark); transform: translateY(-3px); }

@media (max-width: 1050px) {
    .cns-footer__grid { grid-template-columns: 1fr 1fr; }
    .cns-footer__section--wide { grid-column: auto; }
}

@media (max-width: 900px) {
    .cns-header__quick-links { display: none; }
    .cns-header__identity { min-height: 92px; }
    .cns-brand__mark { width: 68px; height: 68px; border-radius: 18px; }
    .cns-brand__mark img { max-width: 56px; max-height: 56px; }
    .cns-brand__text strong { font-size: 1.65rem; }
    .cns-brand__text > span { font-size: .92rem; }
    .cns-brand__text small { display: none; }
    .cns-header__portal-link { display: none; }
    .cns-menu-toggle { display: block; }
    .cns-nav-wrap { position: relative; border-top: 0; }
    .cns-nav { position: absolute; top: 0; right: 20px; left: 20px; display: grid; gap: 0; padding: 10px; border: 1px solid var(--cns-line); border-radius: 0 0 16px 16px; background: #fff; box-shadow: 0 20px 40px rgba(19,55,37,.16); opacity: 0; visibility: hidden; transform: translateY(-12px); transition: .2s ease; }
    .cns-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
    .cns-nav a { min-height: 50px; padding: 0 16px; border-radius: 9px; }
    .cns-nav a::after { right: auto; bottom: 10px; left: 0; width: 3px; height: 30px; transform: scaleY(0); }
    .cns-nav a:hover::after, .cns-nav a.is-active::after { transform: scaleY(1); }
    .cns-header.is-scrolled .cns-header__identity { display: flex; min-height: 76px; }
    .cns-header.is-scrolled .cns-brand__mark { width: 54px; height: 54px; }
    .cns-header.is-scrolled .cns-brand__mark img { max-width: 44px; max-height: 44px; }
}

@media (max-width: 680px) {
    .cns-shell { width: min(100% - 28px, var(--cns-shell)); }
    .cns-header__topbar-inner { justify-content: center; }
    .cns-header__identity { gap: 14px; }
    .cns-brand { gap: 11px; }
    .cns-brand__mark { width: 58px; height: 58px; border-radius: 15px; }
    .cns-brand__mark img { max-width: 48px; max-height: 48px; }
    .cns-brand__text strong { font-size: 1.45rem; }
    .cns-brand__text > span { max-width: 210px; font-size: .78rem; }
    .cns-footer__main { padding: 46px 0 38px; }
    .cns-footer__grid { grid-template-columns: 1fr; gap: 36px; }
    .cns-footer__links-inner, .cns-footer__bottom-inner { align-items: flex-start; flex-direction: column; }
    .cns-footer__links-inner { padding-block: 22px; }
    .cns-footer__links nav { justify-content: flex-start; }
    .cns-back-to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
