/* Feature-page search styling, with the planner's own data and native dialog. */
:root{--planning-header-height:76px;--ds-teal:#297D77;--ds-ink:#161616;--ds-secondary:#4D5056;--ds-border:#D5D7DA;--ds-tint:#F0FDFA;--ds-paper:#F1F0EE;--ds-ease:cubic-bezier(.4,0,.2,1);--ds-shadow:0 8px 28px #00000029;--green:#297D77;--green-hover:#216861;--ink:#161616;--muted:#4D5056;--lime:#E1F3EA;--paper:#F1F0EE;--soft:#F3F4F6;--line:#D5D7DA;--white:#FFFFFF;--radius:8px;font-family:Lato,Arial,sans-serif;color:#161616;background:#F1F0EE;}
html{scroll-padding-top:calc(var(--planning-header-height) + 18px);}
.site-header{position:sticky;top:0;z-index:40;min-height:65px;padding-block:12px;gap:16px;border-color:#D5D7DA;background:#FFF;box-shadow:none;}
.header-search{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-height:44px;padding:0 15px 0 12px;border:1px solid #297D77;border-radius:9999px;background:#FFF;color:#364153;font:500 13px/1.35 Inter,Arial,sans-serif;white-space:nowrap;cursor:pointer;margin-left:0;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out;}
body[data-planning-view=home] .header-search{display:none;}
body[data-planning-view=setup] :is(.header-search,.planning-recent-trigger,.wk-launcher,#framework-control){display:none;}
.header-search svg{width:18px;height:18px;stroke-width:2.2;}
@media(hover:hover) and (pointer:fine){.header-search:not(:disabled):hover{background:#F3F4F6;color:#161616;text-decoration:none;border-color:#297D77}}
.header-search:focus-visible{outline:2px solid #297D77;outline-offset:2px;}
.library-sidebar{top:calc(var(--planning-header-height) + 18px);max-height:calc(100dvh - var(--planning-header-height) - 36px);border-color:#D5D7DA;}
body.compare-has-selection:not(:has(#planning-detail:not([hidden]))) .library-sidebar{max-height:calc(100dvh - var(--planning-header-height) - 140px);}
.inline-planning-detail .detail-tabs{top:var(--planning-header-height);}
.global-search-dialog{width:min(680px,calc(100% - 48px));max-width:none;max-height:calc(100dvh - min(11vh,112px) - 24px);padding:0;margin:min(11vh,112px) auto 24px;border:1px solid #D5D7DA;border-radius:8px;background:#FFFFFF;color:#161616;box-shadow:var(--ds-shadow);overflow:hidden;font-family:Lato,Arial,sans-serif;}
.global-search-dialog[open]{display:flex;flex-direction:column;}
.global-search-dialog::backdrop{background:#0006;backdrop-filter:none;}
.global-search-form{flex:none;}
.global-search-filter-toggle{display:none;}
.global-search-toolbar.search-scope-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1fr);gap:8px;padding:12px 20px 0;margin:0;}
.global-search-submit{display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:none;min-height:44px;padding:10px 16px;border:1px solid #297D77;border-radius:9999px;color:#FFFFFF;background:#297D77;font:700 14px/1.3 Lato,system-ui,sans-serif;cursor:pointer;font-family:Lato,Arial,sans-serif;font-weight:700;border-color:#297D77;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
.global-search-submit svg{flex:none;width:18px;height:18px;stroke:currentColor;stroke-width:2.3;fill:none;transition:transform 180ms ease-out}
@media(hover:hover) and (pointer:fine){.global-search-submit:not(:disabled):hover{background:#216861;border-color:#216861;color:#FFFFFF}}
.global-search-submit:disabled{opacity:.45;cursor:default;}
.global-search-submit:focus-visible{outline:2px solid #297D77;outline-offset:3px;}

.global-search-input{display:flex;align-items:center;gap:10px;padding:10px 12px 10px 20px;border-bottom:1px solid #D5D7DA;transition:box-shadow 180ms ease-out;}
.global-search-input:has(input:focus){border-bottom-color:#297D77;box-shadow:inset 0 -1px 0 #297D77;}
.global-search-input>svg{width:24px;height:24px;color:var(--muted);stroke-width:2.2;}
.global-search-input input{flex:1;min-width:0;height:56px;padding:0 4px;border:0;outline:0;background:transparent;color:#161616;font:400 20px/1.2 Lato,system-ui,sans-serif;font-family:Lato,Arial,sans-serif;}
.global-search-input input:is(:focus,:focus-visible){outline:none;box-shadow:none;}
.global-search-input input::placeholder{color:var(--muted);opacity:1;}
.global-search-input input::-webkit-search-cancel-button{display:none;}
.global-search-clear{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:999px;background:#FFFFFF;color:#4D5056;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
.global-search-clear svg{width:20px;height:20px;stroke-width:2.2;}
.global-search-close{flex:none;min-height:44px;padding:0 18px;border:1.5px solid #D5D7DA;border-radius:999px;background:#FFFFFF;color:#4D5056;font:700 15px Lato,system-ui,sans-serif;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
@media(hover:hover) and (pointer:fine){.global-search-clear:not(:disabled):hover,.global-search-close:not(:disabled):hover{background:#F3F4F6;color:#161616;text-decoration:none}}
.global-search-clear:focus-visible,.global-search-close:focus-visible{outline:2px solid #297D77;outline-offset:3px;}
.global-search-scope{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;margin:0;padding:10px 20px 12px;border-bottom:1px solid #D5D7DA;background:#FFFFFF;color:#4D5056;font-size:12px;line-height:1.5;}
.global-search-context{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;min-width:0;}
.global-search-context>p{margin:0;font:inherit;color:inherit;}
.global-search-applied-summary{margin:0;padding:0 20px 12px;font-size:13px;line-height:1.5;color:#4D5056;overflow-wrap:anywhere;}
.global-search-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 12px 16px;}
.global-search-start{padding:24px 14px 0;}
.global-search-start>p{font-size:16px;color:var(--muted);line-height:1.5;margin-bottom:24px;}
.global-search-start>span,.global-search-results-heading{color:var(--muted);font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;}
.global-search-examples{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0 25px;}
.global-search-examples button{display:flex;align-items:center;gap:8px;}
.global-search-examples svg{width:15px;height:15px;stroke-width:2.5;transition:transform 180ms ease-out}
.global-search-results-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 14px 8px;}
.global-search-results-heading>span+span{font-size:12px;font-weight:400;letter-spacing:0;text-transform:none;text-align:right;}
.global-search-result{width:100%;display:flex;align-items:center;gap:16px;min-height:92px;padding:13px 14px;text-align:left;border-radius:10px;border:0;color:#4D5056;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
@media(hover:hover) and (pointer:fine){.global-search-result:not(:disabled):hover{background:#F0FDFA;color:#216861;outline:1px solid #297D77;outline-offset:-1px}}
.global-search-result:focus-visible{outline:2px solid #297D77;outline-offset:-2px}
.global-search-result>:is(img,.preview-unavailable){width:72px;height:54px;object-fit:contain;background:white;border-radius:5px;border:1px solid #D5D7DA;flex:none;}
.global-search-result-icon{display:grid;place-items:center;width:72px;height:54px;background:#FFFFFF;border-radius:6px;flex:none;}
.global-search-result-copy{min-width:0;flex:1;}
.global-search-result-copy strong{display:block;font-size:18px;font-weight:700;line-height:1.3;overflow-wrap:anywhere;}
.global-search-result-copy>span{display:block;font-size:13px;color:var(--muted);line-height:1.45;margin-top:4px;}
.global-search-related-note{margin:0 14px 8px;font-size:13px;line-height:1.55;color:var(--muted);}
.global-search-result-copy small{display:block;font-size:12px;color:var(--muted);line-height:1.45;margin-top:3px;}
.global-search-result-copy>.global-search-standard-status{margin:0 0 5px;font-size:12px;font-weight:700;line-height:1.4;color:#297D77;}
.global-search-result-copy>.global-search-suggestion-reason{margin-top:6px;}
.global-search-result-copy>.global-search-evidence{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:7px;font-size:12px;line-height:1.5;color:#297D77;overflow-wrap:anywhere;}
.global-search-evidence b{font-weight:700;}
.global-search-evidence mark,.global-search-result-copy>strong>mark,.compare-picker-copy>strong>mark{padding:1px 2px;background:#F0FDFA;color:#161616;font-weight:700;border-radius:4px;}
.global-search-result-copy>.global-search-focus{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:6px;color:#297D77;font-size:13px;line-height:1.5;}
.global-search-shortcuts{display:grid;gap:8px;padding:12px 14px 2px;}
.global-search-shortcut{display:flex;align-items:center;gap:16px;width:100%;padding:15px 16px;border:1px solid #D5D7DA;border-radius:8px;background:#FFFFFF;color:#297D77;text-align:left;cursor:pointer;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
.global-search-shortcut>span{min-width:0;flex:1;}.global-search-shortcut strong{display:block;font-size:16px;line-height:1.4;}.global-search-shortcut small{display:block;margin-top:4px;font-size:12px;color:var(--muted);line-height:1.4;}
.global-search-shortcut svg,.global-search-recovery svg{width:18px;height:18px;flex:none;stroke:currentColor;stroke-width:2.5;fill:none;transition:transform 180ms ease-out;}
@media(hover:hover) and (pointer:fine){.global-search-shortcut:not(:disabled):hover{background:#F0FDFA;color:#216861;border-color:#297D77;box-shadow:none;text-decoration:none}}@media(hover:hover) and (pointer:fine){:is(.global-search-shortcut,.global-search-recover,.global-search-all,.global-search-submit):not(:disabled):hover>svg{transform:translateX(4px)}}
.global-search-recovery{padding:10px 14px 4px;}.global-search-empty .global-search-recovery{padding:12px 0 0;}
.global-search-recovery>p{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--muted);}
.global-search-suggestions{display:grid;gap:8px;margin-bottom:12px;}
.global-search-suggestions>button,.global-search-recover{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:12px 14px;border:1px solid #D5D7DA;border-radius:10px;background:#FFFFFF;text-align:left;color:#297D77;cursor:pointer;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
.global-search-suggestions>button strong,.global-search-recover>span{min-width:0;flex:1;font:700 14px/1.4 Lato,system-ui,sans-serif;overflow-wrap:anywhere;}
.global-search-suggestions>button>span,.global-search-recover small{font-size:12px;line-height:1.4;color:var(--muted);white-space:nowrap;}.global-search-recover+.global-search-recover{margin-top:8px;}
.global-search-recover.is-confirmed-recovery{display:grid;grid-template-columns:minmax(0,1fr) 18px;gap:4px 10px;}
.global-search-recover.is-confirmed-recovery>span,.global-search-recover.is-confirmed-recovery>small{grid-column:1;white-space:normal;}
.global-search-recover.is-confirmed-recovery>svg{grid-column:2;grid-row:1/span 2;}
@media(hover:hover) and (pointer:fine){.global-search-suggestions>button:not(:disabled):hover{background:#F3F4F6;color:#161616;border-color:#D5D7DA;text-decoration:none}.global-search-recover:not(:disabled):hover{background:#F0FDFA;color:#216861;border-color:#297D77;box-shadow:none;text-decoration:none}}
.global-search-shortcut:focus-visible,.global-search-suggestions>button:focus-visible,.global-search-recover:focus-visible{outline:2px solid #297D77;outline-offset:2px;}

.global-search-result-arrow{width:18px;flex:none;opacity:1;transition:transform 180ms ease-out}
.global-search-result-arrow svg{width:18px;height:18px;stroke-width:2.5;}
@media(hover:hover) and (pointer:fine){.global-search-result:not(:disabled):hover .global-search-result-arrow{transform:translateX(4px)}}
.global-search-all{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;min-height:50px;margin-top:8px;padding:14px;border-top:1px solid #D5D7DA;text-align:left;font-size:14px;font-weight:700;color:#297D77;transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out}
@media(hover:hover) and (pointer:fine){.global-search-all:not(:disabled):hover{background:#F0FDFA;color:#216861;border-radius:10px}}
.global-search-all svg{width:18px;height:18px;stroke-width:2.5;transition:transform 180ms ease-out}
.global-search-start .global-search-all{padding-inline:0;}
.global-search-empty{padding:28px 14px 16px;}
.global-search-empty h3{font-size:20px;margin-bottom:10px;color:#4D5056;}
.global-search-empty p{font-size:16px;color:var(--muted);line-height:1.5;}
.global-search-empty .btn{margin-top:18px;}
.global-search-collection{padding:15px 14px;}.global-search-collection strong{font-size:18px;}.global-search-collection p{font-size:14px;color:var(--muted);margin-top:5px;}

@media(max-width:767px){
 .global-search-form{display:flex;flex-direction:column;}
 .global-search-scope{order:1;align-items:flex-start;}
 .global-search-toolbar.search-scope-controls{order:2;}
 .global-search-applied-summary{order:3;padding:0 14px 12px;}
 .global-search-form:has([data-global-search-toggle-filters][aria-expanded=false]) .global-search-toolbar{display:none;}
 .global-search-context{flex:1;gap:0 6px;}
 .global-search-context>p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
 .global-search-filter-toggle{display:inline-flex;align-items:center;gap:8px;}
 .global-search-filter-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;flex:none;}
 .global-search-filter-toggle svg:last-child{width:13px;}
 .global-search-filter-toggle[aria-expanded=true] svg:last-child{transform:rotate(180deg);}
 .global-search-dialog .global-search-filter-toggle:disabled{opacity:.5;cursor:default;}
 .global-search-result-copy>.global-search-focus{display:none;}
 .global-search-dialog{width:100%;height:100dvh;max-height:100dvh;max-width:none;margin:0;border-radius:8px;font-family:Lato,Arial,sans-serif;border:1px solid #D5D7DA;box-shadow:var(--ds-shadow);color:#161616;}
 .global-search-input{padding:8px 10px 8px 14px;gap:6px;}.global-search-input input{font-size:18px;font-family:Lato,Arial,sans-serif;color:#161616;}
 .global-search-toolbar.search-scope-controls{padding:0 14px 12px;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.global-search-toolbar [data-global-search-scope-button=field]{grid-column:1/-1;min-height:56px;}.global-search-toolbar [data-global-search-scope-button=field]>span{display:flex;flex:1;min-width:0;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;}.global-search-toolbar [data-global-search-scope-button=field] strong{text-align:right;}.global-search-shortcuts{padding-inline:14px;}.global-search-results-heading{gap:10px;font-size:12px;}.global-search-results-heading>span+span{max-width:50%;}
 .global-search-close{padding:0 14px;}.global-search-content{padding:4px 8px 24px;}
 .global-search-scope{padding:8px 14px 10px;font-size:12px;gap:8px;}
 .global-search-reset-filters{flex-basis:100%;text-align:left;}.global-search-submit{padding-inline:13px;font-family:Lato,Arial,sans-serif;font-weight:700;border-radius:9999px;background:#297D77;border-color:#297D77;}
 .global-search-result{gap:12px;padding:13px 14px;}.global-search-result>:is(img,.preview-unavailable),.global-search-result-icon{width:60px;height:45px;}
 .global-search-result-copy strong{font-size:17px;}.global-search-result-arrow{opacity:1;width:15px;}.global-search-result-arrow svg{width:15px;height:15px;}
}
@media(max-width:900px){
 .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:12px;min-height:65px;padding-block:12px;border-color:#D5D7DA;background:#FFF;box-shadow:none;}
 .hub-brand{grid-column:1;grid-row:1;}
 .header-search{grid-column:2;grid-row:1;margin:0;padding:0 12px 0 10px;}
 .mobile-nav{grid-column:3;grid-row:1;}.header-tools{grid-column:1/-1;grid-row:2;margin:0;}
}
@media(max-width:360px){.header-search>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}.header-search{width:44px;padding:0;}.site-header{gap:12px;min-height:65px;padding-block:12px;border-color:#D5D7DA;background:#FFF;box-shadow:none;}}
@media(max-width:900px) and (max-height:560px){body:is([data-planning-view=home],[data-planning-view=setup]) .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:8px 12px;padding-block:10px;}body:is([data-planning-view=home],[data-planning-view=setup]) .site-header>.header-tools{grid-column:1/-1;grid-row:2;}}
@media(prefers-reduced-motion:reduce){.global-search-result-arrow,.header-search,:is(.global-search-shortcut,.global-search-recover,.global-search-all,.global-search-submit)>svg{transition:none;transform:none!important;}}
@media print{.global-search-dialog,.header-search{display:none!important;}.inline-planning-detail .detail-tabs{top:0;}}

/* Keep lesson details, My week and Compare as separate keyboard targets. */
.global-search-result-row{border-top:1px solid var(--line);padding:5px 0 10px;}
.global-search-result-row>.global-search-result{min-width:0;border-top:0;}
.global-search-result-actions{display:flex;align-items:stretch;justify-content:flex-end;flex-wrap:wrap;gap:6px;margin:0 14px 0 102px;}
.global-search-result-actions>:is(.wk-add,.compare-toggle){min-height:44px;padding:8px 10px;}
@media(max-width:767px){
 .global-search-result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-inline:14px;}
 .global-search-result-actions>:is(.wk-add,.compare-toggle){width:100%;min-width:0;white-space:normal;padding:8px 6px;}
}
