:root {
  color-scheme: dark;
  --bg: #030810;
  --bg-raised: #07111c;
  --surface: rgba(10, 20, 31, 0.9);
  --surface-strong: #0b1825;
  --surface-soft: rgba(148, 190, 218, 0.035);
  --line: rgba(128, 173, 205, 0.095);
  --line-strong: rgba(140, 187, 219, 0.18);
  --text: #f3f7fa;
  --text-soft: #aab9c6;
  --text-dim: #718391;
  --cyan: #61decf;
  --cyan-strong: #79eee0;
  --blue: #80aaff;
  --gold: #d8bb7a;
  --amber: #ebc873;
  --danger: #ff8e8e;
  --sidebar-width: 238px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 4%, rgba(25, 113, 127, 0.17), transparent 31%),
    radial-gradient(circle at 20% 94%, rgba(55, 79, 145, 0.14), transparent 34%),
    linear-gradient(145deg, #03070d 0%, #050c15 48%, #030810 100%);
  color: var(--text);
  letter-spacing: -0.012em;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(125, 177, 211, 0.011) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 177, 211, 0.011) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

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

svg {
  display: block;
}

code,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

::selection {
  background: rgba(91, 228, 215, 0.25);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(164, 185, 201, 0.28);
  background-clip: padding-box;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  top: calc(12px + var(--safe-top));
  left: calc(12px + var(--safe-left));
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 9px;
  background: var(--cyan);
  color: #06100f;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-one {
  top: -220px;
  right: 8%;
  width: 440px;
  height: 440px;
  background: #2ec4b6;
}

.ambient-two {
  bottom: -260px;
  left: 20%;
  width: 520px;
  height: 520px;
  background: #536fd1;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 28px 18px 20px;
  border-right: 1px solid rgba(125, 173, 207, 0.08);
  background: linear-gradient(180deg, rgba(4, 11, 18, 0.94), rgba(4, 8, 14, 0.88));
  box-shadow: 28px 0 90px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(97, 222, 207, 0.24);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(28, 83, 91, 0.55), rgba(11, 24, 37, 0.86));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 14px 40px rgba(25, 137, 130, 0.13);
}

.brand-mark svg {
  width: 27px;
  fill: none;
  stroke: var(--cyan-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-copy small {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 46px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: 160ms ease;
}

.nav-item svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.nav-item.is-active {
  border-color: rgba(91, 228, 215, 0.13);
  background: linear-gradient(90deg, rgba(91, 228, 215, 0.12), rgba(91, 228, 215, 0.035));
  color: var(--cyan-strong);
  box-shadow: inset 3px 0 var(--cyan);
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-status {
  margin: 0 4px 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.eyebrow {
  color: #728594;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  color: #c7d4dc;
  font-size: 11px;
  font-weight: 650;
}

.status-line-muted {
  color: #7d8b96;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-dot-demo {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(239, 200, 111, 0.1), 0 0 18px rgba(239, 200, 111, 0.4);
}

.status-dot-offline {
  background: #7d8892;
  box-shadow: 0 0 0 4px rgba(125, 136, 146, 0.09);
}

.profile-chip {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.profile-chip:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(120, 166, 255, 0.24);
  border-radius: 11px;
  background: linear-gradient(145deg, #172337, #0d131c);
  color: #c9dcff;
  font-size: 12px;
  font-weight: 800;
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.profile-copy strong {
  overflow: hidden;
  color: #dce5eb;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip > svg {
  width: 16px;
  fill: none;
  stroke: #64727d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.workspace {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

.topbar {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 3.2vw, 52px) 18px;
  border-bottom: 1px solid rgba(128, 173, 205, 0.065);
  background: linear-gradient(180deg, rgba(5, 13, 22, 0.34), transparent);
}

.topbar h1 {
  margin: 6px 0 0;
  color: #f5f8fa;
  font-size: clamp(23px, 2vw, 29px);
  font-weight: 735;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 30px rgba(126, 174, 209, 0.1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.market-clock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.market-clock-label {
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.market-clock strong {
  color: #d4dfe6;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
}

.icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: #9aabb7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border: 1px solid #101720;
  border-radius: 50%;
  background: var(--amber);
}

main {
  width: min(100%, 1720px);
  margin: 0 auto;
  padding: 24px clamp(24px, 3.2vw, 52px) 42px;
}

.demo-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(239, 200, 111, 0.2);
  border-radius: 15px;
  background: linear-gradient(90deg, rgba(239, 200, 111, 0.095), rgba(239, 200, 111, 0.025));
}

.demo-banner-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: rgba(239, 200, 111, 0.11);
}

.demo-banner-icon svg,
.risk-note svg {
  width: 18px;
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.demo-banner strong {
  color: #eadab3;
  font-size: 12px;
}

.demo-banner p {
  margin: 3px 0 0;
  color: #9c927b;
  font-size: 10px;
  line-height: 1.55;
}

.demo-badge {
  padding: 7px 9px;
  border: 1px solid rgba(239, 200, 111, 0.18);
  border-radius: 8px;
  color: #cfb97f;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(132, 179, 211, 0.09);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(10, 22, 34, 0.84), rgba(5, 12, 20, 0.8));
  box-shadow: 0 24px 74px rgba(0, 0, 0, 0.28), inset 0 1px rgba(195, 225, 242, 0.025);
}

.metric-cell {
  position: relative;
  min-height: 112px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.metric-cell:last-child {
  border-right: 0;
}

.metric-cell > span {
  display: block;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
}

.metric-cell > strong {
  display: block;
  margin-top: 11px;
  color: #eaf1f5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.metric-cell > small {
  display: block;
  margin-top: 6px;
  color: #71808c;
  font-size: 9px;
}

.metric-cell-accent::after {
  position: absolute;
  right: 18px;
  bottom: 17px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(91, 228, 215, 0.12);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgba(91, 228, 215, 0.025);
  content: "";
}

.metric-cell-accent > strong {
  color: var(--cyan-strong);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 0.78fr);
  gap: 18px;
  margin-top: 18px;
  scroll-margin-top: 18px;
}

.main-column,
.insight-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(128, 174, 207, 0.09);
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, rgba(11, 24, 37, 0.95), rgba(6, 13, 22, 0.96));
  box-shadow: 0 30px 92px rgba(0, 0, 0, 0.3), inset 0 1px rgba(207, 232, 246, 0.025);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.panel::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 7%;
  left: 7%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(141, 193, 226, 0.22), transparent);
  content: "";
  pointer-events: none;
}

.ranking-panel {
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.33), 0 0 70px rgba(22, 100, 112, 0.035);
}

.ranking-panel::after {
  position: absolute;
  top: -150px;
  right: -110px;
  width: 330px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 145, 151, 0.075), transparent 70%);
  content: "";
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
}

.panel-header h2,
.expert-header h2 {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.ranking-header h2 {
  color: #f4f8fa;
  font-size: 20px;
  letter-spacing: -0.045em;
  text-shadow: 0 10px 32px rgba(97, 222, 207, 0.09);
}

.report-panel .panel-header h2 {
  color: #edf2f5;
  letter-spacing: -0.04em;
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.5;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.soft-badge,
.partial-badge,
.offline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.soft-badge {
  border: 1px solid rgba(91, 228, 215, 0.16);
  background: rgba(91, 228, 215, 0.07);
  color: #8bded7;
}

.partial-badge {
  border: 1px solid rgba(239, 200, 111, 0.17);
  background: rgba(239, 200, 111, 0.075);
  color: #cbb47b;
}

.search-field {
  display: flex;
  width: min(230px, 34vw);
  min-width: 170px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(3, 7, 11, 0.42);
  transition: 160ms ease;
}

.search-field:focus-within {
  border-color: rgba(91, 228, 215, 0.4);
  box-shadow: 0 0 0 3px rgba(91, 228, 215, 0.06);
}

.search-field svg {
  width: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: #687986;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.search-field input::placeholder {
  color: #5f6d78;
}

.search-field kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #687986;
  font-size: 8px;
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.ranking-table th {
  height: 43px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.012);
  color: #667784;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.ranking-table th:first-child,
.ranking-table td:first-child {
  padding-left: 26px;
}

.ranking-table th:last-child,
.ranking-table td:last-child {
  padding-right: 24px;
}

.ranking-row {
  position: relative;
  height: 78px;
  border-top: 1px solid rgba(159, 191, 216, 0.075);
  cursor: pointer;
  transition: 160ms ease;
}

.ranking-row:first-child {
  border-top: 0;
}

.ranking-row:hover {
  background: rgba(255, 255, 255, 0.024);
}

.ranking-row.is-selected {
  background: linear-gradient(90deg, rgba(57, 155, 153, 0.11), rgba(29, 62, 83, 0.025));
  box-shadow: inset 3px 0 var(--cyan), inset 0 1px rgba(121, 238, 224, 0.035);
}

.ranking-row[hidden] {
  display: none;
}

.ranking-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

.rank-number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #81909b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.rank-one {
  border-color: rgba(216, 187, 122, 0.3);
  background: linear-gradient(145deg, rgba(216, 187, 122, 0.13), rgba(216, 187, 122, 0.035));
  color: #efd491;
  box-shadow: 0 8px 24px rgba(131, 97, 40, 0.08), inset 0 1px rgba(255, 238, 192, 0.08);
}

.symbol-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.symbol-monogram,
.selected-monogram {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(120, 166, 255, 0.17);
  background: linear-gradient(145deg, rgba(120, 166, 255, 0.12), rgba(91, 228, 215, 0.035));
  color: #bdd1ee;
  font-weight: 750;
}

.symbol-monogram {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  font-size: 11px;
}

.symbol-cell div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.symbol-cell strong {
  color: #dce6ec;
  font-size: 11px;
  font-weight: 680;
}

.symbol-cell small {
  color: #697987;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.score-cell {
  display: flex;
  width: 115px;
  flex-direction: column;
  gap: 7px;
}

.score-cell strong {
  color: #dce8eb;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.score-cell progress {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  appearance: none;
}

.score-cell progress::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.score-cell progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #4fc7bd, #7fa9ff);
  box-shadow: 0 0 12px rgba(91, 228, 215, 0.25);
}

.score-cell progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #4fc7bd, #7fa9ff);
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(91, 228, 215, 0.13);
  border-radius: 8px;
  background: rgba(91, 228, 215, 0.05);
  color: #9edbd6;
  font-size: 9px;
  font-weight: 700;
}

