:root {
  color-scheme: dark;
  --black: #030503;
  --carbon: #070a07;
  --panel: rgba(11, 16, 11, 0.9);
  --panel-solid: #0b100b;
  --line: rgba(157, 255, 111, 0.17);
  --line-strong: rgba(139, 255, 79, 0.38);
  --green: #77ff28;
  --green-bright: #a1ff71;
  --green-deep: #0c6429;
  --white: #f4f8f1;
  --muted: #8f9a8e;
  --muted-strong: #bac5b7;
  --cyan: #2ce6d2;
  --magenta: #ff3aa7;
  --amber: #ffd43b;
  --danger: #ff667e;
  --radius: 18px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -15%, rgba(70, 255, 32, 0.13), transparent 36%),
    linear-gradient(180deg, #040704 0%, #020302 100%);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.14;
  pointer-events: none;
}

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

button {
  color: inherit;
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  top: 110px;
  bottom: 80px;
  width: 14vw;
  max-width: 210px;
  min-width: 92px;
  opacity: 0.42;
  filter: blur(1px);
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(84, 255, 37, 0.19);
  background:
    repeating-linear-gradient(102deg, transparent 0 18px, rgba(55, 255, 45, 0.08) 19px 20px),
    radial-gradient(ellipse at 50% 18%, rgba(70, 255, 30, 0.23), transparent 54%);
  box-shadow:
    inset 0 0 46px rgba(52, 255, 29, 0.14),
    0 0 38px rgba(26, 255, 42, 0.09);
  content: "";
  clip-path: polygon(
    35% 0,
    80% 7%,
    65% 20%,
    91% 33%,
    68% 48%,
    85% 62%,
    57% 76%,
    74% 91%,
    30% 100%,
    0 77%,
    20% 60%,
    3% 40%,
    26% 23%,
    8% 9%
  );
}

.ambient::after {
  inset: 7% 22%;
  opacity: 0.56;
  transform: scaleX(-1);
}

.ambient-left {
  left: 0;
}

.ambient-right {
  right: 0;
  transform: scaleX(-1);
}

.shell {
  width: min(1520px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
}

@media (min-width: 1081px) {
  .dashboard-page .shell,
  .operations-page .shell,
  .watch-page .shell {
    width: min(1720px, calc(100% - 40px));
  }
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 5, 3, 0.88);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  justify-self: start;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.wordmark-primary {
  font-size: 21px;
  font-weight: 800;
}

.wordmark-secondary {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 12, 7, 0.82);
}

.nav-item {
  display: grid;
  min-height: 36px;
  padding: 0 17px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: 160ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--white);
  outline: none;
}

.nav-item.is-active {
  color: #071006;
  background: var(--green);
  box-shadow: 0 0 22px rgba(119, 255, 40, 0.2);
}

.account-cluster {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.hub-link {
  display: grid;
  min-height: 36px;
  padding: 0 13px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--green-bright);
  background: rgba(119, 255, 40, 0.07);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.hub-link:hover,
.hub-link:focus-visible {
  border-color: var(--green);
  outline: none;
  background: rgba(119, 255, 40, 0.14);
}

.language {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(12, 18, 12, 0.86);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
}

.account {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.account:hover,
.account:focus-visible,
.language:hover,
.language:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--green);
  background: rgba(54, 255, 30, 0.08);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
}

.account-copy {
  display: grid;
  gap: 2px;
}

.account-copy strong {
  font-size: 15px;
}

.account-copy span {
  color: var(--muted);
  font-size: 14px;
}

main {
  padding: 38px 0 24px;
}

.night-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.venue-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-frame {
  position: relative;
  display: grid;
  width: 118px;
  height: 64px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(105, 255, 39, 0.2), transparent 65%), #071007;
  box-shadow:
    inset 0 0 28px rgba(92, 255, 35, 0.12),
    0 0 34px rgba(77, 255, 42, 0.09);
}

