* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --forest-green: #2d5016;
  --forest-green-light: #3d6b1f;
  --forest-green-dark: #1f3810;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  position: relative;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Blueprint grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle, rgba(45, 80, 22, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 0;
}

/* Layout - Sidebar + Main Content */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: 420px;
  background: #fff;
  border-right: 2px dashed #d0d0d0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 60px 0;
}

/* Hero Section in Sidebar */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 48px;
}

.logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  margin-bottom: 24px;
  color: #1a1a1a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 14px;
  color: #666;
  margin-bottom: 32px;
  font-weight: 400;
  line-height: 1.6;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 12px;
  flex-direction: column;
  align-items: center;
}

.cta-primary,
.cta-secondary {
  padding: 12px 28px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px dashed;
  display: inline-block;
}

.cta-primary {
  background: var(--forest-green);
  color: #fff;
  border-color: var(--forest-green-dark);
}

.cta-primary:hover {
  background: var(--forest-green-dark);
  transform: translateY(-1px);
}

.cta-secondary {
  background: transparent;
  color: var(--forest-green);
  border-color: var(--forest-green);
}

.cta-secondary:hover {
  border-color: var(--forest-green-dark);
  background: rgba(45, 80, 22, 0.05);
}

/* Main Content Area */
.main-content {
  flex: 1;
  background: #fafafa;
  overflow-y: auto;
}

/* Feed Section */
.feed-section {
  padding: 60px 48px;
  max-width: 900px;
}

.annotations-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Annotation Card */
.annotation-card {
  padding: 24px;
  border: 1px dashed #d0d0d0;
  border-radius: 2px;
  background: #fff;
  transition: all 0.2s;
  position: relative;
}

.annotation-card:hover {
  border-color: var(--forest-green);
  box-shadow: 0 2px 8px rgba(45, 80, 22, 0.08);
}

.annotation-quote {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fafafa;
  border-left: 3px solid var(--forest-green);
  font-style: italic;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}

.annotation-body {
  margin-bottom: 16px;
  line-height: 1.6;
  color: #333;
  font-size: 15px;
}

.annotation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed #e0e0e0;
  font-size: 13px;
  color: #666;
}

.annotation-source {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
}

.annotation-source:hover {
  border-bottom-color: #1a1a1a;
}

.annotation-author {
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.annotation-author .author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px dashed #d0d0d0;
}

.annotation-author a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
}

.annotation-author a:hover {
  border-bottom-color: #1a1a1a;
}

.annotation-time {
  color: #999;
}

/* Loading & Empty States */
.loading,
.empty,
.error {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-style: italic;
}

.error {
  color: #d93025;
  font-style: normal;
}

/* Load More */
.load-more {
  text-align: center;
  margin-top: 40px;
}

#load-more-btn {
  background: var(--forest-green);
  color: white;
  border: 1px dashed var(--forest-green-dark);
  padding: 12px 32px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

#load-more-btn:hover {
  background: var(--forest-green-dark);
  transform: translateY(-1px);
}

#load-more-btn:disabled {
  background: #ccc;
  border-color: #aaa;
  cursor: not-allowed;
  transform: none;
}

/* Footer in Sidebar */
.footer {
  padding-top: 40px;
  color: #999;
  font-size: 13px;
  text-align: center;
  margin: 0;
  border-top: 2px dashed #d0d0d0;
}

.mobile-footer {
  display: none;
}

.desktop-footer {
  display: block;
}

.footer-icons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.footer-icons a {
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-icons a img,
.footer-icons a svg {
  width: 32px;
  height: 32px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-icons a:hover img,
.footer-icons a:hover svg {
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 2px dashed #d0d0d0;
  }

  .sidebar-content {
    min-height: auto;
    padding: 40px 0;
  }

  .hero {
    justify-content: flex-start;
    padding: 0 32px;
  }

  .desktop-footer {
    display: none;
  }

  .mobile-footer {
    display: block;
    padding: 40px 32px;
    margin: 0;
    border-top: 2px dashed #d0d0d0;
    background: #fafafa;
  }

  .feed-section {
    padding: 48px 32px;
  }
}

@media (max-width: 640px) {
  .sidebar-content {
    padding: 32px 0;
  }

  .hero {
    padding: 0 24px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .mobile-footer {
    padding: 32px 24px;
    font-size: 12px;
  }

  .feed-section {
    padding: 32px 24px;
  }

  .annotation-card {
    padding: 20px;
  }
}
