:root {
    --page: #ffffff;
    --text: #1f2328;
    --text-soft: #4d5967;
    --text-muted: #7a8694;
    --line: #e2e8f0;
    --line-strong: #d4dde8;
    --panel: #f5f7fa;
    --panel-soft: #fafbfc;
    --accent: #ff6b2c;
    --accent-deep: #c94713;
    --blue: #1f78b4;
    --blue-soft: #edf7ff;
    --yellow-soft: #fff9da;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.72;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.15s ease-out;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 0 max(1.25rem, calc((100vw - 1160px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    min-height: 34px;
}

.brand-word {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
}

.brand-word__accent {
    color: var(--accent);
}

.brand-word__zone {
    color: var(--text-soft);
    font-weight: 800;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 1.45rem;
}

.site-header__nav a {
    color: var(--text-soft);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
}

.site-header__nav a:hover {
    color: var(--accent-deep);
}

.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 5.2rem auto 5rem;
    display: grid;
    grid-template-columns: minmax(0, 730px) 300px;
    gap: 5rem;
    align-items: start;
}

.article {
    min-width: 0;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.breadcrumbs a {
    color: var(--text-soft);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-deep);
}

.article-hero__label {
    margin: 0 0 0.9rem;
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    max-width: 720px;
    color: var(--text);
    font-size: clamp(2.35rem, 4.4vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.article-hero__lead {
    margin: 1.35rem 0 0;
    max-width: 700px;
    color: #101820;
    font-size: clamp(1.08rem, 1.55vw, 1.22rem);
    line-height: 1.78;
}

.article-meta {
    margin-top: 1.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.05rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.article-meta span + span::before {
    content: "•";
    margin-right: 1.05rem;
    color: var(--line-strong);
}

.feature-image {
    margin: 2.8rem 0 2.4rem;
}

.feature-image img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 2px;
}

.feature-image figcaption {
    margin-top: 0.7rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.article section {
    margin-top: 3.7rem;
}

.intro-card {
    margin-top: 2.3rem;
    padding: 1.4rem 1.65rem;
    background: var(--yellow-soft);
}

.intro-card p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.7;
}

.article h2 {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: clamp(1.85rem, 2.8vw, 2.45rem);
    line-height: 1.16;
    letter-spacing: 0;
}

.article h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.42;
}

.article h2,
.article h3 {
    scroll-margin-top: 6rem;
}

.article p {
    margin: 0.9rem 0;
    color: var(--text);
    font-size: 1.02rem;
}

.note-box {
    margin-top: 1.45rem;
    padding: 1.1rem 1.25rem;
    border-left: 4px solid var(--accent);
    background: #fff4ec;
    color: var(--text);
}

.type-grid {
    margin-top: 1.35rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.type-card {
    min-height: 168px;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 8px;
    background: var(--panel-soft);
}

.type-card__marker {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.type-card p {
    margin-bottom: 0;
    color: var(--text-soft);
}

.timeline-list,
.action-list,
.check-list {
    margin: 1.35rem 0 0;
    padding: 0;
}

.timeline-list {
    list-style: none;
}

.timeline-list li {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 0.95rem;
    padding-bottom: 1.35rem;
}

.timeline-list li::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 10px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.timeline-list li:last-child {
    padding-bottom: 0;
}

.timeline-list li:last-child::before {
    display: none;
}

.timeline-list__point {
    width: 18px;
    height: 18px;
    margin-top: 0.27rem;
    border: 5px solid var(--blue-soft);
    border-radius: 50%;
    background: var(--blue);
}

.timeline-list p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
}

.risk-panel {
    margin-top: 1.35rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel-soft);
}

.risk-panel div {
    padding: 1.15rem;
}

.risk-panel div + div {
    border-left: 1px solid var(--line);
}

.risk-panel__label {
    color: var(--accent-deep);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.risk-panel p {
    margin-bottom: 0;
    color: var(--text-soft);
}

.action-list {
    counter-reset: action-counter;
    list-style: none;
}

.action-list li {
    counter-increment: action-counter;
    position: relative;
    padding: 1.15rem 0 1.15rem 3.35rem;
    border-top: 1px solid var(--line);
}

.action-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.action-list li::before {
    content: counter(action-counter);
    position: absolute;
    top: 1.18rem;
    left: 0;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 800;
}

.action-list p {
    margin: 0.28rem 0 0;
    color: var(--text-soft);
}

.tool-strip {
    margin-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tool-strip span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-soft);
    padding: 0.3rem 0.78rem;
    font-size: 0.9rem;
}

pre {
    margin: 1.25rem 0 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: #26313d;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    line-height: 1.55;
    white-space: pre-wrap;
}

code {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.92rem;
    word-break: break-word;
}

.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2rem;
    border-top: 1px solid var(--line);
}

.check-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.7rem;
    color: var(--blue);
    font-weight: 800;
}

.article-footer {
    margin-top: 4rem;
    padding-top: 1.6rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--line);
}

.article-footer p {
    margin-top: 0;
    color: var(--text-soft);
    font-size: 1.04rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prepared-by {
    margin: 1.8rem 0 0;
    color: var(--text);
    font-weight: 700;
}

.toc-wrap {
    position: sticky;
    top: 6rem;
}

.toc {
    padding: 1.45rem 1.35rem;
    border-radius: 8px;
    background: var(--panel);
}

.toc__title {
    margin: 0 0 0.8rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}

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

.toc__list li + li {
    margin-top: 0.42rem;
}

.toc__list a {
    position: relative;
    display: block;
    padding: 0.25rem 0 0.25rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.94rem;
    line-height: 1.38;
}

.toc__list a::before {
    content: "";
    position: absolute;
    top: 0.88rem;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cdd7e3;
}

.toc__list a:hover,
.toc__list a.is-active {
    color: var(--accent-deep);
}

.toc__list a.is-active::before {
    background: var(--accent);
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 14px 34px -22px rgba(31, 41, 51, 0.45);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

@media (max-width: 1020px) {
    .page-shell {
        grid-template-columns: minmax(0, 730px);
        gap: 0;
        margin-top: 3.2rem;
    }

    .toc-wrap {
        display: none;
    }
}

@media (max-width: 700px) {
    .site-header {
        min-height: 62px;
        padding-inline: 1rem;
    }

    .site-header__nav {
        display: none;
    }

    .page-shell {
        width: calc(100% - 2rem);
        margin-top: 2.4rem;
        margin-bottom: 3rem;
    }

    .breadcrumbs {
        margin-bottom: 1.5rem;
    }

    h1 {
        font-size: clamp(2rem, 12vw, 2.65rem);
    }

    .feature-image {
        margin-top: 2rem;
    }

    .article section {
        margin-top: 3rem;
    }

    .intro-card {
        padding: 1.15rem 1.2rem;
    }

    .type-grid,
    .risk-panel {
        grid-template-columns: 1fr;
    }

    .risk-panel div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}
