/* Shared komponenty — button, card, badge, eyebrow, staging banner, header, footer */

/* ===== Staging banner (WIP indicator na vrchu kazde stranky) ===== */
.staging-banner {
  position: sticky;
  top: 0;
  z-index: var(--z-banner);
  background: linear-gradient(90deg, var(--c-staging), #8B5CF6);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-align: center;
}

.staging-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: var(--fw-semibold);
}

.staging-banner a:hover {
  color: #fff;
  opacity: 0.9;
}

/* ===== Header ===== */
.site-header {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-divider);
  padding: var(--s-4) 0;
  position: relative;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-6);
}

.site-logo {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  color: var(--c-brand-navy);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo::after {
  content: " 2027";
  color: var(--c-staging);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0;
  margin-left: var(--s-2);
  vertical-align: middle;
}

.site-nav {
  display: flex;
  gap: var(--s-6);
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--c-text);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  transition: background var(--t-base), color var(--t-base);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--c-bg-subtle);
  color: var(--c-brand-teal-dark);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  text-decoration: none;
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus);
}

.btn-primary {
  background: var(--c-brand-navy);
  color: #fff;
}
.btn-primary:hover {
  background: #000;
  color: #fff;
  box-shadow: var(--sh-md);
}

.btn-accent {
  background: var(--c-brand-yellow);
  color: var(--c-brand-navy);
  box-shadow: 0 4px 0 var(--c-brand-yellow-dark);
}
.btn-accent:hover {
  background: var(--c-brand-yellow);
  color: var(--c-brand-navy);
  box-shadow: 0 6px 0 var(--c-brand-yellow-dark);
  transform: translateY(-2px);
}
.btn-accent:active {
  box-shadow: 0 2px 0 var(--c-brand-yellow-dark);
}

.btn-teal {
  background: var(--c-brand-teal);
  color: #fff;
}
.btn-teal:hover {
  background: var(--c-brand-teal-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
.btn-ghost:hover {
  border-color: var(--c-text);
  background: var(--c-bg-subtle);
  color: var(--c-text);
}

.btn-lg {
  padding: var(--s-4) var(--s-8);
  font-size: var(--fs-md);
}

/* ===== Eyebrow / Badge ===== */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-brand-teal);
  margin-bottom: var(--s-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
}

.badge-kids { background: rgba(253, 207, 0, 0.15); color: #8a6b00; border-color: rgba(253, 207, 0, 0.3); }
.badge-teens { background: rgba(255, 107, 91, 0.12); color: #b83a29; border-color: rgba(255, 107, 91, 0.3); }
.badge-rodice { background: rgba(0, 180, 188, 0.12); color: var(--c-brand-teal-dark); border-color: rgba(0, 180, 188, 0.3); }
.badge-klub { background: rgba(107, 70, 229, 0.12); color: #5433b8; border-color: rgba(107, 70, 229, 0.3); }
.badge-soon { background: rgba(245, 158, 11, 0.12); color: #92570a; border-color: rgba(245, 158, 11, 0.3); }

/* ===== Cards ===== */
.card {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.card-clickable {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: var(--c-border-strong);
  color: inherit;
}

.card-kids { border-top: 4px solid var(--c-pillar-kids); }
.card-teens { border-top: 4px solid var(--c-pillar-teens); }
.card-rodice { border-top: 4px solid var(--c-pillar-rodice); }
.card-klub { border-top: 4px solid var(--c-pillar-klub); }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--s-4);
}

.card-icon-kids { background: rgba(253, 207, 0, 0.15); }
.card-icon-teens { background: rgba(255, 107, 91, 0.12); }
.card-icon-rodice { background: rgba(0, 180, 188, 0.12); }
.card-icon-klub { background: rgba(107, 70, 229, 0.12); }

.card-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--s-3);
}

.card-body {
  color: var(--c-text-muted);
  margin-bottom: var(--s-5);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: var(--fw-semibold);
  color: var(--c-brand-teal-dark);
  font-size: var(--fs-sm);
}

/* ===== Hero ===== */
.hero {
  padding: var(--s-16) 0 var(--s-20);
  background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-subtle) 100%);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width-narrow);
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  background: rgba(107, 70, 229, 0.1);
  color: #5433b8;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--s-6);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-black);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: var(--s-6);
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--c-brand-yellow) 0%, #ff9500 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: var(--fs-md);
  color: var(--c-text-muted);
  max-width: 580px;
  margin: 0 auto var(--s-8);
  line-height: var(--lh-relaxed);
}