.evidence-count {
  color: #8395a2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.row-action {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}

.row-action:hover,
.is-selected .row-action {
  border-color: rgba(91, 228, 215, 0.13);
  background: rgba(91, 228, 215, 0.055);
}

.row-action svg {
  width: 15px;
  fill: none;
  stroke: #81929f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.empty-state {
  padding: 42px 24px;
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  font-size: 12px;
}

.empty-state span {
  margin-top: 7px;
  color: var(--text-dim);
  font-size: 10px;
}

.panel-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 13px 26px;
  color: #647581;
  font-size: 8px;
}

.panel-footer strong,
.panel-footer code {
  color: #91a2ae;
  font-weight: 650;
}

.evidence-panel {
  scroll-margin-top: 18px;
}

.evidence-header {
  align-items: center;
}

.selected-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.selected-monogram {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #cee1f6;
  font-size: 14px;
}

.title-row code {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #7f939f;
  font-size: 8px;
}

.fact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(3, 7, 11, 0.26);
}

.fact-metrics article {
  min-height: 99px;
  padding: 17px 19px;
  border-right: 1px solid var(--line);
}

.fact-metrics article:last-child {
  border-right: 0;
}

.fact-metrics span {
  display: block;
  color: var(--text-dim);
  font-size: 9px;
}

.fact-metrics strong {
  display: block;
  margin-top: 10px;
  color: #e0eaef;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
}

.fact-metrics small {
  display: block;
  margin-top: 6px;
  color: #687985;
  font-size: 8px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(230px, 0.75fr);
  gap: 16px;
  padding: 18px 26px 26px;
}

.fact-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.fact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.fact-row:first-child {
  border-top: 0;
}

.fact-row > div {
  min-width: 0;
}

.fact-icon {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 3px;
  transform: rotate(45deg);
}

.fact-market {
  background: var(--blue);
  box-shadow: 0 0 12px rgba(120, 166, 255, 0.35);
}

.fact-strategy {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(91, 228, 215, 0.35);
}

.fact-risk {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(213, 184, 119, 0.35);
}

.fact-row span {
  display: block;
  color: var(--text-dim);
  font-size: 8px;
}

.fact-row strong {
  display: block;
  margin-top: 5px;
  color: #cfdbe2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
}

.fact-row code {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #617481;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.missing-card {
  padding: 18px;
  border: 1px solid rgba(239, 200, 111, 0.13);
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(239, 200, 111, 0.065), rgba(255, 255, 255, 0.018));
}

.missing-card h3 {
  margin: 8px 0 0;
  color: #d8c79d;
  font-size: 12px;
}

.missing-card ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.missing-card li {
  margin-top: 7px;
  color: #9a8b6c;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  overflow-wrap: anywhere;
}

