/* MetAIra Monthly Report — 独立スタイル(既存 HP のトーンを踏襲。外部フォント・CDN なし) */

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

:root {
    --primary: #e94560;
    --accent: #7c5cfc;
    --accent-soft: #a78bfa;
    --accent-hover: #b9a8ff;
    --bg-dark-1: #0a0a1a;
    --bg-dark-2: #0d1025;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.82);
    --text-muted: rgba(255, 255, 255, 0.64);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.14);
    --font-body: 'Inter', 'Noto Sans JP', system-ui, -apple-system, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-dark-1) linear-gradient(180deg, var(--bg-dark-1) 0%, var(--bg-dark-2) 100%) fixed;
    line-height: 1.9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-wrap: anywhere;
}

a { color: var(--accent-hover); text-underline-offset: 3px; }
a:hover { color: var(--text-primary); }
a:focus-visible, .table-wrap:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 2000;
    padding: 12px 18px;
    background: #ffffff;
    color: #0a0a1a;
    border-radius: 8px;
}
.skip-link:focus { left: 12px; }

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(10, 10, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-decoration: none;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; }
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

/* ===== Main ===== */
main { flex: 1 0 auto; width: 100%; }
.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.page-head { padding: 56px 0 28px; }
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-hover);
    margin-bottom: 8px;
}
h1 {
    font-size: clamp(1.7rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.page-sub { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 12px; }
.page-intro { color: var(--text-secondary); max-width: 42em; }
.page-meta { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Index ===== */
.report-list { list-style: none; display: grid; gap: 16px; padding: 8px 0 40px; }
.report-card a {
    display: block;
    min-height: 44px;
    padding: 20px 22px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: background 0.3s, border-color 0.3s;
}
.report-card a:hover { background: var(--glass-bg-hover); border-color: rgba(255, 255, 255, 0.28); }
.report-month { display: block; font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; color: var(--accent-hover); }
.report-title { display: block; font-size: 1.2rem; font-weight: 700; line-height: 1.5; margin: 2px 0 6px; }
.report-summary { display: block; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; }
.report-more { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--accent-hover); }
.empty-note { color: var(--text-secondary); padding: 8px 0 40px; }

/* ===== Prose(月別ページの本文) ===== */
.prose { max-width: 42em; margin: 0 auto 8px; padding-bottom: 24px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
    font-size: clamp(1.35rem, 3.5vw, 1.7rem);
    font-weight: 700;
    line-height: 1.5;
    margin-top: 2.2em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--glass-border);
}
.prose h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.5; margin-top: 1.8em; color: var(--accent-soft); }
.prose p, .prose li { color: var(--text-secondary); }
.prose strong { color: var(--text-primary); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin-top: 0.55em; }
.prose li > ul, .prose li > ol { margin-top: 0.4em; }
.prose hr { border: none; border-top: 1px solid var(--glass-border); margin: 2.2em 0; }
.prose blockquote {
    padding: 14px 20px;
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid #6366f1;
    border-radius: 0 10px 10px 0;
}
.prose blockquote > * + * { margin-top: 0.8em; }
.prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    padding: 1px 6px;
    background: var(--glass-bg);
    border-radius: 6px;
}
.prose img { max-width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--glass-border); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--glass-border); border-radius: 12px; }
.table-wrap table { border-collapse: collapse; min-width: 100%; width: max-content; max-width: none; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--glass-border); vertical-align: top; overflow-wrap: normal; }
.table-wrap th { background: var(--glass-bg); color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: none; }

/* ===== Pager / Back links ===== */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 42em; margin: 24px auto 0; }
.pager a {
    display: block;
    min-height: 44px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
}
.pager a:hover { background: var(--glass-bg-hover); }
.pager .pager-label { display: block; font-size: 0.8rem; color: var(--text-muted); }
.pager .pager-month { display: block; font-weight: 600; }
.pager-next { grid-column: 2; text-align: right; }
.pager-prev { grid-column: 1; }

.back-links { display: flex; flex-wrap: wrap; gap: 8px 20px; max-width: 42em; margin: 20px auto 56px; list-style: none; }
.back-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ===== Footer ===== */
.site-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 36px 20px 40px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.site-footer .footer-name { color: var(--text-secondary); font-weight: 600; margin-bottom: 4px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; list-style: none; margin: 4px 0 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }

/* ===== Motion(動きを減らす設定のときは止める) ===== */
@keyframes mr-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
    .fade-in { animation: mr-fade-in 0.6s ease both; }
    html { scroll-behavior: smooth; }
}

/* ===== Small screens ===== */
@media (max-width: 560px) {
    .page-head { padding-top: 36px; }
    .report-card a { padding: 18px; }
    .pager { grid-template-columns: 1fr; }
    .pager-next, .pager-prev { grid-column: 1; text-align: left; }
}
