/* =========================================
   NextWorks — サブページ共通スタイル
   terms.html / privacy.html / news.html
   ========================================= */

/* ── ページ全体レイアウト ── */
.subpage-main {
  padding-top: var(--header-h);
  min-height: calc(100vh - 300px);
}

/* ── ヒーロー（ページタイトル帯） ── */
.subpage-hero {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}

.sp-breadcrumb {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
}
.sp-breadcrumb a { color: var(--accent); }
.sp-breadcrumb a:hover { text-decoration: underline; }
.sp-breadcrumb i { font-size: 9px; color: var(--light-text); }

.sp-title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 900; color: var(--ink); line-height: 1.2;
  margin-bottom: 8px;
}

.sp-meta {
  font-size: 13px; color: var(--muted);
}

/* =========================================
   法的文書レイアウト（terms / privacy）
   ========================================= */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  padding: 56px 0 80px;
  align-items: start;
}

/* 目次 */
.doc-toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--bg-off); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.toc-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.doc-toc nav { display: flex; flex-direction: column; gap: 2px; }
.doc-toc nav a {
  font-size: 13px; color: var(--muted); padding: 5px 8px;
  border-radius: 5px; transition: all var(--ease);
  display: block; line-height: 1.5;
}
.doc-toc nav a:hover { color: var(--accent); background: var(--accent-light); }

/* 本文 */
.doc-body { min-width: 0; }

.doc-intro {
  font-size: 14px; color: var(--muted); line-height: 1.9;
  padding: 20px 24px; background: var(--bg-off);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 48px;
}

.doc-body section {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border-soft);
}
.doc-body section:last-of-type {
  border-bottom: none;
}

