:root {
  color-scheme: light;
  --bg: #fff;
  --sidebar: #fafafa;
  --surface: #f5f5f5;
  --line: #e9e9e9;
  --text: #262626;
  --muted: #797979;
  --green: #197c49;
  --selection: #f0f7f3;
  --red: #c64747;
  --grid: #ededed;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1e1e;
  --sidebar: #1c1c1c;
  --surface: #272727;
  --line: #333;
  --text: #ededed;
  --muted: #a4a4a4;
  --green: #53ca84;
  --selection: #25392d;
  --red: #f18383;
  --grid: #343434;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.45 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 11px;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
a {
  color: var(--green);
  text-decoration: none;
}
input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  font-weight: 620;
}
h2 {
  font-size: 30px;
  font-weight: 620;
}
h3 {
  font-size: 17px;
  font-weight: 550;
}
#shell {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 24px 14px 16px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 18px;
  white-space: nowrap;
}
.brand img {
  width: 34px;
  height: 32px;
  object-fit: contain;
}
.brand b {
  font-weight: 650;
}
.edition {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin: 18px 9px 15px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar button,
.sidebar-bottom > a {
  background: none;
  border: 0;
  text-align: left;
  padding: 10px 9px;
  display: block;
  font-size: 12px;
}
.sidebar nav button {
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.sidebar nav button span {
  width: 18px;
  font-size: 20px;
  line-height: 20px;
  color: var(--muted);
}
.sidebar nav .active,
#watch-only.active {
  color: var(--green);
  background: var(--selection);
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.sidebar-bottom p {
  border-top: 1px solid var(--line);
  margin: 12px 9px 0;
  padding-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  padding: 25px 30px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  margin-bottom: 7px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
#freshness {
  font-size: 11px;
  color: var(--muted);
  max-width: 280px;
  text-align: right;
}
#notice {
  padding: 12px 25px;
  background: var(--selection);
  color: var(--green);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
#notice.error {
  color: var(--red);
  background: var(--surface);
}
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 17px 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.toolbar label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  display: grid;
  gap: 5px;
}
.toolbar select {
  font-size: 12px;
  min-width: 100px;
  max-width: 150px;
  text-transform: none;
  letter-spacing: 0;
  padding: 6px 9px;
}
.toolbar .search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 200px;
  flex: 1;
  min-width: 130px;
}
.search span {
  font-size: 23px;
  position: absolute;
  left: 9px;
  top: 0;
}
.search input {
  font-size: 12px;
  width: 100%;
  padding-left: 31px;
  height: 32px;
}
.workbench {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  min-height: calc(100vh - 218px);
}
.results {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  padding: 18px 17px 12px;
  color: var(--muted);
  letter-spacing: 1px;
  font-size: 9px;
}
#asset-list {
  height: calc(100vh - 296px);
  min-height: 320px;
  overflow: auto;
  scrollbar-width: thin;
}
.asset-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  min-height: 70px;
}
.asset-row.active {
  background: var(--selection);
}
.asset-row b {
  font-size: 13px;
}
.asset-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.row-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
}
.rank-tag {
  font-size: 10px;
  display: block;
  margin-top: 4px;
  font-weight: 450;
}
.up {
  color: var(--green);
}
.down {
  color: var(--red);
}
.asset-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
}
.asset-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
#result-count {
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.empty {
  padding: 35px 20px;
  color: var(--muted);
  font-size: 13px;
}
.detail {
  padding: 26px 28px 20px;
  min-width: 0;
}
.asset-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.asset-id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.asset-id h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.asset-id p {
  color: var(--muted);
  font-size: 11px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}
