*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--z-font-sans);
  background: var(--z-bg-app);
  color: var(--z-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% -10%, rgba(18, 104, 255, 0.07), transparent 32rem),
    var(--z-bg-app);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

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

img,
svg {
  display: block;
}

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

:focus-visible {
  outline: 3px solid var(--z-focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--z-radius-sm);
  background: var(--z-surface);
  color: var(--z-text-strong);
  box-shadow: var(--z-shadow-md);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: var(--z-sidebar);
  color: white;
  letter-spacing: 0.28em;
  font-size: 13px;
  font-weight: 800;
  transition: opacity var(--z-motion-base) var(--z-ease-standard), visibility var(--z-motion-base);
  animation: splash-failsafe 1ms linear 2200ms forwards;
}

@keyframes splash-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.app-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.app-splash__mark {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
}

.app-splash__mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(29, 220, 229, 0.22);
  filter: blur(18px);
}

.app-splash__mark img {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  transition: grid-template-columns var(--z-motion-base) var(--z-ease-standard);
}

html[data-sidebar="collapsed"] .app-shell {
  grid-template-columns: 86px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--z-sidebar);
  color: var(--z-sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--z-brand-cyan), var(--z-brand-blue), transparent 72%);
  opacity: 0.9;
}

.sidebar__brand {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand-lockup {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
}

.brand-lockup__mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.brand-lockup__mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-lockup__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  white-space: nowrap;
  transition: opacity var(--z-motion-fast), width var(--z-motion-base);
}

.brand-lockup__copy strong {
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.12em;
}

.brand-lockup__copy small {
  color: var(--z-sidebar-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  transition: background var(--z-motion-fast), color var(--z-motion-fast), transform var(--z-motion-fast);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar__collapse {
  flex: 0 0 auto;
  color: var(--z-sidebar-muted);
}

html[data-sidebar="collapsed"] .sidebar__collapse svg {
  transform: rotate(180deg);
}

.sidebar__nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-label {
  margin: 0 10px 9px;
  color: #60758f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-label--secondary {
  margin-top: 25px;
}

.nav-item {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 4px 0;
  padding: 0 13px;
  border-radius: 12px;
  color: #a9b7c9;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background var(--z-motion-fast), color var(--z-motion-fast), transform var(--z-motion-fast);
}

.nav-item:hover {
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.is-active {
  color: #ffffff;
  background: rgba(18, 104, 255, 0.16);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--z-brand-cyan);
}

.nav-item svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar__footer {
  padding: 14px 12px 18px;
}

.alpha-badge {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.alpha-badge__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--z-brand-cyan);
  box-shadow: 0 0 0 5px rgba(29, 220, 229, 0.08);
}

.alpha-badge__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
}

.alpha-badge__copy strong {
  font-size: 11px;
}

.alpha-badge__copy small {
  color: var(--z-sidebar-muted);
  font-size: 10px;
}

html[data-sidebar="collapsed"] .brand-lockup__copy,
html[data-sidebar="collapsed"] .nav-item span,
html[data-sidebar="collapsed"] .nav-label,
html[data-sidebar="collapsed"] .alpha-badge__copy {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

html[data-sidebar="collapsed"] .sidebar__brand {
  gap: 4px;
  padding-inline: 7px;
}

html[data-sidebar="collapsed"] .brand-lockup {
  flex: 1 1 38px;
}

html[data-sidebar="collapsed"] .brand-lockup__mark,
html[data-sidebar="collapsed"] .brand-lockup__mark img {
  width: 34px;
  height: 34px;
}

html[data-sidebar="collapsed"] .sidebar__collapse {
  width: 30px;
  height: 30px;
}

html[data-sidebar="collapsed"] .nav-item {
  justify-content: center;
  padding: 0;
}

html[data-sidebar="collapsed"] .alpha-badge {
  justify-content: center;
  padding-inline: 0;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(216, 224, 235, 0.86);
  background: rgba(244, 247, 251, 0.88);
  backdrop-filter: blur(18px);
}

.topbar__leading,
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-context {
  display: grid;
  gap: 2px;
}

.page-context__eyebrow {
  color: var(--z-text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-context strong {
  color: var(--z-text-strong);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.mobile-menu {
  display: none;
  color: var(--z-text-muted);
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--z-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--z-text-muted);
  font-size: 11px;
  font-weight: 700;
}

.topbar-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--z-success);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--z-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
}

.profile-chip__avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--z-brand-ink);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.profile-chip__copy {
  display: grid;
  gap: 1px;
  padding-right: 3px;
}

