/*
 * mutyun Solutions - lainchan inspired retro theme
 * palette: lainchan "dark" (#0b000f / #7fdd57 / #677965)
 */

:root {
	--bg: #0b000f;
	--fg: #7fdd57;
	--muted: #677965;
	--line: #2b4426;
	--alert: #ff4040;
	--sans: "MS PGothic", "ＭＳ Ｐゴシック", Osaka, Arial, Helvetica, sans-serif;
	--mono: "MS Gothic", "ＭＳ ゴシック", "Osaka-Mono", "Courier New", Courier, monospace;
}

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

[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scrollbar-color: var(--muted) var(--bg);
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--fg);
	font: 14px/1.6 var(--sans);
	overflow-x: hidden;
}

/* CRT vignette over everything (scanlines removed: they tired the eyes on long reports) */
body::after {
	content: "";
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9999;
	pointer-events: none;
	background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .6) 100%);
}

a:link,
a:visited {
	color: var(--muted);
	text-decoration: none;
}

a:hover,
a:focus-visible {
	color: var(--fg);
	text-decoration: underline;
}

:focus-visible {
	outline: 1px dotted var(--fg);
	outline-offset: 2px;
}

/* ------------------------------------------------------------ layout */

.mainblock {
	position: relative;
	z-index: 10;
	max-width: 670px;
	margin: 0 auto;
	padding: 12px 16px 24px;
}

.phrase {
	/* keep each English phrase together; wrap only between phrases */
	display: inline-block;
}

/* ------------------------------------------------------------ boardlist */

.boardlist {
	color: var(--muted);
	font-size: 12px;
	text-align: center;
}

.boardlist .group {
	display: inline-block;
	margin: 0 4px;
	white-space: nowrap;
}

/* ------------------------------------------------------------ marquee */

.marquee {
	margin-top: 10px;
	padding: 2px 0;
	overflow: hidden;
	white-space: nowrap;
	border-top: 1px dashed var(--muted);
	border-bottom: 1px dashed var(--muted);
	font-family: var(--mono);
	font-size: 13px;
}

.marquee span {
	display: inline-block;
	padding-left: 100%;
	animation: marquee 22s linear infinite;
}

@keyframes marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-100%);
	}
}

/* ------------------------------------------------------------ header */

.site-header {
	padding: 18px 0 4px;
	text-align: center;
}

.globe {
	display: block;
	width: 120px;
	height: 120px;
	margin: 0 auto;
	filter: drop-shadow(0 0 4px rgba(127, 221, 87, .5));
}

.title {
	margin: 10px 0 14px;
	color: var(--fg);
	font-family: "Arial Black", "Arial Bold", Gadget, Impact, sans-serif;
	font-weight: 900;
	font-size: clamp(2.4rem, 10vw, 5.2rem);
	line-height: .95;
	letter-spacing: -.08em;
	text-shadow: 0 0 6px rgba(127, 221, 87, .45);
	text-wrap: balance;
	overflow-wrap: break-word;
}

.undertitle {
	margin: 0;
	font-family: var(--mono);
	font-size: clamp(13px, 3.6vw, 16px);
	line-height: 1.7;
}

.cursor {
	animation: blink 1s steps(1, end) infinite;
}

.buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
}

/* ------------------------------------------------------------ buttons */

.btn {
	min-width: 120px;
	padding: 6px 18px;
	color: var(--fg);
	background: var(--bg);
	border: 2px outset #a6f08a;
	border-radius: 0;
	font-family: var(--mono);
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
}

.btn::before {
	content: "[ ";
}

.btn::after {
	content: " ]";
}

.btn:hover,
.btn:focus-visible,
.btn[aria-expanded="true"] {
	color: var(--bg);
	background: var(--fg);
}

.btn:active,
.btn[aria-expanded="true"] {
	border-style: inset;
}

.btn i {
	margin-right: 4px;
}

/* ------------------------------------------------------------ boxes */

.box {
	margin-top: 22px;
	background: var(--bg);
	border: 1px solid var(--line);
	text-align: left;
}

.box h2 {
	margin: 0;
	padding: 3px 7px;
	color: var(--bg);
	background: var(--fg);
	font-family: var(--sans);
	font-size: 12pt;
	font-weight: bold;
}

.services {
	width: 100%;
	border-collapse: collapse;
}

.services th,
.services td {
	padding: 5px 10px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px dotted var(--line);
}

.services tr:last-child th,
.services tr:last-child td {
	border-bottom: 0;
}

.services th {
	width: 1%;
	color: var(--fg);
	font-weight: normal;
	white-space: nowrap;
}

.services th::before {
	content: "> ";
	color: var(--muted);
}

