.read-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1040;
    height: 3px;
    pointer-events: none;
}
.read-progress__bar {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.article-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    column-gap: var(--split-gap);
    align-items: center;
}
.article-head__topic {
    display: inline-block;
    margin-top: 28px;
    padding: 5px 12px;
    border: 1px solid rgba(253, 115, 4, 0.35);
    border-radius: 999px;
    background: rgba(253, 115, 4, 0.1);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}
:where(.section) .article-head__topic {
    color: var(--orange);
}
.article-head__title {
    margin-top: 18px;
    font-size: clamp(36px, 3.6vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.025em;
}
.article-head__lead {
    max-width: 620px;
    margin-top: 20px;
    font-size: 19px;
    line-height: 1.6;
}
.article-head__meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.article-head__fact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--body);
    font-size: 15px;
    line-height: 22px;
}
.article-head__icon {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--muted);
}
.article-head__cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.article-head__img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 320px;
    justify-content: space-between;
    column-gap: 56px;
}
.article-layout__main {
    min-width: 0;
}
.article-layout__share {
    margin-top: 56px;
}
.article-layout__author {
    margin-top: 24px;
}
.article-layout__pager {
    margin-top: 24px;
}

.toc-drawer {
    display: none;
}

.prose {
    color: var(--body);
    font-size: 18px;
    line-height: 1.75;
    overflow-wrap: break-word;
}
.prose :where([style]) {
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background: transparent !important;
}
.prose > * + * {
    margin-top: 22px;
}
.prose p {
    color: var(--body);
}
.prose h2 {
    margin-top: 64px;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.015em;
    scroll-margin-top: 24px;
}
.prose h3 {
    margin-top: 40px;
    font-size: 22px;
    line-height: 1.35;
    scroll-margin-top: 24px;
}
.prose h4 {
    margin-top: 32px;
    color: var(--text);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}
.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
    margin-top: 14px;
}
.prose > :first-child {
    margin-top: 0;
}
.prose strong,
.prose b {
    color: var(--text);
    font-weight: 600;
}
.prose a {
    color: var(--orange);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
.prose a:hover {
    color: var(--text);
    text-decoration: underline;
}
.prose ul,
.prose ol {
    display: grid;
    row-gap: 10px;
}
.prose li {
    position: relative;
    padding-left: 30px;
}
.prose ul > li::before {
    content: "";
    position: absolute;
    top: 0.72em;
    left: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
}
.prose ol {
    counter-reset: prose-list;
}
.prose ol > li {
    counter-increment: prose-list;
}
.prose ol > li::before {
    content: counter(prose-list);
    position: absolute;
    top: 0.2em;
    left: 0;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(253, 115, 4, 0.14);
    color: var(--orange);
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.prose li > ul,
.prose li > ol {
    margin-top: 10px;
}
.prose blockquote {
    margin-right: 0;
    margin-left: 0;
    padding: 6px 0 6px 24px;
    border-left: 3px solid var(--orange);
    color: var(--text);
    font-size: 21px;
    line-height: 1.55;
}
.prose hr {
    height: 1px;
    margin: 48px 0;
    border: 0;
    background: var(--line);
    opacity: 1;
}
.prose code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    font-size: 0.88em;
}

.article-table {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
}
.article-table table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.5;
}
.article-table th,
.article-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.article-table th {
    background: var(--card);
    color: var(--text);
    font-weight: 600;
}
.article-table tr:last-child td {
    border-bottom: 0;
}
.article-table td:first-child {
    color: var(--text);
    font-weight: 600;
}

.article-figure {
    margin: 36px 0 0;
}
.article-figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.article-figure img[data-zoom] {
    cursor: zoom-in;
}
.article-figure img[data-zoom]:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}
.article-figure figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.article-faq {
    display: grid;
    row-gap: 12px;
}
.article-faq__item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    transition: border-color 0.2s ease;
}
.article-faq__item:hover,
.article-faq__item[open] {
    border-color: var(--border);
}
.article-faq__question {
    position: relative;
    display: block;
    padding: 18px 56px 18px 22px;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    list-style: none;
    cursor: pointer;
}
.article-faq__question::-webkit-details-marker {
    display: none;
}
.article-faq__question::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 24px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
}
.article-faq__item[open] .article-faq__question::after {
    transform: translateY(-30%) rotate(225deg);
}
.article-faq__question:focus-visible {
    border-radius: var(--radius-sm);
    outline: 2px solid var(--text);
    outline-offset: 2px;
}
.article-faq__answer {
    padding: 0 22px 20px;
    font-size: 17px;
    line-height: 1.7;
}
.article-faq__answer > * + * {
    margin-top: 12px;
}

