/* ==========================================================================
   namespaceキャリア（/namespace-career/general-information/）
   本文だけ namespace デザインシステムで組む。トークンは
   namespace-design-system/dist/tokens.css（namespace.co.jp の実装値）をそのまま持ち込み、
   サイト共通のヘッダー/フッター（site.css）には影響させない（.ns-root 配下のみ）。
   ルール: 色は --ns-* だけ / 章の起点はネイビー40px+ティール14pxのアクセントバー /
         紙色と淡色の交互セクション / CTA は navy ピル 1 つ / 装飾は足さない
   ========================================================================== */

.ns-root {
  /* ---- Color ---- */
  --ns-navy: #012e4c;
  --ns-ink: #223344;
  --ns-body: #445560;
  --ns-muted: #55636e;
  --ns-teal: #57afa7;
  --ns-teal-deep: #1f7881;
  --ns-teal-light: #8fd0d1;
  --ns-line: #dde4e7;
  --ns-pale: #f4f8f8;
  --ns-paper: #ffffff;

  /* ---- Typography（和文 Noto Sans JP / 欧文 Lato）---- */
  --ns-font-sans: "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, sans-serif;
  --ns-font-latin: Lato, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --ns-text-xs: 12.5px;
  --ns-text-sm: 13.5px;
  --ns-text-base: 15px;
  --ns-text-md: 16px;
  --ns-text-lg: 18px;
  --ns-text-xl: 24px;
  --ns-text-2xl: 32px;
  --ns-weight-normal: 500;
  --ns-weight-bold: 700;
  --ns-weight-heavy: 900;

  /* ---- Spacing（4px 刻み）---- */
  --ns-space-1: 4px;
  --ns-space-2: 8px;
  --ns-space-3: 12px;
  --ns-space-4: 16px;
  --ns-space-5: 24px;
  --ns-space-6: 32px;
  --ns-space-7: 48px;
  --ns-space-8: 64px;

  /* ---- Shape & elevation ---- */
  --ns-radius: 14px;
  --ns-radius-sm: 8px;
  --ns-radius-pill: 999px;
  --ns-shadow-card: 0 1px 2px rgba(2, 32, 54, 0.04), 0 8px 24px rgba(2, 32, 54, 0.06);

  font-family: var(--ns-font-sans);
  font-weight: var(--ns-weight-normal);
  font-size: var(--ns-text-md);
  line-height: 1.9;
  color: var(--ns-body);
  background: var(--ns-paper);
  -webkit-font-smoothing: antialiased;
}

/* 最終セクション（淡色）がそのまま共通フッターへ続くように、本文下の白い隙間を詰める */
.ns-page { margin-bottom: calc(-1 * var(--sp-6)); }

.ns-root a {
  color: var(--ns-teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ns-root a:hover { color: var(--ns-navy); }
.ns-root :focus-visible {
  outline: 2px solid var(--ns-teal-deep);
  outline-offset: 2px;
}

.ns-root p { margin: var(--ns-space-4) 0; overflow-wrap: anywhere; }
.ns-root strong { font-weight: var(--ns-weight-bold); color: var(--ns-ink); }

/* 本文幅は法務ページと同じ（PCでも左右に余白を残す） */
.ns-hero-inner,
.ns-section-inner { max-width: var(--width-prose); }

/* ------------------------------------------------------------------ hero */

.ns-hero {
  background: var(--ns-paper);
  padding: var(--ns-space-8) 0 var(--ns-space-7);
}
.ns-title {
  margin: 0;
  font-family: var(--ns-font-latin); /* "namespace" は Lato、和文は Noto Sans JP に落ちる */
  font-weight: var(--ns-weight-bold);
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ns-navy);
}
/* リード（原稿1行目のタグライン）とそれに続く説明 */
.ns-lead > p:first-child {
  margin: var(--ns-space-4) 0 var(--ns-space-6);
  font-size: var(--ns-text-lg);
  font-weight: var(--ns-weight-bold);
  line-height: 1.7;
  color: var(--ns-teal-deep);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.ns-lead > p { max-width: 40em; }

/* -------------------------------------------------------------- sections */

.ns-section { padding: var(--ns-space-7) 0 var(--ns-space-8); }
.ns-section--pale { background: var(--ns-pale); }
.ns-section--paper { background: var(--ns-paper); }

/* 章の起点: ネイビー40px + ティール14px の短いバー → 和文見出し（1セクションに1回） */
.ns-section h2 {
  margin: 0 0 var(--ns-space-5);
  font-size: clamp(22px, 3vw, var(--ns-text-2xl));
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ns-ink);
}
.ns-section h2::before {
  content: "";
  display: block;
  width: 54px;
  height: 6px;
  margin-bottom: var(--ns-space-4);
  background: linear-gradient(to right, var(--ns-navy) 0 40px, var(--ns-teal) 40px 54px);
}

/* 子見出し: 2×2 のタイル節点マークを先頭に */
.ns-section h3 {
  position: relative;
  margin: var(--ns-space-7) 0 var(--ns-space-4);
  padding-left: 22px;
  font-size: var(--ns-text-lg);
  line-height: 1.5;
  color: var(--ns-ink);
}
.ns-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--ns-navy), var(--ns-navy)) 0 0 / 5px 5px no-repeat,
    linear-gradient(var(--ns-teal), var(--ns-teal)) 7px 0 / 5px 5px no-repeat,
    linear-gradient(var(--ns-teal), var(--ns-teal)) 0 7px / 5px 5px no-repeat,
    linear-gradient(var(--ns-navy), var(--ns-navy)) 7px 7px / 5px 5px no-repeat;
}
.ns-section h2 + h3 { margin-top: var(--ns-space-5); }

