:root {
  color-scheme: only light;
  --brand: #0A59F7;
  --warning: #E84026;
  --confirm: #64BB5C;
  --data-up: #E84026;
  --data-down: #00B42A;
  --up: var(--data-up);
  --down: var(--data-down);
  --font-primary: #1b2028;
  --font-secondary: #4e5968;
  --font-tertiary: #5c6673;
  --font-on-primary: #ffffff;
  --background-primary: #ffffff;
  --background-secondary: #F1F3F5;
  --background-tertiary: #E5E5EA;
  --comp-tertiary: rgba(0, 0, 0, 0.047);
  --comp-emphasize-tertiary: rgba(10, 89, 247, 0.1);
  --interactive-hover: rgba(0, 0, 0, 0.047);
  --interactive-pressed: rgba(0, 0, 0, 0.1);
  --header-bar: #ffffff;
  --motion: cubic-bezier(0.4, 0, 0.2, 1);
  --radius-chip: 4px;
  --radius-image: 8px;
  --radius-card: 16px;
  --radius-button: 20px;
  --radius-dialog: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --title-bar: 52px;
  --side-nav: 220px;
  --bottom-tab: 58px;
  --ask-column: 800px;
  --page-gutter: 16px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; max-width: 100%; overflow-x: clip; }
html {
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  color: var(--font-primary);
  background: var(--background-primary);
  font-family: "HarmonyOS Sans SC", "HarmonyOS Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, textarea, select { font: inherit; color: inherit; }
button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}
button, a, .tab-item, .nav-item, .icon-button, .chip-tab, .channel-tab, .text-tab, .quote-row, .post-card {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
button[disabled] { opacity: 0.55; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  button:focus-visible, .icon-button:focus-visible, .tab-item:focus-visible, .nav-item:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 40%, transparent);
  }
}
.up { color: var(--data-up); }
.down { color: var(--data-down); }
.hidden, .vh, .hidden-visual { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; clip: auto; }

.connection-gate {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--space-8) + env(safe-area-inset-top)) var(--space-5)
    calc(var(--space-8) + env(safe-area-inset-bottom));
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 46%),
    var(--background-secondary);
}
.connection-gate-card {
  width: min(100%, 440px);
  padding: var(--space-8) var(--space-6);
  border-radius: 28px;
  background: var(--background-primary);
  box-shadow: 0 20px 64px rgba(17, 36, 69, 0.12);
  text-align: center;
}
.connection-gate-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-5);
  place-items: center;
  border-radius: 18px;
  color: var(--font-on-primary);
  background: var(--brand);
  font-size: 22px;
  font-weight: 700;
}
.connection-gate-kicker { margin: 0; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; }
.connection-gate h1 { margin: var(--space-3) 0 0; font-size: 26px; line-height: 34px; }
.connection-gate-card > p:not(.connection-gate-kicker) { margin: var(--space-3) 0 0; color: var(--font-secondary); line-height: 22px; }
.connection-gate-actions { display: grid; gap: var(--space-2); margin-top: var(--space-6); }
.connection-gate-actions .primary-button { width: 100%; min-height: 48px; }
.connection-gate-card small { display: block; margin-top: var(--space-4); color: var(--font-tertiary); }
.connection-login {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
  text-align: left;
}
.connection-login .field { padding: 0; }
.connection-login .primary-button { width: 100%; min-height: 48px; }
.connection-login-message { margin: 0; color: var(--warning); font-size: 13px; line-height: 20px; }
.connection-gate-card.has-login .connection-gate-actions { margin-top: var(--space-4); }
body.is-unpaired .app-shell,
body:not(.is-ready) .app-shell { display: none; }

.app-shell { min-width: 0; max-width: 100%; min-height: 100vh; min-height: 100dvh; overflow-x: clip; }
.app-frame { min-width: 0; max-width: 100%; background: var(--background-primary); }
.side-nav {
  display: none;
  position: sticky;
  top: 0;
  align-self: start;
  flex-direction: column;
  width: var(--side-nav);
  height: 100vh;
  height: 100dvh;
  padding: var(--space-6) var(--space-4);
  overflow: auto;
  background: var(--background-primary);
  border-right: 1px solid var(--comp-tertiary);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  color: inherit;
  text-decoration: none;
}
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 16px; font-weight: 700; }
.brand-copy small { margin-top: 2px; color: var(--font-tertiary); font-size: 12px; font-weight: 500; }
.nav-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-8); }
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: 26px;
  color: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms var(--motion), color 200ms var(--motion);
}
.nav-item:hover { background: var(--interactive-hover); }
.nav-item, .tab-item { position: relative; }
.nav-item.has-live::after, .tab-item.has-live::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--background-primary);
}
.nav-item.has-live::after {
  top: 12px;
  right: 12px;
}
.tab-item.has-live::after {
  top: 6px;
  right: calc(50% - 18px);
}

.ask-live-chip {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--bottom-tab) + env(safe-area-inset-bottom) + 8px);
  z-index: 24;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--comp-tertiary));
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 10%, var(--background-primary));
  color: var(--font-primary);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--font-primary) 12%, transparent);
}
.ask-live-chip.hidden { display: none; }
.nav-item.is-active { color: var(--font-on-primary); background: var(--brand); }
.nav-item.is-parent-active { color: var(--brand); background: var(--comp-emphasize-tertiary); }
.nav-item-child.is-active { color: var(--font-on-primary); background: var(--brand); }
.nav-item svg { width: 22px; height: 22px; flex: none; }
.nav-item-child {
  min-height: 42px;
  margin: calc(var(--space-2) * -1) 0 0 var(--space-6);
  padding-left: var(--space-4);
  border-radius: 22px;
  color: var(--font-secondary);
}
.nav-item-child svg { width: 18px; height: 18px; }

.title-bar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: calc(var(--title-bar) + env(safe-area-inset-top));
  padding: max(4px, env(safe-area-inset-top))
    calc(var(--page-gutter) + env(safe-area-inset-right, 0px))
    4px
    calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--header-bar) 86%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--comp-tertiary);
}
.title-default { display: block; flex: 1; min-width: 0; overflow: hidden; }
.title-default h1 { margin: 0; font-size: 20px; font-weight: 750; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-sub { display: none; margin: 2px 0 0; color: var(--font-tertiary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-field {
  display: none;
  flex: 1 1 100%;
  order: 20;
  min-width: 0;
  height: 38px;
  margin: 0 0 4px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--background-secondary);
}
body.search-open .search-field { display: flex; }
body.search-open .title-default { display: block; }
.search-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
}
.title-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.icon-button {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--font-primary);
  background: transparent;
  line-height: 1;
  cursor: pointer;
  transition: background-color 200ms var(--motion), transform 120ms var(--motion);
}
.icon-button svg { width: 21px; height: 21px; }
.icon-button[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover { background: var(--interactive-pressed); }
  .icon-button.brand:hover { background: color-mix(in srgb, var(--brand) 86%, black); }
}
.icon-button.ghost {
  background: transparent;
}
.icon-button.ghost:hover { background: var(--interactive-hover); }
.icon-button.brand { color: var(--font-on-primary); background: var(--brand); }
.icon-button.brand:active { background: color-mix(in srgb, var(--brand) 86%, black); }
.icon-button.is-spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.connection-state {
  display: none;
  align-items: center;
  gap: var(--space-2);
  color: var(--font-secondary);
  font-size: 12px;
  font-weight: 500;
}
.connection-state i { width: 8px; height: 8px; border-radius: 50%; background: #ED6F21; }
.connection-state.online i { background: var(--confirm); }
.connection-state.offline i { background: var(--warning); }

main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 0
    calc(var(--page-gutter) + env(safe-area-inset-right, 0px))
    16px
    calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
  padding-bottom: calc(var(--bottom-tab) + 16px + env(safe-area-inset-bottom));
}
.view { display: none; min-width: 0; max-width: 100%; }
.view.is-active { display: block; }
#page-root { min-width: 0; max-width: 100%; }

.channel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.channel-tabs, .chip-tabs, .market-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}
.channel-tabs { flex: 1; min-width: 0; gap: 15px; }
.channel-tabs::-webkit-scrollbar, .chip-tabs::-webkit-scrollbar, .market-tabs::-webkit-scrollbar { display: none; }
.channel-tab, .text-tab {
  flex: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--font-tertiary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.channel-tab { font-size: 13px; }
.channel-tab.is-active, .text-tab.is-active {
  color: var(--font-primary);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--font-primary);
}
.chip-tabs { gap: 15px; margin: 0; }
.chip-tab {
  flex: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--font-tertiary);
  font-size: 13px;
  cursor: pointer;
}
.chip-tab.is-active { color: var(--brand); font-weight: 700; }
.source-control .channel-tab.is-active { color: var(--brand); box-shadow: none; }
.chip-tab:active, .channel-tab:active, .text-tab:active { opacity: 0.64; }

.block-label, .section-kicker {
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
}
.section-kicker { margin-bottom: var(--space-4); }
.feed-count { color: var(--font-tertiary); font-size: 12px; font-weight: 500; white-space: nowrap; }
.feed { display: flex; flex-direction: column; }
.feed-more {
  padding: var(--space-6) 0 calc(var(--space-8) + env(safe-area-inset-bottom));
  color: var(--font-tertiary);
  font-size: 12px;
  text-align: center;
}

