/* Scoped to the isolated Add agent dialog and the identity editor that shares its form (add-agent.js); the Terminal's own tokens (terminal-app.css :root) and controls. */
:is(.harmony-add-agent,.harmony-identity-edit){--ha-ink:#24212d;--ha-purple:var(--purple,#6d28b5);--ha-purple-dark:var(--purple-dark,#541c91);--ha-soft:var(--soft,#f2ecfa);--ha-line:var(--line,#e7e5ee);--ha-muted:var(--muted,#686577);--ha-red:var(--red,#bd3551);font-family:SymUI,Inter,Arial,sans-serif;color:var(--ha-ink);background:#fff;border:1px solid var(--ha-line);border-radius:18px;width:min(640px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;box-sizing:border-box;overflow:auto}
/* The dialog is drawn light in either theme (its own white, its own ink), so in dark it keeps the light tokens: the chosen
   card and Origin were the dark theme's --soft under this ink, dark on dark (the Founder, 7 October 2026). */
[data-theme=dark] :is(.harmony-add-agent,.harmony-identity-edit){--ha-purple:#6d28b5;--ha-purple-dark:#541c91;--ha-soft:#f2ecfa;--ha-line:#e7e5ee;--ha-muted:#686577;--ha-red:#bd3551}
:is(.harmony-add-agent,.harmony-identity-edit)::backdrop{background:#24212d70}
:is(.harmony-add-agent,.harmony-identity-edit) *{box-sizing:border-box}
:is(.harmony-add-agent,.harmony-identity-edit) [hidden]{display:none!important}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 28px;background:#fff;border-bottom:1px solid var(--ha-line)}
:is(.harmony-add-agent,.harmony-identity-edit) h2{font-size:22px;line-height:1.25;letter-spacing:-.02em;margin:0}
:is(.harmony-add-agent,.harmony-identity-edit) h3{font-size:19px;line-height:1.35;margin:0 0 10px}
:is(.harmony-add-agent,.harmony-identity-edit) p{font-size:15px;line-height:1.55;margin:0 0 14px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-body{padding:24px 28px 28px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-muted{color:var(--ha-muted)}
:is(.harmony-add-agent,.harmony-identity-edit) button,:is(.harmony-add-agent,.harmony-identity-edit) input,:is(.harmony-add-agent,.harmony-identity-edit) textarea{font:inherit}
:is(.harmony-add-agent,.harmony-identity-edit) button{cursor:pointer}
:is(.harmony-add-agent,.harmony-identity-edit) button:disabled{cursor:default;opacity:.55}
:is(.harmony-add-agent,.harmony-identity-edit) button:focus-visible,:is(.harmony-add-agent,.harmony-identity-edit) input:is([type=checkbox],[type=radio],[type=range],[type=color],[type=file]):focus-visible{outline:3px solid #b987ef;outline-offset:2px}:is(.harmony-add-agent,.harmony-identity-edit) :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=reset],[type=image]),textarea):focus-visible{outline:none;border-color:var(--ha-purple);box-shadow:inset 0 0 0 1px var(--ha-purple)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-close{display:grid;place-items:center;min-width:44px;min-height:44px;margin-inline-end:-10px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--ha-muted)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-close:hover{color:var(--ha-ink)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-close .ha-icon{width:22px;height:22px;stroke-width:2}
/* The one choice: two cards, a radio dot each, the chosen one marked. */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-choice{display:grid;grid-template-columns:1fr;gap:12px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option{display:flex;align-items:flex-start;gap:12px;width:100%;min-height:96px;padding:16px;text-align:start;border:1.5px solid var(--ha-line);border-radius:14px;background:#fff;color:var(--ha-ink);overflow-wrap:anywhere}
@media(hover:hover){:is(.harmony-add-agent,.harmony-identity-edit) .ha-option:hover{border-color:var(--ha-purple)}}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option-set{border-color:var(--ha-purple);background:var(--ha-soft)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-dot{flex:none;width:18px;height:18px;margin-top:2px;border:2px solid #bdb7c9;border-radius:50%;background:#fff}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option-set .ha-dot{border-color:var(--ha-purple);background:radial-gradient(circle,var(--ha-purple) 0 4px,#fff 4.5px)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option-text strong{display:block;font-size:16px;line-height:1.35;margin-bottom:4px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option-text span{display:block;font-size:14px;line-height:1.5;color:var(--ha-muted)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-panel{display:block;margin-top:20px;padding-top:20px;border-top:1px solid var(--ha-line)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-who-connects{font-size:14px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-label{display:block;font-size:15px;font-weight:600;margin:0 0 6px;padding:0}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-gap{margin-top:18px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-optional{font-weight:400;color:var(--ha-muted)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-input{display:block;width:100%;min-height:46px;padding:11px 13px;border:1px solid #bdb7c9;border-radius:9px;color:var(--ha-ink);background:#fff;font-size:16px;line-height:1.45}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-area{resize:vertical;min-height:72px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-input[aria-invalid=true]{border-color:var(--ha-red)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-part .ha-help{margin-top:0}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-help{display:block;font-size:13px;line-height:1.5;color:var(--ha-muted);margin:4px 0 8px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-error{color:#a72240;margin:8px 0 0;overflow-wrap:anywhere}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-message{margin:0 0 12px;padding:12px 14px;border:1px solid var(--ha-line);border-radius:10px;background:#faf9fc;font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere;user-select:all}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-top:18px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-left{justify-content:flex-start;margin-top:10px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid var(--ha-line);border-radius:9px;background:#fff;color:var(--ha-ink);font-size:15px;font-weight:600}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-primary{color:#fff;background:var(--ha-purple);border-color:var(--ha-purple)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-primary:hover{background:var(--ha-purple-dark)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-wide{width:100%}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-status{margin:12px 0 0;color:var(--ha-muted);font-size:14px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-status:empty{display:none}
/* Three titled sections, Set up identity, Ask Symba and Origin, titled as the Terminal titles its sections (.section-title). */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-section-title{display:block;font-size:1.15rem;font-weight:700;line-height:1.4;letter-spacing:-.025em;color:var(--ha-ink);margin:24px 0 14px;padding:0}
:is(.harmony-add-agent,.harmony-identity-edit) [data-ha-start]>.ha-section-title:first-child{margin-top:0}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-panel>.ha-section-title:first-child{margin-top:0}
/* Every box to write in is a composer (the Founder, 7 October 2026): the text the whole width, growing with what is
   written; under it, inside the same border, a slim bar with + at its left, as a chat composer has. Draft goes under. */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer{display:block;width:100%;border:1px solid #bdb7c9;border-radius:9px;background:#fff}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer:focus-within{border-color:var(--ha-purple);box-shadow:inset 0 0 0 1px var(--ha-purple)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer-input{display:block;width:100%;min-height:72px;padding:11px 13px 4px;border:0;border-radius:9px 9px 0 0;background:transparent;color:var(--ha-ink);font-size:16px;line-height:1.45;resize:none;overflow:hidden}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer-input:focus-visible{outline:0;box-shadow:none}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer-bar{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 6px 4px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer-bar .ha-names{margin:0;overflow-wrap:anywhere}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-draft-row{margin-top:10px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-names:empty{display:none}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-plus{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--ha-purple-dark)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-plus:hover{background:var(--ha-soft)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-plus .ha-icon{width:20px;height:20px;stroke-width:2}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-part{margin-top:18px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-runner{margin:24px 0 0;padding:0;border:0;min-width:0}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-runner legend{margin:0 0 4px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-run{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1.5px solid var(--ha-line);border-radius:12px;margin-top:10px;cursor:pointer}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-run:has(input:checked){border-color:var(--ha-purple);background:var(--ha-soft)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-run:has(input:disabled){cursor:default;opacity:.7}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-run input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:var(--ha-purple)}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-run strong{display:block;font-size:15px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-run .ha-help{margin:2px 0 0}
@media(max-width:560px){:is(.harmony-add-agent,.harmony-identity-edit) .ha-option{min-height:0}}
@media(max-width:420px){:is(.harmony-add-agent,.harmony-identity-edit) .ha-header{padding:14px 16px}:is(.harmony-add-agent,.harmony-identity-edit) .ha-body{padding:18px 16px 22px}:is(.harmony-add-agent,.harmony-identity-edit) h2{font-size:20px}:is(.harmony-add-agent,.harmony-identity-edit) .ha-option{padding:14px}:is(.harmony-add-agent,.harmony-identity-edit) .ha-actions{flex-direction:column-reverse}:is(.harmony-add-agent,.harmony-identity-edit) .ha-actions .ha-button{width:100%}:is(.harmony-add-agent,.harmony-identity-edit) .ha-left{flex-direction:row}:is(.harmony-add-agent,.harmony-identity-edit) .ha-left .ha-button{width:auto}}
/* The one line on the page of an agent Add agent has just activated (the Founder, 6 October 2026). */
#main .agent-added{margin:12px 0 4px;padding:12px 14px;border-radius:12px;background:var(--soft,#f7f2fc);border:1px solid var(--line,#e2d4f5);font-size:15px;line-height:1.45;overflow-wrap:anywhere}
#main .agent-added a{color:var(--purple-dark,#5b1f9a);font-weight:600;text-decoration:underline;text-underline-offset:2px}
[data-theme=dark] #main .agent-added{background:var(--surface,#1c1824);border-color:var(--line,#3a3346)}
[data-theme=dark] #main .agent-added a{color:var(--ink,#eee)}
/* Ask <the Chief> to set it up: the words, then the Chief's face, small (the Founder, 8 October 2026). An agent is a square. */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-section-title.ha-ask-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-chief-face{display:inline-flex;flex:none}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-chief-face .portrait-box.tiny.ha-face{width:24px;height:24px;min-width:24px;border-radius:24%}

/* The choice not taken is one line: its details stay hidden (the Founder, 14 October 2026). */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option[data-collapsed]{min-height:0;padding:12px 16px}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option[data-collapsed] .ha-option-text span{display:none}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-option[data-collapsed] .ha-option-text strong{margin:0}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-choice>.ha-panel{margin-top:0}
/* One frame: the text and the bar share the composer's border, nothing inside draws its own. */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer .ha-composer-input,:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer .ha-composer-input:focus,:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer .ha-composer-input:focus-visible{border:0!important;box-shadow:none!important;outline:0!important;border-radius:0!important;margin:0}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-composer .ha-composer-bar{border:0;border-top:0;box-shadow:none;background:transparent}
/* The Chief's face leads the heading and never wraps; a face that is only a name is not drawn there. */
:is(.harmony-add-agent,.harmony-identity-edit) .ha-ask-title{flex-wrap:nowrap}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-chief-face:empty,:is(.harmony-add-agent,.harmony-identity-edit) .ha-chief-face:has(.portrait-neutral){display:none}
:is(.harmony-add-agent,.harmony-identity-edit) .ha-fresh-message{margin-top:18px}
/* The chain of choices: Origin, its type, then the parts of the identity, each Mirror or Custom. */
:is(.harmony-add-agent) .ha-origin-panel{margin-top:16px;padding-top:16px}
:is(.harmony-add-agent) .ha-provider{margin-top:12px}
:is(.harmony-add-agent) .ha-part-row{margin-top:14px;padding:12px 0 0;border-top:1px solid var(--ha-line)}
:is(.harmony-add-agent) .ha-part-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
:is(.harmony-add-agent) .ha-part-name{font-size:16px}
/* One capsule for every choice here (the Founder, 18 October 2026): tab-row.css's full-width track with a grey chosen pill; Mirror / Custom, Pronouns and Ask me / Allow / Off are the same size. */
:is(.harmony-add-agent) .tab-strip{margin:8px 0 0}
:is(.harmony-add-agent) .ha-capsule>button:is([aria-pressed=true],[aria-checked=true]){background:var(--tab-pill);box-shadow:var(--tab-pill-shadow);color:var(--tab-ink);font-weight:600}
:is(.harmony-add-agent) .ha-capsule>button:focus-visible{outline:2px solid color-mix(in srgb,var(--tab-ink) 55%,transparent);outline-offset:-2px}
:is(.harmony-add-agent) .ha-pronoun-choice{margin:0}
:is(.harmony-add-agent) .ha-mirror-line{color:var(--ha-muted);margin:8px 0 0}
:is(.harmony-add-agent) .ha-same-face{margin:8px 0 0;color:var(--ha-ink)}
:is(.harmony-add-agent) .ha-custom{margin-top:6px}
/* (i) beside the title. */
:is(.harmony-add-agent) .ha-info{flex:none;width:28px;height:28px;margin-inline:-8px auto;padding:0;border:1.5px solid var(--ha-purple);border-radius:50%;background:transparent;color:var(--ha-purple);font:italic 700 15px/1 Georgia,serif;cursor:pointer}
:is(.harmony-add-agent) .ha-header h2{flex:0 1 auto}
:is(.harmony-add-agent) .ha-info-text{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:var(--ha-soft);font-size:14px;line-height:1.5}
/* Copy: the same button turns to Copied with a check. */
:is(.harmony-add-agent) .ha-copy[data-copied]{background:var(--ha-soft);color:var(--ha-purple);border-color:var(--ha-purple)}
:is(.harmony-add-agent) .ha-copy .ha-icon{width:18px;height:18px;stroke-width:2}
:is(.harmony-add-agent) [hidden]{display:none!important}
/* What the agent may do (acceptance audit, 15 October 2026): the fieldset carries agent-authority, so its rows are the
   Authority page's own segmented buttons with the chosen one filled; the fieldset itself draws no box of its own. */
:is(.harmony-add-agent) [data-ha-perms]{min-width:0;margin:18px 0 0;padding:0;border:0}
:is(.harmony-add-agent) [data-ha-perms]>.ha-section-title{float:none;width:100%}
:is(.harmony-add-agent) [data-ha-perms] .auth-row:last-child{border-bottom:0}

/* How should we refer to the agent (the Founder, 17 October 2026): three large tap targets, They / them checked until the person chooses. */
.pronoun-step{margin:14px 0 0;padding:12px 0 0;border:0;border-top:1px solid var(--line,#e7e5ee);min-width:0}
.pronoun-question{padding:0;font-weight:700;font-size:16px;line-height:1.3}
.pronoun-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.pronoun-option{display:flex;align-items:center;justify-content:center;min-height:56px;padding:8px 6px;border:1.5px solid var(--line,#e7e5ee);border-radius:14px;background:var(--surface,#fff);color:inherit;font:inherit;font-size:15px;cursor:pointer;text-align:center;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.pronoun-option strong{font-weight:600;overflow-wrap:anywhere}
.pronoun-option[aria-checked="true"]{border-color:var(--purple,#6d28b5);background:var(--soft,#f2ecfa);color:var(--purple-dark,#541c91);box-shadow:0 0 0 1px var(--purple,#6d28b5) inset}
.pronoun-option:focus-visible{outline:2px solid var(--purple,#6d28b5);outline-offset:2px}
.pronoun-help{margin:8px 0 0;font-size:13px;color:var(--muted,#686577)}
.harmony-add-agent .pronoun-option{background:#fff;color:#24212d;font-size:14px;padding:8px 4px}
.harmony-add-agent .pronoun-option[aria-checked="true"]{background:#f2ecfa;color:#541c91}
.agent-pronoun-card{padding:16px}
.agent-pronoun-card .pronoun-step{margin:0;padding:0;border-top:0}
.agent-pronoun-card .pronoun-question{font-size:17px}
@media (max-width:420px){.pronoun-option{min-height:60px;font-size:14px}}
.harmony-add-agent .ha-hood{margin-top:12px}
.harmony-add-agent .ha-hood-suggestions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.harmony-add-agent .ha-hood-chip{min-height:36px;padding:6px 12px;border:1px solid var(--line,#ddd);border-radius:999px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.harmony-add-agent .ha-hood-chip:hover{border-color:var(--purple,#7a35c8)}
/* One press (the Founder, 10 November 2026): the two types, the platform, Copy message. */
.harmony-add-agent [data-ha-kinds] .ha-choice{grid-template-columns:1fr 1fr}
@media(max-width:420px){.harmony-add-agent [data-ha-kinds] .ha-choice{grid-template-columns:1fr}}
.harmony-add-agent [data-ha-rows]{margin-top:16px}
.harmony-add-agent [data-ha-go-row]{margin-top:20px}
