@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-roman-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #0A1B24;
  --ink-raised: #102A35;
  --canvas: #F3EFE6;
  --paper: #FFFEFA;
  --text: #17262D;
  --muted: #65737A;
  --muted-text: #65737A;
  --text-muted: #65737A;
  --muted-readable: #58686F;
  --rule: #D7D0C3;
  --brass: #B8873B;
  --brass-strong: #875C1E;
  --positive: #226A51;
  --negative: #A3473C;
  --focus: #176F69;
  --on-ink: #F7F2E8;
  --muted-on-ink: #B1C1C4;
  --rule-on-ink: rgba(247, 242, 232, .16);
  --positive-on-ink: #8BD0B2;
  --negative-on-ink: #F0A49B;
  --canvas-wash: #ECE5D8;
  --focus-ring: rgba(23, 111, 105, .22);
  --header-height: 64px;
  --context-width: 224px;
  --dock-width: 52px;
  --drawer-width: 368px;
  --content-width: 1080px;
  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --ui: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow: hidden;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background: var(--canvas);
  font: 400 14px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
}

button,
input,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  color: var(--paper);
  background: var(--focus);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 52px;
  grid-template-rows: 64px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--canvas);
}

/* Header */
.topbar {
  position: relative;
  z-index: 30;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: var(--header-height);
  padding: 0 20px;
  color: var(--on-ink);
  border-bottom: 1px solid var(--rule-on-ink);
  background: var(--ink);
}

.context-trigger,
.mobile-artha-trigger {
  display: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--on-ink);
  background: transparent;
  font: 500 23px/1 var(--display);
  letter-spacing: -.025em;
}

.wordmark-mark {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(184, 135, 59, .78);
  border-radius: 50%;
  color: var(--on-ink);
}

.wordmark-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark-mark .wordmark-detail {
  stroke: var(--brass);
  stroke-width: 2;
}

.session-status {
  min-width: 0;
  margin: 0 0 0 auto;
  overflow: hidden;
  color: var(--muted-on-ink);
  font: 400 11px/1.25 var(--mono);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-button,
button.assistant-open,
.icon-button {
  min-height: 40px;
  border: 1px solid rgba(247, 242, 232, .34);
  border-radius: 6px;
  color: var(--on-ink);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.account-button {
  min-width: 76px;
  padding: 0 14px;
  border-color: rgba(184, 135, 59, .86);
  color: #F2D9AB;
}

.account-button:hover,
.account-button.is-owner {
  color: var(--ink);
  border-color: var(--brass);
  background: var(--brass);
}

.icon-button {
  display: none;
  width: 44px;
  padding: 0;
  place-items: center;
}

/* Watchlist rail */
.context-rail {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--on-ink);
  border-right: 1px solid var(--rule-on-ink);
  background: var(--ink);
  scrollbar-color: rgba(247, 242, 232, .24) transparent;
}

.rail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 14px 8px 16px;
}

.rail-heading h2 {
  margin: 6px 0 0;
  color: var(--on-ink);
  font: 500 25px/1 var(--display);
  letter-spacing: -.02em;
}

.rail-actions {
  display: flex;
  gap: 6px;
}

.eyebrow {
  margin: 0;
  color: var(--brass-strong);
  font: 600 11px/1.25 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.context-rail .eyebrow,
.assistant-rail .eyebrow {
  color: #D6B575;
}

.square-button,
.panel-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(247, 242, 232, .32);
  border-radius: 6px;
  color: var(--on-ink);
  background: transparent;
}

.square-button {
  color: #E1BE78;
  border-color: rgba(184, 135, 59, .82);
}

.square-button:hover,
.panel-close:hover {
  color: var(--ink);
  border-color: var(--brass);
  background: var(--brass);
}

.context-close {
  display: none;
}

.rail-copy {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted-on-ink);
  font-size: 13px;
  line-height: 1.5;
}

.watchlist {
  display: grid;
  gap: 2px;
  min-height: 52px;
  margin: 0;
  padding: 0 8px 14px;
  list-style: none;
}

.watch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.watch-item:hover,
.watch-item:focus-within {
  border-color: var(--rule-on-ink);
  background: var(--ink-raised);
}

.watch-assess {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 8px;
  border: 0;
  color: var(--on-ink);
  background: transparent;
  text-align: left;
}

.watch-symbol,
.search-symbol,
.radar-symbol {
  font: 700 11px/1.2 var(--mono);
  letter-spacing: .02em;
}

