/* Knowledge uses the existing LAGE Atelier typography and color tokens. */
.knowledge-mode{--kw-sage:var(--accent);--kw-tint:color-mix(in srgb,var(--accent) 7%,var(--panel));--kw-orange:var(--orange);--kw-water:var(--map);--kw-land:var(--land);--kw-border:var(--boundary);--kw-highlight:color-mix(in srgb,var(--accent) 30%,var(--land))}
.knowledge-mode #app{max-width:none;padding:0;animation:none;min-height:calc(100vh - 100px)}
.kw-icon{display:inline-block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;vertical-align:middle}.kw-library{display:grid;grid-template-columns:minmax(0,1fr) 280px;min-height:calc(100vh - 62px)}.kw-library-main{padding:32px 24px 48px 30px;min-width:0}.kw-library-header h1{font-size:clamp(32px,3.15vw,50px);line-height:1.1;letter-spacing:-1.8px;font-weight:650;margin:12px 0}.kw-library-header>p{color:var(--muted);font-size:clamp(14px,1.3vw,21px);margin:12px 0 24px;line-height:1.5}.kw-kicker{color:var(--muted);font-size:10px;letter-spacing:1px}.kw-library-header .kw-kicker{display:none}.kw-controls{display:flex;align-items:end;gap:16px;margin:25px 0 12px}.kw-search{display:flex;align-items:center;gap:12px;flex:1;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--side);padding:0 13px;height:43px;color:var(--muted)}.kw-search .kw-icon{width:17px}.kw-search input{min-width:0;flex:1;background:none;border:0;padding:12px 0;color:var(--ink);font-size:12px;outline-offset:1px}.kw-search kbd{font:10px inherit;white-space:nowrap}.kw-controls .picker{width:135px;margin:0}.kw-controls .picker .field-label{display:none}.kw-controls .picker-trigger{height:43px;border-radius:6px;font-size:11px}.kw-controls .picker-menu{min-width:135px}.kw-category-tabs{display:flex;align-items:center;gap:7px;padding:8px 0 12px;overflow:auto}.kw-category-tabs button{padding:9px 17px;white-space:nowrap;font-size:12px;border-radius:5px;flex-shrink:0}.kw-category-tabs button[aria-pressed=true]{background:var(--kw-tint);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--kw-sage) 20%,transparent);font-weight:600}.kw-result-meta{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:10px;margin:6px 0 12px}.kw-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.kw-card{border:1px solid var(--line);border-radius:5px;min-width:0;background:var(--panel);transition:border-color .2s,box-shadow .2s}.kw-card:hover{border-color:var(--kw-sage);box-shadow:0 4px 20px #00000009}.kw-card>a{display:flex;height:100%;flex-direction:column;padding:5px;outline-offset:0;border-radius:5px}.kw-card-art{height:265px;position:relative;overflow:hidden;background:var(--side);border-radius:2px}.kw-art-label{position:absolute;z-index:1;top:7px;left:7px;background:color-mix(in srgb,var(--panel) 90%,transparent);padding:4px 7px;border:1px solid var(--line);border-radius:3px;font-size:9px;max-width:90%}.kw-map-caption{position:absolute;bottom:6px;left:6px;background:var(--panel);color:var(--muted);font-size:8px;padding:4px 6px}.kw-card-copy{padding:12px 7px 6px;display:flex;flex-direction:column;flex:1}.kw-card-copy h2{font-size:17px;font-weight:650;line-height:1.2;letter-spacing:-.4px;margin:0 0 7px}.kw-card-copy p{font-size:11px;color:var(--muted);line-height:1.45;margin:0 0 18px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.kw-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:auto}.kw-tags span,.kw-type{display:inline-block;background:var(--kw-tint);color:var(--soft);padding:4px 7px;font-size:9px;border-radius:3px}.kw-section-title{display:flex;align-items:center;justify-content:space-between;gap:16px}.kw-section-title h2{font-size:19px;font-weight:600;letter-spacing:-.4px}.kw-section-title h3{margin:0}.kw-section-title>span,.kw-section-title>button{color:var(--muted);font-size:11px}.kw-section-title p{font-size:12px;margin:5px 0 0;color:var(--muted)}.kw-table-title{margin:32px 0 16px}.kw-table-wrap{overflow:auto}.kw-catalog{width:100%;border-collapse:collapse;text-align:left;font-size:11px;table-layout:fixed}.kw-catalog th{color:var(--muted);font-size:10px;font-weight:400;padding:10px 6px;border-bottom:1px solid var(--line)}.kw-catalog th:first-child{width:27%;padding-left:0}.kw-catalog th:nth-child(2){width:12%}.kw-catalog th:nth-child(3){width:30%}.kw-catalog th:nth-child(4){width:7%}.kw-catalog th:nth-child(5){width:13%}.kw-catalog th:nth-child(6){width:11%}.kw-catalog td{padding:12px 6px;border-bottom:1px solid var(--line);color:var(--muted);line-height:1.45;vertical-align:middle}.kw-catalog td:first-child{padding-left:0}.kw-catalog td:nth-child(3){font-size:10px}.kw-catalog td>a{display:flex;align-items:center;gap:11px;color:var(--ink)}.kw-catalog td>a:hover b{text-decoration:underline}.kw-catalog td small{display:block;font-size:9px;margin-top:4px}.kw-table-thumb{display:block;flex:0 0 58px;width:58px;height:44px;overflow:hidden;border-radius:3px;border:1px solid var(--line)}.kw-table-thumb .kw-matrix-art{transform:scale(.2);transform-origin:top left;width:280px;height:220px}.kw-status{display:inline-flex;align-items:center;gap:6px;border-radius:4px;padding:4px 7px;font-size:9px;background:var(--kw-tint);white-space:nowrap;color:var(--soft)}.kw-status i{height:6px;width:6px;border-radius:50%;background:var(--kw-sage)}.kw-empty{padding:50px 20px;border:1px solid var(--line);text-align:center}.kw-empty p{color:var(--muted)}
.kw-library-rail{border-left:1px solid var(--line);padding:28px 22px;background:color-mix(in srgb,var(--panel) 96%,var(--kw-tint));min-width:0}.kw-rail-section{padding:0 0 23px;margin-bottom:23px;border-bottom:1px solid var(--line)}.kw-rail-section h3{font-size:13px;font-weight:600;margin:0 0 14px}.kw-rail-section h2{font-size:22px;margin:12px 0 3px;font-weight:650}.kw-rail-section p{font-size:12px;color:var(--muted);line-height:1.45;margin:0 0 14px}.kw-context-tabs{display:flex;flex-wrap:wrap;gap:3px;margin:9px 0 12px}.kw-context-tabs button{font-size:9px;padding:5px 7px;border-radius:3px;color:var(--muted)}.kw-context-tabs button[aria-pressed=true]{background:var(--kw-tint);color:var(--ink)}.kw-context-map{display:block;position:relative;width:100%;height:165px;border-radius:4px;overflow:hidden;padding:0;border:1px solid var(--line)}.kw-context-map>span{position:absolute;right:7px;bottom:7px;background:var(--panel);padding:3px 6px;border-radius:3px}.kw-full-button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:10px 13px;border:1px solid var(--line);border-radius:4px;font-size:11px;text-align:left;background:transparent}.kw-related-timeline{margin:18px 0 0 8px;border-left:1px solid var(--line)}.kw-related-timeline a{position:relative;display:block;padding:0 0 20px 21px;font-size:12px}.kw-related-timeline a:last-child{padding-bottom:0}.kw-related-timeline a:before{content:'';position:absolute;left:-4px;top:4px;width:7px;height:7px;border-radius:50%;background:var(--kw-sage);box-shadow:0 0 0 4px var(--panel)}.kw-related-timeline small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.kw-related-timeline a:hover b{text-decoration:underline}.kw-question{display:flex;align-items:start;gap:8px;text-align:left;font-size:11px;color:var(--muted);line-height:1.45;padding:7px 0;width:100%}.kw-question span:last-child{margin-left:auto;flex-shrink:0}.kw-rail-foot{display:flex;gap:13px;font-size:10px;color:var(--muted);line-height:1.8}.kw-dimension-library{margin-top:35px;padding:25px 0;border-top:1px solid var(--line)}.kw-dimension-library h2{margin-top:7px}.kw-dimension-strip{display:grid;grid-template-columns:repeat(6,1fr);border:1px solid var(--line);border-radius:5px;margin-top:20px;overflow:hidden}.kw-dimension-strip button{padding:20px 5px;display:grid;justify-items:center;gap:9px;border-right:1px solid var(--line)}.kw-dimension-strip button:last-child{border:0}.kw-dimension-strip b{font:28px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--accent)}.kw-dimension-strip span{font-size:11px}.kw-dimension-strip small{font-size:9px}.kw-dimension-strip .selected{background:var(--kw-tint)}.kw-note{font-size:10px!important;line-height:1.6!important;color:var(--muted);margin:13px 0 0!important}.kw-note button{color:var(--accent);text-decoration:underline}.kw-workspace-sources{border-top:1px solid var(--line);margin-top:20px;padding-top:20px}.kw-workspace-sources summary{display:flex;justify-content:space-between;gap:10px;font-size:12px;cursor:pointer}.kw-workspace-sources summary span{font-size:10px;color:var(--muted)}.kw-saved-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:20px}.kw-saved-grid p{font-size:12px;color:var(--muted)}
/* Maps retain real geography; diagram styles distinguish observed scale from models. */
.kw-map{display:block;width:100%;height:100%;background:var(--kw-water)}.kw-water{fill:var(--kw-water)}.kw-geography path{fill:var(--kw-land);stroke:var(--kw-border);stroke-width:.65;stroke-linejoin:round}.kw-geography .kw-highlight{fill:var(--kw-highlight)}.kw-graticule{fill:none;stroke:var(--kw-border);opacity:.2;stroke-width:.5;stroke-dasharray:2 3}.kw-map-label{font:8px 'Segoe UI',sans-serif;fill:var(--ink);text-anchor:middle;paint-order:stroke;stroke:var(--kw-land);stroke-width:2.8;stroke-linejoin:round}.kw-sea-label{font-style:italic;font-size:11px;fill:var(--soft);stroke:var(--kw-water);letter-spacing:1px}.kw-route{fill:none;stroke:var(--accent);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.kw-cape{stroke:var(--kw-orange);stroke-dasharray:7 5}.kw-point{fill:var(--ink)}.kw-point-ring{fill:var(--kw-orange);fill-opacity:.2;stroke:var(--kw-orange);stroke-width:1}.kw-point-label{font-size:7px;text-anchor:start;fill:var(--ink)}.kw-north{font:7px 'Segoe UI',sans-serif;fill:var(--soft);text-anchor:end}.kw-diagram{width:100%;height:100%;fill:none;stroke:var(--ink);stroke-width:1.1;background:var(--side)}.kw-diagram text{fill:var(--ink);stroke:none;font:12px 'Segoe UI',sans-serif;text-anchor:middle}.kw-diagram .kw-diagram-letter{font-size:23px;font-weight:600}.kw-diagram-dash{stroke-dasharray:5 4;stroke:var(--muted)}.kw-arrow-tip{fill:var(--ink);stroke:none}.kw-wheel circle{fill:var(--panel);stroke:var(--kw-sage)}.kw-wheel text{font-size:10px}.kw-wheel .kw-diagram-letter{font:24px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.kw-matrix-art{display:flex;flex-direction:column;justify-content:center;height:100%;padding:35px 9px 20px;background:var(--side)}.kw-matrix-art table{width:100%;border-collapse:collapse;font-size:8px;color:var(--soft)}.kw-matrix-art caption{font-size:10px;text-align:left;margin-bottom:14px;color:var(--muted)}.kw-matrix-art th,.kw-matrix-art td{border:1px solid var(--line);padding:9px 4px;text-align:left;font-weight:400}.kw-matrix-art td:nth-child(2){font-size:15px;color:var(--kw-sage);text-align:center}.kw-matrix-key{font-size:9px;text-align:center;margin:18px 0 8px}.kw-matrix-art small{text-align:center;font-size:8px}
/* Analytical detail layout retains the app's shared visual language. */
.kw-detail{display:grid;grid-template-columns:minmax(0,1fr) 335px;gap:22px;padding:22px 24px 26px;align-items:start}.kw-detail-main{min-width:0}.kw-breadcrumb{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted);margin:0 0 12px;flex-wrap:wrap}.kw-breadcrumb a{display:flex;align-items:center;gap:6px}.kw-breadcrumb .kw-icon{width:13px;height:13px}.kw-detail-header{display:flex;align-items:center;justify-content:space-between;gap:18px}.kw-detail-header h1{font-size:clamp(29px,3.1vw,49px);letter-spacing:-1.5px;font-weight:650;line-height:1.1;margin:0 0 10px}.kw-detail-meta{display:flex;gap:12px;align-items:center;font-size:10px;color:var(--muted)}.kw-detail-meta>span:first-child{letter-spacing:1.5px}.kw-reading{display:flex;border:1px solid var(--boundary);border-radius:6px;padding:2px;flex-shrink:0}.kw-reading button{font-size:11px;padding:8px 17px;white-space:nowrap;border-radius:4px;color:var(--soft)}.kw-reading button[aria-pressed=true]{background:var(--kw-tint);color:var(--ink);box-shadow:inset 0 0 0 1px var(--kw-sage)}.kw-detail-tabs{display:flex;gap:13px;border-bottom:1px solid var(--line);margin:20px 0 14px;overflow:auto}.kw-detail-tabs button{padding:12px 13px;border-bottom:3px solid transparent;font-size:12px;white-space:nowrap;color:var(--muted)}.kw-detail-tabs button[aria-current=page]{border-bottom-color:var(--kw-sage);color:var(--ink)}.kw-definition{font:500 clamp(23px,2vw,32px)/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.2px;max-width:75ch;margin:16px 0 21px;color:var(--ink)}.kw-mechanism{border:1px solid var(--line);border-radius:5px;padding:15px 14px 10px;background:var(--panel)}.kw-mechanism-grid{display:grid;grid-template-columns:1fr 1fr .85fr;margin-top:17px}.kw-step{min-width:0;padding:0 10px;border-right:1px solid var(--line)}.kw-step:first-child{padding-left:0}.kw-step:last-child{padding-right:0;border:0}.kw-step-head{display:flex;align-items:start;gap:12px;position:relative;min-height:85px}.kw-step-head>span{width:32px;height:32px;border:1px solid var(--accent);color:var(--ink);border-radius:50%;display:grid;place-items:center;font:18px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;flex-shrink:0;box-shadow:inset 0 0 0 3px var(--panel),inset 0 0 0 4px var(--line)}.kw-step-head h3{font:600 15px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:3px 0 5px}.kw-step-head p{font-size:11px;color:var(--muted);line-height:1.5;margin:0}.kw-step-arrow{font-weight:300;position:absolute;right:0;top:0;transform:translateX(18px);color:var(--muted)}.kw-step-visual{height:245px;overflow:hidden;margin-top:6px}.kw-step-visual .kw-map{border-radius:3px}.kw-effects{padding:5px 0 0;display:grid;gap:18px}.kw-effects>div{display:flex;gap:12px;align-items:center;font-size:11px;line-height:1.45;color:var(--soft)}.kw-effects .kw-icon{width:24px;height:24px}.kw-visual-key{display:flex;flex-wrap:wrap;gap:16px;font-size:9px;color:var(--muted);margin-top:13px}.kw-visual-key span{display:flex;align-items:center;gap:7px}.kw-visual-key span:last-child{margin-left:auto}.kw-visual-key i{display:block;width:24px;height:2px;background:var(--accent)}.kw-visual-key i.kw-orange{background:var(--kw-orange)}.kw-analysis-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:11px;margin-top:11px}.kw-fallacy,.kw-alternatives{border:1px solid var(--line);border-radius:5px;padding:15px;background:var(--panel)}.kw-fallacy h3,.kw-alternatives h3{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:600;margin:0 0 13px}.kw-fallacy h3,.kw-fallacy>strong{color:var(--kw-orange)}.kw-fallacy>strong{font-size:12px;font-weight:600;line-height:1.5}.kw-fallacy>p{font-size:11px;color:var(--muted);line-height:1.6;margin:10px 0 0}.kw-alternatives details{border-top:1px solid var(--line);padding:7px 0}.kw-alternatives summary{font-size:10px;display:flex;justify-content:space-between;gap:10px;cursor:pointer}.kw-alternatives details p{font-size:11px;color:var(--muted);margin:9px 0 3px;line-height:1.5}.kw-pmesii{margin-top:20px;padding:20px 0;border-top:1px solid var(--line)}.kw-pmesii h2{font-size:21px;margin-top:5px}.kw-pmesii-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:16px}.kw-pmesii-grid details{border:1px solid var(--line);padding:12px;border-radius:4px;background:var(--panel)}.kw-pmesii-grid summary{display:flex;align-items:center;gap:10px;cursor:pointer;font-size:12px}.kw-dimension-letter{width:30px;height:30px;display:grid;place-items:center;background:var(--kw-tint);font:20px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--accent);border-radius:3px}.kw-pmesii-grid summary>span:last-child{margin-left:auto;color:var(--muted)}.kw-pmesii-grid details p{font-size:11px;line-height:1.6;margin:12px 0 0;color:var(--soft)}.kw-pmesii-grid details small{display:block;font-size:10px;margin-top:10px;line-height:1.5}.kw-detail-rail{display:grid;gap:11px}.kw-rail-panel{border:1px solid var(--line);border-radius:5px;padding:13px;background:var(--panel);min-width:0}.kw-rail-panel h3{font-size:14px;font-weight:600;margin:0 0 6px}.kw-rail-panel>p{font-size:11px;line-height:1.5;margin:0 0 8px;color:var(--muted)}.kw-rail-map{height:225px;overflow:hidden;border:1px solid var(--line);margin:7px -2px 9px}.kw-rail-panel details{border-top:1px solid var(--line);margin-top:10px;padding-top:10px}.kw-rail-panel summary{display:flex;align-items:center;gap:12px;font-size:11px;cursor:pointer}.kw-rail-panel summary .kw-icon{color:var(--accent);width:22px}.kw-rail-panel summary>b{font-weight:500}.kw-rail-panel summary>span:last-child{margin-left:auto}.kw-rail-panel details p{font-size:11px;color:var(--muted);line-height:1.65;margin:10px 0 0}.kw-object-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:11px}.kw-object-grid a{background:var(--kw-tint);border-radius:5px;padding:10px 8px;font-size:10px;display:flex;flex-direction:column;gap:8px}.kw-object-grid a:hover{box-shadow:inset 0 0 0 1px var(--kw-sage)}.kw-object-grid .kw-icon{color:var(--accent)}.kw-object-grid small{font-size:8px;margin-top:auto}.kw-rail-panel h4{font-size:11px;margin:17px 0 5px;font-weight:500;color:var(--muted)}.kw-actor-link{display:flex;justify-content:space-between;gap:10px;width:100%;font-size:10px;padding:7px 0;text-align:left}.kw-source-type{display:flex;gap:14px;align-items:center;padding:10px 0}.kw-source-type>span{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:1;font-size:10px}.kw-source-type b{font-weight:500}.kw-source-type small{font-size:9px;text-align:right}.kw-source-type .kw-icon{color:var(--accent)}.kw-source-footer{grid-column:1/-1;border:1px solid var(--line);border-radius:5px;padding:13px;background:var(--panel)}.kw-source-footer h2{font-size:14px}.kw-source-footer .kw-section-title>span{font-size:10px}.kw-source-cards{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.kw-source-cards>a{display:flex;align-items:center;gap:13px;flex:1;min-width:200px;border-radius:4px;background:var(--kw-tint);padding:12px}.kw-source-cards>a>span:nth-child(2){flex:1;min-width:0}.kw-source-cards b{display:block;font-size:11px;font-weight:500}.kw-source-cards small{display:block;font-size:10px;margin-top:5px;line-height:1.4}.kw-source-cards>a>span:last-child{margin-left:auto}.kw-source-cards a:hover{box-shadow:inset 0 0 0 1px var(--kw-sage)}.kw-brief-read,.kw-history,.kw-application,.kw-data,.kw-tab-intro,.kw-source-audit{padding:24px;border:1px solid var(--line);border-radius:5px;background:var(--panel);margin:16px 0}.kw-brief-read h2,.kw-history h2,.kw-application h2,.kw-data h2,.kw-tab-intro h2{font-size:23px;font-weight:500}.kw-brief-read li{margin:15px 0;line-height:1.65}.kw-brief-read p,.kw-application p,.kw-tab-intro p,.kw-source-audit p{font-size:13px;line-height:1.8;color:var(--soft);max-width:75ch}.kw-history article{display:grid;grid-template-columns:150px 1fr;gap:20px;margin-left:6px;padding:25px 0 25px 22px;border-left:1px solid var(--line);position:relative}.kw-history article:before{content:'';position:absolute;left:-4px;top:28px;border-radius:50%;width:7px;height:7px;background:var(--kw-sage)}.kw-history time{font-size:12px;color:var(--accent)}.kw-history h3{font-size:14px;line-height:1.4}.kw-history .textlink{font-size:10px;white-space:normal}.kw-application h2{margin:10px 0 20px;font:27px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;max-width:60ch}.kw-checklist{display:grid;gap:12px;margin:20px 0}.kw-checklist label{display:flex;align-items:start;gap:10px;font-size:12px;line-height:1.5;cursor:pointer}.kw-checklist input{accent-color:var(--kw-sage);margin-top:3px}.kw-action{display:inline-flex;align-items:center;gap:20px;background:var(--kw-tint);border:1px solid var(--kw-sage);border-radius:4px;padding:13px 18px;font-size:12px}.kw-bars{margin:24px 0;display:grid;gap:15px}.kw-bars>div{display:grid;grid-template-columns:160px minmax(0,1fr) 45px;gap:15px;align-items:center;font-size:12px}.kw-bars i{height:15px;position:relative;background:var(--kw-tint)}.kw-bars i:after{content:'';position:absolute;inset:0 auto 0 0;width:var(--bar);background:var(--kw-sage)}.kw-bars b{font-size:14px;font-weight:500}.kw-missing{padding:50px}
@media(min-width:1650px){.kw-card-art{height:320px}.kw-library-main{padding:35px 30px 50px}.kw-library{grid-template-columns:minmax(0,1fr) 300px}.kw-detail{grid-template-columns:minmax(0,1fr) 370px}.kw-step-visual{height:290px}}
@media(max-width:1350px){.kw-library{grid-template-columns:minmax(0,1fr) 250px}.kw-library-main{padding:26px 18px}.kw-library-rail{padding:26px 16px}.kw-card-art{height:205px}.kw-card-copy h2{font-size:15px}.kw-category-tabs button{padding:9px 11px}.kw-table-thumb{display:none}.kw-catalog th:first-child{width:25%}.kw-detail{grid-template-columns:minmax(0,1fr) 290px;gap:14px;padding:20px}.kw-detail-header{flex-wrap:wrap}.kw-detail-header h1{font-size:36px}.kw-step-head{min-height:105px}.kw-step-head>span{width:25px;height:25px;font-size:15px}.kw-step-head{gap:8px}.kw-step-head h3{font-size:13px}.kw-step-head p{font-size:10px}.kw-step-visual{height:220px}.kw-effects>div{font-size:10px;gap:8px}.kw-effects{gap:16px}.kw-rail-map{height:200px}.kw-detail-tabs{gap:4px}.kw-detail-tabs button{padding:10px 9px}.kw-definition{font-size:25px}}
@media(max-width:1100px){.kw-library{grid-template-columns:minmax(0,1fr)}.kw-library-rail{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;border-left:0;border-top:1px solid var(--line)}.kw-rail-foot{grid-column:1/-1}.kw-card-art{height:250px}.kw-detail{grid-template-columns:minmax(0,1fr)}.kw-detail-rail{grid-template-columns:repeat(2,minmax(0,1fr))}.kw-detail-header{flex-wrap:nowrap}.kw-detail-header h1{font-size:37px}.kw-step-head{min-height:95px}.kw-step-visual{height:250px}.kw-rail-map{height:240px}}
@media(max-width:800px){.kw-library-main{padding:25px 18px}.kw-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.kw-card-art{height:240px}.kw-library-rail{grid-template-columns:1fr 1fr}.kw-library-rail .kw-rail-section:last-of-type{grid-column:1/-1}.kw-detail{padding:18px 15px}.kw-detail-header{flex-wrap:wrap}.kw-catalog{min-width:680px}.kw-pmesii-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kw-dimension-strip{grid-template-columns:repeat(3,1fr)}.kw-dimension-strip button:nth-child(-n+3){border-bottom:1px solid var(--line)}.kw-detail-header h1{font-size:34px}.kw-definition{font-size:24px}.kw-source-footer .kw-section-title{align-items:start;flex-direction:column;gap:8px}}
@media(max-width:540px){.kw-library-main{padding:23px 13px}.kw-library-header h1{font-size:31px;letter-spacing:-1.2px}.kw-library-header>p{font-size:13px}.kw-controls{gap:8px;align-items:stretch}.kw-controls .picker{width:85px}.kw-controls .picker-trigger{padding:9px;gap:5px}.kw-search{padding:0 8px;gap:6px}.kw-search input{font-size:11px}.kw-search kbd{display:none}.kw-category-tabs{gap:2px}.kw-category-tabs button{font-size:11px;padding:8px 10px}.kw-result-meta{font-size:9px;align-items:start}.kw-result-meta>span:last-child{max-width:120px;text-align:right}.kw-card-grid{grid-template-columns:1fr}.kw-card-art{height:285px}.kw-card-copy{padding:14px 10px}.kw-card-copy h2{font-size:21px}.kw-card-copy p{font-size:12px}.kw-library-rail{grid-template-columns:1fr;padding:20px 15px;gap:0}.kw-library-rail .kw-rail-section:last-of-type{grid-column:auto}.kw-context-map{height:220px}.kw-dimension-strip span{font-size:10px}.kw-section-title{gap:12px}.kw-section-title h2{font-size:18px}.kw-section-title>button{font-size:10px;max-width:95px}.kw-detail{padding:15px 12px;gap:15px}.kw-detail-header h1{font-size:32px;letter-spacing:-1px}.kw-detail-meta{font-size:9px;gap:7px;flex-wrap:wrap}.kw-detail-meta>span:first-child{letter-spacing:.4px}.kw-reading{width:100%}.kw-reading button{flex:1;padding:9px 7px;font-size:10px}.kw-detail-tabs{margin-top:13px}.kw-detail-tabs button{font-size:11px}.kw-definition{font-size:23px}.kw-mechanism-grid{grid-template-columns:1fr;gap:22px}.kw-step{border:0;padding:0!important}.kw-step-head{min-height:0;margin-bottom:12px}.kw-step-head h3{font-size:17px}.kw-step-head p{font-size:12px}.kw-step-head>span{height:32px;width:32px;font-size:19px}.kw-step-arrow{display:none}.kw-step-visual{height:265px}.kw-effects>div{font-size:12px}.kw-visual-key{font-size:9px;gap:10px}.kw-visual-key span:last-child{margin-left:0}.kw-analysis-grid{grid-template-columns:1fr}.kw-pmesii-grid{grid-template-columns:1fr}.kw-detail-rail{grid-template-columns:1fr}.kw-source-cards>a{min-width:0;flex-basis:100%;padding:11px}.kw-source-cards b{font-size:10px}.kw-source-cards small{font-size:9px}.kw-source-footer{padding:12px}.kw-brief-read,.kw-history,.kw-application,.kw-data,.kw-tab-intro,.kw-source-audit{padding:17px 13px}.kw-history article{grid-template-columns:1fr;gap:10px}.kw-bars>div{grid-template-columns:95px minmax(0,1fr) 30px;gap:9px;font-size:10px}.kw-bars b{font-size:12px}.kw-saved-grid{grid-template-columns:1fr}.kw-workspace-sources summary{flex-wrap:wrap}.kw-checklist label{font-size:11px}.kw-action{font-size:11px;padding:12px}.kw-action .kw-icon{width:17px}.kw-application h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){.kw-card{transition:none}}

/* Same soft surfaces and corner treatment as LAGE's existing panels. */
.kw-card{border-radius:14px;box-shadow:0 4px 18px #00000003}.kw-card>a{border-radius:14px;padding:7px}.kw-card-art{border-radius:9px}.kw-mechanism,.kw-fallacy,.kw-alternatives,.kw-rail-panel,.kw-source-footer,.kw-brief-read,.kw-history,.kw-application,.kw-data,.kw-tab-intro,.kw-source-audit{border-radius:14px}.kw-pmesii-grid details,.kw-source-cards>a,.kw-object-grid a,.kw-full-button,.kw-reading,.kw-search,.kw-dimension-strip{border-radius:9px}.kw-reading button,.kw-category-tabs button{border-radius:7px}.kw-application h2{font-weight:500}.kw-library-main{background:var(--bg)}.kw-library-rail{background:var(--panel)}.kw-card-copy p,.kw-step-head p,.kw-effects>div{font-size:12px}.kw-library-header h1{font-weight:600}.kw-detail-header h1{font-weight:600}

.kw-show-all{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:12px;color:var(--accent);padding:14px 4px;border-bottom:1px solid var(--line)}.kw-alternatives details[open]>summary>span:last-child,.kw-pmesii-grid details[open]>summary>span:last-child{transform:rotate(45deg)}

.kw-facts{border:1px solid var(--line);border-radius:14px;background:var(--panel);margin:18px 0;padding:15px}.kw-facts-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}.kw-facts-heading h2{font-size:14px;font-weight:600}.kw-facts-heading>span{color:var(--muted);font-size:10px}.kw-fact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.kw-fact-grid article{min-width:0;border-right:1px solid var(--line);padding-right:14px}.kw-fact-grid article:last-child{border:0;padding:0}.kw-fact-grid article>span{display:block;color:var(--muted);font-size:10px}.kw-fact-grid strong{display:block;font-size:18px;font-weight:550;letter-spacing:-.4px;line-height:1.3;margin:7px 0}.kw-fact-grid p{font-size:10px;color:var(--muted);line-height:1.5;margin:0 0 7px}.kw-fact-grid .textlink{font-size:9px;white-space:normal;line-height:1.4}.kw-fact-grid:has(article:only-child){grid-template-columns:1fr}.kw-fact-grid:has(article:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.kw-fact-grid,.kw-fact-grid:has(article:nth-child(2):last-child){grid-template-columns:1fr}.kw-fact-grid article{border-right:0;border-bottom:1px solid var(--line);padding:0 0 12px}.kw-facts-heading{align-items:start}.kw-facts-heading>span{font-size:9px;max-width:90px;text-align:right}}

.kw-work-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.kw-work-actions button{font-size:12px;padding:9px 13px}.kw-cell-sources{display:grid;gap:7px;padding:0 14px 14px}.kw-cell-sources a{white-space:normal;font-size:11px;overflow-wrap:anywhere}.kw-pmesii-grid small{display:block;padding:0 14px 12px;color:var(--muted)}.kw-situation>h2{font-size:19px;margin:30px 0 14px}.kw-situation>p{font-size:13px;color:var(--muted);line-height:1.7}.kw-work-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px;margin:12px 0;overflow-wrap:anywhere}.kw-work-card h3{margin:8px 0}.kw-work-card p{font-size:13px;line-height:1.7}.kw-work-card time{font-size:11px;color:var(--muted)}.kw-work-card button{margin:12px 14px 0 0}.kw-backlinks{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0}.kw-backlinks h3{font-size:13px}.kw-backlinks a{font-size:12px}.dialog.kw-editor-dialog{width:min(900px,96vw);max-width:900px}.kw-edit-section{border:1px solid var(--line);border-radius:10px;padding:14px;margin:12px 0}.kw-edit-section>summary{font-weight:600;cursor:pointer}.kw-edit-section fieldset{min-width:0;border:1px solid var(--line);border-radius:8px;margin:14px 0;padding:14px}.kw-edit-section legend{font-weight:600;color:var(--accent)}.kw-edit-row{display:grid;gap:8px;border-bottom:1px solid var(--line);padding:16px 0}.kw-edit-row .form-field{margin:0}.kw-edit-row button{justify-self:start}.kw-editor-dialog select,.dialog select{width:100%;min-width:0;max-width:100%;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);font:inherit;padding:9px}.kw-editor-dialog option{padding:6px;white-space:normal}.kw-editor-dialog .form-field small{color:var(--muted);font-size:11px}.kw-editor-dialog .form-actions{position:sticky;bottom:0;background:var(--panel);padding:14px 0;z-index:2}.kw-detail-header{flex-wrap:wrap}.kw-detail-tabs{overflow-x:auto}.kw-detail-rail .kw-actor-link{white-space:normal;text-align:left}
