/* Secondary screens (area B): project, Git, publish, estate, actions, work, settings and the other views. Loaded after styles.css. */

/* ---------- Screen building blocks ----------
   One calm pattern for every secondary screen: a short status line, rows
   that open a place (screenRow), and folds that open in place (fold). */
.screen-section { margin: 0 0 var(--sp-4); }
.screen-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin: 0 0 var(--sp-1); }
.screen-section-head h2 { margin: 0; font-size: var(--fs-16); font-weight: var(--fw-strong); }
.screen-section-meta { color: var(--muted); font-size: var(--fs-14); }
.screen-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.screen-actions > .primary { flex: 1 1 auto; }
.screen-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); }
.screen-actions svg { width: 20px; height: 20px; }
.screen-rows { display: grid; border-top: 1px solid var(--line); }
.fold > summary { border-radius: var(--r-8); }
.screen-rows > .nav-row { min-height: 60px; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.screen-rows > .project-publish-sites { margin: 0; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.screen-rows > .nav-row:hover { background: transparent; }
.screen-rows > .nav-row:hover .nav-row-label { text-decoration: underline; text-underline-offset: 3px; }
.screen-row > svg:last-child, .project-chat-list .nav-row > svg:last-child { width: 20px; height: 20px; color: var(--muted); }
.screen-loading { margin: var(--sp-4) 0; }
.status-line { min-height: var(--tap); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-1); margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-14); }
.status-line > .quiet { min-height: var(--tap); padding: 0 var(--sp-2); color: var(--text); }
.status-line .dot { margin-right: var(--sp-1); }
.fold { min-width: 0; border-bottom: 1px solid var(--line); }
.fold > summary { min-height: 60px; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; color: var(--text); cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:focus-visible { outline-offset: -2px; }
.fold-title { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; font-size: var(--fs-16); }
.fold-meta { min-width: 0; max-width: 55%; flex: 0 1 auto; overflow: hidden; color: var(--muted); font-size: var(--fs-14); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.fold-meta:empty { display: none; }
/* A fold whose counts need the full width: they go on their own line under the title. */
.fold-stacked > summary { display: grid; grid-template-columns: minmax(0,1fr) 20px; column-gap: var(--sp-3); row-gap: 2px; }
.fold-stacked > summary > .fold-meta { grid-column: 1; grid-row: 2; max-width: none; overflow: visible; white-space: normal; text-align: left; }
.fold-stacked > summary > svg { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.fold-stacked > summary > .fold-title { overflow-wrap: normal; }
.fold-path-part { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.fold > summary > svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.fold[open] > summary > svg { transform: rotate(180deg); }
.fold[open] { padding-bottom: var(--sp-4); }
.fold .fold > summary { min-height: 52px; }
.fold .fold > summary .fold-title { font-size: var(--fs-14); }
/* Text links inside screens and sheets: no native button look. */
:where(.panel-view, dialog) .link-button { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: var(--accent); font-size: var(--fs-14); font-weight: var(--fw-strong); text-align: left; cursor: pointer; }
:where(.panel-view, dialog) .link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Project page ---------- */
.project-control, .project-control-loading { max-width: 760px; }
.project-overview-purpose { margin: calc(-1 * var(--sp-3)) 0 var(--sp-4); color: var(--muted); font-size: var(--fs-14); line-height: 1.5; }
.project-chat-list { display: grid; margin: 0 calc(-1 * var(--sp-2)); }
.project-chat-list .nav-row { min-height: 56px; }
.project-chat-list .nav-row.is-more .nav-row-label { color: var(--muted); font-size: var(--fs-14); }
.project-chats .screen-actions { margin-bottom: var(--sp-5); }
/* Now / Next / Needs you: three short lines, label on the left. */
.project-now { display: grid; gap: 0; margin-bottom: var(--sp-4); border-top: 1px solid var(--line); }
.project-now-row { display: grid; grid-template-columns: 84px minmax(0,1fr) auto; align-items: center; gap: var(--sp-3); min-height: 52px; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.project-now-label { color: var(--muted); font-size: var(--fs-14); }
.project-now-text { min-width: 0; display: grid; gap: 2px; }
.project-now-text strong { font-size: var(--fs-14); font-weight: var(--fw-strong); line-height: 1.35; overflow-wrap: anywhere; }
.project-now-text small { color: var(--muted); font-size: var(--fs-12); line-height: 1.35; }
.project-lead[open] { padding-bottom: 0; }
.project-control > .project-now { border-top: 0; }
.progress-job-body p { margin: 0; font-size: var(--fs-14); }
.project-progress .screen-rows > .progress-job:last-child { border-bottom: 0; }
.project-now-rows { border-top: 1px solid var(--line); }
.project-now-rows > .project-now-row:last-child { border-bottom: 0; }
.project-now-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.progress-job-meta { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-12); line-height: 1.35; }
.progress-job-body { display: grid; gap: var(--sp-2); }
.progress-steps { display: grid; gap: var(--sp-2); margin: 0; padding-left: 1.25em; }
.progress-step { font-size: var(--fs-14); line-height: 1.4; overflow-wrap: anywhere; }
.progress-step small { display: block; color: var(--muted); font-size: var(--fs-12); }
.project-copies { margin-bottom: var(--sp-4); }
/* Text links in a work record sit apart, not run together. */
.project-work-row { display: grid; justify-items: start; gap: var(--sp-1); }
.project-work-row .link-button + .link-button { margin-left: 0; }
.feature-linked-records > li { display: flex; flex-wrap: wrap; column-gap: var(--sp-4); align-items: center; }
.feature-linked-records > li > :not(.link-button) { flex: 1 0 100%; }
.device-pair-result { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.device-pair-code { display: block; max-width: 100%; overflow-wrap: anywhere; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--bg); font-size: var(--fs-14); }
.device-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.device-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.device-actions .danger-button { border-color: var(--danger); color: var(--danger); }

.device-live-screen:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.device-platform { padding: 9px 0; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
.device-row { align-items: flex-start; flex-direction: column; }
.device-actions { justify-content: flex-start; }
.device-pair-form { align-items: stretch; flex-direction: column; }
}
.project-control-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.project-control-section-heading small { color: var(--muted); font-size: var(--fs-12); }
/* No creative job selected yet: no empty bordered box above Project stream. */
.creative-selected-job:empty { display: none; }
.project-control-list > ul { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.project-control-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px; }
.project-control-list li > span { min-width: 0; display: grid; gap: 2px; }
.project-control-list strong { font-size: var(--fs-12); line-height: 1.38; }
.project-control-list small { color: var(--muted); font-size: var(--fs-12); line-height: 1.3; }
.project-control-list .link-button { min-height: var(--tap); min-width: 44px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); font-size: var(--fs-12); }
.project-control-list .project-work-source { grid-column: 1 / -1; }
.project-control-list li > .creative-delivery-links { grid-column: 1 / -1; }
.project-control-list .creative-delivery-links > button { min-height: 44px; padding: 8px 11px; border-radius: var(--r-8); }
.creative-delivery-links > a:hover,.creative-delivery-links > button:hover { border-color: var(--muted); }
.creative-delivery-links > a:focus-visible,.creative-delivery-links > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.creative-delivery-links > .project-work-source { flex-basis: 100%; min-width: 0; margin: 0; }
.creative-delivery-links blockquote { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.project-control-more > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--muted); font-size: var(--fs-12); }
.project-control-more > ul { display: grid; gap: 8px; margin: 5px 0 0; padding: 0; list-style: none; }
.project-control-changes .project-control-list { margin-top: 8px; padding: 0; border: 0; background: transparent; }
.project-coverage > .project-control-section-heading h3 { margin: 0; font-size: var(--fs-14); }
.project-coverage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.project-coverage-stat { min-width: 0; display: grid; gap: 3px; padding: 9px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--bg); }
.project-coverage-stat strong { font-size: var(--fs-20); font-variant-numeric: tabular-nums; }
.project-coverage-stat span { font-size: var(--fs-12); font-weight: var(--fw-strong); }
.project-coverage-stat small { color: var(--muted); font-size: var(--fs-12); line-height: 1.35; }
.project-coverage-actions button { min-height: var(--tap); text-align: left; }
.project-overview-disclosure > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: var(--fs-12); list-style-position: inside; }
.project-overview-disclosure-body { padding: 0 4px 8px 18px; }
.project-overview-list ul { margin: 0; padding-left: 18px; }
.project-overview-list li { margin: 5px 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.project-overview-list .project-overview-more { margin-top: 7px; }
.project-work-body { padding-bottom: 8px; }
.project-work-counts { font-size: var(--fs-12); text-align: right; }
.project-work-intro { padding-top: 4px; font-size: var(--fs-12); }
.project-work-choice-group { display: grid; grid-template-columns: repeat(auto-fit,minmax(86px,1fr)); gap: 5px; }
.project-work-controls .compact-choice { min-height: var(--tap); padding: 7px 9px; }
.project-work-controls .compact-choice strong { font-size: var(--fs-12); }
.project-work-row { padding: 10px; border: 1px solid var(--line); border-radius: var(--r-8); }
.project-work-source > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: var(--fs-12); }
.project-work-source-body { padding: 0 4px 8px; }
.project-work-source-body blockquote { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width:560px) {
.project-overview-now,.project-control-columns { grid-template-columns: 1fr; }
.project-coverage-grid { grid-template-columns: 1fr; }
.project-coverage-stat { grid-template-columns: auto 1fr; align-items: baseline; }
.project-coverage-stat small { grid-column: 2; }
.project-overview-fact .project-overview-detail { display: none; }
.project-control-list { padding: 10px; }
}
.runtime-delegation select:disabled { cursor: not-allowed; opacity: .55; }
.conversation-summary-entry strong { display: block; color: var(--text); font-size: var(--fs-12); }
.conversation-summary-entry span { color: var(--muted); }
.runtime-subagents > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; cursor: pointer; list-style: none; }
.runtime-subagents > summary::-webkit-details-marker { display: none; }
.runtime-subagents > summary > span:first-child { min-width: 0; display: grid; gap: 3px; }
.runtime-subagents > summary strong { color: var(--text); font-size: var(--fs-12); }
.runtime-subagents > summary small { overflow: hidden; color: var(--faint); font-size: var(--fs-12); font-weight: var(--fw-regular); text-overflow: ellipsis; white-space: nowrap; }
.runtime-subagents > summary > span:last-child { color: var(--faint); font-size: var(--fs-20); transform: rotate(0deg); transition: transform .15s ease; }
.runtime-subagents[open] > summary > span:last-child { transform: rotate(90deg); }
.subagent-policy-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; padding: 8px 0 2px; }
.subagent-capability-group,.subagent-capabilities,.subagent-limits,.subagent-effective-capacity,.subagent-budget-note,.subagent-save-row,.subagent-policy-error { grid-column: 1 / -1; }
.subagent-capability-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-8); }
.subagent-capability-group > summary { min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; cursor: pointer; list-style: none; }
.subagent-capability-group > summary::-webkit-details-marker { display: none; }
.subagent-capability-group > summary::after { content: '›'; color: var(--faint); font-size: var(--fs-16); transition: transform .15s ease; }
.subagent-capability-group[open] > summary::after { transform: rotate(90deg); }
.subagent-capability-group > summary strong { font-size: var(--fs-12); }
.subagent-capability-group > summary strong { color: var(--accent); }
.subagent-capability-group > summary span { margin-left: auto; color: var(--faint); font-size: var(--fs-12); }
.subagent-capabilities legend { padding: 0 4px; color: var(--muted); font-size: var(--fs-12); }
.subagent-capabilities > div { display: grid; gap: 7px; }
.subagent-capability-option small { grid-column: 2; margin-top: -5px; color: var(--faint); font-size: var(--fs-12); line-height: 1.35; }
.subagent-limits { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.subagent-limits label { position: relative; }
.subagent-limits label small { position: absolute; right: 8px; bottom: 11px; color: var(--faint); font-size: var(--fs-12); pointer-events: none; }
.subagent-limits label:has(small) input { padding-right: 54px; }
.subagent-effective-capacity.limited { border-color: color-mix(in srgb,var(--warning) 42%,var(--line)); background: color-mix(in srgb,var(--warning) 7%,var(--surface)); }
.subagent-save-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.subagent-save-row > span { color: var(--faint); font-size: var(--fs-12); line-height: 1.35; }
.subagent-save-row .subtle { flex: 0 0 auto; min-height: var(--tap); }
.runtime-delegation { grid-column: 1 / -1; min-width: 0; }
.helper-choice-grid .choice-option:last-child:nth-child(odd) { grid-column: 1 / -1; }
.settings-loading { animation: settings-arrive .16s ease-out; }
.runtime-usage strong { color: var(--text); font-size: var(--fs-12); font-weight: var(--fw-strong); text-align: right; }
.runtime-usage.warning strong { color: var(--warning); }
.runtime-usage.danger strong { color: var(--danger); }
.conversation-usage strong { color: var(--text); font-weight: var(--fw-strong); }
.usage-card { display: grid; gap: 10px; }
.usage-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.usage-line strong { font-size: var(--fs-20); }
.usage-progress::-webkit-progress-bar { border-radius: var(--r-pill); background: var(--surface-strong); }
.usage-progress::-webkit-progress-value { border-radius: var(--r-pill); background: var(--accent); }
.usage-card.warning .usage-progress::-webkit-progress-value { background: var(--warning); }
.usage-card.warning .usage-progress::-moz-progress-bar { background: var(--warning); }
.usage-card.danger .usage-progress::-webkit-progress-value { background: var(--danger); }
.usage-card.danger .usage-progress::-moz-progress-bar { background: var(--danger); }
/* Settings: one short list; each row opens a sheet or a page of its own. */
.settings-page { min-width: 0; max-width: 720px; display: grid; gap: var(--sp-3); align-content: start; }
.settings-main, .settings-grid { min-width: 0; display: grid; gap: var(--sp-3); align-content: start; }
.settings-page > .card, .settings-main > .card, .settings-grid > .card { grid-column: auto; margin: 0; }
/* A page that holds one card already says its name in the header. */
.settings-subpage > .card > h3:first-child { display: none; }
.settings-subheader .settings-back { flex: 0 0 auto; min-height: var(--tap); display: inline-flex; align-items: center; gap: 2px; padding: 0 var(--sp-2) 0 0; border: 0; background: none; color: var(--text); font-size: var(--fs-16); cursor: pointer; }
.settings-subheader .settings-back svg { width: 20px; height: 20px; }
.settings-subheader h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-account-sheet p { margin: 0; }
.account-devices { margin-top: 18px; }
.account-data { margin-top: 18px; display: grid; gap: var(--sp-2); }
.account-data .st-act { text-decoration: none; }
.account-devices-head { margin: 0 0 2px; font-size: var(--fs-15); font-weight: var(--fw-regular); color: var(--ink2); }
.usage-card h4, .limit-card h4 { margin: var(--sp-3) 0 var(--sp-1); font-size: var(--fs-14); }
.usage-card > .limit-window h4 { margin-top: 0; }
.usage-card .limit-card { display: grid; gap: var(--sp-2); }
.usage-card .fold { border-bottom: 0; border-top: 1px solid var(--line); margin-top: var(--sp-2); }
.usage-card .fold > summary { min-height: var(--tap); }
.usage-card .fold .fold-title { font-size: var(--fs-14); color: var(--muted); }
.settings-providers .provider-card:last-child { border-bottom: 0; }
.settings-providers .provider-card > button { font-size: var(--fs-14); white-space: nowrap; }
.settings-providers .provider-sign-in { margin: var(--sp-1) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-12); }
/* Compact screen headers: one line, short title, buttons never wrap. */
.skill-tools { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.skill-tools .skill-search { flex: 1 1 auto; min-width: 0; }
.skill-tools select, .skill-tools button { flex: 0 0 auto; }
:is(#skills-view, #models-view, #settings-view) .panel-header h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(#skills-view, #models-view, #settings-view) .panel-header > button { flex: 0 0 auto; white-space: nowrap; }
.browser-controls button { white-space: nowrap; }
.browser-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-form .settings-model { grid-column: 1 / -1; }
.settings-form .refresh-button { justify-self: start; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.conversation-settings-heading > div { min-width: 0; }
.conversation-settings-heading .refresh-button { flex: 0 0 auto; }
.conversation-runtime { display: grid; min-width: 0; }
.conversation-runtime .runtime-usage { margin-top: 4px; }
.benchmark-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding-bottom: 20px; }
.benchmark-layout > .benchmark-setup, .benchmark-preview { grid-column: 1 / -1; }
.research-candidate { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.research-candidate ul { margin: 6px 0; padding-left: 20px; }
.research-candidate a { min-height: var(--tap); display: inline-flex; align-items: center; }
.benchmark-layout p { line-height: 1.5; overflow-wrap: anywhere; }
.benchmark-layout button:not(.primary):not(.danger-fill) { min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.benchmark-layout button:disabled { cursor: default; opacity: .55; }
.benchmark-layout button.primary { background: var(--text); color: var(--bg); }
.benchmark-setup form { display: grid; gap: 16px; }
.benchmark-setup form > button { justify-self: start; }
.benchmark-budget { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.benchmark-layout details { margin-top: 18px; }
.benchmark-layout summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
.benchmark-preview:not(:empty) { padding: 16px; border: 1px solid var(--accent); border-radius: var(--r-12); background: var(--surface); }
.benchmark-preview:empty { display: none; }
.benchmark-run-list .benchmark-run { display: grid; gap: 7px; width: 100%; text-align: left; overflow-wrap: anywhere; }
.benchmark-run.selected { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.benchmark-run time, .benchmark-run span { font-size: var(--fs-12); color: var(--muted); }
.benchmark-status { text-transform: capitalize; font-weight: var(--fw-strong); }
.benchmark-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.benchmark-metrics dt { color: var(--muted); font-size: var(--fs-12); }
.benchmark-metrics dd { margin: 6px 0 0; font-size: var(--fs-16); overflow-wrap: anywhere; }
.benchmark-quality { font-size: var(--fs-14); }
.benchmark-case-results { padding: 0; list-style: none; font-size: var(--fs-14); }
.benchmark-case-results li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 10px 0; }
.benchmark-case-results strong { font-weight: var(--fw-regular); }
@media (max-width: 600px) {
.benchmark-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 359px) {
.benchmark-budget { grid-template-columns: minmax(0,1fr); }
}
.browser-view { display: grid; grid-template-rows: 64px auto minmax(0,1fr); min-height: 0; background: var(--media-bg); }
.browser-view .panel-header { display: none; }
.browser-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.browser-identity { min-width: 0; display: flex; align-items: center; gap: 9px; }
.browser-identity > div { min-width: 0; display: grid; gap: 3px; }
.browser-menu { display: inline-grid; flex: 0 0 auto; }
.browser-toolbar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-14); }
.browser-controls { display: flex; gap: 7px; }
.browser-transfer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 7px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.browser-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.browser-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.browser-input-shield strong, .browser-input-shield span { width: max-content; max-width: calc(100vw - 32px); margin-inline: auto; padding: 7px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 4px 22px var(--shade-20); }
.browser-input-shield strong { padding-bottom: 0; border-radius: var(--r-12) var(--r-12) 0 0; font-size: var(--fs-14); }
.browser-input-shield span { padding-top: 3px; border-radius: var(--r-12); color: var(--muted); font-size: var(--fs-12); }
.metric { font-size: var(--fs-24); font-weight: var(--fw-strong); letter-spacing: -.025em; }
.metric small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-regular); letter-spacing: 0; }
.metric.compact { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-16); }
.change-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--surface); }
.change-summary > div { min-width: 0; }
.change-summary h3 { margin-bottom: 4px; }
.change-state.clean { background: var(--surface); color: var(--muted); }
.change-file { min-height: var(--tap); border-bottom: 1px solid var(--line); font: var(--fs-12)/1.45 var(--font-mono); }
.change-file:last-child { border-bottom: 0; }
.change-file summary { min-height: var(--tap); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.change-file summary::-webkit-details-marker { display: none; }
.change-file b { color: var(--warning); white-space: nowrap; }
.change-file summary > span:not(.change-file-disclosure) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-file[open] .change-file-disclosure { color: var(--text); }
/* The file name first; its folder after it, quieter, gives way first. */
.change-file-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.change-file-name > span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-file-folder { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: inherit; }
.change-files-group { margin: 16px 0 4px; font-size: var(--fs-16); font-weight: var(--fw-strong); }
.change-files-group:first-child { margin-top: 0; }
.copy-ahead-files { margin: 0; padding: 0; list-style: none; }
.copy-ahead-files li { min-height: var(--tap); display: flex; align-items: center; gap: 8px; min-width: 0; border-bottom: 1px solid var(--line); font: var(--fs-12)/1.45 var(--font-mono); }
.copy-ahead-files li > span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-file pre { max-height: 52vh; margin: 0 0 10px; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); white-space: pre; font-size: var(--fs-12); line-height: 1.5; }
/* A change reads as wrapped text: added lines highlighted, removed lines struck through. */
.change-text { max-height: 52vh; margin: 0 0 10px; padding: 6px 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); font: var(--fs-14)/1.5 var(--font-sans); overflow-wrap: anywhere; }
.change-text-line { display: block; padding: 1px 12px; white-space: pre-wrap; text-decoration: none; }
.change-text-line.add { background: color-mix(in srgb, var(--success) 16%, transparent); }
.change-text-line.del { background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.change-text-gap, .change-text-note { margin: 8px 12px 2px; color: var(--faint); font-size: var(--fs-12); }
.change-text-gap:first-child { margin-top: 2px; }
.change-text-file { margin: 12px 12px 4px; font-weight: var(--fw-strong); overflow-wrap: anywhere; }
.change-text-file:first-child { margin-top: 4px; }
.change-text-empty { margin: 0 0 10px; font: var(--fs-14)/1.5 var(--font-sans); }
.change-files-count { margin: 0 0 6px; font-size: var(--fs-12); }
.diff-card .change-text { max-height: 62vh; margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.commit-row { min-height: 49px; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.commit-row.plain { grid-template-columns: minmax(0, 1fr); }
.commit-row:last-child { border-bottom: 0; }
.commit-row code { color: var(--muted); font-size: var(--fs-12); }
.commit-row > div { min-width: 0; display: grid; gap: 3px; }
.commit-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); }
.commit-row time { color: var(--faint); font-size: var(--fs-12); }
.recovery-row { min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.recovery-row:last-child { border-bottom: 0; }
.recovery-row > div { min-width: 0; display: grid; gap: 3px; }
.recovery-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); }
.recovery-row span { color: var(--faint); font-size: var(--fs-12); }
.recovery-row button { flex: 0 0 auto; min-width: 44px; min-height: 44px; }
.diff-card { padding: 0; overflow: hidden; }
.diff-card summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 17px; cursor: pointer; font-size: var(--fs-16); font-weight: var(--fw-strong); }
.diff-card summary span:last-child { color: var(--faint); font-size: var(--fs-14); font-weight: var(--fw-regular); }
.diff-card pre { max-height: 62vh; margin: 0; padding: 15px 17px; overflow: auto; border: 0; border-top: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); font-size: var(--fs-12); line-height: 1.5; }
.connection-warning { background: var(--surface); }
.life-overview { padding: 0; overflow: hidden; }
.life-summary { min-height: 92px; display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--surface); }
.life-summary > div { min-width: 0; flex: 1; }
.channel-list { padding: 0 18px; }
.life-row { min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; border-bottom: 1px solid var(--line); font-size: var(--fs-12); }
.life-row:last-child { border-bottom: 0; }
.life-row > div { display: grid; gap: 2px; }
.life-row strong { font-size: var(--fs-12); }
.life-row span { color: var(--muted); }
.life-row time { grid-column: 2; grid-row: 1 / 3; color: var(--faint); }
.life-row button { min-width: 92px; }
.spotify-controls { display: grid; gap: 14px; }
.spotify-controls-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.spotify-controls-heading > div { min-width: 0; }
.spotify-controls-heading h3 { margin-bottom: 4px; font-size: var(--fs-16); }
.spotify-controls-heading button { flex: 0 0 auto; min-height: var(--tap); }
.spotify-device-row, .spotify-track-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.spotify-device-row > span { min-height: 17px; font-size: var(--fs-12); }
.spotify-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.spotify-actions button, .spotify-volume button { min-height: var(--tap); }
.spotify-volume { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.spotify-queue { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-12); }
.spotify-queue:empty { display: none; }
.spotify-queue ol { display: grid; gap: 4px; margin: 2px 0 0; padding-left: 20px; color: var(--muted); }
.spotify-queue li { padding-left: 2px; }
.spotify-controls button:disabled, .spotify-controls select:disabled, .spotify-controls input:disabled { cursor: not-allowed; opacity: .55; }
/* Life lists each service as one calm row: name and state, one button. */
#life-view .life-summary { min-height: 0; padding-bottom: var(--sp-1); }
#life-view .life-row { min-height: 56px; padding: 8px 0; font-size: var(--fs-14); }
#life-view .life-row strong { font-size: var(--fs-14); }
@media (max-width: 800px) {
  .spotify-controls-heading { flex-direction: column; align-items: stretch; gap: 10px; }
  .spotify-controls-heading button { align-self: flex-start; }
  .spotify-volume { grid-template-columns: minmax(0, 1fr); }
}
.life-notice.error { color: var(--danger); }
.obligation { min-height: 58px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.obligation:last-child { border-bottom: 0; }
.severity.high { background: var(--danger); }
.obligation h4 { margin: 0 0 4px; font-size: var(--fs-14); }
.action-card { grid-column: 1 / -1; min-height: 88px; display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--line); }
/* Actions: groups fold by project; each card is the title, one line of
   reason, folded instructions and its buttons. */
