/* 「継続のITサポートデスク」ページ(page-continuous-support.php)専用。style.css の後に読み込む。
   「ご利用案内」ページ(page-guide.php)でも読み込み、.cs- のクラスを使い回す(このページだけの部品は、末尾の .gd-)。
   クラスはすべて .cs- で始め、他のページには影響しない。色・フォント・ボタン・リンク・セクションの背景は、style.css の変数と
   .section / .section--alt / .button / .text-link をそのまま使う。
   カードの見た目(線・余白・文字・上辺の金色の短い線)は、トップページの #consult のカード(sections.css の .consult__item)と同じ値。sections.css はトップ専用なので、ここに持つ */

/* 中身の幅。縦に並べ、ブロックの間隔は gap で取る */
.cs-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: calc(var(--content-width) + (var(--page-x) * 2));
  margin-inline: auto;
  padding: 72px var(--page-x);
  /* 折り返しは、文言の「|」の位置(<wbr>。inc/text.php の sbcc_phrases())だけで行う(トップの #intro と同じ考え方)。
     keep-all は <wbr> 以外の位置では折り返さない指定。overflow-wrap は、1つの文節が行に収まらない極端な幅の安全策。word-break は子に継承される */
  overflow-wrap: anywhere;
  word-break: keep-all;
}

/* 編集画面(ACF)で「|」のない長い文字列が入っても、はみ出さないための保険。折り返しは、これまでどおり文言の「|」(<wbr>)の位置で行い、
   「|」のない1つの塊が行に収まらないときだけ、その中で折り返す(上の .cs-inner からも継承されるが、本文・見出し・カード内の文字に明示しておく) */
.cs-text,
.cs-h2,
.cs-h3,
.cs-hero__title,
.cs-hero__catch,
.cs-card,
.cs-card__title,
.cs-list,
.cs-faq__q,
.cs-table th,
.cs-table td {
  overflow-wrap: anywhere;
}

/* 画面には出さず、読み上げだけに使う(表の caption) */
.cs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 冒頭 */
.cs-hero .cs-inner {
  gap: 20px;
  padding-block: 64px 72px;
}

.cs-hero__title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-wrap: balance;
}

.cs-hero__title::after,
.cs-h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-gold);
}

.cs-hero__title::after {
  margin-top: 20px;
}

/* h1 の下のキャッチコピー(h1 ではない) */
.cs-hero__catch {
  max-width: 34em;
  margin: 0;
  font-size: 19px;
  line-height: 1.85;
  text-wrap: balance;
}

.cs-hero__catch strong {
  font-weight: 700;
}

/* 本文の段落。1行が長くなりすぎないようにする */
.cs-text {
  max-width: 42em;
  margin: 0;
  font-size: 16px;
  line-height: 1.95;
  text-wrap: pretty;
}

/* 「グループウェア（Google Workspace）」は、折り返しの途中で切れないまとまりにする(狭い画面で行より長いときだけ、中で折り返す) */
.cs-keep {
  display: inline-block;
  max-width: 100%;
}

/* 文の途中のテキストリンクは、周りの文字と同じ大きさにする(.text-link は 14px) */
.cs-text .text-link {
  font-size: inherit;
}

/* 見出し */
.cs-h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-wrap: balance;
}

.cs-h2::after {
  margin-top: 16px;
}

.cs-h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-wrap: balance;
}

/* 見出し+本文のまとまり(カードに入れないもの) */
.cs-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* 箇条書き:行頭に細い横線を置く */
.cs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 42em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.85;
  text-wrap: pretty;
}

.cs-list li {
  position: relative;
  padding-left: 1.4em;
}

.cs-list li::before {
  content: "";
  position: absolute;
  top: 0.95em;
  left: 0;
  width: 0.7em;
  height: 1px;
  background: var(--color-navy);
}

/* カード:PCは2列、スマホは1列。背景は白(白のセクションの上でも、帯の上でも同じ) */
.cs-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.cs-cards--stack {
  grid-template-columns: minmax(0, 1fr);
}

.cs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px 24px;
  border: 1px solid var(--color-line-soft);
  background: var(--color-bg);
  font-size: 15px;
  line-height: 1.85;
  text-align: left;
}

