/* 経営会議付議案件レビューAI の画面のスタイル。後半にログイン・アップロード・進捗・AI質問と、スマートフォン幅の調整を置く。 */
:root {
  /* 黒を基調にした配色。色はここだけで決める */
  color-scheme: dark;
  --nx-header: #0b0b0c;
  --nx-navy: #e6e8ec;          /* 見出し・強調の文字色（元はネイビー） */
  --nx-navy-2: #2a2d33;
  --nx-blue: #4c8df6;
  --nx-blue-soft: rgba(76, 141, 246, 0.14);
  --nx-blue-text: #8db8ff;
  --nx-bg: #121212;
  --nx-card: #1b1b1d;
  --nx-surface: #232326;       /* 入力欄・ボタン・表の見出し */
  --nx-surface-2: #202023;     /* 説明欄・展開した行 */
  --nx-hover: #26282d;
  --nx-border: #34363b;
  --nx-line: #2b2d31;
  --nx-text: #e4e5e7;
  --nx-text-strong: #ffffff;
  --nx-muted: #9ca0a8;
  --nx-red: #ff6b6b;
  --nx-red-soft: rgba(255, 107, 107, 0.14);
  --nx-orange: #f5a54a;
  --nx-orange-soft: rgba(245, 165, 74, 0.14);
  --nx-yellow: #f2c94c;
  --nx-yellow-soft: rgba(242, 201, 76, 0.14);
  --nx-green: #3ecf6e;
  --nx-green-soft: rgba(62, 207, 110, 0.14);
  --nx-lime: #a3d64a;
  --nx-purple: #b48cf2;
  --nx-grey-soft: rgba(255, 255, 255, 0.06);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--nx-bg); color: var(--nx-text); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif; font-size: 14px; line-height: 1.6; }
button, select, input { font: inherit; }

