@import url("./tokens.css");

/* ============================================================
   Reset (lightweight)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-mint-deep); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Base
   ============================================================ */
body {
  font-family: var(--font-body);
  font-weight: var(--fw-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking);
  color: var(--c-ink);
  background: var(--c-cream);
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  line-height: var(--lh-head);
  color: var(--c-ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { color: var(--c-ink); }
a:not([class]) {
  color: var(--c-mint-deep);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
a:not([class]):hover { text-decoration-thickness: 2px; }
hr { border: 0; height: 1px; background: var(--c-line); margin: var(--space-6) 0; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.section {
  padding-block: var(--space-8);
}
.section--mint   { background: var(--c-mint-light); }
.section--cream  { background: var(--c-cream-deep); }
.section__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.section__title::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--c-mint-deep);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 4px var(--c-mint) inset;
  flex-shrink: 0;
}
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
.grid--5 { grid-template-columns: 1fr; }
.grid--6 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .grid--6 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--5 { grid-template-columns: repeat(5, 1fr); }
  .grid--6 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Decoration helpers
   ============================================================ */
.deco-check {
  background-image:
    repeating-linear-gradient(45deg,
      rgba(132,204,179,0.18) 0 8px,
      transparent 8px 16px);
}
.deco-dot {
  background-image:
    radial-gradient(circle, rgba(132,204,179,0.32) 1.5px, transparent 2px);
  background-size: 18px 18px;
}
.deco-wave {
  --wave-color: var(--c-mint-light);
  display: block;
  height: 24px;
  background:
    radial-gradient(circle at 12px 0, var(--c-cream) 12px, transparent 13px) 0 0 / 24px 24px;
  background-color: var(--wave-color);
}

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--c-ink);
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  flex-shrink: 0;
}
.site-header__logo img {
  height: 44px;
  width: auto;
  /* ロゴ画像は白背景PNG。改変せずに乗算合成で背景色（cream）に溶け込ませる。
     ロゴの濃色部分はそのまま、白の長方形だけ消える。 */
  mix-blend-mode: multiply;
}
.site-header__title {
  display: none;
  font-size: var(--fs-base);
  line-height: 1.3;
}
@media (min-width: 1024px) {
  .site-header__title { display: block; }
}

.site-header__nav-toggle {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px 8px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--c-mint-light);
}
.site-header__nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-mint-deep);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.site-header__nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) {
  .site-header__nav-toggle { display: none; }
}