.watch-symbol {
  display: block;
  color: #E7C785;
}

.watch-company {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted-on-ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-move,
.context-index-move,
.sector-move,
.radar-move,
.nifty-change strong {
  font: 700 11px/1.15 var(--mono);
}

.up {
  color: var(--positive) !important;
}

.down {
  color: var(--negative) !important;
}

.context-rail .up,
.assistant-rail .up {
  color: var(--positive-on-ink) !important;
}

.context-rail .down,
.assistant-rail .down {
  color: var(--negative-on-ink) !important;
}

.watch-remove {
  display: grid;
  width: 36px;
  height: 36px;
  margin-right: 4px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted-on-ink);
  background: transparent;
}

.watch-remove:hover {
  color: var(--on-ink);
  background: rgba(163, 71, 60, .34);
}

.watch-remove .icon {
  width: 18px;
  height: 18px;
}

.watch-empty {
  max-height: 160px;
  padding: 12px 8px;
  color: var(--muted-on-ink);
  font-size: 13px;
  line-height: 1.5;
}

.watch-empty button {
  min-height: 36px;
  margin-top: 5px;
  padding: 0;
  border: 0;
  color: #E5C783;
  background: transparent;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.rail-divider {
  height: 1px;
  margin: 4px 16px 18px;
  background: var(--rule-on-ink);
}

.market-context {
  padding: 0 16px 28px;
}

.section-heading,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-label,
.metric-note {
  color: var(--muted-readable);
  font: 400 11px/1.25 var(--mono);
  text-align: right;
}

.context-rail .source-label {
  color: var(--muted-on-ink);
}

.context-indices {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--rule-on-ink);
}

.context-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-on-ink);
}

.context-index-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-on-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-index-value {
  color: var(--on-ink);
  font: 600 12px/1.2 var(--mono);
  text-align: right;
}

.context-index-move {
  grid-column: 2;
  text-align: right;
}

.context-note {
  margin: 14px 0 0;
  color: var(--muted-on-ink);
  font-size: 11px;
  line-height: 1.5;
}

/* Research canvas */
.center-panel {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--canvas);
  scrollbar-color: var(--rule) transparent;
}

.research-canvas {
  max-width: none;
}

.market-home,
.assessment-canvas {
  width: min(100%, var(--content-width));
  min-width: 0;
  margin: 0 auto;
  padding: 36px clamp(28px, 4vw, 56px) 64px;
}

.market-home {
  min-height: 100%;
}

.market-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.quiet-button,
.assessment-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #9E9A91;
  border-radius: 5px;
  color: #465961;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.quiet-button .icon,
.assessment-back .icon {
  width: 17px;
  height: 17px;
}

.quiet-button:hover,
.assessment-back:hover {
  color: var(--paper);
  border-color: var(--focus);
  background: var(--focus);
}

.home-intro {
  max-width: 760px;
  margin: 18px 0 30px;
}

.home-intro h1 {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font: 400 clamp(44px, 5.2vw, 66px)/.98 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}

.home-intro p {
  max-width: 610px;
  margin: 17px 0 0;
  color: #58686F;
  font-size: 16px;
  line-height: 1.6;
}

/* Search */
.search-desk {
  position: relative;
  z-index: 3;
  margin-bottom: 24px;
}

