/* ========================================
   THIS WAS NEWS — Main Stylesheet
   ======================================== */

/* --- Self-hosted Fonts --- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/playfair-display-600.woff2') format('woff2'),
       url('/fonts/playfair-display-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/playfair-display-700.woff2') format('woff2'),
       url('/fonts/playfair-display-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-sans-3-400.woff2') format('woff2'),
       url('/fonts/source-sans-3-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-sans-3-600.woff2') format('woff2'),
       url('/fonts/source-sans-3-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-700.woff2') format('woff2'),
       url('/fonts/source-sans-3-700.ttf') format('truetype');
}

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-parchment: #FAF8F5;
  --color-white: #FFFFFF;
  --color-ink: #2C2C2C;
  --color-faded-ink: #5A5A5A;
  --color-dusty-blue: #4A6B8A;
  --color-dusty-blue-hover: #3A5570;
  --color-terracotta: #C17C60;
  --color-soft-rule: #E5E0D8;
  --color-muted-sage: #8B9A7D;
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Layout */
  --max-width-content: 42rem;
  --max-width-page: 68rem;
  --sidebar-width: 18rem;
  --border-radius: 8px;
  --border-radius-sm: 4px;
  
  /* Shadows */
  --shadow-card: 0 2px 8px rgba(44, 44, 44, 0.08);
  --shadow-card-hover: 0 4px 16px rgba(44, 44, 44, 0.12);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
  background-color: var(--color-parchment);
  min-height: 100vh;
}

/* Prevent CSS display overrides from defeating the hidden attribute */
[hidden] {
  display: none !important;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--space-md) 0;
  color: var(--color-ink);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p {
  margin: 0 0 var(--space-md) 0;
}

a {
  color: var(--color-dusty-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--color-dusty-blue-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-dusty-blue);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

ul, ol {
  margin: 0 0 var(--space-md) 0;
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-sm);
}

strong {
  font-weight: 600;
}

/* --- Layout Shell --- */
.page-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "header"
    "nav"
    "main"
    "sidebar"
    "footer";
  min-height: 100vh;
  max-width: var(--max-width-page);
  margin: 0 auto;
  padding: var(--space-md);
  gap: var(--space-lg);
}

@media (min-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr var(--sidebar-width);
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header header"
      "nav nav"
      "main sidebar"
      "footer footer";
    padding: var(--space-xl);
    gap: var(--space-xl);
  }
}

/* --- Header --- */
.site-header {
  grid-area: header;
  text-align: center;
  padding: var(--space-lg) 0;
  border-bottom: 2px dashed var(--color-soft-rule);
}

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
  height: 110px;
  width: auto;
}

.site-logo:hover,
.site-logo:focus {
  color: inherit;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.site-title .accent {
  color: var(--color-terracotta);
}

.site-tagline {
  font-size: 0.875rem;
  color: var(--color-faded-ink);
  font-style: italic;
  margin: 0;
}

/* --- Navigation --- */
.site-nav {
  grid-area: nav;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-faded-ink);
  border-radius: var(--border-radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-dusty-blue);
  background-color: var(--color-white);
}

.site-nav a[aria-current="page"] {
  color: var(--color-dusty-blue);
  background-color: var(--color-white);
}

/* --- Main Content Area --- */
.site-main {
  grid-area: main;
  max-width: var(--max-width-content);
}

/* --- Card Component --- */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.card--lead {
  border-left: 4px solid var(--color-terracotta);
}

/* --- Lead Hero (calendar + article card wrapper) --- */
/* flow-root creates a block formatting context, containing the floated
   calendar SVG so it doesn't escape into subsequent sections.             */
.lead-hero {
  display: flow-root;
  margin-bottom: var(--space-xl);
}

/* --- Date navigation group --- */
.date-nav-group {
  float: left;
  width: 150px;
  margin-right: var(--space-lg);
  margin-bottom: var(--space-md);
}

