.article-shell {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: 12px;
}
.article-featured-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}
.article-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 1.8rem;
}
.article-content img {
  max-width: 100%;
  height: auto;
}
.article-content blockquote {
  border-left: 4px solid #0d6efd;
  padding-left: 1rem;
  color: #555;
}
.article-content pre {
  background: #f1f3f5;
  padding: 1rem;
  overflow: auto;
}
.article-content table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
}
.article-content td,
.article-content th {
  border: 1px solid #ddd;
  padding: 0.5rem;
}
.article-breed-card {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 580px;
  box-sizing: border-box;
  padding: 1rem;
  margin: 0.8rem 0;
  border: 1px solid #dce2e7;
  border-radius: 12px;
  background: #f8f9fa;
  color: #212529;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
}
.article-breed-card:hover {
  border-color: #0d6efd;
  color: #084298;
}
.article-breed-card img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.article-breed-card strong,
.article-breed-card span span {
  display: block;
}
.article-breed-card span span {
  font-size: 0.9rem;
}
#content {
  min-height: 480px;
  font-family: ui-monospace, monospace;
  line-height: 1.6;
  tab-size: 2;
}
@media (max-width: 400px) {
  .article-breed-card {
    padding: 0.6rem;
    gap: 0.6rem;
  }
  .article-breed-card img {
    width: 64px;
    height: 64px;
  }
}

/* Public presentation is scoped separately from the shared admin preview. */
#page-content.articles-public {
  width: 100%;
  max-width: 1160px;
  padding: clamp(1rem, 3vw, 2rem);
}
.articles-public .articles-index-header {
  margin-bottom: 1.5rem;
}
.articles-public .articles-index-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
}
.articles-public .articles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}
.articles-public .article-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce2e7;
  border-radius: 12px;
  background: #fff;
  transition: border-color 150ms ease;
}
.articles-public .article-card:hover {
  border-color: var(--bs-primary, #158cba);
}
.articles-public .article-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.articles-public .article-card-link:focus-visible {
  outline: 3px solid var(--bs-primary, #158cba);
  outline-offset: -4px;
  border-radius: 12px;
}
.articles-public .article-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  padding: 0.75rem;
  background: #f7f8f9;
  border-bottom: 1px solid #e9ecef;
}
.articles-public .article-card-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.articles-public .article-card-body {
  padding: 1.125rem;
}
.articles-public .article-card-title {
  margin: 0 0 0.5rem;
  color: #333;
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.articles-public .article-date {
  display: block;
  color: #687078;
  font-size: 0.875rem;
  line-height: 1.5;
}
.articles-public .article-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0.75rem 0 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.articles-public .article-card-excerpt:empty {
  display: none;
}
.articles-public .article-shell {
  width: 100%;
  max-width: 820px;
  padding: clamp(1rem, 3vw, 2rem);
}
.articles-public .article-header {
  margin-bottom: 1.75rem;
}
.articles-public .article-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.articles-public .article-featured-media {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2rem;
}
.articles-public .article-featured-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  margin: 0;
  border-radius: 10px;
}
.articles-public .article-content {
  min-width: 0;
  color: #333;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.articles-public .article-content > :first-child {
  margin-top: 0;
}
.articles-public .article-content p {
  margin: 0 0 1.25rem;
}
.articles-public .article-content h2 {
  margin: 2.25rem 0 0.875rem;
  font-size: clamp(1.45rem, 2.7vw, 1.8rem);
  line-height: 1.3;
}
.articles-public .article-content h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  line-height: 1.35;
}
.articles-public .article-content h4,
.articles-public .article-content h5,
.articles-public .article-content h6 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.1em;
  line-height: 1.4;
}
.articles-public .article-content ul,
.articles-public .article-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}
.articles-public .article-content li + li {
  margin-top: 0.4rem;
}
.articles-public .article-content li > p {
  margin-bottom: 0.5rem;
}
.articles-public .article-content li > ul,
.articles-public .article-content li > ol {
  margin: 0.5rem 0;
}
.articles-public .article-content a:not(.article-breed-card) {
  color: var(--bs-primary, #158cba);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.articles-public .article-content a:not(.article-breed-card):hover {
  color: #10698c;
}
.articles-public .article-content strong {
  font-weight: 700;
}
.articles-public .article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid #b5d8e6;
  border-radius: 0 6px 6px 0;
  background: #f5f9fb;
  color: #555;
}
.articles-public .article-content blockquote > :last-child {
  margin-bottom: 0;
}
.articles-public .article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #dce2e7;
  opacity: 1;
}
.articles-public .article-content :not(pre) > code {
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background: #f1f3f5;
  color: #454b50;
  font-size: 0.875em;
}
.articles-public .article-content pre {
  max-width: 100%;
  margin: 1.5rem 0;
  border-radius: 8px;
  font-size: 0.875em;
  line-height: 1.6;
  overflow-wrap: normal;
}
.articles-public .article-content a:not(.article-breed-card) img,
.articles-public .article-content p > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 1.5rem auto;
  border-radius: 8px;
}
.articles-public .article-content table {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95em;
  -webkit-overflow-scrolling: touch;
}
.articles-public .article-content th,
.articles-public .article-content td {
  padding: 0.65rem 0.875rem;
  border-color: #dce2e7;
  vertical-align: top;
  text-align: left;
  min-width: 7rem;
}
.articles-public .article-content th {
  background: #f5f7f8;
  font-weight: 700;
}
.articles-public .article-content .article-breed-card {
  margin: 1.25rem 0;
  color: #333;
  text-decoration: none;
}
.articles-public .article-content .article-breed-card:hover {
  border-color: var(--bs-primary, #158cba);
  color: #10698c;
}
.articles-public .article-content .article-breed-card > span {
  min-width: 0;
}
.articles-public .article-content .article-breed-card img {
  width: 90px;
  height: 90px;
  margin: 0;
  object-fit: cover;
}
@media (min-width: 640px) {
  .articles-public .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .articles-public .articles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 400px) {
  .articles-public .article-shell {
    padding: 1rem 0.875rem;
  }
  .articles-public .article-content .article-breed-card img {
    width: 64px;
    height: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .articles-public .article-card {
    transition: none;
  }
}

.articles-public .article-category {
  display: block;
  margin-bottom: 0.375rem;
  color: #687078;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
}
.articles-public .article-keep-reading {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #dce2e7;
}
.articles-public .article-keep-reading > h2 {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  line-height: 1.3;
}
.articles-public .article-keep-reading .articles-grid {
  gap: 1rem;
}
.articles-public .article-keep-reading .article-card-media {
  height: 140px;
}
.articles-public .article-keep-reading .article-card-body {
  padding: 0.875rem;
}
.articles-public .article-keep-reading .article-card-title {
  font-size: 1.1rem;
}


/* Avoid stacking full outer and inner padding above individual article headers. */
#page-content.articles-public.article-detail {
  padding-top: clamp(0.5rem, 1vw, 0.75rem);
}
.articles-public.article-detail .article-header .article-subtitle {
  margin: 0 0 0.875rem;
  color: #555;
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
@media (max-width: 639px) {
  .articles-public.article-detail .article-header .article-subtitle {
    font-size: 1.0625rem;
  }
}