.stock-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  border: 1px solid #AAA397;
  border-radius: 7px;
  background: var(--paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.stock-search:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-icon {
  width: 21px;
  height: 21px;
  margin-left: 18px;
  color: var(--focus);
}

.stock-search input {
  min-width: 0;
  height: 60px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
}

.stock-search input::placeholder {
  color: #707D82;
  opacity: 1;
}

.stock-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-submit {
  min-height: 42px;
  margin-right: 9px;
  padding: 0 18px;
  border: 1px solid var(--brass);
  border-radius: 5px;
  color: var(--ink);
  background: var(--brass);
  font-size: 12px;
  font-weight: 700;
}

.search-submit:hover {
  color: var(--paper);
  border-color: var(--brass-strong);
  background: var(--brass-strong);
}

.search-results {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(10, 27, 36, .16);
  list-style: none;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-bottom: 1px solid var(--rule);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-assess {
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.search-assess:hover,
.search-assess:focus-visible {
  background: #F2EBDD;
}

.search-symbol {
  display: block;
  color: var(--brass-strong);
}

.search-company {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-readable);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.former-name {
  display: block;
  margin-top: 2px;
  color: #707D82;
  font-size: 11px;
}

.add-watch {
  min-width: 68px;
  min-height: 38px;
  margin-right: 5px;
  padding: 0 10px;
  border: 1px solid var(--focus);
  border-radius: 5px;
  color: var(--focus);
  background: transparent;
  font: 600 11px/1 var(--mono);
}

.add-watch:hover {
  color: var(--paper);
  background: var(--focus);
}

.add-watch:disabled {
  color: var(--muted-readable);
  border-color: var(--rule);
  background: var(--canvas);
  opacity: 1;
}

.search-help {
  min-height: 18px;
  margin: 7px 2px 0;
  color: var(--muted-readable);
  font-size: 11px;
}

/* Benchmark folio */
.benchmark-folio {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--paper);
}

.nifty-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 26px 0;
}

.nifty-card h2 {
  margin: 7px 0 0;
  color: var(--text);
  font: 400 37px/1 var(--display);
  letter-spacing: -.035em;
}

.chart-key {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-readable);
  font: 400 11px/1.25 var(--mono);
  text-align: right;
}

.key-line {
  width: 24px;
  height: 2px;
  background: var(--focus);
}

.nifty-status {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 32px;
  padding: 19px 26px 2px;
}

.nifty-label,
.nifty-metrics span {
  display: block;
  color: var(--muted-readable);
  font: 600 11px/1.2 var(--mono);
  letter-spacing: .04em;
}

.nifty-status strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font: 500 32px/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.nifty-change strong {
  font: 700 15px/1.1 var(--mono);
}

.market-state {
  margin: 0 0 1px auto;
  padding: 6px 9px;
  border: 1px solid rgba(34, 106, 81, .3);
  border-radius: 999px;
  color: var(--positive);
  background: rgba(34, 106, 81, .08);
  font: 700 10px/1 var(--mono);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.market-state.down {
  color: var(--negative) !important;
  border-color: rgba(163, 71, 60, .32);
  background: rgba(163, 71, 60, .08);
}

.nifty-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 26px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.nifty-metrics > div {
  min-width: 0;
  padding: 12px 13px 12px 0;
}

.nifty-metrics > div + div {
  padding-left: 13px;
  border-left: 1px solid var(--rule);
}

.nifty-metrics strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font: 600 13px/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nifty-chart {
  min-height: 286px;
  padding: 12px 17px 0;
}

.nifty-svg {
  display: block;
  width: 100%;
  height: 280px;
  overflow: visible;
}

.chart-grid {
  stroke: var(--rule);
  stroke-width: .8;
  stroke-dasharray: 2 4;
}

.chart-area {
  fill: url(#nifty-fill);
}

.chart-line {
  fill: none;
  stroke: var(--focus);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-last {
  fill: var(--brass);
  stroke: var(--paper);
  stroke-width: 3;
}

.chart-axis-label {
  fill: var(--text-muted);
  font: 10px var(--mono);
}

.chart-loading,
.chart-unavailable {
  display: grid;
  min-height: 280px;
  padding: 22px;
  place-items: center;
  color: var(--muted-readable);
  font-size: 13px;
  text-align: center;
}

.chart-unavailable {
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--canvas);
}

.chart-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px 14px;
  padding: 12px 26px 15px;
  border-top: 1px solid var(--rule);
  color: var(--muted-readable);
  font-size: 11px;
}

.chart-caption strong {
  color: #394E56;
  font: 600 11px/1.3 var(--mono);
}

/* Secondary market signals */
.market-signals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.signal-panel {
  min-width: 0;
  padding: 20px 24px 22px 0;
}

.signal-panel + .signal-panel {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--rule);
}

.card-head {
  margin-bottom: 16px;
}

.breadth {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.breadth-stat {
  min-width: 0;
  padding: 8px 4px;
  border-left: 2px solid var(--rule);
}

.breadth-stat strong {
  display: block;
  color: var(--text);
  font: 500 26px/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.breadth-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted-readable);
  font-size: 11px;
}

.breadth-stat.gain {
  border-color: var(--positive);
}

.breadth-stat.gain strong {
  color: var(--positive);
}

.breadth-stat.loss {
  border-color: var(--negative);
}

.breadth-stat.loss strong {
  color: var(--negative);
}

.sector-pulse {
  display: grid;
  gap: 10px;
}

.sector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
}

