@view-transition { navigation: auto; }
::view-transition-old(root) {
    animation: 0.6s ease both vt-fade-out;
}
::view-transition-new(root) {
    animation: 0.4s ease both vt-fade-slide-in;
}
@keyframes vt-fade-out {
    to { opacity: 0; transform: translateY(-20px); }
}
@keyframes vt-fade-slide-in {
    from { opacity: 0; transform: translateY(20px); }
}
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none; }
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    font-size-adjust: 0.5;
    line-height: 1.85;
    color: #b8c4d4;
    word-break: auto-phrase;
    scrollbar-width: thin;
    scrollbar-color: rgba(62,94,155,0.4) transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 80% 60% at 8% 92%, rgba(62,94,155,0.2) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 88% 8%, rgba(255,32,202,0.1) 0%, transparent 55%),
        #1a2040;
}

.landing {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 640px;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
    view-transition-name: ndocs-logo;
}
.logo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.5;
    letter-spacing: 0.1em;
    view-transition-name: ndocs-sub;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.desc {
    font-size: 1rem;
    line-height: 1.9;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    text-wrap: balance;
}
.desc strong {
    color: #cbd5e1;
    font-weight: 600;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: rgba(62,94,155,0.2);
    border: 1px solid rgba(62,94,155,0.4);
    border-radius: 64px 0 64px 0;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.cta:hover {
    background: rgba(62,94,155,0.4);
    border-color: rgba(100,140,220,0.7);
    text-decoration: none;
    color: #ffffff;
    transform: scale(1.06);
    box-shadow: 0 0 24px rgba(62,94,155,0.5), 0 0 60px rgba(62,94,155,0.2);
}
.cta i {
    font-size: 0.8em;
    opacity: 0.7;
}

.first-article {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}
.more-articles {
    font-size: 1rem;
    margin-top: 1.5rem;
}
.more-articles a {
    color: #64748b;
    text-decoration: none;
    border-bottom: 1px solid rgba(100,116,139,0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.more-articles a:hover {
    color: #94a3b8;
    border-color: rgba(148,163,184,0.6);
}
.article-link {
    display: block;
    padding: 1rem 1.5rem;
    background: rgba(62,94,155,0.15);
    border: 1px solid rgba(62,94,155,0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease,
                opacity 0.3s ease, max-height 0.35s ease, padding 0.35s ease, margin-bottom 0.35s ease;
}
.article-link .article-title-text {
    view-transition-name: article-title;
}
.article-link:hover {
    background: rgba(62,94,155,0.3);
    border-color: rgba(100,140,220,0.6);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(62,94,155,0.3);
}
.article-link i {
    font-size: 0.8em;
    margin-right: 0.4rem;
    opacity: 0.7;
}

/* ===== Category Filter ===== */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.category-filter__btn {
    appearance: none;
    border: 1px solid rgba(62,94,155,0.3);
    background: rgba(62,94,155,0.1);
    color: #94a3b8;
    font: 600 0.8rem / 1 'Inter', 'Noto Sans JP', sans-serif;
    padding: 0.45rem 0.9rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    &:hover {
        background: rgba(62,94,155,0.25);
        border-color: rgba(100,140,220,0.5);
        color: #e2e8f0;
    }

    &.is-active {
        background: rgba(62,94,155,0.4);
        border-color: rgba(100,140,220,0.7);
        color: #ffffff;
    }

    & i { font-size: 0.75rem; }
}

/* ===== Article List ===== */
.list-heading {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.article-list {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.article-list .article-link {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow: hidden;
}
.article-list .article-title-text {
    view-transition-name: none; /* 複数要素の名前重複を防止 */
}
.article-date {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;

    & i {
        font-size: 0.85em;
        margin-right: 0.3rem;
        opacity: 0.7;
    }
}
.article-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.6;
}
.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.15rem;
}
.article-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cat-color, #94a3b8);
    background: color-mix(in srgb, var(--cat-color, #94a3b8) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--cat-color, #94a3b8) 30%, transparent);
    padding: 0.2rem 0.55rem;
    border-radius: 99px;

    & i { font-size: 0.65rem; }
}

/* ===== Article Filter: Accordion Collapse ===== */
.article-link.is-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-color: transparent;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .article-link { transition-duration: 0s !important; }
}

/* ===== Sidebar: nav-date for other articles ===== */
.nav-date {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    margin-bottom: 0.1rem;
}

.footer {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
    font-size: 0.8rem;
    color: #475569;
}
.footer a {
    color: #64748b;
    text-decoration: none;
}
.footer a:hover {
    color: #94a3b8;
}
/* ===== Language Switch ===== */
.lang-switch {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(62,94,155,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(62,94,155,0.3);
    border-radius: 99px;
    color: #94a3b8;
    font: 600 0.9rem / 1 'Inter', sans-serif;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}
.lang-switch:hover {
    background: rgba(62,94,155,0.35);
    border-color: rgba(100,140,220,0.6);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(62,94,155,0.3);
}
.lang-switch i {
    font-size: 1.1em;
    opacity: 0.8;
}
.social {
    position: relative; z-index: 1;
    text-align: center; margin-top: 2rem; padding-bottom: 2rem;
}
.social a {
    display: inline-flex; align-items: center; justify-content: center;
    color: #475569; text-decoration: none; transition: color 0.2s;
}
.social a:hover {
    color: #94a3b8;
}
#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