.cs-card::before,
.cs-table tr::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  width: 28px;
  height: 2px;
  background: var(--color-gold);
}

.cs-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.6;
  text-wrap: balance;
}

.cs-card .cs-text,
.cs-card .cs-list {
  font-size: 15px;
  line-height: 1.9;
}

/* 料金表:PCは表。列の見出しは帯色、行は細い線で区切る */
.cs-table {
  width: 100%;
  margin: 8px 0;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.85;
}

.cs-table th,
.cs-table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--color-line-soft);
  text-align: left;
  vertical-align: top;
}

.cs-table thead th {
  border-top: 1px solid var(--color-navy);
  border-bottom: 1px solid var(--color-navy);
  background: var(--color-bg-alt);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.cs-table__plan {
  width: 9em;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.cs-table thead th:nth-child(2),
.cs-table__price {
  width: 11em;
  white-space: nowrap;
}

.cs-table thead th:nth-child(4),
.cs-table td:last-child {
  width: 10em;
}

.cs-table__price {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* よくあるご質問:見出し(h3)と本文(p) */
.cs-faq {
  width: 100%;
  border-top: 1px solid var(--color-line);
}

.cs-faq__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 4px 24px;
  border-bottom: 1px solid var(--color-line);
}

.cs-faq__q {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  text-wrap: balance;
}

.cs-faq__item .cs-text {
  font-size: 15px;
  line-height: 1.9;
}

/* ボタン(.button はアウトライン。幅と文字だけ整える) */
.cs-action {
  margin: 8px 0 0;
}

.cs-button {
  min-width: min(100%, 320px);
  padding: 16px 40px;
  font-size: 16px;
  text-align: center;
  text-wrap: balance;
}

/* 最下部の問い合わせ:中央寄せ */
.cs-section--contact .cs-inner {
  align-items: center;
  text-align: center;
}

.cs-section--contact .cs-h2::after {
  margin-inline: auto;
}

/* タブレット以下:2列のカードを1列にする。料金表は縦に積む */
@media (max-width: 768px) {
  .cs-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 表を、プランごとのカードに組み替える。列の見出しは、各セルの上に小さく添える(data-label)。元の見出し行は、読み上げ用に残して画面からは隠す */
  .cs-table,
  .cs-table tbody,
  .cs-table tr,
  .cs-table th,
  .cs-table td {
    display: block;
  }

  .cs-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .cs-table tr {
    position: relative;
    margin-bottom: 16px;
    padding: 28px 18px 18px;
    border: 1px solid var(--color-line-soft);
  }

  .cs-table th,
  .cs-table td,
  .cs-table__plan,
  .cs-table__price {
    width: auto;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .cs-table td:last-child {
    width: auto;
  }

  .cs-table td {
    padding-top: 14px;
  }

  .cs-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.6;
  }

  .cs-table__price {
    font-size: 20px;
  }
}

/* スマホ */
@media (max-width: 600px) {
  .cs-inner {
    padding-block: 48px;
  }

  .cs-hero .cs-inner {
    padding-block: 44px 52px;
  }

  .cs-hero__catch {
    font-size: 17px;
  }

  .cs-h2 {
    font-size: 23px;
  }

  .cs-h3 {
    font-size: 17px;
  }

  .cs-text,
  .cs-list {
    font-size: 15px;
    line-height: 1.9;
  }

  .cs-card {
    padding: 26px 18px 20px;
  }

  .cs-card::before,
  .cs-table tr::before {
    left: 18px;
  }

  .cs-faq__q {
    font-size: 16px;
  }

  .cs-card__title {
    font-size: 16px;
  }

  .cs-action {
    width: 100%;
  }

  .cs-button {
    width: 100%;
    padding-inline: 20px;
  }
}

/* 360px 前後の最も狭い画面:カード見出し「5. グループウェア（Google Workspace）」が1行に収まる大きさにする */
@media (max-width: 374px) {
  .cs-card__title {
    font-size: 15px;
  }
}

/* ===== 「ご利用案内」ページ(page-guide.php)。このファイルを、継続ページと同じく読み込む(functions.php) =====
   上の .cs- のクラス(見出し・本文・箇条書き・カード・料金表)をそのまま使い、ここにはこのページだけの部品を .gd- で持つ(継続ページには、.gd- の要素はない)。
   背景はすべて白で、セクションの間は、本文の列に収めた薄い線で区切る(/support/ と同じ見た目)。
   本文は、継続ページのような折り返し位置の目印(「|」)を持たないので、折り返しを /support/ と同じ考え方(文節の切れ目+語の途中で切らない)にする */

/* 継続ページの .cs-inner は、目印(<wbr>)の位置だけで折り返す指定(keep-all)。このページでは、通常の折り返しに戻し、行頭禁則を厳しくする */
.gd .cs-inner {
  line-break: strict;
  word-break: normal;
}

/* 文節の切れ目で折り返す(対応ブラウザだけ。Chrome / Edge 119 以降) */
@supports (word-break: auto-phrase) {
  .gd .cs-inner {
    word-break: auto-phrase;
  }
}

/* 漢字・カタカナ・英数字が続く1つの語(inc/guide.php の sbcc_guide_html() が包む)。語の途中では折り返さない(/support/ の .support-overview__word と同じ) */
.gd-word {
  white-space: nowrap;
}

/* セクションの間の区切り線(左右の余白の内側。/support/ と同じ線の色)。セクションと、ケーススタディ(#case)は、ページ内リンクで移動したときに上に少し余白を残す */
.gd-section + .gd-section > .cs-inner {
  background: linear-gradient(var(--color-line-soft), var(--color-line-soft)) center top / calc(100% - (var(--page-x) * 2)) 1px no-repeat;
}

.gd-section,
.gd-anchor {
  scroll-margin-top: var(--anchor-offset);
}

/* 導入の下のページ内リンク(枠線のボタン。.button)。PCは横に並べ、スマホは1列 */
.gd-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.gd-toc__link {
  min-width: 220px;
  padding: 12px 24px;
  font-size: 15px;
  text-align: center;
}

/* セクションの中の大きなまとまり(単発・継続、対応エリア・サポート方法・ケーススタディ)。見出し(H3)の下に細い線 */
.gd-part {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.gd-part__title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-line-soft);
  font-size: 21px;
}

/* 料金表は、まとまりの中では上下の余白を少し広げる */
.gd-part .cs-table {
  margin-block: 16px;
}

/* カードに入れない小見出し(料金について・お支払い方法) */
.gd-h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.6;
  text-wrap: balance;
}

