:root {
  --color-primary-dark: #059669;
  --color-primary: #10B981;
  --color-primary-light: #34D399;
  --color-secondary-dark: #DC2626;
  --color-secondary: #EF4444;
  --color-accent-dark: #F97316;
  --color-accent: #FB923C;
  --color-bg-warm: #FFF7ED;
  --color-bg-neutral: #F9FAFB;
  --color-text-dark: #1F2937;
  --color-text-medium: #4B5563;
  --color-text-light: #9CA3AF;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--color-bg-warm) 0%, var(--color-bg-neutral) 100%);
  color: var(--color-text-dark);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.page-content {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash-message {
  animation: slideInDown 0.3s ease-out, fadeOut 0.3s ease-in 4.7s forwards;
}

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

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  color: var(--color-text-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 2px solid #E5E7EB;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #F0FDF4;
}

.btn-primary-sm {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.btn-secondary-sm {
  background: white;
  color: var(--color-text-dark);
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-sm:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #F0FDF4;
}

.btn-danger {
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger-sm {
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-danger-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger-sm:active {
  transform: translateY(0);
}

.card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 24px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 20px 40px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.progress-track {
  width: 100%;
  height: 0.6rem;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  transition: width 0.4s ease;
  width: 0;
}

.progress-fill[data-tone="amber"] {
  background: linear-gradient(135deg, #F59E0B, #F97316);
}

.progress-fill[data-tone="red"] {
  background: linear-gradient(135deg, #DC2626, #F97316);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-header {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text-dark);
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 500;
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
  border-left: 4px solid var(--color-primary);
}

.alert-error {
  background: #FEF2F2;
  color: #991B1B;
  border-left: 4px solid var(--color-secondary);
}

.alert-info {
  background: #EFF6FF;
  color: #1E40AF;
  border-left: 4px solid #3B82F6;
}

.alert-warning {
  background: #FFF7ED;
  color: #9A3412;
  border-left: 4px solid var(--color-accent);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s ease;
  background: white;
}

.form-input-sm {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s ease;
  background: white;
}

.form-input-sm:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
  font-size: 0.9rem;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.spinner {
  border: 3px solid #E5E7EB;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

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

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 3s ease-in-out infinite;
}

.font-outfit {
  font-family: 'Outfit', sans-serif;
}

.stream-pill,
.stream-dot {
  background-color: #CBD5E1;
}

.stream-pill--climate,
.stream-dot--climate {
  background-color: #2563EB;
}

.stream-pill--circular,
.stream-dot--circular {
  background-color: #06B6D4;
}

.stream-pill--fair-work,
.stream-dot--fair-work {
  background-color: #A855F7;
}

.stream-pill--inclusive,
.stream-dot--inclusive {
  background-color: #EC4899;
}

.stream-pill--financial,
.stream-dot--financial {
  background-color: #F97316;
}

.stream-pill--governance,
.stream-dot--governance {
  background-color: #EF4444;
}

.stream-pill--learning,
.stream-dot--learning {
  background-color: #22C55E;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Masonry Card Layout Styles */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

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

.masonry-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.masonry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.masonry-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.masonry-card:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.masonry-card.selected {
  box-shadow: 0 0 0 3px var(--color-primary-light);
  background: linear-gradient(135deg, #ECFDF5 0%, white 100%);
}

.masonry-card__content {
  color: var(--color-text-dark);
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 400;
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.masonry-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #F3F4F6;
}

.masonry-card__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-medium);
}

.masonry-card__time {
  font-size: 0.6875rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.masonry-card__attribution {
  font-size: 0.75rem;
  color: var(--color-text-medium);
  padding-top: 0.5rem;
  border-top: 1px solid #F3F4F6;
  font-weight: 500;
}

.masonry-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

.masonry-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .masonry-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
  }
}
