:root {
  --desktop: #071426;
  --desktop-deep: #030812;
  --desktop-mid: #0d2847;
  --panel: #d3d6d8;
  --panel-light: #f1f3f3;
  --panel-shadow: #656b73;
  --terminal: #030a12;
  --ink: #111820;
  --muted: #4f5862;
  --green: #30dc7d;
  --green-soft: #79dca7;
  --green-dark: #126a45;
  --lime: #a9d8ff;
  --blue: #0b4fa8;
  --blue-accent: #2468b5;
  --red: #ff5a65;
}

body {
  background: radial-gradient(circle at 50% -10%, rgba(30, 91, 151, .3), transparent 38rem),
    linear-gradient(145deg, var(--desktop-mid), var(--desktop) 52%, var(--desktop-deep));
  background-size: auto, auto;
  width: 100%;
  padding-bottom: 0;
  overflow-x: clip;
}

html { width: 100%; overflow-x: clip; }
.page-shell { width: min(1600px, calc(100vw - 20px)); margin: 12px auto 30px; }
.workspace { grid-template-columns: minmax(0, 1fr) clamp(288px, 21vw, 344px); }
.primary-column, .primary-window, .primary-window .win-body, .tab-panel { min-width: 0; max-width: 100%; }

.masthead {
  grid-template-columns: minmax(0, 1fr) auto;
  background: linear-gradient(#edf0f1, #c4c8cb 52%, #adb2b7 53%, #dce0e2);
}

.logo-shell {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.logo-shell img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(8, 28, 49, .26)); }
.eyebrow { color: #174f88; }
.masthead h1 { color: #102f50; letter-spacing: -.025em; }
.masthead p { color: #44596f; max-width: 850px; }
.asset-class-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.asset-class-badges span { padding: 3px 6px; color: #d9edff; background: #0a3159; border-left: 3px solid #30dc7d; font: 700 8px var(--mono); letter-spacing: .08em; }
.mast-actions { align-content: center; }
.mast-actions .win-button { min-width: 106px; color: #102b47; background: linear-gradient(#f2f4f5, #c5c9cc); }
.mast-actions .win-button:hover { background: linear-gradient(#fff, #d9e7f3); }
.mast-actions .win-button.accent { background: linear-gradient(#d5edff, #96c9ed); }
.mast-actions .wallet-connect { color: #fff; background: linear-gradient(#2c71b7, #174c83); border-top-color: #d9edff; border-left-color: #d9edff; }
.mast-actions .wallet-connect:hover { background: linear-gradient(#3f82c4, #1d5b96); }
.win-button.accent { color: #071524; background: #a9d8ff; }
.announcement { color: #123f70; }
.quality-live { color: #087b42; }
.quality-stale { color: #9a5c00; }
.quality-demo { color: #a0262f; }

.page-shell > .metric-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: column;
}
.metric-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  min-height: 102px;
  background: linear-gradient(125deg, #030a12, #071728 62%, #0a2038);
}
.metric-card::before, .metric-card::after { display: none; }
.metric-card span, .metric-card small { color: #82a8c9; }
.metric-card strong { color: #d5ebff; font-size: clamp(17px, 1.7vw, 27px); }

.reward-center {
  margin-top: 12px;
  padding: 10px;
  min-width: 0;
  background: linear-gradient(#d9dcdd, #c8ccce);
}
.reward-center .table-toolbar { margin: 0 0 9px; gap: 12px; }
.reward-center .table-toolbar > div { min-width: 0; }
.reward-epoch-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.reward-empty {
  grid-column: 1 / -1;
  min-height: 108px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 16px;
  color: #506174;
  background: #eef0ea;
  border: 1px solid #9ca2a5;
  text-align: center;
}
.reward-empty strong { color: #143d67; font: 700 14px var(--mono); }
.reward-empty p { max-width: 590px; margin: 7px 0 0; line-height: 1.45; }
.reward-epoch {
  min-width: 0;
  padding: 10px;
  color: #17334f;
  background: linear-gradient(145deg, #f3f1e6, #dedccd);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #717477;
  border-bottom: 2px solid #717477;
}
.reward-epoch.expired { filter: saturate(.45); opacity: .78; }
.reward-epoch.funding-verified { border-color: #168255; box-shadow: inset 3px 0 #22d87f; }
.reward-epoch.funding-pending { border-color: #a57418; box-shadow: inset 3px 0 #e7b429; }
.reward-epoch-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 7px; font-family: var(--mono); }
.reward-epoch-head span { color: #1a558b; font-weight: 700; }
.reward-epoch-head strong { color: #053d27; }
.reward-epoch-head i { padding: 2px 5px; color: #fff; background: #126641; font-size: 8px; font-style: normal; }
.reward-epoch.expired .reward-epoch-head i { background: #777; }
.reward-epoch dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 9px 0; }
.reward-epoch dl div { min-width: 0; padding: 6px; background: rgba(7, 24, 40, .06); border: 1px solid #bdc0ba; }
.reward-epoch dt { color: #617284; font: 700 8px var(--mono); }
.reward-epoch dd { overflow: hidden; margin: 3px 0 0; color: #132d47; font: 10px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reward-epoch > p { overflow: hidden; margin: 0 0 8px; color: #5a6875; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.reward-epoch > p.reward-funding { padding: 5px 6px; color: #59430c; background: #fff1b6; border: 1px solid #c9a83e; white-space: normal; }
.reward-epoch.funding-verified > p.reward-funding { color: #06482d; background: #d9f4e7; border-color: #66ae88; }
.reward-epoch code { color: #114f83; }
.reward-epoch .reward-claim { width: 100%; color: #fff; background: linear-gradient(#2e75b7, #164d80); }
.reward-epoch .reward-claim[disabled] { color: #777; background: #c5c7c3; }
.desktop-tab.active { background: #174f8c; box-shadow: inset 1px 1px 0 #0b315b; }
.desktop-tabs { overflow: hidden; background: linear-gradient(#e8e9e2, #c9cbc5); }
.desktop-tab { border-right-color: #adb2b5; font-weight: 700; }
.desktop-tab:hover { color: #0c3b68; background: #edf4f9; }
.wallet-tab { color: #fff; background: #194f82; }
.wallet-tab:hover { color: #fff; background: #286ba8; }
.win-titlebar, .primary-window > .win-titlebar { background: linear-gradient(90deg, #062f68, #1359a4 68%, #0a3f7d); }

.subtabs { display: flex; flex-wrap: wrap; width: 100%; margin-bottom: 0; }
.subtab { min-width: 118px; flex: 1; }
.subtab.active { box-shadow: inset 0 3px 0 #2468b5; }
.form-status {
  margin-top: 10px;
  padding: 7px 9px;
  color: #334252;
  background: #d8dde0;
  border: 1px solid #939aa2;
  font: 10px/1.4 var(--mono);
}
.form-status.pending { color: #082f58; background: #d6eaff; }
.form-status.success { color: #075b35; background: #d2f3df; }
.form-status.rejected, .form-status.error { color: #8a2029; background: #f5d9dc; }
.invest-form.external-action { padding: 20px 16px; background: linear-gradient(110deg, #e8ebed, #cdd4da); }
.invest-form.external-action .field-row,
.invest-form.external-action .receive-display,
.invest-form.external-action .price-line,
.invest-form.external-action #max-button { display: none; }
.invest-form.external-action .form-actions { margin-top: 0; }
.invest-form.external-action #primary-action { min-width: min(360px, 100%); min-height: 46px; }
.button-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.wallet-register {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(170px, .8fr) minmax(210px, 1fr);
  gap: 1px;
  margin-bottom: 10px;
  background: #78808a;
}
.wallet-register > div { min-width: 0; padding: 10px 12px; background: #edf0f1; }
.wallet-register span, .wallet-register strong { display: block; }
.wallet-register span { color: #5b6672; font: 9px var(--mono); }
.wallet-register strong { margin-top: 5px; overflow: hidden; color: #132c47; font: 11px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.wallet-provider-field label, .wallet-provider-field small { display: block; color: #5b6672; font: 8px/1.35 var(--mono); }
.wallet-provider-field select { width: 100%; min-height: 28px; margin: 4px 0; padding: 3px 6px; color: #102f50; background: #fff; border: 2px inset #dfe4e7; font: 10px var(--mono); }
.wallet-provider-field select:disabled { color: #737b82; background: #d9dcdd; }
.network-wrong { color: #9e222b !important; }

.reward-scenario { margin-top: 12px; padding: 10px; background: linear-gradient(#d9dcdd, #c8ccce); }
.reward-scenario .table-toolbar { margin: 0 0 9px; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #737b83; border: 1px solid #737b83; }
.scenario-grid > div, .scenario-grid > label { min-width: 0; margin: 0; padding: 10px; background: #eef0ed; }
.scenario-grid span, .scenario-grid strong, .scenario-grid small { display: block; }
.scenario-grid span { color: #5d6b78; font: 8px var(--mono); }
.scenario-grid strong { margin: 10px 0 6px; color: #123d67; font: 18px var(--mono); }
.scenario-grid small { color: #66727c; font: 8px/1.4 var(--mono); }
.scenario-grid .input-shell { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 38px; margin-top: 7px; background: #fff; }
.scenario-grid .input-shell input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 7px; background: transparent; font: 16px var(--mono); }
.scenario-grid .input-shell b { padding: 0 8px; color: #173653; font: 10px var(--mono); }

.market-hero { background: radial-gradient(circle at 75% 50%, #154a80, transparent 31%), linear-gradient(120deg, #030911, #071d34); }
.index-coin { overflow: visible; padding: 0; background: transparent; border: 0; box-shadow: none; transform: none; perspective: 700px; }
.index-coin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 52%;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .42));
  animation: arbor-token-float 4.8s ease-in-out infinite;
  will-change: transform, filter;
}
@keyframes arbor-token-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg) scale(1); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .42)); }
  50% { transform: translateY(-10px) rotate(2deg) scale(1.025); filter: drop-shadow(0 15px 18px rgba(35, 107, 184, .5)); }
}
.program-card h3 { margin-top: 2px; }
.launch-readiness { margin-top: 14px; padding: 10px; background: #c6ccd0; }
.readiness-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid #737b83; background: #737b83; }
.readiness-grid p { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 3px 7px; min-height: 66px; margin: 0; padding: 10px; background: #eef0ed; }
.readiness-grid strong { color: #173653; font-size: 11px; }
.readiness-grid small { grid-column: 2; color: #5a6670; font: 8px/1.4 var(--mono); }
.readiness-dot { width: 9px; height: 9px; margin-top: 2px; border: 1px solid #725b00; border-radius: 50%; background: #efbd22; box-shadow: 0 0 5px rgba(239, 189, 34, .45); }
.readiness-dot.ready { border-color: #08753f; background: #25da76; box-shadow: 0 0 6px rgba(37, 218, 118, .55); }
.readiness-dot.pending { border-color: #725b00; background: #efbd22; }
.readiness-dot.failed { border-color: #7b101b; background: #e24650; box-shadow: 0 0 6px rgba(226, 70, 80, .5); }
.market-warning { margin: 7px 0; padding: 7px 9px; color: #5c4b21; background: #fff0b8; border: 1px solid #b79f55; font: 9px/1.45 var(--mono); }
.table-scroll { max-width: 100%; overflow-x: hidden; }
.stock-table { width: 100%; min-width: 0; table-layout: fixed; }
.stock-table th, .stock-table td { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stock-table th:nth-child(1) { width: 5%; }
.stock-table th:nth-child(2) { width: 24%; }
.stock-table th:nth-child(3) { width: 11%; }
.stock-table th:nth-child(4) { width: 10%; }
.stock-table th:nth-child(5) { width: 10%; }
.stock-table th:nth-child(6) { width: 19%; }
.stock-table th:nth-child(7) { width: 10%; }
.stock-table th:nth-child(8) { width: 11%; }
.stock-table .asset-cell { min-width: 0; }
.stock-table .asset-name { min-width: 0; overflow: hidden; }
.stock-table .asset-name b, .stock-table .asset-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-table th { background: linear-gradient(#2c70bd, #0b4388); }
.stock-table td > small, .freshness + small { display: block; margin-top: 3px; color: #656b72; font-size: 8px; }
.source-pill.demo { color: #271d00; background: #e1b923; }
.freshness { display: inline-block; padding: 2px 5px; color: #fff; background: #167343; font: 700 8px var(--mono); }
.freshness.stale { color: #211800; background: #edbd29; }
.freshness.unknown { background: #707780; }
.demo-row { background: #fff4c7 !important; }
.stale-row { background: #f5e5c7 !important; }
.ticker-item i { padding: 1px 4px; color: #091016; background: #d1d7db; font: normal 700 8px var(--mono); }
.ticker-item.demo { color: #ffcf4c; }
.loading-cell, .empty-cell { padding: 24px !important; color: #59616a; text-align: center !important; }

.treasury-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.treasury-summary article { min-height: 112px; padding: 13px; color: #d9edff; background: #061322; border: 2px inset #d7dbe0; font-family: var(--mono); }
.treasury-summary span, .treasury-summary strong, .treasury-summary small { display: block; }
.treasury-summary span { color: #75a4cd; font-size: 9px; }
.treasury-summary strong { margin: 12px 0 8px; font-size: 18px; font-weight: 400; }
.treasury-summary small { color: #7990a5; font-size: 9px; }
#reserve-composition-body td strong, #reserve-composition-body td small { display: block; }
#reserve-composition-body td small { margin-top: 3px; color: #606974; font-size: 9px; }

.activity-panel { margin-top: 14px; }
.activity-list { margin: 0; padding: 0; list-style: none; border: 2px inset #d8dce0; background: #06111e; }
.activity-list li { display: grid; grid-template-columns: 150px 150px 1fr; gap: 10px; padding: 9px 11px; color: #b8c9da; border-bottom: 1px solid #1d344b; font: 10px var(--mono); }
.activity-list time { color: #7997b5; }
.activity-list strong { color: #d7eaff; }
.activity-list .empty-activity { display: block; padding: 26px; text-align: center; }
.empty-activity strong, .empty-activity span { display: block; }
.empty-activity span { margin-top: 6px; color: #7f96ac; }

.social-body { padding: 10px; background: #cfd4d7; }
.social-body > p:first-child { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; font: 10px var(--mono); }
.market-link { display: grid; grid-template-columns: 92px 1fr; gap: 3px 8px; align-items: center; margin-top: 7px; padding: 9px 10px; color: #eef7ff; background: linear-gradient(90deg, #071a2e, #0d3d6b); border-top: 2px solid #f7fbff; border-left: 2px solid #f7fbff; border-right: 2px solid #59616a; border-bottom: 2px solid #59616a; text-decoration: none; font-family: var(--mono); }
.market-link.odys { background: linear-gradient(90deg, #102846, #174f8c); }
.market-link:hover:not([aria-disabled="true"]) { color: #fff; background: linear-gradient(90deg, #145a91, #2079bc); }
.market-link span { color: #88b9e4; font-size: 8px; letter-spacing: .08em; }
.market-link strong { font-size: 10px; text-align: right; }
.market-link small { grid-column: 1 / -1; color: #80dfaa; font-size: 8px; }
.market-link[aria-disabled="true"] { cursor: not-allowed; filter: grayscale(.65); opacity: .72; }
.market-link[aria-disabled="true"] small { color: #e5be52; }
.social-note { margin: 10px 0 0; color: #4f5963; font: 8px/1.5 var(--mono); }
.site-footer { width: min(1600px, calc(100vw - 20px)); min-height: 58px; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; align-items: center; gap: 18px; margin: 0 auto 12px; padding: 7px 9px; background: linear-gradient(#dfe2df, #bfc3c1); }
.footer-identity { display: flex; align-items: center; gap: 9px; min-width: 250px; }
.footer-logo { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.footer-identity strong, .footer-identity span { display: block; }
.footer-identity strong { color: #102f50; font-size: 12px; }
.footer-identity span { margin-top: 3px; color: #536273; font: 8px var(--mono); letter-spacing: .08em; }
.footer-disclosure { margin: 0; color: #4c555d; font: 8px/1.45 var(--mono); }
.site-footer .tray { justify-self: end; }
.toast-region { bottom: 16px; }
.tray-dot.stale { background: #edbd29; box-shadow: none; }
.mini-logo { display: block; width: 22px; height: 22px; object-fit: contain; background: transparent; transform: none; }
.toast.success strong { color: #087943; }

@media (max-width: 1180px) {
  .page-shell > .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace { grid-template-columns: minmax(0, 1fr) 280px; }
  .stock-table th:nth-child(5), .stock-table td:nth-child(5) { display: none; }
  .stock-table th:nth-child(2) { width: 28%; }
  .stock-table th:nth-child(6) { width: 22%; }
}

@media (max-width: 930px) {
  .masthead { grid-template-columns: 1fr; }
  .page-shell > .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .treasury-summary { grid-template-columns: 1fr; }
  .activity-list li { grid-template-columns: 120px 120px 1fr; }
  .readiness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-shell { width: calc(100vw - 12px); margin-top: 7px; }
  .workspace { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr auto; }
  .footer-disclosure { grid-column: 1 / -1; grid-row: 2; }
  .stock-table th:nth-child(6), .stock-table td:nth-child(6),
  .stock-table th:nth-child(7), .stock-table td:nth-child(7) { display: none; }
  .stock-table th:nth-child(1) { width: 7%; }
  .stock-table th:nth-child(2) { width: 37%; }
  .stock-table th:nth-child(3) { width: 18%; }
  .stock-table th:nth-child(4) { width: 17%; }
  .stock-table th:nth-child(8) { width: 21%; }
  .reward-epoch-list { grid-template-columns: 1fr; }
  .wallet-register { grid-template-columns: 1fr 1fr; }
  .wallet-provider-field { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  body { padding-bottom: 0; }
  .logo-shell { width: 52px; height: 52px; flex-basis: 52px; }
  .eyebrow { font-size: 8px; }
  .masthead h1 { font-size: 22px; line-height: 1.08; }
  .mast-actions { position: static; }
  .asset-class-badges span { font-size: 7px; }
  .page-shell > .metric-grid { grid-template-columns: 1fr; grid-auto-flow: row; }
  .metric-card { min-height: 86px; }
  .subtabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .subtab { min-width: 0; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .button-row { justify-content: flex-start; }
  .wallet-register { grid-template-columns: 1fr; }
  .wallet-provider-field { grid-column: auto; }
  .scenario-grid { grid-template-columns: 1fr; }
  .activity-list li { grid-template-columns: 1fr; }
  .readiness-grid { grid-template-columns: 1fr; }
  .activity-list time { order: 3; }
  .reward-center .table-toolbar { align-items: stretch; }
  .reward-center .table-toolbar .win-button { flex: 0 0 auto; }
  .reward-epoch dl { grid-template-columns: 1fr; }
  .market-warning { font-size: 8px; }
  .desktop-tabs { overflow-x: hidden; }
  .desktop-tab { min-width: 0; flex: 1; padding-inline: 3px; font-size: 10px; }
  .stock-table th, .stock-table td { padding: 6px 5px; }
  .stock-table th:nth-child(1), .stock-table td:nth-child(1),
  .stock-table th:nth-child(4), .stock-table td:nth-child(4) { display: none; }
  .stock-table th:nth-child(2) { width: 48%; }
  .stock-table th:nth-child(3) { width: 25%; }
  .stock-table th:nth-child(8) { width: 27%; }
  .asset-logo { width: 21px; height: 21px; flex: 0 0 21px; }
  .site-footer { width: calc(100vw - 12px); grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 6px; }
  .footer-identity { min-width: 0; }
  .footer-identity span { display: none; }
  .footer-disclosure { grid-column: 1 / -1; font-size: 7px; }
  .site-footer .tray { height: 28px; padding-inline: 6px; }
}
