/* ХИМИК №300: shared spacing, hierarchy and controls; existing themes remain available. */
:root{--ui300-gap:8px;--ui300-line:color-mix(in srgb,currentColor 22%,transparent)}
html body [hidden],html body #root [hidden]{display:none!important}
html body header.header .header-inner{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;max-width:none;min-height:62px;padding:8px 14px!important}
html body .header-search{display:flex!important;flex:1 1 270px;align-items:center;gap:6px;min-width:180px;max-width:520px;margin:0!important}
html body .header-search label{flex:1;min-width:0;margin:0}
html body .header-search input{min-height:40px;margin:0;width:100%}
html body .header-search button{min-height:40px;padding:7px 10px;margin:0}
html body header.header nav.pins277{display:flex!important;flex:1 1 100px;flex-wrap:nowrap!important;min-width:0;max-width:30%;gap:5px;margin:0;overflow:hidden}
html body .pins277 a{white-space:nowrap;flex:none;padding:7px 9px;font-size:12px;line-height:1.35}
.quick-links300{display:flex;align-items:stretch;gap:6px;flex:none}
html body .quick-links300 .quick-link300{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;border:1px solid var(--ui300-line);border-radius:8px;padding:7px 10px;margin:0;font:600 13px/1.25 Arial,sans-serif;white-space:nowrap;color:inherit;background:color-mix(in srgb,currentColor 5%,transparent)}
html body .quick-links300 .quick-link300 img{width:23px;height:23px;object-fit:contain}
html body .quick-link300:hover{background:color-mix(in srgb,currentColor 12%,transparent)}
html body .header-controls255{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;margin:0;flex:none}
html body .header-identity255{display:flex;flex:none;align-items:center;gap:8px;min-width:max-content;margin:0;font-size:12px;white-space:nowrap}
html body .header-identity255>*{margin:0!important;white-space:nowrap}
html body header.header nav.pins277{flex:0 1 140px;max-width:15%}
html body header.header nav.pins277:empty{display:none!important}
html body .header-service-toggle255{min-height:40px;padding:7px 10px}
html body .header-utilities{gap:8px;align-items:start}
html body .header-utilities :is(a,button){margin:0;white-space:normal}
html body .sections277-flyout{padding:8px;max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);overscroll-behavior:contain}
html body .sections276-list .nav-target69{display:grid;grid-template-columns:minmax(0,1fr) 32px 32px;align-items:center;gap:3px;margin:0;width:100%}
html body .sections276-list .nav-target69>a{min-width:0;min-height:36px;display:flex;align-items:center;white-space:normal;padding:7px 8px;font-size:13px;line-height:1.35}
html body .sections276-list .nav-target69>button{display:flex;align-items:center;justify-content:center;width:32px;min-width:32px;min-height:32px;max-height:36px;padding:3px;margin:0;border:1px solid transparent;border-radius:6px;box-shadow:none;line-height:1}
html body .sections276-list .nav-target69>button[aria-pressed=true]{background:color-mix(in srgb,currentColor 9%,transparent);border-color:var(--ui300-line)}
html body .sections276-list .nav-group279{display:block;color:var(--kh-accent,#dfc990);font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;padding:12px 8px 5px;margin-top:4px;border-top:1px solid var(--ui300-line)}
html body .sections276-list .sections277-group-button{min-height:38px;padding:8px 10px;font-size:13px;text-align:left;justify-content:space-between}
html body .sections277-activity>div{min-width:300px;width:min(420px,calc(100vw - 24px));overflow-wrap:normal;word-break:normal}
html body .sections277-activity :is(td,th){word-break:normal;overflow-wrap:break-word;padding:7px 9px;vertical-align:top}
html body .desktop-frame .page-section{padding:20px 22px;max-width:none}
html body .desktop-frame .catalog-intro{padding:0;margin:0 0 16px;max-width:900px}
html body .desktop-frame .catalog-intro h1{font-size:28px;margin:0 0 8px}
html body .desktop-frame .catalog-intro .lead{font-size:14px;line-height:1.6;margin:0}
html body .desktop-frame .catalog-intro .eyebrow{margin-bottom:6px}
html body .desktop-frame .catalog>.catalog-intro{border:0!important;padding:8px 0 12px!important;margin:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important}
html body .desktop-frame .catalog>.catalog-intro h1{font:600 24px/1.3 Arial,sans-serif!important;margin:0 0 5px!important}
html body .desktop-frame .catalog>.catalog-intro .eyebrow{display:none!important}
html body .desktop-frame .catalog>.catalog-intro .lead{font:14px/1.5 Arial,sans-serif!important;margin:0!important}
html body .desktop-frame .catalog>.links264{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin:0 0 8px;padding:0}
html body .desktop-frame .catalog>.links264 a{display:inline-flex;align-items:center;min-height:32px;padding:2px 0!important;font-size:13px;border:0!important;border-bottom:1px solid var(--ui300-line)!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
html body .desktop-frame .card{padding:14px;border-radius:10px;min-height:0;display:flex;flex-direction:column;gap:10px}
html body .desktop-frame .card-open{padding:0;gap:14px;min-height:0;align-items:start}
html body .desktop-frame .material-grid[data-view] .card .card-open{padding:0!important;min-height:0!important;height:auto!important;gap:12px!important;grid-template-rows:auto!important}
html body .desktop-frame .material-grid[data-view=medium] .card .card-open{display:grid!important;grid-template-columns:72px minmax(0,1fr)!important}
html body .desktop-frame .material-grid[data-view=list] .card .card-open{display:grid!important;grid-template-columns:58px minmax(0,1fr)!important}
html body .desktop-frame .material-grid[data-view] .card .card-open:has(.book-cover-fallback){grid-template-columns:minmax(0,1fr)!important}
html body .desktop-frame .material-grid[data-view=medium] .book-jacket:not(.photo-jacket),html body .desktop-frame .material-grid[data-view=list] .book-jacket:not(.photo-jacket){width:100%!important;min-height:0!important;height:110px!important;max-height:110px!important;padding:0!important}
html body .desktop-frame .material-grid[data-view=medium] .book-jacket-image,html body .desktop-frame .material-grid[data-view=list] .book-jacket-image{max-height:110px!important;object-fit:contain!important;width:100%!important}
html body .desktop-frame .card-copy{padding:0;min-width:0}
html body .desktop-frame .card .book-jacket:not(.photo-jacket):has(.book-cover-fallback){display:none!important}
html body .desktop-frame .card-copy h3{font-family:Arial,sans-serif!important;font-size:16px!important;font-weight:600;line-height:1.4!important;margin:0 0 7px!important;overflow-wrap:break-word}
html body .desktop-frame .card-copy .eyebrow{font-size:10px;margin-bottom:5px}
html body .desktop-frame .card-tabs{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
html body .desktop-frame .card-summary{font-size:13px;line-height:1.5;margin:0 0 8px}
html body .material-actions300{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;padding-top:9px;border-top:1px solid var(--ui300-line)}
html body .material-actions300 :is(a,button){display:inline-flex;align-items:center;justify-content:center;min-height:34px;border:1px solid var(--ui300-line);border-radius:6px;padding:6px 10px;font:500 12px/1.35 Arial,sans-serif;color:inherit;background:transparent;white-space:normal}
html body .material-actions300 .material-primary300{font-weight:700;background:color-mix(in srgb,currentColor 8%,transparent)}
html body .material-actions300 button:disabled{opacity:.55}
html body .kh-programs272 h1{font-size:28px;margin-bottom:12px}
html body .kh-program-intro272{font-size:14px;line-height:1.5;margin:10px 0 14px}
html body .kh-program-search272{max-width:620px;margin:0 0 16px}
html body .kh-program-count272{font-size:12px;margin:8px 0}
html body .kh-program-card272{border-radius:10px;margin:8px 0;overflow:hidden}
html body .kh-program-title272{width:100%;padding:13px 15px;min-height:48px;text-align:left;font-size:14px;line-height:1.4;gap:12px}
html body .kh-program-chevron272{flex:none;margin-left:auto}
html body .kh-program-kind272{padding:0 15px 12px;margin:0;font-size:12px;line-height:1.5;opacity:.85}
html body .kh-program-body272{padding:0 15px 16px;line-height:1.55}
html body .kh-program-body272>p{font-size:13px;margin:10px 0}
html body .kh-program-actions272{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
html body .kh-program-actions272 :is(a,button){min-height:36px;margin:0;padding:7px 10px;font-size:12px}
html body .program-access300{border:1px solid var(--ui300-line);border-radius:9px;padding:14px;margin:10px 0;background:color-mix(in srgb,currentColor 4%,transparent)}
html body .program-access300 h2{font:700 16px/1.4 Arial,sans-serif;margin:0 0 7px}
html body .program-access300 p{font-size:13px;margin:7px 0}
html body .program-actions300{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
html body .program-actions300 :is(a,button){min-height:40px;margin:0;padding:8px 12px;font-size:13px}
html body .program-window300{display:flex;flex-direction:column;width:100%;min-width:0;margin:16px 0;border:1px solid var(--ui300-line);border-radius:9px;overflow:hidden;background:var(--kh-surface,#1d293d)}
html body .program-window-tools300{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px}
html body .program-window-tools300 strong{flex:1;min-width:200px;font-size:13px;line-height:1.4}
html body .program-window-tools300 button{min-height:38px;padding:7px 10px;margin:0;font-size:12px}
html body .program-window300>iframe{display:block;width:100%;height:75dvh;min-height:480px;border:0;flex:1}
html body .program-window300:fullscreen{height:100dvh;margin:0;border:0;border-radius:0}
html body .program-window300:fullscreen>iframe{height:auto;min-height:0}
html body .elina-examples276{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;align-items:stretch}
html body .elina-examples276>*{min-width:0;width:100%;margin:0}
html body .elina-examples276 :is(button,summary){min-height:38px;text-align:left;justify-content:flex-start;white-space:normal}
html body .elina-more284>div{display:flex;flex-direction:column;gap:6px}
html body .map-options-a{position:relative;margin:0}
html body .map-options-a>div{position:absolute;left:auto;right:0;top:100%;width:min(330px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:65dvh;overflow:auto;z-index:20;padding:8px;box-sizing:border-box}
html body .map-options-a>div button{width:100%;white-space:normal;min-height:42px;padding:9px;margin:3px 0;text-align:left}
html body .map-toolbar{display:flex;flex-wrap:wrap;gap:7px;padding:8px;align-items:center}
html body .desktop-frame .desktop-bar{min-height:40px;gap:5px;padding:5px 9px}
html body .desktop-frame .desktop-bar button{min-width:30px;min-height:30px;padding:4px}
html body .pdf-reader-controls{display:flex;flex-wrap:wrap;gap:6px;padding:8px}
html body .pdf-reader-controls :is(button,input,select){min-height:36px}
@media(min-width:701px) and (max-width:1250px){html body header.header nav.pins277{max-width:16%;flex-basis:50px}.quick-links300 .quick-link300{padding:7px!important;font-size:12px!important}}
@media(max-width:700px),(max-width:1100px) and (max-height:600px) and (pointer:coarse){
 html body header.header .header-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:8px 10px!important;min-height:0;border-radius:10px}
 html body .quick-links300{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:.65fr 1.2fr 1fr;gap:6px;width:100%}
 html body .quick-links300 .quick-link300{min-height:40px;padding:6px 7px;font-size:12px;white-space:normal}
 html body .header-search{grid-column:1/-1;grid-row:2;max-width:none;min-width:0;width:100%;margin:0}
 html body .header-search input{min-height:40px;font-size:14px}
 html body header.header nav.pins277{display:none!important}
 html body .header-controls255{grid-column:1;grid-row:3;justify-content:flex-start;min-width:0;flex-wrap:nowrap}
 html body .header-identity255{grid-column:2;grid-row:3;font-size:11px}
 html body #mobile-menu287 .brand-toggle212{width:38px;min-width:38px;min-height:38px;height:38px;padding:2px}
 html body #mobile-menu287 .brand-toggle212 :is(img,svg,canvas){max-width:34px;max-height:34px}
 html body .elina-slot286{width:38px;min-width:38px;max-height:40px}
 html body .elina-slot286 :is(img,canvas,svg){max-height:38px;max-width:38px}
 html body .sections277-rail{background:var(--kh-surface,#1d293d)!important;backdrop-filter:none;max-width:100vw}
 html body .sections277-flyout{padding:7px;max-width:100%;max-height:none}
 html body .sections276-list .nav-target69{grid-template-columns:minmax(0,1fr) 42px 42px;gap:3px}
 html body .sections276-list .nav-target69>a{min-height:44px;font-size:14px;padding:8px}
 html body .sections276-list .nav-target69>button{width:42px;min-height:42px;max-height:44px}
 html body .sections276-list .sections277-group-button{min-height:44px;font-size:14px}
 html body .subgroup283>summary{font-size:13px;font-weight:700;padding:10px;min-height:42px;color:var(--kh-accent,#dfc990)}
 html body .mobile-extra287{padding:12px 0 4px;margin-top:10px}
 html body .mobile-extra287 h2{font:700 12px/1.4 Arial,sans-serif;letter-spacing:.05em;text-transform:uppercase;margin:0 0 8px}
 html body .mobile-extra287 .header-utilities{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px}
 html body .mobile-extra287 .header-utilities>*{width:100%;margin:0!important;align-self:stretch!important}
 html body .mobile-extra287 .appearance-lab207{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:7px;flex-wrap:wrap}
 html body .mobile-extra287 :is(button,a){min-height:42px;margin:0;padding:8px 10px;font-size:13px}
 html body .mobile-extra287 .pin-overflow281:not(:empty){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px 0}
 html body .mobile-extra287 .pin-overflow281>*{display:flex;align-items:center;justify-content:flex-start;border:1px solid var(--ui300-line);border-radius:7px;line-height:1.35}
 html body .desktop-frame .page-section{padding:12px}
 html body .desktop-frame .card{padding:11px;gap:8px}
 html body .desktop-frame .card-copy h3{font-size:15px}
 html body .material-actions300{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 html body .material-actions300 :is(a,button){min-height:42px;padding:8px;font-size:12px}
 html body .kh-program-title272{padding:12px;font-size:14px}
 html body .kh-program-kind272{padding:0 12px 10px;font-size:12px}
 html body .kh-program-body272{padding:0 12px 12px}
 html body .program-actions300{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 html body .program-actions300 :is(a,button){min-height:44px;padding:8px;font-size:12px}
 html body .desktop-frame .desktop-bar{min-height:42px;padding:4px 6px}
 html body .desktop-frame .desktop-bar button{min-width:36px;min-height:36px}
 html body .map-options-a>div{left:0;right:auto;width:min(290px,calc(100vw - 36px))}
 html body .map-toolbar{position:relative}
 html body .map-options-a{position:static}
 html body .map-options-a>div{left:6px;right:6px;width:auto;max-width:none}
 html body .elina-examples276 :is(button,summary){min-height:44px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* The inherited mobile shell uses named grid areas and !important widths. */
html body #root header.header .header-inner{gap:8px!important;padding:8px 12px!important}
html body #root header.header .quick-links300{padding:0;border:0;margin:0}
html body #root header.header .header-identity255{min-width:max-content;gap:8px}
html body #root header.header .header-inner>.header-identity255{flex:0 0 auto!important;min-width:max-content!important;width:max-content!important;overflow:visible}
html body #root header.header .header-inner>nav.pins277:empty{display:none!important}
@media(max-width:700px),(max-width:1100px) and (max-height:600px) and (pointer:coarse){
 html body #root header.header{left:0!important;right:0!important;width:auto!important;margin:6px!important;padding:0!important}
 html body #root header.header .header-inner{width:100%!important;height:auto!important;min-height:0!important;max-width:100%!important;margin:0!important;padding:8px!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"quick" "search" "controls"!important;gap:7px!important}
 html body #root header.header .header-inner>.brand-group212{display:none!important}
 html body #root header.header .header-inner>.quick-links300{grid-area:quick!important;display:grid!important;grid-template-columns:.65fr 1.2fr 1fr!important;gap:6px!important;min-height:40px}
 html body #root header.header .quick-links300 .quick-link300{display:flex!important;min-width:0!important;min-height:40px!important;height:40px!important;padding:6px!important;font-size:12px!important;white-space:nowrap!important;gap:4px!important}
 html body #root header.header .quick-links300 .quick-link300 span{display:inline!important;white-space:nowrap!important}
 html body #root header.header .quick-links300 .quick-link300>span[aria-hidden]{display:none!important}
 html body #root header.header .quick-links300 img{width:20px!important;height:20px!important}
 html body #root header.header .header-inner>.header-search{grid-area:search!important;position:static!important;width:100%!important;min-width:0!important;max-width:none!important;height:40px!important;padding:0!important;display:flex!important}
 html body #root header.header .header-search input{height:40px!important;min-height:40px!important;font-size:14px!important}
 html body #root header.header .header-search button{display:inline-flex!important;min-height:40px!important;height:40px!important}
 html body #root header.header .header-inner>nav.pins277:not(:empty),html body #root header.header .header-inner>nav.pins277:empty{display:none!important}
 html body #root header.header .header-inner>.header-controls255{grid-area:controls!important;justify-content:flex-start!important;position:static!important;gap:7px!important;width:auto!important}
 html body #root header.header .header-inner>.header-identity255{display:none!important}
 html body #root header.header .header-controls255 .brand-toggle212{width:38px!important;height:38px!important;min-height:38px!important;min-width:38px!important}
 html body #root header.header .header-service255{display:none!important}
 html body .sections277-rail .mobile-extra287 .mobile-auth248{display:flex!important;align-items:center;min-height:42px}
 html body #root header.header .header-controls255 .elina-slot286{width:38px!important;min-width:38px!important;max-width:38px!important;overflow:hidden}
 html body #root header.header .header-controls255{justify-self:start!important;max-width:100%!important}
 html body .desktop-frame .kh-programs272>h1{display:none!important}
}
