:root {
  --ink: #edf4ee;
  --muted: rgba(218, 229, 223, 0.68);
  --line: rgba(226, 237, 230, 0.16);
  --ivory: #f2ece1;
  --paper: rgba(238, 244, 238, 0.075);
  --sage: #8aa996;
  --teal: #74d5c8;
  --copper: #d2a06d;
  --stage: #071211;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(158, 204, 193, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(158, 204, 193, 0.045) 1px, transparent 1px),
    linear-gradient(118deg, rgba(116, 213, 200, 0.12) 0%, rgba(116, 213, 200, 0) 38%),
    linear-gradient(252deg, rgba(210, 160, 109, 0.12) 0%, rgba(210, 160, 109, 0) 34%),
    linear-gradient(135deg, #06100f 0%, #0a1715 48%, #15130f 100%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%, 100% 100%;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(7, 18, 17, 0) 0%, rgba(7, 18, 17, 0.45) 100%),
    repeating-linear-gradient(
      135deg,
      rgba(237, 244, 238, 0.025) 0,
      rgba(237, 244, 238, 0.025) 1px,
      transparent 1px,
      transparent 8px
    );
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.experience {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
}

#cube-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: grab;
  touch-action: none;
}

.topbar {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 26px clamp(22px, 4vw, 64px);
  pointer-events: none;
}

.brand,
.nav {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: rgba(237, 244, 238, 0.88);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 24px;
  aspect-ratio: 1;
  border: 1px solid rgba(237, 244, 238, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(116, 213, 200, 0.62) 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(116, 213, 200, 0.62) 46% 54%, transparent 54%),
    rgba(237, 244, 238, 0.12);
  box-shadow: 0 0 34px rgba(116, 213, 200, 0.18);
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 34px);
  align-items: center;
  font-size: 13px;
  font-weight: 650;
  color: rgba(237, 244, 238, 0.7);
}

.nav a {
  position: relative;
  padding-block: 8px;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100svh - 96px);
  padding: 152px clamp(22px, 4vw, 64px) 148px;
  pointer-events: none;
}

.hero-copy {
  width: min(620px, 45vw);
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.22em;
  color: var(--teal);
  text-transform: uppercase;
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(70px, 9.6vw, 150px);
  font-weight: 520;
  line-height: 0.88;
  letter-spacing: 0;
  color: var(--ivory);
  text-shadow: 0 20px 72px rgba(0, 0, 0, 0.44);
}

.lede {
  max-width: 490px;
  margin: 30px 0 0;
  color: rgba(226, 237, 230, 0.76);
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.56;
}

.quota-card {
  width: min(620px, 100%);
  margin-top: 28px;
  padding: 18px 20px 16px;
  border: 1px solid rgba(226, 237, 230, 0.18);
  background: linear-gradient(135deg, rgba(10, 23, 21, 0.82), rgba(10, 23, 21, 0.46));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.quota-card-head,
.quota-card-foot,
.quota-account-head,
.quota-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quota-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--copper);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.quota-card h2 {
  margin: 0;
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 720;
  letter-spacing: 0.01em;
}

.quota-status {
  display: inline-flex;
  flex: none;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(116, 213, 200, 0.22);
  color: var(--teal);
  font-size: 11px;
  font-weight: 760;
}

.quota-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(116, 213, 200, 0.72);
}

.quota-accounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.quota-account {
  min-width: 0;
  padding: 10px 11px 9px;
  border: 1px solid rgba(226, 237, 230, 0.11);
  background: rgba(238, 244, 238, 0.035);
}

.quota-account-head strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quota-account-head span {
  flex: none;
  color: var(--copper);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.quota-values {
  margin-top: 8px;
  color: rgba(226, 237, 230, 0.48);
  font-size: 9px;
}

.quota-values b {
  color: var(--ink);
  font-size: 11px;
}

.quota-tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 5px;
}

.quota-tracks i {
  position: relative;
  height: 3px;
  overflow: hidden;
  background: rgba(226, 237, 230, 0.1);
}

.quota-tracks i::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--usage);
  content: "";
  background: var(--teal);
}

.quota-account.is-warning .quota-tracks i:first-child::after {
  background: var(--copper);
}

.quota-account.is-critical .quota-tracks i:first-child::after {
  background: #ee7b6f;
}

.quota-account.is-unavailable {
  opacity: 0.56;
}

.quota-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  border: 1px solid rgba(226, 237, 230, 0.11);
  color: rgba(226, 237, 230, 0.54);
  font-size: 12px;
  text-align: center;
}

.quota-card[data-sync-state="loading"] .quota-status {
  color: var(--copper);
}

.quota-card[data-sync-state="error"] .quota-status {
  border-color: rgba(238, 123, 111, 0.3);
  color: #ee7b6f;
}

.quota-account small {
  display: block;
  margin-top: 7px;
  color: rgba(226, 237, 230, 0.4);
  font-size: 8px;
  line-height: 1.3;
}

.quota-card-foot {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: rgba(226, 237, 230, 0.48);
  font-size: 10px;
  line-height: 1.4;
}

