/* ========== Base ========== */
:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --border: #e5e7eb;
    --card: #ffffff;
    --surface: #f8fafc;
    --shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --radius: 16px;
    --radius-sm: 12px;
    --max: 980px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

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

a {
    color: inherit;
    text-decoration-thickness: .08em;
    text-underline-offset: .18em;
}

a:hover {
    opacity: .9;
}

/* Focus (accessibility) */
:focus-visible {
    outline: 3px solid rgba(15, 23, 42, .25);
    outline-offset: 3px;
}

/* Layout */
.container {
    width: min(var(--max), 100% - 32px);
    margin-inline: auto;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 10px 12px;
    background: var(--text);
    color: #fff;
    border-radius: 10px;
    z-index: 9999;
    text-decoration: none;
}

/* ========== Header ========== */
.site-header {
    padding: 28px 0 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), #fff);
}

.site-badge {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .02em;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    margin: 0 0 10px;
}

.site-header h1 {
    margin: 0 0 10px;
    font-size: clamp(22px, 3.2vw, 34px);
    line-height: 1.25;
}

.lead {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15.5px;
}

.lead strong {
    color: var(--text);
}

/* Nav */
.nav {
    margin-top: 10px;
}

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

.nav a {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
}

.nav a:hover {
    color: var(--text);
    border-color: #d1d5db;
}

/* ========== Main ========== */
main {
    padding: 22px 0 36px;
}

section {
    margin: 22px 0;
}

h2 {
    margin: 0 0 12px;
    font-size: clamp(18px, 2.3vw, 22px);
    line-height: 1.35;
}

h3 {
    margin: 0 0 10px;
    font-size: 16.5px;
    line-height: 1.35;
}

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

ul,
ol {
    margin: 10px 0 0 0;
    padding-left: 1.1em;
}

li {
    margin: 6px 0;
    color: var(--text);
}

small,
.small {
    color: var(--muted);
    font-size: 12.5px;
}

/* Steps */
.steps {
    margin: 10px 0 0;
    padding-left: 1.25em;
}

.steps li {
    margin: 8px 0;
    color: var(--text);
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 14px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.card ul {
    margin-top: 8px;
}

.card li {
    color: var(--text);
}

.card strong {
    color: var(--text);
}

/* CTA Button */
.cta {
    margin-top: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .01em;
    box-shadow: var(--shadow);
}

.btn:hover {
    opacity: .95;
}

.btn:active {
    transform: translateY(1px);
}

/* Secondary button (optional: if you add class="btn btn-ghost") */
.btn-ghost {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
    box-shadow: none;
}

/* Mini CTA note */
.mini-cta {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
}

.mini-cta a {
    color: var(--text);
}

/* Table */
.table-wrap {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    /* horizontal scroll on small screens */
}

th,
td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size: 14px;
}

thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

th {
    text-align: left;
    color: var(--muted);
    font-weight: 700;
}

td strong {
    color: var(--text);
}

tbody tr:hover {
    background: #fafafa;
}

/* Link list (top page sections) */
.link-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 10px;
}

.link-list a {
    display: block;
    padding: 12px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    color: var(--text);
}

.link-list a:hover {
    border-color: #d1d5db;
    background: #fcfcfd;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 18px 0 26px;
}

/* Responsive */
@media (min-width: 820px) {
    .cards {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .btn {
        width: auto;
        min-width: 240px;
    }

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