.action-groups .fold > .action-list { border-top: 0; }
.action-groups .action-card:last-child, .action-history .action-card:last-child { border-bottom: 0; }
.action-history-body { display: grid; }
.action-card .action-kind { color: var(--muted); font-weight: var(--fw-regular); letter-spacing: 0; text-transform: none; }
.action-card .action-meta { color: var(--muted); font-size: var(--fs-14); }
.action-card .action-meta > span + span::before { content: '·'; margin-right: 7px; }
.action-card h4 { margin: var(--sp-1) 0; font-size: var(--fs-16); }
.action-card p { font-size: var(--fs-14); }
.action-card h4, .action-card p, .chat-action strong, .chat-action p { overflow-wrap: anywhere; }
.chat-action p { margin: var(--sp-2) 0 0; font-size: var(--fs-14); }
.action-card .action-details summary, .chat-action .action-details summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); text-decoration: none; }
.action-card .action-details[open] summary, .chat-action .action-details[open] summary { color: var(--text); }
.action-controls { align-items: center; }
/* Work: the groups fold; a group with nothing in it is one plain row. */
.work-section { margin: 0; }
.work-group-empty { min-height: 60px; padding-inline: 0; border-bottom: 1px solid var(--line); border-radius: var(--r-8); }
.work-group-empty:hover { background: transparent; }
.work-group > .work-card:last-child { margin-bottom: 0; }
/* Top-aligned, so a tall card (DNS setup steps) keeps its dot and buttons by the title. */
.action-card > .severity { margin-top: 4px; }
.action-list { border-top: 1px solid var(--line); }
#actions-view .action-list { border-top: 0; }
/* The tab is a flat filtered list, so the filters carry the organisation that
   per-project group headings used to. */
.action-filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.action-scope { flex: 1 1 190px; min-width: 0; max-width: 380px; height: var(--tap); padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--bg); color: var(--text); font-size: var(--fs-12); }
.action-search { flex: 1 1 160px; min-width: 0; height: var(--tap); padding: 0 11px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--bg); color: var(--text); font-size: var(--fs-12); }
.action-search::placeholder { color: var(--faint); }
.action-thread { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.action-card:last-child { border-bottom: 0; }
.action-card h4 { margin: 2px 0 5px; font-size: var(--fs-14); }
.action-details summary { cursor: pointer; color: var(--text); font-size: var(--fs-12); text-decoration: underline; text-underline-offset: 3px; }
/* Project settings: 'More' and its section names read at body size. */
.project-settings .project-settings-more > summary { font-size: var(--fs-16); text-decoration: none; }
.project-settings .project-repository-boundary > strong { font-size: var(--fs-16); }
/* Where the work is: the folder now, a chat's suggestion, up to five found places. */
.project-settings .work-location-now { color: var(--text); font-size: var(--fs-15); overflow-wrap: anywhere; }
.work-location { display: grid; gap: 8px; }
.work-location-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.work-location-choices { display: grid; gap: 6px; }
.work-location-choices:empty { display: none; }
.work-location-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-8); }
.work-location-choice > span { min-width: 0; color: var(--text); font-size: var(--fs-14); overflow-wrap: anywhere; }
.work-location-choice > button { flex: none; }
.work-location-typed { display: flex; gap: 8px; }
.work-location-typed > input { flex: 1; min-width: 0; }
.work-location-proposal { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--accent); border-radius: var(--r-8); }
.work-location-proposal > p { color: var(--text); }
.action-instructions { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.action-card .action-instructions { width: min(680px,100%); margin-top: 8px; color: var(--text); }
.action-setup-steps li + li { margin-top: 10px; }
.action-setup .action-instructions, .action-card .action-setup .action-instructions { width: auto; margin: 0; color: var(--text); }
/* Long values wrap so all of it is readable on a phone; Copy copies the exact value. */
.action-setup pre { margin: 0; padding: 9px 12px; color: var(--text); font: var(--fs-12)/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.action-card a { display: inline-block; margin-top: 8px; color: var(--accent); font-size: var(--fs-12); text-decoration: none; }
.action-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--faint); font-size: var(--fs-12); }
.action-kind { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: var(--fw-strong); }
.action-controls { display: flex; flex-wrap: wrap; gap: 6px; }
/* Status text beside Action buttons (for example "Publishing… build"). */
.action-controls > span.muted { align-self: center; font-size: var(--fs-12); }
.action-filter { min-width: 94px; height: var(--tap); padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--bg); font-size: var(--fs-12); }
.action-card .action-resume-note { margin-top: 6px; color: var(--text); font-size: var(--fs-12); }
.action-card.closed { min-height: 72px; }
.action-card.closed .severity.done { background: var(--success); }
.action-card.closed .severity.dismissed { background: var(--faint); }
.action-status { padding: 2px 5px; border-radius: var(--r-8); background: var(--surface-strong); color: var(--muted); font-weight: var(--fw-strong); }
.action-status.done { color: var(--muted); }
.action-closed { color: var(--faint); font-size: var(--fs-12); }
.sensitive-entry summary { cursor: pointer; font-size: var(--fs-12); font-weight: var(--fw-strong); }
/* The answer sheet: its plain steps read at body size; a long title shrinks to
   one line once the form scrolls, so the fields keep the screen (r8-ui-sean-life-10). */
