/* Dev tools — dense, calm, keyboard-first. Dark by default; follows the system unless set. */
:root {
  --bg: #0e0f11; --panel: #131416; --panel2: #17181b; --hover: #1c1d21; --active: #22242a; --border: #25272c; --border2: #2f3238;
  --fg: #e8e9eb; --muted: #8b9098; --faint: #5d626b; --accent: #6e79d6; --accent-fg: #fff; --accent-soft: rgba(110,121,214,.16);
  --ok: #4cb782; --warn: #f2c94c; --err: #eb5757; --code: #0b0c0e; --sel: rgba(110,121,214,.28);
  --fs: 13px; --row: 30px; --gap: 12px; --sidebar: 248px;
  color-scheme: dark;
}
html[data-theme="light"], html[data-theme="system"].sys-light {
  --bg: #fbfbfc; --panel: #f4f5f7; --panel2: #ffffff; --hover: #eceef1; --active: #e4e7ec; --border: #e3e5ea; --border2: #d3d7de;
  --fg: #1c1d20; --muted: #5f6672; --faint: #8e95a1; --accent: #5561c7; --accent-soft: rgba(85,97,199,.12); --code: #f1f2f5; --sel: rgba(85,97,199,.2);
  --ok: #1f8f5f; --warn: #a77a00; --err: #cc3a3a; color-scheme: light;
}
html[data-density="compact"] { --fs: 12px; --row: 26px; --gap: 8px; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--fs)/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code, pre, .mono, textarea.mono { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; }
::selection { background: var(--sel); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); height: 100vh; }
.app.collapsed { grid-template-columns: minmax(0, 1fr); }
.app.collapsed .sidebar { display: none; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; font-weight: 600; letter-spacing: .1px; }
.brand .logo { width: 20px; height: 20px; border-radius: 5px; flex: none; display: block; }
.brand .sub { color: var(--muted); font-weight: 400; font-size: .86em; margin-left: -3px; }
.brand small { color: var(--faint); font-weight: 400; margin-left: auto; }
.search { margin: 4px 10px 8px; display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; height: 30px; color: var(--muted); cursor: pointer; }
.search:hover { border-color: var(--border2); }
.search input { flex: 1; background: none; border: 0; outline: 0; min-width: 0; height: 100%; }
.kbd { font: 11px ui-monospace, Menlo, monospace; color: var(--muted); border: 1px solid var(--border2); border-radius: 4px; padding: 0 5px; background: var(--panel2); }
.nav { overflow: auto; padding: 0 6px 8px; flex: 1; min-height: 0; }
.nav h6 { margin: 12px 8px 4px; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .6px; display: flex; justify-content: space-between; }
.nav a, .nav .item { display: flex; align-items: center; gap: 8px; height: var(--row); padding: 0 8px; border-radius: 6px; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.nav a:hover { background: var(--hover); color: var(--fg); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--active); color: var(--fg); }
.nav .dot { width: 6px; height: 6px; border-radius: 2px; background: var(--faint); flex: none; }
.nav a[aria-current="page"] .dot { background: var(--accent); }
.sidefoot { border-top: 1px solid var(--border); padding: 6px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.minirow { display: flex; align-items: center; gap: 10px; min-height: 26px; margin-top: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.minirow b { color: var(--fg); font-weight: 500; } .minirow .mr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.minirow .btn.mini { height: 22px; padding: 0 8px; font-size: 12px; }
.topbar .crumb { flex: none; white-space: nowrap; }
.crumbnote { color: var(--muted); font-size: 12.5px; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbnote::before { content: "—"; margin-right: 8px; color: var(--faint); }
@media (max-width: 760px) { .crumbnote { display: none; } }
.topbar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border); flex: none; }
.crumb { color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb b { color: var(--fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border2); background: var(--panel2); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 500; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--fg); }
.btn.danger { color: var(--err); }
.btn[disabled] { opacity: .5; cursor: default; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px 32px; outline: none; }
.status { display: flex; flex-direction: column; padding: 2px 16px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11.5px; flex: none; }
.status .ft-line { display: flex; gap: 14px; align-items: center; height: 22px; min-width: 0; white-space: nowrap; }
.status .ft-line > * { flex: none; } .status .ft-line .ft-t, .status .ft-line .spacer { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status .ft-note { color: var(--muted); } .status .ft-promo { color: var(--muted); } .status .ft-promo b { color: var(--fg); font-weight: 600; }
.status .ft-ic { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 9.5px; font-weight: 700; border: 1px solid currentColor; color: var(--faint); }
.status .ft-promo .ft-ic { border: 0; color: var(--accent); font-size: 11px; }
.status .ft-bar { border-top: 1px dashed var(--border); }
.status .ft-bar .lock, .status .ft-bar .ft-files { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status .ft-bar .spacer { flex: 1 1 0; }
@media (max-width: 1150px) { .status .ft-files { display: none; } }
.status .lock { color: var(--ok); }

h1.title { font-size: 18px; line-height: 1.3; margin: 0 0 4px; font-weight: 600; }
.desc { color: var(--muted); margin: 0 0 16px; max-width: 70ch; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .app { grid-template-columns: minmax(0, 1fr); } .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 20; transform: translateX(-100%); transition: transform .15s; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); } .view { padding: 14px; } }
.pane { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.pane > header { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 500; }
.pane > .body { padding: 12px; }
textarea.mono, .out-text { width: 100%; min-height: 240px; max-height: 60vh; resize: vertical; background: var(--code); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; line-height: 1.55; font-size: 12.5px; }
textarea.mono { display: block; }
.out-text { margin: 0; overflow: auto; white-space: pre; user-select: text; }
.out-text.wrap { white-space: pre-wrap; word-break: break-word; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 14px; margin-top: 12px; }
.field label { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.field input[type=text], .field input[type=number], .field select, .field textarea { width: 100%; height: 30px; background: var(--bg); border: 1px solid var(--border2); border-radius: 6px; padding: 0 8px; }
.field textarea { height: 72px; padding: 6px 8px; resize: vertical; }
.field input[type=color] { width: 44px; height: 30px; padding: 2px; background: var(--bg); border: 1px solid var(--border2); border-radius: 6px; }
.field .help { color: var(--faint); font-size: 11.5px; margin-top: 3px; }
.switch { display: flex; align-items: center; gap: 8px; height: 30px; cursor: pointer; color: var(--fg); }
.switch input { accent-color: var(--accent); width: 15px; height: 15px; }
.drop { border: 1px dashed var(--border2); border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; background: var(--bg); }
.dropsplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 640px) { .dropsplit { grid-template-columns: minmax(0, 1fr); } }
.dropsplit .drop { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 84px; }
.dropsplit .dt { color: var(--fg); font-weight: 500; } .dropsplit .ds { font-size: 12px; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.chips { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.chip .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .s { color: var(--faint); font-size: 11.5px; }
.callout { border: 1px solid var(--border2); border-left: 3px solid var(--accent); background: var(--panel2); border-radius: 6px; padding: 8px 12px; margin: 0 0 8px; color: var(--fg); }
.callout.err { border-left-color: var(--err); } .callout.warn { border-left-color: var(--warn); }
.section { margin: 0 0 14px; } .section h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.kv { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.kv .r { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr); gap: 10px; padding: 6px 10px; border-top: 1px solid var(--border); cursor: copy; }
.kv .r:first-child { border-top: 0; } .kv .r:hover { background: var(--hover); }
.kv .k { color: var(--muted); } .kv .v { word-break: break-word; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; border: 1px solid var(--border2); }
table.tbl { width: 100%; border-collapse: collapse; } .tbl th, .tbl td { text-align: left; padding: 6px 10px; border-top: 1px solid var(--border); vertical-align: top; word-break: break-word; }
.tbl th { color: var(--muted); font-weight: 500; border-top: 0; background: var(--panel2); } .tbl td { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; } .tbl td.plain { font-family: inherit; }
.tbl-wrap { border: 1px solid var(--border); border-radius: 6px; overflow: auto; max-height: 60vh; }
.thumb { max-width: 100%; max-height: 220px; border-radius: 6px; border: 1px solid var(--border); background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 0 0/16px 16px; }
.tree { font: 12.5px ui-monospace, Menlo, monospace; max-height: 280px; overflow: auto; background: var(--code); border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin-top: 10px; }
.tree div { white-space: nowrap; } .tree .t { cursor: pointer; border-radius: 3px; padding: 0 3px; } .tree .t:hover { background: var(--accent-soft); } .tree .p { color: var(--faint); }
.tree .tw { color: var(--faint); cursor: pointer; display: inline-block; width: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card { display: block; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--fg); text-decoration: none; }
.card:hover { background: var(--hover); text-decoration: none; border-color: var(--border2); } .card b { display: block; margin-bottom: 2px; } .card span { color: var(--muted); font-size: 12px; }
.h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 22px 0 8px; }
.settings { max-width: 760px; } .srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.srow:first-of-type { border-top: 0; } .srow .l b { display: block; font-weight: 500; } .srow .l span { color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 6px; overflow: hidden; } .seg button { border: 0; background: var(--panel2); padding: 0 12px; height: 28px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--active); color: var(--fg); }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.overlay[hidden] { display: none; }
.palette { width: min(620px, 92vw); background: var(--panel2); border: 1px solid var(--border2); border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.45); overflow: hidden; }
.palette input { width: 100%; height: 46px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--border); background: none; outline: 0; font-size: 14px; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; gap: 10px; align-items: center; height: 34px; padding: 0 10px; border-radius: 6px; cursor: pointer; }
.palette li[aria-selected=true] { background: var(--active); } .palette li small { color: var(--faint); margin-left: auto; }
.helpbox { width: min(520px, 92vw); background: var(--panel2); border: 1px solid var(--border2); border-radius: 10px; padding: 16px 20px; }
.helpbox .r { display: flex; justify-content: space-between; padding: 5px 0; border-top: 1px solid var(--border); } .helpbox .r:first-of-type { border-top: 0; }
.progress { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 8px; } .progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s; }
.empty { color: var(--faint); padding: 28px 12px; text-align: center; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border2); border-radius: 10px; padding: 0 7px; }
[hidden] { display: none !important; }
.field label.switch { display: flex; color: var(--fg); font-size: inherit; margin: 0; }

