/**
 * Optional, ordinary singular-page presentation.
 * Keep Cocoon markup and the tn-* decoration contract intact. Complex :not()
 * exclusions are anchored inside entry-content so the body's tn-* classes do
 * not accidentally exclude every heading. Groups/columns remain supported.
 */

body.tn-article-simple {
  background: #fff;
  color: #111;
}

body.tn-article-simple #navi {
  border-bottom: 1px solid #e2e5e7;
  background: #fff;
}

body.tn-article-simple #content {
  margin-top: 36px;
}

body.tn-article-simple #content-in {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  width: min(calc(100% - 40px), 1140px);
  max-width: 1140px;
  margin-inline: auto;
  padding: 0;
}

body.tn-article-simple #main {
  box-sizing: border-box;
  flex: 1 1 800px;
  width: 0;
  min-width: 0;
  max-width: 800px;
  margin: 0 0 64px;
  padding: 30px;
  overflow: visible;
  border: 1px solid #ddd;
  border-top: 3px solid #222;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body.tn-article-simple #sidebar {
  box-sizing: border-box;
  flex: 0 0 300px;
  width: 300px;
  min-width: 0;
  max-width: 300px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

/* Parent no-sidebar remains authoritative, including a saved Cocoon 1-column page. */
body.tn-article-simple:is(.no-sidebar, .tn-article-sidebar-hidden) #content-in {
  display: block;
  max-width: 800px;
}

body.tn-article-simple:is(.no-sidebar, .tn-article-sidebar-hidden) #main {
  width: 100%;
  margin-inline: auto;
}

body.tn-article-simple.tn-article-sidebar-hidden #sidebar {
  display: none;
}

body.tn-article-simple #main > .article {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.tn-article-simple #main > .article > .article-header {
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0 -30px 40px;
  padding: 0 30px 32px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.tn-article-simple #main > .article > .article-header::before,
body.tn-article-simple #main > .article > .article-header::after {
  content: none;
}

body.tn-article-simple .article-header > .entry-title {
  max-width: 738px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #111;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .01em;
  text-align: left;
  box-shadow: none;
}

body.tn-article-simple .article-header:has(> .eye-catch-wrap:not(.display-none)) > .entry-title {
  margin-top: 35px;
}

body.tn-article-simple .article-header > .date-tags,
body.tn-article-simple .article-header > .read-time {
  margin-block: 14px 0;
  color: #767676;
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}

body.tn-article-simple .article-header .post-date,
body.tn-article-simple .article-header .post-update,
body.tn-article-simple .article-header > .entry-categories-tags {
  color: #767676;
  font-size: 13px;
}

/* Keep every parent-selected share link and its DOM position, but use a small
   neutral outline row. Caption/count settings remain owned by Cocoon. */
