html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding-top: 128px;
}

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

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

body {
    margin: 0;
    background: #5a0f11;
    color: #d6c1c4;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

button,
input,
select,
textarea {
    color: inherit;
    font-size: inherit;
    font-weight: 400;
    line-height: inherit;
}

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

button {
    cursor: pointer;
}

a {
    color: #f7a3b1;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

a:hover {
    color: #e8a759;
}

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

h1,
h2,
h3 {
    font-weight: 400;
    overflow-wrap: anywhere;
}

strong,
b {
    font-weight: 700;
}

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

svg {
    display: block;
    flex-shrink: 0;
}

[hidden] {
    display: none;
}

:focus-visible {
    outline: 2px solid #e8a759;
    outline-offset: 5px;
}

.main-content-frame:focus-visible {
    outline-offset: 8px;
}

.screen-reader {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.brand-row,
.navigation-row,
.main-content-frame,
.credits-row,
.read-main {
    width: calc(100% - 36px);
    max-width: 1070px;
    margin-inline: auto;
    padding-inline: 0;
}

.read-main {
    display: flex;
    align-items: center;
    min-height: 34px;
    font-size: 12px;
}

.edition-head {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 104px;
    background: #5a0f11;
    box-shadow: 0 5px 20px rgba(31, 3, 6, 0.16);
}

.brand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    gap: 16px;
}

.edition-title {
    grid-column: 2;
    color: #f7a3b1;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.05em;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.edition-note,
.edition-caption {
    font-size: 11px;
}

.edition-caption {
    justify-self: end;
    text-align: right;
}

.navigation-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

#edition-nav {
    min-width: 0;
    max-width: 100%;
}

.menu-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
}

.menu-link,
.menu-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 3px 12px;
    border-radius: 8px;
    color: #d6c1c4;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.menu-link:hover,
.menu-disclosure > summary:hover {
    background: #76272d;
    color: #f7a3b1;
}

.menu-link[aria-current="page"],
.menu-disclosure[open] > summary {
    background: #f7a3b1;
    color: #5a0f11;
}

.menu-disclosure {
    position: relative;
}

.menu-disclosure > summary {
    list-style: none;
    cursor: pointer;
}

.menu-disclosure > summary::-webkit-details-marker {
    display: none;
}

.menu-disclosure > summary svg {
    width: 22px;
    height: 22px;
}

.dropdown-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 25;
    display: grid;
    gap: 6px;
    width: 280px;
    max-width: calc(100vw - 48px);
    padding: 12px;
    border-radius: 14px;
    background: #712129;
    box-shadow: 0 12px 30px rgba(26, 2, 6, 0.25);
}

.dropdown-links .menu-link {
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 12px;
}

.nav-switch,
.nav-close {
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #76272d;
    color: #f7a3b1;
}

.nav-switch {
    display: none;
}

.nav-close {
    display: inline-flex;
    flex-shrink: 0;
}

.nav-switch:hover,
.nav-close:hover {
    background: #8a333b;
}

.navigation-dialog {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;
    width: min(400px, calc(100% - 24px));
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 20px 0 0 20px;
    background: #68171c;
    color: #d6c1c4;
    box-shadow: -12px 0 40px rgba(22, 2, 5, 0.25);
}

.navigation-dialog[open] {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.navigation-dialog::backdrop {
    background: rgba(22, 2, 5, 0.7);
}

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

.dialog-top h2 {
    font-size: 22px;
}

.dialog-links {
    min-width: 0;
}

.navigation-dialog .menu-lines {
    gap: 20px;
}

.navigation-dialog .menu-line {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.navigation-dialog .menu-link,
.navigation-dialog .menu-disclosure > summary {
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
}

.navigation-dialog .dropdown-links {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    box-shadow: none;
}

.dialog-note {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(247, 163, 177, 0.22);
    font-size: 13px;
}

.main-content-frame {
    display: grid;
    gap: 60px;
    margin-block: 60px;
    min-width: 0;
}

.opening h1 {
    max-width: 960px;
    color: #f7a3b1;
    font-size: 56px;
    line-height: 1.15;
    letter-spacing: -0.055em;
}

.section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    line-height: 1.4;
}

.symbol-box {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: #78282f;
    color: #e8a759;
}

.symbol-box svg {
    width: 22px;
    height: 22px;
}

.section-note {
    font-size: 12px;
    text-align: right;
}

.feature-stage {
    display: flex;
    align-items: flex-end;
    gap: 32px;
}

.slider-shell {
    flex: 0 0 75%;
    width: 75%;
    min-width: 0;
}

.panels {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.slide {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    border-radius: 16px;
    background: #75242b;
}

.slide.is-active {
    flex: 3 1 0;
    gap: 24px;
    aspect-ratio: 3 / 4;
    background: #31090e;
}

.slide.is-active::after {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(37, 4, 9, 0.92), rgba(37, 4, 9, 0.66) 48%, rgba(37, 4, 9, 0.96));
    content: "";
    pointer-events: none;
}

.slide-heading {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    margin: 0;
}

.slide:not(.is-active) .slide-heading {
    flex: 1;
}

.slide-toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-width: 0;
    padding: 24px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #f7a3b1;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
}

