:root {
    --page-background: #f5f7fa;
    --surface-background: #ffffff;
    --text-color: #182432;
    --muted-text-color: #526579;
    --accent-color: #176b94;
    --accent-hover-color: #0f587b;
    --border-color: #d5dee7;
    --focus-color: #f28c45;
    --page-max-width: 1120px;
    --content-max-width: 760px;
    --page-gutter: 20px;
    --header-logo-height: 60px;
    --body-font-size: 18px;
    --body-line-height: 1.65;
    --section-spacing: 2rem;
    --touch-target-size: 44px;
    color-scheme: light;
    font-family: "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--text-color);
    background: var(--page-background);
}

button,
summary,
a {
    font: inherit;
}

a {
    color: var(--accent-color);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--accent-hover-color);
}

:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.site-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.site-frame {
    width: 100%;
    max-width: var(--page-max-width);
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.site-header {
    position: relative;
    z-index: 2;
    background: var(--surface-background);
    border-bottom: 1px solid var(--border-color);
}

.site-header__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 1.5rem;
    min-height: 88px;
    padding-block: 0.75rem;
}

.site-header__logo-area {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.site-header__logo {
    display: block;
    width: auto;
    height: var(--header-logo-height);
}

.site-header__name {
    max-width: 24ch;
    font-size: clamp(1.75rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-wrap: balance;
}

.site-header__balance {
    min-width: 0;
}

.site-scroll-region {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
}

.site-scroll-layout {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.site-main {
    width: 100%;
    padding-inline: var(--page-gutter);
}

.hero,
.markdown-content,
.status-content {
    width: 100%;
    max-width: var(--content-max-width);
    margin-inline: auto;
}

.hero {
    padding-block: 2rem;
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
}

.markdown-content,
.status-content {
    padding-bottom: 3.5rem;
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    overflow-wrap: anywhere;
}

.markdown-content h1,
.status-content h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.125rem, 4vw, 2.5rem);
    line-height: 1.15;
    text-wrap: balance;
}

.markdown-content h2,
.status-content h2 {
    margin: var(--section-spacing) 0 0.75rem;
    font-size: clamp(1.625rem, 3vw, 1.875rem);
    line-height: 1.22;
}

.markdown-content h3,
.status-content h3 {
    margin: 1.6rem 0 0.55rem;
    font-size: clamp(1.3125rem, 2.4vw, 1.4375rem);
    line-height: 1.3;
}

.markdown-content p,
.status-content p {
    margin: 0 0 1.1rem;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.markdown-content li + li {
    margin-top: 0.35rem;
}

.markdown-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.75rem auto;
}

.content-unavailable {
    padding: 1rem 1.25rem;
    color: var(--muted-text-color);
    background: var(--surface-background);
    border-left: 4px solid var(--accent-color);
}

.status-content {
    padding-top: 3rem;
}

.site-footer {
    margin-top: auto;
    color: var(--muted-text-color);
    background: var(--surface-background);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    line-height: 1.5;
}

.site-footer__content {
    padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
}

.site-footer__summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-footer__brand {
    color: var(--text-color);
    font-weight: 600;
}

.site-footer__contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem 0.65rem;
    max-width: 36rem;
    margin: 0;
    font-style: normal;
    text-align: right;
}

.development-placeholder {
    color: var(--muted-text-color);
}

.site-footer__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.site-footer details {
    border-top: 1px solid var(--border-color);
}

.site-footer summary {
    display: flex;
    align-items: center;
    min-height: var(--touch-target-size);
    color: var(--accent-color);
    cursor: pointer;
    font-weight: 600;
}

.footer-detail-content {
    padding: 0.25rem 0 0.75rem;
}

.footer-detail-content p {
    margin: 0 0 0.75rem;
}

.storage-notice {
    position: relative;
    z-index: 3;
    background: var(--surface-background);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 18px rgb(24 36 50 / 8%);
}

.storage-notice__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding-block: 0.8rem calc(0.8rem + env(safe-area-inset-bottom));
}

.storage-notice p {
    margin: 0;
    color: var(--muted-text-color);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.storage-notice__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.75rem;
}

.storage-notice__actions a,
.storage-notice__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-target-size);
    padding-inline: 1rem;
}

.storage-notice__actions button {
    color: #ffffff;
    background: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 0.35rem;
    cursor: pointer;
    font-weight: 700;
}

.storage-notice__actions button:hover {
    background: var(--accent-hover-color);
    border-color: var(--accent-hover-color);
}

code {
    padding: 0.08em 0.25em;
    color: var(--text-color);
    background: #e8eef4;
    border-radius: 0.2rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
}

@media (max-width: 599px) {
    :root {
        --page-gutter: 16px;
        --header-logo-height: 46px;
        --section-spacing: 1.75rem;
    }

    .site-header__grid {
        column-gap: 0.75rem;
        min-height: 72px;
        padding-block: 0.6rem;
    }

    .site-header__name {
        max-width: 10rem;
        font-size: clamp(1.25rem, 6vw, 1.5rem);
    }

    .hero {
        padding-block: 1.5rem;
    }

    .markdown-content,
    .status-content {
        padding-bottom: 2.5rem;
    }

    .markdown-content h1,
    .status-content h1 {
        font-size: clamp(1.75rem, 9vw, 2rem);
    }

    .markdown-content h2,
    .status-content h2 {
        font-size: clamp(1.5rem, 7vw, 1.625rem);
    }

    .markdown-content h3,
    .status-content h3 {
        font-size: clamp(1.25rem, 6vw, 1.375rem);
    }

    .site-footer__summary,
    .storage-notice__content {
        align-items: stretch;
        flex-direction: column;
    }

    .site-footer__contact {
        justify-content: flex-start;
        text-align: left;
    }

    .site-footer__details {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .storage-notice__actions {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-height: 520px) {
    :root {
        --header-logo-height: 42px;
    }

    .site-header__grid {
        min-height: 58px;
        padding-block: 0.35rem;
    }

    .hero {
        padding-block: 1rem;
    }

    .storage-notice__content {
        padding-block: 0.45rem calc(0.45rem + env(safe-area-inset-bottom));
    }
}

hr {
    margin-block: 2.5rem;
}