/* Base styles: tokens, typography, header, footer and content pages. */

@font-face {
	font-family: "IBM Plex Sans";
	src: url("../fonts/plex-sans-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url("../fonts/plex-sans-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url("../fonts/plex-sans-600.woff2") format("woff2");
	font-weight: 600 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Mono";
	src: url("../fonts/plex-mono-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Mono";
	src: url("../fonts/plex-mono-500.woff2") format("woff2");
	font-weight: 500 700;
	font-style: normal;
	font-display: swap;
}

/* Dark (only when an administrator chooses it). */
:root[data-theme="dark"] {
	--bg: #121314;
	--bg-raised: #191a1c;
	--bg-sunken: #0d0e0f;
	--bg-hover: #222326;
	--line: #2a2c2f;
	--line-strong: #3d4044;
	--text: #e6e6e4;
	--text-sub: #a0a3a9;
	--text-untyped: #80848c;
	--accent: #0f62fe;
	--accent-hover: #0050e6;
	--accent-contrast: #ffffff;
	--accent-text: #78a9ff;
	--accent-soft: rgba(69, 137, 255, 0.14);
	--success: #42be65;
	--success-soft: rgba(66, 190, 101, 0.12);
	--error: #ff8389;
	--error-soft: rgba(250, 77, 86, 0.16);
	--warning: #f1c21b;
	--paper: #f7f6f2;
	--paper-ink: #161616;
	--paper-sub: #5c5c5c;
	--paper-line: #dcdad3;
	--menu-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
	color-scheme: dark;
}

/* Light (default). */
:root,
:root[data-theme="light"] {
	--bg: #ffffff;
	--bg-raised: #ffffff;
	--bg-sunken: #f5f5f4;
	--bg-hover: #f0f0ee;
	--line: #e3e3e1;
	--line-strong: #c4c4c1;
	--text: #161616;
	--text-sub: #525252;
	--text-untyped: #6b6b6b;
	--accent: #0f62fe;
	--accent-hover: #0050e6;
	--accent-contrast: #ffffff;
	--accent-text: #0f5ae0;
	--accent-soft: rgba(15, 98, 254, 0.09);
	--success: #198038;
	--success-soft: rgba(25, 128, 56, 0.09);
	--error: #c21b24;
	--error-soft: rgba(218, 30, 40, 0.09);
	--warning: #8e6a00;
	--paper: #ffffff;
	--paper-ink: #161616;
	--paper-sub: #5c5c5c;
	--paper-line: #e0e0de;
	--menu-shadow: 0 12px 32px rgba(22, 22, 22, 0.14);
	color-scheme: light;
}

:root {
	--font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	--radius: 4px;
	--radius-l: 6px;
	--width-content: 1160px;
	--width-tool: 960px;
	--width-prose: 720px;
	--gutter: 32px;
	--header-h: 60px;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-ui);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

::selection {
	background: var(--accent);
	color: var(--accent-contrast);
}

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

a {
	color: var(--accent-text);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--text);
}

:focus-visible {
	outline: 2px solid var(--accent-text);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
	line-height: 1.2;
	letter-spacing: -0.012em;
	margin: 0 0 0.6em;
	font-weight: 600;
	color: var(--text);
}

h1 {
	font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
}

h2 {
	font-size: 1.375rem;
}

h3 {
	font-size: 1.0625rem;
}

p {
	margin: 0 0 1em;
}

code,
kbd {
	font-family: var(--font-mono);
	font-size: 0.875em;
}

code {
	background: var(--bg-sunken);
	border: 1px solid var(--line);
	border-radius: 3px;
	padding: 0.05em 0.35em;
}

kbd {
	display: inline-block;
	min-width: 1.6em;
	padding: 0.05em 0.4em;
	border: 1px solid var(--line-strong);
	border-radius: 3px;
	background: var(--bg-raised);
	color: var(--text-sub);
	font-size: 0.75rem;
	line-height: 1.6;
	text-align: center;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 12px;
	top: 12px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--bg-raised);
	color: var(--text);
	border: 2px solid var(--accent-text);
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
	position: relative;
	z-index: 30;
	border-bottom: 1px solid var(--line);
	background: var(--bg);
	transition: opacity 0.3s ease;
}

