:root {
  color-scheme:light;
  --ink:#242421;
  --muted:#74746d;
  --line:#deded6;
  --paper:#fbfbf8;
  --accent:#d8ed69;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:#eeeee8;
  color:var(--ink);
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  min-height:100vh;
}
button,input,select {
  font:inherit;
}
button,a,select,input {
  outline-offset:4px;
}
button,select {
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:7px;
  background:white;
  color:inherit;
}
button {
  cursor:pointer;
}
button:hover {
  background:#f3f3eb;
}
a {
  color:inherit;
}
.sidebar {
  padding:30px 20px;
  background:var(--paper);
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:20px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}
.brand {
  font-size:22px;
  font-weight:800;
  letter-spacing:-1px;
  text-decoration:none;
}
.brand span {
  display:block;
  font-size:9px;
  letter-spacing:2px;
  margin-top:8px;
  color:var(--muted);
}
.intro {
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
  margin:2px 0;
}
.search-label,.eyebrow {
  font-size:10px;
  letter-spacing:1.4px;
  color:var(--muted);
  font-weight:600;
}
.search-label {
  margin-bottom:-13px;
}
input {
  width:100%;
  padding:10px;
  border:1px solid var(--line);
  border-radius:6px;
  background:white;
}
nav {
  display:grid;
  gap:6px;
}
nav a {
  padding:13px 10px;
  text-decoration:none;
  border-radius:7px;
  border:1px solid transparent;
}
nav a.active {
  background:#e8eecf;
  border-color:#cedba2;
}
nav strong {
  display:block;
  font-size:13px;
}
nav small {
  display:block;
  font-family:monospace;
  font-size:10px;
  color:var(--muted);
  margin-top:7px;
  overflow-wrap:anywhere;
}
nav .section {
  font-size:10px;
  color:var(--muted);
  margin:18px 10px 4px;
  letter-spacing:1px;
}
footer {
  margin-top:auto;
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
  padding-top:24px;
}
#connection {
  display:inline-flex;
  align-items:center;
  gap:6px;
}
#connection::before {
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:#7a8554;
}
.workspace {
  min-width:0;
}
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:26px 30px;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
h1 {
  font-size:23px;
  font-weight:650;
  margin:9px 0 0;
  letter-spacing:-.7px;
}
.toolbar {
  display:flex;
  align-items:center;
  gap:16px;
  padding:14px 30px;
  background:var(--paper);
  border-bottom:1px solid var(--line);
  flex-wrap:wrap;
}
.toolbar label {
  font-size:12px;
  display:flex;
  gap:9px;
  align-items:center;
}
.toolbar a {
  margin-left:auto;
  font-size:12px;
}
.toolbar a[hidden] {
  display:none;
}
.notes {
  padding:14px 30px;
  border-bottom:1px solid var(--line);
  background:#f6f6f0;
}
.notes summary {
  cursor:pointer;
}
.notes code {
  font-size:12px;
}
.notes p {
  font-size:12px;
  line-height:1.8;
  max-width:800px;
  color:#64645b;
  margin:12px 0 8px;
}
#file {
  font-size:10px;
  color:var(--muted);
  overflow-wrap:anywhere;
}
#badge {
  font-size:10px;
  border:1px solid #c9c9c0;
  padding:3px 7px;
  border-radius:20px;
  margin-left:12px;
}
#notice {
  padding:0 30px;
  font-size:12px;
}
#notice:not(:empty) {
  padding-top:12px;
}
#stage {
  padding:28px;
  overflow:auto;
  min-height:500px;
}
#frame-wrap {
  margin:0 auto;
  position:relative;
  box-shadow:0 8px 40px #24242112;
  background:white;
}
iframe {
  border:0;
  outline:1px solid #d4d4cb;
  background:white;
  transform-origin:top left;
  display:block;
}
#planned {
  background:var(--paper);
  border:1px dashed #bebeb0;
  padding:60px 28px;
  text-align:center;
  line-height:1.8;
}
#planned code {
  display:block;
  overflow-wrap:anywhere;
}
[hidden] {
  display:none!important;
}
@media(max-width:800px) {
  body {
    grid-template-columns:1fr;
  }
  .sidebar {
    position:static;
    height:auto;
    padding:16px;
    gap:12px;
  }
  .intro,.search-label,#filter,footer {
    display:none;
  }
  .brand {
    font-size:17px;
  }
  .brand span {
    display:inline;
    margin-left:12px;
  }
  nav {
    display:flex;
    overflow:auto;
    gap:5px;
  }
  nav a {
    white-space:nowrap;
    padding:10px;
  }
  nav .section,nav small {
    display:none;
  }
  .topbar,.toolbar,.notes {
    padding:16px;
  }
  .topbar h1 {
    font-size:20px;
  }
  #stage {
    padding:16px;
  }
  .toolbar {
    gap:10px;
  }
  .toolbar a {
    margin-left:0;
  }
}
.explorer-tabs { display: flex; gap: 6px; }
.explorer-tabs button { flex: 1; font-size: 11px; padding: 9px 7px; }
.explorer-tabs [aria-pressed=true] { background: #e8eecf; border-color: #bccd8c; }
#flow-panel { padding: 24px 30px; background: #fbfcf5; border-bottom: 1px solid var(--line); }
.flow-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.flow-heading h2 { font-size: 18px; margin: 5px 0 10px; }
.flow-heading p { font-size: 12px; color: #74746d; line-height: 1.7; margin: 0; }
#flow-steps { display: flex; gap: 8px; overflow: auto; padding: 18px 0 12px; }
#flow-steps a { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 11px; text-decoration: none; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
#flow-steps a.active { background: #e5edc8; border-color: #bacb8a; }
#flow-steps b { background: #eef1e5; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.flow-footer { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
#flow-action { font-size: 12px; line-height: 1.8; }
.flow-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
.flow-hint { font-size: 10px; color: var(--muted); line-height: 1.7; margin-bottom: 0; }
button:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 800px) {
  #flow-panel { padding: 16px; }
  .explorer-tabs { max-width: 240px; }
  .flow-footer { flex-wrap: wrap; gap: 4px; }
}
#flow-map-panel { background: #fbfcfe; }
.map-intro { padding: 26px 30px 16px; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.map-intro h2 { margin: 7px 0 10px; font-size: 22px; }
.map-intro p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 12px; }
.map-controls { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.map-controls output { min-width: 42px; text-align: center; font-size: 11px; }
.map-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; padding: 12px 30px 22px; font-size: 11px; color: #6b7d8b; }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.map-legend i { display: inline-block; width: 22px; height: 16px; border: 1px solid #9db4c7; background: #fff; border-radius: 3px; }
.map-legend .legend-terminal { border-radius: 12px; background: #284f6c; }
.map-legend .legend-action { border-radius: 50%; width: 18px; height: 18px; background: #eff5fb; }
.map-legend .legend-decision { border-radius: 0; transform: rotate(45deg); width: 15px; height: 15px; background: #e5f1fc; }
#flow-map-viewport { overflow: auto; height: calc(100vh - 286px); min-height: 480px; border-top: 1px solid #e1e7ed; background: radial-gradient(#d7e1e9 .8px, transparent .8px); background-size: 18px 18px; }
#flow-map-canvas { padding: 20px; width: max-content; }
#flow-map-canvas svg { display: block; }
.node-title { font-size: 13px; font-weight: 650; fill: #345774; }
.node-route { font-size: 9px; fill: #7890a2; font-family: monospace; }
.node-start .node-title, .node-end .node-title { fill: white; font-size: 12px; }
.edge-label { font-size: 10px; fill: #6d8294; }
a.flow-node { cursor: pointer; }
a.flow-node:hover > rect, a.flow-node:focus > rect { fill: #eaf5ff; stroke: #3796d5; stroke-width: 2.5; }
a.flow-node:focus { outline: none; }
.flow-view-actions { display: flex; gap: 8px; }
@media(max-width:800px) { .map-intro { padding:20px 16px; flex-wrap:wrap; } .map-legend { padding:12px 16px; gap:16px; } #flow-map-viewport { height:600px; } .flow-view-actions { flex-wrap:wrap; } }