#asset-logo .asset-icon {
  height: 52px;
  width: 52px;
  border-radius: 14px;
  font-size: 18px;
}
#asset-logo img {
  width: 40px;
  height: 40px;
}
#star {
  padding: 0;
  background: none;
  border: 0;
  font-size: 26px;
  color: var(--green);
}
.price {
  margin-left: auto;
  display: grid;
  text-align: right;
  gap: 2px;
  white-space: nowrap;
}
.price strong {
  font-size: 29px;
  font-weight: 560;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.price span {
  font-size: 11px;
}
.scale {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.scale button {
  border: 0;
  border-radius: 0;
  font-size: 12px;
  padding: 6px 10px;
}
.scale .active {
  background: var(--green);
  color: var(--bg);
}
.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.chart-heading label {
  font-size: 11px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
#chart-wrap {
  height: clamp(300px, 47vh, 650px);
  position: relative;
}
#chart {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
#tooltip {
  position: absolute;
  top: 10px;
  left: 15px;
  background: var(--surface);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  pointer-events: none;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
#legend {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
#legend button {
  font-size: 11px;
  background: none;
  border: 0;
  padding: 2px 0;
}
#legend button.off {
  opacity: 0.35;
  text-decoration: line-through;
}
.chart-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.fact {
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
}
.fact small {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  display: block;
  margin-bottom: 5px;
}
.fact strong {
  font-size: 16px;
  font-weight: 550;
}
.detail-footer {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.detail-footer div {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.detail-footer button {
  white-space: nowrap;
  font-size: 11px;
}
.formation {
  background: none;
  text-align: left;
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 12px;
}
.formation.active {
  border-color: var(--green);
  background: var(--selection);
}
.formation span {
  float: right;
  font-size: 10px;
  color: var(--muted);
}
.formation small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.legal {
  margin-top: auto;
  padding: 15px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 9px;
}
.legal span {
  margin-right: auto;
}
#gate {
  max-width: 550px;
  text-align: center;
  margin: 75px auto;
  padding: 20px 25px;
}
.gate-mark {
  font-size: 75px;
  line-height: 1.2;
  color: var(--green);
}
#gate h2 {
  font-size: 28px;
  margin: 12px 0;
}
#gate p {
  color: var(--muted);
  margin: 17px 0;
}
#gate-message {
  font-size: 12px;
}
a.primary,
button.primary {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  padding: 11px 16px;
  border: 0;
  border-radius: 7px;
  font-weight: 550;
}
#retry-access {
  display: block;
  margin: 15px auto;
  background: none;
  border: 0;
  color: var(--green);
}
details {
  text-align: left;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 12px;
}
details p {
  font-size: 12px;
}
#restore label {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}
#restore button {
  margin-bottom: 15px;
}
dialog {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 520px;
  width: calc(100% - 30px);
}
dialog::backdrop {
  background: #0006;
}
dialog h2 {
  font-size: 24px;
  margin-bottom: 15px;
}
dialog p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}
dialog label {
  display: grid;
  gap: 8px;
  font-size: 12px;
}
dialog textarea {
  width: 100%;
  resize: vertical;
}
.close {
  float: right;
  background: none;
  border: 0;
  font-size: 23px;
  padding: 0;
}
.share-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.share-actions > * {
  font-size: 12px;
}
#share-status {
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1650px) {
  .workbench {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .detail {
    padding: 30px 40px;
  }
  #chart-wrap {
    height: 53vh;
  }
}
@media (max-width: 1150px) {
  #shell {
    grid-template-columns: 165px minmax(0, 1fr);
  }
  .sidebar {
    padding: 20px 9px;
  }
  .brand {
    font-size: 16px;
  }
  .brand img {
    width: 27px;
  }
  .workbench {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .detail {
    padding: 22px 18px;
  }
  .topbar {
    padding: 23px 22px;
  }
  .scale {
    align-self: flex-start;
  }
  .asset-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  .price strong {
    font-size: 25px;
  }
  .asset-id h2 {
    font-size: 25px;
  }
  .asset-row {
    padding: 12px 10px;
    gap: 6px;
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }
  .asset-icon {
    width: 26px;
    height: 26px;
  }
  .toolbar {
    gap: 10px;
    padding: 14px 18px;
  }
  .toolbar select {
    max-width: 130px;
  }
}
@media (max-width: 760px) {
  #shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 15px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
  .brand {
    font-size: 19px;
  }
  .edition,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 5px;
    margin-top: 13px;
  }
  .sidebar nav button {
    white-space: nowrap;
    font-size: 11px;
    padding: 8px;
  }
  .sidebar nav button span {
    display: none;
  }
  .topbar {
    padding: 18px 16px;
  }
  h1 {
    font-size: 21px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .top-actions {
    gap: 8px;
  }
  #freshness {
    font-size: 10px;
    max-width: 150px;
  }
  #refresh span {
    display: none;
  }
  .toolbar {
    padding: 13px 15px;
    gap: 10px;
  }
  .toolbar .search {
    max-width: 100%;
    flex-basis: 100%;
  }
  .toolbar label {
    flex: 1;
  }
  .toolbar select {
    max-width: 100%;
    width: 100%;
    min-width: 80px;
  }
  .workbench {
    display: flex;
    flex-direction: column;
  }
  .results {
    order: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  #asset-list {
    height: 380px;
    min-height: 0;
  }
  .asset-row {
    padding: 12px 17px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }
  .asset-row small {
    max-width: 220px;
  }
  .detail {
    padding: 22px 16px;
  }
  #chart-wrap {
    height: 350px;
  }
  .price strong {
    font-size: 24px;
  }
  .asset-id p {
    max-width: 190px;
  }
  .asset-id h2 {
    font-size: 26px;
  }
  #asset-logo .asset-icon {
    width: 42px;
    height: 42px;
  }
  #asset-logo img {
    width: 32px;
    height: 32px;
  }
  .scale {
    margin-left: auto;
  }
  .chart-heading label {
    font-size: 10px;
  }
  .chart-heading h3 {
    font-size: 15px;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .legal {
    font-size: 9px;
    padding: 15px;
  }
  .legal span {
    width: 100%;
  }
  #gate {
    margin: 35px auto;
  }
  .chart-heading {
    align-items: flex-start;
  }
  .topbar .eyebrow {
    display: none;
  }
}
/* Scope the shared site's generic marketing elements to this app layout. */
.topbar {
  position: static;
  inset: auto;
  z-index: auto;
  background: var(--bg);
  backdrop-filter: none;
  max-width: none;
  margin: 0;
}
.sidebar nav {
  margin-left: 0;
}
.sidebar nav button {
  white-space: nowrap;
}
main {
  max-width: none;
  padding: 0;
  margin: 0;
}
.detail h2 {
  letter-spacing: 0;
}
.detail p {
  max-width: none;
}
footer.legal {
  background: var(--bg);
  text-align: left;
  max-width: none;
}
.results footer {
  background: var(--bg);
  text-align: left;
  margin: 0;
}
.legal a {
  color: var(--green);
}
button.primary {
  color: var(--bg);
}
.workbench > section {
  padding: 0;
  text-align: left;
}
.workbench > .detail {
  padding: 26px 28px 20px;
}
.detail h2,
#gate h2 {
  font-size: 30px;
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin-bottom: 0;
}
.legal {
  width: 100%;
  margin: 0;
}
.legal a {
  margin: 0;
}
.toolbar {
  text-align: left;
}
#gate {
  text-align: center;
}
@media (max-width: 1150px) {
  .workbench > .detail {
    padding: 22px 18px;
  }
}
@media (max-width: 760px) {
  .workbench > .detail {
    padding: 22px 16px;
  }
}

