/* ============================================
   nonri.net — Clean Professional Utility
   Single-column document layout at 640px
   Font: "Inter" (Google Fonts) — medium, semibold
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #2D3436;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
}

/* --- Navigation --- */
.top-nav {
    width: 100%;
    max-width: 640px;
    padding: 2rem 0 1.5rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #636E72;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: #2D3436;
}

.nav-link.active {
    color: #2D3436;
    font-weight: 600;
}

/* --- Main Content --- */
.content {
    width: 100%;
    max-width: 640px;
    flex: 1;
    padding-bottom: 4rem;
}

/* --- Page Header --- */
.page-header {
    margin-bottom: 0;
}

.page-header h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    line-height: 1.3;
    color: #2D3436;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-desc {
    font-size: 1rem;
    color: #636E72;
    line-height: 1.7;
    margin-bottom: 0;
}

/* --- Divider --- */
.divider {
    border: none;
    height: 1px;
    background-color: #DEE2E6;
    margin: 1.5rem 0 3rem;
}

/* --- Dot Divider --- */
.dot-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1px;
    background-color: #DEE2E6;
    margin: 3rem 0;
    position: relative;
}

.dot-center {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #0984E3;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px #FFFFFF;
}

/* --- Section --- */
section {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.section-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2D3436;
    letter-spacing: -0.01em;
}

.section-summary {
    font-size: 1rem;
    color: #636E72;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* --- Details / Summary (Progressive Disclosure) --- */
details {
    margin-top: 0.25rem;
}

details summary {
    font-size: 0.875rem;
    color: #0984E3;
    cursor: pointer;
    display: inline-block;
    font-weight: 500;
    letter-spacing: -0.01em;
    list-style: none;
    transition: color 0.2s ease;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::marker {
    content: '';
}

details summary:hover {
    color: #2D3436;
}

.expanded-content {
    background-color: #F1F3F5;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    overflow: hidden;
}

.expanded-content p {
    font-size: 0.9375rem;
    color: #2D3436;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.expanded-content p:last-child {
    margin-bottom: 0;
}

/* --- Reference List --- */
.ref-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ref-list li {
    font-size: 0.9375rem;
    color: #2D3436;
    line-height: 1.7;
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.ref-list li:last-child {
    margin-bottom: 0;
}

.ref-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #0984E3;
}

/* --- Footer --- */
.page-footer {
    width: 100%;
    max-width: 640px;
    padding: 2rem 0;
    border-top: 1px solid #DEE2E6;
    margin-top: auto;
}

.page-footer span {
    font-size: 0.875rem;
    color: #636E72;
    letter-spacing: -0.01em;
}

/* --- Details Animation --- */
details .expanded-content {
    animation: expandIn 0.3s ease forwards;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 480px) {
    body {
        padding: 0 1rem;
    }

    .top-nav {
        gap: 1.25rem;
        padding: 1.5rem 0 1rem;
    }

    .nav-link {
        font-size: 0.875rem;
    }

    .divider {
        margin: 1.25rem 0 2rem;
    }

    .dot-divider {
        margin: 2rem 0;
    }

    .section-header h2 {
        font-size: 1.125rem;
    }

    .expanded-content {
        padding: 0.875rem 1rem;
    }
}

/* --- Selection --- */
::selection {
    background-color: #0984E3;
    color: #FFFFFF;
}

/* --- Link styling in expanded content --- */
.expanded-content a {
    color: #0984E3;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.expanded-content a:hover {
    border-bottom-color: #0984E3;
}

/* --- Code blocks (if used in content) --- */
code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
    font-size: 0.875em;
    background-color: #F1F3F5;
    padding: 0.125em 0.375em;
    border-radius: 3px;
    color: #2D3436;
}

/* --- Scrollbar (webkit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FFFFFF;
}

::-webkit-scrollbar-thumb {
    background: #DEE2E6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #636E72;
}