.profile-chip__copy strong {
  color: var(--z-text-strong);
  font-size: 11px;
}

.profile-chip__copy small {
  color: var(--z-text-soft);
  font-size: 9px;
}

.page {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 38px 36px 60px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--z-brand-blue-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overview-hero {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  overflow: hidden;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-xl);
  background: var(--z-surface);
  box-shadow: var(--z-shadow-sm);
}

.overview-hero__copy {
  align-self: center;
  padding: 50px 54px;
}

.overview-hero h1,
.workspace-header h1,
.workspace-canvas h1 {
  margin: 0;
  color: var(--z-text-strong);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.overview-hero__copy > p {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--z-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}

.hero-note {
  max-width: 220px;
  color: var(--z-text-soft);
  font-size: 10px;
  line-height: 1.45;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 750;
  transition: transform var(--z-motion-fast), background var(--z-motion-fast), box-shadow var(--z-motion-fast);
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button svg,
.module-card__link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--primary {
  background: var(--z-brand-ink);
  color: white;
  box-shadow: 0 9px 24px rgba(7, 26, 53, 0.13);
}

.button--primary:hover {
  background: #0a2347;
}

.overview-hero__brand {
  position: relative;
  min-height: 270px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--z-sidebar);
}

.overview-hero__brand::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(18, 104, 255, 0.3);
  filter: blur(72px);
}

.overview-hero__brand::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.overview-hero__brand > span {
  position: absolute;
  top: 24px;
  right: 25px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: #9bb0ca;
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.overview-hero__brand img {
  position: relative;
  z-index: 1;
  width: min(78%, 310px);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.18));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin: 42px 2px 18px;
}

.section-heading h2,
.foundation-panel h2,
.workspace-canvas h2 {
  margin: 0;
  color: var(--z-text-strong);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--z-text-muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.module-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 21px;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-lg);
  background: var(--z-surface);
  box-shadow: var(--z-shadow-sm);
  transition: transform var(--z-motion-base) var(--z-ease-standard), border-color var(--z-motion-fast), box-shadow var(--z-motion-base);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: #ccd8e8;
  box-shadow: var(--z-shadow-md);
}

.module-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-card__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--z-bg-subtle);
  color: var(--z-brand-ink);
  font-size: 12px;
  font-weight: 850;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.stage-next {
  background: #eaf2ff;
  color: #195dc8;
}

.stage-ready {
  background: #f2f5f9;
  color: #64738a;
}

.stage-complete {
  background: #e8f7f1;
  color: #087253;
}

.module-card h3 {
  margin: 0;
  color: var(--z-text-strong);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.module-card p {
  min-height: 40px;
  margin: 7px 0 0;
  color: var(--z-text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.module-card__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--z-text-soft);
  font-size: 10px;
  font-weight: 750;
}

.foundation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 36px;
  margin-top: 30px;
  padding: 30px 32px;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-lg);
  background: var(--z-surface-soft);
}

.foundation-panel p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--z-text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.foundation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 18px;
  align-content: center;
}

.foundation-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--z-text);
  font-size: 10px;
  font-weight: 700;
}

.foundation-list i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--z-success);
  box-shadow: 0 0 0 4px rgba(10, 143, 104, 0.08);
}

.workspace-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 28px;
  padding: 14px 2px 28px;
}

