:root {
  --primary-blue: #005BAC; /* トヨタブルー */
  --accent-green: #00A986; /* 環境グリーン */
  --secondary-blue: #4A90E2; /* 明るいブルー */
  --text-dark: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --background-white: #FFFFFF;
  --grid-line: rgba(153, 153, 153, 0.3);
  --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
  --font-size-base: clamp(0.75rem, 2vw, 0.9rem);
  --font-size-small: clamp(0.6rem, 1.8vw, 0.75rem);
  --font-size-large: clamp(1rem, 2.5vw, 1.3rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--background-white);
  color: var(--text-dark);
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
} */

/* セクション全体 */
section.experiment-graph {
  width: 100%;
  max-width: 900px;
  margin: 2rem auto;
  background: var(--background-white);
  border-radius: 10px;
  box-shadow: var(--shadow-light);
  padding: 2rem;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.graph {
    background-color: white;
    border-radius: 10px;
}
/* タイトルとサブタイトル */
.graph-header {
  text-align: center;
  margin-bottom: 2rem;
}

.graph-header h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.graph-header p {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--text-light);
}

/* グラフ本体 */
.graph-figure {
    display: flex;
    justify-content: center;
    width: 100%;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: clamp(50px, 8vw, 60px);
  height: 250px;
  padding-right: clamp(8px, 1.5vw, 12px);
  font-size: var(--font-size-small);
  color: var(--text-muted);
  border-right: 1px solid var(--grid-line);
  margin-right: clamp(5px, 1.5vw, 8px);
  position: relative;
}

.y-axis .tick {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  text-align: right;
  height: 1rem;
  line-height: 1rem;
  margin-right: 5px;
  font-weight: 400;
}

.y-axis .axis-label {
  position: absolute;
  left: 0; /* 左端に寄せる */
  top: 50%;
  transform: translateY(-50%); /* 縦中央に調整 */
  writing-mode: vertical-rl; /* 縦書き */
  white-space: nowrap; /* 改行を防ぐ */
  font-weight: 700;
  color: #333333;
}

.graph-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 250px;
  gap: clamp(30px, 8vw, 60px);
  flex-grow: 1;
  background-image: linear-gradient(to top, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 33.33px;
  background-position: 0 bottom;
}
.graph-container img {
    width: 12em;
    height: auto;
    position: absolute;
    top: -8em;
    right: calc(50% - 6em);
}
.bar {
  width: clamp(60px, 15vw, 90px);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 5px 5px 0 0;
}

.segment {
  width: 100%;
  text-align: center;
  font-size: var(--font-size-small);
  padding: clamp(4px, 1vw, 6px) 0;
  color: #FFFFFF;
  font-weight: 400;
}
.segment--joint-sm {
    font-size: 10px;
    padding: clamp(2px, 1vw, 2px) 0;
}

.segment--main { background: var(--secondary-blue); }
.segment--joint { background: var(--accent-green); }
.segment--stud { background: var(--primary-blue); }

.bar::before {
  content: attr(data-label);
  position: absolute;
  top: -2rem;
  width: 100%;
  text-align: center;
  font-weight: 700;
  font-size: var(--font-size-base);
  padding: 2px 8px;
  border-radius: 5px;
  color: #333333;
}

.bar::after {
  content: attr(aria-label);
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--text-dark);
  text-align: center;
  white-space: pre-line;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 5px;
}

.bar--exp::after { 
  content: "熟練者\Aサポートなし";
}
.bar--junior::after { 
  content: "2年目若手\Aサポートあり";
}

.segment--main { height: 100px; }
.segment--joint { height: 66.67px; }
.segment--stud { height: 83.33px; }
.segment--main-sm { height: 38.33px; }
.segment--joint-sm { height: 20px; }
.segment--stud-sm { height: 38.33px; }

/* グラフ下部の強調テキスト */
.graph-highlight {
  text-align: center;
  margin: 2rem auto;
  font-size: var(--font-size-large);
  color: var(--primary-blue);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 5px;
  background: #F5F5F5;
}

.graph-highlight span {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--primary-blue);
}

/* 体験談セクション */
.testimonial {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 10px;
  background: var(--background-white);
  box-shadow: var(--shadow-light);
}

.cms-tag {
  display: inline-block;
  background: var(--accent-green);
  color: #FFFFFF;
  padding: 0.3rem 1rem;
  border-radius: 15px;
  font-size: var(--font-size-small);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.testimonial h3 {
  font-weight: 700;
  margin-bottom: 0.8rem;
  font-size: var(--font-size-base);
  color: var(--text-dark);
}

.testimonial p {
  color: var(--text-light);
  font-size: var(--font-size-base);
}

/* レスポンシブ対応 */
@media (min-width: 1200px) {
  .bar::before {
    font-size: 20px;
  }
  .bar::after {
    font-size: 16px;
  }
}

@media screen and (max-width: 959px) and (max-width: 959px) {
  .bar::before {
    font-size: 20px;
  }
  .bar::after {
    font-size: 16px;
  }
}
@media (max-width: 768px) {
  .y-axis {
    width: 50px;
    padding-right: 8px;
    height: 200px;
  }

  .graph-container {
    height: 200px;
    gap: 30px;
    background-size: 100% 26.67px;
  }

  .bar {
    width: 60px;
  }

  .bar--exp { height: 200px; }
  .bar--junior { height: 80px; }

  .segment--main { height: 80px; }
  .segment--joint { height: 53.33px; }
  .segment--stud { height: 66.67px; }
  .segment--main-sm { height: 30.67px; }
  .segment--joint-sm { height: 16px; }
  .segment--stud-sm { height: 30.67px; }

  .bar::after {
    bottom: -70px;
    font-size: var(--font-size-small);
  }

  .bar::before {
    font-size: var(--font-size-small);
    top: -1.5rem;
  }
}

@media (max-width: 480px) {
  .y-axis {
    width: 40px;
    padding-right: 6px;
    height: 150px;
  }

  .graph-container {
    height: 150px;
    gap: 20px;
    background-size: 100% 20px;
  }

  .bar {
    width: 50px;
  }

  .bar--exp { height: 150px; }
  .bar--junior { height: 60px; }

  .segment--main { height: 60px; }
  .segment--joint { height: 40px; }
  .segment--stud { height: 50px; }
  .segment--main-sm { height: 23px; }
  .segment--joint-sm { height: 12px; }
  .segment--stud-sm { height: 23px; }

  .bar::after {
    bottom: -60px;
    font-size: 3.5vw;
  }

  .bar::before {
    font-size: 3.5vw;
  }
  .bar--exp::before {
    top: -4vw;
  }
  .bar--junior::before {
    top: -7vw;
  }
}