.slide-toggle:hover {
    color: #e8a759;
}

.slide:not(.is-active) .slide-toggle {
    align-items: center;
    min-height: 100%;
    font-size: 22px;
    writing-mode: vertical-rl;
}

.slide-content {
    display: flex;
    flex: 1;
    align-items: flex-end;
    min-width: 0;
}

.slide-content[hidden] {
    display: none;
}

.slide-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
}

.slide-copy {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 24px 24px;
    color: #f5e0e4;
    overflow-wrap: anywhere;
}

.slide-copy p {
    margin-bottom: 20px;
}

.slide-progress {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.progress-part {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: #86323b;
}

.progress-part.is-active {
    background: #e8a759;
}

.feature-note {
    flex: 1;
    min-width: 0;
    padding-bottom: 20px;
    color: #e8a759;
}

.feature-note svg {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin-bottom: 24px;
}

.feature-note p {
    font-size: 13px;
    line-height: 1.8;
}

.topics {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding-block: 24px;
    border-block: 1px solid rgba(247, 163, 177, 0.24);
}

.topics h2 {
    font-size: 18px;
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.post-label {
    overflow-wrap: anywhere;
}

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

.post-list > li {
    min-width: 0;
}

.post {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    align-items: stretch;
    gap: 40px;
    padding: 40px;
    border-radius: 20px;
    background: #6b1b20;
    box-shadow: 0 8px 24px rgba(27, 2, 5, 0.15);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.post:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(27, 2, 5, 0.23);
}

.post-list > li:nth-child(even) .post {
    grid-template-columns: minmax(0, 1fr) 225px;
}

.post-list > li:nth-child(even) .post-visual {
    grid-column: 2;
    grid-row: 1;
}

.post-list > li:nth-child(even) .post-details {
    grid-column: 1;
    grid-row: 1;
}

.post-visual {
    width: 225px;
    min-width: 0;
}

.post-visual img {
    width: 100%;
    height: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: #80313a;
}

.post-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    text-align: center;
}

.post-details h3 {
    display: -webkit-box;
    overflow: hidden;
    color: #f7a3b1;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.abstract {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-details footer {
    margin-top: auto;
    text-align: left;
}

.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 0;
    border-radius: 6px;
    color: #f7a3b1;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 250ms ease;
}

.text-button:hover {
    color: #e8a759;
    text-decoration: underline;
}

.text-button svg {
    width: 22px;
    height: 22px;
}

.story-columns {
    display: grid;
    grid-template-columns: minmax(0, 638px) 246px;
    align-items: start;
    justify-content: center;
    gap: 32px;
    min-width: 0;
}

.post-page {
    width: 100%;
    max-width: 638px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
}

.story-head {
    margin-bottom: 40px;
}

.story-head h1 {
    color: #f7a3b1;
    font-size: 56px;
    line-height: 1.15;
    letter-spacing: -0.055em;
}

.post-page p {
    margin-block: 0 24px;
}

.post-page h2 {
    margin-block: 40px 16px;
    color: #f7a3b1;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.35;
}

.post-page h3 {
    margin-block: 28px 12px;
    color: #f7a3b1;
    font-size: 23px;
    font-weight: 500;
    line-height: 1.4;
}

.post-page ul,
.post-page ol {
    margin-block: 0 24px;
    padding-inline-start: 26px;
}

.post-page ul {
    list-style-type: square;
}

.post-page li {
    margin-block: 8px;
    padding-inline-start: 4px;
}

.post-page li::marker {
    color: #e8a759;
}

.post-page blockquote {
    margin: 32px 0;
    padding: 24px;
    border-radius: 16px;
    background: #702027;
    color: #f1d7dc;
    font-size: 20px;
}

.post-page blockquote::before {
    display: block;
    margin-block-end: 12px;
    color: #e8a759;
    font-size: 50px;
    line-height: 1;
    content: "“";
}

.post-page blockquote p:last-child {
    margin-bottom: 0;
}

.post-page cite {
    display: block;
    margin-top: 16px;
    color: #d6c1c4;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
}

.post-page table {
    width: 100%;
    margin-block: 24px;
    border-collapse: collapse;
    font-size: 15px;
    text-align: left;
}

.post-page caption {
    padding-bottom: 12px;
    color: #f7a3b1;
    font-size: 14px;
    text-align: left;
    caption-side: top;
}

.post-page th,
.post-page td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(247, 163, 177, 0.25);
    vertical-align: top;
}

.post-page th {
    color: #f7a3b1;
    font-weight: 600;
}

.post-page figure {
    max-width: 100%;
    margin: 32px 0;
}

.post-page figure img {
    height: auto;
    border-radius: 12px;
}

.post-page figcaption {
    margin-top: 12px;
    font-size: 13px;
}