.logo-frame::after {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: var(--green);
  content: "239";
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.logo-frame img {
  width: 94%;
  height: 94%;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(107, 255, 54, 0.45));
}

/* The original logo artwork has generous margins around the mark. */
.dashboard-page .logo-frame img {
  transform: translateX(2px) scale(1.95);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: clamp(25px, 3vw, 37px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h1 span {
  color: var(--muted-strong);
  font-weight: 450;
}

.location {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.live-state {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-items: end;
  gap: 7px 9px;
}

.demo-badge,
.live-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-badge {
  color: var(--amber);
  border-color: rgba(255, 212, 59, 0.24);
  background: rgba(255, 212, 59, 0.05);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-bright);
  border-color: rgba(119, 255, 40, 0.24);
  background: rgba(119, 255, 40, 0.06);
}

.live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: livePulse 1.9s ease-in-out infinite;
}

.live-badge.is-foundation {
  color: var(--amber);
  border-color: rgba(255, 212, 59, 0.3);
  background: rgba(255, 212, 59, 0.055);
}

.live-badge.is-foundation i,
.live-badge.is-degraded i {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.55);
}

.live-badge.is-degraded {
  color: var(--amber);
  border-color: rgba(255, 212, 59, 0.4);
  background: rgba(255, 212, 59, 0.08);
}

.freshness {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric,
.panel,
.action-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(24, 40, 23, 0.44), transparent 48%), var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.metric::after,
.panel::after,
.action-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    transparent 5%,
    rgba(104, 255, 39, 0.027) 50%,
    transparent 70%
  );
  content: "";
  pointer-events: none;
}

.metric {
  min-height: 152px;
  padding: 20px;
  border-radius: var(--radius);
}

.metric-green {
  border-color: rgba(119, 255, 40, 0.34);
  box-shadow:
    inset 0 0 32px rgba(87, 255, 41, 0.055),
    0 0 34px rgba(65, 255, 39, 0.045);
}

.metric-alert {
  border-color: rgba(255, 212, 59, 0.22);
}

.metric-top,
.metric-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-top {
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-chip {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.metric-value {
  margin: 21px 0 14px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: clamp(25px, 2.45vw, 37px);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.metric-value small {
  margin-right: 7px;
  color: var(--green);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.metric-bottom {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 14px;
}

.trend {
  color: var(--green-bright);
  font-family: var(--font-mono);
  font-weight: 800;
}

.review-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.55);
}

.primary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  min-height: 410px;
  padding: 24px;
  border-radius: var(--radius);
}

.panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.legend {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 18px;
  border-top: 2px solid var(--green);
}

.legend .legend-dashed {
  border-top-style: dashed;
  opacity: 0.5;
}

.chart-wrap {
  position: relative;
  z-index: 1;
  height: 228px;
}

.chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid line {
  stroke: rgba(177, 255, 146, 0.1);
  stroke-width: 1;
}

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

.chart-line,
.chart-projection {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-width: 3;
  filter: url("#softGlow");
}

.chart-projection {
  stroke-dasharray: 7 8;
  opacity: 0.5;
}

.chart-point {
  fill: var(--black);
  stroke: var(--green-bright);
  stroke-width: 3;
  filter: url("#softGlow");
}

.chart-labels text {
  fill: var(--white);
  font-family: var(--font-mono);
  font-size: 14px;
}

.tender-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tender-split > div {
  display: grid;
  gap: 5px;
  padding: 0 15px;
  border-right: 1px solid var(--line);
}

.tender-split > div:first-child {
  padding-left: 0;
}

.tender-split > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.tender-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 14px;
}

.tender-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tender-card {
  background: var(--green);
  box-shadow: 0 0 9px rgba(119, 255, 40, 0.5);
}

.tender-mxn {
  background: var(--cyan);
}

.tender-usd {
  background: var(--magenta);
}

.tender-split strong {
  font-family: var(--font-mono);
  font-size: 19px;
}