.action-plain-steps { margin: 0 0 var(--sp-3); padding-left: 22px; color: var(--text); font-size: var(--fs-16); line-height: 1.45; }
.action-plain-steps li + li { margin-top: 8px; }
.action-answer-sheet .action-replace-note { margin: 4px 0 8px; color: var(--text); font-size: var(--fs-14); }
dialog#modal:has(.action-answer-sheet) .sheet-bar.is-scrolled .sheet-bar-title > h2 { font-size: var(--fs-16); font-weight: var(--fw-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.action-answer-sheet :is(input, textarea) { scroll-margin: 80px 0 96px; }
.skill-row, .provider-card { min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.skill-row { cursor: pointer; }
.skill-row.disabled { opacity: .55; }
.skill-row small { color: var(--faint); font-size: var(--fs-12); }
.skill-quality, .skill-review-state { text-transform: capitalize; }
.skill-quality.validated, .skill-review-state.validated { color: var(--muted); }
.skill-quality.stale, .skill-review-state.stale { color: var(--warning); }
.checkbox-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; }
.skill-row h4, .provider-card h4 { margin: 0 0 3px; font-size: var(--fs-14); }
.provider-card { grid-template-columns: 8px minmax(0, 1fr) auto; }
.provider-card .status { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.provider-card .status.ok { background: var(--success); }
.provider-card button { border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); padding: 7px 9px; color: var(--muted); font-size: var(--fs-12); }
.provider-card.credential-row { grid-template-columns: minmax(0, 1fr) auto; }
.credential-row h4 { overflow-wrap: anywhere; }
.rules-proof.ok { color: var(--muted); }
.estate-block { padding: 12px; border-radius: var(--r-8); background: var(--surface); }
.estate-block pre { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--muted); font: var(--fs-12)/1.55 var(--font-mono); }
.estate-sections { padding-top: 2px; padding-bottom: 2px; }
.estate-sections details { border-bottom: 1px solid var(--line); }
.estate-sections details:last-child { border-bottom: 0; }
.estate-sections summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; text-transform: capitalize; font-size: var(--fs-14); font-weight: var(--fw-strong); }
.estate-sections summary::-webkit-details-marker { display: none; }
.estate-sections summary span:last-child { color: var(--faint); font-size: var(--fs-12); font-weight: var(--fw-regular); }
.estate-sections .estate-block { margin-bottom: 14px; }
.work-loading { padding: 42px 0; color: var(--muted); text-align: center; font-size: var(--fs-12); }
.work-section-heading h2 { margin: 0; font-size: var(--fs-16); letter-spacing: -.01em; }
.work-section-heading p { margin: 3px 0 0; font-size: var(--fs-12); }
.work-section-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: var(--r-12); display: grid; place-items: center; background: var(--surface); color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.work-card.working { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 2.5%, var(--bg)); }
.work-card.needs_you, .work-card.waiting, .work-card.blocked, .work-card.ready { border-color: color-mix(in srgb, var(--warning) 42%, var(--line)); }
.work-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.work-card-heading > div { min-width: 0; }
.work-card-heading h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-16); letter-spacing: -.015em; }
.work-card-heading .eyebrow { margin-bottom: 4px; }
.work-state { flex: 0 0 auto; padding: 5px 8px; border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.work-state.working { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--muted); }
.work-state.needs_you, .work-state.waiting, .work-state.blocked, .work-state.ready { background: color-mix(in srgb, var(--warning) 13%, var(--surface)); color: var(--warning); }
.work-state.failed, .work-state.stopped { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.work-phase { display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); }
.work-phase strong { font-weight: var(--fw-strong); }
.work-card.working .work-pulse { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.work-card.needs_you .work-pulse, .work-card.waiting .work-pulse, .work-card.blocked .work-pulse, .work-card.ready .work-pulse { background: var(--warning); }
.work-outcome { max-width: 740px; padding: 10px 11px; border-left: 2px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.work-outcome strong { display: block; margin-bottom: 3px; font-size: var(--fs-14); }
.work-outcome p { margin: 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.48; }
.work-glance p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.work-decision { max-width: 740px; padding: 11px 12px; border-left: 2px solid var(--warning); border-radius: var(--r-8); background: color-mix(in srgb, var(--warning) 6%, var(--surface)); }
.work-decision strong { display: block; margin-bottom: 4px; color: var(--warning); font-size: var(--fs-14); }
.work-decision p { margin: 0; font-size: var(--fs-14); line-height: 1.45; }
.work-decision small { display: block; margin-top: 5px; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.work-details { max-width: 740px; border-top: 1px solid var(--line); }
.work-details > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: var(--muted); font-size: var(--fs-12); list-style: none; }
.work-details > summary::-webkit-details-marker { display: none; }
.work-details > summary strong { color: var(--text); font-size: var(--fs-12); }
.work-details > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-details-body { display: grid; gap: 11px; padding: 2px 0 10px; }
.work-timebox { max-width: 520px; }
.work-timebox:empty { display: none; }
.work-time-label strong { color: var(--text); font-weight: var(--fw-strong); }
.work-timebox progress { width: 100%; height: 5px; border: 0; border-radius: var(--r-8); overflow: hidden; background: var(--surface-strong); }
.work-timebox progress::-webkit-progress-bar { background: var(--surface-strong); }
.work-timebox progress::-webkit-progress-value { background: var(--accent); }
.work-timebox progress::-moz-progress-bar { background: var(--accent); }
.work-workers { max-width: 740px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-workers summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: var(--muted); font-size: var(--fs-12); }
.work-workers summary strong { color: var(--text); font-size: var(--fs-12); }
.work-worker-row { min-height: 48px; padding: 7px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-worker-row > div { min-width: 0; display: grid; gap: 3px; }
.work-worker-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); }
.work-worker-row small { color: var(--muted); font-size: var(--fs-12); }
.work-worker-row button { min-height: 44px; }
.work-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding-top: 2px; }
.work-actions button { min-height: 44px; padding-inline: 14px; }
.login-shell { height: var(--app-height, 100dvh); display: grid; place-items: center; padding: calc(22px + var(--safe-top)) calc(22px + var(--safe-right)) calc(22px + var(--safe-bottom)) calc(22px + var(--safe-left)); background: var(--bg); }
.login-card .brand-glyph { margin: 0 auto 24px; }
.login-card > p { margin: 9px 0 26px; color: var(--muted); font-size: var(--fs-14); }
.login-card label { display: block; margin-bottom: 7px; text-align: left; color: var(--muted); font-size: var(--fs-12); }
.login-card input { width: 100%; height: 46px; margin-bottom: 12px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); outline: 0; }
.login-card input:focus { border-color: var(--text); }
.login-card .primary { height: 45px; }
.automation-intro p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-14); max-width: 720px; }
.automation-list { display: grid; gap: 12px; }
.automation-card.enabled { border-left: 3px solid var(--accent); }
.automation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.automation-heading h3 { margin: 2px 0 0; }
.automation-state { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); font-size: var(--fs-12); }
.automation-state.running,.automation-state.queued { color: var(--accent); border-color: color-mix(in srgb,var(--accent) 45%,var(--line)); }
.automation-state.failed { color: var(--danger); }
.automation-glance strong { font-size: var(--fs-14); }
.automation-glance span { color: var(--muted); font-size: var(--fs-12); text-align: right; }
.automation-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.automation-actions button { min-height: var(--tap); }
.automation-detail > summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: var(--fs-12); cursor: pointer; }
.automation-detail > p { white-space: pre-wrap; line-height: 1.55; }
.automation-history > div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: var(--fs-12); }
.automation-history > div:last-child { border-bottom: 0; }
.automation-history span { color: var(--muted); }
.automation-form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.automation-form-row > label { min-width: 0; }
.estate-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.estate-explainer h2, .estate-readable h2 { margin: 3px 0 7px; font: var(--fw-strong) var(--fs-20)/1.25 var(--font-sans); }
.estate-explainer > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.6; }
.estate-readable { display: grid; gap: 0; }
.estate-readable-heading, .estate-readable-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.estate-readable-heading { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.estate-readable-heading h2 { margin: 0; }
.estate-readable-heading > span { max-width: 50%; color: var(--muted); font-size: var(--fs-12); text-align: right; }
.estate-readable-row { min-height: 58px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.estate-readable-row.secondary { color: var(--muted); }
.estate-readable-row:last-child { border-bottom: 0; }
.estate-readable-row > div { min-width: 0; }
.estate-readable-row strong { font-size: var(--fs-12); }
.estate-readable-row p { margin: 3px 0 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.estate-state-text { flex: 0 0 auto; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); text-transform: lowercase; }
.estate-state-text::before { content: '— '; color: var(--faint); }
.estate-state-text.failed { color: var(--danger); }
.estate-clear { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.55; }
.estate-system { border-bottom: 1px solid var(--line); }
.estate-system > summary { min-height: 60px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; list-style: none; cursor: pointer; }
.estate-system > summary::-webkit-details-marker { display: none; }
.estate-system > summary > div { min-width: 0; display: grid; gap: 4px; }
.estate-system > summary strong { overflow: hidden; font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
.estate-system > summary > div span { overflow: hidden; color: var(--muted); font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
.estate-system > summary:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.estate-system-body { padding: 0 0 16px 16px; border-left: 2px solid var(--line); }
.estate-system-purpose, .estate-check-summary { margin: 0 0 8px; color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
.estate-detail-group { margin-top: 12px; }
.estate-detail-group strong { font-size: var(--fs-12); }
.estate-detail-group p, .estate-service-list p { margin: 4px 0; overflow-wrap: anywhere; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.estate-inner-disclosure { margin-top: 10px; }
.estate-inner-disclosure > summary { min-height: var(--tap); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; color: var(--text); cursor: pointer; font-size: var(--fs-12); text-decoration: underline; text-underline-offset: 3px; }
.estate-inner-disclosure pre { max-height: 340px; overflow: auto; white-space: pre-wrap; color: var(--muted); font: var(--fs-12)/1.5 var(--font-mono); }
.estate-storage-view .estate-inner-disclosure > summary { justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 8px 0; text-decoration: none; }
.estate-storage-view .estate-readable-row { display: block; }
.estate-storage-view .estate-readable-row p { overflow-wrap: anywhere; }
.estate-fact-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.estate-fact-grid > div { padding: 16px 14px 8px 0; display: grid; gap: 4px; }
.estate-fact-grid strong { font: var(--fw-strong) var(--fs-20)/1.1 var(--font-sans); }
.estate-fact-grid span { color: var(--muted); font-size: var(--fs-12); }
.estate-coverage-row { min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-12); }
.estate-coverage-row span { text-transform: capitalize; }
.estate-coverage-row strong { color: var(--muted); font-size: var(--fs-12); }
.estate-coverage-row strong.healthy { color: var(--muted); }
.estate-coverage-row strong.failed { color: var(--danger); }
/* Each dot-separated part stays whole unless it alone is wider than the cell. */
.hostname-part { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.estate-routes-table td p { margin: 4px 0 0; }
.estate-routes-table .estate-route-path { font-size: var(--fs-12); overflow-wrap: anywhere; }
/* A route's state is its own cell or card line, so it needs no leading dash. */
.estate-routes-table .estate-state-text::before { content: none; }
/* Warnings, machine reasons, other hostnames and limits share one text size. */
.estate-routes .estate-sections > p, .estate-routes .estate-route-warnings p { font-size: var(--fs-12); line-height: 1.5; }
@media (max-width: 480px) {
.estate-routes-scroll { overflow: visible; border: 0; border-radius: var(--r-8); }
.estate-routes-table, .estate-routes-table tbody, .estate-routes-table tr { display: block; width: 100%; }
.estate-routes-table thead { display: none; }
.estate-routes-table tr { margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.estate-routes-table td { min-width: 0; display: grid; grid-template-columns: minmax(78px,30%) minmax(0,1fr); gap: 10px; padding: 3px 0; border: 0; overflow-wrap: anywhere; }
.estate-routes-table td::before { content: attr(data-label); color: var(--muted); }
.estate-routes-table td:first-child::before { content: none; }
.estate-routes-table .estate-state-text { max-width: 100%; font-size: var(--fs-12); white-space: normal; }
}
@media (max-width: 800px) {
.subagent-policy-form select, .subagent-policy-form input { min-height: var(--tap); }
.subagent-save-row .subtle { min-height: var(--tap); }
.browser-menu { display: inline-grid; }
.estate-section { padding: 20px 0; }
.estate-readable-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
.estate-readable-heading > span { max-width: 100%; text-align: left; }
.estate-readable-row { align-items: flex-start; flex-direction: column; width: 100%; gap: 6px; }
.estate-readable-row > div { width: 100%; }
.estate-readable-row p { overflow-wrap: anywhere; }
.estate-state-text { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.estate-system > summary { gap: 8px; }
.estate-system > summary > div span { white-space: normal; }
.estate-fact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.work-section-heading { align-items: flex-end; }
.work-section-heading p { max-width: 270px; }
.work-card { padding: 15px 14px; border-radius: var(--r-12); }
.work-card-heading { gap: 10px; }
.work-card-heading h3 { white-space: normal; line-height: 1.25; }
.work-objective { font-size: var(--fs-14); }
.work-details > summary { min-height: 48px; }
.work-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.work-actions button { min-height: 44px; }
.work-actions button:only-child { grid-column: 1 / -1; }
.work-actions button:last-child:nth-child(3) { grid-column: 1 / -1; }
.automation-intro { align-items: stretch; flex-direction: column; }
.automation-intro button { min-height: 44px; }
.automation-heading,.automation-glance { align-items: flex-start; }
.automation-glance { flex-direction: column; gap: 5px; }
.automation-glance span { text-align: left; }
.automation-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.automation-actions button { min-height: 44px; padding-inline: 7px; }
.change-summary { align-items: flex-start; }
.change-state { max-width: 46%; white-space: normal; text-align: right; }
.diff-card pre { max-height: 54vh; }
.action-card { grid-template-columns: 7px minmax(0, 1fr); padding: 14px 0; }
.action-controls { grid-column: 2; justify-content: flex-end; margin-top: 8px; }
.obligation { grid-template-columns: 7px minmax(0, 1fr); }
.obligation select { grid-column: 2; width: max-content; }
}
@media (max-width: 420px) {
.subagent-policy-form { grid-template-columns: minmax(0,1fr); }
.subagent-capability-group,.subagent-capabilities,.subagent-limits,.subagent-effective-capacity,.subagent-budget-note,.subagent-save-row,.subagent-policy-error { grid-column: 1; }
.settings-form { grid-template-columns: minmax(0,1fr); }
.settings-form .settings-model { grid-column: 1; }
.automation-form-row { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media (max-height: 480px) and (orientation: landscape) {
/* Keep sign-in controls together in the short visual viewport. Branding is
     compact, while password and Continue share one row. The shell still scrolls
     if an unusually small keyboard leaves less room than these controls need. */
  .login-shell {
    min-height: 0; place-items: start center; overflow-y: auto;
    padding: calc(8px + var(--safe-top)) calc(12px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(12px + var(--safe-left));
  }
.login-card {
    width: min(680px, 100%); display: grid;
    grid-template-columns: minmax(160px,.8fr) minmax(220px,1fr) 112px;
    grid-template-rows: auto auto auto; column-gap: 14px; text-align: left;
  }
.login-card .brand-glyph { grid-column: 1; grid-row: 1; margin: 0 0 5px; }
.login-card h1 { grid-column: 1; grid-row: 2; }
.login-card label { grid-column: 2 / 4; grid-row: 1; align-self: end; margin-bottom: 5px; }
.login-card input { grid-column: 2; grid-row: 2; margin-bottom: 0; }
.login-card .primary { grid-column: 3; grid-row: 2; height: 46px; }
.login-card .error { grid-column: 2 / 4; grid-row: 3; margin: 3px 0 0; }
}

/* ---------- Git screen ----------
   One status line, the next step as the one primary button (or the commit
   form when committing is next), then More, then folds for files, commits
   and recovery points. */
.project-git-panel { display: grid; gap: 0; margin: 0 0 var(--sp-2); }
/* One column that never grows past the screen: a long line in a change
   scrolls inside its own box instead of widening the page. */
.project-git-panel { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.changes-files, .changed-files-page, .change-file, .diff-card { min-width: 0; max-width: 100%; }
.change-file pre, .diff-card pre { max-width: 100%; }
/* While the changed files first load, the controls below them wait unseen,
   so the list arriving cannot move them under a finger mid-tap. */
.changes-files[data-loading] ~ * { visibility: hidden; }
.project-git-panel > .project-git-task:not([hidden]), .project-git-panel > .project-git-diff-preview:not([hidden]), .project-git-panel > .settings-detail:not(:empty) { margin: 0 0 var(--sp-3); }
.git-status { margin: 0 0 var(--sp-3); display: grid; grid-template-columns: 10px minmax(0,1fr); align-items: start; gap: var(--sp-3); }
.git-status-dot { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--faint); }
.git-status.good .git-status-dot { background: var(--success); }
.git-status.warning .git-status-dot { background: var(--warning); }
.git-status.failed .git-status-dot { background: var(--danger); }
.git-status-line { margin: 0; overflow-wrap: anywhere; font-size: var(--fs-16); font-weight: var(--fw-strong); }
.git-status-detail { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.45; }
.project-git-panel > .settings-detail:empty { display: none; }
.project-git-panel .settings-detail { margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.45; }
.project-git-panel .settings-detail.error { color: var(--danger); }
.project-git-actions { display: grid; gap: 0; }
.project-git-next { display: grid; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.project-git-panel label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: var(--fs-14); }
.project-git-panel label > input:not([type=checkbox]) { width: 100%; min-width: 0; }
.project-git-commit.is-inline { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--sp-2); padding: 0; border: 0; background: none; }
.project-git-author > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); cursor: pointer; overflow-wrap: anywhere; }
.project-git-author[open] { display: grid; gap: var(--sp-2); padding-bottom: var(--sp-2); }
.project-git-more-tasks { border-top: 1px solid var(--line); }
.project-git-more-actions { display: grid; }
.project-git-more-actions .choice-option { min-height: 56px; padding: var(--sp-2) 0; border: 0; border-bottom: 1px solid var(--line); border-radius: var(--r-8); background: transparent; box-shadow: none; text-align: left; }
.project-git-more-actions .choice-option::before { display: none; }
.project-git-more-actions .choice-option strong { font-size: var(--fs-16); font-weight: var(--fw-regular); }
.project-git-more-actions .choice-option small { font-size: var(--fs-14); }
.project-git-more-actions .choice-option[aria-expanded="true"] strong { font-weight: var(--fw-strong); }
.project-git-panel .compact-details { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: var(--sp-1) var(--sp-4); margin: var(--sp-3) 0 0; font-size: var(--fs-14); }
.project-git-panel .compact-details dt { color: var(--muted); }
.project-git-panel .compact-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.project-git-more-tasks > .settings-detail { margin-top: var(--sp-3); }
.project-git-files > :not(summary) { margin-top: var(--sp-2); }
.git-folds { border-top: 0; }
.screen-note { padding: var(--sp-4) 0; }
.screen-note p { margin: 0 0 var(--sp-2); line-height: 1.5; }
.commit-list, .recovery-list, .changed-files { display: grid; grid-template-columns: minmax(0, 1fr); }
.project-git-panel .compact-stats small { color: var(--muted); font-size: var(--fs-12); }
.project-git-task-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-git-task-heading > button { min-height: 44px; }
.project-git-diff-preview {
  min-width: 0;
  max-height: 24rem;
  overflow: auto;
  white-space: pre;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
  font-size: var(--fs-12);
}
.project-git-connection {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
}
.project-git-connection > .settings-detail,
.project-git-connection > button {
  grid-column: 1 / -1;
}
.project-git-connection > button {
  justify-self: start;
  min-height: 44px;
}
.project-git-commit {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content;
  align-items: end;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
}
.project-git-commit > .settings-detail {
  grid-column: 1 / -1;
}
.project-git-commit > button {
  min-height: 44px;
}
.project-git-transfer {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content max-content;
  align-items: end;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
}
.project-git-transfer > .settings-detail {
  grid-column: 1 / -1;
}
.project-git-transfer > button {
  min-height: 44px;
}
.project-git-transfer > label {
  min-width: 0;
}
.project-git-transfer input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
}
.project-git-panel button.secondary {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
  cursor: pointer;
}
.project-git-panel button.secondary:disabled {
  color: var(--muted);
  cursor: default;
}
.project-git-catalog {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface);
}
.project-git-catalog-heading,
.project-git-catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-git-catalog-heading > div,
.project-git-catalog-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.project-git-catalog-heading small,
.project-git-catalog-copy small {
  color: var(--muted);
}
.project-git-catalog-list {
  display: grid;
  gap: 8px;
}
.project-git-catalog-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface-strong);
}
.project-git-catalog-row strong {
  overflow-wrap: anywhere;
}
.project-git-history-row {
  width: 100%;
  min-height: 44px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.project-git-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.project-git-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.project-git-inline-check input {
  width: 20px;
  height: 20px;
}
.project-git-commit-view {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.project-git-commit-view strong,
.project-git-commit-message,
.project-git-commit-files {
  overflow-wrap: anywhere;
}
.project-git-commit-message {
  margin: 0;
  white-space: pre-wrap;
}
.project-git-commit-files {
  margin: 0;
  padding-left: 18px;
  font-size: var(--fs-12);
}
.project-git-commit-view > button {
  justify-self: start;
}
.git-privacy-state.public {
  color: var(--warning);
  font-weight: var(--fw-strong);
}
.git-privacy-action {
  margin-inline-start: 8px;
}
@media (max-width: 800px) {
.project-git-connection, .project-git-commit, .project-git-transfer { grid-template-columns: minmax(0,1fr); }
.project-git-transfer > *, .project-git-connection > * { grid-column: 1; }
.project-git-transfer > button { width: 100%; }
.project-git-catalog-heading, .project-git-catalog-row { align-items: stretch; flex-direction: column; }
.project-git-catalog-heading button, .project-git-catalog-row button, .project-git-row-actions button { width: 100%; }
.project-git-row-actions { flex-direction: column; }
}
.estate-visual-groups {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.estate-visual-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface-strong);
}
.estate-visual-group > summary {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  cursor: pointer;
}
.estate-visual-group > summary span,
.estate-freshness {
  color: var(--muted);
}
.estate-freshness.stale,
.estate-freshness.unknown {
  color: var(--danger);
}
.estate-visual-group > .estate-service-list {
  padding: 0 12px 12px;
}
.estate-coverage-connections {
  margin: 16px 0 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-12);
  background: var(--surface);
}
.estate-coverage-gaps {
  margin: 14px 0;
  padding: 12px;
  border-left: 3px solid var(--warning);
  background: var(--surface);
}
.estate-coverage-gaps ul { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 20px; }
.estate-coverage-gaps li { padding-left: 2px; overflow-wrap: anywhere; font-size: var(--fs-12); }
.estate-coverage-gaps li strong { margin-right: 6px; }
.estate-coverage-gaps p { margin: 8px 0 0; }
.estate-coverage-connections-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
  font-size: var(--fs-12);
}
.estate-coverage-connections-heading span { color: var(--muted); font-size: var(--fs-12); }
.estate-connection-list { display: grid; gap: 6px; }
.estate-connection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
}
.estate-connection-node {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--surface-strong);
  font-size: var(--fs-12);
}
.estate-connection-node small { color: var(--muted); font-size: var(--fs-12); }
.estate-connection-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: var(--fs-12);
  text-align: center;
}
.estate-connection-arrow { color: var(--accent); font-size: var(--fs-16); }
@media (max-width: 520px) {
.estate-coverage-connections { padding: 10px; }
.estate-connection { grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr); gap: 5px; }
.estate-connection-node { padding: 7px 6px; font-size: var(--fs-12); }
.estate-connection-link { flex-direction: column; gap: 0; font-size: var(--fs-12); line-height: 1.1; }
.estate-connection-arrow { font-size: var(--fs-14); line-height: 1; }
}
@media (max-width: 800px) {
.estate-visual-groups {
    grid-template-columns: minmax(0,1fr);
  }
}
/* Estate: the status line, the alerts by area, then folds. */
.estate-attention { margin: 0 0 var(--sp-5); }
.estate-attention-clear { margin: var(--sp-2) 0; color: var(--muted); font-size: var(--fs-14); }
.estate-alert-groups { margin-top: var(--sp-2); }
.estate-attention-list { margin: 0; padding: 0; list-style: none; }
.estate-attention-list li { padding: var(--sp-3) 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.estate-attention-list li:first-child { border-top: 0; }
.estate-attention-list li > strong { font-size: var(--fs-16); font-weight: var(--fw-regular); }
.estate-attention-list p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.45; }
.estate-attention-list .estate-ack-open { margin: var(--sp-1) 0 0 calc(-1 * var(--sp-3)); }
.estate-fold[open] { padding-bottom: var(--sp-2); }
.estate-folds .fold > :not(summary) { margin-top: var(--sp-2); }
.estate-coverage-body > p { margin: 0 0 var(--sp-2); font-size: var(--fs-14); }
.estate-attention-list .estate-attention-subject { color: var(--text); overflow-wrap: anywhere; }
.estate-ack-open { margin-top: 8px; min-height: 44px; }
.estate-ack-form { margin-top: 8px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.estate-ack-field { display: grid; gap: 4px; min-width: 0; font-size: var(--fs-12); color: var(--muted); }
.estate-ack-field input, .estate-ack-field select { min-height: 44px; width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--bg); color: var(--text); font-size: var(--fs-14); }
.estate-ack-buttons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.estate-ack-buttons button { min-height: 44px; }
.estate-attention-list .estate-ack-status { grid-column: 1 / -1; margin: 0; font-size: var(--fs-12); }
.estate-attention-list .estate-ack-status:empty { display: none; }
.estate-ack-intro { margin: 0 0 6px; color: var(--muted); font-size: var(--fs-12); }
.estate-attention-list .estate-ack-note { color: var(--text); overflow-wrap: anywhere; }
.estate-attention-acknowledged li > button { margin-top: 8px; min-height: 44px; }
/* One problem, one line: the named thing and one fact (and its count when it
   repeats) on the left, Acknowledge on the right; the form, once opened,
   takes the full width under them. */
