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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e5e5e5;
  color: #222;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #333;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* Subtitle / date */
.subtitle {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* Summary table (primera capa) */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.summary-table th,
.summary-table td {
  border: 1px solid #d1d5db;
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.summary-table th {
  background: #f9fafb;
  font-weight: 600;
  white-space: nowrap;
  width: 35%;
}

/* Regular tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: #f3f4f6;
  font-weight: 600;
}

/* Lists */
ul,
ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

/* Blockquote (medical warning) */
blockquote {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 2rem 0;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}

footer a {
  color: #666;
}

/* Back to top link */
.back-to-top {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* Delete account page */
.card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.card--warning {
  background: #fffbeb;
  border-color: #fbbf24;
}

.card--success {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.card--error {
  background: #fef2f2;
  border-color: #fca5a5;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input[type='email'] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-family: inherit;
}

.form-group input[type='email']:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn--primary {
  background: #2563eb;
  color: #fff;
}

.btn--primary:hover {
  background: #1d4ed8;
}

.btn--danger {
  background: #dc2626;
  color: #fff;
}

.btn--danger:hover {
  background: #b91c1c;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hidden {
  display: none;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

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

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1.25rem 1rem 3rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 0.4rem 0.5rem;
  }
}
