/* AGLASHAY global visual system v1
   Editorial classicism: mineral patina, graphite, porcelain, muted signal red. */

:root {
  --agl-porcelain: #f4f1ec;
  --agl-white: #ffffff;
  --agl-graphite: #1d1e20;
  --agl-mineral: #6f8f8a;
  --agl-mineral-light: #dce9e5;
  --agl-petrol: #335b58;
  --agl-signal: #c43d56;
  --agl-focus: #456f69;
  --agl-glass-border: rgba(207, 226, 221, .78);
}

/* Global frosted header. Kept light for readable black branding on every page. */
#agn-shared-bar {
  outline: none !important;
  background-color: rgba(111, 143, 138, .16) !important;
  background-image: linear-gradient(118deg, rgba(255, 255, 255, .64), rgba(111, 143, 138, .18)) !important;
  border: 1px solid var(--agl-glass-border) !important;
  box-shadow: 0 14px 38px rgba(33, 43, 41, .10), inset 0 1px 0 rgba(255, 255, 255, .84) !important;
  -webkit-backdrop-filter: blur(16px) saturate(118%);
  backdrop-filter: blur(16px) saturate(118%);
  transition: background .32s ease, border-color .32s ease, box-shadow .32s ease, transform .32s cubic-bezier(.22, .72, .2, 1) !important;
}

#agn-shared-bar::before,
#agn-shared-bar::after {
  background: transparent !important;
  box-shadow: none !important;
}

/* Open menu continues the same material instead of becoming a white card. */
#agn-shared-bar .agn-drawer {
  position: relative;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: linear-gradient(145deg, rgba(245, 249, 248, .78), rgba(208, 226, 221, .54)) !important;
  border: 1px solid rgba(219, 234, 230, .90) !important;
  box-shadow: 0 24px 64px rgba(33, 43, 41, .15), inset 0 1px 0 rgba(255, 255, 255, .90) !important;
  -webkit-backdrop-filter: blur(20px) saturate(125%);
  backdrop-filter: blur(20px) saturate(125%);
  transform-origin: top right;
  transition: opacity .34s ease, transform .40s cubic-bezier(.22, .72, .2, 1) !important;
}

#agn-shared-bar .agn-drawer a {
  border-radius: 10px;
  transition: color .22s ease, background-color .22s ease, transform .25s cubic-bezier(.22, .72, .2, 1) !important;
}

#agn-shared-bar .agn-drawer a:hover,
#agn-shared-bar .agn-drawer a:focus-visible {
  color: var(--agl-petrol) !important;
  background: rgba(255, 255, 255, .38);
  transform: translateX(4px);
}

/* Muted red remains a signal, while secondary actions move to mineral tones. */
.agp-button:not(.agp-secondary),
button.primary,
a.primary {
  background-color: var(--agl-signal) !important;
  border-color: var(--agl-signal) !important;
}

.agp-secondary,
button.about-course,
a.about-course {
  color: var(--agl-petrol) !important;
  border-color: rgba(51, 91, 88, .46) !important;
}

button.about-course:hover,
a.about-course:hover,
.agp-secondary:hover {
  color: var(--agl-focus) !important;
  border-color: var(--agl-mineral) !important;
  background-color: rgba(220, 233, 229, .44) !important;
}

/* Tilda elements that carry the former brand red inline receive the softer signal tone. */
.t-btn[style*="#ed0033"],
.t-btn[style*="#ED0033"],
[style*="background-color:#ed0033"],
[style*="background-color: #ed0033"] {
  background-color: var(--agl-signal) !important;
  border-color: var(--agl-signal) !important;
}

[style*="border-color:#ed0033"],
[style*="border-color: #ed0033"] {
  border-color: var(--agl-mineral) !important;
}

/* Quiet mineral interaction layer. Information never depends on colour alone. */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--agl-mineral) !important;
  box-shadow: 0 0 0 3px rgba(111, 143, 138, .14) !important;
  outline: none !important;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--agl-focus) !important;
  outline-offset: 3px;
}

::selection {
  color: var(--agl-graphite);
  background: var(--agl-mineral-light);
}

@media (max-width: 700px) {
  #agn-shared-bar {
    background-color: rgba(111, 143, 138, .18) !important;
    background-image: linear-gradient(125deg, rgba(255, 255, 255, .70), rgba(111, 143, 138, .20)) !important;
    -webkit-backdrop-filter: blur(14px) saturate(112%);
    backdrop-filter: blur(14px) saturate(112%);
  }

  #agn-shared-bar .agn-drawer {
    background: linear-gradient(155deg, rgba(247, 250, 249, .86), rgba(211, 228, 223, .64)) !important;
    -webkit-backdrop-filter: blur(16px) saturate(116%);
    backdrop-filter: blur(16px) saturate(116%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #agn-shared-bar,
  #agn-shared-bar .agn-drawer,
  #agn-shared-bar .agn-drawer a {
    transition: none !important;
  }
}