.sector-name {
  overflow: hidden;
  color: #3D5058;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-meter {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: var(--rule);
}

.sector-meter i {
  display: block;
  height: 100%;
  background: var(--positive);
}

.sector-row .down + .sector-meter i,
.sector-row:has(.down) .sector-meter i {
  background: var(--negative);
}

.sector-empty,
.radar-empty,
.data-unavailable {
  margin: 0;
  color: var(--muted-readable);
  font-size: 13px;
}

.radar-card {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.watchlist-radar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.radar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.radar-item:hover {
  border-color: var(--focus);
  background: var(--paper);
}

.radar-symbol {
  color: var(--brass-strong);
}

.radar-status {
  color: var(--muted-readable);
  font-size: 11px;
}

/* Assessment report */
.assessment-canvas {
  min-height: 100%;
}

.assessment-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.assessment-banner h1,
.assessment-banner h2 {
  margin: 7px 0 0;
  color: var(--text);
  font: 400 clamp(34px, 4.2vw, 48px)/1.02 var(--display);
  letter-spacing: -.035em;
}

#assessment-title:focus-visible {
  outline: 0;
  box-shadow: -4px 0 0 var(--focus);
}

.assessment-back {
  flex: 0 0 auto;
}

.assessment-loading {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted-readable);
  text-align: center;
}

.loading-ring {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  border: 3px solid var(--rule);
  border-top-color: var(--brass-strong);
  border-radius: 50%;
}

.report {
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--rule);
  border-radius: 7px;
  color: var(--text);
  background: var(--paper);
}