.post-page pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 20px;
    border-radius: 12px;
    background: #451013;
}

.post-page hr {
    margin-block: 32px;
    border: 0;
    border-top: 1px solid rgba(247, 163, 177, 0.24);
}

.story-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(247, 163, 177, 0.24);
}

.post-links {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.post-links a {
    flex: 1;
    padding-block: 8px;
    font-size: 14px;
    font-weight: 500;
}

.post-links a:last-child {
    text-align: right;
}

.side-notes {
    display: grid;
    gap: 24px;
    width: 246px;
    max-width: 100%;
    padding-top: 24px;
    border-top: 1px solid rgba(247, 163, 177, 0.24);
}

.side-notes > h2 {
    color: #e8a759;
    font-size: 22px;
    line-height: 1.4;
}

.side-notes > p {
    font-size: 14px;
}

.side-list {
    display: grid;
    gap: 28px;
}

.side-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.side-preview {
    width: 136px;
    max-width: 100%;
    height: 182px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    background: #80313a;
}

.side-copy {
    min-width: 0;
}

.side-copy h3 {
    font-size: 18px;
    line-height: 1.4;
}

.side-copy .text-button {
    margin-top: 4px;
    font-size: 14px;
}

.edition-foot {
    background: #501013;
}

.credits-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 28px;
    border-top: 1px solid rgba(247, 163, 177, 0.24);
    font-size: 12px;
}

.reveal.is-pending {
    opacity: 0;
    transform: scale(0.98);
}

.reveal.is-visible {
    animation: reveal-items 250ms ease 150ms backwards;
}

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

@media (max-width: 980px) {
    .story-columns {
        grid-template-columns: minmax(0, 638px);
    }

    .side-notes {
        width: 100%;
    }

    .side-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .topics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .slider-shell {
        flex-basis: 100%;
        width: 100%;
    }

    .feature-note {
        display: none;
    }

    .panels {
        flex-direction: column;
    }

    .slide,
    .slide.is-active {
        flex: none;
        width: 100%;
    }

    .slide:not(.is-active) .slide-toggle {
        align-items: flex-start;
        min-height: 0;
        padding: 18px 24px;
        font-size: 20px;
        writing-mode: horizontal-tb;
    }
}

@media (max-width: 800px) {
    html {
        scroll-padding-top: 88px;
    }

    body {
        font-size: 16px;
    }

    .edition-head {
        min-height: 64px;
    }

    .brand-row {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        min-height: 64px;
        gap: 8px;
    }

    .edition-title {
        grid-column: 2;
        grid-row: 1;
        font-size: 22px;
    }

    .edition-note,
    .edition-caption {
        display: none;
    }

    .edition-head.menu-ready .nav-switch {
        display: inline-flex;
        grid-column: 3;
        grid-row: 1;
    }

    .edition-head.menu-ready .navigation-row {
        display: none;
    }

    .main-content-frame {
        gap: 40px;
        margin-block: 40px;
    }

    .opening h1,
    .story-head h1 {
        font-size: 40px;
    }

    .section-title {
        font-size: 22px;
    }

    .post,
    .post-list > li:nth-child(even) .post {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 24px;
    }

    .post-list > li:nth-child(even) .post-visual,
    .post-list > li:nth-child(even) .post-details {
        grid-column: auto;
        grid-row: auto;
    }

    .post-visual {
        width: 100%;
        max-width: 360px;
        margin-inline: auto;
    }

    .post-visual img {
        height: auto;
    }

    .post-details {
        gap: 16px;
    }

    .post-details h3 {
        font-size: 24px;
    }

    .post-details footer {
        padding-top: 8px;
    }

    .slide-toggle {
        font-size: 24px;
    }

    .topic-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .story-head {
        margin-bottom: 32px;
    }

    .post-page h2 {
        margin-top: 32px;
        font-size: 27px;
    }

    .post-page h3 {
        font-size: 22px;
    }

    .post-page blockquote {
        font-size: 18px;
    }

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

@media (max-width: 480px) {
    .brand-row,
    .navigation-row,
    .main-content-frame,
    .credits-row,
    .read-main {
        width: calc(100% - 48px);
    }

    .edition-title {
        font-size: 19px;
    }

    .opening h1,
    .story-head h1 {
        font-size: 32px;
    }

    .section-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-note {
        text-align: left;
    }

    .slide-toggle {
        padding: 20px;
        font-size: 23px;
    }

    .slide-copy {
        padding: 0 20px 20px;
    }

    .slide:not(.is-active) .slide-toggle {
        padding: 16px 20px;
    }

    .post-links {
        flex-direction: column;
        gap: 12px;
    }

    .post-links a:last-child {
        text-align: left;
    }

    .credits-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .reveal.is-pending,
    .reveal.is-visible {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .post,
    .text-button {
        transition: none;
    }

    .post:hover {
        transform: none;
    }

    .panels,
    .slide,
    .navigation-dialog {
        scroll-behavior: auto;
    }
}