/* AGLASHAY audit 2026-09-27: readable menu and original brand arrows */
html body #agn-shared-bar .agn-drawer{isolation:isolate!important;overflow-y:auto!important;}
html body #agn-shared-bar .agn-drawer::before{content:""!important;display:block!important;position:absolute!important;inset:0!important;z-index:0!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;filter:none!important;opacity:1!important;border-radius:inherit!important;background:rgba(246,247,246,.97)!important;backdrop-filter:blur(34px) saturate(105%)!important;-webkit-backdrop-filter:blur(34px) saturate(105%)!important;pointer-events:none!important;}
html body #allrecords :is(.agp-button,#ags-all-programs,.agl-school-btn,.ags-link,.gg-btn,.gg-link)>span[aria-hidden="true"],html body #allrecords [data-agl26] a>span[aria-hidden="true"],html body #allrecords :is(a[data-full-catalog],a.a-sub-entry,a.aghx-contact-button)>svg,html body #allrecords #agl-app button>svg.arrow-icon{display:inline-block!important;width:36px!important;height:28px!important;min-width:36px!important;flex:0 0 36px!important;vertical-align:middle!important;font-size:0!important;line-height:0!important;background-color:currentColor!important;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%2288%200%2041%2032%22%20fill%3D%22none%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M126%2016C126%2023.1112%20120.072%2029%20112.605%2029C108.897%2029%20105.569%2027.548%20103.157%2025.2153L99.6585%2025.8179C102.658%2029.5799%20107.342%2032%20112.605%2032C121.66%2032%20129%2024.8366%20129%2016C129%207.16344%20121.66%20-9.90487e-07%20112.605%20-5.94693e-07C106.939%20-3.47042e-07%20101.945%202.80456%2099%207.06871L102.344%207.64465C104.79%204.8142%20108.46%203%20112.605%203C120.072%203%20126%208.88885%20126%2016Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M112.64%2016L89%2016M106.703%2023L113%2016L106.703%209.00003%22%20stroke%3D%22black%22%20stroke-width%3D%223%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat!important;-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%2288%200%2041%2032%22%20fill%3D%22none%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M126%2016C126%2023.1112%20120.072%2029%20112.605%2029C108.897%2029%20105.569%2027.548%20103.157%2025.2153L99.6585%2025.8179C102.658%2029.5799%20107.342%2032%20112.605%2032C121.66%2032%20129%2024.8366%20129%2016C129%207.16344%20121.66%20-9.90487e-07%20112.605%20-5.94693e-07C106.939%20-3.47042e-07%20101.945%202.80456%2099%207.06871L102.344%207.64465C104.79%204.8142%20108.46%203%20112.605%203C120.072%203%20126%208.88885%20126%2016Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M112.64%2016L89%2016M106.703%2023L113%2016L106.703%209.00003%22%20stroke%3D%22black%22%20stroke-width%3D%223%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat!important;transform:none!important;transition:background-color .2s ease!important;}
html body #allrecords :is(a[data-full-catalog],a.a-sub-entry,a.aghx-contact-button)>svg>*,html body #allrecords #agl-app button>svg.arrow-icon>*{visibility:hidden!important;}
@media(hover:hover) and (pointer:fine){html body #allrecords a[data-full-catalog]:hover>svg{background-color:#e70a29!important;}html body #allrecords a[data-full-catalog]:hover{-webkit-text-fill-color:#e70a29;}}
@media(prefers-reduced-motion:reduce){html body #allrecords :is(.agp-button,#ags-all-programs,.agl-school-btn,.ags-link,.gg-btn,.gg-link)>span[aria-hidden="true"],html body #allrecords [data-agl26] a>span[aria-hidden="true"],html body #allrecords :is(a[data-full-catalog],a.a-sub-entry,a.aghx-contact-button)>svg{transition:none!important;}}

html body #agn-shared-bar .agn-drawer>div{position:relative!important;z-index:1!important;}
html body #agn-shared-bar .agn-drawer::after{content:none!important;}

html body #agn-shared-bar:has(.agn-menu[open]){opacity:1!important;}
html body #agn-shared-bar .agn-drawer::before{aspect-ratio:auto!important;}

/* Show only the checkout caption provided by the GetCourse integration. */
html body .t-btnflex:has(>span[data-agl-caption="1"])>.t-btnflex__text{display:none!important;}

/* AGLASHAY 27.11.2026: cookie-баннер — тонкая полоса внизу по ширине шапки (логика согласия в head, agl-cookie-consent, без изменений). */
html body #agl-ck{left:50%!important;right:auto!important;bottom:12px!important;transform:translateX(-50%);width:min(1140px,calc(100% - 40px))!important;max-width:none!important;margin:0!important;display:flex!important;align-items:center;gap:6px 16px;padding:10px 10px 10px 20px!important;border-radius:16px!important;background:rgba(255,255,255,.9)!important;border:1px solid rgba(18,19,22,.08)!important;box-shadow:0 8px 28px rgba(18,19,22,.10)!important;-webkit-backdrop-filter:blur(18px) saturate(1.4)!important;backdrop-filter:blur(18px) saturate(1.4)!important;font-size:13px!important;line-height:1.45!important;animation:aglck .3s ease both}
@keyframes aglck{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
html body #agl-ck>b{flex:none;display:block!important;margin:0!important;font-size:13px!important;font-weight:600!important;white-space:nowrap}
html body #agl-ck>p{flex:1 1 auto;min-width:0;margin:0!important;color:#4a4d55!important}
html body #agl-ck a{text-decoration-color:rgba(18,19,22,.3)!important;text-underline-offset:3px!important}
html body #agl-ck .r{flex:none;display:flex!important;gap:6px!important;flex-wrap:nowrap!important}
html body #agl-ck button{flex:none!important;font-weight:500!important;font-size:13px!important;line-height:1!important;border-radius:999px!important;padding:11px 16px!important;border:1px solid rgba(18,19,22,.14)!important;background:transparent!important;color:inherit!important;white-space:nowrap;transition:background-color .15s,border-color .15s,color .15s}
html body #agl-ck button:hover{border-color:rgba(18,19,22,.35)!important}
html body #agl-ck button.y{background:#121316!important;border-color:#121316!important;color:#fff!important}
html body #agl-ck button.y:hover{background:#f2541b!important;border-color:#f2541b!important}
html[data-agl-theme=dark] body #agl-ck,html.agl-ck-dark body #agl-ck{color:#f3f3f4!important;background:rgba(27,28,32,.88)!important;border-color:rgba(255,255,255,.10)!important;box-shadow:0 8px 28px rgba(0,0,0,.35)!important}
html[data-agl-theme=dark] body #agl-ck>p,html.agl-ck-dark body #agl-ck>p{color:#b4b7be!important}
html[data-agl-theme=dark] body #agl-ck a,html.agl-ck-dark body #agl-ck a{text-decoration-color:rgba(255,255,255,.35)!important}
html[data-agl-theme=dark] body #agl-ck button:not(.y),html.agl-ck-dark body #agl-ck button:not(.y){border-color:rgba(255,255,255,.18)!important}
html[data-agl-theme=dark] body #agl-ck button.y,html.agl-ck-dark body #agl-ck button.y{background:#f3f3f4!important;border-color:#f3f3f4!important;color:#121316!important}
html[data-agl-theme=dark] body #agl-ck button.y:hover,html.agl-ck-dark body #agl-ck button.y:hover{background:#f2541b!important;border-color:#f2541b!important;color:#fff!important}
@media(max-width:820px){html body #agl-ck{width:calc(100% - 28px)!important;bottom:10px!important}}
@media(max-width:900px){html body #agl-ck{flex-wrap:wrap}html body #agl-ck>p{flex-basis:100%;order:2}html body #agl-ck>b{order:1}html body #agl-ck .r{order:3;margin-left:auto}}
@media(max-width:640px){html body #agl-ck{padding:12px 12px 12px 14px!important;border-radius:14px!important;font-size:12.5px!important}html body #agl-ck .r{display:grid!important;grid-template-columns:1fr 1fr;width:100%;margin:4px 0 0}html body #agl-ck button{padding:10px 8px!important;font-size:12.5px!important}}
@media(prefers-reduced-motion:reduce){html body #agl-ck{animation:none}}

/* AGLASHAY 27.11.2026: логотип шапки #ags везде в два ряда — AGLASHAY, под ним School (как на мобильной /school). */
html body #ags .bar .logo,html body #ags .logo{display:grid!important;grid-template-columns:auto auto;grid-template-rows:auto auto;column-gap:9px!important;row-gap:4px;align-items:center;justify-content:start;line-height:1}
html body #ags .logo .pyr{grid-row:1/3;grid-column:1;width:27px!important}
html body #ags .logo svg.wm{grid-column:2;grid-row:1;height:12.5px!important;width:auto!important;align-self:end}
html body #ags .logo small{display:block!important;grid-column:2;grid-row:2;align-self:start;font-size:12.5px!important;line-height:1!important;letter-spacing:.01em!important;margin:0!important}
@media(max-width:820px){html body #ags .logo .pyr{width:23px!important}html body #ags .logo svg.wm{height:10.5px!important}html body #ags .logo small{font-size:11.5px!important}html body #ags .logo{row-gap:3px;column-gap:8px!important}}
@media(max-width:480px){html body #ags .logo .pyr{width:21px!important}html body #ags .logo svg.wm{height:10px!important}html body #ags .logo small{font-size:11px!important}html body #ags .logo{row-gap:2px;column-gap:7px!important}}
@media(max-width:400px){html body #ags .logo{column-gap:6px!important;flex:0 1 auto;min-width:0}html body #ags .logo .pyr{width:19px!important}html body #ags .logo svg.wm{height:9px!important}html body #ags .logo small{font-size:10.5px!important}}
@media(max-width:380px){html body #ags .bar .r{gap:3px!important}html body #ags .bar .ib:not(.w){width:32px!important;min-width:32px!important}html body #ags .bar .ib.w{padding:0 9px!important;font-size:12.5px!important}}