.radios { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; border: 1px solid var(--border2); border-radius: 6px; overflow: hidden; background: var(--panel2); }
.field label.radio, label.radio { display: flex; position: relative; margin: 0; padding: 0; font-size: inherit; color: var(--muted); cursor: pointer; }
/* The radio input is stretched over its label (invisible); the label must be positioned or the input covers the whole page. */
.radio input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.radio span { display: block; padding: 0 12px; height: 28px; line-height: 28px; border-right: 1px solid var(--border2); }
.radio:last-child span { border-right: 0; }
.radio:hover span { background: var(--hover); color: var(--fg); }
.radio input:checked + span { background: var(--active); color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }
.radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

.pane.over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Sidebar: tool list scrolls; Files and Settings stay pinned at the bottom; an arrow says there is more. */
.navwrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.navwrap .nav { flex: 1; min-height: 0; overflow-y: auto; }
.affil { flex: none; padding: 8px 12px 10px; font-size: 11px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--border); }
.affil a { color: var(--muted); text-decoration: underline; }
.affil a:hover { color: var(--fg); }
.sidefoot { flex: none; background: var(--panel); position: relative; z-index: 1; }
.more { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; border: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; gap: 6px;
  padding-bottom: 7px; font-size: 12px; color: var(--muted); background: linear-gradient(to bottom, transparent, var(--panel) 72%); }
.more:hover { color: var(--fg); }
.more .arrow { display: inline-block; animation: nudge 1.6s ease-in-out infinite; color: var(--accent); font-weight: 700; }
@keyframes nudge { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .more .arrow { animation: none; } }

