.programs-page {
  background: #fff;
}
.programs-page .site-header { background: rgba(255,255,255,.97); }
.programs-page .page-hero {
  background-image:
    linear-gradient(90deg, rgba(0,63,48,.94) 0%, rgba(0,63,48,.86) 42%, rgba(0,63,48,.48) 74%, rgba(0,63,48,.12) 100%),
    url("images/tomoe24-hero-programs-v1.png");
}
.programs-page .page-hero__eyebrow,
.programs-page .section-kicker { color: var(--gold); }
.programs-page .page-hero__lead { color: rgba(255,255,255,.9); }

.programs-thesis { background: var(--paper); }
.programs-thesis__grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: start;
  gap: clamp(48px, 8vw, 110px);
}
.programs-thesis__copy { padding-top: 18px; }
.programs-thesis__copy p { max-width: 36em; }
.programs-thesis__copy p:last-child { margin-bottom: 0; }
.programs-thesis__statement {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.65;
}
.programs-thesis__statement::before {
  content: "";
  display: block;
  width: 52px;
  height: 2px;
  margin-bottom: 30px;
  background: var(--gold);
}

.activity-index { padding: 34px 0; border-block: 1px solid var(--line); background: #f4f7f4; }
.activity-index__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.activity-index a {
  min-height: 78px;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-right: 1px solid var(--line);
  color: var(--green-deep);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.activity-index a:last-child { border-right: 0; }
.activity-index a span:last-child { color: var(--green); transition: color .2s ease, transform .2s ease; }
.activity-index a:hover,
.activity-index a:focus-visible { background: #e9f2ec; color: var(--green-deep); }
.activity-index a:hover span:last-child,
.activity-index a:focus-visible span:last-child { color: var(--green-deep); transform: translateY(4px); }
.activity-index a:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 3px; }

.activity-chapter { background: var(--paper); }
.activity-chapter--support { background: #fff; }
.activity-chapter--choice { background: #fff; }
.activity-chapter__head {
  margin-bottom: 58px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.activity-chapter__head > div { max-width: 860px; }
.activity-chapter__head h2 {
  margin: 0 0 12px;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.55;
}
.activity-chapter__head h2::before {
  display: block;
  width: 44px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--gold);
  content: "";
}
.activity-chapter__head p:last-child { max-width: 48em; margin-bottom: 0; color: var(--muted); }

/* Each article owns its columns; figures must not inherit browser margins. */
.activity-feature__image,
.activity-card__image { margin: 0; min-width: 0; }
.activity-feature > *,
.activity-card > * { min-width: 0; }

.activity-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 24px 32px;
  padding: 24px;
  align-items: stretch;
  background: var(--white);
  border-top: 2px solid var(--green);
}
.activity-feature__image {
  position: relative;
  grid-row: 1 / span 2;
  min-height: 480px;
  overflow: hidden;
}
.activity-feature__image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.activity-feature__body {
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.activity-feature__body > * { flex-shrink: 0; }
.activity-feature .activity-no { margin-bottom: 6px; font-size: 29px; }
.activity-feature .activity-title { margin-bottom: 12px; font-size: clamp(27px, 2.3vw, 32px); line-height: 1.4; }
.activity-feature .activity-lead { margin-bottom: 14px; font-size: 17px; line-height: 1.8; }
.activity-feature .activity-life { margin-top: auto; padding: 16px 18px 18px; }
.activity-feature .activity-life h4 { margin-bottom: 6px; font-size: 16px; }
.activity-feature .activity-life p { font-size: 17px; line-height: 1.8; }
.activity-no { margin-bottom: 12px; color: var(--green); font-family: "Cormorant Garamond", Georgia, serif; font-size: 34px; line-height: 1; }
.activity-title {
  margin-bottom: 18px;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 600;
  line-height: 1.5;
}
.activity-lead { margin-bottom: 28px; color: var(--muted); }
.activity-life {
  margin: 28px 0 0;
  padding: 22px 24px 24px;
  border-left: 3px solid var(--green);
  /* Keep the supporting panel warm, without the yellow cast of the shared ivory. */
  background: #fbf8f2;
}
.activity-life h4 { margin-bottom: 8px; color: var(--green-deep); font-size: 17px; }
.activity-life p { margin-bottom: 0; }

.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; margin-top: 58px; }
.activity-card { min-width: 0; padding-top: 24px; border-top: 1px solid rgba(0,86,63,.35); }
.activity-grid--support .activity-card { display: flex; flex-direction: column; padding: 24px; border-top: 2px solid var(--green); background: #fff; }
.activity-grid--support .activity-life { min-height: 160px; margin-top: auto; }
.activity-card__image { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0 0 26px; overflow: hidden; background: var(--ivory); }
.activity-card__image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.activity-card .activity-title { font-size: 28px; }
.activity-card .activity-lead { margin-bottom: 20px; }

.machine-list {
  grid-column: 1 / -1;
  margin: 0;
  padding: 3px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--green);
  list-style: none;
}
.machine-list li { padding: 18px 20px; background: #fff; }
.machine-list strong { display: block; color: var(--green-deep); font-size: 16px; }
.machine-list span { display: block; margin-top: 3px; color: var(--muted); font-size: 16px; line-height: 1.8; }

.activity-feature--power-mag { margin-top: clamp(88px, 8vw, 118px); }
.activity-feature--power-mag .activity-feature__image img { object-position: 58% center; }
.activity-kicker {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 18px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--gold);
  color: var(--green-deep);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .12em;
}

.professional-note { margin-top: 24px; border: 1px solid var(--line); background: #fff; }
.professional-note summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  color: var(--green-deep);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  list-style: none;
}
.professional-note summary::-webkit-details-marker { display: none; }
.professional-note__action { flex: 0 0 auto; color: var(--green); font-size: 16px; font-weight: 700; white-space: nowrap; }
.professional-note__when-open { display: none; }
.professional-note[open] .professional-note__when-closed { display: none; }
.professional-note[open] .professional-note__when-open { display: inline; }
.professional-note summary:hover,
.professional-note[open] summary { background: var(--green-soft); color: var(--green); }
.professional-note summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.professional-note__body { padding: 0 16px 18px; color: var(--muted); font-size: 16px; }
.professional-note__body dl { margin: 0; }
.professional-note__body div { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.professional-note__body dt { color: var(--green-deep); font-weight: 700; }
.professional-note__body dd { margin: 0; }
.professional-note--feature {
  grid-column: 2 / 3;
  grid-row: 2;
  margin: 0;
}

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.choice-card { padding: 36px; border: 1px solid var(--line); border-top: 2px solid var(--gold); background: #fff; }
.choice-card .activity-title { font-size: 28px; }

.programs-closing { background: var(--green-deep); color: var(--white); }
.programs-closing__inner { max-width: 800px; }
.programs-closing h2 {
  margin-bottom: 30px;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.75;
}
.programs-closing h2::before { content: ""; display: block; width: 48px; height: 1px; margin-bottom: 28px; background: var(--gold); }
.programs-closing p { color: rgba(255,255,255,.83); }

/* Stack before the text column becomes too narrow. */
@media (max-width: 1100px) {
  .activity-feature { grid-template-columns: 1fr; grid-template-rows: auto; }
  .activity-feature__image { grid-row: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .activity-feature__body { min-height: 0; display: block; }
  .activity-feature .activity-life { margin-top: 28px; }
  .professional-note--feature { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 900px) {
  .programs-thesis__grid { grid-template-columns: 1fr; }
  .machine-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .programs-thesis__grid { gap: 34px; }
  .programs-thesis__statement { font-size: 31px; }
  .activity-index { padding: 10px 0; }
  .activity-index__inner { grid-template-columns: 1fr; }
  .activity-index a { min-height: 58px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .activity-index a:last-child { border-bottom: 0; }
  .activity-chapter__head { margin-bottom: 38px; padding-bottom: 24px; }
  .activity-feature { padding: 20px; gap: 24px; }
  .activity-title { font-size: 28px; }
  .activity-grid,
  .choice-grid { grid-template-columns: 1fr; gap: 42px; }
  .activity-grid--support .activity-life { min-height: 0; }
  .machine-list { grid-template-columns: 1fr; }
  .activity-feature--power-mag { margin-top: 72px; }
  .professional-note__body div { grid-template-columns: 1fr; gap: 2px; }
  .professional-note summary { align-items: flex-start; gap: 12px; }
  .choice-card { padding: 28px 22px; }
}

@media (max-width: 600px) {
  .professional-note summary { gap: 8px; }

  .professional-note summary > :first-child {
    min-width: 0;
    line-break: strict;
    word-break: auto-phrase;
    overflow-wrap: normal;
  }

  /* SPでは開閉の説明文を省き、見出しを読みやすく保つ。 */
  .professional-note__action {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    font-size: 0;
    line-height: 1;
  }

  .professional-note__action::after {
    content: "＋";
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
  }

  .professional-note[open] .professional-note__action::after { content: "−"; }
}

@media (prefers-reduced-motion: reduce) {
  .activity-index a,
  .activity-index a span:last-child { transition: none; }
  .activity-index a:hover span:last-child,
  .activity-index a:focus-visible span:last-child { transform: none; }
}
