html,
.hosted-tool-page {
  height: 100%;
}

.hosted-tool-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 88% 16%, rgba(77, 225, 255, 0.12) 0%, transparent 38%),
    linear-gradient(180deg, #f4f6fc 0%, #e8eef8 100%);
  color: var(--ink, #0f172a);
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
}

.hosted-tool-chrome {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line, rgba(15, 23, 42, 0.1));
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.hosted-tool-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 13rem;
}

.hosted-tool-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  background: #0b1b3a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hosted-tool-brand strong {
  display: block;
  font-size: 0.88rem;
}

.hosted-tool-brand small,
.hosted-tool-kicker {
  display: block;
  color: var(--muted, #64748b);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hosted-tool-chrome-copy {
  flex: 1;
  min-width: 0;
}

.hosted-tool-chrome-copy h1 {
  margin: 0.1rem 0 0;
  font-family: var(--font-serif, Fraunces, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hosted-tool-chrome-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hosted-tool-privacy {
  color: var(--muted, #64748b);
  font-size: 0.8rem;
  font-weight: 600;
}

.hosted-tool-stage {
  flex: 1;
  position: relative;
  min-height: 0;
}

.hosted-tool-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.hosted-tool-status[data-state="ready"] {
  display: none;
}

.hosted-tool-status-title {
  margin: 0;
  font-family: var(--font-serif, Fraunces, Georgia, serif);
  font-size: 2rem;
}

.hosted-tool-status-copy {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--muted, #64748b);
}

.hosted-tool-progress {
  width: min(24rem, 100%);
  height: 0.45rem;
  margin: 0.4rem auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.hosted-tool-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #4de1ff);
  transition: width 0.2s ease;
}

.hosted-tool-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f3f1eb;
}

.hosted-tool-status[data-state="error"] .hosted-tool-progress,
.hosted-tool-status[data-state="auth"] .hosted-tool-progress {
  display: none;
}

@media (max-width: 800px) {
  .hosted-tool-chrome {
    flex-wrap: wrap;
  }

  .hosted-tool-chrome-copy h1 {
    font-size: 1rem;
  }

  .hosted-tool-brand {
    min-width: 0;
  }
}
