/* =========================
   共通スタイル
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
                 "Yu Gothic", "游ゴシック体", "Hiragino Kaku Gothic ProN",
                 "Meiryo", sans-serif;
    line-height: 1.7;
    color: #222;
    background-color: #fafafa;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* コンテナ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* セクション共通 */
.section {
    padding: 60px 0;
    background-color: #fafafa;
}

.section-alt {
    background-color: #f2f4f7;
}

.section-title {
    margin: 0 0 32px;
    font-size: 1.6rem;
    border-left: 4px solid #1f3c88;
    padding-left: 10px;
}

.section-lead {
    margin: -8px 0 28px;
    font-size: 0.98rem;
    color: #4b5563;
}

/* =========================
   ヘッダー / ナビゲーション
   ========================= */

.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.site-logo a {
    display: inline-flex;          /* ロゴと文字を同列 */
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.site-logo-text {
    display: inline-block;
}

.header-logo {
    display: inline-block;         /* imgのdisplay:blockを打ち消す */
    height: 44px;                  /* ロゴを大きく */
    width: auto;
    opacity: 0.95;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
}

.site-nav a {
    padding: 6px 4px;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    border-bottom-color: #1f3c88;
    text-decoration: none;
}

/* =========================
   ヒーローセクション
   ========================= */

.hero {
    background: linear-gradient(135deg, #1f3c88, #374151);
    color: #ffffff;
    padding: 80px 0 70px;
}

.hero-inner {
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    margin: 0 0 16px;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* =========================
   サービストップカード
   ========================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.card-image-placeholder {
    background-color: #e6f0ff;
    padding: 24px 16px;
    text-align: center;
}

.card-main-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f3a8a;
    letter-spacing: 0.05em;
}

.card-subtitle {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.08em;
}

.card--standards .card-image-placeholder {
    background: linear-gradient(135deg, #d9e6ff, #e2e8f0);
}

.card--research .card-image-placeholder {
    background: linear-gradient(135deg, #dfeaff, #e5e7eb);
}

.card--report .card-image-placeholder {
    background: linear-gradient(135deg, #d6e4ff, #eceff3);
}

.card--standards .card-main-title,
.card--research .card-main-title,
.card--report .card-main-title {
    color: #1f3c88;
}

.card-text {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
}

/* =========================
   Toolsページ
   ========================= */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* ツール2つ横並び */
    gap: 24px;
    align-items: start;
}

.tool-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.tool-preview {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    aspect-ratio: 16 / 7;          /* 画像表示エリアを低めにして小さく見せる */
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;           /* 画像全体を潰さず自動縮小 */
}

.tool-body {
    padding: 18px;
}

.tool-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #1f2937;
}

.tool-desc {
    margin: 0 0 14px;
    color: #374151;
    font-size: 0.95rem;
}

.tool-meta {
    margin: 0;
    padding-left: 1.1rem;
    color: #374151;
    font-size: 0.92rem;
}

.tool-meta li + li {
    margin-top: 6px;
}

/* =========================
   タイムライン（これまで）
   ========================= */

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #cbd5e1;
}

.timeline li {
    position: relative;
    padding: 10px 0 10px 16px;
    margin-left: 10px;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background-color: #1f3c88;
}

.timeline-date {
    display: inline-block;
    font-weight: 600;
    margin-right: 12px;
    min-width: 70px;
}

.timeline-text {
    color: #444;
    font-size: 0.95rem;
}

/* =========================
   About / Contact 用
   ========================= */

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 32px;
}

.profile-main p {
    margin-top: 0;
    margin-bottom: 16px;
}

.def-list {
    margin: 0;
    padding: 0;
}

.def-list dt {
    font-weight: 600;
    margin-top: 10px;
    font-size: 0.9rem;
}

.def-list dd {
    margin: 2px 0 6px 0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #d6dbe1;
    border-radius: 999px;
    background-color: #ffffff;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.social-link img {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
}

.social-link span {
    display: inline-block;
    font-weight: 500;
}

.social-link:hover,
.social-link:focus {
    background-color: #f7f9fb;
    border-color: #aeb8c2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.social-link:focus-visible {
    outline: 2px solid #4b5563;
    outline-offset: 2px;
}

.contact-box {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    padding: 20px;
    margin-top: 24px;
}

/* =========================
   フッター
   ========================= */

.site-footer {
    background-color: #0f172a;
    color: #e5e7eb;
    padding: 24px 0;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
}

.footer-copy {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 0.01em;
}

/* =========================
   レスポンシブ対応
   ========================= */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .site-nav {
        gap: 12px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 60px 0 50px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .tool-grid {
        grid-template-columns: 1fr; /* スマホでは縦並び */
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }
}
/* =========================
   Tool-centered content additions
   ========================= */
.hero-kicker {
    margin: 0 0 10px;
    font-size: 0.95rem;
    opacity: 0.82;
    letter-spacing: 0.08em;
}
.status-badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #e6f0ff;
    color: #1f3c88;
    font-size: 0.82rem;
    font-weight: 700;
}
.tool-details {
    margin: 0;
    font-size: 0.92rem;
}
.tool-details dt {
    margin-top: 10px;
    font-weight: 700;
    color: #1f2937;
}
.tool-details dd {
    margin: 2px 0 0;
    color: #374151;
}
.compact-list li + li {
    margin-top: 4px;
}
.text-link {
    color: #1f3c88;
    font-weight: 700;
    text-decoration: underline;
}
.featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   Homepage hero refinement
   ========================= */
