@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111111;
  --secondary: #666666;
  --tertiary: #999999;
  --indicator: #f4f4f4;
  --soft-line: #eeeeee;
  --error: #9d3030;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand strong { color: var(--text); font-weight: 600; }
.brand span { color: var(--secondary); font-weight: 400; }
.social-link { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; transition: color .2s ease; }
.social-link span { transition: transform .2s ease; }
.social-link:hover { color: var(--text); }
.social-link:hover span { transform: translate(2px, -2px); }

main {
  flex: 1;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 48px;
  display: flex;
  align-items: center;
}

.dashboard {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  align-items: center;
  gap: clamp(72px, 7vw, 120px);
}

.status-hero {
  max-width: 850px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-wrap: balance;
  animation: enter-copy .65s cubic-bezier(.22, 1, .36, 1) both;
}

.status-hero strong { font-weight: 500; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}

.metric-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: enter-metric .5s cubic-bezier(.22, 1, .36, 1) forwards;
}

.metric-item:nth-child(1), .metric-item:nth-child(2) { animation-delay: .1s; }
.metric-item:nth-child(3), .metric-item:nth-child(4) { animation-delay: .17s; }
.metric-item:nth-child(5), .metric-item:nth-child(6) { animation-delay: .24s; }
.metric-item:nth-child(7), .metric-item:nth-child(8) { animation-delay: .31s; }

.metric-anchor {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--indicator);
  transition: background-color .35s ease, transform .25s ease;
}

.metric-item:hover .metric-anchor { transform: scale(1.055); }

.anchor-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--text);
  opacity: .1;
  transition: height .7s cubic-bezier(.22, 1, .36, 1);
}

.anchor-icon {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.anchor-icon.muted { color: var(--secondary); }
.metric-anchor.state-active { background: var(--text); }
.metric-anchor.state-active .anchor-icon { color: var(--bg); }
.metric-anchor.state-sell { background: var(--secondary); }
.metric-anchor.state-sell .anchor-icon { color: var(--bg); }

.metric-content { min-width: 0; display: flex; flex-direction: column; }
.metric-value { overflow: hidden; color: var(--text); font-size: 16px; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.metric-label { margin-top: 4px; overflow: hidden; color: var(--secondary); font-size: 13px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }

.system-anchor { background: var(--indicator); }
.system-core { width: 8px; height: 8px; border-radius: 50%; background: #c9c9c9; transition: background-color .35s ease, transform .35s ease; }
.system-anchor.state-active { background: var(--text); }
.system-anchor.state-active .system-core { background: var(--bg); animation: breathe 2.4s ease-in-out infinite; }
.system-anchor.state-error { background: #f7eaea; }
.system-anchor.state-error .system-core { background: var(--error); }

.activity {
  width: min(760px, calc(100% - 96px));
  margin: 0 auto;
  padding: 17px 0 4px;
  border-top: 1px solid var(--soft-line);
}

.activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.activity-heading h2, .activity-heading span { margin: 0; color: var(--tertiary); font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.activity-heading span { font-weight: 400; }
.activity-list { margin: 11px 0 0; padding: 0; list-style: none; }
.activity-item {
  min-height: 31px;
  display: grid;
  grid-template-columns: 58px 52px minmax(100px, 1fr) minmax(110px, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(238, 238, 238, .8);
  color: var(--secondary);
  font-size: 11px;
  animation: enter-metric .35s cubic-bezier(.22, 1, .36, 1) both;
}
.activity-item:first-child { border-top: 0; }
.activity-item time { color: var(--tertiary); }
.activity-type { color: var(--text); font-weight: 600; letter-spacing: .04em; }
.activity-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-link { color: var(--secondary); text-decoration: none; transition: color .2s ease; }
.activity-link:hover { color: var(--text); }
.activity-empty { padding: 13px 0 5px; color: var(--tertiary); font-size: 11px; text-align: center; }

footer {
  min-height: 54px;
  padding: 0 48px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  color: var(--tertiary);
  font-size: 10px;
  letter-spacing: .02em;
}

footer span:first-child { max-width: min(65vw, 620px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes enter-copy { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes enter-metric { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { opacity: .38; transform: scale(.72); } }

@media (max-width: 1023px) {
  main { align-items: flex-start; padding-top: 72px; padding-bottom: 72px; }
  .dashboard { grid-template-columns: 1fr; gap: 80px; }
  .status-hero { max-width: 920px; }
}

@media (max-width: 599px) {
  .topbar { padding: 24px 20px; font-size: 12px; }
  .brand span { display: none; }
  .social-link { gap: 4px; }
  main { padding: 56px 20px 64px; }
  .dashboard { gap: 64px; }
  .status-hero { font-size: clamp(2.25rem, 11vw, 3.25rem); line-height: 1.07; letter-spacing: -.04em; }
  .metrics { grid-template-columns: 1fr; gap: 28px; }
  .metric-anchor { flex-basis: 44px; width: 44px; height: 44px; }
  footer { padding: 0 20px 20px; font-size: 9px; }
  .activity { width: calc(100% - 40px); padding-top: 15px; }
  .activity-item { grid-template-columns: 44px 48px 1fr auto; gap: 9px; padding: 7px 0; }
  .activity-edge { display: none; }
  footer span:last-child { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .metric-item { opacity: 1; }
}