.hero-cta {
  display: flex;
  gap: var(--s-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Email capture form ===== */
.email-capture {
  display: flex;
  gap: var(--s-3);
  background: var(--c-bg);
  padding: var(--s-2);
  border: 2px solid var(--c-border);
  border-radius: var(--r-full);
  max-width: 480px;
  margin: 0 auto;
  transition: border-color var(--t-base);
}

.email-capture:focus-within {
  border-color: var(--c-brand-teal);
  box-shadow: var(--sh-focus);
}

.email-capture input[type="email"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-base);
  font-family: inherit;
  color: var(--c-text);
  outline: none;
}

.email-capture .btn {
  padding: var(--s-3) var(--s-6);
  font-size: var(--fs-sm);
}

.form-msg {
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
  text-align: center;
  min-height: 1.2em;
}
.form-msg.ok { color: var(--c-success); }
.form-msg.err { color: var(--c-danger); }

/* ===== Footer ===== */
.site-footer {
  background: var(--c-brand-navy);
  color: #b7bcc9;
  padding: var(--s-16) 0 var(--s-8);
  margin-top: var(--s-24);
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-size: var(--fs-sm);
}
.site-footer a:hover {
  color: var(--c-brand-yellow);
}

.footer-grid {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 2fr repeat(3, 1fr);
  margin-bottom: var(--s-10);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  color: #fff;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--s-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  gap: var(--s-4);
  flex-wrap: wrap;
}

/* ===== WIP / Coming soon placeholder block ===== */
.wip-block {
  padding: var(--s-12);
  border: 2px dashed var(--c-border-strong);
  border-radius: var(--r-lg);
  text-align: center;
  background: var(--c-bg-subtle);
  color: var(--c-text-muted);
}

.wip-block h3 {
  color: var(--c-text);
  margin-bottom: var(--s-3);
}

/* ===== Pillar hero (for hub pages) ===== */
.pillar-hero {
  padding: var(--s-20) 0 var(--s-16);
  text-align: center;
}

.pillar-hero-kids { background: linear-gradient(180deg, rgba(253, 207, 0, 0.12), transparent); }
.pillar-hero-teens { background: linear-gradient(180deg, rgba(255, 107, 91, 0.1), transparent); }
.pillar-hero-rodice { background: linear-gradient(180deg, rgba(0, 180, 188, 0.1), transparent); }
.pillar-hero-klub { background: linear-gradient(180deg, rgba(107, 70, 229, 0.1), transparent); }
.pillar-hero-obsah { background: linear-gradient(180deg, rgba(107, 70, 229, 0.08), transparent); }

/* ===== Pricing tier card ===== */
.tier {
  background: #fff;
  border: 2px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.tier:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.tier-featured {
  border-color: var(--c-brand-teal);
  position: relative;
}

.tier-featured::before {
  content: "Nejoblíbenější";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-brand-teal);
  color: #fff;
  padding: var(--s-1) var(--s-4);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tier-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--c-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.tier-price {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  letter-spacing: -0.03em;
  margin-bottom: var(--s-1);
  color: var(--c-brand-navy);
}

.tier-price small {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--c-text-muted);
}

.tier-desc {
  color: var(--c-text-muted);
  margin-bottom: var(--s-5);
  font-size: var(--fs-sm);
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-6);
  flex: 1;
}

.tier-features li {
  padding: var(--s-2) 0;
  padding-left: var(--s-6);
  position: relative;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.tier-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-brand-teal);
  font-weight: var(--fw-bold);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .site-cta { display: none !important; }
}

@media (max-width: 640px) {
  .site-nav { gap: var(--s-2); }
  .site-nav a { padding: var(--s-1) var(--s-2); font-size: var(--fs-xs); }
  .hero { padding: var(--s-10) 0 var(--s-16); }
  .card { padding: var(--s-6); }
  .email-capture { flex-direction: column; border-radius: var(--r-lg); padding: var(--s-3); }
  .email-capture .btn { width: 100%; }
}

/* ========================================================================
 * UX Sprint UX-1 (2026-05-01) — Phase 1+3+4 enhancements
 * - Accessibility: focus-visible rings, sr-only, skip-link
 * - Skeleton loaders (perceived speed +40%)
 * - Trust badges (social proof component library)
 * - Breadcrumbs
 * - Microinteractions (hover, button micro-bounces)
 * - Form validation states (aria-invalid styling)
 * - Empty state illustration container
 * - Dark-mode aware toast/banner
 * ====================================================================== */