.post-card {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--comp-tertiary);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.post-card:active { background: var(--interactive-pressed); }
.post-card.is-read .post-meta,
.post-card.is-read .feed-content,
.post-card.is-read .feed-expand {
  opacity: 0.55;
}
.post-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.post-meta {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: var(--space-2);
  color: var(--font-tertiary);
  font-size: 11px;
}
.post-identity {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-actions { display: flex; flex-shrink: 0; gap: 2px; }
.post-save, .post-cite {
  width: 40px;
  min-width: 40px;
  height: 44px;
  min-height: 44px;
  color: var(--font-secondary);
  background: transparent;
}
.post-save.is-saved, .post-cite.is-cited { color: var(--brand); }
.post-author {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.post-card h3 {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-excerpt {
  margin: 4px 0 0;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-excerpt.is-translated { color: var(--font-primary); }
.post-card p, .post-body {
  margin: 0;
  color: var(--font-primary);
  font-size: 14px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.post-card .post-markdown {
  max-height: 9.5em;
  overflow: hidden;
  white-space: normal;
}
.post-markdown {
  white-space: normal;
}
.post-markdown h1, .post-markdown h2, .post-markdown h3 {
  margin: 0.6em 0 0.3em;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
}
.post-markdown h1:first-child, .post-markdown h2:first-child, .post-markdown h3:first-child { margin-top: 0; }
.post-markdown p { margin: 0 0 0.6em; white-space: normal; }
.post-markdown ul, .post-markdown ol { margin: 0 0 0.6em; padding-left: 1.3em; }
.post-markdown li { margin: 0.15em 0; }
#dialog-body.post-markdown, #dialog-body.post-body {
  max-height: none;
  overflow: visible;
  margin: var(--space-3) 0;
}
.post-quote {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-card);
  color: var(--font-secondary);
  background: var(--background-secondary);
  font-size: 13px;
  line-height: 22px;
  white-space: pre-wrap;
}
.post-quote::before {
  content: '中文';
  display: block;
  margin-bottom: 4px;
  color: var(--font-tertiary, var(--font-secondary));
  font-size: 11px;
  letter-spacing: 0.04em;
}
#post-dialog.has-translation #dialog-translation {
  margin-top: 0;
  margin-bottom: var(--space-3);
  color: var(--font-primary);
  font-size: 15px;
  line-height: 24px;
}
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.tags span, .post-foot {
  color: var(--font-tertiary);
  font-size: 12px;
}
.post-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-3);
}
.post-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 32px;
  cursor: pointer;
  user-select: none;
}
.tags span {
  padding: 2px var(--space-2);
  border-radius: var(--radius-chip);
  color: var(--brand);
  background: var(--comp-emphasize-tertiary);
}
.post-card.is-compact .tags,
.timeline-row .tags {
  margin-top: 6px;
  gap: 4px;
}
.post-card.is-compact .tags span,
.timeline-row .tags span {
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
}
.status-pill {
  padding: 0 8px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--comp-emphasize-tertiary);
  font-size: 11px;
  line-height: 18px;
}
.status-pill.warning {
  color: #A65C00;
  background: color-mix(in srgb, var(--warning) 16%, white);
}
.follow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.follow-toolbar p { margin: 0; color: var(--font-secondary); font-size: 12px; flex: 1 1 180px; }
.follow-toolbar .inline-field { flex: 0 1 160px; margin: 0; }
.follow-toolbar .inline-field.url-field { flex: 1 1 280px; min-width: 220px; }
.follow-toolbar .inline-field input { height: 36px; }
.x-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.x-action-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
}
.x-action-buttons .primary-button {
  flex: 0 0 auto;
  min-width: 108px;
  width: auto;
}
.holdings-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}
.holdings-toolbar .section-kicker { margin: 0; flex: 1; min-width: 0; }
.holdings-toolbar .text-button { flex: none; }
.holdings-lines {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-4);
}
.holdings-line {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.holdings-line h3 {
  margin: 0 0 var(--space-3);
  font-size: 14px;
}
.holdings-line-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.holdings-line-metric strong {
  display: block;
  font-size: 20px;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
}
.holdings-line-metric small {
  display: block;
  margin-top: 2px;
  color: var(--font-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.holdings-line-metric span {
  display: block;
  margin-top: 4px;
  color: var(--font-tertiary);
  font-size: 12px;
}
.holdings-lines-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding: 0 var(--space-1);
  color: var(--font-secondary);
  font-size: 13px;
}
.holdings-lines-total strong {
  color: var(--font-primary);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.holdings-moves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}
.holdings-moves-detail { grid-template-columns: 1fr; }
.holdings-move {
  width: 100%;
  padding: var(--space-4);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--background-secondary);
  text-align: left;
  cursor: pointer;
}
.holdings-move:hover, .holdings-move:active { background: var(--interactive-hover); }
.holdings-move.is-static { cursor: default; }
.holdings-move.is-static:hover, .holdings-move.is-static:active { background: var(--background-secondary); }
.holdings-group-back { margin: 0 0 var(--space-2) calc(var(--space-3) * -1); }
.holdings-group-title {
  margin: 0 0 var(--space-2);
  font-size: 20px;
}
.holdings-move h3 {
  margin: 0 0 var(--space-2);
  font-size: 13px;
}
.holdings-move strong {
  display: block;
  font-size: 22px;
  line-height: 30px;
  font-variant-numeric: tabular-nums;
}
.holdings-move small,
.holdings-move span {
  display: block;
  margin-top: 4px;
  color: var(--font-tertiary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-4);
}
.summary-grid.compact { margin-top: var(--space-4); }
.summary-grid > div {
  padding: var(--space-3);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.summary-grid strong { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.summary-grid span { color: var(--font-tertiary); font-size: 12px; }
.holdings-editor {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.holdings-editor h3 { margin: 0 0 var(--space-3); font-size: 14px; }
.holdings-editor .form-row { margin-bottom: var(--space-3); }
.holdings-editor select,
.holdings-editor input { width: 100%; }
.analysis-ledger {
  margin: var(--space-4) 0;
}
.analysis-ledger-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
}
.analysis-ledger-toolbar h2 {
  margin: 0 auto 0 0;
}
.analysis-ledger-add {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.analysis-ledger-add select,
.analysis-ledger-add input {
  min-height: 36px;
  padding: 0 var(--space-2);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-button);
  background: var(--background-primary);
  color: inherit;
}
.analysis-ledger-add input { width: 140px; }
.analysis-ledger-groups {
  display: grid;
  gap: var(--space-3);
}
.analysis-ledger-group h3 {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  color: var(--font-secondary);
}
.analysis-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 132px;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}
.analysis-ledger-row input {
  width: 100%;
  min-height: 36px;
  padding: 0 var(--space-2);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-button);
  background: var(--background-primary);
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.analysis-ledger-row input:disabled {
  opacity: 0.72;
}
.analysis-ledger-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.analysis-ledger-name strong {
  font-size: 14px;
}
.analysis-ledger-name small {
  color: var(--font-tertiary);
  font-size: 12px;
}
.analysis-split {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.analysis-card {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.analysis-card h2 {
  margin: 0 0 var(--space-3);
  font-size: 16px;
}
.analysis-chart { min-height: 220px; }
.analysis-chart svg { display: block; width: 100%; height: 220px; }
.analysis-chart-pie svg {
  width: 200px;
  max-width: 100%;
  height: 200px;
  margin: 0 auto;
}
.analysis-note {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: 12px;
  background: var(--background-primary);
}
.analysis-note > strong { display: block; margin-bottom: var(--space-2); font-size: 13px; }
.analysis-note p { margin: 0 0 var(--space-2); color: var(--font-secondary); font-size: 13px; }
.analysis-note p strong { display: inline; }
.analysis-note p:last-child { margin-bottom: 0; }
.analysis-dividend-total span,
.analysis-dividend-total small { color: var(--font-tertiary); font-size: 12px; }
.analysis-dividend-total strong {
  display: block;
  margin: var(--space-2) 0;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.analysis-bars { display: flex; flex-direction: column; gap: var(--space-3); }
.analysis-bar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  font-size: 13px;
}
.analysis-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-bar i {
  display: block;
  height: 10px;
  border-radius: 99px;
  background: color-mix(in srgb, #d81b60 72%, var(--brand));
}
.analysis-bar b { font-variant-numeric: tabular-nums; font-size: 12px; }
.analysis-insights {
  display: grid;
  gap: var(--space-3);
}
.analysis-insights article {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.analysis-insights h3 { margin: 0 0 var(--space-2); font-size: 15px; }
.analysis-insights p { margin: 0; color: var(--font-secondary); font-size: 13px; line-height: 1.6; }
.analysis-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
  color: var(--font-secondary);
  font-size: 12px;
}
.analysis-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 99px;
}
.ask-scope {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  color: var(--font-secondary);
  font-size: 13px;
}
.row-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.empty-state, .status-card, .pairing-panel, .metrics-panel {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}

.trade-pane { display: none; }
.trade-pane.is-active { display: block; }
.market-tabs { margin-bottom: var(--space-1); }
.asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.asset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 120px;
  padding: var(--space-4);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--background-secondary);
  text-align: left;
  cursor: pointer;
}
.asset-kind {
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
}
.asset-card strong { margin-top: var(--space-2); font-size: 16px; }
.asset-card small { color: var(--font-tertiary); font-size: 12px; }
.asset-card b { margin-top: var(--space-3); font-size: 20px; font-variant-numeric: tabular-nums; }
.asset-card em { font-style: normal; font-size: 12px; font-weight: 700; }
.ledger-list { display: flex; flex-direction: column; gap: var(--space-3); }
.ledger-item {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.ledger-item small { color: var(--font-tertiary); font-size: 12px; }
.ledger-item strong { display: block; margin-top: var(--space-1); font-size: 16px; }
.ledger-item p { margin: var(--space-2) 0 0; color: var(--font-secondary); font-size: 14px; }
.search-results { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--comp-tertiary);
}
.search-row small, .search-row strong { display: block; }
.search-row small { margin-top: 2px; color: var(--font-tertiary); }
.quote-summary {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.quote-summary-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.quote-summary-title strong { font-size: 18px; font-weight: 700; }
.quote-summary-title span { color: var(--font-tertiary); font-size: 12px; }
.quote-summary-price { margin-top: var(--space-1); font-size: 28px; font-weight: 700; line-height: 36px; font-variant-numeric: tabular-nums; }
.quote-summary p { margin: var(--space-2) 0 0; color: var(--font-tertiary); font-size: 12px; }
.quote-head, .quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.quote-head {
  min-height: 32px;
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
}
.quote-change-label {
  width: 84px;
  text-align: center;
}
.quote-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 72px;
  padding: var(--space-3) 0;
  border: 0;
  border-top: 1px solid var(--comp-tertiary);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.quote-row:active, .quote-row.is-active { background: var(--interactive-hover); }
.quote-identity { min-width: 0; flex: 1; }
.quote-name { display: block; font-size: 14px; font-weight: 600; line-height: 20px; }
.quote-code { display: block; margin-top: 2px; color: var(--font-tertiary); font-size: 11px; }
.quote-metrics {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-4);
}
.quote-price {
  min-width: 72px;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.quote-head .quote-price {
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
}
.quote-change {
  width: 84px;
  padding: var(--space-1) 0;
  border-radius: var(--radius-image);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.quote-change.up { color: #ffffff; background: var(--data-up); }
.quote-change.down { color: #ffffff; background: var(--data-down); }
.holdings-table {
  min-width: 760px;
  width: 100%;
}
.quote-head.holdings-head,
.quote-row.holdings-row {
  display: grid;
  grid-template-columns: minmax(108px, 1.2fr) 58px 72px 88px 64px 102px;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.holdings-head.quote-head { justify-content: stretch; }
.holdings-row.quote-row {
  justify-content: stretch;
  overflow: visible;
}
.holdings-sort {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  cursor: pointer;
}
.holdings-sort.holdings-name { text-align: left; }
.holdings-sort.is-active { color: var(--font-primary); }
.holdings-qty,
.holdings-px,
.holdings-day,
.holdings-pct,
.holdings-pnl {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.holdings-qty { font-size: 13px; }
.holdings-qty-inline { display: none; }
.holdings-px,
.holdings-day {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
  font-weight: 500;
}
.holdings-px small,
.holdings-day small {
  color: var(--font-tertiary);
  font-size: 11px;
  font-weight: 400;
}
.holdings-day.up,
.holdings-day.up small:not(.holdings-total) { color: var(--data-up); }
.holdings-day.down,
.holdings-day.down small:not(.holdings-total) { color: var(--data-down); }
.holdings-total { display: none; font-weight: 500; }
.holdings-total.up { color: var(--data-up); }
.holdings-total.down { color: var(--data-down); }
.holdings-pct { font-size: 12px; font-weight: 600; }
.holdings-pnl.quote-change {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 2px 4px;
  font-size: 11px;
}
.index-bar {
  position: sticky;
  bottom: calc(var(--bottom-tab) + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-4) calc(var(--space-4) * -1) 0;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--comp-tertiary);
  background: var(--background-primary);
  font-size: 13px;
}

.market-status {
  margin: var(--space-2) 0 var(--space-3);
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 18px;
}
.index-scroller {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}
.index-scroller::-webkit-scrollbar { display: none; }
.index-card {
  flex: none;
  width: min(148px, 70vw);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.index-card header { display: flex; justify-content: space-between; gap: var(--space-2); color: var(--font-tertiary); font-size: 11px; }
.index-card strong { display: block; margin-top: var(--space-2); font-size: 16px; line-height: 22px; font-variant-numeric: tabular-nums; }
.index-card b { display: block; margin: 4px 0; font-size: 12px; font-weight: 600; }
.spark { width: 100%; height: 24px; }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.6; }
.spark.empty { color: var(--font-tertiary); font-size: 12px; }
.market-brief {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
.breadth-card, .mover-card {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.breadth-card h3, .mover-card h3 { margin: 0 0 var(--space-2); font-size: 12px; font-weight: 500; }
.breadth-card strong { font-size: 24px; line-height: 28px; }
.breadth-card strong small { font-size: 14px; }
.breadth-card span, .breadth-card p { color: var(--font-tertiary); font-size: 12px; }
.breadth-track {
  height: 6px;
  margin: var(--space-3) 0;
  border-radius: 99px;
  background: var(--comp-tertiary);
  overflow: hidden;
}
.breadth-track svg { display: block; width: 100%; height: 100%; }
.breadth-track rect.up { fill: var(--data-up); }
.breadth-track rect.flat { fill: var(--font-tertiary); }
.breadth-track rect.down { fill: var(--data-down); }
.mover-row { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-2); align-items: center; min-height: 32px; font-size: 12px; }
.mover-row small { color: var(--font-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-filter {
  display: block;
  margin: var(--space-2) 0 var(--space-3);
}
.market-filter input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: 20px;
  background: var(--background-secondary);
}
.market-section { margin-bottom: var(--space-8); }
.market-overview > .muted {
  margin: 0 0 var(--space-4);
}
.market-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-3);
}
.market-section-title h2 { margin: 0; font-size: 16px; }
.market-section-title small { color: var(--font-tertiary); font-size: 12px; }
.market-table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  margin-inline: calc(var(--space-4) * -1);
  padding-inline: var(--space-4);
  scrollbar-width: none;
}
.market-table-scroll::-webkit-scrollbar { display: none; }
.market-table {
  min-width: 640px;
  width: 100%;
}
.market-head, .market-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) 96px 88px 84px 120px;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
}
.market-head {
  min-height: 32px;
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
}
.market-head span:nth-child(n+3),
.market-row .quote-price,
.market-row .market-meta { text-align: right; }
.market-sort,
.market-row .quote-change { text-align: center; }
.market-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-chip);
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 200ms var(--motion), color 200ms var(--motion);
}
.market-sort svg { width: 12px; height: 12px; flex: none; }
.market-sort:hover, .market-sort:active { background: var(--interactive-hover); }
.market-sort.is-active { color: var(--brand); }
.market-row {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--comp-tertiary);
}
.market-row .quote-identity { min-width: 0; }
.market-row .quote-name,
.market-row .quote-blurb,
.market-row .quote-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-blurb { display: block; margin-top: 2px; color: var(--font-tertiary); font-size: 11px; font-style: normal; }
.market-spark { width: 84px; height: 24px; }
.market-row .quote-price { width: 88px; }
.market-row .quote-change {
  width: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 13px;
  font-weight: 600;
}
.market-row .quote-change.up { color: var(--data-up); background: none; }
.market-row .quote-change.down { color: var(--data-down); background: none; }
.market-meta {
  color: var(--font-tertiary);
  font-size: 11px;
  line-height: 16px;
}
.market-range { display: block; }
.market-remove { margin-top: 2px; min-height: 28px; padding: 0; }

.note-composer { margin: var(--space-3) 0 var(--space-4); }
.note-share-source {
  margin: calc(var(--space-2) * -1) 0 var(--space-3);
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft, #f5f7fa);
  color: var(--text-secondary, #5f6b7a);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.note-share-source a { color: var(--primary, #0a59f7); }
.note-source {
  margin-top: var(--space-2);
  color: var(--text-secondary, #5f6b7a);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.note-source a { color: var(--primary, #0a59f7); }
.swipe-front a,
.swipe-front button,
.swipe-front [role="button"] {
  position: relative;
  z-index: 2;
  user-select: auto;
}
.swipe-item {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-card);
}
.swipe-actions {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  display: flex;
  width: 168px;
}
.swipe-item.is-open .swipe-actions,
.swipe-item:has(.swipe-front.is-open) .swipe-actions {
  z-index: 3;
}
.swipe-item.is-open .focus-btn,
.swipe-item.is-open .feed-expand,
.swipe-item.is-open .icon-button {
  pointer-events: none;
}
.swipe-actions button {
  flex: 1;
  min-width: 72px;
  padding: 0 6px;
  border: 0;
  color: #fff;
  font-size: 13px;
  line-height: 16px;
  cursor: pointer;
}
.swipe-pin { background: #E88B00; }
.swipe-archive { background: var(--brand); }
.swipe-delete { background: #E84026; }
.note-card {
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.swipe-front {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  touch-action: pan-y;
  transition: transform 180ms ease;
  user-select: none;
}
.feed-swipe-item .swipe-front {
  background: var(--background-primary);
}
.feed-swipe-item .post-card:active {
  background: var(--interactive-pressed);
}
.inspire-subnav { margin: 0 0 var(--space-3); }
#task-list .task-row {
  display: block;
  isolation: isolate;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  min-height: 0;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
#task-list .task-row .task-card {
  border-radius: 0;
  background: var(--background-secondary);
}
#task-list .task-row .swipe-actions,
#task-list .task-row.is-open .swipe-actions,
#task-list .task-row:has(.swipe-front.is-open) .swipe-actions {
  z-index: 0;
  align-items: stretch;
}
#task-list .task-row .swipe-delete {
  align-self: stretch;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  box-shadow: none;
}
.task-card {
  cursor: pointer;
  padding: 12px 14px;
}
@media (hover: hover) and (pointer: fine) {
  .task-card:hover {
    background: color-mix(in srgb, var(--comp-emphasize-tertiary) 55%, var(--background-secondary));
  }
}
.task-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-card-head .note-tag { margin: 0; }
.task-card-when {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.task-card .note-card-chevron { margin-top: 0; }
.task-card-theme {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 650;
  line-height: 22px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.task-card-preview {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 20px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.task-card .task-status.is-open { color: var(--brand); }
.task-card .task-status.is-claimed { color: #E88B00; }
.task-card .task-status.is-completed { color: var(--confirm); }
.task-card .task-status.is-failed { color: #E84026; }
.task-card .task-result { margin-top: var(--space-3); white-space: pre-wrap; }
.task-card .task-trace { margin-top: var(--space-2); font-size: 12px; }
.task-detail-parent { margin: 4px 0 0; }
.task-detail-parent.is-link { cursor: pointer; text-decoration: underline; }
.task-panel {
  margin: 0;
}
.task-panel p,
.task-detail .detail-section p,
.task-detail .detail-surface p { margin: 0; white-space: pre-wrap; }
.task-history-block {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.task-history-block summary {
  color: var(--font-secondary);
  font-size: 13px;
  cursor: pointer;
}
.task-history-block[open] summary { margin-bottom: var(--space-2); }
.task-history-block p { margin: 0; white-space: pre-wrap; }
.task-progress-when { display: block; margin-top: var(--space-2); }
.task-step-list {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: var(--space-3);
}
.task-step-list li { display: grid; gap: 2px; }
.task-terminal .task-step-list {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.task-step-list li.is-failed strong { color: #E84026; }
.task-step-list li.is-started strong { color: #E88B00; }
.task-thinking {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: var(--space-2) 0 0;
  color: var(--font-secondary);
  animation: task-thinking-pulse 1.4s ease-in-out infinite;
}
.task-step-list .task-thinking { margin: 0; }
.task-step-list li.is-thinking { color: var(--font-secondary); }
.task-thinking-label { color: inherit; }
.task-thinking-dots::after {
  display: inline-block;
  width: 1.25em;
  content: '';
  text-align: left;
  animation: task-thinking-dots 1.2s steps(4, end) infinite;
}
@keyframes task-thinking-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}
@keyframes task-thinking-pulse {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 1; }
}
.task-continue { margin-top: var(--space-4); }
.task-continue h3 { margin: 0 0 var(--space-2); font-size: 15px; }
.note-card small { color: var(--font-tertiary); font-size: 12px; }
.note-card > strong { display: block; margin: var(--space-2) 0; font-size: 16px; }
.note-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.note-card-head-copy {
  flex: 1;
  min-width: 0;
}
.note-card-head strong {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 22px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.note-card-head small {
  display: block;
  margin-top: 4px;
}
.note-card-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-right: 2px solid var(--font-tertiary);
  border-bottom: 2px solid var(--font-tertiary);
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}
.note-card.is-expanded .note-card-chevron {
  margin-top: 8px;
  transform: rotate(45deg);
}
.note-card-detail {
  display: none;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--comp-tertiary);
}
.note-card.is-expanded .note-card-detail { display: block; }
.note-card-detail .note-tags { margin-top: 0; }
.note-body { margin: var(--space-2) 0 0; line-height: 22px; overflow-wrap: anywhere; }
.note-body.post-markdown { white-space: normal; }
.note-body.post-markdown h1,
.note-body.post-markdown h2,
.note-body.post-markdown h3 {
  font-size: 15px;
  line-height: 24px;
}
.note-body.post-markdown code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--background-primary, #fff);
  font-size: 12px;
}
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}
.note-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--background-primary, #fff);
  color: var(--font-secondary);
  font-size: 12px;
  line-height: 18px;
}
.note-tag.is-type {
  color: var(--brand);
  font-weight: 600;
}
.swipe-actions-single { width: 84px; }
.feed-swipe-item {
  margin-bottom: 0;
  border-radius: 0;
}
.feed-swipe-item .post-card {
  background: var(--background-primary);
}
.ai-toggle {
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-button);
  color: var(--font-secondary);
  background: var(--comp-tertiary);
  cursor: pointer;
}
.ai-toggle.is-on { color: var(--brand); background: var(--comp-emphasize-tertiary); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-2);
}
.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 88px;
  padding: var(--space-2);
  border: 0;
  cursor: pointer;
}
.tool-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--brand);
  background: var(--comp-emphasize-tertiary);
  font-size: 18px;
  font-weight: 700;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-item strong { margin-top: var(--space-2); font-size: 12px; font-weight: 500; }
.tool-item small { color: var(--font-tertiary); font-size: 11px; }
.tool-item:disabled { opacity: 0.45; cursor: default; }

.overview-subnav { display: none; }
.overview-subnav.is-on {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  margin: 0 calc(var(--page-gutter) * -1);
  padding: 0 var(--page-gutter);
  border-bottom: 1px solid var(--comp-tertiary);
}
.overview-subnav .text-tab.is-active {
  box-shadow: inset 0 -2px 0 var(--font-primary);
}
.hub-stage {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.hub-chart-slot,
.hub-excerpt-slot {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 148px;
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--background-secondary);
}
.hub-stage-label {
  margin-bottom: var(--space-3);
  color: var(--font-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hub-ticker {
  display: flex;
  flex: 1;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.hub-ticker:empty::after {
  content: '图表位：后续放指数走势或宽度图。';
  color: var(--font-tertiary);
  font-size: 13px;
}
.hub-ticker::-webkit-scrollbar { display: none; }
.hub-tick {
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: 16px;
  background: var(--background-primary);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.hub-tick small { color: var(--font-tertiary); font-size: 11px; }
.hub-tick strong { font-size: 16px; line-height: 22px; }
.hub-tick b { font-size: 12px; font-weight: 600; }
.hub-excerpts {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
}
.hub-excerpt {
  width: 100%;
  min-height: 40px;
  padding: var(--space-3) var(--space-4);
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--background-primary);
  color: var(--font-primary);
  font-size: 14px;
  line-height: 22px;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  cursor: pointer;
}
.hub-excerpt-empty { margin: 0; color: var(--font-tertiary); font-size: 13px; }
.hub-module { display: grid; gap: var(--space-3); }
.hub-module-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
}
.hub-module-head h2 { margin: 0; font-size: 17px; line-height: 24px; }
.hub-module-head p { margin: 2px 0 0; color: var(--font-tertiary); font-size: 12px; }
.hub-stream { display: grid; gap: 0; border: 1px solid var(--comp-tertiary); border-radius: var(--radius-card); overflow: hidden; }
.hub-stream .empty-state { grid-column: 1 / -1; }
.hub-stream.is-quotes {
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--comp-tertiary);
}
.hub-card {
  display: grid;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--comp-tertiary);
  border-radius: 0;
  background: var(--background-primary);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.hub-card:last-child { border-bottom: 0; }
.hub-card:hover { background: var(--interactive-hover); }
.hub-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--font-tertiary);
  font-size: 12px;
}
.hub-lane {
  display: inline-grid;
  place-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--background-secondary);
  color: var(--font-secondary);
  font-size: 11px;
  font-weight: 600;
}
.hub-card h3 { margin: 0; font-size: 16px; line-height: 24px; }
.hub-card p {
  margin: 0;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-card-market {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: var(--space-3);
  row-gap: 2px;
}
.hub-card-market span { font-size: 14px; font-weight: 600; }
.hub-card-market small { grid-column: 1; color: var(--font-tertiary); font-size: 11px; }
.hub-card-market strong { font-size: 16px; }
.hub-card-market b { min-width: 64px; font-size: 13px; text-align: right; }

.source-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  margin-bottom: var(--space-2);
}
.source-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: end;
  padding: var(--space-6);
  border-radius: var(--radius-card);
  color: var(--font-on-primary);
  background: linear-gradient(135deg, #0A59F7 0%, #3478FF 64%, #5B8FF9 100%);
  box-shadow: 0 10px 28px rgba(10, 89, 247, 0.16);
}
.source-eyebrow {
  display: block;
  margin-bottom: var(--space-2);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.source-hero h2 { margin: 0; font-size: 22px; line-height: 30px; }
.source-hero p {
  max-width: 560px;
  margin: var(--space-2) 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 21px;
}
.source-health {
  display: grid;
  min-width: 112px;
  padding: var(--space-3) var(--space-4);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}
.source-health strong { font-size: 26px; line-height: 30px; }
.source-health span { color: rgba(255, 255, 255, 0.78); font-size: 11px; }
.source-health.has-warning { background: rgba(232, 64, 38, 0.32); }
.source-tabs { margin: var(--space-5) 0 var(--space-3); }
.source-groups { display: grid; gap: var(--space-6); }
.source-group { display: grid; gap: var(--space-3); }
.source-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
}
.source-group-heading h3 { margin: 0; font-size: 17px; line-height: 24px; }
.source-group-heading p { margin: 2px 0 0; color: var(--font-tertiary); font-size: 12px; }
.source-group-heading > span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 14px;
  color: var(--font-secondary);
  background: var(--background-secondary);
  font-size: 12px;
  font-weight: 600;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.source-card {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  min-height: 164px;
  padding: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  color: var(--font-primary);
  background: var(--background-secondary);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--motion), background-color 160ms var(--motion), border-color 160ms var(--motion);
}
article.source-card { cursor: default; }
@media (hover: hover) and (pointer: fine) {
  button.source-card:hover {
    transform: translateY(-2px);
    border-color: rgba(10, 89, 247, 0.14);
    background: color-mix(in srgb, var(--background-secondary) 78%, var(--comp-emphasize-tertiary));
  }
  .ask-session-item:hover { background: var(--interactive-hover); }
  .ask-start:hover { background: color-mix(in srgb, var(--brand) 10%, var(--background-primary)); }
}
button.source-card:active { transform: scale(0.985); background: var(--background-tertiary); }
.source-card-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.source-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: var(--comp-emphasize-tertiary);
  font-size: 16px;
  font-weight: 700;
}
.source-content .source-mark { color: #8A3FFC; background: rgba(138, 63, 252, 0.10); }
.source-search .source-mark { color: #007D79; background: rgba(0, 125, 121, 0.10); }
.source-future .source-mark { color: var(--font-tertiary); background: var(--background-tertiary); }
.source-identity { min-width: 0; flex: 1; }
.source-identity strong, .source-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-identity strong { font-size: 15px; font-weight: 650; }
.source-identity small { margin-top: 2px; color: var(--font-tertiary); font-size: 11px; }
.source-status {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  color: var(--font-secondary);
  background: var(--background-tertiary);
  font-size: 11px;
  font-weight: 600;
}
.source-status.is-ready { color: #267A21; background: rgba(100, 187, 92, 0.14); }
.source-status.is-partial { color: #A64B00; background: rgba(237, 111, 33, 0.14); }
.source-status.is-unavailable { color: var(--warning); background: rgba(232, 64, 38, 0.10); }
.source-status.is-waiting { color: var(--font-tertiary); background: var(--background-tertiary); }
.source-card > p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 21px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.source-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  color: var(--font-tertiary);
  font-size: 11px;
}
.source-card-foot > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-open-label { flex: none; color: var(--brand); font-weight: 600; }
.source-future .source-open-label { color: var(--font-tertiary); }
.signal-market-strip { grid-template-columns: minmax(0, 1fr); }
.static-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-6); }
.static-board-panel { min-width: 0; overflow: hidden; border: 1px solid var(--separator); border-radius: var(--radius-card); background: var(--background-primary); }
.static-board-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); border-bottom: 1px solid var(--separator); }
.static-board-heading h2 { margin: 2px 0 0; font-size: 19px; line-height: 26px; }
.static-board-heading .section-kicker { margin: 0; }
.static-board-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.static-board-tabs .chip-tab { min-height: 28px; padding: 0 10px; font-size: 12px; }
.static-board-list { display: grid; gap: 1px; max-height: 560px; overflow: auto; background: var(--separator); }
.static-board-note { min-height: 20px; margin: var(--space-3) 0 0; color: var(--font-tertiary); font-size: 12px; text-align: right; }
.market-native-section { display: grid; gap: var(--space-5); margin-top: var(--space-8); }
.market-native-section .source-group-heading h2 { margin: 2px 0 0; font-size: 21px; }
.market-native-board { display: grid; grid-template-columns: 1fr; gap: var(--space-5); align-items: start; }
.global-native-section { display: grid; gap: var(--space-3); margin: 4px 0 16px; }
.global-native-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.market-native-panel { min-width: 0; overflow: hidden; border: 1px solid var(--separator); border-radius: var(--radius-card); background: var(--background-primary); }
.market-native-panel > header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); min-height: 56px; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--separator); }
.market-native-panel > header div { display: grid; gap: 2px; }
.market-native-panel > header small, .market-native-panel > header span { color: var(--font-tertiary); font-size: 11px; }
.market-native-panel > header h3 { margin: 0; font-size: 17px; }
.market-native-list { display: grid; gap: 1px; max-height: 560px; overflow: auto; background: var(--separator); }
.market-native-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; min-height: 66px; padding: var(--space-3) var(--space-4); background: var(--background-primary); cursor: pointer; }
.market-native-row > div { display: grid; gap: 4px; min-width: 0; }
.market-native-row b { overflow: hidden; color: var(--font-primary); font-size: 13px; line-height: 18px; text-overflow: ellipsis; }
.market-native-row small { overflow: hidden; color: var(--font-tertiary); font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.market-native-price { min-width: 58px; color: var(--brand); font-size: 18px; font-variant-numeric: tabular-nums; }
.market-native-symbol { min-width: 38px; font-size: 14px; }
.liquidity-row { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.liquidity-row.is-primary { min-height: 76px; }
.market-native-supply { font-size: 15px; font-variant-numeric: tabular-nums; }
.prediction-quote {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: var(--background-primary);
  cursor: pointer;
}
.prediction-quote:hover { background: var(--background-secondary); }
.prediction-quote > b {
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
}
.prediction-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.prediction-side { display: grid; gap: 2px; }
.prediction-side span { color: var(--font-tertiary); font-size: 11px; }
.prediction-side strong { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 26px; }
.prediction-side.is-yes strong { color: var(--brand); }
.prediction-side.is-no { text-align: right; }
.prediction-side.is-no strong { color: var(--font-secondary); }
.prediction-bar {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: var(--comp-tertiary);
}
.prediction-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.prediction-quote small { color: var(--font-tertiary); font-size: 11px; line-height: 16px; }
.official-timeline { display: grid; gap: 20px; padding: 4px 0 12px; }
.official-day { display: grid; gap: 8px; }
.official-day-label {
  margin: 0;
  color: var(--font-secondary);
  font-size: 13px;
  font-weight: 650;
}
.official-day-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}
.official-day-list::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: var(--separator);
}
.official-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: start;
  padding: 10px 0;
}
.official-day-list .official-event::before {
  content: '';
  position: absolute;
  top: 16px;
  left: -16px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: #fff;
}
.official-event-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.official-event-body time {
  color: var(--font-tertiary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.official-event-body strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
}
.official-event-body small {
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 18px;
}
.official-event.is-focus { background: #fffdfa; }
.official-event .focus-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  color: #9da4af;
  background: transparent;
}
.official-event .focus-btn.on { color: #94611c; }
.official-event.swipe-front { background: var(--background-primary); }
.feed .official-event.swipe-front { padding: 10px 0; }
.static-signal-section { display: grid; gap: var(--space-5); margin-top: var(--space-8); }
.static-source-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.source-calendar .source-mark { color: #0062A8; background: rgba(0, 98, 168, 0.10); }
.source-policy .source-mark { color: #7A4D00; background: rgba(176, 112, 0, 0.12); }
.source-dialog-panel { width: min(760px, calc(100vw - 32px)); }
.static-source-items { display: grid; gap: 1px; max-height: min(70vh, 720px); overflow: auto; border-radius: 14px; background: var(--separator); }
.static-source-item { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 4px var(--space-4); align-items: center; padding: var(--space-4); background: var(--background-primary); }
.static-source-item time { grid-row: 1 / span 2; color: var(--font-secondary); font-size: 12px; }
.static-source-item strong { min-width: 0; font-size: 14px; line-height: 21px; }
.static-source-item small { min-width: 0; color: var(--font-tertiary); line-height: 18px; }
.static-source-link { grid-column: 3; grid-row: 1 / span 2; white-space: nowrap; }
.source-health-table { overflow: hidden; border: 1px solid var(--separator); border-radius: var(--radius-card); background: var(--background-primary); }
.source-health-row { display: grid; grid-template-columns: minmax(220px, 1.2fr) 120px 96px minmax(220px, 1fr); gap: var(--space-4); align-items: center; width: 100%; min-height: 54px; padding: 10px var(--space-4); border: 0; border-bottom: 1px solid var(--separator); color: var(--font-primary); background: transparent; text-align: left; }
button.source-health-row { cursor: pointer; }
button.source-health-row:hover { background: var(--background-secondary); }
.source-health-row:last-child { border-bottom: 0; }
.source-health-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.source-health-row time, .source-health-row small { overflow: hidden; color: var(--font-tertiary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.source-health-row .source-status { justify-self: start; }
.source-health-header { min-height: 36px; color: var(--font-tertiary); background: var(--background-secondary); font-size: 11px; font-weight: 600; }

@media (max-width: 980px) {
  .static-board { grid-template-columns: 1fr; }
  .global-native-board { grid-template-columns: 1fr; }
  .static-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-health-row { grid-template-columns: minmax(190px, 1fr) 110px 90px; }
  .source-health-row > :last-child { display: none; }
}

@media (max-width: 640px) {
  .static-board-heading { align-items: flex-start; flex-direction: column; }
  .static-board-tabs { justify-content: flex-start; }
  .static-source-grid { grid-template-columns: 1fr; }
  .market-native-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .prediction-side strong { font-size: 20px; }
  .static-source-item { grid-template-columns: 1fr auto; }
  .static-source-item time { grid-column: 1; grid-row: auto; }
  .static-source-item strong, .static-source-item small { grid-column: 1 / -1; }
  .static-source-link { grid-column: 2; grid-row: 1; }
  .source-health-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--space-3); }
  .source-health-row time { grid-column: 1; grid-row: 2; }
  .source-health-row .source-status { grid-column: 2; grid-row: 1 / span 2; }
  .source-health-header { display: none; }
}

.ask-records {
  display: grid;
  gap: var(--space-6);
  width: 100%;
  max-width: var(--ask-column);
  min-width: 0;
  margin-inline: auto;
  padding-bottom: var(--space-8);
}
.ask-start {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: var(--space-5);
  border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--comp-tertiary));
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--brand) 6%, var(--background-primary));
  text-align: left;
  cursor: pointer;
}
.ask-start strong { font-size: 17px; font-weight: 700; color: var(--brand); }
.ask-start span { color: var(--font-secondary); font-size: 13px; line-height: 20px; }
.ask-history { min-width: 0; }
.ask-history-title {
  margin: 0 0 var(--space-3);
  color: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ask-history-day {
  margin: var(--space-4) 0 var(--space-2);
  color: var(--font-tertiary);
  font-size: 12px;
  font-weight: 600;
}
.ask-history-day:first-child { margin-top: 0; }
#ask-session-list { display: grid; min-width: 0; }
.ask-session-item {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--comp-tertiary);
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.ask-session-item:last-child { border-bottom: 0; }
.ask-session-item:active { background: var(--interactive-hover); }
.ask-session-item small { color: var(--font-tertiary); font-size: 12px; }
.ask-session-item strong {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ask-session-item p {
  margin: 0;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#view-ask { min-width: 0; }
.ask-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--ask-column);
  min-width: 0;
  margin-inline: auto;
  gap: var(--space-3);
  padding-top: var(--space-2);
  padding-bottom: var(--space-4);
}
.ask-back { align-self: start; flex: none; }
.ask-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.ask-conversation {
  flex: 0 0 auto;
  overflow: visible;
  background: transparent;
}
.ask-conversation .ask-exchange + .ask-exchange {
  margin-top: var(--space-5);
}
.ask-card { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.ask-intro { padding: 4px 0 0; }
.ask-back { display: none !important; }
.ask-card h2, .ask-question {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ask-card p { margin: 0; color: var(--font-secondary); line-height: 24px; }
.ask-exchange {
  display: grid;
  gap: var(--space-3);
  padding: 0 0 var(--space-5);
  border-bottom: 1px solid var(--comp-tertiary);
  background: transparent;
}
.ask-exchange:last-child { border-bottom: 0; padding-bottom: 0; }
.ask-turn { min-width: 0; display: grid; gap: 6px; }
.ask-turn-label {
  color: var(--font-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.ask-turn-a {
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--background-secondary);
}
.ask-answer {
  min-width: 0;
  max-width: 100%;
  color: var(--font-secondary);
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ask-answer > * + * { margin-top: var(--space-3); }
.ask-answer p { margin: 0; overflow-wrap: anywhere; }
.ask-answer h2, .ask-answer h3, .ask-answer h4 {
  margin: var(--space-4) 0 0;
  color: var(--font-primary);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.ask-answer h2 { font-size: 18px; }
.ask-answer h3 { font-size: 16px; }
.ask-answer h4 { font-size: 15px; }
.ask-answer ul, .ask-answer ol { margin: 0; padding-left: 1.3em; }
.ask-answer li + li { margin-top: 6px; }
.ask-answer li ul, .ask-answer li ol, .ask-answer li div { margin-top: 6px; }
.ask-answer strong { color: var(--font-primary); font-weight: 650; }
.ask-answer code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--comp-tertiary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ask-answer pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ask-answer img, .ask-answer video, .ask-answer iframe {
  max-width: 100%;
  height: auto;
}
.ask-markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-2) 0;
  border: 1px solid var(--comp-tertiary);
  border-radius: var(--radius-card);
  background: var(--background-primary);
}
.ask-markdown-table-wrap table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 13px; }
.ask-markdown-table-wrap th, .ask-markdown-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--comp-tertiary);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ask-markdown-table-wrap th { color: var(--font-primary); background: var(--background-secondary); font-weight: 600; }
.ask-markdown-table-wrap tr:last-child td { border-bottom: 0; }
.ask-answer.is-pending { color: var(--font-tertiary); }
.ask-progress {
  margin: 0;
  padding-left: 1.15em;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.ask-progress-item + .ask-progress-item { margin-top: 8px; }
.ask-progress-label { display: block; }
.ask-progress-detail {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--font-tertiary);
  line-height: 1.45;
}
.ask-progress-item.is-done { color: var(--font-tertiary); }
.ask-progress-item.is-active { color: var(--font-primary); font-weight: 600; }
.ask-progress-item.is-error { color: var(--danger, #d03a45); }
.ask-progress-history {
  margin: 0 0 var(--space-3);
  padding: 8px 10px;
  border: 1px solid var(--comp-tertiary);
  border-radius: 10px;
  background: var(--background-primary);
}
.ask-progress-history summary {
  color: var(--font-tertiary);
  font-size: 12px;
  cursor: pointer;
}
.ask-progress-history[open] summary { margin-bottom: var(--space-3); }
.ask-progress-now {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--background-primary);
}
.ask-progress-now > small {
  display: block;
  margin-bottom: 6px;
  color: var(--font-tertiary);
  font-size: 11px;
}
.ask-progress-current {
  margin: 0;
  padding-left: 1.15em;
}
.ask-run-trace {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 1px solid var(--comp-tertiary);
  border-radius: 12px;
  background: var(--background-secondary);
}
.ask-run-trace summary {
  color: var(--font-secondary);
  font-size: 12px;
  cursor: pointer;
}
.ask-run-trace[open] summary { margin-bottom: var(--space-3); }
.ask-run-trace .ask-progress {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.ask-answer.is-error { color: var(--danger, #d03a45); }
.ask-prompts { display: flex; flex-direction: column; gap: var(--space-2); }
.ask-prompts button {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--comp-tertiary);
  border-radius: 22px;
  background: var(--background-primary);
  text-align: left;
  cursor: pointer;
}
body[data-ask-kind="inspiration"] .ask-composer { display: none; }
.ask-composer {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  flex: none;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  padding: var(--space-2);
  border-radius: 28px;
  background: var(--background-secondary);
}
.ask-composer label { margin-bottom: 0; }
.ask-mention-menu {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% - 4px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(280px, 42vh);
  overflow: auto;
  padding: 6px;
  border-radius: 16px;
  background: var(--background-primary);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--font-primary) 12%, transparent);
}
.ask-mention-menu.hidden { display: none; }
.ask-mention-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.ask-mention-item.is-active,
.ask-mention-item:hover {
  background: var(--comp-tertiary);
}
.ask-mention-item strong {
  font-size: 13px;
  font-weight: 600;
}
.ask-mention-item small {
  color: var(--font-secondary);
  font-size: 12px;
  line-height: 1.4;
}
.ask-mention-empty {
  padding: 10px;
  color: var(--font-tertiary);
  font-size: 13px;
}
.ask-composer-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  min-width: 0;
}
.ask-composer-tools {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}
.ask-agent-mode select,
.ask-web-mode select {
  height: 32px;
  max-width: 118px;
  padding: 0 8px;
  border: 0;
  border-radius: 16px;
  color: var(--font-secondary);
  background: var(--comp-tertiary);
  font-size: 12px;
}
body[data-agent-mode="article-analysis"] .ask-web-mode,
body[data-agent-mode="article-analysis"] .ask-research-mode {
  display: none;
}
.ask-research-mode {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 var(--space-1);
  border-radius: var(--radius-image);
  color: var(--font-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.ask-research-label {
  color: inherit;
}
.ask-research-switch {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--background-tertiary);
  transition: background 150ms var(--motion);
}
.ask-research-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--background-primary);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--font-primary) 16%, transparent);
  transition: transform 150ms var(--motion);
}
.ask-research-mode:has(input:checked) {
  color: var(--font-primary);
}
.ask-research-mode:has(input:checked) .ask-research-switch {
  background: var(--brand);
}
.ask-research-mode:has(input:checked) .ask-research-switch::after {
  transform: translateX(16px);
}
.ask-research-mode:active {
  background: var(--interactive-pressed);
}
@media (hover: hover) and (pointer: fine) {
  .ask-research-mode:hover {
    background: var(--interactive-hover);
  }
  .ask-research-mode:focus-within {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 40%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ask-research-switch,
  .ask-research-switch::after {
    transition-duration: 120ms;
  }
}
.ask-source-footer {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 4px;
  border-top: 1px solid var(--line-secondary, rgba(0, 0, 0, 0.06));
}
.ask-source-group { display: grid; gap: 6px; min-width: 0; }
.ask-source-group small {
  color: var(--font-tertiary);
  font-size: 12px;
}
.ask-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.ask-source-chip {
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 14px;
  color: var(--font-primary);
  background: var(--comp-tertiary);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-source-more,
.ask-source-evidence {
  margin: 0;
  color: var(--font-tertiary);
  font-size: 12px;
}
.note-card.is-source-target,
.post-card.is-source-target {
  outline: 2px solid var(--font-primary);
  outline-offset: 2px;
}
.ask-ref-chips, .ask-used-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.ask-ref-chip, .ask-used-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 8px 0 10px;
  border: 0;
  border-radius: 14px;
  color: var(--font-primary);
  background: var(--comp-tertiary);
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
}
.ask-ref-chip span, .ask-used-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-ref-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--font-secondary);
  background: transparent;
  cursor: pointer;
}
.ask-exchange-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.share-sheet-host {
  position: fixed;
  left: 0;
  top: 0;
  width: 720px;
  transform: translate3d(-140vw, 0, 0);
  pointer-events: none;
}
.share-sheet {
  display: flex;
  flex-direction: column;
  width: 720px;
  padding: 32px 32px 24px;
  background: #ffffff;
  color: #1b2028;
  font-family: "HarmonyOS Sans SC", "HarmonyOS Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.share-sheet .ask-exchange {
  border-bottom: 0;
  padding-bottom: 0;
}
.share-sheet-question {
  margin: 0;
  color: #1b2028;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}
.share-sheet.is-truncated .share-sheet-card {
  max-height: 3680px;
  overflow: hidden;
}
.share-sheet-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eceef1;
  color: #5c6673;
  font-size: 12px;
}
.share-sheet-brand {
  color: #0a59f7;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: none;
}
.share-sheet-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-sheet-note {
  margin: 10px 0 0;
  color: #5c6673;
  font-size: 12px;
}
#share-image-dialog.share-image-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(360px, calc(100vw - 40px));
  height: fit-content;
  max-height: min(78dvh, 720px);
  padding: 12px;
  z-index: 80;
}
.share-image-window {
  display: grid;
  gap: 12px;
}
.share-image-preview {
  display: block;
  width: 100%;
  max-height: min(58dvh, 560px);
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #f3f4f6;
  touch-action: pan-y;
  -webkit-touch-callout: default;
}
#share-image-save { width: 100%; }
.ask-composer input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 var(--space-3);
  border: 0;
  outline: none;
  background: transparent;
}
.reference-dock {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-tab) + env(safe-area-inset-bottom) + 16px);
  z-index: 30;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  color: var(--font-on-primary);
  background: var(--brand);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 35%, transparent);
  cursor: pointer;
}
body[data-view="ask"][data-ask-layer="session"] .reference-dock { display: none; }
.ask-ref-actions {
  display: flex;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}
