/* The top bar and the footer of every page (both families). One definition: templates/site3-parts.html ("kr-bar", "kr-footer").
   Loaded by the courses (with site3.css) and by the old pages (with kr-ui.css). Every selector is under .kr-top or .kr-bot, and the
   tokens, font and reset are set on those two elements, so the file changes nothing in a page body and depends on nothing in it.
   The bar is dark; a menu opens on hover, with no script also on keyboard focus. The account control holds both branches: html[data-auth]
   (set by auth-init) shows one. site3.js: Enter, Space, arrow keys and Escape of a level menu. */
@font-face{font-family:"Space Grotesk";font-weight:300 700;font-display:swap;src:url(fonts/space-grotesk-latin.woff2) format("woff2")}
@font-face{font-family:"Inter Text";font-weight:100 900;font-display:swap;src:url(fonts/inter-latin.woff2) format("woff2")}
@font-face{font-family:"JetBrains Mono";font-weight:400 700;font-display:swap;src:url(fonts/jetbrains-mono-latin.woff2) format("woff2")}

.kr-top,.kr-bot{--bg:#0a0e13;--red:#dc2626;--red-l:#f87171;--dtext:#a9b4c0;--head:"Space Grotesk",system-ui,sans-serif;--mono:"JetBrains Mono",ui-monospace,monospace;
  direction:ltr;font:16px/1.6 "Inter Text",system-ui,sans-serif;letter-spacing:normal;text-align:left;text-transform:none;-webkit-font-smoothing:auto}
