.shell-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.shell-heading__copy {
  min-width: 0;
  display: grid;
  gap: var(--space-2);
}

.shell-heading__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.shell-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.shell-grid--aside {
  grid-template-columns: minmax(16rem, 0.35fr) minmax(0, 1fr);
}

.shell-tool {
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow-wrap: anywhere;
}

.shell-tool__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.shell-media {
  display: grid;
  min-height: 24rem;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-map-placeholder);
  color: var(--color-muted);
  font-weight: var(--font-weight-bold);
}

.detail-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-2) var(--space-5);
}

.detail-list dt {
  color: var(--color-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.detail-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
  gap: var(--space-8);
}

.workspace-nav {
  display: grid;
  align-content: start;
  gap: var(--space-1);
}

.workspace-nav a {
  display: flex;
  min-height: var(--control-height);
  align-items: center;
  padding-inline: var(--space-3);
  border-left: 3px solid transparent;
  color: var(--color-ink-soft);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.workspace-nav a[aria-current="page"] {
  border-left-color: var(--color-brand);
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-3);
}

.metric {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.metric__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
}

.auth-shell {
  width: min(100% - 2rem, 34rem);
  margin-inline: auto;
}

.auth-form {
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.step-list {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  min-height: var(--control-height);
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--color-border);
}

.step-list li[aria-current="step"] {
  border-left-color: var(--color-brand);
  background: var(--color-brand-soft);
}

.step-list__number {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-surface);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.status-row {
  display: flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.status-row:last-child {
  border-bottom: 0;
}

.price {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
}

@media (max-width: 60rem) {
  .shell-grid,
  .shell-grid--aside,
  .workspace-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 45rem) {
  .shell-heading,
  .shell-heading__actions,
  .status-row {
    align-items: stretch;
    flex-direction: column;
  }

  .shell-heading__actions .button {
    width: 100%;
  }

  .shell-tool,
  .auth-form {
    padding: var(--space-5);
  }

  .shell-media {
    min-height: 18rem;
  }

  .detail-list,
  .workspace-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 30rem) {
  .shell-heading__actions,
  .shell-heading__actions .button,
  .state-panel__actions,
  .state-panel__actions .button,
  .state-panel__actions a {
    width: 100%;
  }

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