body.theme-rawy {
  background-color: #FAF7F2;
}

:root {
  --rawy-card-radius: var(--radius-lg);
  --rawy-card-shadow: var(--shadow-sm);
  --rawy-card-gap: 1.25rem;
}

.theme-rawy .site-header {
  border-block-end: 2px solid #E7E0D6;
  background-color: #FFFDF8;
}

.theme-rawy .button:not(.button-secondary) {
  background-color: #9E472A;
  border-color: #9E472A;
  color: #FFFFFF;
}

.theme-rawy :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Header & Community Hero
   ========================================================================== */
.theme-rawy .site-header {
  border-block-end: 1px solid var(--color-border);
  background-color: var(--color-surface);
}

.theme-rawy .community-hero {
  background-color: var(--color-surface);
  border-block-end: 1px solid var(--color-border);
  padding-block: 2.5rem 2rem;
}

.theme-rawy .community-feed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block: 0.75rem;
}

.theme-rawy .community-feed-tabs a {
  padding-inline: 1rem;
  padding-block: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  color: var(--color-muted);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all 0.15s ease;
}

.theme-rawy .community-feed-tabs a:hover {
  background-color: var(--color-surface-soft);
  color: var(--color-text);
}

.theme-rawy .community-feed-tabs a[aria-current="page"] {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* ==========================================================================
   Home Feed: Avatar-First Editorial Cards
   ========================================================================== */
.theme-rawy .community-feed {
  display: flex;
  flex-direction: column;
  gap: var(--rawy-card-gap);
}

.theme-rawy .rawy-feed-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding-inline: 1.5rem;
  padding-block: 1.25rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rawy-card-radius);
  box-shadow: var(--rawy-card-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-rawy .rawy-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Avatar-First Column */
.theme-rawy .rawy-avatar-col {
  flex-shrink: 0;
  inline-size: 3rem;
  block-size: 3rem;
}

.theme-rawy .rawy-author-avatar {
  inline-size: 100%;
  block-size: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-surface-soft);
}

.theme-rawy .rawy-card-main {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.theme-rawy .rawy-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 0.35rem;
  font-size: 0.8125rem;
}

.theme-rawy .rawy-category-badge {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.6rem;
  padding-block: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  background-color: var(--color-surface-soft);
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
  text-decoration: none;
}

.theme-rawy .rawy-category-badge:hover {
  background-color: var(--color-border);
}

.theme-rawy .rawy-card-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.theme-rawy .rawy-card-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.theme-rawy .rawy-card-title a:hover {
  color: var(--color-primary);
}

.theme-rawy .rawy-card-excerpt {
  margin: 0 0 0.875rem 0;
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-rawy .rawy-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--color-surface-soft);
}

.theme-rawy .rawy-meta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.theme-rawy .rawy-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-inline: 0.5rem;
  padding-block: 0.2rem;
  background-color: var(--color-surface-soft);
  border-radius: var(--radius-md);
  font-weight: 600;
}

/* ==========================================================================
   Question Detail: Editorial Narrative Reading Experience
   ========================================================================== */
.theme-rawy .rawy-article-measure {
  max-inline-size: var(--article-max-width);
  margin-inline: auto;
}

.theme-rawy .rawy-editorial-header {
  padding-block-end: 1.5rem;
  border-block-end: 1px solid var(--color-border);
  margin-block-end: 1.5rem;
}

.theme-rawy .rawy-author-bio-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1rem;
}

.theme-rawy .rawy-author-bio-block img {
  inline-size: 3.25rem;
  block-size: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
}

.theme-rawy .rawy-horizontal-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.875rem;
  padding-inline: 1rem;
  background-color: var(--color-surface-soft);
  border-radius: var(--radius-md);
  margin-block-start: 1.5rem;
}

/* Accepted Answer Featured Treatment */
.theme-rawy .rawy-accepted-panel {
  background-color: #f7faf7;
  border: 1px solid var(--color-success);
  border-radius: var(--rawy-card-radius);
  padding-inline: 1.75rem;
  padding-block: 1.5rem;
  margin-block-end: 2rem;
  box-shadow: var(--shadow-sm);
}

.theme-rawy .rawy-accepted-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.75rem;
  padding-block: 0.35rem;
  background-color: var(--color-success);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  margin-block-end: 1rem;
}

/* ==========================================================================
   Topics / Discussion Flow
   ========================================================================== */
.theme-rawy .rawy-topic-hero-banner {
  background: linear-gradient(135deg, var(--color-surface-soft) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--rawy-card-radius);
  padding-inline: 2rem;
  padding-block: 2rem;
  margin-block-end: 1.5rem;
}

.theme-rawy .rawy-thread-comment-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding-inline: 1.5rem;
  padding-block: 1.25rem;
  margin-block-end: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 640px) {
  .theme-rawy .rawy-feed-card {
    flex-direction: column;
    padding-inline: 1rem;
    padding-block: 1rem;
  }

  .theme-rawy .rawy-avatar-col {
    inline-size: 2.25rem;
    block-size: 2.25rem;
  }

  .theme-rawy .rawy-card-title {
    font-size: 1.125rem;
  }

  .theme-rawy .rawy-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