.toc {
    display: grid;
    row-gap: 2px;
}
.toc__link {
    position: relative;
    display: block;
    padding: 8px 12px 8px 16px;
    border-radius: 8px;
    color: var(--body);
    font-size: 14px;
    line-height: 1.45;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.toc__link::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
    transition: background-color 0.2s ease;
}
:where(.section) .toc__link:hover {
    color: var(--text);
}
:where(.section) .toc__link[aria-current="true"] {
    background: rgba(253, 115, 4, 0.08);
    color: var(--text);
}
.toc__link[aria-current="true"]::before {
    background: var(--orange);
}

.article-layout__side {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    row-gap: 16px;
}
.side {
    position: sticky;
    top: 24px;
    display: grid;
    row-gap: 16px;
}
.side-card {
    padding: 22px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
}
:where(.section) .side-card__title {
    margin-bottom: 14px;
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: 0;
}
.side-card--toc .toc {
    max-height: calc(100vh - 340px);
    min-height: 160px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.side-card__posts {
    display: grid;
    row-gap: 16px;
}

.cta-card {
    padding: 24px 22px;
    border: 1px solid rgba(253, 115, 4, 0.35);
    border-radius: var(--radius-md);
    background: var(--card);
}
.cta-card__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}
:where(.section) .cta-card__title {
    color: var(--text);
}
.cta-card__text {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
}
.cta-card__button {
    width: 100%;
    margin-top: 18px;
}
:where(.section) .cta-card__button,
:where(.section) .cta-card__button:hover {
    color: #fff;
}

.mini-post {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
}
.mini-post__img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
}
:where(.section) .mini-post__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
}
.mini-post__link {
    transition: color 0.2s ease;
}
.mini-post__link::after {
    content: "";
    position: absolute;
    inset: 0;
}
:where(.section) .mini-post:hover .mini-post__link {
    color: var(--orange);
}
.mini-post__date {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
    line-height: 18px;
}

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 20px;
    row-gap: 12px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.share__title {
    font-size: 16px;
    font-weight: 600;
}
:where(.section) .share__title {
    color: var(--text);
}
.share__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.share__link,
.share__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--body);
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.share__button {
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
}
:where(.section) .share__link:hover,
.share__button:hover {
    border-color: var(--border-hover);
    background: var(--card);
    color: var(--text);
}
.share__button:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}
.share__icon {
    flex: none;
    width: 20px;
    height: 20px;
}

.author {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 20px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
}
.author__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.author__label {
    font-size: 14px;
    line-height: 20px;
}
:where(.section) .author__label {
    color: var(--muted);
}
.author__name {
    margin-top: 2px;
    font-size: 17px;
    line-height: 1.45;
}
.author__link {
    font-weight: 600;
    transition: color 0.2s ease;
}
:where(.section) .author__link {
    color: var(--text);
}
:where(.section) .author__link:hover {
    color: var(--orange);
}
.author__text {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.pager__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pager__link--newer {
    grid-column: 2;
    align-items: flex-end;
    text-align: right;
}
:where(.section) .pager__link:hover {
    border-color: var(--border);
    background: var(--card);
}
.pager__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 20px;
}
.pager__icon {
    width: 16px;
    height: 16px;
}
.pager__title {
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}
.pager__link:hover .pager__title {
    color: var(--orange);
}

.related {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.related-card {
    position: relative;
}
.related-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    object-fit: cover;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.related-card:hover .related-card__img,
.related-card:focus-within .related-card__img {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}
.related-card__date {
    display: block;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 20px;
}
:where(.section) .related-card__title {
    margin-top: 6px;
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.005em;
}
.related-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.lightbox {
    position: fixed;
    inset: 0;
    overflow: hidden;
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 72px 24px 24px;
    border: 0;
    background: transparent;
}
.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
}
.lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    cursor: zoom-out;
}
.lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}
.lightbox__close:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}
.lightbox__icon {
    width: 22px;
    height: 22px;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 1050;
    margin: 0;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast:empty {
    padding: 0;
    border: 0;
}
.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1199.98px) {
    .article-head {
        grid-template-columns: minmax(0, 1fr) 340px;
    }
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        column-gap: 40px;
    }
    .related {
        gap: 20px;
    }
}