.services td {
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ footer */

footer {
	position: relative;
	z-index: 10;
	width: calc(100% - 32px);
	max-width: 638px;
	margin: 0 auto;
	padding: 16px 0 28px;
	color: var(--muted);
	border-top: 1px dashed var(--muted);
	font-size: 12px;
	text-align: center;
}

footer p {
	margin: 6px 0 0;
}

.links {
	font-size: 14px;
}

.links .fa-brands {
	margin-right: 2px;
}

.banners {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 16px 0;
}

.banners img,
.construction img {
	display: block;
	image-rendering: pixelated;
}

.construction img {
	margin: 0 auto;
}

.blink {
	color: var(--alert);
	font-weight: bold;
	animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
	50% {
		visibility: hidden;
	}
}

/* ------------------------------------------------------------ player */
/* the player iframe is styled inline in index.html (togglePlay) */

.player {
	position: fixed;
	top: 8px;
	right: 8px;
	z-index: 10000;
	opacity: 1;
	transition: opacity 1s ease;
}

.player:hover {
	opacity: 1 !important;
}

/* ------------------------------------------------------------ small screens */

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

	.globe {
		width: 96px;
		height: 96px;
	}

	.buttons .btn {
		flex: 1 1 0;
		min-width: 0;
		max-width: 180px;
		padding: 8px 6px;
	}

	/* stack the service table: name on one line, link below */
	.services,
	.services tbody,
	.services tr,
	.services th,
	.services td {
		display: block;
		width: auto;
	}

	.services tr {
		padding: 7px 10px;
		border-bottom: 1px dotted var(--line);
	}

	.services tr:last-child {
		border-bottom: 0;
	}

	.services th,
	.services td {
		padding: 0;
		border: 0;
		white-space: normal;
	}

	.services td {
		padding-left: 1.2em;
	}
}

/* ------------------------------------------------------------ reports */

.crumbs {
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 12px;
	text-align: center;
}

.box .more {
	margin: 0;
	padding: 5px 10px;
	border-top: 1px dotted var(--line);
	font-size: 13px;
}

/* トップの Reports: 年のフォルダ。開くとその年のレポートが下に並ぶ */
.report-year + .report-year {
	border-top: 1px dotted var(--line);
}

.report-year summary {
	padding: 5px 10px;
	color: var(--fg);
	cursor: pointer;
	list-style: none;
}

.report-year summary::-webkit-details-marker {
	display: none;
}

.report-year summary:hover,
.report-year summary:focus-visible {
	color: var(--bg);
	background: var(--fg);
}

.report-year summary .count {
	color: var(--muted);
	font-size: 12px;
}

.report-year summary:hover .count,
.report-year summary:focus-visible .count {
	color: inherit;
}

.report-year .fa-folder-open,
.report-year[open] .fa-folder {
	display: none;
}

.report-year[open] .fa-folder-open {
	display: inline-block;
}

.report-year .services {
	border-top: 1px dotted var(--line);
}

.report-year .services th {
	padding-left: 26px;
}

.reports .meta {
	margin-left: 8px;
	color: var(--muted);
	font-family: var(--mono);
	font-size: 12px;
}

.reports .summary {
	color: var(--muted);
	font-size: 13px;
}

.report-meta {
	margin: 0;
	padding: 6px 10px;
	color: var(--muted);
	border-bottom: 1px dotted var(--line);
	font-family: var(--mono);
	font-size: 12px;
}

.report {
	padding: 4px 12px 14px;
	overflow-wrap: anywhere;
}

.box .report h2 {
	margin: 20px 0 8px;
	padding: 0 0 2px;
	color: var(--fg);
	background: none;
	border-bottom: 1px dashed var(--muted);
	font-size: 13pt;
}

.report h2::before {
	content: "> ";
	color: var(--muted);
}

.report h3 {
	margin: 16px 0 6px;
	color: var(--fg);
	font-size: 12pt;
}

.report p,
.report ul,
.report ol {
	margin: 8px 0;
}

.report blockquote {
	margin: 10px 0;
	padding: 2px 10px;
	color: var(--muted);
	border-left: 3px solid var(--line);
}

.report table {
	display: block;
	max-width: 100%;
	margin: 10px 0;
	overflow-x: auto;
	border-collapse: collapse;
}

.report th,
.report td {
	padding: 4px 10px;
	border: 1px solid var(--line);
	white-space: nowrap;
}

.report th {
	color: var(--bg);
	background: var(--fg);
	font-weight: normal;
}

.report code,
.report pre {
	font-family: var(--mono);
	font-size: 13px;
}

.report pre {
	padding: 8px 10px;
	overflow-x: auto;
	border: 1px solid var(--line);
}

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

/* ------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
	.marquee {
		white-space: normal;
		text-align: center;
	}

	.marquee span {
		padding-left: 0;
		animation: none;
	}

	.blink,
	.cursor {
		animation: none;
	}
}