.module-readout {
  position: absolute;
  right: clamp(22px, 4vw, 64px);
  bottom: 160px;
  width: min(410px, 31vw);
  padding: 22px 0 22px 22px;
  border-left: 1px solid rgba(226, 237, 230, 0.26);
  background: linear-gradient(90deg, rgba(7, 18, 17, 0.78), rgba(7, 18, 17, 0.34) 68%, rgba(7, 18, 17, 0));
  box-shadow: -28px 0 72px rgba(7, 18, 17, 0.28);
  pointer-events: auto;
}

.readout-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.module-readout h2 {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 38px);
  font-weight: 680;
  line-height: 1.06;
  letter-spacing: 0;
}

.module-readout p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.module-readout h2,
.module-readout p,
.module-stats dd {
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.module-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.module-stats div {
  min-width: 0;
}

.module-stats dt {
  color: rgba(226, 237, 230, 0.5);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.module-stats dd {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 760;
  white-space: nowrap;
}

.module-tabs {
  position: absolute;
  z-index: 3;
  left: clamp(22px, 4vw, 64px);
  bottom: 76px;
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  width: min(548px, calc(100vw - 44px));
  border: 1px solid rgba(226, 237, 230, 0.18);
  background: rgba(10, 23, 21, 0.58);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.module-tab {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(226, 237, 230, 0.13);
  background: transparent;
  color: rgba(226, 237, 230, 0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.module-tab:last-child {
  border-right: 0;
}

.module-tab:hover,
.module-tab.is-active {
  color: #06100f;
  background: var(--teal);
}

.surface-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0 clamp(22px, 4vw, 64px) 56px;
  background: linear-gradient(180deg, rgba(7, 18, 17, 0), rgba(7, 18, 17, 0.68));
}

.surface-strip > div {
  min-height: 150px;
  padding: 26px 24px 28px 0;
  border-top: 1px solid rgba(226, 237, 230, 0.18);
}

.strip-label {
  display: block;
  margin-bottom: 18px;
  color: var(--copper);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.surface-strip strong {
  display: block;
  font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.18;
}

.surface-strip p {
  max-width: 320px;
  margin: 12px 0 0;
  color: rgba(226, 237, 230, 0.62);
  font-size: 14px;
  line-height: 1.55;
}

.is-loading .hero-copy,
.is-loading .module-readout,
.is-loading .module-tabs,
.is-loading .surface-strip {
  opacity: 0;
}

@media (max-width: 920px) {
  .topbar {
    padding: 20px 22px;
  }

  .nav {
    gap: 15px;
    font-size: 12px;
  }

  .hero {
    min-height: calc(100svh - 78px);
    padding: 118px 22px 180px;
  }

  .hero-copy {
    width: min(520px, 100%);
    padding-top: 0;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(60px, 17vw, 112px);
  }

  .lede {
    max-width: 430px;
    margin-top: 20px;
    font-size: 16px;
  }

  .quota-card {
    width: min(620px, 100%);
  }

  .module-readout {
    right: 22px;
    bottom: 88px;
    left: 22px;
    width: auto;
    padding: 18px 0 18px 16px;
  }

  .module-tabs {
    right: 22px;
    bottom: 24px;
    left: 22px;
    width: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .module-tab {
    min-height: 44px;
    padding: 0 7px;
    font-size: 10px;
  }

  .surface-strip {
    grid-template-columns: 1fr;
    padding: 0 22px 44px;
  }

  .surface-strip > div {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 64px;
  }

  body {
    overscroll-behavior-y: contain;
  }

  #cube-stage {
    pointer-events: none;
    touch-action: auto;
    cursor: default;
    opacity: 0.34;
  }

  .topbar {
    align-items: flex-start;
    padding:
      calc(16px + env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      12px
      max(16px, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(7, 18, 17, 0.88), rgba(7, 18, 17, 0));
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding:
      calc(78px + env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      calc(42px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    pointer-events: auto;
  }

  .eyebrow {
    max-width: 260px;
    margin-bottom: 10px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  h1 {
    font-size: clamp(48px, 16vw, 68px);
    line-height: 0.92;
  }

  .lede {
    max-width: 340px;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.55;
  }

  .quota-card {
    margin-top: 16px;
    padding: 15px 14px 14px;
    border-color: rgba(226, 237, 230, 0.22);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(8, 22, 20, 0.96), rgba(13, 28, 25, 0.9));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
    touch-action: pan-y;
  }

  .quota-card-head {
    align-items: flex-start;
  }

  .quota-card h2 {
    font-size: 19px;
  }

  .quota-status {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
  }

  .quota-accounts {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 14px;
  }

  .quota-account {
    padding: 12px 11px 10px;
    border-radius: 12px;
    background: rgba(238, 244, 238, 0.052);
  }

  .quota-account-head strong {
    font-size: 11px;
  }

  .quota-values {
    margin-top: 10px;
    font-size: 10px;
  }

  .quota-values b {
    font-size: 12px;
  }

  .quota-tracks i {
    height: 4px;
    border-radius: 999px;
  }

  .quota-account small {
    margin-top: 8px;
    font-size: 9px;
    line-height: 1.45;
  }

  .quota-card-foot {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    font-size: 9px;
  }
}

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