* {
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --card: #ffffff;
    --text: #1f2937;
    --subtext: #475569;
    --line: #dbe4ee;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #eff6ff;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    line-height: 1.8;
    color: var(--text);
    background:
        linear-gradient(180deg, #eaf2ff 0%, #f8fbff 240px, #f4f7fb 100%);
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    padding: 72px 0 56px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.25), transparent 35%),
        linear-gradient(135deg, #0f172a, #172554 58%, #1e3a8a);
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.2;
}

.hero-text {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button,
.small-button {
    appearance: none;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    font-weight: 700;
}

.button:hover,
.small-button:hover {
    transform: translateY(-1px);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
}

.button.primary {
    background: #fff;
    color: var(--primary-dark);
}

.button.secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.small-button {
    padding: 8px 14px;
    background: var(--accent);
    color: var(--primary-dark);
}

main {
    margin-top: -24px;
    padding-bottom: 48px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    margin-bottom: 22px;
    border: 1px solid rgba(219, 228, 238, 0.8);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1.6rem;
    line-height: 1.4;
}

.card h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.toc ol {
    margin: 0;
    padding-left: 1.2rem;
}

.toc a {
    color: var(--primary-dark);
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.info-box,
.check-item {
    background: #f8fbff;
    border: 1px solid #d9e7ff;
    border-radius: 14px;
    padding: 16px;
}

.example-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.flow-item {
    min-width: 180px;
    text-align: center;
    background: #f8fbff;
    border: 1px solid #cfe0ff;
    border-radius: 16px;
    padding: 18px 14px;
    font-weight: 700;
}

.flow-item span {
    display: block;
    margin-top: 6px;
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--subtext);
}

.flow-arrow {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.steps {
    padding-left: 1.2rem;
}

pre {
    overflow-x: auto;
    background: #0f172a;
    color: #e5eefc;
    padding: 18px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.7;
    border: 1px solid #1f2d46;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.demo-area {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #d9e7ff;
}

.result-list {
    margin: 16px 0 0;
    padding-left: 1.2rem;
}

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

.trigger-card {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.video-box {
    border: 1px solid #d9e7ff;
    border-radius: 16px;
    padding: 18px;
    background: #fff;
}

.video-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 700;
}

.video-link a {
    color: var(--primary-dark);
    font-weight: 700;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin-top: 14px;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mini-article {
    margin-top: 20px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #d9e7ff;
}

.footer {
    padding: 28px 0 48px;
    color: #334155;
}

.footer p {
    margin: 6px 0;
}

.footer-note {
    font-size: 0.95rem;
}

@media (max-width: 820px) {
    .grid.two,
    .check-list {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .hero {
        padding: 56px 0 48px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }
}