/* ==========================================================
   ClassNK 技報 / UI renewal v2
   Scope: /hp/ja/research/rd/giho.html
   ========================================================== */

.p-giho-intro .c-section__content > p:first-child { margin-top: 0; }

/* ---------- Hero ----------
   PSCと同じ共通 c-hero / c-hero__title を使用。
   背景画像は使用せず、ページ側ではHeroの高さと背景のみ補完する。 */
.p-research-giho .p-giho-hero {
  min-height: 180px;
  display: flex;
  align-items: center;
  background: #eef3f7;
}

/* 共通Heroのタイトルレイアウト・青背景はhead_common側に任せる。
   タイトルが折り返せることだけ保証する。 */
.p-research-giho .p-giho-hero .c-hero__title h1 {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

/* ---------- Year navigation ---------- */
.p-giho-yearnav { padding-top: 28px; padding-bottom: 28px; }
.p-giho-yearnav__label { margin: 0 0 14px; font-weight: 700; }
.p-giho-yearnav__list {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0; padding: 0; list-style: none;
}
.p-giho-yearnav__list a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 76px; min-height: 42px; padding: 8px 14px;
  border: 1px solid #d5dbe1; background: #fff; text-decoration: none;
}
.p-giho-yearnav__list a:hover,
.p-giho-yearnav__list a:focus-visible { text-decoration: underline; }

/* ---------- Section titles ---------- */
.p-giho-section-title { scroll-margin-top: 96px; }
.p-giho-backnumber { margin-top: 64px; }
.p-giho-backnumber__lead { margin: 0 0 24px; }

/* ---------- Issue card ---------- */
.p-giho-issue {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid #dfe3e7;
}
.p-giho-issue__visual p { margin: 0; }
.p-giho-issue__cover {
  display: block; width: 160px; max-width: 100%; height: auto;
  border: 1px solid #d8d8d8;
}
.p-giho-issue__lang {
  margin: 0 0 7px;
  color: #596873;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
}
/* c-heading3 + u-marker-none are applied in HTML.  
   Full blue bar is softened to create hierarchy below H2. */