/* ヘッダー（ネイビー）とメインタブ */
.nx-header { background: var(--nx-header); color: #fff; border-bottom: 1px solid var(--nx-border); }
.nx-header-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 28px 6px; gap: 16px; flex-wrap: wrap; }
.nx-brand { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.nx-header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nx-btn-primary { display: inline-block; background: var(--nx-blue); color: #fff; border: 1px solid var(--nx-blue); border-radius: 6px; padding: 7px 16px; text-decoration: none; cursor: pointer; font-weight: 600; }
.nx-btn-primary:hover { background: #3b7be8; }
.nx-btn-secondary { display: inline-block; background: var(--nx-surface); color: var(--nx-navy); border: 1px solid var(--nx-border); border-radius: 6px; padding: 7px 16px; cursor: pointer; font-weight: 600; }
.nx-version-switch, .nx-case-switch { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 6px; overflow: hidden; }
.nx-version-switch a { padding: 7px 14px; font-size: 13px; color: #cfd6e4; text-decoration: none; }
.nx-version-switch a.nx-version-on { background: var(--nx-surface); color: var(--nx-navy); font-weight: 700; }
.nx-case-switch button { background: transparent; border: 0; color: #cfd6e4; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.nx-case-switch button[aria-selected="true"] { background: var(--nx-navy-2); color: #fff; font-weight: 700; box-shadow: inset 0 -2px 0 var(--nx-blue); }
.nx-tabs { display: flex; gap: 4px; padding: 0 20px; }
.nx-tabs button { background: transparent; border: 0; color: var(--nx-muted); padding: 10px 18px 12px; cursor: pointer; font-size: 14px; border-bottom: 3px solid transparent; }
.nx-tabs button[aria-selected="true"] { color: #fff; font-weight: 700; border-bottom-color: var(--nx-blue); }
.nx-tabs button:disabled { opacity: 0.45; cursor: default; }

/* 本文 */
.nx-main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 48px; }
.nx-message { background: var(--nx-red-soft); color: var(--nx-red); border: 1px solid rgba(255, 107, 107, 0.45); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; }
.nx-card { background: var(--nx-card); border: 1px solid var(--nx-border); border-radius: 8px; padding: 16px 20px; margin-bottom: 16px; }
.nx-card-emph { border-top: 3px solid var(--nx-blue); }
.nx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-card-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--nx-navy); }
.nx-sub { font-size: 12px; font-weight: 400; color: var(--nx-muted); }
.nx-h3 { font-size: 14px; font-weight: 700; color: var(--nx-navy); margin: 16px 0 8px; }
.nx-note { color: var(--nx-muted); font-size: 12.5px; margin: 0 0 10px; }
.nx-note-inline { color: var(--nx-muted); font-size: 12px; margin-left: 10px; }
.nx-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nx-grid-2 > .nx-card { margin-bottom: 16px; }
@media (max-width: 900px) { .nx-grid-2 { grid-template-columns: 1fr; } }
.nx-link { background: none; border: 0; color: var(--nx-blue); cursor: pointer; padding: 0; font-size: 13px; text-decoration: underline; }
.nx-link:hover { color: #3b7be8; }

/* 案件情報 */
.nx-dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 0; }
.nx-dl dt { color: var(--nx-muted); }
.nx-dl dd { margin: 0; word-break: break-all; }
.nx-empty { color: var(--nx-muted); }

/* 処理ステータス */
.nx-done { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.nx-check { width: 26px; height: 26px; border-radius: 50%; background: var(--nx-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.nx-check.nx-warn { background: var(--nx-orange); }
.nx-done-sub { color: var(--nx-muted); font-size: 13px; margin: 2px 0 10px 36px; }
.nx-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-count { flex: 1 1 70px; text-align: center; border: 1px solid var(--nx-border); border-radius: 6px; padding: 6px 4px; }
.nx-count-label { display: block; font-size: 12px; font-weight: 700; }
.nx-count-value { display: block; font-size: 20px; font-weight: 700; }
.nx-count-ok .nx-count-label { color: var(--nx-green); }
.nx-count-ng .nx-count-label, .nx-count-ng .nx-count-value { color: var(--nx-red); }
.nx-count-kakunin .nx-count-label, .nx-count-kakunin .nx-count-value { color: var(--nx-orange); }
.nx-count-na .nx-count-label { color: var(--nx-muted); }
.nx-count-caption { font-size: 12px; color: var(--nx-muted); margin: 8px 0 4px; }
.nx-human { font-size: 12.5px; margin-top: 4px; }

/* 総合評価 */
.nx-score-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.nx-score { font-size: 40px; font-weight: 700; color: var(--nx-text-strong); line-height: 1; }
.nx-score-max { font-size: 16px; color: var(--nx-muted); }
.nx-rank { display: inline-block; border-radius: 14px; padding: 6px 12px; font-weight: 700; font-size: 13px; background: var(--nx-grey-soft); color: var(--nx-text); border: 1px solid var(--nx-border); }
.nx-rank-good { color: var(--nx-green); background: var(--nx-green-soft); border-color: rgba(62, 207, 110, 0.35); }
.nx-rank-lime { color: var(--nx-lime); background: rgba(163, 214, 74, 0.14); border-color: rgba(163, 214, 74, 0.35); }
.nx-rank-purple { color: var(--nx-purple); background: rgba(180, 140, 242, 0.14); border-color: rgba(180, 140, 242, 0.35); }
.nx-rank-blue { color: var(--nx-blue-text); background: var(--nx-blue-soft); border-color: rgba(76, 141, 246, 0.35); }
.nx-rank-neutral { color: var(--nx-muted); }
.nx-sev-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--nx-muted); margin: 4px 0 6px; }
.nx-sev-count { white-space: nowrap; }
.nx-comment-title { font-weight: 700; margin: 10px 0 4px; }
.nx-comment { white-space: pre-wrap; margin: 0; }
.nx-small { font-size: 12px; color: var(--nx-muted); margin-top: 8px; }

/* レーダー・軸 */
.nx-radar { display: flex; flex-direction: column; align-items: center; }
.nx-radar svg { width: 100%; max-width: 480px; height: auto; }
.nx-radar-legend { font-size: 12px; color: var(--nx-muted); text-align: center; margin-top: 2px; }
.nx-axis-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; }
.nx-axis-row { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--nx-border); padding: 2px 0; cursor: default; }
.nx-axis-score { font-weight: 700; }

/* バッジ */
.nx-badge { display: inline-block; min-width: 44px; text-align: center; border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nx-sev-critical { background: var(--nx-red-soft); color: var(--nx-red); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.6); }
.nx-sev-high { background: var(--nx-orange-soft); color: var(--nx-orange); }
.nx-sev-medium { background: var(--nx-yellow-soft); color: var(--nx-yellow); }
.nx-sev-low, .nx-sev-none { background: var(--nx-grey-soft); color: var(--nx-muted); }
/* UI-5: 重大論点の経営判断区分（A・B・C）。個別指摘の重要度（赤・橙・黄・灰の塗り）と混同しないよう、紺系の枠付きの表示にする */
.nx-cls { display: inline-block; text-align: center; border-radius: 4px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 2px solid var(--nx-navy); }
.nx-cls-A { background: var(--nx-navy); color: #111; }
.nx-cls-B { background: var(--nx-surface); color: var(--nx-navy); }
.nx-cls-C { background: var(--nx-surface); color: var(--nx-muted); border-style: dashed; border-color: var(--nx-muted); }
.nx-issue-id { font-weight: 700; color: var(--nx-navy); white-space: nowrap; }
.nx-area { white-space: normal; }
.nx-id-link { background: none; border: 0; padding: 0; color: var(--nx-blue); text-decoration: underline; cursor: pointer; font-size: 13px; white-space: nowrap; }
.nx-chip-plain { display: inline-block; margin: 0 6px 4px 0; background: var(--nx-grey-soft); color: var(--nx-muted); border-radius: 4px; padding: 1px 8px; font-size: 12px; }
/* 「重要リスク・不足事項」の説明（経営判断区分の定義） */
.nx-explain { background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 6px; padding: 10px 14px; margin: 0 0 10px; font-size: 13px; }
.nx-explain p { margin: 0 0 6px; }
.nx-explain p:last-child { margin-bottom: 0; }
.nx-explain-lead { font-weight: 700; color: var(--nx-navy); }
.nx-class-defs { margin: 4px 0 8px; padding-left: 18px; }
.nx-class-defs li { margin: 2px 0; }
.nx-judge { display: inline-block; min-width: 44px; text-align: center; border-radius: 4px; padding: 1px 8px; font-size: 12px; font-weight: 700; border: 1px solid; }
.nx-judge-NG { color: var(--nx-red); border-color: rgba(255, 107, 107, 0.45); background: var(--nx-red-soft); }
.nx-judge-kakunin { color: var(--nx-blue); border-color: rgba(76, 141, 246, 0.45); background: var(--nx-blue-soft); }
.nx-judge-OK { color: var(--nx-green); border-color: rgba(62, 207, 110, 0.45); background: var(--nx-green-soft); }
.nx-judge-na { color: var(--nx-muted); border-color: var(--nx-border); background: var(--nx-grey-soft); }
.nx-state { display: inline-block; border-radius: 4px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nx-state-open { color: var(--nx-red); background: var(--nx-red-soft); }
.nx-state-progress { color: var(--nx-orange); background: var(--nx-orange-soft); }
.nx-state-done { color: var(--nx-green); background: var(--nx-green-soft); }
.nx-state-none { color: var(--nx-muted); background: var(--nx-grey-soft); }

/* 表 */
.nx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nx-table th { text-align: left; background: var(--nx-surface); color: var(--nx-muted); font-weight: 700; font-size: 12px; padding: 8px; border-bottom: 1px solid var(--nx-border); }
.nx-th-sub { font-weight: 400; font-size: 11px; }
.nx-table td { padding: 8px; border-bottom: 1px solid var(--nx-line); vertical-align: top; }
.nx-table-click tbody tr, .nx-risk-row { cursor: pointer; }
.nx-table tbody tr:hover { background: var(--nx-hover); }
.nx-table tr.nx-selected { background: var(--nx-blue-soft); }
.nx-w-sev { width: 120px; }
.nx-w-axis { width: 160px; }
.nx-w-status { width: 120px; }
.nx-w-judge { width: 90px; }
.nx-w-id { width: 90px; }
.nx-w-issue { width: 70px; }
.nx-w-cls { width: 110px; }
.nx-w-area { width: 230px; }
/* 狭い画面では表を横にスクロールして、列を欠けさせない */
.nx-table-wrap { overflow-x: auto; }
.nx-issue-table { min-width: 720px; }
.nx-id { color: var(--nx-muted); font-size: 12px; margin-right: 6px; }
.nx-empty-row td { text-align: center; color: var(--nx-muted); padding: 18px; }

/* 主要論点の展開 */
.nx-risk-detail td { background: var(--nx-surface-2); padding: 12px 16px 16px; }
.nx-risk-grid { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
.nx-risk-grid dt { color: var(--nx-muted); font-weight: 700; font-size: 12.5px; }
.nx-risk-grid dd { margin: 0; }
.nx-chip-link { display: inline-block; margin: 0 6px 4px 0; background: var(--nx-blue-soft); color: var(--nx-blue); border: 0; border-radius: 4px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.nx-quote { margin: 0 0 6px; }
.nx-quote-src { font-weight: 700; }

/* 次に確認すべきこと */
.nx-actions { margin: 0; padding-left: 22px; }
.nx-actions li { margin: 4px 0; }
.nx-basis { color: var(--nx-muted); font-size: 12px; margin-left: 4px; }

.nx-disclaimer { display: flex; gap: 12px; align-items: flex-start; background: var(--nx-blue-soft); border: 1px solid rgba(76, 141, 246, 0.35); border-radius: 8px; padding: 12px 16px; font-size: 13px; }
.nx-disclaimer-icon { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--nx-blue); color: var(--nx-blue); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-style: italic; }

/* ② 部門 */
.nx-dept-head { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.nx-label { color: var(--nx-muted); }
.nx-case-chip { display: inline-block; background: var(--nx-grey-soft); border-radius: 4px; padding: 2px 10px; font-weight: 700; }
.nx-dept-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.nx-dept-tabs button { background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 6px; padding: 7px 18px; cursor: pointer; color: var(--nx-text); }
.nx-dept-tabs button[aria-selected="true"] { background: var(--nx-blue); border-color: var(--nx-blue); color: #fff; font-weight: 700; }
.nx-dept-tabs button.nx-pending { color: var(--nx-muted); }
.nx-info-bar { background: var(--nx-blue-soft); color: var(--nx-blue-text); border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.nx-dept-summary { margin: 0 0 12px; }
.nx-points { list-style: none; margin: 0; padding: 0; counter-reset: nx; }
.nx-points > li { position: relative; display: flex; gap: 12px; padding: 10px 0 10px 40px; border-bottom: 1px solid var(--nx-line); }
.nx-points > li::before { counter-increment: nx; content: counter(nx); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--nx-blue); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.nx-points-checks > li::before { background: var(--nx-surface); color: var(--nx-blue); border: 2px solid var(--nx-blue); }
.nx-point-body { flex: 1; }
.nx-point-tag { flex: 0 0 auto; }
.nx-pending-box { background: var(--nx-grey-soft); border-radius: 6px; padding: 12px 14px; color: var(--nx-muted); }
.nx-others { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.nx-other { border: 1px solid var(--nx-border); border-radius: 6px; padding: 10px 12px; cursor: pointer; background: var(--nx-surface); text-align: left; }
.nx-other:hover { border-color: var(--nx-blue); }
.nx-other-name { font-weight: 700; color: var(--nx-blue); }
.nx-other-count { font-size: 12.5px; color: var(--nx-muted); }
@media (max-width: 900px) { .nx-others { grid-template-columns: 1fr 1fr; } }

/* ③ サブタブ・絞り込み・ページ送り */
.nx-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--nx-border); margin-bottom: 14px; }
.nx-subtabs button { background: transparent; border: 0; padding: 8px 16px; cursor: pointer; color: var(--nx-muted); border-bottom: 3px solid transparent; }
.nx-subtabs button[aria-selected="true"] { color: var(--nx-navy); font-weight: 700; border-bottom-color: var(--nx-blue); }
.nx-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.nx-filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--nx-muted); gap: 3px; }
.nx-filters select, .nx-filters input { border: 1px solid var(--nx-border); border-radius: 6px; padding: 6px 8px; min-width: 150px; color: var(--nx-text); background: var(--nx-surface); }
.nx-filter-q { flex: 1; }
.nx-filter-q input { width: 100%; }
.nx-list-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; font-size: 13px; }
.nx-page-size select { border: 1px solid var(--nx-border); border-radius: 6px; padding: 3px 6px; }
.nx-pager { display: flex; justify-content: flex-end; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.nx-pager button { min-width: 32px; border: 1px solid var(--nx-border); background: var(--nx-surface); border-radius: 4px; padding: 3px 8px; cursor: pointer; }
.nx-pager button[aria-current="page"] { background: var(--nx-blue); color: #fff; border-color: var(--nx-blue); }
.nx-pager button:disabled { opacity: 0.4; cursor: default; }
.nx-export { display: flex; gap: 12px; margin: 8px 0; }

/* 詳細パネル */
.nx-detail-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.nx-ai-note { background: var(--nx-surface); border-left: 3px solid var(--nx-blue); padding: 6px 10px; font-size: 12.5px; color: var(--nx-muted); margin: 6px 0 12px; }
.nx-detail-grid { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; }
.nx-detail-grid dt { color: var(--nx-muted); font-weight: 700; font-size: 12.5px; }
.nx-detail-grid dd { margin: 0; }
.nx-detail-grid dd p { margin: 0 0 4px; }
.nx-section-label { grid-column: 1 / -1; font-weight: 700; color: var(--nx-navy); border-bottom: 1px solid var(--nx-border); padding-bottom: 3px; margin-top: 8px; }
.nx-match { font-size: 11.5px; color: var(--nx-green); margin-left: 6px; }
.nx-review-box { border: 1px solid var(--nx-border); border-radius: 6px; padding: 12px; margin-top: 14px; background: var(--nx-surface-2); }
.nx-review-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.nx-review-row select { border: 1px solid var(--nx-border); border-radius: 6px; padding: 6px 8px; min-width: 140px; }
.nx-review-row textarea { flex: 1; min-width: 260px; min-height: 56px; border: 1px solid var(--nx-border); border-radius: 6px; padding: 6px 8px; }
.nx-review-current { font-size: 12.5px; color: var(--nx-muted); margin-top: 6px; }
.nx-history { list-style: none; padding: 0; margin: 0; }
.nx-history li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--nx-line); padding: 8px 0; gap: 12px; }
/* 個別指摘事項一覧の問題点の要約は1行に収める（全文は詳細パネルに表示） */
#nx-f-body .nx-basis { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== ログイン・アップロード・進捗・AI質問・スマートフォン幅 ===== */
[hidden] { display: none !important; }
.nx-brand-sub { font-size: 12px; font-weight: 400; color: var(--nx-muted); margin-left: 8px; }
.nx-user { font-size: 12.5px; color: var(--nx-muted); }
.nx-name { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--nx-muted); }
.nx-name input { width: 150px; border: 1px solid var(--nx-border); border-radius: 6px; padding: 5px 8px; background: var(--nx-surface); color: var(--nx-text); }
.nx-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.nx-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.nx-btn-sm { padding: 3px 10px; font-size: 12.5px; margin-left: 4px; }
.nx-btn-block { width: 100%; margin-top: 8px; }
.nx-btn-primary:disabled, .nx-btn-secondary:disabled { opacity: 0.6; cursor: default; }
.nx-error { color: var(--nx-red); font-size: 13px; margin: 8px 0 0; }

/* ログイン */
.nx-login { display: flex; justify-content: center; padding-top: 40px; }
.nx-login-card { width: 100%; max-width: 420px; }
.nx-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--nx-muted); margin: 0 0 12px; }
.nx-field input { border: 1px solid var(--nx-border); border-radius: 6px; padding: 8px 10px; color: var(--nx-text); background: var(--nx-surface); font-size: 14px; }

/* 新規レビュー */
.nx-grid-start { align-items: start; }
.nx-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--nx-border); border-radius: 8px; background: var(--nx-surface-2); padding: 28px 16px; cursor: pointer; text-align: center; margin-bottom: 10px; }
.nx-dropzone:hover, .nx-dropzone.nx-drag { border-color: var(--nx-blue); background: var(--nx-blue-soft); }
.nx-dz-title { font-weight: 700; color: var(--nx-navy); font-size: 15px; }
.nx-dz-sub { color: var(--nx-muted); font-size: 12.5px; }
.nx-check-label { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--nx-text); }
.nx-check-label input { margin-top: 3px; }
.nx-facts { margin: 0; padding-left: 18px; font-size: 13px; }
.nx-facts li { margin: 4px 0; }
.nx-history-table { min-width: 760px; }
.nx-num { text-align: right; white-space: nowrap; }
.nx-nowrap { white-space: nowrap; }
.nx-strong { font-weight: 700; }
.nx-break { word-break: break-all; }
.nx-rank-sm { padding: 2px 8px; font-size: 12px; }

