/* Functional app (?live=1) only: loaded with media="not all" and switched on by the shell in live mode, every rule
 * scoped under html.pl-live. Same tokens and visual language as planner.css. */
html.pl-live .pl-live-missing { margin: 0; padding: 12px; border-radius: 8px; background: var(--pl-surface); color: var(--pl-text-2); font-size: 12px; line-height: 17px; }
html.pl-live .pl-live-form { display: flex; flex-direction: column; gap: 8px; }
html.pl-live .pl-live-field { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12px; color: var(--pl-text-2); }
html.pl-live .pl-live-field select, html.pl-live .pl-live-field input:not([type=range]) { width: 100%; height: 30px; padding: 0 8px; border: 1px solid var(--pl-line-2); border-radius: 6px; background: var(--pl-bg); color: var(--pl-text); }
html.pl-live .pl-live-field select:focus, html.pl-live .pl-live-field input:focus { outline: none; border-color: var(--pl-accent); box-shadow: 0 0 0 3px var(--pl-accent-soft); }
html.pl-live .pl-live-row { display: flex; gap: 6px; align-items: center; }
html.pl-live .pl-live-row .pl-btn { flex: none; }
html.pl-live .pl-live-fill { display: flex; align-items: center; gap: 8px; }
html.pl-live .pl-live-fill b { width: 40px; text-align: right; color: var(--pl-text); }
html.pl-live .pl-live-track { position: relative; flex: 1; display: flex; align-items: center; }
html.pl-live .pl-live-track input { flex: 1; margin: 0; accent-color: var(--pl-accent); }
html.pl-live .pl-live-mark { position: absolute; top: -5px; height: 26px; border-left: 1.5px dashed var(--pl-warn); pointer-events: none; }
html.pl-live .pl-live-note { margin: 0; font-size: 12px; line-height: 17px; color: var(--pl-muted); }
html.pl-live .pl-live-note.ok { color: var(--pl-pass); } html.pl-live .pl-live-note.warn { color: var(--pl-warn); } html.pl-live .pl-live-note.fail { color: var(--pl-fail); }
html.pl-live .pl-live-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 8px 0 0; font-size: 12px; }
html.pl-live .pl-live-kv dt { color: var(--pl-muted); } html.pl-live .pl-live-kv dd { margin: 0; overflow-wrap: anywhere; }
html.pl-live code { font-family: var(--pl-mono); font-size: 11px; }
html.pl-live .pl-live-verdict { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--pl-line); margin: 0 0 8px; font-size: 12px; line-height: 17px; }
html.pl-live .pl-live-verdict b { font-size: 14px; line-height: 19px; }
html.pl-live .pl-live-verdict.pass { background: #e8f6ee; border-color: rgba(31, 157, 85, .3); }
html.pl-live .pl-live-verdict.relaxed { background: #fdf3e3; border-color: rgba(199, 119, 0, .3); }
html.pl-live .pl-live-verdict.fail { background: #fdecea; border-color: rgba(217, 48, 37, .3); }
html.pl-live .pl-live-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 4px 0; }
html.pl-live .pl-live-table th, html.pl-live .pl-live-table td { padding: 4px 6px; border-bottom: 1px solid var(--pl-line); text-align: left; }
html.pl-live .pl-live-table th { color: var(--pl-muted); font-weight: 400; }
html.pl-live .pl-live-table .num { text-align: right; }
html.pl-live .pl-live-progress { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: var(--pl-text-2); }
html.pl-live .pl-live-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--pl-accent-soft); border-top-color: var(--pl-accent); animation: pl-live-spin 1s linear infinite; flex: none; display: inline-block; }
@keyframes pl-live-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html.pl-live .pl-live-spin { animation: none; } }
html.pl-live .pl-live-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 16px; font-size: 12px; color: var(--pl-text-2); }
html.pl-live .pl-live-strip b { color: var(--pl-text); font-size: 13px; }
html.pl-live .pl-live-strip .pl-btn { margin-left: auto; }
html.pl-live .pl-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pl-muted); flex: none; }
html.pl-live .pl-live-strip.pass .pl-live-dot { background: var(--pl-pass); }
html.pl-live .pl-live-strip.relaxed .pl-live-dot { background: var(--pl-warn); }
html.pl-live .pl-live-strip.fail .pl-live-dot { background: var(--pl-fail); }
html.pl-live .pl-live-strip .fail { color: var(--pl-fail); }
html.pl-live .pl-live-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
html.pl-live .pl-live-stats div { padding: 8px 10px; border-radius: 8px; background: var(--pl-bg-2); border: 1px solid var(--pl-line); }
html.pl-live .pl-live-stats b { display: block; font-size: 17px; line-height: 22px; font-weight: 600; }
html.pl-live .pl-live-stats span { font-size: 11px; line-height: 14px; color: var(--pl-muted); }
html.pl-live .pl-live-broken { margin: 4px 0 8px; padding-left: 18px; font-size: 12px; }
html.pl-live .pl-live-tag { display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 4px; background: var(--pl-surface); font-size: 10.5px; font-weight: 500; color: var(--pl-text-2); }
html.pl-live .pl-live-tag.done { color: var(--pl-pass); } html.pl-live .pl-live-tag.failed, html.pl-live .pl-live-tag.unavailable { color: var(--pl-fail); }
html.pl-live .pl-live-tag.warn, html.pl-live .pl-live-tag.refused { color: var(--pl-warn); }
html.pl-live .pl-live-prov { margin-top: 10px; font-size: 12px; }
html.pl-live .pl-live-prov summary { cursor: pointer; color: var(--pl-text-2); }
html.pl-live .pl-live-prov ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
html.pl-live .pl-live-prov li { padding-left: 10px; border-left: 2px solid var(--pl-line-2); }
html.pl-live .pl-live-prov small { display: block; color: var(--pl-muted); }
html.pl-live .pl-live-files { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
html.pl-live .pl-live-files li { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--pl-line); border-radius: 8px; }
html.pl-live .pl-live-files span { color: var(--pl-text-2); } html.pl-live .pl-live-files small { color: var(--pl-muted); }
html.pl-live .pl-live-profile { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 10px; }
html.pl-live .pl-live-profile p { margin: 0; font-size: 12px; color: var(--pl-muted); }
html.pl-live #pl-header .pl-chip.actor.off { color: var(--pl-fail); }
/* Extension C: the planner's own Meta Model API key */
html.pl-live #pl-header .pl-key-chip { border: 0; cursor: pointer; font: inherit; font-size: 12px; }
html.pl-live #pl-header .pl-key-chip.off { background: var(--pl-accent-soft); color: var(--pl-accent); font-weight: 600; }
html.pl-live #pl-header .pl-key-chip.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pl-c-spark); flex: none; }
html.pl-live .pl-key-backdrop { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-start; justify-content: center; padding-top: 72px; background: rgba(15, 23, 42, .28); }
html.pl-live .pl-key-card { width: min(440px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 12px; background: var(--pl-bg); box-shadow: var(--pl-shadow-2); }
html.pl-live .pl-key-card h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
html.pl-live .pl-key-card p { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--pl-text-2); }
html.pl-live .pl-key-status { padding: 8px 10px; border-radius: 8px; background: var(--pl-surface); }
html.pl-live .pl-key-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--pl-text-2); }
html.pl-live .pl-key-field input { height: 32px; padding: 0 8px; border: 1px solid var(--pl-line-2); border-radius: 6px; background: var(--pl-bg); color: var(--pl-text); }
html.pl-live .pl-key-field input:focus { outline: none; border-color: var(--pl-accent); box-shadow: 0 0 0 3px var(--pl-accent-soft); }
html.pl-live .pl-key-cap { display: inline-flex; align-items: center; gap: 4px; } html.pl-live .pl-key-cap input { width: 96px; }
html.pl-live .pl-key-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pl-text); }
html.pl-live .pl-key-card .pl-key-note { margin: -6px 0 0 24px; font-size: 11.5px; color: var(--pl-muted); }
html.pl-live .pl-key-error { color: var(--pl-fail) !important; min-height: 0; }
html.pl-live .pl-key-error:empty { display: none; }
html.pl-live .pl-key-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
html.pl-live .pl-live-profile-caveat { max-width: 420px; text-align: center; font-size: 11.5px !important; }
html.pl-live #pl-header .pl-key-chip .pl-key-short, html.pl-live #pl-header .pl-key-chip .pl-key-tiny { display: none; }
html.pl-live .pl-key-card .pl-key-hold { margin: -4px 0 0; }
@media (max-width: 1280px) {
  html.pl-live #pl-header .pl-key-chip .pl-key-long { display: none; }
  html.pl-live #pl-header .pl-key-chip .pl-key-short { display: inline; }
}
@media (max-width: 960px) {
  html.pl-live #pl-header .pl-key-chip .pl-key-short, html.pl-live #pl-header .pl-key-chip .pl-key-money { display: none; }
  html.pl-live #pl-header .pl-key-chip .pl-key-tiny { display: inline; }
  html.pl-live #pl-header .pl-head-right .pl-chip.actor { max-width: 150px; overflow: hidden; white-space: nowrap; } /* keeps its availability dot */
}
/* Live header: the call block names the section, so it gets more room; the badge moves with it (1440 x 810 take window). */
html.pl-live .pl-call { flex-basis: 360px; }
html.pl-live .pl-demo-tag { left: calc(16px + 360px + 12px); }
@media (max-width: 1280px) { html.pl-live .pl-call { flex-basis: 300px; } html.pl-live .pl-demo-tag { left: calc(16px + 300px + 12px); } }
/* Plan again on the same call; earlier attempts */
html.pl-live .pl-live-again { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--pl-line-2); border-radius: 8px; background: var(--pl-bg-2); }
html.pl-live .pl-live-again > b { font-size: 13px; }
html.pl-live .pl-live-again .pl-btn.primary { align-self: flex-start; }
html.pl-live .pl-live-attempts { margin-top: 8px; font-size: 12px; }
html.pl-live .pl-live-attempts summary { cursor: pointer; color: var(--pl-text-2); }
html.pl-live .pl-live-attempts ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; color: var(--pl-text-2); }
