h1 {
  color: #000 !important;
}

/* ダークモード時のh1の文字色を白に設定 */
[data-md-color-scheme="slate"] h1 {
  color: #fff !important;
}

/* header logの余白調整 */
.md-header__title {
  margin-left: 0 !important;
}

/* navigation footerを非表示にする */
.md-footer__inner.md-grid {
  display: none;
}

article.md-content__inner {
  padding-bottom: 40px;
}

/* h1/h2タグに下線追加 */
.md-typeset h1 {
  /*font-size: 24pt;*/
  font-weight: bold;
  color: #000;
  border-bottom: solid 2px #f86300;
  padding-bottom: 5px;
}
.md-typeset h2 {
  border-bottom: 2px double #f86300;
}
.md-typeset h3 {
  border-bottom: 1px solid #f86300;
}
.md-typeset h4 {
  border-bottom: 1px dotted #f86300;
}

/* ページ遷移アニメーション */
.md-content {
  animation: fadeIn 0.3s ease-in-out;
}

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


/* 検索ボックス改善 */
.md-search__input {
  border-radius: 2rem;
}

/* ナビゲーションの改善 */
.md-nav__title {
  font-weight: 600;
}

.md-nav__link {
  border-radius: 0.1rem;
  transition: background-color 125ms;
}

.md-nav__link:hover {
  background-color: var(--md-accent-fg-color--transparent);
}

/* レスポンシブ対応 */
@media screen and (max-width: 76.1875em) {
  .md-content ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 44.9375em) {
  .md-content ul {
    grid-template-columns: 1fr;
  }
}

/* プロフィール画面のボタン */

.cta-button {
  /* ボタンのレイアウトとサイズ */
  display: inline-flex; /* テキストとアイコンを横並びにする */
  align-items: center; /* 上下中央揃え */
  justify-content: center; /* 左右中央揃え */
  gap: 0.5em; /* テキストとアイコンの間の余白 */
  padding: 8px 20px; /* ボタン内部の余白（上下 左右） */

  /* ボタンの見た目 */
  background-color: #f57c00; /* 背景色 (サイトのキーカラーであるオレンジ) */
  color: #ffffff !important; /* 文字色 (白) !importantで強制的に上書き */
  /*border: none; /* 枠線を消す */
  border-radius: 8px; /* 角を丸くする */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); /* わずかな影を付ける */
  
  /* 文字のスタイル */
  font-size: 0.9rem; /* 文字サイズ */
  font-weight: bold; /* 文字を太くする */
  text-decoration: none; /* リンクの下線を消す */

  /* ホバーエフェクトのための準備 */
  transition: all 0.3s ease;
}

/* マウスカーソルを乗せたときのデザイン */
.cta-button:hover {
  background-color: #e65100; /* 少し濃いオレンジ */
  transform: translateY(-3px); /* 少し上に持ち上げる */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); /* 影を濃くする */
}

/* ボタン内のアイコンのスタイル */
.cta-button svg {
  width: 1.2em; /* アイコンの幅 */
  height: 1.2em; /* アイコンの高さ */
  fill: currentColor; /* アイコンの色を文字色(白)に合わせる */
}

/* テーブルヘッダーのスタイル */
.md-typeset table:not([class]) th {
  background-color: #f57c00; /* プライマリーカラーのオレンジ */
  color: #ffffff; /* 文字色を白に */
  font-weight: bold; /* 文字を太字に */
  text-align: center; /* 中央揃え */
}

/* ダークモード時のテーブルヘッダー */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #e65100b2; /* 少し濃いオレンジ */
  color: #ffffff;
}

/* admonition の文字サイズを通常文字と一緒にする */
.md-typeset .admonition,
.md-typeset .admonition-title {
  font-size: inherit;
}

/* Advertisement notice style */
.advertisement-notice {
  color: grey;
  font-size: 0.8em;
  text-align: center;
  margin-bottom: 1em;
}