.site-nav {
  display: none;
  width: 100%;
  background: var(--c-cream);
  border-top: 1px solid var(--c-line);
}
.site-nav[data-open="true"] { display: block; }
.site-nav__list {
  display: flex;
  flex-direction: column;
}
.site-nav__list a {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.site-nav__list a[aria-current="page"] {
  color: var(--c-mint-deep);
  background: var(--c-mint-light);
}
.site-nav__list .nav-cta a {
  color: var(--c-white);
  background: var(--c-mint-deep);
  text-align: center;
}

@media (min-width: 1024px) {
  .site-header__inner { gap: var(--space-3); }
  .site-nav {
    display: flex !important;
    width: auto;
    margin-left: auto;
    border-top: 0;
    background: transparent;
  }
  .site-nav__list { flex-direction: row; align-items: center; gap: 2px; flex-wrap: nowrap; }
  .site-nav__list li { flex-shrink: 0; }
  .site-nav__list a {
    padding: var(--space-2) var(--space-3);
    border-bottom: 0;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    white-space: nowrap;
  }
  .site-nav__list a:hover { background: var(--c-mint-light); }
  .site-nav__list a[aria-current="page"] { background: var(--c-mint-light); }
  .site-nav__list .nav-cta a {
    padding: var(--space-2) var(--space-5);
    margin-left: var(--space-2);
  }
  .site-nav__list .nav-cta a:hover {
    background: var(--c-mint-deep);
    filter: brightness(1.08);
    box-shadow: var(--shadow-md);
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: var(--space-10);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: center;
}
.hero__copy h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.3;
  margin-bottom: var(--space-4);
}
.hero__lead {
  font-size: var(--fs-lg);
  color: var(--c-ink-soft);
  margin-bottom: var(--space-5);
}
.hero__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 4px solid var(--c-mint-light);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
@media (min-width: 768px) {
  .hero__inner { grid-template-columns: 1.1fr 1fr; gap: var(--space-8); }
}

/* ============================================================
   Buttons / CTA
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, filter .15s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-mint-deep);
  color: var(--c-white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); filter: brightness(1.05); }
.btn--secondary {
  background: var(--c-white);
  color: var(--c-mint-deep);
  border: 2px solid var(--c-mint-deep);
}
.btn--secondary:hover { background: var(--c-mint-light); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--fs-lg); }

.cta-block {
  background: linear-gradient(135deg, var(--c-mint) 0%, var(--c-mint-light) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.35) 2px, transparent 3px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}
.cta-block > * { position: relative; }
.cta-block h2 {
  color: var(--c-ink);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: var(--space-3);
}
.cta-block p {
  color: var(--c-ink);
  margin-bottom: var(--space-5);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--c-white);
  border: 2px solid var(--c-mint-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform .15s, box-shadow .15s;
}
a.card { color: var(--c-ink); text-decoration: none; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-mint); }
.card h3 {
  font-size: var(--fs-h3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.card h3::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--c-mint-deep);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.card p { color: var(--c-ink-soft); font-size: 0.95rem; }

/* feature variant: 同サイズで色だけ差別化（入局案内など最重要カード用） */
.card--feature {
  border-color: var(--c-mint-deep);
  background: var(--c-mint-pale);
}
.card--feature h3::before { background: var(--c-mint-deep); }
a.card--feature:hover { border-color: var(--c-mint-deep); }

/* カード右上のアイコン */
.card { position: relative; overflow: hidden; }
.card__icon {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  width: 56px;
  height: 56px;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}
.card h3, .card p { position: relative; z-index: 2; }
.card h3 { padding-right: 56px; }

/* 背景画像付きカード（テキスト読みやすさのため低彩度・右下配置） */
.card--bg-research,
.card--bg-appointment,
.card--bg-conference,
.card--bg-history {
  background-repeat: no-repeat;
  background-position: right -10px bottom -10px;
  background-size: 55% auto;
}
.card--bg-research { background-image: url("../assets/img/image-research.png"); }
.card--bg-appointment { background-image: url("../assets/img/image-appointment.png"); }
.card--bg-conference {
  background-image: url("../assets/img/image-conference.png");
  background-size: 85% auto;
}
.card--bg-history { background-image: url("../assets/img/image-history-mini.png"); }
.card--bg-research::before,
.card--bg-appointment::before,
.card--bg-conference::before,
.card--bg-history::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--c-white) 30%, rgba(255,255,255,0.55) 100%);
  z-index: 0;
}
/* スタッフ・診察案内・医局紹介は背景を少し濃く（オーバーレイを弱く） */
.card--bg-conference::before,
.card--bg-history::before,
.card:not(.card--feature).card--bg-appointment::before {
  background: linear-gradient(to right, rgba(255,255,255,0.78) 20%, rgba(255,255,255,0.15) 100%);
}

/* ============================================================
   Page head (sub-pages)
   ============================================================ */
.page-head {
  padding-block: var(--space-8) var(--space-6);
  background: var(--c-cream-deep);
  position: relative;
  overflow: hidden;
}
/* ============================================================
   ページ全体に薄く敷く背景画像（body にクラスを当てて使用）
   ============================================================ */