/* Accessibility: skip link pre keyboard users (jump to main content) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-overlay);
  padding: var(--s-3) var(--s-4);
  background: var(--c-brand-navy);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: var(--fw-semibold);
}

.skip-link:focus {
  left: 0;
  outline: 3px solid var(--c-brand-yellow);
  outline-offset: 2px;
}

/* sr-only — screen reader text only (visually hidden) */
.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;
}

/* Focus-visible rings — Apple HIG / Stripe pattern.
 * Defaults browser focus is hideous; explicit ring on keyboard-only focus. */
:focus-visible {
  outline: 3px solid var(--c-brand-teal);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Buttons / interactive elements get bigger tap targets na mobile */
button, a, input[type="submit"], input[type="button"] {
  min-height: 44px; /* WCAG 2.1 AAA target size */
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--c-brand-teal);
  outline-offset: 3px;
}

/* Microinteractions: button hover micro-bounce + shadow lift */
.btn,
button.btn-primary,
button.btn-secondary {
  transition: transform var(--t-fast), box-shadow var(--t-base), background-color var(--t-base);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--sh-sm);
}

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

/* ========================================================================
 * Skeleton loaders — perceived speed boost during async fetch
 * Usage: <div class="skeleton" style="width:80%;height:1.2em;"></div>
 * ====================================================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--c-skeleton) 0%,
    var(--c-skeleton-shimmer) 50%,
    var(--c-skeleton) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
  display: block;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.skeleton-line {
  height: 1em;
  background: var(--c-skeleton);
  border-radius: var(--r-sm);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(90deg, var(--c-skeleton) 0%, var(--c-skeleton-shimmer) 50%, var(--c-skeleton) 100%);
  background-size: 200% 100%;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 95%; }
.skeleton-line.title { height: 1.4em; }

/* ========================================================================
 * Trust signals: badges, social proof, GDPR, secure payment
 * ====================================================================== */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  justify-content: center;
  padding: var(--s-4) var(--s-3);
  margin: var(--s-6) 0;
  background: var(--c-bg-subtle);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-divider);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
}

.trust-badge .icon {
  font-size: var(--fs-md);
  color: var(--c-brand-teal);
}

.trust-badge.gdpr .icon { color: var(--c-success); }
.trust-badge.secure .icon { color: var(--c-brand-navy); }
.trust-badge.stripe .icon { color: #635bff; }

/* Star rating display (Sprint AA Reviews surface) */
.rating-display {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-text);
}

.rating-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--c-brand-yellow);
  font-size: var(--fs-md);
}

.rating-stars .star { display: inline-block; }
.rating-stars .star.empty { color: var(--c-border-strong); }

.rating-count {
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
}

/* Social proof banner ("23 rodin se přihlásilo tento týden") */
.social-proof {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: rgba(253, 207, 0, 0.12);
  color: var(--c-brand-navy);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.social-proof .pulse {
  width: 8px;
  height: 8px;
  background: var(--c-success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ========================================================================
 * Breadcrumbs (UX U16) + structured data via JSON-LD inline
 * ====================================================================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  padding: var(--s-3) 0;
}

.breadcrumb a {
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.breadcrumb a:hover {
  color: var(--c-brand-teal);
  text-decoration: underline;
}

.breadcrumb .separator {
  color: var(--c-border-strong);
  user-select: none;
}

.breadcrumb [aria-current="page"] {
  color: var(--c-text);
  font-weight: var(--fw-medium);
}

/* ========================================================================
 * Form validation states (UX U4) — inline error messages
 * Usage: <input aria-invalid="true" aria-describedby="email-error">
 *        <span class="field-error" id="email-error">Zadej email</span>
 * ====================================================================== */
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--c-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

input[aria-invalid="false"][data-validated="true"],
textarea[aria-invalid="false"][data-validated="true"] {
  border-color: var(--c-success) !important;
}

.field-error {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-danger);
  line-height: var(--lh-snug);
}

.field-error::before {
  content: "⚠ ";
  font-weight: var(--fw-bold);
}

.field-success {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-success);
}

.field-help {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-text-faded);
  line-height: var(--lh-snug);
}

/* Form fields baseline */
.field-group {
  margin-bottom: var(--s-4);
}

.field-group label {
  display: block;
  margin-bottom: var(--s-2);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  font-size: var(--fs-sm);
}

.field-group label .required {
  color: var(--c-danger);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--c-bg);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--c-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  min-height: 44px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--c-brand-teal);
  box-shadow: var(--sh-focus);
}

/* ========================================================================
 * Empty state — generic placeholder s recovery action
 * Usage: <div class="empty-state-pretty"> <div class="emoji">📚</div> <h3>...</h3> <p>...</p> <button>...</button> </div>
 * ====================================================================== */