.ask-ref-actions.hidden { display: none; }
.reference-pack-panel { max-width: 420px; }
.reference-pack-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: var(--space-4) 0 var(--space-2);
}
.card-cite {
  margin-top: var(--space-2);
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.connect-stack { display: grid; gap: var(--space-3); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.section-heading h2, .status-card h2 { margin: 0; font-size: 20px; font-weight: 700; }
.section-desc, .status-card p, .pairing-copy p { margin: var(--space-1) 0 0; color: var(--font-secondary); }
.text-button, .primary-button { min-height: 40px; border: 0; cursor: pointer; transition: background-color 200ms var(--motion), transform 120ms var(--motion); }
.text-button { padding: 0 var(--space-3); border-radius: var(--radius-button); color: var(--brand); font-weight: 500; }
.text-button:hover, .text-button:active { background: var(--interactive-hover); }
.danger-button { margin-top: var(--space-3); color: var(--warning); background: var(--comp-tertiary); }
.primary-button {
  padding: 0 var(--space-5);
  border-radius: var(--radius-button);
  color: var(--font-on-primary);
  background: var(--brand);
  font-weight: 500;
}
.primary-button:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.primary-button:active { transform: scale(0.98); }
.primary-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  background: var(--brand);
}
form { margin-top: var(--space-2); }
form label { display: block; margin-bottom: var(--space-4); }
label > span { display: block; margin-bottom: var(--space-2); color: var(--font-secondary); font-size: 12px; }
input, textarea, select {
  width: 100%;
  border: 0;
  border-radius: var(--radius-image);
  outline: none;
  background: var(--comp-tertiary);
}
input, select { height: 40px; padding: 0 var(--space-3); }
textarea { min-height: 120px; padding: var(--space-3); resize: vertical; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 2px var(--brand); background: var(--background-primary); }
.form-row { display: grid; gap: var(--space-4); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.form-actions span { flex: 1; color: var(--font-secondary); font-size: 12px; }
.pairing-content { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.qr-frame {
  display: grid;
  width: 180px;
  height: 180px;
  place-items: center;
  padding: var(--space-2);
  border-radius: var(--radius-image);
  background: white;
}
.qr-frame img { width: 100%; height: 100%; }
.pairing-copy code { display: inline-block; margin-top: var(--space-4); color: var(--brand); font-size: 18px; font-weight: 700; letter-spacing: 0.16em; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-4); }
.metric-grid div { min-height: 88px; padding: var(--space-4); border-radius: var(--radius-card); background: var(--comp-tertiary); }
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { font-size: 28px; font-weight: 700; }
.metric-grid span { margin-top: 4px; color: var(--font-tertiary); font-size: 12px; }
.device-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-top: 1px solid var(--comp-tertiary);
}
.device-list button { border: 0; color: var(--warning); cursor: pointer; }

.bottom-tab {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(var(--bottom-tab) + env(safe-area-inset-bottom));
  padding: 3px 4px max(4px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--comp-tertiary);
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #858b92;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.tab-item svg { width: 23px; height: 23px; }
.tab-item.is-active { color: var(--font-primary); background: transparent; font-weight: 700; }

html.is-dialog-open,
body.is-dialog-open {
  overflow: hidden;
  overscroll-behavior: none;
}
body.is-dialog-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}
dialog {
  width: min(570px, calc(100% - 24px));
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius-dialog);
  background: var(--background-primary);
  color: var(--font-primary);
  position: relative;
}
#post-dialog {
  padding: 0;
}
.dialog-panel {
  position: relative;
  max-height: min(85dvh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
}
dialog::backdrop { background: #1622385e; }
dialog h2 { margin: 0 48px 0 0; font-size: 15px; font-weight: 700; }
dialog p { margin: 9px 0 0; white-space: pre-wrap; color: var(--font-secondary); line-height: 1.8; font-size: 14px; }
#dialog-actions { margin-top: 12px; }
.dialog-close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--font-secondary);
  background: transparent;
  cursor: pointer;
  font-size: 0;
}
.dialog-close svg { width: 21px; height: 21px; }
.toast {
  position: fixed;
  z-index: 30;
  right: var(--space-4);
  bottom: calc(var(--bottom-tab) + var(--space-4) + env(safe-area-inset-bottom));
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  color: white;
  background: rgba(0, 0, 0, 0.86);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  text-align: center;
  transition: opacity 200ms var(--motion), transform 200ms var(--motion);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.has-action { pointer-events: auto; }
.toast-action {
  border: 0;
  background: transparent;
  color: white;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

@media (min-width: 600px) {
  :root { --page-gutter: 24px; }
  .title-bar {
    padding-left: calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--page-gutter) + env(safe-area-inset-right, 0px));
  }
  main {
    width: 100%;
    padding: 0
      calc(var(--page-gutter) + env(safe-area-inset-right, 0px))
      20px
      calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
    padding-bottom: calc(var(--bottom-tab) + 20px + env(safe-area-inset-bottom));
  }
  .hub-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: stretch;
  }
  .tool-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: 1.15fr 0.85fr; }
  .pairing-content { grid-template-columns: 180px 1fr; align-items: center; }
  .search-field { display: none; }
  body.search-open .search-field { display: flex; }
  body.search-open .title-default { display: block; }
  body:not([data-view="feed"]) .title-default { display: block; }
  .connection-state { display: flex; }
  .toast { left: auto; }
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .holdings-moves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .holdings-moves-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analysis-insights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .market-brief { grid-template-columns: 1fr 1fr; }
  .market-table-scroll,
  .holdings-table-scroll {
    margin-inline: calc(var(--page-gutter) * -1);
    padding-inline: var(--page-gutter);
  }
  .index-card { width: 168px; }
  .index-card strong { font-size: 18px; }
  .quote-name { font-size: 15px; line-height: 22px; }
  .quote-price { font-size: 15px; }
  .market-section-title h2 { font-size: 18px; }
  .index-bar { margin-left: 0; margin-right: 0; border-radius: var(--radius-card); border: 1px solid var(--comp-tertiary); }
}