.missing-card li::before {
  margin-right: 7px;
  color: var(--amber);
  content: "—";
}

.missing-card p {
  margin: 16px 0 0;
  color: #776d59;
  font-size: 9px;
  line-height: 1.55;
}

.report-panel {
  border-color: rgba(216, 187, 122, 0.11);
  padding-bottom: 22px;
  background: linear-gradient(160deg, rgba(18, 28, 41, 0.97), rgba(7, 14, 23, 0.98));
}

.report-panel::before {
  background: linear-gradient(90deg, transparent, rgba(216, 187, 122, 0.32), rgba(97, 222, 207, 0.16), transparent);
}

.report-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #8495a1;
  font-size: 8px;
  font-weight: 700;
}

.report-mode > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(120, 166, 255, 0.55);
}

.report-lead {
  margin: 0 22px;
  padding: 18px 18px 18px 20px;
  border: 1px solid rgba(128, 170, 255, 0.1);
  border-left: 2px solid rgba(216, 187, 122, 0.48);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(128, 170, 255, 0.055), rgba(216, 187, 122, 0.028));
}

.report-lead span {
  display: block;
  color: #73889d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.report-lead strong {
  display: block;
  margin-top: 9px;
  color: #d2dde4;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.68;
  letter-spacing: -0.015em;
}

.report-list {
  margin: 20px 22px 0;
  padding: 0;
  list-style: none;
}

.report-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.report-list li:first-child {
  border-top: 0;
}

.report-list li > span {
  padding-top: 2px;
  color: rgba(216, 187, 122, 0.7);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
}

.report-list strong {
  color: #ccd8df;
  font-size: 10px;
}

.report-list p {
  margin: 5px 0 0;
  color: #778895;
  font-size: 9px;
  line-height: 1.65;
}

.risk-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  margin: 3px 22px 0;
  padding: 15px;
  border: 1px solid rgba(239, 200, 111, 0.13);
  border-radius: 13px;
  background: rgba(239, 200, 111, 0.04);
}

.risk-note svg {
  margin-top: 1px;
}

.risk-note strong {
  color: #cfbd91;
  font-size: 9px;
}

.risk-note p {
  margin: 5px 0 0;
  color: #827760;
  font-size: 8px;
  line-height: 1.6;
}

.expert-panel {
  border-color: rgba(97, 222, 207, 0.1);
  padding: 22px;
  background: linear-gradient(155deg, rgba(9, 28, 36, 0.9), rgba(7, 14, 23, 0.98) 62%);
  scroll-margin-top: 18px;
}

.expert-panel::before {
  background: linear-gradient(90deg, transparent, rgba(97, 222, 207, 0.28), transparent);
}

.expert-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.expert-orb {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(91, 228, 215, 0.17);
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, rgba(91, 228, 215, 0.32), transparent 35%),
    linear-gradient(145deg, #13242a, #111620 65%);
}

.expert-orb::before,
.expert-orb::after,
.expert-orb span {
  position: absolute;
  border: 1px solid rgba(91, 228, 215, 0.25);
  border-radius: 50%;
  content: "";
}

.expert-orb::before {
  width: 24px;
  height: 24px;
}

.expert-orb::after {
  width: 13px;
  height: 13px;
  border-color: rgba(120, 166, 255, 0.4);
}

.expert-orb span {
  width: 4px;
  height: 4px;
  border: 0;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(91, 228, 215, 0.8);
}

.offline-badge {
  border: 1px solid rgba(141, 154, 166, 0.16);
  background: rgba(141, 154, 166, 0.06);
  color: #8996a0;
}

.expert-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.assistant-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(91, 228, 215, 0.14);
  border-radius: 9px;
  background: rgba(91, 228, 215, 0.05);
  color: #81c9c2;
  font-size: 7px;
  font-weight: 800;
}

.message-bubble {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 5px 14px 14px;
  background: rgba(255, 255, 255, 0.025);
}

.message-bubble strong {
  color: #bdcad2;
  font-size: 10px;
}

.message-bubble p {
  margin: 7px 0 0;
  color: #768792;
  font-size: 9px;
  line-height: 1.65;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.suggestion-list button {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: #62737f;
  font-size: 8px;
}

.suggestion-list button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  margin-top: 15px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 11, 0.36);
}

.composer textarea {
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 9px;
  line-height: 1.5;
}

.composer textarea::placeholder {
  color: #586975;
}

.composer button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(91, 228, 215, 0.12);
  border-radius: 10px;
  background: rgba(91, 228, 215, 0.045);
}

.composer button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.composer svg {
  width: 15px;
  fill: none;
  stroke: #6c8e8b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.expert-footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  color: #5f6f7a;
  font-size: 8px;
  line-height: 1.5;
}

.expert-footer .status-dot {
  margin-top: 3px;
}

.topbar-logout {
  display: none;
}

.workspace-view {
  min-width: 0;
}

.quant-dashboard-grid .insight-column {
  align-self: start;
}

.research-navigation-panel {
  padding: 0;
}

.research-navigation-header {
  align-items: flex-start;
}

.research-metadata {
  display: grid;
  min-width: min(100%, 420px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
}

.research-metadata span {
  min-width: 0;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
}

.research-metadata span:last-child {
  border-right: 0;
}

.research-metadata small,
.research-metadata strong {
  display: block;
}

.research-metadata small {
  color: var(--text-dim);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.research-metadata strong {
  margin-top: 6px;
  overflow: hidden;
  color: #c9d5dc;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-symbol-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 0 22px 22px;
}

.research-symbol-button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
}

.research-symbol-button:hover,
.research-symbol-button.is-selected {
  border-color: rgba(91, 228, 215, 0.2);
  background: rgba(91, 228, 215, 0.07);
  color: var(--text);
}

.research-symbol-button.is-selected {
  box-shadow: inset 0 -2px rgba(91, 228, 215, 0.46);
}

.research-symbol-button > span:last-child,
.research-symbol-button strong,
.research-symbol-button small {
  display: block;
  min-width: 0;
}

.research-symbol-button strong,
.research-symbol-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-symbol-button strong {
  font-size: 9px;
}

.research-symbol-button small {
  margin-top: 4px;
  color: var(--text-dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 7px;
}

.research-rank {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.research-evidence-panel {
  margin-top: 18px;
}

.expert-workspace-panel {
  min-height: 560px;
  min-height: min(720px, calc(100dvh - 230px));
  padding: clamp(22px, 3vw, 34px);
}

.expert-header p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.6;
}

.expert-control-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  margin-top: 26px;
}

.expert-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  color: #aebdc6;
  font-size: 9px;
  font-weight: 750;
}

