:root{--shadow:0 10px 30px #0f0f1e24, 0 2px 6px #0f0f1e14}.icon-btn{width:32px;height:32px;color:var(--text-muted);background:0 0;border:0;border-radius:7px;flex:none;place-items:center;display:inline-grid}.icon-btn:hover{background:var(--surface-2);color:var(--text)}.icon-btn.active{background:var(--accent-soft);color:var(--text)}:root:is([data-theme=dark],[data-theme=contrast]) .icon-btn.active{color:var(--text)}.segmented{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:2px;display:inline-flex}.segmented .icon-btn{width:30px;height:28px}.menu{z-index:100;background:var(--bg);border:1px solid var(--border);min-width:200px;box-shadow:var(--shadow);border-radius:10px;max-height:calc(100dvh - 16px);padding:5px;position:fixed;overflow-y:auto}.menu-item{text-align:left;background:0 0;border:0;border-radius:6px;align-items:center;gap:10px;width:100%;padding:7px 10px;display:flex}.menu-item:hover,.menu-item:focus{background:var(--surface-2);outline:none}.menu-item.danger{color:var(--danger)}.menu-icon{width:16px;color:var(--text-muted);place-items:center;display:grid}.menu-item.danger .menu-icon{color:var(--danger)}.menu-icon svg{width:16px;height:16px}.menu-check{color:var(--accent);margin-left:auto}.menu-sep{background:var(--border);height:1px;margin:4px 2px}.toasts{bottom:max(16px, env(safe-area-inset-bottom));z-index:200;pointer-events:none;flex-direction:column;align-items:center;gap:8px;display:flex;position:fixed;left:16px;right:16px}.toast{background:var(--text);color:var(--bg);box-shadow:var(--shadow);font-size:var(--fs-sm);border-radius:10px;max-width:min(560px,100%);padding:10px 16px;transition:opacity .25s,transform .25s;animation:.2s ease-out toast-in}.toast-error{background:var(--danger);color:#fff}.toast.has-action{pointer-events:auto;align-items:center;gap:14px;display:flex}.toast-action{color:var(--accent-soft);font-weight:var(--fw-bold);background:0 0;border:0;border-radius:6px;flex:none;margin:-6px -8px -6px 0;padding:6px 8px}.toast-action:hover{background:color-mix(in srgb, var(--bg) 14%, transparent)}.toast-error .toast-action{color:inherit;text-decoration:underline}.toast.leaving{opacity:0;transform:translateY(6px)}@keyframes toast-in{0%{opacity:0;transform:translateY(8px)}}.icon-btn,.menu-item,.toast-action{font:inherit;cursor:pointer}.menu-item{color:inherit}.home{--home-header-h:52px}.home-header .container.wide{max-width:none;min-height:var(--home-header-h);gap:16px}.home-header .brand{font-size:var(--fs-md)}.home-header .brand img{width:28px;height:28px}.home-title{min-width:0;font-size:var(--fs-sm);font-weight:var(--fw-normal);color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;flex:1;margin:0;overflow:hidden}.home-header .site-nav a{min-height:36px}@media (width<=699px){.home-header .container.wide{gap:10px}.home-header .brand-name,.site-nav .hide-sm{display:none}}.home-editor{--font-editor:var(--font-mono);--editor-font-size:var(--fs-md);height:calc(100vh - var(--home-header-h) - 1px);height:calc(100svh - var(--home-header-h) - 1px);border-bottom:1px solid var(--border);background:var(--bg);min-height:420px;font-size:var(--fs-sm);flex-direction:column;line-height:normal;display:flex}.home-editor:focus{outline:none}.he-bar{border-bottom:1px solid var(--border);background:var(--surface);align-items:center;gap:6px;min-height:45px;padding:6px 10px;display:flex}.he-loading{color:var(--text-muted);padding:0 6px}.he-tools{scrollbar-width:none;flex:1;align-items:center;gap:2px;min-width:0;display:flex;overflow-x:auto}.he-tools::-webkit-scrollbar{display:none}.he-tools .icon-btn{width:30px;height:30px}.he-tools .sep{background:var(--border);flex:none;width:1px;height:18px;margin:0 5px}.he-save{background:var(--accent);height:32px;color:var(--accent-contrast);font:inherit;font-weight:var(--fw-bold);white-space:nowrap;cursor:pointer;border:0;border-radius:8px;flex:none;padding:0 14px}.he-save:hover{filter:brightness(1.08)}.he-action{border:1px solid var(--accent);background:var(--bg);height:32px;color:var(--accent);font:inherit;font-weight:var(--fw-bold);white-space:nowrap;cursor:pointer;border-radius:8px;flex:none;padding:0 12px}.he-action:hover{background:color-mix(in srgb, var(--accent) 8%, var(--bg))}:root:is([data-theme=dark],[data-theme=contrast]) .he-action{color:var(--text)}.he-panes{flex:1;min-height:0;display:flex}.he-pane{flex:1 1 0;min-width:0;min-height:0}.he-editor{flex-direction:column;display:flex}.he-editor .cm-editor{flex:1;min-height:0}.he-fallback{resize:none;background:var(--bg);width:100%;color:var(--text);font:var(--editor-font-size)/1.65 var(--font-editor);border:0;flex:1;margin:0;padding:16px 20px}.he-fallback:focus{outline:none}.he-preview{border-left:1px solid var(--border);background:var(--bg);overflow-y:auto}.he-preview .markdown-body{max-width:860px;margin:0 auto;padding:24px 32px 30vh}.he-preview .preview-empty{color:var(--text-muted)}.he-panes[data-view=edit] .he-preview,.he-panes[data-view=preview] .he-editor{display:none}.he-panes[data-view=preview] .he-preview{border-left:0}.he-status{border-top:1px solid var(--border);background:var(--surface);color:var(--text-muted);font-size:var(--fs-xs);gap:12px;padding:4px 12px;display:flex}.he-spacer{flex:1}@media (width<=700px){.he-wide-only{display:none}.he-bar{gap:4px;padding:4px 6px}.home-editor:not(.ready) .he-preview{display:none}.he-preview .markdown-body{padding:16px 16px 30vh}}.section-lead{color:var(--text-muted);font-size:var(--fs-lg);margin-top:-.3em}.steps{counter-reset:step;gap:16px;margin:24px 0;padding:0;list-style:none;display:grid}@media (width>=800px){.steps{grid-template-columns:repeat(3,1fr)}}.steps li{border:1px solid var(--border);background:var(--bg);counter-increment:step;border-radius:12px;padding:20px 20px 20px 64px;position:relative}.steps li:before{content:counter(step);background:var(--accent);width:30px;height:30px;color:var(--accent-contrast);font-weight:var(--fw-bold);border-radius:50%;place-items:center;display:grid;position:absolute;top:20px;left:20px}.steps h3{font-size:var(--fs-md);margin:3px 0 4px}.steps p{color:var(--text-muted);margin:0}.home-editor.with-tool{height:70svh;min-height:380px}.table-tool{border-bottom:1px solid var(--border);background:var(--surface);font-size:var(--fs-sm);padding:12px 16px}.table-tool textarea{border:1px solid var(--border);background:var(--bg);width:100%;height:120px;color:var(--text);font:var(--fs-sm)/1.5 var(--font-mono);resize:vertical;border-radius:8px;margin:6px 0 8px;padding:10px 12px;display:block}.tt-label{font-weight:var(--fw-bold);margin:0 0 6px;display:block}.tt-row,.tt-options{flex-wrap:wrap;align-items:center;gap:8px 16px;display:flex}.tt-options label{align-items:center;gap:6px;display:inline-flex}.tt-options select,.tt-btn{border:1px solid var(--border);background:var(--bg);height:32px;color:var(--text);font:inherit;cursor:pointer;border-radius:8px;padding:0 10px}.tt-btn:hover{background:var(--surface-2)}.tt-controls{flex-wrap:wrap;gap:6px;display:flex}.tt-status{color:var(--text-muted);margin:0}.tt-grid-wrap{max-height:220px;margin-bottom:8px;overflow:auto}.tt-grid{border-collapse:collapse}.tt-grid td{border:1px solid var(--border);padding:0}.tt-grid tr:first-child input{font-weight:var(--fw-bold)}.tt-grid input{background:var(--bg);width:140px;height:32px;color:var(--text);font:inherit;border:0;padding:0 8px}.tt-grid input:focus{outline:2px solid var(--accent);outline-offset:-2px}.tool-links{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px 24px;margin:16px 0 0;padding:0;list-style:none;display:grid}.tool-links a{border-bottom:1px solid var(--border);font-weight:var(--fw-bold);padding:10px 0;text-decoration:none;display:block}.tool-links a:hover{text-decoration:underline}
