@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Fraunces:opsz,wght@9..144,600&display=swap');

:root {
  color-scheme: light dark;
  --bg: #f7f4ee;
  --bg-accent: #f0e6d5;
  --card: #ffffff;
  --text: #1c1c1a;
  --muted: #5c5a56;
  --border: #e2d9c8;
  --link: #1a4d5c;
  --accent: #d56b2d;
  --interest-marker: var(--link);
  --shadow: 0 18px 40px rgba(28, 28, 26, 0.12);
  --radius: 18px;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, var(--bg-accent), transparent),
    radial-gradient(800px 500px at 110% 10%, #f4efe7, transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

main#feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 16px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feed-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.feed-title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.feed-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.feed-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--link);
  font-weight: 600;
}

.feed-source:focus,
.feed-source:hover {
  color: var(--accent);
}

.feed-date {
  font-size: 0.85rem;
}

.feed-item-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.feed-item-title a {
  text-decoration: none;
  color: inherit;
}

.feed-item-title a:focus,
.feed-item-title a:hover {
  color: var(--accent);
}

.feed-body {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
}

.feed-body-content {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-annotation {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

.interest-marker {
  grid-column: 1;
  grid-row: 1;
  width: 10px;
  border: 1px solid var(--interest-marker);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  align-self: stretch;
  color: var(--interest-marker);
}

.interest-marker__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: currentColor;
  opacity: 0.35;
  transition: height 220ms ease;
}

.interest-marker__value {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: center;
}

.feed-details {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.feed-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--link);
  padding: 10px 0;
  outline: none;
}

.feed-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feed-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.feed-action-link,
.feed-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--link);
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.feed-action-link:hover,
.feed-action-link:focus,
.feed-action-button:hover,
.feed-action-button:focus {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

.feed-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 16px 0;
}

.feed-sentinel {
  height: 1px;
}

@media (min-width: 720px) {
  main#feed {
    padding: 40px 20px 100px;
  }

  .feed-card {
    padding: 24px 24px 28px;
  }

  .feed-title {
    font-size: 2.2rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101112;
    --bg-accent: #1a1d1f;
    --card: #17191b;
    --text: #f2efe8;
    --muted: #b5aea2;
    --border: #2a2e31;
    --link: #89c2d9;
    --accent: #f29f70;
    --shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  }
}
