/* Derrick feature simulators — shared styles. Used by embeds/<slug>.html via window.SIM + sim.js */
*{box-sizing:border-box}
html,body{margin:0;background:transparent;font-family:'Inter',system-ui,sans-serif;color:#1a1a1a}
.pfw{--blue:#097fe8;--blue-d:#0768c5;--blue-l:#e8f1fc;--green:#10b981;--green-d:#047857;--green-l:#e7f9f1;--ink:#1a1a1a;--muted:#9aa3af;--line:#eef0f2;
  max-width:1080px;margin:0 auto;padding:18px;display:flex;gap:16px;align-items:stretch}
.pfw *{font-synthesis:none}

.sheet{flex:1;min-width:0;background:#fff;border:1px solid #e6e9ee;border-radius:14px;overflow:hidden;box-shadow:0 18px 50px rgba(15,40,80,.10);display:flex;flex-direction:column}
.sheet-chrome{display:flex;align-items:center;gap:8px;height:42px;padding:0 14px;background:#f7f9fb;border-bottom:1px solid var(--line);flex-shrink:0}
.dots{display:flex;gap:6px}.dots i{width:10px;height:10px;border-radius:50%;display:block}
.tab{display:flex;align-items:center;gap:6px;margin-left:6px;background:#fff;border:1px solid #e6e9ee;border-radius:7px;padding:4px 10px;font-size:12px;font-weight:600;color:#3c4043}
.tab b{width:12px;height:12px;border-radius:3px;background:#0f9d58;display:inline-block}
.demo-tag{margin-left:auto;font-size:10.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#9aa3af}

.sheet-scroll{overflow-x:auto;overflow-y:hidden}
.grid{width:max-content;min-width:100%;border-collapse:collapse;table-layout:fixed}
.grid th,.grid td{text-align:left;border-bottom:1px solid #f3f4f6;border-right:1px solid #f6f7f9;padding:0 12px;height:50px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grid th{height:34px;background:#fbfcfd;font-size:11.5px;font-weight:600;color:#5f6368;border-bottom:1px solid var(--line)}
.grid .cnum{width:34px;text-align:center;color:#c2c7ce;font-size:11px;padding:0}
.grid td.mono,.grid th.mono,.mono{font-family:'JetBrains Mono',monospace;font-size:12px}
.grid td.li{color:#5b677a}
.grid th.out{color:var(--blue-d)}
.colhint{display:block;font-size:9px;font-weight:600;letter-spacing:.04em;color:#aab1ba;text-transform:uppercase;margin-top:-2px}
.grid td.maphi{background:#f3f8fe}
.grid th.maphi{background:#eaf3fd;color:var(--blue-d)}

.out-empty{color:#d3d8de}
.cell-out{display:flex;align-items:center;gap:7px;min-width:0}
.cell-out.tags{flex-wrap:wrap;gap:3px}
.cell-out .val{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.spin{width:13px;height:13px;border-radius:50%;border:2px solid var(--blue-l);border-top-color:var(--blue);animation:pfspin .7s linear infinite;flex-shrink:0}
@keyframes pfspin{to{transform:rotate(360deg)}}
.chk{width:16px;height:16px;border-radius:50%;background:var(--green-l);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.val{opacity:0;transform:translateY(3px);transition:opacity .35s ease,transform .35s ease;color:var(--ink)}
.val.show{opacity:1;transform:none}
.nf{color:#aab1ba;font-style:italic;font-size:12px}
tr.running td{background:#fafcff}

/* status pill */
.stat{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:7px;font-size:11.5px;font-weight:600}
.stat::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.stat.valid{background:var(--green-l);color:var(--green-d)}
.stat.catchall{background:#f1f3f5;color:#5b677a}
.stat.risky{background:#fef3e2;color:#b45309}
.stat.invalid{background:#fdecec;color:#b42318}
/* tags */
.tag{display:inline-flex;align-items:center;background:#eef2f7;color:#3c4043;border-radius:6px;padding:2px 7px;font-size:11px;font-weight:500;margin:1px 2px 1px 0}

.sb{width:300px;flex-shrink:0;background:#fff;border:1px solid #e6e9ee;border-radius:14px;box-shadow:0 18px 50px rgba(15,40,80,.10);display:flex;flex-direction:column;overflow:hidden}
.sb-head{display:flex;align-items:center;gap:9px;padding:14px 16px;border-bottom:1px solid var(--line)}
.sb-head .name{flex:1;font-family:'Syne';font-weight:800;font-size:16px;color:#111418}
.pill{display:inline-flex;align-items:center;gap:4px;background:var(--blue-l);border-radius:999px;padding:4px 10px;font-family:'Syne';font-weight:700;font-size:12px;color:var(--blue-d)}
.sb-body{padding:16px;display:flex;flex-direction:column;gap:13px;flex:1}
.feat-title{display:flex;align-items:center;gap:9px}
.feat-ico{width:34px;height:34px;border-radius:9px;background:var(--blue-l);color:var(--blue-d);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:18px}
.feat-title .t{font-family:'Syne';font-weight:700;font-size:16px;color:var(--ink)}
.feat-title .s{font-size:11px;color:var(--muted);margin-top:1px}
.cost{align-self:flex-start;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:#b45309;background:#fef3e2;border-radius:7px;padding:4px 9px}

.field-label{font-size:11px;font-weight:600;color:#3c4043;margin-bottom:6px;display:flex;align-items:center;gap:5px}
.field-label b{color:var(--blue);font-weight:700}
.dd{position:relative}
.dd-toggle{width:100%;display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid #e6e9ee;border-radius:9px;background:#fff;cursor:pointer;font-size:12.5px;text-align:left}
.dd-toggle:hover{border-color:#d3d8de}
.badge{width:18px;height:18px;border-radius:4px;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;flex-shrink:0}
.badge.g{background:#eceff3;color:#5b677a}
.dd-toggle .nm{flex:1;color:var(--ink)}
.chev{transition:transform .18s ease;color:var(--muted)}
.dd.open .chev{transform:rotate(180deg)}
.dd-menu{display:none;position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:20;background:#fff;border:1px solid #e6e9ee;border-radius:10px;padding:5px;box-shadow:0 16px 40px rgba(15,54,89,.16)}
.dd.open .dd-menu{display:block}
.opt{display:flex;align-items:center;gap:9px;padding:8px 9px;border-radius:7px;cursor:pointer}
.opt:hover{background:#f5f8fc}
.opt[aria-selected="true"]{background:var(--blue-l)}
.opt .onm{flex:1;font-size:12px;color:var(--ink)}
.opt .ok{color:var(--blue);display:none}
.opt[aria-selected="true"] .ok{display:block}
.dd.err .dd-toggle{border-color:#f0a9a9;background:#fff7f7}
.dd-err{display:none;align-items:flex-start;gap:8px;margin-top:2px;background:#fdecec;border:1px solid #f6caca;border-radius:9px;padding:9px 11px;font-size:11.5px;line-height:1.45;color:#b42318}
.dd-err.on{display:flex}
.dd-err svg{flex-shrink:0;margin-top:1px}.dd-err b{font-weight:700}

.promptbox{border:1px solid var(--line);border-radius:9px;padding:10px 12px;background:#fbfcfd}
.pb-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#9aa3af;margin-bottom:5px}
.pb-text{font-size:12px;color:#1a1a1a;line-height:1.5}
.tok{color:var(--blue-d);font-weight:600;background:var(--blue-l);border-radius:4px;padding:0 4px}
/* Ask AI : editable prompt + @column mention menu */
.aiwrap{position:relative}
.aim-hint{font-size:10px;font-weight:400;letter-spacing:0;text-transform:none;color:#c2c7ce;margin-left:6px}
.aita{min-height:62px;border:1px solid #e6e9ee;border-radius:9px;padding:9px 11px;font-size:12.5px;line-height:1.75;color:#1a1a1a;outline:none;cursor:text}
.aita:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-l)}
.aita:empty:before{content:attr(data-ph);color:#c2c7ce}
.aimenu{position:absolute;left:0;right:0;top:100%;margin-top:5px;background:#fff;border:1px solid #e6e9ee;border-radius:10px;box-shadow:0 14px 36px rgba(15,40,80,.16);padding:4px;display:none;z-index:6;max-height:180px;overflow:auto}
.aimenu.on{display:block}
.aim-opt{padding:8px 10px;border-radius:7px;font-size:12px;color:#1a1a1a;cursor:pointer;display:flex;align-items:center;gap:7px}
.aim-opt:before{content:"@";color:var(--blue);font-weight:700}
.aim-opt:hover{background:var(--blue-l)}

.returns{border:1px solid var(--line);border-radius:9px;padding:10px 12px;display:flex;align-items:center;gap:8px;background:#fbfcfd}
.returns .ro{width:20px;height:20px;border-radius:5px;background:var(--green-l);color:var(--green-d);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.returns .rt{font-size:12px;color:#3c4043}.returns .rt b{color:var(--ink);font-weight:600}

.progress-wrap{display:none;flex-direction:column;gap:7px}
.progress-wrap.on{display:flex}
.prow{display:flex;align-items:baseline;justify-content:space-between;font-family:'Syne';font-weight:700;font-size:12.5px;color:var(--muted)}
.prow .pct{color:var(--blue-d)}
.bar{height:8px;border-radius:4px;background:#eef0f2;overflow:hidden}
.bar>i{display:block;height:100%;width:0;border-radius:4px;background:linear-gradient(90deg,var(--blue),var(--blue-d));transition:width .4s ease}

.sb-foot{padding:14px 16px;border-top:1px solid var(--line)}
.btn{width:100%;height:46px;border:0;border-radius:11px;background:var(--blue);color:#fff;font-family:'Syne';font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:background .15s ease}
.btn:hover{background:var(--blue-d)}.btn[disabled]{opacity:.7;cursor:default}
.btn.done{background:var(--green)}.btn.done:hover{background:var(--green-d)}
.foot-note{text-align:center;font-size:10.5px;color:var(--muted);margin-top:9px}
.replay{display:none;margin-top:9px;width:100%;background:none;border:0;color:var(--muted);font-size:11.5px;cursor:pointer}
.replay.on{display:block}

@media(max-width:820px){.pfw{flex-direction:column}.sb{width:100%}}