.doc-body h2 {
  font-size: 20px; font-weight: 900; color: var(--ink);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.art-no {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700;
  color: var(--accent); background: var(--accent-light);
  padding: 2px 10px; border-radius: 4px; flex-shrink: 0;
}

.doc-body h3 {
  font-size: 15px; font-weight: 700; color: var(--ink-soft);
  margin: 20px 0 10px;
}

.doc-body p {
  font-size: 14px; color: var(--body-text); line-height: 1.9;
  margin-bottom: 12px;
}
.doc-body p:last-child { margin-bottom: 0; }

.doc-body ol {
  list-style: decimal; padding-left: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.doc-body ol li {
  font-size: 14px; color: var(--body-text); line-height: 1.85;
}
.doc-body ol li ul {
  margin-top: 8px; padding-left: 20px; list-style: disc;
  display: flex; flex-direction: column; gap: 6px;
}
.doc-body ol li ul li {
  font-size: 13px; color: var(--muted);
}

.doc-body > section > ul,
.doc-body ul {
  padding-left: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.doc-body > section > ul li,
.doc-body ul li {
  font-size: 14px; color: var(--body-text); line-height: 1.85;
  display: flex; align-items: flex-start; gap: 10px;
  padding-left: 0;
}
.doc-body > section > ul li::before,
.doc-body ul li::before {
  content: "・"; color: var(--accent); font-weight: 700; flex-shrink: 0;
  line-height: 1.85;
}

/* 定義リスト */
.doc-dl { display: flex; flex-direction: column; gap: 0; }
.doc-dl dt {
  font-size: 14px; font-weight: 700; color: var(--ink);
  padding: 10px 14px 4px;
  background: var(--bg-off); border-top: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.doc-dl dt:first-child { border-top: none; border-radius: var(--radius) var(--radius) 0 0; }
.doc-dl dd {
  font-size: 14px; color: var(--body-text); line-height: 1.85;
  padding: 6px 14px 12px 17px;
  background: var(--bg-white); border: 1px solid var(--border); border-top: none;
  margin: 0;
}
.doc-dl dd:last-child { border-radius: 0 0 var(--radius) var(--radius); }

/* テーブル */
.doc-table-wrap {
  overflow-x: auto; margin: 12px 0;
  border-radius: var(--radius); border: 1.5px solid var(--border);
}
.doc-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.doc-table thead tr { background: var(--bg-off); }
.doc-table th {
  padding: 10px 16px; text-align: left;
  font-size: 12px; font-weight: 700; color: var(--muted);
  border-bottom: 1.5px solid var(--border); white-space: nowrap;
}
.doc-table td {
  padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
  color: var(--body-text); vertical-align: top;
}
.doc-table tbody tr:last-child td { border-bottom: none; }
.doc-table td p { margin: 0 0 6px; font-size: 14px; line-height: 1.8; }
.doc-table td p:last-child { margin-bottom: 0; }
.doc-table td .doc-list-plain {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.doc-table td .doc-list-plain:last-child { margin-bottom: 0; }
.doc-table td .doc-list-plain li {
  font-size: 13.5px; color: var(--body-text); line-height: 1.7;
  padding-left: 14px; position: relative;
}
.doc-table td .doc-list-plain li::before {
  content: "・"; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.doc-table td .doc-small-note { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 4px; }

/* コードブロック */
.doc-body pre.code-block {
  background: var(--ink); color: #d1e3ff;
  border-radius: var(--radius); padding: 16px 18px;
  font-size: 12.5px; line-height: 1.8; overflow-x: auto;
  margin: 14px 0; font-family: 'SFMono-Regular', Consolas, monospace;
}
.doc-body pre.code-block code { color: inherit; font-family: inherit; white-space: pre; }
.doc-body code.inline-code {
  background: var(--bg-gray); color: var(--accent-dark);
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.doc-body pre.ascii-diagram {
  background: var(--bg-off); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  font-size: 12px; line-height: 1.8; overflow-x: auto;
  margin: 14px 0; color: var(--body-text);
  font-family: 'SFMono-Regular', Consolas, monospace; white-space: pre;
}

/* 役割カード（開発者/運営/利用者） */
.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin: 16px 0 8px;
}
.role-card {
  background: var(--bg-off); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.role-card .role-ico {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
}
.role-card h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.role-card p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0; }

/* ステップ番号見出し */
.doc-step-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin: 24px 0 12px;
}
.doc-step-no {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: 'Inter', sans-serif;
}

/* 注意・重要ボックス */
.doc-callout {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--warn-bg); border: 1.5px solid var(--warn);
  border-radius: var(--radius); padding: 14px 16px; margin: 14px 0;
}
.doc-callout i { color: var(--warn); font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.doc-callout p { font-size: 13px; color: var(--body-text); margin: 0; line-height: 1.8; }
.doc-callout strong { color: var(--warn); }

.doc-callout.info { background: var(--accent-light); border-color: var(--accent); }
.doc-callout.info i { color: var(--accent); }
.doc-callout.info strong { color: var(--accent); }

.doc-callout.ok { background: var(--ok-bg); border-color: var(--ok); }
.doc-callout.ok i { color: var(--ok); }
.doc-callout.ok strong { color: var(--ok); }

/* FAQ（サブページ用） */
.doc-faq-list { display: flex; flex-direction: column; gap: 10px; }

/* お問い合わせボックス */
.doc-contact-box {
  background: var(--bg-off); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px;
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 14px;
}
.doc-contact-box p { font-size: 14px; color: var(--body-text); margin: 0; }
.doc-contact-box a { color: var(--accent); }
.doc-contact-box a:hover { text-decoration: underline; }

/* フッターノート */
.doc-footer-note {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.doc-footer-note p { font-size: 12px; color: var(--light-text); }

/* =========================================
   ニュース一覧レイアウト
   ========================================= */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  padding: 56px 0 80px;
  align-items: start;
}

/* フィルタータブ */
.news-filter {
  grid-column: 1 / -1;
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.nf-btn {
  padding: 7px 18px; border-radius: 5px;
  border: 1.5px solid var(--border); font-size: 13px; font-weight: 600;
  color: var(--muted); background: var(--bg-white);
  transition: all var(--ease);
}
.nf-btn:hover { border-color: var(--accent); color: var(--accent); }
.nf-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ニュース一覧 */
.news-list {
  display: flex; flex-direction: column; gap: 20px;
}

.news-card {
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 28px 22px;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent); }

.nc-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.nc-date {
  font-family: 'Inter', sans-serif; font-size: 12px; color: var(--muted); font-weight: 600;
}
.nc-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 3px;
}
.nc-tag.release { background: var(--accent-light); color: var(--accent); }
.nc-tag.update  { background: var(--ok-bg);        color: var(--ok); }
.nc-tag.info    { background: var(--bg-gray);       color: var(--muted); }

.nc-title {
  font-size: 18px; font-weight: 700; color: var(--ink);
  line-height: 1.5; margin-bottom: 10px;
}

.nc-desc {
  font-size: 14px; color: var(--muted); line-height: 1.85;
  margin-bottom: 16px;
}

.nc-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border-soft);
}
.nc-company {
  font-size: 12px; color: var(--light-text);
  display: flex; align-items: center; gap: 5px;
}
.nc-read {
  font-size: 13px; font-weight: 700; color: var(--accent);
  display: inline-flex; align-items: center; gap: 5px;
  transition: gap var(--ease);
}
.nc-read:hover { gap: 8px; }

/* メディア問い合わせボックス */
.news-media-box {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--bg-off); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  text-align: center;
}
.nmb-icon {
  width: 52px; height: 52px;
  background: var(--accent-light); color: var(--accent);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 16px;
}
.news-media-box h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.news-media-box p  { font-size: 13px; color: var(--muted); line-height: 1.8; }
.nmb-contact {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  text-align: left; display: flex; flex-direction: column; gap: 8px;
}
.nmb-contact p {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: flex-start; gap: 7px; margin: 0;
}
.nmb-contact i { color: var(--accent); flex-shrink: 0; margin-top: 3px; font-size: 11px; }

/* =========================================
   レスポンシブ
   ========================================= */
@media (max-width: 960px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 32px; padding: 40px 0 60px;
  }
  .doc-toc { position: static; }
  .news-layout {
    grid-template-columns: 1fr;
    gap: 32px; padding: 40px 0 60px;
  }
  .news-media-box { position: static; }
}

@media (max-width: 640px) {
  .subpage-hero { padding: 36px 0 28px; }
  .nc-title { font-size: 16px; }
  .doc-body h2 { font-size: 17px; }
  .news-card { padding: 20px 18px 16px; }
  .role-grid { grid-template-columns: 1fr; }
}