.date-nav__ago {
  font-size: 0.85rem;
  color: var(--color-faded-ink);
  text-align: center;
  margin: 0.25rem 0 0.5rem;
  padding-bottom: 1rem;
  font-style: italic;
}

/* On portrait widths: drop the float, go two-column internally.
   __left holds the calendar SVG + ago text (110px);
   __right holds the nav buttons (remaining space).               */
@media (max-width: 1023px) {
  .date-nav-group {
    float: none;
    width: 100%;
    display: grid;
    grid-template-columns: 110px 1fr;
    column-gap: var(--space-md);
    align-items: center;
    margin-right: 0;
  }

  .date-nav-group__right {
    display: flex;
    justify-content: flex-end;  /* push nav to the right edge */
  }

  .date-nav-group__right .date-nav {
    width: fit-content;         /* shrink to button content, not full column */
  }

  .date-nav__btn {
    font-size: 0.6rem;
    padding: 2px 3px;
  }

  .date-nav__ago {
    padding-bottom: 0;
    margin-bottom: 0;
  }
}

.date-nav-group .date-card-calendar {
  float: none;
  width: 100%;
  margin: 0;
  display: block;
  height: auto;
}

.date-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.date-nav__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.date-nav__btn {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-dusty-blue);
  text-decoration: none;
  padding: 3px var(--space-xs);
  border: 1px solid var(--color-soft-rule);
  border-radius: var(--border-radius-sm);
  background: var(--color-white);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1.4;
  white-space: nowrap;
}

.date-nav__btn:hover,
.date-nav__btn:focus-visible {
  background: var(--color-dusty-blue);
  border-color: var(--color-dusty-blue);
  color: var(--color-white);
  text-decoration: none;
}

.date-nav__btn--disabled {
  color: var(--color-soft-rule);
  border-color: var(--color-soft-rule);
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* --- Date Badge --- */
.date-badge {
  display: inline-block;
  background: var(--color-terracotta);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  transform: rotate(-1deg);
  margin-bottom: var(--space-md);
}



/* --- Lead Article --- */
.lead-article {
  overflow: hidden; /* BFC so card background clears the floated calendar */
}

.lead-article__headline {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.lead-article__summary {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

.lead-article__meta {
  font-size: 0.875rem;
  color: var(--color-faded-ink);
}

.lead-article__meta a {
  color: var(--color-dusty-blue);
}

/* --- Article List --- */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list__item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-soft-rule);
  margin: 0;
}

.article-list__item:last-child {
  border-bottom: none;
}

.article-list__link {
  font-weight: 600;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease;
}

.article-list__link:hover {
  text-decoration-color: currentColor;
}

.article-list__source {
  font-size: 0.875rem;
  color: var(--color-faded-ink);
}

/* --- Home Page Hero --- */
.home-hero {
  margin-bottom: var(--space-xl);
}

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

.home-hero__item {
  margin: 0;
}

.home-hero__item + .home-hero__item {
  margin-top: var(--space-md);
}

.home-hero__card {
  display: block;
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-hero__card:hover,
.home-hero__card:focus {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.home-hero__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-terracotta);
  margin-bottom: var(--space-xs);
}

.home-hero__headline {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.35;
}

/* --- How It Works / Info Sections --- */
.info-section {
  margin-bottom: var(--space-xl);
}

.info-section__title {
  position: relative;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
}

.info-section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--color-terracotta);
}

.info-section ol {
  padding-left: var(--space-lg);
}

.info-section ol li {
  padding-left: var(--space-sm);
}

/* --- Sidebar --- */
.site-sidebar {
  grid-area: sidebar;
}

.sidebar-box {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
}

.sidebar-box + .sidebar-box {
  margin-top: var(--space-lg);
}

.sidebar-box__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px dashed var(--color-soft-rule);
}

