/* ── Famileey shared styles ── */

/* ── Global base ── */
body {
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Card links on the home index */
.card-link {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
}
.card-link:hover {
  box-shadow: 0 8px 24px rgba(27, 53, 198, 0.10);
  border-color: #c7d0f8;
}

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1B35C6;
}

/* Prose document layout */
.doc-prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.doc-prose h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
}

.doc-prose .doc-meta {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #f3f4f6;
}

.doc-prose h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-left: 0.875rem;
  border-left: 3px solid #1B35C6;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.doc-prose p,
.doc-prose li {
  font-size: 1rem;
  line-height: 1.9;
  color: #374151;
  letter-spacing: 0.005em;
}

.doc-prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.625rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-prose p {
  margin-bottom: 1rem;
}

.doc-prose a {
  color: #1B35C6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Table of contents */
.toc {
  background: #f0f4ff;
  border: 1px solid #c7d0f8;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1B35C6;
  margin-bottom: 0.75rem;
}
.toc ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toc li {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
}
.toc a {
  color: #1B35C6;
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

/* Delete form card */
.delete-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
  max-width: 480px;
  margin: 0 auto;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: #1B35C6;
  box-shadow: 0 0 0 3px rgba(27,53,198,0.12);
}
.form-input::placeholder { color: #9ca3af; }

textarea.form-input { resize: vertical; min-height: 80px; }

.btn-danger {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-danger:hover  { background: #b91c1c; }
.btn-danger:active { transform: scale(0.99); }
.btn-danger:disabled {
  background: #fca5a5;
  cursor: not-allowed;
}

/* Alert banners */
.alert {
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
  margin-top: 1rem;
}
.alert.show { display: flex; align-items: flex-start; gap: 0.5rem; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Spinner */
.spinner {
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
.btn-danger.loading .spinner { display: inline-block; }
.btn-danger.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive tweaks */
@media (max-width: 640px) {
  .doc-prose h1 { font-size: 1.625rem; }
  .delete-card  { padding: 1.75rem 1.25rem; }
}
