:root {
    color-scheme: light;
    --paper: #f8f8f2;
    --ink: #233e34;
    --muted: #607268;
    --green: #285944;
    --green-dark: #173d2e;
    --line: #d8e0d5;
    --soft: #edf1e7;
    --accent: #b65b2e;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.8;
    color: var(--ink);
    background: var(--paper);
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 24px;
}

body {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
    text-underline-offset: 4px;
}

a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1, h2, h3, p, figure {
    margin: 0;
}

.skip-link {
    position: fixed;
    z-index: 2;
    top: 8px;
    left: 16px;
    padding: 10px 18px;
    transform: translateY(-160%);
    background: white;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: #fcfcf8;
}

.header-inner, .page, .footer-inner {
    width: min(1160px, calc(100% - 64px));
    margin-inline: auto;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 88px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    color: var(--green);
}

.site-brand strong {
    margin-left: 6px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    font-weight: 600;
}

.site-nav a {
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.site-nav a[aria-current="page"] {
    border-color: var(--green);
}

.site-nav a[aria-current="location"] {
    border-color: var(--green);
}

.site-nav a:hover, .site-footer a:hover {
    text-decoration: underline;
}

.main-illustration {
    overflow: hidden;
    width: 100%;
    height: clamp(270px, 20vw, 310px);
    margin: 0;
    background: #fcfcf8;
}

.main-illustration img {
    width: min(920px, 84%);
    max-width: none;
    height: 100%;
    margin-inline: auto;
    object-fit: cover;
    object-position: center top;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 44px;
    padding-block: 36px 48px;
}

.eyebrow {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.12em;
    color: var(--muted);
}

h1 {
    margin-top: 14px;
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.025em;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    min-height: 48px;
    margin-top: 28px;
    padding: 10px 22px;
    border: 1px solid var(--green);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--green);
}

.button:hover {
    background: var(--green-dark);
}

.theme-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 1px solid var(--line);
}

.theme-nav a {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-block: 18px;
    padding: 8px 24px;
    border-right: 1px solid var(--line);
    font-size: 16px;
    font-weight: 700;
}

.theme-nav a:first-child {
    padding-left: 4px;
}

.theme-nav a:last-child {
    border-right: 0;
}

.theme-nav a:hover {
    background: var(--soft);
}

.theme-number {
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 400;
    color: var(--accent);
}

.theme-nav small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
}

.theme-arrow {
    margin-left: auto;
    font-size: 20px;
    font-weight: 400;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 56px;
    margin-top: 56px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin-top: 6px;
    font-size: 23px;
    font-weight: 700;
}

.section-note {
    padding-bottom: 4px;
    font-size: 11px;
    color: var(--muted);
}

.empty-state {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px dashed #bdcbbc;
    border-radius: 5px;
    background: #f0f3eb;
}

.note-entry {
    display: block;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fdfdf8;
}

.note-entry:hover {
    border-color: var(--green);
    background: var(--soft);
}

.note-entry h3 {
    margin-block: 12px;
    font-size: 19px;
    line-height: 1.7;
}

.note-entry > p:not(.eyebrow) {
    font-size: 13px;
    color: var(--muted);
}

.note-entry-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
}

.topic-article-link {
    display: inline-block;
    margin-top: 18px;
    font-size: 12px;
    text-decoration: underline;
}

.empty-state svg {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    color: #68826d;
}

.empty-state h3 {
    margin-bottom: 8px;
    font-size: 15px;
}

.empty-state p, .topic-content > p:not(.eyebrow):not(.topic-status) {
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
}

.topic-list {
    margin-top: 22px;
}

.topic-section {
    display: flex;
    gap: 24px;
    padding-block: 34px;
    border-bottom: 1px solid var(--line);
}

.topic-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--soft);
}

.topic-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.topic-content {
    min-width: 0;
}

.topic-content h2 {
    margin-block: 4px 10px;
    font-size: 21px;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.topic-tags li {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 10px;
    color: #52675b;
}

.topic-status {
    margin-top: 14px;
    font-size: 11px;
    color: var(--muted);
}

.about-panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--green);
    border-radius: 4px;
    background: #fdfdf8;
}

.profile-image {
    margin-block: 24px 16px;
    margin-inline: auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
}

.about-panel h2, .related-panel h2 {
    margin-bottom: 16px;
    font-size: 16px;
}

.about-panel > p:not(.eyebrow) {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.95;
    color: var(--muted);
}

.about-signature {
    display: block;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    color: var(--muted);
}

.related-panel {
    margin-top: 30px;
}

.related-panel h2 {
    margin-top: 6px;
}

.related-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 16px;
    border-top: 1px solid var(--line);
}

.related-panel a:hover strong {
    text-decoration: underline;
}

.related-panel strong {
    display: block;
    font-size: 14px;
}

.related-panel small {
    font-size: 11px;
    color: var(--muted);
}

.site-footer {
    padding-block: 28px;
    border-top: 1px solid var(--line);
    background: var(--soft);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    font-size: 13px;
    font-weight: 700;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: 11px;
}

.site-footer small {
    flex-basis: 100%;
    margin-top: 4px;
    font-size: 10px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1000px) {
    .hero {
        gap: 24px;
    }

    .content-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 32px;
    }

    .theme-nav a {
        gap: 12px;
        padding-inline: 16px;
    }
}

@media (max-width: 760px) {
    .header-inner, .page, .footer-inner {
        width: calc(100% - 40px);
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-block: 18px 0;
    }

    .site-brand {
        font-size: 17px;
    }

    .site-nav {
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        font-size: 12px;
    }

    .main-illustration {
        margin-top: 0;
        height: clamp(190px, 36vw, 280px);
    }

    .main-illustration img {
        width: 100%;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-block: 28px 36px;
    }

    h1 {
        font-size: clamp(28px, 5.5vw, 38px);
    }

    .theme-nav {
        grid-template-columns: 1fr;
    }

    .theme-nav a, .theme-nav a:first-child {
        margin: 0;
        padding: 16px 4px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .theme-nav a:last-child {
        border-bottom: 0;
    }

    .theme-nav small {
        display: inline;
        margin-left: 16px;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-top: 36px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 24px;
    }

    .related-panel {
        margin-top: 0;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .site-footer small {
        flex-basis: auto;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .theme-nav small {
        display: block;
        margin-left: 0;
    }

    .section-note {
        display: none;
    }

    .empty-state {
        align-items: flex-start;
        gap: 14px;
        padding: 20px 16px;
    }

    .empty-state svg {
        width: 36px;
        height: 36px;
    }

    .empty-state h3 {
        font-size: 14px;
    }

    .topic-section {
        gap: 16px;
    }

    .topic-icon {
        width: 42px;
        height: 42px;
    }

    .topic-icon svg {
        width: 26px;
        height: 26px;
    }

    .sidebar {
        grid-template-columns: 1fr;
        gap: 30px;
    }

}

.note-entry-list {
    display: grid;
    gap: 18px;
}

.note-entry-image {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 18px;
    border-radius: 4px;
}

.note-entry-date {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.topic-article-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