.body--research::before,
.body--appointment::before,
.body--hospital::before,
.body--conference::before,
.body--history::before,
.body--aisatsu::before {
  content: "";
  position: fixed;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center right;
  background-size: auto 85vh;
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}
.body--research::before { background-image: url("../assets/img/image-research.png"); }
.body--appointment::before { background-image: url("../assets/img/image-appointment.png"); }
.body--hospital::before { background-image: url("../assets/img/image-hospital.png"); }
.body--conference::before { background-image: url("../assets/img/image-conference.png"); }
/* history は画面いっぱいに広げる（cover）、少し濃いめ */
.body--history::before {
  background-image: url("../assets/img/image-history.png");
  background-position: center center;
  background-size: cover;
  opacity: 0.32;
}
/* aisatsu も画面いっぱい（cover） */
.body--aisatsu::before {
  background-image: url("../assets/img/image-aisatsu.png");
  background-position: center center;
  background-size: cover;
}
@media (min-width: 1024px) {
  .body--research::before,
  .body--appointment::before,
  .body--hospital::before,
  .body--conference::before {
    background-size: auto 95vh;
  }
}
.page-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-4);
}
.page-head__lead {
  color: var(--c-ink);
  font-size: var(--fs-lg);
  max-width: 56ch;
}
.breadcrumb {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  margin-bottom: var(--space-3);
}
.breadcrumb a {
  color: var(--c-mint-deep);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* ============================================================
   Text + figure two-column layout (medium pages)
   ============================================================ */
.text-with-figure {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  align-items: start;
}
.text-with-figure__figure { margin: 0; }
.text-with-figure__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 4px solid var(--c-mint-light);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.text-with-figure__body p { margin-bottom: var(--space-4); }
.text-with-figure__body p:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .text-with-figure { grid-template-columns: 1.4fr 1fr; gap: var(--space-6); }
}

/* ============================================================
   Staff table (definition list)
   ============================================================ */
.staff-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.staff-table dt {
  padding: var(--space-3) var(--space-4);
  background: var(--c-mint-light);
  color: var(--c-mint-deep);
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  border-top: 1px solid var(--c-line);
}
.staff-table dt:first-child { border-top: 0; }
.staff-table dd {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--c-line);
}
@media (min-width: 768px) {
  .staff-table {
    grid-template-columns: 10rem 1fr;
  }
  .staff-table dt {
    border-top: 1px solid var(--c-line);
    border-right: 1px solid var(--c-line);
  }
  .staff-table dt:first-child,
  .staff-table dd:nth-of-type(1) { border-top: 0; }
}

/* ============================================================
   Staff group (related labs / departments)
   ============================================================ */
.staff-group {
  background: var(--c-white);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.staff-group h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-2);
  color: var(--c-mint-deep);
}
.staff-group p { color: var(--c-ink); margin: 0; }

/* ============================================================
   Hospital list (chip style)
   ============================================================ */
.hospital-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}
.hospital-list li {
  background: var(--c-white);
  border: 1px solid var(--c-mint);
  color: var(--c-mint-deep);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  font-size: 0.95rem;
}

/* ============================================================
   Emphasis box (intro / summary callout)
   ============================================================ */
.emphasis-box {
  background: var(--c-white);
  border-left: 6px solid var(--c-mint-deep);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   History (accordion via details)
   ============================================================ */
.history-item {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.history-item > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
}
.history-item > summary::-webkit-details-marker { display: none; }
.history-item > summary::before {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--c-mint-light);
  color: var(--c-mint-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: 1.2rem;
  transition: transform .2s, background .2s;
}
.history-item[open] > summary::before {
  content: "−";
  background: var(--c-mint);
  color: var(--c-white);
}
.history-item__body {
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--c-line);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
}
.history-item__body p { margin-bottom: var(--space-3); }
.history-item__body p:last-child { margin-bottom: 0; }

.text-muted { color: var(--c-ink-soft); font-size: var(--fs-sm); }

/* ============================================================
   Greeting (goaisatu) layout — photo + text
   ============================================================ */
.aisatu {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: start;
}
.aisatu__photo {
  margin: 0;
  text-align: center;
}
.aisatu__photo img {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  border: 4px solid var(--c-mint-light);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.aisatu__photo figcaption {
  margin-top: var(--space-2);
  color: var(--c-ink-soft);
  font-size: var(--fs-sm);
}
.aisatu__body p { margin-bottom: var(--space-4); }
.aisatu__body p:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .aisatu { grid-template-columns: 280px 1fr; gap: var(--space-8); }
}

/* ============================================================
   Bullet list / Numbered list
   ============================================================ */
.bullet-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.bullet-list li {
  position: relative;
  padding-left: 1.5em;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0.25em;
  top: 0.7em;
  width: 8px;
  height: 8px;
  background: var(--c-mint-deep);
  border-radius: var(--radius-pill);
}
.bullet-list--num {
  counter-reset: bl;
}
.bullet-list--num li::before {
  content: counter(bl);
  counter-increment: bl;
  top: 0.25em;
  left: 0;
  width: 1.4em;
  height: 1.4em;
  background: var(--c-mint-deep);
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.4em;
}