body.tn-article-simple :is(.article-header, .article-footer) > .sns-share {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

body.tn-article-simple :is(.article-header, .article-footer) > .sns-share > .sns-share-buttons {
  margin: 0;
  row-gap: 6px;
}

body.tn-article-simple :is(.article-header, .article-footer) > .sns-share > .sns-share-buttons > a {
  box-sizing: border-box;
  align-self: stretch;
  flex-direction: row;
  gap: 6px;
  height: auto;
  min-height: 44px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  color: #555;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none;
  filter: none;
}

body.tn-article-simple :is(.article-header, .article-footer) > .sns-share > .sns-share-buttons > a:has(> .share-count:not(:empty)):not(.sbc-hide a) {
  padding-bottom: 16px;
}

body.tn-article-simple :is(.article-header, .article-footer) > .sns-share > .sns-share-buttons > a:hover {
  background: #f7f7f7;
  color: #111;
  transform: none;
}

body.tn-article-simple :is(.article-header, .article-footer) > .sns-share > .sns-share-buttons > a > .button-caption {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.tn-article-simple :is(.article-header, .article-footer) > .sns-share > .sns-share-buttons > a > .social-icon {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

body.tn-article-simple .article-header > .eye-catch-wrap {
  /* Only the featured-image region changes visual order. The parent's reading
     and focus order stays intact, including any links in an optional caption. */
  order: -1;
  margin: 0;
  padding: 0;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.tn-article-simple .article-header > .eye-catch-wrap > .eye-catch {
  width: 100%;
  margin: 0;
}

body.tn-article-simple .article-header > .eye-catch-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

body.tn-article-simple .article-header > .eye-catch-wrap .cat-label {
  top: 0;
  left: 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 11px;
  line-height: 1.6;
  opacity: 1;
}

/* Keep taxonomy links and Cocoon's position/visibility choices intact. */
body.tn-article-simple #main > .article > .entry-categories-tags .cat-link,
body.tn-article-simple #main > .article > :is(.article-header, .article-footer) > .entry-categories-tags .cat-link {
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #555;
  font-size: 12px;
  line-height: 1.8;
  text-underline-offset: .2em;
}

body.tn-article-simple #main > .article > .entry-categories-tags .cat-link:is(:hover, :focus-visible),
body.tn-article-simple #main > .article > :is(.article-header, .article-footer) > .entry-categories-tags .cat-link:is(:hover, :focus-visible) {
  color: #111;
  text-decoration: underline;
  opacity: 1;
}

body.tn-article-simple #main > .article > .entry-content {
  max-width: 738px;
  margin-inline: auto;
  color: #111;
  font-size: 16px;
  line-height: 2.4;
  overflow-wrap: anywhere;
}

/* Ordinary headings only: neither the heading nor an ancestor within the
   article may be a tn-* decoration/banner or a Cocoon speech/information box. */
body.tn-article-simple .entry-content h2:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
  position: relative;
  margin: 88px 0 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #111;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .035em;
  text-align: center;
  box-shadow: none;
}

body.tn-article-simple .entry-content h3:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
  margin: 77px 0 40px;
  padding: 10px 0 8px 18px;
  border: 0;
  border-left: 2px solid #222;
  border-radius: 0;
  background: none;
  color: #111;
  font-size: 22px;
  line-height: 1.7;
  text-align: left;
  box-shadow: none;
}

body.tn-article-simple .entry-content h4:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
  margin: 36px 0 20px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #e2e5e7;
  background: none;
  color: #30373b;
  font-size: 19px;
  line-height: 1.8;
}

body.tn-article-simple .entry-content :is(h2, h3, h4):not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *))::before,
body.tn-article-simple .entry-content :is(h2, h3, h4):not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *))::after {
  content: none;
}

/* Standard Classic tables and core/table, including nested groups.
   tn-comparison and form controls keep their original dedicated styling. */
body.tn-article-simple .entry-content table:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
  width: 100%;
  max-width: 100%;
  margin-block: 28px;
  border: 1px solid #e2e5e7;
  border-collapse: collapse;
  border-spacing: 0;
  border-radius: 0;
  background: #fff;
  color: #30373b;
  font-size: .92em;
  line-height: 1.8;
  box-shadow: none;
}

body.tn-article-simple .entry-content table:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
  padding: 13px 16px;
  border: 1px solid #e2e5e7;
  background: #fff;
  color: #30373b;
  vertical-align: top;
}

body.tn-article-simple .entry-content table:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) > :is(thead, tbody, tfoot) > tr > th {
  background: #f7f8f9;
  color: #30373b;
}

body.tn-article-simple .entry-content .wp-block-table:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
  max-width: 100%;
  overflow-x: auto;
}

body.tn-article-simple .entry-content .toc:not(:where(.entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *)) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 40px 0;
  padding: 40px;
  transform: none;
  border: 0;
  border-radius: 0;
  background: #f7f7f7;
  color: #111;
  box-shadow: none;
}

body.tn-article-simple .entry-content .toc:not(:where(.entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *))::before {
  content: none;
}

body.tn-article-simple .entry-content .toc:not(:where(.entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *)) .toc-title {
  color: #30373b;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
}

body.tn-article-simple #sidebar > .widget,
body.tn-article-simple #sidebar > .sidebar-scroll > .widget {
  margin-bottom: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body.tn-article-simple #sidebar .widget > .widget-title {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: #333;
  color: #fff;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .02em;
}