.empty-state-pretty {
  text-align: center;
  padding: var(--s-12) var(--s-6);
  background: var(--c-bg-subtle);
  border-radius: var(--r-lg);
  border: 1px dashed var(--c-border-strong);
  color: var(--c-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.empty-state-pretty .emoji {
  font-size: 3rem;
  line-height: 1;
  opacity: 0.7;
  margin-bottom: var(--s-2);
}

.empty-state-pretty h3 {
  font-size: var(--fs-lg);
  color: var(--c-text);
  margin: 0;
}

.empty-state-pretty p {
  margin: 0;
  max-width: 32em;
  line-height: var(--lh-relaxed);
}

.empty-state-pretty .btn {
  margin-top: var(--s-3);
}

/* ========================================================================
 * Loading spinner (alternative to skeleton for inline use)
 * ====================================================================== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.spinner.lg { width: 32px; height: 32px; border-width: 3px; }

/* ========================================================================
 * Toast notifications (better than alert())
 * ====================================================================== */
.toast {
  position: fixed;
  bottom: var(--s-6);
  right: var(--s-6);
  z-index: var(--z-overlay);
  padding: var(--s-3) var(--s-5);
  background: var(--c-brand-navy);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  max-width: 32em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.success { background: var(--c-success); }
.toast.error { background: var(--c-danger); }
.toast.warning { background: var(--c-warning); color: #1a1a1a; }

@media (max-width: 640px) {
  .toast {
    left: var(--s-3);
    right: var(--s-3);
    bottom: var(--s-3);
    max-width: none;
  }
}

/* ========================================================================
 * Sprint UX-2 components (2026-05-01)
 * - Filter pills (N9)
 * - Cmd+K palette (N12)
 * - Help kbd modal
 * - Error state styling
 * - Favorite star button
 * ====================================================================== */

/* Filter pills */
.filter-pills {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin: var(--s-4) 0;
}

.filter-pill {
  padding: var(--s-2) var(--s-4);
  background: var(--c-bg-elev);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-full);
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--t-base);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 36px;
}

.filter-pill:hover {
  border-color: var(--c-brand-teal);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--c-brand-teal);
  border-color: var(--c-brand-teal);
  color: #fff;
}

.filter-pill.active:hover {
  background: var(--c-brand-teal-dark);
  border-color: var(--c-brand-teal-dark);
}

.filter-count {
  background: rgba(0, 0, 0, 0.15);
  padding: 0 6px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  margin-left: 4px;
}

.filter-pill.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Cmd+K palette */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 41, 54, 0.55);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: fadeIn 120ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cmd-box {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  width: min(560px, 92vw);
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideDown 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.cmd-input {
  border: none;
  border-bottom: 1px solid var(--c-divider);
  border-radius: 0;
  padding: var(--s-4) var(--s-5);
  font-size: var(--fs-md);
  background: transparent;
  color: var(--c-text);
  outline: none;
  width: 100%;
  min-height: 56px;
}

.cmd-list {
  list-style: none;
  margin: 0;
  padding: var(--s-2);
  overflow-y: auto;
  flex: 1;
}

.cmd-item {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--c-text);
  transition: background var(--t-fast);
}

.cmd-item:hover,
.cmd-item.active {
  background: var(--c-bg-subtle);
}

.cmd-item.active {
  background: var(--c-brand-teal);
  color: #fff;
}

.cmd-empty {
  padding: var(--s-6);
  text-align: center;
  color: var(--c-text-faded);
  font-size: var(--fs-sm);
}

/* Kbd help modal */
.kbd-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3) var(--s-4);
  margin: 0 0 var(--s-5);
}

.kbd-list dt {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kbd-list dd {
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  align-self: center;
}

kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
  box-shadow: 0 1px 0 var(--c-border-strong);
}

/* Error state empty pretty variant */
.empty-state-pretty.error-state {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.3);
}

.empty-state-pretty.error-state h3 {
  color: var(--c-danger);
}

/* Favorite button */
.fav-btn {
  background: transparent;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-full);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  color: var(--c-text-muted);
  transition: all var(--t-base);
  min-height: 40px;
}

.fav-btn:hover {
  border-color: var(--c-brand-yellow);
  color: var(--c-brand-yellow);
  transform: scale(1.06);
}

.fav-btn.active {
  background: rgba(253, 207, 0, 0.15);
  border-color: var(--c-brand-yellow);
  color: var(--c-brand-yellow);
}

.fav-btn.active::before { content: "★"; }
.fav-btn:not(.active)::before { content: "☆"; }