/* Icon + label row for headings that include an SVG (e.g. calendar).
   Peers with sidebar-box__title — same size, same dashed underline. */
.sidebar-box__title--icon {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-box__title--icon svg {
  color: var(--color-terracotta);
  flex-shrink: 0;
}

.sidebar-item h3 {
  margin-bottom: 0;
}

.sidebar-item {
  margin-bottom: 1rem;
  a { 
    display: inline-block;
    line-height: 1.3;
    text-decoration: none;
  }
}

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

.sidebar-links__item {
  margin: 0;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-soft-rule);
}

.sidebar-links__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-links__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-terracotta);
  margin-bottom: var(--space-xs);
}

.sidebar-links__link {
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Sidebar fallback for no-JS */
.sidebar-fallback {
  font-size: 0.875rem;
  color: var(--color-faded-ink);
  font-style: italic;
}

/* Calendar widget placeholder */
.calendar-widget {
  font-family: var(--font-body);
}

.calendar-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xs) 0 var(--space-sm);
  border-bottom: 1px solid var(--color-soft-rule);
  margin-bottom: var(--space-sm);
}

.calendar-widget__month {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.calendar-widget__btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-parchment);
  border: 1px solid var(--color-soft-rule);
  border-radius: var(--border-radius-sm);
  color: var(--color-faded-ink);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  padding: 0;
  line-height: 1;
}

.calendar-widget__btn:hover,
.calendar-widget__btn:focus-visible {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: var(--color-white);
  outline: none;
}

.calendar-widget__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.calendar-widget__day-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-terracotta);
  padding: var(--space-xs) 0;
}

.calendar-widget__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  color: var(--color-ink);
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.calendar-widget__day:hover {
  background: var(--color-parchment);
  border-color: var(--color-soft-rule);
  color: var(--color-dusty-blue);
  text-decoration: none;
}

/* Today: outlined in terracotta */
.calendar-widget__day--today {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
  font-weight: 700;
}

.calendar-widget__day--today:hover {
  background: var(--color-terracotta);
  color: var(--color-white);
}

/* Selected / active date: filled terracotta */
.calendar-widget__day--selected {
  background: var(--color-terracotta);
  color: var(--color-white);
  font-weight: 700;
  border-color: var(--color-terracotta);
}

.calendar-widget__day--selected:hover {
  background: #a8452c;
  border-color: #a8452c;
  color: var(--color-white);
}

/* Out-of-month / disabled days */
.calendar-widget__day--disabled {
  color: var(--color-soft-rule);
  cursor: default;
  pointer-events: none;
}

/* Scale up calendar day numbers when the sidebar runs full-width */
@media (max-width: 767px) {
  .calendar-widget__day {
    font-size: 0.9rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .calendar-widget__day {
    font-size: 1.2625rem;
  }
}

/* --- Footer --- */
.site-footer {
  grid-area: footer;
  text-align: center;
  padding: var(--space-lg) 0;
  border-top: 2px dashed var(--color-soft-rule);
  font-size: 0.875rem;
  color: var(--color-faded-ink);
}

.site-footer p {
  margin: 0;
}

/* --- Share Section --- */
.share-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-soft-rule);
}

.share-section__title {
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

button.share-btn,
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius-sm);
  background: var(--color-dusty-blue);
  color: var(--color-white);
  transition: background-color 0.2s ease;
}

button.share-btn:hover,
button.share-btn:focus,
.share-btn:hover,
.share-btn:focus {
  background: var(--color-dusty-blue-hover);
  color: var(--color-white);
}

/* ── ActivityPub inline share widget ─── */
.share-mastodon {
  display: inline-flex;
  align-items: stretch;
}

.share-mastodon__form {
  display: inline-flex;
  align-items: stretch;
}

.share-mastodon__input {
  width: 11em;
  padding: 0.3em 0.5em;
  border: 1px solid var(--color-soft-rule);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  background: #fff;
  min-width: 0;
}

