/* The tools workspace (tools revamp phase 1, 2026-12-03): one sidebar beside every tool page, a drawer on phones.
   Layout only: the tools inside <main> are untouched. Markup comes from site_chrome.py, behaviour from /tools/ws.js. */
.ws{display:grid;grid-template-columns:minmax(0,1fr);min-height:60vh}
.ws>main{min-width:0;width:min(1140px,100% - 32px)}
.ws-side{background:#14181b;border-right:1px solid var(--border);font-family:var(--f-body)}
.ws-in{display:flex;flex-direction:column;gap:12px;padding:16px 12px 18px}
.ws-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 8px}
.ws-top b{font:600 12px var(--f-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted)}
.ws-x{display:none;width:44px;height:44px;border:1px solid var(--border);border-radius:var(--r);background:none;color:var(--text);font-size:20px;line-height:1;cursor:pointer}
.ws-find{display:flex;align-items:center;gap:8px;margin:0 4px;padding:0 10px;height:40px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-muted)}
.ws-find:focus-within{border-color:var(--accent)}
.ws-find input{flex:1;min-width:0;border:0;background:none;color:var(--text);font:400 14px var(--f-body);outline:none}
.ws-find kbd{font:500 11px var(--f-mono);border:1px solid var(--border);border-radius:4px;padding:1px 5px;color:var(--text-muted)}
.ws-nav{display:flex;flex-direction:column;gap:10px}
.ws-grp{display:flex;flex-direction:column;gap:1px}
.ws-h{margin:0;padding:0 10px 5px;font:500 11px var(--f-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted)}
.ws-h.pro{color:var(--accent)}
.ws-nav a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-radius:6px;font-size:14px;color:var(--text);text-decoration:none;line-height:1.3}
.ws-nav a:hover{background:rgba(255,255,255,.04);color:var(--accent-hover)}
.ws-nav a[aria-current]{background:var(--accent-soft);color:var(--accent-hover);font-weight:600}
.ws-nav a.ws-sub{padding:6px 10px 6px 22px;font-size:13px;color:var(--text-muted)}
.ws-nav a.ws-sub:hover{color:var(--text)}
.ws-nav .ws-pro{flex:none;font-size:11px;color:var(--text-muted)}
.ws-nav .ws-pro svg{display:block}
.ws-none{margin:0;padding:0 10px;font-size:13px;color:var(--text-muted)}
.ws-code{margin:2px 4px 0;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);font-size:13px;display:grid;gap:6px}
.ws-code p{margin:0;color:var(--text-muted);line-height:1.45}
.ws-code b{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text)}
.ws-code b i{width:8px;height:8px;border-radius:50%;background:var(--text-muted);flex:none}
.ws-code.on b i{background:var(--success)}
.ws-code a{color:var(--accent);font-weight:600;text-decoration:none}
.ws-code a:hover{text-decoration:underline}
/* the phone/tablet bar above the tool, and the drawer */
.ws-bar{display:flex;align-items:center;gap:10px;width:min(1140px,100% - 32px);margin:12px auto 0}
.ws-open{flex:none;white-space:nowrap;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:600 14px var(--f-body);cursor:pointer}
.ws-open:hover{border-color:var(--accent)}
.ws-here{min-width:0;font-size:13px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ws-dim{display:none}
@media (max-width:1023.98px){
  .ws-side{position:fixed;top:0;bottom:0;left:0;z-index:40;width:min(320px,86vw);overflow-y:auto;transform:translateX(-102%);transition:transform .22s var(--ease-out,ease);visibility:hidden}
  .ws.open .ws-side{transform:none;visibility:visible}
  .ws.open .ws-dim{display:block;position:fixed;inset:0;z-index:39;background:rgba(11,13,14,.7);border:0;padding:0;cursor:pointer}
  .ws-x{display:inline-grid;place-items:center}
  .ws-find kbd{display:none}
  .ws-nav a{padding:9px 10px}
  body.ws-noscroll{overflow:hidden}
}
@media (min-width:1024px){
  .ws{grid-template-columns:248px minmax(0,1fr)}
  .ws-bar{display:none}
  .ws-side{grid-row:1 / span 2}
  .ws-side .ws-in{position:sticky;top:var(--ws-top,60px);max-height:calc(100vh - var(--ws-top,60px));overflow-y:auto;box-sizing:border-box}
  .ws>main{grid-column:2}
}
/* tool pages open on the tool: a shorter headline inside the workspace */
.ws .tool-hero{padding-top:clamp(20px,3vw,36px)}
.ws .tool-hero h1{font-size:clamp(32px,4.4vw,48px)}
@media (prefers-reduced-motion:reduce){.ws-side{transition:none}}