/* ============================================================
   Document list (PDFs)
   ============================================================ */
.doc-list {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}
.doc-list li {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: baseline;
}
.doc-list a {
  color: var(--c-mint-deep);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  font-weight: var(--fw-bold);
}
.doc-list a::before {
  content: "📄 ";
}
.doc-list__note {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
}

/* ============================================================
   Contact card (in-page emphasized contact box)
   ============================================================ */
.contact-card {
  background: var(--c-mint-pale);
  border: 2px solid var(--c-mint-deep);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.contact-card h3 {
  margin-bottom: var(--space-3);
}
.contact-card__dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-3);
}
.contact-card__dl dt {
  color: var(--c-ink-soft);
  font-weight: var(--fw-bold);
}
.contact-card__note {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  border-top: 1px dashed var(--c-line);
  padding-top: var(--space-3);
  margin: 0;
}

/* ============================================================
   Schedule table (outpatient roster)
   ============================================================ */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-3);
}
.schedule-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.schedule-table th,
.schedule-table td {
  padding: var(--space-3);
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--c-line);
  border-right: 1px solid var(--c-line);
}
.schedule-table th:last-child,
.schedule-table td:last-child { border-right: 0; }
.schedule-table tbody tr:last-child th,
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table thead th {
  background: var(--c-mint-light);
  color: var(--c-mint-deep);
  font-family: var(--font-head);
  font-weight: var(--fw-head);
}
.schedule-table tbody th {
  background: var(--c-cream-deep);
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  min-width: 4.5rem;
}

/* ============================================================
   Reference list (publications)
   ============================================================ */
.ref-list {
  padding-left: 1.4rem;
  display: grid;
  gap: var(--space-3);
}
.ref-list li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--c-ink);
}
.ref-list .doi {
  word-break: break-all;
  color: var(--c-mint-deep);
  font-size: var(--fs-sm);
}
.history-item__body h3 {
  font-size: var(--fs-h3);
  color: var(--c-mint-deep);
  margin-block: var(--space-4) var(--space-3);
}
.history-item__body h3:first-child { margin-top: 0; }

/* ============================================================
   News list (rule-separated rows)
   ============================================================ */
.news-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--c-line);
}
.news-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--c-line);
}
.news-item time {
  color: var(--c-mint-deep);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}
.news-item h3 { font-size: var(--fs-lg); }
.news-item p { color: var(--c-ink-soft); font-size: 0.95rem; }
@media (min-width: 768px) {
  .news-item { grid-template-columns: 8rem 1fr; align-items: baseline; }
}

/* ============================================================
   Badge / Tag
   ============================================================ */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--c-mint-light);
  color: var(--c-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}
.badge--mint  { background: var(--c-mint-light); color: var(--c-mint-deep); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--c-cream-deep);
  color: var(--c-ink);
  padding-block: var(--space-8) var(--space-5);
  margin-top: var(--space-10);
}
.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
.site-footer h2 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-3);
}
.site-footer__contact dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-3);
}
.site-footer__contact dt {
  color: var(--c-ink-soft);
  font-weight: var(--fw-bold);
}
.site-footer__note {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
}
.site-footer__links a {
  display: inline-block;
  padding-block: var(--space-1);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  color: var(--c-mint-deep);
}
.site-footer__copy {
  border-top: 1px solid rgba(67,48,28,0.15);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
}

/* ============================================================
   Utility
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.skip-link {
  position: absolute;
  top: -100px; left: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--c-mint-deep);
  color: var(--c-white);
  border-radius: var(--radius-pill);
  z-index: 100;
}
.skip-link:focus { top: var(--space-3); }

/* ============================================================
   Motion (entrance + reduced-motion)
   ============================================================ */
.fade-in { animation: fadeIn .6s ease-out both; }
.fade-in-delay-1 { animation: fadeIn .6s ease-out .1s both; }
.fade-in-delay-2 { animation: fadeIn .6s ease-out .2s both; }
.fade-in-delay-3 { animation: fadeIn .6s ease-out .3s both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
