/* Calm pages (calm_ui.js, DECLUTTER_PASS.md): one short line under the title, no explainer blocks, one primary
   action, fewer boxes, more space. Grove tokens only. Loaded last, so it settles the earlier help layers' styles. */

/* ---- Help blocks earlier passes drew above the task: never shown (calm_ui.js also removes them) ---- */
#content :is(.uxb-intro,.uxb-intro-again,.uxb-tool-guide,.uxb-kbd-hint,.uxb-checks-wrap,[data-calm-help],.sdg-tour-offer,.sdg-welcome,.uxb-journey,.lab-steps,.rlab-steps,.uxb-term-row){display:none!important}
/* The Backtest lab's empty result panel: its title only. */
#content .lab-empty :is(.ui-kicker,.ui-note,.lab-outputs){display:none!important}
#content .calm-extra{display:none!important}

/* ---- One short line when a setup check reports a problem (ux_ops.js) ---- */
.calm-attention{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:-8px 0 22px;font-size:13px;color:var(--ui-muted)}
.calm-attention a{font-weight:600}

/* ---- "More" menu for secondary header actions ---- */
.calm-more{position:relative}
.calm-more>summary{list-style:none;gap:6px}
.calm-more>summary::-webkit-details-marker{display:none}
.calm-more-caret{font-size:10px;opacity:.7}
.calm-more[open]>summary{color:var(--ui-ink)!important}
.calm-more-list{position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:220px;display:grid;gap:2px;padding:6px;border-radius:12px;background:var(--ui-card,#0b1610);border:1px solid var(--ui-card-line);box-shadow:0 18px 40px -16px rgba(0,0,0,.8)}
.calm-more-list>*{display:flex!important;width:100%;justify-content:flex-start!important;text-align:left;min-height:36px;padding:8px 10px!important;border:0!important;background:none!important;border-radius:8px!important;color:var(--ui-ink)!important;font:500 13px/1.3 var(--ui-font)!important;box-shadow:none!important;white-space:normal!important;margin:0!important}
.calm-more-list>*:hover,.calm-more-list>*:focus-visible{background:color-mix(in srgb,var(--ui-ink) 7%,transparent)!important}
.calm-quiet{background:transparent!important;border-color:transparent!important;color:var(--ui-muted)!important}
.calm-quiet:hover{color:var(--ui-ink)!important}

/* ---- Calm layout: one line under the title, more air, fewer boxes ---- */
body[data-ui=grove] #content .ui-frame-head{margin-bottom:28px;align-items:center}
body[data-ui=grove] #content .calm-line{font-size:14px;line-height:1.5;max-width:70ch;margin-top:6px;color:var(--ui-muted)}
body[data-ui=grove] #content .ui-frame-actions{gap:6px}
body[data-ui=grove] #content .ui-tabs{margin-bottom:28px}
body[data-ui=grove] #content .ui-grid{gap:26px;margin-bottom:26px}
/* Card and panel headings carry no second line of prose: calm_ui.js (calmProse) hides a heading's explanatory line;
   facts (numbers, "·" lists, badges) stay. */
/* Field help shows while the field is in use, not all the time. */
/* Shown as a small note under the field while it is focused, laid over the page so nothing below moves (a layout
   shift on blur would make the next click land on the wrong spot). */
body[data-ui=grove] #content .ui-field{position:relative}
body[data-ui=grove] #content .ui-field>.ui-help:not(.calm-keep){position:absolute;left:0;right:0;top:100%;z-index:30;margin:4px 0 0;padding:8px 10px;border-radius:10px;background:var(--ui-card,#0b1610);border:1px solid var(--ui-card-line);box-shadow:0 12px 30px -14px rgba(0,0,0,.8);visibility:hidden;opacity:0;pointer-events:none;transition:opacity .12s}
body[data-ui=grove] #content .ui-field:focus-within>.ui-help:not(.calm-keep){visibility:visible;opacity:1}
/* No card inside a card: the inner one becomes plain space. */
body[data-ui=grove] #content :is(.ui-card,.panel) :is(.ui-card,.panel):not(.calm-keep-box){background:none;border:0;box-shadow:none;padding-left:0;padding-right:0;animation:none}
body[data-ui=grove] #content .ui-card{box-shadow:none}
@media(max-width:720px){
  body[data-ui=grove] #content .ui-frame-head{margin-bottom:18px}
  body[data-ui=grove] #content .ui-frame-actions{width:auto}
  .calm-more-list{right:auto;left:0}
  body[data-ui=grove] #content .ui-grid{gap:18px}
}

/* ---- Shell: only what needs attention ---- */
#status-strip .strip-chip[data-tone=ok],#strip-jobs-button[data-calm-idle=true],#alert-badge[data-calm-idle=true]{display:none!important}
/* Sign out and Privacy live in the ⋯ menu at every width; the top bar keeps Agents and ⋯. */
#topbar-more{display:inline-flex!important;margin-left:0}
.topbar-actions{display:none!important}
.topbar-actions.open{display:flex!important;flex-direction:column;align-items:stretch;gap:6px;position:absolute;top:100%;right:8px;z-index:35;min-width:200px;padding:10px;background:var(--ui-card,#0b1610);border:1px solid var(--ui-card-line);border-radius:var(--ui-radius-field);box-shadow:0 14px 40px #0008}
/* The sidebar's Strategy assistant is a small one-line entry, not a card. */
.shell-assistant.shell-assistant-small{align-items:center;gap:8px;margin:6px 2px 2px;padding:8px 10px;background:none;border-color:transparent;font-size:12.5px;font-weight:600}
.shell-assistant.shell-assistant-small:hover{background:color-mix(in srgb,var(--nav-ink,#c1cddd) 7%,transparent)}
.shell-assistant.shell-assistant-small .shell-icon{margin-top:0}
/* Home's Getting started: each step's title and its button; no description under it. */
#content #home-steps .ui-list-main>span{display:none}
/* New strategy: the gallery's heading needs no second line. */
#content .sdg-gallery-head p{display:none}
/* One primary per view: a button repeated on every row or card looks like an ordinary button. */
body[data-ui=grove] #content :is(li,tr,.uxb-card) :is(.ui-button-primary,button.primary,a.primary):not(form *){background:var(--ui-field);border-color:var(--ui-field-line);color:var(--ui-ink)!important;box-shadow:none}
/* Long row descriptions keep one line; the technical step chain of a workflow is not shown in the list. */
#content #auto-templates .auto-chain,#content #auto-mine .auto-chain{display:none!important}
#content :is(#auto-templates,#auto-mine) .ui-list-main>span{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
#content .sdg-simple-toggle small{display:none}
/* Numbered form sections (Confluence finder, Tournaments): a heading, not a box with a number above it. */
body[data-ui=grove] #content fieldset.ui-section{border:0;padding:0;margin:0 0 22px;min-width:0}
body[data-ui=grove] #content fieldset.ui-section>legend{padding:0;margin-bottom:8px;font-weight:650}
body[data-ui=grove] #content fieldset.ui-section>legend .ui-step-mark{display:none}
/* Panel headings carry no side caption ("Strategy, history, costs"). */
body[data-ui=grove] #content .panel-head>span.subtle{display:none}
@media(max-width:720px){body[data-ui=grove] #content .ui-frame-actions{justify-content:flex-start}}