.estate-attention-list li.estate-alert-row { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: var(--sp-2); align-items: center; }
.estate-alert-text { min-width: 0; margin: 0; font-size: var(--fs-16); line-height: 1.4; overflow-wrap: anywhere; }
.estate-alert-text > strong { font-weight: var(--fw-regular); }
.estate-alert-row.critical .estate-alert-text > strong { font-weight: var(--fw-strong); }
.estate-alert-text > .estate-alert-repeat { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.estate-alert-text > .muted { font-size: var(--fs-14); }
.estate-attention-list .estate-alert-row > .estate-ack-open { margin: 0; }
.estate-alert-row > :is(.estate-ack-form, .estate-ack-status) { grid-column: 1 / -1; }
@media (max-width: 800px) {
.estate-ack-form { grid-template-columns: minmax(0,1fr); }
}
.project-home-deliveries{display:grid;gap:.65rem;margin:0 0 1rem}
.project-home-deliveries>h2{margin:0;font-size: var(--fs-16)}
.project-home-delivery{display:grid;gap:.55rem;border:1px solid var(--line);border-radius:var(--r-12);padding:.8rem;background:var(--surface)}
.project-home-delivery-head{display:flex;gap:.55rem;align-items:baseline;justify-content:space-between}
.project-home-delivery blockquote{margin:0;padding-left:.7rem;border-left:2px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;font-size: var(--fs-12);line-height:1.5}
.project-home-delivery .subtle{justify-self:start}
.project-creative-panel .work-actions a.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 0; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--r-8);
  background: var(--bg); color: var(--text); font: inherit; font-size: var(--fs-12);
  line-height: 1.4; text-align: center; text-decoration: none; overflow-wrap: anywhere;
}
.project-creative-panel .work-actions a.button:hover { background: var(--surface-strong); }
.project-creative-panel .work-actions a.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.project-status-refresh{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}
.project-status-refresh .muted{flex:1 1 200px}
.project-status-refresh button{flex:0 0 auto}
/* Whole-project counts navigate the existing stream; they are not completion claims. */
.project-work-inventory { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-12); }
.project-work-inventory h2 { font-size: var(--fs-16); margin: 0 0 6px; }
.project-work-inventory-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 10px; }
.project-work-inventory-type { min-width: 0; }
.project-work-inventory-type h3 { font-size: var(--fs-14); margin: 6px 0; }
.project-work-inventory-counts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
.project-work-inventory-counts button { display: grid; justify-items: center; min-width: 0; min-height: 48px; padding: 6px 2px; }
.project-work-inventory-counts strong { font-size: var(--fs-16); overflow-wrap: anywhere; }
.project-work-inventory-counts span { font-size: var(--fs-12); }
/* Saved answers stay inline so project filters and open prompts remain in place. */
.project-saved-answer { margin-top: 10px; min-width: 0; }
.project-saved-answer > summary { cursor: pointer; padding-block: 8px; }
.project-saved-answer-content { padding: 8px 0; min-width: 0; }
.project-saved-answer-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.project-saved-answer-content > .link-button { margin-top: 10px; }
.project-feature-ledger { min-width: 0; }
.project-feature-ledger button,.project-feature-ledger select,.project-feature-ledger input,.project-feature-ledger summary { min-height: 44px; }
.project-feature-ledger .link-button { display: inline-flex; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); color: var(--text); text-decoration: none; overflow-wrap: anywhere; max-width: 100%; margin-block: 3px; }
.project-feature-ledger .feature-item-title { border: 0; background: transparent; padding-inline: 0; }
.feature-ledger-actions,.feature-ledger-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-block: 12px; }
.feature-ledger-controls label,.feature-edit-form label { display: grid; gap: 5px; min-width: 0; }
.feature-ledger-controls select { width: 100%; }
.feature-edit-form { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-12); }
.feature-edit-form input,.feature-edit-form textarea,.feature-edit-form select { width: 100%; min-width: 0; }
.feature-item-list,.feature-linked-records,.feature-work-picker ul { list-style: none; display: grid; gap: 10px; padding: 0; }
.feature-item-list>li,.feature-work-picker li { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-12); min-width: 0; overflow-wrap: anywhere; }
.feature-item-title { text-align: start; font-weight: var(--fw-strong); font-size: var(--fs-16); }
.feature-item-detail:not(:empty) { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-12); margin-top: 16px; min-width: 0; overflow-wrap: anywhere; }
.feature-item-detail h3 { margin-top: 0; }
.feature-description { white-space: pre-wrap; }
.feature-changed { display: block; font-weight: var(--fw-strong); }
.feature-item-history { margin-top: 18px; }
.feature-item-history summary { padding-block: 10px; cursor: pointer; }
.feature-item-history small { display: block; }
.feature-link-intent:not(:empty),.feature-work-picker { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-12); margin-block: 12px; }
@media(min-width:900px) {
.feature-item-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:560px) {
.feature-ledger-controls label { flex: 1 1 140px; }
.feature-item-detail { padding: 10px; }
}
.project-history { min-width: 0; }
.project-history-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-block: 12px; }
.project-history-controls label { display: grid; gap: 5px; min-width: 0; flex: 1 1 220px; }
.project-history-controls select { width: 100%; }
.project-history-list { list-style: none; padding: 0; margin: 12px 0; }
.project-history-list > li { border-top: 1px solid var(--line); padding: 12px 0; min-width: 0; overflow-wrap: anywhere; }
.project-history-label,.project-history-source pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.project-history-source pre { max-height: 400px; overflow: auto; font: inherit; }
.project-history-source { margin-bottom: 10px; }
.project-history-source summary { cursor: pointer; }
/* Publish sheet, published-site list and publish-request review. */
.publish-options > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); cursor: pointer; }
.publish-options[open] > summary { color: var(--text); }
.publish-options > summary::after { content: '›'; display: inline-block; margin-left: var(--sp-2); color: var(--muted); font-size: var(--fs-16); }
.publish-options[open] > summary::after { transform: rotate(90deg); }
.publish-options[open] { padding-bottom: var(--sp-2); }
.publish-sheet .dialog-form > .link-button { display: flex; }
.publish-sheet .publish-sites h3 { margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-16); }
.publish-sheet .dialog-form label { margin-bottom: 10px; }
.publish-hint { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; overflow-wrap: anywhere; }
.publish-hint.warning { color: var(--warning); }
.publish-steps { margin: 0; padding-left: 20px; font-size: var(--fs-14); line-height: 1.5; overflow-wrap: anywhere; }
.publish-steps li + li { margin-top: 3px; }
.publish-steps + .publish-hint { margin-top: 10px; }
.publish-review-text { margin: 8px 0; font-size: var(--fs-14); line-height: 1.5; overflow-wrap: anywhere; }
.publish-sheet .error:empty { min-height: 0; margin: 0; }
.publish-site-actions button, .project-publish-sites-head button { min-height: 44px; }
.publish-progress { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); font-size: var(--fs-14); line-height: 1.45; overflow-wrap: anywhere; }
.publish-progress p, .publish-result p { margin: 0; }
.publish-result p + p { margin-top: 6px; }
.publish-result a, .publish-site a { color: var(--accent); font-weight: var(--fw-strong); overflow-wrap: anywhere; }
.publish-events { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: var(--fs-12); }
.publish-events:empty { display: none; }
.publish-action-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.publish-site-list { display: grid; gap: 8px; }
.publish-site-list > p { margin: 0; font-size: var(--fs-14); line-height: 1.45; }
.publish-site { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); overflow-wrap: anywhere; }
.publish-site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.publish-site-head strong { min-width: 0; font-size: var(--fs-14); }
.publish-site p { margin: 5px 0 0; font-size: var(--fs-12); line-height: 1.45; }
.publish-state { flex: 0 0 auto; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.publish-state.internal { border-color: color-mix(in srgb,var(--warning) 45%,var(--line)); color: var(--warning); }
.publish-state.failed { border-color: color-mix(in srgb,var(--danger) 45%,var(--line)); color: var(--danger); }
.publish-site-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.publish-site-actions .danger { color: var(--danger); }
.publish-site-actions button:disabled { opacity: .5; cursor: default; }
.publish-review-facts { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 4px 12px; margin: 12px 0; font-size: var(--fs-14); }
.publish-review-facts dt { color: var(--muted); }
.publish-review-facts dd { margin: 0; overflow-wrap: anywhere; }
.project-publish-sites { display: grid; gap: 8px; margin: 14px 0; }
.project-publish-sites-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-publish-sites-head h2 { margin: 0; font-size: var(--fs-16); }
.project-publish-entry { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.project-publish-entry > div { display: grid; gap: 2px; min-width: 0; }
.project-publish-entry small { color: var(--muted); font-size: var(--fs-12); }
/* Publish update: the site's fixed address replaces the hostname field. */
.publish-address { display: grid; gap: 4px; margin: 14px 0; }
.publish-address-label { color: var(--muted); font-size: var(--fs-12); }
.publish-address-host { font-size: var(--fs-16); overflow-wrap: anywhere; }
.publish-address select { min-height: 44px; margin-top: 0; }
.publish-address .publish-hint { margin: 0; }
.project-control .panel-header h1 { overflow-wrap: anywhere; }
@media (max-width: 480px) {
.publish-site-actions button { flex: 1 1 120px; }
.project-publish-entry { flex-direction: column; align-items: stretch; }
}
/* Native conversation import (native-import.js) */
.native-import-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.native-import-list { display: grid; gap: 0; margin-top: 10px; min-width: 0; }
.native-import-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.native-import-main { min-width: 0; overflow-wrap: anywhere; }
.native-import-main strong { display: block; font-size: var(--fs-14); }
.native-import-main p { margin: 4px 0 0; font-size: var(--fs-12); }
.native-import-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.native-import-imported { border-top: 1px solid var(--line); }
.native-import-imported > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); cursor: pointer; }
.native-import-options { padding: 0; min-width: 0; }
.native-import-options select option { white-space: normal; }
.dialog-form .native-import-check { display: flex; align-items: flex-start; gap: 8px; overflow-wrap: anywhere; }
.dialog-form .native-import-check input { display: inline-block; width: auto; margin: 2px 0 0; flex: none; }
.native-import-notice { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
/* Imported-chat notice: pinned to the top of the message list, because an
   imported chat opens at its newest message. One line until opened. */
.native-import-banner { position: sticky; top: 0; z-index: 3; margin: 0 auto 14px; padding: 0 14px; max-width: 760px; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); box-shadow: 0 6px 12px -10px var(--shade-50); overflow-wrap: anywhere; }
.native-import-banner > details > summary { display: list-item; min-height: var(--tap); padding: 10px 0; box-sizing: border-box; cursor: pointer; font-size: var(--fs-12); }
.native-import-banner > details[open] { max-height: 45vh; overflow-y: auto; padding-bottom: 10px; }
.native-import-banner p { margin: 5px 0 0; font-size: var(--fs-12); }
.native-import-restage { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.native-import-restage .dialog-actions button { min-height: 44px; }
@media (max-width: 800px) {
.native-import-options { padding-left: 0; }
/* Clear of the prompt rail's button at the right edge. */
  .native-import-banner { margin-right: 20px; }
.native-import-banner > details > summary { min-height: 44px; }
}
.native-import-selected { display: grid; gap: 2px; margin: 8px 0 12px; overflow-wrap: anywhere; }
.native-import-selected small { color: var(--muted); font-size: var(--fs-14); }
.native-import-selected strong { font-size: var(--fs-16); line-height: 1.3; }
/* A session open in another Claude Code session or changed minutes ago. */
.native-import-in-use { color: var(--warning); font-weight: var(--fw-strong); }
.native-import-options .native-import-in-use { margin: 0 0 10px; font-size: var(--fs-12); }
.native-import-helpers-toggle { justify-self: start; margin: 12px 0 4px; min-height: 44px; }
.native-import-helpers-heading { margin: 16px 0 2px; font-size: var(--fs-14); }
/* Usage card: meta-sized notes under 14px headlines, so it reads like the
   rest of Settings instead of mixing body paragraphs with meter rows. */
.usage-card p, .limit-card p { margin: 0; }
.usage-card p.muted { font-size: var(--fs-12); }
.limit-card .limit-headline { margin: 0; font-size: var(--fs-14); font-weight: var(--fw-strong); }
.limit-card .limit-headline.limited { color: var(--danger); }
.limit-card .limit-headline.warning { color: var(--warning); }
.limit-window { display: grid; gap: 4px; }
.limit-window .usage-line { font-size: var(--fs-12); color: var(--muted); }
.limit-window .usage-line strong { font-size: var(--fs-14); color: var(--text); }
.limit-window.warning .usage-progress::-webkit-progress-value { background: var(--warning); }
.limit-window.warning .usage-progress::-moz-progress-bar { background: var(--warning); }
.limit-window.danger .usage-progress::-webkit-progress-value { background: var(--danger); }
.limit-window.danger .usage-progress::-moz-progress-bar { background: var(--danger); }
.limit-warning-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-14); }
.limit-warning-toggle, .limit-warning-percent { display: inline-flex; align-items: center; gap: 6px; }
.limit-warning-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.limit-warning-percent input { width: 72px; height: var(--tap); padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); color: var(--text); }
@media (pointer: coarse) {
.limit-warning-percent input { height: 44px; font-size: var(--fs-16); }
}

