/* ===================================================================
   hokenryou.css — 保険料ページ専用スタイル（スクロール無し・全面改稿）
   Spec:
     ・PC：表は .premium-card の幅いっぱい / table-layout: fixed で均等縮小
     ・rowspan セル（2年/5年）は縦横中央、払込方法も縦中央
     ・SP：試算条件＝2列表、保険料＝プラン2段＋方法セル縦中央
   =================================================================== */

/* ------- ページトークン ------- */
:root {
  --hk-primary: #117713;
  --hk-border: #d7dfe9;
  --hk-icon-bk: #3b9ae9;
  --hk-text: #222;
  --hk-text-sub: #666;

  --hk-plan-a: #005da8;
  --hk-plan-b: #008060;
  --hk-plan-d: #6c3db4;

  --hk-radius: 0.5rem;
  --hk-focus-ring: var(--focus-ring, 3px solid rgba(0, 117, 201, 0.6));
}

/* ------- セクション土台 ------- */
.premium-examples {
  padding: 2rem 0 0;
  margin-block-start: 0;
}
.premium-examples .container {
  margin-inline: auto;
  margin-block-end: 1rem;
}
.premium-examples .section-title {
  border-left-color: var(--hk-primary);
}

/* ------- カード ------- */
.premium-card {
  background: #fff;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius);
  padding: 1.6rem 1.2rem 2rem;
  margin: 0 0 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.premium-card__title {
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.6rem);
  font-weight: 600;
  margin: 0 0 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  line-height: 1.2;
}
.premium-card__title .icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--hk-icon-bk);
  color: #fff;
}

/* ------- 表（PC）共通 ------- */
.pc-only {
  /* PC用テーブルは通常表示、SPで非表示 */
  display: table;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* ★均等縮小 */
  background: #fff;
  color: var(--hk-text);
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 1.5rem + 0.3vw, 1.8rem);
  line-height: 1.45;
}
.pc-only.equal-cols-5 col {
  width: 20%;
} /* 5列を均等に */
th,
td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--hk-border);
  vertical-align: top;
}
th {
  background: #eef3f9;
  font-weight: 700;
  text-align: left;
}
td,
th {
  overflow-wrap: anywhere;
}

/* 試算条件（PC） */
.calc-table th[scope="rowgroup"] {
  white-space: nowrap;
}

/* 保険料（PC） */
.result-table thead th {
  text-align: center;
  vertical-align: middle;
}
.result-table .sum-cell {
  font-weight: 700;
  background: #f4f6fa;
}
.result-table .period-cell {
  text-align: center;
  vertical-align: middle;
} /* ★縦横中央 */
.result-table .method-cell {
  text-align: center;
  vertical-align: middle;
} /* ★縦中央 */

.result-table td[class^="plan"] {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 700;
}
.result-table .planA {
  color: var(--hk-plan-a);
}
.result-table .planB {
  color: var(--hk-plan-b);
}
.result-table .planD {
  color: var(--hk-plan-d);
}

.plan-link {
  color: inherit;
  text-decoration: none;
}
.plan-link:hover,
.plan-link:focus {
  text-decoration: underline;
}
.plan-link:focus-visible {
  outline: var(--hk-focus-ring);
  outline-offset: 2px;
  border-radius: 0.2rem;
}

/* 注記 */
.note {
  font-size: clamp(1.4rem, 1.3rem + 0.2vw, 1.6rem);
  color: var(--hk-text-sub);
  margin: 0.6rem 0;
  line-height: 1.5;
}
.note-right {
  text-align: right;
  font-size: clamp(1.4rem, 1.3rem + 0.2vw, 1.6rem);
  color: var(--hk-text-sub);
  margin: 0.4rem 0 1rem;
}
.note-inline {
  color: #a50000;
}

/* ------- スマホ切替 ------- */
.sp-only {
  display: none;
}

@media (max-width: 767px) {
  .pc-only {
    display: none !important;
  }
  .sp-only {
    display: table;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0 0 1rem;
  }

  /* 試算条件（SP：2列表） */
  .calc-table-sp th,
  .calc-table-sp td {
    border: 1px solid var(--hk-border);
    padding: 0.8rem 0.9rem;
  }
  .calc-table-sp th {
    width: 42%;
    background: #eef3f9;
    text-align: left;
  }
  .calc-table-sp td {
    width: 58%;
  }
  .calc-table-sp .col-key {
    width: 42%;
  }
  .calc-table-sp .col-val {
    width: 58%;
  }

  /* 保険料（SP：プラン2段＋方法縦中央） */
  .result-table-sp th,
  .result-table-sp td {
    border: 1px solid var(--hk-border);
    padding: 0.8rem 0.9rem;
  }
  .result-table-sp .sum-head {
    background: #f4f6fa;
    text-align: left;
  }
  .result-table-sp .method {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
  }
  .result-table-sp .plan-name {
    white-space: nowrap;
  }
  .result-table-sp .price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
  }
  .result-table-sp .planA {
    color: var(--hk-plan-a);
  }
  .result-table-sp .planB {
    color: var(--hk-plan-b);
  }
  .result-table-sp .planD {
    color: var(--hk-plan-d);
  }

  .result-table-sp .col-method {
    width: 24%;
  }
  .result-table-sp .col-plan {
    width: 36%;
  }
  .result-table-sp .col-amount {
    width: 40%;
  }
}

/* 印刷：PCテーブルを優先印刷 */
@media print {
  .pc-only {
    display: table !important;
  }
  .sp-only {
    display: none !important;
  }
}
