/* ============================================================
   交通事故の弁護士費用詳細ページ ― ネクスパート法律事務所
   対象: _inc/single/single__personal--koutsujiko-fee.php
   .nx-fee 配下にのみ適用されるよう名前空間化。
   弁特あり/なしの切り替えはCSSのみ（JavaScript不使用）。
   ============================================================ */

.nx-fee {
  --nx-bg:        #FFFFFF;
  --nx-bg-tint:   #FFF5EE;
  --nx-surface:   #FFFFFF;
  --nx-ink:       #1F2A2E;
  --nx-ink-soft:  #4A5A60;
  --nx-orange:      #EA8A4F;
  --nx-orange-deep: #C96A2E;
  --nx-orange-pale: #FCEEE5;
  --nx-orange-line: #EFAF88;
  --nx-border:    #DFE9EC;
  --nx-accent:      #EA8A4F;
  --nx-accent-deep: #D9762F;
  --nx-focus:     #C96A2E;
  --nx-radius:    20px;

  background: var(--nx-bg);
  color: var(--nx-ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.nx-fee, .nx-fee *, .nx-fee *::before, .nx-fee *::after { box-sizing: inherit; }

.nx-fee__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 24px) 80px;
}

.nx-fee h1, .nx-fee h2, .nx-fee h3 {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--nx-orange-deep);
  font-weight: 600;
  line-height: 1.5;
  text-wrap: balance;
  margin: 0;
}
.nx-fee p { margin: 0; }

.nx-fee__sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Hero ---- */
.nx-fee__hero { margin-bottom: 48px; }
.nx-fee__backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nx-ink-soft);
  text-decoration: none;
  margin-bottom: 16px;
}
.nx-fee__backlink:hover { color: var(--nx-orange-deep); }
.nx-fee__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--nx-orange-deep);
  background: var(--nx-orange-pale);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.nx-fee__hero h1 {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 18px;
}
.nx-fee__lead {
  font-size: 16px;
  color: var(--nx-ink-soft);
  max-width: 620px;
}
.nx-fee__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.nx-fee__chip {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--nx-bg-tint);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--nx-ink-soft);
}
.nx-fee__chip b {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 19px;
  color: var(--nx-orange-deep);
  font-variant-numeric: tabular-nums;
}

/* ---- 弁護士紹介（ヒーロー内・写真差し込み用） ---- */
.nx-fee__heroFigure {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 16px;
  background: var(--nx-bg-tint);
  border: 1px solid var(--nx-border);
  border-radius: 12px;
}
.nx-fee__heroFigure img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--nx-surface);
  box-shadow: 0 0 0 1px var(--nx-orange-line);
}
.nx-fee__heroFigure figcaption { font-size: 13.5px; color: var(--nx-ink-soft); }
.nx-fee__heroFigure figcaption strong {
  display: block;
  font-size: 15px;
  color: var(--nx-orange-deep);
  margin-bottom: 2px;
}

/* ---- Section shell ---- */
.nx-fee__section { margin-bottom: 64px; }
.nx-fee__section-head { margin-bottom: 24px; }
.nx-fee__section-head h2 {
  font-size: clamp(21px, 3vw, 25px);
  margin-bottom: 10px;
}
.nx-fee__section-head p {
  color: var(--nx-ink-soft);
  font-size: 15px;
  max-width: 620px;
}
.nx-fee__kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--nx-orange);
  margin-bottom: 8px;
}

.nx-fee__prose { color: var(--nx-ink); font-size: 15.5px; }
.nx-fee__prose p + p { margin-top: 16px; }

/* ---- 弁特あり/なし 切り替え（CSSのみ・JS不要） ---- */
.nx-fee__switch {
  border: 0;
  padding: 6px;
  margin: 0 0 20px;
  display: flex;
  gap: 8px;
  background: var(--nx-bg-tint);
  border-radius: 999px;
}
.nx-fee__switch input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.nx-fee__switch-tab {
  flex: 1;
  text-align: center;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--nx-ink-soft);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  user-select: none;
}
.nx-fee__switch input:checked + .nx-fee__switch-tab {
  background: var(--nx-orange-deep);
  color: #fff;
  box-shadow: 0 2px 8px rgba(201,106,46,.28);
}
.nx-fee__switch input:focus-visible + .nx-fee__switch-tab {
  outline: 3px solid var(--nx-focus);
  outline-offset: 2px;
}