/* Secondary screens and their dialogs: readable fields and touch-sized controls.
   Min-width:0 lets long names wrap within the phone gutter. */
.panel-view :is(button, summary, a.link-button),
.creative-workflow-dialog :is(button, summary) {
  min-height: var(--tap);
  min-width: var(--tap);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.panel-view :is(input:not([type=checkbox]):not([type=radio]), select, textarea),
#login input, .creative-workflow-dialog :is(input, select, textarea) {
  min-width: 0;
  max-width: 100%;
  min-height: var(--tap);
  font-size: var(--fs-16);
}
.panel-view :is(fieldset, .card, .panel-grid, .panel-actions) { min-width: 0; }
.panel-view :is(h1, h2, h3, h4, p, a, code) { overflow-wrap: anywhere; }
.panel-view :is(.checkbox-label, .limit-warning-toggle),
#modal .native-import-check { min-height: var(--tap); align-items: center; }
.panel-view input:is([type=checkbox], [type=radio]),
.native-import-options input:is([type=checkbox], [type=radio]) {
  min-width: var(--tap); min-height: var(--tap); flex: 0 0 var(--tap);
}
/* "Warn me at" is an on/off switch drawn from tokens; its label is the 44px
   target, so the control itself stays switch-sized. */
.limit-warning-toggle input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 40px; width: 40px; min-width: 40px; height: 24px; min-height: 24px; margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: radial-gradient(circle at 11px 50%, var(--muted) 7px, transparent 7.5px), var(--surface-strong);
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.limit-warning-toggle input[type=checkbox]:checked {
  border-color: var(--accent);
  background: radial-gradient(circle at 27px 50%, var(--on-accent) 7px, transparent 7.5px), var(--accent);
}
.limit-warning-toggle input[type=checkbox]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.project-git-actions .project-git-next > .primary { width: 100%; }
.native-import-check span { min-width: 0; }
.login-card { max-width: 100%; }
.login-card .error:empty { margin: 0; }
@media (max-width: 800px) {
  .panel-view .panel-actions { flex-wrap: wrap; }
  .project-git-panel .compact-details { grid-template-columns: minmax(0,1fr); }
  .project-git-panel .compact-details dd + dt { margin-top: var(--sp-2); }
  .publish-review-facts { grid-template-columns: minmax(0,1fr); }
  .publish-review-facts dd + dt { margin-top: var(--sp-2); }
}

.creative-workflow-dialog { min-width: 0; }
.creative-workflow-dialog fieldset { min-width: 0; margin: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-8); }
.creative-workflow-dialog p { color: var(--muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.native-import-options input[type=checkbox] { appearance: auto; padding: 0; }

.runtime-context { color: var(--muted); font-size: var(--fs-12); }
.runtime-context summary { padding: 8px 0; cursor: pointer; }
.runtime-context.warning summary { color: var(--warning); }
.runtime-context p { margin: 0 0 8px; line-height: 1.45; }
.context-note { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: var(--fs-12); }
.context-note time { margin-left: auto; }

.process-list{display:grid;gap:16px;margin-top:20px}
.process-card{display:grid;gap:8px;border-top:1px solid var(--line);padding-top:16px;min-width:0}
.process-card p{margin:0}
.process-command{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px}
.process-logs{white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;max-height:240px;min-height:64px;padding:12px;border-radius:8px;background:var(--bg);font-size:12px;user-select:text}
.process-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Devices use bounded columns in both phone orientations, and the Hub's
   shared theme, header and buttons. */
.devices-grid { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: 12px; width: 100%; max-width: 760px; margin: 0 auto; padding: 0; }
.device-card { display: grid; grid-template-columns: 8px minmax(0,1fr); grid-auto-flow: column; grid-auto-columns: auto; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.device-card-title { min-width: 0; }
.device-card-title h2 { margin: 0 0 4px; overflow-wrap: anywhere; font-size: var(--fs-16); font-weight: var(--fw-strong); }
.device-card-title p { margin: 0; color: var(--muted); font-size: var(--fs-12); }
.device-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.device-status-dot.online { background: var(--success); }
/* Unnamed buttons in Devices take the shared Secondary look. */
#devices-view button:not([class]),.device-sheet button:not([class]) { min-height: var(--tap); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.hub-desktop-card .device-card-title h2 { margin: 0; }
.device-platform-line { margin: 0 0 10px; }
.device-fold { min-width: 0; padding: 0 12px; border-top: 1px solid var(--line); }
.device-fold > summary,.device-help > summary,.device-fold details > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-size: var(--fs-14); }
.device-fold > summary::before { content: '+'; width: 16px; font-size: var(--fs-20); }
.device-fold[open] > summary::before { content: '−'; }
.device-fold p,.device-help p,.device-info p { font-size: var(--fs-14); line-height: 1.5; overflow-wrap: anywhere; }
.device-download small { display: block; margin-top: 4px; color: var(--muted); }
.device-abilities { margin-top: 2px; }
.device-download-item { border-top: 1px solid var(--line); }
.device-download-item > summary { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; justify-content: center; min-height: 48px; cursor: pointer; font-size: var(--fs-14); text-align: left; }
.device-download-item a.primary { display: inline-flex; align-items: center; text-decoration: none; }
.device-steps { margin: 6px 0 10px; padding-left: 20px; font-size: var(--fs-14); line-height: 1.5; }
.device-steps li { margin-bottom: 4px; overflow-wrap: anywhere; }
.device-menu { display: grid; gap: 8px; }
.device-menu > button { text-align: left; }
.device-menu .danger-button { color: var(--danger); }
.device-settings-form { display: grid; gap: 16px; }
.device-setting-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 16px; font-size: var(--fs-14); }
.device-setting-row small { grid-column: 1 / -1; color: var(--muted); line-height: 1.5; }
.device-setting-row input[type=checkbox] { width: 24px; height: 24px; margin: 10px; accent-color: var(--accent); }
.device-setting-row input[type=number] { width: 90px; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); color: var(--text); }
@media (max-width: 400px) { .device-card { gap: 6px; padding: 10px; } .device-card-title h2 { font-size: var(--fs-14); } }

/* Several accounts per provider: a quiet list, details closed until tapped. */
.settings-accounts .account-group { margin-top: 14px; }
.settings-accounts .account-group h4 { margin: 0 0 4px; font-size: var(--fs-14); }
.provider-account { border-bottom: 1px solid var(--line); }
.provider-account > summary { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 18px; align-items: center; gap: 4px 10px; min-height: 48px; cursor: pointer; list-style: none; }
.provider-account .account-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.provider-account .account-plan { font-size: var(--fs-12); }
.provider-account .account-chevron { display: inline-flex; color: var(--muted); transition: transform 0.15s ease; }
.provider-account .account-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.provider-account[open] .account-chevron { transform: rotate(180deg); }
.provider-account.is-used-up .account-status { color: var(--danger); }
.account-bars { grid-column: 2 / -1; display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 10.5em; align-items: center; gap: 4px 10px; padding-bottom: 6px; font-size: var(--fs-12); color: var(--muted); }
.account-body > .account-bars, .openai-meter .account-bars { grid-column: auto; padding-bottom: 0; }
.account-bar-row { display: contents; }
.account-bar { display: block; height: 4px; border-radius: var(--r-pill); background: var(--surface-strong); overflow: hidden; }
.account-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.account-bar-row.warning .account-bar > span { background: var(--warning); }
.account-bar-row.danger .account-bar > span { background: var(--danger); }
.account-bar-value { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.settings-accounts .account-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.settings-accounts .account-pool { font-size: var(--fs-12); }
.settings-accounts .account-pool.is-used-up { color: var(--danger); }
.settings-accounts .account-chat { margin: 0 0 4px; font-size: var(--fs-12); }
.settings-accounts .openai-meter { margin-top: 10px; }
.settings-accounts .account-group-actions { margin-top: 8px; }
.settings-accounts > .limit-card { margin-top: 14px; }
.account-order { display: grid; gap: 6px; }
.account-order-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: var(--tap, 44px); border-bottom: 1px solid var(--line); }
.account-order-number { color: var(--muted); font-size: var(--fs-12); }
.account-order-name { overflow-wrap: anywhere; }
.account-order-row button { min-width: 44px; min-height: 44px; }
.provider-account > summary::-webkit-details-marker { display: none; }
.provider-account .status { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.provider-account .status.ok { background: var(--success); }
.provider-account .account-name { font-size: var(--fs-14); overflow-wrap: anywhere; }
.provider-account .account-status { font-size: var(--fs-12); text-align: right; }
.provider-account .account-body { display: grid; gap: 8px; padding: 0 0 12px 18px; }
.provider-account .account-body p { margin: 0; font-size: var(--fs-12); }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-used-up, .goal-accounts { margin-top: 12px; }
.account-used-up > summary, .goal-accounts > summary { cursor: pointer; font-size: var(--fs-14); }
.account-used-up .check-row { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .provider-account > summary { grid-template-columns: 8px minmax(0, 1fr) 18px; }
  .provider-account .account-status { grid-column: 2; grid-row: 2; text-align: left; }
  .provider-account .account-chevron { grid-column: 3; grid-row: 1; }
}
.account-used-up > p, .account-used-up > label { margin: 10px 0 0; }
.account-used-up > label:not(.check-row) { display: grid; gap: 6px; }
.provider-account > summary { padding: 4px 0; }

/* Free models card: plain status, one key step, saved keys and three switches. */
.settings-free-models h4 { margin: var(--sp-4) 0 var(--sp-1); font-size: var(--fs-14); }
.free-status { display: grid; gap: var(--sp-2); justify-items: start; }
.free-status p { margin: 0; overflow-wrap: anywhere; }
.free-count { font-size: var(--fs-16); font-weight: var(--fw-strong); }
.free-privacy { margin: var(--sp-2) 0 0; font-size: var(--fs-12); }
.free-keystate { font-size: var(--fs-14); }
.free-keystate.ok { color: var(--success); }
.free-keystate.attention { color: var(--warning); }
.free-key { margin-top: var(--sp-3); border-top: 1px solid var(--line); }
.free-key { display: grid; gap: var(--sp-2); padding-top: var(--sp-2); }
.free-key > p.free-key-saved { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-height: var(--tap); margin: 0; font-size: var(--fs-14); }
.free-key .inline-link { min-height: var(--tap); margin: 0; font-size: var(--fs-14); }
.free-key > p.free-key-message { margin: 0; font-size: var(--fs-12); }
.free-key-form > p { margin: 0 0 var(--sp-3); font-size: var(--fs-12); }
.free-key-form > p.free-key-label { margin: var(--sp-3) 0 var(--sp-1); color: var(--muted); font-weight: var(--fw-strong); }
.free-key-form > .primary { width: 100%; }
.free-suggested { display: grid; gap: var(--sp-2); }
.free-suggested .free-use-saved { width: 100%; text-align: left; overflow-wrap: anywhere; }
.free-source { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-2); }
.free-source .toggle-button { min-height: 48px; }
.free-key-field { display: grid; gap: 6px; margin: var(--sp-3) 0; color: var(--muted); font-size: var(--fs-12); }
.free-key-field input { width: 100%; min-width: 0; min-height: var(--tap); padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); color: var(--text); font-size: var(--fs-16); }
.free-key-more { margin-top: var(--sp-4); }
.grok-start, .grok-open { width: 100%; min-height: var(--tap); margin: var(--sp-3) 0; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.grok-status { color: var(--muted); text-align: center; }
.grok-status:empty { display: none; }
.grok-code-label { text-align: center; margin-bottom: 0; }
.grok-code { margin: var(--sp-3) 0; }
.grok-code[hidden] { display: none; }
.grok-code-text { margin: var(--sp-2) 0 var(--sp-3); font-size: 2rem; font-weight: 600; letter-spacing: 0.12em; text-align: center; font-variant-numeric: tabular-nums; color: var(--text); user-select: all; }
.free-key-more > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); cursor: pointer; }
.free-key-message:empty { display: none; }
.free-accounts:empty, .free-switches:empty { display: none; }
.free-account { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); }
.free-account .status { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.free-account .status.ok { background: var(--success); }
.free-account-text { display: grid; min-width: 0; }
.free-account .account-name { font-size: var(--fs-14); overflow-wrap: anywhere; }
.free-account small { font-size: var(--fs-12); overflow-wrap: anywhere; }
.free-switch { padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); }
.free-switch > span { overflow-wrap: anywhere; }
.free-switch input[type=checkbox] { width: 24px; height: 24px; min-width: 0; min-height: 0; margin: 10px; }

