:root {
  --bg: #05080d;
  --panel: rgba(11, 18, 27, .94);
  --panel2: #0e1721;
  --line: #22323d;
  --line-strong: #36505b;
  --muted: #91a1aa;
  --text: #f1f8f6;
  --mint: #77f1cb;
  --cyan: #5ad5ec;
  --amber: #f5c76d;
  --red: #ff7683;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

body { background: radial-gradient(circle at 45% -20%, #0c2126 0, #05080d 38%, #04070b 100%); }
.topbar { height: 76px; padding: 0 22px; gap: 18px; position: sticky; top: 0; z-index: 12; }
.topbar-project { min-width: 190px; padding-left: 18px; border-left: 1px solid var(--line); display: grid; gap: 3px; }
.topbar-project span { color: #d9e5e2; font-size: 12px; font-weight: 650; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-project b { color: var(--mint); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; }
.topbar-actions button { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; background: rgba(255,255,255,.02); color: #a6b5b9; font-size: 8px; font-weight: 750; letter-spacing: .09em; cursor: pointer; }
.topbar-actions button:hover:not(:disabled) { border-color: rgba(90,213,236,.52); color: var(--cyan); }
.topbar-actions button:disabled { opacity: .38; cursor: not-allowed; }
.environment { margin-left: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.environment em { border-left: 0; margin-left: 0; padding-left: 4px; }

.desktop-message { display: none; }
.studio-shell { grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.builder-sidebar { padding: 24px 18px 30px; gap: 22px; max-height: calc(100vh - 76px); overflow-y: auto; position: sticky; top: 76px; scrollbar-width: thin; scrollbar-color: #28404b transparent; }
.side-section { padding-bottom: 22px; }
.start-section h1 { font-size: 24px; letter-spacing: -.03em; }
.catalog-section .section-title { align-items: start; }
.catalog-section .section-title h2 { margin: 5px 0 0; font-size: 15px; }
.node-catalog { gap: 10px; }
.catalog-item { padding: 13px; background: linear-gradient(145deg, rgba(18,29,41,.78), rgba(8,14,21,.88)); transition: border-color .18s, transform .18s; }
.catalog-item:hover { transform: translateY(-1px); border-color: #36505c; }
.catalog-item header { align-items: flex-start; }
.catalog-icon { flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid rgba(90,213,236,.2); }
.catalog-title { min-width: 0; display: grid; gap: 4px; }
.catalog-title b { font-size: 11px; line-height: 1.25; }
.catalog-category { color: #6f838c; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.catalog-presence { margin-left: auto; color: var(--mint); font-size: 7px; letter-spacing: .1em; }
.catalog-item > p { font-size: 10px; margin: 10px 0; }
.catalog-contribution { padding: 9px 10px; background: rgba(255,255,255,.025); border-left: 2px solid #31535b; }
.catalog-contribution span { color: #67818a; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.catalog-contribution p { margin: 4px 0 0; color: #a2b0b4; font-size: 9px; line-height: 1.4; }
.catalog-item button { margin-top: 10px; }
.catalog-item button:not(:disabled) { background: rgba(90,213,236,.07); }
.catalog-availability { min-height: 0; margin-bottom: 0 !important; }
.developer-opening { margin-top: 14px; padding: 15px; border: 1px dashed #35505a; border-radius: 12px; background: rgba(90,213,236,.025); }
.developer-opening > span { color: var(--cyan); font-size: 7px; letter-spacing: .14em; }
.developer-opening h3 { margin: 6px 0 3px; font-size: 13px; }
.developer-opening b { color: var(--amber); font-size: 9px; }
.developer-opening p { color: #7f929a; font-size: 9px; line-height: 1.5; margin: 9px 0 0; }
.boundary-note { position: static; margin-top: auto; border-color: #29443f; }

.studio-main { padding: 22px 24px 42px; }
.project-strip { align-items: center; margin-bottom: 14px; }
.project-copy h2 { font-size: 24px; letter-spacing: -.025em; }
.project-copy > p { font-size: 11px; max-width: 760px; }
.project-details { max-width: 680px; }
.project-state { max-width: 470px; }
.project-state span { padding: 8px 10px; background: rgba(9,16,24,.76); }
.project-state b { color: #dfe9e6; }

.guidance-panel { padding: 13px 16px; margin-bottom: 12px; box-shadow: 0 10px 35px rgba(0,0,0,.17); }
.guidance-panel h2 { font-size: 14px; }
.journey { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; gap: 0; margin: 0 0 14px; padding: 0 2px; }
.journey .stage { display: grid; grid-template-columns: 28px auto; column-gap: 9px; align-items: center; min-width: 115px; }
.journey .stage span { grid-row: 1 / 3; width: 28px; height: 28px; }
.journey .stage b { font-size: 9px; }
.journey .stage small { margin-top: 2px; color: #61747c; font-size: 8px; }
.journey .stage.active small, .journey .stage.done small { color: #90aaa6; }
.journey > i { max-width: none; margin: 0 13px; }

.editor-grid { grid-template-columns: minmax(600px, 1fr) 310px; gap: 14px; }
.panel { border-color: #1f303b; border-radius: 15px; background: linear-gradient(145deg, rgba(13,21,31,.97), rgba(7,12,18,.96)); }
.panel-head { height: 70px; padding: 0 20px; }
.panel-head h2 { font-size: 16px; }
.system-panel, .inspector-panel { min-height: 620px; }
.canvas-help { padding: 11px 20px; border-bottom: 1px solid rgba(34,50,61,.7); color: #8d9fa5; }
.graph { height: 470px; min-height: 470px; background-size: 32px 32px; }
.graph:after { background: radial-gradient(circle at 50% 37%, rgba(59,183,154,.13), transparent 48%); }
.graph-node { width: 178px; min-height: 108px; padding: 16px; border-color: #304650; border-radius: 14px; }
.graph-node.core { width: 206px; min-height: 120px; border-color: #4b8c83; }
.graph-node small { font-size: 8px; }
.graph-node b { font-size: 13px; margin-top: 9px; }
.graph-node p { font-size: 9px; line-height: 1.45; padding-right: 4px; }
.graph-node.dragging { cursor: grabbing; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(119,241,203,.12), 0 24px 55px rgba(0,0,0,.45); transition: none; }
.node-port { position: absolute; top: 50%; width: 9px; height: 9px; border: 2px solid #4d7a83; border-radius: 50%; background: #091118; transform: translateY(-50%); }
.node-port.input { left: -5px; }
.node-port.output { right: -5px; }
.graph-node.core .node-port.input { display: none; }
.graph-node:not(.core) .node-port.output { display: none; }
.node-public-status { display: inline-block; margin-top: 11px; color: #6e858d; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.graph-node.core .node-public-status { color: var(--mint); }
.graph-edge-visible { stroke: #4d8483; stroke-width: 1.7; stroke-dasharray: 3 6; }
.canvas-actions { padding: 14px 18px 17px; }
.validation-summary { margin: 0 18px 18px; padding: 15px; }
.validation-summary > b { display: block; font-size: 11px; letter-spacing: .1em; }
.validation-issue { margin-top: 11px; padding: 10px; border: 1px solid rgba(255,118,131,.2); border-radius: 8px; background: rgba(255,118,131,.035); }
.validation-issue b { color: #ffc0c6; font-size: 10px; }
.validation-issue p { margin: 4px 0 0; color: #a99a9c; }

.inspector-panel { overflow: visible; }
.node-inspector { gap: 14px; padding: 18px; }
.inspector-section { padding-top: 13px; }
.inspector-section h3 { margin: 0 0 7px; color: #dce6e3; font-size: 11px; }
.overview-section { border-top: 0; padding-top: 0; }
.overview-section > p { margin-bottom: 12px; }
.overview-facts { display: grid; gap: 7px; margin: 0; }
.overview-facts div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.overview-facts dt { color: #697d86; font-size: 8px; }
.overview-facts dd { margin: 0; color: #aebcbf; font-size: 9px; line-height: 1.35; }
.node-inspector fieldset { background: rgba(255,255,255,.015); }
.connection-counts { display: flex; gap: 8px; margin-top: 10px; }
.connection-counts span { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 7px; color: #71868e; font-size: 8px; }
.connection-counts b { float: right; color: var(--text); }
.connection-inspector h3 { font-size: 14px; }

.execution-deck { grid-template-columns: 350px minmax(0, 1fr); align-items: stretch; margin-top: 14px; }
.execution-deck .panel { min-height: 430px; }
.run-state { color: var(--mint); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.run-primary { padding: 18px 22px 8px; }
.run-primary .button { width: 100%; }
.run-details { margin: 10px 22px 0; border-top: 1px solid var(--line); color: var(--muted); }
.run-details summary { padding: 12px 0; cursor: pointer; font-size: 9px; }
.run-details .actions { padding: 0 0 12px; grid-template-columns: 1fr; }
.result-panel { grid-column: auto; }
.result-overview { display: grid; grid-template-columns: 190px minmax(0,1fr); border-bottom: 1px solid var(--line); }
.result-overview > div { padding: 18px 20px; }
.result-overview > div:first-child { border-right: 1px solid var(--line); }
.result-overview span, .result-assurances span, .result-section-title > span { color: #687d86; font-size: 8px; font-weight: 750; letter-spacing: .14em; }
.result-overview b { display: block; margin-top: 8px; color: var(--mint); font-size: 20px; }
.result-overview p { margin: 8px 0 0; color: #9aacb0; font-size: 11px; line-height: 1.55; }
.result-panel .story-grid { grid-template-columns: repeat(2,1fr); }
.story-step { min-height: 96px; padding: 15px 20px; }
.participants-section { border-bottom: 1px solid var(--line); }
.result-section-title { padding: 15px 20px 0; }
.result-section-title p { margin: 5px 0 0; color: #6f8289; font-size: 9px; }
.participants { padding: 13px 20px 17px; }
.selected { margin: 16px 20px; }
.result-assurances { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.result-assurances > div { padding: 17px 20px; }
.result-assurances > div:first-child { border-right: 1px solid var(--line); }
.result-assurances b { display: block; margin: 8px 0 5px; color: #dce7e4; font-size: 12px; }
.result-assurances p { margin: 0; color: #74878e; font-size: 9px; line-height: 1.45; }

.welcome-modal { width: min(820px, calc(100vw - 48px)); padding: 34px; background: linear-gradient(145deg,#0d1925,#08111b); }
.welcome-modal h2 { font-size: 32px; letter-spacing: -.035em; }
.welcome-choice { min-height: 190px; padding: 22px; position: relative; }
.welcome-choice b { font-size: 19px; }
.welcome-choice small { max-width: 290px; }
.welcome-choice em { margin-top: auto; color: var(--mint); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .1em; }
.welcome-principle { display: flex; align-items: center; gap: 10px; margin: 23px 0 0 !important; color: #9badb0 !important; font-size: 8px !important; font-weight: 750; letter-spacing: .13em; }
.welcome-principle i { width: 22px; height: 1px; background: #38505a; }
.welcome-principle span { color: #667981; }

@media (max-width: 1320px) {
  .studio-shell { grid-template-columns: 270px minmax(0,1fr); }
  .editor-grid { grid-template-columns: minmax(540px,1fr) 285px; }
  .topbar-project { min-width: 150px; }
  .topbar-project span { max-width: 180px; }
  .topbar-actions button { padding: 0 8px; }
  .environment em { display: none; }
}

@media (max-width: 1100px) {
  .topbar, .studio-shell { display: none !important; }
  .desktop-message { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 30px; text-align: center; position: relative; z-index: 30; }
  .desktop-message .brand-mark { margin-bottom: 8px; }
  .desktop-message h1 { margin: 0; font-size: 28px; }
  .desktop-message p { margin: 0; color: var(--muted); font-size: 13px; }
}
.staging-disclosure{display:flex;align-items:center;justify-content:center;gap:14px;padding:9px 18px;background:#251b09;border-bottom:1px solid #8b691e;color:#f4d98c;font-size:12px;letter-spacing:.02em}
.staging-disclosure[hidden]{display:none}
.staging-disclosure b{border:1px solid #c7952d;padding:4px 7px;font-size:10px;letter-spacing:.14em;color:#ffd875}