/* ---------------------------------------------------------------- tables */

.ns-root .table-wrap { margin: var(--ns-space-4) 0; overflow-x: auto; }
.ns-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--ns-paper);
  border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius);
  box-shadow: var(--ns-shadow-card);
  overflow: hidden;
  font-size: var(--ns-text-base);
  line-height: 1.8;
}
.ns-table th,
.ns-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ns-line);
}
.ns-table tr:last-child td { border-bottom: 0; }
.ns-table th {
  background: var(--ns-pale);
  color: var(--ns-ink);
  font-size: var(--ns-text-sm);
  font-weight: var(--ns-weight-bold);
  letter-spacing: 0.02em;
}
.ns-table td:first-child {
  width: 38%;
  color: var(--ns-ink);
  font-weight: var(--ns-weight-bold);
}
.ns-table td { overflow-wrap: anywhere; }

/* 表直後の注記（消費税・返戻の例外文） */
.ns-root .table-wrap + p {
  margin-top: var(--ns-space-3);
  font-size: var(--ns-text-sm);
  color: var(--ns-muted);
}

/* ------------------------------------------------------------------- CTA */

.ns-cta { margin: var(--ns-space-6) 0 0; }
.ns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ns-space-2);
  min-width: 220px;
  border: 0;
  border-radius: var(--ns-radius-pill);
  padding: 13px 32px;
  font-family: var(--ns-font-sans);
  font-size: var(--ns-text-md);
  font-weight: var(--ns-weight-bold);
  line-height: 1.6;
  text-decoration: none;
  background: var(--ns-navy);
  color: var(--ns-paper);
  transition: opacity 0.15s ease;
}
/* .ns-root a のリンク装飾より優先させる */
.ns-root .ns-btn,
.ns-root .ns-btn:hover { color: var(--ns-paper); text-decoration: none; }
.ns-btn:hover { opacity: 0.85; }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 720px) {
  .ns-hero { padding: var(--ns-space-7) 0 var(--ns-space-6); }
  .ns-section { padding: var(--ns-space-6) 0 var(--ns-space-7); }
  .ns-section h3 { margin-top: var(--ns-space-6); }

  .ns-table { font-size: 14.5px; }
  .ns-table th,
  .ns-table td { padding: 12px 14px; }
  .ns-table td:first-child { width: 36%; }

  /* 長文セルを含む表（手数料表）は「項目 → 内容」の縦積みにして横スクロールなしで読めるようにする */
  .ns-table--stack thead { display: none; }
  .ns-table--stack tbody,
  .ns-table--stack tr,
  .ns-table--stack td { display: block; width: auto; }
  .ns-table--stack tr { padding: var(--ns-space-2) 0; border-bottom: 1px solid var(--ns-line); }
  .ns-table--stack tr:last-child { border-bottom: 0; }
  .ns-table--stack td { border-bottom: 0; padding: var(--ns-space-2) var(--ns-space-4); }
  .ns-table--stack td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: var(--ns-text-xs);
    font-weight: var(--ns-weight-bold);
    letter-spacing: 0.04em;
    color: var(--ns-teal-deep);
  }
  .ns-table--stack td:first-child { width: auto; padding-top: var(--ns-space-3); }
  .ns-table--stack td:last-child {
    padding-bottom: var(--ns-space-3);
    color: var(--ns-body);
    font-weight: var(--ns-weight-normal);
  }

  .ns-cta { text-align: center; }
  .ns-btn { width: 100%; max-width: 360px; }
}