.site-header__inner {
	max-width: var(--width-content);
	height: var(--header-h);
	margin: 0 auto;
	padding: 0 var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-brand__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
}

.site-brand__link:hover {
	color: var(--text);
}

.site-brand__mark {
	display: inline-flex;
	color: var(--accent-text);
}

.site-brand__text {
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.01em;
}

.site-brand__tld {
	color: var(--text-sub);
	font-weight: 400;
}

.site-brand .custom-logo {
	display: block;
	max-height: 36px;
	width: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 2px;
}

.site-nav__list > li > a,
.jobs-menu > summary {
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--radius);
	color: var(--text-sub);
	text-decoration: none;
	font-size: 0.9375rem;
	cursor: pointer;
}

.site-nav__list > li > a:hover,
.site-nav__list > li > a[aria-current="page"],
.jobs-menu > summary:hover,
.jobs-menu[open] > summary {
	color: var(--text);
	background: var(--bg-hover);
}

.jobs-menu {
	position: relative;
}

.jobs-menu > summary {
	list-style: none;
}

.jobs-menu > summary::-webkit-details-marker {
	display: none;
}

.jobs-menu > summary::after {
	content: "";
	width: 5px;
	height: 5px;
	margin-left: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.jobs-menu__panel {
	position: absolute;
	left: 0;
	top: calc(100% + 8px);
	z-index: 50;
	width: 300px;
	padding: 6px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
	box-shadow: var(--menu-shadow);
}

.jobs-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jobs-menu__list a,
.jobs-menu__all {
	display: block;
	padding: 8px 10px;
	border-radius: var(--radius);
	color: var(--text);
	text-decoration: none;
	font-size: 0.9375rem;
}

.jobs-menu__list a:hover,
.jobs-menu__all:hover {
	background: var(--bg-hover);
	color: var(--text);
}

.jobs-menu__all {
	margin-top: 4px;
	border-top: 1px solid var(--line);
	border-radius: 0 0 var(--radius) var(--radius);
	color: var(--accent-text);
}

.site-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: transparent;
	color: var(--text);
	cursor: pointer;
}

.site-menu-toggle__close,
.jts-nav-open .site-menu-toggle__open {
	display: none;
}

