:root {
	--bg: #ffffff;
	--bg-alt: #f5f7fb;
	--surface: #ffffff;
	--text: #1a1f2b;
	--text-muted: #5b6474;
	--border: #e3e7ee;
	--accent: #1d4ed8;
	--accent-hover: #1e40af;
	--accent-soft: #e8eefc;
	--highlight: #c9f4ff;
	--changed: #d6283a;
	--shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
	--radius: 14px;
	--font: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, system-ui, sans-serif;
	--mono: Menlo, Monaco, Consolas, "MS Gothic", "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1420;
		--bg-alt: #151b29;
		--surface: #1b2232;
		--text: #e8ecf3;
		--text-muted: #a3acbd;
		--border: #2a3346;
		--accent: #6d9cff;
		--accent-hover: #8fb3ff;
		--accent-soft: #1f2b47;
		--highlight: #1f4f5c;
		--changed: #ff6b7a;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
	}
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 72px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.8;
}

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

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

a:hover {
	text-decoration: underline;
}

h1, h2, h3 {
	line-height: 1.35;
	margin: 0 0 0.5em;
	font-weight: 700;
	letter-spacing: 0.01em;
}

h2 {
	font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.1rem);
}

h3 {
	font-size: 1.15rem;
}

p {
	margin: 0 0 1em;
}

ul, ol {
	margin: 0 0 1em;
	padding-left: 1.4em;
}

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

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--accent);
	color: #fff;
	padding: 8px 12px;
	z-index: 100;
}

.skip-link:focus {
	left: 8px;
}

/* header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	gap: 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--text);
}

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

.site-nav {
	display: flex;
	align-items: center;
	gap: 4px 22px;
	font-size: 0.95rem;
}

.site-nav a {
	color: var(--text);
	white-space: nowrap;
}

.site-nav a:hover {
	color: var(--accent);
	text-decoration: none;
}

.site-nav .nav-cta {
	color: #fff;
}

.nav-toggle {
	display: none;
}

.nav-button {
	display: none;
}

/* buttons */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font-weight: 700;
	line-height: 1.3;
	transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.button:hover {
	text-decoration: none;
	border-color: var(--accent);
	color: var(--accent);
	transform: translateY(-1px);
}

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

.button-primary:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
	color: #fff;
}

.button-secondary {
	background: var(--accent-soft);
	border-color: var(--accent-soft);
	color: var(--accent);
}

.button-small {
	padding: 8px 16px;
	font-size: 0.9rem;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0 16px;
}

.actions-compact {
	margin: 12px 0 0;
}

/* hero */

.hero {
	padding: 64px 0 56px;
	background:
		radial-gradient(60% 80% at 100% 0%, var(--accent-soft) 0%, transparent 60%),
		var(--bg);
}

.hero-inner {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 48px;
	align-items: center;
}

.eyebrow {
	color: var(--accent);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	margin-bottom: 8px;
}

.hero h1 {
	font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
	line-height: 1.25;
	margin-bottom: 20px;
}

.lead {
	font-size: 1.08rem;
	color: var(--text-muted);
}

.hero-notes {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	color: var(--text-muted);
	font-size: 0.92rem;
}

.hero-notes li::before {
	content: "✓";
	color: var(--accent);
	font-weight: 700;
	margin-right: 6px;
}

/* editor mock */

.editor-mock {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	font-family: var(--mono);
	font-size: 0.92rem;
}

.editor-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--border);
	background: var(--bg-alt);
}

.editor-bar .play,
.editor-bar .step,
.editor-bar .stop {
	width: 0;
	height: 0;
	display: inline-block;
}

.editor-bar .play {
	border-left: 14px solid var(--accent);
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
}

.editor-bar .step {
	border-left: 12px solid var(--accent);
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	box-shadow: 4px 0 0 0 var(--accent);
	margin-right: 4px;
}

.editor-bar .stop {
	width: 13px;
	height: 13px;
	background: #7a1c1c;
	margin-left: 4px;
}

.editor-bar .speed {
	margin-left: 6px;
	font-family: var(--font);
	font-size: 0.8rem;
	padding: 1px 8px;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--surface);
}

.editor-body {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
}

.editor-mock .code {
	margin: 0;
	padding: 12px 0 14px;
	line-height: 1.6;
	overflow-x: auto;
	border-right: 1px solid var(--border);
	tab-size: 4;
}

.editor-mock .ln {
	display: inline-block;
	width: 2.2em;
	padding-right: 0.6em;
	text-align: right;
	color: var(--accent);
	opacity: 0.75;
	user-select: none;
}

.editor-mock .kw {
	color: var(--accent);
}

.editor-mock .current {
	background: var(--highlight);
}

