:root {
    color-scheme: light dark;

    --bg: #f4f6f4;
    --bg-elevated: #ffffff;
    --ink: #1a2421;
    --muted: #5c6b66;
    --line: #d5ddd9;
    --accent: #0f6b5c;
    --accent-hover: #0c574b;
    --accent-soft: #e6f3ef;
    --danger: #b42318;
    --header-bg: rgba(244, 246, 244, 0.9);
    --glow-1: #dcece7;
    --glow-2: #e8eee9;
    --code-bg: #1f2a27;
    --code-ink: #e8f0ed;
    --on-accent: #ffffff;
    --radius: 6px;
    --max: 1080px;
    --font: "IBM Plex Sans JP", "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "Consolas", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121816;
        --bg-elevated: #1a221f;
        --ink: #e8f0ed;
        --muted: #9aada6;
        --line: #2e3a36;
        --accent: #3cb89e;
        --accent-hover: #58c9b0;
        --accent-soft: #1e332d;
        --danger: #f97066;
        --header-bg: rgba(18, 24, 22, 0.9);
        --glow-1: #1a2e28;
        --glow-2: #18241f;
        --code-bg: #0d1210;
        --code-ink: #d7e6e0;
        --on-accent: #0b1411;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, var(--glow-1) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 0%, var(--glow-2) 0%, transparent 45%),
        var(--bg);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

.container {
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.brand:hover {
    text-decoration: none;
    color: var(--accent);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ink);
    text-decoration: none;
}

.hero {
    padding: 5.5rem 0 3.5rem;
}

.hero-inner {
    display: grid;
    gap: 2rem;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    max-width: 14ch;
}

.hero .lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 40rem;
    margin-top: 1rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
}

.section {
    padding: 3rem 0;
}

.section + .section {
    border-top: 1px solid var(--line);
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.section .sub {
    color: var(--muted);
    margin-bottom: 1.75rem;
    max-width: 40rem;
}

.feature-list {
    display: grid;
    gap: 1rem;
    list-style: none;
}

@media (min-width: 720px) {
    .feature-list {
        grid-template-columns: 1fr 1fr;
    }
}

.feature-list li {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}

.feature-list h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.feature-list p {
    color: var(--muted);
    font-size: 0.95rem;
}

.steps {
    display: grid;
    gap: 1rem;
    counter-reset: step;
    list-style: none;
}

.steps li {
    position: relative;
    padding: 1rem 1rem 1rem 3.2rem;
    background: var(--accent-soft);
    border-radius: var(--radius);
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.85rem;
    display: grid;
    place-items: center;
    font-weight: 600;
}

pre,
code {
    font-family: var(--mono);
}

pre {
    background: var(--code-bg);
    color: var(--code-ink);
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 0.75rem 0 1.25rem;
}

code.inline {
    background: var(--accent-soft);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.cmd-block {
    margin-bottom: 1.5rem;
}

.cmd-block h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.cmd-block ul {
    margin-left: 1.2rem;
    color: var(--muted);
}

.page-hero {
    padding: 3.5rem 0 1.5rem;
}

.page-hero h1 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 600;
}

.page-hero p {
    color: var(--muted);
    margin-top: 0.5rem;
    max-width: 40rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0 2.5rem;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.note {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1rem;
    background: var(--accent-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
    color: var(--muted);
}

@media (max-width: 640px) {
    .nav-links {
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    .hero {
        padding-top: 3.5rem;
    }
}
