html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: #acb8eb;
    color: #2a3241;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    font-size: inherit;
    font-weight: 500;
    line-height: inherit;
    cursor: pointer;
}

a {
    color: #183a7d;
    text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #4b2359;
    outline-offset: 4px;
}

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

h1,
h2,
h3,
strong,
b {
    font-weight: 700;
}

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

.band-content,
.main-frame {
    width: calc(100% - 52px);
    max-width: 1064px;
    margin-inline: auto;
    padding-inline: 0;
}

.top-band {
    position: static;
    border-block-end: 2px solid #183a7d;
}

.top-band .band-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 96px;
    padding-block: 16px;
}

.site-name {
    min-width: 0;
    color: #183a7d;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.header-note {
    max-width: 250px;
    text-align: right;
    font-size: 14px;
}

.to-main {
    position: absolute;
    z-index: 10;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.to-main:focus {
    top: 12px;
    left: 26px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    overflow: visible;
    clip-path: none;
    background: #183a7d;
    color: #ffffff;
}

.mark {
    display: block;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.square-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 7px;
    border: 1px solid #4b2359;
    border-radius: 4px;
    background: transparent;
    color: #183a7d;
}

.nav-trigger {
    display: none;
}

.page-columns {
    display: grid;
    grid-template-columns: 274px minmax(0, 1fr);
    align-items: start;
    gap: 34px;
    padding-block: 88px;
}

.menu-panel {
    min-width: 0;
}

.nav-caption {
    margin-block-end: 20px;
    color: #4b2359;
    font-size: 14px;
    font-weight: 600;
}

.nav-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid #4b2359;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
}

.nav-button > span {
    min-width: 0;
}

.nav-mark {
    visibility: hidden;
    color: #4b2359;
}

.nav-button[aria-current="page"] {
    font-weight: 700;
}

.nav-button[aria-current="page"] .nav-mark {
    visibility: visible;
}

.nav-dialog {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(400px, calc(100% - 32px));
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 0 0 auto;
    padding: 24px;
    overflow-y: auto;
    border: 0;
    border-inline-start: 2px solid #4b2359;
    background: #acb8eb;
    color: #2a3241;
    box-shadow: -6px 0 0 #183a7d;
}

.nav-dialog[open] {
    animation: expand-navigation 600ms ease both;
}

.nav-dialog::backdrop {
    background: rgba(42, 50, 65, 0.65);
}

html:has(dialog:modal) {
    overflow: hidden;
}

.dialog-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-block-end: 30px;
}

.dialog-top p {
    font-size: 22px;
    font-weight: 700;
}

.home-sections {
    display: flex;
    flex-direction: column;
    gap: 88px;
    min-width: 0;
}

.welcome h1 {
    max-width: 650px;
    font-size: 36px;
    line-height: 1.2;
}

.welcome p {
    max-width: 540px;
    margin-block-start: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block-end: 30px;
    padding-block-end: 16px;
    border-block-end: 1px solid #4b2359;
    font-size: 26px;
    line-height: 1.3;
}

.section-title .mark {
    color: #183a7d;
}

#entries {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.entry {
    min-width: 0;
    padding: 26px;
    border: 1px solid #4b2359;
    border-radius: 6px;
    background: #c5cef1;
    box-shadow: 4px 4px 0 #4b2359;
    text-align: right;
}

.entry:first-child {
    grid-column: 1 / -1;
}

.entry-preview {
    width: 220px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-inline-start: auto;
    margin-block-end: 24px;
    border-radius: 3px;
    background: #acb8eb;
    object-fit: cover;
}

.entry h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px 14px;
    margin-block-start: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.entry-label {
    color: #4b2359;
    font-weight: 600;
}

.read-length {
    white-space: nowrap;
}

.excerpt {
    display: -webkit-box;
    margin-block-start: 18px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.entry-action {
    margin-block-start: 22px;
    text-align: right;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 44px;
    padding-block: 6px;
    border-block-end: 2px solid #4b2359;
    font-weight: 600;
    text-decoration: none;
}

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

.topic-list li {
    padding-block: 8px;
    border-block-end: 1px solid #4b2359;
}

.slider {
    width: 75%;
    max-width: 100%;
    margin-inline: auto;
}

.slide-pickers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 12px 0;
    border-block-start: 1px solid #4b2359;
    border-block-end: 1px solid #4b2359;
    list-style: none;
}

.slide-pickers li {
    min-width: 0;
}

.slide-pickers button {
    width: 100%;
    min-height: 44px;
    padding: 8px 4px;
    border: 0;
    border-block-end: 3px solid transparent;
    background: transparent;
    color: #183a7d;
    font-size: 14px;
    text-align: left;
    overflow-wrap: anywhere;
}

.slide-pickers button[aria-pressed="true"] {
    border-block-end-color: #4b2359;
    color: #4b2359;
    font-weight: 700;
}

.slides {
    padding-block: 24px;
}

.slide {
    display: grid;
    grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
    align-items: start;
    min-width: 0;
}

.slide[hidden],
.playback[hidden],
.playback svg[hidden] {
    display: none;
}

.slide-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 3px;
    background: #c5cef1;
    object-fit: cover;
}

.slide-copy {
    min-width: 0;
    margin-inline-start: 24px;
    padding-inline-start: 24px;
    border-inline-start: 1px solid #4b2359;
}

.slide-copy h3 {
    font-size: 24px;
    line-height: 1.3;
}

.slide-copy .text-link {
    margin-block-start: 24px;
}

.slide.is-active .slide-preview,
.slide.is-active .slide-copy {
    animation: fade-slide 600ms ease both;
}

.position-track {
    width: 100%;
    height: 4px;
    background: #c5cef1;
}