.expert-field select,
.expert-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 7, 12, 0.62);
  color: var(--text-soft);
  font: inherit;
}

.expert-field select:disabled,
.expert-field textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.expert-field small {
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.55;
}

.expert-chat-log {
  display: grid;
  min-height: 230px;
  align-content: start;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(2, 8, 13, 0.54), rgba(8, 18, 27, 0.4));
}

.expert-status-message {
  max-width: 760px;
  padding: 17px;
  border: 1px solid rgba(239, 200, 111, 0.14);
  border-radius: 13px;
  background: rgba(239, 200, 111, 0.035);
}

.expert-status-message strong {
  display: block;
  margin-top: 8px;
  color: #d2c195;
  font-size: 11px;
}

.expert-status-message p {
  margin: 8px 0 0;
  color: #897e65;
  font-size: 9px;
  line-height: 1.65;
}

.expert-composer {
  min-height: 74px;
  margin-top: 12px;
}

.expert-composer textarea {
  min-height: 52px;
  font-size: 10px;
}

.expert-message,
.expert-result {
  max-width: 860px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.expert-message-user {
  justify-self: end;
  max-width: min(82%, 680px);
  border-color: rgba(91, 228, 215, 0.16);
  background: rgba(91, 228, 215, 0.04);
}

.expert-message span,
.expert-result-section strong {
  display: block;
  color: #8fa2ae;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expert-message p {
  margin: 7px 0 0;
  color: #bccbd3;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.expert-result-partial,
.expert-result-insufficient_data {
  border-color: rgba(239, 200, 111, 0.18);
}

.expert-result-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.expert-result-section ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.expert-result-section li {
  margin-top: 7px;
  color: #9eb0ba;
  font-size: 9px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.expert-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.expert-boundary-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.expert-boundary-grid strong {
  display: block;
  margin-top: 8px;
  color: #899aa5;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.6;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 clamp(24px, 3.2vw, 52px) 30px;
  color: #52616c;
  font-size: 8px;
}

[hidden] {
  display: none !important;
}

.access-stage {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(28px + var(--safe-top)) calc(20px + var(--safe-right))
    calc(28px + var(--safe-bottom)) calc(20px + var(--safe-left));
  place-items: center;
}

.access-card {
  display: grid;
  width: min(100%, 460px);
  gap: 24px;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(128, 174, 207, 0.14);
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(11, 24, 37, 0.97), rgba(5, 12, 20, 0.98));
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.48), inset 0 1px rgba(207, 232, 246, 0.04);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.access-card-compact {
  width: min(100%, 410px);
  text-align: center;
}

.access-card-error {
  border-color: rgba(255, 142, 142, 0.19);
}

.access-card h1 {
  margin: 8px 0 0;
  color: #f3f7fa;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 730;
  letter-spacing: -0.045em;
}

.access-card p {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.75;
}

.access-mark {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 1px solid rgba(97, 222, 207, 0.3);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(97, 222, 207, 0.42), rgba(97, 222, 207, 0.04) 44%, transparent 46%);
  box-shadow: 0 0 32px rgba(97, 222, 207, 0.18);
}

.access-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.access-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.access-brand strong {
  font-size: 14px;
  letter-spacing: 0.16em;
}

.access-brand small {
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.credential-field {
  display: grid;
  gap: 9px;
}

.credential-field > span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}

.credential-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: 0;
  background: rgba(2, 7, 12, 0.58);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.credential-field input:focus {
  border-color: rgba(97, 222, 207, 0.48);
  box-shadow: 0 0 0 4px rgba(97, 222, 207, 0.06);
}

.form-message {
  min-height: 18px;
  margin: -12px 0 0 !important;
  color: var(--danger) !important;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.primary-button {
  border: 1px solid rgba(97, 222, 207, 0.28);
  background: linear-gradient(135deg, rgba(58, 171, 163, 0.84), rgba(47, 120, 145, 0.84));
  color: #f5ffff;
  box-shadow: 0 16px 38px rgba(25, 124, 123, 0.2), inset 0 1px rgba(255, 255, 255, 0.16);
}

.primary-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
}

.access-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-footnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #647581;
  font-size: 9px;
  line-height: 1.55;
}

.access-footnote .status-dot {
  margin-top: 3px;
}

.loading-line {
  position: relative;
  display: block;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.loading-line::after {
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  content: "";
  animation: loading-scan 1.3s ease-in-out infinite;
}

@keyframes loading-scan {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(340%);
  }
}

.inline-loading {
  display: grid;
  grid-template-columns: minmax(80px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 9px;
}

.status-dot-ready {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(97, 222, 207, 0.09), 0 0 18px rgba(97, 222, 207, 0.35);
}

.status-dot-error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 142, 142, 0.08);
}

.profile-session {
  cursor: default;
}