.editor-mock .ln.current {
	background: transparent;
}

.editor-mock .code .current:not(.ln) {
	display: inline-block;
	width: calc(100% - 2.2em);
}

.vars {
	border-collapse: collapse;
	width: 100%;
	align-self: start;
}

.vars th {
	text-align: left;
	font-weight: 400;
	color: var(--text-muted);
	background: var(--bg-alt);
	padding: 6px 12px;
	border-bottom: 1px solid var(--border);
}

.vars td {
	padding: 6px 12px;
}

.vars .changed {
	color: var(--changed);
}

.caption {
	font-size: 0.85rem;
	color: var(--text-muted);
	margin: 10px 4px 0;
}

/* sections */

.section {
	padding: 72px 0;
}

.section-alt {
	background: var(--bg-alt);
}

.section-lead {
	max-width: 760px;
	color: var(--text-muted);
	font-size: 1.05rem;
	margin-bottom: 32px;
}

.sub-heading {
	margin-top: 48px;
	margin-bottom: 16px;
	font-size: 1.3rem;
}

.small {
	font-size: 0.9rem;
	color: var(--text-muted);
}

.grid {
	display: grid;
	gap: 20px;
}

.cards {
	grid-template-columns: repeat(3, 1fr);
}

.two {
	grid-template-columns: repeat(2, 1fr);
}

.three {
	grid-template-columns: repeat(3, 1fr);
}

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

.card h3 {
	font-size: 1.1rem;
}

.card p:last-child {
	margin-bottom: 0;
}

.card-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--accent-soft);
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	margin-bottom: 14px;
}

/* screenshots */

.screens {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.2fr;
	gap: 20px;
	align-items: start;
}

.screen {
	margin: 0;
}

.screen img {
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: var(--shadow);
	background: #fff;
}

.screen figcaption {
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-top: 8px;
}

.screen-feature {
	margin: 0 0 16px;
}

.screen-feature img {
	width: 100%;
}

/* AI flow */

.flow {
	margin-top: 8px;
}

.flow-steps {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	counter-reset: step;
}

.flow-steps li {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px 20px 16px;
	counter-increment: step;
}

.flow-steps li::before {
	content: counter(step);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	margin-bottom: 12px;
}

.flow-steps strong {
	display: block;
	margin-bottom: 6px;
	line-height: 1.4;
}

.flow-steps p {
	margin: 0;
	font-size: 0.92rem;
	color: var(--text-muted);
}

.flow-who {
	position: absolute;
	top: -12px;
	right: 14px;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
}

.flow-note {
	border: 1px dashed var(--accent);
	border-radius: var(--radius);
	padding: 14px 18px;
	margin: 0;
	color: var(--text);
}

.tag {
	display: inline-block;
	background: #e8930c;
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	padding: 2px 12px;
	border-radius: 999px;
	margin-right: 8px;
}

.api-box {
	margin-top: 48px;
	padding: 28px;
	border-radius: var(--radius);
	background: var(--accent-soft);
}

.api-box h3 {
	margin-bottom: 8px;
}

.api-box p {
	margin-bottom: 0.6em;
}

.api-box p:last-of-type {
	margin-bottom: 0;
}

/* editions */

.edition ul {
	padding-left: 1.2em;
	color: var(--text-muted);
	font-size: 0.95rem;
}

.edition-tag {
	color: var(--accent);
	font-weight: 700;
	font-size: 0.92rem;
	margin-bottom: 10px;
}

.edition .links {
	margin: 0;
	font-size: 0.95rem;
}

/* docs */

.link-group h3 {
	font-size: 1rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-bottom: 1px solid var(--border);
	padding-bottom: 8px;
}

.link-group ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.link-group li {
	padding: 4px 0;
}

/* CTA */

.section-cta {
	text-align: center;
	background: var(--bg-alt);
	border-top: 1px solid var(--border);
}

.section-cta .section-lead {
	margin-left: auto;
	margin-right: auto;
}

.section-cta .actions {
	justify-content: center;
}

/* footer */

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

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}

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

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.copyright {
	width: 100%;
	margin: 8px 0 0;
	font-size: 0.82rem;
}

/* responsive */