/* Blog Card for Quiz */
.blog-card {
  display: flex; /* 横並びにするためにflexに変更 */
  width: 100%;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  margin-top: 1em;
  overflow: hidden; /* はみ出した画像を角丸にするため */
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

[data-md-color-scheme="slate"] .blog-card {
  background-color: #333;
}

/* 画像コンテナのスタイル */
.blog-card .card-img-container {
  flex: 0 0 35%;
  max-width: 180px;
}

.blog-card .card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card .card-content {
  flex: 1;
  padding: 1em 1.5em;
}

.blog-card .card-title {
  font-size: 1.1em;
  font-weight: bold;
  margin: 0 0 0.5em 0;
}

.blog-card .card-description {
  font-size: 0.9em;
  color: grey;
  margin: 0;
}

/* Stress Test Tool Styles */
#stress-test-container {
    max-width: 600px;
    margin: 2em auto;
    padding: 1.5em;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

[data-md-color-scheme="slate"] #stress-test-container {
    background-color: #2e2e2e;
    border-color: #444;
}


#stress-test-container h3 {
    margin-top: 0;
    border-bottom: 2px solid #f86300;
    padding-bottom: 0.5em;
}

.form-section {
    margin-bottom: 1.5em;
}

.form-group {
    margin-bottom: 1em;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5em;
    font-weight: bold;
}

.form-group input,
.form-group select {
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    background-color: #fff;
    color: #000;
}

[data-md-color-scheme="slate"] .form-group input,
[data-md-color-scheme="slate"] .form-group select {
    background-color: #3a3a3a;
    color: #fff;
    border-color: #555;
}

#calculate-btn {
    display: block;
    width: 100%;
    padding: 1em;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: #f57c00;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#calculate-btn:hover {
    background-color: #e65100;
}

#result-section {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px dashed #ccc;
}

/* Result Table Styles */
.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1em;
    margin-bottom: 1em;
}
.result-table td {
    padding: 0.7em 0.5em;
    border: none;
    border-bottom: 1px solid #eee;
}
[data-md-color-scheme="slate"] .result-table td {
    border-bottom: 1px solid #444;
}
.result-table tr:last-child td {
    border-bottom: none;
}
.result-table td:first-child {
    text-align: left;
    color: #555;
}
[data-md-color-scheme="slate"] .result-table td:first-child {
    color: #ccc;
}
.result-table td:last-child {
    text-align: right;
    font-size: 1.2em;
    font-weight: bold;
}

#difference-row.negative td:last-child,
#percentage-row.negative td:last-child {
    color: #d9534f;
}

#difference-row.positive td:last-child,
#percentage-row.positive td:last-child {
    color: #5cb85c;
}

#difference-row.positive td:last-child::before {
    content: '+';
}

/* === Asset Matrix Styles === */
#asset-matrix {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

#asset-matrix th, 
#asset-matrix td {
    border: 1px solid #ccc;
    padding: 0.5em;
    text-align: center;
    vertical-align: middle;
    width: 33.33%;
}

#asset-matrix th {
    background-color: #f0f0f0;
    font-weight: bold;
    color: rgba(0,0,0,.87);
}

[data-md-color-scheme="slate"] #asset-matrix th {
    background-color: #3a3a3a;
    border-color: #555;
    color: #fff;
}
[data-md-color-scheme="slate"] #asset-matrix td {
    border-color: #555;
}


#asset-matrix input {
    width: 95%;
    padding: 0.6em;
    text-align: right;
    border: 1px solid #ccc;
    border-radius: 4px;
}

[data-md-color-scheme="slate"] #asset-matrix input {
    background-color: #2e2e2e;
    border-color: #555;
    color: #fff;
}


#total-asset-display {
    text-align: center;
    padding: 1em;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 2em;
}

[data-md-color-scheme="slate"] #total-asset-display {
    background-color: #2e2e2e;
    border-color: #444;
}


#total-asset-display h4 {
    margin: 0 0 0.5em 0;
    font-size: 1em;
    font-weight: normal;
    color: #555;
}

[data-md-color-scheme="slate"] #total-asset-display h4 {
    color: #ccc;
}

#total-asset-display p {
    margin: 0;
    font-size: 1.8em;
    font-weight: bold;
    color: #005eaa;
}
[data-md-color-scheme="slate"] #total-asset-display p {
    color: #f57c00;
}

/* Align current-rate input to the right */
.form-group input#current-rate {
    text-align: right;
}