:root{--bg:#f7f9fd;--surface:#fff;--line:#e2e9f2;--ink:#172638;--muted:#64758c;--blue:#3481e8;--light:#ebf3ff;--green:#10856d;--red:#bd4050;--shadow:0 12px 34px rgba(33,63,103,.05)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.46;cursor:not-allowed}a{color:inherit;text-decoration:none}h1,h2,p{margin:0}h2{font-size:16px;letter-spacing:-.35px}.codefont,.editor,code{font-family:ui-monospace,SFMono-Regular,Consolas,Monaco,monospace}.muted{color:var(--muted)}.small{font-size:12px}.sr-only{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;overflow:hidden}.skip{position:absolute;left:16px;top:-70px;background:var(--blue);padding:10px;color:#fff;z-index:100}.skip:focus{top:10px}:focus-visible{outline:3px solid #489cfb;outline-offset:2px}.app-shell{max-width:1640px;margin:0 auto;padding:0 28px}.top{height:74px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:15px}.brand{font-size:15px;font-weight:760;display:flex;align-items:center;gap:11px;white-space:nowrap}.brandmark{width:35px;height:35px;display:grid;place-items:center;background:linear-gradient(150deg,#65a9fa,#3177d8);color:#fff;border-radius:11px;font-size:23px}.brand .muted{font-weight:550}.top-right{display:flex;align-items:center;gap:18px;font-size:12px;color:var(--muted)}.private{background:#effaf6;border:1px solid #d6eee5;color:#287d6b;border-radius:99px;padding:6px 12px;white-space:nowrap}.private i{display:inline-block;width:7px;height:7px;border-radius:99px;background:#29b98a;margin-right:5px}.alltools:hover{color:var(--blue)}.hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:33px 0 27px}.eyebrow,.rule-caption,.tiny-kicker{color:#4d86c9;letter-spacing:1.4px;font-size:10px;font-weight:750}.hero h1{font-size:clamp(28px,3.1vw,43px);line-height:1.11;letter-spacing:-1.9px;margin:9px 0 12px}.hero h1 span{color:var(--blue)}.hero p{max-width:620px;color:var(--muted);font-size:13px}.hero-side{display:flex;gap:11px}.spec{width:125px;border:1px solid var(--line);padding:13px;background:var(--surface);border-radius:15px;display:grid;gap:2px;text-align:center}.spec strong{color:#367bdd;font-size:23px;letter-spacing:-1px}.spec span{font-size:11px;color:var(--muted)}.toolbar{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:15px}.button-group,.row-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.btn,.iconbtn{background:#fff;border:1px solid #dbe4ee;padding:9px 13px;border-radius:10px;color:#344862;font-weight:640;box-shadow:0 2px 3px rgba(25,57,93,.01);transition:background .12s,border-color .12s;font-size:12px;white-space:nowrap}.btn:hover,.iconbtn:hover{background:#f3f7ff;border-color:#9ebfe8}.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.btn.primary:hover{background:#2169d0}.btn.subtle{background:0 0;border-color:transparent}.btn.danger{color:var(--red)}.btn.dashed{border-style:dashed;background:0 0}.btn.full{width:100%}.iconbtn{font-size:18px;padding:2px 10px}.main-tabs{display:flex;gap:7px;margin-bottom:15px;border-bottom:1px solid var(--line);overflow-x:auto}.main-tabs button{border:0;border-bottom:3px solid transparent;background:0 0;color:var(--muted);font-weight:700;padding:12px 16px;white-space:nowrap}.main-tabs button[aria-selected=true]{color:var(--blue);border-bottom-color:var(--blue)}.designer{display:grid;grid-template-columns:minmax(210px,256px) minmax(340px,1fr) minmax(255px,312px);align-items:start;gap:15px}.panel{background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow);min-width:0}.panel-head{padding:19px 19px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px}.panel-head p{margin-top:6px}.tiny-kicker{display:block;margin-bottom:5px}.field{border:1px solid #dce5ef;border-radius:9px;padding:9px 11px;color:var(--ink);background:#fff;min-width:0;width:100%;outline:0;transition:border .13s;line-height:1.4}.field:focus{border-color:var(--blue);box-shadow:0 0 0 3px #dfeeff}.search-field{width:calc(100% - 36px);margin:0 18px 14px}.outline{max-height:540px;overflow:auto;padding:0 12px 12px}.tree-row{display:flex;align-items:center;gap:8px;padding:10px 9px;border:1px solid transparent;background:0 0;width:100%;border-radius:10px;text-align:left;font-size:12px;color:#40526a;margin:2px 0;min-width:0}.tree-row:hover{background:#f2f7ff}.tree-row.selected{border-color:#cee0f9;background:#eaf3ff;color:#1b65cc}.tree-row .tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:660}.tree-row .tree-type{font-size:10px;font-weight:650;color:#7c8ca0}.tree-row .node-symbol{font-weight:700;color:var(--blue);width:17px;text-align:center}.tree-row .required-dot{width:6px;height:6px;border-radius:6px;background:#ed8856}.panel-foot{border-top:1px solid var(--line);padding:12px 18px;display:flex;justify-content:space-between;gap:6px;color:var(--muted);font-size:11px}.visual-panel{min-height:590px}.status-state{border-radius:99px;background:#eaf8f2;color:#147354;padding:6px 10px;font-weight:700;font-size:11px}.visual-intro{display:flex;align-items:center;gap:8px;background:#f8fbff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 20px;color:var(--muted);font-size:12px}.legend-dot{width:8px;height:8px;border-radius:2px;background:var(--blue)}.cards{padding:17px;display:grid;gap:10px;max-height:570px;overflow:auto}.node-card{background:#fff;border:1px solid #e2e9f3;border-radius:13px;display:flex;gap:13px;align-items:flex-start;padding:15px;cursor:pointer;text-align:left;width:100%;color:inherit}.node-card:hover{border-color:#97bdea;background:#fcfdff}.node-card.active{box-shadow:0 0 0 2px #d5e6ff;border-color:#7aaaf0}.node-card-icon{background:#eff5fe;color:#4884d3;border-radius:11px;display:grid;place-items:center;font-size:19px;font-weight:800;min-width:40px;height:40px}.node-card-body{flex:1;min-width:0}.card-title{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:14px;font-weight:760}.chip,.smallpill{font-size:10px;border-radius:20px;padding:3px 8px;background:#eef3fb;color:#5b7396;font-weight:700}.chip.req{color:#b05c27;background:#fff1e6}.card-desc{font-size:12px;color:var(--muted);margin:4px 0 6px;overflow-wrap:anywhere}.card-rule{display:inline-block;margin-right:5px;margin-top:4px;background:#f4f7fb;border:1px solid #e9eef6;font-size:10px;color:#63778c;padding:2px 7px;border-radius:6px}.visual-foot{display:flex;gap:8px;flex-wrap:wrap;margin:0 18px 18px}.analysis{margin:0 18px 16px;color:#936537;font-size:11px}.notice{background:#fff8e9;border:1px solid #f3dfb8;border-radius:10px;padding:9px 11px;margin:5px 0;overflow-wrap:anywhere}.notice.good{background:#edf9f4;color:#14765b;border-color:#cbecdc}.inspector-panel{position:sticky;top:15px}.field-stack{padding:0 19px 20px;display:grid;gap:8px;max-height:680px;overflow:auto}.field-stack label,.pad label{color:#40556f;font-size:11px;font-weight:690}.check,.field-stack .check{display:flex;gap:8px;align-items:center;font-size:12px;color:#536782}.check input,.field-stack input[type=checkbox]{accent-color:var(--blue)}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.two-fields>div{min-width:0}.two-fields label{display:block;margin-bottom:6px}.rule-caption{margin-top:8px;border-top:1px solid var(--line);padding-top:14px}.inspector-actions{display:flex;flex-wrap:wrap;gap:6px}.inspector-actions .btn{flex:1;padding:8px 6px}.detail-note{padding:10px;border-radius:10px;background:#eff7ff;color:#48749e;font-size:11px}.workgrid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.85fr);gap:15px}.pad{padding:24px;min-height:510px;display:grid;align-content:start;gap:13px}.pad p{line-height:1.7}.pad h2{font-size:20px}.pad>label{font-weight:700;color:#51647b}.editor{width:100%;min-height:330px;resize:vertical;padding:15px;border:1px solid #dbe5ef;border-radius:12px;background:#fbfcfe;line-height:1.6;font-size:12px;white-space:pre;tab-size:2;color:#263c58}.editor:focus{outline:3px solid #dcecff;border-color:var(--blue)}.options{display:flex;gap:18px;flex-wrap:wrap;align-items:center}.options label:first-child{min-width:170px;display:grid;gap:5px}.validation-summary{background:#f2f7ff;border:1px solid #e0ebfb;padding:17px;border-radius:12px;color:#516882;font-size:13px}.validation-summary.success{background:#e9f9f1;color:#11724f;border-color:#d4eedf}.validation-summary.error{background:#fff2f0;color:#a33d47;border-color:#f7d7d5}.diagnostic-list{display:grid;gap:9px;max-height:440px;overflow:auto}.diagnostic{border:1px solid #eadfe2;border-left:3px solid #e47c7f;border-radius:10px;padding:10px;font-size:12px}.diagnostic strong{display:block;color:#9a4851;overflow-wrap:anywhere}.diagnostic p{color:#60748c;overflow-wrap:anywhere}.help-card{background:#f7faff;border-radius:12px;border:1px solid #e5eef9;padding:13px}.help-card strong{font-size:13px}.help-card p{font-size:12px;color:var(--muted);margin-top:5px}.footer{padding:25px 0 35px;display:flex;justify-content:space-between;color:var(--muted);font-size:11px;gap:12px}.template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}dialog{border:1px solid var(--line);border-radius:18px;max-width:500px;width:calc(100% - 32px);box-shadow:0 24px 90px #17263844}dialog::backdrop{background:#142b4860}.dialog-pad{padding:20px}.template-list button{text-align:left;border:1px solid var(--line);background:#f8faff;padding:18px;border-radius:12px;font-weight:700;color:var(--ink)}#toast{position:fixed;bottom:24px;right:24px;z-index:55;padding:12px 18px;background:#1f3654;color:#fff;border-radius:12px;box-shadow:0 12px 32px #132d4b44;max-width:min(410px,calc(100vw - 30px));display:none;font-size:12px}#toast.show{display:block}#toast.error{background:#9c3948}@media(max-width:1150px){.app-shell{padding:0 18px}.designer{grid-template-columns:235px minmax(0,1fr)}.inspector-panel{grid-column:1/-1;position:static}.field-stack{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;gap:9px 13px}#string-rules,.field-stack>*{min-width:0}.field-stack #inspector-message,.field-stack .full,.field-stack .inspector-actions,.field-stack .rule-caption{grid-column:1/-1}#string-rules{display:grid;align-content:start;gap:7px}}@media(max-width:700px){.hero{display:block;padding:25px 0 19px}.hero h1{font-size:33px}.hero-side{margin-top:19px}.spec{width:auto;flex:1}.top-right .private{display:none}.brand .muted{font-size:11px}.toolbar{gap:8px}.btn{padding:9px 11px}.designer,.workgrid{grid-template-columns:minmax(0,1fr)}.tree-panel{min-height:unset}.outline{max-height:225px}.visual-panel{min-height:unset}.cards{max-height:450px}.field-stack{grid-template-columns:1fr}#string-rules{display:grid;gap:7px}.pad{padding:16px;min-height:0}.footer{flex-wrap:wrap}.hero-side{gap:7px}.spec{padding:10px 5px}.spec strong{font-size:18px}.spec span{font-size:10px}.top{height:65px}.alltools{font-size:11px}.template-list{grid-template-columns:1fr}}@media(max-width:390px){.app-shell{padding:0 10px}.brand{font-size:13px}.brand .muted{display:none}.hero h1{font-size:29px;letter-spacing:-1px}.toolbar .button-group{width:100%}.toolbar .button-group .btn{flex:1}.main-tabs button{padding:10px 12px;font-size:11px}.panel-head{padding:14px}.cards{padding:10px}.field-stack{padding:0 13px 15px}.row-actions .btn{flex:1}}[hidden]{display:none!important}.definition-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 12px;border-bottom:1px solid #e2e9f6}.definition-toolbar .btn{min-height:34px}.definition-toolbar .small{font-size:11px}@media(max-width:520px){.definition-toolbar{flex-direction:column;align-items:stretch}}