/* 固定ページ／投稿
 * 学費コラム記事の装飾トーンを参考（クラス名は yt 独自）
 */

body.yt-content-body {
  --yt-prose-accent: #087bbd;
  --yt-prose-navy: #0b1b3b;
  --yt-prose-ink: #243d54;
  --yt-prose-muted: #5a7084;
  --yt-prose-line: #d5e3ef;
  --yt-prose-soft: #f3f9ff;
  --yt-prose-list-bg: #f5fafd;
  --yt-prose-list-line: #d7e6f2;
  background: #f8fcff;
}

.yt-content-page {
  padding-top: 12px;
}

.yt-content-hero {
  margin-bottom: 22px;
}

.yt-content-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
}

.yt-content-cats {
  margin: 0;
}

.yt-content-cats .yt-tool-pill.is-pr {
  background: #222;
  color: #fff;
  border-color: #222;
  cursor: default;
}

.yt-content-cats .yt-tool-pill.is-pr:hover,
.yt-content-cats .yt-tool-pill.is-pr:focus-visible {
  filter: none;
}

.yt-content-dates {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--yt-prose-muted);
}

.yt-content-dates time {
  font-weight: 700;
  color: #35536e;
}

.yt-content-dates-sep {
  margin: 0 0.35em;
  color: #a4b3c3;
}

.yt-content-panel {
  min-width: 0;
}

.yt-content-panel > :first-child {
  margin-top: 0;
}

.yt-content-thumb {
  margin: 0 0 28px;
  border-radius: 14px;
  overflow: hidden;
  background: #e8f1f8;
}

.yt-content-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

/* —— 本文 —— */
.yt-content-body-text {
  color: var(--yt-prose-ink);
  font-size: 15px;
  line-height: 1.85;
}

.yt-content-body-text > :first-child {
  margin-top: 0;
}

.yt-content-body-text h2 {
  margin: 3.2em 0 0.85em;
  padding: 0 0 0 14px;
  border-left: 5px solid var(--yt-prose-accent);
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--yt-prose-navy);
  line-height: 1.4;
}

.yt-content-body-text h2:first-child {
  margin-top: 0.4em;
}

.yt-content-body-text h3 {
  margin: 1.6em 0 0.7em;
  padding: 0 0 0.4em;
  border-bottom: 2px dotted var(--yt-prose-accent);
  font-size: 1.12em;
  font-weight: 800;
  color: var(--yt-prose-navy);
  line-height: 1.4;
}

.yt-content-body-text h4 {
  margin: 1.4em 0 0.45em;
  font-size: 1.02em;
  font-weight: 800;
  color: #1d527c;
}

.yt-content-body-text p {
  margin: 1.35em 0;
}

.yt-content-body-text a {
  color: #066ac8;
  font-weight: 600;
  text-decoration: none;
}

.yt-content-body-text a:hover,
.yt-content-body-text a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* リスト（出典・押さえる点・TOC は除外） */
.yt-content-body-text :is(ul, ol):not(.yt-prose-sources, .yt-prose-points, .toc_list) {
  margin: 1.1rem 0 1.4rem;
  padding: 0.85rem 1.05rem 0.85rem 1rem;
  list-style: none;
  background: var(--yt-prose-list-bg);
  border: 1px solid var(--yt-prose-list-line);
  border-radius: 10px;
  box-sizing: border-box;
  counter-reset: yt-prose-ol;
}

.yt-content-body-text :is(ul, ol):not(.yt-prose-sources, .yt-prose-points, .toc_list) > li {
  position: relative;
  margin: 0;
  padding: 0.65rem 0.15rem 0.65rem 2.15rem;
  line-height: 1.75;
  border-bottom: 1px dashed #cfe0ee;
  color: var(--yt-prose-ink);
}

.yt-content-body-text :is(ul, ol):not(.yt-prose-sources, .yt-prose-points, .toc_list) > li:last-child {
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

.yt-content-body-text :is(ul, ol):not(.yt-prose-sources, .yt-prose-points, .toc_list) > li:first-child {
  padding-top: 0.35rem;
}

.yt-content-body-text ul:not(.yt-prose-sources, .yt-prose-points, .toc_list) > li::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 1.15rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--yt-prose-accent);
}

.yt-content-body-text ol:not(.yt-prose-sources, .toc_list) > li {
  counter-increment: yt-prose-ol;
}

.yt-content-body-text ol:not(.yt-prose-sources, .toc_list) > li::before {
  content: counter(yt-prose-ol);
  position: absolute;
  left: 0.15rem;
  top: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--yt-prose-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

/* Table of Contents Plus（本文リスト装飾と分離） */
.yt-content-body-text #toc_container {
  display: block;
  float: none;
  width: 100%;
  max-width: none;
  margin: 0 0 1.75em;
  padding: 14px 16px 12px;
  box-sizing: border-box;
  border: 1px solid var(--yt-prose-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px #15324a0d;
}

.yt-content-body-text #toc_container .toc_title {
  margin: 0 0 0.55em;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--yt-prose-navy);
  text-align: left;
}

