/* common.css - prototype styling (minimal, shared) */

:root{
  --text: #111;
  --muted: #555;
  --border: #ddd;
  --link: #6b5b00;
  --link-hover: #3d3300;
  --cover: #ffffcc;
  --cover-soft: #fffbe6;
  --accent: #6b5b00;
  --accent-soft: #d8c97a;
}

*{ box-sizing: border-box; }

html, body{ margin: 0; padding: 0; }

body{
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 18px 56px;
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.7;
}

header{
  margin-bottom: 36px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

header h1{
  margin: 0 0 6px;
  font-size: 1.8rem;
  line-height: 1.25;
}

header p{
  margin: 0;
  color: var(--muted);
}

.global-nav{
  margin-top: 10px;
}

.global-nav a{
  margin-right: 18px;
  text-decoration: none;
  color: var(--link);
}

.global-nav a:hover{
  text-decoration: underline;
}

main{ }

section{
  margin: 0 0 44px;
}

h2{
  margin: 0 0 10px;
  font-size: 1.35rem;
}

h3{
  margin: 18px 0 8px;
  font-size: 1.08rem;
}

p{ margin: 0 0 12px; }

ul{ margin: 0 0 12px 1.2em; }

figure{
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

figure img, figure svg{
  display: block;
  width: 100%;
  height: auto;
}

figcaption{
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.see-more{
  margin-top: 6px;
}

.see-more a{
  color: var(--link);
}

footer{
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

small{ font-size: 0.9rem; }

/* Link cards (used in index positioning) */
.link-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.link-card{
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.link-card h3{
  margin-top: 0;
}

@media (min-width: 820px){
  .link-grid{
    grid-template-columns: 1fr 1fr;
  }
}

/* Media sizing: keep figures comfortable on desktop, full width on mobile */
.figure-narrow img,
.figure-narrow svg{
  width: 100%;
  height: auto;
}

@media (min-width: 820px){
  .figure-narrow{
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 820px){
  figure{
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Current page highlight in global nav */
.page-index .global-nav a[href="index.html"],
.page-digest .global-nav a[href="digest.html"],
.page-roles .global-nav a[href="roles.html"]{
  font-weight: 700;
  border-bottom: 2px solid var(--link);
  padding-bottom: 2px;
}

/* Current page highlight: gaiyo */
.page-research .global-nav a[href="research.html"]{ }
.page-research .global-nav a[href="research.html"]{ font-weight:700; border-bottom:2px solid var(--link); padding-bottom:2px; }


/* =========================
   Layout & Typography Refinement (v24)
   ========================= */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
}

h1 {
  margin-bottom: 1.2rem;
}

h2 {
  margin-top: 2.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e5e5e5;
}

h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

p {
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

ul {
  margin-bottom: 1.2rem;
}

ul li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.see-more {
  margin-top: 0.8rem;
  font-weight: 500;
}

.see-more a {
  text-decoration: none;
  border-bottom: 1px solid #999;
}

.see-more a:hover {
  border-bottom: 1px solid #000;
}

.note {
  margin-top: 0.8rem;
  color: #666;
}

.note small {
  font-size: 0.85rem;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #666;
}



/* =========================
   v25: Heading emphasis & hierarchy
   ========================= */
h2 {
  border-bottom: 3px solid #cfcfcf !important;
}

.page-research h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.7rem;
  padding-left: 0.6rem;
  border-left: 4px solid #d6d6d6;
}


/* =========================
   v37: Visual unity with handbook cover color (#FFFFCC)
   ========================= */
body{
  background: var(--cover-soft);
}

header{
  background: var(--cover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

header{ border-bottom: none; } /* override earlier border-bottom */

.global-nav a{
  color: var(--link);
}

.global-nav a:hover{
  color: var(--link-hover);
  text-decoration: underline;
}

h2{
  border-bottom: 3px solid var(--accent-soft) !important;
}

.page-index .global-nav a[href="index.html"],
.page-digest .global-nav a[href="digest.html"],
.page-roles .global-nav a[href="roles.html"],
.page-research .global-nav a[href="research.html"]{
  border-bottom: 2px solid var(--accent);
}

.page-research .global-nav a[href="research.html"]{
  font-weight: 700;
}

.intro-box{
  background: #fff;
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0 22px 0;
}

.intro-box p{ margin-bottom: 0.6rem; }
.intro-box p:last-child{ margin-bottom: 0; }

figure{
  background: #fff;
}

figcaption{
  color: #444;
}

/* researchページ：H3セクションの区切り（段階1のみ） */
.content > section + section {
  margin-top: 2.2rem;
  padding-top: 2.2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* 260302修正 */
/* researchページ：図（PCは右寄せの添え図、スマホは横幅いっぱい） */
.research-figure {
  margin: 0.4rem 0 1.4rem 1.2rem; /* 左に少し空けて本文と距離 */
  float: right;
  width: min(38%, 380px);         /* PCで大きくなりすぎない */
  text-align: left;
}

.research-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.research-figure figcaption {
  font-size: 1rem;                /* PCでは少し大きめ */
  line-height: 1.4;
  color: #555;
  margin-top: 0.5rem;
}

/* 図の回り込み解除（次のセクションに影響させない） */
.content section::after {
  content: "";
  display: block;
  clear: both;
}

/* スマホ等：回り込みをやめて縦積み */
@media (max-width: 720px) {
  .research-figure {
    float: none;
    width: 100%;
    max-width: 900px;
    margin: 1rem 0 1.4rem 0;
    text-align: center;
  }

  .research-figure figcaption {
    font-size: 0.9rem;            /* スマホは今の違和感なしサイズに寄せる */
  }
}

/* 公開情報 */
.page-meta {
  font-size: 0.85rem;
  color: #666;
  margin-top: 1.2rem;
}


/* v1.1 additions: products, symposium cards, QA page */
.product-block{
  margin-top: 1.8rem;
}
.product-flex{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}
.product-cover-link{
  display: inline-block;
  max-width: 240px;
}
.product-cover{
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.product-text p:last-child{ margin-bottom: 0; }
.sympo-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0 1.2rem;
}
.sympo-card{
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.sympo-card img{
  display:block;
  width:100%;
  height:auto;
}
.sympo-card-text{
  padding: 0.85rem 1rem 1rem;
}
.sympo-card-text p{
  margin: 0.35rem 0 0;
  color: var(--muted);
}
.sympo-card:hover strong{ text-decoration: underline; }
.qa-item{
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.qa-item .q{
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.qa-item .a{
  margin-bottom: 0.5rem;
}
.qa-item code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  word-break: break-all;
}
@media (min-width: 820px){
  .product-flex{ grid-template-columns: 240px 1fr; }
  .sympo-grid{ grid-template-columns: 1fr 1fr; }
}