.profile-logout {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.profile-logout svg {
  width: 15px;
  fill: none;
  stroke: #7f909c;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.fact-metrics:empty,
.fact-list:empty,
.report-list:empty,
.warning-list:empty {
  min-height: 72px;
}

.fact-metrics:empty::after,
.fact-list:empty::after,
.report-list:empty::after {
  display: grid;
  min-height: 72px;
  place-items: center;
  color: var(--text-dim);
  font-size: 9px;
  content: "等待可信数据";
}

.warning-list {
  display: grid;
  gap: 8px;
  margin: 16px 22px 0;
}

.warning-item {
  padding: 10px 12px;
  border: 1px solid rgba(239, 200, 111, 0.11);
  border-radius: 10px;
  background: rgba(239, 200, 111, 0.035);
  color: #887c63;
  font-size: 8px;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .access-card {
    padding: 26px 22px;
    border-radius: 22px;
  }

  .access-actions {
    grid-template-columns: 1fr;
  }

  .inline-loading {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 1240px) {
  :root {
    --sidebar-width: 210px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  }

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

  .research-symbol-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .insight-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .research-navigation-header {
    flex-direction: column;
  }

  .research-metadata {
    width: 100%;
  }

  .expert-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: 72px;
  }

  .sidebar {
    align-items: center;
    padding: 22px 10px 16px;
  }

  .brand {
    padding: 0;
  }

  .brand-copy,
  .nav-item span,
  .sidebar-status,
  .profile-copy,
  .profile-chip > svg {
    display: none;
  }

  .primary-nav {
    width: 100%;
    margin-top: 40px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .profile-chip {
    justify-content: center;
    padding: 8px 0;
  }

  .topbar {
    min-height: 90px;
  }

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

  .metric-cell:nth-child(2) {
    border-right: 0;
  }

  .metric-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .insight-column {
    grid-template-columns: 1fr;
  }

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

  .expert-boundary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    z-index: 30;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    right: calc(12px + var(--safe-right));
    bottom: calc(12px + var(--safe-bottom));
    left: calc(12px + var(--safe-left));
    display: block;
    width: auto;
    height: 62px;
    padding: 7px;
    border: 1px solid rgba(126, 181, 213, 0.19);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(7, 20, 30, 0.96), rgba(4, 10, 17, 0.96));
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.52), inset 0 1px rgba(190, 222, 238, 0.035);
  }

  .brand,
  .sidebar-spacer,
  .profile-chip {
    display: none;
  }

  .primary-nav {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 0;
  }

  .nav-item {
    min-height: 46px;
    flex-direction: column;
    gap: 3px;
    border-radius: 12px;
    font-size: 8px;
    line-height: 1;
  }

  .nav-item span {
    display: inline;
  }

  .nav-item svg {
    width: 17px;
  }

  .nav-item.is-active {
    box-shadow: none;
  }

  .workspace {
    padding-bottom: 82px;
    padding-bottom: calc(82px + var(--safe-bottom));
  }

  .topbar {
    align-items: flex-start;
    padding: 20px 17px 16px;
    padding: calc(20px + var(--safe-top)) calc(17px + var(--safe-right)) 16px
      calc(17px + var(--safe-left));
  }

  .topbar h1 {
    font-size: 21px;
  }

  .market-clock {
    display: none;
  }

  .topbar-logout {
    display: grid;
  }

  main {
    padding: 18px 14px 32px;
    padding-right: calc(14px + var(--safe-right));
    padding-left: calc(14px + var(--safe-left));
  }

  .demo-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .demo-badge {
    display: none;
  }

  .metric-cell {
    min-height: 100px;
    padding: 17px;
  }

  .metric-cell > strong {
    font-size: 18px;
  }

  .panel {
    border-radius: 20px;
  }

  .panel-header {
    padding: 20px 18px 17px;
  }

  .ranking-header {
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .ranking-table {
    min-width: 100%;
  }

  .ranking-table th:nth-child(4),
  .ranking-table th:nth-child(5),
  .ranking-table th:nth-child(6),
  .ranking-table td:nth-child(4),
  .ranking-table td:nth-child(5),
  .ranking-table td:nth-child(6) {
    display: none;
  }

  .ranking-table th:first-child,
  .ranking-table td:first-child {
    padding-left: 18px;
  }

  .ranking-table th:last-child,
  .ranking-table td:last-child {
    padding-right: 18px;
  }

  .ranking-table th,
  .ranking-table td {
    padding-right: 10px;
    padding-left: 10px;
  }

  .score-cell {
    width: 88px;
  }

  .panel-footer {
    padding: 12px 18px;
  }

  .fact-metrics {
    grid-template-columns: 1fr;
    margin: 0 18px;
  }

  .fact-metrics article {
    min-height: auto;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .fact-metrics article:first-child {
    border-top: 0;
  }

  .evidence-grid {
    padding: 16px 18px 20px;
  }

  .selected-monogram {
    width: 42px;
    height: 42px;
  }

  .partial-badge {
    display: none;
  }

  .research-metadata {
    grid-template-columns: 1fr;
  }

  .research-metadata span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .research-metadata span:last-child {
    border-bottom: 0;
  }

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

  .research-symbol-button {
    min-height: 62px;
  }

  .expert-panel {
    padding: 19px;
  }

  .expert-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .expert-header .offline-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .expert-chat-log {
    min-height: 210px;
    padding: 14px;
  }

  .expert-control-grid,
  .expert-boundary-grid {
    grid-template-columns: 1fr;
  }

  .expert-composer {
    margin-bottom: 6px;
  }

  .page-footer {
    display: none;
  }
}

/* Core Stock Analysis */
.analysis-launch-panel {
  padding: clamp(22px, 3vw, 34px);
  border-color: rgba(97, 222, 207, 0.12);
}

.analysis-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.analysis-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(21px, 2vw, 28px);
  letter-spacing: -0.04em;
}

.analysis-heading p {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.65;
}

.analysis-orb {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(97, 222, 207, 0.2);
  border-radius: 15px;
  background: radial-gradient(circle at 35% 30%, rgba(97, 222, 207, 0.3), transparent 36%),
    linear-gradient(145deg, #13252c, #101722);
}

.analysis-orb::before,
.analysis-orb::after,
.analysis-orb span {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.analysis-orb::before {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(97, 222, 207, 0.26);
}

.analysis-orb::after {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(128, 170, 255, 0.42);
}

.analysis-orb span {
  width: 4px;
  height: 4px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(97, 222, 207, 0.85);
}

.analysis-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 26px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(2, 8, 13, 0.38);
}

.analysis-form label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 750;
}

.analysis-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  background: rgba(1, 6, 10, 0.62);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analysis-form input:focus {
  border-color: rgba(97, 222, 207, 0.46);
  box-shadow: 0 0 0 4px rgba(97, 222, 207, 0.06);
}

.analysis-form-message {
  min-height: 18px;
  margin: 8px 2px 0 !important;
}

.analysis-snapshot-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.analysis-shortcut {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.024);
  color: #8ea1ad;
  cursor: pointer;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.analysis-shortcut:hover:not(:disabled) {
  border-color: rgba(97, 222, 207, 0.24);
  color: var(--cyan-strong);
}

.analysis-shortcut:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.analysis-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.analysis-boundary-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.analysis-boundary-grid strong {
  display: block;
  margin-top: 8px;
  color: #899ba6;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.65;
}

.analysis-loading-card {
  display: grid;
  grid-template-columns: minmax(90px, 190px) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid rgba(97, 222, 207, 0.14);
  border-radius: 14px;
  background: rgba(97, 222, 207, 0.035);
}

.analysis-loading-card strong {
  color: #b9d9d5;
  font-size: 10px;
}

.analysis-loading-card > span:last-child {
  color: var(--text-dim);
  font-size: 8px;
}

.analysis-result {
  margin-top: 18px;
  scroll-margin-top: 18px;
}

.analysis-summary-header {
  align-items: center;
}

.analysis-status-completed {
  border-color: rgba(97, 222, 207, 0.22);
  background: rgba(97, 222, 207, 0.08);
  color: var(--cyan-strong);
}

.analysis-status-insufficient_data {
  border-color: rgba(255, 142, 142, 0.22);
  background: rgba(255, 142, 142, 0.07);
  color: #f0a2a2;
}

.analysis-identity-grid,
.analysis-strategy-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 24px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 7, 12, 0.34);
}