/* Device capabilities, command approvals and activity (docs/device-exec-v1.md). */
.device-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.device-chip { padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-strong); color: var(--text); font-size: var(--fs-12); }
.device-chip.off { color: var(--muted); }
.exec-command { margin: 8px 0; padding: 10px; border-radius: var(--r-8); background: var(--surface-strong); font-size: var(--fs-12); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; user-select: text; }
.exec-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.exec-approval p { margin: 4px 0; font-size: var(--fs-14); overflow-wrap: anywhere; }

/* Estate map: a drawn picture of the estate; tap a room to go inside. */
.estate-map { position: relative; margin: 0 0 var(--sp-5); }
.estate-map .em-pan { overflow-x: auto; overscroll-behavior-x: contain; }
.estate-map .em-svg { display: block; width: calc(min(100%, 450px) * var(--em-zoom, 1)); max-width: none; height: auto; margin: 0 auto; stroke: none; }
.estate-map .em-hit { cursor: pointer; }
.estate-map .em-hit:focus-visible { outline: 2px solid var(--focus); }
.estate-map .em-back { cursor: pointer; }
.estate-map.em-enter .em-pan { animation: em-in .24s ease-out; }
.estate-map.em-leave .em-pan { animation: em-out .24s ease-out; }
@keyframes em-in { from { opacity: 0; transform: scale(.93); } to { opacity: 1; transform: none; } }
@keyframes em-out { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .estate-map.em-enter .em-pan, .estate-map.em-leave .em-pan { animation: none; } }
.em-looking-inside > :not(.estate-map) { display: none; }
.estate-map-links { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: var(--sp-2) var(--sp-4); max-width: 450px; margin: 0 auto var(--sp-5); font-size: var(--fs-14); }
.estate-map-links .estate-problems { color: var(--danger); font-weight: var(--fw-strong); }
.em-sheet-card .em-sheet-alert { margin: var(--sp-2) 0 0; color: var(--danger); font-size: var(--fs-14); line-height: 1.45; overflow-wrap: anywhere; }
.em-sheet-card details.em-sheet-alert summary { cursor: pointer; }
.em-sheet-card details.em-sheet-alert p { color: var(--text); }
.em-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: var(--shade-25); }
.em-sheet-card { box-sizing: border-box; width: min(100%, 560px); max-height: 72dvh; overflow: auto; padding: var(--sp-4) var(--gutter) calc(var(--sp-4) + var(--safe-bottom)); border-radius: var(--r-12) var(--r-12) 0 0; background: var(--surface); box-shadow: 0 -8px 30px var(--shade-20); }
.em-sheet-card h3 { margin: 0; font-size: var(--fs-20); }
.em-sheet-card p { margin: var(--sp-2) 0 0; font-size: var(--fs-14); line-height: 1.45; overflow-wrap: anywhere; }
.em-sheet-card .em-sheet-kind { margin-top: 2px; color: var(--muted); }
.em-sheet-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); flex-wrap: wrap; }
.estate-log { display: grid; gap: var(--sp-3); padding-bottom: var(--sp-3); }
.estate-log-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-14); }
.estate-log-row p { margin: 2px 0 0; color: var(--muted); }
.estate-log-when { flex: 0 0 auto; color: var(--muted); }
.ov-pct { white-space: nowrap; }

/* Docs: the list by kind and one doc as a plain page to read. */
.docs-summary { margin: 0 0 var(--sp-2); font-size: var(--fs-14); }
.docs-group { margin-bottom: var(--sp-3); }
.docs-row { display: flex; align-items: center; gap: var(--sp-2); }
.docs-row > .screen-row { flex: 1; min-width: 0; }
.docs-refresh { flex: none; color: var(--warning); }
.doc-page { max-width: 680px; padding-bottom: var(--sp-6); }
.doc-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; margin: 0; font-size: var(--fs-14); font-weight: var(--fw-strong); }
.doc-state.is-attention > span:first-child { color: var(--warning); }
.doc-state.is-failed > span:first-child { color: var(--danger); }
.doc-state.is-working > span:first-child { color: var(--success); }
.doc-state .muted { font-weight: normal; }
.doc-refresh { padding: 0 2px; min-height: 0; font-weight: var(--fw-strong); color: var(--warning); }
.doc-kind { margin: 2px 0 var(--sp-4); font-size: var(--fs-12); }
.doc-section { margin: 0 0 var(--sp-4); }
.doc-section h2 { margin: 0 0 var(--sp-1); font-size: var(--fs-16, 1rem); }
.doc-section .markdown { font-size: var(--fs-14); line-height: 1.55; }
.doc-section .markdown p { margin: 0 0 var(--sp-2); }
/* Where AI work lives (project block, Estate list, Tidy up) */
.work-folder-path { overflow-wrap: anywhere; font-size: var(--fs-12); }
.work-folders .segmented { margin: 8px 0; flex-wrap: wrap; }
.work-folder > summary strong, .tidy-item h3 { overflow-wrap: anywhere; }
.work-folder-detail p { margin: 4px 0; }
.tidy-item { margin-top: 10px; }
.tidy-item h3 { margin: 0 0 4px; }
.tidy-item p { margin: 4px 0; }
/* Work not in the project yet: the chat's name and state, then its two
   buttons on their own line, never wrapped inside a button. */
