/* /fishbone-diagram-maker/ page styles. Built from /assets/polyatic.css tokens only (no new fonts or theme colours).
   Category colours are the visitor's own content (Okabe-Ito set), set on the SVG by app.js as attributes. */
.nojs{margin:1.25rem 0 0;padding:0.875rem 1rem;border:1px solid var(--line);border-left:0.25rem solid var(--accent);border-radius:0.625rem;background:var(--surface);color:var(--ink);font-size:0.9375rem;line-height:1.6}
.fb-head .sub{margin-bottom:1rem}
@media(max-width:520px){.fb-head h1{font-size:1.5rem;margin-bottom:0.125rem}.fb-head .sub{font-size:0.875rem;margin-bottom:0.625rem}}
.fb-page .k{font-family:var(--mono);font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}

/* phone: inputs, then the diagram; desktop: inputs on the left, the diagram large on the right */
.fb-duo{display:grid;gap:0.875rem;align-items:start}
@media(min-width:920px){.fb-duo{grid-template-columns:minmax(17rem,21rem) minmax(0,1fr);gap:1.25rem 1.5rem}}
.fb-incard,.fb-diacard{min-width:0;display:grid;gap:0.625rem;align-content:start}
@media(max-width:520px){.fb-incard,.fb-diacard{padding:0.75rem}}
.fb-incard .field>.k{display:block;margin-bottom:0.375rem}
.fb-incard input[type=text]{width:100%}
.fb-outhead{display:flex;align-items:center;justify-content:space-between;gap:0.5rem;margin-bottom:0.375rem}
.fb-ind{display:flex;gap:0.375rem}
.fb-ind .chip{padding:0.25rem 0.75rem;font-size:0.875rem}
.fb-incard textarea{width:100%;height:9rem;min-height:5rem;resize:vertical;font-family:var(--mono);font-size:0.8125rem;line-height:1.5;tab-size:2;white-space:pre;overflow-x:auto}
@media(min-width:920px){.fb-incard textarea{height:22rem}}

.fb-help{margin:0;font-size:0.8125rem;line-height:1.5;color:var(--muted)}
.fb-help:empty{display:none}
.fb-src a{color:var(--accent)}
.fb-row{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center}
.fb-row select{flex:1 1 9rem;min-width:0}
.fb-row .btn{flex:1 1 auto}
.fb-row input[type=text]{flex:1 1 12rem;min-width:0;font-family:var(--mono);font-size:0.75rem}
.fb-inline{font-size:0.8125rem;color:var(--muted)}

.fb-notice{margin:0 0 1rem;padding:0.75rem 0.875rem;border:1px solid var(--line-2);border-left:0.25rem solid var(--accent);border-radius:0.5rem;background:var(--accent-soft);font-size:0.875rem;line-height:1.5;color:var(--ink);display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}
.fb-notice[hidden]{display:none}
.fb-notice.is-bad{border-left-color:var(--bad);background:var(--surface-2)}
.fb-notice .chip{padding:0.375rem 0.6875rem;font-size:0.8125rem}

/* the diagram */
.fb-tools{display:flex;align-items:center;gap:0.5rem}
.fb-tools select{width:auto}
.fb-stat{margin:0;font-family:var(--mono);font-size:0.75rem;color:var(--muted)}
.fb-grow{flex:1 1 0}
.fb-stage{border:1px solid var(--line);border-radius:0.5rem;background:var(--surface-2);overflow:auto;max-height:75vh;-webkit-overflow-scrolling:touch}
.fb-svg{display:block;width:100%;height:auto;font-family:var(--sans)}
.fb-stage.is-full .fb-svg{width:auto;max-width:none}
.fb-maphelp{margin-top:0.125rem}
.fb-spine{stroke:var(--ink)}
.fb-box{cursor:pointer;outline:none}
.fb-box rect{stroke-width:1}
.fb-box.k-cause rect,.fb-box.k-sub rect{fill:var(--surface)}
.fb-box.k-sub rect{stroke:var(--line-2)}
.fb-box.k-cause text,.fb-box.k-sub text{fill:var(--ink)}
.fb-box.k-head rect{fill:var(--ink)}
.fb-box.k-head text{fill:var(--bg)}
.fb-box.k-head.is-empty text{fill-opacity:.6}
.fb-box text{pointer-events:none;text-rendering:geometricPrecision}
.fb-box:hover rect,.fb-box:focus-visible rect,.fb-box.is-sel rect{stroke:var(--accent);stroke-width:2.5}

/* editor */
.fb-editor{display:grid;gap:0.5rem;padding:0.75rem;border:1px solid var(--line-2);border-radius:0.5rem;background:var(--surface)}
.fb-editor[hidden],.fb-editor .field[hidden]{display:none}
.fb-editor input[type=text]{width:100%}
.fb-editor .field>.k{display:block;margin-bottom:0.25rem}
.fb-editor .chip{padding:0.375rem 0.625rem;font-size:0.8125rem}
.fb-editor .fb-row .btn{flex:0 0 auto;margin-left:auto;min-height:2.25rem;padding:0.375rem 1rem}
.fb-swatches{display:flex;flex-wrap:wrap;gap:0.375rem}
.fb-swatch{width:2.25rem;height:2.25rem;padding:0.3125rem;border:1px solid var(--line-2);border-radius:0.375rem;background:var(--surface);cursor:pointer}
.fb-swatch span{display:block;width:100%;height:100%;border-radius:0.1875rem}
.fb-swatch[aria-pressed="true"]{outline:3px solid var(--ink);outline-offset:1px}

.fb-export{display:grid;gap:0.5rem;padding-top:0.25rem}
.fb-export .chip{padding:0.375rem 0.75rem;font-size:0.8125rem}
.fb-pre{font-family:var(--mono);font-size:0.8125rem;line-height:1.5;background:var(--surface-2);border:1px solid var(--line);border-radius:0.5rem;padding:0.75rem 1rem;overflow-x:auto;max-width:100%}
.explainer code{font-family:var(--mono);font-size:0.8125rem}
