/* データサイエンティスト向けの区画（/ds/・/ds/exams/・/ds/exams/<id>/ だけで読む）。色は style.css の変数を使う */
.ds-note { background: var(--panel); border: 1px solid var(--line); max-width: 46rem; }
.ds-table table { min-width: 0; font-size: 0.9rem; }
.ds-table th, .ds-table td { padding: 0.55rem 0.6rem; vertical-align: top; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.ds-table thead th { background: var(--panel); font-size: 0.85rem; }
.ds-name a { font-weight: 700; }
.ds-org, .ds-sub { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-top: 0.2rem; }
.ds-state { font-weight: 700; }
.ds-open .ds-state, .ds-before .ds-state { color: var(--primary-deep); }
.ds-unknown { color: var(--muted); }
.ds-meta { font-size: 0.8rem; white-space: nowrap; }
.ds-checked, .ds-src { display: inline-block; }
/* 試験日が過ぎた行・廃止の行は灰色 */
.ds-row.is-past th, .ds-row.is-past td { background: var(--bg); color: var(--muted); }
.ds-row.is-past .ds-name a { color: var(--muted); }
.ds-row.is-past .ds-state { font-weight: 400; }
.ds-badge-past { color: var(--muted); }
.ds-res { list-style: none; padding: 0; margin: 0.4rem 0 1.2rem; display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.ds-res-item, .ds-book { padding: 0.75rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.ds-res-item p, .ds-book p { margin: 0.2rem 0; }
.ds-res-name, .ds-book-title { font-weight: 700; }
.ds-res-note { font-size: 0.92rem; line-height: 1.7; }
.ds-books { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.ds-soon { padding: 0.6rem 0.9rem; border: 1px dashed var(--line); border-radius: 6px; max-width: 46rem; }
.ds-digest { margin: 1.6rem 0; padding: 0.8rem 1rem; background: var(--panel); border-radius: 8px; max-width: 46rem; }
.ds-digest h2 { margin-top: 0.2rem; }
/* 試験ごとのページ（/ds/exams/<id>/） */
.ds-page-link { display: block; margin-top: 0.35rem; font-size: 0.82rem; font-weight: 400; }
.ds-key { margin: 0.6rem 0 1rem; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary-deep); border-radius: 8px; max-width: 46rem; }
.ds-key .ds-state { font-size: 1.15rem; }
.ds-key-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.ds-key.is-past { background: var(--bg); color: var(--muted); border-left-color: var(--line); }
.ds-key.is-past .ds-state { font-weight: 400; }
.ds-facts { max-width: 46rem; }
.ds-facts table { min-width: 0; font-size: 0.92rem; }
.ds-facts th, .ds-facts td { padding: 0.55rem 0.6rem; vertical-align: top; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.ds-facts th { width: 7.5em; background: var(--panel); font-size: 0.85rem; white-space: nowrap; }
.ds-rel { padding-left: 1.1rem; max-width: 46rem; }
.ds-rel li { margin: 0.35rem 0; }
/* スマホ幅: 表の行を縦に積む（見出しの列名を各セルの前に出す） */
@media (max-width: 40rem) {
  .ds-table table, .ds-table tbody, .ds-table tr, .ds-table th, .ds-table td { display: block; width: auto; }
  .ds-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds-table tr { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 0.8rem; background: var(--surface); }
  .ds-table th, .ds-table td { border-bottom: 0; padding: 0.35rem 0.7rem; }
  .ds-table th { padding-top: 0.6rem; }
  .ds-table td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
  .ds-table td:last-child { padding-bottom: 0.6rem; }
  .ds-meta { white-space: normal; }
  .ds-row.is-past { background: var(--bg); }
}
/* 毎朝の更新（/ds/updates/ と日付のページ） */
.dsu-note { background: var(--panel); border: 1px solid var(--line); max-width: 46rem; }
.dsu-day { margin: 1.6rem 0; }
.dsu-day h2 { font-size: 1.15rem; }
.dsu-count { display: inline-block; font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.dsu-list { list-style: none; padding: 0; margin: 0.6rem 0 1rem; display: grid; gap: 0.75rem; max-width: 46rem; }
.dsu-item { padding: 0.8rem 0.95rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.dsu-item.is-breaking { border-left: 4px solid var(--ng-fg); }
.dsu-item p { margin: 0.25rem 0; }
.dsu-title { font-size: 1.02rem; margin: 0.3rem 0 0.2rem; line-height: 1.5; }
.dsu-meta { font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.dsu-date { display: inline-block; margin-left: 0.6rem; }
.dsu-sum { line-height: 1.8; }
.dsu-points { margin: 0.3rem 0 0.3rem 1.1rem; padding: 0; font-size: 0.92rem; }
.dsu-src { font-size: 0.85rem; overflow-wrap: anywhere; }
.dsu-breaking { background: var(--ng-bg); color: var(--ng-fg); border-color: var(--ng-fg); }
.dsu-impact { margin: 0.6rem 0 0.9rem; padding: 0.6rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ng-fg); border-radius: 8px; max-width: 46rem; }
.dsu-impact[data-dsu-impact="none"] { border-left-color: var(--line); }
.dsu-impact h2, .dsu-impact h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.dsu-impact p { margin: 0.2rem 0; }
.dsu-impact-list { margin: 0.2rem 0; padding-left: 1.1rem; }
.dsu-impact-list li { margin: 0.2rem 0; }
.dsu-impact-type { background: var(--ng-bg); color: var(--ng-fg); border-color: var(--ng-fg); }
.dsu-rules { max-width: 46rem; }
.dsu-nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; margin: 1.2rem 0; }
.dsu-archive ul { padding-left: 1.1rem; }
/* 試験ごとのページの公式の数字・学び方・予定表・次の段階（2026-11-20 追加） */
.ds-ics { margin: 0.4rem 0 1rem; max-width: 46rem; }
.ds-ics a { font-weight: 700; }
.ds-fig-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.6rem; max-width: 46rem; }
.ds-fig { padding: 0.65rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.ds-fig p { margin: 0.15rem 0; }
.ds-fig-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.ds-fig-value { font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.ds-fig-meta { font-size: 0.82rem; color: var(--muted); }
.ds-grades { max-width: 46rem; }
.ds-steps { max-width: 46rem; padding-left: 1.4rem; }
.ds-steps > li { margin: 0.6rem 0; }
.ds-step { font-weight: 700; }
.ds-study-sites { padding-left: 1.1rem; margin: 0.3rem 0; }
.ds-study-sites li { margin: 0.3rem 0; }
.ds-next { margin: 0.6rem 0 0.8rem; padding: 0.65rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary-deep); border-radius: 8px; max-width: 46rem; }
.ds-level-note { max-width: 46rem; }
/* 申込みの流れ・目的別の試験の順番（/ds/roadmap/） */
.ds-apply-links a { overflow-wrap: anywhere; }
.ds-road-cta { margin: 0.8rem 0; padding: 0.65rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary-deep); border-radius: 8px; max-width: 46rem; }
.ds-road-cta a { font-weight: 700; }
.ds-route { margin-top: 1.6rem; }
.ds-road-step .ds-road-state, .ds-road-step .ds-road-fig { font-size: 0.88rem; color: var(--muted); overflow-wrap: anywhere; }
/* 毎朝の更新の近い締切 */
.dsu-upcoming { margin: 1rem 0 1.4rem; padding: 0.7rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; max-width: 46rem; }
.dsu-upcoming h2 { font-size: 1.05rem; margin-top: 0.2rem; }
.dsu-deadlines { padding-left: 1.1rem; margin: 0.4rem 0; }
.dsu-deadlines li { margin: 0.35rem 0; }
.dsu-deadline-date { display: inline-block; font-size: 0.85rem; color: var(--muted); }
.dsu-deadline.is-past { color: var(--muted); }
.dsu-deadline .ds-state { display: block; font-size: 0.92rem; }
/* 資格試験の入口と分野のページ（/exams/・/exams/<分野>/。src/lib/exams-hub.js。2026-11-21） */
.exams-field-nav ul { list-style: none; padding: 0; margin: 0.8rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.exams-field-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.3rem 0.9rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; font-size: 0.9rem; }
.exams-field-nav a:hover { background: var(--panel); }
.exams-field-nav a[aria-current="page"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); font-weight: 700; }
.exams-soon { margin: 1.2rem 0; padding: 0.8rem 1rem; background: var(--panel); border-radius: 8px; max-width: 46rem; }
.exams-soon h2 { margin-top: 0.2rem; }
.exams-soon h3 { font-size: 1rem; margin: 0.6rem 0 0.2rem; }
.exams-soon-bands { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.exams-soon-band.is-week h3 { color: var(--primary-deep); }
.exams-tag { display: inline-block; font-size: 0.75rem; line-height: 1.5; padding: 0 0.4rem; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); vertical-align: middle; }
.exams-fields { list-style: none; padding: 0; margin: 0.6rem 0 1.2rem; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.exams-field { padding: 0.8rem 0.95rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; }
.exams-field p { margin: 0.3rem 0; }
.exams-field-name { margin: 0 0 0.3rem; font-size: 1.1rem; }
.exams-field-name a { text-decoration: none; }
.exams-field-en { display: block; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.exams-field-count { font-weight: 700; }
.exams-field-label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.exams-field-next .ds-state { display: block; font-size: 0.92rem; }
.exams-field-next.is-past { color: var(--muted); }
.exams-index-group { font-weight: 700; margin: 0.6rem 0 0.2rem; }
.exams-index-list { list-style: none; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.9rem; }
.exams-index-list li:target, .exams-index-group:target { background: var(--panel); }
/* リンクにせず文字で示す公式の URL（link-mode.js の text。法務 E13）。選んでコピーできるように、長い URL も折り返す */
.ds code.url-text { word-break: break-all; user-select: all; font-size: 0.85em; }
/* 登録販売者の都道府県の表（exam-study-extra.js。2026-11-21）。選んだ行に印を付ける（JS が動くときだけ）。初期値なし */
.ds .study-pref-picker { margin: 0.6rem 0; }
.ds .study-pref-picker select { margin-left: 0.4rem; padding: 0.25rem 0.4rem; }
.ds .study-pref-picked { margin: 0.4rem 0 0; font-weight: 600; }
.ds .study-pref-row.is-picked th, .ds .study-pref-row.is-picked td { background: var(--panel); }
.study-trademark { margin-top: 1.2rem; }

/* 試験ごとの勉強のページ（2026-11-22）: 先頭の要点と、畳める詳しい説明（<details>。JS なし） */
.ds .study-glance { margin: 0.6rem 0 0.4rem; display: grid; gap: 0.35rem; max-width: 46rem; }
.ds .study-glance > div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.6rem; padding: 0.5rem 0.8rem; background: var(--panel); border-radius: 6px; }
.ds .study-glance dt { font-weight: 700; color: var(--primary-deep); }
.ds .study-glance dd { margin: 0; overflow-wrap: anywhere; }
.ds .study-fold { margin: 0.7rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); max-width: 46rem; }
.ds .study-fold > summary { cursor: pointer; font-weight: 700; color: var(--primary-deep); min-height: 2.75rem; display: flex; align-items: center; padding: 0.4rem 0.9rem; }
.ds .study-fold > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ds .study-fold[open] > summary { border-bottom: 1px solid var(--line); }
.ds .study-fold > :not(summary) { margin-left: 0.9rem; margin-right: 0.9rem; }
.ds .study-fold > .table-wrap { margin-left: 0; margin-right: 0; }
@media (max-width: 520px) {
  .ds .study-glance > div { grid-template-columns: 1fr; gap: 0.1rem; }
}
