/* ============================================================
   Ann Arbor Appeals — app-level styles (layered on tokens.css)
   Plain CSS (no build step). Tokens come from tokens.css.
   ============================================================ */

/* Links: default to clean (no underline) for app UI; tokens.css
   underlines links by default which looks noisy in navigation. */
a { text-decoration: none; }

/* Use the brand display font for hero/marketing headlines */
.font-display { font-family: var(--font-display); }

/* Card hover lift per DS animation guidance */
.ds-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.ds-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Primary button press feedback */
.btn-press:active { transform: scale(0.98); }

/* Focus ring in brand color for inputs */
.focus-brand:focus {
  outline: none;
  border-color: var(--color-primary-400);
  box-shadow: 0 0 0 3px oklch(64% 0.205 50 / 0.18);
}

/* Form error list (allauth) */
.errorlist { list-style: none; padding-left: 0; margin: 0.25rem 0 0; }
.errorlist li { font-size: var(--text-sm); color: var(--color-error); }

/* Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; }

/* ── App shell (dashboard sidebar) ───────────────────────── */
.app-nav-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px; margin-bottom: 2px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--color-neutral-400);
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}
.app-nav-link:hover { background: oklch(25% 0.006 60 / 0.5); color: #fff; }
.app-nav-link.is-active {
  background: oklch(64% 0.205 50 / 0.16);
  color: var(--color-primary-400);
  font-weight: 600;
}

/* ── Status badge with dot (per UI kit) ──────────────────── */
.dot-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 9999px;
  font-size: 11px; font-weight: 600;
}
.dot-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}

/* ── Chat bubbles (Alvin preview) ────────────────────────── */
.chat-ai, .chat-user {
  max-width: 85%; padding: 12px 16px; font-size: 13px; line-height: 1.55;
}
.chat-ai {
  background: var(--bg-surface); color: var(--color-neutral-800);
  border: 1px solid var(--border-subtle);
  border-radius: 24px 24px 24px 6px;
  box-shadow: var(--shadow-sm);
}
.chat-user {
  background: var(--color-primary-500); color: #fff;
  border-radius: 24px 24px 6px 24px;
  margin-left: auto;
}

/* ── Entrance animation (staggered fade-up) ──────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fade-up var(--duration-slow, 380ms) var(--ease-out, cubic-bezier(0.16,1,0.3,1)) forwards;
}
.fade-up.d-1 { animation-delay: 80ms; }
.fade-up.d-2 { animation-delay: 160ms; }
.fade-up.d-3 { animation-delay: 240ms; }
.fade-up.d-4 { animation-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; }
}

.chat-ai-highlight {
  background: var(--color-green-100);
  border-color: var(--color-green-300);
}

/* ── Fixes & document typography (2026-06-12 UI review) ──── */

/* Tailwind's core .overline utility (text-decoration: overline) loads after
   tokens.css and was drawing a literal line above every DS eyebrow label. */
.overline { text-decoration-line: none; }

/* Typography for rendered legal documents and appeal letters.
   (The `prose` plugin is not installed; preflight strips heading styles.) */
.legal-body { color: var(--color-neutral-600); font-size: var(--text-sm); line-height: 1.65; }
.legal-body h1, .legal-body h2, .legal-body h3, .legal-body h4 {
  color: var(--color-neutral-900);
  font-weight: var(--weight-bold);
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
}
.legal-body h1:first-child, .legal-body h2:first-child, .legal-body h3:first-child { margin-top: 0; }
.legal-body h1 { font-size: var(--text-xl); }
.legal-body h2 { font-size: var(--text-lg); }
.legal-body h3 { font-size: var(--text-base); }
.legal-body h4 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.legal-body p { margin: 0 0 0.85em; }
.legal-body ul, .legal-body ol { margin: 0 0 0.85em; padding-left: 1.4em; }
.legal-body ul { list-style: disc; }
.legal-body ol { list-style: decimal; }
.legal-body li { margin-bottom: 0.35em; }
.legal-body strong { color: var(--color-neutral-800); }

/* Skip-to-content link (visible only when focused) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-neutral-900); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0;
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
}
.skip-link:focus { left: 0; }
