/* 本文の共通設定。ページ別の調整方法は STYLE-GUIDE.md を参照。 */
:root {
  --content-width: 1000px;
  --content-font: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --content-size: 1rem;
  --content-leading: 1.85;
  --content-gutter: clamp(16px, 3vw, 32px);
  --content-space: clamp(32px, 5vw, 56px);
  --heading-size: 1.5rem;
  --subheading-size: 1.2rem;
  --table-size: 0.9375rem;
  --table-padding: 12px 16px;
  --table-border: #d6d3d0;
  --table-heading: #f0eeec;
  --table-stripe: #faf9f8;
}
.concept_text, #index_news { font-family: var(--content-font); font-size: var(--content-size); line-height: var(--content-leading); }
.concept_text { max-width: var(--content-width); margin-inline: auto; padding-inline: var(--content-gutter); }

.page_layout, .page_layout-left, .kaiho-archive, .single-kaiho .kaiho-content, #news_layout {
  width: calc(100% - var(--content-gutter) * 2);
  max-width: var(--content-width);
  margin: var(--content-space) auto;
  padding: 0;
  font-family: var(--content-font);
  font-size: var(--content-size);
  line-height: var(--content-leading);
  text-align: left;
  overflow-wrap: anywhere;
}
#news_layout { display: flex; gap: 28px; letter-spacing: normal; align-items: flex-start; }
#news_layout #side { flex: 0 0 220px; width: 220px; padding: 0; }
#news_layout #news_main {
  flex: 1; min-width: 0; width: auto; margin: 0; padding: 0;
  font: inherit; color: #333; border: 0; background: #fff;
}
#news_layout.no-sidebar { display: block; }
#news_layout.no-sidebar #news_main { width: 100%; }
.page_layout :is(.org_group, .memberlist_group, .standing_group, .link_group),
.member-committee-body, .member-hatsuka-body, .member-mail-body {
  width: 100%; max-width: none; margin: 0; padding: 0;
  font-family: inherit; background: transparent;
}
:is(.page_layout, .page_layout-left, #news_main, .kaiho-archive) :is(h1, h2, h3, h4) {
  height: auto; font-family: inherit; line-height: 1.5; letter-spacing: normal;
  text-align: left; overflow-wrap: anywhere;
}
:is(.page_layout, .page_layout-left, #news_main, .kaiho-archive) h2,
.kaiho-archive > h1 {
  font-size: var(--heading-size); font-weight: 700; color: #333;
  margin: 2em 0 1em; padding: 0 0 .6em; background: transparent;
  border: 0; border-bottom: 2px solid #706864;
}
:is(.page_layout, .page_layout-left, #news_main) h3 {
  font-size: var(--subheading-size); font-weight: 700; color: #333;
  margin: 2em 0 1em; padding: .55em .8em;
  background: #f4f2f0; border: 0; border-left: 4px solid #706864;
}
:is(.page_layout, .page_layout-left, #news_main) h4 { font-size: 1.0625rem; margin: 1.5em 0 .75em; }
:is(.page_layout, .page_layout-left, #news_main, .kaiho-archive) > :is(h1, h2, h3):first-child,
:is(.org_group, .standing_group, .link_group, .memberlist_group, .member-committee-body) > :is(h2, h3):first-child { margin-top: 0; }
:is(.page_layout, .page_layout-left, #news_main) p { margin: 0 0 1.25em; line-height: inherit; }
:is(.page_layout, .page_layout-left, #news_main) :is(ul, ol):not(.news_list):not(.page-numbers) {
  padding-left: 1.5em; margin: 1em 0 2em;
}
:is(.standing_group, .link_group, .committee-list) li { line-height: var(--content-leading); margin-bottom: .4em; }
.member-qr { padding: 0; margin: 0 0 2em; }
.member-body form { padding: 0; }
.post-content, .page-content { min-width: 0; }
.post-content { padding: 0; }
.content-legacy-text { font-size: inherit !important; line-height: inherit !important; font-family: inherit !important; }
.post-content img { height: auto !important; object-fit: contain; }

/* 表の基本形は全幅。多列表だけスクリプトでスクロール枠を付ける。 */
:is(.page_layout, .page_layout-left, #news_main) table {
  width: 100%; max-width: 100%; border-collapse: collapse; border-spacing: 0;
  margin: 1em 0 2em; font-family: inherit; font-size: var(--table-size);
  line-height: 1.65; background: #fff; text-align: left;
}
:is(.page_layout, .page_layout-left, #news_main) tr { display: table-row; height: auto; }
:is(.page_layout, .page_layout-left, #news_main) :is(th, td) {
  display: table-cell; height: auto; padding: var(--table-padding);
  border: 1px solid var(--table-border); text-align: left; vertical-align: top;
  font-size: inherit; overflow-wrap: anywhere; word-break: normal;
}
:is(.page_layout, .page_layout-left, #news_main) th,
#news_main .member-hatsuka-body tr:first-child td {
  background: var(--table-heading); color: #333; font-weight: 700;
}
:is(.page_layout, .page_layout-left, #news_main) tbody tr:nth-child(even) { background: var(--table-stripe); }
:is(.page_layout, .page_layout-left, #news_main) td p { margin: 0; }
:is(.page_layout, .page_layout-left, #news_main) td a { overflow-wrap: anywhere; word-break: normal; }
.cp_table th { width: 25%; }
.content-table-scroll { max-width: 100%; overflow-x: auto; margin: 1em 0 2em; }
.content-table-scroll::after { content: none; }
:is(.page_layout, .page_layout-left, #news_main) tbody { color: #333; }
.content-table-scroll:focus-visible { outline: 2px solid #706864; outline-offset: 3px; }
:is(.page_layout, .page_layout-left, #news_main) .content-table-scroll table { margin: 0; table-layout: fixed; }
.content-table-scroll table { min-width: var(--table-min-width, 520px); }
.content-table-scroll[data-columns="wide"] { --table-min-width: 880px; }
.content-table-hint { display: none; color: #666; font-size: .875rem; }
.content-table-scroll .col-role { width: 20%; }
.content-table-scroll .col-name { width: 25%; }
.content-table-scroll .col-company { width: 55%; }
.memberlist_group .col-company { width: 24%; }
.memberlist_group .col-location { width: 8%; }
.memberlist_group .col-address { width: 30%; }
.memberlist_group .col-tel { width: 12%; }
.memberlist_group .col-url { width: 26%; }
.org_group th:nth-child(1), .member-hatsuka-body tr:first-child td:nth-child(1) { width: 20%; }
.org_group th:nth-child(2), .member-hatsuka-body tr:first-child td:nth-child(2) { width: 25%; }

/* 一覧は長い記事名でも行の高さが自然に伸びる。 */
#news_main ul.news_list { padding: 0; margin: 0 0 2em; }
#news_main .news_list li { height: auto; min-height: 64px; gap: 20px; padding: 16px 12px; line-height: 1.7; align-items: baseline; }
#news_main .news_date { flex: 0 0 6.5em; font-size: .875rem; }
#news_main .news_title { min-width: 0; padding: 0; font-size: 1rem; color: #333; }
#news_main .pagination { padding: 16px 0; }
.pagination ul, .custom-pagination ul, .archive-pagination ul { flex-wrap: wrap; }
.breadcrumb { height: auto; min-height: 3em; }
.finance-pdf, .public-pdf { width: 100%; max-width: 640px; margin: 0; gap: 12px; }
.finance-pdf > br { display: none; }
.public-pdf p { margin: 0; }
.finance-pdf a, .public-pdf a { font-size: 1rem; line-height: 1.6; }
.finance-pdf a::before, .public-pdf a::before { flex-shrink: 0; background-image: url("img/pdf-icon.png"); }
.kaiho-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0; }
.kaiho-item { width: 100%; min-width: 0; margin: 0; align-items: flex-start; }
.kaiho-content { min-width: 0; }
.kaiho-archive h2.kaiho-title { font-size: var(--subheading-size); margin: 0 0 .5em; padding: 0; border: 0; }
.kaiho-pdf-link { width: 100%; max-width: 200px; height: auto; min-height: 44px; }
.single-kaiho .kaiho-content > h1 { font-size: var(--heading-size); line-height: 1.5; margin-bottom: 1em; }
.single-kaiho .kaiho-thumbnail { height: auto; margin: 24px 0; }
.single-kaiho .kaiho-thumbnail img { width: auto; height: auto; max-width: 100%; }
#news_main :is(input, select, textarea) { max-width: 100%; font-family: inherit; font-size: 1rem; box-sizing: border-box; }
#news_main input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]),
#news_main select { height: auto; min-height: 44px; padding: 8px 10px; }
#news_main textarea { width: 100%; padding: 10px; }
#news_main .wpcf7-list-item label { align-items: baseline; }

@media (max-width: 799px) {
  :root { --heading-size: 1.3rem; --subheading-size: 1.125rem; --table-padding: 10px 12px; }
  #news_layout { flex-direction: column; gap: 24px; }
  #news_layout #side { flex: auto; width: 100%; }
  #news_layout #news_main { width: 100%; }
  #news_main .news_list li { flex-direction: column; gap: 4px; }
  #news_main .news_date { flex: auto; }
  :is(.page_layout, .page_layout-left, #news_main) .cp_table :is(th, td) { display: block; width: 100%; }
  :is(.page_layout, .page_layout-left, #news_main) .cp_table td { border-top: 0; }
  .content-table-hint { display: block; }
  .kaiho-list { grid-template-columns: 1fr; }
}
@media (max-width: 399px) {
  .kaiho-item { flex-direction: column; gap: 16px; }
  .kaiho-thumbnail { flex-basis: auto; margin: 0; }
}
@media print {
  .content-table-scroll { overflow: visible; }
  .content-table-scroll table { min-width: 0; }
  .content-table-hint { display: none; }
}