@media (min-width: 840px) {
  .app-shell { display: block; }
  .side-nav { display: none; }
  .bottom-tab { display: grid; }
  .title-default { display: block; }
  .title-sub { display: none; }
  .title-bar {
    padding-left: calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--page-gutter) + env(safe-area-inset-right, 0px));
  }
  .search-field { max-width: none; }
  body.search-open .title-default { display: block; }
  body[data-view="feed"] .title-default { display: block; }
  body.search-open[data-view="feed"] .title-default { display: block; }
  main {
    width: 100%;
    max-width: none;
    padding: 0
      calc(var(--page-gutter) + env(safe-area-inset-right, 0px))
      20px
      calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
    padding-bottom: calc(var(--bottom-tab) + 20px + env(safe-area-inset-bottom));
  }
  .market-table-scroll,
  .holdings-table-scroll {
    margin-inline: calc(var(--space-10) * -1);
    padding-inline: var(--space-10);
  }
  .index-bar { bottom: var(--space-4); }
  .ask-live-chip {
    left: auto;
    right: var(--space-10);
    bottom: var(--space-10);
    width: min(360px, calc(100vw - 280px));
  }
  .connect-stack { grid-template-columns: 1.4fr 0.8fr; }
  .status-card { grid-column: 1 / -1; }
  .analysis-split { grid-template-columns: 1.55fr 1fr; }
  .analysis-split-dividend { grid-template-columns: 0.7fr 1.3fr; }
  .source-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .primary-button { border-radius: 12px; }
  .toast { right: var(--space-10); bottom: var(--space-10); }
}