.nx-fee__branch { position: relative; }
.nx-fee__panel { display: block; }
/* :has() 対応ブラウザでは選択中のタブに応じてパネルを切り替え。
   非対応ブラウザでは両方が縦に並んで表示される（表示が壊れない安全な代替表示） */
.nx-fee__branch:has(#nx-fee-yes:checked) .nx-fee__panel--no { display: none; }
.nx-fee__branch:has(#nx-fee-no:checked)  .nx-fee__panel--yes { display: none; }

.nx-fee__card {
  background: var(--nx-surface);
  border: 1px solid var(--nx-orange-line);
  border-radius: 12px;
  padding: clamp(22px, 4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 2px 14px rgba(201,106,46,.06);
}
.nx-fee__card-badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--nx-orange-pale);
  color: var(--nx-orange-deep);
}
.nx-fee__card h3.nx-fee__card-title {
  font-size: 19px;
}
.nx-fee__card-sub {
  font-size: 13.5px;
  color: var(--nx-ink-soft);
  margin-top: -10px;
}

.nx-fee__rows { border-top: 1px solid var(--nx-border); }
.nx-fee__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--nx-border);
  font-size: 14.5px;
}
.nx-fee__row dt { color: var(--nx-ink-soft); font-weight: 500; }
.nx-fee__row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  color: var(--nx-orange-deep);
}
.nx-fee__row--sub dt { padding-left: 14px; font-weight: 400; }
.nx-fee__row--sub dd { font-weight: 500; color: var(--nx-ink); font-size: 13.5px; }

.nx-fee__card-note {
  font-size: 13px;
  color: var(--nx-ink-soft);
  background: var(--nx-bg-tint);
  border-radius: var(--nx-radius);
  padding: 12px 14px;
}

.nx-fee__reassure {
  font-size: 14px;
  line-height: 1.9;
}
.nx-fee__reassure p + p { margin-top: 12px; }
.nx-fee__reassure strong {
  color: var(--nx-orange-deep);
}

.nx-fee__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--nx-accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 20px;
  border-radius: var(--nx-radius);
  text-align: center;
  transition: background-color .15s ease;
}
.nx-fee__cta:hover { background: var(--nx-accent-deep); }
.nx-fee__cta:focus-visible {
  outline: 3px solid var(--nx-focus);
  outline-offset: 2px;
}
.nx-fee__cta--ghost {
  background: transparent;
  color: var(--nx-orange-deep) !important;
  border: 1px solid var(--nx-orange-line);
}
.nx-fee__cta--ghost:hover { background: var(--nx-bg-tint); }

.nx-fee__taxnote {
  font-size: 12.5px;
  color: var(--nx-ink-soft);
  margin-top: 18px;
  text-align: right;
}

/* ---- 弁特ありパネル内：弁護士費用特約とは ---- */
.nx-fee__subexplain {
  margin-top: 20px;
  background: var(--nx-bg-tint);
  border: 1px solid var(--nx-border);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 28px);
}
.nx-fee__subexplain h3 {
  font-size: 17px;
  margin-bottom: 14px;
}

/* ---- 弁護士費用 一覧（あり／なし を縦に並べたシンプル表） ---- */
.nx-fee__pricegroup + .nx-fee__pricegroup { margin-top: 28px; }
.nx-fee__pricegroup-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.nx-fee__pricegroup-head .nx-fee__card-badge { margin: 0; }
.nx-fee__pricegroup-head h3 {
  font-size: 16.5px;
}

.nx-fee__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--nx-border);
  border-radius: 10px;
  overflow: hidden;
}
.nx-fee__table caption { display: none; }
.nx-fee__table th, .nx-fee__table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--nx-border);
  vertical-align: top;
}
.nx-fee__table tbody tr:last-child th,
.nx-fee__table tbody tr:last-child td { border-bottom: none; }
.nx-fee__table tbody tr:nth-child(odd) { background: var(--nx-bg-tint); }
.nx-fee__table th[scope="row"] {
  font-weight: 500;
  color: var(--nx-ink-soft);
  width: 46%;
}
.nx-fee__table td {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--nx-orange-deep);
}
.nx-fee__table .nx-fee__group-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-orange);
  letter-spacing: .04em;
  display: block;
  margin-bottom: 2px;
}