.tender-split > div > span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.text-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-bright);
  background: rgba(119, 255, 40, 0.04);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.text-button:hover,
.text-button:focus-visible,
.action-card button:hover,
.action-card button:focus-visible {
  border-color: var(--green);
  outline: none;
  background: rgba(119, 255, 40, 0.1);
}

.cash-total {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 19px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cash-total span {
  max-width: 150px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.cash-total strong {
  color: var(--green-bright);
  font-family: var(--font-mono);
  font-size: clamp(20px, 2vw, 29px);
  letter-spacing: -0.05em;
  text-shadow: 0 0 18px rgba(119, 255, 40, 0.15);
}

.custody-rail {
  position: relative;
  z-index: 1;
  padding: 17px 0;
}

.custody-node {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid rgba(140, 255, 96, 0.1);
  border-radius: 12px;
  background: rgba(6, 10, 6, 0.58);
}

.featured-node {
  border-color: rgba(119, 255, 40, 0.32);
  background: linear-gradient(90deg, rgba(80, 255, 39, 0.1), transparent 65%), rgba(6, 12, 6, 0.82);
}

.node-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.custody-node p {
  margin: 0 0 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.custody-node strong {
  font-family: var(--font-mono);
  font-size: 16px;
}

.node-state {
  color: var(--green-bright);
  font-size: 14px;
  font-weight: 700;
}

.node-state.dim {
  color: var(--muted);
}

.rail-link {
  height: 10px;
  padding-left: 25px;
}

.rail-link span {
  display: block;
  width: 1px;
  height: 100%;
  background: var(--line-strong);
}

.custody-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.custody-summary div {
  display: grid;
  gap: 4px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
}

.custody-summary div:first-child {
  padding-left: 0;
}

.custody-summary div:last-child {
  padding-right: 0;
  border-right: 0;
}

.custody-summary span {
  color: var(--muted);
  font-size: 14px;
}

.custody-summary strong {
  font-family: var(--font-mono);
  font-size: 16px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hub-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 12px;
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(42, 116, 33, 0.24), rgba(8, 16, 9, 0.92) 56%);
}

.hub-bridge h2 {
  margin: 0 0 6px;
  font-size: 23px;
}

.hub-bridge p:not(.eyebrow) {
  max-width: 740px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.5;
}

.hub-bridge a {
  display: grid;
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 17px;
  place-items: center;
  border-radius: 999px;
  color: #071006;
  background: var(--green);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.action-card {
  display: grid;
  grid-template-columns: 47px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border-radius: var(--radius);
}

.action-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--green-bright);
  background: rgba(100, 255, 50, 0.065);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
}

.watch-icon {
  color: var(--amber);
  border-color: rgba(255, 212, 59, 0.3);
  background: rgba(255, 212, 59, 0.055);
}

.guest-icon {
  color: var(--cyan);
  border-color: rgba(44, 230, 210, 0.3);
  background: rgba(44, 230, 210, 0.055);
}

.action-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.action-copy .eyebrow {
  margin-bottom: 5px;
  font-size: 14px;
}

.action-copy h3 {
  margin-bottom: 5px;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-copy > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-card button {
  position: relative;
  z-index: 1;
  min-width: 57px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(6, 10, 6, 0.72);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 69px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

footer strong {
  color: var(--green);
  font-size: 14px;
  letter-spacing: 0.18em;
}

footer span:last-child {
  justify-self: end;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--green-bright);
  background: rgba(6, 14, 6, 0.96);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.46);
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

@media (max-width: 1080px) {
  .shell {
    width: min(100% - 32px, 920px);
  }

  .topbar {
    grid-template-areas:
      "wordmark account"
      "navigation navigation";
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 11px 0 10px;
  }

  .wordmark {
    grid-area: wordmark;
  }

  .account-cluster {
    grid-area: account;
  }

  .nav {
    position: static;
    grid-area: navigation;
    width: 100%;
  }

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

  .primary-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding-bottom: 0;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 520px);
  }

  .topbar {
    min-height: 64px;
  }

  .wordmark-secondary,
  .account-copy {
    display: none;
  }

  .hub-link {
    min-height: 32px;
    padding: 0 9px;
    font-size: 14px;
  }

  .hub-bridge {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
    padding: 18px;
  }

  main {
    padding-top: 24px;
  }

  .night-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .venue-lockup {
    align-items: flex-start;
    gap: 13px;
  }

  .logo-frame {
    width: 96px;
    height: 54px;
    border-radius: 14px;
  }

  h1 {
    font-size: 29px;
  }

  .location {
    font-size: 14px;
  }

  .live-state {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    width: 100%;
  }

  .night-header .live-state {
    grid-template-columns: auto auto;
  }

  .freshness {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .metric {
    min-height: 137px;
    padding: 15px;
    border-radius: 15px;
  }

  .metric-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .metric-value {
    margin: 18px 0 12px;
    font-size: 27px;
  }

  .metric-bottom {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px;
    line-height: 1.25;
  }

  .panel {
    min-height: 0;
    padding: 18px;
    border-radius: 15px;
  }

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

  .legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .chart-wrap {
    height: 190px;
  }

  .tender-split {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .tender-split > div,
  .tender-split > div:first-child,
  .tender-split > div:last-child {
    grid-template-columns: 1fr auto;
    padding: 0 0 11px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tender-split > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .tender-split > div > span:last-child {
    grid-column: 1 / -1;
  }

  .cash-total {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .cash-total strong {
    font-size: 31px;
  }

  .custody-node {
    grid-template-columns: 31px 1fr;
  }

  .node-state {
    grid-column: 2;
  }

  .custody-summary {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .custody-summary div,
  .custody-summary div:first-child,
  .custody-summary div:last-child {
    grid-template-columns: 1fr auto;
    padding: 0 0 11px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .custody-summary div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .action-card {
    grid-template-columns: 42px 1fr auto;
    gap: 11px;
    padding: 14px;
  }

  .action-icon {
    width: 42px;
    height: 42px;
  }

  .action-copy h3,
  .action-copy > span {
    white-space: normal;
  }

  footer {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding-bottom: 15px;
  }

  footer strong {
    justify-self: end;
  }

  footer span:last-child {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    border-radius: 17px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    min-width: 0;
    min-height: 44px;
    padding: 5px 3px;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .ambient {
    opacity: 0.25;
  }
}

@media (max-width: 360px) {
  .dashboard-page .topbar {
    grid-template-areas:
      "wordmark"
      "account"
      "navigation";
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-page .account-cluster {
    width: 100%;
    justify-self: stretch;
    justify-content: space-between;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* One discoverable response for every enabled, semantic control in the demo. */
body
  :is(button, summary, select, [role="button"], [role="tab"]):not(:disabled):not(
    [aria-disabled="true"]
  ) {
  cursor: pointer;
}

@media (hover: hover) {
  body
    :is(
      a[href],
      button,
      summary,
      select,
      input:not([type="hidden"]),
      textarea,
      [role="button"],
      [role="tab"],
      [role="checkbox"],
      [role="switch"]
    ):not(:disabled):not([aria-disabled="true"]):hover {
    outline: 2px solid rgba(161, 255, 113, 0.8);
    outline-offset: 2px;
    filter: brightness(1.15);
  }
}

body
  :is(
    a[href],
    button,
    summary,
    select,
    input:not([type="hidden"]),
    textarea,
    [role="button"],
    [role="tab"],
    [role="checkbox"],
    [role="switch"]
  ):not(:disabled):not([aria-disabled="true"]):focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

@media (forced-colors: active) {
  body
    :is(a[href], button, summary, select, input, textarea, [role="button"], [role="tab"]):not(
      :disabled
    ):hover {
    outline-color: Highlight;
  }
}