.hero-home {
    background: linear-gradient(135deg, #1f3c88, #374151);
    color: #ffffff;
    padding: 56px 0 48px;
    border-bottom: 1px solid #17306f;
}

.hero-home .hero-inner {
    max-width: 900px;
}

.hero-home .hero-kicker {
    color: #dbeafe;
    font-weight: 700;
    opacity: 1;
    white-space: pre-line;
}

.hero-home .hero-title {
    color: #ffffff;
    max-width: 820px;
    margin: 0 auto 14px;
    line-height: 1.35;
}

.hero-home .hero-subtitle {
    color: #e5e7eb;
    max-width: 760px;
    margin: 0 auto;
    opacity: 1;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .hero-home {
        padding: 44px 0 38px;
    }

    .hero-home .hero-title {
        font-size: 1.65rem;
    }
}
/* =========================================================
   Research Notes
   ========================================================= */

/* Hero */
.research-hero {
    background: linear-gradient(135deg, #1f3c88, #374151);
    color: #ffffff;
    padding: 56px 0 48px;
    border-bottom: 1px solid #17306f;
}

.research-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.research-hero-kicker {
    margin: 0 0 10px;
    color: #dbeafe;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.research-hero h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.research-hero-lead {
    max-width: 780px;
    margin: 0 auto 10px;
    color: #f3f4f6;
    font-size: 1.02rem;
    line-height: 1.85;
}

.research-hero-sub {
    max-width: 780px;
    margin: 0 auto;
    color: #d1d5db;
    font-size: 0.94rem;
    line-height: 1.75;
}

/* Section spacing */
.research-notes-section {
    padding-top: 44px;
}

.research-category-section {
    padding-top: 56px;
    padding-bottom: 56px;
}

.research-notice-section {
    padding-top: 48px;
}

/* Article Index */
.article-index-list {
    display: grid;
    gap: 14px;
}

.article-index-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.035);
}

.article-index-item--planned {
    background: #f8fafc;
}

.article-meta {
    margin: 0 0 5px;
    font-size: 0.86rem;
    color: #64748b;
}

.article-index-item h3 {
    margin: 0 0 6px;
    font-size: 1.12rem;
    line-height: 1.55;
}

.article-index-item h3 a {
    color: #1f3c88;
    text-decoration: none;
}

.article-index-item h3 a:hover {
    text-decoration: underline;
}

.article-index-item p {
    margin: 0;
    line-height: 1.75;
    color: #374151;
}

/* Category holder */
.category-holder {
    background: #eef3f8;
    border: 1px solid #d8e0ea;
    border-radius: 18px;
    padding: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.category-holder .section-heading {
    margin-bottom: 20px;
}

.category-list {
    display: grid;
    gap: 12px;
}

.category-row {
    display: grid;
    grid-template-columns: 190px 170px minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.035);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.category-row:hover {
    border-color: #1f3c88;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.category-label {
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.category-title {
    color: #111827;
    font-weight: 700;
}

.category-desc {
    color: #4b5563;
    line-height: 1.7;
}

/* Notice */
.notice-box {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    background: #f8fafc;
}

.notice-box h2 {
    margin-top: 0;
}

.notice-box p {
    line-height: 1.9;
    color: #334155;
}

/* Responsive */
@media (max-width: 768px) {
    .research-hero {
        padding: 44px 0 38px;
    }

    .research-hero h1 {
        font-size: 1.55rem;
    }

    .research-hero-lead {
        font-size: 0.98rem;
    }

    .research-notes-section {
        padding-top: 36px;
    }

    .category-holder {
        padding: 20px;
    }

    .category-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* =========================
   Footer navigation
   ========================= */

.footer-inner--stacked {
    flex-direction: column;
    gap: 8px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.88rem;
}

.footer-nav a {
    color: #e5e7eb;
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

/* =========================
   Markdown article
   ========================= */

.article-page {
    max-width: 860px;
}

.markdown-article h1 {
    margin: 0 0 24px;
    font-size: 1.9rem;
    line-height: 1.45;
    color: #111827;
}

.markdown-article h2 {
    margin-top: 40px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.35rem;
    color: #111827;
}

.markdown-article p {
    margin: 0 0 18px;
    line-height: 1.9;
    color: #334155;
}

.markdown-article ul {
    margin: 0 0 24px;
    padding-left: 1.4em;
}

.markdown-article li {
    margin-bottom: 6px;
    line-height: 1.8;
    color: #334155;
}

.markdown-article a {
    color: #1f3c88;
    text-decoration: underline;
}

.back-link {
    margin-top: 48px;
}

.back-link a {
    color: #1f3c88;
    font-weight: 700;
    text-decoration: underline;
}

/* ===== Tools page: image zoom and placeholder ===== */

.tool-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.tool-image-button img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.tool-image-button:focus-visible {
  outline: 3px solid #8aa4ff;
  outline-offset: 4px;
  border-radius: 14px;
}

.tool-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  width: 100%;
  border: 1px dashed rgba(120, 130, 150, 0.55);
  border-radius: 14px;
  background: rgba(245, 247, 250, 0.75);
  color: #667085;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {

  .tool-image-placeholder {
    min-height: 140px;
  }
}

.image-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.image-popup-window {
  position: relative;
  max-width: min(1100px, 96vw);
  max-height: 92vh;
}

.image-popup-window img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}

.image-popup-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.image-popup-close:focus-visible {
  outline: 3px solid #8aa4ff;
  outline-offset: 3px;
}