/* わかりやすい建築構造の法規 — houki-style.css */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: '游ゴシック', YuGothic, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'BIZ UDPGothic', sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.85;
}
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 700; }
/* ===== テキスト強調 ===== */
.marker-under { background: linear-gradient(transparent 60%, #ff9 60%); padding: 0 2px; font-weight: 700; }
.bold-red { font-weight: 700; color: #e60033; }

/* ===== レイアウト ===== */
.site-wrapper { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ===== ヘッダー ===== */
.site-header { border-bottom: 3px solid #1c3a5c; padding: 20px 0 14px; }
.site-title { font-size: 1.55em; font-weight: 700; letter-spacing: 0.05em; color: #1a1a1a; margin-bottom: 2px; }
.site-title a { color: inherit; }
.site-subtitle { font-size: 0.78em; color: #5a6a7a; margin-top: 4px; letter-spacing: 0.06em; }

/* ===== ナビ ===== */
.site-nav { background: #1c3a5c; margin: 0 -20px; padding: 0 20px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 10px 14px; color: #cdd9e8; font-size: 0.83em; letter-spacing: 0.04em; }
.site-nav a:hover { background: #2a5290; text-decoration: none; color: #fff; }

/* ===== パンくず ===== */
.breadcrumb { font-size: 0.78em; color: #7a8a9a; margin: 12px 0 20px; }
.breadcrumb a { color: #7a8a9a; }
.breadcrumb span { margin: 0 4px; }

/* ===== 記事ヘッダー ===== */
.article-header { margin-bottom: 28px; }
h1.article-title {
  font-size: 1.42em;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #0f1f35;
  border-left: 4px solid #1c3a5c;
  padding-left: 12px;
  margin-bottom: 8px;
}
.article-meta { font-size: 0.76em; color: #7a8a9a; }

/* ===== 見出し ===== */
h2 {
  font-size: 1.22em;
  font-weight: 700;
  color: #0f1f35;
  border-bottom: 2px solid #1c3a5c;
  padding-bottom: 5px;
  margin: 36px 0 13px;
  letter-spacing: 0.04em;
}
h3 {
  font-size: 1.1em;
  font-weight: 700;
  color: #1a1a1a;
  margin: 22px 0 8px;
  padding-left: 10px;
  border-left: 3px solid #c5d2de;
}

/* ===== 本文 ===== */
p { margin-bottom: 1em; font-size: 1em; }
ul, ol { margin: 0.4em 0 1em 1.6em; font-size: 1em; }
li { margin-bottom: 0.25em; }

/* ===== テーブル ===== */
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 1em; }
th { background: #1c3a5c; color: #fff; padding: 8px 10px; font-weight: 600; letter-spacing: 0.04em; text-align: left; }
td { border: 1px solid #c5d2de; padding: 7px 10px; vertical-align: top; }
tr:nth-child(even) td { background: #f0f5fa; }

/* ===== 条文ボックス ===== */
.law-box {
  background: #f0f5fa;
  border: 1px solid #c5d2de;
  border-left: 4px solid #1c3a5c;
  padding: 13px 16px;
  margin: 20px 0;
  font-size: 1em;
}
.law-box .law-label {
  font-size: 0.84em;
  font-weight: 700;
  color: #1c3a5c;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

/* ===== 技術的助言ボックス ===== */
.advisory-box {
  background: #fffbf0;
  border: 1px solid #d4b896;
  border-left: 4px solid #8b6914;
  padding: 13px 16px;
  margin: 20px 0;
  font-size: 0.95em;
}
.advisory-box .advisory-label {
  font-size: 0.84em;
  font-weight: 700;
  color: #8b6914;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

/* ===== 注意ボックス ===== */
.caution-box {
  background: #fff5f5;
  border: 1px solid #e0b0b0;
  border-left: 4px solid #c0392b;
  padding: 13px 16px;
  margin: 20px 0;
  font-size: 0.95em;
}
.caution-box .caution-label {
  font-size: 0.84em;
  font-weight: 700;
  color: #c0392b;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

/* ===== 過去問参照 ===== */
.kakomon-ref { color: #c0392b; font-weight: 700; }

/* ===== 試験で問われやすいポイント ===== */
.exam-point-box { margin: 28px 0; }
.qa-box .qa-q { font-weight: 700; margin-bottom: 4px; }
details.qa-answer { margin-bottom: 12px; }
details.qa-answer summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.80em;
  font-weight: 700;
  color: #4a5568;
  background: #eef0f4;
  border-radius: 3px;
  user-select: none;
  margin-bottom: 4px;
}
details.qa-answer summary::-webkit-details-marker { display: none; }
details.qa-answer summary::before { content: "▼ 答えを見る"; }
details.qa-answer[open] summary::before { content: "▲ 閉じる"; }
.qa-answer-body { padding: 4px 0 0 1em; }
.qa-answer-body p { margin-bottom: 0; }


/* ===== 免責ボックス ===== */
.disclaimer-box {
  border: 1px solid #c5d2de;
  padding: 11px 14px;
  margin: 24px 0;
  font-size: 0.80em;
  color: #5a6a7a;
  background: #f8f9fb;
}

/* ===== 出典ボックス ===== */
.source-box {
  border-top: 1px solid #c5d2de;
  padding-top: 12px;
  margin-top: 28px;
  font-size: 0.80em;
  color: #5a6a7a;
}
.source-box .source-title {
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
  color: #3a4a5a;
}
.source-box ul { margin-left: 1.2em; }

/* ===== 著者ボックス ===== */
.author-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-top: 1px solid #c5d2de;
  border-bottom: 1px solid #c5d2de;
  padding: 14px 0;
  margin: 28px 0;
}
.author-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: #1c3a5c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.3;
}
.author-box-body { flex: 1; font-size: 0.86em; }
.author-box-label { font-size: 0.76em; color: #7a8a9a; margin-bottom: 2px; letter-spacing: 0.04em; }
.author-box-name { font-weight: 700; font-size: 1em; margin-bottom: 4px; }
.author-box-bio { color: #3a4a5a; line-height: 1.75; }

/* ===== 関連記事 ===== */
.related-box { border: 1px solid #c5d2de; margin: 28px 0; }
.related-box-title {
  background: #f0f5fa;
  padding: 8px 14px;
  font-size: 0.84em;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1c3a5c;
  border-bottom: 1px solid #c5d2de;
}
.related-link-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  font-size: 0.86em;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.related-link-list li::before { content: "→ "; color: #1c3a5c; }

/* ===== カテゴリ内記事一覧 ===== */
.category-link-box { border: 1px solid #c5d2de; margin: 28px 0; }
.category-link-box-title {
  background: #e8f0f8;
  padding: 8px 14px;
  font-size: 0.84em;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1c3a5c;
  border-bottom: 1px solid #c5d2de;
}
.category-link-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 8px 14px 12px !important;
  font-size: 0.86em;
  column-count: 2;
  column-gap: 24px;
}
.category-link-list li { margin-bottom: 5px; break-inside: avoid; }
.category-link-list li::before { content: "→ "; color: #1c3a5c; }
.category-link-list a { color: #1c3a5c; }
.category-link-list a:hover { text-decoration: underline; }
.category-link-list li.current-page { font-weight: 700; color: #3a4a5a; }
.category-link-list li.current-page::before { content: "▶ "; color: #3a4a5a; }
@media (max-width: 600px) { .category-link-list { column-count: 1; } }

/* ===== ルート君 ===== */
.route-voice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 20px 0 28px;
}
.route-voice-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 6px;
}
.route-voice-bubble {
  background: #f0f5fa;
  border: 1px solid #c5d2de;
  border-radius: 0 10px 10px 10px;
  padding: 10px 14px;
  position: relative;
  font-size: 1em;
}
.route-voice-bubble::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 12px;
  border: 8px solid transparent;
  border-right-color: #c5d2de;
  border-left: none;
  border-top: none;
}
.route-voice-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 13px;
  border: 7px solid transparent;
  border-right-color: #f0f5fa;
  border-left: none;
  border-top: none;
}
.route-voice-name {
  font-size: 0.84em;
  font-weight: 700;
  color: #1c3a5c;
  margin-bottom: 4px !important;
  letter-spacing: 0.04em;
}
.route-voice-bubble p:last-child { margin-bottom: 0; }

/* ===== フッター ===== */
.site-footer {
  border-top: 2px solid #1c3a5c;
  padding: 16px 0;
  margin-top: 48px;
  font-size: 0.76em;
  color: #7a8a9a;
  text-align: center;
  letter-spacing: 0.05em;
}
.site-footer a { color: #7a8a9a; }

/* ===== 2カラムレイアウト ===== */
.page-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}
.page-main {}
.page-sidebar {
  border-left: 1px solid #c5d2de;
  padding-left: 20px;
}
.sidebar-title {
  font-size: 0.88em;
  font-weight: 700;
  color: #1c3a5c;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #c5d2de;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
.sidebar-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.88em;
}
.sidebar-list li { margin-bottom: 6px; }
.sidebar-list li::before { content: "›"; color: #1c3a5c; margin-right: 4px; }
.sidebar-list a { color: #0066cc; }
.sidebar-list a:hover { color: #004499; text-decoration: underline; }

/* ===== インデックスページ専用 ===== */
.index-intro {
  font-size: 0.92em;
  line-height: 1.9;
  margin: 0 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c5d2de;
  color: #2a3a4a;
}
.index-category { margin: 22px 0; }
.index-category:first-child { margin-top: 0; }
.index-category-title {
  font-size: 1.02em;
  font-weight: 700;
  color: #0f1f35;
  background: #e8eef5;
  border-left: 4px solid #1c3a5c;
  padding: 7px 12px;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.index-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 0 0 4px !important;
  font-size: 1em;
}
.index-list li { margin-bottom: 5px; display: table; }
.index-list li::before { content: "›"; color: #1c3a5c; margin-right: 6px; font-weight: 700; }
.index-list a { color: #0066cc; }
.index-list a:hover { color: #004499; text-decoration: underline; }

/* ===== レスポンシブ ===== */
@media (max-width: 680px) {
  .page-body { grid-template-columns: 1fr; }
  .page-sidebar { border-left: none; border-top: 1px solid #c5d2de; padding-left: 0; padding-top: 20px; }
  h1.article-title { font-size: 1.2em; }
  .author-icon { width: 44px; height: 44px; font-size: 0.72em; }
  .site-nav a { padding: 8px 10px; font-size: 0.80em; }
  table { font-size: 0.82em; }
}
