/* =========================================================
   LEGAL VIBES 予備試験論文模試 — 追加スタイル
   style.css（本体デザインシステム）の後に読み込みます。
   色・余白・角丸はすべて style.css の :root トークンを使用。
   ========================================================= */

/* 告知バーを使わないため、ヘッダー高さから除外する */
:root {
  --demo-h: 0px;

  /* 本文の淡いグレーを少し濃くする。
     元の #767c84 は白地で 4.21:1 しかなく、WCAG AA（本文 4.5:1）に届いていなかった。
     #6a7078 なら 白地 5.0:1 / 薄灰地 4.62:1 で、見た目の印象はほぼ変えずに基準を満たす。 */
  --c-text-mute: #6a7078;
}

/* ---------- 行の折り返し ----------
   「で。」「ます。」のような短い行が末尾に残るのを防ぐ。
   balance = 見出し向け（各行の長さを揃える。6行程度まで）
   pretty  = 本文向け（最終行が極端に短くなるのを避ける）
   未対応ブラウザでは通常の折り返しに戻るだけで、表示は崩れない。 */
.hero__title,
.section__title,
.cta__title,
.feature__title,
.flow__title,
.price-lead__title,
.author__name,
.audience__tag,
.faq__q {
  text-wrap: balance;
}

/* カード内の短い段落は balance のほうが揃う。
   日本語は pretty では 3〜4文字の最終行が残ってしまうため。 */
.section__lead,
.feature__text,
.audience__text,
.flow__text,
.price-lead__text,
.authors__text,
.cta__lead,
.spec__row dd {
  text-wrap: balance;
}

/* 行数の多い本文は pretty（balance は6行を超えると無効になるため） */
.hero__lead,
.faq__a p,
.spec__note {
  text-wrap: pretty;
}

/* 注意: text-wrap: balance は、そのブロックに <br> があると無効になります。
   見出しに <br class="br-sp"> を足すときは、折り返しを自分で決めきること。 */

/* 幅の狭いコンテナ（FAQ など読み物向け） */
.container--narrow {
  max-width: 760px;
}

/* ---------- ヒーローのロゴマーク ---------- */
.hero__media--mark {
  display: grid;
  place-items: center;
}
.hero__media--mark img {
  width: min(320px, 72%);
  height: auto;
  filter: drop-shadow(var(--shadow-md));
}

/* ---------- こんな方に（対象） ---------- */
.audience-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.audience {
  position: relative;
  padding: 28px 24px 26px 54px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
}
.audience:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
/* チェックマーク */
.audience::before {
  content: "";
  position: absolute;
  top: 33px;
  left: 24px;
  width: 15px;
  height: 8px;
  border-left: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: rotate(-45deg);
}
.audience__tag {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.65;
}
.audience__text {
  margin: 0;
  color: var(--c-text-mute);
  font-size: .88rem;
  line-height: 2.05;
}
@media (prefers-reduced-motion: reduce) {
  .audience { transition: none; }
  .audience:hover { transform: none; }
}

/* ---------- 料金セクション ---------- */
.price-lead {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 860px) {
  .price-lead { grid-template-columns: 1fr; }
}

/* プラン表を上に出したので、説明文は1カラムで中央寄せに */
.price-lead--single {
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--c-line);
}

/* プランに含まれる科目の注記 */
.plan__subjects {
  display: block;
  margin-top: 8px;
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 700;
}
.plan--featured .plan__subjects { color: var(--c-accent-bright); }

/* プラン表の下の共通注記 */
.plan-foot {
  margin: clamp(20px, 2.5vw, 28px) 0 0;
  color: var(--c-text-mute);
  font-size: 14px;
  line-height: 1.95;
  text-align: center;
  text-wrap: pretty;
}

.price-lead__card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
@media (max-width: 860px) {
  .price-lead__card { position: static; }
}

.price-lead__title {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--c-ink);
  margin: 0 0 20px;
}
.price-lead__text {
  color: var(--c-text);
  line-height: 1.95;
  margin: 0 0 16px;
}
.price-lead__text:last-child { margin-bottom: 0; }

/* 価格水準に触れた記載の注記（出題範囲の違い・調査時点） */
.price-lead__note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--c-line);
  color: var(--c-text-mute);
  font-size: 13px;
  line-height: 1.9;
  text-wrap: pretty;
}