.receipt {
  margin-bottom: 13px;
  color: var(--brass-strong);
  font: 600 11px/1.35 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.report .title {
  max-width: 20ch;
  margin: 0 0 13px;
  color: var(--text);
  font: 400 clamp(31px, 4vw, 47px)/1.04 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.report-headline {
  max-width: 62ch;
  margin: -2px 0 13px;
  color: #394E56;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.summary {
  max-width: 70ch;
  margin: 0 0 30px;
  color: var(--muted-readable);
  font-size: 16px;
  line-height: 1.65;
}

.report-section,
.report > section {
  min-width: 0;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.sec-h {
  margin: 30px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--brass-strong);
  font: 600 11px/1.25 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.report > .sec-h:first-of-type {
  margin-top: 0;
}

.sec-p {
  max-width: 74ch;
  margin: 0 0 12px;
  color: #30464F;
  font-size: 15px;
  line-height: 1.68;
}

.sec-note,
.sec-empty {
  color: var(--muted-readable);
  font-size: 13px;
  line-height: 1.55;
}

.verdict {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 8px 22px;
  padding: 5px 0 5px 18px;
  border-left: 4px solid var(--brass-strong);
  color: #5F481F;
}

.verdict-label {
  color: var(--brass-strong);
  font-weight: 700;
}

.verdict-why {
  color: #4E626A;
}

.verdict.tone-positive,
.verdict.tone-green {
  border-left-color: var(--positive);
}

.verdict.tone-positive .verdict-label,
.verdict.tone-green .verdict-label {
  color: var(--positive);
}

.verdict.tone-negative,
.verdict.tone-red {
  border-left-color: var(--negative);
}

.verdict.tone-negative .verdict-label,
.verdict.tone-red .verdict-label {
  color: var(--negative);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  align-items: end;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat {
  min-width: 0;
  padding: 14px 14px 14px 0;
}

.stat + .stat {
  padding-left: 14px;
  border-left: 1px solid var(--rule);
}

.stat-l {
  display: block;
  color: var(--muted-readable);
  font-size: 11px;
  line-height: 1.35;
}

.stat-v {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 600 16px/1.25 var(--mono);
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--rule) transparent;
}

.table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.table th {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid #AAA397;
  color: #52666E;
  font: 600 11px/1.25 var(--mono);
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--rule);
  color: #30464F;
  font-size: 13px;
  line-height: 1.45;
}

.table .n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.caveats {
  display: grid;
  gap: 7px;
  margin: 25px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.caveats li {
  position: relative;
  padding-left: 17px;
  color: var(--muted-readable);
  font-size: 12px;
  line-height: 1.55;
}

.caveats li::before {
  position: absolute;
  top: .1em;
  left: 0;
  color: var(--brass-strong);
  content: "•";
  font-size: 15px;
}

.report-footer,
.foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 24px;
  margin-top: 28px;
  padding-top: 19px;
  border-top: 1px solid #AAA397;
  color: var(--muted-readable);
  font: 400 11px/1.55 var(--mono);
}

.report-receipt {
  min-width: 0;
  color: var(--brass-strong);
  overflow-wrap: anywhere;
}

.report-receipt h2,
.report-evidence h2,
.report-caveats h2 {
  margin: 0 0 8px;
  color: var(--brass-strong);
  font: 600 11px/1.25 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.report-receipt p,
.report-caveats p {
  margin: 0;
}

.report-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px;
  grid-column: 1 / -1;
  margin: 0;
}

.report-meta > div {
  min-width: 0;
}

.report-meta dt {
  color: #596B72;
  font-weight: 600;
}

.report-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.report-caveats {
  grid-column: 1 / -1;
  color: var(--muted-readable);
}

.report-evidence ul,
.report-caveats ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.evidence-detail {
  display: block;
  margin-top: 2px;
  color: var(--muted-readable);
}

.evidence-list,
.report-evidence {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-list a,
.report-evidence a,
.foot a {
  color: var(--focus);
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.disclaimer,
.report-disclaimer {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #596B72;
  font-family: var(--ui);
  font-size: 12px;
}

.report .chart-wrap {
  max-width: 100%;
  margin-top: 10px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 5px;
}

.report .spark {
  display: block;
  width: 100%;
  height: 160px;
}

.report-chart-line {
  fill: none;
  stroke: var(--focus);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-fill-start {
  stop-color: var(--focus);
  stop-opacity: .2;
}

.chart-fill-end {
  stop-color: var(--focus);
  stop-opacity: 0;
}

.report.error {
  border-left: 4px solid var(--negative);
}

.report.error .title {
  color: var(--negative);
  font-size: 28px;
}

.report.pending {
  display: grid;
  min-height: 250px;
  place-content: center;
  text-align: center;
}

.report.pending .summary {
  margin: 0;
}

.chip {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid rgba(135, 92, 30, .25);
  border-radius: 999px;
  color: var(--brass-strong);
  background: rgba(184, 135, 59, .09);
  font: 600 10px/1 var(--mono);
}

/* Artha dock and overlay drawer */
.assistant-dock {
  position: relative;
  z-index: 12;
  grid-column: 3;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  color: var(--on-ink);
  border-left: 1px solid var(--rule-on-ink);
  background: var(--ink);
}

.assistant-dock-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 18px 0 15px;
  border: 0;
  color: var(--on-ink);
  background: transparent;
}

.assistant-dock-toggle:hover,
.workspace.assistant-open .assistant-dock-toggle {
  background: var(--ink-raised);
}

.dock-monogram {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(184, 135, 59, .78);
  border-radius: 50%;
}

.dock-monogram svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-monogram .dock-detail {
  stroke: var(--brass);
  stroke-width: 2;
}

.dock-label {
  font: 600 11px/1 var(--mono);
  letter-spacing: .09em;
  text-orientation: mixed;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.dock-status {
  display: grid;
  margin-top: auto;
  place-items: center;
}

.dock-status-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--positive-on-ink);
  border-radius: 50%;
  background: transparent;
}

.assistant-rail {
  position: fixed;
  z-index: 40;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 368px;
  max-width: 100vw;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--on-ink);
  border-left: 1px solid var(--rule-on-ink);
  background: var(--ink);
  pointer-events: none;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 240ms cubic-bezier(.22, .75, .22, 1), visibility 0s linear 240ms;
}

.workspace.assistant-open .assistant-rail {
  pointer-events: auto;
  box-shadow: -24px 0 48px rgba(10, 27, 36, .24);
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.assistant-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--rule-on-ink);
  background: var(--ink);
}

.artha-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(184, 135, 59, .78);
  border-radius: 50%;
  color: var(--on-ink);
}

.artha-mark svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.artha-mark .artha-detail {
  stroke: var(--brass);
  stroke-width: 2;
}

.assistant-identity {
  min-width: 0;
}

.assistant-head h2 {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--on-ink);
  font: 500 20px/1 var(--display);
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-state {
  padding: 5px 6px;
  border: 1px solid rgba(139, 208, 178, .35);
  border-radius: 4px;
  color: var(--positive-on-ink);
  font: 600 9px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.assistant-state.unavailable {
  color: #E8C98C;
  border-color: rgba(232, 201, 140, .36);
}

.assistant-close {
  width: 38px;
  height: 38px;
}

.assistant-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(247, 242, 232, .24) transparent;
}

