/* Approved holdings visual system. Loaded after the legacy shared stylesheet. */
:root[data-theme="dark"] {
  --surface: #0d1c2e; --surface-muted: #102239; --surface-sunken: #07111f;
  --theme-chrome: #07111f; --header-bg: rgba(7,17,31,.96);
  --bg-accent-soft: #102d40; --border: #253d54; --border-strong: #38516b;
  --border-accent: #337c94; --text-primary: #eaf3ff; --text-secondary: #bdcce0;
  --text-muted: #9aadc5; --text-disabled: #697f99;
  --color-primary: #65ddef; --color-primary-strong: #92edfa;
  --color-up: #ff7d89; --color-up-strong: #ff9da6;
  --color-down: #48d4a4; --color-down-strong: #72e8bf;
  --bg-up-soft: #301e2b; --bg-down-soft: #0d302b;
  --shadow-soft: 0 8px 30px rgba(0,0,0,.14);
  color-scheme: dark;
}
:root { --hx-radius: 10px; --hx-panel-gap: 16px; }
body { background: var(--theme-chrome); }
:root[data-theme="dark"] .btn-blue, :root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-red, :root[data-theme="dark"] .btn-green, :root[data-theme="dark"] .btn-orange,
:root[data-theme="dark"] .meta-pill-active { color: #07111f; }
button, input, select { font-family: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-primary); outline-offset: 3px;
}
.container { max-width: 1520px; padding: 12px 24px; }
.page-shell { max-width: 1520px; margin-inline: auto; padding: 0; gap: 0; }
.page-header { border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.product-mark-icon { box-shadow: none; }
.workbench-nav { background: transparent; border: 0; box-shadow: none; border-radius: 0; gap: 16px; }
.workbench-nav-item { border-radius: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; box-shadow: none; min-height: 44px; }
.workbench-nav-item-active { background: transparent; box-shadow: none; color: var(--text-primary); border-bottom-color: var(--color-primary); }
.workbench-panel { border: 0; padding: 0; box-shadow: none; background: transparent; }
.hx-page-heading { display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px; }
.hx-page-heading h2 { font-size: 22px; margin: 0; }
.hx-page-heading span { color: var(--text-muted); font-size: 13px; }
.hx-hero, .hx-table-shell, .drawer-section, .drawer-position-hero {
  border: 1px solid var(--border); border-radius: var(--hx-radius); background: var(--surface);
}
:root[data-theme="dark"] .hx-hero, :root[data-theme="dark"] .hx-table-shell,
:root[data-theme="dark"] .drawer-section, :root[data-theme="dark"] .drawer-position-hero {
  background: linear-gradient(125deg, rgba(24,47,75,.42), transparent 68%), var(--surface);
  border-top-color: var(--border-accent); box-shadow: 0 -1px 0 rgba(101,221,239,.09), var(--shadow-soft);
}
.hx-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px 30px; align-items: center; padding: 22px 24px 16px; }
.hx-hero-main, .hx-hero-side { min-width: 0; width: auto; }
.hx-hero-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 14px; }
.hx-estimate-badge { display: inline-flex; align-items: center; border: 1px solid var(--border-accent); background: var(--bg-accent-soft); color: var(--color-primary-strong); border-radius: 5px; padding: 2px 7px; font-size: 11px; font-weight: 500; line-height: 1.5; }
.hx-hero-headline { margin: 10px 0 16px; }
.hx-hero-total { font-size: clamp(28px, 3.1vw, 42px); font-weight: 600; letter-spacing: -.03em; overflow-wrap: anywhere; text-align: left; }
.hx-hero-metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.hx-hero-metric { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 6px; }
.hx-metric-label { color: var(--text-muted); font-size: 13px; }
.hx-metric-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.hx-metric-value b { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; overflow-wrap: anywhere; }
.hx-metric-value small { font-size: 13px; }
.hx-hero-metric button { font: inherit; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; }
.hx-hero-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--border); padding-top: 10px; color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.hx-data-details { display: block; }
.hx-data-details > summary { cursor: pointer; min-height: 24px; }
.hx-data-details > div { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 0; }
.hx-hero-side { display: block; align-self: stretch; border-left: 1px solid var(--border); padding-left: 28px; }
.hx-chart-title { color: var(--text-secondary); font-size: 12px; margin: 0 0 10px; }
.hx-spark-card { display: grid; grid-template-rows: minmax(64px, 1fr) auto auto; gap: 4px; width: 100%; min-width: 0; height: auto; }
.hx-spark-card .hx-spark { display: block; width: 100%; height: 112px; min-height: 0; max-height: none; overflow: hidden; }
.hx-spark-axis { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; min-height: 28px; line-height: 20px; padding: 4px 5px; margin: 0; width: 100%; box-sizing: border-box; white-space: nowrap; font-size: 12px; }
.hx-spark-axis span:nth-child(2) { justify-self: center; }
.hx-spark-axis span:last-child { justify-self: end; }
.hx-spark-legend { font-size: 11px; }
.hx-hero-actions { display: none; }
/* Homepage hierarchy: short status once; full provenance remains on demand. */
.hx-home-hero { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); grid-template-areas: "main chart" "context chart"; gap: 0 28px; padding: 18px 24px 10px; }
.hx-home-hero .hx-hero-main { grid-area: main; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.hx-home-hero .hx-hero-metrics { border: 0; padding: 0; gap: 20px; }
.hx-home-hero .hx-metric-label { color: var(--text-secondary); font-size: 13px; }
.hx-home-total { min-width: 0; }
.hx-home-total-value { display: block; max-width: 100%; min-height: 44px; margin-top: 4px; padding: 0; border: 0; background: transparent; color: var(--text-primary); text-align: left; font: inherit; cursor: pointer; }
.hx-home-total-value b { font-size: clamp(30px, 2.7vw, 40px); line-height: 1.2; font-weight: 600; overflow-wrap: anywhere; letter-spacing: -.025em; }
.hx-home-hero .hx-metric-value { display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 2px; min-height: 54px; }
.hx-home-hero .hx-metric-value b { font-size: clamp(22px, 2vw, 28px); line-height: 32px; }
.hx-home-rate { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; min-height: 20px; line-height: 20px; }
.hx-home-rate > span { white-space: nowrap; }
.hx-rate-coverage { color: var(--text-secondary); font-size: 11px; font-weight: 400; white-space: nowrap; }
.hx-home-context { grid-area: context; display: flex; align-items: center; flex-wrap: wrap; gap: 0 14px; min-width: 0; }
.hx-home-context > .hx-data-details { min-width: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.hx-home-context .hx-data-details > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--color-primary-strong); width: fit-content; cursor: pointer; }
.hx-home-context .hx-data-details[open] { flex-basis: 100%; }
.hx-home-context .hx-data-details > div { flex-direction: column; padding: 0 0 10px; }
.hx-home-hero .hx-hero-side { grid-area: chart; padding-left: 22px; }
.hx-home-hero .hx-chart-title { font-size: 11px; margin-bottom: 4px; }
.hx-benchmark { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 6px; font-size: 12px; line-height: 24px; }
.hx-benchmark-name { display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); white-space: nowrap; line-height: 24px; }
.hx-benchmark-swatch { width: 16px; border-top: 2px dashed var(--text-muted); }
.hx-benchmark-quote { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; white-space: nowrap; line-height: 24px; }
.hx-benchmark-period { color: var(--text-secondary); line-height: 24px; }
.hx-benchmark-quote > b { font-size: 17px; line-height: 24px; }
.hx-home-hero .hx-spark-card { grid-template-rows: 56px minmax(28px, auto); gap: 0; }
.hx-home-hero .hx-spark-card .hx-spark { height: 56px; }
.hx-home-hero .hx-spark-legend { display: none; }
.hx-refresh-feedback { color: var(--text-secondary); font-size: 12px; padding: 0 0 8px; }
.hx-toolbar { flex-wrap: wrap; gap: 8px; }
.hx-toolbar .hx-kebab-wrap.hx-toolbar-more { display: inline-flex; }
.hx-toolbar .btn-collapse-all, .hx-toolbar .btn-group-manage,
.hx-toolbar .btn-upload, .hx-toolbar .btn-add-holding, .hx-toolbar .select-all-control { display: none; }
.hx-toolbar .hx-upload-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.hx-toolbar .hx-search { max-width: 420px; }
.hx-toolbar .btn, .hx-toolbar .control-select { min-height: 40px; }
.hx-toolbar .hx-refresh-inline { display: inline-flex; min-width: 40px; min-height: 40px; }
.hx-table { table-layout: fixed; }
.hx-table .hx-check-col { width: 38px; }
.hx-table .hx-name-col { width: 32%; }
.hx-table .hx-value-col { width: 20%; }
.hx-table .hx-action-col { width: 48px; }
.hx-table thead th { white-space: normal; line-height: 1.5; }
.hx-table .hx-th-sort { min-height: 28px; flex-wrap: wrap; }
.hx-table .hx-th-hint .hx-th-sort { min-height: 24px; }
.hx-table thead th { padding-block: 8px; }
.hx-th-hint { display: block; color: var(--text-muted); font-size: 11px; font-weight: 400; }
.hx-table tbody td { padding: 14px 18px; }
.hx-table .hx-name-main { white-space: normal; overflow-wrap: anywhere; font-weight: 500; line-height: 1.5; }
.hx-table .hx-name-main { font-size: 16px; }
.hx-name-link { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 44px; text-align: left; }
.hx-inline-status { flex-shrink: 0; white-space: nowrap; }
.hx-status-neutral { color: var(--text-secondary); border-color: var(--border); background: transparent; }
.hx-name-link { color: inherit; }
.hx-table .hx-name-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 12px; }
.hx-row .hx-num { font-variant-numeric: tabular-nums; }
.hx-return-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hx-return-stack > .hx-num:first-child { font-size: clamp(20px, 1.6vw, 24px); font-weight: 600; overflow-wrap: anywhere; }
.hx-return-stack small { font-size: 12px; }
.hx-group-toggle { min-height: 44px; align-items: center; }
.hx-group-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.hx-group-metrics { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; font-size: 12px; gap: 6px 16px; font-weight: 400; }
.hx-group-metrics > span::before { content: none; }
.hx-group-metrics > span { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.hx-group-metric-label { color: var(--text-secondary); font-weight: 400; white-space: nowrap; }
.hx-group-metrics b { font-size: 16px; white-space: nowrap; }
.hx-group-amount b { color: var(--text-primary); }
.hx-group-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.hx-group-coverage { color: var(--text-secondary); font-size: 11px; font-weight: 400; white-space: nowrap; }
.hx-group-rate { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 5px; font-size: 12px; line-height: 18px; }
.hx-group-rate-label { color: var(--text-secondary); font-weight: 400; }
.hx-group-title { font-size: 15px; }
.hx-table .hx-group-row td { padding-block: 4px; }
.hx-kebab { min-width: 44px; min-height: 44px; }
.hx-menu { min-width: 170px; }
.hx-menu button { min-height: 44px; }
.hx-menu-sort { display: grid; gap: 8px; padding: 10px; font-size: 13px; color: var(--text-secondary); }
.hx-menu-sort select { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-sunken); color: var(--text-primary); font: inherit; }
.hx-batch-on .hx-row .hx-td-check { display: table-cell; }
.holding-drawer { width: min(1000px, 96vw); padding: 20px 24px; background: var(--theme-chrome); animation: none; }
.holding-drawer-head { margin: -20px -24px 0; top: -20px; padding: 16px 24px; background: var(--header-bg); }
.holding-drawer-head strong { min-width: 0; overflow-wrap: anywhere; }
.drawer-heading { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.holding-drawer-close { margin-left: auto; flex: 0 0 44px; min-height: 44px; font-size: 20px; }
.holding-drawer-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.drawer-position-hero { padding: 24px; margin: 8px 0 4px; }
.drawer-position-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--text-secondary); font-size: 15px; }
.drawer-profit-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; margin: 14px 0; }
.drawer-profit-headline b { font-size: clamp(30px, 4vw, 48px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.drawer-profit-headline span { font-size: 24px; }
.drawer-position-amount { color: var(--text-secondary); font-size: 14px; }
.drawer-breakdown { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 18px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); gap: 16px; }
.drawer-breakdown-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.drawer-breakdown-item > span { color: var(--text-secondary); font-size: 13px; }
.drawer-breakdown-item b { font-size: 20px; font-weight: 600; }
.drawer-breakdown-item small { width: 100%; color: var(--text-muted); font-size: 12px; }
.drawer-position-meta { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.drawer-section { padding: 18px; min-width: 0; }
.drawer-section-title { font-size: 15px; }
.drawer-my-position { grid-row: span 2; }
.drawer-advice-history { grid-column: 1 / -1; }
.drawer-advice-history > summary { cursor: pointer; min-height: 32px; }
.drawer-advice-history .advice-timeline { margin-top: 14px; }
.drawer-position-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; font-size: 13px; }
.drawer-position-facts dt { color: var(--text-muted); }
.drawer-position-facts dd { text-align: right; margin: 0; overflow-wrap: anywhere; }
.drawer-position-facts { margin-bottom: 16px; }
.drawer-nav-trend { display: flex; gap: 16px; align-items: center; color: var(--text-muted); font-size: 12px; padding-block: 12px; border-block: 1px solid var(--border); margin-bottom: 16px; }
.drawer-nav-trend .hx-spark { width: 120px; height: 40px; flex: 1; min-width: 0; }
.drawer-table table { min-width: 0; }
.drawer-table td, .drawer-table th { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 769px) {
  .hx-row .hx-td-amount > .hx-num { font-size: 16px; overflow-wrap: anywhere; }
}
@media (max-width: 1023px) {
  .container { padding-inline: 16px; }
  .hx-hero { gap: 16px; }
  .hx-hero-side { padding-left: 16px; }
  .hx-table tbody td { padding: 12px 10px; }
  .hx-home-hero { grid-template-columns: minmax(0, 1fr) 210px; gap: 0 16px; }
  .hx-home-hero .hx-hero-main { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 768px) {
  .container { padding: 0 12px calc(16px + env(safe-area-inset-bottom)); }
  .page-shell { padding: 0; }
  .page-header { padding: 0; margin-bottom: 8px; gap: 0; }
  .page-header-brand { min-height: 44px; width: 100%; padding: 0; }
  .product-mark { min-height: 44px; max-width: calc(100% - 90px); }
  .page-title { font-size: 17px; line-height: 1.4; }
  .auth-chip-name { max-width: 64px; }
  .workbench-nav { flex-basis: 100%; padding: 0; gap: 0; border-bottom: 1px solid var(--border); }
  .workbench-nav-item { min-height: 44px; padding: 8px 0; font-size: 15px; }
  .hx-page-heading { display: none; }
  .hx-hero { grid-template-columns: minmax(0, 1fr); padding: 12px 14px 6px; gap: 6px; margin-bottom: 8px; }
  .hx-hero-headline { margin: 4px 0 8px; }
  .hx-hero-total { font-size: clamp(26px, 7vw, 34px); }
  .hx-hero-metrics { padding-top: 8px; gap: 14px; }
  .hx-hero-metric { gap: 4px; }
  .hx-metric-value b { font-size: clamp(19px, 5.2vw, 24px); }
  .hx-metric-value small, .hx-metric-label { font-size: 12px; }
  .hx-hero-side { padding: 0; border: 0; }
  .hx-chart-title { margin-bottom: 4px; font-size: 11px; }
  .hx-spark-card { height: auto; grid-template-rows: 44px minmax(28px, auto); row-gap: 0; }
  .hx-spark-card .hx-spark { height: 44px; }
  .hx-spark-axis { min-height: 28px; line-height: 20px; font-size: 11px; padding: 4px 3px; }
  .hx-hero-meta { padding-top: 4px; font-size: 11px; }
  .hx-refresh-line { display: none; }
  .hx-data-details > div { flex-direction: column; }
  .hx-home-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "context" "chart"; padding: 12px 14px 6px; gap: 0; }
  .hx-home-hero .hx-hero-main { gap: 12px; }
  .hx-home-total-value b { font-size: clamp(28px, 8.7vw, 36px); }
  .hx-home-hero .hx-hero-metrics { gap: 14px; }
  .hx-home-hero.hx-home-large .hx-hero-metrics { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hx-home-hero.hx-home-large .hx-metric-value b { font-size: clamp(18px, 5.7vw, 24px); }
  .hx-home-hero .hx-metric-value { min-height: 54px; }
  .hx-home-hero .hx-hero-metric { gap: 0; }
  .hx-home-hero .hx-metric-value b { font-size: clamp(18px, 4.8vw, 22px); white-space: nowrap; }
  .hx-home-hero .hx-metric-value small { font-size: 13px; }
  .hx-home-hero .hx-hero-side { padding: 0; }
  .hx-home-hero .hx-spark-card { grid-template-rows: 44px minmax(28px, auto); }
  .hx-home-hero .hx-spark-card .hx-spark { height: 44px; }
  .hx-toolbar { grid-template-columns: 44px 68px minmax(80px, 1fr) 44px 44px; gap: 4px; margin-bottom: 6px; }
  .hx-toolbar .segmented-control { width: 68px; }
  .hx-toolbar .segmented-control .segment-button { padding-inline: 0; white-space: nowrap; }
  .hx-toolbar .control-select { grid-column: 3; grid-row: 1; width: 100%; max-width: 100%; min-width: 80px; padding-inline: 4px 16px; font-size: 12px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238b9db6'%3E%3Cpath d='m3 4 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 3px center; background-size: 12px; }
  .hx-toolbar .hx-upload-icon { display: none; }
  .hx-toolbar .hx-toolbar-more { grid-column: 5; grid-row: 1; }
  .hx-toolbar .btn-batch-delete, .hx-toolbar .btn-batch-move { grid-column: span 2; }
  .hx-toolbar .hx-menu, .hx-td-kebab .hx-menu { position: fixed; inset: auto 12px calc(12px + env(safe-area-inset-bottom)); width: auto; max-height: calc(80dvh - env(safe-area-inset-bottom)); overflow-y: auto; box-shadow: 0 -8px 36px rgba(0,0,0,.4); }
  .hx-table { table-layout: auto; }
  .hx-table-shell { box-shadow: none; background: transparent; margin-bottom: 72px; }
  .hx-table tbody tr.hx-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "amount amount" "profit today"; gap: 4px 16px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; margin: 6px 0; padding: 10px 12px; width: 100%; box-sizing: border-box; }
  .hx-table tbody tr.hx-row td { display: flex; min-width: 0; width: auto; margin: 0; padding: 0; gap: 4px; }
  .hx-table .hx-row .hx-td-name { grid-area: name; padding: 0 32px 0 0 !important; }
  .hx-name { width: 100%; gap: 6px; }
  .hx-name-link { min-height: 44px; width: 100%; gap: 3px 8px; }
  .hx-name-main { font-size: 15px; line-height: 1.4; }
  .hx-row .hx-name-sub { font-size: 11px; margin-top: 0; }
  .hx-table .hx-row .hx-td-amount { grid-area: amount; flex-direction: row; justify-content: flex-start; padding-bottom: 5px; border-bottom: 0; font-size: 13px; color: var(--text-secondary); }
  .hx-table .hx-row .hx-td-cumret { grid-area: profit; flex-direction: column; align-items: stretch; white-space: normal; text-align: left; justify-content: flex-start; }
  .hx-table .hx-row .hx-td-today { grid-area: today; flex-direction: column; align-items: stretch; text-align: left; justify-content: flex-start; }
  .hx-row .hx-return-stack { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 2px; }
  .hx-row .hx-return-stack > .hx-num:first-child { font-size: clamp(18px, 4.8vw, 22px); line-height: 28px; white-space: nowrap; }
  .hx-row .hx-return-stack small { min-height: 18px; line-height: 18px; font-size: 12px; white-space: nowrap; }
  .hx-cell-label { font-size: 11px; line-height: 1.5; }
  .hx-table tbody tr.hx-row-large { grid-template-areas: "name name" "amount amount" "profit profit" "today today"; }
  .hx-row-large .hx-return-stack > .hx-num:first-child { white-space: nowrap; font-size: clamp(16px, 5.2vw, 22px); }
  .hx-table .hx-row .hx-td-kebab { position: absolute !important; top: 4px; right: 2px; }
  .hx-group-line { flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
  .hx-group-title { font-size: 14px; }
  .hx-group-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin-left: 0; gap: 8px 12px; font-size: 12px; text-align: left; }
  .hx-group-metrics > span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .hx-group-metrics b { font-size: 17px; line-height: 24px; }
  .hx-group-rate-label { display: none; }
  .hx-group-large .hx-group-metrics { grid-template-columns: minmax(0, 1fr); }
  .hx-group-metrics > .hx-estimate-badge { display: none; }
  .hx-table .hx-group-row td { padding: 8px 12px; border-radius: 8px; }
  .hx-group-toggle { display: block; position: relative; }
  .hx-group-heading { padding-left: 20px; min-height: 20px; }
  .hx-group-metrics { column-gap: 16px; }
  .hx-group-caret { position: absolute; top: 3px; left: 0; margin: 0; }
  .hx-batch-on .hx-table .hx-row .hx-td-check { position: absolute; left: 6px; top: 10px; }
  .hx-batch-on .hx-table .hx-row .hx-td-name { padding-left: 22px !important; }
  .holding-drawer { inset: 0; width: auto; padding: 12px; }
  .holding-drawer-head { margin: -12px -12px 0; top: -12px; padding: 10px 12px; gap: 6px; }
  .holding-drawer-head > .hx-name-sub { display: none; }
  .holding-drawer-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .drawer-position-hero { padding: 18px 16px 12px; }
  .drawer-position-title { font-size: 14px; gap: 8px; }
  .drawer-profit-headline { gap: 6px 14px; margin: 12px 0; }
  .drawer-profit-headline b { font-size: clamp(28px, 8.5vw, 40px); }
  .drawer-profit-headline span { font-size: 20px; }
  .drawer-breakdown { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 14px 0 12px; padding-top: 12px; }
  .drawer-breakdown-item { gap: 3px 10px; }
  .drawer-breakdown-item small { margin-top: -2px; }
  .drawer-section { padding: 14px; }
  .drawer-fund-detail { order: 0; }
  .drawer-my-position { order: 1; }
  .drawer-advice-history { order: 2; }
  .drawer-position-meta { font-size: 12px; }
}
@media (max-width: 360px) {
  .page-shell { padding-inline: 0; }
  .hx-hero { padding-inline: 12px; }
  .hx-table tbody tr.hx-row { padding-inline: 10px; column-gap: 12px; }
  .hx-return-stack { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: 15px; }
  .drawer-profit-headline b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-row, .holding-drawer, .hx-group-caret { transition: none; animation: none; }
}