.analysis-strategy-grid {
  margin-top: -10px;
  border-color: rgba(97, 222, 207, 0.1);
}

.analysis-identity-grid article,
.analysis-strategy-grid article {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.analysis-identity-grid article:last-child,
.analysis-strategy-grid article:last-child {
  border-right: 0;
}

.analysis-identity-grid span,
.analysis-strategy-grid span {
  display: block;
  color: var(--text-dim);
  font-size: 8px;
}

.analysis-identity-grid strong,
.analysis-strategy-grid strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #cbd8df;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-alert {
  margin: 0 24px 22px;
  padding: 14px;
  border: 1px solid rgba(239, 200, 111, 0.2);
  border-radius: 12px;
  background: rgba(239, 200, 111, 0.055);
  color: #d7c28d;
  font-size: 9px;
  line-height: 1.6;
}

.analysis-alert-blocked {
  border-color: rgba(255, 142, 142, 0.24);
  background: rgba(255, 142, 142, 0.055);
  color: #eca5a5;
}

.analysis-conclusion {
  margin: 18px 24px 0;
}

.analysis-conclusion .analysis-section-card {
  min-height: auto;
  border-color: rgba(94, 232, 190, 0.28);
  background: rgba(94, 232, 190, 0.07);
}

.analysis-reason-grid,
.analysis-detail-grid,
.analysis-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.analysis-priority-limits {
  margin: 16px 24px 0;
}

.analysis-detail-grid {
  padding: 0 20px 20px;
}

.analysis-section-card {
  min-height: 180px;
  padding: 20px;
}

.analysis-section-card:nth-child(5),
.analysis-section-card:nth-child(6),
.analysis-section-card:nth-child(7) {
  grid-column: 1 / -1;
  min-height: auto;
}

.analysis-section-card ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.analysis-section-card li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.analysis-section-card li:first-child {
  border-top: 0;
}

.analysis-section-card p {
  margin: 0;
  color: #b3c1c9;
  font-size: 10px;
  line-height: 1.72;
  white-space: pre-wrap;
}

.analysis-section-risk {
  border-color: rgba(255, 142, 142, 0.2);
}

.analysis-empty-section {
  color: var(--text-dim);
  font-size: 9px;
}

.analysis-reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.analysis-reference {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(97, 222, 207, 0.15);
  border-radius: 7px;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  text-decoration: none;
}

.analysis-evidence-panel {
  margin-top: 16px;
  padding: 0;
  scroll-margin-top: 18px;
}

.analysis-evidence-panel summary {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px;
  cursor: pointer;
  color: #cbd7de;
  font-size: 11px;
  font-weight: 700;
}

.analysis-evidence-panel summary strong {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.analysis-evidence-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 22px;
}

.analysis-evidence-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  scroll-margin-top: 18px;
}