@media (max-width: 599px) {
  :root { --page-gutter: 20px; }
  .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .source-hero { grid-template-columns: 1fr; padding: var(--space-5); }
  .hub-stream.is-quotes { grid-template-columns: 1fr 1fr; }
  .source-health { grid-template-columns: auto 1fr; align-items: baseline; gap: var(--space-2); min-width: 0; }
  .source-health strong { font-size: 22px; }
  .source-grid { grid-template-columns: 1fr; }
  .source-card { min-height: 150px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .primary-button { width: 100%; }
  .x-action-buttons { width: 100%; }
  .x-action-buttons .primary-button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
  .holdings-table {
    min-width: 0;
  }
  .holdings-table-scroll {
    overflow-x: hidden;
  }
  .quote-head.holdings-head,
  .quote-row.holdings-row {
    grid-template-columns: minmax(0, auto) max-content 1fr;
    gap: var(--space-2);
  }
  .quote-row.holdings-row {
    min-height: 62px;
    padding: 6px 0;
  }
  .holdings-row .holdings-name {
    max-width: 42vw;
  }
  .holdings-row .quote-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .holdings-px,
  .holdings-head .holdings-px {
    justify-self: start;
  }
  .holdings-day,
  .holdings-head .holdings-day {
    justify-self: end;
  }
  .holdings-qty-inline { display: inline; }
  .holdings-head .holdings-qty,
  .holdings-head .holdings-pct,
  .holdings-head .holdings-pnl,
  .holdings-row .holdings-qty,
  .holdings-row .holdings-pct,
  .holdings-row .holdings-pnl {
    display: none;
  }
  .holdings-px {
    min-width: 0;
    font-size: 13px;
  }
  .holdings-day {
    min-width: 88px;
  }
  .holdings-day strong { font-size: 14px; line-height: 18px; }
  .holdings-total { display: block; }
  .chip-tabs { margin: 0; }
  .ask-shell { gap: var(--space-3); }
  .ask-exchange { padding-bottom: var(--space-4); }
  .ask-answer, .ask-answer p, .ask-question { font-size: 15px; line-height: 1.6; }
  .ask-answer h2 { font-size: 16px; }
  .ask-answer h3 { font-size: 15px; }
  .ask-markdown-table-wrap table { font-size: 12px; }
  .ask-markdown-table-wrap th, .ask-markdown-table-wrap td { padding: 8px; }
  .ask-composer-row { flex-wrap: wrap; }
  .ask-composer-tools { flex-wrap: wrap; }
  .ask-agent-mode,
  .ask-web-mode { flex: none; }
  .ask-agent-mode select,
  .ask-web-mode select { max-width: none; }
  .ask-research-mode { flex: none; }
  .ask-ref-chip span, .ask-used-chip span {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* UX v2: denser reading, compact quotes, no 3-column amount squeeze. */
.muted { color: var(--font-tertiary); }
.ticker-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--comp-tertiary);
}
.hub-tick, .ticker-cell {
  min-width: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  text-align: left;
}
.hub-tick:nth-child(3n+1), .ticker-cell:nth-child(3n+1) { padding-left: 0; }
.hub-tick:nth-child(3n), .ticker-cell:nth-child(3n) { border-right: 0; }
.hub-tick + .hub-tick, .ticker-cell + .ticker-cell {
  padding-left: 8px;
  border-left: 1px solid var(--comp-tertiary);
}
.hub-tick:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.hub-tick small, .ticker-cell small {
  display: block;
  color: var(--font-tertiary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-tick strong, .ticker-cell b {
  display: block;
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hub-tick b { font-size: 12px; font-weight: 500; }
.agenda-peek { padding: 4px 0 8px; }
.compact-label, .timeline-day, .refresh-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
}
.compact-label h2 { margin: 0; font-size: 14px; }
.agenda-row, .event-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--comp-tertiary);
}
.agenda-row time, .event-row time {
  color: var(--font-tertiary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.agenda-row strong, .event-row h3, .event-row strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-row small, .event-row .event-meta {
  display: block;
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 1.5;
}
.dense-tabs {
  display: flex;
  gap: 16px;
  overflow: auto;
  scrollbar-width: none;
}
.dense-tabs button {
  flex: none;
  min-height: 40px;
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--font-tertiary);
  background: transparent;
  white-space: nowrap;
  font-size: 13px;
}
.dense-tabs button.is-active {
  color: var(--brand);
  border-bottom-color: transparent;
  font-weight: 650;
}
.timeline-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--comp-tertiary);
}
.timeline-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  gap: 8px;
  min-height: 66px;
  padding: 8px 0;
  border-bottom: 1px solid var(--comp-tertiary);
}
.timeline-clock {
  color: var(--font-tertiary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.timeline-copy { min-width: 0; }
.timeline-copy > button {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.timeline-copy h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.timeline-copy p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  color: var(--font-tertiary);
  font-size: 12px;
}
.timeline-row .row-action {
  width: 36px;
  min-height: 36px;
  align-self: start;
  border: 0;
  color: var(--font-tertiary);
  background: transparent;
}
.timeline-row.is-focus { background: #fffdfa; }
.source-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--comp-tertiary);
  background: transparent;
  text-align: left;
}
.source-letter {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--brand);
  background: #eef4ff;
  font-size: 12px;
}
.source-line strong { display: block; font-size: 13px; font-weight: 550; }
.source-line small { display: block; color: var(--font-tertiary); font-size: 12px; line-height: 1.5; }
.source-toggle {
  min-width: 46px;
  min-height: 40px;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-size: 12px;
}
.source-toggle[aria-pressed="false"] { color: var(--font-tertiary); }
.search-box {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 12px 0 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--background-secondary);
}
.search-box input { width: 100%; border: 0; background: transparent; outline: none; }
.social-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 4px;
  color: var(--font-tertiary);
  font-size: 12px;
}
.source-read-state {
  margin: 0 0 6px;
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 1.6;
}
.post-save, .post-cite, .icon-button {
  min-width: 44px;
  min-height: 44px;
}
.post-save, .post-cite { width: 44px; height: 44px; }
.capture {
  margin: 12px 0 8px;
  padding: 12px 14px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
}
.capture textarea {
  width: 100%;
  min-height: 52px;
  max-height: 210px;
  padding: 0;
  border: 0;
  outline: none;
  resize: vertical;
  line-height: 1.65;
}
.capture-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.attachment-draft {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}
.attachment-draft.hidden { display: none; }
.attachment-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f1ea;
}
.attachment-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attachment-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 16, 12, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
}
.attachment-view {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.attachment-view a,
.attachment-view img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}
.attachment-missing {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--comp-tertiary);
  color: var(--font-tertiary);
  font-size: 11px;
  text-align: center;
}
.dispatch-composer {
  position: relative;
  z-index: 16;
  margin: 8px 0 12px;
}
.dispatch-box {
  padding: 10px 12px 8px;
  border: 0;
  border-radius: 22px;
  background: var(--background-secondary);
}
.dispatch-box:focus-within {
  background: #eceff3;
}
.dispatch-composer textarea {
  width: 100%;
  min-height: 22px;
  max-height: 120px;
  padding: 2px 2px 6px;
  border: 0;
  background: transparent;
  outline: none;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
}
.dispatch-composer textarea:focus {
  box-shadow: none;
  outline: none;
}
.dispatch-composer .note-share-source {
  margin: 0 0 8px;
}
.dispatch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
}
.dispatch-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.dispatch-pop { position: relative; }
.dispatch-icon-btn,
.dispatch-target-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--font-secondary);
  cursor: pointer;
}
.dispatch-icon-btn {
  width: 36px;
  min-width: 36px;
  border-radius: 50%;
}
.dispatch-icon-btn svg,
.dispatch-menu svg {
  width: 18px;
  height: 18px;
}
.dispatch-icon-btn[aria-expanded="true"],
.dispatch-icon-btn:hover {
  background: color-mix(in srgb, var(--font-primary) 6%, transparent);
}
.dispatch-target-btn {
  padding: 0 8px 0 6px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.dispatch-target-btn[aria-expanded="true"],
.dispatch-target-btn:hover {
  background: color-mix(in srgb, var(--font-primary) 6%, transparent);
}
.dispatch-chevron {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
}
.dispatch-chevron svg {
  width: 14px;
  height: 14px;
}
.dispatch-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 168px;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--font-primary) 12%, transparent);
}
.dispatch-menu.hidden,
.dispatch-menu button.hidden { display: none; }
.dispatch-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--font-primary);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.dispatch-menu button:hover,
.dispatch-menu button.is-on,
.dispatch-menu button[aria-pressed="true"] {
  background: var(--comp-tertiary);
}
.dispatch-menu button[aria-pressed="true"] { color: var(--brand); }
body[data-view="inspire"]:not([data-inspire-detail="1"]) main {
  padding-bottom: calc(var(--bottom-tab) + 148px + env(safe-area-inset-bottom));
}
body[data-view="inspire"] .dispatch-composer:not(.task-continue) {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--bottom-tab) + env(safe-area-inset-bottom));
  z-index: 18;
  margin: 0;
  padding: 8px
    calc(var(--page-gutter) + env(safe-area-inset-right, 0px))
    10px
    calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
  background: #fff;
  border-top: 1px solid var(--comp-tertiary);
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--font-primary) 6%, transparent);
}
body[data-view="inspire"] .dispatch-composer.hidden { display: none; }
.task-continue {
  position: relative;
  margin: 16px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.task-continue h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
@media (min-width: 700px) {
  body[data-view="inspire"] .dispatch-box {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}
.return-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 56px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #f0e5d4;
  border-radius: 12px;
  background: #fff8ed;
  text-align: left;
}
.return-entry strong { font-size: 13px; }
.return-entry small { color: #7f6846; font-size: 12px; }
.note-card.is-focus {
  border: 1px solid #e8dcc7;
  background: linear-gradient(110deg, #fffdfa, #fff 75%);
}
.note-card-body {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.note-card-body h3 {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.7;
}
.note-card .note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--comp-tertiary);
}
.source-preview {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 2px solid #d8dfea;
  border-radius: 0 8px 8px 0;
  background: var(--background-secondary);
  color: var(--font-secondary);
  font-size: 12px;
  line-height: 1.65;
}
.ask-session-item {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--comp-tertiary);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}
.ask-session-item .session-preview {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--font-secondary);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ask-session-item .session-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--font-tertiary);
  font-size: 12px;
}
.ask-session-item.is-live {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--comp-tertiary));
  background: color-mix(in srgb, var(--brand) 6%, #fff);
}
.prompt-strip {
  display: flex;
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
  padding: 6px 0 8px;
}
.prompt-strip button {
  flex: none;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid var(--comp-tertiary);
  border-radius: 8px;
  background: #fff;
  white-space: nowrap;
  font-size: 12px;
}
.material-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 8px 0;
  border-bottom: 1px solid var(--comp-tertiary);
}
.material-copy {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.material-copy h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 550;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.material-meta { color: var(--font-tertiary); font-size: 12px; }
.select-material {
  width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  color: var(--font-tertiary);
  background: transparent;
}
.select-material.is-on { color: var(--brand); background: #eef4ff; }
.ask-composer textarea[name="question"] {
  width: 100%;
  min-height: 48px;
  max-height: 160px;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  resize: vertical;
  font-size: 15px;
  line-height: 1.6;
}
.compose-box {
  padding: 8px 10px 4px;
  border: 1px solid #d6e0f0;
  border-radius: 12px;
  background: #fff;
}
.composer-note {
  margin: 4px 0 0;
  color: var(--font-tertiary);
  font-size: 11px;
  text-align: center;
}
.holdings-line {
  container-type: inline-size;
}
.holdings-line-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.holdings-line-head h3 { margin: 0; }
.holdings-line-head strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.holdings-line-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.holdings-line-metric strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.holdings-line-metric .day-amount { font-size: 16px; font-weight: 650; }
.holdings-native {
  margin-top: 6px;
  color: var(--font-tertiary);
  font-size: 11px;
  line-height: 1.5;
}
.market-table { min-width: 0; width: 100%; }
.market-head, .market-row {
  grid-template-columns: minmax(0, 1fr) 60px 108px;
}
.market-row .quote-price,
.market-row .quote-change { text-align: right; }
.market-row .q-price {
  text-align: right;
  white-space: nowrap;
}
.market-row .q-price strong { display: block; font-size: 15px; }
.market-row .q-price b { display: block; font-size: 12px; font-weight: 500; }
.market-spark { width: 60px; height: 24px; }
.market-row .market-meta { display: none; }
.reader-dialog { max-width: min(720px, calc(100vw - 16px)); }
.reader-title { font-size: 22px; line-height: 1.5; overflow-wrap: anywhere; }
.reader-content { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; user-select: text; }
.reader-notice {
  padding: 10px;
  border-radius: 8px;
  background: #fff6e6;
  color: #76501d;
  font-size: 13px;
  line-height: 1.65;
}
.reader-bottom { display: flex; flex-wrap: wrap; gap: 8px; }
#source-tasks-body .chip-tabs {
  gap: 16px;
  margin: 4px 0 10px;
}
#source-tasks-body .task-run {
  width: 100%;
  margin: 4px 0 0;
}
#source-tasks-body .task-run-note {
  margin: 8px 0 12px;
}
.task-row, .picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--comp-tertiary);
  background: transparent;
  text-align: left;
}
.auto-chain {
  padding: 12px;
  border-radius: 12px;
  background: var(--background-secondary);
  font-size: 13px;
  line-height: 1.7;
}
@media (min-width: 700px) {
  .overview-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    column-gap: 24px;
    align-items: start;
  }
  .dashboard-market { grid-column: 1; grid-row: 1; }
  .dashboard-upcoming { grid-column: 1; grid-row: 2; }
  .dashboard-feed { grid-column: 2; grid-row: 1 / span 2; }
  .latest-head { margin-top: 0; border-top: 0; }
  .overview-subnav.is-on { margin: 0 calc(var(--page-gutter) * -1); padding: 0 var(--page-gutter); }
}
@media (max-width: 599px) {
  .ticker-strip { gap: 7px; }
  .market-head .spark-head,
  .market-row .market-spark { display: none; }
  .market-head, .market-row { grid-template-columns: minmax(0, 1fr) 108px; }
  .holdings-line-metric strong { font-size: 13px; }
}
@container (max-width: 22rem) {
  .holdings-line-metrics { grid-template-columns: 1fr; }
  .holdings-line-head { display: block; }
  .holdings-line-head strong { display: block; margin-top: 4px; }
  .holdings-line-metric strong { white-space: normal; overflow-wrap: anywhere; }
}
@container (max-width: 19rem) {
  .ticker-strip { grid-template-columns: 1fr 1fr; }
  .hub-tick { border: 0; padding: 5px; }
}

