/* 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 (min-width: 1100px){
  .link-grid{
    grid-template-columns: 1fr 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="digest.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;
}

/* =========================
   Mobile & Accessibility Patch (v1)
   既存の見た目を壊さず、スマホで読みやすくするための追加設定
   ========================= */

/* Base font size (avoid too small on mobile) */
html { font-size: 16px; }

/* Images: never overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Nav: allow wrapping instead of horizontal scrolling */
.global-nav {
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

/* Touch-friendly link spacing (small, but helps) */
.global-nav a {
  padding: 0.15rem 0.1rem;
}

/* Small screens */
@media (max-width: 600px) {
  main {
    padding: 1rem 0.8rem 2rem 0.8rem;
  }

  h1 {
    font-size: 1.55rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* Reduce excessive top margins on small screens */
  h2 { margin-top: 2rem; }
  h3 { margin-top: 1.4rem; }

  /* Lists: slightly tighter left padding */
  ul, ol {
    padding-left: 1.2rem;
  }
}


/* =========================
   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="digest.html"]{
  border-bottom: 2px solid var(--accent);
}

.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;
}



/* 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: 400;
  margin-bottom: 0.75rem;
}
.qa-item .a{
  margin-bottom: 0.75rem;
}
.qa-item .qa-label{
  display: inline-block;
  min-width: 1.2em;
  font-weight: 700;
}
.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; }
}


.site-footer{
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ccc;
  font-size: 0.9rem;
  color: #555;
}