.copy-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.copy-row:last-child { border-bottom: 0; }
.copy-row-text { min-width: 0; display: grid; gap: 2px; }
/* A title is read in full: it wraps, never cut short. */
.copy-row-title { overflow-wrap: anywhere; }
.copy-row-state { color: var(--faint); font-size: var(--fs-12); }
.copy-row-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.copy-row-actions button { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
/* The project's chat copies against its space limit, and Make space. */
.copy-usage { display: grid; gap: var(--sp-2); justify-items: start; padding: 8px 0 12px; }
.copy-usage:empty { display: none; }
.copy-usage p { margin: 0; }
.copy-usage .muted { font-size: var(--fs-12); }
.copy-usage-text.is-near { color: var(--warn, inherit); }
.copy-usage button { min-height: 44px; white-space: nowrap; }
.recovery-row button { white-space: nowrap; }
/* Run the app: the Command label above a full-width box; Open is a button. */
.processes-sheet > .action-details { width: 100%; }
.process-command-field { display: grid; gap: 6px; }
.process-command-field textarea { width: 100%; }
.process-actions > a.process-open { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; text-decoration: none; }
.process-actions > a.process-open[hidden] { display: none; }
.process-actions button { white-space: nowrap; }
/* Publish: the name box with the fixed end of the address beside it. */
.publish-name-field { display: grid; gap: 6px; }
.publish-name-input { display: flex; align-items: center; gap: 4px; min-width: 0; }
.publish-name-input input { flex: 1 1 auto; min-width: 0; }
.publish-name-suffix { flex: 0 0 auto; color: var(--muted); white-space: nowrap; }

/* ==========================================================================
   Account-menu screens (settings, accounts, providers, free models, docs,
   routines, devices, models, skills, search and their sheets) in the new
   visual system: hierarchy from type and space, not boxes; one accent;
   titles wrap instead of being cut off; 48 px taps on the phone.
   ========================================================================== */
:is(#settings-view, #docs-view, #automations-view, #devices-view, #models-view, #skills-view) { --more-max: 720px; }
:is(#settings-view, #docs-view, #automations-view, #devices-view, #models-view, #skills-view) .panel-header h1,
.settings-subheader h1 { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
:is(#settings-view, #docs-view, #automations-view, #devices-view, #models-view, #skills-view) > :not(.panel-header) { max-width: var(--more-max); margin-inline: auto; }
:is(#docs-view, #automations-view, #devices-view, #models-view, #skills-view) > :not(.panel-header) { width: 100%; }

/* Settings: one list in groups, each row an icon, a name and one plain line. */
.settings-page { max-width: var(--more-max); margin-inline: auto; gap: var(--sp-5); }
.settings-groups { display: grid; gap: var(--sp-5); }
.settings-group { min-width: 0; display: grid; gap: var(--sp-1); }
.settings-group-title { margin: 0; padding: 0 12px; color: var(--muted); font-size: 13px; font-weight: 550; letter-spacing: 0; }
#settings-view .screen-rows.settings-index { border-top: 0; gap: 0; }
#settings-view .screen-rows > .settings-row { position: relative; min-height: 60px; gap: 14px; padding: 10px 12px; border: 0; border-radius: var(--r-12); }
#settings-view .screen-rows > .settings-row + .settings-row::before { content: ""; position: absolute; left: 64px; right: 12px; top: 0; height: 1px; background: var(--line); }
#settings-view .screen-rows > .settings-row:hover, #settings-view .screen-rows > .settings-row:focus-visible { background: var(--surface-strong); }
#settings-view .screen-rows > .settings-row:hover::before, #settings-view .screen-rows > .settings-row:hover + .settings-row::before { display: none; }
#settings-view .screen-rows > .settings-row:hover .nav-row-label { text-decoration: none; }
#settings-view .settings-row > svg:first-child { flex: 0 0 auto; width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--surface-strong); color: var(--text-2); stroke-width: 1.7; }
#settings-view .settings-row > svg:last-child { width: 18px; height: 18px; color: var(--muted); }
#settings-view .settings-row .nav-row-label { font-size: 15.5px; font-weight: 560; line-height: 1.3; white-space: normal; }
#settings-view .settings-row .nav-row-meta { margin-top: 2px; font-size: 13.5px; line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Cards on these screens become plain sections: a heading, then the content. */
:is(#settings-view, #models-view, #skills-view) .card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
:is(#settings-view, #models-view, #skills-view) .card > h3:first-child,
:is(#models-view) .card > h2:first-child { margin: 0 0 var(--sp-2); font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
#settings-view .settings-grid { gap: var(--sp-4); padding: 0 12px; }
#settings-view .settings-grid > .card + .card { padding-top: var(--sp-4); border-top: 1px solid var(--line); }
#settings-view .settings-grid .muted { margin: var(--sp-1) 0 0; font-size: 13.5px; }
#settings-view .sean-settings label { display: grid; gap: 6px; margin-top: var(--sp-3); font-size: 13.5px; color: var(--muted); }
#settings-view .sean-settings select { min-height: 48px; }
.settings-subpage { padding-top: var(--sp-1); }
.settings-subpage > .card { padding: 0 2px; }

/* Accounts & usage: the accounts as a calm list, the bars thin. */
#settings-view .settings-accounts .account-group { margin-top: var(--sp-5); }
#settings-view .settings-accounts .account-group:first-of-type { margin-top: var(--sp-4); }
#settings-view .settings-accounts .account-group h4 { font-size: 17px; font-weight: 600; }
#settings-view .settings-accounts progress, #settings-view .usage-progress { height: 4px; }
#settings-view .account-bars { grid-template-columns: 3.6em minmax(40px, 1fr) 10.5em; }
.openai-meter .account-bars, #settings-view .openai-meter .account-bars { grid-template-columns: 5.6em minmax(40px, 1fr) 10.5em; }
#settings-view .account-bar-value { white-space: normal; }
#settings-view .settings-providers .settings-actions { margin-top: var(--sp-4); }
.credential-load-failed { margin: var(--sp-2) 0 var(--sp-3); }
/* A used-up account comes back by itself: amber, not the red kept for broken things. */
#settings-view .provider-account.is-used-up .account-status, #settings-view .settings-accounts .account-pool.is-used-up, #settings-view .account-bar-row.danger { color: var(--need); }
#settings-view .account-bar-row.danger .account-bar > span { background: var(--need); }
#settings-view .settings-free-models > .free-status:empty + .free-key { margin-top: 0; padding-top: 0; border-top: 0; }

/* AI providers and saved passwords: rows, not boxes. */
#settings-view .settings-providers .provider-card, .credential-list .provider-card { padding: 14px 0; border: 0; border-radius: 0; background: transparent; border-bottom: 1px solid var(--line); }
#settings-view .settings-providers .provider-card:last-of-type { border-bottom: 0; }
#settings-view .settings-providers h4, .credential-list h4 { font-size: 15.5px; font-weight: 560; }

/* Sheets behind the account menu. */
.help-guide section { padding: var(--sp-4) 0; }
.help-guide section:first-child { border-top: 0; padding-top: var(--sp-1); }
.help-guide h3 { font-size: 15.5px; font-weight: 600; }
.help-guide p { font-size: 14.5px; }
.choice-rows { gap: 0; }
.choice-row { min-height: 56px; border: 0; border-radius: 0; background: transparent; font-size: 15.5px; }
.choice-row + .choice-row { box-shadow: inset 0 1px 0 var(--line); }
.choice-row:hover { background: var(--surface-strong); }
.choice-row[aria-pressed="true"] { border: 0; border-radius: var(--r-12); box-shadow: none; background: var(--surface-strong); font-weight: 560; }
.choice-row[aria-pressed="true"] + .choice-row { box-shadow: none; }
.choice-row > svg { width: 20px; height: 20px; color: var(--accent); }
.dialog-form > .screen-rows { border-top: 0; }
.dialog-form > .screen-rows > .more-item { gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.dialog-form > .screen-rows > .more-item:first-child { border-top: 0; }
.more-item > strong { font-size: 15.5px; font-weight: 560; overflow-wrap: anywhere; }
.more-item > small { line-height: 1.4; overflow-wrap: anywhere; }
.more-item .dialog-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 2px; }

/* Search: results as a list, the group names quiet. */
.search-results .nav-group-title { padding: var(--sp-4) 2px var(--sp-1); font-size: 13px; font-weight: 550; }
.search-result { min-height: 56px; padding: 10px 2px; border-radius: 0; border-bottom: 0; }
.search-result + .search-result { border-top: 1px solid var(--line); }
.search-result:hover { background: var(--surface-strong); }
.search-result-title { font-size: 15px; font-weight: 560; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Docs: one list per group, refresh quiet beside each row. */
#docs-view .docs-summary { margin-block: 0 var(--sp-3); font-size: 13.5px; }
#docs-view .docs-group { margin-top: var(--sp-4); }
#docs-view .docs-group .nav-group-title { padding: 0 0 var(--sp-1); font-size: 13px; font-weight: 550; }
#docs-view .docs-group > :is(.docs-row, .screen-row) + :is(.docs-row, .screen-row) { border-top: 1px solid var(--line); }
#docs-view .docs-group .screen-row { min-height: 56px; padding: 8px 0; border-radius: 0; }
#docs-view .docs-group .nav-row-label { font-weight: 560; white-space: normal; }
#docs-view .docs-group .nav-row-meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#docs-view .docs-refresh { min-height: 48px; color: var(--muted); font-weight: 500; }
#docs-view .docs-refresh:hover { color: var(--text); }
#docs-view .docs-search { margin: 0 0 var(--sp-1); }
#docs-view .docs-group > summary { display: flex; align-items: baseline; gap: var(--sp-2); min-height: 44px; padding: 10px 0; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line); }
#docs-view .docs-group > summary::-webkit-details-marker { display: none; }
#docs-view .docs-group > summary::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 1.5px solid var(--ink3); border-bottom: 1.5px solid var(--ink3); transform: translateY(-2px) rotate(45deg); flex: none; }
#docs-view .docs-group[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
#docs-view .docs-group-title { font-size: 15px; font-weight: 560; }
#docs-view .docs-group-count { flex: 1; font-size: 13.5px; color: var(--ink3); }
#docs-view .docs-group[hidden], #docs-view .docs-group .hz-plain[hidden] { display: none; }
#docs-view .docs-group { margin-top: 0; }

/* Routines and devices: plain rows with a line between them. */
#automations-view .automation-card { border: 0; border-radius: 0; background: transparent; padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
#automations-view .automation-card:first-child { border-top: 0; }
#automations-view .automation-card.enabled { border-left: 0; }
#automations-view .automation-heading h3 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
#devices-view .device-card { padding: 14px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#devices-view .device-card + .device-card { border-top: 1px solid var(--line); }
#devices-view .device-card-title h2 { font-size: 16px; font-weight: 600; }
#devices-view .device-fold { padding: 0; }
#devices-view .device-fold > summary { min-height: 52px; font-size: 15px; }

/* Skills and models. */
#skills-view .skill-tools { flex-wrap: wrap; }
#skills-view .skill-search { height: 48px; border-radius: var(--r-12); }
#skills-view .skill-tools select, #skills-view .skill-tools button { min-height: 48px; }
#skills-view .card .nav-row-label { white-space: normal; }
#models-view .benchmark-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
#models-view .benchmark-layout > .card + .card { padding-top: var(--sp-5); border-top: 1px solid var(--line); }
#models-view .benchmark-setup h2, #models-view .benchmark-saved h2 { font-size: 17px; font-weight: 600; }
#models-view .benchmark-layout button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

@media (max-width: 800px) {
  :is(#settings-view, #docs-view, #automations-view, #devices-view, #models-view, #skills-view) button:not(.icon-button) { min-height: 48px; }
  #settings-view .screen-rows > .settings-row { padding-inline: 8px; }
  #settings-view .screen-rows > .settings-row + .settings-row::before { left: 60px; right: 8px; }
  .settings-group-title { padding-inline: 8px; }
  #settings-view .settings-grid { padding-inline: 8px; }
  #skills-view .skill-tools .skill-search { flex-basis: 100%; }
}

/* Waiting for you: plain title, a quiet "where" line, one or two plain
   sentences, then the answer. Technical steps live behind Details. */
.action-card h4 + .action-meta { margin-bottom: var(--sp-1); }
.action-card .action-summary { margin: var(--sp-1) 0 0; color: var(--text-2); font-size: var(--fs-14); line-height: 1.5; }
.action-card .action-details > .action-instructions:first-of-type { margin-top: var(--sp-1); }
.action-card .action-decline { margin-top: var(--sp-2); min-height: var(--tap); }
.action-card.is-later { opacity: .6; }
/* Publish on a site that goes live from its own server: one plain line. */
.project-publish-note { margin: 0; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-14); line-height: 1.45; }

/* ==========================================================================
   Settings, search and the Hub's other screens inside the zoom shell.
   The top bar names the level and carries Back, so each screen opens on one
   light sentence (Horizon's sky) with its one action beside it; rows are
   plain (an icon, the words, what it is set to now) with no boxes or tiles.
   ========================================================================== */
.shell-head { display: flex; align-items: flex-end; gap: 12px; padding: 6px 0 22px; }
.shell-head .hz-sentence { flex: 1 1 auto; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.shell-head-act { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; padding-bottom: 4px; }
.shell-head-act button { min-height: 44px; }
.zoom-shell :is(#settings-view, #automations-view, #devices-view, #docs-view, #models-view, #skills-view, #changes-view, #project-view) { background: var(--sky); color: var(--ink); }
.zoom-shell :is(#settings-view, #automations-view, #devices-view, #docs-view, #models-view, #skills-view, #changes-view) > .shell-head { max-width: var(--col-max); margin-inline: auto; width: 100%; }
.zoom-shell #settings-view .settings-page { max-width: var(--col-max); gap: var(--sp-4); }
.shell-rows { display: grid; gap: 18px; }
.shell-group .hz-shead { margin: 0 0 2px; }
.shell-group .hz-plain { min-height: 58px; }
.shell-group .hz-plain .hz-meta { max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.shell-group .hz-plain:last-child { border-bottom: 0; }
/* Older Settings pages (Accounts, Advanced and its pages): soft blocks, no outlines, no icon tiles. */
.zoom-shell :is(#settings-view, #automations-view, #devices-view, #docs-view, #models-view, #skills-view, #changes-view, #project-view) .card {
  border: 0; border-radius: var(--r-block); background: var(--surface); box-shadow: none;
}
.zoom-shell #settings-view .settings-group-title { padding-inline: 0; color: var(--ink3); font-size: var(--fs-14); font-weight: var(--fw-regular); }
.zoom-shell #settings-view .screen-rows > .settings-row { padding-inline: 0; border-radius: 0; }
.zoom-shell #settings-view .screen-rows > .settings-row + .settings-row::before { left: 36px; right: 0; background: var(--hair2); }
.zoom-shell #settings-view .settings-row > svg:first-child { width: 22px; height: 22px; padding: 0; border-radius: 0; background: none; color: var(--ink2); stroke-width: 1.6; }
.zoom-shell #settings-view .settings-row .nav-row-label { font-size: var(--fs-16); font-weight: var(--fw-regular); }
.zoom-shell #settings-view .settings-row .nav-row-meta { color: var(--ink3); }
.zoom-shell :is(#settings-view, #docs-view, #automations-view, #devices-view, #models-view, #skills-view, #changes-view, #project-view) .screen-rows { border-top: 0; }
.zoom-shell :is(#settings-view, #docs-view, #automations-view, #devices-view, #models-view, #skills-view, #changes-view, #project-view) .screen-rows > .nav-row { border-bottom-color: var(--hair2); }
.zoom-shell :is(#docs-view, #changes-view, #project-view) .nav-group-title { color: var(--ink3); font-weight: var(--fw-regular); }

/* Sheets drawn from the shared pieces: the handle only, no title bar or close
   button on a phone (swipe down, tap outside or Back closes them). */
dialog#modal:has(.hz-sheet-host) .dialog-close { display: none; }
@media (max-width: 800px) {
  dialog#modal:has(.hz-sheet-host) .sheet-bar { min-height: 22px; padding-top: 4px; padding-bottom: 0; }
  dialog#modal:has(.hz-sheet-host) .sheet-handle { width: 38px; height: 5px; margin-left: -19px; top: 9px; background: var(--hair); }
}

/* Search everywhere: one soft field, then plain results with what each is. */
.hs-field {
  display: flex; align-items: center; gap: 10px; height: 52px; margin: 6px 0 10px; padding: 0 18px;
  border-radius: 26px; background: var(--sea); color: var(--ink3); cursor: text;
}
.hs-field svg { width: 21px; height: 21px; flex: none; stroke-width: 1.7; }
.hs-field .hs-input {
  flex: 1; min-width: 0; height: 100%; min-height: 0 !important; padding: 0 !important; border: 0 !important;
  background: none !important; box-shadow: none !important; outline: none; font-size: 17px; color: var(--ink);
}
.hs-field .hs-input::placeholder { color: var(--ink3); }
.hs-field .hs-input::-webkit-search-cancel-button { display: none; }
.hs-sheet .hz-shead { margin: 12px 0 0; }
.hs-status { margin: 10px 0; color: var(--ink3); font-size: var(--fs-15); }
.hs-status:empty { display: none; }
.hs-res {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--hair2);
  background: none; color: var(--ink); text-align: left;
}
.hs-res > svg { flex: none; width: 21px; height: 21px; margin-top: 2px; color: var(--ink2); stroke-width: 1.6; }
.hs-res .hs-x { flex: 1; min-width: 0; }
.hs-res b { display: block; font-size: 17px; font-weight: var(--fw-regular); line-height: 1.32; overflow-wrap: anywhere; }
.hs-res small { display: block; margin-top: 3px; font-size: var(--fs-14); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-res:active { background: var(--hair2); }
dialog#modal:has(.hs-host) { height: 88dvh; }
@media (min-width: 1100px) {
  /* On a desktop search opens under the search field, top right. */
  dialog#modal:has(.hs-host):not(.is-wide) { width: 560px; height: min(640px, calc(100dvh - 120px)); margin: 76px 70px auto auto; }
}
.zoom-shell .settings-accounts .account-group-head { flex-wrap: wrap; }
.zoom-shell .settings-accounts .account-group-head h4 { flex: none; }

/* Every sheet title in the zoom shell is one light line, as Horizon's are. */
.zoom-shell ~ dialog#modal .sheet-bar-title > h2 { font-size: var(--fs-24); font-weight: var(--fw-light); letter-spacing: -.01em; }
.zoom-shell ~ dialog#modal .sheet-bar { background: var(--surface); }
/* Help: one row per question, the answer underneath. */
.shell-help .hz-plain { align-items: flex-start; padding: 14px 0; }
.shell-help .hz-plain .hz-x { font-size: var(--fs-16); }
.shell-help .hz-plain .hz-x small { margin-top: 3px; font-size: var(--fs-14); line-height: 1.4; }
.shell-help .hz-plain .hz-chev { margin-top: 3px; }
/* Chats and projects: the same soft field as search, quiet group names, plain rows. */
.zoom-shell ~ dialog#modal .switcher-sheet .sheet-search {
  height: 52px; min-height: 52px; padding: 0 18px; border: 0; border-radius: 26px; background: var(--sea); color: var(--ink); font-size: 17px; box-shadow: none;
}
.zoom-shell ~ dialog#modal .switcher-sheet .nav-group-title { padding: 16px 0 2px; color: var(--ink3); font-size: var(--fs-14); font-weight: var(--fw-regular); }
.zoom-shell ~ dialog#modal .switcher-sheet .nav-row { border-radius: 0; padding-inline: 0; border-bottom: 1px solid var(--hair2); }
.zoom-shell ~ dialog#modal .switcher-sheet .nav-row > svg { color: var(--ink2); stroke-width: 1.6; }
.zoom-shell ~ dialog#modal .switcher-sheet .nav-split { border-bottom: 1px solid var(--hair2); }
.zoom-shell ~ dialog#modal .switcher-sheet .nav-split .nav-row { border-bottom: 0; }
.zoom-shell ~ dialog#modal .nav-row-label { color: var(--ink); }
.zoom-shell ~ dialog#modal .nav-row-meta { color: var(--ink3); }
/* All projects: a colour each, the name, what it is doing now. */
.zoom-shell #projects-view > * { max-width: var(--col-max); margin-inline: auto; width: 100%; }
.shell-prj { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--hair2); background: none; color: var(--ink); text-align: left; }
.shell-prj > i { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.shell-prj-x { flex: 1; min-width: 0; font-size: var(--fs-16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The status ('2 working · 1 needs you') is a few words: it keeps its own width on one
   line and the name gives way (wraps), so the status is never cut at 390 px. */
.shell-prj small { flex: none; font-size: var(--fs-14); color: var(--ink3); white-space: nowrap; }
.shell-prj small.is-live { color: var(--live); }
.shell-prj small.is-need { color: var(--ink2); }
.shell-prj:active { background: var(--hair2); }

/* ==========================================================================
   Devices, Routines, Docs and Import chats in the Settings look: plain rows
   with a quiet detail, quiet text actions, no boxes, pills or outlines.
   ========================================================================== */
/* Devices: a row's words open its options; View or Start sits on the right. */
.zoom-shell #devices-view .dv-page { padding-bottom: 32px; }
.zoom-shell .dv-row { gap: 12px; padding: 0; }
.zoom-shell .dv-row > .dv-open {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 0;
  border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: var(--fs-16); text-align: left; cursor: pointer;
}
.zoom-shell .dv-row > .dv-open > svg { flex: none; width: 20px; height: 20px; color: var(--ink2); }
.zoom-shell .dv-row .hz-x { overflow-wrap: anywhere; }
.zoom-shell .dv-row .hz-x small { margin-top: 2px; line-height: 1.4; }
.zoom-shell .dv-row .is-live { color: var(--live); }
.zoom-shell .dv-row > .st-act { flex: none; }
.zoom-shell .dv-row > .dv-chev { flex: none; display: grid; place-items: center; width: 24px; min-height: 44px; padding: 0; border: 0; background: none; }
.zoom-shell ~ dialog#modal a.st-act { text-decoration: none; }
.zoom-shell ~ dialog#modal .dv-form { display: grid; gap: 4px; margin: 4px 0 8px; }
.zoom-shell ~ dialog#modal .dv-label { display: grid; gap: 6px; padding: 12px 0 4px; font-size: var(--fs-14); color: var(--ink3); }
.zoom-shell ~ dialog#modal .dv-label small { font-size: var(--fs-13); line-height: 1.4; color: var(--ink3); }
.zoom-shell ~ dialog#modal .dv-here { margin-bottom: 6px; }
.zoom-shell ~ dialog#modal .dv-pair-result:not(:empty) { margin: 10px 0 6px; }
.zoom-shell ~ dialog#modal .device-pair-code {
  display: block; margin: 8px 0 2px; padding: 14px 16px; border: 0; border-radius: var(--r-block); background: var(--sea);
  color: var(--ink); font-size: var(--fs-20); letter-spacing: .06em; overflow-wrap: anywhere;
}
.zoom-shell ~ dialog#modal .dv-apps { margin-bottom: 8px; }
.zoom-shell ~ dialog#modal .dv-fold { border-bottom: 1px solid var(--hair2); }
.zoom-shell ~ dialog#modal .dv-fold[open] { padding-bottom: 12px; }
.zoom-shell ~ dialog#modal .dv-fold > summary { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 0; list-style: none; cursor: pointer; color: var(--ink); font-size: var(--fs-16); }
.zoom-shell ~ dialog#modal .dv-fold > summary::-webkit-details-marker { display: none; }
.zoom-shell ~ dialog#modal .dv-fold > summary .hz-x { flex: 1; min-width: 0; }
.zoom-shell ~ dialog#modal .dv-fold > summary small { display: block; font-size: var(--fs-13); color: var(--ink3); }
.zoom-shell ~ dialog#modal .dv-fold > summary .hz-chev { transition: transform .25s var(--ease); }
.zoom-shell ~ dialog#modal .dv-fold[open] > summary .hz-chev { transform: rotate(90deg); }
.zoom-shell ~ dialog#modal .dv-sum { font-size: var(--fs-12); overflow-wrap: anywhere; }
.zoom-shell ~ dialog#modal .device-steps { color: var(--ink2); }
.zoom-shell ~ dialog#modal .dv-kinds .hz-plain .hz-meta { max-width: 62%; white-space: normal; text-align: right; }
/* A device's options sheet: plain rows instead of outlined buttons. */
.zoom-shell ~ dialog#modal .device-sheet .device-menu { gap: 0; }
.zoom-shell ~ dialog#modal .device-sheet .device-menu > button {
  width: 100%; min-height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--hair2); border-radius: 0;
  background: none; box-shadow: none; color: var(--ink); font-size: var(--fs-16); text-align: left;
}
.zoom-shell ~ dialog#modal .device-sheet .device-menu > button:last-child { border-bottom: 0; }
.zoom-shell ~ dialog#modal .device-sheet .device-menu > .danger-button { color: var(--ink2); }
.zoom-shell ~ dialog#modal .device-sheet .device-info p { color: var(--ink2); }
/* Routines: one row each (name, where and when, how it last went); the rest is in its sheet. */
.zoom-shell #automations-view .automation-list { display: block; gap: 0; padding-bottom: 32px; }
.zoom-shell .rt-row { min-height: 64px; }
.zoom-shell .rt-row .hz-x { overflow-wrap: anywhere; }
.zoom-shell .rt-row .hz-x small { margin-top: 2px; line-height: 1.4; }
.zoom-shell .rt-row .is-live { color: var(--live); }
.zoom-shell .rt-row .is-failed { color: var(--ink2); }
.zoom-shell .rt-row.is-off .hz-x { color: var(--ink2); }
.zoom-shell ~ dialog#modal .rt-task { white-space: pre-wrap; overflow-wrap: anywhere; }
.zoom-shell ~ dialog#modal .hz-sheet .hz-shead + .st-text { margin-top: 4px; }
/* Docs: the counts line, one quiet action, quiet group names, plain rows. Status words stay ink3. */
.zoom-shell #docs-view .st-page { padding-bottom: 32px; }
.zoom-shell #docs-view .docs-summary { margin: -8px 0 12px; font-size: var(--fs-16); }
.zoom-shell #docs-view .docs-acts { padding-top: 0; margin: -6px 0 14px; }
.zoom-shell #docs-view .docs-acts:empty { display: none; }
.zoom-shell #docs-view .docs-refresh { min-height: 44px; color: var(--live); font-weight: var(--fw-regular); }
.zoom-shell #docs-view .docs-group { margin: 0; }
.zoom-shell #docs-view .docs-group .hz-plain .hz-x { overflow-wrap: anywhere; }
.zoom-shell #docs-view .docs-group .hz-plain .hz-x small { margin-top: 2px; line-height: 1.4; }
.zoom-shell #docs-view .doc-state { font-weight: var(--fw-regular); color: var(--ink3); }
.zoom-shell #docs-view .doc-state > span:first-child,
.zoom-shell #docs-view .doc-state:is(.is-attention, .is-failed) > span:first-child { color: var(--ink3); }
.zoom-shell #docs-view .doc-state.is-working > span:first-child { color: var(--live); }
.zoom-shell #docs-view .doc-state .doc-refresh { color: var(--live); }
/* Import chats: plain rows; tapping a row imports it, and the quiet word on the right says so. */
.zoom-shell ~ dialog#modal .native-import-status { margin: 0 0 2px; }
.zoom-shell ~ dialog#modal .native-import-toolbar { justify-content: flex-start; padding-top: 0; }
.zoom-shell ~ dialog#modal .native-import-list { margin-top: 4px; }
.zoom-shell ~ dialog#modal .native-import-row {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--hair2);
  border-radius: 0; background: none; box-shadow: none; color: var(--ink); font: inherit; font-size: var(--fs-16); text-align: left;
}
.zoom-shell ~ dialog#modal .native-import-row .hz-x { overflow-wrap: anywhere; }
.zoom-shell ~ dialog#modal .native-import-row .hz-x small { margin-top: 2px; line-height: 1.4; }
.zoom-shell ~ dialog#modal .native-import-row .is-failed { color: var(--ink2); }
.zoom-shell ~ dialog#modal .native-import-in-use { color: var(--ink3); font-weight: var(--fw-regular); }
.zoom-shell ~ dialog#modal .native-import-do { flex: none; color: var(--live); font-size: var(--fs-15); }
.zoom-shell ~ dialog#modal .native-import-imported { border: 0; }
.zoom-shell ~ dialog#modal .native-import-imported > summary {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--hair2);
  list-style: none; color: var(--ink); font-size: var(--fs-16); cursor: pointer;
}
.zoom-shell ~ dialog#modal .native-import-imported > summary::-webkit-details-marker { display: none; }
.zoom-shell ~ dialog#modal .native-import-imported > summary .hz-x { flex: 1; min-width: 0; }
.zoom-shell ~ dialog#modal .native-import-imported > summary .hz-meta { color: var(--ink3); font-size: var(--fs-14); }
.zoom-shell ~ dialog#modal .native-import-imported > summary .hz-chev { transition: transform .25s var(--ease); }
.zoom-shell ~ dialog#modal .native-import-imported[open] > summary .hz-chev { transform: rotate(90deg); }
.zoom-shell ~ dialog#modal .native-import-helpers-toggle { justify-self: start; margin: 10px 0 4px; }
.zoom-shell ~ dialog#modal .native-import-helpers-heading { margin: 18px 0 2px; }
.zoom-shell ~ dialog#modal .native-import-large-note { margin: 6px 0 2px; font-size: var(--fs-14); color: var(--ink3); }
.zoom-shell ~ dialog#modal .native-import-notice { padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink2); }
/* Free models: no box; the count is a plain sentence, the key a soft field, the switches plain rows. */
.zoom-shell #settings-view .settings-free-models { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.zoom-shell #settings-view .settings-free-models .free-count { font-size: var(--fs-17); font-weight: var(--fw-regular); color: var(--ink); }
.zoom-shell #settings-view .settings-free-models .free-privacy { margin: 10px 0 18px; font-size: var(--fs-14); color: var(--ink3); }
.zoom-shell #settings-view .settings-free-models .free-key { border-top: 0; }
.zoom-shell #settings-view .settings-free-models .free-key-form > p.free-key-label { color: var(--ink3); font-weight: var(--fw-regular); font-size: var(--fs-14); }
.zoom-shell #settings-view .settings-free-models .free-key-field { color: var(--ink3); font-size: var(--fs-14); }
.zoom-shell #settings-view .settings-free-models .free-key-field input {
  height: 50px; min-height: 50px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--sea); color: var(--ink); box-shadow: none; outline: none;
}
.zoom-shell #settings-view .settings-free-models .free-key-field input:focus-visible { box-shadow: 0 0 0 2px var(--live-soft); }
.zoom-shell #settings-view .settings-free-models .free-source { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-btn); background: var(--sea); }
.zoom-shell #settings-view .settings-free-models .free-source .toggle-button {
  flex: 1 1 0; min-height: 44px; border: 0; border-radius: 20px; background: none; box-shadow: none; color: var(--ink2); font-size: var(--fs-15);
}
.zoom-shell #settings-view .settings-free-models .free-source .toggle-button[aria-pressed="true"] { background: var(--raise); color: var(--ink); box-shadow: var(--shadow-soft); }
.zoom-shell #settings-view .settings-free-models .inline-link { color: var(--live); text-decoration: none; }
.zoom-shell #settings-view .settings-free-models .free-suggested .free-use-saved { width: auto; text-align: left; }
.zoom-shell #settings-view .settings-free-models .free-account { border-bottom-color: var(--hair2); }
.zoom-shell #settings-view .settings-free-models .free-account .status.ok { background: var(--live); }
.zoom-shell #settings-view .settings-free-models .free-switches { margin-top: 6px; }
.zoom-shell #settings-view .settings-free-models .free-switches .hz-shead { margin: 0 0 2px; }
.zoom-shell #settings-view .settings-free-models .free-switches .st-switch-row:last-child { border-bottom: 0; }
/* end of the Devices, Routines, Docs and Import chats block */

/* ==========================================================================
   Settings and its pages, drawn the way the prototype's settings sheet is:
   a sentence, one plain line, quiet group names, plain rows that say what
   each is set to now, and quiet text actions. No boxes, pills or outlines.
   ========================================================================== */
.st-page { display: block; width: 100%; max-width: var(--col-max); margin-inline: auto; }
.st-line { margin: -8px 0 20px; max-width: 34em; font-size: var(--fs-16); line-height: 1.45; color: var(--ink2); }
.st-line.is-sheet { margin: -6px 0 14px; font-size: var(--fs-15); color: var(--ink3); overflow-wrap: anywhere; }
.st-text { margin: 0 0 12px; font-size: var(--fs-16); line-height: 1.5; color: var(--ink); }
.st-note { margin: 6px 0 0; font-size: var(--fs-14); line-height: 1.45; color: var(--ink3); }
.st-group { margin: 0 0 26px; }
.st-group.is-single { margin-bottom: 8px; }
.st-head {
  display: flex; align-items: baseline; gap: 12px; width: 100%; min-height: 48px; padding: 10px 0 8px;
  border: 0; border-bottom: 1px solid var(--hair2); background: none; color: var(--ink); text-align: left;
}
.st-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-20); font-weight: var(--fw-regular); letter-spacing: -.005em; color: var(--ink); }
.st-head > span { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-14); color: var(--ink3); }
.st-head .hz-chev { align-self: center; }
.st-group .hz-plain { min-height: 60px; }
.st-group .hz-plain .hz-meta { max-width: 52%; overflow: hidden; text-overflow: ellipsis; }
.st-acct .hz-x { font-size: var(--fs-16); overflow-wrap: anywhere; }
.st-acct.is-off .hz-meta { color: var(--ink3); }
.st-acct .is-live, .st-switch-row .is-live { color: var(--live); }
.st-acts { display: flex; flex-wrap: wrap; gap: 0 24px; padding-top: 6px; }
.st-acts.is-sheet { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--hair2); }
.st-act {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--live); font: inherit; font-size: var(--fs-15); cursor: pointer;
}
.st-act svg { width: 18px; height: 18px; stroke-width: 1.8; }
.st-act.is-danger { color: var(--ink2); }
.st-act:disabled { opacity: .5; cursor: default; }
.st-act.is-main {
  min-height: 46px; padding: 0 22px; border-radius: var(--r-btn); background: var(--btn); color: var(--btn-ink); font-weight: var(--fw-strong);
}
/* A plain row with a switch on the right; the line under the words says what the switch does now. */
.st-switch-row { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--hair2); cursor: pointer; }
.st-switch-row .hz-x { flex: 1 1 auto; min-width: 0; font-size: var(--fs-16); color: var(--ink); }
.st-switch-row .hz-x small { display: block; margin-top: 3px; font-size: var(--fs-14); line-height: 1.4; color: var(--ink3); }
.st-switch {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 48px; height: 28px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 14px; background: var(--hair); cursor: pointer; transition: background .25s;
}
.st-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--raise); box-shadow: 0 1px 3px var(--shade); transition: transform .25s var(--ease);
}
.st-switch:checked { background: var(--live); }
.st-switch:checked::after { transform: translateX(20px); }
.st-switch:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.st-switch:disabled { opacity: .55; cursor: default; }
/* An account's allowances: what is left, when it resets, a thin bar. */
.st-bars { display: grid; gap: 16px; margin: 8px 0 14px; }
.st-bar { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px 12px; }
.st-bar b { font-size: var(--fs-15); font-weight: var(--fw-regular); color: var(--ink); }
.st-bar > span { justify-self: end; font-size: var(--fs-14); color: var(--ink3); font-variant-numeric: tabular-nums; text-align: right; }
.st-bar .hz-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; }
/* Typed values (quiet hours, names): the same soft field as search, no outline. */
.st-field {
  width: 100%; height: 50px; min-height: 50px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--sea);
  color: var(--ink); font: inherit; font-size: var(--fs-17); font-variant-numeric: tabular-nums; box-shadow: none; outline: none;
}
.st-field:focus-visible { box-shadow: 0 0 0 2px var(--live-soft); }
.st-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 4px; }
.st-times label { display: grid; gap: 6px; font-size: var(--fs-14); color: var(--ink3); }
.st-say { min-height: 20px; margin: 6px 0 0; font-size: var(--fs-14); color: var(--ink3); }
.st-say:empty { display: none; }
.st-form { display: grid; gap: 10px; margin: 4px 0 6px; }
.st-form .hz-seg { margin: 0; }
.st-label { display: grid; gap: 6px; margin: 4px 0 8px; font-size: var(--fs-14); color: var(--ink3); }
.st-cred .hz-x { overflow-wrap: anywhere; }
.st-cred .st-act { flex: none; }
.st-cred .hz-x small { display: block; margin-top: 2px; font-size: var(--fs-13); line-height: 1.4; color: var(--ink3); }
.st-provider { align-items: flex-start; }
.st-provider .hz-x .st-acts { padding-top: 0; }
.st-provider .provider-sign-in { margin: 6px 0 0; white-space: pre-wrap; font-size: var(--fs-14); }
.st-notify .st-acts:empty { display: none; }
.st-bin > svg { align-self: flex-start; margin-top: 2px; }
.st-bin .hz-x small { margin: 2px 0 0; }
.st-bin .hz-x small + small { margin-bottom: 2px; }
.st-bin .st-acts { justify-content: space-between; max-width: 22em; }
.st-bin .st-act.is-danger, .st-bin-acts .st-act.is-danger { color: var(--danger); }
.st-bin-kept { margin: 0 0 18px; }
.st-bin-kept > summary { cursor: pointer; padding: 10px 0; font-size: var(--fs-15); color: var(--ink2); }
.st-bin-kept .st-note { margin: 0 0 8px; }
.st-notify .hz-plain { margin-top: 4px; }
:is(.st-page, .st-notify, .hz-sheet) [hidden] { display: none !important; }
dialog#modal .hz-sheet .st-field { margin: 0 0 10px; }
dialog#modal .hz-sheet .st-times .st-field, dialog#modal .hz-sheet .st-form .st-field, dialog#modal .hz-sheet .st-label .st-field { margin: 0; }
.st-order .hz-plain { gap: 18px; }
.st-order .st-act { min-width: 44px; justify-content: center; }
/* The switch wins over the older 44px checkbox rules (the row is the tap target). */
:is(.panel-view, dialog#modal, .zoom-shell) input.st-switch[type=checkbox] {
  flex: 0 0 48px; width: 48px; min-width: 48px; max-width: 48px; height: 28px; min-height: 28px; margin: 0; padding: 0;
  border: 0; border-radius: 14px; background: var(--hair); box-shadow: none; accent-color: initial;
}
:is(.panel-view, dialog#modal, .zoom-shell) input.st-switch[type=checkbox]:checked { background: var(--live); }
.st-switch-row.has-icon > svg { flex: none; width: 20px; height: 20px; color: var(--ink2); align-self: flex-start; margin-top: 2px; }
.st-switch-row.has-icon { gap: 14px; }
/* Connections (Life's panel, opened from Settings): the sentence sits on the page's own edge. */
.hl-conn .hl-conn-say { margin: 0 0 12px; padding: 4px 0 0; }
.hl-conn .st-line { margin: 0 0 16px; }
.hs-res small.hs-note { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* New chat sheet: which AI runs and what it may do, one quiet line. */
.new-chat-runtime { width: 100%; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding: 0; border: 0; background: none; color: var(--muted); font-size: var(--fs-15); text-align: left; cursor: pointer; }
.new-chat-runtime-text { min-width: 0; display: grid; gap: 2px; }
.new-chat-runtime-text small { color: var(--warning); font-size: var(--fs-14); }
.new-chat-runtime-change { flex: none; color: var(--accent); font-weight: var(--fw-strong); }
.new-chat-choices { display: grid; gap: 4px; }
.new-chat-choices[hidden] { display: none; }
/* The ranked list on the Free models page: the Free tag never wraps. */
.free-ranked .hz-meta { white-space: nowrap; }
.free-key-save { width: 100%; margin-top: var(--sp-2); }