.p-giho-issue__title {
  margin: 0 0 10px;
  padding: 11px 14px;
  border-left: 4px solid #0068b7;
  background: #f2f7fa;
  color: #005f9f;
  overflow-wrap: anywhere;
}
.p-giho-issue__theme {
  margin: 0 0 18px;
  color: #333;
  font-size: 1rem;
  line-height: 1.65;
}
.p-giho-issue__theme-label { font-weight: 700; color: #0068b7; }

/* Primary action: full issue PDF */
.p-giho-issue__fullpdf { margin: 0 0 18px; }
.p-giho-fullpdf {
  display: inline-flex !important;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #0068b7;
  background: #fff;
  color: #0068b7;
  font-weight: 700;
  text-decoration: none;
}
.p-giho-fullpdf:hover,
.p-giho-fullpdf:focus-visible { background: #eef7fb; text-decoration: underline; }

/* Latest issue: progressive disclosure of article list */
.p-giho-articles {
  margin-top: 8px;
  border-top: 1px solid #d5dbe1;
  border-bottom: 1px solid #d5dbe1;
}
.p-giho-articles__summary {
  position: relative;
  min-height: 52px;
  padding: 15px 48px 15px 4px;
  cursor: pointer;
  list-style: none;
  color: #0068b7;
  font-weight: 700;
}
.p-giho-articles__summary::-webkit-details-marker { display: none; }
.p-giho-articles__summary::before,
.p-giho-articles__summary::after {
  content: "";
  position: absolute;
  top: 50%; right: 14px;
  width: 14px; height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}
.p-giho-articles__summary::after {
  transform: translateY(-50%) rotate(90deg);
  transition: transform .2s ease;
}
.p-giho-articles[open] > .p-giho-articles__summary::after {
  transform: translateY(-50%) rotate(0deg);
}
.p-giho-articles__summary:hover,
.p-giho-articles__summary:focus-visible { background: #f7fafc; }
.p-giho-articles__body {
  padding: 28px 28px 30px;
  background: #fbfcfd;
}

/* Magazine-like category headings inside the latest issue. */
.p-giho-articles .p-giho-issue__subtitle {
  position: relative;
  margin: 34px 0 0;
  padding: 0 0 10px 18px;
  border-bottom: 2px solid #0068b7;
  color: #16384f;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.55;
}
.p-giho-articles .p-giho-issue__subtitle:first-child { margin-top: 0; }
.p-giho-articles .p-giho-issue__subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 5px;
  height: 1.15em;
  background: #0068b7;
}

/* Article index: compact editorial list with numbering and PDF action. */
.p-giho-articles .p-giho-article-list {
  counter-reset: giho-article;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-giho-articles .p-giho-article-list li {
  counter-increment: giho-article;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 14px;
  row-gap: 4px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid #dfe6eb;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.p-giho-articles .p-giho-article-list li:last-child { border-bottom: 0; }
.p-giho-articles .p-giho-article-list li::before {
  content: counter(giho-article, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  padding-top: .15em;
  color: #7b8b96;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.p-giho-articles .p-giho-article-list li > a.c-icon--pdf-before {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
}

/* Back numbers keep the existing simple typography. */
.p-giho-archive-item .p-giho-issue__subtitle {
  margin: 24px 0 10px;
  font-size: 1.08rem;
  line-height: 1.6;
}
.p-giho-archive-item .p-giho-article-list { margin-top: 0; }
.p-giho-archive-item .p-giho-article-list li { overflow-wrap: anywhere; }
.p-giho-issue p a.c-icon--pdf-before { display: inline; white-space: nowrap; }

/* ---------- Back number accordion ---------- */
.p-giho-archive-item { border-top: 1px solid #d5dbe1; }
.p-giho-archive-item:last-child { border-bottom: 1px solid #d5dbe1; }
.p-giho-archive-item__summary {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 76px;
  padding: 17px 58px 17px 18px;
  cursor: pointer; list-style: none; background: #fff;
}
.p-giho-archive-item__summary::-webkit-details-marker { display: none; }
.p-giho-archive-item__summary::before,
.p-giho-archive-item__summary::after {
  content: ""; position: absolute; top: 50%; right: 24px;
  width: 16px; height: 2px; background: currentColor; transform: translateY(-50%);
}
.p-giho-archive-item__summary::after {
  transform: translateY(-50%) rotate(90deg); transition: transform .2s ease;
}
.p-giho-archive-item[open] > .p-giho-archive-item__summary::after {
  transform: translateY(-50%) rotate(0deg);
}
.p-giho-archive-item__summary:hover,
.p-giho-archive-item__summary:focus-visible { background: #f5f8fa; }
.p-giho-archive-item__summary:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.p-giho-archive-item__labelgroup { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.p-giho-archive-item__year { font-size: 1.2rem; font-weight: 700; line-height: 1.5; }
.p-giho-archive-item__meta { color: #596873; font-size: .92rem; font-weight: 400; }
.p-giho-archive-item__hint { color: #0068b7; font-size: .9rem; font-weight: 400; }
.p-giho-archive-item__body { padding: 0 20px 28px; }
.p-giho-archive-item .p-giho-issue {
  grid-template-columns: 140px minmax(0, 1fr); gap: 28px; padding: 28px 0;
}
.p-giho-archive-item .p-giho-issue__cover { width: 120px; }

/* ---------- 2020 / 2019 archive table ---------- */
.p-giho-archive-table { width: 100%; margin: 20px 0 8px; border-collapse: collapse; table-layout: fixed; }
.p-giho-archive-table th,
.p-giho-archive-table td { width: 50%; padding: 10px 16px; text-align: center; vertical-align: top; }
.p-giho-archive-table img {
  display: block; width: 120px; max-width: 100%; height: auto;
  margin: 0 auto; border: 1px solid #d8d8d8;
}

/* ---------- Contact / related ---------- */
.p-giho-contact { margin-top: 56px; }
.p-giho-contact address { font-style: normal; }

/* Related pages: u-bg-even is applied to the whole l-section, not an inner box. */
.p-giho-related {
  margin-top: 56px;
}
.p-giho-related__title { margin-top: 0; }
.p-giho-related__list { margin-bottom: 0; }
.p-giho-related__link { font-weight: 700; }

/* Align the page-top link to the same content width as the page. */
.p-giho-page-top {
  margin-top: 18px;
  margin-bottom: 18px;
}

@media (max-width: 767px) {
  .p-giho-yearnav__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-giho-yearnav__list a { width: 100%; }
  .p-giho-backnumber { margin-top: 48px; }
  .p-giho-issue,
  .p-giho-archive-item .p-giho-issue {
    grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 24px 0;
  }
  .p-giho-issue__cover,
  .p-giho-archive-item .p-giho-issue__cover { width: 96px; }
  .p-giho-archive-item__summary { min-height: 68px; padding: 14px 48px 14px 14px; }
  .p-giho-archive-item__summary::before,
  .p-giho-archive-item__summary::after { right: 18px; }
  .p-giho-archive-item__labelgroup { display: block; }
  .p-giho-archive-item__meta { display: block; margin-top: 2px; }
  .p-giho-archive-item__hint { display: none; }
  .p-giho-archive-item__body { padding: 0 16px 20px; }
  .p-giho-articles__body { padding: 22px 18px 24px; }
  .p-giho-articles .p-giho-article-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 10px;
    padding: 12px 0;
  }
  .p-giho-articles .p-giho-article-list li > a.c-icon--pdf-before {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin-top: 2px;
  }
  .p-giho-archive-table,
  .p-giho-archive-table tbody,
  .p-giho-archive-table tr,
  .p-giho-archive-table th,
  .p-giho-archive-table td { display: block; width: 100%; }
  .p-giho-archive-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-giho-archive-table th,
  .p-giho-archive-table td { min-width: 0; padding: 8px; }
}

@media (max-width: 520px) {
  .p-giho-issue,
  .p-giho-archive-item .p-giho-issue { display: block; }
  .p-giho-issue__visual { margin-bottom: 16px; }
  .p-giho-issue__cover,
  .p-giho-archive-item .p-giho-issue__cover { width: 104px; }
}

/* ==========================================================
   v4 adjustments
   - page-top link aligned right
   - back-number article contents use the same editorial treatment
     as the latest issue
   ========================================================== */

/* Page-top link: align to the right edge of the common container. */
.p-giho-page-top {
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

/* Back numbers: use the same "magazine contents" hierarchy as 2026. */
.p-giho-archive-item .p-giho-issue__subtitle {
  position: relative;
  margin: 34px 0 0;
  padding: 0 0 10px 18px;
  border-bottom: 2px solid #0068b7;
  color: #16384f;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.55;
}
.p-giho-archive-item .p-giho-issue__title + .p-giho-issue__fullpdf + .p-giho-issue__subtitle,
.p-giho-archive-item .p-giho-issue__subtitle:first-of-type {
  margin-top: 26px;
}
.p-giho-archive-item .p-giho-issue__subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 5px;
  height: 1.15em;
  background: #0068b7;
}

.p-giho-archive-item .p-giho-article-list {
  counter-reset: giho-article;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-giho-archive-item .p-giho-article-list li {
  counter-increment: giho-article;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 14px;
  row-gap: 4px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid #dfe6eb;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.p-giho-archive-item .p-giho-article-list li:last-child {
  border-bottom: 0;
}
.p-giho-archive-item .p-giho-article-list li::before {
  content: counter(giho-article, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  padding-top: .15em;
  color: #7b8b96;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.p-giho-archive-item .p-giho-article-list li > a.c-icon--pdf-before {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
}

/* Keep the issue body visually grouped when a year is opened. */
.p-giho-archive-item .p-giho-issue__body {
  min-width: 0;
}

@media (max-width: 767px) {
  .p-giho-archive-item .p-giho-article-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 10px;
    padding: 12px 0;
  }
  .p-giho-archive-item .p-giho-article-list li > a.c-icon--pdf-before {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin-top: 2px;
  }
}


/* ==========================================================
   v5 final overrides
   - PSC型Hero（共通 c-hero 構造）
   - 最新号／バックナンバーの目次装飾を完全共通化
   - 共通 list.css のマーカー／余白を明示的に打ち消す
   ========================================================== */

/* Magazine category heading: latest and archive use exactly the same rule. */
.p-research-giho .p-giho-issue__subtitle {
  position: relative;
  margin: 32px 0 0 !important;
  padding: 0 0 10px 18px !important;
  border-bottom: 2px solid #0068b7;
  color: #16384f;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.55;
  background: transparent !important;
}
.p-research-giho .p-giho-issue__subtitle:first-child,
.p-research-giho .p-giho-issue__fullpdf + .p-giho-issue__subtitle {
  margin-top: 24px !important;
}
.p-research-giho .p-giho-issue__subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 5px;
  height: 1.15em;
  background: #0068b7;
}

/* Magazine article index shared by latest + every back number. */
.p-research-giho ul.p-giho-article-list {
  counter-reset: giho-article;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  background: transparent !important;
}
.p-research-giho ul.p-giho-article-list > li {
  counter-increment: giho-article;
  position: relative;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 14px;
  row-gap: 4px;
  margin: 0 !important;
  padding: 14px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #dfe6eb !important;
  background: none !important;
  list-style: none !important;
  text-indent: 0 !important;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.p-research-giho ul.p-giho-article-list > li:last-child {
  border-bottom: 0 !important;
}
.p-research-giho ul.p-giho-article-list > li::before {
  content: counter(giho-article, decimal-leading-zero) !important;
  position: static !important;
  display: block !important;
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: .15em 0 0 !important;
  background: none !important;
  color: #7b8b96 !important;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
}
.p-research-giho ul.p-giho-article-list > li > a.c-icon--pdf-before {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex !important;
  align-items: center;
  justify-self: end;
  margin: 0 !important;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
}

/* Open back numbers read as editorial/magazine blocks, not legacy lists. */
.p-research-giho .p-giho-archive-item[open] .p-giho-issue__body {
  min-width: 0;
}
.p-research-giho .p-giho-archive-item[open] .p-giho-issue__title {
  margin-bottom: 10px;
}

/* Page top link: right edge of the common container. */
.p-research-giho .p-giho-page-top {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  text-align: right;
}

@media (max-width: 767px) {
  .p-research-giho .p-giho-hero {
    min-height: 120px;
  }
  .p-research-giho .p-giho-hero .c-hero__title h1 {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .p-research-giho ul.p-giho-article-list > li {
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 10px;
    padding: 12px 0 !important;
  }
  .p-research-giho ul.p-giho-article-list > li > a.c-icon--pdf-before {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin-top: 3px !important;
  }
}