@media (max-width: 991.98px) {
    .article-head {
        grid-template-columns: minmax(0, 1fr) 260px;
        column-gap: 32px;
    }
    .article-head__title {
        font-size: 36px;
    }
    .article-head__lead {
        font-size: 17px;
    }
    .article-layout {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 40px;
    }
    .article-layout__main {
        max-width: 720px;
    }
    .toc-drawer {
        display: block;
        margin-bottom: 36px;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--card);
    }
    .toc-drawer__summary {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 20px;
        list-style: none;
        cursor: pointer;
    }
    .toc-drawer__summary::-webkit-details-marker {
        display: none;
    }
    .toc-drawer__summary::after {
        content: "";
        flex: none;
        width: 9px;
        height: 9px;
        margin-left: 4px;
        border-right: 2px solid var(--orange);
        border-bottom: 2px solid var(--orange);
        transform: translateY(-25%) rotate(45deg);
        transition: transform 0.2s ease;
    }
    .toc-drawer[open] .toc-drawer__summary::after {
        transform: translateY(25%) rotate(225deg);
    }
    .toc-drawer__summary:focus-visible {
        border-radius: var(--radius-md);
        outline: 2px solid var(--text);
        outline-offset: 2px;
    }
    .toc-drawer__icon {
        flex: none;
        width: 20px;
        height: 20px;
        color: var(--orange);
    }
    .toc-drawer__title {
        color: var(--text);
        font-size: 17px;
        font-weight: 600;
    }
    .toc-drawer__count {
        margin-left: auto;
        color: var(--muted);
        font-size: 14px;
    }
    .toc-drawer__list {
        padding: 0 12px 14px;
    }
    .article-layout__side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        column-gap: 16px;
        align-items: start;
    }
    .side {
        position: static;
    }
    .side-card--toc {
        display: none;
    }
    .related {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
    :where(.section) .related-card__title {
        font-size: 17px;
    }
}

@media (max-width: 767.98px) {
    .article-head {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 28px;
    }
    .article-head__topic {
        margin-top: 20px;
    }
    .article-head__title {
        font-size: 30px;
        line-height: 1.15;
    }
    .article-head__meta {
        column-gap: 18px;
        margin-top: 24px;
        padding-top: 18px;
    }
    .article-head__fact {
        font-size: 14px;
    }
    .article-head__cover {
        max-width: 420px;
    }
    .prose {
        font-size: 17px;
        line-height: 1.7;
    }
    .prose h2 {
        margin-top: 48px;
        font-size: 24px;
    }
    .prose h3 {
        margin-top: 32px;
        font-size: 19px;
    }
    .prose blockquote {
        font-size: 19px;
    }
    .article-faq__question {
        padding: 16px 48px 16px 18px;
        font-size: 16px;
    }
    .article-faq__question::after {
        right: 20px;
    }
    .article-faq__answer {
        padding: 0 18px 18px;
        font-size: 16px;
    }
    .article-layout__side {
        grid-template-columns: minmax(0, 1fr);
    }
    .author {
        grid-template-columns: 48px minmax(0, 1fr);
        column-gap: 16px;
        padding: 20px;
    }
    .author__badge {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
    .pager {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .pager__link--newer {
        grid-column: auto;
    }
    .related {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .related-card {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        column-gap: 16px;
        align-items: start;
    }
    .related-card__img {
        grid-row: 1 / span 2;
        border-radius: var(--radius-sm);
    }
    .related-card__date {
        margin-top: 0;
    }
    :where(.section) .related-card__title {
        font-size: 16px;
    }
    .toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        text-align: center;
        transform: translateY(12px);
    }
    .toast.is-visible {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .read-progress__bar,
    .related-card__img,
    .toast,
    .article-faq__question::after,
    .toc-drawer__summary::after {
        transition: none;
    }
    .related-card:hover .related-card__img,
    .related-card:focus-within .related-card__img {
        transform: none;
    }
}
