:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1d1d1f;background:#f5f5f7;font-size:14px;line-height:1.45;font-optical-sizing:auto}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button,.button{border:0;border-radius:10px;background:#0071e3;color:white;padding:.65rem 1rem;cursor:pointer;text-decoration:none;display:inline-block;font-weight:500}button:active,.button:active{filter:brightness(.9)}button:disabled{opacity:.5;cursor:wait}.quiet{background:#e8e8ed;color:#1d1d1f}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #0071e3;outline-offset:3px}input,select,textarea{width:100%;border:1px solid #c8c8ce;border-radius:8px;padding:.55rem;background:#fff;color:inherit}label{display:block;font-size:.88rem;color:#515155;margin-bottom:.7rem}h1{font-size:1.7rem;line-height:1.2;letter-spacing:-.025em;margin:0 0 .7rem}h2{font-size:1.2rem;letter-spacing:-.015em;margin-top:0}h3{font-size:1rem}p{color:#6e6e73}header{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:1.5rem;padding:.8rem 1.5rem;background:rgba(250,250,252,.92);backdrop-filter:blur(18px);border-bottom:1px solid #ddd}header #identity{margin-left:auto;color:#6e6e73}.shell{display:grid;grid-template-columns:200px minmax(0,1fr)}aside{padding:1.2rem .8rem;border-right:1px solid #ddd;min-height:100vh}aside button{display:block;width:100%;text-align:left;margin-bottom:.5rem;overflow-wrap:anywhere}aside .selected{background:#dcecff;color:#005bb5}main{padding:1.4rem 1.6rem;min-width:0}.project-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem}.project-heading p{margin:.3rem 0 1.5rem}nav{display:flex;gap:.4rem;margin:1rem 0;padding:4px;background:#e8e8ed;border-radius:12px;width:fit-content;max-width:100%;flex-wrap:wrap}nav button{background:transparent;color:#515155}nav button[aria-pressed=true]{background:white;color:#1d1d1f;box-shadow:0 1px 5px #0001}.controls{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin:1rem 0}.controls label{margin:0;max-width:220px}.controls label select{margin-top:.2rem}.canvas{height:65vh;min-height:400px;border:1px solid #d8d8df;border-radius:16px;background:#f5f5f7;overflow:hidden;position:relative;touch-action:none;cursor:grab}.canvas:active{cursor:grabbing}.canvas>p{position:absolute;top:40%;left:10%;right:10%;text-align:center}.canvas img{position:absolute;left:0;top:0;max-width:none;transform-origin:0 0;user-select:none;pointer-events:none}.zoom{display:flex;gap:.5rem;align-items:center;margin:.7rem 0 2rem}.zoom span{color:#6e6e73;font-size:.85rem;margin-left:auto}.zoom button{background:#e8e8ed;color:#1d1d1f}.details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem}.panel{background:#fff;border:1px solid #e1e1e7;border-radius:12px;padding:1.1rem;min-width:0}.panel li{margin:.7rem 0;overflow-wrap:anywhere}.panel li button{font-size:.8rem;margin-left:.6rem}.panel pre{overflow:auto;max-height:400px;background:#f5f5f7;padding:1rem;font-size:.8rem;white-space:pre-wrap;overflow-wrap:anywhere}.panel textarea{margin-bottom:.6rem}.login{min-height:100vh;display:grid;place-items:center;padding:1rem}.login .panel{max-width:460px;width:100%;padding:2rem}.hint{font-size:.85rem}#notice{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);z-index:10;background:#1d1d1f;color:#fff;border-radius:12px;padding:1rem 1.5rem;box-shadow:0 6px 30px #0002;max-width:90vw}@media(max-width:900px){.shell{grid-template-columns:1fr}aside{min-height:0;border-right:0;border-bottom:1px solid #ddd}main{padding:1rem}.details{grid-template-columns:1fr}.project-heading{align-items:start;flex-direction:column}.canvas{height:55vh}}@media(prefers-reduced-transparency:reduce){header{background:#fafafc;backdrop-filter:none}}@media(prefers-contrast:more){p,label{color:#333}.panel,.canvas{border-color:#555}}
.skill-status{display:flex;gap:2rem;align-items:center;margin:1.5rem 0;padding:1.1rem 1.4rem}.skill-status strong{display:block}.eyebrow{display:block;font-size:.7rem;font-weight:600;letter-spacing:.05em;color:#6e6e73}.skill-status #skill-dirty{margin-left:auto;color:#0071e3;font-size:.9rem}.skill-toolbar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.skill-preview-toggle{display:flex;gap:.5rem;align-items:center;margin:0 0 0 auto}.skill-preview-toggle input{width:auto}.skill-workbench{display:grid;grid-template-columns:230px minmax(0,1fr);gap:1rem;margin:1.2rem 0}.skill-workbench aside{min-height:0;border:1px solid #e1e1e7;padding:1.1rem}.skill-files button{width:100%;display:block;text-align:left;margin-bottom:.5rem;overflow-wrap:anywhere}.skill-files .selected{background:#e8f1ff;color:#0065cc}.skill-content{padding:1.2rem}.skill-content>label:first-child{font-weight:600;font-size:1rem;color:#1d1d1f}.skill-edit-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;margin-bottom:1rem}#skill-text{min-height:540px;height:58vh;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.88rem;line-height:1.6;tab-size:2;padding:1rem}.markdown-preview{max-height:58vh;min-height:540px;overflow:auto;border:1px solid #e1e1e7;border-radius:9px;padding:1.2rem;overflow-wrap:anywhere;background:#fafafa}.markdown-preview h1{font-size:1.6rem}.markdown-preview h2{font-size:1.2rem;margin-top:1.4rem}.markdown-preview h3{font-size:1rem}.markdown-preview p{color:#343438}.markdown-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.8rem;background:#ececf0;padding:1rem;border-radius:8px}.markdown-preview code{font-family:ui-monospace,SFMono-Regular,monospace;background:#ececf0;border-radius:3px;padding:.1rem .2rem}.markdown-preview blockquote{border-left:3px solid #c8d5e8;margin:1rem 0;padding-left:1rem;color:#515155}.skill-compare,.skill-history{margin-top:1rem}.skill-compare summary{font-weight:600;cursor:pointer}.skill-diff{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem}.skill-diff pre,#skill-history-preview{max-height:350px;white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere;background:#f5f5f7;padding:1rem;border-radius:8px;font-size:.8rem}.skill-history>label{max-width:700px}.skill-edit-columns.preview-off{grid-template-columns:1fr}.skill-files .file-path{display:block;font-size:.72rem;color:#6e6e73;font-weight:400}@media(max-width:1200px){.skill-edit-columns{grid-template-columns:1fr}.markdown-preview{max-height:420px;min-height:120px}}@media(max-width:750px){.skill-workbench{grid-template-columns:1fr}.skill-status{align-items:start;flex-direction:column;gap:.7rem}.skill-status #skill-dirty{margin:0}.skill-diff{grid-template-columns:1fr}.skill-preview-toggle{margin:0}}
.inline-link{display:inline!important;width:auto!important;text-align:inherit!important;background:transparent;color:#0071e3;padding:0!important;margin:0!important;border:0;border-radius:0;font-weight:inherit;text-decoration:underline;cursor:pointer}

.canvas:fullscreen{width:100vw;height:100vh;border:0;border-radius:0;background:#f5f5f7}#canvas-tools{position:absolute;top:14px;right:14px;z-index:2;display:flex;gap:.5rem;align-items:center;padding:.5rem;border-radius:12px;background:#fafafcf2;box-shadow:0 2px 15px #0001}.zoom{flex-wrap:wrap}

/* Compact workspace: controls share a baseline and exports stay together. */
header{min-height:52px;padding:.55rem 1.2rem;gap:1rem}
button,.button{min-height:36px;padding:.5rem .85rem;border-radius:8px;line-height:1.4;white-space:nowrap}
input,select{min-height:36px;padding:.4rem .6rem}textarea{padding:.6rem}
.project-heading{align-items:flex-start;flex-wrap:wrap;margin-bottom:1rem}
.project-heading>div:first-child{min-width:0;flex:1 1 260px}
.project-heading h1{margin:0 0 .3rem}.project-heading p{margin:0;font-size:.9rem}
.project-actions{display:flex;gap:.5rem;flex-wrap:wrap;flex:0 1 auto!important}
nav{margin:.8rem 0;gap:.15rem;border-radius:10px}nav button{padding:.45rem .75rem;min-height:34px}
.controls{align-items:flex-end;gap:.65rem;margin:.8rem 0 .5rem}
.controls label{flex:0 1 180px;min-width:130px;max-width:230px;font-size:.85rem}
.controls label:first-child{flex-basis:220px}.controls #subject-control{flex-basis:230px}
.controls button,.controls>.button{flex-shrink:0}.controls select{margin-top:.25rem}
.view-help{margin:.4rem 0 .8rem;color:#6e6e73;font-size:.85rem;max-width:850px}
.view-help summary{cursor:pointer;width:fit-content}.view-help p{margin:.5rem 0}
.canvas{border-radius:12px;min-height:360px;height:64vh}.canvas>p{font-size:.95rem}
.zoom{gap:.4rem;margin:.6rem 0 1.2rem}.zoom button{min-height:32px;padding:.35rem .65rem}

.details{gap:1rem}.panel li{margin:.5rem 0}.skill-status{gap:1.5rem;padding:1rem;margin:1rem 0}
aside button{white-space:normal}.skill-workbench aside{min-height:0}
@media(max-width:900px){.shell{grid-template-columns:1fr}.shell>aside{min-height:0;padding:.7rem 1rem}.shell>aside h2{margin-bottom:.5rem}#projects{display:flex;flex-wrap:wrap;gap:.4rem}#projects button{width:auto;max-width:100%;margin:0}.shell>aside>#new-project,.shell>aside>#open-skill{display:inline-block;width:auto;margin:.5rem .4rem 0 0}main{padding:1rem}.project-heading{flex-direction:row}.project-heading>div:first-child{flex-basis:100%}.project-actions{width:100%}.controls label{flex:1 1 150px;max-width:none}.controls label:first-child,.controls #subject-control{flex-basis:190px}.canvas{height:55vh}}
@media(pointer:coarse){button,.button,input,select{min-height:44px}}
.diagram-navigation{display:flex;align-items:center;gap:.5rem;margin:.6rem 0;color:#6e6e73;font-size:.85rem}.diagram-navigation button{padding:.4rem .7rem;min-height:32px}#diagram-stage{position:absolute;left:0;top:0;transform-origin:0 0}#diagram-stage img{width:100%;height:100%;position:absolute;left:0;top:0}#diagram-hotspots{position:absolute;inset:0;pointer-events:none}.diagram-hotspot{position:absolute;pointer-events:auto;background:transparent;border:2px solid transparent;border-radius:12px;padding:0;cursor:pointer}.diagram-hotspot:hover{border-color:#0071e3;background:#0071e306}.diagram-hotspot:focus-visible{outline:3px solid #0071e3;outline-offset:2px}.diagram-hotspot:active{background:#0071e314}.diagram-choices{position:absolute;right:12px;top:12px;z-index:3;background:#fff;border:1px solid #ddd;border-radius:12px;padding:.8rem;max-width:330px;max-height:85%;overflow:auto;box-shadow:0 8px 28px #0002}.diagram-choices button{display:block;width:100%;margin-top:.5rem;text-align:left}