.analysis-evidence-card > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.analysis-evidence-number {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.analysis-evidence-card strong {
  overflow: hidden;
  color: #bfccd4;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-evidence-card small {
  color: var(--text-dim);
  font-size: 7px;
}

.analysis-evidence-card p {
  margin: 12px 0 0;
  color: #e1e9ed;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.analysis-evidence-card code {
  display: block;
  margin: 9px 0;
  overflow: hidden;
  color: #667984;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-limit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 22px;
}

.analysis-limit-grid article {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(239, 200, 111, 0.12);
  border-radius: 11px;
  background: rgba(239, 200, 111, 0.025);
}

.analysis-limit-grid strong {
  color: #c8b987;
  font-size: 8px;
}

.analysis-limit-grid ul {
  margin: 9px 0 0;
  padding-left: 15px;
}

.analysis-limit-grid li {
  margin-top: 5px;
  color: #867b62;
  font-size: 7px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.row-action {
  width: auto;
  min-width: 46px;
  padding: 0 8px;
  color: #81929f;
  font-size: 8px;
}

@media (max-width: 1240px) {
  .analysis-identity-grid,
  .analysis-strategy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analysis-identity-grid article:nth-child(3),
  .analysis-strategy-grid article:nth-child(3) {
    border-right: 0;
  }

  .analysis-identity-grid article:nth-child(-n + 3),
  .analysis-strategy-grid article:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

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

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

@media (max-width: 820px) {
  .analysis-reason-grid,
  .analysis-detail-grid,
  .analysis-section-grid {
    grid-template-columns: 1fr;
  }

  .analysis-section-card:nth-child(n) {
    grid-column: auto;
  }

  .analysis-loading-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .analysis-launch-panel {
    padding: 19px;
  }

  .analysis-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .analysis-heading .offline-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .analysis-form,
  .analysis-boundary-grid {
    grid-template-columns: 1fr;
  }

  .analysis-form .primary-button {
    width: 100%;
  }

  .analysis-shortcut {
    min-height: 44px;
  }

  .analysis-identity-grid,
  .analysis-strategy-grid {
    grid-template-columns: 1fr;
    margin-right: 18px;
    margin-left: 18px;
  }

  .analysis-identity-grid article,
  .analysis-strategy-grid article,
  .analysis-identity-grid article:nth-child(3),
  .analysis-strategy-grid article:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .analysis-identity-grid article:last-child,
  .analysis-strategy-grid article:last-child {
    border-bottom: 0;
  }

  .analysis-alert {
    margin-right: 18px;
    margin-left: 18px;
  }

  .analysis-evidence-list,
  .analysis-limit-grid {
    grid-template-columns: 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }

  .analysis-evidence-panel summary {
    padding: 0 18px;
  }
}

/* Readability-first workspace overrides. Keep ranking and reports primary. */
.market-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 22px 0 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 23, 34, 0.78);
}

.market-summary > div span,
.market-summary > div small {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
}

.market-summary > div strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.market-summary > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.score-explanation {
  max-width: 850px;
  color: #9cadb8 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

.ranking-header h2,
.compact-report h2 {
  font-size: 24px;
}

.search-field {
  width: min(310px, 38vw);
  min-height: 46px;
}

.search-field input {
  height: 44px;
  font-size: 15px;
}

.ranking-table {
  min-width: 680px;
}

.ranking-table th {
  height: 50px;
  color: #8fa1ad;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: none;
}

.ranking-row {
  height: 84px;
}

.rank-number {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.symbol-monogram {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.symbol-cell strong,
.score-cell strong {
  font-size: 16px;
}

.symbol-cell small,
.score-cell small {
  color: #8a9aa5;
  font-size: 13px;
}

.signal-pill {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.row-action {
  display: inline-flex;
  width: auto;
  min-width: 64px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-color: rgba(91, 228, 215, 0.18);
  background: rgba(91, 228, 215, 0.06);
  color: #9edbd6;
  font-size: 14px;
}

.dashboard-details {
  padding: 0 24px 18px;
}

.dashboard-details summary {
  min-height: 48px;
  padding-top: 16px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 14px;
}

.panel-footer {
  padding: 16px 0 4px;
  color: #7f909c;
  font-size: 13px;
}

.warning-list {
  font-size: 13px;
}

.compact-report {
  margin-top: 18px;
}

.compact-report .report-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 20px;
}

.compact-report .report-list li {
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.compact-report .report-list strong {
  font-size: 15px;
}

.compact-report .report-list p,
.compact-report .risk-note p {
  font-size: 14px;
  line-height: 1.6;
}

.compact-report .risk-note {
  margin: 0 24px 24px;
}

.analysis-mode-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(91, 228, 215, 0.14);
  border-radius: 12px;
  background: rgba(91, 228, 215, 0.05);
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.page-footer {
  font-size: 13px;
}

@media (max-width: 900px) {
  .market-summary,
  .compact-report .report-list {
    grid-template-columns: 1fr;
  }

  .market-summary {
    gap: 10px;
  }

  .search-field {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .ranking-table th:nth-child(3),
  .ranking-table td:nth-child(3) {
    display: none;
  }

  .ranking-table {
    min-width: 520px;
  }
}

/* Durable Financial Agent */
.agent-console {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(480px, 2fr) minmax(220px, 0.72fr);
  gap: 16px;
  min-height: min(780px, calc(100dvh - 170px));
}

.agent-ledger,
.agent-dialogue {
  min-height: 0;
}

.agent-ledger {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-color: rgba(128, 170, 255, 0.11);
}

.agent-ledger::after {
  position: absolute;
  right: -54px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(128, 170, 255, 0.055);
  border-radius: 50%;
  box-shadow: inset 0 0 0 22px rgba(128, 170, 255, 0.014), inset 0 0 0 45px rgba(128, 170, 255, 0.01);
  content: "";
  pointer-events: none;
}

.agent-ledger-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-ledger-header h2,
.agent-dialogue-header h2,
.agent-boundary-card h3 {
  margin: 6px 0 0;
  letter-spacing: -0.035em;
}

.agent-ledger-header h2 {
  font-size: 18px;
}

.agent-new-button,
.agent-delete-button,
.agent-suggestions button,
.agent-conversation-item {
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
}

.agent-new-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border-color: rgba(97, 222, 207, 0.16);
  border-radius: 10px;
  color: #9fded8;
  font-size: 11px;
  font-weight: 740;
  white-space: nowrap;
}

.agent-new-button span {
  color: var(--cyan);
  font-size: 17px;
  line-height: 1;
}

.agent-new-button:hover:not(:disabled),
.agent-suggestions button:hover:not(:disabled) {
  border-color: rgba(97, 222, 207, 0.34);
  background: rgba(97, 222, 207, 0.075);
  color: var(--cyan-strong);
}

.agent-new-button:disabled,
.agent-delete-button:disabled,
.agent-suggestions button:disabled,
.agent-composer textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.agent-conversation-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 20px;
  overflow-y: auto;
}

.agent-conversation-entry {
  min-width: 0;
}

.agent-conversation-item {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text-soft);
  text-align: left;
  transition: 150ms ease;
}

.agent-conversation-item:hover,
.agent-conversation-item.is-active {
  border-color: rgba(97, 222, 207, 0.17);
  background: linear-gradient(105deg, rgba(97, 222, 207, 0.09), rgba(128, 170, 255, 0.025));
}

.agent-conversation-item.is-active {
  box-shadow: inset 2px 0 var(--cyan), 0 12px 30px rgba(0, 0, 0, 0.14);
}

.agent-conversation-heading,
.agent-conversation-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.agent-conversation-heading strong {
  overflow: hidden;
  color: #d8e5ea;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-conversation-heading small,
.agent-conversation-meta {
  color: var(--text-dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.agent-conversation-meta {
  align-items: flex-end;
  white-space: nowrap;
}

.agent-ledger-empty {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 22px 14px;
  border: 1px dashed rgba(128, 170, 255, 0.14);
  border-radius: 13px;
  color: var(--text-dim);
  text-align: center;
}

.agent-ledger-empty strong {
  color: #9cacb7;
  font-size: 11px;
}

.agent-ledger-empty span {
  font-size: 9px;
  line-height: 1.6;
}

.agent-retention-note {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.agent-retention-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(216, 187, 122, 0.18);
  border-radius: 9px;
  color: #c4ad74;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
}

.agent-retention-note p {
  margin: 0;
  color: #687985;
  font-size: 9px;
  line-height: 1.6;
}

.agent-dialogue {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto auto;
  border-color: rgba(97, 222, 207, 0.12);
  background: linear-gradient(155deg, rgba(8, 23, 32, 0.97), rgba(5, 12, 20, 0.98) 58%);
}

.agent-dialogue::after {
  position: absolute;
  z-index: 0;
  top: -190px;
  left: 28%;
  width: 440px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 164, 157, 0.085), transparent 68%);
  content: "";
  pointer-events: none;
}

.agent-dialogue-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 18px;
}

.agent-dialogue-header h2 {
  color: #f0f6f7;
  font-size: 22px;
}

.agent-dialogue-header p {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--text-dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-core-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(97, 222, 207, 0.22);
  border-radius: 15px 4px 15px 15px;
  transform: rotate(-4deg);
  background: linear-gradient(145deg, rgba(97, 222, 207, 0.18), rgba(128, 170, 255, 0.045));
  box-shadow: 0 14px 38px rgba(31, 131, 127, 0.1);
}

.agent-core-mark::before,
.agent-core-mark::after,
.agent-core-mark span {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.agent-core-mark::before {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(97, 222, 207, 0.34);
}

.agent-core-mark::after {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(128, 170, 255, 0.48);
}

.agent-core-mark span {
  width: 4px;
  height: 4px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(97, 222, 207, 0.9);
}

.agent-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-runtime-ready {
  border-color: rgba(97, 222, 207, 0.2);
  background: rgba(97, 222, 207, 0.07);
  color: #91d8d1;
}

.agent-runtime-error {
  border-color: rgba(255, 142, 142, 0.2);
  background: rgba(255, 142, 142, 0.055);
  color: #e9a0a0;
}

.agent-delete-button {
  padding: 0 11px;
  border-radius: 9px;
  color: #9a7f80;
  font-size: 9px;
}

.agent-delete-button:hover:not(:disabled) {
  border-color: rgba(255, 142, 142, 0.25);
  background: rgba(255, 142, 142, 0.055);
  color: #e4a0a0;
}

.agent-trust-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 8, 13, 0.34);
}

.agent-trust-strip span {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  color: #71838f;
  font-size: 8px;
  text-align: center;
}

.agent-trust-strip span:last-child {
  border-right: 0;
}

.agent-trust-strip strong {
  margin-right: 4px;
  color: #a9d9d4;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.agent-chat-log {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 280px;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.agent-chat-empty {
  display: grid;
  max-width: 580px;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  align-self: center;
  margin: auto;
  padding: 30px 18px;
  color: var(--text-dim);
  text-align: center;
}

.agent-chat-empty > strong {
  margin-top: 16px;
  color: #d3e0e4;
  font-size: 16px;
}

.agent-chat-empty > p {
  max-width: 530px;
  margin: 9px 0 0;
  font-size: 11px;
  line-height: 1.75;
}

.agent-empty-sigil {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(97, 222, 207, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 0 10px rgba(97, 222, 207, 0.015), 0 0 50px rgba(97, 222, 207, 0.055);
}

.agent-empty-sigil::before,
.agent-empty-sigil::after,
.agent-empty-sigil span {
  position: absolute;
  content: "";
}

.agent-empty-sigil::before {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(128, 170, 255, 0.22);
  transform: rotate(45deg);
}

.agent-empty-sigil::after {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(97, 222, 207, 0.3);
  border-radius: 50%;
}

.agent-empty-sigil span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(97, 222, 207, 0.9);
  animation: agent-core-pulse 2.6s ease-in-out infinite;
}

@keyframes agent-core-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.agent-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.agent-suggestions button {
  padding: 0 12px;
  border-radius: 10px;
  color: #80939f;
  font-size: 9px;
}

.agent-event {
  display: grid;
  width: min(86%, 720px);
  gap: 9px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 5px 15px 15px;
  background: rgba(255, 255, 255, 0.027);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.agent-event-user {
  align-self: flex-end;
  border-color: rgba(128, 170, 255, 0.16);
  border-radius: 15px 5px 15px 15px;
  background: linear-gradient(135deg, rgba(128, 170, 255, 0.08), rgba(128, 170, 255, 0.025));
}

.agent-event-assistant {
  align-self: flex-start;
  border-color: rgba(97, 222, 207, 0.14);
  background: linear-gradient(135deg, rgba(97, 222, 207, 0.055), rgba(255, 255, 255, 0.02));
}

.agent-event-danger {
  border-color: rgba(255, 142, 142, 0.2);
  background: rgba(255, 142, 142, 0.045);
}

.agent-event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-event-header strong {
  color: #8ea7b2;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.agent-event-header small,
.agent-event-status small {
  color: #61727e;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 7px;
  white-space: nowrap;
}

.agent-event p {
  margin: 0;
  color: #c2d0d6;
  font-size: 11px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.agent-event-status {
  display: grid;
  width: min(94%, 760px);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  align-self: center;
  padding: 7px 11px;
  border: 1px solid rgba(128, 173, 205, 0.07);
  border-radius: 999px;
  background: rgba(3, 8, 13, 0.4);
}

.agent-event-status-mark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(97, 222, 207, 0.65);
}

.agent-event-status strong {
  overflow: hidden;
  color: #7f929d;
  font-size: 8px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-poll-state {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(90px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 24px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(97, 222, 207, 0.11);
  border-radius: 10px;
  background: rgba(97, 222, 207, 0.032);
  color: #71848f;
  font-size: 8px;
}

.agent-composer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin: 0 18px 18px;
  padding: 12px;
  border: 1px solid rgba(128, 173, 205, 0.13);
  border-radius: 15px;
  background: rgba(1, 6, 10, 0.62);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.agent-composer:focus-within {
  border-color: rgba(97, 222, 207, 0.35);
  box-shadow: 0 0 0 4px rgba(97, 222, 207, 0.045);
}

.agent-composer textarea {
  width: 100%;
  min-height: 76px;
  padding: 3px 4px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.agent-composer textarea::placeholder {
  color: #596b77;
}

.agent-composer-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.agent-composer-footer > span {
  color: #61737e;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.agent-composer .form-message {
  min-height: 0;
  margin: 0 !important;
  font-size: 9px;
  line-height: 1.5;
}

.agent-composer .primary-button {
  min-width: 112px;
}

.agent-boundary-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.agent-boundary-card {
  padding: 19px;
}

.agent-boundary-card-accent {
  border-color: rgba(216, 187, 122, 0.14);
  background: linear-gradient(150deg, rgba(29, 29, 30, 0.92), rgba(10, 17, 24, 0.97));
}

.agent-boundary-card h3 {
  color: #cdd9df;
  font-size: 13px;
}

.agent-boundary-card p {
  margin: 10px 0 0;
  color: #71838e;
  font-size: 10px;
  line-height: 1.72;
}

.agent-boundary-card-accent .eyebrow,
.agent-boundary-card-accent h3 {
  color: #c8b582;
}

@media (max-width: 1420px) {
  .agent-console {
    grid-template-columns: minmax(220px, 0.62fr) minmax(480px, 1.8fr);
  }

  .agent-boundary-rail {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .agent-console {
    grid-template-columns: 1fr;
  }

  .agent-ledger {
    min-height: auto;
  }

  .agent-conversation-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 240px;
  }

  .agent-retention-note {
    margin-top: 18px;
  }
}

@media (max-width: 820px) {
  .agent-boundary-rail {
    grid-template-columns: 1fr;
  }

  .agent-dialogue-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agent-header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

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

  .agent-trust-strip span:nth-child(2) {
    border-right: 0;
  }

  .agent-trust-strip span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .agent-console {
    min-height: auto;
  }

  .agent-ledger,
  .agent-boundary-card {
    padding: 17px;
  }

  .agent-conversation-list {
    grid-template-columns: 1fr;
    max-height: 220px;
  }

  .agent-dialogue {
    min-height: calc(100dvh - 160px);
  }

  .agent-dialogue-header {
    padding: 18px;
  }

  .agent-dialogue-header h2 {
    font-size: 19px;
  }

  .agent-dialogue-header p {
    white-space: normal;
  }

  .agent-chat-log {
    min-height: 300px;
    padding: 18px 14px;
  }

  .agent-event {
    width: 94%;
  }

  .agent-event-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .agent-event-status {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 11px;
  }

  .agent-event-status small {
    grid-column: 2;
  }

  .agent-poll-state {
    grid-template-columns: 1fr;
    margin-right: 14px;
    margin-left: 14px;
  }

  .agent-composer {
    margin: 0 12px 14px;
  }

  .agent-composer-footer {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agent-composer .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

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