/* ---------- 模試の内容（スペック表） ---------- */
.spec {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
}
.spec__list { margin: 0; }
.spec__row {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 8px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--c-line);
}
.spec__row:first-child { padding-top: 0; }
.spec__row:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 640px) {
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
}
.spec__row dt {
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: .02em;
}
.spec__row dd {
  margin: 0;
  color: var(--c-text);
}
.spec__note {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--c-line);
  color: var(--c-text-mute);
  font-size: 14px;
  line-height: 1.9;
}

/* 未確定項目のラベル */
.tbd {
  display: inline-block;
  padding: 3px 10px;
  border: 1px dashed var(--c-line-strong);
  border-radius: 999px;
  background: var(--c-bg-soft);
  color: var(--c-text-mute);
  font-size: 13px;
  letter-spacing: .02em;
}

/* ---------- 作成者 ---------- */
.authors__text {
  max-width: 760px;
  margin: 0 auto 40px;
  color: var(--c-text);
  line-height: 1.95;
  text-align: center;
}
.authors__list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.author {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.author__role {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.author__name {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.6;
}
.author__desc {
  margin: 0;
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- 申込みの流れ ---------- */
.flow {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.flow__step {
  position: relative;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 32px 24px 28px;
  box-shadow: var(--shadow-sm);
}
.flow__num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  font-family: var(--font-en);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
.flow__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.6;
}
.flow__text {
  margin: 0;
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- FAQ ---------- */
.faq {
  border-top: 1px solid var(--c-line);
}
.faq__item {
  border-bottom: 1px solid var(--c-line);
}
.faq__q {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.7;
  list-style: none;
  transition: color .2s var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 7px;
  margin-left: auto;
  border-right: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq__item[open] .faq__q::after {
  transform: rotate(-135deg);
}
.faq__q:hover { color: var(--c-accent); }
.faq__q:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}
.faq__a {
  padding: 0 28px 24px 0;
  color: var(--c-text);
  line-height: 1.95;
}
.faq__a p { margin: 0; }
.faq__a a {
  color: var(--c-accent);
  text-underline-offset: 3px;
}

/* 動きを減らす設定を尊重する */
@media (prefers-reduced-motion: reduce) {
  .faq__q,
  .faq__q::after { transition: none; }
}

/* ---------- 準備中バナー（マイページ用） ---------- */
.prep-notice {
  margin: clamp(20px, 3vw, 32px) 0 0;
  padding: 16px 20px;
  border: 1px solid #E5C07B;
  border-left: 4px solid #D9A441;
  border-radius: var(--radius);
  background: #FDF8EC;
  color: #6B5518;
  font-size: 14px;
  line-height: 1.85;
}
.prep-notice strong { color: #4A3A0F; }
.prep-notice a {
  color: var(--c-accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* ---------- テスト公開バナー（本番公開時に削除） ---------- */
.test-notice {
  margin: clamp(16px, 2.5vw, 24px) 0 0;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--c-ink);
  color: #fff;
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}
.test-notice strong { color: var(--c-accent-bright); }

/* タップ領域の確保（WCAG 2.2 目標サイズ 24px 以上）。
   フッターやナビの小さなテキストリンクは、見た目を変えずに
   padding で当たり判定だけ広げる。 */
.site-footer__nav a,
.gnav__sub a {
  display: inline-block;
  padding: 6px 2px;
  margin: -6px -2px;
}

/* テスト決済の注記（本番公開時に削除） */
.cta__note--test {
  margin-top: 6px;
  color: var(--c-accent-bright);
  font-weight: 700;
}

/* 特長が奇数個のとき、最後の1件を横幅いっぱいに */
.feature-grid--2 > .feature:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* 科目名の途中（「刑事訴／訟法」など）で折り返さないようにする。
   keep-all で漢字の連続を分割不可にし、区切りの ／ でのみ改行させる。 */
.subjects {
  word-break: keep-all;
}

/* 実施科目などの注記 */
.spec__caution {
  display: block;
  margin-top: 8px;
  color: var(--c-text-mute);
  font-size: 13px;
  line-height: 1.7;
}
