:root {
  --color-primary: #007BFF;
  --color-primary-hover: #0056b3;
  --color-error: #c0392b;
  --color-muted: #888;
  --color-text-secondary: #555;
}

.tool-page {
  font-family: sans-serif;
  margin: 2rem auto;
  padding: 1rem;
  color: #333;
}

.tool-page--narrow {
  max-width: 900px;
}

.tool-page--wide {
  max-width: 1200px;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8e8e8;
}

.tool-header__back {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.tool-header__back:hover {
  color: var(--color-primary-hover);
}

.tool-header__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1.25rem;
  animation: torn-fade-in 0.35s ease;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e9ecef;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: torn-spin 0.75s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-text {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
}

.error-message {
  color: var(--color-error);
  padding: 1.5rem;
  text-align: center;
}

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

@keyframes torn-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