.assistant-message {
  max-width: 94%;
  padding: 12px 13px;
  border-left: 2px solid rgba(184, 135, 59, .7);
  color: #D4DFDF;
  background: var(--ink-raised);
  font-size: 13px;
  line-height: 1.55;
}

.assistant-message p {
  margin: 0;
}

.assistant-message.user-message {
  align-self: flex-end;
  border-left: 0;
  border-right: 2px solid var(--brass);
  color: var(--on-ink);
  background: #173743;
}

.assistant-message.status-message {
  color: var(--positive-on-ink);
  border-left-color: var(--positive-on-ink);
}

.assistant-message.error-message {
  color: #F5BBB4;
  border-left-color: var(--negative-on-ink);
}

.assistant-prompts {
  display: grid;
  gap: 0;
  margin-top: 2px;
  border-top: 1px solid var(--rule-on-ink);
}

.assistant-prompts button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule-on-ink);
  color: var(--on-ink);
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.assistant-prompts button span {
  color: #D8B975;
  font: 600 10px/1.3 var(--mono);
}

.assistant-prompts button:hover {
  color: #FFFFFF;
  background: var(--ink-raised);
}

.assistant-composer-wrap {
  padding: 13px 14px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule-on-ink);
  background: #081820;
}

.assistant-notice {
  max-height: 150px;
  margin: 0 0 9px;
  padding: 9px 10px;
  border-left: 2px solid var(--brass);
  color: #E8D4A8;
  background: rgba(184, 135, 59, .12);
  font-size: 12px;
  line-height: 1.45;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: end;
  padding: 6px;
  border: 1px solid rgba(247, 242, 232, .34);
  border-radius: 6px;
  background: var(--ink-raised);
}

.assistant-form:focus-within {
  border-color: #7BBDB7;
  box-shadow: 0 0 0 3px rgba(123, 189, 183, .16);
}

.assistant-form textarea {
  width: 100%;
  min-height: 40px;
  max-height: 120px;
  resize: vertical;
  padding: 7px;
  border: 0;
  outline: 0;
  color: var(--on-ink);
  background: transparent;
  font-size: 13px;
  line-height: 1.45;
}

.assistant-form textarea::placeholder {
  color: var(--muted-on-ink);
  opacity: 1;
}

.assistant-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 70px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--brass);
  border-radius: 5px;
  color: var(--ink);
  background: var(--brass);
  font-size: 12px;
  font-weight: 700;
}

.assistant-form button:hover {
  color: var(--paper);
  border-color: #D2A65F;
  background: var(--brass-strong);
}

.assistant-form button:disabled {
  color: var(--muted-on-ink);
  border-color: var(--rule-on-ink);
  background: transparent;
  opacity: 1;
}

.assistant-form button .icon {
  width: 17px;
  height: 17px;
}

.composer-caption {
  margin: 8px 2px 0;
  color: var(--muted-on-ink);
  font-size: 11px;
  line-height: 1.4;
}

/* Temporary overlays */
.mobile-scrim {
  position: fixed;
  z-index: 34;
  inset: var(--header-height) 0 0;
  padding: 0;
  border: 0;
  background: rgba(10, 27, 36, .56);
}

.toast {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid #9F9A90;
  border-radius: 6px;
  color: var(--text);
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(10, 27, 36, .2);
  font-size: 13px;
}

.toast.error {
  color: #7F312A;
  border-color: var(--negative);
  background: #FFF7F4;
}

.auth-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  overflow-y: auto;
  background: rgba(10, 27, 36, .76);
}

.auth-dialog {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100dvh - 40px);
  padding: 32px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--text);
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(10, 27, 36, .34);
}

.auth-dialog h2 {
  margin: 8px 0 12px;
  color: var(--text);
  font: 400 37px/1.04 var(--display);
  letter-spacing: -.035em;
}

.auth-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #9F9A90;
  border-radius: 5px;
  color: var(--text);
  background: transparent;
}

.auth-close:hover {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
}

.auth-copy {
  margin: 0 0 22px;
  color: var(--muted-readable);
  font-size: 14px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #4A5E66;
  font-size: 12px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #9F9A90;
  border-radius: 5px;
  outline: 0;
  color: var(--text);
  background: #FFFFFF;
  font-size: 14px;
  font-weight: 400;
}

