/* Shared v3 components. Loaded after route styles so every screen uses the same finish. */
:is(.card,.su-card,.ia-card,.ia-setup-card,.mp-card,.stock-card,.market-card,.market-now-card,.ip-card,.ai-card,.su-closed-card,.v3-alerts-card),
.ia-comp :is(.card,.ia-card,.ia-setup-card,.ip-card) {
  min-width:0;
  padding:var(--space-4);
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}

:is(.btn,.ia-comp .btn,.mp-page .btn,.mp-dialog .btn) {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:var(--space-2);
  min-height:44px;
  padding:var(--space-2) var(--space-4);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--ink);
  font-size:var(--text-sm);
  font-weight:600;
  line-height:1.4;
  text-align:center;
  text-decoration:none;
  cursor:pointer;
}
:is(.btn-primary,.primary,.ia-comp .btn-primary,.ia-comp .primary,.mp-page .btn-primary,.mp-dialog .btn-primary) {
  background:var(--accent);
  border-color:var(--accent);
  color:var(--accent-ink);
}
:is(.btn-quiet,.ia-comp .btn-quiet) {
  background:transparent;
  border-color:transparent;
  color:var(--accent);
}
:is(.btn,.btn-primary,.btn-quiet):active { opacity:.8; }

:is(.back,.ia-comp .back,.mp-page .back) {
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:var(--space-2);
  align-self:flex-start;
  width:max-content;
  min-width:44px;
  min-height:44px;
  padding:0 var(--space-3);
  border:0;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--accent);
  font-size:var(--text-sm);
  font-weight:600;
  text-decoration:none;
}
.back .ico { flex:none; }
:is(.ia-comp,.tn-sheet) button[data-close], .su-ai-close { min-width:44px; min-height:44px; display:inline-grid; place-items:center; }

.ico[data-icon^="chevron"] { color:var(--muted); vertical-align:middle; flex:none; }
.row-chev { display:grid; place-items:center; width:20px; height:20px; margin-left:auto; }
.iv-chev { color:var(--muted); }
details[open]>summary .ico[data-icon="chevron-right"] { transform:rotate(90deg); }
:is(.num,.money,.gain,.loss,.ia-number,.row-value,.account-value,.mp-now,.iv-rw b) { font-variant-numeric:tabular-nums; }
/* measure_picker_compact_1027: the shared search + chips picker sheet (V.pickSheet in core.js). Bottom sheet on a phone,
   centred panel on wider screens. Only the list scrolls; the search and chips stay put. Rows are one line. */
