.quick-help-links { display:grid;gap:6px;margin-bottom:10px; }
.tour-panel { position:fixed;bottom:16px;right:16px;width:min(360px,calc(100% - 32px));padding:16px;z-index:8;background:var(--surface);border:1px solid var(--accent);border-radius:10px;box-shadow:0 8px 36px #0006; }
.tour-panel.tour-top { top:12px;bottom:auto; }
.tour-head,.tour-actions { display:flex;align-items:center;justify-content:space-between;gap:8px; }
.tour-head .icon-button { width:28px;height:28px; }
.tour-count { color:var(--accent);font:.81rem var(--mono); }
.tour-panel h2 { margin:4px 0;font-size:1.18rem; }
.tour-panel p { color:var(--muted);font-size:.93rem;line-height:1.5; }
.tour-actions { margin-top:12px;justify-content:flex-end; }
.tour-highlight { outline:3px solid var(--accent)!important;outline-offset:3px; }

.quick-help-links a { color:var(--accent);text-decoration:underline;text-underline-offset:3px; }

/* Use the same outer frame as the editor. Conversion settings stay with the data. */
.workbench-page {
  --line: var(--site-line);
  --text: var(--site-text);
  --muted: var(--site-secondary);
  --dim: var(--site-muted);
  --panel: var(--site-surface);
  --raised: var(--site-surface3);
  --surface: var(--site-surface2);
  --well: var(--site-bg);
  --accent: var(--site-accent);
  --accent-soft: var(--site-note);
  --on: var(--site-on-accent);
  min-height: 100dvh;
}
.site-footer { margin: 0; }
.workbench-toolbar, .toolbar-actions, .toolbar-button, .privacy-label, .work-actions, .workspace-view {
  display: flex;
  align-items: center;
}
.workbench-toolbar {
  flex: none;
  gap: 16px;
  min-height: 45px;
  padding: 6px var(--site-gutter);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.workbench-toolbar h1, .section-line h2 {
  font: 600 .69rem/1.5 var(--site-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.privacy-label { gap: 6px; color: var(--muted); font-size: .73rem; }
.privacy-label svg { width: 12px; height: 12px; color: var(--accent); }
.toolbar-actions { gap: 8px; margin-left: auto; }
.toolbar-button {
  min-height: 32px;
  justify-content: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--site-control-border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font: 600 .75rem/1.4 var(--site-sans);
}
.toolbar-button:hover { background: var(--raised); color: var(--text); }
.toolbar-button.primary { background: var(--accent); color: var(--on); border-color: var(--accent); }
.toolbar-button svg, .workspace-view svg { width: 14px; height: 14px; }
.workbench-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.workbench-main, .converter, .examples-rail { min-width: 0; min-height: 0; }
.workbench-main, .converter { display: flex; flex-direction: column; }
.workbench-main { scroll-margin-top: var(--site-header-height); }
#source { scroll-margin-top: calc(var(--site-header-height) + 10px); }
.work-actions {
  min-height: 44px;
  flex: none;
  gap: 19px;
  padding: 0 18px;
  background: var(--well);
  border-bottom: 1px solid var(--line);
}
.workspace-view {
  align-self: stretch;
  gap: 7px;
  padding: 0 3px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  background: transparent;
  font: 600 .81rem/1.5 var(--site-sans);
}
.workspace-view:hover { color: var(--text); }
.workspace-view.current { color: var(--accent); border-bottom-color: var(--accent); }
.converter { flex: 1; border: 0; border-radius: 0; }
.config { flex: none; padding: 12px 18px 14px; background: var(--panel); }
.config-field, .selectwrap, .selectwrap select { min-width: 0; }
.config-field label { font: 500 .69rem/1.5 var(--site-mono); color: var(--dim); }
.panel-head { flex: none; height: 46px; padding: 5px 16px; background: var(--surface); }
.panel-head h2 { font-size: .9rem; }
.panel-foot { flex: none; min-height: 42px; padding: 5px 16px; }
.panel-foot .btn { min-height: 30px; }
.panels { flex: 1; min-height: 0; }
.panel { min-height: 0; }
.sense-launch { min-height: 37px; padding: 4px 16px; justify-content: flex-start; gap: 12px; background: var(--panel); }
.sense-launch-button { min-height: 28px; font-size: .78rem; }
.sense-launch > span { font-size: .78rem; }
.flow-art {
  width: min(230px, 54%);
  height: 35px;
  grid-template-columns: minmax(31px, max-content) minmax(36px, 1fr) minmax(31px, max-content);
}
.flow-art > svg { height: 28px; }
.flow-art .end-node { min-width: 0; font-size: .65rem; padding: 2px 5px; }
.flow-art .art-hub { padding: 1px; border-radius: 5px; }
.flow-art .art-hub img { width: 18px; height: 18px; }
.flow-art .art-hub { left: auto; top: 50%; grid-column: 2; justify-self: center; transform: translateY(-50%); }
.examples-rail { display: none; padding: 24px 10px; background: var(--panel); border-right: 1px solid var(--line); }
.examples { margin: 0; }
.examples .section-line { padding-inline: 8px; margin-bottom: 12px; }
.examples .section-line h2 { color: var(--dim); }
.examples .example-grid { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.examples .example { gap: 10px; padding: 9px 8px; border: 1px solid transparent; background: transparent; }
.examples .example:hover { background: var(--raised); border-color: var(--line); }
.examples .ex-icon { width: 32px; height: 32px; }
.examples .example strong { color: var(--text); font-size: .79rem; }
.examples .example small { font-size: .68rem; }
.examples .ex-open { display: none; }
#examplesDialog { max-width: min(360px, calc(100% - 32px)); max-height: 86dvh; }
#examplesDialog .section-line { display: none; }
#examplesDialog .example { width: 100%; }
.preview-note { flex: none; }
.tour-panel { z-index: 40; }

@media (min-width: 1400px) {
  .workbench-grid { grid-template-columns: 210px minmax(0, 1fr); }
  .examples-rail { display: block; overflow: auto; }
  #showExamples { display: none; }
}
@media (min-width: 901px) {
  .workbench-page { height: max(625px, 100dvh); }
  .panels { grid-template-rows: minmax(0, 1fr); }
  .panel .editor, .panel .preview { flex: 1 1 0; height: 0; min-height: 0; }
}
@media (max-width: 900px) {
  .workbench-grid { display: block; }
  .privacy-label { display: none; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .source-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel .editor, .panel .preview { flex: none; height: clamp(210px, 33dvh, 350px); }
}
@media (max-width: 700px) {
  .workbench-toolbar { gap: 8px; min-height: 48px; }
  .workbench-toolbar h1 { font-size: .65rem; letter-spacing: .045em; }
  .toolbar-button { min-height: 34px; }
  .work-actions { padding-inline: var(--site-gutter); }
  .config { padding-inline: var(--site-gutter); }
  .tour-panel { bottom: 8px; right: 8px; width: calc(100% - 16px); padding: 12px; }
}
@media (max-width: 460px) {
  .workbench-toolbar { gap: 6px; padding-inline: 10px; }
  .toolbar-actions { gap: 5px; }
  .toolbar-button { padding-inline: 7px; }
  .workbench-toolbar h1 { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .sense-launch { gap: 5px 10px; }
  .flow-art { width: 48%; }
}

.convert-hint { margin-left: auto; color: var(--dim); font-size: .8rem; }
@media (max-width: 760px) { .convert-hint { display: none; } }
@media (max-width: 370px) { .work-actions { gap: 12px; padding-inline: 10px; } }
