/* Shared site navigation. Scoped separately from page and cabinet navigation. */
.kh-header{background:#fff;border-bottom:1px solid #e6eaf0;backdrop-filter:none}
.kh-header .kh-row{width:100%;max-width:1680px;margin:auto;padding:0 32px;height:84px;gap:32px}
.kh-header .header-brand{width:208px;max-width:208px;min-width:0;flex:0 0 208px}
.kh-header .header-brand .logo{display:flex;width:100%;min-width:0}
.kh-header .header-brand .logo>svg{width:100%!important;max-width:100%}
.kh-nav{display:flex;align-items:center;gap:26px;white-space:nowrap}
.kh-nav a{font-size:14px;font-weight:600;color:#26364e}
.kh-nav a:hover,.kh-nav a.is-active{color:#1760ee}
.kh-header .header-actions{gap:12px;flex:0 0 auto;white-space:nowrap}
.kh-ai{font-size:13px;color:#52627a;margin-right:6px}.kh-ai span{color:#1760ee;font-size:20px}
.kh-post,.kh-login{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;padding:14px 17px;font-weight:650;font-size:14px;line-height:1.4;text-decoration:none}
.kh-post{background:#1e63ef;color:white}.kh-post:hover{background:#1556d6;color:white}
.kh-login{background:#f0f3f7;color:#17243b}.kh-login:hover{background:#e5eaf2}
.kh-profile{display:inline-flex;align-items:center;line-height:0;flex-shrink:0}
.kh-header .bell-group{background:none;padding:0;gap:0}
.kh-header .burger,.kh-menu .burger{display:inline-flex;width:44px;height:44px;border-radius:10px;flex-shrink:0}
.kh-quick{display:none}
/* Shared menu: neutral surfaces, grouped rows and one brand accent. */
.kh-menu{
    --menu-ink:#20242c;--menu-muted:#626974;--menu-line:#e6e8ec;--menu-accent:#1859d1;--menu-surface:#f5f6f8;
    position:fixed;inset:0 0 0 auto;margin:0;border:0;width:460px;max-width:100%;
    height:100dvh;max-height:100dvh;padding:0;background:#fff;color:var(--menu-ink);
    box-shadow:-15px 0 60px #0d24451a;overflow-y:auto;overscroll-behavior:contain;color-scheme:light;
}
.kh-menu::backdrop{background:#0c1a3590}
.kh-menu-head{gap:16px;display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid var(--menu-line);position:sticky;top:0;background:#fff;z-index:1}
.kh-menu .burger{background:#f3f4f6;border:0;color:var(--menu-ink)}
.kh-menu-signature{display:block;width:28px;height:28px;flex:none;border-radius:6px}
.kh-menu .burger:hover{background:#e8ecf2}
.kh-menu-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 14px}
.kh-menu-heading>strong{font-size:22px;font-weight:700;letter-spacing:-.6px}
.kh-menu-brand{font-size:10px;font-weight:700;letter-spacing:.25px;color:var(--menu-muted)}
.kh-menu-brand b{color:#1658c9}
.kh-menu-body{padding:22px 24px max(28px,env(safe-area-inset-bottom))}
.kh-label{font-size:18px;line-height:1.4;font-weight:650;letter-spacing:-.2px;color:var(--menu-ink);margin:28px 0 8px}
.kh-label--first{margin-top:0}
.kh-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.kh-inline-arrow{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.kh-menu{scrollbar-width:thin;scrollbar-color:#b9bec7 transparent}
.kh-menu ::selection{background:#dbe8ff;color:#143570}
.kh-account{background:var(--menu-surface);color:var(--menu-ink);padding:18px;border-radius:12px;margin-bottom:24px;border:1px solid var(--menu-line)}
.kh-account-person{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:44px;color:inherit}
.kh-account-person>span:nth-child(2){flex:1;min-width:0}
.kh-account-person b{display:block;font-size:19px;line-height:1.3;letter-spacing:-.3px;font-weight:650;overflow-wrap:anywhere}
.kh-account-person small{display:flex;align-items:center;gap:2px;color:var(--menu-muted);font-size:12px;line-height:1.5;margin-top:4px}
.kh-account-person .avatar{background:var(--menu-accent)!important;border-radius:50%;box-shadow:none;color:#fff}
.kh-account--guest{position:relative;isolation:isolate;background:transparent;border:0;padding:22px 18px 10px;color:#204f9b}
.kh-account--guest::before{content:"";position:absolute;inset:0;z-index:-1;background:#edf2fc;border-radius:12px;clip-path:polygon(0 0,calc(100% - 22px) 0,100% 22px,100% 100%,0 100%)}
.kh-guest-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.kh-guest-title h2{min-width:0;margin:0;font-size:25px;font-weight:650;line-height:1.15;letter-spacing:-.6px;color:inherit}
.kh-guest-description{margin:12px 0 0;max-width:30ch;font-size:13px;line-height:1.55;color:#3e5980}
.kh-guest-mark{width:44px;height:44px;display:grid;place-items:center;flex:none;background:#dce6f8;border-radius:50%;color:#204f9b}
.kh-guest-mark svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.kh-guest-register{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 8px;margin-top:6px;font-size:12px;line-height:1.5}
.kh-guest-register>span{color:#3e5980}
.kh-guest-register>a{display:inline-flex;align-items:center;min-height:44px;color:#204f9b;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.kh-guest-register>a:hover{color:#1045aa}
.kh-guest-browse{margin:0 0 8px;font-size:12px;line-height:1.5;color:var(--menu-muted)}
.kh-account-open{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-top:16px;min-height:44px;padding:12px 38px;background:var(--menu-accent);color:#fff;border-radius:8px;font-size:14px;line-height:1.4;font-weight:650;text-align:center}
.kh-account-open>span{position:absolute;right:14px;top:50%;transform:translateY(-50%);line-height:1}
.kh-account-open:hover{background:#1045aa;color:#fff}
.kh-account-links{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px 10px;padding:4px 0 12px}
.kh-account-links a{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px;border-radius:7px;font-size:13px;line-height:1.35;color:var(--menu-ink);overflow-wrap:anywhere}
.kh-account-links a:hover{background:#edf3ff;color:#1556c5}
.kh-account-links a>span{min-width:0}
.kh-products{display:grid;gap:0}
.kh-product--learn .kh-product-icon{background:#edf4f0;color:#25614d}
.kh-product--order .kh-product-icon{background:#edf2fc;color:#3156a2}
.kh-product--work .kh-product-icon{background:#f7f1e9;color:#865a2b}
.kh-product--ai .kh-product-icon{background:#edf2f4;color:#365f70}
.kh-products>a{
    position:relative;display:flex;align-items:center;gap:12px;
    min-height:70px;padding:13px 0;border:0;border-radius:0;
    background:transparent;color:var(--menu-ink);
}
.kh-products>a::after{content:"";position:absolute;bottom:0;left:52px;right:0;height:1px;background:var(--menu-line)}
.kh-product-icon{width:40px;height:40px;display:grid;place-items:center;flex-shrink:0;border-radius:12px 12px 12px 4px;background:#f0f2f5;color:#3f4d62}
.kh-product-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.kh-products>a>span:nth-child(2){flex:1;min-width:0}
.kh-products b{display:block;font-size:16px;line-height:1.35;font-weight:650;letter-spacing:-.15px}
.kh-products small{display:block;margin-top:3px;color:var(--menu-muted);font-size:12px;line-height:1.45}
.kh-products i{display:flex;font-style:normal;color:#777e88;font-size:20px;line-height:1;flex-shrink:0}
.kh-products>a:hover,.kh-products>a:focus-visible{background:#f8f9fb}
.kh-products>a.is-current b{color:var(--menu-accent)}
.kh-products>a.is-current .kh-product-icon{background:#eaf0fc;color:var(--menu-accent)}
.kh-links>a{display:flex;align-items:center;gap:12px;padding:14px 0;min-height:70px;border-bottom:1px solid var(--menu-line)}
.kh-links>a>span{width:38px;height:38px;background:#f0f3f7;border-radius:9px;display:grid;place-items:center;color:#3f4d62;flex-shrink:0}
.kh-links>a>span svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.kh-links>a>div{flex:1;min-width:0}
.kh-links b{font-size:14px;font-weight:650;display:block}
.kh-links small{font-size:12px;line-height:1.5;color:var(--menu-muted);display:block;margin-top:3px}
.kh-links i{font-style:normal;color:var(--menu-muted)}
.kh-links a:hover b{color:#1760ee}
.kh-discover{margin-top:28px;padding:0;border:0;border-radius:0;background:transparent}
.kh-discover .kh-label{margin:0 0 8px;color:var(--menu-ink);font-size:18px}
.kh-secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.kh-secondary a{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;min-height:68px;padding:12px 0;border-top:1px solid var(--menu-line);line-height:1.4;overflow-wrap:anywhere}
.kh-secondary a>span{min-width:0}
.kh-secondary b{display:block;font-size:13px;font-weight:600}
.kh-secondary small{display:block;font-size:11px;line-height:1.5;color:var(--menu-muted);margin-top:4px}
.kh-secondary i{font-size:13px;font-style:normal;color:#60758b}
.kh-secondary a:hover b{color:#1760ee}
.kh-help{margin-top:20px;display:flex;gap:12px;align-items:center;min-height:56px;color:var(--menu-ink)}
.kh-help-icon{width:38px;height:38px;background:#f0f2f5;color:#3f4d62;display:grid;place-items:center;border-radius:9px;flex-shrink:0}
.kh-help-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.kh-help>span:nth-child(2){flex:1}
.kh-help b{display:block;font-size:14px;font-weight:650}
.kh-help small{display:block;font-size:12px;color:var(--menu-muted);margin-top:3px}
.kh-help i{font-style:normal;color:#1658c9}
.kh-help:hover b{color:#1658c9}
.kh-logout{border-top:1px solid var(--menu-line);margin-top:18px;padding-top:8px}
.kh-logout button{background:none;border:0;color:var(--menu-muted);font:inherit;font-size:12px;cursor:pointer;min-height:44px;padding:8px 0}
.kh-header a:focus-visible,.kh-header button:focus-visible,.kh-menu a:focus-visible,.kh-menu button:focus-visible{outline:3px solid #1760ee;outline-offset:3px}
.kh-account a:focus-visible{outline-color:var(--menu-accent)}
.kh-spaces{margin:0 0 8px}
.kh-spaces>nav{display:flex;flex-direction:column}
.kh-space{display:flex;align-items:center;gap:16px;min-height:48px;padding:10px 0;color:var(--menu-ink)}
.kh-space-copy{flex:1;min-width:0}
.kh-space-copy b{display:block;font-size:14px;font-weight:500;line-height:1.4}
.kh-space-copy small{display:block;margin-top:8px;font-size:13px;line-height:1.5;color:var(--menu-muted)}
.kh-space--student{--space-ink:#1c5344;--space-tone:#eaf3ee;--space-line:#cbded3;--space-hover:#dcebe2}
.kh-space--buyer{--space-ink:#204f9b;--space-tone:#edf2fc;--space-line:#d0dbef;--space-hover:#dfe8f9}
.kh-space--seller{--space-ink:#594e40;--space-tone:#f3f0e9;--space-line:#ded7cc;--space-hover:#e9e3d8}
.kh-space.is-selected{position:relative;isolation:isolate;padding:22px 16px;margin:0 0 12px;min-height:112px;border:0;border-radius:12px;color:var(--space-ink)}
/* The cut corner echoes the diagonal in the existing K mark, without clipping focus. */
.kh-space.is-selected::before,.kh-cabinet-hub::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--space-tone);border-radius:12px;clip-path:polygon(0 0,calc(100% - 22px) 0,100% 22px,100% 100%,0 100%)}
.kh-space.is-selected b{max-width:13em;font-size:25px;font-weight:650;line-height:1.15;letter-spacing:-.6px}
.kh-space.is-selected small{color:var(--space-ink)}
.kh-space-arrow{display:grid;place-items:center;width:24px;height:24px;color:var(--menu-muted);flex:none}
.kh-space-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.kh-space.is-selected .kh-space-arrow{width:44px;height:44px;border-radius:50%;background:var(--space-ink);color:#fff}
.kh-space:hover b{color:var(--menu-accent)}
.kh-space.is-selected:hover b{color:var(--space-ink)}
.kh-space.is-selected:hover .kh-space-arrow{box-shadow:inset 0 0 0 2px #ffffff80}
.kh-space.is-selected:active .kh-space-arrow{box-shadow:inset 0 0 0 3px #ffffffb3}
.kh-cabinet-hub{position:relative;isolation:isolate;margin-bottom:12px;border-radius:12px;color:var(--space-ink)}
.kh-cabinet-hub .kh-space.is-selected{margin:0;padding-bottom:18px}
.kh-cabinet-hub .kh-space.is-selected::before{display:none}
.kh-cabinet-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 12px;padding:8px 0 12px;border-top:1px solid var(--space-line)}
.kh-cabinet-shortcuts>a{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;min-width:0;min-height:72px;padding:10px 2px 4px;border-radius:8px;color:var(--space-ink);font-size:12px;font-weight:500;line-height:1.35;text-align:center}
.kh-cabinet-shortcuts>a:hover,.kh-cabinet-shortcuts>a:focus-visible{background:var(--space-hover)}
.kh-shortcut-icon{position:relative;display:grid;place-items:center;width:26px;height:26px;flex:none}
.kh-shortcut-icon svg{width:22px;height:22px}
.kh-shortcut-badge{position:absolute;top:-6px;left:17px;display:flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:#b52d40;color:#fff;font-size:10px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;box-shadow:0 0 0 2px var(--space-tone)}
.kh-member-links{margin:0 0 28px;border-bottom:1px solid var(--menu-line)}
.kh-member-links summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;cursor:pointer;list-style:none;font-size:13px;font-weight:600;color:#354b63}
.kh-member-links summary::-webkit-details-marker{display:none}
.kh-member-links[open] summary>span{transform:rotate(180deg)}
.kh-member-links summary:focus-visible{outline:3px solid #1760ee;outline-offset:3px;border-radius:5px}
.kh-member-links .kh-account-links{border-top:1px solid var(--menu-line);padding:6px 0 10px}
.kh-member-links .kh-account-links a{color:var(--menu-ink);font-size:12px}
.kh-member-links .kh-account-links a:hover{background:#edf3ff;color:#1556c5}
@media(max-width:1500px){.kh-ai{display:none}.kh-header .kh-row{gap:24px}.kh-nav{gap:22px}.kh-header .header-brand{width:190px;max-width:190px;flex-basis:190px}}
@media(max-width:1350px){.kh-nav{display:none}.kh-quick{display:flex;gap:32px;padding:0 28px;height:43px;align-items:center;font-size:13px;border-top:1px solid #f1f3f6}.kh-quick a:last-child{color:#1760ee}}
@media(max-width:700px){.kh-header .kh-row{height:70px;padding:0 16px;gap:12px}.kh-header .header-brand{width:166px;max-width:166px;flex:0 1 166px}.kh-header .header-actions{gap:8px}.kh-header .kh-post,.kh-header .bell-group{display:none}.kh-login{padding:11px 12px;font-size:12px}.kh-header .burger{width:38px;height:38px;border-radius:8px}.kh-profile .avatar{width:34px!important;height:34px!important}.kh-quick{padding:0 17px;justify-content:space-between;gap:12px;height:42px;font-size:12px}.kh-menu-head{padding:18px 20px}.kh-menu-body{padding:20px 20px max(24px,env(safe-area-inset-bottom))}}
@media(max-width:360px){.kh-header .kh-row{padding:0 12px}.kh-header .header-brand{width:145px;max-width:145px;flex-basis:145px}.kh-header .header-actions{gap:6px}.kh-menu-body{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-motion:no-preference){.kh-menu[open]{animation:kh-enter .18s ease-out}@keyframes kh-enter{from{transform:translateX(25px);opacity:0}to{transform:none;opacity:1}}}

/* Clear section links and live catalogue count. */
.kh-nav a,.kh-quick a{display:inline-flex;align-items:center;gap:7px}
.kh-task-count{display:inline-flex;align-items:center;justify-content:center;min-width:25px;padding:2px 7px;border-radius:7px;background:#eaf1ff;color:#1554cf;font-size:11px;font-weight:700;line-height:18px;font-variant-numeric:tabular-nums;vertical-align:middle}
@media(max-width:700px){.kh-quick{display:grid;grid-template-columns:1fr 1fr;height:auto;gap:0;padding:5px 16px 9px}.kh-quick a{min-height:36px;font-size:12px;font-weight:600;white-space:nowrap}.kh-quick a:last-child{color:#26364e}}

.task-broadcast-link{display:inline-flex;margin:10px 18px;padding:7px 12px;background:#eaf1ff;color:#1b59c7!important;border-radius:7px;font-size:12px;font-weight:600}

@media(max-width:360px){.kh-products>a{padding:12px 0;gap:10px}.kh-account{padding:15px}.kh-space.is-selected b{font-size:23px}.kh-secondary{column-gap:12px}}
@media(prefers-reduced-motion:no-preference){.kh-products>a,.kh-space,.kh-account-open{transition:background-color .16s ease}}
.kh-cabinet-balance{display:flex;align-items:center;gap:12px;min-height:52px;margin:0 16px;padding:10px 0;border-top:1px solid var(--space-line);color:var(--space-ink)}
.kh-cabinet-balance>span{font-size:13px;font-weight:500;flex:none}
.kh-cabinet-balance strong{margin-left:auto;min-width:0;text-align:right;font-size:22px;font-weight:650;line-height:1.3;letter-spacing:-.4px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.kh-cabinet-balance svg{flex:none}
.kh-cabinet-balance:hover{color:var(--space-ink);text-decoration:underline;text-underline-offset:4px}
.kh-learning{margin:0 16px;padding:0 0 16px;color:var(--space-ink)}
.kh-learning-title{margin:0 0 10px;font-size:14px;line-height:1.4;font-weight:600;overflow-wrap:anywhere}
.kh-learning-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:11px;line-height:1.5}
.kh-learning-meta strong{font-size:12px;font-weight:600;flex:none;font-variant-numeric:tabular-nums}
.kh-learning-track{height:4px;margin-top:6px;overflow:hidden;border-radius:2px;background:#cbded3}
.kh-learning-track>span{display:block;height:100%;border-radius:inherit;background:var(--space-ink)}
.kh-learning-continue{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:10px 12px;margin-top:14px;border-radius:8px;background:var(--space-ink);color:#fff;font-size:13px;line-height:1.4;font-weight:600}
.kh-learning-continue svg{flex:none}
.kh-learning-continue:hover{background:#123d31;color:#fff}
.kh-learning-continue--empty{background:transparent;color:var(--space-ink);padding-left:0}
.kh-learning-continue--empty:hover{background:var(--space-hover);color:var(--space-ink)}
.kh-learning-note{margin:0;font-size:12px;line-height:1.5}