.jts-nav-open .site-menu-toggle__close {
	display: block;
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.site-main {
	flex: 1 0 auto;
	width: 100%;
	max-width: var(--width-content);
	margin: 0 auto;
	padding: 32px var(--gutter) 96px;
}

.site-main--content {
	max-width: calc(var(--width-prose) + 2 * var(--gutter));
	padding-top: 56px;
}

.site-main--wide {
	max-width: calc(var(--width-tool) + 2 * var(--gutter));
}

/* ------------------------------------------------------------------ */
/* Buttons and forms                                                   */
/* ------------------------------------------------------------------ */

.jts-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font: inherit;
	font-weight: 500;
	font-size: 0.9375rem;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.jts-button--primary {
	background: var(--accent);
	color: var(--accent-contrast);
}

.jts-button--primary:hover {
	background: var(--accent-hover);
	color: var(--accent-contrast);
}

.jts-button--secondary {
	background: transparent;
	color: var(--text);
	border-color: var(--line-strong);
}

.jts-button--secondary:hover {
	background: var(--bg-hover);
	color: var(--text);
}

.jts-button--ghost {
	background: transparent;
	color: var(--text-sub);
}

.jts-button--ghost:hover {
	color: var(--text);
	background: var(--bg-hover);
}

.jts-button--large {
	min-height: 46px;
	padding: 0 26px;
	font-size: 1rem;
}

.jts-link-button {
	border: 0;
	background: none;
	padding: 2px;
	font: inherit;
	color: var(--accent-text);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.jts-link-button:hover {
	color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="url"],
select,
textarea {
	font: inherit;
	color: var(--text);
	background: var(--bg-sunken);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 8px 10px;
	min-height: 40px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--accent-text);
	outline-offset: 0;
	border-color: transparent;
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-form .search-submit {
	font: inherit;
	min-height: 40px;
	padding: 0 16px;
	border-radius: var(--radius);
	border: 1px solid var(--line-strong);
	background: var(--bg-raised);
	color: var(--text);
	cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Content pages                                                       */
/* ------------------------------------------------------------------ */

.entry-header {
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

.entry-title {
	margin-bottom: 0;
}

.entry-meta,
.entry-tags {
	color: var(--text-sub);
	font-size: 0.875rem;
}

.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--text);
}

.entry-content > * {
	max-width: var(--width-prose);
}

.entry-content h2 {
	margin-top: 1.9em;
	font-size: 1.3125rem;
}

.entry-content h3 {
	margin-top: 1.6em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25em;
}

.entry-content li {
	margin-bottom: 0.45em;
}

.entry-content blockquote {
	margin: 1.5em 0;
	padding-left: 1em;
	border-left: 2px solid var(--line-strong);
	color: var(--text-sub);
}

.entry-content table {
	border-collapse: collapse;
	width: 100%;
}

.entry-content th,
.entry-content td {
	border-bottom: 1px solid var(--line);
	padding: 8px;
	text-align: left;
}

.entry-thumbnail img {
	border-radius: var(--radius-l);
	margin-bottom: 24px;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption-text,
figcaption {
	color: var(--text-sub);
	font-size: 0.875rem;
}

.sticky .post-summary__title::before {
	content: "Pinned: ";
	color: var(--text-sub);
	font-weight: 400;
}

.bypostauthor > .comment-body {
	border-left: 2px solid var(--line-strong);
	padding-left: 12px;
}

.page-header {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

.page-title {
	margin: 0;
}

.post-summary {
	padding: 24px 0;
	border-bottom: 1px solid var(--line);
}

.post-summary__title {
	font-size: 1.25rem;
	margin-bottom: 4px;
}

.post-summary__title a {
	color: var(--text);
	text-decoration: none;
}

.post-summary__title a:hover {
	color: var(--accent-text);
}

.post-summary__excerpt p {
	margin: 8px 0 0;
	color: var(--text-sub);
}

.navigation.pagination,
.post-navigation {
	margin-top: 40px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}

.nav-label {
	display: block;
	font-size: 0.8125rem;
	color: var(--text-sub);
}

.page-numbers {
	padding: 6px 10px;
	border-radius: var(--radius);
}

.page-numbers.current {
	background: var(--bg-hover);
}

.comments-area {
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--line);
}

.comment-list {
	padding-left: 0;
	list-style: none;
}

.comment-list .children {
	list-style: none;
	padding-left: 24px;
}

.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}

.comment-form label {
	display: block;
	font-weight: 500;
	margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
}

.comment-form .submit {
	font: inherit;
	font-weight: 500;
	min-height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--radius);
	background: var(--accent);
	color: var(--accent-contrast);
	cursor: pointer;
}

.jts-admin-hint {
	padding: 12px 16px;
	border: 1px dashed var(--line-strong);
	color: var(--text-sub);
	font-size: 0.9375rem;
}

/* Typing tests index. */
.jts-test-index {
	width: 100%;
	margin-top: 8px;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.jts-test-index th,
.jts-test-index td {
	padding: 14px 12px 14px 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.jts-test-index thead th {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-sub);
}

.jts-test-index tbody th {
	font-weight: 600;
	white-space: nowrap;
}

.jts-test-index td {
	color: var(--text-sub);
}

.jts-test-index__num {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	white-space: nowrap;
}

.jts-test-index__note {
	margin-top: 16px;
	color: var(--text-sub);
	font-size: 0.875rem;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
	border-top: 1px solid var(--line);
	background: var(--bg-sunken);
	color: var(--text-sub);
	font-size: 0.875rem;
	transition: opacity 0.3s ease;
}

.site-footer__inner {
	max-width: var(--width-content);
	margin: 0 auto;
	padding: 48px var(--gutter) 32px;
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
	gap: 32px 40px;
}

.site-footer__brand {
	display: inline-block;
	margin-bottom: 10px;
	color: var(--text);
	font-weight: 600;
	text-decoration: none;
}

.site-footer__about p {
	margin: 0;
	max-width: 380px;
	line-height: 1.6;
}

.site-footer__heading {
	margin: 0 0 12px;
	color: var(--text);
	font-weight: 600;
	font-size: 0.875rem;
}

.site-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.site-footer__list a {
	color: var(--text-sub);
	text-decoration: none;
}

.site-footer__list a:hover {
	color: var(--text);
	text-decoration: underline;
}

.site-footer__bottom {
	max-width: var(--width-content);
	margin: 0 auto;
	padding: 18px var(--gutter) 28px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 32px;
	border-top: 1px solid var(--line);
	font-size: 0.8125rem;
}

.site-footer__bottom p {
	margin: 0;
}

.site-footer__disclaimer {
	max-width: var(--width-content);
	margin: 0 auto;
	padding: 0 var(--gutter) 24px;
	font-size: 0.8125rem;
	line-height: 1.6;
}

.site-footer__more {
	color: var(--accent-text) !important;
}

.site-footer__top {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 6px 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 0.8125rem;
	text-decoration: none;
}

.site-footer__top:hover {
	background: var(--bg-hover);
	color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
	/* Remove motion outright. (A tiny transition-duration on every element
	   would also animate `visibility`, delaying when controls become focusable.) */
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------------ */
/* Accounts: header menu, avatars, badge, shared bits                  */
/* ------------------------------------------------------------------ */

.site-nav__account {
	margin-left: 6px;
}

.site-nav__list > li > a.site-nav__signin {
	color: var(--text);
	border: 1px solid var(--line-strong);
}

.site-nav__list > li > a.site-nav__signin:hover {
	border-color: var(--text-sub);
}

.account-menu > summary {
	gap: 8px;
	padding-left: 6px;
}

.account-menu__name {
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--text);
}

.account-menu .jobs-menu__panel {
	left: auto;
	right: 0;
	width: 220px;
}

.jts-avatar {
	display: inline-block;
	flex: none;
	width: var(--size, 40px);
	height: var(--size, 40px);
	border-radius: 50%;
	object-fit: cover;
	background: var(--bg-sunken);
}

.jts-avatar--initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: calc(var(--size, 40px) * 0.4);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: hsl(var(--hue, 215) 45% 30%);
	background: hsl(var(--hue, 215) 60% 92%);
}

:root[data-theme="dark"] .jts-avatar--initials {
	color: hsl(var(--hue, 215) 60% 85%);
	background: hsl(var(--hue, 215) 30% 24%);
}

.jts-vbadge {
	display: inline-flex;
	vertical-align: -0.15em;
	margin-left: 4px;
}

.jts-vbadge svg {
	display: block;
}

.jts-button--small {
	min-height: 32px;
	padding: 0 12px;
	font-size: 0.875rem;
}

.jts-button--block {
	width: 100%;
}

.jts-button--danger {
	background: var(--error);
	color: #ffffff;
}

.jts-button--danger:hover {
	background: var(--error);
	color: #ffffff;
	filter: brightness(0.92);
}

.jts-notice {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	background: var(--bg-raised);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.jts-notice--success {
	border-left-color: var(--success);
}

.jts-notice--error {
	border-left-color: var(--error);
}

.jts-delta {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	color: var(--text-sub);
}

.jts-delta.is-up {
	color: var(--success);
}

.jts-delta.is-down {
	color: var(--error);
}