#mobile-menu {
  display: none;
}
.gate-mark img {
  width: 90px;
  height: 70px;
  object-fit: contain;
}
@media (max-width: 760px) {
  .sidebar {
    position: relative;
  }
  #mobile-menu {
    display: block;
    position: absolute;
    right: 15px;
    top: 12px;
    font-size: 20px;
  }
  .sidebar-bottom.mobile-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding-top: 15px;
  }
  .sidebar-bottom.mobile-open p {
    grid-column: 1/-1;
  }
  .sidebar-bottom button,
  .sidebar-bottom > a {
    padding: 8px;
  }
}

.asset-icon {
  background: #fff;
  color: #656565;
}

#legend > span {
  font-size: 11px;
  color: var(--muted);
}
#legend > span.up {
  color: var(--green);
}

.observation-date { white-space: nowrap; }

/* Distinct source tabs, with neutral and conflicting evidence visible. */
.confluence-explainer {flex-basis:100%;margin:0;color:var(--muted);font-size:11px}
.confluence-settings {font-size:12px;margin:0;padding:0;border:0}
.confluence-settings > div {display:flex;flex-wrap:wrap;gap:12px;padding-top:10px}
.confluence-settings input[type=checkbox] {width:auto}
#confluence-panel {margin:10px 0 24px;padding:0;text-align:left}
.confluence-title {display:flex;justify-content:space-between;font-size:18px}
.confluence-summary {color:var(--muted);font-size:12px;margin:6px 0 12px}
.confluence-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.confluence-card {border:1px solid var(--line);background:var(--surface);border-radius:9px;padding:12px;font-size:12px;min-width:0}
.confluence-card > div {display:flex;justify-content:space-between;gap:8px}
.confluence-card p {margin:8px 0;color:var(--muted);line-height:1.45;overflow-wrap:anywhere}
.confluence-card small {display:block;color:var(--muted)}
.confluence-card .source-link {border:0;background:transparent;padding:8px 0 0;color:var(--green);font-size:11px;text-align:left}
.signal-bullish {color:var(--green)} .signal-bearish {color:var(--red)}
.signal-mixed {color:#a45b0a;font-size:12px} .signal-neutral {color:#2864a1}
html[data-theme=dark] .signal-mixed {color:#efb36d} html[data-theme=dark] .signal-neutral {color:#89baff}
@media(max-width:560px) {.confluence-grid {grid-template-columns:1fr} .confluence-title {font-size:16px}}
