/* AI Email Summary Service - Design System */
:root {
  /* Brand: Forest Green */
  --color-brand: #228B22;
  --color-brand-subtle: #E8F5E9;
  
  /* Surfaces - Light Mode (green-tinted neutrals) */
  --color-bg: #F5F9F5;
  --color-surface: #FAFDFA;
  --color-surface-2: #EDF3ED;
  --color-border: #E0E8E0;
  --color-border-strong: #B8C8B8;
  
  /* Text - Light Mode (green-leaning) */
  --color-text: #1A241A;
  --color-text-2: #3D4F3D;
  --color-text-muted: #7A8E7A;
  
  /* Shadows - Light Mode (warm green) */
  --shadow-sm: 0 1px 3px rgba(34, 80, 34, 0.08), 0 0 0 1px rgba(34, 80, 34, 0.04);
  --shadow-md: 0 4px 16px rgba(34, 80, 34, 0.10), 0 1px 4px rgba(34, 80, 34, 0.06);
  --shadow-lg: 0 12px 40px rgba(34, 80, 34, 0.12), 0 2px 8px rgba(34, 80, 34, 0.06);
  
  /* Email highlight */
  --color-email: #228B22;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0F1610;
    --color-surface: #161D16;
    --color-surface-2: #1E2A1E;
    --color-border: #2A3A2A;
    --color-border-strong: #3A4E3A;
    --color-text: #E5EDE5;
    --color-text-2: #8AA88A;
    --color-text-muted: #5A705A;
    --color-email: #4CAF50;
    --shadow-sm: 0 0 0 1px rgba(76, 175, 80, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(76, 175, 80, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(76, 175, 80, 0.08);
  }
}

/* Manual dark theme toggle */
body.dark {
  --color-bg: #0F1610;
  --color-surface: #161D16;
  --color-surface-2: #1E2A1E;
  --color-border: #2A3A2A;
  --color-border-strong: #3A4E3A;
  --color-text: #E5EDE5;
  --color-text-2: #8AA88A;
  --color-text-muted: #5A705A;
  --color-email: #4CAF50;
  --shadow-sm: 0 0 0 1px rgba(76, 175, 80, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(76, 175, 80, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(76, 175, 80, 0.08);
}

/* Base */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 2rem;
}

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
}

/* Typography */
h1 {
  color: var(--color-brand);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

h2 {
  color: var(--color-brand);
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

h3 {
  color: var(--color-text);
  font-size: 1rem;
  margin: 0;
}

p {
  margin: 0 0 1rem 0;
}

/* Links */
a {
  color: var(--color-email);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Email highlight */
.email {
  background: var(--color-email);
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.card-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-text-2);
}

.card-badge {
  display: inline-block;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 1rem;
}

/* Panels (for examples page) */
.panel {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  max-height: 500px;
  overflow-y: auto;
}

.panel-source {
  background: #858a85;
  color: #022202;
}

.panel-summary {
  background: #222523;
  color: #9daa9e;
}

.source-text {
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  color: inherit;
}

.summary-text {
  font-size: 0.85rem;
  margin: 0;
  color: inherit;
  font-weight: 400;
  line-height: 1.8;
  white-space: pre-wrap;
}

.summary-text strong {
  display: block;
  margin-top: 1rem;
  margin-left: 0.5rem;
}

.summary-text strong:first-child {
  margin-top: 0;
}

/* Dark mode overrides for panels */
@media (prefers-color-scheme: dark) {
  .panel-source {
    background: #2a2530;
    color: #d0d0d0;
  }
  .panel-summary {
    background: #1a2a1a;
  }
}

body.dark .panel-source {
  background: #2a2530;
  color: #d0d0d0;
}

body.dark .panel-summary {
  background: #1a2a1a;
}

/* Two column layout */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

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

/* Example blocks */
.example {
  margin-bottom: 3rem;
}

.back-link {
  margin-bottom: 1rem;
}

.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  margin-top: 3rem;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Nav links */
.nav-links {
  margin-bottom: 2rem;
}