.auth-form input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.auth-form button,
.auth-signout {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--brass);
  border-radius: 5px;
  color: var(--ink);
  background: var(--brass);
  font-size: 13px;
  font-weight: 700;
}

.auth-form button:hover {
  color: var(--paper);
  border-color: var(--brass-strong);
  background: var(--brass-strong);
}

.auth-form button:disabled {
  opacity: .55;
}

.auth-error {
  margin: -2px 0 0;
  color: var(--negative);
  font-size: 12px;
}

.auth-link {
  min-height: 40px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: var(--focus);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.account-role {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 6px 8px;
  border: 1px solid rgba(135, 92, 30, .28);
  border-radius: 999px;
  color: var(--brass-strong);
  background: rgba(184, 135, 59, .09);
  font: 600 10px/1 var(--mono);
  text-transform: uppercase;
}

.auth-signout {
  width: 100%;
  color: var(--text);
  border-color: #9F9A90;
  background: transparent;
}

.auth-signout:hover {
  color: var(--paper);
  border-color: var(--negative);
  background: var(--negative);
}

/* Purposeful motion */
.market-home.is-revealing > .market-kicker,
.market-home.is-revealing > .home-intro,
.market-home.is-revealing > .search-desk,
.market-home.is-revealing > .benchmark-folio,
.market-home.is-revealing > .market-signals,
.market-home.is-revealing > .radar-card {
  animation: folio-reveal 420ms cubic-bezier(.22, .75, .22, 1) both;
}

.market-home.is-revealing > .home-intro {
  animation-delay: 40ms;
}

.market-home.is-revealing > .search-desk {
  animation-delay: 80ms;
}

.market-home.is-revealing > .benchmark-folio {
  animation-delay: 120ms;
}

.market-home.is-revealing > .market-signals,
.market-home.is-revealing > .radar-card {
  animation-delay: 160ms;
}

.assessment-canvas:not([hidden]),
.market-home.view-enter {
  animation: view-enter 260ms ease-out both;
}

.nifty-chart.is-drawing .chart-line,
.nifty-svg.is-drawing .chart-line {
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: chart-draw 720ms ease-out forwards;
}

@keyframes folio-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chart-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Tablet: watchlist drawer, full research width, persistent Artha dock */
@media (max-width: 1099px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .context-trigger {
    display: grid;
  }

  .context-rail {
    position: fixed;
    z-index: 41;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: min(320px, 92vw);
    box-shadow: 20px 0 42px rgba(10, 27, 36, .22);
    pointer-events: none;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 240ms cubic-bezier(.22, .75, .22, 1), visibility 0s linear 240ms;
  }

  .workspace.context-open .context-rail {
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .context-close {
    display: grid;
  }

  .center-panel {
    grid-column: 1;
  }

  .assistant-dock {
    grid-column: 2;
  }

  .assistant-rail {
    width: min(var(--drawer-width), 92vw);
  }

  .watchlist-radar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-scrim {
    display: none;
  }
}

/* Mobile: two modal sheets and a single readable research column */
@media (max-width: 759px) {
  html,
  body {
    overflow-x: hidden;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    gap: 7px;
    padding: 0 10px;
  }

  .wordmark {
    min-width: 0;
    font-size: 20px;
  }

  .wordmark-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wordmark-mark {
    width: 30px;
    height: 30px;
  }

  .session-status {
    display: none;
  }

  .account-button {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
  }

  .mobile-artha-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 9px;
  }

  .mobile-artha-trigger .icon {
    width: 18px;
    height: 18px;
  }

  .center-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .assistant-dock {
    display: none;
  }

  .context-rail,
  .assistant-rail {
    position: fixed;
    z-index: 50;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    border: 0;
    box-shadow: none;
  }

  .context-rail {
    transform: translateX(-100%);
  }

  .assistant-rail {
    transform: translateX(100%);
  }

  .workspace.context-open .context-rail,
  .workspace.assistant-open .assistant-rail {
    box-shadow: none;
    transform: translateX(0);
  }

  .mobile-scrim:not([hidden]) {
    display: block;
  }

  .market-home,
  .assessment-canvas {
    width: 100%;
    padding: 26px 16px 48px;
  }

  .market-kicker {
    align-items: flex-start;
  }

  .quiet-button {
    min-height: 44px;
  }

  .home-intro {
    margin: 18px 0 24px;
  }

  .home-intro h1 {
    font-size: clamp(40px, 12.5vw, 50px);
  }

  .home-intro p {
    font-size: 15px;
  }

  .stock-search {
    min-height: 58px;
  }

  .stock-search input {
    height: 56px;
    padding: 0 9px;
    font-size: 14px;
  }

  .search-icon {
    margin-left: 13px;
  }

  .search-submit {
    min-height: 44px;
    margin-right: 6px;
    padding: 0 12px;
  }

  .search-result {
    gap: 5px;
  }

  .search-assess,
  .add-watch {
    min-height: 44px;
  }

  .add-watch {
    min-width: 60px;
    padding: 0 7px;
  }

  .nifty-card-head {
    align-items: flex-start;
    padding: 21px 18px 0;
  }

  .nifty-card h2 {
    font-size: 33px;
  }

  .chart-key {
    max-width: 44%;
    font-size: 10px;
  }

  .nifty-status {
    gap: 16px 23px;
    padding: 17px 18px 2px;
  }

  .nifty-status strong {
    font-size: 28px;
  }

  .market-state {
    margin-left: 0;
  }

  .nifty-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 18px 0;
  }

  .nifty-metrics > div,
  .nifty-metrics > div + div {
    padding: 11px 8px;
    border-left: 0;
  }

  .nifty-metrics > div:nth-child(even) {
    padding-left: 13px;
    border-left: 1px solid var(--rule);
  }

  .nifty-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }

  .nifty-chart {
    min-height: 226px;
    padding: 8px 4px 0;
  }

  .nifty-svg {
    height: 220px;
  }

  .chart-loading,
  .chart-unavailable {
    min-height: 220px;
  }

  .chart-caption {
    padding: 11px 18px 14px;
  }

  .market-signals {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .signal-panel,
  .signal-panel + .signal-panel {
    padding: 18px 0;
    border-left: 0;
  }

  .signal-panel + .signal-panel {
    border-top: 1px solid var(--rule);
  }

  .radar-card {
    margin-top: 24px;
  }

  .watchlist-radar {
    grid-template-columns: 1fr;
  }

  .radar-item {
    min-height: 52px;
  }

  .assessment-banner {
    display: grid;
    gap: 14px;
  }

  .assessment-banner h1,
  .assessment-banner h2 {
    font-size: 36px;
  }

  .assessment-back {
    width: fit-content;
    min-height: 44px;
    grid-row: 1;
  }

  .report {
    padding: 24px 19px;
  }

  .report .title {
    font-size: 34px;
  }

  .summary {
    font-size: 15px;
  }

  .verdict {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:nth-child(even) {
    padding-left: 12px;
    border-left: 1px solid var(--rule);
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }

  .table {
    min-width: 520px;
  }

  .report-footer,
  .foot {
    grid-template-columns: 1fr;
  }

  .rail-heading {
    padding-top: 20px;
  }

  .square-button,
  .panel-close,
  .watch-remove {
    width: 44px;
    height: 44px;
  }

  .watch-assess,
  .watch-item {
    min-height: 56px;
  }

  .assistant-head {
    min-height: 70px;
    padding: 10px 12px;
  }

  .assistant-thread {
    padding: 15px;
  }

  .assistant-composer-wrap {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }

  .auth-layer {
    padding: 12px;
  }

  .auth-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 30px 22px 24px;
  }

  .auth-dialog h2 {
    padding-right: 36px;
    font-size: 34px;
  }

  button,
  [role="button"] {
    touch-action: manipulation;
  }
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    gap: 5px;
    padding: 0 8px;
  }

  .wordmark {
    gap: 7px;
    font-size: 18px;
  }

  .account-button {
    padding: 0 8px;
    font-size: 12px;
  }

  .mobile-artha-trigger {
    padding: 0 7px;
  }

  .mobile-artha-trigger span {
    display: none;
  }

  .breadth {
    gap: 4px;
  }

  .breadth-stat strong {
    font-size: 23px;
  }
}

@media (max-width: 340px) {
  .wordmark-name {
    display: none;
  }

  .nifty-change {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  .nifty-chart .chart-line,
  .nifty-svg .chart-line {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}

@media (forced-colors: active) {
  .wordmark-mark,
  .dock-monogram,
  .artha-mark,
  .market-state,
  .chip,
  .account-role {
    forced-color-adjust: none;
  }

  .mobile-scrim,
  .auth-layer {
    forced-color-adjust: auto;
  }
}
