
.md-pre{background:var(--panel2,#0d1117);border:1px solid var(--border2,#30363d);padding:.7rem .9rem;overflow:auto;font-size:.85rem;line-height:1.5;white-space:pre}
.md-pre code{background:none;border:none;padding:0}
/* A wide table SCROLLS within itself (display:block + overflow) instead of forcing the
   whole page wider than the viewport — which on mobile squeezed the text into a narrow
   column with the rest of the page off-screen. width:max-content keeps columns natural. */
.md-table{display:block;width:max-content;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-collapse:collapse;margin:.6rem 0}
.md-table th,.md-table td{border:1px solid var(--border2,#30363d);padding:.35rem .55rem;text-align:left;font-size:.9rem;overflow-wrap:break-word}
.md-table th{background:var(--panel,#161b22)}
blockquote{border-left:3px solid var(--border2,#30363d);margin:.6rem 0;padding:.2rem .9rem;color:var(--muted,#8b949e)}

.plan-tags{display:inline-flex;flex-wrap:wrap;gap:var(--sp-1,.25rem);margin-left:.4rem;vertical-align:middle}
.plan-tag.lv-facet-chip{height:1.45rem;padding:0 .55rem;font-size:.7rem;text-decoration:none;gap:var(--sp-1,.25rem)}
a.plan-tag.lv-facet-chip:hover{border-color:var(--muted,#8b949e);color:var(--text-hi,#f0f6fc)}
.plan-tag-filter{margin:.2rem 0 .8rem;font-size:.85rem;color:var(--muted,#8b949e)}
.plan-tag-clear{margin-left:.35rem;font-size:.8rem}
/* Plan-view tag row: label · removable chips · inline add field, all on one line.
   The shared autocomplete field renders its own <label> block, so (exactly as ideas'
   quick-add row does) we hide that label and zero the label margin the global shell
   rule injects — otherwise the add field sits 16px below the chips beside it. */
.plan-tagrow{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-2,.5rem);margin:.2rem 0 .9rem}
.plan-tagrow-label{color:var(--muted,#8b949e);font-size:.8rem;display:inline-flex;align-items:center;gap:var(--sp-1,.25rem)}
.plan-tagrow-empty{font-size:.8rem}
.plan-tagchip-wrap{display:inline-flex;align-items:center}
.plan-tagdrop{display:inline;margin:0}
.plan-tagdrop button{background:none;border:none;color:var(--muted,#8b949e);cursor:pointer;font-size:.7rem;padding:0 .15rem;line-height:1}
.plan-tagdrop button:hover{color:var(--text-hi,#f0f6fc)}
.plan-tagadd{display:inline-flex;align-items:center;gap:var(--sp-1,.25rem);margin:0}
.plan-tagadd label{margin:0!important}
.plan-tagadd label>span:first-child{display:none}
.plan-tagadd .autocomplete-picker{margin-top:0!important;width:11rem}
.plan-tagadd input{padding:.25rem .5rem!important;font-size:.85rem!important}

.plan-hier h3{font-size:1rem;margin:0 0 .5rem;display:flex;align-items:center;gap:var(--sp-2,.5rem)}
.plan-hier-crumb{margin:.2rem 0 .6rem;font-size:.9rem}
.plan-hier-sub{margin:.2rem 0 .4rem;font-size:.9rem}
.plan-hier-list{margin:.2rem 0 .8rem;padding-left:1.1rem}
.plan-hier-list li{padding:.15rem 0}
.plan-hier-new{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-2,.5rem);margin:.5rem 0 0}
.plan-hier-new input[type=text]{flex:1;min-width:14rem}
/* The re-parent picker is the SHARED autocomplete field, which renders its own
   <label> BLOCK (caption above the input). Align the row on flex-end so the Save button
   sits level with the input rather than with the caption, and zero the label margin the
   global shell rule (label{margin:1rem 0}) injects — the same fix ideas' quick-add row
   needed, and the same one the tag row above needs. */
.plan-hier-parent{display:flex;align-items:flex-end;flex-wrap:wrap;gap:var(--sp-2,.5rem);margin:.7rem 0 0}
.plan-hier-parent label{margin:0!important}
.plan-hier-parent label>span:first-child{color:var(--muted,#8b949e);font-size:.85rem}
.plan-hier-parent .autocomplete-picker{margin-top:.25rem!important;width:24rem;max-width:100%}
.plan-hier-parent input{padding:.35rem .6rem!important;font-size:.9rem!important}
.plan-subchip.lv-facet-chip{height:1.45rem;padding:0 .55rem;font-size:.7rem;text-decoration:none;margin-left:.35rem}
a.plan-subchip.lv-facet-chip:hover{border-color:var(--muted,#8b949e);color:var(--text-hi,#f0f6fc)}

.plan-block h3{font-size:1rem;margin:0 0 .5rem;display:flex;align-items:center;gap:var(--sp-2,.5rem)}
.plan-block-hdr{margin:.35rem 0 .2rem;font-size:.9rem}
.plan-block-list{margin:.2rem 0 .6rem;padding-left:1.1rem}
.plan-block-list li{padding:.15rem 0}
.plan-block-drop{display:inline;margin:0}
.plan-block-drop button{background:none;border:none;color:var(--muted,#8b949e);cursor:pointer;font-size:.75rem;padding:0 .2rem;line-height:1}
.plan-block-drop button:hover{color:var(--text-hi,#f0f6fc)}
/* Same layout treatment as the hierarchy picker: the shared autocomplete renders its
   own <label> BLOCK, so align on flex-end (Save/Add level with the input, not the
   caption) and zero the label margin the global shell rule injects. */
.plan-block-add{display:flex;align-items:flex-end;flex-wrap:wrap;gap:var(--sp-2,.5rem);margin:.7rem 0 0}
/* The direction radios take the whole line under the picker: each option is a sentence,
   and two sentences side by side get read as one. */
.plan-block-dir{flex-basis:100%;display:flex;flex-direction:column;gap:var(--sp-1,.25rem);border:0;padding:0;margin:.2rem 0 0}
.plan-block-dir legend{padding:0;font-size:.8rem;color:var(--muted,#8b949e)}
.plan-block-dir label{display:flex;align-items:center;gap:var(--sp-2,.5rem);font-size:.85rem;margin:0}
.plan-block-dir input{margin:0}
.plan-block-add label{margin:0!important}
.plan-block-add label>span:first-child{color:var(--muted,#8b949e);font-size:.85rem}
.plan-block-add .autocomplete-picker{margin-top:.25rem!important;width:24rem;max-width:100%}
.plan-block-add input{padding:.35rem .6rem!important;font-size:.9rem!important}
.plan-block-note{font-size:.78rem;margin:.5rem 0 0}

/* big "Execute plan" call-to-action — hands the plan off to the agent console */
.execute-btn{display:flex;align-items:center;justify-content:center;gap:var(--sp-2,.5rem);width:100%;box-sizing:border-box;margin:.5rem 0 1.1rem;padding:.95rem 1.2rem;font-size:1.05rem;font-weight:700;color:#fff;background:var(--primary);border:1px solid rgba(0,0,0,.18);text-decoration:none;box-shadow:0 2px 10px rgba(35,134,54,.32);transition:filter .12s ease,transform .06s ease}
.execute-btn:hover{filter:brightness(1.08);text-decoration:none}
.execute-btn:active{transform:translateY(1px)}
/* raw notes: the <pre> IS the single container (the theme already gives it a
   border/padding/radius) — no wrapping .card, so it doesn't waste a box-in-a-box. */
.notes-pre{white-space:pre-wrap;word-break:break-word;margin:.2rem 0 0;font-size:.85rem;line-height:1.5}
.plan-body{font-size:.95rem;line-height:1.65}
.plan-body h2{margin:1.4rem 0 .6rem}.plan-body h3{margin:1.1rem 0 .45rem;font-size:1.02rem}
.plan-body ul,.plan-body ol{margin:.5rem 0 .9rem 1.4rem}.plan-body li{margin:.25rem 0}
.plan-body p{margin:.55rem 0}
.plan-body blockquote{margin:.7rem 0;padding:.3rem 0 .3rem .9rem;border-left:3px solid var(--border2);color:var(--muted)}
.plan-body hr{border:none;border-top:1px solid var(--border);margin:1.25rem 0}
.plan-body code{font-size:.85em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.plan-body pre,.plan-body .md-pre{margin:.8rem 0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85em;white-space:pre;overflow-x:auto}
.plan-body pre code{font-size:1em;border:none;background:none;padding:0}
.plan-body a{color:var(--blue)}
.plan-ideas{border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:.8rem 0;margin:.8rem 0 1rem}
.plan-ideas h3{font-size:.92rem;margin:0 0 .35rem}
.plan-ideas ul{margin:.25rem 0 .65rem;padding-left:1.2rem}
.plan-ideas li{margin:.22rem 0;line-height:1.4}
.plan-ideas .plan-ideas-result{color:var(--text-hi)}
/* ── tool card — sleek terminal/console style ── */
.tool-card{border:1px solid rgba(88,166,255,.22);margin:.45rem 0;background:var(--panel2);font-size:.82rem;overflow:hidden}
.tool-card-head{display:flex;align-items:center;gap:var(--sp-2,.5rem);padding:.5rem .8rem;background:rgba(31,111,235,.07);border-bottom:1px solid rgba(88,166,255,.22)}
.tool-glyph{font-size:.95em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:700;min-width:1.1rem;text-align:center}
.tool-glyph.ok{color:#3fb950}.tool-glyph.fail{color:#f85149}.tool-glyph.run{color:#58a6ff}
/* The house .pill carries the shape, the centring and the padding; all that is left
   here is the monospace, which is the one thing a tool NAME genuinely needs. */
.tool-badge{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.02em}
.tool-kind{color:var(--muted,#484f58);font-size:.74em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;text-transform:uppercase;letter-spacing:.08em;margin-left:auto}
.tool-body{padding:.55rem .8rem}
.tool-body .tool-kv{display:grid;grid-template-columns:auto 1fr;gap:var(--sp-1,.25rem) var(--sp-3,.75rem);margin:.2rem 0}
.tool-body .tool-kv .tk{color:var(--muted,#484f58);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78em;white-space:nowrap}
.tool-body .tool-kv .tv{color:var(--text,#c9d1d9);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78em;word-break:break-word}
.tool-body pre{margin:.3rem 0;font-size:.76rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--text,#c9d1d9);white-space:pre-wrap;line-height:1.45}
/* pencil edit affordance.
   NOTE: {{.Header}} expands to <h1> + <p class="page-sub"> (the identity line). The
   row must NOT be a flex container, or the page-sub becomes a horizontal sibling and
   the account email collides with / pushes the wrapping title on mobile. Instead the
   header flows normally (title, then email beneath it) and the pencil is pinned to the
   top-right, with padding reserved so a long title never runs under it. */
.review-err{border:1px solid var(--danger,#f85149);border-left:3px solid var(--danger,#f85149);background:rgba(248,81,73,.08);color:var(--text-hi,#f0f6fc);padding:.6rem .8rem;margin:.5rem 0 0;font-size:.9rem}
/* The meta line under the title: id, status pill, origin badge. A flex row rather
   than text joined by " · " separators, because the separator form has to know
   whether anything follows it — and when it did not, it left a stranded "·" at the
   end of the line. Spacing belongs to the row; the badges just sit in it. */
.meta-line{display:flex;align-items:center;flex-wrap:wrap;gap:var(--sp-2,.5rem)}
.heading-edit-row{position:relative;padding-right:2.2rem}
.heading-edit-row h1{margin:0}
.heading-edit-row .page-sub{margin:.35rem 0 0}
.pencil-edit{position:absolute;top:.15rem;right:0;color:var(--muted);font-size:.85rem;opacity:.55;transition:opacity .15s,color .15s;text-decoration:none;padding:.2rem .35rem;line-height:1}
.pencil-edit:hover{opacity:1;color:var(--text-hi);background:rgba(255,255,255,.07)}
/* "Generate plan" affordance + live stream surface */
.gen-btn{display:inline-flex;align-items:center;gap:var(--sp-2,.5rem);padding:.55rem 1rem;border:1px solid #6e40c9;background:#a371f7;color:#fff;font-weight:600;font-size:.9rem;cursor:pointer}
.gen-btn:hover{background:#8957e5}
.gen-btn:disabled{opacity:.6;cursor:default}
.plan-stream{white-space:pre-wrap;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.86rem;line-height:1.5;max-height:60vh;overflow:auto;color:var(--text)}
.md-table{width:100%;border-collapse:collapse;margin:.8rem 0;font-size:.9rem}
.md-table th{background:var(--th-bg);font-weight:600;text-align:left;padding:.45rem .7rem;border:1px solid var(--border)}
.md-table td{padding:.4rem .7rem;border:1px solid var(--border)}
.md-table tr:nth-child(even) td{background:rgba(255,255,255,.025)}
/* Mobile stacking handled by the SHARED webui.theme.go tbl-stack rule (the md-table
   carries class="tbl-stack" and each <td> already has data-label) — no per-plug copy. */

.rv-none{color:var(--muted);font-style:italic}
.rv-testlinks h3{margin:.1rem 0 .3rem;font-size:1.02rem}
.rv-tl-list{list-style:none;margin:.4rem 0 .7rem;padding:0}
.rv-tl-item{display:flex;align-items:center;gap:var(--sp-2,.5rem);padding:.28rem 0;border-bottom:1px solid var(--border2,#30363d)}
.rv-tl-item:last-child{border-bottom:0}
.rv-tl-item a{word-break:break-all}
.rv-tl-url{color:var(--muted);font-size:.8rem;word-break:break-all}
.rv-tl-del{margin:0 0 0 auto;display:inline-flex;align-items:center}
/* The per-link remove ✕ is a proper inline-flex control vertically centered on the row (was a
   baseline-aligned raw text button that sat off-line — owner-reported "remove misaligned"). */
.rv-tl-x{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:1.7rem;width:1.7rem;flex:none;line-height:1;background:none;border:0;color:var(--muted);cursor:pointer;font-size:.95rem;padding:0}
.rv-tl-x:hover{color:var(--danger,#f85149)}
.rv-tl-add{display:flex;gap:var(--sp-2,.5rem);flex-wrap:wrap;align-items:stretch}
.rv-tl-add input[type=url]{flex:2 1 16rem;min-width:12rem}
.rv-tl-add input[type=text]{flex:1 1 10rem;min-width:8rem}
/* Inputs + the Add button share one control height (var(--control-h)) so the button aligns
   with the "what it tests" field instead of sitting shorter (owner-reported misalignment).
   box-sizing + a matched min-height make them the same box regardless of font/padding. */
.rv-tl-add input{box-sizing:border-box;min-height:var(--control-h);background:var(--panel2,#0d1117);color:var(--text-hi);border:1px solid var(--border2,#30363d);padding:.5rem .6rem;font-size:.9rem}
.rv-tl-add input:focus{outline:none;border-color:var(--primary)}
.rv-tl-add .btn{min-height:var(--control-h);align-self:stretch}
