.reprompt-page {
  background:
    radial-gradient(circle at top right, rgba(58, 180, 242, 0.08), transparent 24%),
    linear-gradient(180deg, #edf3f9 0%, #f7f9fc 24%, #eef4fa 100%);
}

.reprompt-main {
  padding: 104px 16px 40px;
}

.reprompt-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px;
  opacity: 1;
  transform: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 253, 0.98));
  border: 1px solid rgba(13, 27, 42, 0.06);
  border-radius: 22px;
  box-shadow: 0 24px 56px rgba(13, 27, 42, 0.1);
}

.reprompt-header {
  max-width: 820px;
  margin-bottom: 22px;
}

.reprompt-back-row {
  margin: 0 0 0.85rem;
}

.reprompt-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #25577f;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
}

.reprompt-back-link::before {
  content: "\2039";
  font-size: 1.1rem;
  line-height: 1;
}

.reprompt-back-link:hover {
  color: #0a66c2;
}

.reprompt-eyebrow,
.reprompt-output-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2f98ce;
}

.reprompt-header h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(2.2rem, 3.2vw, 3.2rem);
}

.reprompt-tagline {
  margin: 0 0 0.55rem;
  max-width: 100%;
  font-size: 1.15rem;
  font-weight: 600;
  color: #173553;
}

.reprompt-description {
  margin: 0;
  max-width: 720px;
  color: #465b72;
}

.reprompt-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 20px;
  align-items: stretch;
}

.reprompt-panel {
  border-radius: 18px;
  padding: 22px;
  min-height: 0;
}

.reprompt-input-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafd 100%);
  border: 1px solid rgba(13, 27, 42, 0.08);
  box-shadow: 0 14px 30px rgba(13, 27, 42, 0.05);
}

.reprompt-output-panel {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(10, 23, 38, 0.985), rgba(13, 27, 42, 0.97));
  border: 1px solid rgba(120, 209, 255, 0.12);
  color: #eff6ff;
  box-shadow: 0 18px 40px rgba(9, 18, 32, 0.22);
}

.reprompt-panel-head h2,
.reprompt-output-panel h2,
.reprompt-output-panel h3 {
  margin-bottom: 0.55rem;
  text-align: left;
}

.reprompt-helper {
  margin: 0;
  max-width: 100%;
  color: #4b5f75;
  font-size: 0.98rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reprompt-form {
  margin-top: 1rem;
}

.reprompt-form .form-group {
  margin-bottom: 0;
}

.reprompt-form textarea {
  width: 100%;
  min-height: min(58vh, 520px);
  border: 1px solid rgba(13, 27, 42, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: #0d1b2a;
  padding: 18px;
  line-height: 1.65;
  resize: vertical;
  box-shadow: inset 0 1px 2px rgba(13, 27, 42, 0.03);
}

.reprompt-input-footer {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.reprompt-input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.reprompt-input-actions {
  display: grid;
  gap: 8px;
}

.reprompt-input-hint,
.reprompt-submit-note,
.reprompt-capacity-note,
.reprompt-privacy-note,
.reprompt-char-count {
  margin: 0;
  max-width: 100%;
  font-size: 0.92rem;
}

.reprompt-input-hint {
  color: #4d6278;
}

.reprompt-char-count {
  flex-shrink: 0;
  color: #2c587e;
  font-variant-numeric: tabular-nums;
}

.reprompt-generate-button {
  justify-self: start;
}

.reprompt-submit-note {
  color: #45627f;
}

.reprompt-capacity-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(58, 180, 242, 0.08);
  border: 1px solid rgba(58, 180, 242, 0.14);
  color: #35536f;
}

.reprompt-privacy-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(13, 27, 42, 0.04);
  border: 1px solid rgba(13, 27, 42, 0.08);
  color: #455a71;
}

.reprompt-output-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.reprompt-copy-button {
  min-width: 92px;
  border: 1px solid rgba(120, 209, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #eff6ff;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

.reprompt-copy-button:hover:not([disabled]) {
  background: rgba(120, 209, 255, 0.18);
  transform: translateY(-1px);
}

.reprompt-copy-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.reprompt-status,
.reprompt-error {
  margin: 0.9rem 0 0;
  max-width: 100%;
  font-size: 0.97rem;
}

.reprompt-status {
  color: rgba(239, 246, 255, 0.78);
}

.reprompt-error {
  color: #ffd8d3;
}

.reprompt-loading {
  margin-top: 1rem;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(120, 209, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.reprompt-loading-graphic {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reprompt-loading-ring {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(159, 219, 255, 0.22);
  border-top-color: #9fdbff;
  animation: reprompt-spin 0.95s linear infinite;
}

.reprompt-loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #9fdbff;
  opacity: 0.35;
  animation: reprompt-pulse 1.2s ease-in-out infinite;
}

.reprompt-loading-dot:nth-of-type(2) {
  animation-delay: 0.15s;
}

.reprompt-loading-dot:nth-of-type(3) {
  animation-delay: 0.3s;
}

.reprompt-loading-dot:nth-of-type(4) {
  animation-delay: 0.45s;
}

.reprompt-loading-message,
.reprompt-loading-note {
  margin: 0;
  max-width: 100%;
}

.reprompt-loading-message {
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #f5f9ff;
}

.reprompt-loading-note {
  margin-top: 0.35rem;
  font-size: 0.93rem;
  color: rgba(239, 246, 255, 0.72);
}

.reprompt-loading-shimmer {
  margin-top: 14px;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.reprompt-loading-shimmer::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -36%;
  width: 36%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(159, 219, 255, 0), rgba(159, 219, 255, 0.9), rgba(159, 219, 255, 0));
  animation: reprompt-shimmer 1.6s ease-in-out infinite;
}

.reprompt-output-surface {
  margin-top: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(120, 209, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.reprompt-output-surface.is-loading {
  opacity: 0.55;
}

.reprompt-output {
  width: 100%;
  min-height: min(56vh, 500px);
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #f5f9ff;
  padding: 18px;
  line-height: 1.65;
  resize: vertical;
}

.reprompt-output::placeholder {
  color: rgba(239, 246, 255, 0.48);
}

.reprompt-sections-wrap {
  margin-top: 1rem;
}

.reprompt-sections-wrap h3 {
  margin-bottom: 0.75rem;
  font-size: 1.02rem;
  color: #f5f9ff;
}

.reprompt-sections {
  display: grid;
  gap: 10px;
}

.reprompt-section-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 209, 255, 0.1);
}

.reprompt-section-item strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #9fdbff;
}

.reprompt-section-item p {
  margin: 0;
  max-width: 100%;
  font-size: 0.93rem;
  color: rgba(239, 246, 255, 0.8);
}

@keyframes reprompt-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes reprompt-pulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.28;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes reprompt-shimmer {
  to {
    transform: translateX(380%);
  }
}

@media (max-width: 1120px) {
  .reprompt-shell-grid {
    grid-template-columns: 1fr;
  }

  .reprompt-form textarea,
  .reprompt-output {
    min-height: 320px;
  }
}

@media (max-width: 768px) {
  .reprompt-main {
    padding-top: 92px;
  }

  .reprompt-shell {
    padding: 18px;
    border-radius: 18px;
  }

  .reprompt-panel {
    padding: 18px;
  }

  .reprompt-output-head {
    flex-direction: column;
    align-items: stretch;
  }

  .reprompt-input-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .reprompt-copy-button {
    width: 100%;
  }

  .reprompt-generate-button {
    width: 100%;
    justify-self: stretch;
  }
}
