/* unixcore.sh/blog: same look as the hub and guestbook (velvet box, badge type, silver buttons, black panels) */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
	min-height: 100vh; min-height: 100svh;
	display: flex; flex-direction: column;
	background: #000 url("/_hub/tile.png");
	color: #fff;
	font: 15px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
a { color: inherit; }
[hidden] { display: none !important; }

main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px; }

.box {
	width: 820px; max-width: 100%;
	padding: 32px 40px 40px;
	background: #2a0a2a url("/_hub/velvet.png");
	border: 2px solid #000;
	box-shadow: 0 0 0 1px #6a2a6a, 8px 8px 0 #000;
}

header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h1 {
	margin: 0;
	font: bold clamp(32px, 7vw, 56px)/1 Verdana, Tahoma, "DejaVu Sans", sans-serif;
	letter-spacing: -0.04em;
	text-shadow: 0.04em 0.04em 0 #000;
}
h1 a { text-decoration: none; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
nav form { margin: 0; }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: bold; }
.me:hover span { text-decoration: underline; }

/* silver bevelled buttons, same chrome as the badge */
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	height: 42px; padding: 0 18px;
	background: linear-gradient(#e6e6e6, #c0c0c0 45%, #a8a8a8);
	color: #000;
	border: 2px solid; border-color: #fff #404040 #404040 #fff;
	box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf, 2px 2px 0 #000;
	font: bold 14px/1 Verdana, Tahoma, "DejaVu Sans", sans-serif; letter-spacing: -0.02em;
	text-shadow: 1px 1px 0 #fff;
	text-decoration: none; white-space: nowrap;
	cursor: pointer; user-select: none;
}
.btn:hover { background: linear-gradient(#f2f2f2, #cfcfcf 45%, #b4b4b4); }
.btn:active {
	background: linear-gradient(#a8a8a8, #c0c0c0 55%, #d4d4d4);
	border-color: #404040 #fff #fff #404040;
	box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #dfdfdf;
	transform: translate(2px, 2px);
}
.btn:focus-visible, .btn:focus-within { outline: 2px dotted #fff; outline-offset: 3px; }
.btn-small { height: 32px; padding: 0 12px; font-size: 12px; }

/* black panels inside the box */
.panel { display: block; background: #000; border: 1px solid #fff; padding: 20px 24px; }
.panel + .panel, .panel + form, .invite + .panel { margin-top: 20px; }
.panel h3 { margin: 0 0 14px; font: bold 18px/1.2 Verdana, Tahoma, "DejaVu Sans", sans-serif; letter-spacing: -0.02em; }

.invite { margin: 0 0 16px; padding: 6px 10px; border: 1px dashed #c0c0c0; color: #c0c0c0; font-size: 13px; background: #000; }
.invite a { color: #fff; }
.err { margin: 0 0 14px; color: #ff7a7a; font-weight: bold; }
.ok { margin: 0 0 14px; color: #7dff9e; font-weight: bold; }
.hint { margin: 0 0 14px; color: #808080; font-size: 13px; }
.meta { color: #6b6b6b; font-size: 12px; }
.empty { margin: 0; color: #808080; }
.tag { display: inline-block; padding: 0 5px; border: 1px solid #c0c0c0; color: #c0c0c0; font-size: 11px; line-height: 16px; text-transform: uppercase; }

/* avatars: square with the badge's black edge */
.avatar { display: inline-block; flex: none; border: 1px solid #000; box-shadow: 0 0 0 1px #6a2a6a; background: #2a0a2a; object-fit: cover; }
.avatar-none { display: inline-flex; align-items: center; justify-content: center; font: bold 12px Verdana, sans-serif; }

.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; font-size: 13px; }
.byline a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.byline a:hover b { text-decoration: underline; }

/* post list */
.item { padding: 16px 0; border-top: 1px solid #262626; overflow-wrap: anywhere; }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
.item h2 { margin: 0; font: bold 21px/1.25 Verdana, Tahoma, "DejaVu Sans", sans-serif; letter-spacing: -0.03em; }
.item h2 a { text-decoration: none; }
.item h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.excerpt { margin: 8px 0 0; color: #c0c0c0; font-size: 14px; }

/* one post */
.title { margin: 0; font: bold clamp(24px, 5vw, 34px)/1.15 Verdana, Tahoma, "DejaVu Sans", sans-serif; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.tools { margin-top: 14px; }
.faq { margin-top: 20px; }
.faq h2 { font-size: 18px; margin-top: 1.6em; }
article .prose { margin-top: 24px; padding-top: 20px; border-top: 1px solid #262626; }

/* heart + view count under a post */
.reactions { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #262626; }
.heart-form { margin: 0; }
.heart { gap: 6px; }
.heart .h { font-size: 15px; color: #404040; }
.heart.on .h { color: #b0103a; text-shadow: none; }
.heart .n { min-width: 1ch; }

.author { display: flex; align-items: center; gap: 16px; }
.author h2 { margin: 0; font: bold 24px/1.2 Verdana, Tahoma, "DejaVu Sans", sans-serif; letter-spacing: -0.03em; }
.author .meta { margin: 4px 0 0; }

/* rendered markdown */
.prose { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose table, .prose figure { margin: 0 0 1em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
	margin: 1.5em 0 0.5em;
	font-family: Verdana, Tahoma, "DejaVu Sans", sans-serif; font-weight: bold; letter-spacing: -0.02em; line-height: 1.25;
}
.prose h1 { font-size: 26px; } .prose h2 { font-size: 22px; } .prose h3 { font-size: 18px; } .prose h4, .prose h5, .prose h6 { font-size: 15px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #c0c0c0; }
.prose ul, .prose ol { padding-left: 1.6em; }
.prose li + li { margin-top: 0.25em; }
.prose code { padding: 1px 4px; background: #1a1a1a; border: 1px solid #333; font-size: 0.92em; }
.prose pre {
	padding: 12px 14px; overflow-x: auto;
	background: #111;
	border: 2px solid; border-color: #404040 #c0c0c0 #c0c0c0 #404040; /* sunken, like the inputs */
	font-size: 13px; line-height: 1.45;
}
.prose pre code { padding: 0; background: none; border: 0; font-size: inherit; }
.prose blockquote { padding: 2px 0 2px 14px; border-left: 3px solid #6a2a6a; color: #c0c0c0; }
.prose hr { border: 0; border-top: 1px dashed #404040; margin: 1.5em 0; }
.prose img, .prose video { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid #333; }
.prose p > img { margin: 0.25em auto; }
.prose audio { display: block; width: 100%; }
.prose figure { text-align: center; }
.prose figcaption { margin-top: 6px; color: #808080; font-size: 12px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 5px 10px; border: 1px solid #333; text-align: left; }
.prose th { background: #111; }
.prose input[type=checkbox] { margin: 0 6px 0 0; }

/* forms */
form label { display: block; margin-bottom: 14px; color: #c0c0c0; font-size: 13px; }
input[type=text], textarea {
	display: block; width: 100%; margin-top: 4px;
	padding: 8px 10px;
	background: #111; color: #fff;
	border: 2px solid; border-color: #404040 #c0c0c0 #c0c0c0 #404040; /* sunken, the opposite of the buttons */
	font: inherit; font-size: 14px;
	border-radius: 0;
}
input[type=text]:focus, textarea:focus { outline: none; border-color: #808080 #fff #fff #808080; background: #000; }
input.code { max-width: 180px; font-size: 22px; letter-spacing: 0.3em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.actions a { color: #c0c0c0; font-size: 13px; }
.actions a:hover { color: #fff; }
.actions .buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* editor */
.title-input { margin: 0 0 14px !important; font: bold 22px/1.2 Verdana, Tahoma, "DejaVu Sans", sans-serif !important; letter-spacing: -0.02em; }
.tabs { display: flex; align-items: flex-end; gap: 4px; }
.tabs .spacer { flex: 1; }
.tabs .upload { margin-bottom: 6px; }
.tab {
	padding: 6px 14px; margin-bottom: -2px;
	background: #1a1a1a; color: #808080;
	border: 2px solid #404040; border-bottom: 0;
	font: bold 13px/1 Verdana, Tahoma, "DejaVu Sans", sans-serif;
	cursor: pointer;
}
.tab.on { background: #111; color: #fff; border-color: #c0c0c0; position: relative; z-index: 1; }
.tab:focus-visible { outline: 2px dotted #fff; outline-offset: 2px; }
.editor textarea { margin-top: 0; min-height: 420px; resize: vertical; font-size: 14px; line-height: 1.55; tab-size: 4; }
.editor textarea.drop { border-color: #7dff9e; border-style: dashed; }
.editor .preview { min-height: 420px; padding: 14px 16px; background: #111; border: 2px solid; border-color: #404040 #c0c0c0 #c0c0c0 #404040; }
.editor .hint { margin: 10px 0 14px; }
.danger { margin-top: 16px; text-align: right; }
.danger .btn { color: #8a0000; }

footer {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
	padding: 0 16px 24px;
	font-size: 12px; color: #808080;
}
footer img { display: block; image-rendering: pixelated; }
footer a { color: #808080; }
footer a:hover { color: #fff; }

@media (max-width: 600px) {
	main { padding: 32px 12px; }
	.box { padding: 24px 12px 16px; box-shadow: 0 0 0 1px #6a2a6a, 5px 5px 0 #000; }
	.panel { padding: 14px; }
	.btn { padding: 0 10px; font-size: 12px; height: 36px; letter-spacing: -0.04em; }
	.btn-small { height: 30px; }
	nav { gap: 6px; }
	.me span { display: none; }
	.editor textarea, .editor .preview { min-height: 300px; }
}