/* ご利用の流れ:番号(四角の枠)と、次のステップへの縦の線 */
.gd-steps {
  display: flex;
  flex-direction: column;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.gd-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 24px;
  padding-bottom: 32px;
}

.gd-step:last-child {
  padding-bottom: 0;
}

.gd-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 24px;
  width: 1px;
  background: var(--color-line);
}

.gd-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-navy);
  background: var(--color-bg);
  color: var(--color-gold-text);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.gd-step__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-top: 9px;
}

.gd-step__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.6;
  text-wrap: balance;
}

/* ケーススタディ:3件を同じ形のカード(状況・対応・結果)で並べる。スマホ・タブレットは1列、1024px 以上で3列 */
.gd-cases {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 8px 0;
}

.gd-case {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.gd-case__label {
  margin: 12px 0 2px;
  color: var(--color-gold-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.gd-case__label:first-child {
  margin-top: 0;
}

.gd-case__value {
  margin: 0;
}

@media (min-width: 1024px) {
  .gd-cases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* スマホ */
@media (max-width: 600px) {
  .gd-toc {
    flex-direction: column;
  }

  .gd-toc__link {
    width: 100%;
    min-width: 0;
  }

  .gd-part {
    margin-top: 24px;
  }

  .gd-part__title {
    font-size: 18px;
  }

  .gd-step {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 16px;
    padding-bottom: 28px;
  }

  .gd-step:not(:last-child)::before {
    top: 40px;
    left: 20px;
  }

  .gd-step__num {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .gd-step__body {
    padding-top: 6px;
  }

  .gd-step__title {
    font-size: 16px;
  }
}