.mini-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 29px;
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 1.5;
}
.mini-status .text-button { min-height: 36px; font-size: inherit; color: var(--brand); }
.source-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  border-bottom: 1px solid var(--comp-tertiary);
}
.source-control .channel-tabs { flex: 1; }
.section-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  align-items: center;
}
.latest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  border-top: 1px solid var(--comp-tertiary);
}
.latest-head h2 { margin: 0; font-size: 15px; }
.post-card.is-compact {
  position: relative;
  padding: 8px 0;
}
.post-card.is-compact .post-card-head { align-items: center; }
.post-card.is-compact .post-meta { font-size: 11px; min-height: 18px; margin-bottom: 3px; }
.post-card.is-compact .post-author,
.post-card.is-compact .post-cite { display: none; }
.post-card.is-compact h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.post-card.is-compact .post-excerpt { -webkit-line-clamp: 1; }
.post-card.is-compact .post-time { margin-left: auto; white-space: nowrap; }
.post-card.is-compact .focus-btn {
  position: absolute;
  right: -6px;
  top: 28px;
  width: 40px;
  min-width: 40px;
  height: 40px;
  color: #9da4af;
  background: transparent;
}
.post-card.is-compact .focus-btn.on { color: #94611c; }
.post-card.is-compact .feed-content { display: block; width: 100%; padding: 0 33px 0 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.timeline-row {
  display: block;
  position: relative;
  min-height: 0;
  padding: 8px 0;
}
.timeline-row .timeline-clock { display: none; }
.timeline-row .feed-content { padding-right: 33px; }
.market-row { cursor: pointer; }
.detail-shell { min-width: 0; max-width: 100%; }
.detail-head,
.page-article .reader-head { padding: 12px 0 8px; }
.detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 1.6;
}
.detail-title,
.page-article .reader-head h2,
.page-article .detail-head h2 {
  margin: 0;
  max-width: 100%;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-meta,
.reader-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin-top: 8px;
  color: var(--font-tertiary);
  font-size: 12px;
  line-height: 1.8;
}
.detail-meta .text-button,
.reader-meta .text-button { min-height: 0; padding: 0; font-size: inherit; font-weight: 500; }
.detail-meta a.kind-tag,
.reader-meta a.kind-tag { text-decoration: none; }
.detail-meta a.kind-tag:hover,
.reader-meta a.kind-tag:hover { text-decoration: underline; }
.detail-body,
.reader-content {
  max-width: 100%;
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 4px 0 12px;
}
.detail-tags,
.page-article .tags { margin: 14px 0 0; }
.detail-section {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--comp-tertiary);
}
.detail-section-title {
  margin: 0 0 8px;
  color: var(--font-primary);
  font-size: 15px;
  font-weight: 650;
}
.detail-surface,
.detail-surface-subtle,
.article-analysis,
.body-state {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--background-secondary);
}
.detail-surface-subtle {
  background: color-mix(in srgb, var(--background-secondary) 68%, var(--background-primary));
}
.article-analysis { margin: 16px 0 0; }
.article-analysis h3,
.body-state strong { display: block; margin: 0 0 8px; font-size: 15px; }
.body-state {
  margin: 12px 0;
  line-height: 1.8;
  font-size: 14px;
}
.detail-actions,
.reader-bar,
.content-tools {
  display: flex;
  gap: 2px;
  align-items: stretch;
  margin-top: 8px;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--comp-tertiary);
}
.detail-actions button,
.reader-bar button {
  flex: 1;
  min-width: 0;
  min-height: 58px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}