/* メニューが 1 行に収まらない幅ではハンバーガーメニューにする */
@media (max-width: 1200px) {
	.nav-button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		cursor: pointer;
		border-radius: 8px;
	}

	.nav-button span,
	.nav-button span::before,
	.nav-button span::after {
		display: block;
		width: 22px;
		height: 2px;
		background: var(--text);
		border-radius: 2px;
		transition: transform 0.2s, opacity 0.2s;
	}

	.nav-button span {
		position: relative;
	}

	.nav-button span::before,
	.nav-button span::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.nav-button span::before {
		top: -7px;
	}

	.nav-button span::after {
		top: 7px;
	}

	.nav-toggle:checked ~ .nav-button span {
		background: transparent;
	}

	.nav-toggle:checked ~ .nav-button span::before {
		transform: translateY(7px) rotate(45deg);
	}

	.nav-toggle:checked ~ .nav-button span::after {
		transform: translateY(-7px) rotate(-45deg);
	}

	.site-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 60px;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		box-shadow: var(--shadow);
		padding: 8px 16px 16px;
	}

	.site-nav a {
		padding: 12px 4px;
		border-bottom: 1px solid var(--border);
	}

	.site-nav .nav-cta {
		margin-top: 12px;
		border-bottom: 0;
	}

	.nav-toggle:checked ~ .site-nav {
		display: flex;
	}
}

@media (max-width: 960px) {
	.cards,
	.three {
		grid-template-columns: repeat(2, 1fr);
	}

	.flow-steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.screens {
		grid-template-columns: 1fr 1fr;
	}

	.screen-wide {
		grid-column: 1 / -1;
	}

	.hero-inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 720px) {
	body {
		font-size: 15px;
	}

	.section {
		padding: 52px 0;
	}

	.hero {
		padding: 40px 0;
	}

	.cards,
	.two,
	.three,
	.flow-steps {
		grid-template-columns: 1fr;
	}

	.screens {
		grid-template-columns: 1fr 1fr;
	}

	.screen-square {
		grid-column: 1 / -1;
	}

	.actions .button {
		width: 100%;
	}

	.actions-compact .button {
		width: auto;
	}

	.api-box {
		padding: 20px;
	}
}

/* blog */

.page-header {
	padding: 48px 0 8px;
	background:
		radial-gradient(60% 80% at 100% 0%, var(--accent-soft) 0%, transparent 60%),
		var(--bg);
}

.page-header h1 {
	font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem);
	margin-bottom: 8px;
}

.section-top {
	padding-top: 32px;
}

.post-list {
	display: grid;
	gap: 24px;
}

.post-card {
	display: grid;
	grid-template-columns: 2fr 3fr;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 3 / 2;
}

.post-card-body {
	padding: 24px 28px;
}

.post-card h2 {
	font-size: 1.25rem;
	margin: 6px 0 10px;
}

.post-card h2 a {
	color: var(--text);
}

.post-card h2 a:hover {
	color: var(--accent);
	text-decoration: none;
}

.post-card p {
	color: var(--text-muted);
}

.post-more {
	margin-bottom: 0;
	font-weight: 700;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 0.88rem;
	color: var(--text-muted);
	margin-bottom: 6px;
}

.post-category {
	display: inline-block;
	padding: 1px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 700;
	font-size: 0.8rem;
}

.post-container {
	width: min(800px, 100% - 32px);
}

.post-header {
	padding: 40px 0 24px;
}

.post-header h1 {
	font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem);
	margin-bottom: 12px;
}

.breadcrumb {
	font-size: 0.88rem;
	color: var(--text-muted);
	margin-bottom: 12px;
}

.post-cover {
	margin: 0 0 32px;
}

.post-cover img,
.post-body figure img {
	border-radius: 10px;
	border: 1px solid var(--border);
	width: 100%;
}

.post-body {
	font-size: 1.05rem;
}

.post-body h2 {
	font-size: 1.4rem;
	margin: 2em 0 0.6em;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--accent-soft);
}

.post-body h3 {
	font-size: 1.15rem;
	margin: 1.6em 0 0.5em;
	padding-left: 12px;
	border-left: 4px solid var(--accent);
}

.post-body figure {
	margin: 24px 0;
}

.post-body li {
	margin-bottom: 0.6em;
}

.photo-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 24px 0;
}

.photo-row figure {
	margin: 0;
}

.post-footer {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

/* news on the top page */

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

.news-card {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 18px;
	align-items: start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	box-shadow: var(--shadow);
}

.news-card img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 8px;
}

.news-card h3 {
	font-size: 1.05rem;
	margin: 4px 0 6px;
}

.news-card h3 a {
	color: var(--text);
}

.news-card h3 a:hover {
	color: var(--accent);
	text-decoration: none;
}

.news-card p:last-child {
	margin-bottom: 0;
	font-size: 0.92rem;
	color: var(--text-muted);
}

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

	.post-card-body {
		padding: 20px;
	}

	.photo-row {
		grid-template-columns: 1fr;
	}

	.news-list {
		grid-template-columns: 1fr;
	}

	.news-card {
		grid-template-columns: 1fr;
	}
}
