/* Scoped to article pages; do not affect homepage or other content types. */
body.page-node-type-article .phpbb-bridge-preview { border:1px solid #e6e9ee; border-radius:14px; padding:16px; background:#fff; }
body.page-node-type-article .phpbb-bridge-preview__header { display:flex; justify-content:space-between; gap:12px; margin-bottom:12px; }
body.page-node-type-article .phpbb-bridge-preview__list { display:block; }
body.page-node-type-article .mfb16-reply { display:grid; grid-template-columns:44px minmax(0,1fr); gap:12px; padding:13px 0; border-top:1px solid #edf0f3; }
body.page-node-type-article .mfb16-reply__avatar img { width:44px; height:44px; object-fit:cover; border-radius:50%; }
body.page-node-type-article .mfb16-reply__avatar span {display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#f0f2f5;color:#98a1ad}
body.page-node-type-article .mfb16-reply__name { font-weight:700; margin-bottom:5px; }
body.page-node-type-article .mfb16-reply__name a { color:#171e2b; text-decoration:none; }
body.page-node-type-article .mfb16-reply__message { overflow-wrap:anywhere; line-height:1.55; }
body.page-node-type-article .mfb16-reply__message blockquote,body.page-node-type-article .mfb16-reply__message .quote {padding:10px 12px;background:#f5f6f8;border-radius:8px;border:0;margin:8px 0;color:#5d6674}
body.page-node-type-article .mfb16-reply__message img.smilies {width:auto;max-width:60px;height:auto;display:inline;vertical-align:middle}
body.page-node-type-article .mfb16-more-wrap {display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;padding:15px 0 4px}
body.page-node-type-article .mfb16-more {border:1px solid #d0d6de;background:white;color:#151d2a;border-radius:24px;padding:9px 18px;font-weight:700;cursor:pointer}
body.page-node-type-article .mfb16-more:disabled {opacity:.6;cursor:wait}
body.page-node-type-article .mfb16-message {width:100%;margin:0;text-align:center;font-size:12px;color:#717b87}
body.page-node-type-article .mfb16-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
body.page-node-type-article .mfb16-card {display:block;color:#111c2b;text-decoration:none;overflow:hidden;border:1px solid #e8ebf0;border-radius:12px;background:white}
body.page-node-type-article .mfb16-card img {width:100%;height:170px;object-fit:cover;display:block}
body.page-node-type-article .mfb16-card__placeholder {height:170px;background:#edf0f4;display:grid;place-items:center;color:#84909c;font-size:13px}
body.page-node-type-article .mfb16-card__info {padding:13px}
body.page-node-type-article .mfb16-card__title {font-weight:700;font-size:15px;line-height:1.4}
body.page-node-type-article .mfb16-card__category {margin-top:8px;font-size:12px;color:#68788e}
@media (max-width:760px) {body.page-node-type-article .mfb16-cards{grid-template-columns:1fr}body.page-node-type-article .mfb16-card img,body.page-node-type-article .mfb16-card__placeholder{height:190px}}


/* v16.2: restore readable card layout similar to the original bridge. */
body.page-node-type-article .mfb16-reply.phpbb-bridge-preview__item {
  display:grid; grid-template-columns:90px minmax(0,1fr); gap:16px;
  align-items:start; margin:0 0 10px; padding:14px;
  border:1px solid #e9edf2; border-radius:12px; background:#fff;
}
body.page-node-type-article .mfb16-reply.phpbb-bridge-preview__item:nth-of-type(even) {background:#f8f9fb}
body.page-node-type-article .mfb16-reply__meta.phpbb-bridge-preview__meta {
  display:flex; flex-direction:column; align-items:center; gap:7px; min-width:0;
}
body.page-node-type-article .mfb16-reply__avatar.phpbb-bridge-preview__avatar,
body.page-node-type-article .mfb16-reply__meta .phpbb-bridge-preview__avatar img {
  width:60px; height:60px; max-width:60px; border-radius:12px;
  object-fit:cover; display:block;
}
body.page-node-type-article .mfb16-reply__who {max-width:90px; text-align:center; overflow-wrap:anywhere;}
body.page-node-type-article .mfb16-reply__name {display:block; font-size:12px; font-weight:700; line-height:1.3; text-decoration:none;}
body.page-node-type-article .mfb16-reply__fallback {display:grid;place-items:center;width:60px;height:60px;background:#eef0f4;border-radius:12px;color:#8792a1;}
body.page-node-type-article .mfb16-reply__message.phpbb-bridge-preview__message {
  min-width:0; margin:0; line-height:1.5; font-size:14px; overflow-wrap:anywhere;
}
body.page-node-type-article .mfb16-reply__message > :first-child {margin-top:0}
body.page-node-type-article .mfb16-reply__message > :last-child {margin-bottom:0}
body.page-node-type-article .mfb16-reply__message img {max-width:100%; height:auto; vertical-align:middle;}
/* phpBB inline smilies sometimes have no .smilies class; match their asset path. */
body.page-node-type-article .mfb16-reply__message img.smilies,
body.page-node-type-article .mfb16-reply__message img[src*="/smilies/"],
body.page-node-type-article .mfb16-reply__message img[src*="/emoji/"],
body.page-node-type-article .mfb16-reply__message img.emoji {
  display:inline-block !important; width:auto !important; height:auto !important;
  max-width:36px !important; max-height:36px !important;
  object-fit:contain; vertical-align:middle;
}
/* Unclassified stickers/reactions are bounded while normal attached images remain legible. */
body.page-node-type-article .mfb16-reply__message img:not(.phpbb-bridge-preview__avatar) {
  max-height:260px; object-fit:contain;
}
body.page-node-type-article .mfb16-reply__message blockquote,
body.page-node-type-article .mfb16-reply__message .quote {
  margin:8px 0; padding:10px 12px; border:0; border-left:3px solid #dce2e9;
  border-radius:7px; background:#f0f2f5; color:#4e5868;
}
body.page-node-type-article .mfb16-reply__message blockquote::before,
body.page-node-type-article .mfb16-reply__message blockquote::after,
body.page-node-type-article .mfb16-reply__message .quote::before,
body.page-node-type-article .mfb16-reply__message .quote::after {content:none !important;}
body.page-node-type-article .mfb16-more-wrap {padding:16px 0 6px}
@media(max-width:620px) {
 body.page-node-type-article .mfb16-reply.phpbb-bridge-preview__item {grid-template-columns:62px minmax(0,1fr);gap:10px;padding:10px}
 body.page-node-type-article .mfb16-reply__avatar.phpbb-bridge-preview__avatar {width:48px;height:48px}
 body.page-node-type-article .mfb16-reply__who {max-width:62px}
 body.page-node-type-article .mfb16-reply__name {font-size:11px}
}


/* v16.3: article heading: title remains Drupal's page title; tags move in Twig. */
body.page-node-type-article h1.title { max-width:900px; margin:8px 0 15px !important; padding:0 !important; border:0 !important; background:transparent !important; font-size:clamp(27px,2.35vw,37px); font-weight:750; line-height:1.18; letter-spacing:-.025em; }
body.page-node-type-article article.node--type-article.full > .article-meta-data {padding:15px 18px 13px !important; border:1px solid #e5e8ee !important; border-radius:12px 12px 0 0 !important; background:#fff !important; margin-bottom:0 !important;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .author.header-info {display:flex !important; align-items:center !important; flex-wrap:wrap; gap:9px 18px; float:none !important; width:auto !important; margin:0 !important; padding:0 !important;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .article-tags {order:-1; flex-basis:100%; margin:0 !important; padding:0 !important; display:flex; align-items:center;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .article-tags > i {display:none;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .field--name-field-category .field__label {display:none !important;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .field--name-field-category a {display:inline-flex; color:#b90016; background:#fff1f2; border:1px solid #ffe0e4; border-radius:6px; padding:3px 9px; font-size:12px; font-weight:700; text-decoration:none;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .article-create-date {display:flex; align-items:center; gap:5px; float:none !important; margin:0 !important; padding:0 !important; color:#697588; font-size:12px;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .article-create-date .label {display:none !important;}
body.page-node-type-article article.node--type-article.full > .article-meta-data .article-create-date a {font-size:12px; font-weight:700; color:#24334c;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags {margin-top:12px; padding-top:11px; border-top:1px solid #edf0f4; width:100%;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags .field {margin:0 !important; display:flex; flex-wrap:wrap; gap:7px; align-items:center;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags .field__label {display:none !important;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags ul.field__items {list-style:none; display:flex; flex-wrap:wrap; gap:7px; padding:0 !important; margin:0 !important;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags ul.field__items li {margin:0 !important; padding:0 !important; list-style:none;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags ul.field__items li a {display:inline-flex; padding:4px 11px; background:#f3f5f8; border:1px solid #e2e6ec; border-radius:99px; font-size:12px; line-height:1.3; font-weight:500; color:#566477; text-decoration:none;}
body.page-node-type-article article.node--type-article.full .mfb-article-header-tags ul.field__items li a:hover {background:#e9edf3; color:#18263c;}
body.page-node-type-article article.node--type-article.full > .content {border-top:0 !important;}
/* Pager: one prominent action, one quieter secondary link. */
body.page-node-type-article .mfb16-more-wrap {padding:22px 12px 12px !important; display:flex; flex-direction:column; align-items:center; gap:10px;}
body.page-node-type-article .mfb16-more-wrap .mfb16-more {display:inline-flex; justify-content:center; align-items:center; padding:11px 24px; min-width:220px; min-height:44px; border:1px solid #c90020; border-radius:9px; background:#bf001e; color:#fff; font-size:13px; font-weight:700; text-transform:none; box-shadow:none; transition:background .15s ease;}
body.page-node-type-article .mfb16-more-wrap .mfb16-more:hover:not(:disabled) {background:#9d0019;}
body.page-node-type-article .mfb16-more-wrap a {font-size:12px; color:#66758a; text-decoration:none;}
body.page-node-type-article .mfb16-more-wrap a:hover {text-decoration:underline;}
body.page-node-type-article .mfb16-more-wrap .mfb16-message {min-height:0; margin:0;}
@media(max-width:620px){body.page-node-type-article article.node--type-article.full > .article-meta-data{padding:12px !important;}body.page-node-type-article h1.title{font-size:27px;}body.page-node-type-article .mfb16-more-wrap .mfb16-more{width:100%;max-width:300px;}}
