@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --color-background-primary: #0a0e17;
  --color-background-secondary: rgba(255, 255, 255, 0.03);
  --color-background-card: rgba(18, 24, 38, 0.65);
  
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  
  --color-border-secondary: rgba(255, 255, 255, 0.1);
  --color-border-tertiary: rgba(255, 255, 255, 0.06);
  
  --color-background-success: rgba(16, 185, 129, 0.12);
  --color-text-success: #34d399;
  
  --color-background-warning: rgba(245, 158, 11, 0.12);
  --color-text-warning: #fbbf24;
  
  --color-background-info: rgba(59, 130, 246, 0.12);
  --color-text-info: #60a5fa;
  
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-color: #6366f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-background-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--color-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 680px;
  padding: 3rem 1.5rem;
}

/* Header styling */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header-pre {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f8fafc 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

/* Top Metrics Bar */
.top-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 2rem;
}

.metric {
  flex: 1;
  background: var(--color-background-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.metric:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 12px var(--accent-glow);
}

.metric:hover::before {
  opacity: 1;
}

.metric:nth-child(1) .metric-value {
  color: var(--color-text-success);
}

.metric:nth-child(2) .metric-value {
  color: var(--color-text-warning);
}

.metric:nth-child(3) .metric-value {
  color: var(--color-text-info);
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Card Styling */
.card {
  background: var(--color-background-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Section Header & Badges */
.section-header {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.badge-push {
  background: var(--color-background-success);
  color: var(--color-text-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-nice {
  background: var(--color-background-warning);
  color: var(--color-text-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-flex {
  background: var(--color-background-info);
  color: var(--color-text-info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Items List */
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-tertiary);
  gap: 16px;
}

.item:last-child {
  border-bottom: none;
}

.item-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.item-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.item-value {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border-tertiary);
}

/* Legal/Clause Block */
.clause {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--border-radius-md);
  padding: 14px 18px;
  margin-top: 8px;
  line-height: 1.6;
  border-left: 3px solid var(--accent-color);
  font-style: italic;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.clause-tip {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Screen reader helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive design */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1rem;
  }
  
  .header-title {
    font-size: 1.75rem;
  }
  
  .top-bar {
    flex-direction: column;
    gap: 12px;
  }
  
  .metric {
    padding: 12px;
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 0;
  }
  
  .item-value {
    align-self: flex-start;
    }
}

/* Shrek Pop-out Panel */
.shrek-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 23, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.shrek-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.shrek-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.shrek-panel.active {
  right: 0;
}

.shrek-panel-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shrek-panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-success);
  margin: 0;
}

.shrek-panel-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.shrek-panel-close:hover {
  color: var(--color-text-primary);
}

.shrek-panel-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.shrek-intro {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  border-left: 3px solid var(--color-text-success);
  padding-left: 10px;
  font-style: italic;
}

.shrek-section {
  margin-bottom: 1.5rem;
}

.shrek-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.shrek-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shrek-list li {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  padding: 12px;
  margin-bottom: 10px;
  transition: border-color 0.2s, background-color 0.2s;
}

.shrek-list li:hover {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(255, 255, 255, 0.02);
}

.shrek-item-q {
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  font-weight: 500;
  line-height: 1.45;
}

.shrek-item-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--color-border-tertiary);
}

@media (max-width: 480px) {
  .shrek-panel {
    max-width: 100%;
    right: -100%;
  }
}