.kr-top *,.kr-bot *{box-sizing:border-box;margin:0}
.kr-top a,.kr-bot a{color:inherit;text-decoration:none}
.kr-top svg,.kr-bot svg{flex:none}
.kr-top ul,.kr-bot ul{list-style:none;padding:0}
.kr-top button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:inherit}
.kt-w{max-width:1160px;margin:0 auto;padding:0 24px}
body:has(main.lesson:not(.item),main.sheet,[data-start]) .kr-top .kt-cta,body:has(main.lesson:not(.item),main.sheet,[data-start]) .kr-top .kt-how{display:none!important}/* in a course "Start free" has nothing to start */
html[data-auth=in] .kr-top [data-authnav-out],html:not([data-auth=in]) .kr-top [data-authnav-in],html:not([data-auth-role=admin]) .kr-top [data-admin-only]{display:none!important}
.kt-logo{display:inline-flex;align-items:center;gap:10px;font:700 15px var(--head);letter-spacing:.1em;color:#fff}
.kt-logo svg{color:var(--red);width:26px;height:26px}

/* bar */
.kr-top{position:sticky;top:0;z-index:9;background:var(--bg);border-bottom:1px solid #ffffff12;color:#d5dbe2}
.kr-top .kt-w{position:relative;display:flex;align-items:center;gap:32px;height:64px}
.kr-top a{font-size:14.5px;white-space:nowrap}
.kr-top .kt-home{display:inline-flex;align-items:center;min-height:44px}
.kr-top .kt-skip{position:absolute;left:16px;top:-80px;z-index:20;padding:10px 16px;border-radius:0 0 9px 9px;background:var(--red);color:#fff;font-weight:600}
.kr-top .kt-skip:focus{top:0}

/* menu: "Courses" and "Labs" are buttons that open one panel each. A panel has two columns: on the left its groups (the levels of the
   courses; the shelves of the library that no course covers), on the right the items of one group (class "on": site3.js moves it to the
   group under the pointer or the focus; with no script the :hover and :focus-within rules below do it). The panel opens on hover, and on
   Enter or Space (site3.js adds .open and keeps aria-expanded). With no script it also opens on keyboard focus. Arrow keys move inside,
   Escape closes it (.shut keeps it closed until the pointer or the focus leaves), Tab leaves it. The panel hangs under the bar, centred. */
.kr-top .menu{margin-left:auto}
.kr-top .menu>ul{display:flex;gap:2px}
.kr-top .menu>ul>li{display:flex;align-items:center;height:64px}
.kr-top .menu>ul>li>a,.kr-top .menu>ul>li>button{display:flex;align-items:center;gap:8px;min-height:44px;padding:9px 12px;border-radius:8px;font-size:14.5px;white-space:nowrap}
.kr-top .menu>ul>li.has>button::after{content:"";width:6px;height:6px;margin-top:-3px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);opacity:.7}
.kr-top .menu>ul>li:hover>a,.kr-top .menu>ul>li:hover>button,.kr-top .menu>ul>li:focus-within>a,.kr-top .menu>ul>li:focus-within>button,.kr-top .menu>ul>li.open>button{background:#ffffff12;color:#fff}
.kr-top .mega{position:absolute;z-index:10;top:100%;left:50%;width:min(800px,calc(100% - 48px));padding:10px;background:#0f151c;border:1px solid #ffffff1f;border-radius:0 0 14px 14px;border-top:0;box-shadow:0 30px 60px -20px #000;visibility:hidden;opacity:0;transform:translate(-50%,6px);transition:opacity .14s,transform .14s,visibility 0s .14s}
.kr-top .menu li:not(.shut):hover>.mega,.kr-top .menu:not(.kt-js) li:not(.shut):focus-within>.mega,.kr-top .menu li.open>.mega{visibility:visible;opacity:1;transform:translate(-50%);transition-delay:0s}
.kr-top .menu li.shut>.mega{transition:none}
.kr-top .mega-h{display:flex;align-items:center;padding:4px 10px 8px;font:600 11.5px var(--mono);text-transform:uppercase;letter-spacing:.08em;color:#8c98a5}
.kr-top .mega-f{display:flex;align-items:center;min-height:44px;margin-top:6px;padding:0 10px;border-top:1px solid #ffffff14;border-radius:0 0 8px 8px;font-size:13px;color:#a9b4c0}
.kr-top .mega-f:hover,.kr-top .mega-f:focus-visible{color:#fff;background:#ffffff12}
.kr-top .mega-l{display:grid;grid-template-columns:250px 1fr;grid-template-rows:repeat(12,min-content) 1fr;column-gap:10px;max-height:calc(100vh - 150px);overflow-y:auto}
.kr-top #m-courses .mega-l{min-height:400px}
.kr-top .sub{display:contents}
.kr-top .sub>button{grid-column:1;display:flex;align-items:center;width:100%;min-height:48px;padding:8px 10px;border-radius:8px;line-height:1.3;white-space:normal}
.kr-top .sub>button .lv{align-self:flex-start;margin-top:2px}
.kr-top .sub.on>button,.kr-top .sub>button:focus-visible{background:#ffffff12}
.kr-top .sub.on>button::after{content:"";flex:none;width:6px;height:6px;margin-left:auto;border:solid var(--red-l);border-width:1.5px 1.5px 0 0;transform:rotate(45deg)}
.kr-top .pane{grid-column:2;grid-row:1/-1;display:none;padding-left:10px;border-left:1px solid #ffffff14}
.kr-top .sub.on>.pane{display:block}
.kr-top .menu:not(.kt-js) .mega-l:is(:hover,:focus-within) .sub.on:not(:hover,:focus-within)>.pane{display:none}
.kr-top .menu:not(.kt-js) .sub:is(:hover,:focus-within)>.pane{display:block}
.kr-top .mega-c{display:grid;grid-template-columns:1fr 1fr;gap:0 6px}
.kr-top .mega-b{display:flex;flex-wrap:wrap;gap:4px 6px;margin-top:10px;padding-top:6px;border-top:1px solid #ffffff14}
.kr-top .mega-b a{display:flex;align-items:center;min-height:44px;padding:0 10px;border-radius:8px;font-size:13px;color:#a9b4c0}
.kr-top .mega-b a:hover,.kr-top .mega-b a:focus-visible{color:#fff;background:#ffffff12}
.kr-top .mega-c a,.kr-top .soon{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 10px;border-radius:8px;line-height:1.3;white-space:normal}
.kr-top .mega-c a:hover,.kr-top .mega-c a:focus-visible{background:#ffffff12;color:#fff}
.kr-top .kt-ico{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:#f8717118;color:var(--red-l)}
.kr-top .mega b{display:block;font-weight:600;color:#fff}.kr-top .mega small{font-size:12.5px;color:#8c98a5}
.kr-top .soon{opacity:.55}
/* the level mark: three bars, the first n are red */
.kr-top .lv{display:inline-flex;align-items:flex-end;gap:3px;height:18px;margin-right:10px}
.kr-top .lv i{width:5px;border-radius:1.5px;background:#c9ced5}
.kr-top .lv i:nth-child(1){height:7px}.kr-top .lv i:nth-child(2){height:12px}.kr-top .lv i:nth-child(3){height:18px}
.kr-top .lv.foundations i:first-child{background:#388bfd}.kr-top .lv.core i:nth-child(-n+2){background:var(--red)}.kr-top .lv.advanced i{background:#f0883e}

/* search, account, start */
.kr-top .burger{display:none}
.kr-top .top-cta{display:flex;align-items:center;gap:6px}
.kr-top .kt-s,.kr-top .kt-in,.kr-top .kt-me{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;border-radius:8px;color:#c9d1d9}
.kr-top .kt-s,.kr-top .kt-s:hover,.kr-top .kt-s:focus-visible{border:0}
.kr-top .kt-s:hover,.kr-top .kt-in:hover,.kr-top .kt-me:hover,.kr-top .kt-me[aria-expanded=true]{color:#fff;background:#ffffff12}
.kr-top .kt-s{padding:0;background:none}.kr-top .kt-in{padding:0 12px}
.kr-top .kt-me span,.kr-top .kt-me img{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;object-fit:cover;background:linear-gradient(140deg,#ec5b42,#96201a);color:#fff;font:700 14px var(--head);text-transform:uppercase}
.kr-top .kt-cta{display:inline-flex;align-items:center;justify-content:center;margin-left:12px;padding:8px 16px;border:1px solid transparent;border-radius:9px;background:var(--red);color:#fff;font-weight:600;box-shadow:0 8px 24px -8px #dc2626aa;transition:.18s}
.kr-top .kt-cta:hover{background:#ef4444;transform:translateY(-1px)}
.kr-top .kt-menu{position:absolute;z-index:10;top:100%;right:24px;width:250px;padding:8px;background:#0f151c;border:1px solid #ffffff1f;border-top:0;border-radius:0 0 14px 14px;box-shadow:0 30px 60px -20px #000}
.kr-top .kt-menu p{display:grid;margin-bottom:6px;padding:8px 10px 10px;border-bottom:1px solid #ffffff14;line-height:1.3;overflow-wrap:anywhere}
.kr-top .kt-menu p b{font-weight:600;color:#fff}.kr-top .kt-menu small{font-size:12.5px;color:#8c98a5}
.kr-top .kt-menu .mi{display:flex;align-items:center;gap:12px;width:100%;min-height:40px;padding:0 10px;border-radius:8px;font-size:14.5px;color:#d5dbe2}
.kr-top .kt-menu .mi:hover,.kr-top .kt-menu .mi:focus-visible{background:#ffffff12;color:#fff}
.kr-top .kt-menu .mi svg{color:var(--red-l)}
.kr-top .kt-menu .msep{height:1px;margin:6px 4px;background:#ffffff14}

/* footer: the brand, then the links in four groups, every link a tap of 40px */
.kr-bot{background:var(--bg);color:var(--dtext);border-top:1px solid #ffffff12;font-size:14px}
.kr-bot .kt-w{display:flex;flex-wrap:wrap;align-items:center;gap:0 20px;padding-block:28px}
.kr-bot nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 24px;flex-basis:100%;margin-top:18px;padding-top:18px;border-top:1px solid #ffffff12}
.kr-bot nav p{margin-bottom:4px;font:600 11.5px var(--mono);text-transform:uppercase;letter-spacing:.08em;color:#8c98a5}
.kr-bot nav a{display:flex;align-items:center;min-height:40px}
.kr-bot a:hover{color:#fff}

.kr-top :focus-visible,.kr-bot :focus-visible{outline:2px solid #fff;outline-offset:2px}
@media print{.kr-top,.kr-bot{display:none!important}}
@media (prefers-reduced-motion:reduce){.kr-top *{transition-duration:0s!important}}

@media (max-width:1180px){
  .kr-top .kt-w{gap:16px}.kr-top .kt-w .menu>ul{gap:0}.kr-top a,.kr-top .menu>ul>li>button{font-size:14px}
  .kr-top .menu>ul>li>a,.kr-top .menu>ul>li>button{padding:9px 8px;gap:6px}.kr-top .kt-cta{margin-left:6px;padding:8px 12px}.kr-top .kt-in{padding:0 8px}
}
@media (max-width:1000px){
  .kr-top .menu{display:none}.kr-top .kt-w{gap:14px}.kr-top .top-cta{margin-left:auto}
  .kr-top .burger{display:block;order:1}
  .kr-top .kt-s,.kr-top .kt-in,.kr-top .kt-me{min-width:44px;min-height:44px}
  .kr-top .burger>summary{display:grid;place-items:center;width:44px;height:44px;border:1px solid #ffffff24;border-radius:9px;cursor:pointer;list-style:none}
  .kr-top .burger summary::-webkit-details-marker{display:none}
  .kr-top .burger[open]>summary{background:#ffffff14}
  .kr-top .burger[open]::before{content:"";position:fixed;inset:64px 0 0;background:#000a}/* the scrim: a tap on it closes the menu (site3.js) */
  html:has(.kr-top .burger[open]){overflow:hidden}
  .kr-top .burger:not([open])>div{display:none}
  .kr-top .burger>div{position:absolute;left:0;right:0;top:64px;max-height:calc(100vh - 64px);overflow:auto;padding:8px 24px 22px;background:var(--bg);border-bottom:1px solid #ffffff1f;box-shadow:0 30px 40px -20px #000}
  .kr-top .burger details{border-bottom:1px solid #ffffff14}
  .kr-top .burger details summary{display:flex;align-items:center;justify-content:space-between;padding:15px 0;font-weight:600;color:#fff;cursor:pointer;list-style:none}
  .kr-top .burger details summary small{margin:0 12px 0 auto;font-weight:400}
  .kr-top .burger details>summary::after{content:"+";font-size:20px;color:var(--red-l);transition:.18s}
  .kr-top .burger details[open]>summary::after{transform:rotate(45deg)}
  .kr-top .burger details details{border-bottom:0;padding-left:14px}.kr-top .burger details details>summary{padding:11px 0;font-weight:500}
  .kr-top .burger ul{padding:0 0 12px}
  .kr-top .burger li a,.kr-top .burger li span,.kr-top .burger .how{display:flex;justify-content:space-between;gap:12px;padding:11px 0;font-size:15.5px}
  .kr-top .burger li span{opacity:.55}.kr-top .burger small{font-size:12.5px;color:#8c98a5;white-space:nowrap}
  .kr-top .burger .how{font-weight:600;color:#fff}
  .kr-top .burger .kt-how{display:none;margin-top:16px;justify-content:center;padding:13px 16px;border-radius:9px;background:var(--red);box-shadow:0 8px 24px -8px #dc2626aa}
}
@media (max-width:700px){.kr-bot nav{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){
  .kr-top .kt-w,.kr-bot .kt-w{padding-inline:16px}
  .kr-top .kt-cta{display:none}
  .kr-top .burger>div{padding:8px 16px 22px}
  .kr-top .kt-menu{right:16px}
  .kr-top .burger .kt-how{display:flex}
}