/* Email HTML preview: built from an allow-list, shown on a light page like a mail client. */
.email-html { background: #fff; color: #1b1c1f; padding: 14px 16px; border-radius: 6px; border: 1px solid var(--border2); max-height: 60vh; overflow: auto; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.email-html a { color: #0b57d0; } .email-html img { max-width: 100%; height: auto; } .email-html table { border-collapse: collapse; max-width: 100%; }
.email-html td, .email-html th { padding: 2px 6px; vertical-align: top; } .email-html blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid #c8ccd2; color: #555; }
.email-html pre { white-space: pre-wrap; } .email-html .blocked-img { color: #6b7075; font-size: 12px; border: 1px dashed #b8bcc2; border-radius: 4px; padding: 1px 6px; }

/* Tabbed results (one result, several formats) */
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 10px; overflow-x: auto; }
.tab { border: 0; background: none; color: var(--muted); padding: 7px 11px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 6px 6px 0 0; }
.tab:hover { color: var(--fg); background: var(--hover); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.menu { position: absolute; right: 0; top: 100%; z-index: 10; min-width: 250px; background: var(--panel2); border: 1px solid var(--border2); border-radius: 8px; padding: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.menu .mi { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--fg); }
.menu .mi:hover { background: var(--hover); }
.pane > header { position: relative; }
.pane > header > span:last-child { position: relative; }

.more.up { top: 0; bottom: auto; align-items: flex-start; padding: 8px 0 0; background: linear-gradient(to top, transparent, var(--panel) 72%); z-index: 2; }
.more.up .arrow { animation-name: nudge-up; }
@keyframes nudge-up { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-2px); } }

/* Four or more choices: separate pills that wrap, so every option can be read at a glance. */
.field.optbtns { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.radios.pills { border: 0; background: none; gap: 6px; overflow: visible; width: auto; }
.radios.pills .radio span { border: 1px solid var(--border2); border-radius: 6px; background: var(--panel2); }
.radios.pills .radio:last-child span { border-right: 1px solid var(--border2); }
.radios.pills .radio input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); box-shadow: none; }
.radios.pills .radio:hover span { border-color: var(--accent); }

/* Save row: title + Save / Save & new + identity of the saved item */
.saverow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.titleinput { flex: 1 1 220px; min-width: 160px; max-width: 420px; height: 30px; padding: 0 10px; background: var(--bg); border: 1px solid var(--border2); border-radius: 6px; }
.titleinput[aria-invalid="true"] { border-color: var(--err); }
.savemeta { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; margin-left: 4px; }
.uuid { font: 11.5px ui-monospace, Menlo, monospace; color: var(--muted); background: var(--bg); border: 1px solid var(--border2); border-radius: 5px; padding: 1px 6px; cursor: pointer; }
.uuid:hover { color: var(--fg); border-color: var(--accent); }
.dirty { color: var(--warn); } .savemsg { flex-basis: 100%; font-size: 12px; color: var(--ok); min-height: 0; } .savemsg:empty { display: none; } .savemsg.bad { color: var(--err); }
.helpbox .mi.pick { display: flex; width: 100%; gap: 10px; padding: 7px 8px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--fg); }
.helpbox .mi.pick:hover { background: var(--hover); }

