/* ============================================================
   マーケティング体制診断（/diagnosis）専用
   Figma デザインなし → /faq（page-hero 縮小版）と記事内の相談バナーの見た目に合わせて作成
   色・文字サイズは style.css の :root トークンを参照する
   ============================================================ */

.dg { padding: 0 var(--gutter) 96px; }
.dg-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dg-card {
  background: #fff;
  border: 1px solid #d6e6f5;
  border-radius: var(--radius-card);
  padding: 40px 48px;
  color: var(--darktext);
}

/* ---------- 質問 ---------- */
.dg-step { font-size: var(--fs-small); font-weight: 700; color: var(--mainblue); letter-spacing: .04em; }
.dg-q {
  margin-top: 8px;
  font-family: var(--ff-noto);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  outline: none;
}
.dg-hint { margin-top: 8px; font-size: var(--fs-small); color: var(--darktext); }
.dg-options { margin-top: 28px; display: grid; gap: 12px; }
.dg-option {
  appearance: none;
  width: 100%;
  text-align: left;
  background: var(--paleblue);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 18px 22px;
  font: inherit;
  font-size: 18px;
  color: var(--darktext);
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.dg-option:hover { background: var(--lightblue); border-color: var(--btn-sub); }
.dg-option:focus-visible { outline: 3px solid var(--btn-sub); outline-offset: 2px; }
.dg-back {
  appearance: none;
  margin-top: 24px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: var(--fs-small);
  color: var(--mainblue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.dg-back--retry { margin-top: 0; }

/* ---------- 結果 ---------- */
.dg-result { display: flex; flex-direction: column; gap: 24px; }
.dg-result[hidden], .dg-card[hidden] { display: none; }
.dg-sheet__label { font-size: var(--fs-small); font-weight: 700; color: var(--mainblue); letter-spacing: .04em; }
.dg-sheet__title {
  margin-top: 8px;
  font-family: var(--ff-noto);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  outline: none;
}
.dg-sheet__desc { margin-top: 16px; font-size: var(--fs-body); line-height: 1.8; }

.dg-roles { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dg-roles > div { background: var(--paleblue); border-radius: 14px; padding: 16px 20px; }
.dg-roles dt { font-size: 12px; font-weight: 700; color: var(--mainblue); letter-spacing: .04em; }
.dg-roles dd { margin-top: 4px; font-weight: 700; color: var(--ink); line-height: 1.6; }

.dg-table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 15px; }
.dg-table th, .dg-table td { padding: 12px 0; border-top: 1px solid #d6e6f5; text-align: left; vertical-align: top; line-height: 1.6; }
.dg-table tr:last-child th, .dg-table tr:last-child td { border-bottom: 1px solid #d6e6f5; }
.dg-table th { width: 15em; padding-right: 16px; font-weight: 700; color: var(--navy); }

.dg-note { margin-top: 20px; background: var(--paleblue); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 14px 18px; font-size: 15px; line-height: 1.7; }

.dg-answers { margin-top: 20px; font-size: var(--fs-small); }
.dg-answers summary { display: block; cursor: pointer; color: var(--mainblue); text-decoration: underline; text-underline-offset: 3px; }
.dg-answers summary::-webkit-details-marker { display: none; }
.dg-answers ol { margin-top: 10px; padding-left: 1.4em; list-style: decimal; display: grid; gap: 6px; line-height: 1.6; }

/* ---------- 7項目 ---------- */
.dg-seven__title, .dg-next__title { font-family: var(--ff-noto); font-size: 22px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.dg-seven__lead { margin-top: 8px; font-size: 15px; }
.dg-seven__list { margin-top: 20px; display: grid; gap: 10px; }
.dg-seven__item { position: relative; }
.dg-seven__item input { position: absolute; top: 18px; left: 18px; width: 20px; height: 20px; accent-color: var(--cta); cursor: pointer; }
.dg-seven__item label {
  display: grid;
  gap: 2px;
  padding: 14px 18px 14px 52px;
  background: var(--paleblue);
  border-radius: 14px;
  cursor: pointer;
  line-height: 1.6;
}
.dg-seven__name { font-weight: 700; color: var(--ink); }
.dg-seven__what { font-size: 15px; }
.dg-seven__ex { font-size: var(--fs-small); color: #47617a; }
.dg-seven__item input:checked + label { background: #f6f7f9; }
.dg-seven__item input:checked + label .dg-seven__name { color: #6b7785; text-decoration: line-through; }
.dg-seven__item input:checked + label .dg-seven__what,
.dg-seven__item input:checked + label .dg-seven__ex { display: none; }
.dg-seven__sum { margin-top: 16px; font-weight: 700; color: var(--navy); }
.dg-seven__note { margin-top: 6px; font-size: 12px; color: #47617a; }

/* ---------- 操作 ---------- */
.dg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.dg-actions .btn { font-size: 16px; padding: 12px 24px; cursor: pointer; border: 0; }
.dg-copied { min-height: 1.5em; margin-top: -12px; font-size: var(--fs-small); color: var(--navy); }

.dg-next { background: var(--paleblue); }
.dg-next__text { margin-top: 8px; font-size: 15px; line-height: 1.8; }
.dg-next__btns { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.dg-next__link { font-size: 15px; color: var(--mainblue); text-decoration: underline; text-underline-offset: 3px; }

.dg-source { font-size: var(--fs-small); line-height: 1.7; }
.dg-source a { color: var(--mainblue); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 767px) {
  .dg { padding-bottom: 64px; }
  .dg-card { padding: 24px 20px; border-radius: 16px; }
  .dg-q { font-size: 19px; }
  .dg-option { font-size: 16px; padding: 14px 16px; }
  .dg-sheet__title { font-size: 21px; }
  .dg-roles { grid-template-columns: 1fr; }
  .dg-table, .dg-table tbody, .dg-table tr, .dg-table th, .dg-table td { display: block; width: auto; }
  .dg-table th { padding: 12px 0 0; border-top: 1px solid #d6e6f5; }
  .dg-table td { padding: 2px 0 12px; border-top: 0; }
  .dg-table tr:last-child th { border-bottom: 0; }
  .dg-seven__title, .dg-next__title { font-size: 19px; }
  .dg-actions .btn { width: 100%; }
  .dg-next__btns .btn { width: 100%; }
}

/* ---------- 印刷（結果を1枚で保存） ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .site-footer, .page-top, .breadcrumb, .page-hero__shapes,
  .dg-actions, .dg-copied, .dg-next, #dg-quiz, .dg-answers summary, .dg-seven__lead { display: none !important; }
  .page-hero { min-height: 0; background: #fff; }
  .page-hero__inner { padding: 0 0 8px; }
  .page-hero__title { font-size: 18px; animation: none; }
  .page-hero__lead { display: none; }
  .dg { padding: 0; }
  .dg-inner, .dg-result { gap: 10px; max-width: none; }
  .dg-card { padding: 12px 16px; border-radius: 10px; break-inside: avoid; }
  .dg-sheet__title { font-size: 18px; margin-top: 2px; }
  .dg-sheet__desc { margin-top: 6px; font-size: 11.5px; line-height: 1.6; }
  .dg-roles { margin-top: 10px; gap: 8px; }
  .dg-roles > div { padding: 8px 12px; }
  .dg-roles dd { font-size: 12px; }
  .dg-table { margin-top: 8px; font-size: 11.5px; }
  .dg-table th, .dg-table td { padding: 5px 0; }
  .dg-note { margin-top: 8px; padding: 8px 12px; font-size: 11px; }
  .dg-answers { display: none; }
  .dg-seven__title { font-size: 14px; }
  .dg-seven__list { margin-top: 8px; gap: 4px; }
  .dg-seven__item label { padding: 5px 10px 5px 34px; font-size: 11px; }
  .dg-seven__item input { top: 7px; left: 10px; width: 14px; height: 14px; }
  .dg-seven__what { font-size: 11px; }
  .dg-seven__ex { font-size: 10.5px; }
  .dg-seven__sum { margin-top: 8px; font-size: 12px; }
  .dg-seven__note, .dg-source { font-size: 9.5px; margin-top: 2px; }
}

/* 見出し帯は低くして、最初の質問を1画面目に入れる */
@media (min-width: 768px) {
  .page-hero--diagnosis { min-height: 0; }
  .page-hero--diagnosis .page-hero__inner { padding: 150px var(--gutter) 40px 64px; }
}
@media (max-width: 767px) {
  .page-hero--diagnosis { min-height: 0; }
  .page-hero--diagnosis .page-hero__inner { padding-bottom: 28px; }
}
.dg-actions .btn--light { background: #fff; }

/* 印刷はA4の幅がSP扱いになるので、PCの並びに戻して1枚に収める */
@media print {
  .page-hero--diagnosis .page-hero__inner { padding: 0 0 6px; }
  .page-hero--diagnosis > .breadcrumb { display: none; }
  .dg-roles { grid-template-columns: 1fr 1fr; }
  .dg-table { display: table; width: 100%; }
  .dg-table tbody { display: table-row-group; }
  .dg-table tr { display: table-row; }
  .dg-table th, .dg-table td { display: table-cell; padding: 5px 0; border-top: 1px solid #d6e6f5; }
  .dg-table th { width: 15em; padding-right: 12px; }
  .dg-table tr:last-child th { border-bottom: 1px solid #d6e6f5; }
  .dg-seven__title { font-size: 14px; }
  .dg-card { padding: 10px 14px; }
}
@media print {
  .page-hero--diagnosis > .breadcrumb ~ .page-hero__inner { padding: 0 0 6px !important; }
  .dg-source { display: none; }
}
