:root{--border:#cfcfcf;--error:#b3261e;--ink:#1a1a1a;color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}*{box-sizing:border-box}body{margin:0}.page{flex-direction:column;max-width:1400px;min-height:100vh;margin:0 auto;padding:1rem 1rem 5.5rem;display:flex}.page-header{flex-wrap:wrap;flex-shrink:0;justify-content:space-between;align-items:center;gap:1rem;display:flex}.page-header h1{font-size:1.25rem}.brand{align-items:center;gap:.75rem;margin-bottom:.75rem;display:flex}.brand h1{margin:0}.brand-logo{flex-shrink:0;width:auto;height:56px}.header-actions{align-items:center;gap:.75rem;display:flex}.columns{flex-direction:column;flex:1;gap:1.5rem;min-height:0;display:flex}.output{flex-direction:column;gap:1.5rem;min-height:0;display:flex}.diagram-row{flex-direction:column;gap:1rem;min-height:0;display:flex}.parameters h2{margin:0 0 .5rem;font-size:1rem}.parameters ul{margin:0;padding:0;font-size:.9rem;list-style:none}.parameters li{margin-bottom:.35rem;line-height:1.4}.diagram-pane{place-items:center;min-width:0;min-height:0;display:grid}.diagram-pane svg{border:1px solid var(--border);border-radius:8px;width:100%;max-width:100%;height:auto}.block{border:1px solid var(--border);border-radius:8px;margin-bottom:1rem;padding:1rem}.block legend{padding:0 .4rem;font-weight:600}.field{margin-bottom:.9rem}.field label{margin-bottom:.25rem;font-size:.9rem;display:block}.field input{border:1px solid var(--border);border-radius:6px;width:100%;padding:.5rem;font-size:1rem}.field input[aria-invalid=true]{border-color:var(--error)}.field-error{color:var(--error);margin:.3rem 0 0;font-size:.85rem}.side-choice{gap:1.5rem;margin-bottom:1rem;display:flex}.mode-choice{flex-direction:column;gap:.5rem;margin-bottom:1rem;display:flex}.mode-choice button{border:1px solid var(--border);cursor:pointer;background:#fff;border-radius:6px;padding:.6rem;font-size:1rem}.mode-choice button[aria-pressed=true]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink);background:#f2f2f2}.comments h2{font-size:1rem}.comments ol{padding-left:1.2rem}.comments li{margin-bottom:.7rem;line-height:1.5}.pdf-button{border:1px solid var(--ink);background:var(--ink);color:#fff;cursor:pointer;white-space:nowrap;border-radius:6px;padding:.7rem 1.4rem;font-size:1rem}.pdf-button:disabled{opacity:.6;cursor:progress}.pdf-button-error{color:var(--error)}.lang-switch{border:1px solid var(--border);cursor:pointer;background:#fff;border-radius:6px;padding:.4rem .8rem}.popup-backdrop{z-index:100;background:#00000073;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.popup{background:#fff;border-radius:10px;max-width:32rem;padding:1.5rem}.popup p{margin-top:0;line-height:1.5}.popup button{border:1px solid var(--ink);cursor:pointer;background:#fff;border-radius:6px;padding:.5rem 1.2rem}@media (width<=899.98px){.pdf-bar{padding:.6rem 1rem calc(.6rem + env(safe-area-inset-bottom));border-top:1px solid var(--border);z-index:10;background:#fff;flex-direction:column;align-items:stretch;gap:.35rem;display:flex;position:fixed;bottom:0;left:0;right:0}.pdf-bar .pdf-button{width:100%}}@media (width>=900px){.page{height:100vh;min-height:0;padding-bottom:1rem;overflow:hidden}.pdf-bar{align-items:center;gap:.75rem;display:flex}.page-header{flex-wrap:nowrap;height:calc(56px + .75rem)}.brand{min-width:0}.brand h1{max-height:2.4em;line-height:1.2;overflow:hidden}.header-actions{flex-shrink:0}.columns{grid-template-columns:340px 1fr;gap:1.5rem;display:grid}.form{min-height:0;overflow-y:auto}.diagram-row{flex:1;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) 16rem;gap:1.5rem;display:grid}.diagram-pane{min-height:0;overflow:hidden}.parameters{min-height:0;overflow-y:auto}.diagram-pane svg{width:auto;max-width:100%;height:auto;max-height:100%}.comments{flex:0 0 40%;min-height:0;overflow-y:auto}}
