:root {
    --bg: #ffffff;
    --fg: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #f9fafb;
    --shadow: 0 8px 28px rgba(17, 24, 39, .08);
    --radius: 16px;
    --max: 1040px;
    --ok: #16a34a;
}

* {
    box-sizing: border-box;
}

html:focus-within {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    line-height: 1.9;
    letter-spacing: .02em;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

footer {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    color: var(--muted);
    font-size: 13px;
    background: #fff;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 18px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--fg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

nav ul {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav a {
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
}

nav a:hover {
    border-color: var(--line);
    background: #fff;
    text-decoration: none;
}

main {
    padding: 26px 0 44px;
}

.hero {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 8px;
    font-size: clamp(22px, 3vw, 34px);
}

h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

h3 {
    margin: 14px 0 6px;
    font-size: 16px;
}

.lead {
    margin: 0;
    color: var(--muted);
    max-width: 78ch;
}

section {
    margin: 0 0 18px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

p {
    margin: 0 0 10px;
    color: var(--muted);
}

ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

li {
    margin: 6px 0;
}

.note {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--muted);
}

.cta,
.links,
.btnrow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 900;
}

.btn.primary {
    background: var(--fg);
    color: #fff;
    border-color: var(--fg);
}

.btn:hover,
.btn.primary:hover {
    text-decoration: none;
    opacity: .95;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width:920px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tile b {
    font-weight: 900;
}

.tile span {
    color: var(--muted);
    font-size: 13px;
}

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

.step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.num {
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(22, 163, 74, .12);
    color: var(--ok);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin: 10px 0;
}

summary {
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

.ans {
    margin-top: 10px;
    color: var(--muted);
}

.template {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    color: var(--muted);
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
}