body.tn-article-simple .breadcrumb {
  box-sizing: border-box;
  max-width: 1140px;
  padding-block: 12px;
  color: #687178;
  font-size: 12px;
  line-height: 1.8;
}

body.tn-article-simple .entry-content p:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
  margin-block: 32px;
  line-height: 2.4;
}

body.tn-article-simple #sidebar .widget > .textwidget > :is(p, ul, ol):not([class^="tn-"], [class*=" tn-"]) {
  font-size: 14px;
  line-height: 1.9;
}

/* Normal list widgets remain thumbnail-aware; Cocoon's large-card and
   thumbnail visibility modes keep their own dimensions. */
body.tn-article-simple #sidebar .widget-entry-cards:not(.large-thumb-on):not(.card-large-image) > .a-wrap {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  box-shadow: none;
}

body.tn-article-simple #sidebar .widget-entry-cards:not(.large-thumb-on):not(.card-large-image) .card-title {
  color: #222;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

/* Footer metadata and adjacent Cocoon components, never body decorations. */
body.tn-article-simple #main > .article > .article-footer .author-box {
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body.tn-article-simple #main > .article > .article-footer .author-thumb img {
  border: 0;
}

body.tn-article-simple #main > .article > .article-footer .sns-follow-buttons > a {
  min-height: 44px;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: none;
  filter: none;
}

body.tn-article-simple #main :is(.related-entry-heading, .comment-title):not(.entry-content *) {
  margin: 40px 0 24px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid #ddd;
  background: none;
  color: #222;
  font-size: 20px;
  box-shadow: none;
}

body.tn-article-simple #main > .under-entry-content .related-entry-card-wrap {
  border-bottom: 1px solid #ddd;
}

body.tn-article-simple #main > .under-entry-content .related-entry-card {
  padding: 16px 0;
  border-radius: 0;
  box-shadow: none;
}

body.tn-article-simple #main > .under-entry-content .related-entry-card:hover {
  transform: none;
  background: #f7f7f7;
}


@media (max-width: 1023px) {
  body.tn-article-simple #content-in {
    display: block;
    max-width: 800px;
  }

  body.tn-article-simple #main {
    width: 100%;
    margin-bottom: 40px;
  }

  body.tn-article-simple #sidebar {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
  }
}

@media (max-width: 640px) {
  body.tn-article-simple .entry-content p:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
    line-height: 2;
  }

  body.tn-article-simple .entry-content h2:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
    margin: 50px 0 20px;
    font-size: 20px;
    line-height: 1.6;
  }

  body.tn-article-simple .entry-content h3:not(:where(.entry-content [class^="tn-"], .entry-content [class*=" tn-"], .entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *, .speech-wrap *, .speech-balloon *, .blogcard *, .toc *, .information-box *, .question-box *, .alert-box *, .memo-box *, .comment-box *, .common-icon-box *, .blank-box *, .caption-box *)) {
    margin: 37px 0 16px;
    padding: 8px 0 7px 14px;
    font-size: 16px;
  }


  body.tn-article-simple #content { margin-top: 24px; }
  body.tn-article-simple #content-in { width: calc(100% - 40px); }
  body.tn-article-simple #main { padding: 0; border: 0; }
  body.tn-article-simple #main > .article > .article-header { margin: 0 0 28px; padding: 0 0 28px; }
  body.tn-article-simple .article-header > .entry-title { font-size: 20px; }
  body.tn-article-simple .article-header > .eye-catch-wrap { width: calc(100% + 40px); max-width: none; margin-inline: -20px; }
  body.tn-article-simple #main > .article > .entry-content { font-size: 16px; line-height: 2.4; }
  body.tn-article-simple .entry-content .toc:not(:where(.entry-content [class^="tn-"] *, .entry-content [class*=" tn-"] *)) { padding: 28px 24px; }
}

@media print {
  body.tn-article-simple #content-in,
  body.tn-article-simple #main {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
  }
}