.workspace-header h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.workspace-header p {
  max-width: 680px;
  margin: 13px 0 0;
  color: var(--z-text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.workspace-canvas {
  position: relative;
  min-height: 440px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-xl);
  background: var(--z-surface);
  box-shadow: var(--z-shadow-sm);
}

.workspace-canvas__accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(var(--z-brand-blue), var(--z-brand-cyan));
}

.workspace-canvas__content {
  max-width: 720px;
  padding: 54px 58px;
}

.workspace-canvas__kicker {
  display: inline-flex;
  margin-bottom: 13px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--z-bg-subtle);
  color: var(--z-text-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workspace-canvas h2 {
  font-size: 28px;
}

.workspace-canvas p {
  margin: 14px 0 0;
  color: var(--z-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.workspace-canvas__rule {
  width: 46px;
  height: 2px;
  margin-top: 30px;
  background: var(--z-brand-blue);
}

.workspace-canvas__note {
  max-width: 590px;
  font-size: 11px !important;
}

.workspace-canvas--centered {
  place-items: center;
  text-align: center;
}

.workspace-canvas--centered .workspace-canvas__content {
  display: grid;
  justify-items: center;
}

.workspace-canvas--centered .button {
  margin-top: 22px;
}

.nav-scrim {
  display: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 170ms;
  animation-timing-function: var(--z-ease-standard);
}

@media (max-width: 1180px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  }

  .overview-hero__copy {
    padding: 42px 38px;
  }
}

@media (max-width: 900px) {
  .app-shell,
  html[data-sidebar="collapsed"] .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    width: min(286px, calc(100vw - 44px));
    transform: translateX(-102%);
    transition: transform var(--z-motion-base) var(--z-ease-standard);
    box-shadow: 20px 0 54px rgba(3, 13, 26, 0.22);
  }

  body.is-nav-open {
    overflow: hidden;
  }

  body.is-nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar__collapse {
    display: none;
  }

  html[data-sidebar="collapsed"] .brand-lockup__copy,
  html[data-sidebar="collapsed"] .nav-item span,
  html[data-sidebar="collapsed"] .nav-label,
  html[data-sidebar="collapsed"] .alpha-badge__copy {
    width: auto;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
  }

  html[data-sidebar="collapsed"] .sidebar__brand {
    padding: 0 14px 0 18px;
  }

  html[data-sidebar="collapsed"] .nav-item {
    justify-content: flex-start;
    padding: 0 13px;
  }

  html[data-sidebar="collapsed"] .alpha-badge {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    border: 0;
    background: rgba(5, 14, 28, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--z-motion-base), visibility var(--z-motion-base);
  }

  body.is-nav-open .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu {
    display: grid;
  }

  .topbar {
    padding-inline: 20px;
  }

  .overview-hero {
    grid-template-columns: 1fr;
  }

  .overview-hero__brand {
    min-height: 210px;
  }

  .foundation-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 70px;
    padding-inline: 14px;
  }

  .topbar-status,
  .profile-chip__copy {
    display: none;
  }

  .profile-chip {
    padding: 4px;
    border-radius: 12px;
  }

  .profile-chip__avatar {
    width: 34px;
    height: 34px;
  }

  .page {
    padding: 24px 16px 42px;
  }

  .overview-hero {
    border-radius: 22px;
  }

  .overview-hero__copy {
    padding: 34px 24px 32px;
  }

  .overview-hero h1,
  .workspace-header h1 {
    font-size: 36px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-note {
    max-width: 320px;
  }

  .section-heading,
  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    margin-top: 32px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 188px;
  }

  .foundation-panel {
    padding: 24px 22px;
  }

  .foundation-list {
    grid-template-columns: 1fr;
  }

  .workspace-canvas {
    min-height: 400px;
    border-radius: 22px;
  }

  .workspace-canvas__content {
    padding: 38px 26px;
  }

  .workspace-canvas h2 {
    font-size: 24px;
  }
}

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

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.001ms;
  }
}