/* Maximised output and collapsible sections */
.pane.outpane > header { gap: 6px; } .pane.outpane > header .maxbtn { height: 24px; }
.pane.max { position: fixed; inset: 52px 14px 34px 14px; z-index: 30; display: flex; flex-direction: column; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55), 0 20px 60px rgba(0,0,0,.5); background: var(--panel); }
.pane.max > .body { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px; }
.pane.max .out-text, .pane.max .email-html, .pane.max .tbl-wrap { max-height: none; }
.sechead { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 0; background: none; padding: 4px 0; margin: 0 0 6px; cursor: pointer;
  color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.sechead:hover { color: var(--fg); } .sechead .chev { width: 12px; color: var(--faint); }
.secbody[hidden] { display: none; }
.secbar { display: flex; gap: 4px; justify-content: flex-end; margin: -4px 0 6px; }
.secbar .btn { height: 24px; font-size: 12px; }

.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); outline-color: var(--err); color: var(--err); }
.fielderr { color: var(--err); font-size: 12px; margin-top: 4px; } .fielderr:empty { display: none; }
.btn.pulse { box-shadow: 0 0 0 3px var(--accent); animation: dtpulse 1.1s ease-in-out 2; }
@keyframes dtpulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.totp-list { display: flex; flex-direction: column; gap: 8px; }
.totp-row { display: grid; grid-template-columns: auto minmax(0, 1.4fr) auto auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); }
.totp-title { font-weight: 600; color: var(--fg); text-decoration: none; } .totp-title:hover { text-decoration: underline; }
.totp-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .totp-meta.bad { color: var(--err); }
.totp-code { font: 600 22px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.totp-timer { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.totp-bar { width: 80px; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; } .totp-barin { height: 100%; background: var(--accent); transition: width 1s linear; }
.totp-secs { font-size: 11px; color: var(--muted); min-width: 30px; }
.totp-act { display: flex; gap: 4px; }
@media (max-width: 700px) { .totp-row { grid-template-columns: 1fr; } }
.totp-bar2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.totp-mv { display: flex; align-items: center; gap: 2px; } .totp-grip { cursor: grab; color: var(--faint); padding: 0 6px; user-select: none; }
.totp-row.dragging { opacity: .5; } .totp-row.dropat { box-shadow: 0 -3px 0 var(--accent); }
.btn.hl { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.toolchip { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 8px; font-size: 13px; }
.toolchip a { color: var(--accent); }
.openwrap { position: relative; display: inline-block; }
.openmenu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 280px; max-width: 420px; max-height: 340px; overflow-y: auto; }
.openmenu .menuhead { font-size: 11.5px; color: var(--muted); padding: 6px 10px; }
.openmenu .mi { display: flex; width: 100%; align-items: center; }
.openmenu .mi.full { border-top: 1px solid var(--border); margin-top: 4px; color: var(--accent); font-weight: 600; }
.itemlist { display: flex; flex-direction: column; gap: 4px; }
.itemrow { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel2); }
.itemval { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; user-select: all; }
.cmdrow { margin: 0 0 10px; } .cmdhead { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.cmdcode { min-height: 0; max-height: 40vh; resize: none; margin: 0; padding: 8px 10px; background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; user-select: all; }
.nav h6.grp { margin: 6px 4px 0; padding: 0; }
.grphead { display: flex; width: 100%; align-items: center; gap: 6px; padding: 10px 14px 4px; background: none; border: 0; color: var(--muted); cursor: pointer; text-align: left;
  font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.grphead:hover { color: var(--fg); } .grphead .gt { flex: 1; } .grphead .chev { width: 10px; font-size: 10px; } .grphead .curdot { color: var(--accent); font-size: 8px; } .grphead .cnt { font-weight: 500; color: var(--faint); }
.profilebar { position: relative; padding: 0 10px 8px; }
.profilebtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--fg); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.profilebtn:hover { background: var(--hover); } .profilebtn .pn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .profilebtn .pic { color: var(--accent); } .profilebtn .chev { color: var(--muted); font-size: 11px; }
.profilemenu { left: 10px; right: 10px; top: calc(100% - 4px); min-width: 0; }
.profilemenu .mi { display: flex; width: 100%; align-items: center; gap: 4px; } .profilemenu .mi.full { border-top: 1px solid var(--border); margin-top: 4px; color: var(--accent); font-weight: 600; }
.proflist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.profrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); }
.profnew { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.clock { border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); padding: 8px 10px; margin: 0 0 10px; }
.clockhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.clockrow { display: flex; align-items: center; gap: 10px; padding: 2px 0; } .clockrow .k { width: 96px; color: var(--muted); font-size: 12px; flex: none; }
.clk { flex: 1; min-width: 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.reqlink { color: var(--accent); }
.reqcard { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reqbox { width: min(560px, 94vw); }
.desc.oneline { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.desc.oneline.expanded { white-space: normal; overflow: visible; }
.savemenu { position: relative; display: inline-block; }
.savebtn .savedot.ok { color: var(--ok); } .savebtn .savedot.warn { color: var(--warn); }
.savepop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(640px, 92vw); background: var(--panel2); border: 1px solid var(--border2); border-radius: 10px; padding: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.savepop .saverow { margin: 0; border: 0; padding: 0; background: none; }
.savepinrow { display: flex; justify-content: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* menu: bullet only on the open page; group chevron drawn in CSS so it is easy to see */
.nav .dot { visibility: hidden; }
.nav a[aria-current="page"] .dot { visibility: visible; }
.grphead .chev { position: relative; flex: none; width: 18px; height: 18px; font-size: 0; color: var(--fg); opacity: .8; }
.grphead .chev::before { content: ""; position: absolute; left: 4px; top: 3px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .12s; }
.nav h6.grp.folded .grphead .chev::before { top: 5px; left: 2px; transform: rotate(-45deg); }
.grphead:hover .chev { opacity: 1; color: var(--accent); }
.grphead { padding-left: 10px; }
.sell { margin: 16px 0 6px; padding: 18px 20px; border: 1px solid var(--accent); border-radius: 12px; background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.selltag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.sellhead { margin: 0 0 8px; font-size: 18px; line-height: 1.3; font-weight: 650; }
.selltext { margin: 0 0 10px; color: var(--fg); max-width: 62ch; }
.sellist { margin: 0 0 14px; padding-left: 18px; color: var(--muted); } .sellist li { margin: 3px 0; }
.sellrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sellcta { text-decoration: none; display: inline-flex; align-items: center; padding: 0 16px; height: 34px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.sellcta:hover { filter: brightness(1.08); } .sellsub { color: var(--muted); font-size: 12.5px; }
.sellist .sellpipe { color: var(--fg); font-weight: 600; }
.sellsubl { margin: 4px 0 2px; padding-left: 18px; font-weight: 500; } .sellsubl li { margin: 2px 0; }
.cols.stack { grid-template-columns: minmax(0, 1fr); }
.cmpgrid { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.cmpfield { flex: 1 1 220px; min-width: 0; } .cmpfield textarea { width: 100%; min-height: 150px; }
.cmphd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; } .cmphd .spacer { flex: 1; }
.cmpchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px dashed var(--border2); border-radius: 8px; color: var(--muted); align-self: stretch; }
.cmpfoot { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
table.df { width: 100%; border-collapse: collapse; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; table-layout: fixed; }
table.df th { text-align: left; font-weight: 600; padding: 4px 8px; color: var(--muted); border-bottom: 1px solid var(--border); }
table.df td { padding: 1px 8px; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
table.df td.ln, table.df th.ln { width: 44px; color: var(--faint); text-align: right; user-select: none; }
table.df tr.df-del td:nth-child(1), table.df tr.df-del td:nth-child(2), table.df tr.df-chg td:nth-child(1), table.df tr.df-chg td:nth-child(2) { background: rgba(220, 60, 60, .13); }
table.df tr.df-add td:nth-child(3), table.df tr.df-add td:nth-child(4), table.df tr.df-chg td:nth-child(3), table.df tr.df-chg td:nth-child(4) { background: rgba(40, 170, 90, .15); }
table.df mark.df-w { background: rgba(255, 180, 0, .45); color: inherit; border-radius: 2px; }
.cmpcols { display: flex; gap: 10px; align-items: flex-start; } .cmpcol { flex: 1 1 0; min-width: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cmphead { padding: 4px 8px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--panel); }
.cmpbody { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cmpline { display: flex; gap: 8px; padding: 0 8px; } .cmpline .ln { width: 34px; flex: none; text-align: right; color: var(--faint); user-select: none; } .cmpline .tx { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.cmpline.df-del { background: rgba(220, 60, 60, .13); } .cmpline.df-add { background: rgba(40, 170, 90, .15); }
.homehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.homehead-l { min-width: 0; flex: 1 1 0; } .homehead > .btn { flex: none; white-space: nowrap; }
.homesearch { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.homefilter { flex: 1; max-width: 520px; height: 36px; padding: 0 12px; font: inherit; color: var(--fg); background: var(--panel2); border: 1px solid var(--border2); border-radius: 8px; }
.homefilter:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.homecount { color: var(--muted); font-size: 12.5px; }
.homeempty { margin-top: 14px; }
.vaultscreen { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 16px; }
.vaultbox { width: min(420px, 94vw); background: var(--panel2); border: 1px solid var(--border2); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.vaulttag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.vaulttitle { margin: 0; font-size: 20px; } .vaultsub { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.vaultpw { flex: none; max-width: none; width: 100%; height: 38px; } .vaultforgot { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; padding: 4px 0; text-align: left; }
.locknow { margin-top: 6px; width: 100%; padding: 4px 8px; font: inherit; font-size: 12px; color: var(--muted); background: none; border: 1px dashed var(--border2); border-radius: 6px; cursor: pointer; }
.locknow:hover { color: var(--fg); border-color: var(--accent); }
.calcout { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel2); font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.calcrow { display: flex; align-items: baseline; gap: 10px; padding: 1px 10px; border-bottom: 1px solid transparent; }
.calcrow .ln { width: 26px; flex: none; text-align: right; color: var(--faint); user-select: none; }
.calcrow .tx { flex: 1; min-width: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.calcrow .rs { flex: none; max-width: 50%; text-align: right; font-weight: 700; color: var(--fg); overflow-wrap: anywhere; }
.calcrow.aggregate { background: var(--accent-soft); } .calcrow.aggregate .tx { color: var(--fg); }
.calcrow.assign .rs { color: var(--accent); }
.calcrow.heading .tx { color: var(--fg); font-weight: 700; }
.calcrow.error .rs { color: var(--err); font-weight: 500; font-size: 12px; }

/* Paste as table: spreadsheet-style picker */
.gp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 12.5px; }
.gp-info { color: var(--muted); flex: 1 1 200px; }
.gp-hdr { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.tbl-wrap.pick { outline-offset: 2px; } .tbl.gp td, .tbl.gp th { user-select: none; cursor: cell; }
.tbl.gp { width: max-content; min-width: 100%; } .tbl.gp td { white-space: pre; word-break: normal; }   /* free layout: natural column widths, scroll sideways */
.tbl.gp th:not(.rn) { cursor: pointer; white-space: nowrap; word-break: normal; } .tbl.gp thead th { position: sticky; top: 0; z-index: 1; }   /* many columns: headings stay on one line, the table scrolls sideways */ .tbl.gp .rn { width: 1%; text-align: right; color: var(--faint); background: var(--panel2); cursor: pointer; font-size: 11.5px; }
.tbl.gp th.sel, .tbl.gp td.rn.sel { background: var(--accent, #2f6fed); color: #fff; }
.tbl.gp td.sel { background: color-mix(in srgb, var(--accent, #2f6fed) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #2f6fed) 55%, transparent); }

.calchelp { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
.calchelp summary { cursor: pointer; font-weight: 600; }
.calchelp-ex { margin: 12px 0 0; } .calchelp-why { color: var(--muted); font-size: 12.5px; }
.calchelp-ex .calcout { margin: 6px 0; } .calchelp-ex .btn { font-size: 12px; padding: 2px 8px; }

.saverow .dockdelim { color: var(--faint); } .saverow .dockbtn { padding: 2px 8px; font-size: 12px; }

.saverow .dockgroup { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.savepop { width: min(780px, 94vw); } .savepop .titleinput { flex: 1 1 130px; min-width: 110px; }
.savepop .saverow { gap: 6px 8px; } .savepop .savemeta { margin-left: 0; gap: 6px; white-space: nowrap; }

.savemeta .notsaved { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; } .savemeta .notsaved .dirty { color: #f59e0b; font-size: 11px; }

.savemeta .notsaved { position: relative; cursor: help; padding: 2px 4px; } .savemeta .notsaved .dirty { font-size: 14px; line-height: 1; }
.srtext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.savemeta .notsaved::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); background: var(--panel2); color: var(--fg, inherit); border: 1px solid var(--border2); border-radius: 6px; padding: 3px 8px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 50; }
.savemeta .notsaved:hover::after, .savemeta .notsaved:focus::after { opacity: 1; }

.calcrow.divider { border-top: 1px dashed var(--border2); margin-top: 8px; padding-top: 6px; } .calcrow.divider .tx { color: var(--faint); font-size: 12px; }
.calcrow.aggregate.auto .tx { font-weight: 600; }

.nav a.reqitem { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; padding-top: 8px; color: var(--accent, inherit); }

.sidepromo { margin: 6px 8px 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); display: grid; gap: 6px; }
.sidepromo .sp-head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; justify-content: space-between; }
.sidepromo .sp-max { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; display: inline-flex; } .sidepromo .sp-max:hover, .sidepromo .sp-max:focus-visible { color: var(--fg); background: var(--hover); }
.sidepromo .sp-link { display: grid; gap: 1px; text-decoration: none; color: inherit; padding: 3px 4px; border-radius: 6px; }
.sidepromo .sp-link b { font-size: 12.5px; color: var(--accent, inherit); } .sidepromo .sp-link span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.sidepromo .sp-link:hover, .sidepromo .sp-link:focus-visible { background: var(--hover, rgba(127,127,127,.12)); }

/* Incoming (webhooks.xyz bins, mailt.in inboxes) */
.incrow{background:transparent;border:1px solid var(--border);border-radius:8px;padding:7px 10px;color:var(--fg);cursor:pointer;font:inherit}
.incrow .s{display:block;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.incrow:hover{border-color:var(--border2)}
.incrow[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
.incdetail pre.out{max-height:340px;overflow:auto;white-space:pre-wrap;word-break:break-word}

/* Pipelines: two columns of half the width each (settings left, output right); one column on narrow screens */
.plcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.plcol { min-width: 0; }
.plcol .params { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 10px; }
@media (max-width: 900px) { .plcols { grid-template-columns: minmax(0, 1fr); } }

/* Searchable tool picker */
.combowrap { position: relative; display: inline-block; }
.combo { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 240px; max-width: 100%; height: 30px; padding: 0 10px; background: var(--bg); border: 1px solid var(--border2); border-radius: 6px; color: var(--fg); cursor: pointer; text-align: left; }
.combo:hover { border-color: var(--muted); } .combo .cc { color: var(--muted); font-size: 11px; }
.combo.act { background: var(--accent); border-color: transparent; color: var(--accent-fg); } .combo.act .cc { color: var(--accent-fg); }
.combopop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; width: min(460px, 86vw); background: var(--panel2); border: 1px solid var(--border2); border-radius: 10px; box-shadow: 0 18px 44px rgba(0,0,0,.35); overflow: hidden; }
.combopop input { width: 100%; height: 40px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--border); background: none; outline: 0; font-size: 14px; }
.combopop ul { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 420px); overflow: auto; }
.combopop li { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 10px; border-radius: 6px; cursor: pointer; }
.combopop li[aria-selected=true] { background: var(--active); } .combopop li small { color: var(--faint); }
.combopop li.cat { min-height: 26px; margin-top: 4px; cursor: default; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.combopop.up { top: auto; bottom: calc(100% + 4px); }

/* Try a step: popup with the options and test input on the left, output on the right */
.helpbox.trial { width: min(1100px, 94vw); max-height: 84vh; overflow: auto; }
.trialcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.helpbox.trial .params { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 800px) { .trialcols { grid-template-columns: minmax(0, 1fr); } }
.combo.small { min-width: 0; height: 24px; font-size: 12px; margin-top: 4px; padding: 0 8px; color: var(--muted); }

/* Pipelines: plain-words summary of a step */
.stepsum { font-size: 12px; color: var(--accent); margin: 0 0 6px; }

/* Pipelines: graph editor (canvas left, selected step right) */
.plg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 34%); gap: 16px; align-items: start; }
.plg-left { position: relative; min-width: 0; }
.plg-canvas { position: relative; height: calc(100vh - 190px); min-height: 420px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; cursor: grab; touch-action: none;
  background-color: var(--bg); background-image: radial-gradient(var(--border2) 1px, transparent 1px); background-size: 18px 18px; }
.plg-canvas.dragging { cursor: grabbing; } .plg-canvas:focus-visible { outline: 2px solid var(--accent); }
.plg-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.plg-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.plg-edge { fill: none; stroke: var(--muted); stroke-width: 1.6; } .plg-edge.ref { stroke-dasharray: 5 4; stroke: var(--accent); opacity: .8; } .plg-edge.after { stroke-dasharray: 2 4; }
.plg-tip { fill: var(--muted); }
.plg-label { position: absolute; transform: translate(-50%, -50%); font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--border2); color: var(--fg); white-space: nowrap; pointer-events: none; }
.plg-node { position: absolute; box-sizing: border-box; padding: 8px 10px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--border2); box-shadow: 0 2px 6px rgba(0,0,0,.08); cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: visible; }
.plg-node:hover { border-color: var(--muted); } .plg-node.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.plg-node .plg-h { display: flex; align-items: center; gap: 6px; min-width: 0; } .plg-node .plg-h b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plg-badge { flex: none; min-width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 0 4px; }
.plg-res { margin-left: auto; font-size: 10px; color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 0 5px; }
.plg-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plg-prev { font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plg-node.st-error { border-left: 3px solid var(--err); } .plg-node.st-skipped { opacity: .6; } .plg-node.st-done { border-left: 3px solid var(--ok); }
.plg-node .plg-plus { position: absolute; right: -13px; top: 50%; transform: translateY(-50%); }
.plg-node .plg-plus .combo { min-width: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; justify-content: center; font-weight: 700; }
.plg-node .plg-plus .combo .cc { display: none; }
.plg-node .plg-plus .combopop { left: 30px; top: -10px; }
.plg-node .plg-plus .combopop.up { top: auto; bottom: -10px; }   /* opening upwards: set bottom only, or top and bottom squash the list */
.plg-zoom { position: absolute; left: 10px; bottom: 30px; display: flex; flex-direction: column; border: 1px solid var(--border2); border-radius: 8px; overflow: hidden; background: var(--panel2); }
.plg-zoom button { width: 30px; height: 28px; border: 0; background: none; cursor: pointer; color: var(--fg); font-size: 15px; } .plg-zoom button:hover { background: var(--hover); }
.plg-legend { position: absolute; right: 10px; bottom: 30px; display: flex; gap: 12px; font-size: 11px; color: var(--muted); background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 3px 10px; }
.plg-legend .l2 { color: var(--accent); }
.plg-panel { min-width: 0; max-height: calc(100vh - 190px); overflow: auto; padding-right: 2px; }
.plg-panel .params { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 1000px) { .plg-wrap { grid-template-columns: minmax(0, 1fr); } .plg-canvas { height: 60vh; } .plg-panel { max-height: none; } }

/* "More from Bitgeek" popup */
.helpbox.prods { width: min(880px, 94vw); max-height: 80vh; overflow: auto; }
.prods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.prod { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.prod-h { display: grid; gap: 2px; } .prod-h b { font-size: 16px; color: var(--accent); } .prod-h span { color: var(--muted); font-size: 12.5px; }
.prod p { margin: 4px 0; line-height: 1.5; } .prod ul { margin: 0 0 4px; padding-left: 18px; line-height: 1.55; }
.prod-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 6px; }
.prod-here { font-size: 12.5px; color: var(--muted); }
a.btn { text-decoration: none; color: inherit; } a.btn.primary { color: var(--accent-fg); }
/* Integrations: a parent entry with nested Incoming, Outgoing and Runs */
.nav a.navsub { padding-left: 26px; font-size: .95em; }
.nav .navrow { display: flex; align-items: center; gap: 2px; }
.nav .navrow a.navsub { flex: 1; min-width: 0; }
.nav a.navrun { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border-radius: 6px; color: var(--faint); }
.nav a.navrun:hover { color: var(--accent); background: var(--hover); }
.nav a.navrun[aria-current="page"] { color: var(--accent); background: var(--active); }
.nav a.navgroup[aria-current="true"] { color: var(--fg); font-weight: 600; }
/* Integrations group in the sidebar footer uses the tool-group header and chevron */
.sidefoot .intgroup h6.grp { margin: 0; }
.sidefoot .intgroup .grphead { padding: 6px 8px 2px; }
/* More from Bitgeek: menu entry + hover popover */
.nav a.moreentry .sp-max { color: var(--muted); opacity: .8; }
.nav a.moreentry:hover .sp-max { color: var(--accent); opacity: 1; }
.morepop { position: fixed; z-index: 60; width: 300px; background: var(--panel, #fff); color: var(--fg); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.35); padding: 10px; display: grid; gap: 6px; }
.morepop .mp-h { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint, var(--muted)); }
.morepop .mp-p { display: grid; gap: 2px; text-decoration: none; color: inherit; padding: 6px; border-radius: 7px; }
.morepop .mp-p:hover { background: var(--hover, rgba(127,127,127,.12)); }
.morepop .mp-p b { color: var(--accent); font-size: 13px; } .morepop .mp-p span { font-size: 12px; }
.morepop .mp-p small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.morepop .mp-f { font-size: 11px; color: var(--muted); padding: 0 6px; }
.status .ft-ver { color: var(--faint); font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
/* loading screen (removed by app.js once every script has loaded) */
.boot { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); color: var(--fg); transition: opacity .3s ease-in-out; }
.app-in { animation: appin .3s ease-in-out both; } @keyframes appin { from { opacity: 0; } to { opacity: 1; } }
.boot.gone { opacity: 0; pointer-events: none; }
.boot-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border2); border-top-color: var(--accent); animation: bootspin .8s linear infinite; }
.boot-msg { font-size: 14px; min-height: 1.4em; } .boot-sub { font-size: 12px; color: var(--faint); }
@keyframes bootspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-spin { animation-duration: 2.4s; } }
.status .ft-fastbox { display: inline-flex; align-items: center; gap: 2px; }
.status .ft-fast-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0 4px; height: 20px; }
.status .ft-fast-x:hover { color: var(--fg); }
@media (max-width: 700px) { .status .ft-bar:has(.ft-fastbox) .ft-ver, .status .ft-bar:has(.ft-fastbox) .ft-keys, .status .ft-bar:has(.ft-fastbox) .ft-disk { display: none; } }
@media (max-width: 480px) { .status .ft-fast .ft-long { display: none; } }
.status .ft-new { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--fg); border-radius: 5px; height: 20px; padding: 0 8px; font-size: 11.5px; cursor: pointer; }
/* Settings: sticky bar with tabs and search; a linked setting flashes */
.setbar { position: sticky; top: 0; z-index: 6; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 0 -24px 12px; padding: 8px 24px 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.settabs { display: flex; gap: 2px; flex: 1 1 auto; overflow-x: auto; }
.setsearch { flex: 0 1 260px; min-width: 160px; height: 30px; margin-bottom: 6px; background: var(--panel2); border: 1px solid var(--border2); border-radius: 6px; padding: 0 10px; color: var(--fg); }
.setsec[hidden] { display: none; }
.flash { animation: setflash 2.4s ease-out; border-radius: 6px; }
@keyframes setflash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); background: var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
/* File viewer */
.fileview-img { max-width: 100%; height: auto; display: block; background: repeating-conic-gradient(var(--panel2) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--border); border-radius: 6px; }
.fileview-pdf { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; } .fileview-pdf canvas { max-width: 100%; height: auto; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.12); background: #fff; }
.fileview-media { max-width: 100%; }
.mdview { line-height: 1.6; max-width: 80ch; font-family: inherit; } .mdview h1, .mdview h2, .mdview h3 { line-height: 1.25; margin: 1em 0 .4em; } .mdview h1 { font-size: 1.6em; } .mdview h2 { font-size: 1.3em; border-bottom: 1px solid var(--border); padding-bottom: .2em; }
.mdview pre { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; overflow: auto; } .mdview code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: var(--panel2); padding: 1px 4px; border-radius: 4px; } .mdview pre code { background: none; padding: 0; }
.mdview blockquote { margin: .6em 0; padding: 0 1em; border-left: 3px solid var(--border2); color: var(--muted); }
.mdview table { border-collapse: collapse; margin: .6em 0; } .mdview th, .mdview td { border: 1px solid var(--border); padding: 4px 10px; text-align: left; } .mdview img { max-width: 100%; }
.tag.switched { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); animation: setflash 2.4s ease-out; }
mark.sethl { background: color-mix(in srgb, var(--warn, #f2c94c) 45%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.palswatch { display: flex; flex-wrap: wrap; gap: 6px; } .palswatch > div { width: 88px; height: 64px; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: flex-end; } .palswatch span { font: 11px ui-monospace, Menlo, monospace; background: rgba(255,255,255,.85); color: #111; border-radius: 0 6px 0 7px; padding: 1px 5px; }
/* storage breakdown */
button.storechip { cursor: pointer; font: inherit; font-size: 12px; } button.storechip:hover { border-color: var(--accent); color: var(--fg); }
.storenote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.storagebox { width: min(640px, 94vw); }
.storelist { display: flex; flex-direction: column; }
.storerow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 80px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); }
.storerow .sl { display: flex; flex-direction: column; min-width: 0; } .storerow .sl small { color: var(--faint); font-size: 11.5px; }
.storerow .sv { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.storerow .sbar { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; } .storerow .sbar i { display: block; height: 100%; background: var(--accent); }
.storerow.total { border-top: 1px solid var(--border2); }
.status .ft-disk { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
/* profile rows: the Active badge is the size of the Switch button, so rows line up */
.profrow .tag.profactive, .profrow .btn.primary { box-sizing: border-box; height: 28px; min-width: 120px; justify-content: center; }
.profrow .tag.profactive { display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px; font-size: inherit; font-weight: 500; }
.toaster { position: fixed; right: 16px; bottom: 76px; z-index: 90; max-width: min(420px, 90vw); padding: 8px 14px; border-radius: 8px; background: var(--panel2); color: var(--fg); border: 1px solid var(--border2); border-left: 3px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 13px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toaster.on { opacity: 1; transform: none; }

/* "Saved to Files" with a rename box: same place as the toaster, but it takes clicks */
.savetoast { position: fixed; right: 16px; bottom: 76px; z-index: 91; width: min(400px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 8px; background: var(--panel2); color: var(--fg); border: 1px solid var(--border2); border-left: 3px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 13px; }
.savetoast .st-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.savetoast .st-msg { flex: 1; min-width: 0; }
.savetoast .st-x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.savetoast .st-row { display: flex; gap: 6px; }
.savetoast .st-row .inp { flex: 1; min-width: 0; }
.tbl td.fname { cursor: text; }
.tbl td.fname:hover span { text-decoration: underline dotted; }
.tbl td.fname .inp { width: 100%; min-width: 180px; }
.savetoast .inp, .tbl td.fname .inp { height: 30px; background: var(--bg); color: var(--fg); border: 1px solid var(--border2); border-radius: 6px; padding: 0 8px; font: inherit; }
/* Ctrl/⌘ K: pasted content and the next steps for it */
.palette .pal-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--accent-soft); font-size: 12.5px; min-width: 0; }
.palette .pal-chip b { flex: none; }
.palette .pal-chip .pc-meta { flex: none; color: var(--muted); }
.palette .pal-chip .pc-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.palette .pal-chip .pc-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 4px; }
.palette .pal-chip .pc-save { flex: none; height: 22px; padding: 0 8px; border: 1px solid var(--border2); border-radius: 5px; background: var(--panel2); color: var(--fg); font-size: 12px; cursor: pointer; }
.palette .pal-chip .pc-save:hover { background: var(--hover); }
/* #/shared-in: what the share menu or Open with sent */
.inbox { max-width: 760px; }
.inbox .ib-card { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); padding: 12px 14px; margin: 12px 0; }
.inbox .ib-card b { display: block; margin-bottom: 4px; }
.inbox .ib-prev { margin: 8px 0 0; max-height: 160px; overflow: auto; white-space: pre-wrap; word-break: break-all; font: 12px/1.5 ui-monospace, Menlo, monospace; color: var(--muted); background: var(--code); border-radius: 6px; padding: 8px 10px; }
.inbox .ib-files { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.inbox .ib-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.inbox .ib-sug { display: grid; gap: 4px; margin-top: 8px; }
.inbox .ib-sug button { display: flex; gap: 10px; align-items: baseline; text-align: left; width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel2); color: var(--fg); cursor: pointer; font: inherit; }
.inbox .ib-sug button:hover { background: var(--hover); }
.inbox .ib-sug small { color: var(--muted); }
/* Settings > App and sharing: the bookmarklet is a link you drag to the bookmarks bar */
.bmlet { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 1px dashed var(--accent); border-radius: 6px; color: var(--accent); background: var(--accent-soft); cursor: grab; font-weight: 500; white-space: nowrap; }
.bmlet:hover { text-decoration: none; }
.palette li.sug span::before { content: "→ "; color: var(--accent); }
/* Pinned and Recent at the top of the sidebar */
.nav h6.grp.quick .grphead.static { cursor: default; display: flex; align-items: center; gap: 6px; width: 100%; }
.nav a.quick span:last-child { color: var(--fg); }
/* Share dialog */
.sharebox .chk { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.sharebox .shareout { margin-top: 12px; display: grid; gap: 8px; }
.sharebox .shorturl { display: flex; gap: 8px; align-items: center; }
.sharebox .shorturl code { font-size: 14px; padding: 4px 8px; border: 1px solid var(--border2); border-radius: 6px; background: var(--code); }
.sharebox .pwin, .pwbox .pwin { margin-top: 6px; width: 100%; max-width: 360px; height: 30px; padding: 0 8px; border: 1px solid var(--border2); border-radius: 6px; background: var(--bg); color: var(--fg); }
.pwbox { max-width: 460px; margin: 40px auto; }

/* column select (/tools/colselect.js): with the setting on, outputs do not wrap and show a crosshair */
.colsel-on pre.out-text { cursor: crosshair; white-space: pre !important; overflow-wrap: normal !important; word-break: normal !important; }
/* phones: the top bar wraps its buttons onto a second line instead of pushing the page sideways */
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 44px; flex-wrap: wrap; row-gap: 6px; padding: 6px 12px; }
  .topbar .crumb { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar .crumbnote { display: none; }
}

/* pinned tools: a pin icon; Recent: a Clear button beside the count */
.pinic { display: inline-flex; flex: none; color: var(--accent); }
.pinic svg { display: block; }
.btn.pinbtn .pinic { color: inherit; } .btn.pinbtn[aria-pressed="true"] .pinic { color: var(--accent); }
.nav h6.grp.quick .clearrec { border: 0; background: none; color: var(--faint); font: inherit; font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase; cursor: pointer; padding: 0 4px; border-radius: 4px; opacity: 0; }
.nav h6.grp.quick:hover .clearrec, .nav h6.grp.quick .clearrec:focus-visible { opacity: 1; }
.nav h6.grp.quick .clearrec:hover { color: var(--fg); background: var(--hover); }
@media (hover: none) { .nav h6.grp.quick .clearrec { opacity: 1; } }
/* phones: the footer bar keeps only what fits (the shortcuts list needs a keyboard anyway) */
@media (max-width: 480px) { .status .ft-bar .ft-keys, .status .ft-bar .ft-ver { display: none; } .status .ft-bar { gap: 10px; } }