dialog.pk-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(560px,100vw);max-width:100vw;height:min(640px,85dvh);border:0;border-radius:var(--radius-lg) var(--radius-lg) 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -12px 40px var(--hs-shadow)}
dialog.pk-sheet::backdrop{background:var(--hs-scrim)}
@media (min-width:701px){dialog.pk-sheet{inset:0;margin:auto;height:min(640px,80dvh);border:1px solid var(--border);border-radius:var(--radius-lg)}}
dialog.pk-sheet>.v3-sheet-body{flex:1;display:flex;flex-direction:column;overflow:hidden;padding:0 16px max(12px,env(safe-area-inset-bottom))}
.pk-top{flex:none;display:grid;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.pk-top input[type=search]{box-sizing:border-box;width:100%;height:44px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);color:var(--ink);font:inherit}
.pk-chips{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.pk-chips::-webkit-scrollbar{display:none}
.pk-chip{flex:none;min-height:36px;padding:0 14px;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);color:var(--ink);font:inherit;font-size:var(--text-sm);white-space:nowrap;cursor:pointer}
.pk-chip[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--surface);font-weight:700}
.pk-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.pk-list ul{list-style:none;margin:0;padding:0}
.pk-row{border-bottom:1px solid var(--border)}
.pk-line{display:flex;align-items:center;gap:4px;min-height:44px;max-height:48px}
.pk-pick{flex:1;min-width:0;min-height:44px;padding:0 4px;border:0;background:none;color:var(--ink);font:inherit;font-size:var(--text-sm);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.pk-pick.on{color:var(--accent);font-weight:700}
.pk-multi .pk-pick.on::before{content:'\2713';display:inline-block;width:1.4em}
.pk-foot{display:flex;gap:8px;flex:none;padding:var(--space-2) 0 0;border-top:1px solid var(--border)}
.pk-foot .btn{flex:1 1 0;min-height:44px}
.pk-pick[aria-disabled="true"]{color:var(--muted)}
.pk-info{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;background:none;color:var(--muted);cursor:pointer}
.pk-info>span{display:grid;place-items:center;width:20px;height:20px;border:1.5px solid currentColor;border-radius:50%;font-size:12px;font-weight:700;line-height:1}
.pk-info[aria-expanded="true"]{color:var(--accent)}
.pk-detail{margin:0 0 10px;padding:0 4px;font-size:var(--text-xs);line-height:1.45;color:var(--muted)}
.pk-group{margin:14px 0 2px;font-size:var(--text-xs);color:var(--muted)}
.pk-empty{margin:0;padding:16px 4px;color:var(--muted)}
.pk-host{position:relative}
.pk-wrap{display:block}
.pk-over{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;padding:0;border:0;background:transparent;opacity:0;cursor:pointer}
.pk-host:has(select[aria-disabled="true"],select:disabled)>.pk-over{display:none}
/* market_view_sentence_1027: V.marketView, the one market-view sentence (core.js). Type from the tokens; no inline styles. */
.mv{display:grid;gap:var(--gap-card)}
.mv-sentence{margin:0;font-size:var(--type-title);line-height:2.3;font-weight:600;color:var(--ink)}
.mv .mv-pick{position:relative;display:inline-block;margin:0 2px;padding:2px 28px 2px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2358645e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;line-height:1.5;white-space:nowrap;vertical-align:baseline}
.mv .mv-pick:focus-within{outline:3px solid var(--focus);outline-offset:2px}
.mv .mv-pick:has(select:focus:not(:focus-visible)){outline:none}
.mv .mv-pick select.mv-sel,.idea-find-filter-sheet .mv .mv-pick select.mv-sel{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;font-size:16px;cursor:pointer}
.mv-slot{display:inline-block;max-width:100%;min-height:36px;margin:0 2px;padding:2px 28px 2px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2358645e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;color:var(--ink);font:inherit;line-height:1.4;vertical-align:baseline;-webkit-appearance:none;appearance:none}
.mv-date,.idea-find-filter-sheet .mv .mv-date{display:inline-block;width:auto;margin:0 2px;padding:2px 10px;min-height:36px;background-image:none}
.mv-size{display:inline-block;min-width:3.2em;padding:2px 8px;border-radius:var(--radius-sm);background:var(--hs-accent-soft);color:var(--accent);font-variant-numeric:tabular-nums;text-align:center}
.mv-size-row{position:relative;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:var(--space-4);padding:var(--space-3) var(--space-4);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
.mv-big{margin:0;min-width:3.6em;font-size:var(--type-hero);font-weight:700;line-height:1.1;color:var(--ink);font-variant-numeric:tabular-nums}
.mv-range{display:grid;gap:var(--space-2);font-size:var(--type-meta);color:var(--muted)}
.mv-label{font-size:var(--type-meta);font-weight:600;color:var(--muted)}
.mv-range input{width:100%;height:28px;margin:0;accent-color:var(--accent);background:transparent}
.mv-range.locked input{opacity:.45}
.mv-lock-tap{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:var(--radius);background:transparent;cursor:pointer}
.mv-chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--gap-tight)}
.mv-chips .opt{flex:none;height:44px;padding:0 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink);font-size:var(--type-body);font-weight:600}
.mv-chips .opt.on{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.mv-more .mv-label{flex-basis:100%}
.mv-chips .mv-locked{color:var(--muted)}
.mv-days,.mv-error{margin:0;font-size:var(--type-meta);line-height:1.45;color:var(--muted)}
.mv-days:empty{display:none}
.mv-error{color:var(--danger)}
/* The x on every sheet: the focus ring shows only for keyboard focus (Andy TG112258). core.js showSheet moves tap focus to the title. */
.v3-sheet-head [data-close]:focus:not(:focus-visible){outline:none;box-shadow:none}
.v3-sheet-head .v3-sheet-title-focus:focus{outline:none}
.mv .mv-pick select.mv-sel.v3-tap-busy{position:absolute!important;box-shadow:none!important}
.mv .mv-pick:has(select.v3-tap-busy){box-shadow:inset 0 0 0 2px var(--accent)}
