/*
 * bobnoblog v2.2.1 — Post-only editorial redesign.
 * No changes to the home page, static pages or stored post content.
 * The bobnoblog Control plugin remains the sole owner of the TOC and ads.
 */
.bnb-article-page {
  width: min(calc(100% - 48px), 1440px);
  max-width: 1440px;
  padding-top: clamp(18px, 3vw, 38px);
  padding-bottom: clamp(56px, 8vw, 100px);
}
.bnb-article-page .bnb-article { max-width: 100%; }
.bnb-article-page .bnb-article-hero {
  display: block;
  min-height: 0;
  padding: clamp(30px, 5.4vw, 72px) clamp(22px, 7vw, 90px) clamp(32px, 5.5vw, 69px);
  border: 1px solid #315b79;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(ellipse at 89% 15%, rgba(67,155,213,.22), transparent 47%),
    linear-gradient(120deg, #0c253c 7%, #112e47 53%, #1b4262 100%);
  box-shadow: 0 22px 45px rgba(0, 0, 0, .08);
}
.bnb-article-page .bnb-article-hero::after {
  top: -210px;
  right: -170px;
  width: 510px;
  height: 510px;
  border: 1px solid rgba(180,228,255,.12);
  box-shadow: 0 0 0 56px rgba(130,190,236,.027), 0 0 0 114px rgba(130,190,236,.025);
}
.bnb-article-page .content-page__breadcrumb {
  font-size: 12px;
  line-height: 1.8;
  gap: 10px;
  margin: 0 0 26px;
  color: #aac4db;
}
.bnb-article-page .content-page__breadcrumb a {
  color: #c5def1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.bnb-article-page .content-page__breadcrumb a:hover,
.bnb-article-page .content-page__breadcrumb a:focus-visible {
  color: #fff;
  border-bottom-color: #85caff;
}
.bnb-article-hero__category {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: #c8eaff;
  border-radius: 999px;
  border: 1px solid rgba(110,194,252,.37);
  background: rgba(51,140,207,.17);
  text-decoration: none;
  margin-bottom: 18px;
}
.bnb-article-hero__category:hover { background: rgba(75,166,232,.32); color: white; }
.bnb-article-page .bnb-article-hero .content-page__title {
  max-width: 880px;
  margin: 0;
  color: #f7fbff;
  font-size: clamp(27px, 3.3vw, 41px);
  font-weight: 700;
  line-height: 1.52;
  letter-spacing: -.038em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.bnb-article-hero__summary {
  max-width: 750px;
  margin: 19px 0 0;
  font-size: clamp(13px, 1.4vw, 15px);
  line-height: 1.9;
  color: #c1d5e6;
}
.bnb-article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 20px;
  row-gap: 7px;
  margin-top: 27px;
  padding-top: 17px;
  border-top: 1px solid rgba(194,227,251,.18);
  font-size: 12px;
  line-height: 1.7;
  color: #c9d9e7;
}
.bnb-article-hero__meta > span { display: inline-flex; align-items: center; gap: 7px; }
.bnb-article-hero__meta svg { flex: none; color: #80bdf0; }
.bnb-article-page .bnb-article-paper {
  position: relative;
  padding: clamp(28px, 5.8vw, 74px) clamp(20px, 5.8vw, 68px) clamp(42px, 6.3vw, 80px);
  border: 1px solid #d4e3ef;
  border-top: 0;
  border-radius: 0 0 20px 20px;
  background: #fff;
  color: #24384b;
  box-shadow: 0 16px 44px rgba(0,0,0,.09);
}
.bnb-article-page .bnb-article-reading {
  max-width: 900px;
  margin-inline: auto;
  font-size: 16px;
  line-height: 2.05;
  color: #263d50;
  word-break: normal;
  overflow-wrap: break-word;
}
.bnb-article-reading .bnb-article-content {
  min-width: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.bnb-article-reading .bnb-article-content > :first-child { margin-top: 0; }
.bnb-article-reading .bnb-article-content > :last-child { margin-bottom: 0; }
.bnb-article-reading .bnb-article-content :where(p,ul,ol) { margin-block: 0 1.68em; }
.bnb-article-reading .bnb-article-content li { line-height: 1.9; }
.bnb-article-reading .bnb-article-content li + li { margin-top: .44em; }
.bnb-article-reading .bnb-article-content a:not(.bnc-linkcard):not(.blogcard-wrap):not(.wp-block-button__link) {
  color: #075b98;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0,105,179,.45);
  transition: color .16s ease, text-decoration-color .16s ease;
}
.bnb-article-reading .bnb-article-content a:not(.bnc-linkcard):not(.blogcard-wrap):not(.wp-block-button__link):hover {
  color: #034574;
  text-decoration-color: currentColor;
}
.bnb-article-reading .bnb-article-content :where(h2,h3,h4,h5) { text-wrap: pretty; overflow-wrap: anywhere; }
.bnb-article-reading .bnb-article-content h2 {
  margin: 2.6em 0 1.12em;
  padding: 18px 22px;
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.55;
  border: 0;
  border-left: 5px solid #2787cc;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, #eaf5fd, #f3f9fd);
  color: #123852;
  box-shadow: inset 0 0 0 1px rgba(63,143,194,.06);
}
.bnb-article-reading .bnb-article-content h3 {
  margin: 2.2em 0 1em;
  padding: 0 0 11px;
  font-size: clamp(18px, 1.8vw, 21px);
  font-weight: 700;
  line-height: 1.6;
  border: 0;
  border-bottom: 2px solid #d2e5f4;
  color: #183b53;
}
.bnb-article-reading .bnb-article-content h4 {
  font-size: 17px;
  margin: 1.8em 0 .75em;
  color: #244961;
  border-left: 3px solid #6aaedf;
  padding-left: 12px;
}
.bnb-article-reading .bnb-article-content :where(h2,h3,h4)[id] { scroll-margin-top: 95px; }
.bnb-article-page .bnb-article-cover {
  max-width: 900px;
  width: 100%;
  margin: 0 auto clamp(30px, 4vw, 52px);
  padding: 8px;
  border: 1px solid #e1ebf2;
  border-radius: 17px;
  background: #f6fafc;
}
.bnb-article-page .bnb-article-cover__image {
  display: block;
  max-height: 430px;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
  border-radius: 11px;
}
/* Never enlarge a content graphic beyond its own intrinsic width. */
.bnb-article-reading .bnb-article-content :where(img, video, iframe, svg) { max-width: 100%; }
.bnb-article-reading .bnb-article-content img { height: auto; }
.bnb-article-reading .bnb-article-content :where(.wp-block-image,figure, .wp-caption) { max-width: 100%; }
.bnb-article-reading .bnb-article-content :where(figcaption, .wp-caption-text) { color: #71869a; font-size: 12px; line-height: 1.65; }
.bnb-article-reading .bnb-article-content :where(blockquote, .wp-block-quote) {
  background: #f1f7fc;
  border-left: 4px solid #5fa4d8;
  border-radius: 0 9px 9px 0;
  margin: 2em 0;
  padding: 22px 25px;
  color: #34526a;
}
.bnb-article-reading .bnb-article-content :where(blockquote, .wp-block-quote) > :last-child { margin-bottom: 0; }
.bnb-article-reading .bnb-article-content :where(pre, .wp-block-preformatted) {
  background: #10273b;
  color: #f1f8ff;
  border-radius: 12px;
  line-height: 1.7;
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
}
.bnb-article-reading .bnb-article-content :where(code) { overflow-wrap: anywhere; }
.bnb-article-reading .bnb-article-content pre code { overflow-wrap: normal; color: inherit; }
.bnb-article-reading .bnb-article-content :where(.wp-block-table) { overflow-x: auto; border-radius: 10px; border: 1px solid #d8e5ef; }
.bnb-article-reading .bnb-article-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bnb-article-reading .bnb-article-content :where(td,th) { padding: 10px 13px; border: 1px solid #d8e5ef; }
.bnb-article-reading .bnb-article-content th { background: #edf5fb; color: #19425e; }
.bnb-article-reading .bnb-article-content tr:nth-child(even) td { background: #f8fbfd; }
.bnb-article-reading .bnb-article-content .wp-block-button__link { border-radius: 8px; }
/* Plugin-created table of contents and manual ad: post page only, no duplicate control. */
.bnb-article-reading .entry-content .bnc-toc {
  margin: 2.35em 0 2em;
  padding: clamp(17px, 2.7vw, 25px);
  background: #f1f7fc;
  border: 1px solid #cfdfeb;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(22,79,121,.04);
}
.bnb-article-reading .bnc-toc__title { font-size: 17px; color: #183b56; margin-bottom: 13px; }
.bnb-article-reading .bnc-toc__list { padding-left: 1.6em; }
.bnb-article-reading .bnc-toc li { border-bottom: 1px solid rgba(80,142,184,.1); padding: .24em 0; }
.bnb-article-reading .bnc-toc li:last-child { border-bottom: 0; }
.bnb-article-reading .bnc-toc a { font-size: 14px; line-height: 1.7; }
.bnb-article-reading .bnc-ad { margin: 2.25em auto; }
/* Cocoon legacy balloons stay compact and visually consistent. */
.bnb-article-reading .entry-content .speech-wrap { margin-block: 28px 32px; gap: 16px; }
.bnb-article-reading .entry-content .speech-wrap .speech-person { flex-basis: 86px; width: 86px; max-width: 86px; }
.bnb-article-reading .entry-content .speech-wrap .speech-icon { width: 76px; height: 76px; }
.bnb-article-reading .entry-content .speech-wrap .speech-balloon {
  padding: 17px 20px;
  min-height: 74px;
  border: 1px solid #cbdce9;
  border-radius: 13px;
  background: #f2f8fc;
  font-size: 15px;
  color: #25435b;
}
.bnb-article-reading .entry-content :where(.blogcard-wrap, a.blogcard-wrap, .bnc-linkcard) {
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(23,63,92,.08);
}
/* User-authored tags remain readable and distinguishable from navigational links. */
.bnb-article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 35px 0 0;
  padding-top: 25px;
  border-top: 1px solid #e0e9f1;
}
.bnb-article-tags__title { font-weight: 700; color: #577186; font-size: 12px; margin-right: 4px; }
.bnb-article-tags a {
  display: inline-block;
  color: #176396;
  background: #ecf5fc;
  border: 1px solid #d6e9f7;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.bnb-article-tags a:hover { background: #d8edfc; color: #124d75; }
.bnb-article-nextstep {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 24px;
  margin-top: 38px;
  border-radius: 13px;
  border: 1px solid #d7e8f4;
  background: linear-gradient(110deg,#f0f8fd,#f7fbfe);
}
.bnb-article-nextstep__eyebrow { display: block; font-size: 11px; color: #437da3; font-weight: 700; margin-bottom: 6px; }
.bnb-article-nextstep p { margin: 0; color: #1b3e59; font-weight: 700; font-size: 14px; line-height: 1.7; }
.bnb-article-nextstep a {
  flex: 0 0 auto;
  background: #114d78;
  color: #fff;
  border-radius: 99px;
  padding: 9px 17px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.bnb-article-nextstep a:hover { background: #0d6aa6; transform: translateY(-2px); }
.bnb-article-related { margin-top: clamp(35px, 5vw, 58px); }
.bnb-article-related__heading { margin-bottom: 20px; }
.bnb-article-related__label { font-size: 11px; letter-spacing: .12em; color: #82c3f8; font-weight: 700; }
.bnb-article-related h2 { font-size: clamp(23px, 3vw, 29px); line-height: 1.4; margin: 8px 0 0; color: #f3f9ff; }
.bnb-article-related__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.bnb-article-related__card { min-width: 0; }
.bnb-article-related__card a {
  display: block;
  height: 100%;
  color: #eff6fe;
  border: 1px solid #2d5270;
  border-radius: 14px;
  background: #102a40;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.bnb-article-related__card a:hover,
.bnb-article-related__card a:focus-visible {
  transform: translateY(-4px);
  border-color: #64b6f5;
  box-shadow: 0 12px 34px rgba(17,118,211,.2), 0 0 0 1px rgba(63,170,243,.16);
}
.bnb-article-related__visual { display: block; aspect-ratio: 16/9; background: #19405e; overflow: hidden; }
.bnb-article-related__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.bnb-article-related__card a:hover .bnb-article-related__image { transform: none; }
.bnb-article-related__placeholder { display: block; width:100%; height:100%; background: radial-gradient(circle at 78% 38%, rgba(78,161,226,.34),transparent 49%),linear-gradient(120deg,#11263c,#1e5072); }
.bnb-article-related__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 10px; }
.bnb-article-related__body strong { font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.bnb-article-related__body time { font-size: 11px; color: #abc5d9; }
@media(max-width:760px){
  .bnb-article-related__grid { gap: 11px; }
  .bnb-article-related__body { padding: 11px 12px 14px; }
  .bnb-article-related__body strong { font-size: 12px; }
}
@media(max-width:600px){
  .bnb-article-page { width: min(calc(100% - 24px), 1440px); padding-top: 17px; }
  .bnb-article-page .bnb-article-hero { padding: 25px 21px 29px; border-radius: 16px 16px 0 0; }
  .bnb-article-page .content-page__breadcrumb { font-size: 11px; margin-bottom: 17px; gap: 7px; }
  .bnb-article-page .bnb-article-hero .content-page__title { font-size: clamp(24px, 6vw, 30px); line-height: 1.52; }
  .bnb-article-hero__category { margin-bottom: 12px; font-size: 11px; }
  .bnb-article-hero__meta { margin-top: 20px; padding-top: 13px; font-size: 11px; gap: 5px 14px; }
  .bnb-article-page .bnb-article-paper { padding: 27px 19px 37px; border-radius: 0 0 16px 16px; }
  .bnb-article-page .bnb-article-reading { font-size: 15px; line-height: 2.0; }
  .bnb-article-reading .bnb-article-content h2 { padding: 13px 14px; margin-top: 2.1em; font-size: 21px; }
  .bnb-article-reading .bnb-article-content h3 { font-size: 18px; margin-top: 1.9em; }
  .bnb-article-reading .bnb-article-content :where(blockquote,.wp-block-quote) { padding: 16px 18px; }
  .bnb-article-reading .entry-content .speech-wrap { gap: 10px; }
  .bnb-article-reading .entry-content .speech-wrap .speech-person { flex-basis: 57px; max-width: 57px; width: 57px; }
  .bnb-article-reading .entry-content .speech-wrap .speech-icon { width: 55px; height: 55px; }
  .bnb-article-reading .entry-content .speech-wrap .speech-balloon { padding: 12px 13px; font-size: 13px; min-height: 56px; }
  .bnb-article-reading .bnc-toc__list a { font-size: 13px; }
  .bnb-article-nextstep { flex-direction: column; align-items: flex-start; padding: 17px 18px; gap: 12px; }
  .bnb-article-related__grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
}
@media(max-width:370px){
  .bnb-article-page .bnb-article-paper { padding-inline: 14px; }
  .bnb-article-related__grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(prefers-reduced-motion:reduce){
  .bnb-article-related__card a, .bnb-article-related__image, .bnb-article-nextstep a { transition: none !important; }
  .bnb-article-related__card a:hover, .bnb-article-nextstep a:hover { transform: none; }
}

/* v2.3.0: wide article shell with readable centered text.
   Thumb-only related articles: the whole thumbnail is the click target. */
.bnb-article-page .bnb-article-related__grid {align-items:stretch;}
.bnb-article-page .bnb-article-related__card a {display:block;height:auto;border-width:2px;line-height:0;}
.bnb-article-page .bnb-article-related__visual {aspect-ratio:16/9;}
.bnb-article-page .bnb-article-related__image {width:100%;height:100%;object-fit:cover;object-position:center;}
.bnb-article-page .bnb-article-related__body {display:none;}
/* Blog cards: the thumbnail fills the entire left column without a bottom strip.
   This deliberately crops like homepage latest cards rather than enlarging the image. */
.bnb-article-page .bnb-article-content .bnc-linkcard__visual,
.bnb-article-page .bnb-article-content .blogcard-thumbnail {position:relative;overflow:hidden;align-self:stretch;}
.bnb-article-page .bnb-article-content .bnc-linkcard__visual > img,
.bnb-article-page .bnb-article-content .blogcard-thumbnail > img {
  position:absolute!important;inset:0;width:100%!important;height:100%!important;
  min-height:0!important;max-height:none!important;max-width:none!important;
  object-fit:cover!important;object-position:center;transform:none!important;
}
@media (min-width: 1024px) {
  .bnb-article-page .bnb-article-hero .content-page__title {max-width:1100px;}
}

/* v2.3.1: related posts use the same horizontal editorial card as homepage latest posts.
   Avoid the earlier thumbnail-only override. No image zoom or card movement. */
.bnb-article-page .bnb-article-related__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}
.bnb-article-page .bnb-article-related__card { min-width: 0; }
.bnb-article-page .bnb-article-related__card a.bnb-article-related__link {
  display: grid;
  grid-template-columns: 42% minmax(0,1fr);
  min-height: 164px;
  height: 100%;
  line-height: 1.6;
  border: 2px solid #426984;
  background: linear-gradient(145deg, #14314b 0%, #0d253a 100%);
  border-radius: 13px;
  overflow: hidden;
  color: #f3f8ff;
  text-decoration: none;
  transform: none !important;
  transition: border-color .22s ease, box-shadow .22s ease !important;
}
.bnb-article-page .bnb-article-related__visual {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  background: #12304a;
}
.bnb-article-page .bnb-article-related__visual .bnb-article-related__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none !important;
  transition: none !important;
}
.bnb-article-page .bnb-article-related__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 0;
  padding: 15px 14px;
  line-height: 1.6;
}
.bnb-article-page .bnb-article-related__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 9px;
}
.bnb-article-page .bnb-article-related__tag {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid rgba(108,191,255,.28);
  border-radius: 100px;
  background: rgba(51,141,211,.27);
  color: #b1ddff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.bnb-article-page .bnb-article-related__body strong {
  min-height: 0;
  margin: 0 0 11px;
  padding: 0;
  color: #f3f8ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.bnb-article-page .bnb-article-related__body time {
  display: block;
  margin-top: auto;
  padding-top: 4px;
  color: #b6c9db;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1000px) {
  .bnb-article-page .bnb-article-related__grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
  .bnb-article-page .bnb-article-related__grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .bnb-article-page .bnb-article-related__card a.bnb-article-related__link { grid-template-columns: 40% minmax(0,1fr); min-height: 126px; }
  .bnb-article-page .bnb-article-related__body { padding: 10px 11px; }
  .bnb-article-page .bnb-article-related__tags { gap: 4px; margin-bottom: 5px; }
  .bnb-article-page .bnb-article-related__tag { font-size: 9px; padding: 1px 5px; }
  .bnb-article-page .bnb-article-related__body strong { font-size: 12px; line-height: 1.5; -webkit-line-clamp: 3; margin-bottom: 5px; }
  .bnb-article-page .bnb-article-related__body time { font-size: 10px; }
}
@media (max-width: 360px) {
  .bnb-article-page .bnb-article-related__card a.bnb-article-related__link { grid-template-columns: 39% minmax(0,1fr); }
  .bnb-article-page .bnb-article-related__body { padding: 8px 9px; }
  .bnb-article-page .bnb-article-related__body strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .bnb-article-page .bnb-article-related__card a.bnb-article-related__link { transition: none !important; }
}

/* v2.3.3 — only the theme's one "あわせて読みたい" section should be visible.
 * This hides Jetpack's auto-generated related list on single posts as a fallback;
 * never hides our custom blog-card block or the dark themed related cards. */
body.single-post #jp-relatedposts,
body.single-post .jp-relatedposts { display: none !important; }