.yt-content-body-text #toc_container .toc_list,
.yt-content-body-text #toc_container .toc_list ul {
  margin: 0;
  padding: 0;
  list-style: none !important;
  background: none;
  border: 0;
  border-radius: 0;
  counter-reset: none;
}

.yt-content-body-text #toc_container .toc_list li {
  position: static;
  margin: 0;
  padding: 0.28em 0;
  border: 0;
  line-height: 1.55;
  color: var(--yt-prose-ink);
}

.yt-content-body-text #toc_container .toc_list li::before {
  content: none !important;
  display: none;
}

.yt-content-body-text #toc_container a {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #066ac8;
  font-weight: 600;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
}

.yt-content-body-text #toc_container a:hover,
.yt-content-body-text #toc_container a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yt-content-body-text #toc_container .toc_number {
  display: inline;
  margin-right: 0.25em;
  color: var(--yt-prose-muted);
  font-weight: 700;
}

/* 出典リスト */
.yt-content-body-text ul.yt-prose-sources {
  margin: 0.75rem 0 1.1rem;
  padding: 0 0 0 1.35rem;
  list-style: disc;
  background: none;
  border: 0;
}

.yt-content-body-text ul.yt-prose-sources > li {
  margin: 0.4rem 0;
  padding: 0;
  border: 0;
  line-height: 1.75;
}

.yt-content-body-text ul.yt-prose-sources > li::before {
  content: none;
}

/* 押さえる点カード */
.yt-content-body-text .yt-prose-points {
  margin: 2.2rem 0 1.4rem;
  padding: 0;
  list-style: none;
  background: none;
  border: 0;
  display: grid;
  gap: 0.85rem;
}

.yt-content-body-text .yt-prose-points > li,
.yt-content-body-text .yt-prose-point {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: #f7fafc;
  border: 1px solid var(--yt-prose-line);
  border-radius: 8px;
  box-sizing: border-box;
}

.yt-content-body-text .yt-prose-points > li::before,
.yt-content-body-text .yt-prose-point::before {
  content: none;
}

.yt-content-body-text .yt-prose-point-title {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--yt-prose-navy);
}

.yt-content-body-text .yt-prose-point-title::before {
  content: "";
  flex: 0 0 1.15em;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.12em;
  background-color: var(--yt-prose-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.2 16.6 4.8 12.2l1.4-1.4 3 3 8.6-8.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.2 16.6 4.8 12.2l1.4-1.4 3 3 8.6-8.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.yt-content-body-text .yt-prose-point-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--yt-prose-ink);
}

/* FAQ */
.yt-content-body-text .yt-prose-faq {
  margin: 0.75rem 0 1.5rem;
  border-top: 1px solid var(--yt-prose-line);
}

.yt-content-body-text .yt-prose-faq-item {
  margin: 0;
  border-bottom: 1px solid var(--yt-prose-line);
  background: #fff;
}

.yt-content-body-text .yt-prose-faq-q {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1.75rem 0.85rem 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--yt-prose-navy);
  position: relative;
}

.yt-content-body-text .yt-prose-faq-q::-webkit-details-marker {
  display: none;
}

.yt-content-body-text .yt-prose-faq-q::after {
  content: "▼";
  position: absolute;
  right: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: var(--yt-prose-muted);
}

.yt-content-body-text .yt-prose-faq-item[open] > .yt-prose-faq-q::after {
  content: "▲";
}

.yt-content-body-text .yt-prose-faq-a {
  padding: 0 0.15rem 0.95rem;
}

.yt-content-body-text .yt-prose-faq-a > :first-child {
  margin-top: 0;
}

.yt-content-body-text .yt-prose-faq-a > :last-child {
  margin-bottom: 0;
}

/* CTA（学費 gss-column-cta 相当） */
.yt-content-body-text .yt-prose-cta {
  margin: 1.5em 0 0;
}

.yt-content-body-text .yt-prose-cta + .yt-prose-cta {
  margin-top: 0.55em;
}

.yt-content-body-text .yt-prose-cta a {
  /* 左のアイコン（mask で色は文字色に追従）。種類は下の判定で差し替える */
  --yt-ico-tool: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a5 5 0 0 0-6.4 6.4L3 18a2.1 2.1 0 0 0 3 3l5.3-5.3a5 5 0 0 0 6.4-6.4L15 12l-3-3z'/%3E%3C/svg%3E");
  --yt-ico-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8'/%3E%3C/svg%3E");
  --yt-ico-web: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a14.5 14.5 0 0 1 0 20M12 2a14.5 14.5 0 0 0 0 20'/%3E%3C/svg%3E");
  --yt-cta-ico: var(--yt-ico-doc);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #dbe7f4;
  border-radius: 7px;
  padding: 12px 13px;
  font-weight: 650;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #066ac8;
  background: var(--yt-prose-soft);
  text-decoration: none;
  box-sizing: border-box;
}