/* 進捗 */
.nx-progress { max-width: 720px; margin: 24px auto; }
.nx-progress-file { font-weight: 700; margin: 0 0 12px; word-break: break-all; }
.nx-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: st; }
.nx-steps li { position: relative; text-align: center; font-size: 12.5px; color: var(--nx-muted); padding-top: 34px; }
.nx-steps li::before { counter-increment: st; content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--nx-border); background: var(--nx-surface); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nx-steps li.nx-step-on { color: var(--nx-navy); font-weight: 700; }
.nx-steps li.nx-step-on::before { border-color: var(--nx-blue); color: var(--nx-blue); }
.nx-steps li.nx-step-done::before { content: "✓"; background: var(--nx-green); border-color: var(--nx-green); color: #fff; }
.nx-bar { height: 8px; background: var(--nx-grey-soft); border-radius: 4px; overflow: hidden; }
.nx-bar-fill { height: 100%; width: 0; background: var(--nx-blue); transition: width 0.4s; }

/* 表（狭い画面では横にスクロール） */
.nx-min-560 { min-width: 560px; }
.nx-min-640 { min-width: 640px; }
.nx-clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* AI質問 */
.nx-chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 0 12px; }
.nx-msg { white-space: pre-wrap; word-break: break-word; border-radius: 8px; padding: 10px 14px; max-width: 88%; font-size: 13.5px; }
.nx-msg-user { align-self: flex-end; background: var(--nx-blue); color: #fff; }
.nx-msg-bot { align-self: flex-start; background: var(--nx-surface); border: 1px solid var(--nx-border); }
.nx-chat-form { display: flex; gap: 10px; align-items: flex-end; }
.nx-chat-form textarea { flex: 1; min-height: 64px; border: 1px solid var(--nx-border); border-radius: 6px; padding: 8px 10px; font: inherit; }

/* スマートフォン幅（〜600px）: 余白を詰め、横に並ぶものを縦にする。表は .nx-table-wrap の中で横にスクロールする */
@media (max-width: 600px) {
  .nx-header-top { padding: 10px 16px 4px; }
  .nx-brand-sub { display: block; margin-left: 0; }
  .nx-tabs { padding: 0 8px; overflow-x: auto; }
  .nx-tabs button { padding: 10px 10px 12px; white-space: nowrap; font-size: 13px; }
  .nx-main { padding: 16px 16px 40px; }
  .nx-card { padding: 14px 14px; }
  .nx-dl { grid-template-columns: 90px 1fr; }
  .nx-axis-list { grid-template-columns: 1fr; }
  .nx-risk-grid, .nx-detail-grid { grid-template-columns: 1fr; gap: 2px 0; }
  .nx-risk-grid dd, .nx-detail-grid dd { margin-bottom: 8px; }
  .nx-others { grid-template-columns: 1fr; }
  .nx-filters select, .nx-filters input { min-width: 0; width: 100%; }
  .nx-filters label { flex: 1 1 140px; }
  .nx-steps li { font-size: 11px; }
  .nx-chat-form { flex-direction: column; align-items: stretch; }
  .nx-review-row textarea { min-width: 0; width: 100%; }
}