.detail-actions button span,
.reader-bar button span { display: block; overflow-wrap: anywhere; }
.detail-actions button svg,
.reader-bar button svg { width: 21px; height: 21px; flex: none; }
.detail-actions button.is-primary,
.reader-bar button.is-primary { color: var(--brand); font-weight: 650; }
.detail-actions button.is-focus-on,
.reader-bar button.is-focus-on { color: #94611c; }
.detail-actions.is-inline,
.content-tools {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 0;
  padding-top: 4px;
}
.detail-actions.is-inline button {
  flex: 0 0 auto;
  min-width: 72px;
}
.metadata-grid { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px 14px; margin: 16px 0; font-size: 13px; }
.metadata-grid dt { color: var(--font-tertiary); }
.metadata-grid dd { margin: 0; overflow-wrap: anywhere; }
.setting-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--comp-tertiary);
  padding: 10px 0;
  background: transparent;
}
.setting-row strong { display: block; font-size: 14px; }
.setting-row small { display: block; margin-top: 3px; font-size: 12px; color: var(--font-tertiary); line-height: 1.6; }
.task-item {
  width: 100%;
  min-height: 80px;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--comp-tertiary);
  background: transparent;
  text-align: left;
}
.task-status { display: inline-block; background: var(--background-secondary); padding: 1px 6px; border-radius: 5px; font-size: 11px; }
.task-status.running { background: #edf3ff; color: var(--brand); }
.task-status.failed { background: #fff0ed; color: var(--warning); }
.task-status.completed { color: var(--confirm); }
.quote-detail .last { font-size: 2rem; font-weight: 700; margin-top: 12px; }
.quote-detail .change { font-size: 1rem; margin: 4px 0 12px; }
.large-spark { width: 100%; height: 110px; margin: 14px 0; }
.privacy-mask .num, .privacy-on .total-value, .privacy-on .day-amount, .privacy-on .quote-name + small { letter-spacing: 1px; }
.feed-expand { min-height: 32px; font-size: 12px; color: var(--brand); border: 0; background: transparent; }
.kind-tag { font-size: 11px; line-height: 1.45; display: inline-block; padding: 1px 5px; border-radius: 4px; background: var(--background-secondary); color: var(--font-tertiary); }
.kind-tag.official { background: #edf3ff; color: var(--brand); }
.check-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--comp-tertiary); font-size: 13px; }
.field { display: block; padding: 9px 0; font-size: 13px; }
.field span { display: block; color: var(--font-tertiary); font-size: 12px; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--comp-tertiary);
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--background-secondary);
}
.source-group-name {
  padding: 9px 0 5px;
  font-size: 12px;
  color: var(--font-tertiary);
  font-weight: 650;
}
.source-line { min-height: 69px; }
.source-state.ready { color: var(--confirm); }
.source-state.partial { color: #94611c; }
.source-state.unavailable { color: var(--warning); }
.source-state.unchecked { color: var(--font-tertiary); }
body[data-view="page"] .overview-subnav { display: none; }
.icon-close { font-size: 0; }
.event-time { font-size: 1.3rem; margin: 10px 0; }
.material-count { font-size: 12px; color: var(--font-tertiary); }

@media (min-width: 700px) {
  .overview-subnav.is-on { margin: 0 calc(var(--page-gutter) * -1); padding: 0 var(--page-gutter); }
}
dialog { position: relative; }
.post-actions .icon-button,
.post-actions .post-save,
.post-actions .post-cite,
.post-actions .focus-btn { min-width: 40px; min-height: 44px; }

body[data-view="ask"][data-ask-layer="session"] {
  overflow: hidden;
}
body[data-view="ask"][data-ask-layer="session"] .app-frame {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
body[data-view="ask"][data-ask-layer="session"] .title-bar {
  flex: none;
}
body[data-view="ask"][data-ask-layer="session"] main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-left: calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--page-gutter) + env(safe-area-inset-right, 0px));
  padding-bottom: calc(var(--bottom-tab) + env(safe-area-inset-bottom));
}
body[data-view="ask"][data-ask-layer="session"] #view-ask.is-active {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
body[data-view="ask"][data-ask-layer="session"] .ask-shell {
  flex: 1;
  width: 100%;
  max-width: var(--ask-column);
  min-width: 0;
  min-height: 0;
  margin-inline: auto;
  padding-bottom: 0;
}
body[data-view="ask"][data-ask-layer="session"] .ask-thread {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  padding-bottom: 12px;
}
body[data-view="ask"][data-ask-layer="session"] .ask-composer {
  flex: none;
  position: static;
  z-index: 6;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 0 4px;
  gap: 8px;
  border-radius: 0;
  background: var(--background-primary);
  border-top: 0;
  box-shadow: none;
}
.ask-composer.is-compact {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  gap: 0 !important;
}
.ask-composer.is-compact .ask-ref-chips,
.ask-composer.is-compact .ask-ref-actions,
.ask-composer.is-compact .ask-composer-tools {
  display: none !important;
}
.ask-composer.is-compact .compose-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 18px;
}
.ask-composer.is-compact textarea[name="question"] {
  grid-column: 1;
  width: 100%;
  height: 28px !important;
  min-height: 28px;
  max-height: 28px;
  padding: 2px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ask-composer.is-compact .ask-composer-row {
  grid-column: 2;
  min-height: 32px;
}
.ask-composer.is-compact .ask-send {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}
body.is-ask-keyboard .bottom-tab,
body.is-ask-keyboard .ask-live-chip {
  visibility: hidden;
  pointer-events: none;
}
.ask-composer .compose-box {
  padding: 10px 12px 8px;
  border: 0;
  border-radius: 22px;
  background: var(--background-secondary);
}
.ask-composer .compose-box:focus-within {
  background: #eceff3;
}
.ask-composer textarea[name="question"] {
  min-height: 22px;
  max-height: 120px;
  padding: 2px 2px 6px;
  border: 0;
  background: transparent;
  outline: none;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
}
.ask-composer textarea[name="question"]:focus,
.ask-web-mode select:focus {
  box-shadow: none;
  background: transparent;
  outline: none;
}
.ask-composer-row {
  min-height: 40px;
  justify-content: space-between;
}
.ask-web-mode select {
  height: 32px;
  max-width: none;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  color: var(--font-secondary);
  background: transparent;
  font-size: 13px;
}
.ask-research-mode {
  min-height: 40px;
  padding: 0;
  background: transparent;
  font-size: 12px;
}
.ask-send {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 50%;
}
.ask-send svg { width: 18px; height: 18px; }
@media (max-width: 699px) {
  body[data-view="ask"][data-ask-layer="session"] .ask-thread {
    padding-bottom: 132px;
  }
  body.is-ask-composer-compact[data-view="ask"][data-ask-layer="session"] .ask-thread {
    padding-bottom: 64px;
  }
  body[data-view="ask"][data-ask-layer="session"] .ask-composer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-tab) + env(safe-area-inset-bottom) + var(--ask-kb, 0px));
    z-index: 18;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 8px
      calc(var(--page-gutter) + env(safe-area-inset-right, 0px))
      10px
      calc(var(--page-gutter) + env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid var(--comp-tertiary);
    box-shadow: 0 -8px 24px color-mix(in srgb, var(--font-primary) 6%, transparent);
  }
  body.is-ask-keyboard[data-view="ask"][data-ask-layer="session"] .ask-composer {
    bottom: var(--ask-kb, 0px);
    padding-bottom: 8px;
    box-shadow: none;
  }
  body.is-ask-composer-compact[data-view="ask"][data-ask-layer="session"] .ask-composer {
    padding: 4px 10px 6px;
    box-shadow: 0 -4px 12px color-mix(in srgb, var(--font-primary) 4%, transparent);
  }
}
@media (min-width: 700px) {
  body[data-view="ask"][data-ask-layer="session"] .ask-exchange {
    padding: var(--space-5) var(--space-6);
  }
  body[data-view="ask"][data-ask-layer="session"] .ask-question {
    font-size: 18px;
  }
  body[data-view="ask"][data-ask-layer="session"] .ask-answer,
  body[data-view="ask"][data-ask-layer="session"] .ask-answer p {
    font-size: 15px;
    line-height: 1.7;
  }
}


