/* MARQVIEW Command UI — reference-led visual system. Display layer only. */
:root {
  color-scheme: dark;
  --af-bg-0: #060a10;
  --af-bg-1: #09111a;
  --af-bg-2: #0d1722;
  --af-bg-3: #111d29;
  --af-border: rgba(137, 178, 216, .16);
  --af-border-strong: rgba(62, 166, 255, .34);
  --af-text-primary: #edf5ff;
  --af-text-secondary: #94a8bc;
  --af-text-muted: #60758a;
  --af-blue: #3ea6ff;
  --af-blue-2: #5d7cff;
  --af-cyan: #27d7ff;
  --af-positive: #22d3a6;
  --af-negative: #ff5c70;
  --af-warning: #f7bb55;
  --af-radius: 9px;
  --bg: var(--af-bg-0);
  --surface: var(--af-bg-1);
  --surface-2: var(--af-bg-2);
  --line: var(--af-border);
  --text: var(--af-text-primary);
  --muted: var(--af-text-secondary);
  --accent: var(--af-blue);
  --accent-2: #2588df;
  --danger: var(--af-negative);
  --warn: var(--af-warning);
  --radius: var(--af-radius);
}

html { background: var(--af-bg-0); }
body {
  background:
    radial-gradient(circle at 74% -12%, rgba(29, 89, 151, .20), transparent 31rem),
    linear-gradient(180deg, #07101a 0, var(--af-bg-0) 46rem);
  color: var(--af-text-primary);
  font-family: Inter, Geist, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.shell { grid-template-columns: 188px minmax(0, 1fr); }
.sidebar {
  z-index: 30;
  padding: 18px 12px;
  border-right-color: var(--af-border);
  background: rgba(6, 12, 19, .97);
  box-shadow: 10px 0 36px rgba(0, 0, 0, .18);
}
.brand { gap: 10px; min-height: 70px; padding: 2px 8px 20px; }
.brand-mark {
  width: 40px; height: 40px; border: 0; border-radius: 7px;
  background: linear-gradient(150deg, #72d1ff 3%, #3087ff 55%, #2947a5 100%);
  box-shadow: 0 0 24px rgba(62, 166, 255, .20);
  color: #06101b; font-weight: 950; font-style: italic; letter-spacing: -.08em;
}
.brand strong { font-size: 14px; letter-spacing: .03em; }
.brand small { color: #6d849a; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.nav { gap: 4px; }
.nav-section-label { margin: 17px 10px 5px; color: #4d657c; font-size: 9px; letter-spacing: .15em; }
.nav-item {
  position: relative; min-height: 40px; padding: 10px 12px; border-radius: 6px;
  color: #8ca1b5; font-size: 12px; gap: 10px;
}
.nav-item span { width: 18px; color: #728ba3; text-align: center; }
.nav-item:hover { background: rgba(62, 166, 255, .055); color: var(--af-text-primary); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(43, 142, 239, .27), rgba(43, 142, 239, .07));
  color: #eef7ff;
}
.nav-item.active::before {
  content: ""; position: absolute; inset: 0 auto 0 -12px; width: 2px;
  background: var(--af-blue); box-shadow: 0 0 10px rgba(62, 166, 255, .8);
}
.nav-item.active span { color: #77c8ff; }
.system-chip { color: #5d7489; font-size: 10px; letter-spacing: .09em; }
.system-chip i { background: var(--af-positive); box-shadow: 0 0 9px rgba(34, 211, 166, .65); }

main { max-width: 1680px; padding: 0 18px 54px; }
.topbar {
  position: sticky; top: 0; z-index: 25; min-height: 58px; margin: 0 0 10px;
  border-bottom-color: var(--af-border); background: rgba(6, 12, 19, .93);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.topbar-title-block { display: flex; align-items: center; flex: 1; min-width: 0; gap: 14px; }
.topbar-context, .topbar-title-line h1 { display: none; }
.topbar-title-line { min-width: 0; }
.global-search {
  display: flex; align-items: center; gap: 8px; width: min(410px, 45vw); height: 34px;
  padding: 0 11px; border: 1px solid var(--af-border); border-radius: 7px;
  background: #0b1520; transition: border-color .2s ease, background .2s ease;
}
.global-search:focus-within { border-color: var(--af-border-strong); background: #0d1925; }
.global-search svg { width: 14px; height: 14px; fill: none; stroke: #8aa0b5; stroke-width: 1.8; }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--af-text-primary); font-size: 11px; }
.global-search input::placeholder { color: #5d7286; }
.topbar-market-state { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-left: auto; color: #8096aa; font-size: 10px; white-space: nowrap; }
.topbar-market-state strong { color: #d8e4ef; font-size: 11px; font-weight: 650; }
.market-open { display: inline-flex; align-items: center; gap: 6px; color: var(--af-positive); }
.market-open i { width: 7px; height: 7px; border: 1px solid #65e6c5; border-radius: 50%; background: #1ea983; box-shadow: 0 0 9px rgba(34, 211, 166, .55); }
.market-open.closed { color: #8096aa; }
.market-open.closed i { border-color: #7d8c9b; background: #4e6070; box-shadow: none; }
.market-venues { color: #63788c; letter-spacing: .05em; }
.topbar-alert-button { position: relative; width: 30px; height: 30px; border: 0; background: transparent; color: #a6b8c8; cursor: pointer; }
.topbar-alert-button i { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--af-negative); }
.account-menu-wrap { margin-left: 8px; }
.account-button { border-color: var(--af-border); border-radius: 7px; background: #0b1520; padding: 4px 8px 4px 4px; }
.account-avatar { border-radius: 6px; background: #173c5b; color: #9bd8ff; }
.account-menu { border-color: var(--af-border-strong); border-radius: 8px; background: #09131e; }

.eyebrow { color: var(--af-blue); letter-spacing: .16em; font-size: 9px; }
.panel, .hero-card, .home-section, .pulse-panel {
  border: 1px solid var(--af-border);
  border-radius: var(--af-radius);
  background: linear-gradient(145deg, rgba(13, 24, 35, .97), rgba(8, 16, 25, .98));
  box-shadow: none;
}
.panel:hover, .home-section:hover, .pulse-panel:hover { border-color: rgba(62, 166, 255, .22); }
.primary { border-radius: 6px; background: #237dc6; color: white; }
.secondary { border-color: var(--af-border); border-radius: 6px; background: #0b1722; color: #b9c8d7; }
.status, .private-badge, .verdict, .stage-pill, .health-pill { border-radius: 4px; }

/* Home command center */
.view#view-home .eyebrow { font-size: 10px; }
.command-hero {
  position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 126px;
  padding: 18px 22px; overflow: hidden; border: 1px solid rgba(72, 141, 208, .25); border-radius: var(--af-radius);
  background:
    radial-gradient(ellipse at 65% 110%, rgba(40, 139, 231, .35), transparent 46%),
    linear-gradient(90deg, #0b1521 0%, #081421 48%, #07101a 100%);
}
.command-hero::before {
  content: ""; position: absolute; width: 560px; height: 250px; right: 12%; bottom: -195px;
  border: 1px solid rgba(53, 161, 255, .36); border-radius: 50%; transform: rotate(-7deg);
  box-shadow: 0 0 42px rgba(32, 120, 210, .18), inset 0 0 42px rgba(32, 120, 210, .15);
}
.command-hero::after {
  content: ""; position: absolute; inset: 0; opacity: .34; pointer-events: none;
  background-image: linear-gradient(rgba(56, 139, 216, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 139, 216, .08) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(90deg, transparent 32%, #000 72%, transparent);
}
.command-hero-copy, .command-hero-mantra { position: relative; z-index: 1; }
.command-hero-copy h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(29px, 3.1vw, 48px); line-height: .98; letter-spacing: -.035em; color: #eaf3ff; text-shadow: 0 0 18px rgba(84, 163, 255, .18); }
.command-hero-copy>p:last-child { margin: 8px 0 0; color: #c0d5e8; font-size: clamp(12px, 1.2vw, 16px); }
.command-hero-mantra { display: grid; gap: 5px; color: #6f91b1; font-size: 8px; letter-spacing: .22em; text-align: right; }

.home-market-strip { margin: 9px 0; padding: 14px; overflow: hidden; border: 1px solid var(--af-border); border-radius: var(--af-radius); background: #09141f; }
.home-market-strip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; padding-bottom: 9px; border-bottom: 1px solid rgba(132, 170, 205, .10); }
.home-market-strip-head h2 { margin: 2px 0 0; font-size: 17px; }
.home-market-edit { min-height: 32px; padding: 6px 11px; font-size: 11px; }
.home-market-overview { display: grid; grid-template-columns: repeat(8, minmax(125px, 1fr)); gap: 7px; overflow-x: auto; scrollbar-width: none; }
.home-market-overview::-webkit-scrollbar { display: none; }
.command-market-card {
  position: relative; min-width: 0; min-height: 82px; padding: 10px 11px; overflow: hidden;
  border: 1px solid var(--af-border); border-radius: 7px; background: #0c1722; color: var(--af-text-primary); text-align: left; cursor: pointer;
}
.command-market-card:hover { border-color: var(--af-border-strong); background: #0e1b28; }
.command-market-card-head { display: flex; justify-content: space-between; gap: 5px; color: #cad8e5; font-size: 11px; }
.command-market-card-head span { color: #536d85; font-size: 9px; }
.command-market-card>b { display: block; margin-top: 8px; font-size: 18px; letter-spacing: -.02em; }
.command-market-card>small { display: block; margin-top: 2px; font-size: 11px; font-weight: 750; }
.command-market-card.up>small { color: var(--af-positive); }
.command-market-card.down>small { color: var(--af-negative); }
.command-market-spark { position: absolute; right: 8px; bottom: 11px; display: flex; align-items: flex-end; gap: 2px; width: 45px; height: 25px; opacity: .85; }
.command-market-spark i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: currentColor; }
.command-market-card.up .command-market-spark { color: var(--af-positive); }
.command-market-card.down .command-market-spark { color: var(--af-negative); }
.command-market-card.skeleton { border-color: transparent; background: linear-gradient(100deg, #0b1620 20%, #112131 38%, #0b1620 56%); background-size: 300% 100%; animation: af-skeleton 1.4s ease infinite; }
@keyframes af-skeleton { to { background-position-x: -150%; } }

.home-command-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.home-intelligence-grid { display: grid; grid-template-columns: minmax(350px, 1.35fr) minmax(300px, .9fr) minmax(300px, .9fr); gap: 9px; margin-top: 9px; }
.home-section { margin: 0; padding: 14px; }
.home-section-head { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(132, 170, 205, .10); }
.home-section-head h2 { font-size: 17px; letter-spacing: .01em; }
.home-section-head>span, .home-section-head small { color: #6f8498; font-size: 10px; }
.home-link { color: #78bff7; font-size: 10px; }
.home-daily-comment-section { min-height: 275px; }
.home-comment-prose { padding: 3px 2px 0; border: 0; background: transparent; }
.home-comment-prose p { color: #afc0d0; font-size: 13px; line-height: 1.78; }
.home-comment-prose p:first-child { color: #e4edf5; font-size: 15px; font-weight: 650; }
.home-comment-prose-line { padding-top: 6px; border-top: 1px solid rgba(132, 170, 205, .10); }
.home-comment-prose-line strong { color: #dbe8f4; }
.home-asset-ranking-section {
  margin-top: 9px; overflow: hidden; border-color: rgba(72, 141, 208, .22);
  background: linear-gradient(145deg, rgba(10, 22, 33, .98), rgba(7, 16, 25, .99));
  box-shadow: inset 0 1px 0 rgba(98, 177, 248, .025);
}
.home-asset-ranking-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid rgba(132, 170, 205, .10); }
.home-asset-ranking-head h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: .01em; }
.home-asset-ranking-period { display: grid; justify-items: end; gap: 1px; color: #6e8498; text-align: right; }
.home-asset-ranking-period strong { padding: 3px 8px; border: 1px solid rgba(62, 166, 255, .30); border-radius: 4px; background: rgba(62, 166, 255, .10); color: #9ed4ff; font-size: 11px; letter-spacing: .12em; }
.home-asset-ranking-period span { margin-top: 3px; color: #6f8ca7; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.home-asset-ranking-period small { color: #506b83; font-size: 9px; }
.home-asset-ranking { display: grid; gap: 0; }
.home-ranking-row { display: grid; grid-template-columns: 34px minmax(180px, .8fr) minmax(120px, 1.4fr) 78px; align-items: center; gap: 10px; min-height: 43px; padding: 6px 4px; border-bottom: 1px solid rgba(132, 170, 205, .075); font-variant-numeric: tabular-nums; }
.home-ranking-row:last-child { border-bottom: 0; }
.home-ranking-rank { color: #627a91; font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.home-ranking-row.top .home-ranking-rank { color: #77c4ff; text-shadow: 0 0 10px rgba(62, 166, 255, .24); }
.home-ranking-identity { display: flex; min-width: 0; align-items: center; gap: 9px; }
.home-ranking-icon { flex: 0 0 auto; width: 9px; height: 9px; border: 1px solid rgba(122, 201, 255, .65); border-radius: 50%; background: rgba(50, 151, 230, .32); box-shadow: 0 0 8px rgba(51, 156, 241, .12); }
.home-ranking-icon.category-commodities { border-color: rgba(240, 188, 77, .70); background: rgba(240, 188, 77, .38); }
.home-ranking-icon.category-equities { border-radius: 2px; }
.home-ranking-icon.category-bonds, .home-ranking-icon.category-cash { border-color: rgba(125, 189, 184, .65); background: rgba(59, 150, 145, .30); }
.home-ranking-icon.category-crypto { border-color: rgba(244, 151, 57, .75); background: rgba(244, 151, 57, .38); }
.home-ranking-identity>span { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.home-ranking-identity strong { overflow: hidden; color: #dbe7f1; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.home-ranking-identity small { overflow: hidden; color: #536d84; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.home-ranking-bar { height: 5px; overflow: hidden; border-radius: 1px; background: rgba(119, 153, 183, .08); }
.home-ranking-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(24, 165, 120, .50), var(--af-positive)); box-shadow: 0 0 8px rgba(31, 211, 151, .13); }
.home-ranking-row.negative .home-ranking-bar i { background: linear-gradient(90deg, rgba(189, 57, 70, .46), var(--af-negative)); }
.home-ranking-return { color: var(--af-positive); font-size: 14px; text-align: right; }
.home-ranking-row.negative .home-ranking-return { color: var(--af-negative); }
.home-asset-ranking-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; padding-top: 8px; border-top: 1px solid rgba(132, 170, 205, .08); color: #526c83; font-size: 9px; }
.home-ranking-unavailable { margin: 0; padding: 24px 8px; color: #8296a9; font-size: 12px; text-align: center; }
.home-ranking-row.skeleton { grid-template-columns: 28px minmax(150px, .8fr) minmax(120px, 1.4fr); min-height: 43px; }
.home-ranking-row.skeleton i, .home-ranking-row.skeleton span, .home-ranking-row.skeleton b { display: block; height: 8px; border-radius: 2px; background: linear-gradient(100deg, #10202e 20%, #172d40 38%, #10202e 56%); background-size: 300% 100%; animation: af-skeleton 1.4s ease infinite; }
.home-ranking-row.skeleton i { width: 18px; }
.home-ranking-row.skeleton b { width: 66%; }
.home-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.home-pulse-card { min-height: 104px; padding: 11px; border-color: rgba(132, 170, 205, .12); border-radius: 7px; background: #0a1520; }
.home-pulse-head span { color: #89a0b5; font-size: 11px; }
.home-pulse-head strong { color: #e7f2fb; font-size: 22px; }
.home-pulse-status { color: #d7e4ef; font-size: 12px; }
.home-pulse-gauge { height: 3px; background: #142637; }
.home-pulse-gauge i { background: var(--af-blue); }
.home-pulse-card.score-high .home-pulse-gauge i { background: var(--af-positive); }
.home-pulse-card.score-low .home-pulse-gauge i { background: var(--af-negative); }
.home-pulse-card small { color: #5f768b; font-size: 10px; }

.home-watchlist { gap: 0; }
.home-market-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 46px; padding: 7px 4px; border: 0; border-bottom: 1px solid rgba(132, 170, 205, .09); border-radius: 0; background: transparent; }
.home-market-row:hover { background: rgba(62, 166, 255, .04); }
.home-market-identity strong { font-size: 11px; }
.home-market-identity small { color: #6e8396; font-size: 9px; }
.home-market-value strong { font-size: 12px; }
.home-market-value small { font-size: 10px; }
.home-latest-news { display: grid; gap: 0; }
.home-news-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 3px 8px; padding: 8px 3px; border: 0; border-bottom: 1px solid rgba(132, 170, 205, .09); background: transparent; color: var(--af-text-primary); text-align: left; cursor: pointer; }
.home-news-row:hover { background: rgba(62, 166, 255, .04); }
.home-news-row time { grid-row: 1 / 3; color: #6c8195; font-size: 9px; }
.home-news-row strong { overflow: hidden; color: #d4e0ea; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.home-news-row small { color: #5f7589; font-size: 8px; }
.home-calendar-priority {
  margin-bottom: 9px;
  border-color: var(--af-border);
  background: linear-gradient(145deg, rgba(13, 24, 35, .97), rgba(8, 16, 25, .98));
}
.home-calendar-priority .home-today,
.home-calendar-priority .home-today-row { background: transparent; }
.home-calendar-priority .home-today-row time { color: #7a91a6; }
.home-calendar-priority .home-section-head { margin-bottom: 5px; }
.home-calendar-priority .home-section-head h2,
.home-changed-section .home-section-head h2 { font-size: 19px; }
.home-calendar-priority .home-section-head>span,
.home-changed-section .home-section-head>span { font-size: 11px; }
.home-today { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.home-today-row { grid-template-columns: 72px minmax(0, 1fr); min-height: 48px; padding: 9px 10px; border: 0; border-right: 1px solid rgba(132, 170, 205, .09); border-radius: 0; background: transparent; }
.home-today-row:last-child { border-right: 0; }
.home-today-row time { color: #7a91a6; font-size: 11px; }
.home-today-row strong { color: #cfdae5; font-size: 13px; line-height: 1.45; }
.home-earnings-section{margin-top:9px;margin-bottom:9px;border-color:var(--af-border);background:linear-gradient(145deg,rgba(13,24,35,.97),rgba(8,16,25,.98))}
.home-earnings-section .home-section-head{margin-bottom:5px}.home-earnings-section .home-section-head h2{font-size:19px}.home-earnings-section .home-section-head a{white-space:nowrap}
.home-earnings-status{margin:0 0 10px;color:#7a91a6;font-size:11px;line-height:1.5}
.home-earnings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
.home-earnings-row{display:grid;grid-template-columns:58px minmax(0,1fr);gap:2px 9px;align-content:start;min-height:65px;padding:9px 11px;border-right:1px solid rgba(132,170,205,.09);border-bottom:1px solid rgba(132,170,205,.09)}
.home-earnings-row:nth-child(4n){border-right:0}.home-earnings-row time{grid-row:1/4;color:#7a91a6;font-size:11px}.home-earnings-row strong{color:#e0ebf5;font-size:14px}.home-earnings-row span{overflow:hidden;color:#b9c9d7;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.home-earnings-row small{color:#80b8e5;font-size:10px}
@media(max-width:900px){.home-earnings{grid-template-columns:repeat(2,minmax(0,1fr))}.home-earnings-row:nth-child(4n){border-right:1px solid rgba(132,170,205,.09)}.home-earnings-row:nth-child(2n){border-right:0}}
@media(max-width:520px){.home-earnings{grid-template-columns:1fr}.home-earnings-row,.home-earnings-row:nth-child(4n){border-right:0}.home-earnings-row{min-height:54px;padding-inline:4px}.home-earnings-section .home-section-head{align-items:flex-start}.home-earnings-section .home-section-head a{font-size:11px}}
.home-changed-section { margin: 9px 0; }
.home-change-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.home-change-item { grid-template-columns: 22px minmax(0, 1fr); border-color: rgba(132, 170, 205, .12); border-radius: 7px; background: #0a1520; }
.home-change-rank { background: #10253a; color: #8dcbff; }
.home-change-reason { color: #698095; font-size: 8px; }
.home-changed-section .home-market-identity strong { font-size: 13px; }
.home-changed-section .home-market-identity small { font-size: 11px; }
.home-changed-section .home-market-value strong { font-size: 14px; }
.home-changed-section .home-market-value small { font-size: 12px; }
.home-changed-section .home-change-reason { font-size: 10px; line-height: 1.45; }

.home-market-editor { width: min(620px, calc(100vw - 28px)); max-height: min(780px, calc(100vh - 34px)); padding: 0; overflow: hidden auto; border: 1px solid rgba(62, 166, 255, .35); border-radius: 10px; background: #07121d; color: var(--af-text-primary); box-shadow: 0 24px 80px rgba(0, 0, 0, .62); }
.home-market-editor::backdrop { background: rgba(0, 5, 10, .72); backdrop-filter: blur(4px); }
.home-market-editor-sheet { padding: 18px; }
.home-market-editor-sheet>header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(132, 170, 205, .13); }
.home-market-editor-sheet h2 { margin: 2px 0 0; font-size: 21px; }
.home-market-editor-sheet>p { margin: 12px 0; color: #8499ac; font-size: 12px; }
.home-market-editor-close { width: 34px; height: 34px; padding: 0; border: 1px solid var(--af-border); border-radius: 6px; background: #0b1925; color: #d9e7f2; font-size: 22px; }
.home-market-selected { display: grid; gap: 5px; margin-bottom: 14px; }
.home-market-selected-row { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 44px; padding: 7px 8px; border: 1px solid rgba(132, 170, 205, .12); border-radius: 6px; background: #091824; }
.home-market-selected-order { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: #102b42; color: #7cc5ff; font-size: 11px; font-weight: 800; }
.home-market-selected-copy { display: flex; min-width: 0; flex-direction: column; }
.home-market-selected-copy strong { font-size: 13px; }
.home-market-selected-copy small { overflow: hidden; color: #71879b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.home-market-selected-remove { padding: 5px 8px; border: 0; background: transparent; color: #e98991; font-size: 11px; }
.home-market-search-label { display: grid; gap: 7px; color: #b8c9d7; font-size: 12px; font-weight: 700; }
.home-market-search-label input { min-height: 42px; padding: 9px 11px; font-size: 13px; }
.home-market-search-status { min-height: 28px; padding: 7px 1px; color: #72889d; font-size: 11px; }
.home-market-search-results { display: grid; gap: 5px; max-height: 260px; overflow-y: auto; }
.home-market-search-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 9px; border: 1px solid rgba(132, 170, 205, .12); border-radius: 6px; background: #091824; }
.home-market-search-result>div { display: flex; min-width: 0; flex-direction: column; }
.home-market-search-result strong { font-size: 13px; }
.home-market-search-result small { overflow: hidden; color: #71879b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.home-market-search-result button { min-width: 64px; padding: 6px 9px; font-size: 11px; }
.home-market-editor-sheet>footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(132, 170, 205, .13); }
.home-market-editor-sheet>footer button { min-height: 36px; padding: 7px 12px; }

/* Shared finance-console polish */
table { border-collapse: collapse; }
th { color: #71889d; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
td { color: #c9d7e3; }
th, td { border-bottom-color: rgba(132, 170, 205, .10); }
input, select, textarea { border-color: var(--af-border); border-radius: 6px; background: #08131e; color: var(--af-text-primary); }
.notice { border-color: rgba(62, 166, 255, .25); border-radius: 7px; background: rgba(22, 82, 132, .14); }
.pulse-status.online, .news-feed-badge.live { color: var(--af-positive); }
.pulse-periods button, .news-filters button, .market-category-tabs button { border-radius: 5px; }
.pulse-periods button.active, .news-filters button.active, .market-category-tabs button.active { border-color: rgba(62, 166, 255, .45); background: rgba(62, 166, 255, .16); color: #a9dbff; }
.pulse-panel { padding: 16px; }
.pulse-summary-grid article, .pulse-strategy-card, .pulse-position-card, .pulse-trade-card { border-color: rgba(132, 170, 205, .13); border-radius: 7px; background: #09141f; }
.pulse-summary-grid strong, .pulse-metric strong { font-variant-numeric: tabular-nums; }
.news-shell { color: var(--af-text-primary); }
.news-terminal-head, .news-item, .news-side section { border-color: rgba(132, 170, 205, .13); }
.news-item { background: #08131e; }
.news-item:hover { background: #0b1824; }
.market-overview-card, .market-category-card, .market-row { border-color: rgba(132, 170, 205, .13); background: #09141f; }
.market-history-sheet, .market-search-sheet { border-color: rgba(62, 166, 255, .30); background: #07111b; }

.mobile-nav { border-top-color: rgba(132, 170, 205, .16); background: rgba(5, 11, 17, .96); backdrop-filter: blur(16px); }
.mobile-nav .nav-item.active { background: rgba(62, 166, 255, .12); color: #cfeaff; }
.mobile-nav .nav-item.active::before { display: none; }

@media (max-width: 1280px) {
  .shell { grid-template-columns: 166px minmax(0, 1fr); }
  .home-market-overview { grid-template-columns: repeat(8, minmax(132px, 1fr)); }
  .home-intelligence-grid { grid-template-columns: minmax(340px, 1.2fr) minmax(280px, .9fr); }
  .home-calendar-section { grid-column: 1 / -1; }
  .home-change-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { display: none; }
  main { padding: 0 12px 92px; }
  .topbar { min-height: 60px; margin-bottom: 8px; padding-top: env(safe-area-inset-top); }
  .global-search { width: min(360px, 48vw); }
  .market-venues { display: none; }
  .home-command-grid, .home-intelligence-grid { grid-template-columns: 1fr; }
  .home-calendar-section { grid-column: auto; }
  .home-market-overview { display: flex; }
  .command-market-card { flex: 0 0 142px; }
  .home-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-today-row { border-right: 0; border-bottom: 1px solid rgba(132, 170, 205, .09); }
  .mobile-nav { display: grid; }
}

@media (max-width: 640px) {
  body { background: #060b11; }
  main { padding-inline: 10px; }
  .topbar { justify-content: space-between; min-height: 56px; }
  .topbar-title-block { flex: 0 1 auto; }
  .global-search, .topbar-context, .market-venues, .topbar-market-state .market-open { display: none; }
  .topbar-title-line h1 { display: block; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-market-state { margin-left: auto; gap: 8px; }
  .topbar-market-state strong { font-size: 10px; }
  .account-menu-wrap { margin-left: 0; }
  .account-button { border: 0; background: transparent; padding: 2px; }
  .account-button>span:not(.account-avatar) { display: none; }
  .account-avatar { width: 28px; height: 28px; border-radius: 50%; }
  .command-hero { min-height: 142px; padding: 17px 14px; }
  .command-hero-copy h2 { max-width: 280px; font-size: 31px; line-height: 1.02; }
  .command-hero-copy>p:last-child { max-width: 230px; font-size: 12px; line-height: 1.5; }
  .command-hero-mantra { display: none; }
  .command-hero::before { right: -170px; bottom: -188px; }
  .home-market-strip { margin: 7px 0; padding: 12px; }
  .home-market-strip-head h2 { font-size: 18px; }
  .home-market-edit { min-height: 34px; font-size: 12px; }
  .home-market-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; gap: 7px; }
  .command-market-card { min-width: 0; min-height: 88px; }
  .home-command-grid { gap: 7px; }
  .home-section { padding: 12px; }
  .home-section-head h2 { font-size: 18px; }
  .home-calendar-priority .home-section-head h2,
  .home-changed-section .home-section-head h2 { font-size: 20px; }
  .home-daily-comment-section { min-height: auto; }
  .home-comment-prose p { font-size: 14px; }
  .home-comment-prose p:first-child { font-size: 15px; }
  .home-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-pulse-card { min-height: 96px; }
  .home-intelligence-grid { gap: 7px; margin-top: 7px; }
  .home-changed-section { margin-top: 7px; }
  .home-change-list { grid-template-columns: 1fr; }
  .home-today { grid-template-columns: 1fr; }
  .home-today-row { grid-template-columns: 84px minmax(0, 1fr); padding-inline: 4px; }
  .home-today-row time { font-size: 12px; }
  .home-today-row strong { font-size: 14px; }
  .home-market-editor { width: calc(100vw - 18px); max-height: calc(100vh - 24px); }
  .home-market-editor-sheet { padding: 14px; }
  .home-news-row strong { font-size: 11px; }
  .home-asset-ranking-section { margin-top: 7px; }
  .home-asset-ranking-head { gap: 8px; }
  .home-asset-ranking-head h2 { font-size: 19px; }
  .home-asset-ranking-period small { display: none; }
  .home-ranking-row { grid-template-columns: 28px minmax(0, 1fr) 72px; gap: 7px 8px; min-height: 53px; padding: 7px 2px; }
  .home-ranking-identity { grid-column: 2; }
  .home-ranking-identity strong { font-size: 14px; }
  .home-ranking-identity small { font-size: 9px; }
  .home-ranking-bar { grid-column: 2 / 4; grid-row: 2; height: 4px; }
  .home-ranking-return { grid-column: 3; grid-row: 1; font-size: 14px; }
  .home-ranking-row.skeleton { grid-template-columns: 24px minmax(0, 1fr) 64px; }
  .home-ranking-row.skeleton b { width: 100%; }
  .pulse-shell { padding: 0; }
  .pulse-global-head { padding: 14px 12px; border: 1px solid var(--af-border); border-radius: 8px; background: #09141f; }
  .pulse-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse-panel { padding: 12px; }
  .pulse-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .pulse-periods button { min-width: 0; }
  .news-layout { display: block; }
  .news-side { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