.position-fill {
    display: block;
    height: 100%;
    background: #4b2359;
    transition: width 600ms ease;
}

.slider[data-position="1"] .position-fill {
    width: 33.3333%;
}

.slider[data-position="2"] .position-fill {
    width: 66.6667%;
}

.slider[data-position="3"] .position-fill {
    width: 100%;
}

.slide-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block-start: 16px;
}

.slide-buttons {
    display: flex;
    gap: 8px;
}

.slide-count {
    color: #4b2359;
    font-size: 14px;
    font-weight: 600;
}

.live-note {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.entry-page {
    width: 100%;
    max-width: 632px;
    min-width: 0;
    margin-left: auto;
    margin-right: 0;
}

.entry-page > * {
    max-width: 100%;
    margin-block: 0;
}

.entry-page > * + * {
    margin-block-start: 24px;
}

.entry-page > h1 {
    font-size: 36px;
    line-height: 1.2;
}

.entry-page h2 {
    font-size: 28px;
    line-height: 1.3;
}

.entry-page > h2 {
    margin-block-start: 40px;
}

.entry-page h3 {
    font-size: 22px;
    line-height: 1.35;
}

.entry-page > h3 {
    margin-block-start: 32px;
}

.entry-page > .entry-meta {
    justify-content: flex-start;
    margin-block-start: 16px;
    padding-block-end: 24px;
    border-block-end: 1px solid #4b2359;
}

.entry-page p + p {
    margin-block-start: 24px;
}

.entry-page ul,
.entry-page ol {
    padding-inline-start: 28px;
    list-style-type: decimal;
}

.entry-page li + li {
    margin-block-start: 12px;
}

.entry-page li > ul,
.entry-page li > ol {
    margin-block-start: 12px;
}

.entry-page blockquote {
    margin-inline: 0;
    padding: 24px;
    border-inline-start: 3px solid #4b2359;
    background: #c5cef1;
    font-size: 20px;
}

.entry-page blockquote::before {
    display: block;
    margin-block-end: 8px;
    color: #4b2359;
    font-size: 58px;
    line-height: 1;
    content: "“";
}

.entry-page cite {
    display: block;
    margin-block-start: 16px;
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
}

.entry-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.entry-page caption {
    margin-block-end: 12px;
    color: #4b2359;
    font-weight: 600;
    text-align: left;
}

.entry-page th,
.entry-page td {
    padding: 12px;
    border-block-end: 1px solid #4b2359;
    vertical-align: top;
    text-align: left;
}

.entry-page th {
    color: #183a7d;
    font-weight: 600;
}

.entry-page img {
    height: auto;
}

.entry-page > .path-links {
    margin-block-start: 16px;
}

.entry-page .path-links ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.entry-page .path-links li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    margin: 0;
    font-size: 14px;
}

.path-divider {
    flex-shrink: 0;
    color: #4b2359;
}

.entry-page > .entry-links {
    margin-block-start: 88px;
    padding-block-start: 24px;
    border-block-start: 1px solid #4b2359;
}

.entry-links ol {
    margin-block: 24px 0;
}

.entry-links a {
    display: inline-block;
    padding-block: 8px;
    font-weight: 500;
}

.bottom-band {
    padding-block: 32px;
    background: #183a7d;
    color: #eef1ff;
}

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

.bottom-band p {
    max-width: 500px;
}

.bottom-band a {
    display: inline-block;
    padding-block: 8px;
    color: #eef1ff;
    font-weight: 500;
}

.bottom-band a:focus-visible {
    outline-color: #eef1ff;
}

.reveal.is-visible {
    animation: enter-items 600ms ease 100ms both;
}

@keyframes enter-items {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fade-slide {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes expand-navigation {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 100dvh;
        opacity: 1;
    }
}

@media (max-width: 1100px) {
    #entries {
        grid-template-columns: minmax(0, 1fr);
    }

    .slider {
        width: 100%;
    }
}

@media (max-width: 842px) {
    body {
        font-size: 18px;
    }

    .top-band .band-content {
        min-height: 64px;
        gap: 16px;
        padding-block: 10px;
    }

    .site-name {
        font-size: 24px;
    }

    .header-note {
        display: none;
    }

    .js .nav-trigger {
        display: inline-flex;
    }

    .page-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        padding-block: 48px;
    }

    .home-sections,
    .entry-page {
        grid-row: 1;
    }

    .menu-panel {
        grid-row: 2;
    }

    .js .menu-panel {
        display: none;
    }

    .home-sections {
        gap: 48px;
    }

    .welcome h1,
    .entry-page > h1 {
        font-size: 32px;
    }

    .section-title {
        margin-block-end: 24px;
    }

    #entries {
        gap: 24px;
    }

    .entry {
        padding: 24px;
    }

    .slide {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .slide-preview {
        justify-self: center;
        max-width: 280px;
    }

    .slide-copy {
        margin-inline-start: 0;
        padding-inline-start: 0;
        padding-block-start: 20px;
        border-inline-start: 0;
        border-block-start: 1px solid #4b2359;
    }

    .entry-page > .entry-links {
        margin-block-start: 48px;
    }

    .entry-page blockquote {
        padding: 20px;
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .slide-pickers {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .slide-pickers button {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .band-content,
    .main-frame {
        width: calc(100% - 32px);
    }

    .to-main:focus {
        left: 16px;
    }

    .bottom-band .band-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal.is-visible,
    .nav-dialog[open],
    .slide.is-active .slide-preview,
    .slide.is-active .slide-copy {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .position-fill {
        transition: none;
    }

    .playback {
        display: none;
    }

    html,
    .slider,
    .nav-dialog {
        scroll-behavior: auto;
    }
}