.yt-content-body-text .yt-prose-cta a::before {
  content: "";
  flex: none;
  align-self: flex-start;
  width: 1.25em;
  height: 1.45em; /* 1行目の行の高さに合わせて縦中央に */
  background-color: currentColor;
  -webkit-mask: var(--yt-cta-ico) center / 1.15em no-repeat;
  mask: var(--yt-cta-ico) center / 1.15em no-repeat;
}

/* 種類の判定: サイト内の相対パス。ツール（診断・計算・生成）＝スパナ、ほかのサイト内＝ドキュメント、外部＝Web */
.yt-content-body-text .yt-prose-cta a[href^="/shindan/"],
.yt-content-body-text .yt-prose-cta a[href^="/keisan/"],
.yt-content-body-text .yt-prose-cta a[href^="/generator/"] {
  --yt-cta-ico: var(--yt-ico-tool);
}

.yt-content-body-text .yt-prose-cta a[href^="http"],
.yt-content-body-text .yt-prose-cta a[href^="//"] {
  --yt-cta-ico: var(--yt-ico-web);
}

/* ショートコード（絶対URLで出力）はPHP側でツール向けに印を付ける */
.yt-content-body-text .yt-prose-cta.yt-prose-cta--tool a {
  --yt-cta-ico: var(--yt-ico-tool);
}

.yt-content-body-text .yt-prose-cta a::after {
  content: "›";
  flex: none;
  margin-left: auto; /* 文字をアイコンの隣に寄せ、矢印だけ右端へ */
  font-size: 1.2em;
  line-height: 1;
  color: #248d48;
  transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.yt-content-body-text .yt-prose-cta a {
  transition: background-color 0.3s ease;
}

.yt-content-body-text .yt-prose-cta a:hover,
.yt-content-body-text .yt-prose-cta a:focus-visible {
  background: #e7f1fb;
  text-decoration: none;
}

.yt-content-body-text .yt-prose-cta a:hover::after,
.yt-content-body-text .yt-prose-cta a:focus-visible::after {
  translate: 3px 0;
}

@media (prefers-reduced-motion: reduce) {
  .yt-content-body-text .yt-prose-cta a,
  .yt-content-body-text .yt-prose-cta a::after {
    transition: none;
  }
}

.yt-content-body-text .yt-prose-cta + .data-note {
  margin-top: 1.35em;
}

/* 表・画像・引用 */
.yt-content-body-text table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 0.92em;
  line-height: 1.55;
}

.yt-content-body-text th,
.yt-content-body-text td {
  padding: 0.7em 0.85em;
  border: 1px solid var(--yt-prose-line);
  text-align: left;
  vertical-align: top;
}

.yt-content-body-text th {
  background: var(--yt-prose-soft);
  font-weight: 800;
  color: var(--yt-prose-navy);
}

.yt-content-body-text img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.yt-content-body-text blockquote {
  margin: 1.4em 0;
  padding: 0.9em 1.1em;
  border-left: 4px solid #8cce8a;
  background: #f7fbfe;
  border-radius: 0 12px 12px 0;
  color: #35536e;
}

.yt-content-page > .yt-content-article > .yt-articles {
  margin-top: 72px;
  max-width: none;
}

/* —— 前後ナビ —— */
.yt-content-adjacent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 28px;
}

.yt-content-adj {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 88px;
  padding: 16px 18px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid #e4edf4;
  box-shadow: 0 5px 10px #15324a1a;
  text-decoration: none;
  color: inherit;
}

.yt-content-adj.is-prev {
  padding-left: 42px;
}

.yt-content-adj.is-next {
  padding-right: 42px;
  text-align: right;
}

/* /generator/ の .yt-related-tools-link .yt-arrow と同じ */
.yt-content-adj .yt-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #2a638c;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.yt-content-adj.is-prev .yt-arrow {
  left: 13px;
}

.yt-content-adj.is-next .yt-arrow {
  right: 13px;
}

.yt-content-adj.is-empty {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.yt-content-adj-label {
  font-size: 12px;
  font-weight: 700;
  color: #5a7084;
}

.yt-content-adj-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink, #0b1b3b);
  overflow-wrap: anywhere;
}

a.yt-content-adj:hover,
a.yt-content-adj:focus-visible {
  border-color: #b8d4e8;
}

@media (prefers-reduced-motion: no-preference) {
  a.yt-content-adj {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  }

  a.yt-content-adj:hover,
  a.yt-content-adj:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 9px 16px #15324a21;
  }
}

@media (max-width: 768px) {
  .yt-content-body-text {
    font-size: 14px;
  }

  .yt-content-body-text h2 {
    margin-top: 2.4em;
  }

  .yt-content-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .yt-content-adjacent {
    grid-template-columns: minmax(0, 1fr);
  }

  .yt-content-adj.is-empty {
    display: none;
  }

  .yt-content-adj.is-next {
    text-align: left;
  }
}