/* ---- 他士業・依頼先との比較 ---- */
.nx-fee__compare-wrap { overflow-x: auto; }
.nx-fee__compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--nx-border);
  border-radius: 10px;
  overflow: hidden;
}
.nx-fee__compare th, .nx-fee__compare td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--nx-border);
  text-align: center;
  vertical-align: middle;
}
.nx-fee__compare thead th {
  background: var(--nx-orange-deep);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
}
.nx-fee__compare tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--nx-ink-soft);
  background: var(--nx-bg-tint);
}
.nx-fee__compare tbody tr:last-child th,
.nx-fee__compare tbody tr:last-child td { border-bottom: none; }
.nx-fee__compare td.nx-fee__compare-best {
  color: var(--nx-orange-deep);
  font-weight: 700;
}

/* ---- FAQ（アコーディオン） ---- */
.nx-fee__faq { display: flex; flex-direction: column; gap: 10px; }
.nx-fee__faq details {
  background: var(--nx-surface);
  border: 1px solid var(--nx-orange-line);
  border-radius: var(--nx-radius);
  overflow: hidden;
}
.nx-fee__faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--nx-orange-deep);
}
.nx-fee__faq summary::-webkit-details-marker { display: none; }
.nx-fee__faq summary:focus-visible {
  outline: 3px solid var(--nx-focus);
  outline-offset: -3px;
}
.nx-fee__faq .nx-fee__q-mark {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--nx-orange);
  font-size: 17px;
  line-height: 1.4;
  flex-shrink: 0;
}
.nx-fee__faq summary .nx-fee__q-text { flex: 1; }
.nx-fee__faq .nx-fee__toggle {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--nx-orange-line);
  position: relative;
  margin-top: 2px;
}
.nx-fee__faq .nx-fee__toggle::before,
.nx-fee__faq .nx-fee__toggle::after {
  content: "";
  position: absolute;
  background: var(--nx-orange);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.nx-fee__faq .nx-fee__toggle::before { width: 9px; height: 1.5px; }
.nx-fee__faq .nx-fee__toggle::after { width: 1.5px; height: 9px; transition: transform .15s ease; }
.nx-fee__faq details[open] .nx-fee__toggle::after { transform: translate(-50%, -50%) scaleY(0); }

.nx-fee__faq .nx-fee__a {
  display: flex;
  gap: 14px;
  padding: 0 20px 20px 20px;
  font-size: 14.5px;
  color: var(--nx-ink);
  line-height: 1.9;
}
.nx-fee__faq .nx-fee__a-mark {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--nx-ink-soft);
  font-size: 17px;
  flex-shrink: 0;
}
.nx-fee__faq .nx-fee__a p + p { margin-top: 10px; }
.nx-fee__faq .nx-fee__a ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}
.nx-fee__faq .nx-fee__a li { margin-bottom: 4px; }

/* ---- 最終CTA ---- */
.nx-fee__ctaband {
  background: linear-gradient(135deg, var(--nx-orange-deep) 0%, var(--nx-orange) 100%);
  border-radius: 14px;
  padding: clamp(28px, 5vw, 44px);
  color: #fff;
  text-align: center;
}
.nx-fee__ctaband h2 {
  color: #fff;
  font-size: clamp(20px, 3vw, 24px);
  margin-bottom: 10px;
}
.nx-fee__ctaband p {
  color: #EAF3FA;
  font-size: 14.5px;
  max-width: 480px;
  margin: 0 auto 24px;
}
.nx-fee__ctaband .nx-fee__ctarow {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nx-fee__ctaband .nx-fee__cta { background: var(--nx-accent); color: #fff !important; }
.nx-fee__ctaband .nx-fee__cta:hover { background: var(--nx-accent-deep); }
.nx-fee__ctaband .nx-fee__cta--ghost {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255,255,255,.6);
}
.nx-fee__ctaband .nx-fee__cta--ghost:hover { background: rgba(255,255,255,.12); }

@media (max-width: 480px) {
  .nx-fee__ctaband .nx-fee__ctarow { flex-direction: column; }
  .nx-fee__row { font-size: 13.5px; }
  .nx-fee__switch { flex-direction: column; border-radius: 14px; }
  .nx-fee__switch-tab { border-radius: 10px; }
  .nx-fee__heroFigure { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-fee * { transition: none !important; }
}