.share-mastodon__input:focus {
  outline: 2px solid var(--color-terracotta);
  outline-offset: -1px;
  position: relative; /* keeps outline above the adjacent button border */
  z-index: 1;
}

.share-mastodon__go {
  padding: 0.3em 0.65em;
  background: #923d27;
  color: #fff;
  border: 1px solid #923d27;
  border-radius: 0 4px 4px 0;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.share-mastodon__go:hover,
.share-mastodon__go:focus {
  background: #7a3220;
  border-color: #7a3220;
}

/* ── ActivityPub remote-follow form ─── */
.ap-follow-form {
  margin: 1rem 0 0;
}

.ap-follow-form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--color-ink);
}

.ap-follow-form__input-group {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 26rem;
}

.ap-follow-form__at {
  padding: 0.4em 0.5em;
  background: var(--color-parchment);
  border: 1px solid var(--color-soft-rule);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  color: var(--color-faded-ink);
  line-height: 1;
}

.ap-follow-form__input {
  flex: 1;
  padding: 0.4em 0.5em;
  border: 1px solid var(--color-soft-rule);
  border-radius: 0;
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: #fff;
  min-width: 0;   /* prevents flex blowout */
}

.ap-follow-form__input:focus {
  outline: 2px solid var(--color-terracotta);
  outline-offset: -1px;
}

.ap-follow-form__button {
  padding: 0.4em 0.9em;
  background: #923d27;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid #923d27;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  line-height: 1.4;
}

.ap-follow-form__button:hover,
.ap-follow-form__button:focus {
  background: #7a3220;
  border-color: #7a3220;
}

.ap-follow-form__hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--color-terracotta);
}

/* --- Utility Classes --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

/* --- Loading State --- */
.loading {
  color: var(--color-faded-ink);
  font-style: italic;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1023px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.25rem; }
  
  .lead-article__headline {
    font-size: 1.375rem;
  }
  
  .site-main {
    max-width: 100%;
  }
  
  .card {
    padding: var(--space-md);
  }
}

/* --- Print Styles --- */
@media print {
  .site-nav,
  .site-sidebar,
  .share-section {
    display: none;
  }
  
  .page-wrapper {
    display: block;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* --- Social Media Section --- */
#social_media {
  margin-top: var(--space-xl);
}

.likes {
  margin-bottom: var(--space-xl);
}

.likes h2 {
  margin-bottom: var(--space-md);
}

.likes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
}

.like-avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid var(--color-soft-rule);
}

.like-avatar:hover,
.like-avatar:focus {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(74, 107, 138, 0.3);
  border-color: var(--color-dusty-blue);
}

.like-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comments h2 {
  margin-bottom: var(--space-md);
}

.comment {
  display: flow-root;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
}

.comment-avatar {
  float: left;
  width: 48px;
  height: 48px;
  margin-right: var(--space-md);
  margin-bottom: var(--space-sm);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-soft-rule);
  transition: border-color 0.2s ease;
}

.comment-avatar:hover,
.comment-avatar:focus {
  border-color: var(--color-dusty-blue);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comment-content {
  overflow: hidden;
}

.comment-content p {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .like-avatar {
    width: 40px;
    height: 40px;
  }
  
  .comment-avatar {
    width: 40px;
    height: 40px;
    margin-right: var(--space-sm);
  }
  
  .likes-grid {
    padding: var(--space-sm);
  }
}

/* --- RSS subscription badges --- */

.rss-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.75em 0.3em 0.55em;
  background-color: var(--color-terracotta, #c4563a);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border-radius: 4px;
  line-height: 1.2;
  transition: background-color 0.15s ease;
  width: 100%;
  justify-content: center;
}

.rss-badge:hover,
.rss-badge:focus {
  background-color: #a8452c;
  color: #fff;
  text-decoration: none;
}

.rss-badge__icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.rss-feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

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