:root{--bg: #14161a;--panel: #1b1e24;--panel-2: #22262e;--line: #2e333d;--text: #e6e8ec;--muted: #9aa1ad;--accent: #6ea8fe;--error: #ff8080;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.app{display:grid;grid-template-columns:300px 1fr;height:100%}.sidebar{background:var(--panel);border-right:1px solid var(--line);overflow-y:auto;padding:16px}.sidebar h1{font-size:16px;margin:0 0 16px;letter-spacing:.2px}.section{border-top:1px solid var(--line);padding:12px 0}.section:first-of-type{border-top:0;padding-top:0}.section h2{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 10px}.field{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;margin-bottom:8px}.field>span{color:var(--muted)}input[type=number],select{background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:4px 6px;width:88px;font:inherit}.slider{display:flex;align-items:center;gap:8px}.slider input{width:110px}.slider b{min-width:34px;text-align:right;font-variant-numeric:tabular-nums}.upload input{display:none}.upload span{display:block;text-align:center;padding:10px;border:1px dashed var(--line);border-radius:8px;cursor:pointer;color:var(--muted)}.upload span:hover{border-color:var(--accent);color:var(--text)}button.ghost{width:100%;margin-top:6px;background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:7px;cursor:pointer;font:inherit}button.ghost:hover{border-color:var(--accent)}.stats{margin:0;display:grid;gap:4px}.stats>div{display:flex;justify-content:space-between;gap:8px}.stats dt{color:var(--muted);text-transform:capitalize}.stats dd{margin:0;font-variant-numeric:tabular-nums}.muted{color:var(--muted)}.hint{font-size:12px;margin:6px 0 0}.main{display:flex;flex-direction:column;overflow:hidden}.topbar{display:flex;align-items:center;gap:16px;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--panel)}.seg{display:flex;border:1px solid var(--line);border-radius:6px;overflow:hidden}.seg button{background:transparent;color:var(--muted);border:0;padding:6px 14px;cursor:pointer;font:inherit}.seg button.on{background:var(--accent);color:#0b1220}.zoom{display:flex;align-items:center;gap:8px;color:var(--muted)}.busy{color:var(--accent)}.error{color:var(--error)}.canvas-wrap{flex:1;overflow:auto;padding:20px;display:grid;place-items:start center}.chart{image-rendering:pixelated;background:#fff;box-shadow:0 6px 28px #00000073}.empty{color:var(--muted);text-align:center;margin-top:18vh}.key{border-top:1px solid var(--line);background:var(--panel);padding:14px 16px;max-height:38vh;overflow-y:auto}.key-head{display:flex;align-items:baseline;gap:12px;margin-bottom:10px}.key h2{font-size:13px;margin:0}.key table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.key th,.key td{text-align:left;padding:4px 8px;border-bottom:1px solid var(--line)}.key th{color:var(--muted);font-weight:500;font-size:12px}.key .num{text-align:right}.key tfoot td{font-weight:600;border-bottom:0}.mono{font-family:ui-monospace,Menlo,monospace}.swatch{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:4px;border:1px solid rgba(0,0,0,.35);font-family:ui-monospace,Menlo,monospace;font-size:13px}.note{font-size:12px;margin:10px 0 0}.note code{background:var(--panel-2);padding:1px 4px;border-radius:3px}.print-btn{width:auto;margin:0 0 0 auto;padding:6px 14px}.print-btn:disabled{opacity:.45;cursor:default;border-color:var(--line)}.linkish{background:none;border:0;padding:0;font:inherit;color:var(--accent);text-decoration:underline;cursor:pointer}.ph-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;background:#0000008c;display:grid;place-items:center;padding:24px}.ph{background:var(--panel);border:1px solid var(--line);border-radius:10px;width:min(1040px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #00000080}.ph-head{display:flex;align-items:baseline;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}.ph-head h2{font-size:15px;margin:0}.ph-close{width:auto;margin:0 0 0 auto;padding:6px 14px}.ph-body{display:grid;grid-template-columns:300px 1fr;gap:20px;padding:16px;overflow-y:auto}.ph-field{display:grid;gap:5px;margin-bottom:10px}.ph-field>span{color:var(--muted)}.ph-field textarea,.ph-field select{background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:6px 8px;font:inherit;width:100%;resize:vertical}.ph-facts{margin:16px 0 0;display:grid;gap:4px;border-top:1px solid var(--line);padding-top:12px}.ph-facts>div{display:flex;justify-content:space-between;gap:8px}.ph-facts dt{color:var(--muted)}.ph-facts dd{margin:0;font-variant-numeric:tabular-nums}.ph-output{min-width:0}.ph-out-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}.ph-out-head h3{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin:0}.ph-out-head button{width:auto;margin:0 0 0 auto;padding:4px 12px}.ph-text{width:100%;background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:10px;font:13px/1.55 ui-monospace,Menlo,monospace;resize:vertical;margin-bottom:14px}.ph-notes-head{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin:0 0 6px}.ph-notes{margin:0;padding-left:18px;color:var(--muted)}.ph-notes li{font-size:12.5px;line-height:1.5;margin-bottom:6px}@media (max-width: 860px){.ph-body{grid-template-columns:1fr}}.print-view{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;flex-direction:column;background:#40454e}.print-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 16px;background:var(--panel);border-bottom:1px solid var(--line);color:var(--text)}.pt-field,.pt-check{display:flex;align-items:center;gap:6px;color:var(--muted);white-space:nowrap}.pt-field input[type=text]{width:200px}.pt-field input.narrow{width:60px}.pt-title{flex:0 1 auto}.pt-count{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}.print-toolbar input[type=text],.print-toolbar input[type=number],.print-toolbar select{background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:6px;padding:4px 6px;font:inherit}.print-toolbar button.ghost{width:auto;margin:0;padding:7px 14px}.print-toolbar button.primary{background:var(--accent);color:#0b1220;border-color:var(--accent);font-weight:600}.print-scroll{flex:1;overflow:auto;padding:24px}.sheet{width:var(--sheet-w);height:var(--sheet-h);margin:0 auto 24px;background:#fff;color:#000;overflow:hidden;position:relative;box-shadow:0 6px 28px #00000073;font:10pt/1.35 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:flex;flex-direction:column}.sheet-head{height:var(--head);flex:0 0 auto;display:flex;align-items:baseline;gap:10px;border-bottom:.5pt solid #999;font-size:8pt;overflow:hidden;white-space:nowrap}.sheet-head b{font-size:9pt}.sheet-head span{color:#444}.sheet-head-title{margin-left:auto;font-style:italic;overflow:hidden;text-overflow:ellipsis}.sheet-note{font-size:7.5pt;line-height:1.4;color:#333;margin:8px 0 0}.cover{padding:0 .14in}.key-sheet{padding:0 .12in}.cover h1{font-size:20pt;margin:.18in 0 2px;line-height:1.15}.cover-sub{margin:0 0 .16in;color:#444;font-size:9pt}.cover h2{font-size:8pt;text-transform:uppercase;letter-spacing:.07em;color:#555;margin:0 0 6px;border-bottom:.5pt solid #bbb;padding-bottom:3px}.cover-body{display:flex;gap:.28in;flex:0 1 auto;min-height:0;overflow:hidden}.cover-left{flex:1 1 52%;min-width:0;display:flex;flex-direction:column}.cover-right{flex:1 1 48%;min-width:0;display:flex;flex-direction:column}.cover-preview{width:100%;height:auto;max-height:4.6in;object-fit:contain;align-self:flex-start;border:.5pt solid #999;image-rendering:pixelated}.cover-cap{font-size:7pt;color:#666;margin:5px 0 12px}.cover-stats{margin:0 0 .2in;display:grid;gap:3px}.cover-stats>div{display:flex;justify-content:space-between;gap:10px;font-size:8.5pt}.cover-stats dt{color:#555}.cover-stats dd{margin:0;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}.page-map{display:grid;gap:2px;margin-bottom:5px}.page-map-cell{border:.5pt solid #888;background:#f4f4f4;padding:3px 2px;text-align:center;font-size:6pt;line-height:1.25;color:#555;min-width:0}.page-map-cell b{display:block;font-size:9pt;color:#000}.page-map-cell span{display:block;font-variant-numeric:tabular-nums}.cover-notes{flex:0 0 auto;margin-top:.18in}.cover-notes ul{margin:0;padding-left:14px}.cover-notes li{font-size:8pt;line-height:1.45;margin-bottom:3px}.key-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;margin-top:8px}.key-table th,.key-table td{text-align:left;padding:2px 6px;border-bottom:.5pt solid #ccc;font-size:8.5pt;height:.26in}.key-table thead th{font-size:7pt;text-transform:uppercase;letter-spacing:.05em;color:#555;border-bottom:1pt solid #666}.key-table .num{text-align:right}.key-table .w-sym{width:.4in}.key-table .w-dmc{width:.6in}.key-table .w-num{width:.8in}.key-table .w-tick{width:.5in}.key-table tfoot td{font-weight:700;border-bottom:0;border-top:1pt solid #666}.key-table .mono{font-family:ui-monospace,Menlo,Consolas,monospace}.psw{display:inline-grid;place-items:center;width:.2in;height:.2in;border:.5pt solid #666;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:8pt;line-height:1}.tickbox{display:inline-block;width:.14in;height:.14in;border:.75pt solid #666}.grid-wrap{flex:1 1 auto;min-height:0;display:flex;justify-content:center;align-items:flex-start}.pg{border-collapse:collapse;table-layout:fixed;font-family:ui-monospace,Menlo,Consolas,monospace}.pg .c{width:var(--cell);height:var(--cell);padding:0;margin:0;text-align:center;vertical-align:middle;line-height:1;font-size:calc(var(--cell) * .74);border-right:.4pt solid #b0b0b0;border-bottom:.4pt solid #b0b0b0;overflow:hidden}.pg .hr{border-right:1.1pt solid #000}.pg .hb{border-bottom:1.1pt solid #000}.pg .bl{border-left:1.3pt dashed #0057b8}.pg .bt{border-top:1.3pt dashed #0057b8}.pg .cl{border-left:1.7pt dashed #cc0000}.pg .ct{border-top:1.7pt dashed #cc0000}.pg tbody tr:first-child .c{border-top:1.1pt solid #000}.pg tbody tr:last-child .c{border-bottom:1.1pt solid #000}.pg tbody td.c:first-of-type{border-left:1.1pt solid #000}.pg tbody td.c:last-of-type{border-right:1.1pt solid #000}.pg .k{width:var(--cell);height:var(--ruler);padding:0;border:0;position:relative;font-size:0;line-height:0}.pg .rn{width:var(--ruler);height:var(--cell);padding:0;border:0;position:relative;font-size:0;line-height:0}.pg .rn .n{position:absolute;right:2px;top:50%;transform:translateY(-50%);white-space:nowrap;font-size:6pt;line-height:1;font-weight:500}.pg .corner{width:var(--ruler);border:0;padding:0}.pg .k .n{position:absolute;left:50%;transform:translate(-50%);white-space:nowrap;font-size:6pt;line-height:1;font-weight:500}.pg thead .k .n{bottom:2px}.pg tfoot .k .n{top:2px}.pg .k.ov,.pg .rn.ov{background:#e4e4e4}.pg .ctr-h{position:absolute;left:0;transform:translate(-50%);width:0;height:0;border-left:3.2pt solid transparent;border-right:3.2pt solid transparent}.pg thead .ctr-h{bottom:0;border-top:4.5pt solid #cc0000}.pg tfoot .ctr-h{top:0;border-bottom:4.5pt solid #cc0000}.pg .ctr-v{position:absolute;top:0;transform:translateY(-50%);width:0;height:0;border-top:3.2pt solid transparent;border-bottom:3.2pt solid transparent}.pg tbody th.rn:first-of-type .ctr-v{left:1px;border-left:4.5pt solid #cc0000}.pg tbody th.rn:last-of-type .ctr-v{right:1px;border-right:4.5pt solid #cc0000}.page-legend{flex:0 0 auto;height:var(--legend);overflow:hidden;border-top:.5pt solid #999;padding-top:var(--legend-pad)}.page-legend-head{height:var(--legend-title);font-size:7pt;text-transform:uppercase;letter-spacing:.05em;color:#555;white-space:nowrap;overflow:hidden}.page-legend-chips{display:flex;flex-wrap:wrap;align-content:flex-start}.page-legend .chip{display:flex;align-items:center;gap:3px;width:var(--legend-chip);height:var(--legend-row);font-size:7pt;overflow:hidden;white-space:nowrap}.page-legend .chip .psw{width:.15in;height:.15in;font-size:6.5pt}@media print{html,body,#root{height:auto;background:#fff}.app{display:none!important}.print-view{position:static;display:block;background:#fff}.print-toolbar{display:none!important}.print-scroll{overflow:visible;padding:0}.sheet{margin:0;box-shadow:none;break-after:page;page-break-after:always;break-inside:avoid;page-break-inside:avoid}.sheet:last-child{break-after:auto;page-break-after:auto}}
